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
Simn has quit [Quit: Leaving]
peddie_ is now known as peddie
zv has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
zv has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
rpg has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nicoo has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
john51_ has quit [Ping timeout: 245 seconds]
john51 has joined #ocaml
john51 has quit [Read error: Connection reset by peer]
john51 has joined #ocaml
john51 has quit [Read error: Connection reset by peer]
mengu has quit [Quit: Leaving...]
john51 has joined #ocaml
silver has quit [Read error: Connection reset by peer]
john51 has quit [Read error: Connection reset by peer]
rpg has quit [Ping timeout: 258 seconds]
john51 has joined #ocaml
john51 has quit [Read error: Connection reset by peer]
john51 has joined #ocaml
FreeBirdLjj has joined #ocaml
sepp2k has quit [Ping timeout: 256 seconds]
ygrek_ has quit [Ping timeout: 258 seconds]
ygrek has joined #ocaml
ygrek_ has joined #ocaml
nomicflux has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
ygrek_ has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
yomimono has quit [Quit: Leaving]
sh0t has quit [Remote host closed the connection]
fluter has quit [Ping timeout: 264 seconds]
malina has quit [Quit: Throwing apples of Montserrat]
AlfredENeuman has quit [Ping timeout: 264 seconds]
AlfredENeuman has joined #ocaml
nomicflux has quit [Quit: nomicflux]
jao has quit [Ping timeout: 276 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
mfp has quit [Ping timeout: 255 seconds]
rpg has joined #ocaml
vicfred has joined #ocaml
vicfred has quit [Max SendQ exceeded]
vicfred has joined #ocaml
vicfred has quit [Max SendQ exceeded]
vicfred has joined #ocaml
<rpg> is this an ok place for a Tuareg question? I'm trying to define an "enumeration" (a set of simple conductors), and when I try I just keep getting "(wrong-type-argument commandp tuareg-electric) trying to enter the bar-separated names
<rpg> Looks like the vertical bar is bound to the command tuareg-electric.
govg has quit [Ping timeout: 240 seconds]
leah2 has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
ygrek_ has quit [Ping timeout: 240 seconds]
emias has quit [Ping timeout: 240 seconds]
emias has joined #ocaml
andreas__ has quit [Quit: Connection closed for inactivity]
kolko has quit [Quit: ZNC - http://znc.in]
kolko has joined #ocaml
kolko has quit [Client Quit]
FreeBirdLjj has quit [Remote host closed the connection]
fluter has joined #ocaml
kolko has joined #ocaml
snhmib has quit [Quit: WeeChat 1.6]
Algebr has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
rpg has quit [Ping timeout: 255 seconds]
tmtwd has joined #ocaml
tmtwd has quit [Read error: Connection reset by peer]
cataska has joined #ocaml
AlfredENeuman has quit [Ping timeout: 256 seconds]
AlfredENeuman has joined #ocaml
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
AlexDenisov has joined #ocaml
cataska has quit [Quit: Textual IRC Client: www.textualapp.com]
sfri has quit [Quit: No Ping reply in 210 seconds.]
sfri has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
vicfred has quit [Ping timeout: 276 seconds]
manizzle has quit [Ping timeout: 264 seconds]
manizzle has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDeni_ has quit [Client Quit]
AlexDenisov has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
vicfred has joined #ocaml
govg has joined #ocaml
ygrek_ has joined #ocaml
MercurialAlchemi has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
fluter has quit [Ping timeout: 264 seconds]
fluter has joined #ocaml
lucybun has quit [Read error: Connection reset by peer]
jnavila has joined #ocaml
lucybun has joined #ocaml
Simn has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jnavila_ has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
fre has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
alfredo has joined #ocaml
AlexDenisov has joined #ocaml
fluter has quit [Ping timeout: 240 seconds]
fluter has joined #ocaml
frefity has quit [Ping timeout: 240 seconds]
frefity has joined #ocaml
manizzle has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
kakadu has joined #ocaml
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
fre has joined #ocaml
tobiasBora has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jave has quit [Ping timeout: 240 seconds]
jave has joined #ocaml
AlexDenisov has joined #ocaml
_2can_ is now known as _2can
AltGr has joined #ocaml
<tobiasBora> Hello !
<freehck> people, what is the common approach to make a clone of structure with mutable fields? F.e. if I have let s = {mutable x:int; y:int}, do I understand correctly that I can do something like {s with x = s.x}? Do I need with-assumption for each mutable field?
<freehck> btw, hello. always forget about greetings. :)
<tobiasBora> I would like to know, does the Windows port of opam is still in project ? I'm asking because I'd like to share a program with other people that run windows, and I don't want that they become crazy after running my program...
<kakadu> freehck: I think that it will work as is
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kakadu> Frankly speaking I do not undertstand what is worring you
<companion_cube> freehck: {foo withbar=baaz} does a shallow copy only
<companion_cube> if foo had mutable fields, they will be distinct from the copy's fields
<companion_cube> (be very careful with mutability + copy, in any case)
fluter has quit [Ping timeout: 264 seconds]
Algebr has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
fluter has joined #ocaml
_andre has joined #ocaml
mfp has joined #ocaml
tane has joined #ocaml
tane has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
tane has joined #ocaml
<freehck> companion_cube: Shallow copy is specifically what I need. Do I have to specify at least one field after `with`? It would be very useful if we had syntax like `let a = {b}`, where b is a structure we want to make a shallow copy of.
<freehck> Now I use `let a = {b with field=b.field}`
<freehck> It seems bad.
<kakadu> you can try to implement generic `shallow_clone : 'a -> 'a ` function
<freehck> kakadu: how? {_ with _ = _} is the only construction to make a clone as I know. And to use it I must know at least one field name. I mean I can't iterate through field names inside the shallow clone.
<freehck> It must be some special construction in my opinion.
DrWhax has joined #ocaml
<kakadu> It can be done using some `unsafe` features.
<kakadu> Basically, you need to replate toplevel 'block' by the same new one, and attach sons into right positions
<freehck> kakadu: I don't know how ocaml is implemented. But I'm intrigued by your approach. Can you say more?
<freehck> thx
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
<Drup> kakadu: please don't advise things like that ...
snhmib has joined #ocaml
<Drup> it's almost never the right solution
<Drup> freehck: make yourself a copy function "let copy {foo ; bar} = {foo;bar}" and tada
silver has joined #ocaml
<freehck> Drup: 11 fields! :p
<Drup> "let copy x = { x with foo = x.foo}"
<freehck> Drup: exactly what i've done :)
<freehck> Drup: But I still wanna have syntax like "let copy x = {x}"
<reynir> Why do you want to make shallow copies?
<reynir> Ah, nvm
<freehck> reynir: because I need to save original structure after mutation of its fields.
<reynir> I sometimes almost forget about mutation :-)
<companion_cube> kakadu: don't
<companion_cube> don't use unsafe features
fre has quit [Ping timeout: 276 seconds]
vramana1 has joined #ocaml
foo30303 has joined #ocaml
sepp2k has joined #ocaml
mfp has quit [Quit: Leaving]
vramana has quit [Ping timeout: 276 seconds]
vramana1 is now known as vramana
FreeBirdLjj has joined #ocaml
sepp2k has quit [Client Quit]
Denommus has joined #ocaml
sepp2k has joined #ocaml
frefity has quit [Ping timeout: 245 seconds]
larhat has joined #ocaml
rpg has joined #ocaml
AlexDenisov has joined #ocaml
frefity has joined #ocaml
nomicflux has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
frefity has quit [Ping timeout: 240 seconds]
tane has quit [Quit: Leaving]
AltGr has left #ocaml [#ocaml]
nomicflux has quit [Quit: nomicflux]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
frefity has joined #ocaml
FreeBirdLjj has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
rpg has quit [Ping timeout: 252 seconds]
sh0t has joined #ocaml
orbifx-m has joined #ocaml
dhil has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AltGr has joined #ocaml
AlexDenisov has joined #ocaml
govg has joined #ocaml
ziyourenxiang has joined #ocaml
rgrinberg has joined #ocaml
shinnya has joined #ocaml
vicfred has quit [Ping timeout: 252 seconds]
flx has joined #ocaml
gjaldon__ has quit [Ping timeout: 258 seconds]
fluter has quit [Ping timeout: 240 seconds]
mbrock has quit [Ping timeout: 258 seconds]
cschneid has quit [Ping timeout: 258 seconds]
mankyKitty has quit [Ping timeout: 258 seconds]
parataxis has quit [Ping timeout: 258 seconds]
yminsky has quit [Ping timeout: 258 seconds]
flux has quit [Ping timeout: 256 seconds]
mankyKitty has joined #ocaml
flx is now known as flux
yminsky has joined #ocaml
cschneid has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mbrock has joined #ocaml
fluter has joined #ocaml
AlexDenisov has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
fre has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
octachron has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
average has quit [Ping timeout: 245 seconds]
ciniglio has joined #ocaml
alfredo has quit [Ping timeout: 255 seconds]
tobiasBora has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
tobiasBora has joined #ocaml
copy` has joined #ocaml
jao has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
freusque has quit [Ping timeout: 264 seconds]
gjaldon__ has joined #ocaml
parataxis has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
johnelse is now known as johnel_away
johnel_away is now known as johnelse
yomimono has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
jeffmo has joined #ocaml
ryanartecona has joined #ocaml
jnavila_ has quit [Quit: It was time]
freusque has joined #ocaml
slash^ has joined #ocaml
buttons840 has joined #ocaml
buttons840 has quit [Client Quit]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fre2 has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
Denommus has quit [Quit: going home]
ygrek_ has joined #ocaml
fre2 has quit [Ping timeout: 245 seconds]
fre2 has joined #ocaml
rpg has joined #ocaml
Anarchos has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
dmcampos has joined #ocaml
dmcampos has quit [Quit: Leaving]
dmcampos has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
dhil has quit [Ping timeout: 255 seconds]
ygrek_ has quit [Ping timeout: 258 seconds]
<okeuday_bak> the ~ character used as a prefix in ocaml, if you ignore operators, is always used for record fields and often field/label punning, right? or is there other use I am missing?
kakadu has joined #ocaml
<octachron> okeuday_bak, did you include labelled arguments in your list?
<_y> ~ for record fields?
<okeuday_bak> octachron: was using it for arguments to a function to create a record, using variables of the same name, just wondering about if other meaning is attached to ~
<octachron> okeuday_bak, creating record with fields of the same name is just one use of labelled arguments
<okeuday_bak> octachron: k, thanks, can read about that as labelled arguments
<_y> okeuday_bak, well in “let f ~x = stuff with x”, the ~x is simply a pattern that matches an argument labelled by the name “x”, and binds the result of the match to a local value that has name “x” too
<_y> so you can do whatever you want with x after that
<okeuday_bak> _y: so the argument name is enforced everywhere the function is called, right?
<_y> not only create records with a field that happens to be called “x” too, or whatever
<Drup> no, it's not enforced
<Drup> it's a tool to make the intent of arguments clearer/easier to use, not to enforce anything
<okeuday_bak> Drup: k, I see, thanks
<octachron> okeuday_bak, another point "let f ~x = x" is a simplified syntax for "let f ~x:x = x" but "let f ~x:y = y" is valid
ryanartecona has quit [Quit: ryanartecona]
<_y> (i assume you were confused by the syntax { x } to create a record with a field x, which is simply a shortcut for { x = any value } when “any value” happens to be a mere variable named “x” too)
_andre has quit [Quit: leaving]
ygrek_ has joined #ocaml
<_y> (just in the same way that “f ~x” is a shortcut for “f ~x:(any value)” when “any value” happens to be a variable named “x”)
dhil has joined #ocaml
<okeuday_bak> yeah, still getting use to the syntax, while using some docs, but this makes it clearer
<okeuday_bak> thanks
AlexDenisov has joined #ocaml
AlexDeni_ has joined #ocaml
ollehar has joined #ocaml
AlexDenisov has quit [Ping timeout: 255 seconds]
TheLemonMan has joined #ocaml
<Simn> If I have a module structure like http://paste2.org/dnFX2Wsx, is it possible to access `loop` from the `input_needed` function or do I have to pass it in as an argument?
<octachron> Simn, loop is not yet defined at this point
zpe has joined #ocaml
jnavila has joined #ocaml
ygrek has joined #ocaml
jeffmo has quit [Quit: jeffmo]
ygrek_ has quit [Ping timeout: 260 seconds]
sepp2k has quit [Quit: Leaving.]
AltGr has left #ocaml [#ocaml]
ciniglio has quit [Read error: Connection reset by peer]
sh0t has quit [Read error: Connection reset by peer]
sh0t has joined #ocaml
tane has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
slash^ has quit [Read error: Connection reset by peer]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
jeffmo has joined #ocaml
jeffmo has quit [Quit: jeffmo]
jeffmo has joined #ocaml
ollehar has quit [Quit: ollehar]
sh0t has joined #ocaml
ryanartecona has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
larhat has quit [Quit: Leaving.]
tane has quit [Quit: Leaving]
foo30303 has quit [Quit: leaving]
kakadu has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
octachron has quit [Quit: Leaving]
ryanartecona has quit [Quit: ryanartecona]
blackfry has joined #ocaml
blackfry has joined #ocaml
blackfry has quit [Changing host]
atsampson has quit [Ping timeout: 264 seconds]
jyc has joined #ocaml