Live data from Hacker News

Perlis Languages

blog.fogus.me

31–36 of 36 posts

Re: Perlis Languages

#31
post #23

Earlier quoted context omitted.

Could you please explain the Forth sample? For instance, which variable is the array?

Sure thing. : shuffle This starts a declaration for our word 'shuffle'. This implementation expects the address of the array on the stack with the length of the array on top. Some Forth programmers would leave a comment to this effect like so: ( addr len -- addr ) Anything in parentheses is a comment, and this shows the contents of the stack we want as input (read from right to left) before the '--' followed by the c…

Whoa..I'm definitely adding Forth to my "to-learn" list. The concept of a stack-based programming language is completely alien to me and would definitely be worth exploring further. On a side note, is it just me or is Forth's readiblity really low?

[Thanks a lot by the way!]

Re: Perlis Languages

#32
post #31

Earlier quoted context omitted.

Sure thing. : shuffle This starts a declaration for our word 'shuffle'. This implementation expects the address of the array on the stack with the length of the array on top. Some Forth programmers would leave a comment to this effect like so: ( addr len -- addr ) Anything in parentheses is a comment, and this shows the contents of the stack we want as input (read from right to left) before the '--' followed by the c…

Whoa..I'm definitely adding Forth to my "to-learn" list. The concept of a stack-based programming language is completely alien to me and would definitely be worth exploring further. On a side note, is it just me or is Forth's readiblity really low? [Thanks a lot by the way!]

My pleasure. :)

It takes some time to get used to dealing with the stack. The stack plus the fact that there aren't many "structural" symbols like the parentheses and curly braces of ALGOL-derived languages can certainly make Forth harder to skim at first. On the other hand, idiomatic Forth code should be factored into many very small definitions. Aggressive decomposition wins back some readability since everything will be in tiny bite-sized chunks, and it promotes reusing code too. I think personal preference is part of it.

If you're serious about learning more, I'd recommend Leo Brodie's Starting Forth: http://www.forth.com/starting-forth/sf1/sf1.html

I hate plugging my own projects, but if you check out my profile I also have several Forth-related things on github.

Re: Perlis Languages

#33
post #31

Earlier quoted context omitted.

Sure thing. : shuffle This starts a declaration for our word 'shuffle'. This implementation expects the address of the array on the stack with the length of the array on top. Some Forth programmers would leave a comment to this effect like so: ( addr len -- addr ) Anything in parentheses is a comment, and this shows the contents of the stack we want as input (read from right to left) before the '--' followed by the c…

Whoa..I'm definitely adding Forth to my "to-learn" list. The concept of a stack-based programming language is completely alien to me and would definitely be worth exploring further. On a side note, is it just me or is Forth's readiblity really low? [Thanks a lot by the way!]

Another stack based language worth learning might be Postscript (even if only to make your coworkers wonder why such a small file takes such a long time to print: http://warp.povusers.org/MandScripts/ps.html or http://www.physics.uq.edu.au/people/foster/postscript.html )

Re: Perlis Languages

#34
post #30

Earlier quoted context omitted.

Not at all. In fact I'd say most DSP these days is done entirely in software.

Any tips on where / how to start? Which books / tutorials worked for you? My background is in software engineering and the only thing I know about DSP is a very very basic understanding of the Fourier transform :)

This book is free online and is a pretty good intro: http://www.dspguide.com/pdfbook.htm
Post reply on HN