<kaustuv>
I completely do not see the point of this Ocamlviz project. What conceivable use is there of runtime profiling?
<itewsh>
hmm, unfortunatly this module is not included by default :/
<Yoric>
itewsh: nope, part of Batteries.
<Yoric>
kaustuv: I was wondering, too.
<Yoric>
Perhaps for Ocsigen-like stuff?
<Yoric>
(i.e. long-running processes)
<kaustuv>
Yeah, but profiling data is produced as a program runs, not at the end, so it doesn't matter if the process ends because of an exit() or because of a SIGINT
<kaustuv>
I mean I can see if they want to profile a single request or something, but I think better modular programming and testing is almost always going to give a more useful answer
<Alpounet>
For me, that's the plotting library the "error" in the JSSP list.
<kaustuv>
I think Jane Street are just scratching their own itches. Which is fine -- it's their money -- but they should explain their selection process a bit more
<Alpounet>
yeah
<kaustuv>
Possibly get outside reviewers next time if they don't want to appear so inscrutable
<Alpounet>
maybe
<Alpounet>
but what's the point for them of choosing a _plotting_ library ?
<kaustuv>
I'm sure being a trading firm they have a good use for plots
<Alpounet>
(since there are plenty already)
<Yoric>
I wondered, too.
<Alpounet>
I don't get it, really.
<Alpounet>
Other projects are impressive.
<Alpounet>
But the plotting library...
<kaustuv>
Personally I only find the SaSML one impressive. But I may be biased because I know Umut Acar (we were grad students at the same time at CMU)
<Alpounet>
He's Turkish right ?
<kaustuv>
I honestly don't know. I lost the ability to discern accents while I was in the US.
sporkmonger has quit []
itewsh has quit [Success]
itewsh has joined #ocaml
monadic_kid has joined #ocaml
_andre has joined #ocaml
monadic_kid has quit ["Leaving"]
sporkmonger has joined #ocaml
itewsh has quit [Success]
itewsh has joined #ocaml
ulfdoz_ has joined #ocaml
seafood has quit []
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
steg has quit ["leaving"]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
<gildor>
Alpounet: the plotting library in OCaml are not very good
<gildor>
Alpounet: and mostly unmaintained
<gildor>
Alpounet: moreover this is a very reasonable delay for doing a good implementation
<Alpounet>
this is more than reasonable actually :-p
<gildor>
Alpounet: and last but not least C. Troestler has already mentored pa-do which is a very project to my mind
<gildor>
Alpounet: by choosing something small enough, they are pretty sure to reach the end of the project
<gildor>
Alpounet: being able to deliver smthg that works at the end seems to be the key of a living project for JSSP
<gildor>
Alpounet: pa-do was one of the project that did survive last year project and continue living
<gildor>
because they were able to deliver something at the end
<gildor>
kaustuv: concerning profiling, I think it is a good project
<gildor>
kaustuv: profiling in OCaml is just not good enough
<gildor>
kaustuv: and if it also works on Windows, this will be a big win
<gildor>
kaustuv: if they are able to build something between top (linux)/perfmon (windows)/strace (linux), this will really make my life easier when profiling ocaml app
<gildor>
kaustuv: but wait for the result
<gildor>
kaustuv: (I hope they will do something better and less intrusive than "ocamlopt -p")
<kaustuv>
gildor: what I want to know is what realtime has to do with any of that
<flux>
kaustuv, well, wouldn't it be easier to profile stuff with real-world loads if you can enable profiling at runtime, get the data, disable it?
<kaustuv>
Is that what they're doing? That would be fine, and sounds like dtrace.
<flux>
I don't know :)
<gildor>
kaustuv: maybe "real-time" is just for marketing ;-)
|jeremiah has quit [Read error: 104 (Connection reset by peer)]
<kaustuv>
I doubt Jean-Christophe Fillatre and Sylvain Conchon are marketroids. But maybe it was written that way for JS's benefit.
<gildor>
kaustuv: but more seriously i get excellent result when combining debug message and memory load watch while the program is running
<gildor>
kaustuv: it can be done by collecting data and then using it, also
<gildor>
kaustuv: let's see the result when it will be there
<flux>
a builtin web server with Ajax interface that displays hot spots in the real time \o/
<flux>
oh, well..
<kaustuv>
OK, I'll grant that real time memory profiling is possibly a good idea because it is hard to do offline.
<Alpounet>
:D
<Alpounet>
flux, sounds like a great idea for next year's JSSP :D
<flux>
wish I didn't have a job.. ;-)
<Alpounet>
what kind of things do you use there ?
<flux>
we use C, C++, OCaml, JavaScript
<Alpounet>
that looks fine :-)
<Yoric>
Bah, C++ :(
<Yoric>
:)
itewsh has quit [Success]
itewsh has joined #ocaml
<flux>
I created a test account ocamldemo/ocamldemo on http://80.83.5.182/ossi2/ - this is a limited time offer :)
<flux>
(it's our test system with a public ip address)
<Alpounet>
what can we actually do ?
<Alpounet>
Yoric, C++ is good :-p
<flux>
browse camras and search for images
<Alpounet>
Java is bad, e.g.
<flux>
request more images to be transferred
<flux>
browse camera settings
<flux>
the cameras connected to the system are made by us too
<Alpounet>
can't we do like in CSI ? You know, zoom on cars, etc :-p
<flux>
(except the camera with label teltonika, which is basically an ftp-uploader)
<hcarty>
gildor: While I agree with Alpounet that effort would likely have been better spent improving an existing plotting library than writing a new one, C. Troestler's participation does give the project an extra boost of promise
<flux>
unfortunately, no :)
bombshelter13_ has joined #ocaml
<Alpounet>
heh, great job flux.
<Alpounet>
What's OCaml used for there ?
<flux>
it's the backend
<Yoric>
Can we do like in Blade Runner? Zoom and turn the camera to see geometrically impossible details?
<Alpounet>
flux, nice !
<flux>
all devices connect to it, and it transfers live images, events, synchronizes settings, etc
|jeremiah has joined #ocaml
<flux>
time to remove the account
<Yoric>
:/
* Yoric
wanted Blade Runner.
<flux>
yoric, maybe next time
<flux>
if you're being nice
<Yoric>
Yeah :)
<flux>
actually I've considered putting an array of cameras outside and generating a semi-realtime panorama with some panorama app
<flux>
we have a nice terrace here, being in the top floor of the building
<flux>
..which is actually the sauna floor of the previous residents, so we have two of those here as well ;)
ulfdoz_ has joined #ocaml
<palomer>
hrmph, how do I turn a list of expressions into a list of expressions in camlp4?
<flux>
I don't know, but that sounds like a task for the identity function?-)
<Alpounet>
does anyone know a good software for creating feature models diagrams ?
<palomer>
err
<palomer>
a list of expressions into a tuple
<Alpounet>
I'd say that if you don't know the size of the list when writing the function, you can't.
<mrvn>
that doesn't type well
<palomer>
I know the size of the list
<Alpounet>
how much ?
<palomer>
I have the list
<Alpounet>
:D
<Alpounet>
you must know it in advance.
<mrvn>
then let conv = function [a;b;c;d] -> (a,b,c,d) | _ -> raise WrongListSize
<Alpounet>
yep
<palomer>
err...I thought camlp4 could let you work some magic
<thelema>
palomer: what do you want the return type of your function to be?
<palomer>
Camlp4.PreCast.Ast.expr
|jeremiah has quit [Read error: 104 (Connection reset by peer)]
pants2 has joined #ocaml
<thelema>
that's the result type of your camlp4 code - it must produce a function with a specific type
<thelema>
can the type of that .expr be determined at compile time?
<palomer>
yes
<palomer>
this is a camlp4 function
<thelema>
but it's not fixed
<palomer>
the list is determined by the parse tree
<thelema>
and what comes out of camlp4 has to type properly in ocaml
<thelema>
and the parse tree is determined at compile time?
<palomer>
the parse tree of the source code
<palomer>
im converting tuple types
pants3 has joined #ocaml
<palomer>
and generating code
<palomer>
with type-conv
<thelema>
sounds like you've got some work to do. step 1: analyze the parse tree to figure out the size of the tuple you'll need
<thelema>
step 2: programatically generate the conversion code for that zsize tuple
<mfp>
palomer: are you looking for exCom_of_list ??
ztfw has joined #ocaml
<mfp>
<:expr< ($tup:Ast.exCom_of_list l$) >>
<palomer>
nice!
<thelema>
palomer: do you have that list at compile time?
<mfp>
turns an expr list into an expr representing the tuple
itewsh has quit [Read error: 110 (Connection timed out)]
<palomer>
mfp, where can I find other useful functions like that??
<palomer>
thelema, yes
<mfp>
camlp4/boo/Camlp4.ml
itewsh has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
<mfp>
there's a bunch of such funcs
<palomer>
in module boo?
ulfdoz_ has joined #ocaml
<mfp>
*boot
<mfp>
module type Camlp4Ast
<mfp>
better yet, Camlp4/Sig.ml
<mfp>
module type Ast
<palomer>
gotcha
* palomer
wonders if anyone has bothered ocamldocing this stuff
<mfp>
(and Camlp4Ast)
<flux>
a Camlp4 documentation project would've made a great Jane Street summer project; I wonder if they'd have accepted
<palomer>
probably
<palomer>
given how much they use it
<flux>
I guess nobody just thought of such a project
<flux>
it would be quite straight forward in the sense that you have all the material there; plus I'm sure the ML would've been helpful when something would not make sense
<flux>
or, I could be underestimating the task :)
<Yoric>
I've attempted to start documenting it, some time ago.
<Yoric>
Then I, how shall we say, postponed the task.
<palomer>
the first step would be to run ocamldoc, no?
<flux>
but it's impenetrable?
<Alpounet>
palomer, then to add useful comments ...
<palomer>
but isn't running ocamldoc something easy to do?
<flux>
I doubt the output of ocamldoc is that useful with camlp4
<flux>
what people want is Real Documentation :)
<Alpounet>
viewing the MLIs in emacs is at least as good as looking at the ocamldoc output
|jeremiah has joined #ocaml
<Alpounet>
(for camlp4)
pants1 has quit [Read error: 113 (No route to host)]
<Alpounet>
and the camlp4 manual documents only a part of camlp4
<Alpounet>
the easier one.
pants2 has quit [Connection timed out]
lutter has joined #ocaml
<palomer>
mfp, is there a function for applying an expr to a list of expr ?
<Yoric>
Actually, the .mlis are quite confusing.
<Yoric>
(due to the high functorization and the number of include)
<Yoric>
Batterie's #browse might be slightly more useful :)
<Yoric>
(it was added partly for this purpose)
<flux>
what does it do?
<mfp>
palomer: let l' = List.map (fun e -> <:expr< $f$ $e$ >>) l in <:expr< [ $exSem_of_list l' ] >> or such?
<mfp>
+ the missing $
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
<Yoric>
flux: it's essentially a one-liner -- it lists the contents of a module in the toplevel, just as ocamlc -i would.
lutter1 has joined #ocaml
lutter has quit ["Leaving."]
<mfp>
palomer: not sure that use of exSem_of_list is valid; you'd have to List.fold_right (fun x l -> <:expr< [ $x$ :: $l$ ] >>) l <:expr< [ ] >> otherwise (that's how I used to do it)
<thelema>
off to CA, wish me luck
thelema has quit ["[BX] Silly wabbit, BitchX is for kids!"]
sporkmonger has quit []
ulfdoz_ has joined #ocaml
<Yoric>
CA?
<Yoric>
California?
<Yoric>
Conseil d'Administration?
<Yoric>
Some far-away version of Ubuntu?
<verte>
Code Asleep
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
sporkmonger has joined #ocaml
ulfdoz_ has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
ulfdoz has quit [Read error: 101 (Network is unreachable)]
ulfdoz_ is now known as ulfdoz
lutter1 has quit [Read error: 104 (Connection reset by peer)]
lutter has joined #ocaml
_zack has joined #ocaml
lutter1 has joined #ocaml
lutter has quit [Read error: 104 (Connection reset by peer)]
lutter1 has quit [Read error: 104 (Connection reset by peer)]
lutter has joined #ocaml
lutter has quit [Read error: 104 (Connection reset by peer)]
lutter has joined #ocaml
cloudhead has joined #ocaml
lutter has quit [Read error: 104 (Connection reset by peer)]
lutter has joined #ocaml
jeanbon has joined #ocaml
alexyk has joined #ocaml
AlpMestan_ has joined #ocaml
Alpounet has quit [Read error: 60 (Operation timed out)]
AlpMestan_ is now known as Alpounet
s4tan has quit []
Camarade_Tux has joined #ocaml
Yoric has quit [Remote closed the connection]
|jeremiah has quit [Read error: 104 (Connection reset by peer)]
nomoon has joined #ocaml
<Camarade_Tux>
palomer, where can I get your graphic library ?
<Camarade_Tux>
(not sure if I'll be able to do that today though)
<palomer>
Camarade_Tux, let's wait until I can guide you through the first steps
|jeremiah has joined #ocaml
alexyk has quit []
<jli>
records and tuples are the 2 ways to do product types in OCaml, right?
<palomer>
objects have a product like feel to them, imho
<palomer>
type s = <foo:int;bar:bool>
<palomer>
type t = {foo:int;bar:bool}
<palomer>
type u = int * bool
nomoon has quit ["nomoon has no reason"]
<palomer>
that's about it
<jli>
okay
<jli>
hmm, should this work? type whatever = | What1 | What2 of { what3: bool }
<jli>
or do I need to give { what3: bool} a separate type what4, and change the 2nd part to What2 of what4?
|jeremiah has quit [Read error: 104 (Connection reset by peer)]
ulfdoz_ has joined #ocaml
tombom has quit ["Peace and Protection 4.22.2"]
<Alpounet>
jli, it should work
<Alpounet>
err
<Alpounet>
it doesn't.
<jli>
Alpounet: I get a syntax error on the {
<jli>
hm. if I'm defining a doubly linked list, how do I prevent the printer from freaking out because of the circularity?
<mrvn>
you don't
<mrvn>
or make the prev/next option types
slash_ has quit [Client Quit]
jeanb-- has joined #ocaml
jeanbon has quit [Nick collision from services.]
jeanb-- is now known as jeanbon
|jeremiah has joined #ocaml
Alpounet has quit ["Ex-Chat"]
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
Yoric[DT] has joined #ocaml
<Camarade_Tux>
palomer, actually I've got some time now, wanna guide me ?
_andre has quit ["lame exit"]
xevz has quit ["Changing IRC shell, brb."]
xevz has joined #ocaml
ched_ has quit [Read error: 110 (Connection timed out)]
_zack has quit ["Leaving."]
monadic_kid has joined #ocaml
monadic_kid has quit ["Leaving"]
Waleee has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Client Quit]
Snark has quit [Read error: 60 (Operation timed out)]
alexyk has joined #ocaml
Associ8or has joined #ocaml
monadic_kid has joined #ocaml
alexyk_ has joined #ocaml
alexyk has quit [Read error: 104 (Connection reset by peer)]
itewsh has joined #ocaml
ulfdoz_ has joined #ocaml
ikaros has joined #ocaml
komar_ has quit [Read error: 60 (Operation timed out)]
msandin has joined #ocaml
alexyk has joined #ocaml
ulfdoz has quit [Read error: 101 (Network is unreachable)]
ulfdoz_ is now known as ulfdoz
alexyk has quit [Client Quit]
lutter1 has joined #ocaml
lutter has quit ["Leaving."]
alexyk_ has quit [Success]
ztfw has quit [Remote closed the connection]
kaustuv_ has joined #ocaml
vithos has quit [Connection timed out]
itewsh has quit [Success]
itewsh has joined #ocaml
komar_ has joined #ocaml
Ariens_Hyperion has joined #ocaml
jeff_s_ has joined #ocaml
<jeff_s_>
does anyone know how to get ocaml to output is typing deductions, or otherwise figure out why ocaml is deciding that my function that takes 4 arguments requires 5?
itewsh has quit [Connection timed out]
<Camarade_Tux>
jeff_s_, check what you return, I'd bet the function that takes 4/5 arguments actually returns a partially-applied function
<jeff_s_>
i'll check again...
itewsh has joined #ocaml
<jli>
mrvn, how would making prev/next into options help? wouldn't there just be extra Some's?
alexyk has joined #ocaml
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
<jeff_s_>
damn, that's so annoying. I called a function before it was defined with an extra argument, so caml just figured it needed that many
<jeff_s_>
grr @ no backtracking type checker
Jedai has quit [Read error: 110 (Connection timed out)]
ulfdoz_ has joined #ocaml
<jonafan>
Do you have some code that demonstrates this?
<Camarade_Tux>
actually, there is something so you can make it by hand quite easily but I don't use it (related to the -annot flag)
<jeff_s_>
the fine generated by the annot flag might be useful, but it's not easy to read that file. I'm not sure what its syntax is.
<Camarade_Tux>
that's why you make the computer do that for you, but *I* have never set that (unfortunately)
<Camarade_Tux>
some on the channel have however
<jeff_s_>
I found something on google code that's supposed to help, but it when I tried it it seemed to have trouble parsing the annot file.
ulfdoz__ has joined #ocaml
ulfdoz_ has quit [Read error: 60 (Operation timed out)]
ztfw has joined #ocaml
ulfdoz has quit [Connection timed out]
ulfdoz__ is now known as ulfdoz
ikaros_ has joined #ocaml
alexyk has quit []
sporkmonger has quit []
<hcarty>
jeff_s_: Do you have an example of that problem? I'm curious to know what it looks like in case I run in to it. I would have thought that the compiler would spit out an error if the function is called before it is defined.
jeff_s_ has quit []
<palomer>
Camarade_Tux, still there?
<Camarade_Tux>
palomer, yeah but not for long
jeff_s_ has joined #ocaml
<palomer>
:/
<Camarade_Tux>
palomer, but basically, what are the requirements/changes ?
<jeff_s_>
hcarty - sorry ya I can make one
<jeff_s_>
it just looks like any other type error (this expression has type blah blah but is used here with type halb halb)
<palomer>
Camarade_Tux, do you have 3.11 latest cvs + camomile + extlib + xml-light + sdl 1.2 ?
komar_ has quit [Read error: 54 (Connection reset by peer)]
<jeff_s_>
what i did was something like a more complicated version of let rec test_args arg1 arg2 = test_args2 arg1 arg2 () and test_args2 _ _ = ()
ikaros has quit [Read error: 110 (Connection timed out)]
<palomer>
and pcre
itewsh has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
palomer, will grabing them from godi be enough ?
<palomer>
from when is godi's 3.11 taken?
itewsh has joined #ocaml
<hcarty>
jeff_s_: Ah, wow. That definitely sounds tough to track down.
<jeff_s_>
the right hand side of test_args2 has to be a function unit -> something because when I first called args2 the caml type checker decided it has to have that extra argument
<Camarade_Tux>
palomer, you can tell godi to use CVS
<palomer>
Camarade_Tux, oh, then it's fine
<palomer>
sdl 1.2 is in apt
<palomer>
(you don't need ocamlsdl)
<Camarade_Tux>
apt, what's that ? I only know pkgtool :)
<palomer>
err
<palomer>
then sdl1.2 in pkgtool
<palomer>
(that's freebsd, right?)
<Camarade_Tux>
palomer, haha, nope, slackware :)
<Camarade_Tux>
and I already have sdl-1.2 :)
alexyk has joined #ocaml
seafood has joined #ocaml
monadic_kid has quit ["Leaving"]
lutter1 has quit ["Leaving."]
sporkmonger has joined #ocaml
monadic_kid has joined #ocaml
slash_ has joined #ocaml
Waleee has quit []
delroth has quit [Read error: 60 (Operation timed out)]
msandin has quit [Remote closed the connection]
delroth has joined #ocaml
<palomer>
how do you express "body <- foo" in camlp4?
<palomer>
keeps giving me a syntax error
<Yoric[DT]>
?
<Yoric[DT]>
Ah, you're having issues with "<-", is that it?
<Yoric[DT]>
grep for "dirty hack" in the source code :)
<Yoric[DT]>
(or "usual hack", I'm not completely sure)
<palomer>
oh boy
<palomer>
the authors simply forgot?
<palomer>
bah, I rather switch to := then use a dirty hack
<Yoric[DT]>
Well, "<-" is not a token, it's... something else.
<Camarade_Tux>
smaller than the opposite of the operand on the right ? =)
delroth has quit [Read error: 60 (Operation timed out)]
<jeff_s_>
huh, strange, cause := is an operator
<jeff_s_>
I hadn't noticed that <- is ... "something else"
delroth has joined #ocaml
<Yoric[DT]>
Mmmmhh....
<Yoric[DT]>
weird
<Yoric[DT]>
Maybe it has been fixed in 3.11.
<Yoric[DT]>
I can't find any trace of the hack in the source code.
<Yoric[DT]>
I'm pretty sure it was still a ugly hack in 3.10 .
<palomer>
you're converting from old syntax to revised syntax
<palomer>
that IS useful
<mfp>
yes, that's what I do when I don't know how to write some quotation in revised syntax
<palomer>
btw, know how to convert an expr list to an expr (which represents the list of expressions)?
<mfp>
I answered that a while ago
* mfp
scrolls back
<mfp>
mfp> palomer: let l' = List.map (fun e -> <:expr< $f$ $e$ >>) l in <:expr< [ $exSem_of_list l'$ ] >> or such?
<mfp>
<mfp> palomer: not sure that use of exSem_of_list is valid; you'd have to List.fold_right (fun x l -> <:expr< [ $x$ :: $l$ ] >>) l <:expr< [ ] >> otherwise (that's how I used to do it)
<palomer>
that's application
<mfp>
just remove the $f$
<mfp>
or, actually, the List.map altogether
<palomer>
so it's a simple fold_right?
<mfp>
don't know if <:expr< [ $exSem_of_list l$ ] >> would work
<mfp>
yeah, just a fold_right
<mfp>
consing is [ elem :: list ] in revised syntax
<palomer>
erm
<palomer>
ahh
<palomer>
gotcha
<palomer>
is everyone switching to revised syntax?
put_kid_state has quit ["Leaving"]
xerxes has joined #ocaml
<mfp>
palomer: AFAIK nobody is really using it (only its author)
<palomer>
who happens to be the author of camlp4
<palomer>
why would he invent a new syntax?
alexyk has quit []
<mfp>
it's just that you used to need it for camlp4 quotations, and the support for quotations in original syntax is buggier/incomplete
<mfp>
hmm
slash_ has quit [Client Quit]
<mfp>
camlp4's author, too
<mfp>
Daniel de Rauglaudre?
<mfp>
http://caml.inria.fr/pub/docs/manual-camlp4/manual007.html "The revised syntax is an alternative syntax for OCaml. Its purpose is to be simpler, more regular, more logical than the normal syntax, and fix some problems which sometimes result in bugs not always easy to find. This syntax was named ``righteous'' instead of ``revised'' in previous versions."
* mfp
calls it a night
<kaustuv_>
some people (Gerard Huet, eg.) are big fans of the revised syntax
<palomer>
night!
<palomer>
seems that you don't even need x.val in classes