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
blackfry has quit [Ping timeout: 240 seconds]
k1000 has quit [Ping timeout: 240 seconds]
blackfry has joined #ocaml
k1000 has joined #ocaml
okuu has quit [Quit: Unyu~? Fix config.]
brunoro_ has joined #ocaml
silver has quit [Read error: Connection reset by peer]
okuu has joined #ocaml
brunoro_ has quit [Ping timeout: 256 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
ontologiae has quit [Ping timeout: 260 seconds]
yomimono has quit [Ping timeout: 248 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
orbifx has quit [Ping timeout: 248 seconds]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brunoro_ has quit [Ping timeout: 268 seconds]
jlongster has joined #ocaml
agarwal1975 has joined #ocaml
Armael has quit [Ping timeout: 260 seconds]
fre has quit [Quit: WeeChat 1.4]
brunoro_ has joined #ocaml
Armael has joined #ocaml
alpen has quit [Quit: ZNC - http://znc.in]
ontologiae has joined #ocaml
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cpdean_ has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 246 seconds]
brunoro_ has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
brunoro_ has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
cpdean_ has quit [Ping timeout: 258 seconds]
ousado has quit [Remote host closed the connection]
malc_ has joined #ocaml
mfp has quit [Ping timeout: 248 seconds]
brunoro_ has joined #ocaml
cpdean_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
cpdean_ has quit [Ping timeout: 256 seconds]
TarVanimelde has joined #ocaml
brunoro_ has quit [Ping timeout: 245 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
FreeBirdLjj has joined #ocaml
brunoro_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
brunoro_ has quit [Ping timeout: 240 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 245 seconds]
hhx has joined #ocaml
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 248 seconds]
lucasem has joined #ocaml
brunoro_ has joined #ocaml
<lucasem> Could someone help with my problem making a Comparable module? http://pastebin.com/fsCungkt
<lucasem> There's a syntax error on the like that starts with "type"
<lucasem> line*
lopex has quit [Quit: Connection closed for inactivity]
brunoro_ has quit [Ping timeout: 256 seconds]
malc_ has quit [Ping timeout: 248 seconds]
<copy`> lucasem: Try `type t = int*float [@@deriving sexp]`
<copy`> The `with …` syntax is outdated
<lucasem> copy`: that worked, thanks!
<lucasem> out of curiosity.. how outdated is it?
hhx has left #ocaml ["WeeChat 1.6"]
<copy`> Just recently, I think you can still enable it even in newer versions
<copy`> It has been replaced by ppx (which is the syntax with the @), so whenever you're looking for packages for custom syntax, look for ones with ppx in the name
brunoro_ has joined #ocaml
<lucasem> good to know!
<lucasem> also, unrelated:
<lucasem> is there a better ocaml interpreter/REPL?
brunoro_ has quit [Ping timeout: 252 seconds]
<copy`> Yes, utop
<lucasem> the_real_MVP = copy` (* thanks! *)
FreeBirdLjj has joined #ocaml
jsgrant has quit [Quit: Konversation terminated!]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
jsgrant has joined #ocaml
lopex has joined #ocaml
jsgrant has quit [Client Quit]
jsgrant has joined #ocaml
TarVanimelde has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
jsgrant has quit [Quit: Konversation terminated!]
madroach has joined #ocaml
jsgrant has joined #ocaml
brunoro_ has joined #ocaml
malc_ has joined #ocaml
cpdean_ has joined #ocaml
sh0t has quit [Remote host closed the connection]
jsgrant has quit [Quit: Konversation terminated!]
jsgrant has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
larhat has quit [Quit: Leaving.]
cpdean_ has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
brunoro_ has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 256 seconds]
douglascorrea has quit []
Tktx has joined #ocaml
Tktx has quit [Ping timeout: 260 seconds]
average is now known as oldaverage
Yas has joined #ocaml
MercurialAlchemi has joined #ocaml
oldaverage has quit [Quit: leaving]
brunoro_ has joined #ocaml
malc_ has quit [Remote host closed the connection]
okuu has quit [Quit: Unyu~? brb]
okuu has joined #ocaml
hunteriam has joined #ocaml
noddy has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
jyc has quit [Ping timeout: 245 seconds]
jyc has joined #ocaml
malc_ has joined #ocaml
noddy has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
brunoro_ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 245 seconds]
brunoro_ has joined #ocaml
<adrien> if anyone has some powers on the github organization, please keep a look on #924 to make sure it keeps civil and that the conversation does not permanently changes topic
<adrien> thanks
jsgrant has quit [Ping timeout: 265 seconds]
brunoro_ has quit [Ping timeout: 250 seconds]
jsgrant has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
brunoro_ has joined #ocaml
plqa has joined #ocaml
brunoro_ has quit [Ping timeout: 258 seconds]
brunoro_ has joined #ocaml
freusque has joined #ocaml
brunoro_ has quit [Ping timeout: 244 seconds]
alfredo_ has joined #ocaml
ontologiae has joined #ocaml
zshipko[m] has joined #ocaml
brunoro_ has joined #ocaml
Yas has quit [Ping timeout: 265 seconds]
jnavila has joined #ocaml
underscore has joined #ocaml
brunoro_ has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
lucasem has quit [Quit: Connection closed for inactivity]
nickapos has quit [Remote host closed the connection]
freehck has joined #ocaml
AlexDenisov has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
zshipko[m] has left #ocaml ["User left"]
brunoro_ has joined #ocaml
sfri has quit [Remote host closed the connection]
sfri has joined #ocaml
freusque has quit [Ping timeout: 260 seconds]
Hakey_ has quit [Ping timeout: 250 seconds]
larhat has joined #ocaml
soupault has joined #ocaml
brunoro_ has quit [Ping timeout: 268 seconds]
brunoro_ has joined #ocaml
zpe has joined #ocaml
brunoro_ has quit [Ping timeout: 258 seconds]
Algebr` has joined #ocaml
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
alfredo_ has quit [Ping timeout: 252 seconds]
TarVanimelde has quit [Read error: Connection reset by peer]
brunoro_ has joined #ocaml
TarVanimelde has joined #ocaml
AltGr has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
pierpa has joined #ocaml
<Leonidas> Khady: I didn't know you were in singapore as well :)
pierpa has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 252 seconds]
<Leonidas> I'll probably be in SG beginning/mid-December
pierpa has joined #ocaml
hunteriam has quit [Quit: Connection closed for inactivity]
<Khady> Leonidas: I moved recently. Beginning of september
jbrown has quit [Ping timeout: 246 seconds]
<Leonidas> was also considering it ^^
rwmjones has quit [Ping timeout: 252 seconds]
rwmjones has joined #ocaml
cpdean_ has joined #ocaml
cpdean_ has quit [Ping timeout: 250 seconds]
mfp has joined #ocaml
jbrown has joined #ocaml
Armael has quit [Ping timeout: 252 seconds]
arj has joined #ocaml
brunoro_ has joined #ocaml
zpe has quit [Remote host closed the connection]
arj is now known as yezariaely
Armael has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
frefity has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
brunoro_ has joined #ocaml
jwatzman|work has joined #ocaml
zaquest has joined #ocaml
brunoro_ has quit [Ping timeout: 244 seconds]
freusque has joined #ocaml
fre has joined #ocaml
frefity has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jwatzman|work has joined #ocaml
cpdean_ has joined #ocaml
freusque has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
fluter has quit [Ping timeout: 245 seconds]
fluter has joined #ocaml
okuu has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
hellofun` has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
hellofunk has quit [Ping timeout: 240 seconds]
TarVanimelde has joined #ocaml
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 240 seconds]
yezariaely has quit [Quit: Leaving.]
fluter has quit [Ping timeout: 256 seconds]
orbifx-m has joined #ocaml
arj has joined #ocaml
<orbifx-m> What is the resolution of Lwt_unix.timeout?
<orbifx-m> It takes a float, but what is it's practical resolution?
<Enjolras> on unix it uses gettimeofday
<haesbaert> probably time + microseconds
<haesbaert> *seconds + microseconds
<orbifx-m> Thanks
<Enjolras> yep.
brunoro_ has joined #ocaml
<Enjolras> you would have to use clock_gettime to get nanoseconds
<Enjolras> but i'm not sure if/where there is binding available
<orbifx-m> Milliseconds is what I need, so it whould work
<orbifx-m> If you are write about it being down to microseconds
<Enjolras> though actually epoll does not support nanoseconds timeout
<Enjolras> i'm not sure what is the min timeout of select/poll/epoll so it probably depends on you lwt engine selection
<Enjolras> and on kernel internals
<Enjolras> i'm sorry forget about gettimeofday and cloc_gettime i misread :)
underscore has quit [Ping timeout: 260 seconds]
brunoro_ has quit [Ping timeout: 250 seconds]
<orbifx-m> So what is the resolution? Microseconds atleast?
<haesbaert> select/poll gets a timeval which is the same as gettimeofday which is what is returned in the float
<Enjolras> apparently epoll is 1ms res
<adrien> ?
<haesbaert> you do realize that the resolution of the syscall may have nothing to do with the actual resolution
<adrien> ah, in its timeout
<Enjolras> there is timerfd for igher resolution but i'm not sure lwt can use that
<flux> hmm, if you can use timerfd from ocaml I would think you can use it from lwt as well, though it won't integrate with its timeout system
<Enjolras> haesbaert: i know. But 1ms is what googl says
<Enjolras> kernel is able to support microkernel timeouts, so timeout is mostly an api limitation
<haesbaert> The timeout argument specifies the number of milliseconds that epoll_wait() will block. The call will block until either:
<flux> well it's able to accept microsecond timeouts, but if it actually supports them is another matter :)
<haesbaert> you mean microseconds ?
<Enjolras> duh. yes
<haesbaert> not really, openbsd/netbsd wont for instance
<haesbaert> they tick ever 10ms
<Enjolras> well it depends on the kernel options
<Enjolras> i know but linux can.
<Enjolras> (when build with proper options)
<haesbaert> im not sure how timeouts are handled in linux, if you TSC timeouts than you get below ms resolution
<haesbaert> but if you need that high resolution in userland, I'd say you're already doomed
<haesbaert> arghh, by below, I meant, better than
<Enjolras> if you build the kernel with timer tick at 100Hz you are almost doomed. But with nohz and various realtime options you can
<Enjolras> iirc on freebsd you can too
_andre has joined #ocaml
<flux> linux can nowadays do variable-length kernel tick
<haesbaert> I thought linux was tickless nowadays
<flux> right, that's what I meant :)
<flux> good for power saving, perhaps good for more precise timing as well?
arj has quit [Quit: Leaving.]
<Enjolras> you can still build it with tick :)
<haesbaert> saves some cpu as well
<flux> I'm not sure if tickless is even the "default" or suggested
<Enjolras> you can build it with 10ms timer tick, 1ms tmer tick, and tickless
<Enjolras> i've no idea. I guess it depends on distributions
<haesbaert> an idle vm tickling at 100hz on my mac gets around 10% cpu time
brunoro_ has joined #ocaml
<flux> well that has gotta be due to sume vm-succiness, it doesn't take 10% from a real machine :)
<haesbaert> I've implemented tickeless timeout on openbsd sometime ago, but needed more work
<haesbaert> flux: well, HZ=1000 affected my crypto performance
<haesbaert> lost about 8% on a 3.4 machine
<adrien> the kernel can wake you up fairly often
<Enjolras> I'm not certain it is because of the interuptions only or if it is because it changes scheduler behavior
<adrien> whether it does or not is also a scheduling policy...
<Enjolras> timer interrupt are quite low cost. Context switch is not
brunoro_ has quit [Ping timeout: 258 seconds]
<Enjolras> i think you should not loose more than 100us/s by switching from 100hz to 1000hz
Algebr` has quit [Ping timeout: 248 seconds]
silver has joined #ocaml
dhil has joined #ocaml
<Enjolras> it does not trash cache, it does not trash tlb, it only has to save general registers and enter ring0
brunoro_ has joined #ocaml
<haesbaert> this was a kernel thread, with the cpu removed from the scheduler
<haesbaert> no it was basically "just" the interrupts
<Enjolras> this surprise me
<haesbaert> and I never slept or yielded, I had a mwait idle loop
<Enjolras> especially since it is a kernel thread and it does not even have to switch rings. It's basically a function call
<haesbaert> sure but the hardclock tick does a bunch of crap
<Enjolras> not sure how interrupts are handled on opensbd
brunoro_ has quit [Ping timeout: 256 seconds]
<Enjolras> (on same stack or in another kernel thread)
<haesbaert> same stack
<haesbaert> you can't tick the hardclock in thread context, cause then you don't know who you interrupted, and can't do proper accounting and so on
<haesbaert> I was surprised too, I expected no difference at all
<Enjolras> i'm actually biased i think by the design of dragonflybsd
<haesbaert> dragonfly still ticks hardclock as a normal interrupt
<haesbaert> and they use 10khz IRC
<haesbaert> I mean the lapic kicks at 10khz, but hardclock at 100
<Enjolras> where interruption is really low cost because it is basically a function call queuing a message to a message queue (potentially sending an ipmi)
<Enjolras> yes, that's right. At least it was a year ago
<haesbaert> I think you're mistaken, an interrupt in dragonfly forces preemption
<haesbaert> so you have a full context switch for say, a network interrupt
<Enjolras> yes and no.
<haesbaert> and the way it does is by seting a bit on the current cpu, and when the interrupted code resumes, it switches
<Enjolras> It depends on the priority of the thread receiving the interrupt
<Enjolras> if it is higher prio, it forces a context switch
<haesbaert> well dragonfly only has 2 priorities, interrupt or not, for preemption decision
<haesbaert> so ithreads dont preempt ithreads
<Enjolras> hmm no. It has 12 priorities iirc
<haesbaert> but ithreads preempt everything else
<haesbaert> it might have changed, I'm positive it was 2 on 2013
<haesbaert> I think you might be thinking about the userland scheduler, there you have a bunch of priorities
<Enjolras> hmm i think you are actually right.
<Enjolras> no i'm thinking of the kernel scheduler which have 12 priorities (the userland has more)
<Enjolras> but i think you are right that an interrupts triggers a context switch to an ithread which sends a message to the related kernel thread
<haesbaert> I only know this cause I implemented similar stuff at work and studied dragonfly at thetime
<Enjolras> the message is not sent from the current context
<Enjolras> my knowledge is a bit rusty
<haesbaert> it's not really a message, it's just a bit on "current thread"
<haesbaert> since the ithread is pinned to the cpu it got the interrupt
<Enjolras> most of the interrupts triggers an lwkt messages and are not handled directly
<haesbaert> no, they're not handled directed, but they do not trigger a message
<haesbaert> they do need_lwkt_resched()
<haesbaert> #defineneed_lwkt_resched()\
<haesbaert> atomic_set_int(&mycpu->gd_reqflags, RQF_AST_LWKT_RESCHED)
<haesbaert> they don't have to go through the ipiq stuff for that
<Enjolras> yes. And then the ithread process the interrupt and dispatch to another threa
<Enjolras> and goes back to the prempted thread unless the destination of the message has higher priority
<Enjolras> for instance this is what network interrupt do
<haesbaert> the deferring after the ithread is up to the driver
<Enjolras> right. But this is a goal to implement it like this
<Enjolras> the disk layer does that and the network stack too
<haesbaert> I thought they were doing full dispatch from the network ithread
<Enjolras> for drivers inherited from freebsd it depends
<Enjolras> dispatch to the related network thread
<haesbaert> you're right, it does ether_dispatch
ocaml534 has joined #ocaml
<Enjolras> and what happens next depends on the priority of the interrupted thread
<Enjolras> if it has lower priority than the destionation of the interrupt (like the network thread) it does a context switch to the network thread
<Enjolras> else it switches back to the interrupted thread
<haesbaert> agreed
<ocaml534> Have a question about acc in fold.
<Enjolras> but you're right it still does at least a context switch. Mis remembered that :)
<Enjolras> well two if you count swicth and back
<Enjolras> ocaml534: go ahead
<haesbaert> they need too, otherwise they can't block on interrupts
<haesbaert> *to
<Enjolras> you cannot block on interrupts anyway.
<Enjolras> it's handled inside a critical_section iirc
<Enjolras> you cannot block an ithread
<haesbaert> of course you can, you can take a token on it
<Enjolras> you can busy wait with spinlock that's all
<Enjolras> no. I think it would be a bug
<Enjolras> or considered as a bug
<ocaml534> | x::xs -> List.fold_left ( fun acc nxt ->"Store nxt in acc")(Some x)
<Enjolras> it would add high interrupt latency if you do that
<ocaml534> Does this mean I start with x in acc ? How do i store nxt in acc for the next comparison ?
<Enjolras> because the next interruptions on the same cpy would stall until the token is released
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<haesbaert> Enjolras: that's the whole point of having interrupt threads
Algebr` has joined #ocaml
arj has joined #ocaml
<Enjolras> ocaml534: you start with Some x in acc yes.
<ocaml534> It is for comparing the current and next value when folding.
<Enjolras> the next value of acc is the one returned by the function
<ocaml534> Right. So I want to put a value into acc. acc = Some v
zpe has quit [Remote host closed the connection]
<ocaml534> acc = Some v isn't accepted. or ==
<ocaml534> acc = Some nxt
danieli has quit [Ping timeout: 248 seconds]
<haesbaert> ocaml534: can you paste the code somewhere ?
<ocaml534> x::xs -> List.fold_left ( fun acc nxt ->"Store Some nxt in acc")(Some x)
<haesbaert> you're missing the list argument there
<haesbaert> the last arg
<Enjolras> ocaml534: no, you do not want to assign to acc. Everything is immutable
<Enjolras> you want to return the value of the next acc
<haesbaert> (I thought it was just a draft)
<haesbaert> val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a
<Enjolras> example : List.fold_left (fun acc element -> acc + element) 0 [1; 2; 3]
<Enjolras> it will first do 0 + 1
<Enjolras> then it will call the function again with the previoysly returned value
<Enjolras> so it will do 1 + 2
<haesbaert> ocaml534: you no "'b list", you see ?
<Enjolras> then 3 + 3
<Enjolras> and return 6
<Enjolras> it is like calling ((0 + 1) + 2) + 3
<Enjolras> List.fold_left f acc [a; b; c] is exactly f ( f (f acc a) b) c
<ocaml534> Understand fold. But while folding I compare current with previous.
<Enjolras> what do you mean previous ?
<haesbaert> are you hiding code or you're not passing the list argument ?
<ocaml534> x::xs -> List.fold_left ( fun acc nxt ->"Store nxt in acc")(Some x) l
<haesbaert> so your function returns "string"
<haesbaert> but your acc is Some x
<haesbaert> those are different types
<Enjolras> do you mean something like List.fold_left (fun (prev, acc) cur -> (cur, if prev = cur then acc else cur :: acc)) x (x :: xs) ?
<haesbaert> if x is string
<Enjolras> which would keep track of the previous element ?
<haesbaert> then you need to return Some x in the function as well
<ocaml534> cur :: acc This may be it. It assigns cur to acc ?
<Enjolras> (this code is what you would call dedup, it will transform [1;1; 3; 5; 5; 2 ] into [1; 3; 5; 2])
<Enjolras> if you want to assign to acc you down't wan a fold
<Enjolras> but you can keep a ref outside and assign to it
<Enjolras> like let prev = ref x in List.fold_left (fun acc cur -> let acc = if prev = cur then acc else cur :: acc in prev := cur; acc) x (x :: xs)
<Enjolras> this does exactlty the same thing as previously posted code
arj has quit [Quit: Leaving.]
<Enjolras> cur :: acc does not assign, it just builds a list. 1 :: [2; 3] is [1; 2; 3]
<Enjolras> i'm actually not sure about what you are asking. Only guessing
FreeBirdLjj has joined #ocaml
<ocaml534> I think you have given me the right nudge. Let me try and come back. Thank you.
<ocaml534> cur :: acc This means exactly what ?
<lyxia> "the list with head cur and tail acc"
<chelfi> (::) is a list constructor that takes an element and a list and returns a new list whose head is the element, and whose tail is the original list
<chelfi> so 1 :: [] is [1]
<Enjolras> this constructs a list. If cur is 3 and acc is [2; 1] it constructs the list [3; 2; 1]
<Enjolras> yes
<ocaml534> Got it.
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<Enjolras> duh. List.fold_left (fun (prev, acc) cur -> (cur, if prev = cur then acc else cur :: acc)) [x] (x::xs) :)
<Enjolras> sorry for the bug
<Enjolras> List.fold_left (fun (prev, acc) cur -> (cur, if prev = cur then acc else cur :: acc)) (x, [x]) (x::xs)
<ocaml534> Right
* Enjolras out, too tired
orbifx-m has quit [Ping timeout: 248 seconds]
arj has joined #ocaml
arj has quit [Client Quit]
orbifx-m has joined #ocaml
arj has joined #ocaml
nore has quit [Ping timeout: 250 seconds]
soupault has quit [Remote host closed the connection]
brunoro_ has joined #ocaml
nore has joined #ocaml
brunoro_ has quit [Ping timeout: 256 seconds]
sepp2k has joined #ocaml
malc_ has quit [Ping timeout: 260 seconds]
TarVanim_ has joined #ocaml
TarVanimelde has quit [Ping timeout: 265 seconds]
brunoro_ has joined #ocaml
ocaml816 has joined #ocaml
<ocaml816> Is there a way to detect List fold has reached the end of list and return something ?
ocaml534 has quit [Ping timeout: 260 seconds]
<Enjolras> you could use a counter and pre computing the list lenght
<Enjolras> but that would be a dirty hack
<Enjolras> in practice you really don't want to do that
<Enjolras> you either want to write a recursive function tailored to you your need
<Enjolras> or most likely move some logic outside of the fold
<ocaml816> Yes.But I have something in acc that I need to return.
<ocaml816> Your previous code advice seems to work. Thanks anyway.
<ocaml816> But I am new. So figuring out still.
douglascorrea has joined #ocaml
dhil has quit [Ping timeout: 258 seconds]
fluter has joined #ocaml
AlexDenisov has joined #ocaml
chindy has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
hellofun` has quit [Ping timeout: 256 seconds]
<ocaml816> | x::l -> List.fold_left ( fun (Some acc) cur -> if compare acc cur = 2 then Some cur else None )(Some x ) l
<ocaml816> Looks like that now.
<ocaml816> Storing something based on the result of fold seems to go against the grain ?
<ocaml816> It is mutating something. Right ?
arj has quit [Quit: Leaving.]
dhil has joined #ocaml
cpdean_ has quit [Ping timeout: 250 seconds]
arj has joined #ocaml
arj has quit [Client Quit]
Algebr` has quit [Ping timeout: 260 seconds]
malc_ has joined #ocaml
sfri has quit [Remote host closed the connection]
arj has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
zpe has joined #ocaml
sfri has joined #ocaml
d0nn1e has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ocaml
<lyxia> fold_left doesn't mutate anything
arj has quit [Quit: Leaving.]
arj has joined #ocaml
<companion_cube> https://github.com/nick8325/quickspec is a pretty nice haskell tool
octachron has joined #ocaml
agarwal1975 has joined #ocaml
nomicflux has joined #ocaml
ocaml816 has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 252 seconds]
arj has quit [Quit: Leaving.]
al-damiri has joined #ocaml
yomimono has joined #ocaml
arj has joined #ocaml
arj has quit [Client Quit]
jlongster has joined #ocaml
larhat has quit [Quit: Leaving.]
arj has joined #ocaml
bernardofpc has joined #ocaml
plqa has quit [Quit: Page closed]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu has joined #ocaml
jlongster has joined #ocaml
shinnya has joined #ocaml
brunoro_ has quit [Ping timeout: 260 seconds]
arj has quit [Quit: Leaving.]
Piczel has left #ocaml ["WeeChat 1.6"]
fre has quit [Quit: WeeChat 1.5]
FreeBirdLjj has joined #ocaml
ryanartecona has joined #ocaml
cpdean_ has joined #ocaml
brunoro_ has joined #ocaml
copy` has joined #ocaml
tg has quit [Ping timeout: 252 seconds]
underscore has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
chindy has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 246 seconds]
richi235 has quit [Remote host closed the connection]
richi235 has joined #ocaml
okuu has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nickapos has joined #ocaml
TarVanim_ is now known as TarVanimelde
FreeBirdLjj has joined #ocaml
AlexDenisov has joined #ocaml
ciniglio` has quit [Remote host closed the connection]
sh0t has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
ciniglio` has joined #ocaml
mpenet has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
tg has joined #ocaml
noddy has quit [Ping timeout: 246 seconds]
underscore has quit [Ping timeout: 250 seconds]
mpenet has quit [Remote host closed the connection]
TarVanimelde has joined #ocaml
TarVanimelde has quit [Client Quit]
jnavila has quit [Quit: It was time]
ontologiae has joined #ocaml
zpe has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
Algebr` has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
average has joined #ocaml
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
noddy has joined #ocaml
brunoro_ has joined #ocaml
gjaldon has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
slash^ has joined #ocaml
AltGr has left #ocaml [#ocaml]
brunoro_ has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #ocaml
brunoro_ has joined #ocaml
Mercuria1Alchemi has joined #ocaml
brunoro_ has quit [Ping timeout: 258 seconds]
brunoro_ has joined #ocaml
underscore has joined #ocaml
Anarchos has joined #ocaml
Armael has quit [Ping timeout: 265 seconds]
balod has quit [Remote host closed the connection]
brunoro_ has quit [Ping timeout: 240 seconds]
TarVanimelde has joined #ocaml
Armael has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
frefity has quit [Ping timeout: 250 seconds]
Anarchos has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
brunoro_ has joined #ocaml
jnavila has joined #ocaml
brunoro_ has quit [Ping timeout: 245 seconds]
<Anarchos> when a OUnit2 test complains about 'not equal', how to get the two values printed on stdout ?
okuu has quit [Read error: Connection reset by peer]
octachron has quit [Quit: Page closed]
noddy has quit [Ping timeout: 240 seconds]
frefity has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
<lyxia> assert_equal has a ?printer argument
ryanartecona has quit [Quit: ryanartecona]
<Anarchos> lyxia thanks !
brunoro_ has joined #ocaml
okuu has joined #ocaml
okuu has quit [Read error: Connection reset by peer]
ryanartecona has joined #ocaml
brunoro_ has quit [Ping timeout: 240 seconds]
okuu has joined #ocaml
brunoro_ has joined #ocaml
veggie_ has joined #ocaml
AlexDenisov has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
brunoro_ has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
veggie_ has quit [Ping timeout: 245 seconds]
freusque has joined #ocaml
veggie_ has joined #ocaml
chris2 has quit [Ping timeout: 246 seconds]
brunoro_ has joined #ocaml
frefity has quit [Ping timeout: 248 seconds]
brunoro_ has quit [Ping timeout: 256 seconds]
jnavila has quit [Ping timeout: 260 seconds]
chris2 has joined #ocaml
brunoro_ has joined #ocaml
frefity has joined #ocaml
_andre has quit [Quit: leaving]
brunoro_ has quit [Ping timeout: 258 seconds]
ryanartecona has quit [Quit: ryanartecona]
gjaldon has quit []
underscore has quit [Ping timeout: 268 seconds]
jave has quit [Ping timeout: 260 seconds]
jave has joined #ocaml
brunoro_ has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
brunoro_ has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
veggie_ has quit [Ping timeout: 250 seconds]
frefity has quit [Quit: Ex-Chat]
freusque has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Ping timeout: 258 seconds]
Anarchos has quit [Quit: after an evening spent to add unit tests to his own project, time to sleep]
mwcampbell has joined #ocaml
brunoro_ has joined #ocaml
AlexRussia has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
brunoro_ has quit [Ping timeout: 258 seconds]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
slash^ has quit [Read error: Connection reset by peer]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 256 seconds]
mwcampbell has quit [Quit: Leaving]
sepp2k has quit [Quit: Leaving.]
brunoro_ has joined #ocaml
veggie_ has joined #ocaml
brunoro_ has quit [Ping timeout: 250 seconds]
ontologiae has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 252 seconds]
ryanartecona has joined #ocaml
veggie_ has quit [Ping timeout: 248 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
sh0t has joined #ocaml
yomimono has quit [Ping timeout: 260 seconds]
richi235 has quit [Remote host closed the connection]
veggie_ has joined #ocaml
richi235 has joined #ocaml
freehck has quit [Ping timeout: 250 seconds]
mrf3000 has joined #ocaml
<cpdean_> quit
cpdean_ has quit [Quit: WeeChat 1.5]
<seliopou> rgrinberg it doesn't crash immediately now
<seliopou> i think i'm gonna make the repo public on monday
<seliopou> i just have one more thing to clear up before then
Simn has joined #ocaml
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 244 seconds]
kakadu has quit [Remote host closed the connection]
veggie_ has quit [Ping timeout: 244 seconds]
veggie_ has joined #ocaml
kakadu has joined #ocaml
brunoro_ has joined #ocaml
douglascorrea has quit [Remote host closed the connection]
douglascorrea has joined #ocaml
brunoro_ has quit [Ping timeout: 244 seconds]
jnavila has joined #ocaml
douglascorrea has quit [Ping timeout: 256 seconds]
brunoro_ has joined #ocaml
zpe has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 260 seconds]
Algebr` has quit [Ping timeout: 256 seconds]
brunoro_ has quit [Ping timeout: 240 seconds]
silver_ has joined #ocaml
brunoro_ has joined #ocaml
silver has quit [Ping timeout: 256 seconds]
average is now known as house__
veggie_ has quit [Ping timeout: 260 seconds]
house__ is now known as average
brunoro_ has quit [Ping timeout: 244 seconds]
average is now known as JimmyHoffman
JimmyHoffman is now known as average
average is now known as PresidentOfNZ
PresidentOfNZ is now known as average
average is now known as PMofNZ
PMofNZ is now known as average
average is now known as LindseyLohansMom
LindseyLohansMom is now known as average
average is now known as arubinsMom
arubinsMom is now known as average
average is now known as someoneWhoHasNot
someoneWhoHasNot is now known as average
average is now known as ImNot12
ImNot12 is now known as average
brunoro_ has joined #ocaml
silver_ is now known as silver
agarwal1975 has quit [Quit: agarwal1975]
brunoro_ has quit [Ping timeout: 250 seconds]
kakadu has quit [Remote host closed the connection]
brunoro_ has joined #ocaml
yomimono has joined #ocaml
diphuser has joined #ocaml
veggie_ has joined #ocaml
<Leonidas> companion_cube: I am a bit confused, there is CCSexp, which mentions in its changelog that the parser was moved to CCSexpStream, but there is no docs for the latter?
copy` has quit [Quit: Connection closed for inactivity]
brunoro_ has quit [Ping timeout: 256 seconds]
zaquest has quit [Ping timeout: 246 seconds]
brunoro_ has joined #ocaml
orbifx-m2 has joined #ocaml
yomimono has quit [Ping timeout: 244 seconds]
jnavila has quit [Ping timeout: 246 seconds]
brunoro_ has quit [Ping timeout: 250 seconds]
orbifx-m has quit [Ping timeout: 250 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 268 seconds]
sh0t has quit [Ping timeout: 260 seconds]
brunoro_ has joined #ocaml
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 258 seconds]
brunoro_ has quit [Ping timeout: 240 seconds]
brunoro_ has joined #ocaml
brunoro_ has quit [Ping timeout: 268 seconds]
brunoro_ has joined #ocaml
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brunoro_ has quit [Ping timeout: 246 seconds]