kakadu has quit [Remote host closed the connection]
nicholasf has quit [Remote host closed the connection]
ryanartecona has quit [Ping timeout: 256 seconds]
nicholasf has joined #ocaml
ryanartecona has joined #ocaml
struk|desk|away is now known as struk|desk
silver has quit [Quit: >>=]
d0nn1e has joined #ocaml
ryanartecona has quit [Ping timeout: 240 seconds]
nicholasf has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
__rlp_ has quit [Ping timeout: 256 seconds]
sigjuice has quit [Ping timeout: 265 seconds]
nicholasf has joined #ocaml
sigjuice has joined #ocaml
__rlp has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
nicholas_ has joined #ocaml
fluter has quit [Ping timeout: 240 seconds]
_sigjuice_ has joined #ocaml
nicholasf has quit [Ping timeout: 265 seconds]
_sigjuice_ has quit [Client Quit]
fluter has joined #ocaml
nicholas_ has quit [Remote host closed the connection]
nicholasf has joined #ocaml
mahasamoot has joined #ocaml
Stalkr_ has quit [Quit: Leaving...]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
badon has quit [Ping timeout: 240 seconds]
struk|desk is now known as struk|desk|away
d0nn1e has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
r0se has quit [Quit: sleeping]
badon has joined #ocaml
jeffmo has quit [Quit: jeffmo]
struk|desk|away is now known as struk|desk
jeffmo has joined #ocaml
ncthom91 has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
struk|desk is now known as struk|desk|away
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBir__ has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cody` has quit [Quit: Connection closed for inactivity]
mac10688 has quit [Ping timeout: 276 seconds]
pierpa has quit [Ping timeout: 276 seconds]
struk|desk|away is now known as struk|desk
jfntn has joined #ocaml
struk|desk2 has joined #ocaml
struk|desk has quit [Ping timeout: 240 seconds]
jfntn has quit [Remote host closed the connection]
struk|desk2 is now known as struk|desk|away
MercurialAlchemi has joined #ocaml
kushal has quit [Ping timeout: 260 seconds]
kushal has joined #ocaml
kushal has quit [Changing host]
kushal has joined #ocaml
Mercuria1Alchemi has joined #ocaml
kushal has quit [Quit: Leaving]
darkf has joined #ocaml
Simn has joined #ocaml
nicholasf has quit [Ping timeout: 272 seconds]
tmtwd has joined #ocaml
JacobEdelman has quit [Quit: Connection closed for inactivity]
nyon has quit [Quit: Loops are hard. Let's GOTO shopping!]
tmtwd has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 250 seconds]
aantron has quit [Remote host closed the connection]
nicholasf has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
<Mercuria1Alchemi>
I'm quite suprised to find people who go "Rust can replace OCaml"
palomer has quit [Quit: palomer]
<def`>
Somtimes, people say shit on the internets
<def`>
(and I go "rust+ocaml" replace most other general purpose languages)
nicholasf has quit []
tmtwd has joined #ocaml
<c-c>
def`: a plan!
<Mercuria1Alchemi>
def`: yeah, they do
<Mercuria1Alchemi>
but these two are really quite different
<Mercuria1Alchemi>
it's like saying "I'm going to replace OCaml with C"
<def`>
They both have a (supposedly) sound type system
<Mercuria1Alchemi>
sure, and Rust has pattern matching
<def`>
Then they must target the same use cases.
<Mercuria1Alchemi>
Rust is in a large part aimed at preventing aliased memory, yes?
<def`>
Sound programs where we make choices. That is niche market.
<Mercuria1Alchemi>
I don't see structural sharing and immutable data structure (a big part of what makes OCaml interesting and useful) work with this constraint
<def`>
I don't either
<Mercuria1Alchemi>
(it's not a criticism about Rust, but I see it more as "sane C with functional goodies" than "low-level functional language")
<Mercuria1Alchemi>
(if you want to do "sane C", that's cool, but that's not really an OCaml use case)
<def`>
And preventing aliasing with higher-order functions, good luck making a usable type system
<Mercuria1Alchemi>
yeah
<Mercuria1Alchemi>
you can't really be functional without allocating like a pig and relying on a GC
<Mercuria1Alchemi>
that said, even imperative programming with pattern matching and traits is quite a lot better than imperative programming without it
sepp2k has joined #ocaml
djellemah_ has quit [Ping timeout: 264 seconds]
<def`>
yes, rust is a huge progress in this respect
<def`>
I can't believe while there has been no similar solutions before
<def`>
-while
<def`>
(well, thre is ATS too)
<def`>
pfff... SSH with 1 second latency is unusable, I give up, bye
<adrien>
(hahaha)
zpe has joined #ocaml
<Mercuria1Alchemi>
does anyone actually use ATS in production?
wolfcore has quit [Ping timeout: 240 seconds]
BitPuffin|osx has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
wolfcore has joined #ocaml
tmtwd has quit [Remote host closed the connection]
xyh has joined #ocaml
<flux>
ats seems great on surface, but on another surface it seems like the only functional language that's more verbose than C.. ;-)
<companion_cube>
hurray for rust+ocaml
mahasamoot has quit [Ping timeout: 240 seconds]
<Mercuria1Alchemi>
rustycamel
<flux>
someone(TM) should write some nice ocaml-rust-interop
<flux>
I bet it could even be more automatic than the C interop
<flux>
it has always felt so wrong that functional languages don't even try to interop with each other
djellemah has joined #ocaml
ontologiae has joined #ocaml
wolfcore has quit [Ping timeout: 264 seconds]
<Mercuria1Alchemi>
flux: isn't that a general problem with languages that have a GC?
<flux>
well, that as well, but I think the main problem is that only C interoperability "matters"
Haudegen has joined #ocaml
wolfcore has joined #ocaml
silver has joined #ocaml
jwatzman|work has joined #ocaml
xyh has quit [Ping timeout: 240 seconds]
<Mercuria1Alchemi>
flux: because performance
<Mercuria1Alchemi>
that said, ocaml interop with Java could be useful
<flux>
actually I've used perl libraries with ocaml (mostly because I could..) and it worked out great
<Mercuria1Alchemi>
(I know, you said functional)
<flux>
sadly perl4caml doesn't exist in opam
whatever has joined #ocaml
whatever is now known as Guest31787
<Guest31787>
suuuup folks, I'm ten minutes into ocaml! and just a question - what does ";;" actually mean and why sometimes it's optional and sometimes not? please give me some buzzwords so I can google for more information (googling "ocaml double colon" doesn't help much). Thank you!
<companion_cube>
it is a separator used in the toplevel to know when to start parsing the input
<companion_cube>
so, you can write let a = \n 1+1 \n ;;
<companion_cube>
and the toplevel will stop reading input and start doing its stuff when it meets ';;'
<companion_cube>
otherwise ;; is totally optional and not used much in source files
<companion_cube>
(I never use it outside the toplevel)
<Guest31787>
ok, this makes sense, and why something like "let foo = sum [1;2;3] \n\n let bar = string_of_int foo" works without ;; between lines ?
<Guest31787>
ah ok
<companion_cube>
I think it works, yes
<Guest31787>
I'm really confused 'cause "let bar = string_of_int foo;; \n\n print_endline bar" - this does require ;; in .ml file (I doesn't run without ;; for some reason)
<Guest31787>
or there should always be only one top level expression in the file ?
<companion_cube>
;; is needed if you have toplevel expressions
<companion_cube>
but you can always write let () = print_endline bar
<companion_cube>
which is not a tolevel expression but a declaration, so it doesn't need ;;
<kansi>
hi, what is recommending way of building ocaml projects (in reference to oasis, ocamlbuild etc)
<kansi>
*recommended
<companion_cube>
if you're a beginner, ocamlbuild should be plenty enough
<haesbaert>
I'm pretty happy without oasis to be honest, ocamlbuild documentation is kinda bad though,
<flux>
guest31787, an ocaml file is composed of multiple phrases separated by ;;. each phrase is either a sequence of top-level statements or exactly one expression.
zpe has quit [Remote host closed the connection]
<flux>
guest31787, in practice most people just write a sequence of top-level statements
<companion_cube>
haesbaert: there is new doc on ocaml.org
<kakadu>
By some reason I should use line 7 because if I do like in line 5 the parameters are not passed to ocamlfind
<kakadu>
some does `a and b : rules` is equivalent to `a: rules <linebreak> b: rules`?
<kakadu>
Ah, it seems that I should use `or` in my case
djellemah_ has joined #ocaml
djellemah has quit [Ping timeout: 240 seconds]
toolslive has joined #ocaml
xyh has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
hunteriam has quit [Quit: Connection closed for inactivity]
thegameg has quit [Ping timeout: 240 seconds]
thegameg has joined #ocaml
ggole has joined #ocaml
<kakadu>
Is it possible to have two differently named mlis for single .ml file? The idea is to hide some functions when we install ocamlfind package but provide them for unit testsing.
<toolslive>
why don't you compose with 'include' ?
<toolslive>
module X = ...... end && module TestX = struct include X ...... end
<kakadu>
I will need to split explicitly everything into visible part and private one
<kakadu>
It will weird I thinksee this kindof stuff in the functor result
JacobEdelman has joined #ocaml
Stalkr_ has joined #ocaml
<ggole>
kakadu: you can sort of do that with a hack, but I don't think it's a great idea
<ggole>
(The hack is to grab the module type of the .mli with module type of, and use that to qualify a new module binding.)
<kakadu>
Well, I manage to solve it in okayish way
<ggole>
Oh?
<kakadu>
I realized that I do not need two mlis
<kakadu>
I have full implementation in a.ml without a,mli
<kakadu>
and I do in b.ml `incude A`
<kakadu>
And write reduced interface in the B.mli
<ggole>
And have b.mli?
<ggole>
Right
<kakadu>
It's kind of weird that I didn't realized that myself
<ggole>
And if you did need two, I think you could do that the same way
<ggole>
As long as one was a subtype of the other
Haudegen has quit [Ping timeout: 260 seconds]
jwatzman|work has joined #ocaml
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
xyh has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
mac10688 has joined #ocaml
mac10688 has quit [Remote host closed the connection]
kushal has joined #ocaml
sh0t has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
octachron has quit [Quit: Leaving]
badon has quit [Ping timeout: 272 seconds]
hnagamin has joined #ocaml
sepp2k has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 240 seconds]
badon has joined #ocaml
sepp2k has joined #ocaml
uris77 has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
shinnya has joined #ocaml
ontologiae has joined #ocaml
BitPuffin|osx has joined #ocaml
AltGr has joined #ocaml
Haudegen has quit [Remote host closed the connection]
struk|desk|away is now known as struk|desk2
Haudegen has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
mahasamoot has joined #ocaml
Haudegen has joined #ocaml
hnagamin has quit [Ping timeout: 276 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
hcarty has joined #ocaml
jwatzman|work has joined #ocaml
hnagamin has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
BitPuffin|osx has quit [Ping timeout: 240 seconds]
kushal has quit [Quit: Leaving]
Haudegen has joined #ocaml
lokien_ has joined #ocaml
struk|desk2 is now known as struk|desk|away
govg has joined #ocaml
mort___ has joined #ocaml
mahasamoot has quit [Ping timeout: 256 seconds]
mahasamoot has joined #ocaml
<toolslive>
if an ocaml program SEGV's when run via the bytecode interpreter, can I conclude it's the fault of the C extensions ?
zpe has quit [Remote host closed the connection]
<ggole>
Obj.magic and -unsafe (or Array.unsafe_set/get) can also do it
<edwin>
make sure your env vars only point to one version of OCaml
<Drup>
smondet: You could use Lwt.t directly, though
<hcarty>
smondet: I've seen it and used it a lot - thanks for releasing the code!
<Drup>
with something of type 'a Lwt.t -> ('a, ext) Result.t Lwt.t that unpacks the exception inside
<Drup>
(and ('a, exn) Result.t -> 'a Lwt.t) that repacks it)
<hcarty>
smondet: With a Pervasives.result type incoming I've been looking at what it would take to switch over
kakadu has joined #ocaml
<toolslive>
can't you use something like `Ok x |> Lwt.return and `Err ... ?
madroach has joined #ocaml
ely-se has joined #ocaml
<smondet>
Drup: Lwt directly? but then it's exn or an extensible variant, I use polymorphic variants → exhaustiveness check
<Drup>
smondet: that's a trivial fix, though
<smondet>
hcarty: I've been thinking of Pervasives.result, it should be easy to make 85% of the code compatible, then every time one hacks around with Lwt.(.... return (`Ok blabla)) there'll be type errors to guide the changes
<Drup>
exception my_exn of ...
<smondet>
Drup: I don't see how you can reproduce the polymo-variant error types without exposing the type parameter ( `('ok, [> `Error_one of string | ... ]) Deferred_result.t ` )
mort___ has quit [Quit: Leaving.]
<hcarty>
I think the same issue is there for any type with a parameter
mort___ has joined #ocaml
<hcarty>
From an 'a Lwt.state perspective, it seems reasonable for 'a to be ('b, 'c) result, with exceptions still handled in the Fail case
<hcarty>
Or, rather, it seems reasonable that 'a COULD be ('b, 'c) result
<edwin>
I tried using something like this a while ago: http://paste.debian.net/367268/, but I ended up using Lwt.on_termination/Lwt.on_failure/Lwt.catch instead because it seemed simpler, the result one would work if most of the libs I use would also use it
<please_help>
Yeah, I was asking in the optic of linear types, especially in the sense of ATS but rust does it too; also since if I understand correctly, the GC has been the "blocker" for things like multi-core support.
<Drup>
I wouldn't advise ATS except for academic curiosity, though
<Drup>
(same for mezzo, which is much closer to OCaml + linear type)
BitPuffin|osx has quit [Ping timeout: 260 seconds]
rpg has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
jeffmo has quit [Quit: jeffmo]
vanila has left #ocaml ["Leaving"]
madroach_ has quit [Ping timeout: 248 seconds]
<toolslive>
maybe linear types are overkil and uniqueness typing is good enough (fe the IO systems in Mercurial's or Clean's are rather .. euh... clean)
silver has quit [Quit: >>=]
silver has joined #ocaml
zpe has quit [Remote host closed the connection]
madroach has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
__rlp has quit [Quit: Reconnecting]
__rlp has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
uris77 has quit [Quit: leaving]
hcarty has quit [Ping timeout: 245 seconds]
<Drup>
Algebr: scandalous !
<Drup>
Your binding is not called node.jsoo
<Drup>
:<
<Drup>
(╯°□°)╯︵ ┻━┻
sh0t has joined #ocaml
jgjl has joined #ocaml
sh0t has quit [Quit: Leaving]
M-Illandan has quit [Quit: node-irc says goodbye]
nicholasf has joined #ocaml
ely-se has quit [Quit: Leaving...]
toolslive has quit [Ping timeout: 245 seconds]
Simn has quit [Quit: Leaving]
mort___ has joined #ocaml
silver has quit [Quit: >>=]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kakadu has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
smondet has quit [Ping timeout: 256 seconds]
nicholasf has quit [Remote host closed the connection]