adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Upcoming OCaml MOOC: https://huit.re/ocamlmooc | OCaml 4.03.0 release notes: http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
fUD has joined #ocaml
jeffmo has quit [Quit: jeffmo]
d0nn1e has quit [Ping timeout: 276 seconds]
d0nn1e has joined #ocaml
manizzle has quit [Remote host closed the connection]
pyon has joined #ocaml
martinium has quit [Quit: Leaving]
damason has joined #ocaml
fraggle_ has quit [Ping timeout: 260 seconds]
aphprentice has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
fraggle_ has joined #ocaml
tmtwd_ has joined #ocaml
silver has quit [Quit: rakede]
seangrove has joined #ocaml
Heasummn has quit [Ping timeout: 258 seconds]
rgrinberg has joined #ocaml
tmtwd_ has quit [Ping timeout: 244 seconds]
govg has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
tmtwd_ has joined #ocaml
ygrek_ has quit [Ping timeout: 265 seconds]
noddy has quit [Ping timeout: 240 seconds]
fraggle_ has quit [Ping timeout: 264 seconds]
fraggle_ has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
tmtwd_ has quit [Ping timeout: 244 seconds]
d0nn1e has quit [Quit: ZNC - http://znc.in]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
tane has joined #ocaml
tmtwd_ has joined #ocaml
FreeBirdLjj has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
sh0t has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
tmtwd_ has quit [Ping timeout: 244 seconds]
tmtwd_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
srenatus[m] has joined #ocaml
ygrek_ has joined #ocaml
tane has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
struk|desk has quit [Ping timeout: 276 seconds]
copy` has quit [Quit: Connection closed for inactivity]
TheLemonMan has joined #ocaml
FreeBirdLjj has joined #ocaml
APNG has quit [Ping timeout: 265 seconds]
milodavis has quit [Ping timeout: 252 seconds]
johnf has joined #ocaml
seangrove has joined #ocaml
Algebr` has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
manizzle has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
tmtwd_ has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #ocaml
FreeBird_ has quit [Ping timeout: 240 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
dexterph` has joined #ocaml
bruce_r has quit [Ping timeout: 258 seconds]
FreeBird_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
seangrove has quit [Ping timeout: 258 seconds]
nicholasf has joined #ocaml
ontologiae has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
nichola__ has joined #ocaml
FreeBirdLjj has joined #ocaml
nicholasf has quit [Ping timeout: 244 seconds]
FreeBird_ has joined #ocaml
nichola__ has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
atbagautdinov has joined #ocaml
atbagautdinov has left #ocaml [#ocaml]
ygrek_ has quit [Ping timeout: 276 seconds]
bruce_r has joined #ocaml
pierpa has joined #ocaml
zpe has joined #ocaml
Simn has joined #ocaml
nicholasf has joined #ocaml
bruce_r has quit [Ping timeout: 250 seconds]
luigy has quit [Ping timeout: 244 seconds]
FreeBird_ has quit [Remote host closed the connection]
jackweirdy has joined #ocaml
luigy has joined #ocaml
larhat has joined #ocaml
FreeBirdLjj has joined #ocaml
milodavis has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
Algebr` has quit [Ping timeout: 276 seconds]
nicholasf has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
mbrock has joined #ocaml
tane has joined #ocaml
seangrove has joined #ocaml
antoro_ is now known as antoro
FreeBirdLjj has quit [Remote host closed the connection]
Soni has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
nicholasf has joined #ocaml
axiles has joined #ocaml
FreeBirdLjj has joined #ocaml
jackweirdy has quit [Quit: Textual IRC Client: www.textualapp.com]
FreeBirdLjj has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Soni is now known as APNG
jwatzman|work has quit [Quit: jwatzman|work]
Simn has quit [Ping timeout: 264 seconds]
jwatzman|work has joined #ocaml
<antoro> Hello, what is the easiest way to learn OCaml with OO background?
<Drup> honestly ? the same as if you didn't have OO background.
<Drup> (just read RWO :p)
govg has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
silver has joined #ocaml
larhat1 has quit [Quit: Leaving.]
larhat has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
govg has joined #ocaml
seangrove has joined #ocaml
sdothum has joined #ocaml
seangrove has quit [Ping timeout: 250 seconds]
Simn has joined #ocaml
ggole has joined #ocaml
<flux> antoro, I'm afraid OO background may not be that helpful, in fact it might be counterproductive ;-). OO is an advanced subject in OCaml, tool among others, and is not pervasively used in the libraries at all (except select few)
<antoro> flux, yep, I know that OO background isn't helpful.
<antoro> (for learning a function language)
<antoro> function = functional
<flux> antoro, perhaps the way to go is to do what Drup suggests, read Real-world OCaml (available online) and then (or during) try to write something you need
<flux> (at some point you might realize that the Core-library RWO uses pervasively isn't the only standard in OCaml world, though ;-))
<antoro> actually, I don't need anything specific, just interested in learning OCaml :) thank you tough, I'll take a look at Real-world OCaml
<flux> antoro, well, it really helps to have a target to aim for :)
govg has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
phase_ has joined #ocaml
larhat has quit [Ping timeout: 250 seconds]
phase_ has quit [Client Quit]
larhat has joined #ocaml
kakadu has joined #ocaml
govg has joined #ocaml
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
sh0t has quit [Read error: Connection reset by peer]
kolko has quit [Read error: Connection reset by peer]
kolko has joined #ocaml
yomimono has joined #ocaml
nicholasf has quit [Remote host closed the connection]
two_wheels has joined #ocaml
rgrinberg has joined #ocaml
nicholasf has joined #ocaml
<pierpa> antoro: do you already know about the Ocaml MOOC starting in september?
<antoro> pierpa, no
<antoro> can you please link it?
<pierpa> sure
yomimono has quit [Ping timeout: 260 seconds]
aphprentice has quit [Quit: Connection closed for inactivity]
tane has quit [Quit: Verlassend]
nicholasf has quit [Remote host closed the connection]
ocamlnewnewbee has joined #ocaml
<ocamlnewnewbee> I found the argument order is different for if I use "core syntax" for many functions, such as Lisp.map, Array.iter, is there any reason of beign inconsistent?
<ocamlnewnewbee> I am a beginner, so I am truly confused why it is like this?
<ocamlnewnewbee> For example, List.map (fun x -> 2*x) [1;3];;
<ggole> The functions that Core exposes have the same names but different (and labelled) argument orders
<ocamlnewnewbee> It will have to be "List.map [1;3] (fun x -> 2 * x)" if I set up core.
<pierpa> Doesn't Core use labeled arguments?
<Armael> the intended way to use Core functions is to use labeled arguments: you'd write List.map ~f:(fun x -> 2 * x) [1;3]
<Armael> or List.map [1;3] ~f:(fun x -> 2 * x)
<Armael> (the point of having a labeled argument is that the order doesn't matter)
<ocamlnewnewbee> I see. So I guess it is a common practice to mostly use labeled arguments when using core?
<Armael> yea, I think "List.map [1;3] (fun x -> 2 * x)" works because of the way labels are implemented, but you are supposed to use a label ~f
<ocamlnewnewbee> Nice. very helpful. Thanks a lot!
agarwal1975 has quit [Quit: agarwal1975]
ocamlnewnewbee has left #ocaml [#ocaml]
al-damiri has joined #ocaml
<mrvn> Armael: labels can be skipped if the application is not possibly partial
sepp2k has joined #ocaml
ocamlnewnewbee has joined #ocaml
copy` has joined #ocaml
seangrove has joined #ocaml
rgrinberg has quit [Quit: WeeChat 1.5]
rgrinberg has joined #ocaml
ocamlnewnewbee has quit [Quit: Lost terminal]
seangrove has quit [Ping timeout: 276 seconds]
ocamlnewnewbee has joined #ocaml
<ocamlnewnewbee> Why the executable size is huge even if the code only have two lines to print out a string array? It is about 29MB if I use the following command:
<ocamlnewnewbee> ocamlfind ocamlc -linkpkg -thread -package core freq.ml
<ocamlnewnewbee> and it is still huge if I replace ocamlc with ocamlopt.
<ocamlnewnewbee> However, without using core, the exe file significantly reduced to "normal", ~500K.
<pierpa> that's because Core is a huge library
<flux> it is due to two reasons: 1) core is one big module (Core.*), that is all taken into use when you use any part of it, instead of separate modules 2) ocaml doesn't have a smart mechanism for eliminating unused parts of modules
<flux> so the ocaml mechanism works only at module level. if you link in a .cma that has unused modules, those are not linked in. but if they are used, the complete module is linked in.
<flux> apparently Core also has been split into parts you may be able to use if you're worried about binary size, ie. Core_kernel. not sure what it has and what a typical program needs.
<flux> it might be that the flambda introduced in 4.03 will pave way to good dead code elimination in the final phase?
<flux> the documentation says "Flambda provides full optimisation across different compilation units, so long as the .cmx files for the dependencies of the unit currently being compiled are available. (A compilation unit corresponds to a single .ml source file.) However it does not yet act entirely as a whole-program compiler: for example, elimination of dead code across a complete set of compilation units is not supported."
<flux> so "not yet" gives us hope.. :)
<flux> I guess after a proper dead code eliminator small ocaml programs get to be really small
<flux> do the ocaml/javascript guys use some dead code eliminators?
mbrock has quit [Quit: Connection closed for inactivity]
mengu has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
<Armael> yes, js_of_ocaml performs dead code elimination
<flux> and js_of_ocaml works on ocaml bytecode?
<Armael> yes
<Armael> and it is fed the bytecode for the whole program so it has whole program information
<flux> so I guess that's not a solution the native compiler could just plug in and use.. but maybe the byte code compiler could?
<Armael> no because of modular compilation
<mrvn> the native code compiler gets all modules too and every module has all the functions and values and their code in them. No reason one couldn't eliminate dead code.
seangrove has joined #ocaml
<antoro> pierpa, thank you for the MOOC link!
<ocamlnewnewbee> @ flux, thanks a lot for the explanation!
demonimin has quit [Remote host closed the connection]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
demonimin has joined #ocaml
agarwal1975 has joined #ocaml
two_wheels has joined #ocaml
mengu has quit [Remote host closed the connection]
rgrinberg has quit [Quit: WeeChat 1.5]
ocamlnewnewbee has quit [Quit: Lost terminal]
mengu has joined #ocaml
mengu has quit [Changing host]
mengu has joined #ocaml
rgrinberg has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
Mercuria1Alchemi has joined #ocaml
FreeBirdLjj has joined #ocaml
dexterph` has quit [Ping timeout: 244 seconds]
SilverKey has joined #ocaml
mengu has joined #ocaml
govg has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
slash^ has joined #ocaml
FreeBirdLjj has joined #ocaml
ygrek_ has joined #ocaml
shinnya has joined #ocaml
zpe has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
mengu has quit []
johnelse has joined #ocaml
<antranigv> I met Algebr yesterday, I liked OCaml a lot, I might use it for my daytoday stuff!:))
<antranigv> ad it seems aeasy to learn as well! :)
<antranigv> s/aeasy/easy
bruce_r has joined #ocaml
kakadu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<antranigv> btw, there's a small change needs to be done in the installation manual for Gentoo. change emerge ocaml to emerge dev-lang/ocaml please? :) because we have 2 ebuilds with the name ocaml.
<engil> what is the first one then ?
<antranigv> app-xemacs/ocaml of course :P
<engil> oh, ok
<engil> I guess a PR changing https://github.com/ocaml/ocaml.org/blob/master/site/docs/install.md might be sufficient :)
<antranigv> a PR changing? what does that mean? :/
* antranigv needs to learn more English
<engil> submitting a pull request on the repository that changes the instructions for gentoo in this file
<antranigv> well, I think I'll just make a pull request now :3
<antranigv> thanks engil , didn't know the website is on Github
<engil> should be a little be complicated to build, so you may not want to try, just change carefully the markdown and that'll probably do :)
Anarchos has joined #ocaml
johnf has quit [Remote host closed the connection]
johnelse has quit [Ping timeout: 244 seconds]
pierpa has quit [Ping timeout: 240 seconds]
johnf has joined #ocaml
<antranigv> does this look ok? :) https://github.com/ocaml/ocaml.org/pull/823
<engil> looks perfect :)
zpe has joined #ocaml
<antranigv> thanks engil :)
<engil> no problem, thank you for the report!
ygrek_ has quit [Ping timeout: 265 seconds]
zpe has quit [Ping timeout: 264 seconds]
Algebr` has joined #ocaml
ygrek_ has joined #ocaml
<Leonidas> antranigv: or learn more french ;-)
<Leonidas> antranigv: so you're in armenia?
<antranigv> Leonidas: french? :))
<antranigv> Leonidas: yes I am, yesterday I also met Algebr :)
<Leonidas> antranigv: many ocaml users are french, it came from france originally :)
<antranigv> well, about French people, also happy that they created Ada :3
FreeBirdLjj has quit [Remote host closed the connection]
ggole has quit [Remote host closed the connection]
ggole has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
SilverKey has quit [Read error: Connection reset by peer]
pierpa has joined #ocaml
Denommus has joined #ocaml
<Leonidas> didn't know
<Algebr`> dude!
<Algebr`> antranigv: yep
<Algebr`> antranigv is a Syrian Armenian
zpe has joined #ocaml
<Drup> seliopou: proposition for angstrom, you should emit Gen.t/Sequence.t instead of lists for "many"
<antranigv> Algebr`: sup? :)
shinnya has quit [Ping timeout: 264 seconds]
<rgrinberg> Drup: why those and not a fold?
<Drup> rgrinberg: gen are better for things where you want to stop, sequence is faster than anything else when you don't.
zpe has quit [Ping timeout: 258 seconds]
<Drup> (and there are two compréhensible libraries to handle them)
<rgrinberg> the thing is, in this case stopping shouldn't be allowed no?
<Drup> Why ?
<rgrinberg> many x should parse as much as possible, not as long as the user is pulling from the gen
<Drup> it's just for extracting the result
<Drup> not for the parsing part
<Drup> lists allocates like crazy and they suck :>
<Leonidas> is there a way to load .ml files into utop? so, without having to manually compile the module first?
<rgrinberg> but then, if the parser wants to proceed, it will have to buffer the elements until the user *finally* decides to read
<Drup> Leonidas: #use
<rgrinberg> and yes list indeed sucks
<Leonidas> Drup: but that does not preserve the fact that it is an external module
<Drup> Leonidas: #mod_use
<Drup> rgrinberg: it's really just "which datastructure to emit"
<rgrinberg> but imo, gen is broken here while sequence is too ugly and should only be used as a lest resort for perf.
<Drup> not changing how things are consumed
<Leonidas> Drup: oh, amazing. Exactly what I was looking for, thanks :)
<rgrinberg> val many_fold : 'a Parser.t -> 'acc -> ('a -> 'acc -> 'acc) -> 'acc Parser.t no?
<Drup> rgrinberg: sure, and then sudendly, you have none of the useful functions in the List/Gen/Sequence modules and it's not even faster
<Drup> I really don't get the prettyness argument about Sequence
<Drup> Most of the time, you are using the combinators, and then the semantics is the same
<rgrinberg> you can have combinators for folds as easily btw.
<Drup> Doesn't change my point
<rgrinberg> my objection agianst sequence that is?
<Drup> yes
<Drup> (and btw, "easily" means you need a GADT to hide an existential, so ..)
<rgrinberg> well sequence is acceptable to me when you need max perf.
<rgrinberg> Drup: I know, you showed me how :P
<Drup> So easy, right :D
luzie has quit [Ping timeout: 252 seconds]
<Drup> I feel like angstrom is such a case ;)
<rgrinberg> gen is certainly not. While fold is best practice even though if it's unfortunately a bit slower
<Drup> unfortunatly, gen is still more expressive than fold
<rgrinberg> it is, but the expressiveness here is leading to hidden buffering which is broken
<Drup> (see the cube's PR, he has explanations there)
<rgrinberg> that's exactly what we'd like to avoid for parsing here
<Drup> You are acting as if consuption of the gen must be linked to evaluation of parsing
<Drup> I don't see why it's the case, as I said in the beginning
luzie has joined #ocaml
<Drup> it's about delaying extracting information, not delaying parsing
<rgrinberg> how can you separate the two though? for something like many p, you must execute p until it fails.
kakadu has joined #ocaml
<Drup> I don't know how angstrom is implemented *shrugh*. For tyre it's easy :p
<rgrinberg> all i'm trying to say is that something like many x >>= (fun gen -> fire_forgen gen; some_other_parser) is broken
<rgrinberg> b/c for the gen to be available for whenever it will be used, it will have to be bufferd.
<rgrinberg> while with a fold, the buffering must be done explicitly
<Drup> hum, bind
<rgrinberg> e.g. many x [] List.cons (fun elems -> fire_forget elems; some_other_parser)
<rgrinberg> forgot a bind there :P
slash^ has quit [Read error: Connection reset by peer]
<Drup> seliopou: wow, there are *objects* :D
<Drup> rgrinberg: huum, bind do make things annoying, yeah
<Drup> (pretty sure it's safe in the applicative fragment, though)
ggole has quit [Ping timeout: 244 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
SpiceGuid has joined #ocaml
sdothum has joined #ocaml
SpiceGuid has quit [Remote host closed the connection]
Heasummn has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 265 seconds]
antoro is now known as antoro_
seangrove has quit [Ping timeout: 244 seconds]
antoro_ is now known as antoro
zpe has joined #ocaml
zpe has quit [Ping timeout: 258 seconds]
ontologiae_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
mcspud has quit [Ping timeout: 250 seconds]
ontologiae_ has quit [Ping timeout: 265 seconds]
mcspud has joined #ocaml
sepp2k has quit [Quit: Leaving.]
johnf has quit [Read error: Connection reset by peer]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zpe has joined #ocaml
thizanne has joined #ocaml
two_wheels has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
zpe has quit [Ping timeout: 276 seconds]
johnf has joined #ocaml
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nicholasf has joined #ocaml
Denommus has quit [Quit: Bye]
antoro is now known as antoro_
agarwal1975 has quit [Quit: agarwal1975]
shinnya has joined #ocaml
john51 has quit [Ping timeout: 244 seconds]
pierpa has quit [Ping timeout: 240 seconds]
john51 has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
thizanne has quit [Ping timeout: 258 seconds]
two_wheels has joined #ocaml
kakadu has quit [Ping timeout: 244 seconds]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Simn has quit [Quit: Leaving]
al-damiri has quit [Quit: Connection closed for inactivity]
gillepsie has joined #ocaml