adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
Haudegen has quit [Read error: Connection reset by peer]
try-again has quit [Ping timeout: 250 seconds]
nicoo has joined #ocaml
eskatrem has quit [Read error: No route to host]
cobreadmonster has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #ocaml
_whitelogger has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
Jeanne-Kamikaze has joined #ocaml
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #ocaml
silver has quit [Read error: Connection reset by peer]
AtumT has quit [Quit: AtumT]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ocaml
ygrek__ has quit [Ping timeout: 268 seconds]
pierpal has joined #ocaml
_whitelogger has joined #ocaml
gravicappa has joined #ocaml
_whitelogger has joined #ocaml
Jeanne-Kamikaze has quit [Quit: Leaving]
carlosdagos has quit [Quit: WeeChat 2.2]
carlosdagos has joined #ocaml
carlosdagos has quit [Client Quit]
carlosdagos has joined #ocaml
carlosdagos has quit [Client Quit]
carlosdagos has joined #ocaml
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
KeyJoo has joined #ocaml
eskatrem has joined #ocaml
ihavelotsoffries has joined #ocaml
tristero has quit [Ping timeout: 246 seconds]
hannes has quit [Remote host closed the connection]
AnAverageHuman has quit [Ping timeout: 256 seconds]
phlym has joined #ocaml
gravicappa has quit [Ping timeout: 250 seconds]
Birdface has joined #ocaml
sonologico has quit [Ping timeout: 250 seconds]
ihavelotsoffries has quit [Remote host closed the connection]
sonologico has joined #ocaml
ggole has joined #ocaml
FreeBirdLjj has joined #ocaml
ggole- has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
ggole_ has joined #ocaml
ggole- has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
kjak has quit [Ping timeout: 250 seconds]
gravicappa has joined #ocaml
SomeDamnBody has quit [Ping timeout: 258 seconds]
kakadu has joined #ocaml
rwmjones_ is now known as rwmjones
zolk3ri has joined #ocaml
mfp has joined #ocaml
Haudegen has joined #ocaml
demonimin has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sonologico has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
<eskatrem> Say I have a type like: `type tmp = | X | A of int | B of int;;` and x ifof type tmp,can I do a pattern matching on x that doesnt separate the case whether x is of A or of B?
<flux[m]> eskatrem: maybe I don't understand the question, but there are basically two interesting (for some values of interesting) pattern matches you can do on that type: `match X with X -> "X" | _ -> "A or B"` or `match X with A x | B x -> "A or B " ^ string_of_int x | _ -> "X"`
<eskatrem> flux[m]: what I wanted is a pattern like (A|B) n -> f(n)
<eskatrem> of course A n | B n works but I have to type n twice!
<flux[m]> I don't think that's possible, the closes you can get is the form I showed in the latter case
<eskatrem> ok thank you
Birdface has quit [Ping timeout: 264 seconds]
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
sonologico has joined #ocaml
try-again has joined #ocaml
try-again has left #ocaml [#ocaml]
KeyJoo has quit [Quit: KeyJoo]
_whitelogger has joined #ocaml
<ggole_> You can sometimes avoid that by adjusting the datatype definition, although that can get a bit ugly
<ggole_> type tmp = X | AorB of a_or_b of int and a_or_b = A | B
<ggole_> Allowing or-constructor patterns would be an interesting extension.
<eskatrem> well in my case it's just about avoiding typing one letter so it's not that much of a big deal
<ggole_> Mmm, depends how many constructors you have to type.
<ggole_> If it's twenty then taking an argument starts looking pretty good.
<ggole_> Ideally we would have pattern abstractions and would be able to more or less decouple the data type definition from how the pattern matching is expressed, but oh well.
<eskatrem> Do you think it's something that occurs often?
silver has joined #ocaml
<ggole_> No, but it is quite annoying when it does.
AnAverageHuman has joined #ocaml
sonologico has quit [Remote host closed the connection]
sonologico has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
sonologico has quit [Remote host closed the connection]
sonologico has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
hannes has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
jnavila has joined #ocaml
phlym has left #ocaml [#ocaml]
pierpal has quit [Remote host closed the connection]
pierpal has joined #ocaml
pierpal has quit [Remote host closed the connection]
pierpal has joined #ocaml
_whitelogger has joined #ocaml
AnAverageHuman has quit [Remote host closed the connection]
AnAverageHuman has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
cods has quit [Changing host]
cods has joined #ocaml
kakadu has quit [Read error: No route to host]
kakadu has joined #ocaml
dimitarvp has joined #ocaml
dimitarvp has quit [Read error: Connection reset by peer]
<adrien> I was discussing profiling and memory usage earlier this week with friends and I started thinking about the memory profilers for ocaml: afaik they're fairly memory hungry but has anyone tried them with zram?
sonologico has quit [Remote host closed the connection]
eskatrem has quit [Read error: No route to host]
jnavila has quit [Ping timeout: 246 seconds]
SomeDamnBody has joined #ocaml
notnotda1 has joined #ocaml
<hannes> I've some GC question(s)!? I read in http://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html that there are two control fields which I don't fully understand: space_overhead and max_overhead. are these given in absolute numbers? or relative ones? (and if absolute, which unit is used? words?)?
<hannes> and then the underlying question: space_overhead is used to determine whether GC should do some work or not. Now, when is the GC actually triggered? if malloc fails OR space_overhead too huge?
notnotda1 is now known as notnotdan[m]
<ggole_> max_overhead is a percentage
<ggole_> Seems space_overhead is also a percentage, going by the description
<ggole_> The documentation isn't as clear as it could be.
<hannes> ggole_: thanks!
<ggole_> After a bit of reading, I don't think I understand what exactly controls when a major GC runs
<ggole_> (A minor GC runs when the bump pointer runs into the end of the minor generation, of course.)
Haudegen has quit [Remote host closed the connection]
<hannes> ggole_: I'm reading up on real world ocaml chapters on memory representation and the garbage collector
ziyourenxiang_ has quit [Ping timeout: 258 seconds]
leah2 has quit [Quit: trotz alledem!]
leah2 has joined #ocaml
<ggole_> Been a while since I read that.
dinosaure has quit [Ping timeout: 268 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 264 seconds]
Birdface has joined #ocaml
dinosaure has joined #ocaml
<Ankhers> What is the easiest way to append a single element to an array? `Array.append arr (Array.create 1 elem)'?
<Ankhers> Maybe not easiest, but proper way.
Birdface has quit [Ping timeout: 250 seconds]
<octachron> "Array.append arr [|elem|]"? However, if you are appending elements to an array, you are probably not using the right data structure.
Guest18036 has joined #ocaml
Guest18036 has quit [Read error: Connection reset by peer]
<Ankhers> I thought adding elements to an array was O(1)?
<Fardale> changing the value of a cell is O(1)
<octachron> No, array are fixed size, append is reallocating a new array.
<ggole_> You probably want an ArrayList-like type, of which there are none in the stdlib
<Ankhers> Yeah, I'm just looking it up. I haven't actually used arrays in forever. Maybe I will just use lists to cons and reverse when I'm done.
<ggole_> If you don't need random access, lists are probably OK
<octachron> If you want dynamically sized array, you may want to have a look at container and CCVector for instance
Haudegen has joined #ocaml
<Ankhers> I'm still trying to figure out what I need for this operation. I will just use a list for now and put something better in place once I understand more.
<Ankhers> Thanks for the help.
dinosaure has quit [Ping timeout: 245 seconds]
kjak has joined #ocaml
kjak_ has joined #ocaml
Serpent7776 has joined #ocaml
dinosaure has joined #ocaml
sagax has quit [Read error: No route to host]
dinosaure has quit [Ping timeout: 246 seconds]
tane has joined #ocaml
jnavila has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
gravicappa has joined #ocaml
sagax has joined #ocaml
gravicappa has quit [Ping timeout: 245 seconds]
<Ankhers> Fardale: The other day you mentioned you may be able to help a bit with this production line project, but that you needed more information. What kind of additional information did you need / want to know? Feel free to PM me if you prefer that way.
tane has quit [Quit: Leaving]
<Leonidas> PR #8565 could've gone further, allowing OCAML TO BE WRITTEN ALL IN QBASIC GLORY, FOR ALL PEOPLE COMING FROM THERE. GOTO 10.
themsay has joined #ocaml
<Fardale> Ankhers: I don't understand what is your question. What do you have as input and what do you want in output
ggole_ has quit [Quit: Leaving]
cobreadmonster has quit [Quit: Connection closed for inactivity]
Serpent7776 has quit [Quit: leaving]
fmnt has joined #ocaml
fmnt has quit [Client Quit]
zolk3ri has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
dinosaure has joined #ocaml
nicoo has quit [Ping timeout: 256 seconds]
Malkaviel has joined #ocaml
Malkaviel has quit [Client Quit]
nicoo has joined #ocaml
Malkaviel has joined #ocaml
andrewlitteken has quit [Quit: Connection closed for inactivity]
Malkaviel has quit [Quit: Malkaviel]
Malkaviel has joined #ocaml
silver_ has joined #ocaml
silver has quit [Ping timeout: 250 seconds]
silver_ is now known as silver
Malkaviel has quit [Quit: Malkaviel]
Jeanne-Kamikaze has joined #ocaml
kakadu has quit [Remote host closed the connection]
Haudegen has quit [Read error: Connection reset by peer]
Jesin has quit [Quit: Leaving]
kjak_ has left #ocaml [#ocaml]
keep_learning_M has joined #ocaml
ziyourenxiang_ has joined #ocaml
mfp has quit [Ping timeout: 246 seconds]
Jesin has joined #ocaml