adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Haudegen has quit [Ping timeout: 264 seconds]
|jbrown| has quit [Remote host closed the connection]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NingaLeaf has joined #ocaml
jbrown has joined #ocaml
kakadu has quit [Remote host closed the connection]
Algebr` has quit [Ping timeout: 260 seconds]
ryanartecona has quit [Quit: ryanartecona]
Denommus has quit [Quit: going home]
cody` has quit [Quit: Connection closed for inactivity]
hay207_ has joined #ocaml
Haudegen has joined #ocaml
hay207 has quit [Ping timeout: 264 seconds]
esad has joined #ocaml
hay207__ has joined #ocaml
hay207_ has quit [Ping timeout: 250 seconds]
sz0 has quit [Ping timeout: 272 seconds]
hay207 has joined #ocaml
hay207__ has quit [Ping timeout: 256 seconds]
hay207_ has joined #ocaml
hay207 has quit [Ping timeout: 240 seconds]
Denommus has joined #ocaml
FreeBirdLjj has joined #ocaml
g0dless has joined #ocaml
<esad> can I pass None to on optional argument in order to get the defaults?
<esad> oh, I can if I call it with ?
g0dless has quit [Client Quit]
NingaLeaf has quit [Ping timeout: 240 seconds]
<sbrouf> ?
<esad> I was tryint to call "foo ~optarg:None"
<esad> trying*
<esad> but it needs to be "foo ?optarg:None"
<esad> then it works
<esad> (takes default value then)
Algebr` has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TBads has joined #ocaml
hay207__ has joined #ocaml
sbrouf has quit [Ping timeout: 255 seconds]
hay207_ has quit [Ping timeout: 256 seconds]
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TBads has quit [Quit: WeeChat 1.3]
<yminsky> I'm trying to wrap my head around some Js_of_ocaml idioms, and I'm curious if anyone undersetands this one: https://github.com/seliopou/ocaml-d3/blob/master/examples/todo.ml#L310
<Algebr`> yminsky: that JS thing might be undefined so you provide two callbacks for either case
<yminsky> In particular, I've seen a uses of idioms like Optdef.case, where Optdef.to_option seems more natural. I'm wondering if there's a reason to prefer the continuation style versus just converting stratight to OCaml options.
<yminsky> Doesn't Optdef.to_option cover that case just as well?
<Algebr`> I don't really use Js.Opt or Js.Optdef, just try to get to ocaml level logic as fast as i can.
<yminsky> (Ugh, sorry for that weird pastebin thing.)
<Algebr`> yminsky: I have some jsoo idioms as well in https://github.com/fxfactorial/ocaml-nodejs
<Algebr`> mixed with node idioms, ha.
<yminsky> I'm trying to understand a mix of jsoo and d3 idioms.
<yminsky> d3 is quite a pile of higher-order concepts. Right now I can't tell my selection from my Exit...
<Algebr`> I haven't tried the ocaml-d3 bindings yet
<yminsky> It looks pretty neat. d3 is a deeper thing than I would have guessed, though.
<jyc> is there some way to wrap printf so that after whatever there is to print has been printed I execute a command?
<jyc> it seems tricky to me because of the magic that printf does. I can wrap it so I do something before, but not after.
<Algebr`> yminsky: it is deep, fwiw it might help to do a few tutorials in just js to get a natural feel for it.
<yminsky> Try ksprintf
agumonkey has joined #ocaml
<yminsky> Algebr`: yeah, I'm doing that. The OCaml types do help, though.
<jyc> didn't know about ksprintf. looks like it will work! thanks.
<yminsky> jyc: glad to help!
struk|desk has joined #ocaml
lobo has quit [Quit: leaving]
tmtwd has quit [Ping timeout: 255 seconds]
pierpa has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ygrek_ has quit [Ping timeout: 255 seconds]
groovy3shoes has joined #ocaml
meiji11 has joined #ocaml
groovy2shoes has quit [Ping timeout: 260 seconds]
struk|desk is now known as struk|desk|away
smondet has quit [Ping timeout: 246 seconds]
smondet has joined #ocaml
struk|desk|away is now known as struk|desk
mcmillhj has quit [Quit: Lost terminal]
cyraxjoe has quit [Read error: Connection reset by peer]
cyraxjoe_ has joined #ocaml
mac10688 has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
struk|desk is now known as struk|desk|away
manizzle has quit [Ping timeout: 250 seconds]
manizzle has joined #ocaml
Denommus has quit [Remote host closed the connection]
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 245 seconds]
ggole_ is now known as ggole
struk|desk|away is now known as struk|desk
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 264 seconds]
darkf has joined #ocaml
ygrek_ has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
ggole_ has quit [Read error: Connection reset by peer]
ggole_ has joined #ocaml
JacobEdelman has quit [Read error: Connection reset by peer]
JacobEdelman has joined #ocaml
struk|desk is now known as struk|desk|away
groovy2shoes has joined #ocaml
mac10688 has joined #ocaml
ggole__ has joined #ocaml
groovy3shoes has quit [Ping timeout: 250 seconds]
ggole_ has quit [Ping timeout: 260 seconds]
ggole_ has joined #ocaml
struk|desk|away is now known as struk|desk
ggole__ has quit [Ping timeout: 250 seconds]
ggole__ has joined #ocaml
ggole_ has quit [Ping timeout: 255 seconds]
govg has quit [Ping timeout: 250 seconds]
govg has joined #ocaml
freehck has joined #ocaml
lockdown has joined #ocaml
ggole__ has quit [Ping timeout: 260 seconds]
ggole has joined #ocaml
AlexRussia has quit [Ping timeout: 276 seconds]
lockdown has quit [Remote host closed the connection]
tmtwd has joined #ocaml
ggole_ has joined #ocaml
mac10688 has quit [Ping timeout: 260 seconds]
ggole has quit [Ping timeout: 272 seconds]
govg has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
ggole_ has quit [Read error: Connection reset by peer]
ggole_ has joined #ocaml
struk|desk is now known as struk|desk|away
ggole__ has joined #ocaml
ggole_ has quit [Ping timeout: 260 seconds]
ggole__ has quit [Ping timeout: 250 seconds]
ggole__ has joined #ocaml
ski has quit [Remote host closed the connection]
ggole_ has joined #ocaml
tmtwd has quit [Ping timeout: 264 seconds]
ggole__ has quit [Ping timeout: 240 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
teknozulu has quit [Ping timeout: 246 seconds]
tmtwd has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
tmtwd has quit [Ping timeout: 260 seconds]
ely-se has joined #ocaml
meiji11 has quit [Remote host closed the connection]
palomer has joined #ocaml
palomer has quit [Ping timeout: 272 seconds]
ely-se has quit [Quit: leaving]
zv has joined #ocaml
Simn has joined #ocaml
JacobEdelman has quit [Quit: Connection closed for inactivity]
<sigjuice> any gotchas with modifying tbl inside f when I do Hashtbl.iter f tbl?
huza has joined #ocaml
<ggole_> I think the story is that you can monkey with the current element but anything other than that is asking for trouble
_2can has quit [Remote host closed the connection]
zv has quit [Ping timeout: 245 seconds]
tmtwd has joined #ocaml
AlexRussia has joined #ocaml
zv has joined #ocaml
<sigjuice> Looks like if I add a new binding inside f, iter will not see it. But if I remove a binding inside f, I see strange troublesome things like you said.
octachron has joined #ocaml
<Simn> Looking at https://github.com/HaxeFoundation/haxe/blob/development/filters.ml#L1226, is there a way to express this succinctly without using these `(fun e -> e)` functions?
ygrek_ has quit [Ping timeout: 245 seconds]
<ggole_> let id x = x at top level and refer to that?
BitPuffin|osx has quit [Ping timeout: 260 seconds]
<ggole_> (It's a bit strange to me that this function isn't in Pervasives already.)
<Simn> I mean I don't want these elements in the list to begin with if the condition doesn't hold.
<ggole_> Oh, then append a bunch of lists: [foo; bar] @ if zonk then [baz] else [] @ [etc]
<Simn> Ah yeah that would work, thanks!
<ggole_> If the list need not be ordered, an alternative is to write cons_if and use that to conditionally prepend elements
<ggole_> Probably only worth bothering with that if you care about efficiency here
<Simn> It has to be ordered, and the lists are certainly short enough to use @.
huza has quit [Quit: WeeChat 0.3.8]
esad has joined #ocaml
sbrouf has joined #ocaml
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 272 seconds]
zv has quit [Ping timeout: 272 seconds]
esad has joined #ocaml
AlexRussia has quit [Ping timeout: 264 seconds]
<Algebr`> Great...more inconsistencies for lwt on OS X and linux.
AlexRussia has joined #ocaml
zv has joined #ocaml
tmtwd has quit [Ping timeout: 250 seconds]
sbrouf is now known as AnonBaguette
esad has quit [Quit: Textual IRC Client: www.textualapp.com]
nullcatx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ggole_> How do I get my hands on the lambda-term documentation :|
<rks`> "look at the mli"
ely-se has joined #ocaml
<ggole_> Ugh. Time to give up and cargo-cult the example code they thoughtfully include on their github.
AnonBaguette is now known as Guest30649
Guest30649 is now known as okilele
ely-se has quit [Quit: leaving]
kakadu has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
Haudegen has joined #ocaml
ely-se has joined #ocaml
lambdahands has quit [Ping timeout: 240 seconds]
nicoo has quit [Ping timeout: 240 seconds]
lambdahands has joined #ocaml
nicoo has joined #ocaml
ohama has quit [Ping timeout: 265 seconds]
ohama has joined #ocaml
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
sfri has joined #ocaml
<sfri> Hi, I have a strange build issue with functions imported from C. The native build works without any problems (http://pastebin.com/Vk9n7MTD) but if I compile in bytecode mode, the C functions are as if not existing (http://pastebin.com/GtFzZ7BY). In both cases the C functions are provided in nr_ocaml.o and linking includes this file. I have no idea what is going wrong.
<octachron> sfri, do you have functions with more than 5 five arguments?
<sfri> No, the functions have one or zero args.
<adrien> sfri: it would help f you could show the full code
<sfri> The C code is compiled in C++ mode and the symbols are exported as C functions.
<sfri> I try to change the order of the linker arguments, but does not change the situation.
<ggole_> I think, but am not at all certain, that you need ocamlmklib here
<sfri> Let me have a try.
<sfri> ggole_: ocamlmklib is there to create ocaml libraries that can be used in C code. I'm including C code in a ocaml code.
<ggole_> Hmm. At least I got the uncertainly right.
ely-se has quit [Quit: leaving]
NingaLeaf has joined #ocaml
<sfri> ggole_: I had a try with ocamlmklib, I get exactly the same error, it is as if the C code is not present.
NingaLeaf has quit [Quit: Textual IRC Client: www.textualapp.com]
sz0 has joined #ocaml
yomimono has joined #ocaml
<def`> sfri: no ggol was right
<def`> ggole_*
<def`> you can use ocamlmklib to pass C flags that should be used when linking an OCaml library
<def`> (which doesn't solve your problem :D)
jerith has quit [Ping timeout: 250 seconds]
_habnabit has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 250 seconds]
jyc has quit [Ping timeout: 250 seconds]
<sfri> def`: I was underatsnding that ocamlmklib was only there is export a lib to the "C" world. But effectively my problem is not solved. I really do not understand why a C wrapper works when builded natively and not in bytecode mode.
tizoc has quit [Ping timeout: 264 seconds]
<def`> sfri: I don't understand either
<sfri> Is there a way to debug this?
<def`> with -verbose you will get a list of external commands
<def`> that might give some hints about what is going wrong
yomimono has quit [Ping timeout: 245 seconds]
yomimono has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<sfri> def`: ggole_: I found the issue. -custom was necessary for the bytecode build. (-custom
<sfri> Link in ``custom runtime'' mode. In the default linking mode,
<sfri> the linker produces bytecode that is intended to be executed
<sfri> with the shared runtime system, ocamlrun(1). In the custom run-
<sfri> time mode, the linker produces an output file that contains both
<sfri> the runtime system and the bytecode for the program. The result-
<sfri> ing file is larger, but it can be executed directly, even if the
<sfri> ocamlrun(1) command is not installed. Moreover, the ``custom
<sfri> runtime'' mode enables linking Caml code with user-defined C
<sfri> functions.)
* sfri wonders why this -custom switch is not set per default
cschneid has joined #ocaml
jyc has joined #ocaml
jerith has joined #ocaml
_habnabit has joined #ocaml
tizoc has joined #ocaml
pyon is now known as Guest74550
pierpa has joined #ocaml
Guest74550 has quit [Quit: Loops are hard, let's GOTO shopping!]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
jeffmo has quit [Quit: jeffmo]
zpe has quit [Ping timeout: 250 seconds]
yomimono_ has joined #ocaml
yomimono has quit [Read error: Connection reset by peer]
Accidus has quit [Ping timeout: 272 seconds]
andreypopp has quit [Ping timeout: 250 seconds]
andreypopp has joined #ocaml
jrslepak has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
kushal has quit [Quit: Leaving]
kushal has joined #ocaml
zpe has joined #ocaml
jrslepak has quit [Quit: This computer has gone to sleep]
yomimono_ has quit [Read error: Connection reset by peer]
nyon has joined #ocaml
nyon is now known as pyon
yomimono has joined #ocaml
jrslepak has joined #ocaml
Guest38 has joined #ocaml
<ggole_> Sigh, updated opam and now my ocp-indent is brain damaged
<ggole_> Downgraded to 0.6.1 ಠ_ಠ
<ggole_> I... don't understand why that would happen
jyc has quit [Ping timeout: 260 seconds]
JuanDaugherty has joined #ocaml
rpg has joined #ocaml
jgjl has joined #ocaml
yomimono has quit [Read error: Connection reset by peer]
rpg has quit [Quit: rpg]
jyc has joined #ocaml
jeffmo has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
<yminsky> Does anyone know if TyXML supports the kind of diff-and-patch approach of virtual-dom and other similar projects?
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<please_help> are there any reverse-mode symbolic or automatic differentiation libraries for ocaml?
jgjl has joined #ocaml
JacobEdelman has joined #ocaml
<companion_cube> not that I know of
octachron has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
<yminsky> Though maybe there's one coming. http://www.composeconference.org/2016/speakers/
<yminsky> Search for "Markus Mottl"
psy_ has joined #ocaml
_2can has joined #ocaml
struk|desk|away is now known as struk|desk
<please_help> yminsky: this looks like exactly what I'm looking for. Hopefully there'll be a public release somewhere in February.
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has quit [Ping timeout: 260 seconds]
struk|desk is now known as struk|desk|away
kdas_ has joined #ocaml
Haudegen has joined #ocaml
sz0 has quit [Quit: Bye.]
m___ has joined #ocaml
kushal has quit [Ping timeout: 276 seconds]
cody` has joined #ocaml
<m___> How we can define a modeule based on another? It looks that something like this doesn't work: let (module B) = (module A)
<ggole_> At top level, module B = A. Locally, let module B = A in ...
<m___> great!
<m___> thanks
Haudegen has quit [Ping timeout: 250 seconds]
palomer has joined #ocaml
m___ has quit [Ping timeout: 252 seconds]
Submarine has quit [Quit: Leaving]
rpg has joined #ocaml
ygrek_ has joined #ocaml
Haudegen has joined #ocaml
ryanartecona has joined #ocaml
igitoor has quit [Ping timeout: 240 seconds]
igitoor has joined #ocaml
struk|desk|away is now known as struk|desk
igitoor has joined #ocaml
igitoor has quit [Changing host]
sgeisenh has joined #ocaml
palomer has quit [Quit: palomer]
ryanartecona has quit [Quit: ryanartecona]
kakadu_ has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
Algebr has quit [Remote host closed the connection]
jgjl has joined #ocaml
octachron has joined #ocaml
yomimono has joined #ocaml
Algebr` has quit [Remote host closed the connection]
rpg has quit [Remote host closed the connection]
rpg has joined #ocaml
ggole_ has quit []
smkz has quit [Quit: x]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
struk|desk is now known as struk|desk|away
pyon is now known as pyon-omega
ollehar has joined #ocaml
darkf has quit [Quit: Leaving]
groovy2shoes has quit [Quit: Leaving]
groovy2shoes has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JuanDaugherty has quit [Remote host closed the connection]
riceandbeans has joined #ocaml
<riceandbeans> by chance could anyone help me compile an ocaml program?
<riceandbeans> my first experience with ocaml and I can't get it to work
<riceandbeans> the project is liquid soap on github
<smondet> riceandbeans: are you using opam?
<okilele> riceandbeans, oasis helps a lot
<smondet> okilele: liquidsoap does not use oasis...
freehck has quit [Remote host closed the connection]
<riceandbeans> I don't know these words
<riceandbeans> so I did a git clone, autoconf, ./configure
<riceandbeans> it failed because of no install.sh
<riceandbeans> so I did autoheader, aclocal, autoconf, ./configure
<riceandbeans> then it failed on a line that should've been skipped by the logic
manizzle has quit [Read error: Connection reset by peer]
<smondet> riceandbeans: given that the project has a bunch of dependencies, (for me) it sounds easier to get opam (http://opam.ocaml.org/doc/Install.html) and then `opam install liquidsoap`
<riceandbeans> so opam is like gem
<smondet> but better :)
<riceandbeans> why?
<smondet> opam is pretty clever, people are pretty happy with it
<riceandbeans> hgmmm
<riceandbeans> this feels like a cross between gem and cpan
<riceandbeans> hmmm
<riceandbeans> actually, I take that back
<riceandbeans> it like gem crossed with cpan but with a brain
<riceandbeans> where does opam install to?
<riceandbeans> ....and the errors are actionable, I like it
<riceandbeans> it says it installed liquidsoap, though I don't see to where
nullcatxxx_ has joined #ocaml
<smondet> riceandbeans: did you do the eval `opam config env` ? the program should be in your $PATH then
<riceandbeans> ok
<riceandbeans> .opam/system/bin/
jrslepak has quit [Quit: This computer has gone to sleep]
Accidus has joined #ocaml
ely-se has joined #ocaml
Algebr has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
Accidus has quit [Ping timeout: 276 seconds]
Accidus has joined #ocaml
<Algebr> How can I change the output of where Lwt_log should take its messages? For example after lwt daemonize, say I want to then reopen stdout,
Simn has quit [Read error: Connection reset by peer]
octachron has quit [Quit: Leaving]
mac10688 has joined #ocaml
Guest38 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest38 has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Algebr has quit [Ping timeout: 250 seconds]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yomimono has quit [Quit: Leaving]
hay207 has joined #ocaml
hay207__ has quit [Ping timeout: 260 seconds]
jpdeplaix has quit [Ping timeout: 250 seconds]
kakadu_ has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
hay207_ has joined #ocaml
hay207 has quit [Ping timeout: 260 seconds]
huza has joined #ocaml
jpdeplaix has joined #ocaml
Guest30742 is now known as johnelse