ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
<t4nk387> Is this progress?
oriba_ has joined #ocaml
<t4nk387> rgrinberg1 ?
JokerDoom has joined #ocaml
AltGr has joined #ocaml
<t4nk387> anyone here?
eyyub2 has quit [Ping timeout: 260 seconds]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
lordkryss has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
yomimono has joined #ocaml
<daftluck> I'm here. Sort of. Drifting in and out.
<daftluck> But sometimes people take breaks or it becomes dark in their time zone. :P
seanmcl has quit [Quit: Textual IRC Client: www.textualapp.com]
q66 has quit [Quit: Leaving]
rgrinberg has joined #ocaml
JokerDoom has quit [Quit: Leaving]
JokerDoom has joined #ocaml
dsheets_ has quit [Quit: Leaving]
q66 has joined #ocaml
nicoo_ has joined #ocaml
nicoo has quit [Ping timeout: 250 seconds]
<struktured> does oasis master have 33% test success rate for anyone else, or just me?
nicoo_ is now known as nicoo
bytbox has quit [Remote host closed the connection]
<rgrinberg> what's the best way to wrap js libs in js_of_ocaml? is it goji? https://github.com/klakplok/goji
<rgrinberg> Drup: ping since you're the expert :)
antinomy has quit [Ping timeout: 260 seconds]
<Drup> you can try goji, otherwise http://ocsigen.org/js_of_ocaml/2.5/manual/bindings
<rgrinberg> has anybody experimented with fb's react yet?
<Drup> no, but I don't really see the point
<Drup> well, maybe yes and i don't know about it
<Drup> but I still don't see the point :D
<rgrinberg> how come?
<Drup> you're talking about the virtual dom stuff right ?
<Drup> we already have that?
<rgrinberg> yeah
<Drup> s/?/./
<rgrinberg> where is it?
<Drup> I mean, it's already built in inside eliom/js_of_ocaml
<Drup> the tyxml (reactive) interface is mostly that
<rgrinberg> well react also gives you an interface for components
<Drup> components ?
<Drup> (in the realm of overloaded word, I think component is in the top 5)
<rgrinberg> sure
<rgrinberg> for example
<rgrinberg> a reusable bit you can just drop into your page
<Drup> ah yeah, the non-cool kids used to call that a widget :D
<Drup> you can bind that, yeah, but that's hardly specific to react
antinomy has joined #ocaml
oriba_ has quit [Quit: Verlassend]
<rgrinberg> it does seem like the trendy way to consume/produce them
kandu has joined #ocaml
<Drup> I would just bind jqueryUI, I'm pretty sure it has the same kind of thing already.
<Drup> but sure, if you like the react stuff, go on :p
<rgrinberg> i'd like to check out what ocsigen offers out of the box
<rgrinberg> ocsigen/js_of_ocaml i guess
<rgrinberg> where should i start?
<Drup> plenty of tutorials.
<rgrinberg> i meant the reactive dom stuff
<rgrinberg> but thanks i should probably get an overall familiarity
<Drup> but yes, overall familiarity is a good first step :D
<daftluck> So... I was bored and wrote a naive order-2 Markov chain generator in OCaml for fun to learn the language. Once I publish the code, would anyone like to critique it so I get better at the language?
<rgrinberg> daftluck: go for it
<rgrinberg> if you use reddit then r/ocaml is a great candidate for that sort of thing
<rgrinberg> we don't see much traffic here
<rgrinberg> there*
<daftluck> Cool, thanks.
<Drup> I agree with the reddit proposition
ygrek has joined #ocaml
bytbox has joined #ocaml
mji has joined #ocaml
<mji> Hi all. Any chance anyone knows the answer to this? I'm working on a project with a custom module called String, but I'd like to get at some of the core library String functions as well. Is there any way to do this?
<Drup> Don't call your internal module String.
<Drup> It's a bad idea
<mji> It's a coq export and a bunch of the code relies on it as a result. Hard to get around now but yeah I understand that
<mji> No other way to access it without renaming my string?
<Drup> not really, no :/
<Drup> if your new string is a submodule of Foo, you can do "module S = Foo.String" and use it like that
<mji> hmm sounds like i've got some work to do then. Thanks
q66 has quit [Quit: Leaving]
<t4nk387> Hey :)
<Drup> mji: or alias String, it works as well :)
<Drup> (the new String is necessarily a submodule anyway, the compiler would refuse it otherwise)
<t4nk387> Is rgrinberg here?
<rgrinberg> t4nk387: yeah
<t4nk387> Hey again
<t4nk387> I tried figuring out that problem
darkf has joined #ocaml
<t4nk387> I had some issues with it though
<t4nk387> I didnt know what the acc should start off being
<t4nk387> Thats what I have so far
rgrinberg has quit [Quit: Leaving.]
<t4nk387> And of course, the "in" doesnt work as we have no "let" inside the function
<t4nk387> So maybe we have to bring that outside the function?
BitPuffin has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
<rgrinberg> t4nk387: that `match list with` pattern match doesn't make sense in the if statement
<rgrinberg> t4nk387: what does the acc start with in the explicit recursion version?
shinnya has quit [Ping timeout: 245 seconds]
<t4nk387> errrmm
<t4nk387> I assume (0, 0, 0, 0)
<t4nk387> but thats assuming the list is of ints
rgrinberg has quit [Client Quit]
<t4nk387> is it (a', 0, a', 0)
rgrinberg has joined #ocaml
<rgrinberg> t4nk387: in the recursive function the accumulator is what you call loop with to kick off the recursion
<rgrinberg> so not (0,0,0,0) b/c not all of those fields are even ints
<t4nk387> right
<t4nk387> ok
<t4nk387> but how do you get the data type of the list you input?
<rgrinberg> you dont need it
<t4nk387> The acc must have it somewhere?
<t4nk387> x::xs -> loop x 0 x 1 xs ;;
<t4nk387> loop is being called using ints and the data type of x
<rgrinberg> not sure what you mean by "data type"
<t4nk387> so like
<rgrinberg> you should look at where x is obtained from
<rgrinberg> do you see?
<t4nk387> The list
<t4nk387> The list you input
<t4nk387> like [1;1;1;2;2;2;3;3;4;4]
<rgrinberg> ok, more exactly
<rgrinberg> what is x?
<t4nk387> An element
<rgrinberg> no
<rgrinberg> the first element
<t4nk387> Oh yeah
<t4nk387> Yeah, an element which happens to be the first on the first recursive call
<rgrinberg> yeah
<rgrinberg> so you should get that match statement outside the fold
<rgrinberg> match list with [] -> … | x::xs -> fold here
<t4nk387> ahhh
<t4nk387> didnt think of that ;)
<t4nk387> Something like that?
<rgrinberg> that looks very close
<rgrinberg> try running that
<t4nk387> okie dokie
<t4nk387> It returns a tuple :P
<t4nk387> Guess I need to grab maxelt
<rgrinberg> yep
lopex has quit [Quit: Connection closed for inactivity]
<t4nk387> its the first value, right?
<rgrinberg> its your code you should know
<rgrinberg> but yes it is
<t4nk387> Thought so ;)
<t4nk387> Just quickly, whats the syntax for list.sort?
<rgrinberg> i assume you mean the type
<rgrinberg> and you should ask teh top level
<t4nk387> I thought it was something like List.sort (fun x y -> x<y) list
<t4nk387> I did
<t4nk387> xD
<t4nk387> oh compare
<t4nk387> never mind xD
<t4nk387> The algorithm doesnt work on this case
<t4nk387> [1; 2; 3; 4; 4; 5; 6; 7; 8]
<t4nk387> returns
<t4nk387> (1, 2, 8, 1)
<rgrinberg> show your final code?
<rgrinberg> your call to fold_left should be made with xs i believe
<rgrinberg> not list
<rgrinberg> your already handling the first element in your acc
<t4nk387> darn
<t4nk387> Cheers
<t4nk387> didnt spot that
<rgrinberg> hence you ended up double counting your 1
<t4nk387> Done
<t4nk387> Thank you so much :D
<t4nk387> <3
<t4nk387> Sometimes I hate ocaml, sometimes I love it
<rgrinberg> np
<t4nk387> Still getting used to functional programming
<rgrinberg> i dont know how much you learned about the algorithm itself but i think you understand how to turn simple recursion into folding by now :D
<t4nk387> Hell yeah I did :P
<t4nk387> I shall certainly be using fold in the future
<t4nk387> instead of rec
<t4nk387> And I shall remember your name in case I have more issues :P
<t4nk387> Did I hear there was an ocaml subreddit?
<daftluck> There is! Keep an eye out for articles on Markov chain generators. :P
<t4nk387> hahaha ;)
<t4nk387> Im going to pretend I know what that is
<t4nk387> Anyway, goodnight all!
<rgrinberg> night!
<rgrinberg> reddit.com/r/ocaml
t4nk387 has quit [Quit: Page closed]
samrat has joined #ocaml
<struktured> daftluck: markov chain generators?
<struktured> daftluck: got a project link?
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
chaptastic has quit [Read error: Connection reset by peer]
Submarine has quit [Remote host closed the connection]
chaptastic has joined #ocaml
manizzle has joined #ocaml
marynate has joined #ocaml
dav has quit [Remote host closed the connection]
dav has joined #ocaml
mji has quit [Quit: Leaving]
samrat has quit [Quit: Computer has gone to sleep.]
larhat has quit [Quit: Leaving.]
chinglish has joined #ocaml
JokerDoom has quit [Ping timeout: 245 seconds]
ggole has joined #ocaml
mearnsh has quit [Ping timeout: 272 seconds]
mearnsh has joined #ocaml
jcloud has quit [Ping timeout: 272 seconds]
jcloud has joined #ocaml
Submarine has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
<daftluck> Hey, struktured! Sorry, I was away. I'm gonna throw the code up on GitHub shortly after I make some cosmetic changes.
<daftluck> I should warn you, though: it's a bit naive. I think I could definitely tail-call optimize some stuff, and I definitely do multiple operations on a list that I think degrades performance with a large corpus.
ygrek has quit [Ping timeout: 244 seconds]
<daftluck> It takes about five minutes to prepare a hash table with a 4.2-MB plain-text version of the KJV Bible, which seems long.
samrat has joined #ocaml
<ggole> Is it just a plain Hashtbl.t?
<ggole> And did you presize it?
<daftluck> Polymorphic Hashtbl.t. Keys are (string * string). Alas, I did not presize it, which would explain slowness.
<ggole> I would consider specialising that, polymorphic hashtables can be a bit slow
<daftluck> Yeah, Real World OCaml tried to warn me. :P
<ggole> I think rehashing involves invoking equal, so there might be a bit of a cumulative effect too
rgrinberg has quit [Quit: Leaving.]
jao has quit [Ping timeout: 244 seconds]
<daftluck> How so?
<ggole> If your (polymorphic) equal is slow, and lack of presizing leads to calling it more often, you get bit harder.
<daftluck> Aah.
<daftluck> I'll add that to my list of improvements for v2.0. ^_^
<daftluck> I definitely want to fix it up.
rgrinberg has joined #ocaml
psy_ has quit [Ping timeout: 264 seconds]
segmond has quit [Ping timeout: 252 seconds]
psy_ has joined #ocaml
WraithM has joined #ocaml
psy_ has quit [Max SendQ exceeded]
n1ftyn8 has quit [Ping timeout: 272 seconds]
n1ftyn8 has joined #ocaml
segmond has joined #ocaml
arj has joined #ocaml
MercurialAlchemi has joined #ocaml
WraithM has quit [Ping timeout: 245 seconds]
divyanshu has quit [Ping timeout: 272 seconds]
JokerDoom has joined #ocaml
divyanshu has joined #ocaml
pyx has joined #ocaml
<struktured> daftluck: cool looking forward to seeing it nevertheless
pyx has quit [Client Quit]
rgrinberg has quit [Quit: Leaving.]
ygrek has joined #ocaml
ggherdov has quit [Ping timeout: 272 seconds]
rgrinberg has joined #ocaml
keen________ has quit [Read error: Connection reset by peer]
keen________ has joined #ocaml
mearnsh has quit [Ping timeout: 272 seconds]
mearnsh has joined #ocaml
ggherdov has joined #ocaml
jgjl has joined #ocaml
mearnsh has quit [Ping timeout: 272 seconds]
mearnsh has joined #ocaml
nox__ has quit [Ping timeout: 272 seconds]
Arsenik has joined #ocaml
nox_ has joined #ocaml
psy_ has joined #ocaml
larhat has joined #ocaml
ggole_ has joined #ocaml
davine has joined #ocaml
davine has left #ocaml [#ocaml]
ggole has quit [Ping timeout: 264 seconds]
oscar_toro has joined #ocaml
ggole_ is now known as ggole
matason has joined #ocaml
dav has quit [Ping timeout: 256 seconds]
dav has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
milosn has quit [Ping timeout: 245 seconds]
antinomy has quit [Ping timeout: 265 seconds]
dav_ has joined #ocaml
dav has quit [Ping timeout: 240 seconds]
jonludlam has quit [Quit: Coyote finally caught me]
art-w has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: Leaving.]
fraggle-boate has quit [Ping timeout: 264 seconds]
milosn has joined #ocaml
art-w has joined #ocaml
fraggle-boate has joined #ocaml
fraggle-boate has quit [Ping timeout: 250 seconds]
arj has quit [Ping timeout: 260 seconds]
fraggle-boate has joined #ocaml
kakadu has joined #ocaml
arj has joined #ocaml
<ygrek> can I put @@ocaml.deprecated in .ml ?
<ygrek> looks like it is only checked on signatures?
<whitequark> it is afaik
<companion_cube> o/
<ygrek> poor me
lopex has joined #ocaml
chambart has joined #ocaml
AlexRussia has quit [Ping timeout: 252 seconds]
oscar_toro has quit [Remote host closed the connection]
Simn has joined #ocaml
ikaros has joined #ocaml
AlexRussia has joined #ocaml
<arj> there were some nicely formatted online docs for opam packages. Where were they again?
<companion_cube> opam-doc isn't ready yet afaik
<whitequark> it's not.
<arj> but there was some website (at least for core)
<arj> My history seem to have lost it and I can't find it anymore :/
<companion_cube> (I guess)
<arj> ah yes! :) it said opam documentation, so I thought it was opam related.
<arj> thanks
<companion_cube> it's generated by a version of opam-doc afaict
eyyub has joined #ocaml
jonludlam has joined #ocaml
dsheets has joined #ocaml
chambart has quit [Ping timeout: 245 seconds]
Submarine has quit [Quit: Leaving]
axiles has quit [Quit: Quitte]
koderok has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
eyyub has quit [Ping timeout: 252 seconds]
axiles has joined #ocaml
Arsenik has quit [Remote host closed the connection]
<companion_cube> whitequark: if I fix the generation of documentation in containers, should I alter the tag (ugly), make a bugfix release or wait for the next release?
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oscar_toro has joined #ocaml
<whitequark> either works
chambart has joined #ocaml
eyyub has joined #ocaml
<whitequark> although I'd not change a tag referenced elsewhere
<companion_cube> this will probably wait for the next release then, if you don't mind
<companion_cube> agreed
<companion_cube> so, you install documentation locally?
<whitequark> I dunno, I have that turned on for some reason
<whitequark> I don't think it actually installs it
<whitequark> I run it also on CI
jgjl has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
rand000 has joined #ocaml
nox_ is now known as nox
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
HACKING-FACEBOOK has joined #ocaml
lordkryss has joined #ocaml
oscar_toro has quit [Ping timeout: 272 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
mfp has quit [Read error: Connection reset by peer]
brendan has quit [Ping timeout: 250 seconds]
hbar has quit [Ping timeout: 255 seconds]
brendan has joined #ocaml
ontologiae has joined #ocaml
q66[lap] has quit [Ping timeout: 250 seconds]
HACKING-FACEBOOK has joined #ocaml
HACKING-FACEBOOK has quit [Client Quit]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HACKING-FACEBOOK has joined #ocaml
AlexRussia has quit [Ping timeout: 252 seconds]
<whitequark> companion_cube: how do I get a char Gen.t from a file?
oscar_toro has joined #ocaml
def-lkb has joined #ocaml
<companion_cube> hmm, I don't think I implemented it
mfp has joined #ocaml
<companion_cube> (I tend to use Sequence more often)
<companion_cube> it's also more complicated to handle the lifetime of an 'a gen than an 'a sequence
<flux> hmm, I may have persuaded a colleague to look into OCaml in his christmas holiday. one down, ~120+ to go ;-)
<companion_cube> if you wish, I can write Gen.IO with a few file-related functions (same as Sequence.IO)
<whitequark> I'm currently writing a custom sedlex lexbuf implementation
<whitequark> it needs backtracking
<whitequark> what's better suited for it, Gen or Sequence
<whitequark> ?
<whitequark> companion_cube: basically I need to remember position and go back to it afterwards
<companion_cube> awww, backtracking?
<companion_cube> like, arbitrary backtracking? that doesn't sound like any general-purpose iterator could do it
<whitequark> Gen.Restart ?
<companion_cube> Gen.Restart will restart from the beginning
<whitequark> oh
<companion_cube> I mean, if you want to backtrack to any point, don't use an iterator, use an abstraction over random-access
<whitequark> no, I want to backtrack to one remembered point
<companion_cube> I see
<companion_cube> interesting problem
<gasche> we could call this function, hmm, "clone"
<companion_cube> http://vrac.cedeela.fr/foo.html would something like this work?
<companion_cube> gasche: touché
<whitequark> that's not quite it
<whitequark> although, hm, probably
<whitequark> yes, it should work
<Drup> whitequark: can't you just store the state (for example, the offset in the file) and jump to it ?
<whitequark> well, I wanted a nice general solution
<Drup> yeah, and then you end up with Enum
<whitequark> actually, it looks like persistent_lazy will do what I want
<whitequark> Sequence.persistent_lazy
<companion_cube> it stills restarts from the beginning
<whitequark> grm :/
<whitequark> I could use Gen.start twice
<ggole> I think it's usually nice *or* general, not nice *and* general.
<companion_cube> gasche: the problem with clone is that combinators become really tough to write and understand
BitPuffin has joined #ocaml
<gasche> I think we could solve this problem if we had a clear semantics for what cloning means in presence of effects
<gasche> (and that would probably adress the efficiency issues as well)
<companion_cube> I'm not sure
<gasche> the problem is that somebody needs to get time to work on it
<companion_cube> maybe having an explicit state, like https://ocaml.janestreet.com/ocaml-core/111.28.00/doc/core_kernel/#Sequence
AlexRussia has joined #ocaml
<BitPuffin> the bytecode interpreter is written in portable ansi C right?
<companion_cube> C99 now, I think
<BitPuffin> ah :/
<gasche> the use of C99 is relatively minimal
<gasche> but "portable", I don't think so
<BitPuffin> was thinking if so maybe I would bootstrap my language in ocaml but if not then I guess I won't :P
hugomg has joined #ocaml
<whitequark> and what is the platform which doesn't have C99?
<whitequark> DOS?
<BitPuffin> not sure if plan9 has it for example
<BitPuffin> whitequark: windows 8.1? :P
<whitequark> neither it has C89
<BitPuffin> well unless you count gcc
<BitPuffin> well, it has almost c89
<whitequark> the parts which ocaml uses work on windows
<whitequark> and the two users of plan9 will certainly be able to build it themselves
<ggole> I suspect non-MS C99 compilers are available even on DOS
<whitequark> ggole: that's apparently an issue.
<whitequark> don't ask why I know.
<gasche> the interpreter uses threaded code with variable labels, but there are #ifdef around this part
<BitPuffin> whitequark: well I want to be able to port my language to all the weirdest places :P
<BitPuffin> so I figured C89 or something written in C89 would be the best option
<BitPuffin> and I like ocaml, it's fun
<ggole> whitequark: which bit is an issue? non-MS or DOS?
<whitequark> ggole: C99, apparently no one really makes that for DOS
<ggole> Hmm.
<whitequark> without extenders, that is.
samrat has joined #ocaml
<whitequark> with DJGPP or similar you can easily find them
<BitPuffin> what about freedos? does that have C99=
<gasche> doesn't gcc run on those architectures?
koderok has quit [Quit: koderok]
<gasche> (systems)
<whitequark> gasche: not in pure realmode
<BitPuffin> whitequark: is byterun c99 as well? or just bytecomp
<whitequark> BitPuffin: build it with --std=c99 and you will see
<BitPuffin> you mean -std=c89
<companion_cube> gasche: my grief with clone is it's too complicated, and combinators make it worse
<companion_cube> here I only suggest a "saver" function
<companion_cube> grr
<companion_cube> save/restore functions for the base iterator
<gasche> I think you could simplify clone by assuming you only require semi-persistence
<gasche> that is, the fact that you never go back to the main enum after you start using the cloned one
<whitequark> BitPuffin: the three commits that refer to C99 are about {,u}int{32,64}_t, memcpy, snprintf, and built-i 64-bit type
<gasche> which is enough for many backtracking use-cases
<gasche> BitPuffin: another solution is to use OCamlCC that compiles OCaml bytecode into C code
<whitequark> companion_cube: so I can solve my problem by doing Gen.persistent_lazy
<whitequark> and then Gen.start to continue iterating
<whitequark> I wonder how inefficient that is, especially after many iterations?
<gasche> you still have to compile the runtime, however
tane has joined #ocaml
<whitequark> companion_cube: I have a feeling it will add one level of closures on every backtrack
<companion_cube> whitequark: oh, right
Hannibal_Smith has joined #ocaml
Hannibal_Smith has quit [Read error: Connection reset by peer]
<companion_cube> whitequark: if you look into gen.ml, there is the "MList" module
Hannibal_Smith has joined #ocaml
Hannibal_Smith has quit [Read error: Connection reset by peer]
<companion_cube> it is the storage used by persistent/persistent_lazy and should provide a relatively efficient access by index
<whitequark> I don't need access by index though
<companion_cube> sure
Hannibal_Smith has joined #ocaml
Hannibal_Smith has quit [Read error: Connection reset by peer]
<companion_cube> but that could be the basis of your checkpoints
<companion_cube> if it were exposed properly
<BitPuffin> whitequark: hmm, as far as I'm aware a lot of the platforms that c89 is the only supported the inttypes.h header is available
<BitPuffin> and probably memcpy snprintf as well
<BitPuffin> what do you mean by built-i 64-bit type?
<BitPuffin> gasche: it generates ansi c?
<whitequark> uint64_t should be available.
<BitPuffin> yeah, at least if it's 64 bit :P
<whitequark> hm?
<BitPuffin> replacing memcpy with a sloer portable one is also easy
<whitequark> uint64_t can as well be available on a 8-bit platform
<BitPuffin> yeah I guess
<companion_cube> whitequark: so, save/restore would fit your needs?
<companion_cube> rather than persistent (which might not be optimal anyway)
<BitPuffin> whitequark: what do you think about memcpy then?
<BitPuffin> and the others
<companion_cube> also I suppose, for efficient backracking, you need Unix.lseek
<BitPuffin> snprintf
<companion_cube> or some memory mapping
<companion_cube> ooohhhh there's seek_in
<companion_cube> never mind
bytbox has quit [Remote host closed the connection]
ikaros has left #ocaml ["Ex-Chat"]
<whitequark> BitPuffin: it's your platform, figure out what it supports or does not
<whitequark> companion_cube: yse
<companion_cube> ok, I can try to support this
<whitequark> BitPuffin: imo any attempt to write pre-c99 code today is a complete waste of time anyway
<companion_cube> +1
<companion_cube> (except embedded systems, I guess)
<whitequark> nah
<whitequark> embedded migrated to c99 long ago too
<companion_cube> ok
<whitequark> well, there are a few outliers like sdcc with pic16 or 8051, but who cares
<whitequark> *pic8
<companion_cube> whitequark: if you wish, I can try to write a basic proof of concept of save/restore for Gen, + IO functions
<whitequark> any embedded worth doing has c99.
<whitequark> companion_cube: that would really help
<BitPuffin> whitequark: I agree but a lot of platforms only support c89
<BitPuffin> c89 is a pain in the ass
<whitequark> very few platforms worth using only have c89
<whitequark> lack of even c99 means nothing interesting runs there
toolslive has joined #ocaml
<BitPuffin> whitequark: well I'd argue that p9 is interesting and it has c based on ansi with ommisions and extensions :P
<BitPuffin> but yeah I reckon ocaml _should_ be portable enough for at least an initial bootstrapping interpreter
<toolslive> I'm having some problems with ctypes: I try to wrap the statvfs struct in sys/statvfs but the structs definition is full of #ifdefs. Can I handle this in a generic way?
<whitequark> no
<whitequark> this is really the worst possible case for wrapping
<toolslive> any suggestions here?
<whitequark> write the wrapper in C
<whitequark> perhaps abstract it in C and use ctypes around that
AltGr has left #ocaml [#ocaml]
shinnya has joined #ocaml
<companion_cube> ok, it's not totally trivial to find a good interface for save/restore
<BitPuffin> aw
<BitPuffin> the ocaml cygwin package is outdated
_5kg has quit [Ping timeout: 240 seconds]
<adrien> it targets cygwin anyway
<BitPuffin> I know
<BitPuffin> but it's nice to have it installed via a package manager :P
Hannibal_Smith has joined #ocaml
hbar has joined #ocaml
<companion_cube> if you want to try, there's an opam file to pin
nojb has joined #ocaml
<whitequark> I actually just realized it's not suitable for me, sorry
<whitequark> just this minute literally
<companion_cube> erf
<companion_cube> what's the problem?
<whitequark> because I really want to backtrack on the stream of decoded characters, and Uutf and Uunf both have a state
<whitequark> and Uutf can't even be cloned
<companion_cube> oh, I see.
araujo has joined #ocaml
araujo has joined #ocaml
araujo has quit [Changing host]
<whitequark> soooo what I want is more like a lazy linked list
<companion_cube> that should be patchable within Uutf?
<whitequark> with the last entry pointing to a generator
<companion_cube> oh my :D
<whitequark> except without the linked list part, cause that's slow
<nojb> is it ok to use the polymorphic compare with bigstrings (= char bigarrays) ?
<companion_cube> well, Gen.persistent, basically?
<companion_cube> persistent_lazy sorry
<whitequark> hmmm
<companion_cube> I mean, it stores the generated content
<whitequark> but with a lazy linked lists, it's pure, so I can backtrack easily
<companion_cube> persistent_lazy is kind of pure
<companion_cube> I mean, externally, you never modify what's been generated
<companion_cube> you can only append
<whitequark> see, the problem with persistent_lazy is that if I call persistent_lazy (start (persistent_lazy (start (g))))
<whitequark> I get O(n) slowdown for the case where the generator is actually invoked
<companion_cube> well, if the internal MList were exposed, you would just persistent_lazy (some_uutf_int_gen ())
<companion_cube> and then backtrack on the MList
<companion_cube> by saving the offset
<whitequark> yes, I think that's what I want
<companion_cube> I'm a bit annoyed with Gen.Restart, it's not that useful actually...
<companion_cube> (unrelated)
vfoley has quit [Remote host closed the connection]
badkins has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
larhat has quit [Quit: Leaving.]
citrucel has joined #ocaml
jabesed has joined #ocaml
_5kg has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
badkins_ has joined #ocaml
tani has joined #ocaml
<daftluck> So apparently the ^ operator allocates a new string every time.
<companion_cube> yes
<daftluck> That would also explain my slowness problems. :P
<companion_cube> if you want to concatenate a lot of strings, consider using Buffer instead
badkins has quit [Ping timeout: 258 seconds]
<daftluck> Thanks, I'll give that a look.
seanmcl has joined #ocaml
tane has quit [Ping timeout: 272 seconds]
<daftluck> Honestly, I should just go straight from reading in lines to populating the hash table; I could avoid a lot of intermediate, unnecessary steps.
<daftluck> I just need to handle the case of splitting an n-gram across lines.
<daftluck> Which shouldn't be hard.
badkins_ is now known as badkins
<ggole> daftluck: what are you actually doing?
<citrucel> join #machinelearning
citrucel has left #ocaml [#ocaml]
<daftluck> Generating text with Markov chains.
darkf has quit [Quit: Leaving]
chaptastic has quit []
<ggole> So you're collecting words? If you have a whole bunch, maybe a simple lexer would be the way to go.
ygrek has joined #ocaml
<ggole> That would avoid constructing temporary strings even for the lines.
jgjl has joined #ocaml
<whitequark> sedleeeex
<companion_cube> whitequark: do you know how sedlex' regex matching engine works?
<companion_cube> (especially, how it handles unicode)
<whitequark> companion_cube: I had a cursory look at it. why?
<companion_cube> because Re doesn't have unicode and it's not obvious how to handle it
<companion_cube> (jump table based on characters do not work anymore with unicode)
<whitequark> why not?
jgjl has quit [Client Quit]
<whitequark> sedlex uses a jump table
<companion_cube> because the jump table would be arbitrarily large?
<whitequark> oh, it does some binary search kinda thing
<companion_cube> if it's on codepoints, I mean
<companion_cube> ok
<whitequark> look at the output
<companion_cube> like, a "sparse" jump table?
<whitequark> yes, exactly
<ggole> You could do the common case (ascii) as a guarded jump table
<ggole> if 7-bit-char then table[char] else <slow thing here>
<whitequark> ggole: that doesn't make any sense
<whitequark> ascii is not a common case where you handle a document entirely in russian
<ggole> Why not?
<whitequark> essentially, it's all the same "fuck you if you're not english" attitude
<companion_cube> well, for some applications ascii is still the common case, I think (code, base64...)
<ggole> So you suggest making it all equally slow, even though there is shitloads of english text everywhere?
<whitequark> short answer: yes
<whitequark> long answer: if it's unacceptably slow on non-english, it doesn't have a right to exist
<ggole> OK, I'll agree with that part
<whitequark> and sedlex's decision tree thing is 60 LOC long and the generated code appears quite fast to me https://github.com/alainfrisch/sedlex/blob/master/src/syntax/ppx_sedlex.ml#L11-L70
<companion_cube> btw, how efficient is sedlex?
<whitequark> it's several (think under five) ifs plus an array lookup per character
<companion_cube> oh, but it *generates* the code for the lookup table? that will not do for Re
<whitequark> hmmm
<whitequark> how so?
<companion_cube> it might be slower (too slow)
<whitequark> you can do the exact same thing using ... ... ... a closure
<companion_cube> otoh maybe it's still ok if the table is a tree
<whitequark> it will even have the exact same speed for ASCII
<whitequark> because it will simply have no partitions at all
<whitequark> so just an array lookup.
tani is now known as tane
<companion_cube> (if c < 255 then lookup_table else decision_tree) ?
<whitequark> no, just always decision_tree
nojb has quit [Quit: nojb]
<ggole> That *is* a decision tree, really
<whitequark> if the range from first to last known character is less than 8192, sedlex generates just one table
<ggole> Just one that's rather favourable to ascii
<whitequark> generally, it does not generate table bigger than 8192
<whitequark> so if you need a bigger range, it makes more tree nodes instead
<companion_cube> ok, ok
<companion_cube> of course it matches on codepoints, I suppose
<whitequark> yes
<whitequark> Re also matches on ints internally
<companion_cube> ints that are actually ascii bytes
<whitequark> so? it doesn't matter
<companion_cube> but I get the point, it's possible to combine array lookups with more complicated decision trees
<whitequark> unless it assumes elsewhere that those ints are < 255, which is incredibly bad design
<whitequark> (how about "private int")
<whitequark> companion_cube: yeah, I think modifying it is trivial
<companion_cube> currently it assumes the ints are < 255 I think, since there is no decision tree
<whitequark> well, maybe it would just generate a really big table
<companion_cube> not a good idea for unicode ^^
<whitequark> so, Re would need to add decision tables, parse the regexps with Uutf, and use Uucd for character classes
<companion_cube> yep :s
<companion_cube> well, probably use Uucd for classes, but be generic on its source of codepoints
<companion_cube> (which could be a rope, or Uutf on some channel, or...)
<whitequark> I mean for regexps themselves
<whitequark> not input
<companion_cube> oh right
<companion_cube> well Re can also build regex from combinators
<whitequark> not mutually exclusive
<MercurialAlchemi> that's the thing I found most interesting about it
<MercurialAlchemi> companion_cube: looks like the PR I made for toml is going to be a go (convenience functions)
<companion_cube> neat
<companion_cube> btw, did you notice something about the parse error's locations
<MercurialAlchemi> less bytes sacrified to the gods of API churn
<companion_cube> ?
<MercurialAlchemi> hm, no?
<MercurialAlchemi> they're wrong?
<companion_cube> looked like it, would be nice if you confirmed
<MercurialAlchemi> I'll try and have a look
<MercurialAlchemi> if I can't make it work, I'll hook up a random int generator for the line and column
<whitequark> wow, unicode normalization is such an enormous pain
<daftluck> ggole: I'm collecting lines, but eventually they'll all be split into individual words, yeah.
<daftluck> I'm guessing ocamllex would be the way to go for lexing.
<whitequark> sedlex.
<whitequark> ocamllex doesn't handle unicode
<daftluck> Aah.
<daftluck> Oh yeah. Scrollback.
koderok has joined #ocaml
jonludlam has quit [Quit: Coyote finally caught me]
koderok has quit [Remote host closed the connection]
ygrek has quit [Remote host closed the connection]
<companion_cube> too bad sedlex requires 4.02
ygrek has joined #ocaml
<nicoo> companion_cube: Y'a moyen de te remotiver sur batteries-ng si t'as de l'aide ? :3
<Drup> nicoo: wrong chan :)
<Drup> (or wrong language)
<MercurialAlchemi> companion_cube: I'll need to investigate some more, it does seem off sometimes
<nicoo> Oops
<nicoo> companion_cube: Could you be convinced to work again on batteries-ng, asusming some people help you?
<MercurialAlchemi> (which is kind of odd, it's a) not rocket science and b) copy-pasted from the doc)
<Drup> (nicoo: my understanding was that it was not an issue of manpower, but of acceptance ...)
<MercurialAlchemi> do we also have a batteries-ng ?
<MercurialAlchemi> or is this just a branch with more stuff ?
<Drup> not more, less :D
<nicoo> Drup: I remember C³ complaining about it being too much effort, but that might be my being sleep-deprived
<companion_cube> it's a lot of efforts, especially if it's not merged in the end
<companion_cube> batteries needs to have things *removed*, not really added
<MercurialAlchemi> right
boogie has quit [Quit: Leaving...]
larhat has joined #ocaml
Valdo has quit [Excess Flood]
<Drup> companion_cube: it was too much effort to split all the stuff up, no ?
Valdo has joined #ocaml
nojb has joined #ocaml
<companion_cube> which splitting are you talking about precisely?
<companion_cube> splitting into unix/non-unix was done in batteries-light
<Drup> splitting the patch
<companion_cube> ah
HACKING-FACEBOOK has quit [Ping timeout: 272 seconds]
nojb has quit [Quit: nojb]
chaptastic has joined #ocaml
rand000 has quit [Ping timeout: 250 seconds]
<companion_cube> nicoo: why do you care about batteries anyway?
bytbox has joined #ocaml
<nicoo> companion_cube: I use it :o
<adrien> you're so 2014!
<companion_cube> :)
<companion_cube> nicoo: what do you use inside?
jonludlam has joined #ocaml
bytbox has quit [Ping timeout: 255 seconds]
struktured has quit [Ping timeout: 258 seconds]
<nicoo> adrien: I think you have future-shock
<nicoo> companion_cube: Result (seriously, life without an error monad isn't worth living :þ) BitSet, Option, and a lot of the functions added to stdlib's module when it makes sense.
planetlarg has joined #ocaml
<companion_cube> BitSet is a bitvector?
<companion_cube> well, nothing containers doesn't provide
<companion_cube> but of course I understand you stick to batteries
<companion_cube> do you use BatIO or BatEnum, just for my personal statistics? :)
struktured has joined #ocaml
bytbox has joined #ocaml
<nicoo> Ahahahahahahahah
<nicoo> Enough said.
<nicoo> companion_cube: Basically, I've been sticking to batteries when it is in a potentially-public-facing API
matthewhill has joined #ocaml
matthewhill has quit [Client Quit]
<nicoo> But I might just give up and jump on the containers bandwagon, I'm already using it for personal stuff :þ
<companion_cube> :D
<companion_cube> hmm yeah, of course, if you expose batteries' types, it's hard to change your API
<companion_cube> (that's why I like structural types)
milosn has quit [Ping timeout: 260 seconds]
arj has quit [Quit: Leaving.]
planetlarg has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
ontologiae has joined #ocaml
<adrien> nicoo: you don't have to give up: you're sufficiently far away that companion_cube cannot coerce you into using containers!
badkins has quit [Ping timeout: 240 seconds]
<nicoo> adrien: He doesn't need explicit coercion, I'm covariant.
eyyub has quit [Ping timeout: 255 seconds]
<adrien> I knew he was doing it sneakily =/
luigy has quit [Ping timeout: 255 seconds]
toolslive has quit [Quit: Leaving]
planetlarg has joined #ocaml
<MercurialAlchemi> companion_cube: I think the error location is 'correct' from the parser's point of view, but the problem is that the parser should halt sooner (eg, it tries to parse a group key but doesn't fail at the first linebreak)
<companion_cube> http://vrac.cedeela.fr/truc.toml on this file I have an error "at line 3, column 32"
<companion_cube> wtf is column 32 here?
<MercurialAlchemi> hmm
<Leonidas> is there some way to compose show methods?
<MercurialAlchemi> there is something screwed up somewhere
<Leonidas> like if i have a showMytype, can I compose it with showList to get a showMyTypeList?
<Leonidas> I believe batteries had something like this
MrScout has joined #ocaml
planetlarg has quit [Remote host closed the connection]
rand000 has joined #ocaml
<companion_cube> Leonidas: what's your definition of "show method"?
<companion_cube> 'a -> string?
<Leonidas> companion_cube: yup
tharugrim has quit [Ping timeout: 245 seconds]
<companion_cube> then most "standard libraries" provide printer combinators
<companion_cube> or you can play with ppx_deriving if you're edgy
<Leonidas> I cheated by declaring type whatever = mytype list [@@deriving show] but that is cheating, somehow
<companion_cube> [%show: int list]
tharugrim has joined #ocaml
<whitequark> (showList showMytype) should work if showList is appropriately generic
<whitequark> and I don't see any reason it would not be
<Leonidas> any idea where I can find Batteries' printer combinators?
<Leonidas> I might need an alternative stdlib anyway
q66 has joined #ocaml
jwatzman|work has joined #ocaml
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
<companion_cube> there's a BatFoo.print in each module as far as I remember
<companion_cube> of course, containers also provides printers :>
mawuli has joined #ocaml
<rgrinberg> core_kernel is a friendly library for printing your stuff if i may say so ;)
<whitequark> friendly?
<rgrinberg> it has sexp printers on everything
marynate has quit [Quit: Leaving]
<rgrinberg> i just interjected you guys without much context so it could just be off topic :D
<Leonidas> yeah, if compiling core wasn't such a pain
<rgrinberg> Leonidas: you program on a raspberry pi or something?
<rks`> ggole: ping
<Leonidas> rgrinberg: no, but it had some severe build issues on 32 bit lately
<rgrinberg> ocaml is crippled on 32 bit regardless
<ggole> rks`: pong
<rks`> I need your help writing some elisp :>
<ggole> Sure.
<rks`> more precisely
jonludlam has quit [Quit: Coyote finally caught me]
<rks`> I would appreciate it if you could review some elisp I just wrote (I'm about to update an issue on merlin's bugtracker, i'll use their @ thingy so you are mailed)
<ggole> OK, I'll look for that.
antinomy has joined #ocaml
<rks`> thank you :)
phserr has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
jonludlam has joined #ocaml
<phserr> Is there a documented way to have a "live ocaml system" inside an ocaml project? So that I could use ocaml to configure and execute actions in realtime somewhat like emacs lisp in emacs.
yomimono has quit [Ping timeout: 245 seconds]
<phserr> Being more specific: A natively compiled ocaml program that exposes an ocaml api for configuration and "realtime execution" of ocaml (probably interpreted or compiled to bytecode) code
<mrvn> batecode can run the toplevel on a string
<rks`> ggole: I must go, I actually don't have the time to update the issue right now, I'll do it later tonight and ping you as I said
<rks`> thanks again
<ggole> OK, if I'm not still awake I'll get into it tomorrow.
<rks`> OK :)
luigy has joined #ocaml
Hannibal_Smith has joined #ocaml
def-lkb is now known as def`
<phserr> mrvn: batecode?
<mrvn> bytecode
badkins has joined #ocaml
<phserr> oh, ok - thought it was a library or something and couldn't find any info
<phserr> do you have any pointers for me to look at about integrating it with compiled ocaml?
<mrvn> you can't. it's a bytecode only thing
<ggole> compiler-libs, maybe?
<ggole> I don't think this would qualify as a "live" system though
<ggole> You can't change what's already there, just compile new stuff.
milosn has joined #ocaml
<phserr> I see
<ggole> I mean, maybe that's enough. But it wouldn't be like emacs where you can redefine anything.
struktured has quit [Ping timeout: 258 seconds]
<phserr> I have a lisp background, so perhaps I'm still thinking "in lisp"
<phserr> but if I can have something that works like a plugin system - it will probably be good enough for this project
<def`> phserr: https://github.com/janestreet/ocaml_plugin is a way to use ocaml for configuration
<def`> it bundles a compiler and linker
nojb has joined #ocaml
<phserr> thank you
<def`> (it depends on Janestreet core)
<rgrinberg> and async as well...
q66 has quit [Quit: Leaving]
<def`> yep
<def`> what is the recommended way to derive pretty-printers nowadays?
<phserr> seems like this will help achieve what I need
<phserr> thanks again
<rgrinberg> def`: sexp?
<def`> phserr: you're welcome :)
<def`> rgrinberg: if you say so, I am just curious, I don't know much on the topic :)
q66 has joined #ocaml
<rgrinberg> pretty popular
<smondet> def`: all the ppx_deriving things also
struktured has joined #ocaml
Hannibal_Smith has quit [Ping timeout: 240 seconds]
axiles has quit [Quit: Quitte]
<def`> ok thanks
dsheets has quit [Ping timeout: 255 seconds]
<hugomg> Does anyone know if its possible in Ocaml to automatically derive "fmap" for a datatype, like you can in Haskell?
<nojb> use functors ?
<hugomg> I don't see how ML functors would help here. The problem is that you want to avoid writing fmap by hand.
WraithM has joined #ocaml
<hugomg> Iḿ thinking of how Sexp can generate the conversion functions automatically with "with sexp" and Haskells deriving mechanism
<nojb> hugomg: right, I misunderstood your question - maybe ppx_deriving is what you are looking for
<ggole> ppx_deriving can emit folds and maps iirc
<ggole> (I've really gotta play with that some time.)
phserr has quit [Remote host closed the connection]
mort___ has joined #ocaml
nojb has quit [Quit: nojb]
slash^ has joined #ocaml
<MercurialAlchemi> companion_cube: there are good news and there are bad news
<hugomg> thanks, I'll check that link out ggole.
<MercurialAlchemi> good news are, the line and column now get updated when you have line endings in a string
<MercurialAlchemi> bad news are, the bloody parser still stops at position byte 43 in your example
<MercurialAlchemi> at the end of 'not'
kakadu has quit [Quit: Page closed]
<MercurialAlchemi> mm
Hannibal_Smith has joined #ocaml
<MercurialAlchemi> I guess that's the last token it managed to lex but it didn't fit any rule
nojb has joined #ocaml
axiles has joined #ocaml
manizzle has quit [Ping timeout: 258 seconds]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
matason has quit [Quit: Leaving...]
<struktured> daftluck: cool looking forward to seeing it nevertheless
samrat has quit [Quit: Computer has gone to sleep.]
rgrinberg has quit [Quit: Leaving.]
Thooms has joined #ocaml
<pippijn> ggole: that's kind of interesting
<pippijn> ggole: but doesn't solve my problem :\
milosn has quit [Read error: Connection reset by peer]
<pippijn> (which I solved with camlp4)
milosn has joined #ocaml
<ggole> Eh?
<hugomg> Could anyone help me with an ocamlbuild question? I have a module that uses the re2 package so right now I am calling ocamlbuild with the "-pkg re2" flag. Is there a way to put that in the _tags file so I don't need to pass the flag all the time?
q66 has quit [Remote host closed the connection]
q66 has joined #ocaml
claudiuc has joined #ocaml
_JokerDoom has joined #ocaml
<hugomg> ah, looks like this line does what I want:
<hugomg> <**/*>: package(re2)
<nojb> or: true: package(re2)
<hugomg> I wonder if it wouldn't be better to just link re2 against the modules that need it though instead of using it for everyone
<hugomg> or is that a stupid idea?
JokerDoom has quit [Ping timeout: 244 seconds]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ebzzry__ has quit [Ping timeout: 245 seconds]
q66[lap] has joined #ocaml
ebzzry has joined #ocaml
manizzle has joined #ocaml
kakadu_ has joined #ocaml
WraithM has quit [Ping timeout: 260 seconds]
ggole has quit []
<jbalint> does the "-" here mean anything special? type -'src encoder = {
rgrinberg has joined #ocaml
hugomg has quit [Ping timeout: 265 seconds]
dsheets has joined #ocaml
<companion_cube> def`: ppx_deriving_yojson
<companion_cube> of course ppx_deriving.show makes for nice printers too
rks` has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: Leaving.]
nojb has quit [Quit: nojb]
slash^ has quit [Read error: Connection reset by peer]
matason has joined #ocaml
matason has quit [Client Quit]
chaptastic has quit []
MrScout_ has joined #ocaml
chambart has quit [Ping timeout: 250 seconds]
MrScout has quit [Ping timeout: 258 seconds]
MrScout_ has quit [Ping timeout: 258 seconds]
samuel02 has joined #ocaml
<def`> jbalint: it means encode is contravariant in its 'src parameter
rgrinberg has joined #ocaml
Arsenik has joined #ocaml
struktured has quit [Read error: Connection reset by peer]
eyyub has joined #ocaml
arj has joined #ocaml
pgomes has joined #ocaml
Valdo has quit [Excess Flood]
milosn has quit [Ping timeout: 245 seconds]
<jbalint> def`: thanks
Valdo has joined #ocaml
BitPuffin has quit [Ping timeout: 260 seconds]
arj has quit [Quit: Leaving.]
struktured has joined #ocaml
nlucaroni has joined #ocaml
<Drup> rgrinberg: you should try ppx_derving :p
larhat has quit [Quit: Leaving.]
Hannibal_Smith has quit [Quit: Leaving]
badkins has quit [Ping timeout: 272 seconds]
manud has joined #ocaml
<pippijn> ppx_derping
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
badkins has joined #ocaml
MrScout has joined #ocaml
<companion_cube> whitequark: maybe the cloning stuff will go into GenClone, or somethng like this
milosn has joined #ocaml
pgomes has left #ocaml ["Leaving"]
samuel02 has quit []
Simn has quit [Quit: Leaving]
badkins has quit []
rks` has joined #ocaml
chambart has joined #ocaml
<rgrinberg> companion_cube: qcheck ping
<companion_cube> oh, yes, right
<rgrinberg> would like to try ppx_test + qcheck
<companion_cube> ppx_test?
<companion_cube> [@ qcheck gen prop] ?
bezirg has joined #ocaml
<companion_cube> something like this?
<Drup> rgrinberg: btw, when I arrived at the office this morning, jerome already had merged/review your stuff, no need to push for it n_n
<companion_cube> I'd be more interesting in you completing/reviewing my branch of ppx_deriving that generates random generators
<rgrinberg> Drup: awesome
<rgrinberg> although i don't think qcheck_ounit would be helpful yet
<rgrinberg> so annoying how camlspotter uses bitbucket :/
<companion_cube> Drup, rgrinberg: an opinion about the behavior of Re.split_full on empty delimiters?
<rgrinberg> companion_cube: yeah i haven't checked that out yet. will do
<rgrinberg> where is ounit hosted at anyway?
<companion_cube> rgrinberg: btw it should be easy to disable double-printing in qcheck_ounit
<companion_cube> QCheck.run shouldn't print when ?out isn't provide
<companion_cube> d
<rgrinberg> i do want qcheck.run to print b/c it has the pretty printer though
<rgrinberg> i just dont want it to print the name
<companion_cube> ah, you mean it doesn't print two lines?
<companion_cube> actually I'd like to see what it prints on a simple test
<rgrinberg> ./qCheck_ounit_test.byte
<rgrinberg> i actually find the output ok
<companion_cube> oh.
<rgrinberg> any emacs users know if tuareg was updated for ppx?
<rgrinberg> want to rip off some stuff for vim
<rgrinberg> if possible
<Drup> I don't know about tuareg but ocp-indent handles it well
<rgrinberg> whatever happened to this http://caml.inria.fr/mantis/view.php?id=6402
bezirg has left #ocaml [#ocaml]
bezirg has joined #ocaml
bezirg has left #ocaml [#ocaml]
MrScout has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
MrScout has joined #ocaml
badon has quit [Write error: Connection reset by peer]
NoNNaN has quit [Write error: Connection reset by peer]
emery has quit [Remote host closed the connection]
nicoo has quit [Write error: Connection reset by peer]
<companion_cube> rgrinberg: I have problems with your PR
MrScout has quit [Ping timeout: 244 seconds]
<companion_cube> the test doesn't compile
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg1 has joined #ocaml
<rgrinberg1> companion_cube: hmm works for me?
<rgrinberg1> what's the error
<companion_cube> it doesn't find >:::
<companion_cube> anyway
<rgrinberg1> do you have ounit?
<companion_cube> yes
<companion_cube> there is no "open" in the file
<companion_cube> strange
<companion_cube> it's not what is in the PR, is it?
<rgrinberg1> companion_cube: oasis complains about how you set your license for some reason
<companion_cube> right, ignore it :p
<companion_cube> anyway, I like >:: and ~:: the way I defined them
<rgrinberg1> sure :)
badon has joined #ocaml
<companion_cube> waiting for the PR to update :p
<rgrinberg1> companion_cube: you use emacs right?
<companion_cube> no
<companion_cube> vim
<companion_cube> hmmm, oasis syntax file
<companion_cube> I might steal just this one bit
<rgrinberg1> go for it :)
<rgrinberg1> i also stole m. mottl's 4.02 improvements
<companion_cube> so, what about qcheck? ^^
tane has quit [Quit: Verlassend]
<rgrinberg1> so what's the problem again?
<rgrinberg1> oh
<companion_cube> the file you showed me isn't the one on the PR
<rgrinberg1> ok i see
<companion_cube> _oasis coloring is very nice!! Neat!
<rks`> rgrinberg1: that looks pretty good
<rgrinberg1> btw, it was compiling me b/c i had a stale artifact
<companion_cube> rgrinberg1: pleease add the infix operators! :D
chambart has quit [Ping timeout: 264 seconds]
<companion_cube> (and check out my ppx_deriving branch if you're interested in not writing random generators by hand)
mort___ has quit [Quit: Leaving.]
eyyub has quit [Ping timeout: 264 seconds]
<companion_cube> ok, I'll add those by myself
jao has quit [Ping timeout: 240 seconds]
<rgrinberg1> (>::) is not really analagous
<rgrinberg1> as it takes a function
<rgrinberg1> what's ~:: anyway?
<rgrinberg1> i guess i'll find out shortly
<companion_cube> it's a prefix operator to convert a QCheck.test into a OUnit.test
<companion_cube> maybe >:: is useless, but ~:: might be useful to add a Qcheck test to regular OUnit tests
<rgrinberg1> it's nice that Arbitrary is exposed like that
<rgrinberg1> you can add generators to your lib without taking on qcheck as a dependency
<rgrinberg1> that's annoying in haskell as you have to take quickcheck as a dependency to make an arbitrary instance
<companion_cube> oh, right
<companion_cube> you mean the type is open
<companion_cube> opam file incoming for qchec
<companion_cube> k
<rgrinberg1> awesome. :D i want an opam repo with master branch versions of everything
<companion_cube> done
<companion_cube> next step should be ppx_deriving.random
<companion_cube> although it's harder to do this properly :(
Arsenik has quit [Remote host closed the connection]
<companion_cube> good night anyway
<rgrinberg1> good night
<rgrinberg1> will give your re PR a review
<rgrinberg1> did you rebase it btw?
<companion_cube> I think so
<rgrinberg1> yep looks good
kakadu_ has quit [Quit: Page closed]
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ocaml
rand000 has quit [Quit: leaving]
rgrinberg1 has quit [Quit: Leaving.]
oscar_toro has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml