HN user

alephaleph

156 karma
Posts3
Comments62
View on HN

A coroutine is a computation that can `yield`, suspending itself and passing control back up to the caller. It can then be resumed at the caller's leisure.

An function with an effect (in this sense) is a function which can ask a handler to `perform` some effect for it. This suspends the function and passes control to whichever handler is in scope for that call, allowing that handler to resume the function at its leisure.

I suspect that you're misunderstanding what is meant by effect, because despite buzz about them and backend support for them in OCaml 5, they aren't yet implemented with syntax and type-level support in any mainstream languages I'm aware of.

I have to say that I was a little disappointed by this article. It doesn’t really demonstrate Kap as solving any of the issues that spreadsheets have, and it doesn’t really address many of the reasons people like spreadsheets.

Spreadsheets are reactive and stateless and allow you to move seamlessly from data storage to computation on that data. This is really just a calculator REPL that can ingest tabular data easily. I’d be more interested if they’d innovated more with the interface — maybe something node-based?

Unison Cloud 2 years ago

(Sorry for replying late to this but) that seems kind of inconvenient! And what if I'm using two libraries which happen to export functions with identical ASTs, and one updates? I guess usually meaningful nominal types will ensure that that doesn't happen but it seems like a nightmare to deal with in the event that it does.

Unison Cloud 2 years ago

What happens if you have two terms that are incidentally equivalent:

  A = "Hello "
  B = "Hello "
  C = A ++ "world"
  D = B ++ "world"
and then you update the definition of A but not B?

It's roughly the same, no? It emulates a non-deterministic Turing machine and gives the same results, just taking much longer. But runtime isn't everything! I think that if you're programming in a nondeterministic style, you're programming as if you have a NTM, whether or not you're actually running the code on one.

Also, surely NTMs are only physically unrealizable if P!=NP, and so whether or not NTMs could exist is an open question.

Assumed that this was like a modern Pidgin or something but it needs its own account, which is supposed to be a cryptocurrency wallet for some reason (they let you sign up with email but it’s weird and clunky and they still ask too to “sign” something). Then after that they tell you that you aren’t on the allow list but that they’ll let you in anyway if you just complete three steps, the first of which is enabling push notifications. Yuck. STEER CLEAR!

I'm pretty sure that this is demonstrating that you can (have to?) write your definitions after the main expression, then suggesting that this encourages a development style in which you first write what you want the main output to be, then later write implementations for everything. It then further suggests that this style can work well with intelligent tooling, presumably by having autocomplete automatically infer definitions for the types you used or by having AI write implementations.

FWIW I was unaware of the Philip Cross thing, but after digging into it it appears that Wikipedia's arbitration committee imposed an indefinite ban on him from editing any page regarding modern British politics [1] and that after he was found repeatedly violating it, that was upgraded to an indefinite block [2]. Not exculpatory, but at the very least evidence that Wikipedia is capable of taking issues of editor bias seriously and not sweeping it under the rug.

[1] https://en.wikipedia.org/wiki/Wikipedia:Arbitration/Requests...

[2] https://en.wikipedia.org/wiki/User_talk:Philip_Cross#Blocked...

This perspective seems insane to me. I'm undecided, but if I were to put forward an argument that AI art will be bad for culture regardless of economic model, it would be something like "AI art will always be worse (in some way) than human art, but it will also be cheaper than human art, and thus will replace it in basically all commercial fields, which would be bad for culture." Maybe I'd say it's worse because it's inherently soulless, or just that as a practical matter AI is be better at doing the bare minimum than humans are, or something like that.

If I thought that AI art would allow almost anything to be produced by anything at incredible quality, at no cost and with little skill, that sounds like a Sci-Fi utopia to me, an almost unimaginable world in which all limitations on self-expression are lifted. A world in which making a movie or a TV show or a video game becomes a weekend project. It sounds wonderful.

A 1.5GB string 3 years ago

In the post they say they didn’t do this bc they’d just be trading long strings for deeply nested objects.

To be honest I wouldn't recommend it just yet. Right now Typst doesn't expose that many layout primitives for math -- stuff like fractions are special-cased in the compiler. It all should be theoretically possible -- technically everything you need is there -- but from looking over the documentation and experimenting with this my guess would be that it would feel more like implementing your own layout engine with Typst's programming language than gluing existing stuff together.