ched_ has quit [Read error: 110 (Connection timed out)]
ched_ has joined #ocaml
seafood has quit []
Alpounet has quit ["Quitte"]
seafood has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
ulfdoz_ has joined #ocaml
Lectus has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
travisbrady has joined #ocaml
jamii has quit [Read error: 60 (Operation timed out)]
psnively has joined #ocaml
alexyk has quit []
Lectus has left #ocaml []
alexyk has joined #ocaml
komar has joined #ocaml
komar has quit [Client Quit]
komar has joined #ocaml
komar has quit [Remote closed the connection]
psnively has quit []
komar_ has joined #ocaml
komar_ has quit [Remote closed the connection]
komar_ has joined #ocaml
komar_ has quit [Remote closed the connection]
komar_ has joined #ocaml
komar_ has quit [Client Quit]
komar_ has joined #ocaml
pants1 has joined #ocaml
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
frew|work has joined #ocaml
<frew|work>
hey guys, I just tried to install a new module (Allegro) and when I try to use it with open it says Unbound module Allegro
<frew|work>
it installed it in the right place (Where ocaml -where returns)
<frew|work>
any ideas what I did wrong?
<julm>
frew|work: could you put on a pastebin the result of [ls `ocamlc -where`/allegro.*]
<frew|work>
sure
<frew|work>
one sec
pantsd has quit [Read error: 113 (No route to host)]
<frew|work>
julm: well, it's all in the lib/allegro/allegro.*
<frew|work>
not /lib, but the ocaml lib
<frew|work>
should it be in a separate dir like that?
<julm>
yep that's better, but then you have to pass [-I +allegro] to ocaml
<frew|work>
cool!
* frew|work
tries it
<frew|work>
same error...
<julm>
and [-I +allegro allegro.cma] more likely
<frew|work>
k, one sec
<frew|work>
same error... Lemme try putting that before the file name
<julm>
yes dependences first in ocaml
<frew|work>
that's I as in Eye not l as in Laser right?
<julm>
I as in Eye
<frew|work>
excellent! Still doesn't work, but that's because I am passing the wrong options
<frew|work>
thanks
<frew|work>
ok, so there is a type called gfx_driver and its |foo
<frew|work>
er
<frew|work>
|foo |bar |baz
<frew|work>
although those are all caps
<frew|work>
how do I set that? I tried gfx_driver.FOO
<julm>
wait a sec, I'll look at it
<frew|work>
yessir
<thelema>
should be just Foo
<thelema>
types can't be set.
<thelema>
types list possible values for a binding.
<frew|work>
uh, it says the argument cannont be applied without label
<thelema>
you can set a reference cell.
<frew|work>
maybe I'm missing something else
<thelema>
you're trying to call a function, and it thinks that the parameter you're passing shouldn't be applied anonymously
<thelema>
- that it needs to have the label to apply it.
<frew|work>
so let foo =
<julm>
frew|work: for instance [set_gfx_mode ~gfx_driver: GFX_AUTODETECT]
<frew|work>
nope, I guess wrong
<frew|work>
guessed*
<frew|work>
it says unbound constructor GFX_AUTODETECT to that
<thelema>
[open Allegro]
<julm>
[Allegro.GFX_AUTODETECT] perhaps
<frew|work>
(although I'm also passing some ints
<frew|work>
I also did that
<frew|work>
julm: k
<frew|work>
I should be using commas between args right?
<frew|work>
; are for lists
<julm>
spaces
<frew|work>
oh yeah..
<frew|work>
sorry
<frew|work>
one sec
<frew|work>
ok, so do I need to do labels for all of these?
<thelema>
no parentheses, no commas
<frew|work>
thelema: yeah, I fixed that :-)
<thelema>
yes, labels for everything needing labels
<frew|work>
so foo:bar means it needs a label foo
<thelema>
yes
<thelema>
~foo:123
<frew|work>
yep
<frew|work>
it still says unbound constructor Allegro.GFX_WINDOWS
<frew|work>
I also tried without Allegro.
alexyk has quit []
<thelema>
where did you get GFX_WINDOWS?
<frew|work>
er
<julm>
there is no GFX_WINDOWS I can see
<frew|work>
good question...
<frew|work>
I am gonna guess it's a typo
alexyk has joined #ocaml
<frew|work>
is there anything wrong with doing let foo = makecol ~r: 1 ~g: 2 ~b: 3; ?
<julm>
use [in]
<julm>
not [;]
<frew|work>
ok
<frew|work>
I did that, now it says I passed too many args, but I passed it what it said to in the error messages
<frew|work>
(too many args to textout_centre_ex that is)
<frew|work>
sorry
<julm>
what's the call to that?
<frew|work>
it's because I what too few ;'s
<julm>
ok
* frew|work
is used to perl
<frew|work>
well, I don't actually see it working, but that could be my use of xmonad
<thelema>
frew|work: why do you need xmonad?
<frew|work>
because I'm silly and like tiling wm's?
<thelema>
ratpoison?
<frew|work>
eh, I tried it, I may go back some day, but this is fine atm
<frew|work>
awesome, so I'm getting a segfault
<julm>
outch
<frew|work>
I'm guessing it has something to do with the ocaml allegro and the real allegro
<frew|work>
although...
<frew|work>
the make test showed real output
* frew|work
looks at test file
<thelema>
pastebin your program
<frew|work>
well, I got the example to work
<frew|work>
interestingly he didn't use the named parameters
<julm>
indeed
<julm>
this is for an old ocaml compiler
<thelema>
I think complete applications don't need labels
<frew|work>
you mean the allegro lib?
<julm>
yep
<frew|work>
well...that's a little annoying, but whatever.
<frew|work>
I thought it would be cool to write a game with ocaml
<frew|work>
I'll still try
<julm>
thelema> I think complete applications don't need labels <- it's strange, but you're right
<julm>
frew|work: the library is from february 2008, it's would very likely be ok with the current ocaml
<frew|work>
julm: oh yeah, it totally works
<frew|work>
It's just that if it's unmaintained it will eventually bitrot
ikaros has joined #ocaml
<julm>
thelema> I think complete applications don't need labels <- it's strange, but you're right <- and also there must be no polymorphic argument
<julm>
let f ~a = a in f 0;;
<julm>
- : a:(int -> 'a) -> 'a = <fun>
<mrvn>
The only point in lables is to allow skipping or reordering args.
<julm>
and to ease the reading of the code
seafood has quit []
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
komar_ has quit [Remote closed the connection]
<julm>
julm> [...] no polymorphic argument <- used as a continuation, that is.
<mrvn>
julm: your forgot the rec
<mrvn>
or not, nm.
<julm>
ah, I was trying to figure out what you meant :P
komar_ has joined #ocaml
<kaustuv>
Without running it, predict the output of this snippet:
<kaustuv>
let f ?(a=print_endline "hello") ?(b=print_endline "hi") () = () ;;
<kaustuv>
begin print_endline "default:" ; f () ;
<kaustuv>
print_endline "explicit:" ;
<kaustuv>
f ~a:(print_endline "hello") ~b:(print_endline "hi") () ;
<kaustuv>
end ;;
<mrvn>
since you ask not what one would expect.
<julm>
default hello hi explicit hi hello
<julm>
plus the \n
<mrvn>
that I would have expected given your question. :)
<mrvn>
normal function application executes in reverse order, last to first.
<julm>
but the behavior in the second call to [f] is not documented
<kaustuv>
No, mrvn is right. The second call is expected right-to-left execution. It's the first call that is strange.
<kaustuv>
I.e., default arguments are executed left-to-right
<julm>
I think, the first can't be the other way, because of currying
<kaustuv>
No, [f ()] is a complete application.
<julm>
let f = fun ?(a=print_endline "hello") -> fun ?(b=print_endline "hi") -> fun () -> ();;
<julm>
that's why, [a] is evaluated first
<kaustuv>
Neither a nor b is evaluated in a partial application of f. Try it.
<julm>
I know
<julm>
but where do you see a partial application?
<julm>
and actually it's not exactly true
<julm>
if we were not using optional arguments that is
<kaustuv>
If we are only talking about complete applications, then whether a function is curried or not makes no difference.
<julm>
I wrote [f] with [fun] to show you that [b] would use [a] and thus that [a] had to be evaluated first, that's all
<julm>
-would+could
<kaustuv>
But I didn't use fun. Note that [let f x y z = e] is NOT the same as [let f = fun x -> fun y -> fun z -> e]. (It IS the same as [let f = fun x y z -> e].)
ikaros has quit ["Leave the magic to Houdini"]
<julm>
well, I do not see a difference :/
<julm>
also you could do [let f ?(a=0) ?(b=a) () = b]
frew|work has quit [Read error: 113 (No route to host)]
<julm>
"syntactic sugar" is the name
frew|work has joined #ocaml
Associat0r has quit []
<mrvn>
kaustuv: what is the difference?
Camarade_Tux has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
hdon has joined #ocaml
<hdon>
i have a fetish for a programming language that implements exit() as a deterministic infinite loop with no side-effects. can anyone help me out?
<flux>
kaustuv, hm, wouldn't that simple case be equal? Isn't the problem only when you apply functions partially?
frew|work has quit [Read error: 113 (No route to host)]
mishok13 has joined #ocaml
jknick has quit ["leaving"]
<kaustuv>
Well, I could be mistaken, but I was under the impression that in the ZAM2 the implementations of ((fun x y z -> e) and (fun x -> fun y -> fun z -> e) were different.
<kaustuv>
I'm probably wrong because the manual claims that they are "equivalent"
<hdon>
kaustuv: "equivalent" is usually not the same as "different"
<mrvn>
Package: netsurf
<mrvn>
ups
julm has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
barismetin has joined #ocaml
<Camarade_Tux>
what could trigger the 'a in "The method caml_with_prefix has type [> `Prefixed of [> `Caml of string ] ] as 'a where 'a is unbound" ? the offending code is "method caml_with_prefix = `Prefixed (`Caml (camlcase ~prefix:true gs_v))", where camlcase returns a string
blaenk has joined #ocaml
blaenk has left #ocaml []
<flux>
camarade_tux, add a type annotation?
<flux>
camarade_tux, a method cannot be polymorphic implicitly
<flux>
your function is like: method foo = failwith "", which fails to compile with the same reason as well
<flux>
it is similar to having record type t = { f : unit -> 'a }
<flux>
'a must be bound
<flux>
camarade_tux, however, you can fix that also by adding more code
<Camarade_Tux>
does it see a type "wider" than [ `Prefixed of [ `Caml of string]] ?
<flux>
that calls the method, and in that way limits the type to some 'a
<flux>
camarade_tux, yes. try it on toplevel, `Foo is of type [> `Foo]
<flux>
which is different from (`Foo : [`Foo])
<flux>
if you have value `foo, you can compare it to `bar
<Camarade_Tux>
yeah, quite annoying, I'll have to add 8 type annotations =/
<flux>
if you have value (`foo : [`foo]) and (`bar : [`bar]), they are type-incompatible
<flux>
well, if you make use of the function within the object the need for annotation might go away
<Camarade_Tux>
no, I only use classes to pack everything together
<flux>
well, sucks to be you then :)
eevar2 has joined #ocaml
<Camarade_Tux>
yeah, working now, annotations everywhere but working, thanks
hdon has left #ocaml []
hkBst has joined #ocaml
Alpounet has joined #ocaml
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
jamii has joined #ocaml
travisbrady has quit [Read error: 60 (Operation timed out)]
travisbrady has joined #ocaml
OChameau has joined #ocaml
Snark has joined #ocaml
jamii has quit [Read error: 60 (Operation timed out)]
jamii has joined #ocaml
Yoric[DT] has joined #ocaml
munga__ has joined #ocaml
barismetin has quit [Remote closed the connection]
jamii has quit [Read error: 110 (Connection timed out)]
verte has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
<Camarade_Tux>
nearly-\o/
verte_ has joined #ocaml
verte has quit [Read error: 60 (Operation timed out)]
verte has joined #ocaml
verte_ has quit [Read error: 60 (Operation timed out)]
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
jeanbon has joined #ocaml
peddie has quit [Read error: 60 (Operation timed out)]
peddie has joined #ocaml
jeanbon has quit ["EOF"]
Alpounet has quit ["Ex-Chat"]
noj has quit ["brb"]
noj has joined #ocaml
rwmjones_ has joined #ocaml
hkBst has quit [Remote closed the connection]
travisbrady_ has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
rwmjones_ has quit [Read error: 60 (Operation timed out)]
komar__ has joined #ocaml
komar_ has quit [Read error: 110 (Connection timed out)]
verte has quit [Read error: 60 (Operation timed out)]
travisbrady_ has quit [Read error: 104 (Connection reset by peer)]
travisbrady has joined #ocaml
verte has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
Spiwack has joined #ocaml
travisbrady_ has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
ched_ has quit [Read error: 110 (Connection timed out)]
travisbrady_ has quit [Read error: 104 (Connection reset by peer)]
ched_ has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
travisbrady has joined #ocaml
verte has quit [Read error: 110 (Connection timed out)]
travisbrady has quit [Read error: 104 (Connection reset by peer)]
travisbrady has joined #ocaml
jeremiah has joined #ocaml
alexyk has quit []
yziquel has joined #ocaml
_andre has joined #ocaml
alexyk has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
travisbrady has joined #ocaml
jeanbon has joined #ocaml
frew|work has joined #ocaml
komar__ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
bombshelter13_ has joined #ocaml
Associat0r has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
frew|work has quit [Read error: 113 (No route to host)]
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
ched__ has joined #ocaml
ched_ has quit [Read error: 110 (Connection timed out)]
yziquel has quit []
barismetin has joined #ocaml
ikaros has joined #ocaml
eevar2 has quit ["This computer has gone to sleep"]
ched__ is now known as Ched
alexyk has quit []
acatout has quit [Read error: 60 (Operation timed out)]
alexyk has joined #ocaml
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
sporkmonger has quit []
fitil has joined #ocaml
fitil is now known as praf_de_push
praf_de_push is now known as ghiulea
__marius__ has joined #ocaml
ghiulea is now known as debarcader
debarcader is now known as jusTime
jm has joined #ocaml
jusTime is now known as iatagan
julm has quit [Read error: 110 (Connection timed out)]
iatagan is now known as cal_troian
cal_troian has left #ocaml []
rwmjones_ has joined #ocaml
willb has quit ["Leaving"]
Yoric[DT] has quit ["Ex-Chat"]
travisbrady has quit []
Ched has quit [Read error: 110 (Connection timed out)]
ulfdoz has joined #ocaml
travisbrady has joined #ocaml
rwmjones_ has quit ["Closed connection"]
Camarade_Tux has quit ["Leaving"]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Client Quit]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Read error: 104 (Connection reset by peer)]
jm is now known as julm
Camarade_Tux has joined #ocaml
monadic_kid has joined #ocaml
monadic_kid has quit ["Leaving"]
barismetin has quit [Remote closed the connection]
Ched has joined #ocaml
Ched has quit [Read error: 104 (Connection reset by peer)]
Ched has joined #ocaml
Spiwack has quit ["Leaving"]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
munga__ has quit ["Ex-Chat"]
psnively has joined #ocaml
psnively has left #ocaml []
Lomono has joined #ocaml
Camarade_Tux has quit [Read error: 104 (Connection reset by peer)]
Lomono_ has joined #ocaml
Camarade_Tux has joined #ocaml
willb has joined #ocaml
Lomono has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
sporkmonger has joined #ocaml
itewsh has joined #ocaml
Snark has quit ["Ex-Chat"]
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
komar_ has joined #ocaml
komar_ has quit [Client Quit]
komar_ has joined #ocaml
komar_ has quit [Client Quit]
komar_ has joined #ocaml
_andre has quit ["leaving"]
pants1 has quit [Read error: 110 (Connection timed out)]
pantsd has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
pantsd has quit [Connection timed out]
pantsd has joined #ocaml
alexyk has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
julm has joined #ocaml
travisbrady has quit []
jeff_s_ has joined #ocaml
ofaurax has joined #ocaml
shazam has joined #ocaml
<shazam>
for some reason my library files are being evaluated at compile time
<shazam>
(presumably by ocamlp4)
<shazam>
so let _ = print_endline "foo" gives me a syntax error elsewhere
<shazam>
and let _ = set_video_mode makes a new window appear (at compile time!)
<julm>
shazam: do you make camlp4 load your library files?
<shazam>
I don't think so, but I do use OCAMLFINDFLAGS = -syntax camlp4o
ofaurax has quit ["Leaving"]
<julm>
could you perhaps pastebin the trace of the build process?
<shazam>
how do I trace my build process?
<julm>
what are you using : make, ocamlbuild, omake ?
<shazam>
omake
<julm>
does omake print the commands it runs?
travisbrady has joined #ocaml
<shazam>
nope
<shazam>
lemme see if I can ask it to...
<julm>
perhaps a -debug-* option
itewsh has quit [Read error: 60 (Operation timed out)]
<julm>
or -trace-*
itewsh has joined #ocaml
<shazam>
err
<shazam>
strangely enough
<shazam>
it only does this in emacs
<shazam>
wt....
<julm>
can't help then, I'm a vimmer
<mrvn>
May you vimmer in pain.
<julm>
tss
<shazam>
errr
<shazam>
actually
<shazam>
does it in the shell too
<shazam>
nevermind
<shazam>
ocamlfind ocamldep -syntax camlp4o -package pcre,oset,seditable -modules test.ml <--here's the line that evaluates all the libraries at compile time
<shazam>
in this case, it's reevaluating oset
<julm>
are you sure -package pcre,oset,seditable is right there ?
travisbrady has quit [Read error: 104 (Connection reset by peer)]
bombshelter13_ has quit []
travisbrady has joined #ocaml
<julm>
so, you need to load pa_seditable.cmo to calculate the dependences of test.ml, but when you use -package seditable it also executes code it shouldn't, that's it?
jeddhaberstro has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
<shazam>
right
<shazam>
it executes the code in oset
<shazam>
(which is a dependency of SEditable, found in seditable
<julm>
is this code in iset into a pa_*.ml file?
<julm>
oset*
<shazam>
nope
<julm>
is it in a [let _ =] binding ?
<shazam>
let foo = bar binding
<shazam>
but [let _ =] also screws things up
<julm>
are you the author of oset?
<shazam>
yup
<julm>
the code in [let foo = bar binding] is executed when the module is loaded
<julm>
that's normal
<julm>
it is not a function
<julm>
it's initiating code
<julm>
a function would be [let foo () = bar binding]
<shazam>
but running the code at ocamldep
<shazam>
ocamldep shouldn't run any code
<julm>
if it loads the module, it runs the initiating code of the module
<julm>
if pa_seditable.cmo use this oset module, it loads this module
<shazam>
pa_seditable doesn't use any module
<shazam>
err
<shazam>
well, not oset at least
<shazam>
it uses PreCast, Ast, Pa_type_conv
<shazam>
I don't see why ocamldep should run the code in oset
<julm>
could you do an ocamlobjinfo on pa_seditable.cmo ?