Jane Street was right. The code is just so pretty, and rocq proof generated code for critical algos are just neat. Post fp musings related to funny french language.
It's really nice to have a business that pays for whatever preferences in tech you have.
>>108638745i tried to read a book on ML from the 90s and it included that oh so common FP smugness about how ML is so better than that terrible language C and that C will be dead within a decade in the preface and I immediately closed the book and returned it to the library
>>108639027Modern Ocaml is the best of both worlds imo, it accepts that imperative is just straight up better for a lot of use cases, and will let you do "impure", non functional things in the interest of fast.
I will mutate if I choose to, the Jane Street overlords are too pragmatic to be purity idealists
>>108639433>rainbow saladhave some self respect
it isall other languages are catching up to what OCaml already was in the 2000's
>>108639461>OCaml already was in the 2000'slike what?
>>108639527type inference, pattern matching, the top-level interpreter (REPL)
>>108639527Optional types too, Some/None is way better when it comes to handling function results (looking at you Go heads).
>>108639568>it’s another man gets hyped about revolutionary concepts Lisp had decades in advance post
>>108639652Nothing is new under the sun, nothing is wrong with rediscovering greybeards's good ideas.
repl's arent even useful
>>108639699I actually agreed with this prior to getting setup with utop, which is (one of) ocaml's repl. Editor/utop split in tmux made iteration of function design easier wrt testing
>>108639699https://corecursive.com/lisp-in-space-with-ron-garret/a space mission was saved because the device had a lisp repl.
>>108639699Low effort bait
oh boy yet another programming language that the unemployed can learn the ins and outs of.
On the practicality front, it is nice to have the option to emit bytecode or native executables; I haven't tried js_of_ocaml
The language doesn't matter you fucking autistic. Just go with typescript and start building stuff.
>>108639952Friend, broaden your horizons, there is more out there than webdev and electron apps. Programming is fun and cozy, try a neat language!
>>108639818>What turned out that the problem was that there was, in fact, a race condition, which was supposed to have been impossible.lol>we proved this code correct mathematically but it actually wasnt correctmathfag academiacel self-own maybe use a language capable of being statically analyzed next time
>>108639952of course it does matter. this dude single-handedly destroyed pythonfags https://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-retrospective/
>>108640148literally any compiled language destroys pythonfags thats not an accomplishment
>>108639027>from the 90s>... dead within a decadeWell, did it come true? My memory is a little rusty.
>>108640155it's not only about the performance.
>>108640148>>108640158im reading the article about replacing python and it sounds like this guy wrote a bunch of shitty code for all the other languages and then blames the language for the shit code he wrote
like this fucking retarded nonsense>Getenv returns the empty string and continues. Then Go somehow manages to parse the empty string as an empty JSON list and still continues. Then it tries to interpret the first of the user arguments to the program as the path of the program to run and execs that instead! Utter failure.what the fuck is this even supposed to be saying? is he complaining about go because he didnt make the program exit with an error when getenv returns an empty string? what kind of retardation is this? he should just ask llms to write the programs he wants instead of coding if im understanding this right
physical reality (and by extension, computers) operates in a procedural, imperative paradigm. that’s why functional, OOP, and all these other paradigms have fundamental core flaws which render them cumbersome or useless. literally just do X, then do Y. you don’t need a bunch of other bullshit and ceremony in the way.
>>108640229>proceduralyour cpu has no notion of what is a procedure or even a type.
>>108640229C in no way mimics logic gates, it's a humanized abstraction like everything else.
>>108639699Then what is a terminal?
IDK, a lot of these muh functional languages are basically just Weird Pascal if you ask me
>>108639245What do you think the ML in coaml stands for anon? That's not ocaml's invention.
>>108640229this nigga has never written real software in his life
>>108640229stack oriented language like forth is closer to how computers work than procedural.procedural, oop, functional can all be imperative unless you just describe what you want to get and there is something that figures the algorithms for you like sqlmost languages are multi paradigm and people write java procedurally for the most part. OOP is not something distinct from procedural, it's just first class functions on structs and subtype polymorphism. All the rest is just procedural, some of the later java features are functional (java 8 - streams, functional interfaces).functional is just pure functions and first class functions, being able to manipulate them, pass them around, higher order functions etc.Many of these oop and functional primitives can be implemented by using function pointers.
>>108640229Wrong. Functional programming describes the act of computation better than imperative does actually.
i wish i could use Oh Camel without Dune (Lisp)
>need headers to actually type code because grammars are at the limit of sanity>multi-paradigm slop>no typeclasses>good language
>>108642321>stack oriented language like forth is closer to how computers work than procedural.we moved from stack to register machines 40 years ago.
>>108643593>need headers to actually type code because grammars are at the limit of sanity"No"
The only thing I've ever seen it used for is the Haxe compiler, but that OCaml code is so shitty and unreadable it makes me doubt the entire value proposition