Better HN
topnewbestaskshowjobs
Log inSign up

s-zeng

89 karma · joined Dec 9, 2020 (5y ago) · 32 submissions

Submissions

comment 1w ago · link · parent

This was representative of slop sites a few months ago, but no longer of the current generation slop

comment 1w ago · link · parent

Would you be willing to share your concise proof?

comment 3w ago · link · parent

What a coincidence, my cargo bike that regularly takes 50kg of cargo runs on the same stuff !

comment 1mo ago · link · parent

Ah, finally real AI programming

comment 1mo ago · link · parent

I do have a soft spot for visual complex number explainers, good work. When I was 13 I credit [1] for blowing my mind about complex numbers and setting me onto my current career path

[1]: https://acko.net/blog/how-to-fold-a-julia-fractal/

comment 1mo ago · link · parent

Much like humans, language models have context limits. Abstractions exist for a reason, and good abstractions simultaneously make code easier to read for humans and easier to process for language models

7.

What the interns have wrought, 2026 edition(blog.janestreet.com ↗)

2 points · by s-zeng · 1mo ago · discuss

comment 1mo ago · link · parent

In any field of characteristic 2, every element is its own negative. So on the surface this makes sense, notwithstanding the unintuitive enum corner case behaviour

comment 1mo ago · link · parent

There's a relatively popular point of view amongst Haskell programmers that explicit recursion is the goto of functional programming; a dedicated folding or traversing function provides more clarity on what exactly the function intends to do. The extreme end of this is recursion schemes and memes like zygohistomorphic prepomorphisms, which are almost certainly overkill on lists proper but might be useful when traversing bigger recursive structures. Personally, I almost always prefer to find a monoid to map the list elements into, and use `fold :: (Monoid m, Foldable t) => t m -> m`. It's essentially the equivalent of using `sum()` instead of `reduce()` in python

comment 1mo ago · link · parent

A neat fact about foldr on lists, unlike foldl, is that it actually passes control flow entirely to the accumulating function on each fold step. That means you can use foldr to implement arbitrary traversals of lists, including foldl' or list traversals that exit early. See https://github.com/quchen/articles/blob/master/useful_techni...

comment 2mo ago · link · parent

Kubernetes but for agents :(

comment 2mo ago · link · parent

Even in the world of functional programming, there's an argument to be made that `fold` is a bit of a code smell, in a similar vein as `while` being slightly smelly in an imperative code base. There's good reasons for each to be used, but they are such low level iteration primitives that you might be better off with a higher one (e.g. for loops or iterators in imperative programs; in FP you might reach for monoidic reduces (as opposed to folds where the accumulator is a different type from the list element), monadic traverses, or recursion schemes). Even though you can implement iterators or for loops in terms of while loops, you probably shouldn't, and similar for functional traversals.

In languages like python or Java though, you don't really have access to many of the higher power functional traversals however. So that puts you into a similar kind of bind as working in a language with only while loops

comment 5mo ago · link · parent

I've really enjoyed playing around with https://github.com/markqvist/nomadnet and the reticulum protocol in general as a peer-to-peer alternative to www

comment 6mo ago · link · parent

Matrix multiplication introduced before vector addition... the "Linear Algebra Done Right" in me is screaming inside.

That being said, it is definitely cool to have a Jupyter-notebook based set of examples of practical linear algebra

comment 8mo ago · link · parent

It's worth noting that a feature flag mishap is what brought down Knight Capital:

https://en.wikipedia.org/wiki/Knight_Capital_Group#2012_stoc...

comment 1y ago · link · parent

Hi David and Amanda! Followed you guys from the very beginning, glad to see Recall.ai get so big!

comment 1y ago · link · parent

Obligatory mentions of cuelang and dhall here. I've used both for kubernetes and other large configs in multiple software teams and both are significantly more of a joy to work with than HCL or yaml

comment 1y ago · link · parent

Haskell already supports deriving Functor and Foldable

comment 1y ago · link · parent

Monads can be thought of as arbitrary function colourings, hence the prior mention of Haskell potentially being a good fit. Of course monads are implementable in almost any other language, but few have as much syntax sugar or general library support as Haskell does, except maybe Ocaml

comment 3y ago · link · parent

Ragde is an excellent CS prof. I really enjoyed the functional approach Waterloo takes in first year CS, especially in the optional more advanced version of the course where they go a lot deeper into the math connections and interpreters

comment 3y ago · link · parent

Collectively, Lemmy and kbin instances (which federate with each other) just reached over 125k users or so. I've really enjoyed my time there so far.

comment 3y ago · link · parent

I think he might be referring to Rice's Theorem, which to be fair is reducible to the halting problem

comment 3y ago · link · parent

A significant amount of these issues are solved by sticking to Core, Dune, and avoiding imperative blocks

comment 3y ago · link · parent

But there are still highly specific tasks out there that require knowing stuff like what opcodes your compiler generated out of C code. Not every job or team is building a web app with nodejs and the like.

comment 4y ago · link · parent

> decent type system

I'd call it a bare minimum type system, not "decent"

comment 4y ago · link · parent

A smart enough compiler will eliminate 90% of unnecessary copying and things like linear/affine types will eliminate the rest

comment 4y ago · link · parent

Consider also Racket scheme! Has a great starter IDE, an absolute barebones teaching variant that exposes the minimum amount of primitives required to do computations, a repl, as well as a typed variant. Has braces for scope, extremely clear error messages with literal arrows tracing exceptions through your code, and is quite amenable to terminal prompt assignments.

comment 4y ago · link · parent

Taking a moment to plug https://dhall-lang.org/, a truly non-imperative solution in this space

comment 4y ago · link · parent

Count me as another big Dhall fan -- Dhall was a huge improvement on our codebase compared to Helm for large Kubernetes deployments.

Full disclosure: I maintain the [dhall](https://pypi.org/project/dhall/) package on PyPI

12