HNHacker News
TopNewBestAskShowJobs

widdershins

927 karma · joined January 31, 2013

submissionscomments
widdershins··on Gleam Is Pragmatic
It has some syntax similarities to Rust, but it has GC so there's no borrow checker (or any of the associated syntax). It is also fully immutable, unlike Rust. It leans heavily on sum types, just like Rust. Also expression-based syntax and some other things resemble Rust. However, it lacks Traits. Overall it looks Rust-ish but it's much simpler and has a functional focus.

With Go it shares a lazer focus on simplicity and preemptive channel-based concurrency. But of course for all the above reasons listed above it looks very different from Go in most other ways.

In many way its language choices are the opposite of Python (static types, immutability, massive concurrency is the norm).

widdershins··on Ask HN: Platform for 11 year old to create video games?
Agreed. OP said they don't know Lua, but if you know Javascript it can be picked up in a day or two. And it's really a lovely experience.
widdershins··on Foundations: Why Britain Has Stagnated
In the sense of labour productivity, measured in output per hour[1]. The products could be anything, but I'd guess they're primarily services like finance, technology, media etc.

https://www.ons.gov.uk/economy/economicoutputandproductivity...

widdershins··on Foundations: Why Britain Has Stagnated
>it seems obscene to spend all that money in so small an area

Greater London has a population nearly three times that of Wales. So the bang-for-buck in this small area is much greater. I completely agree that we under-invest in areas like Wales. But that doesn't mean that under-investing in the most productive part of the country is a good idea.

widdershins··on Foundations: Why Britain Has Stagnated
I don't think that's really true, outside some niche cultural arenas. Sure, if you're at a posh member's club or a party of aristocrats people might be impressed by your lineage.

I would concede that in politics a degree from Oxbridge has an outsized cachet, and those universities traditionally recruited from elite private schools. However, this is diminishing over time, both because those institutions are proactively recruiting from a wider base, and because people are pointing out the unrepresentitive composition of political parties, which then self-correct to stay politically relevent.

The hereditary parts of the House of Lords are increasingly unimportant, and the Lords is of minor importance to the political process anyway. Royalty has been politically vestigial for more than a century.

But in industry and most business spheres your lineage is unimportant. Just like those other parts of the world you mentioned, it's personal accomplishment that matters.

Britain has big problems, but I think archaic veneration for family lineage is only a small force within them.

widdershins··on Ergo: Erlang-inspired event driven actor framework in Go
I'm now sort of fascinated to know if it would be possible to compile Gleam to Go, and use this library to emulate the Erlang process stuff...
widdershins··on Large-Scale Generation of Transit Maps from OpenStreetMap Data
This is really cool. I'm fairly impressed with the maps of the London underground, although there are some oddities in Octilinear mode. It's also missing quite a few Overground services.

It's really nice to be able to switch seamlessly between a Geographic, Octilinear and Geo-Octilinear view of the maps, because each of them tells you something useful. I would use this if TFL added it to their maps app.

https://loom.cs.uni-freiburg.de/global#subway-lightrail/octi...

widdershins··on Getting price-gouged by private equity in the UK's happiest resort (2023)
It's a joke.
widdershins··on Shine with Gleam
> the "flattening" above seems unnecessary but I could not avoid it since "Result#map" wraps the Result in another Result (I could not find a flat_map).

In Gleam, this is called `result.try`[1]

[1] https://hexdocs.pm/gleam_stdlib/gleam/result.html#try

widdershins··on Shine with Gleam
Gleam compiles very fast - I believe the language has been designed in part to enable this. No context-dependent grammar, etc.
widdershins··on Shine with Gleam
Yes, Gleam and Rust are very different in the use-cases they address, performance etc. They share superficial syntax, which is why people think they're similar. The other main similarity is a focus on sum-types and pattern matching, which people associate with Rust but is really an ML borrowing. That's really where the similarities end.

I enjoy both. Rust for its performance and close-to-metalness, Gleam for its delightful simplicity. It really is a tiny language, and very tastefully designed.

widdershins··on Shine with Gleam
> Sooner or later you come across something you need and there is no library for it. Then you are forced to start messing around with FFI and whatnot.

I agree that it's always a little risky to bet on a young language. But I think Gleam is doing a good job of positioning itself as a smaller risk by sitting on the tried-and-true BEAM virtual machine and Javascript runtimes. If worst comes to worst you could export your compiled Gleam as Erlang or JS and it's quite readable.

And Gleam's FFI with Erlang, Elixir and Javascript is pretty good. I don't think it will take long for a wide variety of packages from those platforms to become available on the Gleam package manager. Doing your own FFI is hardly intimidating - it's essentially just writing type definitions for the functions you need.

Another factor giving me hope is that the language appears to be mostly 'done'. The author has carefully considered a minimal feature set and appears to be sticking to it, making it one of the simplest (typed) languages I've ever used syntax-wise. I think this bodes well for future growth, stability and maintainability.

widdershins··on Zen, a Arc-like open-source browser based on the Firefox engine
Not many straightforwardly positive comments here so far, so I will write one.

I'm a Firefox user but I've recently been tempted by Arc primarily because of its 'workspaces' feature and its minimal UI that gets out the way. I used Arc for several weeks and really got a taste for these features, so I'm really happy to see them come to a Gecko-based browser. Thank you, and keep it up!

My advice would be: don't advertise wooly claims about performance and security, when it's not clear exactly what's different from Firefox there. Instead, focus on this simple fact: it's an alternative UI for Firefox-based browsing, and that's great.

widdershins··on Zen, a Arc-like open-source browser based on the Firefox engine
It's just familiarity. I use Firefox on macOS and I always think the fonts look fuzzy on Chrome when I'm occasionally forced to use it. I spent a few weeks on Arc (Chrome-based) earlier this year, got used to the fonts, and then they looked a bit weird when I came back to Firefox.
widdershins··on Is Europe headed towards a new Ice Age as ocean current nears collapse?
It's not complicated. The temperature of the planet as a whole goes up. But depending on the effects (which are complex) some places may get colder, some wetter, some hotter and drier. The average adds up to an increase in temperature; this is global warming, manifested in changes to local climates.
widdershins··on No one expects young men to do anything and they respond by doing nothing (2022)
Because humans (like most animals) are optimized at a deep level to seek high-energy foods, and neither encouragement or shame are powerful enough to override that.
widdershins··on Spending too much time optimizing for loops
Chez Scheme is probably the fastest well-maintained Scheme implementation. It's open source (MIT license). I would describe the performance as Go-like, rather than C-like, since it's garbage collected. But it's pretty darn good, especially for a dynamically typed language.
widdershins··on Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
I'm really curious to know if many people with large Elixir problems are finding any issues with the new type system. This is pure curiosity, I don't have a dog in the fight!
widdershins··on Exploring Gleam, a type-safe language on the BEAM
Well Gleam doesn't have supertypes, so the function signature (even when inferred) does describe everything your function could possibly produce. If the author changes that, your code will stop compiling, not blow up at runtime.

I agree that packages authors really should annotate their types though, and possibly that they ought to be forced to do so, just to make reading the code easier.

widdershins··on Exploring Gleam, a type-safe language on the BEAM
Generally the advice is that public functions should have type annotations, and private functions needn't if you don't want to. But I could see arguments for either actually. Sometimes it's a bit of an annoying overhead if it's obvious what the function returns, and it certainly helps make prototyping code feel nice, especially since everything's typesafe anyway.

As I said in another comment, as the compiler knows the type of everything, it would be easy to have the LSP overlay the type (or annotate it into the text via code action for you).

widdershins··on Exploring Gleam, a type-safe language on the BEAM
The designer of gleam is trying to make a linter unnecessary, by not having extraneous language features that need to be discouraged.

Guess it's not working 100% if someone feels this way! However, I would say that since the compiler/LSP knows the full type of every function it should be possible to have a code action that says 'annotate the type of this function for me'.

widdershins··on What I think about Lua after shipping a project with 60k lines of code
Use LuaCheck if you don't want to use the LSP. It warns about the use of globals, which is generally what you want. It's perfectly possible to design your program to use no globals.
widdershins··on Try Clojure
Using the same notation for function calls and math operators has many benefits that may not be immediately obvious, and which may (depending on preference) outweigh the unfamiliarity. For example:

No operator precedence rules to remember.

Use math operators in higher order functions:

    (reduce [1 2 3] +)
    (compose + \*)
Simpler parser in the language.

Use kebab-case variable names.

Use most symbols in variable names.

The last two are because of reduced ambiguity in the language. The benefits for readability can be huge. For example, I love question marks for predicates in Scheme.

    (vector? x)
    (filter [1 2 3 4 5] odd?)
I'm sure there are more benefits that I haven't thought of.
widdershins··on Fast, simple, hard real time allocator for Rust
I'm confused. To me it seems that real time guarantees are a function of three things:

- Is it constant time in algorithmic complexity?

- Is it single threaded (i.e. free from locks)?

- Does it need to fetch memory from the system (not realtime safe)?

There are slab allocators that can satisfy all of these, and are therefore realtime safe.

So I'm still wondering what the difference is.

widdershins··on Fast, simple, hard real time allocator for Rust
What's the difference between this and a slab allocator? Is it just that the bin size distribution wastes less memory (assuming the slab allocator used pow2 bin sizes)?
widdershins··on Firefox 125
After updating (from 124) I saw this message, although it wasn't in the release notes:

> With this latest version of Firefox, you’ll experience 25% quicker on-average page loads, which means more all-around zippiness anywhere you go online.

Any details on how this performance improvement was acheived?

widdershins··on Beautifying Org Mode in Emacs (2018)
Interesting. Fonts looks beautifully sharp in Emacs on my Mac. I don't use any variable-width fonts however, only monospace.
widdershins··on The rise and fall of a Halifax man's illegal TV streaming empire
I still buy movies and TV shows on Apple TV (and sometimes Amazon Video) all the time. That seems like the closest analogy to Steam. It works very nicely.

Streaming is a different kettle of fish. With streaming services I always expect my favourite content to disappear at random with no warning.

widdershins··on A response to "Erlang – overhyped or underestimated" (2010)
Asynchronicity is indeed part of what makes Node.js useful, but that doesn't mean it's perfect.

It's very easy to write non-deterministic bugs with async/await. Bugs that might result in flaky tests and incorrect code getting checked in.

widdershins··on Ask HN: What have you built with LLMs?
Seriously!? I love the idea, but I perhaps love more that Tristram Shandy was your choice of character to chat with. You have good taste!
← PreviousPage 3 of 9Next →