Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
_jackdk_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
61.
▲
by
_jackdk_
10mo ago
Let's see if I can do it without going too far off the deep end. I think your description of the _IO type_ as "a description of how to carry out I/O that is performed by a separate system" is quite fair. But that is a pr
62.
▲
by
_jackdk_
1y ago
That would work if the API we were querying could return results of different types in response to a single query. But we might have a single operation that needs to know a couple of FooIds, a BarId, and a BazId, and they all need to be at
63.
▲
by
_jackdk_
1y ago
> I have queries that depend on responses of preceding queries , how will my runAp_ give me this? It probably won’t. It definitely won't, which is what I was trying to get at with the discussion of monads and data dependencies. Appl
64.
▲
by
_jackdk_
1y ago
This is a really good question. If you write all the queries directly in Haskell, you get an IO action which you can't inspect: all you can do is execute it and see what it does. It might make requests, it might repeat requests it didn
65.
▲
Free applicatives, the handle pattern, and remote systems
(exploring-better-ways.bellroy.com)
94 points
by
_jackdk_
1y ago
|
43 comments
66.
▲
by
_jackdk_
1y ago
I was in Melbourne Central the other day and there were big ads up for identity verification platforms, where consumer brands normally put up their ads. That'll prime the brand recognition for everyone so that when the identity checks
67.
▲
by
_jackdk_
1y ago
This is the key sentence: > The key insight of the Hypothesis library is that instead of shrinking generated values, we instead shrink the samples produced by the PRNG. Hedgehog loses shrink information when you do a monadic bind (Gen a
68.
▲
Integrating Effectful and Persistent
(exploring-better-ways.bellroy.com)
2 points
by
_jackdk_
1y ago
|
0 comments
69.
▲
by
_jackdk_
1y ago
The interaction of laziness and purity means that the memory costs are not always what you think. Purity means that it's a lot safer to share structure between old and new versions of a data structure where an imperative language would
70.
▲
by
_jackdk_
1y ago
From the footnotes: > It gets weirder: in Haskell, exceptions can be thrown to other threads! What's really interesting is that because of purity, you have to have asynchronous exceptions otherwise you give up a lot of modularity. A
71.
▲
by
_jackdk_
2y ago
I think you don't have to teach people to program with `join`, but just that `m >>= f = join (fmap f) m`. It explains away the "get a value out" question but teaches the most common function from the interface.
72.
▲
by
_jackdk_
2y ago
An intuition of monads built on "flattening" nested layers of `m` is easier to teach and works for more monads.
73.
▲
by
_jackdk_
2y ago
I agree. The "container" intuition for Monads leaves you stuck when you try to contemplate IO (or even Promises, these days), because the "bind" operator looks like it does something impossible: extract "the" `
74.
▲
by
_jackdk_
2y ago
Cool. What's the best way to reach you? I could join the LOTJ Discord and ping you there, perhaps?
75.
▲
by
_jackdk_
2y ago
So the original versions were even simpler than I knew! I'd like to add this detail to the article. How would you like to be credited?
76.
▲
by
_jackdk_
2y ago
I'm trying to match the EGA colour palette for most if not all of my colour selections, and #555-on-#fff passes WCAG AAA requirements for body text. If I make it #000-on-#fff, I struggle to find good ways to differentiate inline `code`
77.
▲
by
_jackdk_
2y ago
Seconded. Despite sounding like it's only a tool for games, `steam-run` is very useful for generally running foreign binaries on NixOS. There's also `nix-ld`: https://github.com/nix-community/nix-ld
78.
▲
by
_jackdk_
2y ago
The post title has been mangled, perhaps by the title simplifier. The "actually" in the title is important - the post is about Justine Tunney's work on "actually portable executables" ( https://justine.lol
79.
▲
by
_jackdk_
2y ago
That's so cool. Have you written about the MUD's history and technical evolution anywhere? If not, would you be interested in collaborating on an article like that?
80.
▲
by
_jackdk_
2y ago
Thanks for bringing this up. I actually had a section on LPMuds in an earlier draft, but took it out because I didn't think I could do it justice. I also wanted to focus more on the Unix stuff. My friends and I tended to play DIKU deri
81.
▲
by
_jackdk_
2y ago
All of this sounds pretty reasonable, but my goal was to document the simplest way I saw it work back in the day. You can keep the process alive if copyover fails by writing to a temporary file and designing the server so that you get a &qu
82.
▲
by
_jackdk_
2y ago
Very cool - I thought it would be a forgotten technique by now. Which MUD, and have you written up the details anywhere? I'm very interested to know what a modern version of this looks like, particularly with the systemd integration.
83.
▲
by
_jackdk_
2y ago
Yes, it's about transferring the contents of memory. If you just call exec(), you get a new process with the file descriptors (connections) open, but you have no idea what the game state (e.g., which connection corresponds to which pla
84.
▲
How Copyover MUD Servers Worked
(jackkelly.name)
184 points
by
_jackdk_
2y ago
|
82 comments
85.
▲
by
_jackdk_
2y ago
I'm glad you like them!
86.
▲
by
_jackdk_
2y ago
> Haskell is apparently quite strong for general backend web dev Yep. Mostly because of the https://www.servant.dev/ framework (but see also IHP, Yesod, and other frameworks). Servant lets you declare your HTTP API at th
87.
▲
by
_jackdk_
2y ago
Fair. I think I mentally swapped adjectives while composing my response.
88.
▲
by
_jackdk_
2y ago
The linear functions/SMC work is really cool, but I am surprised to see the author calling it more mature than the compiling to CCCs work. The linear-smc library hasn't had an upload in a while, and it's currently missing any
89.
▲
by
_jackdk_
2y ago
The trick you describe is possible in Haskell also. https://hackage.haskell.org/package/simple-reflect does it by providing a `Num` instance for a particular type. I'm surprised that you say an imperative language
90.
▲
by
_jackdk_
2y ago
(Author here.) I think the amount of polymorphic code Haskell enables means that single-letter variables are more common than in other languages (where they're usually confined to narrow scopes), and there's a lot less to say abou
More ›