Recent submissions

Comment · 4 years ago
Modern C++ is something nebulous. What is Modern C++ now would be obsolete few years down the line. So clearly maintenance of such a project wouldn’t be much fun, I suppose.

C doesn’t suffer from this for one. You have more time to focus on the task than on managing the myriad ways of doing the same thing.

Comment · 4 years ago
Oh thanks
Comment · 4 years ago
What happens if your parents are first cousins? You don’t have as many ancestors as the article assumes. And it’s only now that people are so connected that such a situation can arise, but earlier people used to marry mostly within their local communities, so each spouse would share many of the same ancestors as the other.
Comment · 5 years ago
My father told me the reason some years ago. As a rough sketch, it was because decades ago many highways used to be 'single lane', so if you had a truck in front of you, you needed to overtake it as you wouldn't want to be stuck tailing it the entire length of the road.

He said that above the "OK" there used to be a bulb. So if someone wanted to overtake the truck, they were required to sound their vehicle's horn to signal their intent/desire to do so, that's what the "Horn Please" was for. If all was clear, the truck driver used to turn on the bulb to tell that it was "OK" to do so.

Apparently, with time, the bulb went into oblivion (perhaps due to becoming redundant because of the widening of the roads) but the words remain.

Comment · 5 years ago
I implemented a subset of Scheme, one that might just get you past the first chapter of SICP, in C. I wanted to implement a Scheme interpreter in C after doing SICP to attain a sense of closure and to be sure that I really got the bare essentials of programming languages and program evaluation. So here it is for anyone wanting to try it out. Do read the README on GitHub[1] for what I have made and to understand its limitations.

It wasn't easy for me as a non CS person (I am a Chemical Engineer). I started out reading theory heavy books like Torczon and Cooper but feeling intimidated by the math involved in finite automaton style scanner generators, I switched to Bob Nystrom's Crafting Interpreters [2] and his book made the scanning part smooth and intuitive. Next I tried to study parsing from his book but didn't find parsing to be as enjoyable. I then went to the dragon book , which I had found to be very dense the first time I flipped through it an year ago. This time I found it to be much more approachable, thanks again to what I had read in Nystrom's book. Precedence and associativity made more sense when I read it a second time. But it turns out that Scheme's grammar is really simple: Expr -> atom | '(' Expr ')', so I stopped reading and started coding.

It's barely usable because it has no GC, and I may have to rewrite it from scratch for implementing one. In the meantime I am thinking of doing a rewrite in Java, and then do part 3 from Crafting Interpreters, where the author implements everything in C.

Still very much a newbie, I welcome criticisms and directions for moving it forward.

[1] https://github.com/TectonicFury/CSCMIC

[2] https://craftinginterpreters.com

Comment · 5 years ago
Read the first couple of pages and it’s talking about things like operator precedence and left associativity and couldn’t continue. Hopelessly uninspiring IMO.
Comment · 5 years ago
good question
Comment · 5 years ago
I felt that it was a good article, very straightforward, and he made an interesting point about numerical packages being often written by graduate students.

Personally, I would like to learn the math, but I would want to first learn from the 'established' books (i.e. the books the author read on his way to this point), only then will I be in a position to judge the real worth of the author's books.

Comment · 5 years ago
Nice points. Going through SICP and solving problems using scheme, I did experience the “brain amplification” sensation.

Once you flesh out the idea in lisp, it’s just a matter of implementing it in the language of your platform. It’s like doing ‘architecture’.. Lisp is about aesthetics and beauty

Comment · 5 years ago
I did seam carving as part of Coursera's Algorithms course by Bob Sedgewick. It was gratifying.
Comment · 5 years ago
If you like it hard enough, it would soon stop being hard
Comment · 5 years ago
When you have websites like hackingwithswift and you see Chris lattner (who is some genius because he made a new language) endorsing it with lavish praises, you tend to believe that it’s easy. But then every time I tried to make a 10% decent app, I had to look up the documentation and used to be confronted with (gatekeeping?) jargon like concurrency and background thread. I even paid for raywenderlich’s annual subscription but now I realise why these websites are so flashy and captivating.

There are also a lot of resources which sound as if they would be great as they have big name authors but they actually make you more depressed. I had many such experiences most notably with Stroustrup’s books. The one called Programming - principles and practice is a hopeless soup of complicated syntax and lousy pedagogy. It’s aimed at beginners but really anyone who’s read chapter 6 of the book where he seeks to teach ‘what programming is actually about” using a calculator program as an illustrative example, he really makes it appear as if recursion is some exotic and esoteric thing, whereas it is a recurrent theme in the domain of programming. I say this because before this chapter he never used recursion and it becomes very unintuitive, unlike SICP, where from the beginning this is identified as one of the central ideas in all programming.

I was fortunate I used to read e-books and didn’t spend too much on purchasing flimsy books, turns out, as far as CS is concerned, the best stuff is actually free (and accessible as pointed above in the link)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton