adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
smondet has quit [Ping timeout: 250 seconds]
<Algebr> Looking for an example project that uses mehhir + oasis
<rgrinberg> I think you will have to tell ocamlbuild to use menhir in the _tags file anyway
<rgrinberg> Although, oasis has been improving recently.
<Algebr> yea, looking for a project where someone already did it
zirman has quit [Quit: Leaving...]
<Algebr> every time I try to get into ocamlbuild I end up extremely frustrated and quit
<aantron> Algebr: what do you run up against with ocamlbuild?
sh0t has quit [Remote host closed the connection]
<rgrinberg> Algebr: I'd do something like $ opam list --depends-on menhir and proceed from there.
<Algebr> aantron: the rules look completely ad-hoc to me
<Algebr> rgrinberg: good idea
<Algebr> like you can say: "ocaml foo bar" and how does it get parsed, etc, its just nuts.
<aantron> with ocamlbuild? not sure what "ocaml foo bar" refers to
<Algebr> like this ocamlbuild issue blocks me from contining with ctypes static generation of stubs.
<Algebr> I mean the rule targets that you can make
<Algebr> like: "cmx & cmo" and things like that
<aantron> oh
<aantron> not sure, i found it a relatively straightforward system. not saying it's the best.. :p or maybe im just not sure what the exact situation was
<Algebr> rgrinberg: not sure if this is correct opam list --depends-on menhir,oasis cause its saying its querying for OR when I would have wanted AND
<rgrinberg> Algebr: unfortunately that wouldn't be that useful even if it worked.
<rgrinberg> Since most people just check in oasis generated files
<rgrinberg> and don't depend on it explicitly.
<rgrinberg> nunchaku is a good guess though: https://github.com/nunchaku-inria/nunchaku/blob/master/_oasis
<rgrinberg> Since I know companion_cube likes his oasis
<Algebr> I like oasis too
<rgrinberg> To each his own
<rgrinberg> Algebr: I'm trying some Armenian cognac right now btw. Not bad at all :)
<Algebr> lol, its the only thing I brought back with me
<Drup> Algebr: https://github.com/Drup/LILiS/blob/master/_tags#L4 just add that to your tags outside of the oasis section
<Drup> nothing else to do
<Drup> "explain" gives additional debuging info
<Algebr> what does short_path do
<Drup> if you want to use menhir's fancy new error messages, look at reason's implementation
<Drup> short_path is not menhir related, it's in ocaml's documentation
<Drup> (it gives shorter type aliases in error messages)
<rgrinberg> (and slows down compilation)
<rgrinberg> :(
<Drup> Algebr: what's your issue with oasis and ctypes ?
<Algebr> I wanted to do ctypes with static generation of stubs
<Drup> yeah
<Algebr> all the examples are some ocamlbuild contortions
<Drup> oasis or pure ocamlbuild ?
<Algebr> pure ocamlbuild
<Algebr> so hence I needed to learn ocamlbuild deeper and kept getting frustrated.
<Algebr> for LILis, your _oasis file doesn't mention menhir at all
<Algebr> I guess that use_mehir takes care of it
pyon has quit [Remote host closed the connection]
pyon has joined #ocaml
<Drup> yes, the oasis doesn't mention menhir, it doesn't need too
<Algebr> oh this is fantastic
<Algebr> thanks!
<Drup> if you want oasis+ctypes+stub: I spend some time making something reasonably clean in https://github.com/Drup/ocaml-lmdb
<Drup> It doesn't use ctypes-build just yet, but it's pretty much the same architecture (just hooked up with oasis' configure)
<rgrinberg> Drup: are there intentions to get rid of camlp4 in ocsigen-start?
<Drup> rgrinberg: as soon as you write a ppx for pgocaml
<Drup> n__n
smondet has joined #ocaml
<Drup> (and macaque, I think)
<Drup> there is also another dependency that needs camlp4 indirectly
<rgrinberg> Really? the pgocaml extension is not worth the hassle of using at all imo
<Drup> (but generally, yes, we avoid camlp4 when possible)
<rgrinberg> looks like macaque is being used
<Drup> Yeah, one of them
<Drup> (I havent worked on ocsigen-start, I just follow from a distance)
<rgrinberg> I think the pgocaml.syntax is also being used.
<rgrinberg> So what should I use for a small started that doesn't have camlp4?
<rgrinberg> s/started/starter/
<Drup> rgrinberg: no camlp4 usage, or no camlp4 dependency ?
<rgrinberg> I'd prefer no usage. Because I'm trying to make a little eliom demo at work, and people are young enough to not even know camlp4 exists
<rgrinberg> would prefer to avoid that old can of worms
<Drup> Innocent people. How adorable :3
<Drup> the basic ppx template doesn't use camlp4
<Drup> (Do create an issue on ocsigen-start to track the progress on that, though)
whisperedcigar has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
obadz has quit [Quit: WeeChat 1.5]
scitesy has joined #ocaml
obadz has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
smondet` has joined #ocaml
agarwal1975 has joined #ocaml
smondet has quit [Ping timeout: 258 seconds]
wu_ng has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
<mfp> Algebr: did you implement the lwt parallelization stuff in the end?
<Algebr> mfp: I'll get to it soon, I got the basics down with the socket, was easier to use socketpair
<mfp> Algebr: I made the thing with the inherited socket + concurrent accept in children > http://paste.debian.net/902372/
<Algebr> whoa! Thanks!!
<mfp> getting a ~40us latency (vs. ~7us in Lwt_preemptive.detach, or >500us in lwt-parallel) -- would like to know if you find a faster IPC mechanism
<mfp> it's a val par : ('a -> 'b Lwt.t) -> 'a -> 'b Lwt.t that evaluates the function in a worker (lines 22 to 139) and a trivial fibonacci sequence example
rwmjones has quit [Ping timeout: 250 seconds]
rwmjones has joined #ocaml
<mfp> in divide-and-conquer algorithms, it'd be rather easy to build something atop it to determine the task size threshold beyond which sending to another process yields no gain
<mfp> to start with, anything taking ~~ 40us is a waste of CPU, and some heuristic based on the size of the marshalled params/response (plus an estimate of the serialization speed) would do
<mfp> you'll notice that the fib example had a hardcoded threshold under which the fib was no longer parallelized -- this is what could be automated as I described
<mfp> hmm on linux POSIX message queues are actually file descriptors you can select/poll/epoll on
<mfp> MQ *descriptors*
<mfp> so you could use mq_receive instead of accept as the IPC primitive, sounds likely to have better latency
<Algebr> much appreciated
pyon has quit [Quit: Fix config.]
pyon has joined #ocaml
<mfp> will implement par atop it when I have some time and compare the latency, it'd be nice to approach Lwt_preemptive.detach's
\h has joined #ocaml
silver has quit [Quit: rakede]
<Algebr> hmm, I want to keep this working on windows, os x
wolfcore has quit [Ping timeout: 268 seconds]
DemiMarie has joined #ocaml
<mfp> windows too? my above paste uses Lwt_unix.fork ...
<Algebr> oh i thought it was abstracted by Unix, I thought Unix.fork still works on windows
<mfp> it could be adapted to run the workers by determining the executable path (this is not ill-defined on win32, unless unix) and execve'ing it with a special parameter / envvar to indicate the socket address (which would also need to be changed from unix domain to regular TCP)
<mfp> no way, it'll just raise Failure or something
<mfp> nobody's really done fork() work well on win32, even cygwin's emulation performs really bad I hear, the APIs just don't match and the lack of COW was a showstopper performance-wise
<mfp> s/unless/unlike/
wolfcore has joined #ocaml
<mfp> here it is, GetModuleFileNameW
<mfp> if you want win32, there's no way around having platform-specific stubs :-/ (maybe hidden in other libs)
<Algebr> Okay, then OS X and Linux should be enough
<mfp> haven't tested it on OSX, but I'd be fairly surprised if it didn't work, it's all vanilla syscalls, fork, unix domain sockets and accept, I don't believe I introduced any linuxism
<mfp> hah http://www.unix.com/man-page/osx/2/listen/ "BUGS The backlog is currently limited (silently) to 128."
<Algebr> ya, only this message posix thing seems to be a linuxism
<mfp> so need to add ECONNREFUSED handling
<mfp> right
<mfp> wth "Mac OS X on the other hand does NOT provide POSIX message queues (OS X 10.10)." http://mqueue.forge.ocamlcore.org/
<mfp> forget select/epoll on queue descriptors, OSX lacks the queues themselves haha
<mfp> +about
FreeBirdLjj has quit [Remote host closed the connection]
<mfp> and according to http://stackoverflow.com/questions/34010163/setting-system-v-message-queue-size-on-mac-osx OSX has Sys V queues limited to 2KB messages (hah!) so...
<Algebr> derp
FreeBirdLjj has joined #ocaml
whisperedcigar has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
nomicflux has quit [Quit: nomicflux]
<rgrinberg> Drup: is the .merlin file generated by eliom distillery correct?
<rgrinberg> It seems pretty incomplete
mfp has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
zirman has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek_ has quit [Ping timeout: 252 seconds]
malina has quit [Ping timeout: 268 seconds]
pierpa has quit [Ping timeout: 258 seconds]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has quit [Ping timeout: 268 seconds]
infinity0 has quit [Ping timeout: 264 seconds]
whisperedcigar has joined #ocaml
infinity0 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
unbalanced has quit [Ping timeout: 268 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
wagle is now known as prometheus
prometheus is now known as wagl
wagl is now known as wagle
infinity0 has joined #ocaml
MercurialAlchemi has joined #ocaml
ygrek_ has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
ygrek_ has quit [Ping timeout: 248 seconds]
govg has joined #ocaml
DemiMarie has quit [Remote host closed the connection]
govg has quit [Ping timeout: 245 seconds]
bobajett has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zpe has joined #ocaml
jao has quit [Ping timeout: 258 seconds]
ygrek_ has joined #ocaml
zirman has quit [Ping timeout: 268 seconds]
whisperedcigar has joined #ocaml
Mercuria1Alchemi has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
zpe has quit [Remote host closed the connection]
malc_ has joined #ocaml
average has quit [Quit: leaving]
rgrinberg has quit [Ping timeout: 258 seconds]
average has joined #ocaml
average has quit [Client Quit]
jnavila has joined #ocaml
bobajett has quit [Remote host closed the connection]
malc_ has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
malina has joined #ocaml
argent_smith has joined #ocaml
wolfcore has quit [Ping timeout: 250 seconds]
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
wolfcore has joined #ocaml
zirman has quit [Ping timeout: 240 seconds]
whisperedcigar has joined #ocaml
malc_ has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
Simn has joined #ocaml
sz0 has joined #ocaml
janmi has joined #ocaml
FreeBirdLjj has joined #ocaml
larhat has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
govg has joined #ocaml
rwmjones is now known as rwmjones|hols
ryanartecona has joined #ocaml
rand__ has joined #ocaml
malina has quit [Ping timeout: 268 seconds]
seangrove has quit [Ping timeout: 248 seconds]
malina has joined #ocaml
freusque has joined #ocaml
vishesh has quit [Quit: WeeChat 1.4]
vishesh has joined #ocaml
malina has quit [Remote host closed the connection]
ygrek_ has quit [Ping timeout: 258 seconds]
govg has quit [Ping timeout: 258 seconds]
seangrove has joined #ocaml
jwatzman|work has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
cdidd has quit [Ping timeout: 246 seconds]
sillyotter has joined #ocaml
malc_ has quit [Remote host closed the connection]
rand__ has quit [Ping timeout: 240 seconds]
silver has joined #ocaml
wu_ng has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #ocaml
larhat has quit [Quit: Leaving.]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
edwin has left #ocaml [#ocaml]
mfp has joined #ocaml
jwatzman|work has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
jwatzman|work has joined #ocaml
d0nn1e has quit [Ping timeout: 268 seconds]
larhat has joined #ocaml
d0nn1e has joined #ocaml
maattdd has quit [Quit: WeeChat 1.5]
dhil has joined #ocaml
sillyotter has quit [Quit: WeeChat 1.4]
kakadu has joined #ocaml
maattdd has joined #ocaml
whisperedcigar has joined #ocaml
copy` has joined #ocaml
malc_ has joined #ocaml
seangrove has joined #ocaml
larhat has quit [Quit: Leaving.]
seangrove has quit [Ping timeout: 248 seconds]
larhat has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
haesbaert has joined #ocaml
AltGr has joined #ocaml
Flerex has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
dhil has quit [Ping timeout: 260 seconds]
freusque has quit [Ping timeout: 245 seconds]
freusque has joined #ocaml
Flerex has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ziyourenxiang has joined #ocaml
whisperedcigar has joined #ocaml
freusque has quit [Ping timeout: 265 seconds]
seangrove has joined #ocaml
janmi has quit [Ping timeout: 260 seconds]
rpcope has quit [Ping timeout: 246 seconds]
agarwal1975_ has joined #ocaml
agarwal1975 has quit [Ping timeout: 250 seconds]
agarwal1975_ is now known as agarwal1975
noddy2OOO has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
edwin has joined #ocaml
obadz has quit [Ping timeout: 258 seconds]
obadz has joined #ocaml
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
unbalanced has joined #ocaml
fre has joined #ocaml
zirman has joined #ocaml
freusque has quit [Ping timeout: 246 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
dhil has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
zirman has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
zirman has joined #ocaml
jun has quit [Quit: WeeChat 1.5]
jun has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
regnt[m] has quit [Remote host closed the connection]
M-martinklepsch has quit [Read error: Connection reset by peer]
regnat[m] has quit [Remote host closed the connection]
Guest23668[m] has quit [Read error: Connection reset by peer]
XC[m] has quit [Read error: Connection reset by peer]
aspiwack[m] has quit [Read error: Connection reset by peer]
dfeldman[m] has quit [Read error: Connection reset by peer]
M-Illandan has quit [Write error: Connection reset by peer]
M-jimt has quit [Remote host closed the connection]
M-ErkkiSeppl has quit [Read error: Connection reset by peer]
matth[m] has quit [Read error: Connection reset by peer]
na9da[m] has quit [Write error: Connection reset by peer]
Bluddy[m] has quit [Write error: Connection reset by peer]
barkmadley[m] has quit [Write error: Connection reset by peer]
M-pesterhazy has quit [Write error: Connection reset by peer]
noddy2OOO has joined #ocaml
janmi has joined #ocaml
dfeldman[m] has joined #ocaml
rgrinberg has joined #ocaml
nomicflux has joined #ocaml
pierpa has joined #ocaml
grayswandyr has joined #ocaml
ciniglio has joined #ocaml
agarwal1975 has joined #ocaml
grayswandyr has quit [Client Quit]
cdidd has joined #ocaml
seangrove has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
zirman has quit [Remote host closed the connection]
fraggle-boate has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
ryanartecona has joined #ocaml
marsam has joined #ocaml
seangrove has joined #ocaml
marsam has quit [Read error: Connection reset by peer]
seangrove has quit [Ping timeout: 248 seconds]
Algebr has quit [Ping timeout: 246 seconds]
rbocquet has quit [Ping timeout: 245 seconds]
atsampson has quit [Ping timeout: 245 seconds]
jun has quit [Ping timeout: 245 seconds]
mehdib has quit [Ping timeout: 245 seconds]
jun has joined #ocaml
atsampson has joined #ocaml
rbocquet has joined #ocaml
mehdib has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 250 seconds]
aspiwack[m] has joined #ocaml
srenatus[m] has joined #ocaml
timclassic has joined #ocaml
regnat[m] has joined #ocaml
matth[m] has joined #ocaml
diamaths[m] has joined #ocaml
M-jimt has joined #ocaml
M-pesterhazy has joined #ocaml
regnt[m] has joined #ocaml
M-martinklepsch has joined #ocaml
Bluddy[m] has joined #ocaml
XC[m] has joined #ocaml
na9da[m] has joined #ocaml
M-Illandan has joined #ocaml
govg has joined #ocaml
th5 has joined #ocaml
seangrove has joined #ocaml
Guest23668[m] has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
M-ErkkiSeppl has joined #ocaml
barkmadley[m] has joined #ocaml
lpw25[m] has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
seangrove has joined #ocaml
janmi has quit [Ping timeout: 260 seconds]
zirman has joined #ocaml
janmi has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
<lujara> how would i write a tail-recursive function that calculates a sum of recursive function calls? like so: f(x, k) = SUM_i=1->k(x^i)
yomimono has joined #ocaml
FreeBirdLjj has joined #ocaml
octachron has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
jnavila has quit [Ping timeout: 260 seconds]
<octachron> lujara: the general method for this kind of problem is to use dynamic programming. However, there is no recursive call in the example that you gave.
<lujara> uhhh f(x^i) I meant
<lujara> dynamic programming sounds pretty generic
jnavila has joined #ocaml
<lujara> how would this look like?
<octachron> first step with dynamic programming is to decompose your problem in subproblems
th5 has quit [Remote host closed the connection]
<lujara> well, problem 1: sum. problem 2: recursion. I've thought about interlocked functions, but not sure if that helps/works
<Armael> well you can just have an accumulator, I think?
grinbergr has joined #ocaml
<Armael> mm nvm
<octachron> lujara: first, does "f" really appears with different numbers of argument in your formula: "f(x, k ) = ∑_i^k f(x^i)" ?
grinbergr has quit [Remote host closed the connection]
rgrinberg has quit [Remote host closed the connection]
<lujara> no, just a quick (and wrong) example
rgrinberg has joined #ocaml
<lujara> real function would be:
<lujara> f(k, n) = ∑_i^k f(k, n-i)
<lujara> with an exit condition of k>n
seangrove has quit [Remote host closed the connection]
marsam has joined #ocaml
jnavila has quit [Quit: It was time]
<octachron> lujara: ok, so f(k,n) depends on all values of f(k, i< n)
<lujara> mhm
marsam has quit [Read error: Connection reset by peer]
jnavila has joined #ocaml
<octachron> this means that at worse you can store the intermediary result in a array and compute f(k,n) quadratically in n
<lujara> efficiency doesn't matter for me
<lujara> but what would i put in that array?
<lujara> or, rather, how would i call all the functions
<octachron> (there is probably to a clever transformation that maps your problem to a simple recurrence, but I don't see right now)
<lujara> what do you think about this: "let sum = ... and let f = ..." where f calls the sum and the sum calls f
<octachron> lujara: if you have an array of values f(k,0) … f(k,n), you can use it to compute f(k,n+1)
marsam has joined #ocaml
<Drup> octachron: isn't this just a matter of plugging in an accumulator and using it to make the sum ?
<Drup> (for the tail_rec part)
Algebr has joined #ocaml
<octachron> lujara: is f(k,n) really defined for negative values of n?
<lujara> no, n is element of N incl. 0
<lujara> k is element of N excl. 0
<octachron> Drup: for the sum of the array components? yes, if the recursion is well-founded
hugomg has joined #ocaml
<octachron> lujara: just to be sure your domain for f is (k ≤ n) ?
<lujara> k < n
shinnya has joined #ocaml
<octachron> if I am not mistaken: f(k,n+1) = 2 f(k, n) - f(k,n-k)
ziyourenxiang has quit [Quit: Leaving]
janmi has quit []
<octachron> lujara: the problem with your proposition is that you don't want to call "f" k times to compute f(k,n), otherwise you would have an exponential growth of computation time
<lujara> i tried implementing the mutually recursive version but apparently it's not tail-recursive :/
jnavila has quit [Quit: It was time]
<octachron> lujara: simplest imperative solution: starts with an array of size n with placeholder values. Inializes it with your values from 0 to k. Then computes recursively f(k,n+1) using the already computed value of the array
<octachron> Not-imperative/haskell solution: use an array of lazy values
<lujara> so i'd recursively call f(k, n+1) where k is a different value from the array with every call?
ryanartecona has quit [Quit: ryanartecona]
<rgrinberg> Drup: so does merlin work with eliom at all?
fre has quit [Ping timeout: 268 seconds]
<Drup> not for now
<rgrinberg> So it will work? soonish perhaps?
<Drup> maybe in a few month, if we can figure it out
<octachron> lujara: no? k should not vary in your recursion? see https://bpaste.net/show/d1646135518f
<octachron> (with a lot of off-by-one errors )
agarwal1975 has quit [Quit: agarwal1975]
<rgrinberg> Drup: i believe in you
<def`> :)
<rgrinberg> def`: and you too
<Drup> It involves the implementation of the OCaml typechecker. Success is never guaranteed :D
smondet` has quit [Ping timeout: 245 seconds]
<lujara> TIL ocaml has arrays and foor loops
<lujara> *for
<lujara> i guess the <- arrow is just plain assignment?
<def`> while true; do; done
<def`> it is mutable field assignment
<def`> (in a record)
<Drup> (or an array)
<companion_cube> yeah, OCaml really lacks rvalues (or is it lvalues?) :(
<def`> lvalues*
<lujara> octachron, what's "g"?
larhat1 has quit [Quit: Leaving.]
<def`> glvalues... xvalues, ... :P
<octachron> lujara: the initialization of f, aka what are the values of f(k, n) for n < k ?
<rgrinberg> The Eliom_reference.Volatile.Ext.set myref (Some "user data") bit. Is it correct? set seems to take 3 arguments
<lujara> octachron, they are n,
<lujara> so that's the exit condition (or whatever it's called)
agarwal1975 has joined #ocaml
fre has joined #ocaml
<Drup> rgrinberg: no fucking idea, please bug report :D
<octachron> lujara: ok, you can thus replace "g k i" by "i"
ryanartecona has joined #ocaml
<rgrinberg> Drup: does calling a service always reload the page?
sfri has quit [Remote host closed the connection]
<Drup> rgrinberg: No, not exactly
sh0t has joined #ocaml
<Drup> I think the semantics is described in the documentation, actually
<rgrinberg> Drup: link plx
<Drup> But basically, if you get new content, it reloads. If you stay in the same App, it doesn't reload, but changes the html. If it's an Action, it realods. If it's a Unit, it doesn't
kevinq has joined #ocaml
<Drup> You can keep persistent elements accross page changes using https://ocsigen.org/eliom/6.0/manual/clientserver-html#global
<rgrinberg> I'd like to basically only run a side effect on a radio button click (without reloading)
<rgrinberg> So I suppose I need a "Unit"?
<Drup> then, either use a Unit service, or use https://ocsigen.org/eliom/6.0/manual/clientserver-communication#rpc
<rgrinberg> Should I ask this on #ocsigen instead btw?
<Armael> oh, I always used the rpc thing
<Drup> As you want
<Armael> didn't know you could use a service to do that
<lujara> octachron, thanks man, that actually works flawlessly. I just get a index out of bounds exception on the build server... but that's possibly unrelated
<lujara> at least im not sure
<octachron> lujara: like I said, there are probably a lot of off -by -one index in the code fragment: my capacity to care about indices have been severely exhausted today.
th5 has joined #ocaml
<lujara> yeah i understand, it does work perfectly on my local system though :)
<lujara> didnt want to complain or anything, i'm really grateful you helped me with that <3
<octachron> lujara: as a side note, as an alternative to a mutable array, a queue could also works quite well (for the quadratic algorithm)
sfri has joined #ocaml
<lujara> probably, but i'm 100% that if i change just one character in the code right now i'll never get it to work again :D
Sorella has joined #ocaml
sz0 has joined #ocaml
smondet has joined #ocaml
whisperedcigar has joined #ocaml
Algebr` has joined #ocaml
Algebr has quit [Ping timeout: 250 seconds]
jnavila has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
rpcope has joined #ocaml
FreeBirdLjj has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
ygrek_ has joined #ocaml
kevinq has quit [Remote host closed the connection]
kevinq has joined #ocaml
Flerex has joined #ocaml
Flerex has quit [Client Quit]
scitesy has quit [Quit: AtomicIRC: The nuclear option.]
kakadu has quit [Quit: Konversation terminated!]
dhil has quit [Ping timeout: 265 seconds]
al-damiri has joined #ocaml
maattdd has quit [Ping timeout: 250 seconds]
agarwal1975 has quit [Quit: agarwal1975]
ryanartecona has quit [Quit: ryanartecona]
dhil has joined #ocaml
octachron has quit [Quit: Page closed]
govg has joined #ocaml
noddy2OOO has quit [Ping timeout: 268 seconds]
ygrek_ has quit [Ping timeout: 246 seconds]
vramana has joined #ocaml
agarwal1975 has joined #ocaml
yomimono has quit [Ping timeout: 245 seconds]
larhat has joined #ocaml
malc_ has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
zirman has quit [Remote host closed the connection]
nomicflux has quit [Quit: nomicflux]
jnavila has quit [Ping timeout: 260 seconds]
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
ryanartecona has joined #ocaml
kakadu has joined #ocaml
marsam has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 260 seconds]
noddy2OOO has joined #ocaml
AltGr has left #ocaml [#ocaml]
sternenseemann has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
Simn has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
fre has quit [Ping timeout: 256 seconds]
KV has joined #ocaml
manizzle has quit [Ping timeout: 258 seconds]
KV has quit [Quit: WeeChat 1.5]
<Algebr`> How does the OCaml hash function/hashtable hash any value, 'a.
<companion_cube> it's a runtime function written in C
<Algebr`> What is it hashing based off of
<companion_cube> traverses the object up to a max depth/number of nodes
<companion_cube> I'm not sure
<Algebr`> like traverses and makes a bytestring of it?
<Algebr`> now gonna see the source
whisperedcigar has quit [Ping timeout: 245 seconds]
dhil has quit [Ping timeout: 250 seconds]
agarwal1975 has quit [Quit: agarwal1975]
average has joined #ocaml
yomimono has joined #ocaml
<sspi> where can I find out more about the new `-plugin` command line option?
<companion_cube> Algebr`: no, it hashes word by word afaik
<companion_cube> well, value by value
octachron has joined #ocaml
agarwal1975 has joined #ocaml
<octachron> sspi, I fear that the current answer is "in the compiler source code" and the github PR implementing the feature
<Algebr`> octachron: have it off hand?
<Algebr`> oh, here's a start: f8874df278b8c90a5d776a6231a224602f86689c
<sspi> ah okay, that's not a problem - any hints for where I should look
<Algebr`> err, better one: c71e4d38b2172d76e78146c0ef5762d91fd44c82
<octachron> https://github.com/ocaml/ocaml/pull/648 and the other linked PR
<sspi> great, tnx
<Algebr`> so its basically a convience over Dynlink?
<companion_cube> that is quite exciting actually
<def`> "Can you update the changelog, the man page and the manual?"
<companion_cube> one could depend on compiler + set of plugins
<companion_cube> makes it easier to test alpha features
<octachron> def: the "updated" ""documentation"" is here https://github.com/ocaml/ocaml/pull/698
<def`> octachron: thank you :)
<Algebr`> ah, found the hash function, hash.c:184
<octachron> Algebr`, and some hooks inside the compiler
<Algebr`> oh geez, its pretty big although understandable
whisperedcigar has joined #ocaml
yomimono has quit [Ping timeout: 258 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
esad has joined #ocaml
yomimono has joined #ocaml
yomimono has quit [Ping timeout: 258 seconds]
sh0t has quit [Quit: Leaving]
hugomg has quit [Quit: Ex-Chat]
ocaml869 has joined #ocaml
argent_smith has quit [Quit: Leaving.]
Simn has joined #ocaml
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
zirmann has joined #ocaml
zirman has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
zirmann has quit [Ping timeout: 264 seconds]
<ocaml869> hello, I've been trying to run a Real World Ocaml example, one about functors that uses sexps, deriving them with "with sexp" annotation after the type definition. I tried running it and it didn't work, after googling it, I read something about extension points and having to use [@@deriving sexp] instead of "with sexp".
esad has joined #ocaml
<ocaml869> I tried it in utop toplevel andit works fine, but going back to the functor example, it keeps telling me that t_to_sexp isn't defined. I've been looking for a while now, and don't even have a clue at what to look for... I think that what I'm trying to say is "Help, please!"
pyon has quit [Quit: Goddammit, Emacs!]
Algebr`` has joined #ocaml
pyon has joined #ocaml
Algebr` has quit [Ping timeout: 264 seconds]
<companion_cube> yes, it's out of date
<companion_cube> you need to install `ppx_sexp_conv`
<companion_cube> then, #require "ppx_sexp_conv";; open Sexplib.Std;; and then you can use the annotation [@@deriving sexp]
kakadu has quit [Remote host closed the connection]
<ocaml869> That works fine, thanks.
arc- has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 265 seconds]
ocaml869 has quit [Quit: Page closed]
whisperedcigar has joined #ocaml
larhat has quit [Quit: Leaving.]
whisperedcigar has quit [Ping timeout: 245 seconds]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
Madars has quit [Ping timeout: 256 seconds]
th5 has quit []
zirman has quit [Remote host closed the connection]
obadz has quit [Ping timeout: 240 seconds]
zirman has joined #ocaml
obadz has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
yomimono has joined #ocaml
yomimono has quit [Client Quit]
tg has quit [Ping timeout: 245 seconds]
esad has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Madars has joined #ocaml
tg has joined #ocaml
smondet has quit [Ping timeout: 246 seconds]
<Algebr``> python does hashtables really well
Madars has quit [Ping timeout: 260 seconds]
kevinq has quit [Ping timeout: 268 seconds]
agarwal1975 has quit [Quit: agarwal1975]