adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org and http://caml.inria.fr | http://ocaml.org/releases/4.02.0.html | Public channel logs at http://irclog.whitequark.org/ocaml
zpe has quit [Ping timeout: 260 seconds]
WraithM has quit [Ping timeout: 260 seconds]
eikke has quit [Ping timeout: 272 seconds]
johnnydiabetic has left #ocaml ["Goodbye"]
eikke has joined #ocaml
tnguyen has quit [Ping timeout: 260 seconds]
zRecursive has joined #ocaml
jonludlam has quit [Quit: Coyote finally caught me]
rgrinberg has joined #ocaml
WraithM has joined #ocaml
mcclurmc has quit []
WraithM has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
taion809 has joined #ocaml
samae has joined #ocaml
jao has joined #ocaml
<samae> Hi
jao has quit [Changing host]
jao has joined #ocaml
<samae> How would you write a function that returns 0 then 1 then 0 etc. everytime it is called. Like first call, 0, second call, 1, third call, 0 etc. ?
eikke has quit [Ping timeout: 272 seconds]
<samae> Should I use a ref variable and change it everytime? Or is there a simpler way?
jao has quit [Ping timeout: 260 seconds]
<whitequark> def`: argh, I can never get .merlin to work
<whitequark> it just ignores it
<whitequark> oh.
<whitequark> def`: sublime-text-merlin.process.Failure: 'invalid arguments'
<whitequark> that's so helpful
SethTIsue has quit [Quit: SethTIsue]
<whitequark> that's what appears in console when I'm trying to reload
<whitequark> I'd report it as an issue, but those are disabled at https://github.com/def-lkb/sublime-text-merlin
WraithM has joined #ocaml
ygrek has joined #ocaml
zpe has joined #ocaml
q66 has quit [Quit: Leaving]
WraithM has quit [Ping timeout: 246 seconds]
zpe has quit [Ping timeout: 272 seconds]
boogie has quit [Quit: Leaving...]
tnguyen has joined #ocaml
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
samae has left #ocaml ["WeeChat 1.0"]
bytbox has quit [Remote host closed the connection]
tnguyen has quit [Quit: tnguyen]
cesar has joined #ocaml
cesar is now known as Guest77237
huza has joined #ocaml
SethTIsue has joined #ocaml
SethTIsue has joined #ocaml
simulacrum has joined #ocaml
malo has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 260 seconds]
ontologiae_ has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
<whitequark> I just realized about the example on ocaml.org frontpage
<whitequark> let has_even_leaf tree = exists_leaf (fun n -> n mod 2 = 0) tree
<whitequark> "dude, do you even leaf"
tac_ has joined #ocaml
tac_ has quit [Quit: Leaving]
koderok has joined #ocaml
zpe has joined #ocaml
Guest77237 has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 250 seconds]
SethTIsue has quit [Quit: SethTisue]
huza has quit [Quit: WeeChat 0.3.8]
yomimono has joined #ocaml
WraithM has joined #ocaml
taion809 has quit [Remote host closed the connection]
SethTisue_______ has quit [Ping timeout: 260 seconds]
SethTisue_______ has joined #ocaml
manizzle has quit [Ping timeout: 272 seconds]
WraithM has quit [Ping timeout: 272 seconds]
WraithM has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest38266
Guest38266 has quit [Ping timeout: 246 seconds]
WraithM has quit [Ping timeout: 246 seconds]
WraithM has joined #ocaml
amiller has quit [Ping timeout: 260 seconds]
amiller_ has joined #ocaml
koderok has quit [Quit: koderok]
zpe has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 258 seconds]
lgm has joined #ocaml
<lgm> Hello!
<lgm> Anyone out there with experience using oasis?
<lgm> i'm running into an unusual problem?
axiles has joined #ocaml
manizzle has joined #ocaml
yomimono has quit [Ping timeout: 260 seconds]
siddharthv_away is now known as siddharthv
yacks has joined #ocaml
WraithM has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
cesar has joined #ocaml
seangrove has joined #ocaml
cesar is now known as Guest33568
Guest33568 has quit [Ping timeout: 272 seconds]
netroby has joined #ocaml
hhugo has joined #ocaml
huza has joined #ocaml
stux|away has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
stux has joined #ocaml
zpe has quit [Ping timeout: 258 seconds]
tac_ has joined #ocaml
<ygrek> lgm, don't ask to ask - ask
zRecursive has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
Submarine has joined #ocaml
tac_ has quit [Quit: Leaving]
adrien_o1w has joined #ocaml
larhat has joined #ocaml
adrien_oww has quit [Ping timeout: 260 seconds]
cago has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest89597
Guest89597 has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: Leaving.]
zpe has joined #ocaml
ggherdov___ has joined #ocaml
ggherdov___ has quit [Changing host]
ggherdov___ has quit [Changing host]
ggherdov___ has joined #ocaml
ggherdov___ is now known as ggherdov
lgm has quit [Ping timeout: 260 seconds]
manizzle has quit [Ping timeout: 240 seconds]
Kakadu has joined #ocaml
Thooms has joined #ocaml
<def`> whitequark: issued enabled on sublime-text-merlin
Thooms has quit [Ping timeout: 260 seconds]
emmanueloga has joined #ocaml
eikke has joined #ocaml
octachron has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
tane has joined #ocaml
netroby has quit [Quit: Leaving]
adrien_o1w is now known as adrien_oww
sepp2k has joined #ocaml
Simn has joined #ocaml
Thooms has joined #ocaml
tani has joined #ocaml
tane has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
bezirg has joined #ocaml
Hannibal_Smith has joined #ocaml
thomasga has quit [Quit: Leaving.]
ocp has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
NoNNaN has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest94204
simulacrum has quit [Remote host closed the connection]
Guest94204 has quit [Ping timeout: 260 seconds]
oscar_toro has joined #ocaml
argp has joined #ocaml
<argp> with 4.01.0 from opam and batteries 2.3.0 also from opam i get Error: Reference to undefined global `Bytes'
<argp> can someone please verify? is there any known solution?
<adrien> you need a newer ocamlfind
<adrien> probably
<argp> hmm
<argp> i have the latest from opam
<argp> $ which ocamlfind
<argp> /home/argp/.opam/system/bin/ocamlfind
zpe has quit [Remote host closed the connection]
thomasga has joined #ocaml
<Kakadu> write 'opam list |grep find' to get version
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
<tani> i ran into the same problem, ocamlfind is in it's most fresh version
<argp> 1.5.3
<madroach> can you post the logfiles somewhere?
<argp> what log files? a script of the session?
<tani> adding "package(bytes)" to _tags fixes the problem
<tani> when using ocamlbuild
<madroach> argp: when opam building fails it tells you about four files which end in .out .err .env .info
<argp> no opam build fails
<argp> i have installed ocaml and batteries from opam without issues
<argp> and try to load batteries in the toplevel
<argp> $ ocaml
<argp> OCaml version 4.01.0
<argp> Camlp4 Parsing version 4.01.0
<argp> # #use "topfind";;
<argp> - : unit = ()
<argp> - : unit = ()
<argp> # #require "batteries";;
<argp> Error: Reference to undefined global `Bytes'
bjorkintosh has joined #ocaml
<Kakadu> You can try to locate bytes.cmo manually and put it into toplevel using #load
<Kakadu> Look for it somewhere in ~/.opam/system/lib/ocaml
<Kakadu> stop
<Kakadu> Why 4.01.0 requires bytes?
<Kakadu> 4.02.0 was introduced in 4.02.0, doesn't it?
<Kakadu> s/4.02.0/bytes/
<madroach> Batteries provides backwards compatibility using the bytes module from ocamlfind.
<Kakadu> ah
<Kakadu> What #require "bytes" says?
troydm has quit [Ping timeout: 250 seconds]
<argp> fuck it worked
<argp> # #require "bytes";;
<argp> # #require "batteries";;
<argp> #
<argp> sorry :(
<Kakadu> It seems that batteries doesn't have dependency on bytes
<Kakadu> that's why it was not loaded automatically
ontologiae_ has joined #ocaml
George_ has joined #ocaml
lordkryss has joined #ocaml
<George_> I have a list which the elements are of a variant type. This type contains so many tags. I would like to sort such lists. Sorting order is not important, but it has to be consistent.
<George_> Sorting has to be based on the tags
<George_> any suggestion?
<George_> The easiest way is to write a sort function, which compares tags, and then use List.sort
<George_> I would like to see if there is any elegant way of doing it
jonludlam has joined #ocaml
<George_> maybe, I will try it then
rand000 has joined #ocaml
Thooms has quit [Quit: WeeChat 0.4.3]
yacks has quit [Ping timeout: 250 seconds]
yacks has joined #ocaml
zpe has joined #ocaml
ggole has joined #ocaml
thomasga has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 272 seconds]
cesar has joined #ocaml
cesar is now known as Guest14081
zpe has joined #ocaml
Guest14081 has quit [Ping timeout: 250 seconds]
George_ has quit [Ping timeout: 246 seconds]
_0xAX has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
_andre has joined #ocaml
kaustuv has joined #ocaml
SethTIsue has joined #ocaml
hhugo has quit [Excess Flood]
hhugo has joined #ocaml
Submarine has quit [Quit: Leaving]
voglerr has joined #ocaml
siddharthv is now known as siddharthv_away
ontologiae has joined #ocaml
ontologiae_ has quit [Ping timeout: 245 seconds]
hhugo1 has joined #ocaml
hhugo has quit [Ping timeout: 272 seconds]
rand000 has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 245 seconds]
Hannibal_Smith has quit [Quit: Sto andando via]
fraggle_laptop has joined #ocaml
_0xAX has quit [Ping timeout: 240 seconds]
_0xAX has joined #ocaml
bytbox has joined #ocaml
Submarine has joined #ocaml
rand000 has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest48029
Guest48029 has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
dsheets has joined #ocaml
bezirg has quit [Ping timeout: 260 seconds]
darkf has quit [Quit: Leaving]
BitPuffin has joined #ocaml
rand000 has quit [Ping timeout: 246 seconds]
bytbox has quit [Remote host closed the connection]
macdice` has joined #ocaml
macdice has quit [Ping timeout: 260 seconds]
cesar has joined #ocaml
cesar is now known as Guest36429
lordkryss has quit [Quit: Connection closed for inactivity]
bezirg has joined #ocaml
Guest36429 has quit [Remote host closed the connection]
bezirg has quit [Client Quit]
bezirg has joined #ocaml
pii4 has quit [Quit: [-.-]...]
mcclurmc has quit [Ping timeout: 244 seconds]
pii4 has joined #ocaml
ygrek has joined #ocaml
ontologiae has quit [Ping timeout: 272 seconds]
ollehar has quit [Ping timeout: 240 seconds]
_0xAX has quit [Remote host closed the connection]
simulacrum has joined #ocaml
simulacrum has quit [Remote host closed the connection]
simulacrum has joined #ocaml
bezirg has left #ocaml [#ocaml]
SethTIsue_ has joined #ocaml
Submarine has quit [Ping timeout: 258 seconds]
amirmc has joined #ocaml
SethTIsue__ has joined #ocaml
SethTIsue_ has quit [Ping timeout: 244 seconds]
Submarine has joined #ocaml
amirmc has quit [Quit: Leaving.]
shinnya has joined #ocaml
mcclurmc has joined #ocaml
thomasga has quit [Quit: Leaving.]
amirmc has joined #ocaml
ollehar has joined #ocaml
fraggle_laptop has quit [Ping timeout: 258 seconds]
xyh has joined #ocaml
lgm has joined #ocaml
yomimono has joined #ocaml
<lgm> Hello, Good People!
<lgm> i'm running into more and more problems with oasis
<Drup> lgm: describe them :p
<lgm> i'm working on a mac os x (Mavericks) and attempted a port upgrade and now invocations are failing like so
<lgm> bash-3.2$ oasis --help
<lgm> Fatal error: the file '/opt/local/bin/oasis' is not a bytecode executable file
<lgm> bash-3.2$
<Drup> that's an interesting error. I suppose you installed a new version of ocaml but didn't recompile oasis
<Drup> (you should use opam, btw)
badkins has joined #ocaml
<kaustuv> port install opam
<lgm> i'm using opam, as well
<Drup> I'm not sure it's a good idea to use opam "as well"
<Drup> put everything under opam and be done with it
<kaustuv> are any opam installers failing because of oasis?
<lgm> i just tried upgrading opam and that failed
<kaustuv> can you run ocaml at all?
larhat has quit [Quit: Leaving.]
<lgm> it looks like the upgrade to 4.02.0 hosed pretty much everything
<lgm> M-x tuareg-run-caml
<Drup> it's normal
<Drup> that's why you shouldn't use port to manage ocaml package
larhat has joined #ocaml
<Drup> port doesn't realize everything should be recompiled after an upgrade of the compiler
larhat has quit [Client Quit]
<kaustuv> Hmm http://www.macports.org/ports.php?by=name&substr=opam seems a bit old. I would say 1.2.x is recommended for recent OCaml releases
<kaustuv> (that's unrelated to your issue, just a general remark)
<Drup> kaustuv: 1.2 is ... technically not out.
<kaustuv> Oh?
<Drup> it's still in beta
cago has left #ocaml [#ocaml]
fraggle_laptop has joined #ocaml
<kaustuv> https://github.com/ocaml/opam/wiki/Quick_Install#osx still recommends installing opam via port
<kaustuv> But I agree that nothing else should be done with a non-opam package manager
SethTIsue has quit [Quit: SethTisue]
SethTIsue__ is now known as SethTIsue
rgrinberg has joined #ocaml
philtom has joined #ocaml
bytbox has joined #ocaml
fraggle_laptop has quit [Ping timeout: 260 seconds]
cesar has joined #ocaml
cesar is now known as Guest25506
philtom has quit [Ping timeout: 272 seconds]
<Drup> whitequark: http://caml.inria.fr/mantis/view.php?id=6464 <- this ... is actually an issue for lwt's ppx
<Drup> I think
<Drup> I didn't realize it before.
Guest25506 has quit [Ping timeout: 258 seconds]
BitPuffin has quit [Quit: See you on the dark side of the moon!]
BitPuffin has joined #ocaml
<kaustuv> Why is Rust not performing as well or better than OCaml for purely numerical code?
<kaustuv> For the pidigits benchmark
<kaustuv> Err, I guess it's not numerical code after all
bezirg has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
ontologiae has joined #ocaml
thomasga has joined #ocaml
koderok has joined #ocaml
bytbox has quit [Remote host closed the connection]
koderok has quit [Client Quit]
yomimono has quit [Ping timeout: 258 seconds]
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
bytbox has joined #ocaml
waneck has joined #ocaml
lgm has quit [Ping timeout: 240 seconds]
voglerr has quit [Quit: leaving]
vogler has joined #ocaml
vogler has quit [Client Quit]
voglerr has joined #ocaml
q66 has joined #ocaml
xavierm02 has joined #ocaml
BitPuffin has quit [Ping timeout: 260 seconds]
<xavierm02> Hi. I was wondering if it was possible to define *cyclic* *non-mutable* structures of *arbitrary size*. For structures of a given size, it is possible using "let rec ... and ... and ..." but I couldn't find a way to extend that to structures of aritrary size (e.g. a cyclic list of length n). Is it possible? Thank you in advance for your answers.
zpe has quit [Remote host closed the connection]
<madroach> I tried to do that, too, bit did not mana
<madroach> ge to.
<madroach> The best I could do was using mutable records or arrays.
bytbox has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
<xavierm02> Okay :( Thank you for your answer :)
<jpdeplaix> gasche: do you really want two releases ?
malc_ has joined #ocaml
_2can has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 246 seconds]
lordkryss has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
_2can has joined #ocaml
waneck has quit [Read error: No route to host]
waneck has joined #ocaml
<ggole> laziness can sort of do it
WraithM has joined #ocaml
rand000 has joined #ocaml
sepp2k has quit [Quit: Konversation terminated!]
FatDarrel has joined #ocaml
<xavierm02> ggole: Nice idea! I'd still prefer a non-lazy solution but that should work. Thank you :)
srax1 is now known as srax
ollehar has quit [Quit: ollehar]
ygrek has joined #ocaml
<xavierm02> In a way, what I want is to define the structure with the ability to use mutable fields and then make them non-mutable forever. But that doesn't seem to be possible (without using lazyness).
hcarty has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 244 seconds]
<ggole> You could hide or make private the mutable structure and tuck the mutation away under a nice interface.
yomimono has joined #ocaml
octachron has quit [Quit: Leaving]
voglerr has quit [Ping timeout: 260 seconds]
malc_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
morphles has joined #ocaml
thomasga has quit [Quit: Leaving.]
eikke has joined #ocaml
Kakadu has quit [Quit: Page closed]
dsheets has quit [Ping timeout: 240 seconds]
amirmc has quit [Quit: Leaving.]
jonludlam has quit [Ping timeout: 245 seconds]
BitPuffin has quit [Ping timeout: 260 seconds]
lgm has joined #ocaml
simulacrum has quit [Quit: No Ping reply in 180 seconds.]
simulacrum has joined #ocaml
zpe has joined #ocaml
cesar has joined #ocaml
dsheets has joined #ocaml
cesar is now known as Guest33656
BitPuffin has joined #ocaml
Guest33656 has quit [Ping timeout: 258 seconds]
jcloud has quit [Ping timeout: 272 seconds]
rfv has quit [Ping timeout: 272 seconds]
_tca has quit [Ping timeout: 272 seconds]
malo has joined #ocaml
_tca has joined #ocaml
rfv has joined #ocaml
jcloud has joined #ocaml
<nlucaroni> in that case you can always make module to abstract the cyclic structure and not deal with lazyness at all.
tac_ has joined #ocaml
BitPuffin has quit [Ping timeout: 260 seconds]
troydm has joined #ocaml
<ggole> Yeah, that's pretty much what I meant.
rand000 has quit [Quit: leaving]
BitPuffin has joined #ocaml
Kakadu has joined #ocaml
<xavierm02> ggole, nlucaroni: My use case is this: I want to make a PEG parser. But since writing grammars directly in the code is annoying, I want to be able to have a language to represent grammars and parse it with that same parser. Since the rules / productions reference each other, the grammar is a cyclic graph.
<xavierm02> I can represent the initial grammar in a non-mutable structure with
<xavierm02> "let .. in ... and ..." quit easily. But then, I can't use the same type for the other grammars. And if I use a more complicated type where productions have name, then writing the initial grammar becomes much more annoying and I have to use a mutable structure.
<ggole> If mutation makes it easier, use it.
<ggole> You can keep things locked down with private types if you are nervous about side effects ruining things.
ocp has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 240 seconds]
xyh has quit [Ping timeout: 260 seconds]
<xavierm02> Hm. I kind of prefer the lazy thing. I'll try it and if I can't get it to work, I'll go back to mutable structures. Thank you for your answers :)
BitPuffin has quit [Ping timeout: 245 seconds]
dsheets has quit [Ping timeout: 260 seconds]
tnguyen has joined #ocaml
bytbox has joined #ocaml
yacks has quit [Quit: Leaving]
yacks has joined #ocaml
q66[lap] has quit [Quit: Textual IRC Client: www.textualapp.com]
bezirg has quit [Quit: Leaving.]
q66[lap] has joined #ocaml
<xavierm02> Hi again. I have a new question: When using graph algorithms, it is often useful to store some information in the nodes. But sometimes, the type of the information you'll need is not known at the time you define the graph type. So to allow to store arbitrary information in graph nodes, they have a field tmp of type exn.
<xavierm02> That looks rather ugly to me so I'd like to know if there is another (cleaner) way of doing that. Example: http://pastebin.com/AbLqRHAy
ontologiae has joined #ocaml
FatDarrel has quit [Quit: FatDarrel]
<madroach> you could parameterize the type of the auxillary information, but would lose flexibility.
<companion_cube> most people would use functors
<xavierm02> Don't I need to copy the whole graph to make that work?
<madroach> a functor for each graph algorithm?
larhat has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
<companion_cube> well, take a look at ocamlgraph, you'll see
Submarine has quit [Remote host closed the connection]
<madroach> wouldn't a simple int be enough for auxillary info? Graph algorithms need coloring most of the time.
<madroach> I'll do.
<ggole> Store a key in each node and keep mappings from key->info
tnguyen has quit [Ping timeout: 240 seconds]
lgm has quit [Ping timeout: 246 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
FatDarrel has joined #ocaml
hhugo1 has quit [Read error: No route to host]
tac_ has quit [Ping timeout: 245 seconds]
hhugo has joined #ocaml
fennec has joined #ocaml
<xavierm02> I'll go with the key->info thing. ocamlgraph looks really cool but might be a bit of an overkill for what I need. Thank you for your answers :)
WraithM has quit [Quit: leaving]
manizzle has joined #ocaml
cago has joined #ocaml
<Drup> ocamlgraph isn't overkill
<nicoo> OCamlGraph is love
Sim_n has joined #ocaml
cesar has joined #ocaml
Simn has quit [Ping timeout: 260 seconds]
cesar is now known as Guest83609
<Drup> ^ this.
Guest83609 has quit [Ping timeout: 250 seconds]
q66[lap] has joined #ocaml
Anarchos has joined #ocaml
ivan\_ has joined #ocaml
ivan\ has quit [Read error: Connection reset by peer]
ivan\_ is now known as ivan\
morphles has quit [Ping timeout: 250 seconds]
cago has left #ocaml [#ocaml]
jonludlam has joined #ocaml
<maurer> Hey, does anyone know how to indicate in cstubs that a custom_val you're returning is dependent on another custom val?
<maurer> I'm trying to bind a C library, but one of the things it returns is a handle, which if destroyed, will destroy all the other references ocaml is holding
shinnya has joined #ocaml
dingo1 has joined #ocaml
manizzle is now known as WeLoveCP
<dingo1> Hey guys, I'm trying to install core with 'opam install core' and it's failing to build with messages like "'struct stat64' has no member named 'st_ctimensec'". Any idea what configuration I might have that could cause this?
sheijk has joined #ocaml
WeLoveCP is now known as manizzle
flux has quit [Ping timeout: 250 seconds]
<maurer> Basically I want to say "This custom opaque value I've defined in C? It depends on this other custom opaque value I've defined in C. If this isn't gone, you can't finalize the other one yet"
<xavierm02> Overkill probably isn't the right term. Let me rephrase: ocamlgraph, while incredibly elegant and well-suited, would require a non-trivial amount of documentation reading from me which is, by Newton's first law of graduation, not happenning unless it's needed :)
<adrien> bleh
<adrien> plus it's not difficult to use it
<companion_cube> *once you found which set of 5 functors to apply
Anarchos has quit [Ping timeout: 260 seconds]
fennec has quit [Quit: This computer has gone to sleep]
<tani> is there any library to map XML onto a data structure, using attributes and elements?
Anarchos has joined #ocaml
<tani> or schema -> data structure generation
tac_ has joined #ocaml
mbac has quit [Quit: leaving]
<nicoo> tani: Probably not (I don't see how that would make sense given the nature of XML). However, there is the other direction (generating serialiser and deserialisers from an OCaml type)
<nicoo> And there are XML parsers
<tani> yeah, i guess i have to go with a parser then
<tani> but maybe.. using ppx it may be possible to construct somethign similar to JAXB (Java) for Ocaml
<tani> thanks though :)
<adrien> five, simple!
<adrien> iipi
<adrien> erf :)
macdice` is now known as macdice
hhugo has quit [Quit: Leaving.]
dingo1 has quit [Quit: WeeChat 1.0.1]
eugene_klm has joined #ocaml
hhugo has joined #ocaml
oriba has joined #ocaml
axiles has quit [Remote host closed the connection]
<Drup> tani: you want (de)serialization of some data to xml, right ?
<tani> i have XML and want to map it to a data structure
<madroach> maurer: You could use non-custom blocks and add pointers to the custom block you want to depend on.
<tani> the XML makes use of attributes, sub-elements and pcdata
<Drup> tani: it's the same, you need to define the data structure anyway
<tani> indeed, that's alright, but what library to use?
<Drup> I don't have anything automatic for you
<Drup> (I would have it for json, but not xml)
<tani> yeah :)
<Drup> so, basically, write the conversion function by hand with xmlm
<tani> yes, will do that, thanks
<Drup> companion_cube: there are a set of pre applied functors, so, no, you don't eve need that
<companion_cube> they only apply if you have ints everywhere
<tani> i had to work on some java projects recently, and jaxb really came in handy there. so i became kind of lazy there.
<Drup> tani: you have other mean of serialization in ocaml. As I said, this exists for json
<Drup> xavierm02: so, instead of reading up documentation and learn about functors (a very cool feature of OCaml), you will re-implement graph algorithm :p
<tani> yes, sadly the software providing the data just outputs xml. But i'll do it myself then, thanks
<Drup> tani: if you are very motivated, you can also write a ppx_deriving_xml
<Drup> I'm sure whitequark will provide guidance for such a task :D
<tani> yes, i thought about that. I'll look into it, sounds interesting
ontologiae has joined #ocaml
SethTIsue has quit [Ping timeout: 244 seconds]
enquora has joined #ocaml
vpm has quit [Quit: co'o]
vpm has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
flux has joined #ocaml
WraithM has joined #ocaml
dingo1 has joined #ocaml
<whitequark> yeah, I would
cesar has joined #ocaml
cesar is now known as Guest54480
<xavierm02> Drup: I know how functors work. And I read part of the first ps given on the ocamlgraph page and mostly understood how it worked. But I'd still have a hard time using it since I wouldn't know which functors to take etc. Also, the graph algorithm I'll use is a packrat parser and I haven't seen it in ocamlgraph.
Guest54480 has quit [Ping timeout: 272 seconds]
jwatzman|work has joined #ocaml
<dingo1> I'm trying to install core but it fails. It's trying to use system libs from a platform other than mine. Does anyone have experience with oasis/whichever failing to identify your platform?
fennec has joined #ocaml
fennec has joined #ocaml
<Drup> xavierm02: it's not that difficult to use, really, a good afternoon reading and you'll be set, which is probably as much as the amount of time it will take you to reimplement it
manizzle has quit [Quit: Leaving]
<xavierm02> Drup: It's not about time, it's about fun and learning stuff. And I prefer doing algorithms myself rather that using ones that are already done because I learn more stuff and it's funnier. Otherwise I'd use the lex/yacc combo. If someday, I need to implement a reliable software in Ocaml using graphs, I will probably use ocamlgraph. But atm, I'm just doing some random stuff that I find interesting :)
dingo1 has quit [Quit: WeeChat 1.0.1]
<xavierm02> I'm happy to know it exists because I might need it someday. But I won't use it unless I work on a "real" (i.e. "non-toy") project.
<Drup> okay :)
lgm has joined #ocaml
<lgm> Hello! i'm still looking for help with an oasis problem.
<Drup> lgm: did you switch everything under opam ?
<lgm> i just completed upgrading my ocaml installation in hopes that it might resolve everything.
<lgm> Drup: yes, that's all working fine now.
<Drup> nice
<lgm> But, i'm still getting an issue where it's not putting the BuildDepends on the dependency calculation.
<Drup> are the sources available ?
<lgm> Yes, but i haven't checked in the lastest because of this compilation error.
<Drup> put it in a branch or something, so I can take a look
malo has quit [Remote host closed the connection]
winterfury has quit [Ping timeout: 260 seconds]
<lgm> the branch is oasis_bug
xavierm02 has quit [Quit: Page closed]
<dmbaturin> Those purely functional datastructures that need lazy evaluation, should I learn about them?
<companion_cube> some of them are interesting, yes
<Drup> lgm: I got everything, it builds
<Drup> what's the issue ?
<Drup> I needed to re-run "oasis setup", but that's all
<lgm> Amazing
<lgm> It doesn't build for me.
<Drup> I git cloned
<Drup> I did "oasis setup"
<Drup> then "make distclean"
<Drup> then "opam install batteries delimcc uuidm config-file"
<Drup> and then it was good
<lgm> did you check out the oasis_bug branch or master?
<lgm> master works just fine
<Drup> raah, I forgot to checkout after cloning >_>
<lgm> the difference between master and oasis_bug is that i added a file; did oasis setup-clean; oasis setup
<Drup> I don't have any Observation file in the repository, where it is ?
<Drup> (your directory organization is a bit maze-y :D)
<Drup> It feels like a Java project
<Drup> also, lgm, you shouldn't checkout setup.data
<Drup> it's not supposed to be there
pyon has quit [Quit: brb stupid emacs]
<lgm> It's there now
<lgm> Observation.ml is added.
<lgm> If you do a pull you'll get it.
<lgm> i added setup.data to git ignore, but i think i have to do something else to get it to ignore it.
lordkryss has quit [Quit: Connection closed for inactivity]
<Drup> if you just added to gitignore, it's ignored, not removed
<Drup> you also need to remove it
<lgm> Yep
<lgm> Are you able to reproduce the problem?
<Drup> "Unbound module StringKey" now :p
NoNNaN has quit [Ping timeout: 264 seconds]
flux has quit [Ping timeout: 250 seconds]
<Drup> what is your issue with oasis exactly ?
zpe has quit [Remote host closed the connection]
oscar_toro has quit [Ping timeout: 245 seconds]
NoNNaN has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
Kakadu has quit [Remote host closed the connection]
pyon has joined #ocaml
tac_ has quit [Ping timeout: 272 seconds]
eugene_klm has quit [Ping timeout: 272 seconds]
jonludlam has quit [Ping timeout: 272 seconds]
<lgm> i don't get that error
<lgm> the issue i have with oasis is that it's stopped putting the BuildDepends on the compile line
<lgm> If you look at _oasis, you'll see i have batteries, config_file, delimcc and one other dependency
<Drup> "ocamlfind ocamlc -c -g -package batteries -package config-file -package delimcc -package uuidm -I src/main/ocaml/repl -o src/main/ocaml/repl/Observation.cmo src/main/ocaml/repl/Observation.ml"
<Drup> as expected
<lgm> that's not what happens on my mac
mcclurmc has quit [Remote host closed the connection]
<lgm> in fact, this is what happens
flux has joined #ocaml
<lgm> + /Users/lgm/.opam/system/bin/ocamlfind ocamlc -c -g -I src/main/ocaml/repl -o src/main/ocaml/repl/Cfg.cmo src/main/ocaml/repl/Cfg.ml
<lgm> Command exited with code 2.
<lgm> Error: Unbound module Config_file
<lgm> File "src/main/ocaml/repl/Cfg.ml", line 9, characters 5-16:
<lgm> E: Failure("Command ''/opt/local/bin/ocamlbuild' src/main/ocaml/repl/Cacao.byte -tag debug' terminated with error code 10")
<lgm> make: *** [build] Error 1
<lgm> bash-3.2$
<lgm> as you can see -package batteries -package config-file ... are missing from the invocation of ocamlc
<Drup> That's weird.
<Drup> I'm using the oasis dev version, let me try to reproduce with the released one
<lgm> how can i use the dev version?
<Drup> lgm: I still get "Unbound module StringKey"
NoNNaN has quit [Ping timeout: 264 seconds]
<Drup> and it's still compiling correctly
<Drup> (with all the -package needed)
<Drup> you did the "oasis setup" little dance, did you ?
<Drup> lgm: "opam pin oasis https://github.com/ocaml/oasis.git" to use the oasis dev version
<Drup> lgm: also, note on the implementation : Don't copy the Hashtbl module like that.
<Drup> you can use "include" for such a purpose
SethTIsue has joined #ocaml
tac_ has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest2998
yomimono has quit [Ping timeout: 272 seconds]
fennec has quit [Quit: This computer has gone to sleep]
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
<lgm> Drup: yes, i do oasis setup-clean; oasis setup; ocaml setup.ml -configure (just to be safe); make clean; make
Guest2998 has quit [Ping timeout: 245 seconds]
<Drup> I don't really know, you should report the bug to oasis :/
<dmbaturin> Drup: Now that I think of it, the idea to infer grammar from a corpus you suggested earlier sounds interesting on its own. Know of any papers I should read if I want to jump into it?
<dmbaturin> I've found a paper about Sequitur algorithm that can do it for a single string, sort of.
simn__ has joined #ocaml
<lgm> Drup: thanks for your engagement!
mcclurmc has joined #ocaml
Sim_n has quit [Ping timeout: 260 seconds]
<Drup> dmbaturin: literally no idea
<Drup> but I can ask
mcclurmc has quit [Remote host closed the connection]
<dmbaturin> That would be nice.
zpe has joined #ocaml
WraithM has quit [Quit: leaving]
<Drup> I feel like it's going to be radically different if you want to infer grammar or infer the weight, given a grammar
igitoor has quit [Ping timeout: 272 seconds]
eikke has quit [Ping timeout: 240 seconds]
igitoor has joined #ocaml
WraithM has joined #ocaml
<Drup> inferring the weight is rather easy I presume, assuming your grammar is non ambiguous : just parse the whole thing and count how much each branch was taken
igitoor has joined #ocaml
igitoor has quit [Changing host]
<Drup> inferring the grammar, you will delve right into statistical based machine translation, a.k.a, google translate
<Drup> and you probably don't want to go there :D
badon has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
marchdown has joined #ocaml
tani has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
<dmbaturin> Drup: Yeah, I was thinking of exactly the case when strings knowingly share the same grammar. Although it seems even weight inference still depends on the runtime parser generator, if I want to make it a standalone tool.
<dmbaturin> Getting it to work with an AST as its input can be a good start though.
abbe has quit [Read error: Connection reset by peer]
abbe has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
simn__ has quit [Quit: Leaving]
madroach has joined #ocaml
badon has quit [Ping timeout: 245 seconds]
chris2 has quit [Ping timeout: 272 seconds]
chris2 has joined #ocaml
q66 has quit [Quit: Leaving]
seangrove has quit [Remote host closed the connection]
enquora has quit [Quit: enquora]
darkf has joined #ocaml
oriba has quit [Quit: oriba]
milosn has quit [Ping timeout: 260 seconds]
eikke has joined #ocaml