<pippijn>
I'm rolling my eyes at everything I want to do
<pippijn>
the whole purpose of my program is to rename symbols
<pippijn>
and do a few AST transformations
reem has quit [Remote host closed the connection]
ghostpl_ has quit [Ping timeout: 264 seconds]
paradoja has quit [Ping timeout: 255 seconds]
AltGr has joined #ocaml
boogie has quit [Ping timeout: 256 seconds]
madroach has joined #ocaml
Ingram has quit [Quit: Leaving]
madroach has quit [Ping timeout: 264 seconds]
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
reem has joined #ocaml
ericwa has quit [Quit: Leaving...]
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
JuggleTux has quit [Quit: Lost terminal]
moei has quit [Quit: Leaving...]
moei has joined #ocaml
xinau has joined #ocaml
x1n4u has quit [Ping timeout: 245 seconds]
Denommus has quit [Quit: going home]
<bernardofpc>
well, man ocamlopt (that was building the offending gcc commandline) told me I had to install the .a as well because .cmxa are .cmx and and .a, but not exactly that
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 255 seconds]
darkf has joined #ocaml
reem has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
reem has joined #ocaml
claudiuc_ has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
<bernardofpc>
Drup: I've writtend a .mllib and build .cmx?a out of it, but toplevel refuses to load the modules Alim, Db, ... after I #require foolib
ghostpl_ has quit [Remote host closed the connection]
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
matason has joined #ocaml
reem has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
axiles has quit [Quit: Quitte]
badon_ is now known as badon
reem has quit [Remote host closed the connection]
matason has quit [Ping timeout: 245 seconds]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
matason has joined #ocaml
mort___ has joined #ocaml
ghostpl_ has joined #ocaml
reem has joined #ocaml
freling has quit [Quit: Leaving.]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
Haudegen has quit [Ping timeout: 252 seconds]
AltGr has left #ocaml [#ocaml]
reem has quit [Remote host closed the connection]
Haudegen has joined #ocaml
reem has joined #ocaml
freling has joined #ocaml
axiles has joined #ocaml
reem has quit [Remote host closed the connection]
johnelse is now known as johnel_away
reem has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
siddharthv is now known as siddharthv_away
thomasga has quit [Quit: Leaving.]
lordkryss has joined #ocaml
Submarine has quit [Ping timeout: 255 seconds]
reem has quit [Remote host closed the connection]
darnuria has quit [Quit: WeeChat 1.2-dev]
darnuria has joined #ocaml
dsheets has joined #ocaml
darnuria has quit [Remote host closed the connection]
darnuria has joined #ocaml
aubergines has joined #ocaml
darnuria has quit [Remote host closed the connection]
darnuria has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
freling has quit [Quit: Leaving.]
larhat has joined #ocaml
moei has quit [Read error: Connection reset by peer]
ghostpl_ has quit [Read error: Connection reset by peer]
moei has joined #ocaml
ghostpl_ has joined #ocaml
_andre has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
fedjo1 has joined #ocaml
fedjo1 has left #ocaml [#ocaml]
matason has quit [Ping timeout: 265 seconds]
<reynir>
Is Random suitable for crypto?
thomasga has joined #ocaml
<ggole>
No.
thomasga has quit [Ping timeout: 250 seconds]
<pippijn>
reynir: use libsodium
ygrek has quit [Ping timeout: 245 seconds]
matason has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
johnel_away is now known as johnelse
Bhavya has quit [Quit: Quit the channel]
Bhavya has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
ghostpl_ has quit [Ping timeout: 255 seconds]
alpen has quit [Ping timeout: 256 seconds]
<ia0>
can anyone point me to the meaning of the "parser" keyword in OCaml?
<ia0>
for instance what is presented in Genlex
<flux>
there is none. it was a keyword if a campl4 stream parser language extension. I don't think it's really used anymore, or has been used for a while.
<companion_cube>
it's a camlp4 extension for stream parsers
<ia0>
companion_cube: I am not allowed to tell (yet) :-)
<ia0>
thizanne: thanks, I'll look at that (but it's mostly curiosity)
Submarine has joined #ocaml
<companion_cube>
hmmm
Pepe_ has quit [Ping timeout: 246 seconds]
axiles has joined #ocaml
thomasga has joined #ocaml
Bhavya has quit [Quit: Quit the channel]
Submarine has quit [Quit: Leaving]
reem has joined #ocaml
Algebr has joined #ocaml
reem has quit [Ping timeout: 244 seconds]
Remyzorg has quit [Quit: WeeChat 1.0.1]
Remyzorg has joined #ocaml
ghostpl_ has joined #ocaml
badkins has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
Submarine has joined #ocaml
Submarine has joined #ocaml
ghostpl__ has joined #ocaml
ghostpl__ has quit [Remote host closed the connection]
shinnya has joined #ocaml
<xificurC>
I get e.g. 5 things in sequence and I have a record type I want to create from that data. How would one do it? The imperative world would create an instance of the class and mutably change the fields one by one
ghostpl_ has joined #ocaml
<xificurC>
also, is there a way to query a record type's number of fields?
thomasga has quit [Quit: Leaving.]
<companion_cube>
what do you mean "in sequence"? are you deserializing?
ghostpl_ has quit [Read error: Connection reset by peer]
<companion_cube>
no you can't query the number of fields of a record, that would be reflection
<Drup>
ia0: if it's not for an assignement, I suggest using something else.
<ggole>
xificurC: you want to create a record type from runtime data?
ghostpl__ has joined #ocaml
<xificurC>
ggole: from data being given through stdin
<xificurC>
ggole: so yes
<ggole>
You can't do that
<ggole>
Records are static things
<xificurC>
ggole: I know what am I going to get, I can pre-define the record type
<companion_cube>
xificurC: are the field in the right order already?
<companion_cube>
let a = read_a() in let b=read_b() in let c = read_c() in {a;b;c} ?
<Drup>
let a, b, c = read () , read (), read () in { a ; b ; c }
<ggole>
Oh, I see: you probably want something like scanf "%d %d %d" (fun a b c -> { x = a; y = b; z = c })
<Drup>
?
<Drup>
ahah
<companion_cube>
:p
<xificurC>
I'll get let's day 5 lines of input, not sure of the order
<xificurC>
s/day/say/
<companion_cube>
if the order is not known, it's more complicated an annoying
<ggole>
You can have 5 refs and inject to the record at the end
<xificurC>
I'd expect the settings to come in that order but noone seems to be promising that
<xificurC>
so I don't want to make the assumption
<xificurC>
the more I'm looking into it the worse the reference seems to be
Algebr has quit [Remote host closed the connection]
<flux>
for example if you collect key-value pairs into a (say) hashmap, you can then just collect them at the end: let k key = Hashtbl.find values key in { a = k "a"; b = k "b" } .. - using exceptions for error handling
<companion_cube>
that probably won't typecheck
<companion_cube>
if the record fields have distinct types
<flux>
well, you can fix the types if they are not strings
<flux>
int_of_string (k "a") etc
<companion_cube>
oh
<flux>
or if they are all integers, just stick the conversion inside 'k'
<ggole>
Blurg
<xificurC>
yeah, my best idea was to collect the data into a hashtable or alist and build from that
<flux>
or if they may be missing, you could have a variant of 'k' that takes a default value for missing values
<xificurC>
quite verbose though
<companion_cube>
I'd go with option references
<xificurC>
the input is guaranteed so no need to do checks/defatuls/exceptinos
<companion_cube>
if you use a stdlib extension, it probably defines applicative combinators for Option
<mrvn>
xificurC: Make a record of all settings, make them mutable and initialize with defaults.
<flux>
defaults :(
<flux>
aren't those options going to be the most verbose of them all?-o
<companion_cube>
let mk_record a b c d e = {a;b;c;d;e} in (* parse into opt_a, ..., opt_e *); pure mk_record <*> opt_a <*> ... <*> opt_e
<Drup>
xificurC: btw, why do you need that ?
<flux>
need what? a record?
<xificurC>
Drup: idk, seemed natural to build a record for the settings
<Drup>
xificurC: is it for command line entry ?
<xificurC>
holding it in a hash table is so not cool and functional :)
<mrvn>
xificurC: only if you have sensible defaults and a known number of settings
<Drup>
xificurC: the link you gave say nothing about settings
<flux>
drup, well, search for "By example"?
Algebr has joined #ocaml
<mrvn>
xificurC: have you compiled the test server from github?
<xificurC>
mrvn: the test server is not up, the poker server is for omaha, not hold'em
<flux>
in any case, a record is going to be nice if you need to pass them around to different functions..
<mrvn>
xificurC: oh, bummer
<Drup>
ooh, right.
<flux>
obviously hash tables, maps or association lists are not going to be as nice.
<xificurC>
mrvn: well I'll be damned, the readme says it is for other versions as well
<flux>
though even they are possibly slightly nicer than having 5 separate variables or a 5-tuple :)
<Drup>
xificurC: records with default, definitively
<Drup>
and you pass it by argument along, I would say
<mrvn>
or global and mutable
<mrvn>
not as nice but easier for beginners
<companion_cube>
global ←— noes :/
<Drup>
it's sometimes the right solution.
<companion_cube>
actually, maybe for parsing it's a good idea to duplicate the record type with mutable fields
<mrvn>
Anyone know how many hands of texas hold em there are?
tel has joined #ocaml
<ggole>
Having a foo_builder to represent state-in-progress and injecting to a complete (often immutable) foo at the end is a pretty common pattern
<mrvn>
but is the state immutable?
<mrvn>
What if the server sends a settings command mid game?
mearnsh has quit [Ping timeout: 272 seconds]
<mrvn>
e.g. every 10 rounds the small and big bid is raised.
<ggole>
Then you have a new settings record
<mrvn>
then you can do that during parsing too
<xificurC>
small and big blind are not part of this record, the site says these are sent in the beginning of the game and won't change
<ggole>
No you can't
<ggole>
change = you have a complete foo, you want a foo with a different part
mearnsh has joined #ocaml
<ggole>
build = you don't have a complete foo, you want to add bits until you have a complete one
<mrvn>
ggole: assuming you have defaults
<ggole>
You don't need defaults with a builder
<ggole>
That's the *whole point* of doing things that way
<mrvn>
no. but it's so much simpler if you do
<ggole>
Eh, not really
ghostpl__ has quit [Remote host closed the connection]
<xificurC>
I see I started a fiery discussion
ghostpl_ has joined #ocaml
JuggleTux has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ygrek has joined #ocaml
<mrvn>
xificurC: nah, that's barely smoking.
<reynir>
it's interesting to see smoke in this channel :)
tel has quit [Ping timeout: 245 seconds]
<Drup>
smoke signals over IRC.
<flux>
you can simply have a mutable record with default values such as Obj.magic 0 in the beginning, and then cast that mutable record into immutable one with Obj.magic at the end.
<Drup>
flux: NO
<Drup>
è_é
<flux>
:-)
<companion_cube>
flux: bad
<companion_cube>
the GC will not like you
<mrvn>
flux: that's rather dangerous in case one field doesn't get set
<Drup>
1) because BAD
<xificurC>
the readme says the bot is for several types of poker but the commandline doesn't allow for them. After 10 minutes of digging I found it in one of the classes
<companion_cube>
people will frown at you
<Drup>
2) it
<mrvn>
companion_cube: the GC will totaly like you
<Drup>
2) it *will* break with inlining.
nullcat_ has joined #ocaml
ghostpl_ has joined #ocaml
* Drup
slaps flux with a large segfault.
<ggole>
What's the fancy type way of doing that "properly"? Typestate?
<Drup>
ggole: I think that's what it was called, yes
<Drup>
the other is private field
<mrvn>
How do you make a builder function for a record when the fileds have different types? Keep a hashtable/map for every tpye? Use type t = Int of int | ...?
Submarine has quit [Remote host closed the connection]
<Drup>
ousado: alternatively, lwt is rather readable
<Drup>
you start by the Lwt module
<Drup>
but the paper would provide a good entry point, I guess
<ousado>
yes, I found quite nice docs of the rewrites in the .mli files
<ousado>
but it's always good to know about the motivations to implement things in a certain way
<Drup>
(and the syntax extension is certainly not what you are looking for :p)
freling has quit [Client Quit]
<companion_cube>
Guest5237: for additional points, use a pretty-printing library (either Format from stdlib, or Pprint, I guess)
<Algebr>
core shuffles and reorganizes the Unix module, which is nice but now I can't find something simple like getenv.
dangling-pyon is now known as null-pyon
<Guest5237>
companion_cube: thanks, I didn't know those existed for ocaml, I'll check them out
WraithM has joined #ocaml
<reynir>
what was the C resume about? I saw it but I don't think I got it
<adrien_znc>
a resume written in C
<adrien_znc>
struct job { ... };
<reynir>
Yes
<Drup>
Guest5237: you should clearly move to printf and remove the ";;" ;)
ptc has joined #ocaml
ptc is now known as Guest30453
thomasga has joined #ocaml
thomasga has quit [Client Quit]
<reynir>
Invent resume a DSL! ;)
<Guest5237>
Drup: very true that would look better
Guest5237 has quit [Ping timeout: 246 seconds]
thomasga has joined #ocaml
leowzukw has joined #ocaml
leowzukw has quit [Client Quit]
Pepe_ has joined #ocaml
boogie has joined #ocaml
something has joined #ocaml
badkins has quit []
Guest30453 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
something has quit [Ping timeout: 246 seconds]
Nayshins has quit [Ping timeout: 246 seconds]
badkins has joined #ocaml
ollehar1 has joined #ocaml
cateches has joined #ocaml
<cateches>
if I spawn a concurrent child process with Unix.open_process_full, is there an easy way to know when the process is done and I can read everything from it's stdout?
sepp2k has joined #ocaml
axiles has quit [Ping timeout: 250 seconds]
<ggole>
cateches: usually you just read until the end of the file
<ggole>
Hmm, lemme have a look at the docs for open_process_full
<ggole>
What does acorn do? Does it try to read from stdin?
<ggole>
You might need to close that.
<cateches>
acorn takes a filename as a single arg and dumps json to stdout after parsing it
<ggole>
What does it do with stdin?
<cateches>
nothing that I know of
<ggole>
Hmm
<ggole>
Try closing it.
<cateches>
okay
<ggole>
Although now I think about it, blocking on a read of stdin wouldn't result in empty output.
<adrien_znc>
EINTR
<adrien_znc>
you cannot expect to be able to read everything from its stdout at once
<adrien_znc>
because if it tries to write more than the buffer size for the pipe, the child will block
<adrien_znc>
and you will deadlock
<adrien_znc>
you probably want to read in a loop
<cateches>
okay, use really_input_string?
<adrien_znc>
not with Unix
<adrien_znc>
val really_input : in_channel -> string -> int -> int -> unit
<ggole>
(Isn't that what Yojson.Basic.from_channel should do?)
<cateches>
okay
<adrien_znc>
actually sorry
<adrien_znc>
I'm wrong: you can if you use open_process_in
<ggole>
But yeah, slurping a few reads from the acorn process to see what you get is a good idea
<adrien_znc>
what you cannot do is mix in/out_channel and Unix.file_descr
<cateches>
ha, that works!
<cateches>
but that also assumes that there's no error
Algebr has quit [Ping timeout: 246 seconds]
<adrien_znc>
look at Unix.Unix_error (exception), Unix.handle_unix_error
<adrien_znc>
you can to re-try if the error is Unix.EINTR
<cateches>
okay, sool
<adrien_znc>
abort otherwise
<cateches>
k
<cateches>
so, because it's JSON data, partial data isn't useful -- can I close_process_in and wait for the process to end, then read, or will that kill the channel
<cateches>
it's been a while since i've dealt with unix channels
<cateches>
my guess is "no" and that it's a dumb question :)
<adrien_znc>
that will probably EPIPE on the side that tries to write more data to the pipe
<adrien_znc>
also
<adrien_znc>
val add_channel : t -> Pervasives.in_channel -> int -> unit
<adrien_znc>
can be handy
* adrien_znc
spanks companion_cube
<companion_cube>
hey
mort___ has quit [Ping timeout: 265 seconds]
<adrien_znc>
companion_cube: you're supposed to complain about that function!
<cateches>
adrien_znc: from Buffer, right?
<companion_cube>
oh, this one
<companion_cube>
didn't see the context
rand000 has joined #ocaml
<companion_cube>
yes, it's bad
ZenosDance has quit [Ping timeout: 256 seconds]
<adrien_znc>
oh, right, sorry, didn't mention it was from Buffer
<cateches>
okay: thanks
<cateches>
I think this gives me a good start
rwmjones has quit [Read error: Connection reset by peer]
rwmjones has joined #ocaml
ptc has joined #ocaml
ptc is now known as Guest13965
ghostpl_ has quit [Remote host closed the connection]
freling has joined #ocaml
<companion_cube>
cateches: this function is only useful if you're sure the in_channel contains at least n chars
ghostpl_ has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
MrScout has joined #ocaml
Denommus has joined #ocaml
ollehar1 has quit [Ping timeout: 245 seconds]
matason has quit [Ping timeout: 255 seconds]
WraithM has quit [Quit: leaving]
uris77 has quit [Quit: leaving]
kakadu has quit [Quit: Page closed]
zpe_ has quit [Remote host closed the connection]
Denommus has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
ZenosDance has joined #ocaml
lnich has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 246 seconds]
Denommus has joined #ocaml
lnich has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
paradoja has joined #ocaml
ggole has quit []
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
<hcarty>
whitequark: What is the proper sequence of steps to use ppx_import in foo.ml for a type defined in foo.mli? I've tried several variations on this: https://gist.github.com/hcarty/0464098413faec3c354e
govg has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Remote host closed the connection]
Algebr has joined #ocaml
boogie has quit [Remote host closed the connection]
avsm has joined #ocaml
larhat has quit [Quit: Leaving.]
slash^ has quit [Read error: Connection reset by peer]
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 252 seconds]
Denommus` is now known as Denommus
axiles has joined #ocaml
thomasga has quit [Ping timeout: 265 seconds]
boogie has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
uris77 has joined #ocaml
zpe has joined #ocaml
kakadu has joined #ocaml
null-pyon is now known as idem-pyon-tent
c74d has quit [Remote host closed the connection]
thomasga has joined #ocaml
c74d has joined #ocaml
avsm has quit [Quit: Leaving.]
martintrojer has quit [Read error: Connection reset by peer]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
martintrojer has joined #ocaml
dsheets has joined #ocaml
zpe has quit [Remote host closed the connection]
c74d has quit [Remote host closed the connection]
Guest13965 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mawuli has quit [Ping timeout: 265 seconds]
bitbckt has quit [Ping timeout: 265 seconds]
bitbckt has joined #ocaml
freling has quit [Quit: Leaving.]
matason has joined #ocaml
c74d has joined #ocaml
mawuli has joined #ocaml
matason has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
ptc has joined #ocaml
ptc is now known as Guest56062
TheLemonMan has joined #ocaml
MrScout_ has joined #ocaml
mawuli has quit [Ping timeout: 256 seconds]
mawuli_ has joined #ocaml
mawuli_ is now known as mawuli
c74d is now known as Guest78696
Guest78696 has quit [Read error: Connection reset by peer]
MrScout has quit [Ping timeout: 256 seconds]
bitbckt has quit [Ping timeout: 265 seconds]
bitbckt has joined #ocaml
Tekilla has joined #ocaml
Tekila_ has joined #ocaml
Tekilla has quit [Read error: Connection reset by peer]
c74d3 has joined #ocaml
claudiuc has joined #ocaml
c74d3 has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
cateches has quit [Quit: Page closed]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
reem has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
reem has quit [Remote host closed the connection]
boogie has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
Guest56062 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reem has joined #ocaml
_andre has quit [Quit: leaving]
ptc_ has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
ptc_ has quit [Client Quit]
fraggle-boate__ has quit [Ping timeout: 256 seconds]
ZenosDance has quit [Ping timeout: 256 seconds]
Anarchos has joined #ocaml
Haudegen has joined #ocaml
matason has joined #ocaml
boogie has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
boogie has quit [Read error: Connection reset by peer]
patojo has joined #ocaml
Denommus` has joined #ocaml
small-wolf has joined #ocaml
Denommus has quit [Ping timeout: 255 seconds]
Denommus` is now known as Denommus
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
avsm has joined #ocaml
sdothum has joined #ocaml
matason has quit [Ping timeout: 264 seconds]
ptc has joined #ocaml
ptc is now known as Guest52164
Guest52164 has quit [Client Quit]
codefo has joined #ocaml
matason has joined #ocaml
lordkryss has joined #ocaml
ptc_ has joined #ocaml
Tekila_ has quit [Quit: Quitte]
Tekilla has joined #ocaml
reem has quit [Remote host closed the connection]
martintrojer has quit [Max SendQ exceeded]
Hannibal_Smith has joined #ocaml
martintrojer has joined #ocaml
* Anarchos
using (for i in `ls lib/*.mli`; do make lib/`basename $i .mli`.cmi; done)
reem has joined #ocaml
reem has quit [Remote host closed the connection]
MrScout_ has quit [Ping timeout: 246 seconds]
matason has quit [Ping timeout: 256 seconds]
martintrojer has quit [Max SendQ exceeded]
dbp has joined #ocaml
martintrojer has joined #ocaml
aubergines has quit [Remote host closed the connection]
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
freling has joined #ocaml
matason has joined #ocaml
uris77 has quit [Quit: leaving]
jwatzman|work has quit [Quit: jwatzman|work]
nullcat has joined #ocaml
badkins has quit []
carjack has joined #ocaml
carjack is now known as Guest93297
nullcat has quit [Max SendQ exceeded]
nullcat has joined #ocaml
small-wolf has quit [Read error: Connection reset by peer]
matason has quit [Ping timeout: 272 seconds]
zpe has quit [Remote host closed the connection]
nullcat has quit [Read error: Connection reset by peer]
Guest93297 has quit [Ping timeout: 246 seconds]
nullcat_ has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
Haudegen has joined #ocaml
ptc_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Konversation terminated!]
ptc has joined #ocaml
nullcat_ has quit [Read error: Connection reset by peer]
ptc is now known as Guest65126
kakadu has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: leaving]
mort___ has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
Guest65126 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
keen____ has joined #ocaml
reem has quit [Remote host closed the connection]
keen___ has quit [Ping timeout: 264 seconds]
reem has joined #ocaml
reem_ has joined #ocaml
reem has quit [Ping timeout: 256 seconds]
freling has quit [Quit: Leaving.]
ptc_ has joined #ocaml
ptc_ has quit [Client Quit]
paradoja has quit [Ping timeout: 252 seconds]
Anarchos has quit [Quit: o vont da kousk emaon. Ken ar c'hoaz !]
yminsky has joined #ocaml
myyst has joined #ocaml
zpe has joined #ocaml
<MasseR>
What is the difference between:
<MasseR>
1. let tree = parse_member i in tree :: pull i depth
<MasseR>
2. (parse_member i) :: pull i depth
<Drup>
nothing
myst has quit [Ping timeout: 265 seconds]
<MasseR>
I would think so as well. However the first version gave me a bus error
<MasseR>
And infinite loop
<MasseR>
Err, the second version I meant
<Drup>
hum, let met check the order of evaluation
testcocoon has quit [Ping timeout: 246 seconds]
<Drup>
ok, yeah
<Drup>
they evaluate in different orders
<MasseR>
Any (easily understandable) documentation?
testcocoon has joined #ocaml
<Drup>
functions arguments (and constructor arguments) are evaluated from left to right :)
<Drup>
but you should not rely on it. In case of doubt, create intermediate variables.
zpe has quit [Ping timeout: 256 seconds]
<MasseR>
Even then, I can't see how they would behave differently
<MasseR>
If (::) is a constructor, I would assume that in this case the arguments would be parse_member i and pull i depth in that order
<Drup>
from right to left*
<MasseR>
:D
<Drup>
yes
<Drup>
I told you you shouldn't rely on it anyway, you just did :D
<MasseR>
Yeah, thanks :)
freling has joined #ocaml
freling has quit [Client Quit]
claudiuc has quit [Ping timeout: 256 seconds]
thomasga has quit [Quit: Leaving.]
<Tekilla>
Someone has 5 minutes to help me on a mistake?
<Drup>
stop asking to ask x)
avsm has quit [Quit: Leaving.]
<nicoo>
Tekilla: Just ask, don't ask aout asking
<Tekilla>
let rec depHaut = function (d) ->
<Tekilla>
set_color(colD);
<Tekilla>
if d.cooY > size_y()-20 then fill_rect d.cooX d.cooY d.largeur d.hauteur
<Tekilla>
this function draw a rectangle, i need to update the value of d, but "this expression should have type unit." and i don't know how to update the value and keep the type unit...
<nicoo>
Tekilla: See #ocaml-fr
mort___ has quit [Quit: Leaving.]
MrScout has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
nullcat has joined #ocaml
reem_ has quit [Remote host closed the connection]