Hacker News new | past | comments | ask | show | jobs | submit | globuous's comments login

Looks very interesting, thanks for sharing! The pricing section is very informative btw, congrats to the author for sharing it


Fabien is a Hacker News darling, I'd highly recommend both the DOOM black book and Wolfenstein black book, I have them and love every page. Give him your support!

Masters of Doom is also required reading for any hacker.


No way! I didn't know that was part of the standard! Very useful "trick" indeed, unless of course, the USB port is placed vertically...


AMD support would be amazing <3

I get the boot concern, and the maintenance concern (!!!), but as you say, these models are already quite huge anyway :)


Interestingly, the last slide mentions:

``` Today: we are able to certify realistic bytecode compilers and abstract machines.

Tomorrow: certification of optimizing native-code compilers? ```

Xavier Leroy actually got the ACM Software System Award in 2021 for CompCert, an optimizing native-code compiler! It's first version seems to have been released in 2005, just 3 years after this presentation was written. Though CompCert is a C compiler, which isn't really a functional language.

- https://en.wikipedia.org/wiki/ACM_Software_System_Award - https://en.wikipedia.org/wiki/CompCert


CakeML is a formally verified implementation of a subset of Standard ML which generates native code. Not sure about what it optimises though.


Is that not what you’d do? That sounds like an unusually useful review tbh.


The point of their comment, I think, is that a restaurant's grand opening is not always indicative of future experiences. The cooks/chefs, and front of house staff are all fairly new to the environment, menus might change as they find out that certain menu items are throwing off their timing or they don't have a great way to procure certain ingredients, and it will take time to all settle into a routine that works.

I think they were saying that is akin to the state of kubernetes, where everything is too new to really judge it today. Let me make clear my bias before I get to my opinion: I'm a big fan of what kubernetes has accomplished with managing the deployment of applications. But I think comparing current day kubernetes to a restaurant's grand opening is naïve. Kubernetes is amazing at what it does, and for how highly flexible it is. But it is highly flexible because of how advanced it has become, which in turn requires more knowledgeable administrators. You can take off with Docker Swarm because... it's very simple. It doesn't aim to be flexible, it just aims to be the docker-compose of distributed systems. Which is fine if you don't need the flexibility that kubernetes offers anyway.

And while I do appreciate kubernetes for all of its strengths, going back towards the point of this OP, I do believe it's a bit of a security nightmare. For example, the kubernetes operator pattern often just requires this application to run in your cluster with a ClusterRole granting it read and potentially write levels of access to ConfigMaps and Secrets around your cluster. Often without much in the ways of a method of telling the kubernetes API server what namespaces it is allowed to view those objects in. Worth mentioning though that secrets management is something that Docker Swarm also handles fairly poorly, and honestly isn't much of a security regression from the normal "deploy a VM that has all your decrypted secrets sitting on the system" anyway.


If you liked war and peace, you should check out grossman’s life and fate, it’s WWII’s version, fantastic. And blacklisted by the soviet government because critical of it.


I don’t understand how people don’t like War and Peace, aside from its size and the weird discursive turns he takes in the appendices. I’ve read it three times and every time it’s a page-turner. So good. But Tolstoy was an infinitely better literary artist than Dostoevsky could ever hope to be. (Tolstoy’s novella, Hadji Murad, is 100 pages of literary crystal, cleverly concealing itself from you as you look on through the transparent glass of words into the world Tolstoy points out to you, until you realize the whole thing is just Tolstoy and his astonishing talent).

But Dostoevsky had the real big heart, and I love him for it.


I don’t understand how people don’t like War and Peace

Easy, try mandatory-reading it in the summer when you’re around 15. I told my teacher that I will not do it and I don’t care what comes with it.


I don’t think you can objectively say Tolstoy was a worse literary artist than Dostoyevsky.

For me it’s absolutely the other way around. Dostoyevsky saw into men’s souls in a way no other writer perhaps barring Shakespeare could. Tolstoy for me is more mechanically or technically good, but Dostoyevsky was a true artist and saw through life and humanity at another level.


That's what they said

> But Tolstoy was an infinitely better literary artist than Dostoevsky could ever hope to be.


Right. Dostoevsky was perfect on the human element. Tolstoy on the writing.


War and Peace starts pretty slow. It took me a long time to get through the first 100 pages or so. Once I was into it, I couldn't put it down, but it took a while to get there.


Definitely looking forward to reading this soon. Thanks for recommending it, friend!


That's true, and I was impressed first time someone showed me that. But the cost of this luxury might not be worth it. Indeed, you mostly (only ?) communicate through an API. And if it's properly documented, which is now essentially automatic, you can easily generate your types from the frontend. To me, the cost of bringing JS to the backend dominates this luxury to the point where it's just not worth it. I'll just generate my types from the frontend and be done with it.


Yeah, there are some weird stuff in typescript, for instance, this typechecks

    class Animal {}

    class Dog extends Animal {
        woof() {}
    }

    class Cat extends Animal {
        meow() {}
    }

    let append_animals = (animals: Animal[], animal: Animal) => animals.push(animal)

    let dogs = [new Dog()]
    append_animals(dogs, new Cat())

    dogs.map(dog => dog.woof())

Which if you evaluate, you'll obviously get:

    Uncaught TypeError: dog.woof is not a function
Whereas Mypy won't typecheck the equivalent Python code:

    class Animal:
        pass

    class Dog(Animal):
        pass


    def append_animals(animals: List[Animal], animal: Animal) -> None:
        animals.append(animal)


    dogs = [Dog()]
    append_animals(dogs, Dog())

It'll throw with:

    $ mypy types.py 
    types.py:16: error: Argument 1 to "append_animals" has incompatible type "List[Dog]"; expected "List[Animal]"
    types.py:16: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
    types.py:16: note: Consider using "Sequence" instead, which is covariant


The problem with your TS code is that it's using covariance on a mutable generic type, which is unsafe and strict type systems would've forbidden that.

To expand: TS treats `Dog[]` as a subtype of `Animal[]` because `Dog` is a subtype of `Animal`... that work if you only read values from the array... but trying to change the array, you run into trouble. Some languages let you declare covariance (reading ) and contravariance explicitly to address this issue. To my limited knowledge of TS, that's not possible in TS (as it tries to keep things simple and compatible with JS, probably).

The answers in this[1] SO question explain these concepts better than I could.

[1] https://stackoverflow.com/questions/27414991/contravariance-...


Why was the `dogs` array initialized as an `Animal[]` type instead of `Dog[]` type which would forbid the addition of a `Cat` type?

Why would you be able to map a call to `woof` over an `Animal[]` when `Animal` doesn't implement `woof`? I don't understand how the SO link answers these questions.


> Why was the `dogs` array initialized as an `Animal[]` type instead of `Dog[]`

That might be your confusion: it wasn't. Its type is `Dog[]`.

> which would forbid the addition of a `Cat` type?

Why would that be forbidden? The problematic method is `append_animals`, which only cares that both arguments satisfy `Animal`, which both `Dog` and `Cat` do.

> Why would you be able to map a call to `woof` over an `Animal[]` when `Animal` doesn't implement `woof`

Back to your root confusion, since for all intents and purposes, `dogs.map` thinks it's an array of dogs, it doesn't complain.

If `append_animals` was written like this, things would be fine:

    let append_animals = <T extends Animal>(animals: T[], animal: T) => animals.push(animal)


I see what you're saying. Thanks for taking the time to explain.


From my point of view, this is one of those cases where structural typing just doesn't work all that well when used for OOP.

Typescript does give you a solution to this problem, namely that you use generics to constrain the parameters of your method:

    let append_animals = <T extends Animal>(animals: T[], animal: T) => animals.push(animal)
Your example now gives the expected error.

TypeScript does indeed have its quirks, but most of them do not really matter for real-life purposes or can easily be worked around like in the example above.


It looks like the randomness is generated at shuffle time and then maintained. You can check by hitting « fan » and then « flip » multiple times. It always returns the same card order between shuffles which seems to imply that it’s maintained.


A great tool is, believe it or not, Ocaml/Rescript!!

I was tired not remembering how to name intervals, construct chords, my arpeggios and scales and what not. So I coded it to help me figure all of that out. I also wanted a frontend to visualize all of this because notes on the guitar are all mixed up and it's hard to reason about when you have a terrible memory like I do:

- Theory.res: https://github.com/tbinetruy/solfeggio-calculator/blob/maste... - Frontend: https://tbinetruy.github.io/solfeggio-calculator/

I also have some notes on that repo that have helped me a lot where I can summarize my findings. But this exercise has been enlightening. Both from the coding and musical perspectives. Because Ocaml really forces you to model music and thus ensure that you understand the concepts which helps you remember them.

I can finally start soloing over chord progressions using arpeggios now! It's essentially comes down to playing a scale in thirds starting on the chord root note on chord changes! And I can finally understand my fretboard without having to look at my frontend's chord diagrams anymore. I still don't know the notes, but I understand their relations with each other.

I've also started learning jazz because it's a lot more theory based than pop/rock since you have a lot more exotic chords and solos are guided by the underlying progression. I really like Jens Larsen's YT channel. It's very hard to get into at first because he goes quite fast, but has some very accessible videos such as this one: https://www.youtube.com/watch?v=7q2LB45ts0M.

Hope this helps :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: