<ayrnieu>
well, short of rewriting the bindings yourself(?!), I would find out why it won't find labltk, and then make it find that. Try asking a good question about *this* issue, here or to the author of that program.
<pango_>
ayrnieu: s/labltk/lablgl/
<Kzzch>
well, i believe the problem is that i installed lablgl from source and it's using ocamlfind to try to intstall ocamlode with the option -package lablgl. i cant seem to find any information on installing lablgl as a package short of GODI
<Kzzch>
my first thought is to try to write the META file in the site-lib directory myself
yondalf has quit [Read error: 145 (Connection timed out)]
<Kzzch>
nope, doesn't want to find the META file
<Kzzch>
never mind, syntax errors in the meta file
<Kzzch>
well, that part worked, now it's not finding the header files in the caml directory :/
<Kzzch>
okay, fixed that, now its coming up with conflicting type definitions.
<Kzzch>
what a pain
yondalf_ has quit ["leaving"]
shawn has quit ["This computer has gone to sleep"]
meng has joined #ocaml
pango__ has joined #ocaml
<meng>
hiya pango__
pango_ has quit [Remote closed the connection]
meng has quit []
dan2 has quit [Remote closed the connection]
Kzzch has quit ["The computer fell asleep"]
Kzzch has joined #ocaml
Kzzch has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
shawn has joined #ocaml
dark_light has quit ["Ex-Chat"]
ramkrsna has joined #ocaml
<levi_home>
Hmm. I'm trying to sort a list of pairs based on the value of the left hand side of each pair.
<levi_home>
Oh, duh, it's because I thought the compare function was infix.
ramki has joined #ocaml
gonnet has quit [Remote closed the connection]
gonnet has joined #ocaml
Snark has joined #ocaml
ramki has quit [Read error: 110 (Connection timed out)]
_velco has joined #ocaml
batdog is now known as batdog|gone
love-pingoo has joined #ocaml
rickdangerous has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
haelix_ is now known as haelix
slipstream-- has quit [Read error: 131 (Connection reset by peer)]
slipstream has joined #ocaml
Snark has quit ["Leaving"]
slipstream has quit [Read error: 131 (Connection reset by peer)]
Snark has joined #ocaml
slipstream has joined #ocaml
love-pingoo has joined #ocaml
pango__ is now known as pango
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
yondalf has joined #ocaml
david_koontz has quit ["Leaving"]
yondalf_ has joined #ocaml
yondalf has quit [Read error: 145 (Connection timed out)]
yondalf has joined #ocaml
velco has joined #ocaml
yondalf_ has quit [Read error: 145 (Connection timed out)]
slipstream has quit [Read error: 104 (Connection reset by peer)]
david_koontz has joined #ocaml
slipstream has joined #ocaml
slipstream has quit [Read error: 131 (Connection reset by peer)]
david_koontz has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
david_koontz has joined #ocaml
m3ga has joined #ocaml
_fab has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
Snark has quit ["Leaving"]
slipstream has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
slipstream has quit [Read error: 131 (Connection reset by peer)]
slipstream has joined #ocaml
slipstream has quit [Read error: 131 (Connection reset by peer)]
slipstream has joined #ocaml
<pango>
TFK: tried submitting a solution to the NEG2 problem, but keep getting NZECs :/
<TFK>
That's OK, I don't even have a sketch of a solution :-(
<TFK>
(I'm actually reading the GTK tutorial)
<pango>
there's no difference with deconstructing a value over any other (positive) base really... the only annoying problem is that OCaml's / rounds toward 0
<TFK>
Don't give me hints o.o;
<pango>
eheh... No hint about this NZEC (not zero exit code) ? Tried several things, no change :/
<TFK>
Mr. Etchemaite? ;-)
<pango>
yes
<TFK>
How is your family name pronounced?
<pango>
actually I left out the accents... complete spelling is etchemaïté
yondalf_ has joined #ocaml
<pango>
that's a basque name
<pango>
(but I don't speak basque at all)
<TFK>
Southern France?
<pango>
yes
<pango>
most basque community lives in Spain however
<TFK>
Well, I just passed the TEST problem, so the compilation/running process seems to be OK.
<pango>
same here
slipstream has quit [Read error: 131 (Connection reset by peer)]
slipstream has joined #ocaml
<TFK>
You still didn't say how to pronounce your family name, though :-)
<pango>
I don't know the standard notation for phonetics
<TFK>
IPA? I don't think most would be able to read that anyway... no proper English transliteration?
yondalf has quit [Read error: 110 (Connection timed out)]
<pango>
mmh english is not my native language, and I seldom speak it (mostly read/write those days), so result could be misleading :)
<TFK>
That's OK, I mostly speak English with myself o.o;;
yondalf_ has quit [Read error: 145 (Connection timed out)]
<pango>
will try to get Festival to pronounce my name "correctly"
<pango>
btw, in the contests, they should add a "user informations submit form" contest... theirs suck badly ;)
yondalf has joined #ocaml
<pango>
(SayText "etchema it ae") (roughly)
chessguy has joined #ocaml
ramkrsna has quit ["Leaving"]
m3ga has quit ["disappearing into the sunset"]
yondalf_ has joined #ocaml
<pango>
ok, some inputs must be greater than what OCaml's "31 bits signed" ints allow
david_koontz has quit [Read error: 104 (Connection reset by peer)]
david_koontz has joined #ocaml
lichtblau has joined #ocaml
<flux__>
hmm.. is it difficult to make ocamlfind-compatible libraries that allow both -thread and -vmthread? or should there be any problems?
<flux__>
I'm having inconsistent-interface-problem, so I should probably just compile a separate version, and somehow tell ocamlfind that predicate vmthread means one must link these binaries, etc..
<abez>
hmmm
<abez>
it seems that marshalling an array and unmarshalling is slow that n calls to ouput_binary_int
<abez>
slower
<pango>
it must check for shared values, unless you use No_sharing flag
<abez>
So No_sharing will speed it up?
<pango>
from what I understand, yes
<abez>
One of my complaints about ocaml is the requirement of extlib to handle dealing with real input
<pango>
haven't used extlib yet
<abez>
Well I mainly use its IO module
<abez>
it has write i32, read i32, read float32 write float32 read float64 etc..
<abez>
but it still doesn't have i32 -> binary string >:(
<pango>
what about Scanf ?
velco has quit ["Ex-Chat"]
<abez>
pango: does it handle binary encodings?
<abez>
I don't see anything in the docs about reading little endian or big endian ints etc
<pango>
yep
<abez>
uh ok I'm not seeing it.. Can you point me to some docs or a paragraph
<pango>
I'm not seeing it either
llamaman_ has left #ocaml []
pango has quit [Remote closed the connection]
pango has joined #ocaml
ramkrsna has quit [Read error: 104 (Connection reset by peer)]
<abez>
how do I List.fold_left (*) [1 ; 2 ; 3 ; 4 ; 5] 0;;
<abez>
I'm trying to figure out how to represent * without fun x y -> x * y
<pango>
( * )
smimou has joined #ocaml
<pango>
without spaces it's interpreted as the beginning of a command
<pango>
sorry comment
<pango>
also 1 is the unit value for *, not 0
<abez>
right right I was just trying to get * working
_velco has quit ["I'm outta here ..."]
Leonidas has quit [Read error: 104 (Connection reset by peer)]
lichtblau has quit [Read error: 113 (No route to host)]
mikeX has joined #ocaml
haelix has quit ["Changing server"]
<knobo>
hello, is there anyone here who can help me whith my smal baby-steps into ocaml world?
alx_ has joined #ocaml
<knobo>
I'm reading some howtos and tutorials
<knobo>
but when I come to the point where I'm going to write some code myself, I run in to some trouble
<knobo>
And to learn I have to write some code, or my head will implode
alx_ has quit [Client Quit]
postalchris has quit ["Leaving."]
<pango>
knobo: tell us more about those troubles then ;)
<knobo>
ok, I'm using Graphics library, and I whant to calculate the average of the color of tree pixles
<knobo>
or points
<knobo>
so I have to make a function that takes tree colors
<knobo>
then I pick the colors with point_color x y
<knobo>
and call the function
<knobo>
and the function looks something like:
mikeX has quit ["Lost terminal"]
<knobo>
let color_average col1 col2 col3 = ...
<knobo>
but probably I have to spesify the type some how
<knobo>
I have tried different things, but there is something realy basic which I have missed
<pango>
not necessarily
<Kzzch>
i'm pretty new myself, but if i understand some of what i read correctly, ocaml will infer the types
<Kzzch>
is that correct?
<pango>
yes, specially since rgb is just an alias for int ;)
<knobo>
so to access the color by col1.r, col1.b and col2.g?
<pango>
I mean since Graphics.color is an alias for int
<knobo>
aha, alias for int
<pango>
no, it seems there's a function to "synthetize" a color from its components (Graphics.rgb) but not the reverse
<knobo>
ok, so I have to do some binary parsing, then
<pango>
I suppose you should start by writing such function
<pango>
well, main integer divisions should do ;)
<pango>
s/main/plain/ (grr)
<knobo>
I'd like something like lisps ldb
<pango>
you should write to_rgb: color -> int * int * int
<pango>
you mean bitwise operations ? They're available in Pervasives (lsl, lsr,...)
<knobo>
Pervasives looks perfect
<pango>
even better, it's automatically linked to any ocaml program, so you have nothing to do before using it ;)
<knobo>
But let's say I would make a function and spesify the types. Do I write a separat type spesification or do it when I define the function
love-pingoo has joined #ocaml
<pango>
as you wish
<pango>
but some types need a name, so you're often forced to define them first
<pango>
that's not a bad idea anyway :)
<knobo>
and how? to_rgb: color -> int * int * int? like you wrote over, and for "inline" defenition?
<pango>
what type would you like to define here ? the type of the function itself will be inferred automatically
love-pingoo has quit [Client Quit]
<pango>
you could write let to_rgb c : color -> int * int * int = (* its definition here *) but that's not necessary
<knobo>
ok, now I have something to work with :)
<knobo>
thanx. Maybe I'll be back soon :)
<pango>
np
<knobo>
hmmm.. rgb 5 5 5 gives me Reference to undefined global `Graphics'
<pango>
if you haven't opened the Graphics module, you must prefix color, like in Graphics.color, to reference it
<pango>
the Graphics module must also be loaded or linked, that's two separate things
<pango>
(I mean opening and linking)
<knobo>
ok
<pango>
how are you running your code ? ocaml, ocamlc, ocamlopt ?
<knobo>
ocaml
<pango>
ok... so you must either start the toplevel with ocaml graphics.cma, or use the #load "graphics.cma" ;; directive to load the Graphics module
<knobo>
I found something about load... then I got: Unbound value load
dark_light has joined #ocaml
<pango>
I really meant the #
<pango>
it's an interpreter directive
bluestorm has joined #ocaml
<knobo>
Ah! finaly :)
<knobo>
thanx again
<knobo>
yes, finally
<pango>
then you can either prefix all symbols coming from this module with "Graphics.", or use "open Graphics ;;" once to import all the visible declarations of this module in your current namespace
<knobo>
rgb 0 0xff 0 lsr 8 ;; gives me 255 :) exactly as I predicted
<knobo>
infix operators ar realy strange :)
<knobo>
ar -> are
<knobo>
not realy
<pango>
well, if you're coming from lisp, probably :)
<pango>
you can use () around operators to make them prefix
<pango>
# (lsr) (rgb 0 0xff 0) 8 ;;
<pango>
- : int = 255
<knobo>
looks nice :)
<abez>
when can you call open?
<pango>
on top level only (not inside another definition or expression)
shawn has quit ["This computer has gone to sleep"]
bluestorm is now known as bluestorm_aw
<knobo>
how can I print things from ocaml ( toplevel, without compiling )
<ayrnieu>
that question doesn't make any sense.
romildo has joined #ocaml
<knobo>
ok, when I run interactive, things isnt printet before I quit
<pango>
that's ;; that triggers evaluation
<knobo>
with printf
<ayrnieu>
no, IO works just fine, interactively.
<knobo>
hmmm, when I do printf "foo" ;; nothing happens
<knobo>
when i press ^d
<knobo>
it's printed
<ayrnieu>
that works just fine, knobo.
<pango>
oh, probably need some flushing then.. flush (), printf "%!", ...
<ayrnieu>
you can print_newline () to be sure, sure.
<pango>
because print_newline () calls flush ()
<flux__>
pango, let foo bar : int -{ int = .. doesn't actually do what you intended?
<pango>
flux__: mmh ?
<knobo>
printf "value: %x%!" (lsr) 0xffff00 8 ;; does not work..
<knobo>
and, printf "value: %x%!" 0xffff00 lsr 8 ;; does not work
<knobo>
last one: This expression has type unit but is here used with type int