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

Sure, you will need to write a major mode but honestly it's not that hard to get syntax highlighting working. If you follow something like https://www.masteringemacs.org/article/lets-write-a-treesitt... plus using M-x treesit-explore-mode it took me 1 day to get treesitter support for OCaml, starting from knowing nothing about how Treesitter works with Emacs to a semi-decent highlighting and indentation setup. The indentation was harder to get working, but all up 300 lines of elisp including whitespace and comments.


There is a pretty complete wasm_of_ocaml port to the Eliom web framework here https://github.com/ocsigen/eliom/pull/767

It seems like it’s a relatively easy swap from js_of_ocaml to WASM. That’s the option I’ve chosen for my experiments.


They are targeting two different intermediate representations in the compiler. wasm_of_ocaml is a fork of js_of_ocaml that consumes OCaml bytecode and emits Wasm instead of JavaScript. Compared to wasocaml that uses the FLambda-based backend for OCaml’s native code compiler.

Time will tell if both survive, they are both under active development. IMHO target different use cases.


Shout out to https://github.com/samuelkarp/runj which aims to provide OCI compatible runtime for FreeBSD jails. We are working on a Jails based sandbox implementation for running OCaml builds on FreeBSD, https://github.com/ocurrent/obuilder. If runj gets more support then it would be a good alternative to the various iocage/ezjail/etc solutions or the raw Jails implementation we have right now.


Does this OCI compatibility also translate to be able to run kubernetes on FreeBSD?


Not necessarily, Kubernetes also needs a ton of other things which are Linux kernel specific, like cgroups.

If you're just looking for an orchestrator capable of running FreeBSD jails, take a look at Nomad (Disclaimer: I work at HashiCorp, opinions my own, etc.)


cgroups are mapped into Jobs on Windows.

There could be a similar kind of mapping on FreeBSD.


Thank you for the suggestion, I'm interested in checking it out.

How does Nomad handle scaling? I'm thinking of a new project, I'd like to have the equivalent of HPA that easily scales to zero on custom metrics and a cluster autoscaler that can easily add heterogenous nodes as necessary. Even better if it can work with MacOS VMs.


Nomad supports all sorts of architectures and OSes, including M-series CPUs and MacOS. It can also scale to a lot, 2 million containers being tested. [0]

In terms of autoscaling there's the Nomad Autoscaler[1][2] that is super flexible, can get metrics from a bunch of sources, do custom queries, and perform actions (everything is via plugins, so even if your current stack isn't already supported, it's easy to add) like add extra nodes or add more instances of jobs.

0 - https://www.hashicorp.com/c2m

1 - https://developer.hashicorp.com/nomad/tools/autoscaling

2 - https://github.com/hashicorp/nomad-autoscaler


That sounds a lot like what I am looking for. Thank you for the links to reading material!


It's not clear to me why you'd choose OCaml over Haskell. I understand that OCaml isn't lazily evaluated like Haskell and has a simpler to understand compiler which gives a better understanding how the code will perform at runtime. But why as someone new why would I choose OCaml over Haskell?

From my perspective it seems like there is more activity and research going on in Haskell.


> I understand that OCaml isn't lazily evaluated like Haskell and has a simpler to understand compiler which gives a better understanding how the code will perform at runtime. But why as someone new why would I choose OCaml over Haskell?

Isn't that enough to choose OCaml over Haskell?


Why would that be enough on its own? If that alone is sufficient, he should choose C over both OCaml and Haskell.


Haskell comes with a very big community, and a lot of ways to start with the languages. I think about the http://learnyouahaskell.com/ and others.

Real World OCaml is that, without totally being it. The authors wrote it with the idea in mind that only people with a good background about functionnal world can read it.

I'd add that lazyness can be a good thing and that the type-system of Haskell is better than the OCaml one.


As I'm aware, finance industry now prefers F#. Regarding Haskell - one of its biggest user (Standard Chartered I think) uses in-house dialect of it, miu, which is strict. Basically, it just syntactically resembles Haskell... i.e. you can't just use some random Haskell library with it.


Where did you hear about this? Googling around for "miu", "miu haskell", "miu haskell standard chartered", "miu haskell standard chartered strict", etc hasn't given me anything.


It's "mu" not "miu". I think they gave a talk on it at CUFP one year.


Pure Haskell is slow, that is why.


[citation needed]


Nice to see others with the same attitude. It's a thing of beauty to see a room cleared of clutter and reduced to the bare minimum of furniture/stuff.

We follow a very similar process in our house. If it hasn't been used in 6 months or so it goes out the door. Either to charity or ebay.


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

Search: