Hacker Newsnew | past | comments | ask | show | jobs | submit | more ejstembler's commentslogin

I actually started writing my blog in Crystal, took a little break, and started writing it in Nim. I really like Nim a lot. Some of the code came out more concise in Nim. I like how Nim handles nils better. Options instead of temp var shadowing. I would've finished my blog in Nim had I not ran into an issue with embedded-style templates. Think eRb in Ruby. Crystal handles this by compiling and embedded. Nim doesn't support that. I had to resort to something like Mustache which I didn't want to use. Ultimately, I went back to Crystal and finished it.


Nim string templating is very powerful. What is your unmet need, precisely?


I couldn't get embedded templating to work for nim. Something similar to Ruby's ERB: https://ruby-doc.org/stdlib-2.7.0/libdoc/erb/rdoc/ERB.html. Or Crystal's ECR: https://crystal-lang.org/api/0.21.1/ECR.html


I wrote my blog using Crystal 0.33 (plus kemal and bulma) and it's great! https://ejstembler.com


Is it truly native? I was digging around and found some references to https://www.wxwidgets.org. I thought the GUI looked a little off to be truly native...


Hmm the screenshots on that site look nothing like their UI.


I originally wrote the code back in 2014 (Ruby 1.9.3-p545), but just now got around to blogging about it and putting the code in a repo. Better late than never I guess.


I'm surprised the author doesn't go into deeply nested maps and deep merges. That's an issue none of the languages solves natively.


PHP is the only language compared in the article that natively provides this:

"PHP also includes a functionality in its standard library that none of the other languages here do: deep merging. array_merge_recursive will recursively call merge on string key collisions."


Having read Carl Sagan's Cosmos in my youth, I always feel guilty re-reading a book:

“If I finish a book a week, I will read only a few thousand books in my lifetime, about a tenth of a percent of the contents of the greatest libraries of our time. The trick is to know which books to read.” ― Carl Sagan, Cosmos


Don't feel guilty, Sagan's quantitative approach is a teribly shallow view of reading. If you feel you want to read something again it's because you expect to get something out of it - perhaps to refresh your memory, perhaps to pay more attention to the subtext of the work, perhaps to study the author's literary or rhetorical techniques. You wouldn't assume that you had learned everything about a complex musical composition or painting from single listening or viewing, why assume you've learned everything worth knowing from a single reading of a book?

The only reading I ever feel guilty about is my aversion to leaving a book unfinished. I'm pretty good at picking what to read, but about once every year or two I encounter some real stinker that is a literal waste of my time, and I feel a bit annoyed with myself for plowing through to the end even though I have long ceased to expect any literary or intellectual payoff.


I think it was Thomas Hobbes who said "If I had read as many books as other men, I should have been as ignorant as they are."


Kind of a tangent but I love this quote of his.

"A book is made from a tree. It is an assemblage of flat, flexible parts (still called 'leaves') imprinted with dark pigmented squiggles. One glance at it and you hear the voice of another person - perhaps someone dead for thousands of years. Across the millennia, the author is speaking, clearly and silently, inside your head, directly to you. Writing is perhaps the greatest of human inventions, binding together people, citizens of distant epochs, who never knew one another. Books break the shackles of time, proof that humans can work magic."


Good article. In addition to running flog, I also run brakeman and rails_best_practices.


Pretty much all junk and ancient looking. It's sad this genre has not advanced.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: