Hacker Newsnew | past | comments | ask | show | jobs | submit | unstruktured's commentslogin

There is absolutely no reason to use double semicolons in practice. The only place you really should see it is when using the repl.

Yeah, it makes me think he doesn't understand them in OCaml.

I worked in OCaml for a year and I couldn't tell you by memory what the difference was. I remember being very annoyed by OCaml's many language quirks.

Thanks for restoring my sanity. Was quite confused of the value added by the author.


Sorry for the confusion. I must be a very disturbed person because I kind of like what is explained there.


Here, I brought down the enthusiasm a bit in the closing word. I hope it creates less confusion now.


To F# from what previously?



OCaml


Ocaml


"Uh...the answer's not in the box, it's in the band".


Love that movie.


> He said, uh, "The answer's not in the box, it's in the band."


I don't think he touched on whether server side is a more valid use case, but was nice to read someone elses take on using it for a desktop. Thanks for the contribution.

He did find functional programming to be sort of mystic so I don't know if I trust his take on assesing the nix language itself.

TLDR; just stick with ubuntu or arch unless you feel like experimenting


Author here. Your TLDR is spot on. Yes, my intent was to be on desktop use since most things I read dont consider that specifically. I did talk about how I would keep this running on some simple home servers since I think that's where Nix shines. But some of my servers are raspberry pis, which I mentioned I am worried to run Nix on due to resource limitations. I should probably just try it.


I wish remote build/deploy for Raspberry Pi was in a better state - it seems like a perfect fit for NixOS.

I've got x86 servers running NixOS that are deployed using Colmena, but it seems to fall apart when I add cross compilation into the mix.


I'm running NixOS on a raspberry pi and I deploy to it with deploy-rs¹. This works pretty well for me. My dev machine is an Apple Silicon laptop with nix-darwin installed and I use its nix.linux-builder module to run an aarch64-linux VM as a remote builder to build the rpi's system. All this means the rpi never has to do any building itself, and doesn't even need the nixpkgs source installed either.

If you want to do this yourself, I recommend using https://github.com/nix-community/raspberry-pi-nix so the system is configured much more closely to how the stock raspberry pi image works. The benefit of this is better reliability of stuff like bluetooth.

¹https://github.com/serokell/deploy-rs


cross compilation is hit-or-miss, but using qemu/binfmt works just fine, if a bit slow.


I wish they would at least rename the company to "ClosedAI" because that's exactly what it is at this point.


Unfortunately, that's not how trademarks work.

You can name your company "ThisProductWillCureYouFromCancer" and the FDA cannot do a thing about it if you put it on a bottle of herbal pills.


Is this true? If so it seems like an underexploited loophole.


It might be technically true, but I don't think it would be true in practice. The difference is that:

- Technically true means you will probably win any lawsuit they bring

- In practice means that they will in fact bring a lot of lawsuits, making it very expensive for you and difficult for you to operate. They will probably find excuses to harass you over every little thing, they will harass you over lots of details that are technically required but rarely enforced in practice. You'll constantly be getting inspected and audited, they will bring lawsuits for other, apparently unrelated things.


That would be a nice thing they could do.


What, to you, is an ultra strong type system? Both OCaml and Haskell are used in plenty of non academic contexts. Do you mean something like Coq or F*?


"plenty" is relative.

You don't see many GAFAM products created in either, and that's because of the trade off OP talks about.


I don't see many GAFAM products created in any functional language, even those with primitive type systems. Are you sure it is the type system that is scaring people away?


I was thinking of Haskell and F#. Neither one is completely unused outside of academic contexts but it is rare.

Rust is an example where a stronger type system has an associated payoff and it's being used all over.


Oh that's a solved problem since 1969. It's called "unix". Everything is a file which can be processed as a byte stream. Composition is a breeze- can't be any more general than that!

(I kid, mostly :)).


- UNIX: everything is a file.

- LISP: everything is a lambda.

- Tandem: everything is a database.

- QNX: everything is a message.

- IBM System/38: everything is a capability.


That's the worse-is-better grand unified abstraction.

The Right Thing, as any Lisp programmer can tell you, is lambda.


An actual Lisp programmer will tell you that the right thing depends on the situation. The right thing can be a lambda, a string, a symbol, a structure, a class object, a hash table, a vector, a list, a call to a foreign function, a syntactic abstraction, a bitmask, a load-time value, a pattern matcher, ...



I think when people say safest they mean the safest "C like" language with zero cost abstractions.


I am not convinced about that. I think that many people discovered the notion of "memory safety" with Rust, and think that only Rust provides it. The grandparent is right: Rust brings memory safety at low cost, that's the whole point.


Yeah but the author went from typescript to rust… what did they expect.


Then irony is that typescript (well, Javascript) has full memory safety. The changes of segfaults only increased when he switched to rust.


F* + 1ml (https://people.mpi-sws.org/~rossberg/1ml/) would be the ultimate experience. I was born too early!


Correct me if I'm wrong (I've only dabbled in F* and only briefly read about 1ML) but wouldn't F*'s full dependent types make 1ML redundant?

That is, once you've brought types into the value level, modules themselves become redundant - they're just records, and functors are just functions. The point of 1ML, IIUC, is to accomplish a similar unification without demanding full dependent types and the attendant complexities they bring.


Interesting point. I never inferred a strong connection between dependent types and the unification of records and modules. Maybe a real PL theorist around here can provide insights on that subject.


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

Search: