HNHacker News
TopNewBestAskShowJobs

lamg

60 karma · joined March 5, 2013

Sub specie aeternitatis
submissionscomments
lamg··on Espanso – Cross-Platform Text Expander Written in Rust
I think the problem Espanso is trying to solve should be addressed by GUI toolkits, like GTK, QT, etc. Otherwise, living with an authorized keylogger in our system in order to introduce unicode characters seems overkill.
lamg··on F# 8 Features: WhileBang
This feature simplifies `while` loops in computation expressions
lamg··on Having fun with Go generics
There several iterator libraries around but generics has made easier to compose iterators into a single one.
lamg··on Ask HN: Does the Easel programming language still exist?
No it doesn't. It vanished from the known Universe and now we have no idea on how it looked before.
lamg··on Restoring Havana's neon
Substitute "communism" by "centrally planed economy". China abandoned it decades ago. See https://en.wikipedia.org/wiki/Socialist_market_economy
lamg··on Restoring Havana's neon
"playground of rich Americans": certainly a fallacious reduction of Cuban history. "The America gov't instituted an embargo. Being in the tropics, the electric signs broke down": you're seriously underestimating the destructive force of communism. osmay88: thanks!.
lamg··on Avoid Else, Return Early (2013)
Certainly is hard to read nested code, but returning earlier makes it harder because now our mind has to construct the execution path instead of reading it. What I usually do is writing the body in a new procedure. Dijkstra designed a language with no return statement with a very simple semantics made for proving the program behaves exactly as its specification mandates. Niklaus Wirth designed Oberon with no return statement. Currently I write Go code only using return at the end of the procedure, my code is easy to follow and I have fewer errors than before https://en.wikipedia.org/wiki/Guarded_Command_Language https://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.h...
lamg··on Avoid Else, Return Early (2013)
Certainly is hard to read nested code, but returning earlier makes it harder because now our mind has to construct the execution path instead of reading it. What I usually do is writing the body in a new procedure. Dijkstra designed a language with no return statement with a very simple semantics made for proving the program behaves exactly as its specification mandates. Niklaus Wirth designed Oberon with no return statement. Currently I write Go code only using return at the end of the procedure, my code is easy to follow and has fewer errors than before https://en.wikipedia.org/wiki/Guarded_Command_Language https://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.h...
lamg··on Ask HN: What language-agnostic programming books should I read?
"A Discipline of Programming" by Edsger Dijkstra.
lamg··on Moving beyond the classroom
And I forgot the best of all tips: good theory leads to good programs.
lamg··on Moving beyond the classroom
Looking at your known languages my advice is: * don´t make a world of objects and patterns (the gang ...). These stuff is advanced and you should be careful, there is no magic to solve all your problems. * KISS principle * do some data driven programming
lamg··on Moving beyond the classroom
Just read a book like Practical Common Lisp, Land of Lisp or Learn Haskell for the greater good, you will learn how to do some interesting programs and you vision of side effects will change. I am trying out Go now, it is really nice too, if you want to read some code check out http://github.com/lamg/md2sexp, it is really easy to understand (but it does not work yet).
lamg··on Moving beyond the classroom
Two years ago I felt just like you. It is overwhelming, there is a lot of people talking about the best approach, the best technology .... Don´t hear that, I am sure there is nice stuff around there, but what makes the difference is you. Thinking about programs is a nice advice, try to see things from different points of view. A year ago I did some hacking in Common Lisp and Haskell, that certainly changed my way of thinking. Now I am more interested in making things simple, I am hacking in Go now and trying out Plan 9, is really rewarding reading real world programs that are easy to understand.