adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
mac10688 has joined #ocaml
nicholasf has quit [Ping timeout: 240 seconds]
nicholasf has joined #ocaml
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 ;;
<Guest31787> ok, that makes sense! thank you!
<companion_cube> you're welcome
kansi has joined #ocaml
<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
* haesbaert checking
<haesbaert> this one ?
<rks`> does url point to ocaml.org?
<rks`> +that
kakadu has joined #ocaml
<haesbaert> well it was linked in ocaml.org
Guest31787 has quit [Ping timeout: 252 seconds]
<haesbaert> there is also this one: https://github.com/gasche/manual-ocamlbuild
<haesbaert> last change from 14 days ago
<rks`> yes that's the one
<Mercuria1Alchemi> in general, the ocaml build story is, er, not its strong point
<rks`> (but the organisation on that website is shit, I'll give you that)
<rks`> (so apologies.)
cody` has joined #ocaml
<kansi> companion_cube: i am asking from a production prespective
<haesbaert> ocamlbuild can do the job from a production perspective, I'd not consider oasis until failing ocamlbuild.
jbrown has quit [Remote host closed the connection]
octachron has joined #ocaml
jbrown has joined #ocaml
_andre has joined #ocaml
zpe has joined #ocaml
damason has quit [Ping timeout: 250 seconds]
Sorella has joined #ocaml
FreeBir__ has quit [Remote host closed the connection]
Shozan is now known as SHODAN
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
<kakadu> Folks, doesn `and` token has any other special meaning from obvious in _tags file?
<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
<edwin> I had problems with utop crashing in the past when it loaded stublibs from OCaml 4.01 in an OCaml 4.02 ocamlrun http://caml.inria.fr/mantis/view.php?id=6532
aantron has joined #ocaml
<toolslive> is that all ?
Guest38 has joined #ocaml
<edwin> does the stacktrace in gdb show anything useful?
<Drup> wolfcore: for client/server, this https://github.com/ocsigen/graffiti (it goes along with the tutorial) for client only https://github.com/talex5/js-skeleton/
<Drup> for cohttp stuff, I guess you should look at the cohttp docs
Stalkr_ has quit [Quit: Leaving...]
Denommus has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
<toolslive> gdb -c core -.. shows the usual: beneath caml_ba_alloc (), so nothing relevant
jwatzman|work has quit [Quit: jwatzman|work]
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Haudegen has joined #ocaml
mort___ has quit [Quit: Leaving.]
xyh has joined #ocaml
xyh has quit [Client Quit]
xyh has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
slash^ has joined #ocaml
kakadu has quit [Quit: Page closed]
ski has joined #ocaml
Denommus has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
rpg has joined #ocaml
mcmillhj has quit [Quit: leaving]
mcmillhj has joined #ocaml
xyh is now known as gyh
madroach has quit [Ping timeout: 248 seconds]
pierpa has joined #ocaml
gyh is now known as xyh
mort___ has joined #ocaml
<hcarty> Drup: (or other Lwt-interested folks) Is there an Lwt-ready result type module?
ygrek has joined #ocaml
<hcarty> I've been using one internally (http://vpaste.net/fxqHc for the interface) but am wondering if something else exists already
<Drup> No
<Drup> it would not be unreasonable to add that to lwt
<Drup> The overhead is annoying though, since lwt is already kind of an error monade
<Drup> -e
<hcarty> Is there a better way to handle this in Lwt?
<Drup> Lwt.fail ? :)
<hcarty> True :-)
<hcarty> How would you mix result-using code with Lwt in that case?
<Drup> I'm not sure
Enjolras has quit [Quit: Lost terminal]
<smondet> hcarty: I've been using http://seb.mondet.org/software/pvem_lwt_unix/index.html everywhere (which the functor here http://seb.mondet.org/software/pvem/index.html applied to Lwt + Lwt_unix wrapped functions)
<smondet> s/which the/which *is* the/
ontologiae has quit [Ping timeout: 240 seconds]
<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
Simn has quit [Ping timeout: 245 seconds]
<edwin> could this be integrated with Result.result though? https://ocsigen.org/lwt/2.5.1/api/Lwt#TYPEresult
mort___ has quit [Quit: Leaving.]
silver has quit [Quit: >>=]
madroach_ has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
BitPuffin|osx has joined #ocaml
hnagamin has quit [Ping timeout: 250 seconds]
rpg has quit [Quit: rpg]
Simn has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
jeffmo has quit [Quit: jeffmo]
palomer has joined #ocaml
jeffmo has joined #ocaml
AltGr has left #ocaml [#ocaml]
<Drup> edwin: looking at the implementation, it probably could, yes
ely-se has quit [Remote host closed the connection]
<Drup> it's isomorphic to ('a, exn) result
Haudegen has joined #ocaml
palomer has quit [Quit: palomer]
divyanshu has joined #ocaml
rpg has joined #ocaml
zpe has joined #ocaml
rpg has quit [Ping timeout: 256 seconds]
nv_ has joined #ocaml
kandu_ has quit [Ping timeout: 250 seconds]
kandu has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
kandu is now known as Guest18258
Guest38 has quit [Read error: Connection reset by peer]
<please_help> Has dropping the GC altogether ever been considered?
_berke_ has joined #ocaml
<Drup> There is this funny new language
<Drup> it's called rust
<Drup> it's cool
<nv_> ATS is somewhat based on OCaml/MLs in general and has an optional garbage collector https://bluishcoder.co.nz/2011/02/27/linear-datatypes-in-ats.html
silver has joined #ocaml
<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)
<smondet> there was that thing https://github.com/pikatchu/LinearML
_andre has quit [Quit: leaving]
<nv_> i think ATS's real place is in formal verification of C programs, or just taking Rust's safety a step further
ely-se has joined #ocaml
darkf has quit [Quit: Leaving]
vanila has joined #ocaml
<vanila> so it that mirage over?
ggole has quit []
<Drup> what makes you think that ?
<vanila> not asking you dude
<haesbaert> hilarious
<Drup> Okay. *shrug*
silver has quit [Quit: >>=]
silver has joined #ocaml
tristero has quit [Quit: tristero]
silver has quit [Client Quit]
silver has joined #ocaml
<vanila> oh cool
mahasamoot has quit [Ping timeout: 264 seconds]
mahasamoot has joined #ocaml
rpg has joined #ocaml
kansi has left #ocaml ["undefined"]
tristero has joined #ocaml
rpg has quit [Ping timeout: 240 seconds]
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]