Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Year of OCaml?

Name: Anonymous 2015-05-28 4:58

We have recently gotten or will be soon getting, in no particular order:

# multicore (no more GIL)
# flambda
# GC tuning for real time systems
# algebraic effects
# modular implicits

Are we kicking ass yet?

Name: Anonymous 2015-05-28 5:21

fibs get

Name: Anonymous 2015-05-28 18:44

OCaml is OO shit, SML is the real deal.

Name: Anonymous 2015-05-28 19:23

OP, you're doing it wrong:

multicore +. (no +. more +. GIL);
flambda;;
GC +. tuning +. for +. real +. time +. systems;;;
algebraic +. effects;;;;
modular +. implicits;;;;

Name: Anonymous 2015-05-28 19:24

Did they fix arrays yet?

Name: Anonymous 2015-05-28 20:57

tbh i feel like ocaml is becoming overcomplex and losing its ocamlness, not keen on this trend

Name: Anonymous 2015-05-28 21:54

>>1
Too bad the type system still sucks ass.

Name: Anonymous 2015-05-28 22:09

>>3
but 3-kun, nobody uses it¹
1. 'it' meaning both sml and ocaml's object system

>>4
modular +. implicits;;;;
oh shit nigger what are you even doing?

Name: Anonymous 2015-05-29 17:33

>>7
What do you find difficult to understand about the type system?

Name: Anonymous 2015-05-29 19:28

>>8
You're not gonna believe this, but the only way to fix this is to... start using it! Incredible yet true.

Name: Anonymous 2015-05-29 19:36

check'em

Name: Anonymous 2015-05-29 19:49

>>10
Build an ecosystem and they will come. You won't get many OCaml users though.

OCaml's OO is really just a marketing symbol. It's there, it's good as far as these things go. But nobody uses it. SML could be living in this paradise, but like in old times The Jealous God wouldn't tolerate anything He thought was Imperfect. Meanwhile in OCaml we have an Idol of Satan in our courtyard which everyone agrees not to worship... and we have enough people around for that to mean something.

Name: Anonymous 2015-05-29 20:52

>>12
Just use Haskell.
What's the point of a functional language if it's not pure and bloated with all those ;;;;;

Name: Anonymous 2015-05-30 0:09

>>13
all those ;;;;;
What is this about? Are you sure you're not confusing OCaml with Python?

Name: Anonymous 2015-05-30 0:32

>>14
Yep, pretty sure.

https://ocaml.org/learn/tutorials/basics.html

The OCaml syntax is pleasantly concise. Here's a function which takes two floating point numbers and calculates the average:

let average a b =
(a +. b) /. 2.0;;


You'd have to be pretty damn hypocritical to say that ;;; +. ;; .+ ;; /. ;;;;;; is "pleasantly concise".

Name: Anonymous 2015-05-30 0:51

>>15
;;; +. ;; .+ ;; /. ;;;;;;
That's not OCaml either. Are you sure you're talking about OCaml? Maybe that's Ruby?

Name: Anonymous 2015-05-30 0:58

>>16
You, sir, are an idiot.

Name: You, sir, are an idiot. 2015-05-30 1:27

>>17
You, sir, are an idiot.

Name: You, sir, are and idiot. 2015-05-30 2:22

>>19
You, sir, are and idiot.

Name: Anonymous 2015-05-30 3:30

>>21
You, sir, are a idiot.

Name: Clara the Clarifier 2015-05-30 7:51

The ;; are only required at the interpreter.

Name: Anonymous 2015-05-30 15:12

>>21
Really?

Name: Anonymous 2015-05-30 17:30

>>22
Why don't you see for yourself?

Name: Anonymous 2015-05-30 19:22

>>23
$ cat > a.lua
1 + 1
$ lua a.lua
lua: a.lua:1: unexpected symbol near '1'


No I think you need the ;; even on source files. It doesn't work without it.

Name: Anonymous 2015-05-31 3:31

>>4
you're that guy who keeps saying shit like Rust has foced GC aren't you?

Name: Anonymous 2015-05-31 5:42

>>4,24,etc
$ tail -5 look-ma-no-hands.ml
let a = 1 + 2
let b = 2.2 + 3.3
let _ = print a
let _ = print b
let _ = "Have a nice day!" |> print_endline

$ ocaml ./look-ma-no-hands.ml
3
5.5
Have a nice day!


Not featured: +., ; or ;;

Try it yourself at: https://andrewray.github.io/iocamljs/modimp.html

Full disclosure:
$ head -33 look-ma-no-hands.ml
module type Num = sig
type t
val add : t -> t -> t
end

let (+) (implicit N : Num) = N.add

implicit module Num_int = struct
type t = int
let add = Pervasives.(+)
end

implicit module Num_float = struct
type t = float
let add = Pervasives.(+.)
end

module type Show = sig
type t
val show : t -> unit
end

let print (implicit S : Show) x = S.show x

implicit module Show_int = struct
type t = int
let show x = string_of_int x |> print_endline
end

implicit module Show_int = struct
type t = float
let show x = string_of_float x |> print_endline
end

Name: Anonymous 2015-05-31 9:20

>>26
Wow, cool. So pretty much OCaml has both ML modules and typeclasses now? Because implicit module ... = struct looks terribly like instance ... where

Btw, that last block in your code probably should've been

implicit module Show_float = struct
type t = float
let show x = string_of_float x |> print_endline
end

Name: Anonymous 2015-05-31 10:07

Is it just me or does ``OCaml'' sound like it should be a dialect of Perl?

Name: Anonymous 2015-05-31 10:15

>>27
So pretty much OCaml has both ML modules and typeclasses now?

We've got it all pretty much. I saw a beautiful slide somewhere for Monad done with this.

Btw, that last block in your code probably should've been

Damn, you're right. It works the way I had it though, and I think I know why—i.e. unification has to search even shadowed modules.

Name: Anonymous 2015-05-31 10:21

OCaml, the strict and impure Haskell

Name: Anonymous 2015-05-31 10:53

>>28
Well they both have camels on their books. But Perl has butterflies too now.

>>30
I'll take it.

P. S. Haskell ain't pure either dude.

Name: Anonymous 2015-05-31 12:49

>>21
Bullshit.

let fmap (implicit F : Functor) = F.fmap;;
https://github.com/ocamllabs/imp/blob/master/impControl.ml

Name: Anonymous 2015-05-31 14:35

>>26
let _ =
let _ =
let _ =
Maximum bloat.

Name: Anonymous 2015-05-31 17:03

>>32
You may include them if you wish, but they are not required. Basically what you are saying right now is all mice are grey. I'm saying some mice are brown. And you said bullshit and showed me a picture of a grey mouse. Understand?

Name: Anonymous 2015-05-31 20:26

>>32
You're just jelly that OCaml is a greater demon with control over imps.

Name: Anonymous 2015-06-04 5:16

>>33
maximum hangups

Name: Anonymous 2015-06-11 4:49

>>33
I prefer let _ = because ; is too hard to type.

Name: Anonymous 2015-06-11 5:58

I prefer let _ = because throwing away values at the toplevel makes execution obvious.

Name: Anonymous 2015-06-11 7:46

I prefer ( ) because then the span of an expression is completely unambiguous.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List