Live data from Hacker News

26 Programming Languages in 25 Days

matt.might.net

41–50 of 82 posts

Re: 26 Programming Languages in 25 Days

#41
I have to say I still haven’t really figured out how TeX works, despite using latex for years. I can’t even do a for loop or simple arithmetic or find the size of an array, let alone implement complete algorithms. Is there anyway I can learn this?

Re: 26 Programming Languages in 25 Days

#42
post #39
post #2

We did a similar assignment at University many years ago. I think it was the same assignment, one per day for two weeks. Each time in a different language. The goal was to see how similar code is, and how little it matters which language you pick. Obviously it's a constrained problem set (we didn't have to learn all the ins and outs of each language) but it really opened our eyes to the "commonness" of programming, a…

> The goal was to see how similar code is, and how little it matters which language you pick. I think that’s a pretty bad result of the exercise. The point of software isn’t just to do a thing. Good software should properly encode a domain or idea and communicate that to others. If one took the analogy of driving a nail into wood, there are many tools that can do the job, but only a couple that properly handle the jo…

You can write good software in almost* any language though. Encoding of domain and/or clear coding style is mostly orthogonal to language syntax. The OPs exercise is exactly to show that language choice is not all that important, since you can write good software in bad languages and you can write bad software even in the best languages.

* Excluding some deliberately opaque languages like brainfuck and malbolge.

Re: 26 Programming Languages in 25 Days

#43

I have to say I still haven’t really figured out how TeX works, despite using latex for years. I can’t even do a for loop or simple arithmetic or find the size of an array, let alone implement complete algorithms. Is there anyway I can learn this?

[dead]

Re: 26 Programming Languages in 25 Days

#44
post #2

We did a similar assignment at University many years ago. I think it was the same assignment, one per day for two weeks. Each time in a different language. The goal was to see how similar code is, and how little it matters which language you pick. Obviously it's a constrained problem set (we didn't have to learn all the ins and outs of each language) but it really opened our eyes to the "commonness" of programming, a…

You can get a taste here and decide if you want to go deeper or not - https://github.com/mattmight/advent-of-code-2022/tree/main/d...

Re: 26 Programming Languages in 25 Days

#45

Learning a programming language in 1 day to solve a particular problem isn’t the same as learning it over years to write actual production code. I doubt the author was writing “idiomatic” code and he probably transplanted paradigms from more familiar languages in the newer ones. But it’s still very useful and I’m sure he learned a lot and absorbed of some of the new languages’ programming styles. You don’t master idi…

[dead]

Re: 26 Programming Languages in 25 Days

#46
post #7

No FORTH, APL, Clojure or Rust? My HN bingo card is empty...

I got my 50 stars in Python, but I also did the first two days in Forth because I've been wanting to learn it. Regarding another thread there talking about whether the language affects the implementation, it did for me.

For day 1, I ended up using a pretty different method than the Python code, mostly so I could use what I already knew or could quickly figure out, processing it character by character.

I wasn't planning to do more, but I realize the input for day 2 could be executed as Forth code simply by defining the words for what those input command should do, and then executing the input AS Forth, so it was actually a quick and easy one in Forth.

Re: 26 Programming Languages in 25 Days

#48
post #7

No FORTH, APL, Clojure or Rust? My HN bingo card is empty...

I can see skipping APL. Also, Rust could be frustrating if you only had a day. It like saying you are going to learn a new sport every day and skipping snowboarding because while you can always kick or throw a ball badly, just standing up and falling down continuously for a day does not actually teach you anything about snowboarding. Forth would be a good one though. Both simple and different.

It's likely that the professor knows some Rust already.

In which case Rust is a powerful tool to bring to AoC late on because you can afford to take a not-so-algorithmically clever approach and Rust's optimiser will save you.

Take day 16. The professor did it in Python, with which they have some experience. My Part II solution is pretty bad, it's a combinatorial explosion resulting from a search of the solution space with both the elephant and myself trying every option. But, I wrote it in Rust, so this bad solution finishes in five minutes. If I'd written this terrible solution in Python it may have taken hours to finish...

Re: 26 Programming Languages in 25 Days

#49
post #2

We did a similar assignment at University many years ago. I think it was the same assignment, one per day for two weeks. Each time in a different language. The goal was to see how similar code is, and how little it matters which language you pick. Obviously it's a constrained problem set (we didn't have to learn all the ins and outs of each language) but it really opened our eyes to the "commonness" of programming, a…

Most languages have completely different idioms though. Sure you can write functions, loops, if statements the same in dozens of different language syntaxes, but that doesn't prove anything. I've seen loads of codebases written completely backwardly, eg when a C++ programmer writes their first Python app or a Java developer writes Javascript - they're just writing the same style in a different language, not writing idiomatical correct code as a Python or JS developer would.

Re: 26 Programming Languages in 25 Days

#50
post #14
post #6

Earlier quoted context omitted.

I’ve really missed his blog. I read his posts over and over during grad school. His story of pivoting from PL research to medical research (and being a star in the field) is quite motivating.

I have been reading Matt' blog for quite long too. I read his post on his son condition but never really noticed if he really switch his academic careers for his son. I am pasting the really motivating video sharing the story [1] and a NY times article here [2]. [1] https://www.facebook.com/freethinksuperhuman/videos/15306506... [2] https://archive.is/l7pCA

I stopped reading his blog when we wrote about how to get tenure and completely omitted talking about all of his wife's stay-at-home work.
Post reply on HN