johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
troydm has quit [Ping timeout: 244 seconds]
pierpa has quit [Ping timeout: 252 seconds]
Axle has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
dsheets has joined #ocaml
larhat has quit [Ping timeout: 244 seconds]
dsheets has quit [Ping timeout: 250 seconds]
larhat has joined #ocaml
noddy has joined #ocaml
kolko has quit [Ping timeout: 260 seconds]
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
snhmib has quit [Quit: WeeChat 1.3]
johnelse has quit [Ping timeout: 276 seconds]
johnelse has joined #ocaml
Reshi has joined #ocaml
wiredsister has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
johnf_ has joined #ocaml
tennix has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
troydm has joined #ocaml
noddy has quit [Ping timeout: 248 seconds]
struk|desk|away is now known as struk|desk
mistermetaphor has joined #ocaml
IbnFirnas has quit [Quit: Connection closed for inactivity]
palomer has quit [Quit: palomer]
palomer has joined #ocaml
misterme_ has joined #ocaml
mistermetaphor has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
palomer has quit [Quit: palomer]
palomer has joined #ocaml
palomer has quit [Client Quit]
FreeBirdLjj has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
d0nn1e has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
struk|desk is now known as struk|desk|away
misterme_ has quit [Remote host closed the connection]
wiredsister has quit [Ping timeout: 268 seconds]
struk|desk|away is now known as struk|desk
mistermetaphor has joined #ocaml
Algebr` has joined #ocaml
misterme_ has joined #ocaml
mistermetaphor has quit [Ping timeout: 244 seconds]
Mercuria1Alchemi has joined #ocaml
<Algebr`>
OCaml meetup in San Francisco was a great success, a lot of new faces and familiar ones. C++ people asked performance questions, boxing, garbage collector, etc. People are very excited about the language && functional programming in general. Group demanded next meetup be about js_of_ocaml.
nicooo has joined #ocaml
manizzle has joined #ocaml
nicoo has quit [Ping timeout: 260 seconds]
orbitz has joined #ocaml
<Algebr`>
People also want to see something mirage deployed to aws.
<flux>
has anyone looked into bloomberg's version of it? though it's not apparently in opam..
<flux>
though "It is in an very early stage and not production ready for your own projects yet."
<Algebr`>
people were not aware of bucklescript but I am interested in it myself, I won't be using it for the next meetup though, will stick with js_of_ocaml.
<Algebr`>
Oh and some people were already familiar with f#, so was nice to have that commonality.
<Algebr`>
although OCaml name recognition is horrible.
<Algebr`>
but somehow people heard about ctypes? That was ood to me.
<Algebr`>
odd
twobitsprite has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<twobitsprite>
!paste
FreeBirdLjj has joined #ocaml
<twobitsprite>
do you all have a preferred pastebin?
<twobitsprite>
trying to figure out this "circular build" error
<twobitsprite>
googled around, and one page said it had something to do with referencing the module name within the module itself, but I checked and none of my modules reference themselves.
<twobitsprite>
(also, I ask about the pastebin because some language channels are awfully picky about pastebins, and they usually list their favority in the /topic :P)
dsheets has joined #ocaml
<mrvn>
that simply is a circular depends
<twobitsprite>
mrvn: I'm an idiot... can you explain like I'm 5? I don't see where it's circular...
<Algebr`>
foo.ml make module Foo and bar.ml makes module Bar. You can't reference Bar in foo.ml and Foo in bar.ml
<twobitsprite>
Algebr`: which one of my files is referencing itself? I check them all
<mrvn>
twobitsprite: bfcl opens bfcp and bfcp has Bfcl.bftoken
<Algebr`>
not itself, but each other.
<twobitsprite>
mrvn: bfcp has Bfc.bftoken, not Bfcl.bftoken
<mrvn>
and bfc opens bfcl
<twobitsprite>
ok, maybe my confusion is this: where do you normally define the variant types for parsers?
dsheets has quit [Ping timeout: 250 seconds]
<twobitsprite>
should I move that to the bfcl.mll?
<Algebr`>
could make another file, types.ml or something like that.
<twobitsprite>
obviously, I'm implementing a simple brainfuck compiler because I'm new to yacc/lex stuff, so I'm not sure exactly how everything relates to each other
<twobitsprite>
Algebr`: is that what people usually do?
<Algebr`>
hmm, last time I did this was for compilers class, i think that's what we did
<twobitsprite>
I moved the type def to bfcl.mll, and removed the "open Bfcl" in bfc.ml ... still getting a circular build error
<twobitsprite>
at this point I feel like I'm stabbing in the dark, and even if I get it right, I feel like I'll still be missing the point.
<twobitsprite>
I'm trying to really understand the relationship between ml, mly, and mll files
<mrvn>
so you've gone from 3 files to 2 files circle.
<twobitsprite>
mrvn: ok... so, right now, bfc.ml only opens Core.Std and Lexing; bfcp.mly opens nothing; and bfcl.mll only opens Bfcp. Where's the circle?
<twobitsprite>
is there an implicit open somewhere?
<twobitsprite>
all the black magic in the lex/yacc stuff is what I'm confused about... does the mly file implicitly open the mll?
<mrvn>
Bfcl.bftokens is a dependency
<twobitsprite>
right
<twobitsprite>
(pondering...)
<mrvn>
08:11 < Algebr`> could make another file, types.ml or something like that.
<twobitsprite>
I see how that would work, but none of the tutorials or docs I've read have ever mentioned a separate .ml file... seems like a bandaid, and I feel like I would still be in the dark about why it's needed...
<mrvn>
because you can't have a cycle
<Algebr`>
I suppose that's when a tutorial ends and when you start thinking on your own begins.
<Algebr`>
Nothing wrong with making a new file
larhat has quit [Quit: Leaving.]
<twobitsprite>
ok, so I move the type def to a new file, then open it in bfc.ml and bfcl.mll?
<twobitsprite>
don't leave me hanging... if you're giving up and moving on, just let me know ;)
Reshi has quit [Ping timeout: 248 seconds]
<twobitsprite>
if I remove the "open Bfcp" from bfcl.mll, I get unbound constructor errors, so I'm pretty sure that needs to be there...
<Algebr`>
twobitsprite: sorry, my cat broke something again. Without seeing it exactly, again, look for a circular dependency.
<twobitsprite>
nothing imports anything else... the only imports are to bfctypes, which doesn't import anything else...
nicholasf has quit [Ping timeout: 252 seconds]
<twobitsprite>
I found it... I am an idiot afterall....
<twobitsprite>
thanks for making me look at it differently
<twobitsprite>
sometimes that's all you need :L
<twobitsprite>
as much as I love ocamlfind, it can make things hell if you implicitly reference a module you didn't even realize you were importing
<Algebr`>
yay
<twobitsprite>
I still had a Bfcl.Eof reference down in my bfc.ml code, and I guess ocamlfind saw that and tried to import it... changed it to Bfctypes.Eof, and now I'm getting more reasonable type errors that I can understand :)
misterme_ has quit [Remote host closed the connection]
<Algebr`>
its not so much importing or ocamlfind, but the compiler.
<Algebr`>
importing makes it sound like python
<mrvn>
from sanity import ocaml
<Algebr`>
from sanity import *
Anarchos has joined #ocaml
regnat has quit [Quit: WeeChat 1.4]
mistermetaphor has joined #ocaml
regnat has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
julien_t has joined #ocaml
mistermetaphor has quit [Ping timeout: 240 seconds]
antkong has quit [Quit: antkong]
butts_butts has joined #ocaml
djellemah_ has quit [Remote host closed the connection]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
butts_butts has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
julien_t has quit [Ping timeout: 244 seconds]
octachron has joined #ocaml
madroach has joined #ocaml
Vintila has joined #ocaml
Haudegen has joined #ocaml
Haudegen has quit [Ping timeout: 276 seconds]
toolslive has joined #ocaml
ygrek has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
julien_t has joined #ocaml
struk|desk is now known as struk|desk|away
ontologiae has joined #ocaml
zaquest has quit [Ping timeout: 244 seconds]
Algebr` has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
larhat has joined #ocaml
jave has quit [Ping timeout: 260 seconds]
jave has joined #ocaml
zaquest has joined #ocaml
octachron has quit [Ping timeout: 250 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
noddy has joined #ocaml
Simn has joined #ocaml
Vintila has quit [Ping timeout: 264 seconds]
abbiya has joined #ocaml
mistermetaphor has joined #ocaml
<Maelan>
companion_cube, ggole, i don’t know (yet!) what exactly a write barrier is
<companion_cube>
when you write `r := x`, and `x` is a block (a pointer to a heap value)
<companion_cube>
there might be a problem if `r` is in the major heap and `x` in the minor heap
jwatzman|work has joined #ocaml
<companion_cube>
yeah, it should explain
<adrien>
a barrier is roughly a weak/light form of synchronization
mistermetaphor has quit [Ping timeout: 260 seconds]
osheeta has joined #ocaml
antkong has joined #ocaml
pyon has quit [Quit: ... usa usa pyon pyon ... (\_/)]
tane has joined #ocaml
sillyotter has joined #ocaml
<Maelan>
anyway, i did the tests you suggested here: 2016.03.29 16:37< companion_cube> Maelan: try to rewrite with a recursive function, without a reference
<companion_cube>
still 4 times slower, is that it?
<Maelan>
yes
<companion_cube>
maybe it's just that int is very fast ^^
<Maelan>
(i originally used ** 2 for squaring with zarith, guessing that zarith knew better how to optimize this, in which i was wrong: performances were by far worst)
<zozozo>
zarith probably suffers from function call where there are simple instructions for ints (maybe flambda inlining would help ?)
djellemah has quit [Quit: Leaving]
djellemah has joined #ocaml
<Maelan>
test-zarith is my original zarith version (with while loops and references), test-zarith-rec[012] are successive removal of references (0: looping reference delegated into a function for_z; 1: for_z do not use reference; 2: get rid of all the references with tail-rec looping functions)
sillyotter has quit [Quit: WeeChat 1.4]
<Maelan>
-rec[12] are slightly faster, and -rec0 would be too, if « incr i » was replaced by « i := Z.succ !i » inside for_z (i assume this is an example of this story about non-escaping reference) (but for some reason inlining incr in « incr a » has no impact)
<Maelan>
but all this is still more than 3 times slower
ygrek_ has joined #ocaml
abbiya has quit [Quit: Leaving]
ygrek has quit [Ping timeout: 240 seconds]
ygrek_ has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
nicholasf has quit [Remote host closed the connection]
wolfcore has quit [Ping timeout: 240 seconds]
wolfcore has joined #ocaml
yegods has joined #ocaml
silver has joined #ocaml
nicholasf has joined #ocaml
Vintila has joined #ocaml
dsheets has quit [Remote host closed the connection]
<toolslive>
anybody with experience of compiling larger pieces of C code with ocamlbuild ? I have it working fine with a .clib but ocamlbuild doesn't automatically copy over the header (.h) files into the _build dir. Do I need to manually force the dependency in myocamlbuild.ml ?
<flux>
toolslive, I think this is the case.. perhaps you can hook up gcc -MM to find the dependencies for you ;)
<Drup>
Algebr: wrt meetup: nice!
<toolslive>
thx. no need for overkill, for now, it's just 1 header file
<hannes>
anyone here has a solution for those messages (when using ppx): findlib: [WARNING] Interface config.cmi occurs in several directories: lib, /home/hannes/.opam/4.02.3/lib/ocaml/compiler-libs
<hannes>
findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /home/hannes/.opam/4.02.3/lib/ocaml/compiler-libs, /home/hannes/.opam/4.02.3/lib/ocaml
<`rks>
for the first one: don't name your file config
<hannes>
the former is pretty bad since documentation generation breaks (by using Config from compiler-libs instead of the local one)
<`rks>
for the second one: nope, no solution.
<`rks>
(but the second one is not really a problem, just annoying)
<hannes>
`rks: it is accessible via Tls.Config... (via packing)... how can that clash?
dsheets has joined #ocaml
<hannes>
(also, keep in mind compilation works, but warns, whereas documentation generation (using ocamldoc) breaks)
dhil has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
_andre has joined #ocaml
Kakadu has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
<hannes>
`rks: is there somewhere a list of modules you shouldn't use in your library?
Haudegen has quit [Ping timeout: 264 seconds]
<flux>
hannes, if by bug it provides config.cmi?
<flux>
hannes, it everything is packed into Tld, then it should only provide tls.cmi
<hannes>
flux: what gets installed is config.[annot/cmt/cmti/mli], and tls.[a/cma/cmi/cmt/cmx/cmxa/cmxs]...
<hannes>
(which as far as i understand it, is good)
A1977494 has joined #ocaml
A1977494 has quit [Client Quit]
A1977494 has joined #ocaml
A1977494 has quit [Client Quit]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
A1977494 has joined #ocaml
hay207 has joined #ocaml
A1977494 has quit [Client Quit]
A1977494 has joined #ocaml
dhil has quit [Ping timeout: 244 seconds]
Haudegen has joined #ocaml
FredF has quit [Remote host closed the connection]
dsheets has quit [Remote host closed the connection]
<Maelan>
mrvn, i’m not trying to optimize again and again my small piece of code (i got my result, i do not even need it anymore)
<Maelan>
i’m trying to understand where time is spent and how optimization works
<Drup>
Maelan: you tried with flambda -O3 ?
<Drup>
(pure curiosity)
Vintila has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<Maelan>
Drup, no
<`rks>
hannes: what you say isn't consistent
<`rks>
you say "config is packed, only available from tls"
<`rks>
but you say "it warns about config.*** in lib/ and doesn't manage to generate documentation for config"
<`rks>
so I'm guessing you're not using tls but compiling it?
<hannes>
`rks: this is how it is atm.. I can compile (and pack) without problems, but `make doc` fails (due to Config)
<`rks>
ok :)
<`rks>
so once again, the easy answer is: "don't have a file named config"
<`rks>
the other answer is: "don't use ocamldoc"
<hannes>
which is equivalent to "break the API"...
<`rks>
:)
<hannes>
aha... thanks..
<`rks>
hannes: isn't ocaml-tls an ocamllabs-related thingy?
mistermetaphor has joined #ocaml
<`rks>
surely you must know about codoc, the awesome-ocamldoc-replacement-no-one-will-ever-see, which is/has been developped there
<hannes>
`rks: I have not been paid by ocamllabs... (david has, though)... it is related, yes... but codoc hasn't been released..
<hannes>
but I still do not understand why those module names clash (and why compiler-libs is dragged in for documentation generation)
<`rks>
but it does work with packed modules
<`rks>
I think you basically have to opam pin the master version of all the doc-ock-* libraries which are on lpw25's github
<`rks>
plus codoc
<`rks>
and it should build and work
<`rks>
(if you know how to invoke it)
<`rks>
(which is not trivial)(
<Drup>
can confirm, I did that recently
<`rks>
same here.
<`rks>
hannes: « why compiler-libs is dragged in for documentation » no idea. because it looks for everything in its loadpath?
<`rks>
which probably includes all the packages you depend on
<Drup>
but, hum, you shouldn't have issues with pack/conflict name with ocamldoc
<Drup>
ocamldoc is very dump, it doesn't do anything with modules
<Drup>
dumb*
<`rks>
yeah I'm also surprised by the conflict
<companion_cube>
Drup: lapsus :D
<`rks>
but it's probably because there are too many things in the load path? try removing all the .cm{i,t,ti} files from lib/ except the ones for the packed module
<hannes>
you can reproduce this locally... opam source tls; cd tls-0.7.1 && make doc
mistermetaphor has quit [Ping timeout: 244 seconds]
<hannes>
and it'll complain about engine.mli:44 ...
<`rks>
pfiou, I have to install a shitton of dependencies
<Drup>
`rks: ocamldoc doesn't use cmt*, does it ?
<`rks>
Drup: I don't think so no
<companion_cube>
:D
<Drup>
so, that's not the issue
<`rks>
the cmis might be
<`rks>
after all, it *does* complain about the cmis.
<Drup>
hannes: what's the exact error message during doc generation ?
<Drup>
`rks: the message about cmis is findlib
<`rks>
(note that while we're complaining about ocamldoc, only ocamlfind is complaining)
yegods has quit [Remote host closed the connection]
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
noddy has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
noddy has joined #ocaml
nicholasf has quit [Remote host closed the connection]
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
ontologiae has joined #ocaml
antkong has quit [Quit: antkong]
BitPuffin has joined #ocaml
dsheets has joined #ocaml
BitPuffin has quit [Ping timeout: 240 seconds]
BitPuffin has joined #ocaml
hcarty has joined #ocaml
<hcarty>
What could cause Lwt_main.run to never return? A colleague and I are working on some Cassandra bindings (to hopefully release some time soon). The Lwt version works except that Lwt_main.run seems to never return.
BitPuffin has quit [Ping timeout: 244 seconds]
kolko has joined #ocaml
aantron has quit [Remote host closed the connection]
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
jwatzman2 has joined #ocaml
jwatzman|work has quit [Disconnected by services]
jwatzman2 is now known as jwatzman|work
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
strmpnk has quit [Ping timeout: 248 seconds]
strmpnk has joined #ocaml
copy` has joined #ocaml
<toolslive>
hcarty: do you cancel the threads at the end of your application ?
rossberg has quit [Ping timeout: 264 seconds]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
<hcarty>
toolslive: No, no threads are canceled in the code
<toolslive>
I have seen in the past that cancelling lwt threads doesn't always work, and leads to things that hang
rossberg has joined #ocaml
<hcarty>
To make it weirder, if I open it in lldb (currently trying this on a Mac) and I suspend then resume the process it exits properly
<hcarty>
The bindings are using the C interface to Cassandra which uses libuv internally. Maybe there's an issue there, a conflict between libev in Lwt and libuv in the driver...
freehck has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
<flux>
hcarty, have you tried tracing tools?
<flux>
hcarty, it should show that the program ends up in a select that waits for some file descriptor..
<flux>
and earlier on in the trace you can find how you end up with having such an fd
<Maelan>
Drup, so i
<flux>
hcarty, how do you bind libuv to the lwt main loop?
<flux>
hcarty, or do you run it in its own thread?
<flux>
(or does Lwt also support libuv and they both use the same instance?)
struk|desk|away is now known as struk|desk
<Maelan>
Drup, so one silly question: how do you use flambda today? i switched to 4.03.0+trunk+flambda and ocamlopt has options like -dflambda, but no -flambda itself
Mercuria1Alchemi has quit [Ping timeout: 244 seconds]
<flux>
hcarty, it seems feasible to me that if there somehow were two event loops involved, one of them might still be stuck waiting for a signal (ie. suspension) to make them carry on..
<Drup>
Maelan: you don't have to give further options
<Drup>
well, -O3 will help :)
<flux>
do we still get to join the -funroll-loops -folks?
<adrien>
we need -O4
<Drup>
-O∞
darkf has quit [Quit: Leaving]
<Drup>
-Odelà
dhil has joined #ocaml
<Maelan>
Drup, okay, so using flambda and -O3 seems not to have actual impact (except that my -rec0 is now as fast as my -rec1, probably because incr now gets inlined)
aantron has joined #ocaml
<hcarty>
flux: cpp-driver (the C Cassandra interface) uses libuv internally. There's not direct tie to Lwt, which is still using libev
<hcarty>
flux: I've never used a tracing tool for something like this before - seems like a good time to start, thanks!
sh0t has joined #ocaml
<flux>
hcarty, good luck, you're going to need it.. :)
<sspi>
what's the best way to generate OCaml modules on the fly? (I currently modify OCaml modules using PPX to add wrapper functions - and now want to create a dispatcher for these modified modules)
yegods has joined #ocaml
hay207 has quit [Quit: Konversation terminated!]
orbifx has joined #ocaml
<orbifx>
Is there a recommendation of where to put cmx and cmi files when compiling with a Makefile?
<orbifx>
A dedicated directory, in the src, on the top folder?
lokien_ has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Drup>
sspi: a dispatcher ?
<Drup>
anyway, ppx is still the solution
<flux>
orbifx, sadly basically there are not other options than the same directory as the source
<flux>
orbifx, or are there?
<sspi>
Drup: I don't have a dispatcher.ml - I want to create from nothing (or actually the information from the other PPX-ed modules)
<Drup>
We did something like this for tyxml recently
<Drup>
I didn't listed the issues that are already listed there
silver has quit [Quit: rakede]
<companion_cube>
hmm, annoying: if `f : ?foo -> a -> b`, `f x` is ok but `f @@ x` triggers the warning about implicit elimination of optional arguments
<hcarty>
companion_cube: It's worth reporting, at least to get an "official" opinion. Maybe for |> too?
<flux>
I wonder how fragile the optional argument thingies is implementation-wise. it certainly could be nicer for every-day use than it currently is :/, but perhaps theoretically hard.
FreeBird_ has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
<seangrove>
aantron: For the ppx PR, is there any support for custom tags? I'm thinking about what the React(js/Native) JSX equivalent would look like.
<aantron>
seangrove: no
<Drup>
seangrove: there is no real support for that in tyxml anyway
<aantron>
html supports custom tags, but the ppx/tyxml side will not accept them
FreeBirdLjj has quit [Ping timeout: 264 seconds]
yegods has quit [Remote host closed the connection]
mistermetaphor has quit [Read error: Connection reset by peer]
mistermetaphor has joined #ocaml
<seangrove>
sspi: Yeah, I've looked that over, but the `Div.make ~~" is pretty terrible to use
<seangrove>
I was hoping to be able to take some representation that was parsed and typed checked from tyxml and generate React-interop from that (similar to JSX)
<Drup>
If it's actual html, then it's fine
<seangrove>
Drup: Can you expand your comment on that gist with an example of what would fail?
<seangrove>
Drup: Nope, custom tags too
<Drup>
{div| className="blah" {div| |div} |div}
<Drup>
that's not valid ocaml syntax
<sspi>
what Drup mentions is also what's in the comment that I send...
<seangrove>
JSX is just a preprocessor that desugars to javascript calls
<seangrove>
View is like <div>, just a container
<seangrove>
But not web-specific, it has equivalents in native apps too
<Drup>
This might be a bit presomptuous of me, but why are you trying so hard to use html syntax (which is bad) for things that are not html, will potentially not be desugared to html and which are functions call anyway ?
<Drup>
did you rewrote the combinator by hand ? :D
<seangrove>
That's pretty terrible, but it's me trying to experiment with various syntax approaches to make writing the UIs more palatable
<Drup>
ahah, yes you did
<Drup>
yeah, you should use tyxml's functors
<aantron>
in terms of supporting custom tags there are the functions "tot", but that partially defeats the purpose of tyxml, which is static checking, where such functions are used
<aantron>
so the ppx can i think be made to support custom tags, perhaps optionally, but whether this is a good idea is a separate matter
ljs has joined #ocaml
<Drup>
aantron: one idea, would be to add an option that would emit custom tags as functions, possibly scoped in a specific module ("Custom" ?)
<aantron>
yeah. that may work. a less "safe" idea would be to accept a whitelist of custom element names
<Drup>
<view ...></view> would become "Custom.view ..."
<Drup>
No, whitelist are bad
seangrove has quit [Read error: Connection reset by peer]
<Drup>
I don't want to maintain such a whitelist inside tyxml
seangrove has joined #ocaml
<sspi>
JSX is probably mostly appealing to a certain group of developers
<Drup>
seangrove: for the ppx ? The code you wrote is not different for not-ppx tyxml
<Maelan>
i have some questions about optimisation, i always wonder when writing closures and recursive functions: http://paste.awesom.eu/Maelan/311k&ln
<ljs>
Hello, a quick question about define a recursive type. I want to represent a graph using adjacent nodes. Each `node` has int `id` and `adj`. `adj` I want to use NodeSet.t, which is a module from BatSet.Make. So here is the problem: BatSet.Make needs to use `node` but node needs to use the NodeSet.t. How can I solve this?
<aantron>
the whitelist would be some option you can pass to the ppx, to read a list of element names from file (or something). would depend on the user, or maybe some library built on top of tyxml, but not tyxml itself. anyway
<Drup>
aantron: huum
<seangrove>
Drup: Yeah, I'm pretty unhappy with the code as it is, and expect it would be significantly nicer with the ppx stuff. So, waiting.
<ljs>
This is what I have for now. type node = { id : int, mutable adj: NodeSet.t } and module NodeSet = Set.Make(struct type t = node let compare a b = compare a.id b.id end)
yegods has joined #ocaml
<Drup>
I understand the appeal of the ppx for the boilerplate part, but for actually building widgets ? I'm less convinced. I prefer to use functions directly
BitPuffin has joined #ocaml
<sspi>
Drup: I don't think you are the target here - more likely plain web developers
<Drup>
fair enough :p
<aantron>
ljs: typical solutions are indirection
<aantron>
you may also get somewhere with recursive modules
<Drup>
I need a wbe developer advisor
<aantron>
Maelan: i cant answer those questions (perhaps someone else can), i would be curious to know the answers though. if you dont get them in IRC, try mailing the mailing list. that kind of thing is often discussed there
<aantron>
reddit could also work well
BitPuffin has quit [Ping timeout: 244 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
<ljs>
aantron: Thanks. It seems I have to make node a module to have recursive modules
<sspi>
Drup: I would suggest to talk with Jordan Walke (creator of React and doing a lot with OCaml)
<aantron>
yes, but at the end you could define an unscoped type abbreviation
<aantron>
that points into this module
<aantron>
you may also be able to find a library for non-functorial sets, or abuse Hashtbl
<aantron>
then you could use mutually-recursive types
<Drup>
sspi: I did already, but his objectives are a bit distincts from mine
<Drup>
seangrove: is it really more verbose than the html equivalent ?
butts_butts has joined #ocaml
dsheets has quit [Remote host closed the connection]
<Drup>
(genuine question here, personally I don't find it more verbose, but I'm curious)
noddy has quit [Ping timeout: 240 seconds]
<doomy>
Hello gentlemen
<sspi>
doomy: hello to you too gentleman
<doomy>
:)
<doomy>
If I have several modules, can I have a sort of 'master module' which aliases all the others into the local scope ?
<doomy>
for exemple: Module1.mli contains types/functions ; Module2.mli contains functions ; and I want some MasterModule.mli which "open Module1" and "open Module2"
<doomy>
except that open doesn't seem to work in mli
<doomy>
(I come from c++, and hugely used to namespaces)
noddy has joined #ocaml
tane has quit [Quit: Verlassend]
ljs has quit [Quit: Be back later ...]
<seangrove>
Drup: Yup!
<seangrove>
Drup: To be honest, I *vastly* prefer Clojure's hiccup approach for quite a few reasons
<seangrove>
But barring that, it would be HTML(ish) that they would want to write
<hcarty>
doomy: You can 'include' the modules in everything.ml and everything.mli if you want all your values, types, etc to live in Everything
<Drup>
seangrove: I'm looking at it
<Drup>
it's more compact, but that seems to be all, is there something I'm missing
<Drup>
?
<orbifx>
Stupid ruby.. Wasting my life and I don't even write anything in it..
<seangrove>
Drup: hiccup? Well, 1.) it's more compact, that's quite nice. 2.) It's regular, so paredit works with it (incredibly helpful) 3.) it's just regular data structure literals in clojure, no special syntax or fn invocation necessary
<seangrove>
Drup: It's missing things like built-in type checking, etc. though of course
<doomy>
hcarty: oh, nice. Thank you !
<Drup>
I'm not really sure to see the benefit of 3
<seangrove>
Drup: Well, it's a clojure thing, don't worry too much about it. Definitely nice in that world.
<Drup>
Yeah
larhat has quit [Quit: Leaving.]
<Drup>
I mean, the fact that it's shorter is nice, but it's not an API that you can make in OCaml
<Drup>
(optional argument without a label and map literals ...)
<Drup>
a part from the shortness, it doesn't seem very different
<seangrove>
Drup: Yeah, that's tough.
<Drup>
seangrove: I feel like I'm missing if you find that fabulous and you don't like tyxml's API ^^'
<seangrove>
Drup: Oh, no. I'm slightly dubious about it, but I'm eager to give it a try!
<Drup>
(in particular, tyxml is *much* better at doing the last thing, with the for loop and a li)
<seangrove>
The above points weren't really directed at tyxml at all, I'll wait to pass more serious judgement after using it ;)
<Drup>
well, you'll tell me, I guess. I'm just wondering what's so different between the two
ontologiae has quit [Ping timeout: 276 seconds]
ygrek_ has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
BitPuffin has joined #ocaml
noddy has quit [Ping timeout: 248 seconds]
BitPuffin has quit [Ping timeout: 268 seconds]
<freehck>
Hello people.
dsheets has joined #ocaml
<freehck>
Is there a way to modify a class constructor in order to make it to make it to print some message when it creates a new object?
<freehck>
s/to make it//
pierpa has joined #ocaml
<Kakadu>
AFAIR there is initializer keyword
<freehck>
Kakadu: thx!
<Kakadu>
maybe it will be helpful
shinnya has joined #ocaml
zarul has joined #ocaml
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
<ggole>
class foo () = let _ = print_string "zonk!\n" in object end;;
pyx has joined #ocaml
pyx has quit [Client Quit]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
Haudegen has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
dsheets has joined #ocaml
sepp2k has quit [Quit: Leaving.]
wiredsister has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
d0nn1e has quit [Ping timeout: 246 seconds]
BitPuffin has joined #ocaml
d0nn1e has joined #ocaml
<flux>
soo, someone remind me, why is ocamlbuild slow in large projects and can it not be fixed? because it does dependency scanning all too often?
yegods has quit [Remote host closed the connection]
BitPuffin has quit [Ping timeout: 240 seconds]
<flux>
a inotify-based backend to ocamlbuild could be pretty cool in solving daily usage performance issues.
dhil has quit [Ping timeout: 244 seconds]
<flux>
I mean, who reads compiler errors nowadays anyways now that we have merlin :)
ggole has quit []
<Algebr>
Drup: thanks! seangrove: Yep, saw it, looks good. JS X is neat, I was talking to Jordan last night about it too, wanted to make JS X a first class citizen (I wanted to try bindings to react again)
ygrek_ has quit [Ping timeout: 248 seconds]
yegods has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
dhil has joined #ocaml
<Algebr>
freehck: and you can have multiple initializers
lokien_ has quit [Quit: Connection closed for inactivity]
<Algebr>
Drup: nice gif for ocp-browser, are you still working on it or does further work need support from compiler?
BitPuffin has joined #ocaml
ygrek_ has joined #ocaml
marsam has quit [Read error: Connection reset by peer]
jgjl has joined #ocaml
tane has joined #ocaml
noddy has joined #ocaml
BitPuffin has quit [Ping timeout: 244 seconds]
<Algebr>
Drup: updated starterkit with the better image
<Algebr>
now need one for merlin, utop
<Drup>
Algebr: I'm not working on it, but it's almost only a time issue
<Drup>
well, you can remove the almost
Haudegen has joined #ocaml
Kakadu has quit [Quit: Page closed]
<Algebr>
React is only 18k lines of JS, we can reimplement it no biggie right?...
<seangrove>
"undefined reference to `blit_nat'" sounds familiar, from some of the iOS and jsoo stuff I was doing
<Maelan>
aantron, these optimisations seem quite trivial to me, but i may be wrong and that’s why i would like to get a definitive answer
<seangrove>
Algebr: Ah, did Jordan come to the meetup?
<Drup>
seangrove: why are you linking both mirage stuff and js_of_ocaml stuff ?
<Algebr>
seangrove: no I wish, chatting over twitter.
<seangrove>
Drup: The config.ml setup for mirage. I use jsoo in my site, so I need to add it to the config.ml to make sure it gets installed for the other devs (in the future)
silver has joined #ocaml
<Drup>
that can't possible end well
<Algebr>
y
<seangrove>
Drup: But I don't believe that I'm linking the jsoo stuff, am I? I'm just using the default makefile generated by mirage, and none of the unikernel stuff I'm building right now references jsoo at all
<Drup>
ocamlbuild -pkg .... js_of_ocaml...
<Algebr>
if he's not referencing it at all then it should be optimized all out
<Drup>
wait a second, why are you using bigint ?
<Drup>
bigint/num/nat, it's the same thing
mistermetaphor has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
<seangrove>
... I don't know.
<seangrove>
I don't think I referenced it anywhere myself.
<seangrove>
It relies on ptime - maybe that somehow got in there?
<seangrove>
I've since removed all references, hoping that would fix things, but no luck.
<Drup>
Something somewhere is using num
<Drup>
seangrove: after "-dontlink,unix", add ",-dontlink,num"
<Drup>
We will see how it goes
kushal has quit [Ping timeout: 260 seconds]
octachron has joined #ocaml
noddy has quit [Ping timeout: 244 seconds]
<Algebr>
Drup: bob is moving so fast on bucklescript, seems like it has put pressure on jsoo to iterate more too
<Drup>
Not really, no
<Drup>
Work on js_of_ocaml is just irregular, because hhugo is in jst and jérome is working on besport, that's all. It happens by rush, it has always been like that
<Algebr>
what's jst
<Drup>
janestreet
<Algebr>
ha, 2 ocaml -> js devs both in nyc
<Drup>
pretty sure hhugo is in the london branch, actually
<seangrove>
Drup: Hey, that did something. I don't understand why, but that's cool.
<Drup>
seangrove: define "did something" :D
<flux>
in my ~/.ocamlinit it reads #use "/home/flux/ocaml/.opam/4.02.3/lib/toplevel/topfind";;, which obviously doesn't work if I opam switch to another version
<flux>
is there some trick to make this work?
<seangrove>
Drup: Seems to have compiled a xen image :) Not sure if the image will run yet, but at least it compiled
<Drup>
You really shouldn't put js_of_ocaml in your dependencies, though. It's bound to end badly
<seangrove>
Why though? It's a dependency for my project...
<Drup>
Yes, but it's not a dependency for your unikernel
<seangrove>
The whole dep story with Mirage is in a pretty shoddy state
<Drup>
You just need a build artifact that is a .js file
<seangrove>
True
<seangrove>
But I need it installed for merlin too
<Drup>
that doesn't have anything to do with the config file ...
<seangrove>
I really, really just want a "git clone; <magic project tool> prep .; deploy"
<seangrove>
where that prep step installs everything as needed, including all the pinned deps, etc.
<seangrove>
Then make works, merlin works, everything "just works"
<seangrove>
Sorry if I'm coming off as whiny, this has just been a growing frustration
<Drup>
I understand, but you are conflating two things
<Drup>
config.ml is the *unikernel* configuration
<seangrove>
What's the "overall project" configuration?
<seangrove>
(thanks for pointing out the conflation by the way, useful to make the disinction)
<Drup>
it's usually oasis, but it doesn't really work with mirage, hence it has issues ..
<Drup>
and*
<flux>
turns out simple "topfind" works :)
<Drup>
anyway, my advice; split your project in two
<Drup>
one part is the library + js part, the other is the unikernel proper
<Drup>
the unikernel doesn't know anything about js stuff, it just uses the .js
<Algebr>
seangrove: doesn't the mirage-xen CLI do stuff like that?
<Algebr>
maybe it can be updated to be smart about jsoo?
<Drup>
Algebr: yes, it's on the todo list
<Algebr>
<magic project tool>
hydan has quit [Quit: hydan]
<Drup>
unfortunatly, my todo list grows, my available time doesn't expand and my sanity decreases :D
butts_butts_ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<Algebr>
but internet karma points go way up
hydan has joined #ocaml
hydan has quit [Remote host closed the connection]
<Algebr>
need more hands
<Drup>
need more hands indeed
butts_butts has quit [Ping timeout: 244 seconds]
kushal has joined #ocaml
<Algebr>
I'll take a phd program acceptance in exchange for mirage os work
<seangrove>
Drup: Thanks again for all the stuff you do ;)
hydan has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
misterme_ has joined #ocaml
<Drup>
Bah, I'm generally happy to work on things that actually have users .. ;)
dsheets has quit [Remote host closed the connection]
<companion_cube>
bah, those pesky users
<Drup>
So annoying, they want magic things that are not research prototypes :>
mistermetaphor has quit [Ping timeout: 244 seconds]
<companion_cube>
they don't want ocsigen ? :(
<Drup>
I'm still not sure about that one
BitPuffin has joined #ocaml
orbifx2 has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
martintrojer has quit [Ping timeout: 248 seconds]
malina has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
martintrojer has joined #ocaml
Kakadu has joined #ocaml
yegods has quit []
<pierpa>
btw, what does ocsigen stands for?
<pierpa>
the name, I mean
Anarchos has joined #ocaml
octachron has quit [Ping timeout: 248 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
<Drup>
pun on oxygen
<pierpa>
hmmm
<malina>
just like when you need ot take a crappy walk in the rain, for the dog to crap and pee, I call it a "crappee" ,)
marsam has joined #ocaml
sh0t has quit [Ping timeout: 250 seconds]
dhil has quit [Ping timeout: 244 seconds]
Reshi has joined #ocaml
octachron has joined #ocaml
<Algebr>
eliom == helium
<pierpa>
hmmm
<pierpa>
seems more dyslexia than puns :)
larhat has joined #ocaml
<Algebr>
lwt == leet
antkong has joined #ocaml
<pierpa>
"Leet (or "1337"), also known as eleet or leetspeak, is an alternative alphabet for many languages that is used primarily on the Internet."
<Drup>
Algebr: hum, not really
<Drup>
LightWeight Threading
<Drup>
LWT
sh0t has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
<Algebr>
yea i know, was being coy
julien_t has quit [Ping timeout: 246 seconds]
malc_ has joined #ocaml
antkong has quit [Quit: antkong]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 250 seconds]
_andre has quit [Quit: leaving]
marsam has quit [Remote host closed the connection]
marsam has joined #ocaml
butts_butts_ has quit [Ping timeout: 268 seconds]
Haudegen has joined #ocaml
Algebr has quit [Ping timeout: 260 seconds]
Algebr has joined #ocaml
nicholasf has joined #ocaml
_habnbit is now known as _habnabit
t4nk979 has joined #ocaml
Algebr` has joined #ocaml
nicholasf has quit [Client Quit]
<t4nk979>
I know there was supposed to be more work on OPAM for windows
<t4nk979>
you think that will change with the "ubuntu on windows" announcement?
cgc_ has joined #ocaml
zarul has quit [Ping timeout: 260 seconds]
<cgc_>
hi, i try to build an AST using menhir. how do i include the AST in parser.mly? now i get unbound constructor
<octachron>
cgc_, where is defined your AST type?
nicholasf has joined #ocaml
<cgc_>
in a separate file AST.ml
Ravana- has quit [Ping timeout: 276 seconds]
<octachron>
%{ open AST %} before the grammar definition should work
<octachron>
or you could prefix your constructor with AST.Constructor
Ravana has joined #ocaml
<cgc_>
using the prefix the compiler will search in the current dir?
<octachron>
cgc_, not the compiler itself, but your build system should. It works if you are using ocamlbuild for instance.
hcarty has quit [Ping timeout: 268 seconds]
<cgc_>
thank you and also thanks for the correction :)
BitPuffin|osx has joined #ocaml
t4nk979 has quit [Ping timeout: 250 seconds]
dsheets has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
orbifx2 has quit [Read error: Connection reset by peer]
troydm has quit [Ping timeout: 244 seconds]
wiredsister has quit [Ping timeout: 268 seconds]
antkong_ has joined #ocaml
struk|desk|away is now known as struk|desk
troydm has joined #ocaml
hbar has quit [Ping timeout: 260 seconds]
hbar has joined #ocaml
seangrove has joined #ocaml
cgc_ has quit [Quit: Leaving]
marsam has quit [Read error: Connection reset by peer]
<malina>
windows... ugh 21st century mate, not 90s.. wrong millenia in fact ^^
<malina>
:p
tane has quit [Quit: Verlassend]
darkf has joined #ocaml
struk|desk is now known as struk|desk|away
octachron has quit [Read error: Connection reset by peer]
octachron has joined #ocaml
hnrgrgr has joined #ocaml
mariano_ has joined #ocaml
jeffmo has joined #ocaml
malc_ has quit [Remote host closed the connection]
sh0t has quit [Ping timeout: 248 seconds]
mariano_ has quit [Quit: Konversation terminated!]
manizzle has quit [Ping timeout: 264 seconds]
sh0t has joined #ocaml
manizzle has joined #ocaml
manizzle has quit [Remote host closed the connection]
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
Kakadu has quit [Remote host closed the connection]
octachron has quit [Quit: Leaving]
seangrove has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
psnively has joined #ocaml
<psnively>
Hi everyone. Any Oasis mavens here? :-)