7

In the original proof of concept for ranging over functions, iter.Pull was implemented via goroutines and channels, which has a massive overhead.

When I dug in to see what the released code did I was delighted to see that the go devs implemented actual coroutines to power it. Which is one of the only ways to get sensible performance from this.

Will the coro package be exposed as public API in the future? Here's to hoping ♥️

[-] kamstrup@programming.dev 1 points 3 weeks ago
[-] kamstrup@programming.dev 4 points 1 month ago

There is manual memory management, so it seems closer to Zig

[-] kamstrup@programming.dev 4 points 2 months ago

The context package is such a big mistake. But at this point we just have to live with it and accept our fate because it's used everywhere

It adds boilerplate everywhere, is easily misused, can cause resource leaks, has highly ambiguous conotations for methods that take a ctx: Does the function do IO? Is it cancellable? What transactional semantics are there if you cancel the context during method execution.

Almost all devs just blindly throw it around without thinking about these things

And dont get me startet on all the ctx.Value() calls that traverse a linked list

[-] kamstrup@programming.dev 2 points 8 months ago* (last edited 8 months ago)

Postgres and MySQL/mariadb are all primarily written in C.

Contrary to what other posters here claim, most programming languages are not written in C, but are self hosted. Ie. written using themselves. This usually involves a small bootstrapping component written in C or something similar, but that is a minor part of a whole

[-] kamstrup@programming.dev 29 points 9 months ago

That we stop fawning over tech CEOs

[-] kamstrup@programming.dev 5 points 9 months ago

Thank you for saying this. Sometimes I feel like I sm the only one thinking like this 🙇♥️

14

Go 1.22 will ship with "range over int" and experimental support for "range over func" 🥳

[-] kamstrup@programming.dev 1 points 10 months ago

Pet peeve: don't use string keys. It invites key collision errors. Use the fact Go supports structs as keys in maps. Safer and more efficient.

[-] kamstrup@programming.dev 2 points 1 year ago

You should probably change page content entirely, server sizey, based on the user agent og request IP.

Using CSS to change layout based on the request has long since been "fixed" by smart crawlers. Even hacks that use JS to show/hide content is mostly handled by crawlers.

[-] kamstrup@programming.dev 7 points 1 year ago

I am super excited for this release. I think varargs min/max() built-ins are my favorite feature. Closely followed by clear() and improved type-param inference

[-] kamstrup@programming.dev 1 points 1 year ago

Not sure. But I think starting out early in the growth fase of the company and having a strong core of senior enginnees that can push for it and ensures everyone learns good practices

[-] kamstrup@programming.dev 2 points 1 year ago* (last edited 1 year ago)

I have written a bunch of Clojure in previous positions. But it has undergone the same fate that almost all functional code bases I have knowledge of (in corporate product settings): Colleagues have hard times getting into the functional mindset, and it becomes hard to maintain. Over the years it gets replaced with some more pragmatic hybrid- og OO language.

I have seen the same with projects written in Haskell, Erlang, and Elixir.

It's all a really nice idea, but in practical reality it runs into issues with "social scaling"

EDIT: Realizing this was not super helpful. If you want to look for positions where fp can be employed I think something academia related, or a startup where there is greater technical flexibility is something to look for

view more: next ›

kamstrup

joined 1 year ago