Posts

Showing posts from April, 2007

lab 77 - the unexpected markov

NAME lab 77 - the unexpected markov NOTES This is another unexpected use (again) of the markov program from the `The Practice of Programming', section 3.9 [1]. I wrote an implementation of markov under Limbo, and had fun feeding it with any texts (books, articles, interviews, novels ...). But recently I've been also playing with caerwyn's synth [2] which included in acme-sac, and thought why not feeding markov with music? Find out the answer by yourselves, I'll just provide some small hints in the accompanying guide file. Enjoy! [1] http://cm.bell-labs.com/cm/cs/tpop [2] synth from acme-sac under appl/synth FILES inferno-lab bachm.mp3 (the original bach file bach.mp3 )

lab 76 - using svn with gcode projects

NAME This is not a typical lab, instead are some suggestions to work with svn repos (the ones provided by gcode); like inferno-lab or the rest of Inferno related projects at gcode . NOTES To work with svn the easiest way is to install subversion under the host os and write a wrapper to have the svn command available under Inferno, like: cat > $home/dis/sh/svn << EOF #!/dis/sh load std wdir=`{hp `{pwd}} if {~ $emuhost Nt}{ os -d $wdir svn $* | tr -d ' ' }{ os -d $wdir svn $* } EOF The svn script relies in hp, to convert the Inferno paths to host paths, so here is hp: cat > $home/dis/sh/hp << EOF #!/dis/sh.dis # convert a inferno path to valid host path for os(1) load std if {no $*}{ echo 'usage: hp # to get host path' } if {~ $emuhost Nt}{ fn slashpath () { sed 's|\\|\\\\|g'; } # put two where there's one emuroot=`{echo $emuroot | slashpath | slashpath} for p in $* { cleanname -d `{pwd} $p | sed -n ' /^\/n\// {

lab 75 - scope & experiments

Image
NAME lab75 - scope & experiments DESCRIPTION Since i did lab 67 i've been trying to improve/fix the t3 port and experiment with it. So this post has small report of the T3 port status, and some experiments under Inferno; note that they're not dependent of the handheld. T3 PORT Some of the thing i've fixed are: t3 touchscreen : Perform corrections to make it work as it should, this was important since it has direct impact on using Acme, and the rest of the system. blank the lcd : Added code to turn off the lcd while playing music, so battery lasts longer. To do so i added an blank command to the devapm.c written by Alexander Syschev, and wrote a blight script that manages the lcd backlight,to control this from acme. Since this changes apply to the t3 port, they can be found under lab 67 of the inferno-lab While i haven't been able to fix the following segfaults, i've been able to obtain dumps and open them with gdb. So i've been able to find

lab 74 - effective inferno

NAME lab 74 - effective inferno NOTES I read the Effective Java book recently. Every language needs a book that describes how to use it effectively. I wish there was a book for Effective Inferno. Although common techniques may work in Inferno I know for sure there are some uncommon ones that may work better. I'll try and describe at least one recipe that could be a chapter in that book. To people who've asked me what distinguishes Inferno, I've answered that it's the concurrent language Limbo, or that it's a portable OS that runs on a VM, or that it uses the Styx protocol to create a distributed system, or that it's about software tools that work together with the Inferno shell. These are the ingredients; on their own they are not unique to inferno. Limbo looks very like C and to a newbie it's not obvious what is special about it. There a lots of little niceties that make Limbo pleasant to use, e.g., array slicing and tuples, but these are det