2,042 karma · joined Aug 26, 2010 (16y ago) · 269 submissions
1.
Show HN: Ansiwave, an ANSI art and MIDI music mashup(github.com ↗)
103 points · by gw · 5y ago · 14 comments
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
// option 1
try {
fp = os.open(x)
fp.read()
}
finally {
fp.close()
}
// option 2
fp = os.open(x)
try {
fp.read()
}
finally {
fp.close()
}
Should we close if open fails? Maybe, maybe not, but with try/finally it is obvious which one it is doing.comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
https://www.youtube.com/watch?v=zA_0_dSD3-Q&t=27m35s
Crawford definitely is not doing enough introspection. I hope the man resets and makes an inspiring project without the self-romanticizing or self-pitying.
comment 6y ago · link · parent
12.
Show HN: O'Doyle Rules – a new rules engine for Clojure(github.com ↗)
100 points · by gw · 6y ago · 18 comments
comment 6y ago · link · parent
comment 6y ago · link · parent
Another point i didn't mention is that maven was designed from the start to be decentralized; many companies run their own private maven repos, but also pull artifacts from maven central. Having group names reduces the chances of collisions between their private servers and a public maven server.
comment 6y ago · link · parent
Since clojure uses maven as well, the same applies, but clojure tools like leiningen decided to create a shortcut: if the group and artifact name are the same, like `iglu/iglu`, they can be collapsed into one name: `iglu`
Well, that just encouraged everyone to choose collapsible names. In retrospect, this didn't buy us much. Who cares about saving a few characters of typing? Most now seem to agree it wasn't a good idea.
When the "collapsed" name falls out of maintenance, the forks will all seem somehow less "official", even if they are much higher quality. Forks are inevitable; why would you want to discourage them?
I finally decided to start using the reverse of my personal domain for my future libraries. The java folks were right all along.
comment 6y ago · link · parent
In the past, this required a lot of very ugly parsing code and manual error-checking. With spec, you write specs and call s/conform. If it failed, you get a nice error, especially if you pair it with expound. If it succeeded, you get a destructured value that is really easy to pull data out of. I've done this in a half dozen different libraries and i'm pretty sure i wouldn't have even written them without spec.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
It is immediate mode so you render the entire UI every tick, though it is smart enough to not actually redraw things that didn't change.
comment 6y ago · link · parent
https://www.glfw.org/docs/latest/group__window.html#ga554e37...
comment 6y ago · link · parent
I also take issue with your statement that zig is "more minimal" since that only applies to the user's perspective -- from the compiler's perspective, macros make a language far more minimal. But i vaguely recall already discussing this distinction with you so i don't want to rehash it.
At any rate i will definitely be paying attention to andrew's progress, he has a really clear vision.
comment 6y ago · link · parent
https://github.com/nim-lang/Nim/blob/cd28fe2ef7a204721efa720...
It's calling `quit` which cannot be caught in a try statement.
comment 6y ago · link · parent
comment 6y ago · link · parent
I am using it for game and music programming: https://github.com/paranim
Only been using it since the beginning of the year and it is fantastic. Much less development friction than rust, and perf is very good, especially with ARC.