Other

настоящий искусственный интеллект для каждодневной работы -- это regexpы, но никак не C++ и особенно LISP (russian version)

Submitted by olecom
on June 16, 2010 - 10:53am

Вскоре будет состряпана.
to be done soon (dup of the prev. post, don't know how to remove)

real AI (artificial intelligence) for everyday business is regexp, but not C++ or LISP especially (updated)

Submitted by olecom
on June 16, 2010 - 10:53am

regexp with `sed` are an easiest way to simplify manual analysis in bookkeeping, when plain text can be available from the ugly so called "software", and PCs are a form of typewriters.

monitoring "Smart Array" line of hardware raids with solaris 10 on HP servers

Submitted by mator
on January 11, 2010 - 5:49am

Recently discovered, that it is possible to monitor "Smart Array" controllers under solaris 10 OS. You need to install HPQacucli solaris package, which can be downloaded from hp.com site, read carefully "RELEASE NOTES" about support of your server hardware and controllers, also make sure that you have a recent version of CPQary3 driver installed (2.1.0 or later). Here's an example output:

new language: programming that can speak to modern hardware easily

Submitted by olecom
on November 27, 2009 - 8:10am

Now i'm doing some kind of translator (to C), that can turn second to its functional equivalent -- first:

void handle_mcucsr(void) __attribute__((section(".init3"))) __attribute__((naked));
void handle_mcucsr(void)
{
    mcucsr = MCUCSR;
    MCUCSR = 0;
}

handle_mcucsr: sect[ion] .init3, naked!
	mcucsr = MCUCSR
	MCUCSR = 0

Partition a list numerically?

Submitted by Greg Buchholz
on June 9, 2009 - 8:13pm

Over on the Haskell Cafe mailing list, the topic of which of the following two definitions was better came up:

buildPartitions xs ns = zipWith take ns . init $ scanl (flip drop) xs ns


...or...

takeList :: [Int] -> [a] -> [[a]]
takeList [] _         =  []
takeList _ []         =  []
takeList (n : ns) xs  =  head : takeList ns tail
     where (head, tail) = splitAt n xs

...with various parties declaring the first example as "too smart", and others claiming that the second example is newbie level code. Well I'm much too lazy to try to reason out what those snippets might do at a glance. But the type signature was a pretty big hint as to what the intent was. So I fired up

Think About Career

Submitted by jennyl8221
on May 6, 2009 - 12:43am

The concept of career planning is no simple one to say the very least. Although you've probably heard it before, I will reiterate the notion that selecting the right career field can be irksome and stressful. Everyone on this planet wants to choose a job that they're going to enjoy, or at least partially enjoy. This is why career planning is so essential.

Preventing STP forwarding loops

Submitted by ciscozine
on February 4, 2009 - 3:24pm

The Spanning Tree Protocol is an OSI layer-2 protocol that ensures a loop-free topology for any bridged LAN. Spanning tree allows a network design to include spare (redundant) links to provide automatic backup paths if an active link fails, without the danger of bridge loops, or the need for manual enabling/disabling of these backup links.

DOCSIS 3.0: Modems Over 300 Mbps

Submitted by ciscozine
on January 30, 2009 - 6:00am

Cisco Systems is developing a cable modem that will use Broadcom’s recently announced DOCSIS 3.0 silicon to bond together eight downstream channels – letting cable providers, theoretically, pump Internet content down to subscribers at more than 300 Mbps.

Cisco IOS: Attack & Defense

Submitted by ciscozine
on January 30, 2009 - 5:56am

Surfing the web, I have found a nice talk on Cisco IOS Forensics and Exploits, explained during the 25C3: “Cisco IOS Attack & Defense - The State of the Art“.

What is 25C3?

Finding Foreign Key Constraints in Oracle by JP Vijaykumar

Submitted by UMBRO
on January 18, 2009 - 11:24pm

Finding Foreign Key Constraints in Oracle by JP Vijaykumar

http://www.databasejournal.com/features/oracle/article.php/3665591/Findi...

SELECT owner, constraint_name, constraint_type, table_name, r_owner,
r_constraint_name
FROM all_constraints
WHERE constraint_type = 'R'
AND r_constraint_name IN (

Non-ugly average in Haskell

Submitted by Greg Buchholz
on November 7, 2008 - 9:01pm

data E a b = L (E a b) | R b deriving (Show)

fold f acc [] = R acc                      
fold f acc (x:xs) = let x' = f acc x 
                    in x' `seq` (L $ fold f x' xs)

lift2 f = \x y -> par_eval x y
    where par_eval   (L x)   (L y) = par_eval x y
          par_eval x@(R _)   (L y) = par_eval x y
          par_eval   (L x) y@(R _) = par_eval x y
          par_eval   (R x)   (R y) = R $ f x y

lift1 f (L x) = lift1 f x
lift1 f (R x) = R (f x)

sum' xs = fold (+) 0 xs
len' xs = fold (\x y->succ x) 0 xs
avg  xs =  (sum' xs) / (len' xs)

main = print $ avg [1..1e7]

instance Eq b => Eq (E a b) where
    a == b = case (lift2 (==) a b) of (R x) -> x

instance Num b => Num (E a b) where
   (+) = lift2 (+)
   (*) = lift2 (*)
   fromInteger = R . fromInteger
   abs = lift1 abs 
   signum = lift1 signum

instance Fractional b => Fractional (E a b) where
   (/) = lift2 (/)
   fromRational = R . fromRational

handcrafting programmers: small embedded example

Submitted by olecom
on April 21, 2008 - 9:52pm

More stuff from MSP430 experience; now microprocessor itself.
Conclusion: imagination and creativity, guys, like PR dudes do.
But from educational POV it is a sad thing.

Newsgroups: gmane.comp.hardware.texas-instruments.msp430.gcc.user
Subject: A bit more about software (Re: How do you get an ez430 going under Linux?)
Date: 2007-10-01 04:16:09 GMT (29 weeks, 1 day and 9 minutes ago)

Syntax highlighting (oh, that handcrafted programming)

Submitted by olecom
on April 7, 2008 - 2:17pm
User-Agent: jed (x86_64-pc-linux-glibc-debian)

Value of syntax highlighting for programming in text editors is hard to
overestimate. I recall one my buddy, a keen school olympic competitor on
programming, who said, that move from Borland Pascal 5 to 6 and 7 was a
great thing because of highlighting.

Many syntax and logic errors just popped up right before one's eyes.

Back to text and graphic terminals.

Submitted by olecom
on April 5, 2008 - 3:32pm

It's about my view of another incarnation of text/graphic terminals in modern, not so efficient, noisy, but power-saving reality. One, three or more useless x86 cores? Why? Toasters from xbill are finally here?

It's better to have one processor in display and a bit of imagination.

http://www.advogato.org/person/olecom/diary/7.html

Misc. ray tracers

Submitted by Greg Buchholz
on October 10, 2007 - 2:01pm


By popular demand, here's the more web accessible versions of a couple of simple ray tracers that I quickly cranked out in Perl and Haskell. Along with the respective source code.

It takes a POV-like scene file, and spits out a *.ppm file onto STDOUT.