Hacker Newsnew | past | comments | ask | show | jobs | submit | Munksgaard's commentslogin

Peter Naur had that realization back in 1985: https://pages.cs.wisc.edu/~remzi/Naur.pdf

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

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


For all of the recent talk about how Anthropic relies on heavy cache optimization for claude-code, it certainly seems like session-specific information (the exact datestamp, the pid-specific temporary directory for memory storage) enters awfully early in the system prompt.


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.


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


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.


(author here) check_brackets_bt is actually exactly the algorithm that Raph mentions


Right. This is the binary tree version of the algorithm, and is nice and concise, very readable. What would take it to the next level for me is the version in the stack monoid paper, which chunks things up into workgroups. I haven't done benchmarks against the Pareas version (unfortunately it's not that easy), but I would expect the workgroup optimized version to be quite a bit faster.


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.


I've been playing with one using scans. too bad that's not really on the map for architectural reasons, it opens up a lot of uses.


Yeah, monoid prefix sum is a surprisingly powerful tool for parallel and incremental algorithm design!


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!


Very cool. I have seen Futhark mentioned before but I don't know anything about it.

The example you showed is very much how I think about PRQL pipelines. Syntax is slightly different but semantics are very similar.

At first I thought that PRQL doesn't have scan but actually loop fulfills the same function. I'm going to look more into comparing those.


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.


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


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.


YMMV, but it works for my org. We're an archival institution and have been using git-annex for more than a decade as the storage backend for a digital repository system designed for long-term, robust preservation. Admittedly, we only have 15-20 staff; but +30TB of data, ~750K files (binaries + metadata), across hundreds of collection repos.


How (if you saw that need) did you address permissions concerns, e.g., around any Git users being able to force drop all files from a backend?

Back (long time ago) when I was looking into this, there was no KISS, out-of-the-box way to manage the Git Annex operations a Git user would be allowed to perform. Gitolite (or whatever Git platform of choice) can address access control concerns for regular Git pushes, but there is no way to define policies on Git Annex operations (configuration, storage management).

Might not be super hard to create a Gitolite plugin to address these, but ultimately for my use-case it wasn’t worth the effort (I didn’t really need shared Git Annex repos). Do you tackle these concerns somehow? I guess if people don’t interact with your repositories via Git/SSH but only through some custom UI, you might deal with it there.


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-...


Yeah but with jj it rebases all the like side quest experimental anonymous branches too. In git rebase is a list of commits to be picked. In jj it is just so much more powerful. In git you can’t rebase all 4 parallel PRs you have in flight and the octopus merge that you are working off of that merges them all together.

There’s workflows that I do with jj that are just completely impractical with git.


> 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.


IDA?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: