<jmiven>
re2 has a dependency on Core I believe, so it's maybe not the best choice if you want to use Base
<companion_cube>
to core_kernel, it seems
<jmiven>
right!
<M-martinklepsch>
I guess I'll just give `re` a spin
<companion_cube>
#require "re.perl";;
<companion_cube>
let re = Re_perl.compile_pat "[ ]{5}";;
<companion_cube>
Re.split re "some string";;
sapristi has joined #ocaml
<M-martinklepsch>
I don't really care about Core/Base whatnot, just want to use what's most popular/has best documentation, may totally be that that is not Core/Base as well :D
<companion_cube>
popularity isn't really clear
<companion_cube>
the community is fragmented
<M-martinklepsch>
companion_cube: Thanks for the snippet, I thought I got it to compile using `open Re_perl` but now I'm only getting Unbound module. Also when I add the require line I'm getting "Error: optcomp: unknown directive"... I'm using jbuilder and added `re` as a dependency
FreeBirdLjj has joined #ocaml
<companion_cube>
you need to add re.perl as a dependency
<companion_cube>
open is unecessary though, you can (and should) use qualified names
sepp2k has joined #ocaml
<M-martinklepsch>
companion_cube: awesome, that worked!
FreeBirdLjj has quit [Ping timeout: 268 seconds]
<companion_cube>
:)
malina has joined #ocaml
mbuf has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
malina has quit [Quit: Throwing apples of Montserrat]
argent_smith has quit [Quit: Leaving.]
andrejbauer has joined #ocaml
<andrejbauer>
Anyone out there? I have a question about OPAM.
<companion_cube>
try anyway
spew has joined #ocaml
raphaelss has quit [Remote host closed the connection]
th5 has joined #ocaml
enterprisey has joined #ocaml
<Drup>
companion_cube: Re_perl, really ?
<Drup>
pcre was not enough ?
<Drup>
(on, in this case, posix)
Duns_Scrotus has left #ocaml [#ocaml]
<companion_cube>
I'd rather use one syntax everywhere
<Drup>
Ok, but the perl one is really disgusting
<companion_cube>
it's close to vim's one, I think, so I'm mostly used to it
<companion_cube>
I like not having too much escaping
nightblues has joined #ocaml
enterprisey has quit [Remote host closed the connection]
danieli has joined #ocaml
andrejbauer has quit [Ping timeout: 260 seconds]
nightblues has quit [Quit: Leaving.]
danieli has quit [Changing host]
danieli has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
jao has joined #ocaml
demonimin has quit [Remote host closed the connection]
* adrien
wonders if he has a bug in lambdasoup
demonimin has joined #ocaml
tane has joined #ocaml
kakadu has joined #ocaml
zmt00 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
raphaelss has joined #ocaml
freusque has quit [Ping timeout: 276 seconds]
Serpent7776 has quit [Quit: Leaving]
rwmjones has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
rwmjones has joined #ocaml
KeyJoo has joined #ocaml
Jesin has joined #ocaml
Jesin has quit [Remote host closed the connection]
shiyaz has quit [Ping timeout: 260 seconds]
andreas___ has joined #ocaml
<M-martinklepsch>
anyone a recommendation for a library that prints nice colors to a terminal? :)
<octachron>
For text on an unix terminal, Fmt(or Format) + tags?
th5 has quit [Ping timeout: 240 seconds]
th5 has joined #ocaml
th5 has quit [Read error: Connection reset by peer]
<Armael>
iirc ANSITerminal (the lib) contains the escape codes for colors and such
th5 has joined #ocaml
th5_ has joined #ocaml
th5 has quit [Ping timeout: 276 seconds]
th5_ has quit [Ping timeout: 255 seconds]
BitPuffin|osx has quit [Ping timeout: 248 seconds]
ygrek_ has quit [Ping timeout: 240 seconds]
enterprisey has joined #ocaml
Anarchos has joined #ocaml
argent_smith has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.10.2]: i've been blurred!]
<orbifx>
I'm using Mustache, which (unfortunately) can have nested concatenations. So when I'm generate the header from a template.. the type system thinks that `Header can appear within `Header, which it doesn't allow.
<orbifx>
But I want to concatenate all the children under a single `Header element.
<orbifx>
I'm now concatenating all the elts under a `Div, which is sensible if I were expecting more levels, and then put the `Div inside the `Header. But there shouldn't be a `Div.
<Drup>
why not simply return a list of elements, instead of a single one ?
argent_smith has quit [Quit: Leaving.]
kakadu has quit [Ping timeout: 276 seconds]
<orbifx>
Mustach.fold's ~concat type is `a list -> a` :/
<orbifx>
The proper solution is to write a custom fold, but I thought I might be lucky with a hack for now
<orbifx>
`Div is an acceptable hack
<Drup>
sure, just make 'a = _ elt list
<Drup>
then concat is just list concatenation
<Drup>
and you return singletons at the leafs
<orbifx>
will ` _ elt list` = Tyxml.elt ?
<Drup>
No, elt is Tyxml.elt
<orbifx>
Well the functions that generate the list elements, generate Tyxml.elt
<orbifx>
let me push this to a branch, easier if you see
<orbifx>
But rewriting the fold will be more efficient, right?
<Drup>
not really
<Drup>
A bit
<orbifx>
K
<orbifx>
Will get around to something in the end. I'm doing a big refactoring now.
barcabuona has joined #ocaml
<orbifx>
Thanks Drup
<orbifx>
What are you working on these days?
<Drup>
Anyway, it's a fairly classical technique, returning list of elements instead of elements
<Drup>
so that you can concatenate them, and wrap them only when necessary
<Drup>
Well, I'm doing my postdoc, and I will happily not tell the subject, otherwise I fear people will get hyped for something that might be vaporware :3