adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
mfp has joined #ocaml
mfp has quit [Remote host closed the connection]
timclassic has quit [Ping timeout: 246 seconds]
regnat[m] has quit [Ping timeout: 245 seconds]
srenatus[m] has quit [Ping timeout: 255 seconds]
Bluddy[m] has quit [Ping timeout: 246 seconds]
M-jimt has quit [Ping timeout: 246 seconds]
ktosiek[m] has quit [Ping timeout: 252 seconds]
M-martinklepsch has quit [Ping timeout: 240 seconds]
M-Illandan has quit [Ping timeout: 240 seconds]
na9da[m] has quit [Ping timeout: 245 seconds]
hpd[m] has quit [Ping timeout: 264 seconds]
yetanotherion[m] has quit [Ping timeout: 276 seconds]
M-ErkkiSeppl has quit [Ping timeout: 264 seconds]
aspiwack[m] has quit [Ping timeout: 264 seconds]
yetanotherion[m] has joined #ocaml
Bluddy[m] has joined #ocaml
hpd[m] has joined #ocaml
na9da[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
aspiwack[m] has joined #ocaml
ktosiek[m] has joined #ocaml
M-martinklepsch has joined #ocaml
FreeBirdLjj has joined #ocaml
jabroney has quit [Quit: Leaving.]
regnat[m] has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
srenatus[m] has joined #ocaml
M-jimt has joined #ocaml
M-Illandan has joined #ocaml
timclassic has joined #ocaml
silver has quit [Read error: Connection reset by peer]
sh0t has quit [Remote host closed the connection]
P4Titan has joined #ocaml
<P4Titan> Hi all. Does anyone have expirience w/ Lwt?
<P4Titan> I have a chain of functions that return bool Lwt.t
<P4Titan> it it possible, for example, that if one of these functions returns false, the chain return false Lwt.t
<P4Titan> otherwise, if the chain is exhausted, return the value of the last expression
mfp_ has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #ocaml
lujara has left #ocaml ["Leaving"]
infinity0 has joined #ocaml
infinity0 has quit [Changing host]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
BitPuffin|osx has quit [Ping timeout: 260 seconds]
P4Titan has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
cbot has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
tmtwd has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
mali__ has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
wtetzner has joined #ocaml
gjaldon__ has quit []
gjaldon__ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
ryanartecona has joined #ocaml
ryanartecona has quit [Client Quit]
AlexDenisov has joined #ocaml
FreeBirdLjj has joined #ocaml
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
mrnugget has joined #ocaml
wtetzner has quit [Remote host closed the connection]
mrnugget has quit [Remote host closed the connection]
`0x00` has joined #ocaml
ryanartecona has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
larhat has joined #ocaml
infinity0 has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
philtor has joined #ocaml
philtor has quit [Ping timeout: 258 seconds]
ryanartecona has quit [Quit: ryanartecona]
larhat has quit [Quit: Leaving.]
freusque has joined #ocaml
Mercuria1Alchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 258 seconds]
justicefries has quit [Quit: Connection closed for inactivity]
jnavila has joined #ocaml
dch_ has joined #ocaml
alfredo has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ygrek_ has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
FreeBird_ has joined #ocaml
kakadu_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
mengu has joined #ocaml
FreeBird_ has quit [Ping timeout: 256 seconds]
AlexDenisov has joined #ocaml
M-jimt has quit [Remote host closed the connection]
yetanotherion[m] has quit [Remote host closed the connection]
M-Illandan has quit [Remote host closed the connection]
timclassic has quit [Read error: Connection reset by peer]
M-martinklepsch has quit [Read error: Connection reset by peer]
ktosiek[m] has quit [Write error: Connection reset by peer]
M-ErkkiSeppl has quit [Read error: Connection reset by peer]
na9da[m] has quit [Remote host closed the connection]
regnat[m] has quit [Read error: Connection reset by peer]
srenatus[m] has quit [Remote host closed the connection]
Bluddy[m] has quit [Remote host closed the connection]
aspiwack[m] has quit [Write error: Connection reset by peer]
hpd[m] has quit [Remote host closed the connection]
AlexDenisov has quit [Client Quit]
FreeBirdLjj has joined #ocaml
regnat[m] has joined #ocaml
dch_ has quit [Quit: ZZ]
larhat has joined #ocaml
AlexDenisov has joined #ocaml
cdidd has quit [Ping timeout: 255 seconds]
<companion_cube> so it returns true, is that it?
Onemorenickname has joined #ocaml
<Onemorenickname> hi
<Onemorenickname> with utop, is it possible to step in a function, and right before it returns, stop ?
<Onemorenickname> (i want to do that so I can examine the local bindings of the function)
<companion_cube> not with utop, but you can do it with ocamldebug
<companion_cube> look on ocaml.org, I think there's something about it
<Onemorenickname> but utop has colors :(
mengu has quit [Remote host closed the connection]
<companion_cube> at some point, we will have gdb support :3
<companion_cube> but yeah, ocamldebug needs love
<flux> maybe there are cases where ocamldebug is useful, but I haven't found them yet :/
mengu has joined #ocaml
<Onemorenickname> flux, the case I am in ?
<flux> onemorenickname, what case is that?
<flux> onemorenickname, I would just print the values in the function.
<Onemorenickname> ha ha
<Onemorenickname> whynot
<companion_cube> flux: well if ocamldebug was as nice as utop, I would probably use it
<Onemorenickname> and then, recompile, and relaunch everytime you need different values ?
<Onemorenickname> (please don't kill me : are there mutable tuples in ocaml ?)
<flux> companion_cube, if.. :)
<flux> I use gdb almost daily. certainly a great ocaml debugger would be nice to have.
<companion_cube> Onemorenickname: no, tuples are immutabl
<companion_cube> e
<companion_cube> you should use a record if you want mutability
<companion_cube> (or a tuple in a ref)
<Onemorenickname> companion_cube, i'm using records, because i need references
ygrek_ has quit [Ping timeout: 260 seconds]
jgjl has joined #ocaml
timclassic has joined #ocaml
M-jimt has joined #ocaml
srenatus[m] has joined #ocaml
M-martinklepsch has joined #ocaml
aspiwack[m] has joined #ocaml
Bluddy[m] has joined #ocaml
na9da[m] has joined #ocaml
M-Illandan has joined #ocaml
yetanotherion[m] has joined #ocaml
hpd[m] has joined #ocaml
ktosiek[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freusque has quit [Ping timeout: 240 seconds]
orbifx has joined #ocaml
olle has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
FreeBirdLjj has joined #ocaml
mfp_ has joined #ocaml
freusque has joined #ocaml
adrien has quit [Quit: Lost terminal]
adrien has joined #ocaml
orbifx has quit [Ping timeout: 246 seconds]
FreeBird_ has joined #ocaml
cdidd has joined #ocaml
mengu has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
olle has quit [Quit: olle]
achauvin has joined #ocaml
achauvin has quit [Client Quit]
freusque has quit [Ping timeout: 240 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
steve_gh has joined #ocaml
AlexDenisov has joined #ocaml
cbot has quit [Quit: Leaving]
yomimono has joined #ocaml
steve_gh has quit [Ping timeout: 260 seconds]
olle has joined #ocaml
olle has quit [Quit: olle]
abeaumont has joined #ocaml
FreeBird_ has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
_andre has joined #ocaml
Onemorenickname has quit [Ping timeout: 260 seconds]
Onemorenickname has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Onemorenickname has quit [Remote host closed the connection]
Onemorenickname has joined #ocaml
Onemorenickname_ has joined #ocaml
Onemorenickname has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
cheater has joined #ocaml
olle has joined #ocaml
TheLemonMan has joined #ocaml
Onemorenickname has joined #ocaml
Onemorenickname_ has quit [Ping timeout: 240 seconds]
Onemorenickname has quit [Ping timeout: 246 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Onemorenickname has joined #ocaml
<olle> dinosaure: hi. Ha. Thanks.
Onemorenickname_ has joined #ocaml
silver has joined #ocaml
Onemorenickname has quit [Ping timeout: 260 seconds]
snhmib has joined #ocaml
abeaumont has quit [Ping timeout: 240 seconds]
yomimono has quit [Ping timeout: 256 seconds]
olle has quit [Ping timeout: 258 seconds]
maattdd has joined #ocaml
maattdd_ has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
zv has quit [Ping timeout: 260 seconds]
manizzle has quit [Ping timeout: 240 seconds]
zv has joined #ocaml
manizzle has joined #ocaml
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
jabroney has joined #ocaml
AlexDenisov has joined #ocaml
<Onemorenickname_> I can't recall where I found this : "let (|>) f g x = f @@ g x;;"
<Onemorenickname_> But this made my ocaml experience so better
manizzle has quit [Ping timeout: 264 seconds]
al-damiri has joined #ocaml
manizzle has joined #ocaml
Onemorenickname has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
Onemorenickname_ has quit [Ping timeout: 268 seconds]
yomimono has joined #ocaml
manizzle has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
AlexDenisov has joined #ocaml
<_y> Onemorenickname, now in Pervasives :o
<Onemorenickname> _y Since when ?
dhil has quit [Ping timeout: 260 seconds]
<_y> 4.01, Doc says
<_y> just as @@ in fact
manizzle has quit [Ping timeout: 240 seconds]
d0nn1e has quit [Ping timeout: 256 seconds]
<freehck> Onemorenickname: your definition of (|>) seems to be wrong. (|>) must be 'a -> ('a -> 'b) -> 'b
d0nn1e has joined #ocaml
<Onemorenickname> this is not what i want then
n4323 has joined #ocaml
shinnya has joined #ocaml
manizzle has joined #ocaml
n4323 has left #ocaml [#ocaml]
n4323 has joined #ocaml
dch_ has joined #ocaml
octachron has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
<_y> oh indeed
jabroney has quit [Quit: Leaving.]
<_y> your composition operator is usually called (%)
<_y> it is found in most “alternative stdlibs”, but still not in stdlib
<companion_cube> % or %> or some noninfix name
snowcrshd has joined #ocaml
<Onemorenickname> _y, i love it
freyr has joined #ocaml
maattdd_ has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
mali__ has quit [Ping timeout: 264 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
BitPuffin|osx has joined #ocaml
mali__ has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
<reynir> Is there a way to use ocp-index from utop? To get documentation, I mean. Would be handy :-)
<Drup> the problem with composition operator in OCaml is that they tend not to work well with polymorphic functions. People will bump into the value restriction head on, and don't really understand why, and in the end they can't really use it
<Drup> :/
yomimono has joined #ocaml
<cheater> hi
dhil has joined #ocaml
sh0t has joined #ocaml
<cheater> Drup: yeah :\
yomimono has quit [Ping timeout: 246 seconds]
ciniglio` has joined #ocaml
ciniglio has quit [Quit: Lost terminal]
maattdd has joined #ocaml
spew has joined #ocaml
maattdd_ has quit [Ping timeout: 268 seconds]
tmtwd has quit [Ping timeout: 258 seconds]
th5 has joined #ocaml
`0x00` has quit [Quit: leaving]
`0x00` has joined #ocaml
dch_ has quit [Remote host closed the connection]
dch_ has joined #ocaml
dch_ has quit [Client Quit]
u0_a61 has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
<freehck> Drup: what's the problem with polymorphic functions and (|>)? I use it all the time and it works find. f.e.: let to_list x = [x];; 1 |> to_list |> to_list;;
<Drup> freehck: |> is not composition, it's reverse application
<freehck> aaaah
<freehck> to_list % to_list;; gives me '_a -> '_a list list
<freehck> Drup: why '_a, not 'a?
<companion_cube> Drup: do you often compose polymorphic functions in a polymoprhic context?
<Drup> companion_cube: I don't often compose functions, period. I use application all the time
<Drup> freehck: yeah, that was precisely my point in the paragraph above ....
<companion_cube> heh
<freehck> Drup: I got, but why does it behave this way?
u0_a61 has quit [Quit: leaving]
achauvin has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
<cheater> what's the difference between 'a and '_a?
sepp2k has joined #ocaml
<octachron> '_a is weakly polymorhic type: a placeholder for a single not yet known type that will disapear once the true type is known
yomimono has joined #ocaml
<_y> it shouldn’t be called “polymorphic” at all actually
<Drup> it is polymorphic, just weakly
<Onemorenickname> "Out of memory", hm
<Drup> it can take any type, but only one of them
<Onemorenickname> generic monomorphism
philtor has joined #ocaml
ryanartecona has joined #ocaml
<freehck> Drup: in other words we can't make a good composition function because OCaml doesn't distinguish pure and impure functions?
<Drup> that's a pretty good summary, yes
Mercuria1Alchemi has quit [Ping timeout: 260 seconds]
<freehck> Hm. I think Haskell has a better position here. Haskell's functions are all pure. Well except monads maybe.
<Drup> haskell doesn't have value restriction
<freehck> Sure.
<Drup> (it has the monomorphic restriction, which apparently is equally annoying)
orbifx-m has joined #ocaml
snowcrshd has quit [Ping timeout: 264 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
achauvin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BitPuffin|osx has quit [Ping timeout: 260 seconds]
`0x00` has quit [Ping timeout: 268 seconds]
<reynir> Is ocamloscope gone? Can't find it
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
larhat has quit [Client Quit]
snhmib has quit [Ping timeout: 260 seconds]
manizzle has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
<_y> http://ocamloscope.herokuapp.com/ says it is off for maintenance, but it has been so since at least last week
MercurialAlchemi has joined #ocaml
ygrek_ has joined #ocaml
achauvin has joined #ocaml
copy` has joined #ocaml
jabroney has joined #ocaml
slash^ has joined #ocaml
vramana1 has joined #ocaml
vramana has quit [Ping timeout: 240 seconds]
vramana1 is now known as vramana
freyr has quit [Remote host closed the connection]
mali__ has quit [Ping timeout: 260 seconds]
<Onemorenickname> hey people
<Onemorenickname> what happen if you use hashtbl with physical equality
<Onemorenickname> and there is a gc round ?
<Onemorenickname> is the hashtbl reset ?
jnavila has quit [Quit: It was time]
<reynir> OK thanks _y !
<Drup> Onemorenickname: you are screwed, mostly
<Drup> that's why hashtbl with physical equality is quite delicate, see https://github.com/let-def/phystable
<Onemorenickname> Drup, here https://caml.inria.fr/pub/docs/manual-ocaml/libref/Hashtbl.HashedType.html , it's written it can be useful for comparing cyclical objects
<Onemorenickname> so, it's recommanded, but it's not stable ?
<Drup> I'm surprised this is recommended, this paragraph is probably very very old.
<Onemorenickname> hm
<Onemorenickname> so there is no integration with the gc ?
manizzle has quit [Ping timeout: 268 seconds]
<Drup> No.
<Onemorenickname> ow
<Onemorenickname> is there an hashtbl integrated with gc ?
<Drup> See link above
<Onemorenickname> i've seen it, but i mean, that is used
<Onemorenickname> it's an alpha made in one time and not touched since two years
<Onemorenickname> (i'm surprised you even knew of its existence :D)
<Drup> externalized memory ftw
<Onemorenickname> Drup, what do you mean ?
ygrek_ has quit [Ping timeout: 260 seconds]
<Drup> it's a cyberpunk/scifi concept about having part of your memory stored in digital supports, which you can then access quickly by the mean of cybernetic implants. Or in my case, emacs org files. :D
<Drup> (it was a joke)
<Onemorenickname> oh, i knew of this
<Onemorenickname> but i thought it was maybe some ocaml thing
<Onemorenickname> like, memory not captured by gc
<Onemorenickname> :D
<Drup> You might be able to find in one project or another. Maybe ask on the mailing list, or def`
<Onemorenickname> i never used the mailing list
yomimono has quit [Ping timeout: 264 seconds]
manizzle has joined #ocaml
<octachron> Drup, the history of https://caml.inria.fr/pub/docs/manual-ocaml/libref/Hashtbl.HashedType.html looks funny, the (==) with mutable object example flickers a lot in time
BitPuffin|osx has joined #ocaml
<Onemorenickname> i've rewritten a code through large cut-paste-renomming manually
<Onemorenickname> i was finding some small bugs
<Drup> octachron, the OCaml documentation archeologist.
<Onemorenickname> and now, i'm finding some really big mistakes, where i did not rename key-values, and i'm surprised the program gave me so many good values
snowcrshd has joined #ocaml
jao has joined #ocaml
<octachron> Drup, except that I would *not* complain if OCaml documentation was less stratified in different historical periods
<reynir> ls
<Drup> octachron: it is indeed very stratified, I ran that soft that makes visualisation of git history logs
<Drup> you can clearly see the various blurbs of activity with different groups of people
zpe has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 264 seconds]
freusque has joined #ocaml
mali__ has joined #ocaml
<def`> are you talking about my physical hashtable?
johnf_ has quit [Read error: Connection reset by peer]
<Drup> yes
<def`> ah. What for :) ?
johnf_ has joined #ocaml
<Drup> Onemorenickname want one
manizzle has joined #ocaml
<Onemorenickname> oh, it's the same def`
<Onemorenickname> niice
<def`> latest repository is this one: https://github.com/let-def/grenier/tree/master/physh
<def`> I had some success with it, but more testing is needed if you were to use it.
apache3_ has joined #ocaml
<def`> also, this relies a lot on GC internals, last time I looked, the "ageing"-aware GC could break some invariants but it was not merged AFAICT, so fixes should be minor
<Onemorenickname> i won't rely on you fixing it (i'm not your employer), so, i guess i'll hope the gc does not touch my values :(
<Onemorenickname> oh
<Onemorenickname> but the gc moves values everytime
<Onemorenickname> :'(
smondet` has joined #ocaml
inr_ has joined #ocaml
<def`> :), only two times
<def`> when doing a minor collection (often but cheap to detect)
<def`> when doing a major compaction (expensive, but very rare)
mbrock_ has joined #ocaml
mankyKitty_ has joined #ocaml
mehdib_ has joined #ocaml
reynir1 has joined #ocaml
caw__ has joined #ocaml
<Onemorenickname> i meant, everytime it does a collection
<def`> the problem is that any allocation can trigger a minor GC. I had an ml implementation but ensuring that no GC ran was tricky, so I fallback to C
ansiwen_ has joined #ocaml
Enjolras has joined #ocaml
<Onemorenickname> I've just seen that your latest implementation is in .c
<def`> Onemorenickname: if value allocation and table building happens at distinct time, maybe running a minor collection just before table construction is good enough.
<Onemorenickname> i don't know how ocaml works
<Onemorenickname> but, does not any algorithm allocate value ?
Cypi_ has joined #ocaml
eagleflo_ has joined #ocaml
<def`> If you know OCaml enough, you can avoid most allocations.
dmbaturin_ has joined #ocaml
Ptival_ has joined #ocaml
john5 has joined #ocaml
<Onemorenickname> hm
<Onemorenickname> interesting
<def`> But that's not convenient and error-prone, using C was safer (hohoho).
manizzle has quit [Ping timeout: 256 seconds]
<Onemorenickname> I see haha
cheater__ has joined #ocaml
<Onemorenickname> def`, do you know if anyone used your lib ?
emily1 has joined #ocaml
srenatus[m]1 has joined #ocaml
thizanne_ has joined #ocaml
pigoz1 has joined #ocaml
groovy3shoes has joined #ocaml
<def`> I don't think anyone did. I didn't advertise it because it's hard to provide any guarantee that is portable accross OCaml versions.
tokenrov1 has joined #ocaml
hpd[m]1 has joined #ocaml
<Onemorenickname> i see
rom15041 has joined #ocaml
blackfry_ghost has joined #ocaml
fedruantine_ has joined #ocaml
hpd[m] has quit [*.net *.split]
srenatus[m] has quit [*.net *.split]
tokenrove has quit [*.net *.split]
rom1504 has quit [*.net *.split]
mehdib has quit [*.net *.split]
thizanne has quit [*.net *.split]
reynir has quit [*.net *.split]
fedruantine has quit [*.net *.split]
ansiwen has quit [*.net *.split]
john5_ has quit [*.net *.split]
groovy2shoes has quit [*.net *.split]
pigoz has quit [*.net *.split]
asm89 has quit [*.net *.split]
lukky513 has quit [*.net *.split]
Cypi has quit [*.net *.split]
Enjolras_ has quit [*.net *.split]
mankyKitty has quit [*.net *.split]
cheater has quit [*.net *.split]
Ptival has quit [*.net *.split]
inr has quit [*.net *.split]
averell has quit [*.net *.split]
apache3 has quit [*.net *.split]
mbrock has quit [*.net *.split]
caw has quit [*.net *.split]
mcspud has quit [*.net *.split]
blackfry has quit [*.net *.split]
eagleflo has quit [*.net *.split]
emilymhorsman has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
smondet has quit [*.net *.split]
<def`> what kind of project are you considering using it for?
cheater__ is now known as cheater
<Onemorenickname> building a language :D
lukky513 has joined #ocaml
<def`> (other people wrote code relying on GC internals, like ocaml-ancient or ocamlnet shm, even lablgtk is quite unsafe. It broke sometime and got fixed later...)
mankyKitty_ is now known as mankyKitty
<Onemorenickname> I'm wondering when a GC can happen
<def`> Ah, if it is not for critical systems (like lablgtk), I would suggest you to try with it.
<Onemorenickname> if i have the guarantee that it does not happen while a certain function is evaluated, i can use physical equality only in this function
<def`> It cost you nothing immediately. Worst case would be you realize it breaks and have already built an API that you cannot express differently.
ome has quit [Ping timeout: 255 seconds]
asm89 has joined #ocaml
<Onemorenickname> (i don't like that worst case)
<Onemorenickname> (i rebuilt it a lot of times)
<def`> Yes, that's a worst case :). But at the same time it's the cheapest path, any other solution would require you make something more complicated upfront.
manizzle has joined #ocaml
<Onemorenickname> I don't understand what's the point of physical equality if GC can happen anytime
<def`> Why not pack every object with a unique id if you want to give your object some identities? Too expensive?
<def`> GC preserves physical identity.
mbrock_ is now known as mbrock
ome has joined #ocaml
<def`> if (a == b) before GC, then (a == b) after GC
<def`> (except for lazy as we already discussed)
<Onemorenickname> (yep)
<Onemorenickname> and i can not store address
<def`> :) physical identity is not the same as accessing address :)
caw__ is now known as caw
<Onemorenickname> nice
<Onemorenickname> (expansive, more runtime checks)
<Onemorenickname> (if i can do it without runtime checks, i want to do it without)
<Onemorenickname> (and we are not talking about encoding of complicated properties in the type-system)
<Onemorenickname> well
<Onemorenickname> well
<Onemorenickname> how does hashtbl "==" works then ??
<def`> what do you mean?
<def`> Normal hashtbl?
<Onemorenickname> i thought hashtbl with "==" used something like a hash of the physical address
<def`> hashtbl doesn't know about "==". this can only happen when you instantiate the hashtbl functor using "==" as equality.
<def`> No.
<Onemorenickname> and that it did not work through a gc collection as that address change
mali__ has quit [Ping timeout: 260 seconds]
<Onemorenickname> ha ha ha :D
<def`> hashtbl "==" use the structure to hash the value.
<def`> Then "==" is only used to distinguish between keys with same hash.
<Onemorenickname> ooh
<def`> (So using "==" on a hashtable give you a linear worst-case, walking the bucket list of all similar objects with different addresses)
<Onemorenickname> (yep)
mcspud has joined #ocaml
<def`> If you really want to index by physical equality, you need 1) to be knowledgeable enough of the GC to know what are the disk (e.g. the linear worst case, I am not talking about segfaults).
<def`> 2) a solution which more or less amount to my physh table.
<Onemorenickname> I see
<Onemorenickname> Thank you for your thorough help :)
<def`> (Note: in the future, it is possible that some guarantees are given by the GC about physical hash table has that might be useful for the multicore runtime, but I haven't heard of any concrete plan)
<Onemorenickname> (sounds like a good plan)
mali__ has joined #ocaml
srcerer has joined #ocaml
<orbifx-m> why can't constructors behave like function values?
ygrek_ has joined #ocaml
<flux> I think the traditionally provided reason goes that it complicates the compiler. I guess the feature would be a cross-cutting concern lending the AOP terminology.
<orbifx-m> aop?
<flux> aspect oriented programming
<flux> constructors used to be possible to apply partially in caml light, btw
<flux> cross-cutting concern means "touches all around the code". but that it is one is just a hypothesis I've inferred from the reasoning, if it could be isolated it would be in already.. :)
<flux> I bet there is a ppx that gives that functionality :)
<flux> (not bet a lot of money, though, maybe like 10 eurocents)
<orbifx-m> Haha
<orbifx-m> bet bitcoin, you can bit less
slash^ has quit [Read error: Connection reset by peer]
<orbifx-m> so other ml languages can use constructors like functions?
jnavila has joined #ocaml
fre has joined #ocaml
arj has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 240 seconds]
spew has quit [Ping timeout: 268 seconds]
orbifx-m has joined #ocaml
<Drup> "ml languages" are very diverse
<orbifx-m> but this seems fundamental
fre has quit [Ping timeout: 240 seconds]
<flux> SML has it. I guess haskell as well, or if not, at least GHC has an extension for it :)
fre has joined #ocaml
spew has joined #ocaml
<Onemorenickname> haskell has it
<Onemorenickname> flux, you can preprocess ocaml if you want
<Onemorenickname> i did not want to spend time to do that
<Onemorenickname> (the project i'm working on is basically a cross-language pre-processor)
<Onemorenickname> but if you do so, you'll get that
fre has quit [Ping timeout: 258 seconds]
reynir1 is now known as reynir
orbifx-m has quit [Remote host closed the connection]
fre has joined #ocaml
AlexDenisov has joined #ocaml
yomimono has joined #ocaml
<tautologico> constructors not being functions is not a big deal, but it annoyed me greatly in the beginning, being used to SML before coming to ocaml
arj has left #ocaml [#ocaml]
achauvin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Onemorenickname has quit [Read error: Connection reset by peer]
fre has quit [Ping timeout: 256 seconds]
jnavila has joined #ocaml
govg has joined #ocaml
fre has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 240 seconds]
copy` has quit [Quit: Connection closed for inactivity]
AlexDenisov has joined #ocaml
AlexDeni_ has quit [Read error: Connection reset by peer]
copy` has joined #ocaml
fre has quit [Ping timeout: 246 seconds]
pigoz1 is now known as pigoz
<def`> flux: it is not hard to implement non curried constructors.
<def`> the other way...
<def`> but it doesn't really match the machine (it generates non trivial code, so performance model is less obvious)
AlexDeni_ has joined #ocaml
<def`> I would prefer that functions work like value constructors + syntax for partial applicatoin, than the other way around
AlexDenisov has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
Ptival_ is now known as Ptival
johnf_ has quit [Remote host closed the connection]
fre has joined #ocaml
cbot has joined #ocaml
jabroney1 has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
_andre has quit [Quit: leaving]
<tautologico> companion_cube: I was trying to get iocaml working with jupyter, and just now saw you created a separate repository for a common lib
jabroney has quit [Ping timeout: 260 seconds]
<tautologico> companion_cube: what is missing to get jupyter-kernel working with iocaml?
fre has quit [Ping timeout: 256 seconds]
rom15041 is now known as rom1504
fre has joined #ocaml
fre has quit [Client Quit]
snowcrshd has quit [Remote host closed the connection]
yomimono has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
cbot_ has joined #ocaml
jabroney has joined #ocaml
jabroney1 has quit [Ping timeout: 260 seconds]
cbot has quit [Ping timeout: 256 seconds]
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coddinkn has quit [Ping timeout: 260 seconds]
sepp2k has quit [Ping timeout: 240 seconds]
spew has quit [Quit: foobar]
kakadu_ has joined #ocaml
freusque has joined #ocaml
silver_ has joined #ocaml
silver has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
jnavila has quit [Remote host closed the connection]
<companion_cube> hi!
<companion_cube> saw your issue
<companion_cube> what's missing is adapting the code of iocaml to use the separate library
<tautologico> I'm trying to port the simple kernel from python to use the library
<tautologico> after that I'll go to full iocaml
<companion_cube> that would be nice!
<companion_cube> (also, there might be some no-up-to-date pieces in jupyter-kernel, especially w.r.t the IO channel)
<tautologico> trying a very simple kernel first will help uncovering issues
<companion_cube> I have a very simple kernel somewhere, but it doesn't use IO
ryanartecona has joined #ocaml
<companion_cube> I'll be happy to merge PRs!
<tautologico> cool
<tautologico> separating into a library like that was a good idea
<companion_cube> I also removed the custom 0mq bindings
<companion_cube> so it's a cleanup
<companion_cube> (and it uses the next version of the protocole)
<companion_cube> but if you have a proper language to make a binding for, then it's perfect
silver_ is now known as silver
BitPuffin|osx has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
wtetzner has joined #ocaml
duduk has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 260 seconds]
AlexRussia_ has quit [Ping timeout: 240 seconds]
duduk has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
th5 has quit []
`0x00` has joined #ocaml
spew has joined #ocaml
Pietro has joined #ocaml
AlexRussia_ has joined #ocaml
<Pietro> Hi everyone, I have a question related to type generalisation at let bindings. It has been a few years I've been programming but never noticed the following behaviour: let f (x : 'a) = x is assigned a polymorphic type if it is a module-level let binding, but a rigid type variable if it is not module-level. Why ?
yomimono has quit [Ping timeout: 264 seconds]
<flux> by "not module level" you mean ie. inside a value or function definition?
<flux> note that (x : 'a) by itself means nothing more than just x. in other words, (x : 'a) does not mean x is now polymorphic, it can have a fixed type.
<Pietro> @flux: yes, eg let _ = let f (x : 'a) = x in (f 3, f 3.0) does not type check
<Pietro> but if I define f at module-level then it's ok
inr_ is now known as inr
<flux> so I don't have a good answer why it that is the case, other than it's related to the type inference algorithm. you can rewrite that as: let _ = let f : 'a. 'a->'a = fun x -> x in (f 3, f 3.0) and it works as expected.
<flux> or shorter: let _ = let f (type a) x : a = x in (f 3, f 3.0)
<Pietro> yes I know, or use explicit quantification with (type t) (which must be equivalent to 'a . 'a -> 'a) ... I find this ultra weird.
<tautologico> I think it's the type inference algorithm, as it tries to infer a type for f it first sees the constraint 'a = int
<tautologico> then tries to satisfy the constraint 'a = float, which is impossible
<Pietro> yes, the 'a variable is quantified existentially in the case which breaks and universally (as it should) at module-level which is weird
<flux> perhaps the 'a is a red herring here. the meaning of the program is the same for all (x : 'a), (x : _) and (x) :-)
<tautologico> yes, but there is a type variable there, explicit or not
<flux> (if used only once that is, of course it has a meaning if used multiple times)
<flux> I wonder if some existing code would break if such functions inside values were as polymorphic as possible.
yomimono has joined #ocaml
<Pietro> I was wondering the same, perhaps something related to GADTs
<companion_cube> not sure how code could break by adding more polymorphism
<tautologico> I don't think it's something related to GADTs
<tautologico> in F# it works the same way, no GADTs there
<tautologico> (some F# guy had this same doubt just a few days ago)
jabroney has quit [Quit: Leaving.]
Cypi_ is now known as Cypi
<Pietro> ah, interesting! I was positing some kind of regression induced by the recent additions to the language but maybe that's not the case
<tautologico> I don't know if you can explicitly tell a type variable is universally quantified in F#... one solution there is to use objects
<Pietro> maybe types variables appearing inside the body of a function are by default considered to be quantified existentially, in case they are bound higher up.
<Pietro> Since that cannot be the case for a module-level let binding, variables appearing there are universally quantified (?)
average has quit [Ping timeout: 245 seconds]
average has joined #ocaml
<Pietro> e.g. in let g : 'a -> ('a * 'a) = let f (x : 'a) = x in fun y -> (f y, fy); the inner 'a is constrained to be equal to the one in the signature of g (?)
<tautologico> I think this has something to do with mutability
<Pietro> yes maybe I should re-read Guarrigue's paper on relaxing the value restriction ... Anyway, time to sleep for me, thanks a lot chaps!
Pietro has quit [Quit: ciao]
yomimono has quit [Ping timeout: 240 seconds]
freusque has quit [Ping timeout: 240 seconds]
BitPuffin|osx has joined #ocaml
BitPuffin|osx has quit [Remote host closed the connection]
BitPuffin|osx has joined #ocaml
wtetzner has quit [Remote host closed the connection]