flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
hkBst has quit [Remote closed the connection]
Smerdyakov has quit ["Leaving"]
AxleLonghorn has left #ocaml []
Amorphous has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has joined #ocaml
Amorphous has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
ulfdoz_ is now known as ulfdoz
alexyk has joined #ocaml
ched_ has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
<alexyk> did anyone do RESTful APIs with ocamlnet, such as twitter's?
alexyk has quit []
xerxes_ has joined #ocaml
xerxes has quit [Read error: 60 (Operation timed out)]
ulfdoz_ has joined #ocaml
Alpounet has quit ["Ex-Chat"]
jeddhaberstro has quit []
m3ga has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
alexyk has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
alexyk has quit []
erikl has quit [Read error: 60 (Operation timed out)]
m3ga has quit ["disappearing into the sunset"]
alexyk has joined #ocaml
sporkmonger has quit []
alexyk has quit []
erikl has joined #ocaml
erikl has quit ["WeeChat 0.2.6.1"]
cloudhead has quit [Client Quit]
bhim has joined #ocaml
bhim has quit [SendQ exceeded]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 101 (Network is unreachable)]
ulfdoz_ is now known as ulfdoz
ulfdoz_ has joined #ocaml
ulfdoz_ has quit [Read error: 60 (Operation timed out)]
ulfdoz_ has joined #ocaml
ulfdoz_ has quit [Read error: 60 (Operation timed out)]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
Camarade_Tux has joined #ocaml
rjack has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz__ has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz__ is now known as ulfdoz
s4tan has joined #ocaml
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
tombom has joined #ocaml
komar_ has joined #ocaml
Camarade_Tux has quit ["Leaving"]
hkBst has joined #ocaml
rwmjones has joined #ocaml
xerxes_ has quit [Read error: 113 (No route to host)]
ScrumMaster has joined #ocaml
rjack has quit ["leaving"]
ulfdoz_ has joined #ocaml
Alpounet has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
Kerris7 has joined #ocaml
Kerris7 has quit []
Kerris7 has joined #ocaml
Snark has joined #ocaml
jamii has joined #ocaml
verte has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
|jeremiah has joined #ocaml
Yoric has joined #ocaml
<Yoric> hi
<Alpounet> yop
seafood has joined #ocaml
Alpounet has quit ["Quitte"]
|jeremiah has quit [Read error: 104 (Connection reset by peer)]
Alpounet has joined #ocaml
itewsh has joined #ocaml
sporkmonger has joined #ocaml
|jeremiah has joined #ocaml
<itewsh> why isn't there any "String.iteri" functions ?
<Alpounet> there is in Batteries, IIRC
Associat0r has quit []
<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
<palomer> http://pastebin.com/m5c67bc21 <--I was thinking something like this
<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> ah, righto
<palomer> im on 3.10
rwmjones has quit [Remote closed the connection]
kaustuv_ has quit [Remote closed the connection]
kaustuv_ has joined #ocaml
<palomer> http://pastebin.com/m4f49fbea <--is this function already in camlp4?
seafood has quit []
sporkmonger has quit []
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
monadic_kid is now known as put_state_kid
put_state_kid is now known as put_kid_state
itewsh has quit [Client Quit]
bombshelter13_ has quit []
jeanbon has quit ["The girl in purple with huge boobs."]
ikaros_ has quit ["Leave the magic to Houdini"]
jeff_s_ has quit []
seafood has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
Ariens_Hyperion has quit []
seafood has quit []
Ariens_Hyperion has joined #ocaml
seafood has joined #ocaml
m3ga has joined #ocaml
alexyk has quit []
<mfp> palomer: x.foo <- 1 is x.foo := 1 in revised syntax
<mfp> you can use camlp4o pr_r.cmo whatever.ml to see the orig <-> revised equivalence
alexyk has joined #ocaml
<mfp> and !x is x.val
<palomer> mfp, this is for classes
<mfp> palomer: same thing
<palomer> !x seems to work
<palomer> (though <- doesn't)
seafood has quit []
<palomer> you forgot to make x mutable
<mfp> yes, it doesn't type, but that's not the only error
seafood has joined #ocaml
<mfp> also, let incr x = x := x + 1 -> value incr x = x.val := x.val + 1;
<mfp> x.val := x.val refs x := !x instance variables
<palomer> err, I thought value incr x = x.val := x.val + 1 is equivalent to val incr x = x <- x + 1
<kaustuv_> x := x + 1 should not typecheck
<mfp> arg !x of course wtf
seafood has quit [Client Quit]
* mfp can neither think nor type seemingly
alexyk has quit []
<kaustuv_> I like to have the type checker do my thinking most of the time
<mfp> palomer: anyway, camlp4o pr_r.cmo is your friend
<palomer> " match !body with " <--this came out of camlp4o
<palomer> (for some other code I wrote)
<mfp> because body is an instance var, right?
<palomer> right
<palomer> val body = ref `Set
<palomer> what else could it be?
<mfp> one sec, was that camlp4o pr_r.cmo ?
<palomer> pr_r is the file I want to preprocess?
<mfp> with revised-syntax pretty-printing
<mfp> no
<mfp> pr_r.cmo is the revised syntax pretty-printer
alexyk has joined #ocaml
<palomer> camlp4o -I /usr/local/lib/ocaml/3.10.2/type-conv pa_type_conv.cmo pa_test.cmo test2.ml <--this is the command I'm using
<mfp> running camlp4o pr_r.cmo myfile.ml converts to revised syntax
<palomer> where pa_test.cmo is my syntax
<mfp> then you're getting orig syntax
<mfp> I thought you were having problems with quotations in rev syntax
<mfp> and how to translate !x to revised
<palomer> I'm having problems with <:expr< foo <- bar >>
<palomer> in pa_test.ml
<palomer> well, it's actually <:expr< object .... method baz = foo <- bar ; ... end >>
Ariens_Hyperion has quit []
<palomer> oh, I see
<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