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
Algebr has quit [Ping timeout: 256 seconds]
shakalaka has joined #ocaml
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
|jbrown| has quit [Ping timeout: 244 seconds]
jfntn has quit [Remote host closed the connection]
Heasummn has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
conrad4 has joined #ocaml
conrad4 has quit [Ping timeout: 250 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 252 seconds]
shakalaka has quit [Quit: bye.]
shakalaka has joined #ocaml
rand__ has quit [Quit: leaving]
kamog has quit [Remote host closed the connection]
kamog has joined #ocaml
notdan has quit [Read error: Connection reset by peer]
pierpa has quit [Ping timeout: 260 seconds]
adi___ has quit [Ping timeout: 256 seconds]
adi___ has joined #ocaml
adi___ has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 276 seconds]
dmruiz has quit [Quit: Leaving]
adi___ has joined #ocaml
petroav_ has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
Algebr has joined #ocaml
average has quit [Quit: leaving]
petroav_ has quit [Ping timeout: 260 seconds]
zv has quit [Quit: WeeChat 1.5]
Algebr has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
average has joined #ocaml
nicholasf has quit [Remote host closed the connection]
kamog has quit [Remote host closed the connection]
conrad4 has joined #ocaml
nicholasf has joined #ocaml
nichola__ has joined #ocaml
conrad4 has quit [Ping timeout: 250 seconds]
nicholasf has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
michaeltbaker has quit []
brunoro has quit [Ping timeout: 250 seconds]
wu_ng has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
jao has quit [Ping timeout: 256 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
nichola__ has quit [Ping timeout: 260 seconds]
ode has joined #ocaml
nicholasf has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
sh0t has quit [Remote host closed the connection]
brunoro has joined #ocaml
conrad4 has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
FreeBirdLjj has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
conrad4 has quit [Ping timeout: 256 seconds]
nichola__ has joined #ocaml
brunoro has quit [Ping timeout: 256 seconds]
Heasummn has quit [Ping timeout: 256 seconds]
nicholasf has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
ygrek has joined #ocaml
madroach has quit [Ping timeout: 276 seconds]
nicholasf has joined #ocaml
madroach has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
nichola__ has quit [Ping timeout: 244 seconds]
diphuser has quit [Remote host closed the connection]
diphuser has joined #ocaml
jg_ has joined #ocaml
ode has quit [Ping timeout: 252 seconds]
AlexDenisov has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 265 seconds]
slash^ has joined #ocaml
FreeBirdLjj has joined #ocaml
diphuser has left #ocaml ["ERC (IRC client for Emacs 25.1.1)"]
diphuser has joined #ocaml
Onemorenickname has joined #ocaml
blackfry has quit [Ping timeout: 258 seconds]
conrad4 has joined #ocaml
blackfry has joined #ocaml
tianon has quit [Ping timeout: 268 seconds]
brunoro has joined #ocaml
conrad4 has quit [Ping timeout: 244 seconds]
tianon has joined #ocaml
aluuu has quit [Ping timeout: 245 seconds]
brunoro has quit [Ping timeout: 260 seconds]
chris2 has quit [Ping timeout: 250 seconds]
brunoro has joined #ocaml
<Onemorenickname> "matched_string s returns the substring of s that was matched by the last call to one of the following matching or searching functions:"
<Onemorenickname> really... ?
brunoro has quit [Ping timeout: 265 seconds]
chris2 has joined #ocaml
petroav_ has joined #ocaml
<Onemorenickname> Is there a more functional standard library for regex ? (which do not rely heavily on exceptions and states ?)
petroav_ has quit [Ping timeout: 260 seconds]
<jg_> hi all. so i created a custom toplevel with 'ocamlmktop'. Can i somehow load it with utop?
aluuu has joined #ocaml
<Enjolras> Onemorenickname: there are tons of re libs. ocaml-pcre, binding to pcre, ocaml-re2, bindings to google re2, and ocaml-re, pure ocaml implementation
<Enjolras> non of them are particularly functionnals, but at least they are not totally statueful like Str
<Enjolras> jg_: you can create a custom utop as explained here : https://github.com/diml/utop#creating-a-custom-utop-enabled-toplevel
<Enjolras> you can easily keep your current state, create a utop.ml with let () = UTop_main.main () and redo you mktop command adding this file
<Onemorenickname> Enjolras, if performance is not an issue (it's only for the tokenizer of a language), which one is the best ?
<Enjolras> Onemorenickname: if performance is not an issue, i would say ocaml-re. If it is, re2. If you want full "power" of regexp with backrefs etc, pcre
<Onemorenickname> Enjolras, ok, ocaml-re it is then. Thank you :)
<sgronblo> is there no ocaml library that gives aeson-style parser combinators?
<Enjolras> i'm not sure what is aeson style, but check angstrom for parsers combinators
<jg_> Enjolras: thanks!
copy` has quit [Quit: Connection closed for inactivity]
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
Algebr has joined #ocaml
<sgronblo> Enjolras: something to make it easier to parse from the generic json value type to ocaml types such as variants
iyy has joined #ocaml
Onemorenickname has quit [Ping timeout: 276 seconds]
nicholasf has quit [Ping timeout: 252 seconds]
nicholasf has joined #ocaml
conrad4 has joined #ocaml
Algebr has quit [Ping timeout: 260 seconds]
tg has quit [Quit: Leaving]
conrad4 has quit [Ping timeout: 260 seconds]
tg has joined #ocaml
kamog has joined #ocaml
Onemorenickname has joined #ocaml
jnavila has joined #ocaml
brunoro has joined #ocaml
jg_ has quit [Ping timeout: 245 seconds]
brunoro has quit [Ping timeout: 244 seconds]
Simn has joined #ocaml
hhx has quit [Ping timeout: 260 seconds]
aluuu has quit [Quit: WeeChat 1.5]
dreadedfrog_ has joined #ocaml
dreadedfrog_ has quit [Client Quit]
whisperedcigar has joined #ocaml
nichola__ has joined #ocaml
nicholasf has quit [Ping timeout: 244 seconds]
tg has quit [Quit: Leaving]
tg has joined #ocaml
madroach has quit [Quit: leaving]
jg_ has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
orbifx has joined #ocaml
nichola__ has quit [Remote host closed the connection]
diphuser has quit [Remote host closed the connection]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
conrad4 has joined #ocaml
conrad4 has quit [Ping timeout: 256 seconds]
shakalaka has quit [Quit: bye.]
zv has joined #ocaml
shakalaka has joined #ocaml
brunoro has joined #ocaml
shakalaka has quit [Quit: bye.]
shakalaka has joined #ocaml
brunoro has quit [Ping timeout: 256 seconds]
shakalaka has quit [Client Quit]
shakalaka has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
zpe has joined #ocaml
madroach has joined #ocaml
nickapos has quit [Remote host closed the connection]
shinnya has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
minn has joined #ocaml
ggole has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
fraggle_ has quit [Ping timeout: 260 seconds]
orbifx has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
malina has joined #ocaml
danieli has quit [Ping timeout: 244 seconds]
jao has joined #ocaml
dmruiz has joined #ocaml
dhil has joined #ocaml
conrad4 has joined #ocaml
ode has joined #ocaml
conrad4 has quit [Ping timeout: 250 seconds]
Onemorenickname has quit [Read error: Connection reset by peer]
Onemorenickname has joined #ocaml
brunoro has joined #ocaml
jao has quit [Remote host closed the connection]
brunoro has quit [Ping timeout: 260 seconds]
<ggole> Ocamlbuild doesn't pass cflags to ocamlmktop. It doesn't have a flags argument for this, either.
<ggole> Is there some way to pass flags that I'm missing, or do I have to do the plumbing myself?
<Drup> Enjolras: ocaml-re is efficient
<Drup> not sure why "if performance is not an issue" ...
<companion_cube> is it as efficient as re2, really?
nomicflux has joined #ocaml
zpe has quit [Remote host closed the connection]
<Drup> not sure about re2, but compared to all the rest, it's a no brainer
nicholasf has quit [Remote host closed the connection]
<Drup> (and ocaml's re2 bindings come with some strings attached ...)
FreeBirdLjj has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
<companion_cube> compared to pcre, really?
<Drup> pcre is horribly slow
<companion_cube> I'm surprised, I thought it was only when it did a lot of backtracking
<companion_cube> (anyway the biggest issue with ocaml-re is not perf, it's unicode)
<Enjolras> Drup: it's much much more efficient than pcre. PCRE is awfully slow
<Enjolras> Drup: but re2 is one step ahead
<Enjolras> companion_cube: pcre is terribly slow because it allocates A LOT
<Enjolras> not sure why
<Drup> well, that, and the algorithm is kinda crap
<Enjolras> re2 comes with some usability cost though
<Enjolras> for instance, since building the dfa is lazy, there are several classes of errors which will be raised lazily at match time
<Enjolras> and worse than that, some error will raise depending on the input
<Drup> Enjolras: that's .. weird
<Enjolras> mainly the "out of memory" error limiting the size of the dfa
<Enjolras> but there is another kind of error which can fire on similar occasions
<Enjolras> still, it's fast.
sh0t has joined #ocaml
<Drup> (I really like re's api too, but that's another discussion)
malc_ has joined #ocaml
<Enjolras> that was my point. Use ocaml-re, it's better, unless you need really really high performance
<Drup> Enjolras: do you have benchmarks comparison for re2 vs re ? I would really like to see the numbers :p
<Enjolras> Drup: i have some specific benchmarks for some specific workload yes
<companion_cube> Enjolras: oh ok, interesting
<Enjolras> i reduced cpu usage of some heavy user of regex from 50%cpu per process to 15% cpu per process by switching
malina has quit [Quit: Throwing apples of Montserrat]
FreeBirdLjj has quit [Remote host closed the connection]
<Enjolras> and i've benched a few specific regexp where re2 was between 10 and 20% faster
dmruiz has quit [Remote host closed the connection]
<Drup> 10 to 20% ? That's ... really ok
<Enjolras> Drup: sure. I guess it depends on what you are doing :)
<Enjolras> 20% of a task which takes 7 days is more than a day
whisperedcigar has quit [Ping timeout: 245 seconds]
<Drup> sure :)
<adrien> btw, pcre is getting a new JIT and whatnot
<adrien> supposed to be much faster
<adrien> (don't know how stable however)
<Enjolras> i think pcre is useless in ocaml. It's only useful if you need well perl compatible regexp
<Enjolras> at this point you should probably write a parser
<companion_cube> (how fast is ocamllex, btw, compared to that?)
shinnya has quit [Ping timeout: 260 seconds]
<companion_cube> (for the class of regex it supports)
<Enjolras> no idea
<Drup> ocamllex is really fast
whisperedcigar has joined #ocaml
Ravana has quit [Quit: Goodbye for now!]
<Drup> (no warmup time, no indirection since it generates the code directly, can be further optimized by the compiler ...)
zpe has joined #ocaml
<Enjolras> i'm actually starting to think that performance should never be discussed "generally"
<Enjolras> it's always depends on some specific workloads and input etc
<Enjolras> i should have refrain to comment.
<Drup> Enjolras: well, you can still make some comparison
<Drup> the thing is by how much
<Enjolras> Like if you are trying to match on data you read from an HDD the perfomance of the regex engine does not matter at all
<Enjolras> C++ users always talk about cache friendliness and stuff and i used to say "lol"
<adrien> they tend to discover that not all access patterns for multidimensional arrays are the same also
<Enjolras> but now for the first time of my life i have a programm with reaches the maximum memory bandwidth of the ram punctually and it would matter
<Enjolras> still it does not mean lists are total crap for 99% of the programs
FreeBirdLjj has joined #ocaml
<Drup> Enjolras: generally, if it's by 10/20%, then ok, maybe it will depend, and maybe convenience trumps that... if it's 3 order of magnitude, just no.
<Enjolras> like pcre/re :D
<Drup> exactly.
Ravana has joined #ocaml
gjaldon has joined #ocaml
brunoro has joined #ocaml
ode has quit [Ping timeout: 260 seconds]
<gjaldon> I'm trying to use Jane Street's fieldslib lib that comes with Core but I get a syntax error when I try to use `with`. I'm using it like: http://stackoverflow.com/a/6027659/1245024
<gjaldon> Is there a change to how to use it since last 2013? I'm following the Real World Ocaml book
brunoro has quit [Ping timeout: 276 seconds]
oriba has joined #ocaml
zpe has quit [Remote host closed the connection]
kamog has quit [Ping timeout: 256 seconds]
copy` has joined #ocaml
madroach has quit [Quit: leaving]
whisperedcigar has quit [Ping timeout: 245 seconds]
nomicflux has quit [Ping timeout: 250 seconds]
orbifx has joined #ocaml
larhat has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 256 seconds]
Mercuria1Alchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
Algebr has joined #ocaml
nomicflux has joined #ocaml
ode has joined #ocaml
malina has joined #ocaml
conrad4 has joined #ocaml
brunoro has joined #ocaml
Simn has quit [Quit: Leaving]
conrad4 has quit [Ping timeout: 256 seconds]
brunoro has quit [Ping timeout: 250 seconds]
blackfry has quit [Ping timeout: 245 seconds]
blackfry has joined #ocaml
nomicflux has quit [Quit: nomicflux]
Guest26 has joined #ocaml
whisperedcigar has joined #ocaml
whisperedcigar has quit [Client Quit]
whisperedcigar has joined #ocaml
gjaldon has quit []
jg_ has quit [Ping timeout: 245 seconds]
tane has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
malc_ has quit [Remote host closed the connection]
malina has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
whisperedcigar has quit [Remote host closed the connection]
whisperedcigar has joined #ocaml
nomicflux has quit [Client Quit]
orbifx has quit [Ping timeout: 256 seconds]
brunoro has joined #ocaml
Guest26 has quit [Quit: Textual IRC Client: www.textualapp.com]
brunoro has quit [Ping timeout: 260 seconds]
kamog has joined #ocaml
petroav_ has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
malina has joined #ocaml
ode has quit [Ping timeout: 260 seconds]
sh0t has quit [Remote host closed the connection]
jg has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iZsh has quit [Quit: ZNC - http://znc.in]
iZsh has joined #ocaml
Onemorenickname has quit [Ping timeout: 252 seconds]
AlexDenisov has joined #ocaml
soupault has joined #ocaml
conrad4 has joined #ocaml
Algebr has quit [Ping timeout: 252 seconds]
brunoro has joined #ocaml
conrad4 has quit [Ping timeout: 276 seconds]
tristero has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
whisperedcigar has joined #ocaml
rgrinberg has joined #ocaml
malina has quit [Ping timeout: 260 seconds]
Algebr has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
ode has joined #ocaml
hhx has joined #ocaml
struktured has joined #ocaml
malc_ has joined #ocaml
pierpa has joined #ocaml
noddy has quit [Ping timeout: 256 seconds]
jg_ has joined #ocaml
jg has quit [Ping timeout: 265 seconds]
brunoro has joined #ocaml
fraggle_ has joined #ocaml
noddy has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
jg_ has quit [Read error: Connection reset by peer]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ode has quit [Ping timeout: 256 seconds]
ode has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
slash^ has joined #ocaml
madroach has joined #ocaml
soupault has quit [Ping timeout: 265 seconds]
conrad4 has joined #ocaml
nicholasf has joined #ocaml
brunoro has joined #ocaml
conrad4 has quit [Ping timeout: 250 seconds]
brunoro has quit [Ping timeout: 276 seconds]
malina has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
jg_ has joined #ocaml
zpe has joined #ocaml
malc_ has quit [Read error: Connection reset by peer]
nicholasf has quit [Remote host closed the connection]
clog has quit [Ping timeout: 250 seconds]
zpe has quit [Remote host closed the connection]
<companion_cube> Algebr: hey, you know why linenoise doesn't support ctrl-arrow?
<companion_cube> (otherwise the lib is nice)
<Algebr> don't know, haven't looked at it in a bit
<Algebr> can ask on twitter
<companion_cube> would be nice indeed
<Algebr> k, asked, usually people reply
<companion_cube> or maybe the one bundled with your lib is old?
<Algebr> I haven't updated it in a bit so probably need to cut a new release anyway
<Algebr> there's some things I wanted to clean up anyway
<companion_cube> (not the API, I hope? ^^)
<Algebr> no, I think there are mistakes in the C side
<Algebr> API I think was fine
Simn has joined #ocaml
<companion_cube> ok cool
<Algebr> why, have plans on using it?
ggole has quit []
<companion_cube> already the case
<companion_cube> (in a personal project though)
<Algebr> ah, k, so I won't touch the api
<Algebr> I wanted to run address sanitizer on it, love addr sanitize
<companion_cube> thanks
ode has quit [Ping timeout: 252 seconds]
kakadu has joined #ocaml
malina has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
jg_ has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
conrad4 has joined #ocaml
nicholasf has quit [Ping timeout: 244 seconds]
Heasummn has joined #ocaml
whisperedcigar has quit [Remote host closed the connection]
whisperedcigar has joined #ocaml
conrad4 has quit [Ping timeout: 265 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
mg- has quit [Ping timeout: 250 seconds]
hhx has quit [Ping timeout: 260 seconds]
minn has quit [Ping timeout: 250 seconds]
dhil has quit [Ping timeout: 256 seconds]
pierpa has quit [Read error: No route to host]
wolfcore has quit [Ping timeout: 260 seconds]
hhx has joined #ocaml
minn has joined #ocaml
wolfcore has joined #ocaml
clog has joined #ocaml
minn has quit [Quit: Leaving]
ode has joined #ocaml
struktured has quit [Ping timeout: 250 seconds]
nicholasf has joined #ocaml
brunoro has joined #ocaml
Simn has quit [Quit: Leaving]
tane has quit [Quit: Leaving]
brunoro has quit [Ping timeout: 245 seconds]
Algebr has quit [Ping timeout: 260 seconds]
oriba_ has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
oriba has quit [Ping timeout: 256 seconds]
pierpa has joined #ocaml
<tobiasBora> Hello,
<tobiasBora> Does anyone knows how I could speak/read from an arduino device (which uses serial port) ?
rgrinberg has joined #ocaml
StatelessCat has quit [Quit: WeeChat 1.5]
kakadu has quit [Remote host closed the connection]
conrad4 has joined #ocaml
conrad4 has quit [Ping timeout: 250 seconds]
etc has joined #ocaml
tokenrov1 is now known as tokenrove
<etc> Is there any way to link a library against itself? within "filename.ml": open Filename;;
<etc> filename's a bad example because that's already a library, but I think it's clear
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
ygrek has joined #ocaml
nemo23 has joined #ocaml
<sgronblo> so ocaml programmers tend to say that they dont need haskell style type definitions because they would put those in the .mli file right, but doesnt this then have the consequence that they will be exposed from the module by doing that? so if you wanna explicitly specify the type for an internal function you have to do it the kinda crappy way.
nemo23 is now known as ant_
ant_ is now known as Guest75418
etc has quit [Ping timeout: 260 seconds]
Guest75418 is now known as ant23
<tobiasBora> etc: Why would you want to do that ?
<oriba_> tobiasBora: thats magic. You wrote, what I thought, just at the same moment! :-)
<tobiasBora> sgronblo: Well, haskell has moreover class type, while ocaml hasn't. So Ocaml don't need has much type explicit :
<oriba_> maybe this can be used one day ;-)
<tobiasBora> a + b always meens in Ocaml that 'a' and 'b' are integers.
<tobiasBora> In haskell it's not that trivial so it tries to use tricky ways to find the type... and usually it fails if you do not provide the type in the function parameters
oriba_ is now known as oriba
<tobiasBora> what could be used ?
<oriba> tobiasBora: just a joke about my telepathy that you write what I think ;-)
<oriba> tobiasBora: I also wondered, why one should linka a library against itself
<tobiasBora> sgronblo: And if you need to hidde type, I would say that you would use module to do so
<tobiasBora> sgronblo: you build a general signature for the module, and after you create several "implementations".
<tobiasBora> and using functors with modules make them still more powerfull
<tobiasBora> (basiquely, a functor takes a module in argument, and gives back another module)
<tobiasBora> And to conclude our game with type, you can play with objects, GADT... Lot's of fun !
<tobiasBora> Btw, if I didn't answer to your question (which is possible since I'm not really the best man to talk about this), just ask !
<tobiasBora> oriba: Yes, Quantum Teleportation is with us.
shinnya has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]