News for hackers. Stuff that matters.

mcconnma

Re:Permutations of a children's trainset visualized on Monday November 30, 2015 @12:39PM (#10650616)
I noticed that as well, I need to figure out what is the difference ...
Re:Permutations of a children's trainset visualized on Monday November 30, 2015 @10:56AM (#10650011)
Thanks. I updated the code and the post to reflect tests for the bridge case as you mention. It affected the 12 piece and 16 piece solutions. The animated gifs are udpated and should be correct now.
Re:Permutations of a children's trainset visualized on Monday November 30, 2015 @09:23AM (#10649499)
Thanks for the name, I found the article here: http://blog.jgc.org/2010/01/more-fun-with-toys-ikea-lillabo-.... However, he only solves for 16 pieces. This post and program solves for any number of pieces.
Re:How to blink a light in 10 different programming languages on Tuesday November 10, 2015 @05:31PM (#10543105)
Good points, and I agree about understanding minimal simplicity and you don't need an OS and several layers of abstractions to blink a light. The post wasn't explicit (I think it is now after updating), but the intent was to demonstrate the variety of languages available on Linux based platforms that have GPIO SysFS, so assembly was never considered. It is more focused on those environments in which these HLL do have a role/place.
Re:How to blink a light in 10 different programming languages on Tuesday November 10, 2015 @05:21PM (#10543040)
that is interesting, not sure if it is any easier than compiling some of the examples I provide, but it does open Linux platforms to those that know wiring, thanks.
Re:How to blink a light in 10 different programming languages on Tuesday November 10, 2015 @05:17PM (#10543021)
Thanks, yeah, I went crazy and implemented it via go channels, which isn't a fair comparison. I updated with a slightly tweaked version of what you provided.
Re:How to blink a light in 10 different programming languages on Tuesday November 10, 2015 @05:16PM (#10543007)
It wasn't clear in the original post but this was really meant for embedded Linux platforms that already have GPIO mapped via SysFS so assembly wasn't considered. I've updated the front matter of the post to reflect that. I don't know if Pascal is considered 'zing' these days, but I added that as an example. Thanks for your comment.
Re:How to blink a light in 10 different programming languages on Tuesday November 10, 2015 @05:12PM (#10542977)
good point, I updated the front matter of the post to make this more explicit.
Re:How to blink a light in 10 different programming languages on Sunday November 08, 2015 @05:27AM (#10528133)
Writing a boolean type to SysFS/GPIO from NodeJS doesn't quite work so I tweaked your example to following similar pattern of the other languages. Thanks.
Re:How to blink a light in 10 different programming languages on Sunday November 08, 2015 @05:01AM (#10528096)
This is my favorite comment :-) After years of programming in enterprise Java, I failed to truly make it enterprise worthy! I'm going to see if I can get an assembly example added per your other comment.
Re:How to blink a light in 10 different programming languages on Sunday November 08, 2015 @04:36AM (#10528071)
Thanks, any thoughts on why I get this?

$ ghc -o blink blink.hs [1 of 1] Compiling Main ( blink.hs, blink.o )

blink.hs:7:22: parse error on input `='

Re:How to blink a light in 10 different programming languages on Saturday November 07, 2015 @06:07PM (#10526584)
you're right,fixed.
Re:How to blink a light in 10 different programming languages on Saturday November 07, 2015 @06:06PM (#10526582)
It is a little more than that as you also need to write alternating state to the file, but you are right, and that is the point of the post. You can read/write embedded sensors/actuators in whatever language you are comfortable by simply reading/writing from the Linux file system.