adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
min has joined #ocaml
test9753 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
minn has quit [Ping timeout: 255 seconds]
jimmyrcom has joined #ocaml
Haudegen has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
spew has joined #ocaml
zolk3ri has quit [Quit: Lost terminal]
jimmyrcom has quit [Ping timeout: 240 seconds]
pierpa has joined #ocaml
sh0t has joined #ocaml
bmgxc9 has joined #ocaml
silver has quit [Read error: Connection reset by peer]
jimmyrcom has joined #ocaml
mfp has quit [Ping timeout: 255 seconds]
clog has quit [Ping timeout: 248 seconds]
ziyourenxiang has joined #ocaml
jimmyrcom has quit [Ping timeout: 240 seconds]
jimt_ has quit [Remote host closed the connection]
jimmyrcom has joined #ocaml
clog has joined #ocaml
sh0t has quit [Remote host closed the connection]
govg has quit [Ping timeout: 240 seconds]
ome has joined #ocaml
spew has quit [Read error: Connection reset by peer]
jao has quit [Ping timeout: 255 seconds]
baboum has joined #ocaml
govg has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
seangrove has joined #ocaml
nomicflux has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
seangrove has joined #ocaml
baboum has quit [Quit: WeeChat 2.0.1]
seangrove has quit [Remote host closed the connection]
pierpa has quit [Quit: Page closed]
nomicflux has quit [Quit: nomicflux]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 268 seconds]
rwmjones has quit [Ping timeout: 260 seconds]
rwmjones has joined #ocaml
cbot has quit [Quit: Leaving]
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
tarptaeya has joined #ocaml
bmgxc9 has quit [Remote host closed the connection]
argent_smith has joined #ocaml
ewanas has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
tarptaeya has quit [Quit: Leaving]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 264 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has quit [Killed (livingstone.freenode.net (Nickname regained by services))]
infinity0 has joined #ocaml
kakadu has joined #ocaml
jimmyrcom has quit [Ping timeout: 256 seconds]
mfp has joined #ocaml
maattdd has joined #ocaml
tarptaeya has joined #ocaml
maattdd_ has joined #ocaml
min has quit [Ping timeout: 248 seconds]
barcabuona has joined #ocaml
jnavila has joined #ocaml
dakk has joined #ocaml
ome has quit [Quit: Connection closed for inactivity]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
maattdd_ has quit [Ping timeout: 255 seconds]
tarptaeya has quit [Quit: Leaving]
jnavila has quit [Ping timeout: 240 seconds]
orbifx1 has joined #ocaml
zolk3ri has joined #ocaml
dogui_ has joined #ocaml
riveter has quit [Ping timeout: 256 seconds]
dogui has quit [Ping timeout: 256 seconds]
jimt has joined #ocaml
riveter has joined #ocaml
malc_ has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
flodin_ has joined #ocaml
fds_ has joined #ocaml
lokydor_ has joined #ocaml
habnabit has joined #ocaml
flodin has quit [*.net *.split]
lokydor has quit [*.net *.split]
_habnabit has quit [*.net *.split]
asm89 has quit [*.net *.split]
fds has quit [*.net *.split]
saemcro has quit [Remote host closed the connection]
asm89 has joined #ocaml
Haudegen has joined #ocaml
jaco60 has joined #ocaml
jaco60 has left #ocaml [#ocaml]
baboum has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
orbifx1 has quit [Ping timeout: 256 seconds]
jnavila has joined #ocaml
tarptaeya has joined #ocaml
slash^ has joined #ocaml
mengu has joined #ocaml
baboum has quit [Quit: WeeChat 2.0.1]
maattdd_ has joined #ocaml
spew has joined #ocaml
maattdd_ has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
spew has quit [Read error: Connection reset by peer]
maattdd has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 240 seconds]
dakk has quit [Remote host closed the connection]
maattdd has joined #ocaml
maattdd_ has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
mk9 has joined #ocaml
maattdd_ has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
Jesin has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Remote host closed the connection]
spew has joined #ocaml
ziyourenxiang has quit [Ping timeout: 268 seconds]
banjamine has joined #ocaml
<banjamine> Why should I learn ocaml?
<Drup> banjamine: https://ocaml.org/learn/
<Drup> This question has been treated many times. I suggest you ask more specific questions if you want meaningful answers. ;)
<banjamine> That covers it
<companion_cube> :D
<banjamine> So it's not really for embedded systems programming either
<Drup> Depends what you mean by embedded
<banjamine> Like at a car factory
<banjamine> Or any kind of industrial factory
<Drup> I don't think anyone has put OCaml in a car yet :D
mattcode has joined #ocaml
<companion_cube> there's ocapic but I really don't think it's "industrial strength"
<banjamine> What would be considered industrial strength?
<dmbaturin> The real issue with elevator controller programming is hard realtime requirement, which is very hard to reconcile with garbage collection.
Jesin has quit [Quit: Leaving]
<dmbaturin> Then again, in spacecraft controllers, the most common guideline is to not use any dynamic memory at all; and in washing machines etc., well, people get away with techniques so bad for RT that they could as well be using a GC.
<companion_cube> industrial strength for that would be Ada
<dmbaturin> In any case, it depends on what exactly it's doing at a car factory. SCADA applications only need soft RT, which in many cases is relaxed to "doesn't hang". ;)
<banjamine> What is RT?
<dmbaturin> banjamine: Realtime.
<banjamine> And go?
<banjamine> Gc?
<dmbaturin> Go is mandatorily garbage collected, so no hard RT ever.
<dmbaturin> Then again, programs aren't hard RT by themselves... systems are. Running a program written with hard RT in mind on a non-RT OS is pointless.
<dmbaturin> (Go also has a type safety that is a joke, but that's another story)
<dmbaturin> aantron: In Lwt, is there a way to get a complete exception trace from a thread?
<dmbaturin> I.e. if we have Lwt.on_failure (Some_module.some_fun ()) ..., and some_fun raises an exception, how can I know where exactly it comes from?
banjamine has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
Haudegen has quit [Remote host closed the connection]
orbifx1 has joined #ocaml
Guest74448 has joined #ocaml
silver has joined #ocaml
Guest74448 is now known as Haudegen
<bartholin> When coding on the interpreter, is there a way to refer to the previous result? Like, on the first line I type 1+1;;, then on the second line I type ?? + 5;;, and it returns 7?
<companion_cube> not that I know of
<companion_cube> it's a bit sad
<tarptaeya> Why does let (+) a b = a * b works but let (.) a b = a*b give error "operated expected"?
<orbifx1> bartholin: so long you are writing pure expressions you can hit up (arrow) then replace ; with ` |> your expression here `
<bartholin> tarptaeya: (.) is not an operator.
<tarptaeya> ohh, where can I find a list of operators ?
<tarptaeya> Thanks!
<octachron> I am starting to wonder if Caml Light documentation should be moved elsewhere now that French CPGEs are switching to OCaml
<bartholin> oh
* bartholin remembers that thing exists
<Drup> octachron: they are ???
maattdd_ has joined #ocaml
nomicflux has joined #ocaml
maattdd_ has quit [Ping timeout: 276 seconds]
<octachron> Drup, yes the only language recommended starting from this year is OCaml, no longer Caml Light nor (Caml Light or Pascal)
<Drup> Alleluia.
mengu has joined #ocaml
maattdd_ has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
mengu has quit [Ping timeout: 240 seconds]
maattdd_ has quit [Ping timeout: 256 seconds]
<Fardale> bartholin: utop -implicit-bindings
Deknos has joined #ocaml
nadako has joined #ocaml
jnavila has joined #ocaml
maattdd_ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
maattdd_ has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
min has joined #ocaml
maattdd_ has joined #ocaml
barcabuona has quit [Quit: WeeChat 2.0.1]
maattdd_ has quit [Ping timeout: 276 seconds]
maattdd_ has joined #ocaml
spew has quit [Ping timeout: 248 seconds]
maattdd_ has quit [Ping timeout: 260 seconds]
min has left #ocaml ["Leaving"]
maattdd_ has joined #ocaml
barcabuona has joined #ocaml
maattdd_ has quit [Ping timeout: 252 seconds]
maattdd_ has joined #ocaml
maattdd_ has quit [Ping timeout: 260 seconds]
seangrove has joined #ocaml
ygrek has joined #ocaml
<madroach> I'm giving a try to containers right now and am wondering how I am supposed to compare custom types like simple zero-argument variants.
<companion_cube> Pervasives.compare
<companion_cube> or Pervasives.(=)
maattdd_ has joined #ocaml
<companion_cube> (but ideally you'd provide an `equal` function in your module along these custom types, even if internally it's just Pervasives.(=))
bmgxc9 has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
<thizanne> use Obj.magic and then you can have ( = )
<companion_cube> :D
<companion_cube> you monster
maattdd_ has quit [Ping timeout: 276 seconds]
sh0t has quit [Remote host closed the connection]
<madroach> hmm, I'm not convinced by dogmatically prohibiting polymorphic comparison. In most cases it will be optimized away in any case.
<companion_cube> it's not a question of optimisation, but safety
<madroach> huh? why that?
jimmyrcom has joined #ocaml
<companion_cube> polymoprhic comparison is a common source of bugs
bmgxc9 has quit [Remote host closed the connection]
maattdd_ has joined #ocaml
bmgxc9 has joined #ocaml
<madroach> Is that because it may yield false non-equal results?
<madroach> nevermind, I'll use google...
<thizanne> it could also yield false equal results
dejanr has joined #ocaml
maattdd_ has quit [Ping timeout: 264 seconds]
dejanr has quit [Client Quit]
<companion_cube> also, it will fail if the values contain closures
<malc_> companion_cube: as will (=)
dejanr has joined #ocaml
<companion_cube> that's what I meant
<malc_> companion_cube: (=) is not a comparison function though
maattdd_ has joined #ocaml
<thizanne> madroach: rather than "dogmatically prohibiting polymorphic comparison", would you be more comfortable with "prevents you from inadvertently using ( = ) when you actually wanted M.equal" ?
<companion_cube> yeah yeah, I mean the poltmorphic operators in general
dejanr has quit [Client Quit]
dejanr has joined #ocaml
maattdd_ has quit [Ping timeout: 256 seconds]
isd has joined #ocaml
bmgxc9 has quit [Remote host closed the connection]
nomicflux has quit [Quit: nomicflux]
spew has joined #ocaml
ewanas has quit [Quit: Leaving]
maattdd_ has joined #ocaml
spew has quit [Ping timeout: 248 seconds]
<madroach> It seems to me that completely removing polymorphic comparison is like throwing out the baby with the bath water. I use (=) only for non-structured types or very simple types like tuples and zero-argument variant types.
<madroach> I don't know how to implement this in a library, but a sensible compromise could be to forbid polymorphic comparison for abstract types.
<companion_cube> but we can't really do that… that would require compiler support
<companion_cube> (=) is still there, it's just under Pervasives
<madroach> I'll probably prepend let (=) = Pervasives.(=);; to my code.
<madroach> Otherwise my code needs to change from
<madroach> if ctx.in_len > 0 || flush = Finish
<companion_cube> or `open Pervasives` at the beginning if you prefer it
<madroach> to
<madroach> if ctx.in_len > 0 || (match flush with Finish -> true |_ -> false)
<theblatte> (compiler support for removing unsafe (=) would be really nice)
<theblatte> (=) is such a footgun that forbidding it entirely is kind of worth it
maattdd_ has quit [Ping timeout: 240 seconds]
<companion_cube> also, List.mem, List.assoc, all that :/
malc_ has quit [Remote host closed the connection]
<theblatte> yes, that's the actual footgun as it's more hidden
<theblatte> better stdlib that force you to specify the equality function help
<companion_cube> yeah…
<thizanne> I'm not sure there is a single opam package that wouldnt be broken by forbidding (=)
<thizanne> apart from containers ;)
<companion_cube> you kidding, I'm sure a lot of packages use polymorphic ueqality
<thizanne> and I guess the "let's emit a warning first and deprecate it" wouldnt be faster than "let's juste wait for modular implicits to fix this"
<thizanne> (I want to believe it at least)
<companion_cube> haahahah :D
<companion_cube> the deprecation + warning has the advantage that modifications to packages can be backported, though
<companion_cube> same as safe-string
<isd> thizanne: is actually merging modular implicits likely to happen? The paper and initial implementation was years ago, and the last I checked the branch hadn't been touched in a while.
<companion_cube> they're reworking on the theory I think
<companion_cube> but it'll be years, at best, I think
tarptaeya has quit [Quit: Leaving]
<isd> I'm honestly not sure how I feel about modular implicits. It's an elegant solution, but coming from Haskell I actually really don't miss the massive pile of abstraction that type classes permit.
<companion_cube> :D
<companion_cube> well it would enable a lot of good things, too
<companion_cube> e.g. make it much easier to write random tests
<companion_cube> debug printing would be more convenient, too
shinnya has quit [Ping timeout: 276 seconds]
<theblatte> thizanne: well I know at least one project that completely forbids (=) so that one wouldn't be broken ;)
<orbifx1> does opam support mailto: for bug reports?
<companion_cube> you put whatever you want in that field
<orbifx1> alright :)
jimmyrcom has quit [Ping timeout: 240 seconds]
<orbifx1> Installing opam-publish fails
<orbifx1> anyone else experienced issues with it? A lot of dependencies that can't be satisfied
orbifx1 is now known as orbix
orbix is now known as orbifx1
orbifx1 has quit [Ping timeout: 255 seconds]
isd has quit [Quit: Leaving.]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
xfbs has joined #ocaml
jmagnusj has quit [Quit: Leaving]
argent_smith has quit [Quit: Leaving.]
jnavila has quit [Ping timeout: 276 seconds]
kakadu has quit [Remote host closed the connection]
shinnya has joined #ocaml
jimmyrcom has joined #ocaml
Haudegen has quit [Remote host closed the connection]
mk9 has quit [Quit: mk9]