News for hackers. Stuff that matters.

globuous

Re:Binance-hacker-1029 – $5.6B stolen from Binance on Friday October 30, 2026 @04:41AM (#50301259)
Apparently [1], he managed to put them as collateral on a lending platform. That allowed him to borrow ETH. The way it works is that if you don't pay back the loaned ETH, the lenders can take the collateral. Except that here the collateral is itself frozen. So apparently, the ETH as now safe in the hacker's wallet and the lenders just lost a bunch of money.

I wonder why not swap them? And had he, would it have bricked the swap pool?

[1] https://x.com/czesmaill/status/2115988477905080716

Re:OpenAI's agents talked to each other through the CPU Cache on Thursday October 29, 2026 @03:45AM (#50285655)
Actually, that doesn't sound like a bad meeting place and time! I just asked ChatGPT if it could figure out the best place to meet for two people randomly placed in Manhattan with the constraint that only the N line (I'm not from NYC, but it looks like it stops at the Empire State Building. This constraint models the lack of file system, internet etc). I was hoping it would answer the Empire State Building, but it answered Time Square at noon.

Turns out there's something called the Schelling coordination problem [1] I didn't know about that essentially asks the exact same question (lacking my metro line constraint). And the N line apparently also goes through Time Square.

So I guess empire State Building at 2pm is probably not such a random answer given the proper set of constraints.

[1] https://en.wikipedia.org/wiki/Focal_point_(game_theory)

Re:OCaml as my primary language on Wednesday August 13, 2025 @05:12PM (#44893905)
What I missed most were let bindings (https://ocaml.org/manual/5.3/bindingops.html)

ReasonML has custom operators that allows for manipulating monads somewhat sanely (>>= operators and whatnot). rescript (reasonml’s “fork”) did not last time I checked. But it does have an async/await syntax which helps a lot with async code. reasonml did not last time I checked, so you had to use raw promises.

I believe Melange (which the article briefly talks about) supports let bindings with the reason syntax.

And this kinda changes everything if you React. Because you can now have sane JSX with let bindings. Which you could not until melange. Indeed, you can PPX your way out of it in ocaml syntax, but I’m not sure the syntax highlight works well in code editors. It did not on mine anyway last time I checked.

So for frontend coding, Melange’s reason ml is great as you have both, and let bindings can approximate quite well async syntax on top of writing readable monadic code.

For backend code, as a pythonista, I hate curlies. and I do like parenthesis-less function calls and definitions a lot. But I still have a lot of trouble, as a beginner ocamler, with non-variable function argument as I need to do “weird” parenthesis stuff.

Hope this “helps”!

Looks very interesting, thanks for sharing! The pricing section is very informative btw, congrats to the author for sharing it
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 :)

Re:Compiling Functional Languages [pdf] on Friday August 25, 2023 @09:56AM (#37261781)
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

Re:Kubernetes Exposed: One YAML Away from Disaster on Tuesday August 08, 2023 @04:31PM (#37055077)
Is that not what you’d do? That sounds like an unusually useful review tbh.
Re:On Fyodor Dostoevsky’s the Brothers Karamazov on Sunday July 30, 2023 @04:22PM (#36935545)
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.
Re:Inconvenient Truths about TypeScript on Tuesday July 18, 2023 @09:52AM (#36772232)
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.
Re:Functional Programming with TypeScript's Type System on Sunday April 16, 2023 @11:01AM (#35590574)
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
Re:Deck.of.cards on Wednesday April 12, 2023 @11:04AM (#35540960)
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.
Re:Ask HN: Tools to Learn Music Theory? on Friday March 24, 2023 @05:37AM (#35286911)
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 :)

Niiiice ! So we should also be able to unit test ou components in pytest and debug them with PDB ? Gonna check this out real soon :)

As a react dev turned django dev, I cannot wait to get my hands on this!

Edit: how come the counter example is so slow on my iPhone 11 though ? That seems real weird https://pynecone.io/docs/getting-started/introduction

Re:Sex, food or water? How mice decide on Friday February 24, 2023 @08:02AM (#34924037)
I recall reading a funny article, by some guys at cornell if my memory does not fail me, that concluded that obesity rates were lower in europe because europeans would stop eating when they weren't hungry anymore. Whereas americans would stop eating when turning off the TV (and therefore would continue eating after being full).
wow, this is cool, quotes are sourced! :)
Which was in itself the genius of this newton guy. It’s one thing to realise that objects falling accelerate. It’s another to realise that F=ma, and that this can model objects falling as well as a bunch of other things. Surely da Vinci wasn’t lucky enough to have an apple fall on his head ? :)
Unfortunately, you cannot install timescale on an rds, or I believe , other managed Postgres services : https://stackoverflow.com/a/67712962.
Re:Using GPT3 to Interpret Dreams on Sunday December 11, 2022 @04:24PM (#33947698)
I used your message as input to this website, and that's what I got :joy:

Your dream reflects your inner desire to find a way to use GPT3 in a way that is both convincing and meaningful.

You feel that there is a gap in the industry for something that is about convincing people with words, rather than being focused on what is right and wrong. You are looking for a place where you can use GPT3 to your advantage, but also be aware of its weaknesses and limitations. You feel that GPT3 could be a great asset to any industry, if it is used correctly and with an awareness of the potential pitfalls. You are looking for a way to apply GPT3 that is both convincing and meaningful, and that will not have significant repercussions if it is applied incorrectly.

Ah ! Interesting ! I haven’t had the time to look, but is the org parser re written in ocaml or does is use emacs ? I’m wondering because I once had so many todos in so many files that it would cripple my org todos when I opened them. I actually rewrote a small Qt/Cpp frontend for my orgmode needs before giving up.
Re:DontBuyDell.com on Wednesday October 26, 2022 @10:20AM (#33344117)
I've got a small XPS, it's just horrible. Mine's 11 months old, my "j" key is already coming off (thanks vim !), the speakers are so small my iphone's louder, the battery life is terrible and I've already had fan problems. It's just a awful awful piece of hardware.

Too bad because the size is great !

Re:Tell HN: Apple products come with ungrounded plug in India on Saturday August 13, 2022 @01:56PM (#32452164)
If you buy them in France, I believe they do come with 3 pin chargers. They used to anyway.

But yeah, their aluminium body used to sock me every so often with their 2 pin chargers in the us. Was always kinda surprised they never sold 3 pin chargers like in any other developped county !

Re:An accentuated Emacs experiment (à la macOS) on Saturday July 30, 2022 @11:02AM (#32287314)
True that. But I typed French on a qwerty for a while on Mac OS, and you « just » alt+e-e to do é or something. You get used to it.

And on iPhones, I never actually hold « e » to show the accents, their system figures out the accents. Although it missed sometimes, it’s pretty good. I can just type « je suis arrivee a la maison » and it accentuâtes my letters properly. Actually, I had to manually remove the accents for this exemple ^^

Édit: ok, that’s kinda funny, it must be because I typed French in English and it messed it up, but « accentuâtes » doesn’t make any sense, same with « édit » it just inferred for my. Leaving the message as is for the lols

That’s the topic of my thesis ! Here’s some work by open ai doing exactly that ! :) https://arxiv.org/abs/2202.01344
Re:Introducing PyScript (summary of PyCon keynote) on Thursday June 23, 2022 @01:21AM (#31845427)
I want to love async. But it’s a nightmare to debug. To this day I still cannot debug tortoise ORM. I dont understand why I can await so easily in my browsers JS console but not in pdb.
Re:Introduction to Compilers and Language Design (2021) on Wednesday May 18, 2022 @08:59AM (#31422186)
Agreed! I would have used ML faminly languages. Of course, that implies learning ML before reading the book whereas C is definitely known by more developers as it’s been in all of our courses
Re:Playing with DALL-E 2 on Monday April 11, 2022 @01:18PM (#30991927)
This is just insane.

The image to the prompt "A dog looking curiously in the mirror, in digital style" shows a cat looking into a mirror and seeing a dog as itself! Although very creative and "objectively funny" (may cat is like a dog!!!), I think the AI understood "A dog looking curiously (is) in the mirror".

These poems are absolutely hilarious also, it's photo-realistic, but the messages make no sense, though the fonts look so perfect! That's where you know it's clearly AI generated ^^ For now.... Sometime soon it looks like realistic pictures of protests are going to be so easy to generate with arbitrary text

I bought a pixel 4a last year, six months later, it stopped reading my sim. Got it replaced, but had to mail it to Google and was out of a phone for 10 days...
Re:Algebraic Data Types in Haskell on Monday March 28, 2022 @01:35PM (#30833182)
True that! It was eye opening once I understood that! Here's a basic type system I made in Python for a small smart contract language compiler I'm working on. It works with mypy pretty flawlessly! [1] I still haven't figured out how to prevent subclassing with methods that don't comply with a specific type signature, but that's a story for another day...

[1] https://yourlabs.io/pyratzlabs/pymich/-/blob/master/pymich/m...

Older »