Alpounet changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html - Answer OCaml Meeting 2010 poll https://forge.ocamlcore.org/survey/survey.php?group_id=77&survey_id=1
travisbrady has joined #ocaml
seanmcl has quit []
BigJ2 has quit [Read error: 110 (Connection timed out)]
ofaurax has quit ["Leaving"]
M| has joined #ocaml
sramsay has quit ["Leaving"]
slash_ has quit [Client Quit]
Alpounet has joined #ocaml
marteo has quit ["Debian GNU/Hurd is Good."]
munga has joined #ocaml
Yol has joined #ocaml
tmaedaZ is now known as tmaeda
Yol has quit []
seanmcl has joined #ocaml
munga has quit [Read error: 148 (No route to host)]
<monestri> can I overwrite &&?
<monestri> something like let (&&) = F a b;;
<monestri> let (a && b) = F a b;;
<monestri> let (&&) = f;; works.. but I want let (&&) = Circle;;
<monestri> if possible
det has joined #ocaml
<Alpounet> you mean with the value constructor ?
<monestri> i think so
<Alpounet> a value constructor isn't a function in OCaml
<monestri> so I couldn't rig something to do pi && radios to return a Circle?
<Alpounet> you have to write it explicitly
<Alpounet> let (&&) foo bar = Circle foo bar
<monestri> cool, thanks
<monestri> also, how do I change it back?
<Alpounet> anyway, I'd advise you to restrict the scope of your (&&) operator
<Alpounet> even better, do not use such an operator for such an use.
<Alpounet> let make_circle foo bar = Circle foo bar is much clearer !
<monestri> my test cases aren't very sensical
<monestri> unfortunately
<Alpounet> that is ?
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
valross has joined #ocaml
<monestri> let (||) = List.hd in let is_digit x = false;;
<monestri> trying to limit the scope of this assigment to a function
<monestri> getting a syntax error
<monestri> oh, maybe i'm doing that backwards..
<monestri> yeah, that was silly :)
M| has quit [Remote closed the connection]
BiDOrD has quit [Read error: 110 (Connection timed out)]
sebaseba has joined #ocaml
<sebaseba> Apply (Fun (f, x, _, _, e) as v1, v2) when is_value v2 -> subst [(f, v1); (x, v2)] e
<sebaseba> what are v1 and v2 bound to?
<sebaseba> got it, v1 bounds to Fun ..., v2 matches the 2nd element of the tuple passed to Apply
seanmcl has quit []
Alpounet has quit [Remote closed the connection]
_unK has quit [Remote closed the connection]
sebaseba has left #ocaml []
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
julm_ has joined #ocaml
julm has quit [Read error: 104 (Connection reset by peer)]
seanmcl has joined #ocaml
julm_ has quit [Read error: 60 (Operation timed out)]
travisbrady has quit []
julm has joined #ocaml
verte has joined #ocaml
julm_ has joined #ocaml
julm has quit [Read error: 113 (No route to host)]
seanmcl has quit []
det has quit [wolfe.freenode.net irc.freenode.net]
Ched has quit [wolfe.freenode.net irc.freenode.net]
kaustuv_ has quit [wolfe.freenode.net irc.freenode.net]
tmaeda has quit [wolfe.freenode.net irc.freenode.net]
mbishop has quit [wolfe.freenode.net irc.freenode.net]
mlh has quit [wolfe.freenode.net irc.freenode.net]
schme has quit [wolfe.freenode.net irc.freenode.net]
jknick has quit [wolfe.freenode.net irc.freenode.net]
tonyIII__ has quit [wolfe.freenode.net irc.freenode.net]
Xteven has quit [wolfe.freenode.net irc.freenode.net]
tiz has quit [wolfe.freenode.net irc.freenode.net]
Pepe_ has quit [wolfe.freenode.net irc.freenode.net]
ozzloy has quit [wolfe.freenode.net irc.freenode.net]
Asmadeus has quit [wolfe.freenode.net irc.freenode.net]
rwmjones-afk has quit [wolfe.freenode.net irc.freenode.net]
jimmyb2187 has quit [wolfe.freenode.net irc.freenode.net]
yurug has quit [wolfe.freenode.net irc.freenode.net]
mehdid has quit [wolfe.freenode.net irc.freenode.net]
orbitz has quit [wolfe.freenode.net irc.freenode.net]
orbitz has joined #ocaml
caligula__ has joined #ocaml
det has joined #ocaml
Ched has joined #ocaml
kaustuv_ has joined #ocaml
tmaeda has joined #ocaml
Xteven has joined #ocaml
Asmadeus has joined #ocaml
Pepe_ has joined #ocaml
mbishop has joined #ocaml
rwmjones-afk has joined #ocaml
jimmyb2187 has joined #ocaml
mlh has joined #ocaml
schme has joined #ocaml
jknick has joined #ocaml
ozzloy has joined #ocaml
yurug has joined #ocaml
tonyIII__ has joined #ocaml
tiz has joined #ocaml
mehdid has joined #ocaml
caligula_ has quit [Connection timed out]
willb has quit [Remote closed the connection]
julm has joined #ocaml
julm_ has quit [Read error: 113 (No route to host)]
julm has quit [Read error: 60 (Operation timed out)]
<mbac> is there any magic i could do to make code like printf "really_long_name_of_field=%s\n" x.really_long_name_of_field; less redundant?
julm has joined #ocaml
<mbac> or, making something like { really_long_value_of_something = a.really_long_value_of_something + b.really_long_value_of_something; } less redundant?
kaustuv_` has joined #ocaml
travisbrady has joined #ocaml
kaustuv_ has quit [Read error: 110 (Connection timed out)]
struktured has joined #ocaml
julm has quit [Read error: 104 (Connection reset by peer)]
julm has joined #ocaml
julm_ has joined #ocaml
Associat0r has quit [wolfe.freenode.net irc.freenode.net]
mfp has quit [wolfe.freenode.net irc.freenode.net]
c0m_ has quit [wolfe.freenode.net irc.freenode.net]
Jedai has quit [wolfe.freenode.net irc.freenode.net]
palomer has quit [wolfe.freenode.net irc.freenode.net]
cmeme has quit [wolfe.freenode.net irc.freenode.net]
bohanlon has quit [wolfe.freenode.net irc.freenode.net]
flux has quit [wolfe.freenode.net irc.freenode.net]
julm has quit [No route to host]
Associat0r has joined #ocaml
mfp has joined #ocaml
c0m_ has joined #ocaml
Jedai has joined #ocaml
palomer has joined #ocaml
cmeme has joined #ocaml
bohanlon has joined #ocaml
flux has joined #ocaml
julm has joined #ocaml
julm_ has quit [Read error: 113 (No route to host)]
julm_ has joined #ocaml
julm has quit [Read error: 113 (No route to host)]
nb_ has quit [Read error: 110 (Connection timed out)]
Associat0r has quit []
DoingMathFoJesus has joined #ocaml
onigiri has quit []
det has quit [Read error: 54 (Connection reset by peer)]
nb has joined #ocaml
nb has quit [Excess Flood]
verte has quit ["~~~ Crash in JIT!"]
nb has joined #ocaml
nb has quit [Excess Flood]
ulfdoz has joined #ocaml
ikaros has joined #ocaml
julm_ has quit [Read error: 54 (Connection reset by peer)]
julm has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
Submarine has joined #ocaml
c0m has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
det has joined #ocaml
verte has joined #ocaml
c0m_ has quit [Read error: 110 (Connection timed out)]
ttamttam has joined #ocaml
tmaeda0 has joined #ocaml
DoingMathFoJesus has quit [Remote closed the connection]
mishok13 has joined #ocaml
tmaeda has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux> mbac: with magic yes, but it's not really worth it
munga has joined #ocaml
BiDOrD has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
Submarine has quit [Read error: 110 (Connection timed out)]
munga has quit ["Ex-Chat"]
<Camarade_Tux> reading python feels like reading visual basic to me
valross has quit [Read error: 145 (Connection timed out)]
rwmjones-afk is now known as rwmjones
Submarine has joined #ocaml
julm_ has joined #ocaml
valross has joined #ocaml
julm has quit [Nick collision from services.]
julm_ is now known as julm
_zack has joined #ocaml
lutter has joined #ocaml
|Jedai| has joined #ocaml
<Camarade_Tux> I need support for C varargs in ocaml-gir now, that's going to be fun
<Camarade_Tux> ny
<olegfink_> that reminds me that at some point I should rewrite ocaml-dlopen for libffi
Jedai has quit [Read error: 110 (Connection timed out)]
olegfink_ has quit [Read error: 54 (Connection reset by peer)]
olegfink has joined #ocaml
hugin has joined #ocaml
Associat0r has joined #ocaml
ikaros has joined #ocaml
ygrek has quit [Remote closed the connection]
ikaros has quit [Client Quit]
rwmjones_lptp has joined #ocaml
_andre has joined #ocaml
julm has quit [Read error: 104 (Connection reset by peer)]
rwmjones_lptp has quit ["This computer has gone to sleep"]
julm has joined #ocaml
thib has joined #ocaml
thib has quit [Client Quit]
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
tmaeda0 is now known as tmaedaZ
marteo has joined #ocaml
lutter has quit [Read error: 113 (No route to host)]
tmaedaZ is now known as tmaeda0
tmaeda has joined #ocaml
<thelema> Camarade_Tux: Python is Linux's VB
M| has joined #ocaml
<Camarade_Tux> I think it's the "global" keyword which made me think that... in the code I was looking at, there were five variables that would get defined globally, three levels down
<Camarade_Tux> I mean, inside a function inside a class inside something else
seanmcl has joined #ocaml
tmaeda0 has quit [Read error: 110 (Connection timed out)]
<verte> comparisons with vb (as a langauge, rather than as a tool) are probably a bit far fetched. it has strong namespaces and is generally very hygenic, a powerful metaclass model, and a very readable syntax.
<thelema> verte: VB6 has all that too.
marteo has quit [Client Quit]
<verte> really? what did vb6 call their metaclasses? googling yields two clr articles and some python articles
<verte> oh, those clr ones are python too
kaustuv_ has joined #ocaml
_zack has quit ["Leaving."]
seanmcl has quit []
kaustuv_` has quit [Read error: 110 (Connection timed out)]
seanmcl has joined #ocaml
lutter has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
BiDOrD has quit [Read error: 110 (Connection timed out)]
BiDOrD has joined #ocaml
olegfink_ has joined #ocaml
olegfink has quit [Read error: 110 (Connection timed out)]
Submarine_ has joined #ocaml
micrun has joined #ocaml
Submarine has quit [Read error: 145 (Connection timed out)]
ezra has joined #ocaml
travisbrady has quit []
eldragon has joined #ocaml
willb has joined #ocaml
travisbrady has joined #ocaml
_zack has joined #ocaml
_unK has joined #ocaml
kattla has quit ["Leaving."]
Submarine_ has quit [Read error: 60 (Operation timed out)]
mishok13 has quit [Read error: 110 (Connection timed out)]
willb is now known as willb-lunch
olegfink has joined #ocaml
olegfink_ has quit [Read error: 110 (Connection timed out)]
ttamttam has quit ["Leaving."]
smimou has joined #ocaml
Associat0r has quit []
olegfink_ has joined #ocaml
ikaros has joined #ocaml
BigJ2 has joined #ocaml
_unK has quit [Remote closed the connection]
olegfink has quit [Read error: 110 (Connection timed out)]
willb-lunch is now known as willb
BigJ2 has quit []
_unK has joined #ocaml
ulfdoz has joined #ocaml
_zack has quit [Read error: 60 (Operation timed out)]
_zack has joined #ocaml
acatout has quit [Read error: 110 (Connection timed out)]
micrun has quit [Read error: 113 (No route to host)]
ttamttam has joined #ocaml
_zack has quit [Read error: 110 (Connection timed out)]
BigJ2 has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
_andre has quit ["leaving"]
valross has quit [Remote closed the connection]
lutter has quit ["Leaving."]
acatout has joined #ocaml
rwmjones_lptp has joined #ocaml
julm has quit ["cassos"]
ttamttam has quit ["Leaving."]
<BigJ2> can anyone tell me why when I plug my code into the top level it doesn't produce any errors but when I compile, in my delete_vec and insert_vec fucntions says unbound value sort_vec_store
olegfink_ has quit [Read error: 60 (Operation timed out)]
<orbitz> whats' wtih teh ()?
<BigJ2> which line?
<orbitz> 40, 49
<hcarty> BigJ2: It's probably because, in the toplevel, it's using previous definitions of sort_vec_store
<hcarty> BigJ2: You need to define sort_vec_store before you call it.
<hcarty> BigJ2: Moving the definition above the definitions of the functions which call sort_vec_store should solve your problem.
<Camarade_Tux> I was happy when I thought I would only have to "use" C variable arguments in ocaml-gir, of course I'll have to "define" them too...
<hcarty> Camarade_Tux: Does ocaml-gir create both C stubs and OCaml code?
<hcarty> Camarade_Tux: Similar to camlidl?
<Camarade_Tux> hcarty: of course ;)
olegfink has joined #ocaml
<BigJ2> hcarty: k, I forgot about that constraint in imperative style
<BigJ2> used to java where u can define and call wherever
<Camarade_Tux> hcarty: it creates the C stubs, the .ml files full of "external" keywords and the .ml file which puts everything in classess
<Camarade_Tux> s/s$//
<Camarade_Tux> I can't believe my home connection with ethernet is crappier than the neighbour's with wifi...
<Camarade_Tux> and the neighbour being far enough for the connection to drop easily
<BigJ2> hcarty: is my logic correct in the sort_vec_store function for odering vectors by magnitude from smallest to largest?
<hcarty> BigJ2: I'm not sure - it would be a while before I'm able to look at it in detail. But Array.sort may do what you want with less work on your part.
<BigJ2> ya I was looking at that module
<orbitz> BigJ2: why don't you use the Array sort function?
<BigJ2> I am not sure it would sort it correctly because I want them ordered by magnitude
<orbitz> you give it a comaprison function
<BigJ2> and I determine the magnitude by calling the vec_mag function
<orbitz> BigJ2: so cal lit in your comparison function
<BigJ2> ahh so I can give it the comparison function vec_mag?
<orbitz> i assume you wan more than just vec_mag
<orbitz> it just calls yoru comparison function for both elemetns though
<BigJ2> so I don't really need vec_mag
<orbitz> you probably do...
<hcarty> BigJ2: You want a function which compares (vec_mag a) with (vec_mag b) and then returns an appropriate value, according to the specs in the Array.sort documentation.
<BigJ2> is the current code correct in the sort?
<hcarty> BigJ2: I don't know
<orbitz> it look sunlikely
<BigJ2> k
<orbitz> it only moves adjacent elements
<BigJ2> I'll try implementing Array.sort
seanmcl has quit []
_unK has quit [Read error: 54 (Connection reset by peer)]
_unK has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
ikaros has joined #ocaml
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
BigJ2 has quit [Read error: 110 (Connection timed out)]
seanmcl has joined #ocaml
kaustuv_` has joined #ocaml
kaustuv_ has quit [Read error: 60 (Operation timed out)]
ulfdoz has quit [Read error: 110 (Connection timed out)]
olegfink has quit ["Lost terminal"]
rwmjones_lptp has quit ["This computer has gone to sleep"]
rwmjones_lptp has joined #ocaml
seanmcl has quit []
seanmcl has joined #ocaml
ccasin has joined #ocaml
Associat0r has joined #ocaml
smimou has quit ["bli"]