Better HN
topnewbestaskshowjobs
Log inSign up

Munksgaard

1,241 karma · joined Mar 21, 2011 (15y ago) · 285 submissions

Currently working on modernizing and automating insurance for SMEs.

PhD in automatic memory optimizations for GPUs, focusing on Futhark.

philip@munksgaard.me

https://munksgaard.me

Submissions

31.

When Reasoning Becomes a Trap: Gemini 3 Flash in FoodTruck Bench(foodtruckbench.com ↗)

4 points · by Munksgaard · 8mo ago · discuss

comment 9mo ago · link · parent

Pretty easy, the prompts can be seen here[0] and pi supports setting SYSTEM.md.

0: https://cchistory.mariozechner.at/

33.

Dynamic type systems are not inherently more open(lexi-lambda.github.io ↗)

4 points · by Munksgaard · 9mo ago · discuss

comment 10mo ago · link · parent

Mirroring this divide, Denmark has a TV-show called "Klovn", which is basically a copy of "Curb Your Enthusiasm" (down to the , except that while the main character in Curb is the cause of a lot of cringe moments, he always ends up getting his redemption and being the hero (at least to the viewer). In "Klovn", the main character ("Frank") causes a lot of cringe moments in the same way, but he is a tragicomic character and is almost always in the wrong.

comment 1y ago · link · parent

To be clear, you can express workgroup parallelism in Futhark, or rather, if the compiler sees that you've programmed your problem in such a way that it can take advantage of workgroup parallelism, it will.

But you're right, it would be interesting to see how the different approaches stack up to each other. The Pareas project linked above also includes an implementation using radix sort.

comment 1y ago · link · parent

Thanks for clarifying! It would indeed be interesting to see a comparison between similar implementations in other languages, both in terms of readability and performance. I feel like the readability can hardly get much better than what you wrote, but I don't know!

comment 1y ago · link · parent

Also, while not exactly the algorithm Raph is looking for, here is a bracket matching function (from Pareas, which he also mentions in the talk) in Futhark: https://github.com/Snektron/pareas/blob/master/src/compiler/...

I haven't studied it in depth, but it's pretty readable.

comment 1y ago · link · parent

Interesting talk. He mentions Futhark a few times, but fails to point out that his ideal way of programming is almost 1:1 how it would be done in Futhark.

His example is:

  sequence
    .map(|x: T0| ...: T1)
    .scan(|a: T1, b: T1| ...: T1)
    .filter(|x: T1| ...: bool)
    .flat_map(|x: T1| ...: sequence<T2>)
    .collect()
It would be written in Futhark something like this:

  sequence
    |> map (\x -> ...)
    |> scan (\x y -> ...)
    |> filter (\x -> ...)
    |> map (\x -> ...) 
    |> flatten

comment 1y ago · link · parent

As someone who comes from Haskell/ML-like languages, I decided to opt for Elixir and Phoenix for my latest project, simply because of the maturity of the web framework and LiveView. If I weren't building a web app, I'd probably have gone with Gleam instead.

Edit: I do miss static typing, but it's worth it to not have to reinvent the web framework wheels myself.

40.

Tell Me a Story(content.subvisual.com ↗)

3 points · by Munksgaard · 1y ago · discuss

comment 1y ago · link · parent

They are not "just structs and tagged unions". The language support that enforces safe usage is not optional.

comment 1y ago · link · parent

Git-Annex is a cool piece of technology, but my impression is that it works best for single-user repositories. So for instance, as @nolist_policy described in a sibling comment, managing all your personal files, documents, music, etc. across many different devices.

I tried using it for syncing large files in a collaborative repository, and the use of "magic" branches didn't seem to scale well.

comment 1y ago · link · parent

Rebasing a stack of branches in git can also be pretty simple, with --update-refs. There's a good article here: https://andrewlock.net/working-with-stacked-branches-in-git-...

comment 1y ago · link · parent

> It's your consciousness that decides your goals and beliefs; the rest of the body "learns" those things and is then preconditioned to react accordingly.

Quotation needed.

comment 1y ago · link · parent

IDA?

comment 1y ago · link · parent

I'm also having trouble with getting it to read PDFs from URLs. I got this error:

web https://example.com/file.pdf Error: page.goto: net::ERR_ABORTED at https://example.com/file.pdf Call log: - navigating to "https://example.com/file.odf", waiting until "load" at main (/usr/local/lib/web2md/web2md.js:313:18) { name: 'Error' }

/workspace#

comment 1y ago · link · parent

Just tried it out, but it's unclear what the different buttons at the bottom of the chat history does. The rightmost one (cloud with an upwards arrow) seems to do the same as the first?

48.

Phoenix application, directly on your Tailnet(gist.github.com ↗)

1 points · by Munksgaard · 1y ago · discuss

comment 1y ago · link · parent

I agree that the terminology is not ideal, but think there's a huge difference between JS' "weak types", i.e. abundant implicit conversions, and e.g. Elixirs "strong types", where `1 + "foo"` is a runtime error. I don't care if we call the latter something else though. Any good suggestions?

That said, I prefer having both strong and static typing, but that's another argument.

comment 1y ago · link · parent

As someone who has used both SML, Haskell, Rust and Elixir professionally: No, not really.

Access to the BEAM is nice, but unless you're targeting the BEAM in your compiler I don't see any benefit. Even if you're targeting the BEAM, you might decide to use another language, cf. Gleam: https://github.com/gleam-lang/gleam/

Edit: Actually, one thing I will mention is the superior support in Elixir/Erlang for pattern matching bitstrings[0]. Not usually helpful in compilers, but an evolution of pattern matching that other languages should take up, in my opinion.

0: https://hexdocs.pm/elixir/Kernel.SpecialForms.html#%3C%3C%3E...

comment 1y ago · link · parent

Erlang/Elixir are certainly strongly typed[0] but they are not statically typed[1].

0: https://en.wikipedia.org/wiki/Strong_and_weak_typing

1: https://en.wikipedia.org/wiki/Type_system#Static_type_checki...

52.

The Paradoxes of Feminine Muscle(newyorker.com ↗)

14 points · by Munksgaard · 1y ago · 11 comments

comment 1y ago · link · parent

Elixir has this, which is close:

    &foo(&1, bar)

comment 1y ago · link · parent

Graphite.dev does this, and it works great.

comment 1y ago · link · parent

Not quite. Note that the Elixir pipe puts the left hand of the pipe as the first argument in the right-hand function. E.g.

    x |> f(y) = f(x, y)
As a result, the Elixir variant cannot be defined as a well-typed function, but must be a macro.

comment 1y ago · link · parent

There isn't actually any close() function in the std::fs::File: https://doc.rust-lang.org/std/fs/struct.File.html

comment 1y ago · link · parent

The same way Rust prevents calling close() two times on a file.

comment 1y ago · link · parent

Also, you don't actually have $5 in either box, but you once sold a 1% ownership stake in each box for 5 cents. There's only 10 cents in the in the merged box, but you value it at $10.

comment 1y ago · link · parent

> - there is no way to browse navigation outside this broken ExDocs which outputs only HTML and LSP

ExDoc support outputting EPUB as well as HTML.

60.

Tailscale Community Projects(tailscale.com ↗)

4 points · by Munksgaard · 1y ago · discuss

12345
10