@cstanhope Interesting, I didn't know that about Pascal!
Go does make returning an accumulator a little more concise. Compare with e.g. Python:
def foo():
res = [] # not needed in Go
for x in y:
if z:
res.append(x)
return res
That's the biggest advantage I can see though.
miniblog.
@marcus_harrison Interesting approach! I believe Usenet clients took a similar approach. I'm not aware of anything newer though.
I think JSON vs XML is a strange dichotomy. Both can be processed by machines, but they're very different.
I've seen XML work really well for dictionary data. You want to mark up text:
A dog is a domesticated <group>animal</group>.
In other words JSON : CSV :: XML : HTML.
I have a theory: Suppose I created a language Foo that printed execution time at termination:
$ ./hello
Hello World!
(Finished in 0.6 seconds)
I'm sure that Foo developers would be particularly sensitive to performance (for better and worse).
I've been revisiting a 5 year old Emacs mode I wrote: https://github.com/Wilfred/logstash-conf.el
It's nice to see that I've learnt tons in that time! I've massively improved indentation performance, corrected syntax highlighting, and even added a test suite.
Page 36 of A History of Clojure has some interesting comments on things Rich would have done differently: https://dl.acm.org/doi/pdf/10.1145/3386321
The very first item? Better errors! Clojure has improved significantly recently, but doing a good job here is hard (but important!) in any language.
Playing with GitHub actions today, and I realise how much testing services have become a commodity.
I really appreciate GitHub's organised, collapsible UI for output. The featureset seems comparable to alternatives though.
(The idea of an ecosystem of actions is tempting!)
Golang's "named return" is a pretty wild feature I haven't seen elsewhere. (The closest I know is &aux in Common Lisp.)
Implicit `return` example: https://tour.golang.org/basics/7 or even modifying results before returning:
Porting some JS to typescript, I've been surprised at how many bugs it's highlighted. It's caught more issues than when I've done the same thing to Python code (adding mypy).
I wonder why this is? I have three (complementary) theories:
I like that USB-C is symmetrical (you never have to flip it!) but could we take this idea further?
I'd like my phone and tablet to have a power port at both ends, so it's easier to charge.
I've been enjoying using Jest to run my tests, using the workflow where it re-runs the files on any change.
I wonder if it has the fuzzing/synthesis problem of running bad code though? I worry about writing `delete(".")` and it not waiting for me to finish `delete("./cache")`.
Typescript does a really good job with type aliases.
I hover over a value and get `Parsimmon.Result<any>`. I then import Parsimmon but with the name P, and hover types are now `P.Result<any>`. I'm impressed.
I remain super optimistic about webassembly, but debugging tooling isn't yet mature, at least for Sentry's use cases.
https://thenewstack.io/the-pain-of-debugging-webassembly/
I'm intrigued by Twitter's new features to control who responds to tweets, but I worry it would create a bunch of moderation work. For better or worse, 'anyone can respond' is a straightforward model.
TIL that GitHub has launched Discussions, a forum-like tool for repositories! https://github.blog/2020-05-06-new-from-satellite-2020-github-codespaces-github-discussions-securing-code-in-private-repositories-and-more/
Example thread:
Showing 166-180 of 378 posts

