News for hackers. Stuff that matters.
Re:Plans for OCaml 4.08 by woolvalley on Wednesday July 04, 2018 @02:24PM (#17458718)
For a smart contract platform, it's probably ok that ocaml isn't multithreading friendly. But what a disappointment if this is still the case: https://ib-krajewski.blogspot.com/2015/11/ocaml-and-multithr...

At this point, if a language doesn't have first class support for multithreading and static typing, I wouldn't start a new project in it. Nullability support is pretty high up there too, but that is a far more tractable problem.

Re:Plans for OCaml 4.08 by ernst_klim on Thursday July 05, 2018 @04:09AM (#17461635)
>But what a disappointment if this is still the case

Well, it's not yet ready, but it's incoming

https://discuss.ocaml.org/t/ocaml-multicore-report-on-a-june...

Re:Plans for OCaml 4.08 by jnbiche on Wednesday July 04, 2018 @08:32PM (#17460171)
> Nullability support

Nullability? As in null references? The "billion-dollar mistake" (Tony Hoare, referring to Algol), also frequently called the "worst mistake in computer science"?

Re:Plans for OCaml 4.08 by woolvalley on Wednesday July 04, 2018 @11:09PM (#17460612)
No as in something like swift optionals:

https://www.tutorialspoint.com/swift/swift_optionals.htm

It's also called nullability support, you can see it in use in this article:

http://journal.stuffwithstuff.com/2011/10/29/a-proposal-for-...

Re:Plans for OCaml 4.08 by Raphael_Amiard on Thursday July 05, 2018 @02:21AM (#17461210)
I'm not sure what you mean, optionals are just a sum type (says so in your own article) and Ocaml support for them is first class, also option is a built in Ocaml type http://batteries.forge.ocamlcore.org/doc.preview:batteries-b...
Re:Plans for OCaml 4.08 by scns on Thursday July 05, 2018 @02:36AM (#17461262)
Julia and C# call it Nullable, other Languages Option or Maybe.

Option type on wikipedia, cant paste the link somehow.

Re:Plans for OCaml 4.08 by jnbiche on Thursday July 05, 2018 @02:45AM (#17461300)
Oh, option types! I don't know Julia or C#, so never heard this called nullability before.

On any case, as someone else pointed out, OCaml had supper for option types built in, through sum types.

I agree that sum types are indispensable in a modern programming language.

Re:Plans for OCaml 4.08 by gmfawcett on Wednesday July 04, 2018 @03:25PM (#17459006)
Modern OCaml multithreading is still a couple years away, the current (very promising) approach is still at the design/experimental stage.

Out of curiosity, what is it about smart contracts that makes multithreading so important? Why isn't multiprocessing enough? [edit: sorry, I mis-read your comment. You said that multithreading probably isn't a big deal for this problem.]

Re:Plans for OCaml 4.08 by HumanDrivenDev on Wednesday July 04, 2018 @05:55PM (#17459630)
Modern OCaml multithreading is still a couple years away

It's been a couple of years away for the last 10 years.

Re:Plans for OCaml 4.08 by gmfawcett on Wednesday July 04, 2018 @06:23PM (#17459740)
I know, and I hate sharing "it's coming soon" stories for that reason. But the recent multicore progress-update does seem well conceived, and so personally I'm giving them the benefit of the doubt. :)
Re:Plans for OCaml 4.08 by laylomo2 on Wednesday July 04, 2018 @07:47PM (#17460028)
For the record, the current story is that they are merging some multicore things into 4.08, and it will only be available as an "experimental" feature. So even after it is in the compiler, it will be a couple more revisions before it is fully accepted.
Re:Plans for OCaml 4.08 by gmfawcett on Wednesday July 04, 2018 @08:04PM (#17460082)
Right, I linked to these summary notes in a different comment:

https://discuss.ocaml.org/t/ocaml-multicore-report-on-a-june...

Re:Plans for OCaml 4.08 by rbjorklin on Wednesday July 04, 2018 @04:15PM (#17459250)
It doesn’t necessarily have to be that far out: https://twitter.com/kc_srk/status/994535108127404038?s=20
Re:Plans for OCaml 4.08 by gmfawcett on Wednesday July 04, 2018 @04:39PM (#17459340)
That would be very nice. I was basing my comments on these meeting notes [1], which seem a bit more conservative. (Multicore should be available experimentally in early 2019, but not ready for production use. I guess the next steps depend on how well those experiments pan out!)

https://discuss.ocaml.org/t/ocaml-multicore-report-on-a-june...

Re:Plans for OCaml 4.08 by woolvalley on Wednesday July 04, 2018 @11:13PM (#17460630)
Not for smart contracts, just as a language in general.
Re:Plans for OCaml 4.08 by haskellandchill on Wednesday July 04, 2018 @02:39PM (#17458791)
Nullability? Why?