seafoodX_ has quit [Read error: 110 (Connection timed out)]
thesoko has quit [Remote closed the connection]
thesoko has joined #ocaml
velco has joined #ocaml
zvrba has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
m3ga has joined #ocaml
m3ga has quit [Client Quit]
piggybox_ has quit [Read error: 110 (Connection timed out)]
seafoodX has joined #ocaml
ramki has quit [Remote closed the connection]
hnaz has left #ocaml []
piggybox has joined #ocaml
gunark has quit [Read error: 104 (Connection reset by peer)]
buluca has joined #ocaml
thesoko has quit [Remote closed the connection]
dbueno has joined #ocaml
dbueno has quit ["Leaving"]
bluestorm has joined #ocaml
seafoodX has quit []
Mr_Awesome has joined #ocaml
pango has quit [Remote closed the connection]
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
joelr1 has joined #ocaml
<joelr1>
good day
<joelr1>
any campl4 experts on board?
<bluestorm>
how could we know if we are expert enough for you ?
<bluestorm>
i suggest you just explain your question/problem
Demitar has quit [Success]
pango has joined #ocaml
Demitar has joined #ocaml
pango- has joined #ocaml
pango has quit [Remote closed the connection]
pango- is now known as pango
<joelr1>
bluestorm: just posted my question to caml-list (camlp4)
<joelr1>
bluestorm: do you subscribe?
<bluestorm>
i do not, but i'm gonna see the archives
<joelr1>
bluestorm: basically, it's about using camlp4 3.10 to parse class defs
<bluestorm>
hm
<bluestorm>
if you're looking for code examples, have you looked at the Camlp4Parsers ?
<bluestorm>
(there are camlp4ized parser for regular and revised syntax)
<joelr1>
i have them open
<joelr1>
bluestorm: it's kind of hard to make things out. do i need class_type_plus ? class_type_longident_and_param? class_longident_and_param? class_name_and_param?
<joelr1>
bluestorm: i'm looking at Camlp4OcamlParser.ml and it uses class_declaration. i read before that camlp4 is based on the revised syntax, so i'm gonna look for class_declaration in the revised parser...
<bluestorm>
the regular parser is an incrementation of the revised one
<bluestorm>
(using the SyntaxExtension mechanism)
<bluestorm>
so the revised one is a better place to look at if you want something complete
<joelr1>
bluestorm: what's your name, btw?
<bluestorm>
(as it basically starts from nothing)
<bluestorm>
hm
<bluestorm>
"bluestorm" :]
<joelr1>
allright
<bluestorm>
(i do not want to hide but everything i do camlwise is under that name anyway)
<joelr1>
ok
<joelr1>
looking for LEFTA
<joelr1>
bluestorm: class_declaration:
<joelr1>
[ LEFTA
<joelr1>
[ c1 = SELF; "and"; c2 = SELF ->
<joelr1>
what's the meaning of LEFTA here? where do I find it?
<bluestorm>
hm
<joelr1>
or SELF, for example
<bluestorm>
SELF almost mean "the rule being defined"
<bluestorm>
LEFTA is an associativity tuning
<joelr1>
where are these defined?
<bluestorm>
hm
<joelr1>
you certainly know a whole lot about ocaml ;d
<joelr1>
:D
<bluestorm>
just played with camlp4 a little this summer
<bluestorm>
(this wiki is the best documentation i found about 3.10 camlp4)
<joelr1>
bluestorm: yep, looking at that site
<bluestorm>
is said "almost" because SELF sometimes start at the priority level being defined
<bluestorm>
-s
<joelr1>
doesn't mention LEFTA or ANTIQUOT but it's a start
<joelr1>
thanks
<bluestorm>
hm
<bluestorm>
i think it start at the priority level when it's the first or the last token of the rule
<bluestorm>
(for example "SELF; '+'; SELF" in the infix level of the expression rule will only start at the infix level, not matching let..in or while/for loops)
<bluestorm>
joelr1: what kind of modifications are you planning to do ?
<bluestorm>
if they are simple enough, you may rely on the camlp4 AST map/fold, without using EXTEND directives
<bluestorm>
(i think the mapper/folder classes are one of the nicest things in 3.10 camlp4, or at least funniest to use)
<joelr1>
bluestorm: probably too complex. i would like to analyze a class declaration and if a particular class is used as a base then generate c wrappers. this is to define cocoa/objective-c classes in ocaml
<bluestorm>
so you can consider each class seperately, doing only local transformations, and only adding some code ?
<joelr1>
but i need to look at the 1) base class, 2) type of member fields, 3) type and arguments of each function, including the use of labeled arguments
<bluestorm>
but i didn't really find it easy to understand
<joelr1>
base class determines where i process this class or leave it alone, type of member fields i would strip, potentially
<bluestorm>
hm
<joelr1>
and function types and args are extremely important, particularly labeled args and their name and order
<bluestorm>
how could extending the syntax help you with that ?
<bluestorm>
i looks like you only want to gather some information _after_ the AST building
<bluestorm>
(wich is what map/fold are intented for)
<joelr1>
i guess so. thanks for the tip!
<joelr1>
i'll see what i can work up this evening
<bluestorm>
hm
<bluestorm>
i have an example of Ast.map use here
<joelr1>
is the purpose of fold vs map explained somewhere?
<bluestorm>
Ast.map applies local transformation to each part of the AST
<bluestorm>
Ast.fold fold the AST, allowing you to react differently depending on the alreay-folded nodes
<joelr1>
awesome!
<joelr1>
thanks
joelr1 has quit []
Demitar has quit [Connection timed out]
Demitar has joined #ocaml
<noss>
while you were talking about it.
<noss>
caml4p that is.
<bluestorm>
?
<noss>
ocaml has pattern matching, erlang has patten matching. but it would be nice if i could express erlang pattern and erlang datatypes in ocaml so they look prettier.
<noss>
That is, if one set up ocaml and erlang to exchange messages.
<noss>
erlang doesnt have the same flexibility.
buluca has quit [No route to host]
<bluestorm>
i don't know erlang
<bluestorm>
but i doubt message exchange can be solved at the syntax level
<noss>
It is more the actually matching of the messages, on the ocaml side.
<noss>
Erlang has very few types, and no user definable types. User definable types are all informal. What we called a tagged tuple.
<noss>
Erlang tuples are a tad bit different than ocaml though. But O(1) read immutable N-length objects.
<noss>
So {req, Data} would be a tuple of 2 with element 1 an atom 'req' and element 2 would be some arbitrary erlang term (value)
leo037 has quit ["Leaving"]
<noss>
A pattern for that would look like ErlangTuple2 (ErlangAtom "req", ErlangTerm ...uhm...) in ocaml i think.
<noss>
So the syntax would be for expressing pattern matching of erlang terms on the ocaml side, not for the technical exchange of messages between erlang and ocaml.
buluca has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
iceeey has joined #ocaml
Jedai has joined #ocaml
Mr_Awesome has joined #ocaml
love-pingoo has joined #ocaml
Torment has quit [Read error: 110 (Connection timed out)]
kelaouch1 has quit [Client Quit]
ita has joined #ocaml
kelaouchi has joined #ocaml
mbishop has quit [Remote closed the connection]
mbishop has joined #ocaml
joelr1 has joined #ocaml
joelr1 has quit [Client Quit]
Abo-Marwan14 has quit [Remote closed the connection]
screwt840 has quit [Remote closed the connection]
ita is now known as ita|zzz
Tetsuo has quit ["Leaving"]
Tetsuo has joined #ocaml
ita|zzz has quit [Remote closed the connection]
Tetsuo has quit [Remote closed the connection]
Tetsuo has joined #ocaml
gunark has joined #ocaml
buluca has quit [Read error: 110 (Connection timed out)]
Tetsuo has quit [Remote closed the connection]
buluca has joined #ocaml
screwt840 has joined #ocaml
iceeey has quit ["Saliendo"]
piggybox has quit [Read error: 110 (Connection timed out)]
piggybox has joined #ocaml
l_a_m has quit [Remote closed the connection]
Abo-Marwan14 has joined #ocaml
ita has joined #ocaml
pants1 has joined #ocaml
tty56 has quit [Read error: 60 (Operation timed out)]
tty56 has joined #ocaml
jlouis has joined #ocaml
pants1 has quit [Read error: 110 (Connection timed out)]
DraX has joined #ocaml
<DraX>
is there a way to require from the toplevel?
<DraX>
I'd like to play with Http_client but it seems like i need to require netclient before I can do that
<ita>
require ?
<DraX>
#require "netclient";;
<DraX>
like that
<DraX>
it's in a lot of examples
pants1 has joined #ocaml
<DraX>
s/a lot of/all of the netclient/
<DraX>
if i try to just open Http_client it tells me it's unbound
<zmdkrbou>
#require doesn't exist in ocaml, it's #use
<DraX>
yay new error!
<DraX>
# #use "netclient";;
<DraX>
Cannot find file netclient.
<zmdkrbou>
#use works with filenames (and there is the search path problem)
<zmdkrbou>
open Http_client should work with the right path
<zmdkrbou>
you can try with "open List;;" which works
<DraX>
yeah that's always worked
<DraX>
is there a way to see the search path?
jlouis_ has quit [Read error: 110 (Connection timed out)]
<mbishop>
#require comes from findlib
<mbishop>
do #use "findlib" if you have it installed
<mbishop>
then it should tell you how to use it from there
<DraX>
# #use "findlib";;
<DraX>
File "findlib", line 1, characters 1-2:
<DraX>
Syntax error
<DraX>
:/
<mbishop>
er sorry
love-pingoo has quit ["!"]
<mbishop>
it's #use "topfind"
<DraX>
mbishop: thank you!
<pango>
yes, topfind
<DraX>
sweet, it works!
<DraX>
is there some way i can make topfind get loaded by default?
<pango>
got #use "topfind" in my ~/.ocamlinit
<DraX>
another question, is there a toplevel that uses readline so i can use arrow keys, etc?
<zmdkrbou>
you can use "ledit ocaml" (or even alias ocaml='ledit ocaml')