Better HN
topnewbestaskshowjobs
Log inSign up

color_me_not

13 karma · joined Dec 15, 2023 (2y ago) · 8 submissions

Submissions

comment 2y ago · link · parent

> Romanization is for foreigners. Japanese people would read the original kana/kanji anyway

Assuming it is only used for reading purpose. It is actually also useful for typing in Japanese with a keyboard without kanas, though it is still mostly relevant for foreigners.

Side note: I personally like input systems that support both romanizations simultaneously, since there are shorter combinations in each one. For instance, "si" saves one letter compared to "shi", and "ju" is also easier to type compared to "zyu".

comment 2y ago · link · parent

Thank you.

So, it seems I had understood the principle the way you explain it, but the code comment on print_point (as I indicated in the top of this thread) isn't saying that.

comment 2y ago · link · parent

So, you mean that this thunk is produced by the async function, and the await keyword will run it asynchronously?

In other words, print produces a thunk, and print_point also produces a thunk, and when await is used on the later, it is executed asynchronously, which will execute the print also asynchronously. So we end up with 3 different execution context: the main one, a one for each "await"?

What is the point of this, as opposed to executing the thunk asynchronously right away? Also, how does one get the result?

comment 2y ago · link · parent

There's no ownership concept, but in the JaneStreet fork, there is something resembling lifetimes[1].

[1]: https://blog.janestreet.com/oxidizing-ocaml-locality/

comment 2y ago · link · parent

I don't understand the comment in the method print_point in the class Point of the tutorial.

    [...]
    # This function is declared as `async` because it
    # awaits the result of print.
    async fn print_point(p) {
        # [...]
        print("The point is: {p}").await
    }

    [...]
From the first page of the tutorial:

> Dada, like JavaScript, is based exclusively on async-await. This means that operations that perform I/O, like print, don't execute immediately. Instead, they return a thunk, which is basically "code waiting to run" (but not running yet). The thunk doesn't execute until you await it by using the .await operation.

So, what it boils down to is that async/await are like lazily computed values (they work a bit like the lazy/force keywords in Ocaml for instance, though async seems to be reserved for function declarations). If that is the case, that method "print_point" is forcing the call to print to get that thunk evaluated. Yet, the method itself is marked async, which means that it would be lazily evaluated? Would it be the same to define it as:

    fn print_point(p) {
        print("The point is: {p}")
    }
If not, what is the meaning of the above? Or with various combinations of async/await in the signature & body? Are they ill-typed?

I wish they'd provide a more thorough explanation of what await/async means here.

Or maybe it is a dadaist[0] comment?

[0] https://en.wikipedia.org/wiki/Dada

comment 2y ago · link · parent

Sorry, that question was purely rhetorical.

That divide between individual and collective as stated above was very sketchy, and I merely wanted to indicate that.

If one take the strict definition of individualist and collective from a dictionary (well, which one, to begin with?), of course they are opposite, just looking at the idea conveyed by the word radicals (ie individualist -> individual, vs collective).

As always, we all start talking about things without first defining the terms we use to discuss those things, and of course confusion, anger and frustration ensue.

comment 2y ago · link · parent

> Collectivism involves deciding for others.

That may be true, but that's not sufficient to define collectivism. There are many other forms of societal structures where "deciding for others" exists as well. Unless you mean to lump all these together, and say that companies and tyranny for example are the same as collectivism?

> If it’s fully voluntary it’s individualism.

If I _voluntarily_ decide to join a "collective", am I individualist or collectivist?