Tuesday, September 7, 2010

dwm data driven algorithms programming

reading about them here: http://doc.cat-v.org/bell_labs/pikestyle
01:02 < azathoth99> Algorithms, or details of algorithms, can often be encoded compactly, efficiently and
expressively as data rather than, say, as lots of if statements. The reason is that the
complexity of the job at hand, if it is due to a combination of independent details, can be
encoded.
01:05 < nsz> what is your question?
01:22 -!- Martian67 [~Martian67@7GDAAEKHT.tor-irc.dnsbl.oftc.net] has quit [Ping timeout: 480 seconds]
01:22 -!- pingled [~pingled@f053084020.adsl.alicedsl.de] has quit [Ping timeout: 480 seconds]
01:26 -!- Martian67 [~Martian67@04ZAAD7AN.tor-irc.dnsbl.oftc.net] has joined #suckless
02:04 < azathoth99> how do I encode algorithmic details into data as opposed to using lots of if?
02:24 < antoszka> Use Lisp.
02:25 < rkreis_> some people would rather create an interpreter for another programming language than writing 10 if
statements
02:27 -!- Athas [~athas@82.211.209.226] has quit [Remote host closed the connection]
02:30 < gravicappa> azathoth99, printf, dwm keybind/eventhandling systems are kind of examples.
02:35 -!- christooss [~christoos@BSN-142-23-211.dial-up.dsl.siol.net] has quit [Ping timeout: 480 seconds]
02:36 -!- christooss [~christoos@BSN-143-138-124.dial-up.dsl.siol.net] has joined #suckless
02:38 < n0nsense> 23MI.mail
02:38 < n0nsense> mbox is awesome <3
02:41 -!- oZt [~oZt@nl117-191-227.student.uu.se] has joined #suckless
02:45 -!- TheBrayn [~TheBrayn@p549BF0BC.dip.t-dialin.net] has joined #suckless
02:46 < azathoth99> I like lisp.
02:46 < n0nsense> sendmail is the default mail transfer agent (MTA) for SuSE Linux.
02:46 < azathoth99> you mean open up dwm code and look at it?
02:46 < n0nsense> :-D
02:46 < azathoth99> I don't yet know c.
02:47 < azathoth99> dwm has 'data driven algorithm' style code?
02:47 < azathoth99> see when I try an visualize say a table with the data, I natually think to query such a table
with an if, so I say hm how the hell would the table repalce the if
02:49 < n0nsense> do you know lisp>
03:04 < dibb> azathoth99: one of dwm's most admirable features is that the code is very readable. Like you I'm a
Python programmer that don't really know C, but I have no problem understanding the dwm code.
03:17 < adisbladis> Almost every language can be made readable by a good programmer
03:17 < adisbladis> You just need to know some basic concepts to read it
03:20 < dibb> Almost every language, yes. Not almost all code though :)
03:21 < adisbladis> Exactly
03:21 < dibb> Which is why I find dwm an excellent starting point for getting used to C.

No comments: