slipstream has quit [Read error: 110 (Connection timed out)]
screwt8 has quit [Remote closed the connection]
slack101 has joined #ocaml
<slack101>
about to make a daemon in ocaml
<slack101>
is thier an exec() command in ocaml ?
<Smerdyakov>
OCaml has no commands.
<slack101>
i didnt mean that
<slack101>
function
<Smerdyakov>
Have you looked at the standard library documentation?
<slack101>
Smerdyakov, downloading now
bzzbzz has quit ["leaving"]
slipstream has joined #ocaml
laynor has quit [Read error: 110 (Connection timed out)]
shawn has quit ["This computer has gone to sleep"]
pango_ has quit [Remote closed the connection]
slipstream-- has joined #ocaml
pango_ has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
slipstream-- has quit [anthony.freenode.net irc.freenode.net]
jlouis has quit [anthony.freenode.net irc.freenode.net]
Demitar has quit [anthony.freenode.net irc.freenode.net]
G has quit [anthony.freenode.net irc.freenode.net]
fluctus has quit [anthony.freenode.net irc.freenode.net]
slipstream-- has joined #ocaml
jlouis has joined #ocaml
Demitar has joined #ocaml
G has joined #ocaml
fluctus has joined #ocaml
pantsd has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
slipstream-- has joined #ocaml
shekmalh1n has joined #ocaml
shekmalh1n has quit ["dodo"]
slipstream-- has quit [Connection timed out]
buluca has quit [Read error: 113 (No route to host)]
screwt8 has joined #ocaml
ygrek has joined #ocaml
screwt8 has quit [Remote closed the connection]
screwt8 has joined #ocaml
ygrek_ has joined #ocaml
slipstream has joined #ocaml
test1234 has joined #ocaml
ygrek has quit [Remote closed the connection]
slipstream-- has joined #ocaml
slipstre1m-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
Lena has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
david_koontz has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
slipstre1m-- has quit [Read error: 110 (Connection timed out)]
thesoko has quit [Remote closed the connection]
thesoko has joined #ocaml
ZabaQ has joined #ocaml
<ZabaQ>
Is there a standard function to splice off the front of a string? Something like String.right name 4 - which returns name with the first 4 characters chopped off?
<ZabaQ>
(i can't find one in the reference manual).
<rwmjones>
no, but it's easy enough to write one
<rwmjones>
something like this ...
xavierbot has quit [Remote closed the connection]
xavierbot has joined #ocaml
<rwmjones>
let right str i = let n = String.length str in String.sub str i (n-i) ;;
<xavierbot>
val right : string -> int -> string = <fun>
<DB42>
as you can see, Arge.host_ip is the ip of the interface required, but Hsys.bind sock (Hsys.inet_any ()) port ; doesn't use that information
<DB42>
how do i tell bind to use that host_ip if it is defined and inet_any if not ?
<slack101>
wow that ocamlnet thing sure is a little network package huh
<slack101>
has al ittle bit of everything
<DB42>
anybody/
<DB42>
?
Ober has joined #ocaml
<DB42>
tell me if this is corret
<DB42>
i nede to replace "Hsys.bind sock (Hsys.inet_any ()) port ;" with "Hsys.bind sock addr port ;" ?
<DB42>
also what are .mli files ?
<pango_>
DB42: files containing a module interface
<slack101>
DB42, its really better to just wait till someone comes along then ask for help ;)
<slack101>
like now :P
<DB42>
there werre a few people taking
<DB42>
talking
<DB42>
ok
<DB42>
i've recompiled the code
<Smerdyakov>
slack101, you're wrong.
<DB42>
now it should work
<DB42>
i'll try it
<DB42>
would be cool if it works :)
<Smerdyakov>
slack101, people don't feel compelled to flood the channel with "I don't knows" if they really have no experience with the subject at hand.
<slack101>
true
<slack101>
how do memory leaks start / whats the best way to find them ?
love-pingoo has joined #ocaml
<Smerdyakov>
Do you understand what a memory leak is in a garbage-collected language?
<mbishop>
an outrage, that's what it is
<slack101>
never asked / never looked ;)
<Smerdyakov>
Then finding out is your first task.
<slack101>
i thought any language could leak
qwwqe has joined #ocaml
<Smerdyakov>
And you thought that without knowing what a memory leak is? Not very intellectually honest, eh?
<slack101>
lol
<DB42>
yey
<DB42>
i fixed the bug
<DB42>
wow, i'm proud of myself
<DB42>
a big projects with lots of dirs and files, and i managed to find te bug
<DB42>
and fix it :)
<slack101>
well im guessssing what it is .....in a language such as C where you set memory allocations etc that you mess up and either dont free something or ya
<Smerdyakov>
OCaml has no freeing, so obviously a definition based on "not freeing" won't work here.
<slack101>
hmm
<slack101>
can you access memory in ocaml ?
<DB42>
not nullifing references
<DB42>
so the gc thinks you still need it
<DB42>
so doesn't free it
<Smerdyakov>
Idiomatic OCaml programmers have no "nullification of references," either.
<Smerdyakov>
s/programmers/programs
<slack101>
can you do memory allocation manually without the garbage collector ?
<Smerdyakov>
I and many others try to avoid imperative code wherever possible.
<Smerdyakov>
And "nullification" sounds imperative to me.
<Smerdyakov>
slack101, no.
<Smerdyakov>
slack101, the answer is really "yes" because you have a C FFI, but that's probably not the kind of answer you want.
<slack101>
soo all memory stuff has to be done automatically ?
<slack101>
through the GC ?
<Smerdyakov>
Yes, and the language semantics doesn't require you to think about things like "memory."
<slack101>
i see
<slack101>
how accurate is the GC ?
<slack101>
/well does it handle memory
<Smerdyakov>
Read a survey paper on garbage collectors and you'll begin to be able to understand an accurate answer to that.
<DB42>
well
<DB42>
going to sleep
<DB42>
good night all
<DB42>
and thanks for the moral support ?
<DB42>
i'm submitting the bug fix to the author now
<slack101>
Smerdyakov, i was lookign for a it does a swell job compared to blah blah
<DB42>
after verifing it works
DB42 has quit []
<Smerdyakov>
slack101, I have no such simple answers for you. Almost all garbage collectors are based on simple heap structure reachability, though.
<slack101>
i see
<mbishop>
ocaml's garbage collector is generational, right?
<slack101>
i havent really looked into anything like that its there so i use it
<mbishop>
that's the only collection scheme that ever made sense to me
<pango_>
mbishop: yes, 2 generations
* Ober
cracks the ocaml book for his first script.
<slack101>
if anyone cares i did use ocaml on a pretty big project, Insurace company
<slack101>
typo
<slack101>
insurance *
jeremiah has joined #ocaml
ygrek has quit []
<slack101>
boss liked the language and will donate 30 percent of restituon money to the ocaml project
<slack101>
rougly 20-30 k ish
<Smerdyakov>
"restituon"?
<Smerdyakov>
And does the project accept donations?
<slack101>
oh it doesnt ?
<Smerdyakov>
It's a question.
<slack101>
i will tell him that
<slack101>
o
<Smerdyakov>
You'll tell him that I asked a question?
<slack101>
lol dude
<slack101>
back off dude seriously
<slack101>
i havent said one word to you and you act like what we call a champeye
<slack101>
its hot to be in a bad mood
<Smerdyakov>
No, you're being confusing, and I'm trying to get this conversation back into making sense.
<Smerdyakov>
I don't know what the status of OCaml is re: donations.
<slack101>
99.99999 percent of open srouce projects accept some kind of donations
<Smerdyakov>
But the project is largely a _research_ project. Licensing doesn't give arbitrary open source dogooders a way to contribute directly.
<rwmjones_>
slack101 is that troll from a few weeks back - I think he was calling himself slacker403
<Smerdyakov>
OCaml is a project of a French national research lab, funded by the government.
<Smerdyakov>
(the French government)
<slack101>
i did not know it was directly funded by the french ogvernment
<Smerdyakov>
It's far from clear to me that there is any avenue for donations to a team of PhDs.
<pango_>
rwmjones: and many more nicks before that ;)
<Smerdyakov>
By the way, this is one reason why I bet against OCaml in the long run. Bad social arrangement.
<slack101>
lol
<slack101>
im out
<slack101>
rwmjones, you argued speed did not matter REMEMBER ?
<rwmjones_>
Smerdyakov, you may be right about that, but remember that it's open source so could be forked if for instance they decided to stop developing
<slack101>
i siad it did i still used it and it worked
<rwmjones_>
s/developing/developing it/ (where did that final word go?)
<Smerdyakov>
rwmjones, but if they keep developing for decades but keep making choices favoring papers instead of products, then that's unlikely to happen.
<slack101>
Irc has and always will never changed rude people
<rwmjones_>
Smerdyakov, that is also a danger .. it's not happening too much at the moment though
<Smerdyakov>
slack101, learn English, please.
<slack101>
where you live ?
<Smerdyakov>
Question marks never have spaces before them in English.
<slack101>
i will ask again where you from ?
<Smerdyakov>
That's very easy for you to determine for yourself, and I don't want to talk to you, so I leave that detective work as your sole option.
<slack101>
lol
<rwmjones_>
heh heh, get your mom to send the legal letters to Jane St :-)
<Ober>
good to seek slack101 trolls here too... :(
<slack101>
its ridiculous
<rwmjones_>
you can send ones to me c/o Red Hat :-)
<slack101>
i love how non native english speakers love to correct your english
<slack101>
and if it matters I live in Miami Florida a city in south eastern usa
gene9 has joined #ocaml
<Ober>
slack101: cubano?
<slack101>
no
<Ober>
that explains why you troll ##c too... #si
<slack101>
i dont NOT troll in ##c
<slack101>
lol
<slack101>
me and Zhivango just dont get along
jeremiah has left #ocaml []
<slack101>
its a personal thing and he makes it a channel one
<slack101>
Ober, 2ndly theres no cubans in miami just americans , maybe americans of cuban heritage but never does someone classify themself as cubano
<slack101>
but to play devils advocate about 60 percent of miami is of cuban decent
<mbishop>
Wait, you mean ##C has another use other than to troll?
<Ober>
nahh just this same guy getting banned for intolerance :P
<slack101>
no
<slack101>
god man
<slack101>
you dont know Zhivango i do
<rwmjones_>
xavierbot, please restart yourself
<xavierbot>
Objective Caml version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<rwmjones_>
Random.int;;
<xavierbot>
- : int -> int = <fun>
<mbishop>
I usually just go in ##C and ask them why C sucks
<rwmjones_>
Random.int 100;;
<xavierbot>
- : int = 34
<rwmjones_>
good ...
<mbishop>
but in a discreete manner
<rwmjones_>
Random.float 1234.;;
<xavierbot>
- : float = 1019.30075834609124
<mbishop>
Random.self_init();;
<xavierbot>
- : unit = ()
<mbishop>
Random.int();;
<xavierbot>
Characters 11-13:
<xavierbot>
Random.int();;
<xavierbot>
^^
<xavierbot>
This expression has type unit but is here used with type int
<mbishop>
whoops heh
<mbishop>
Random.int;;
<xavierbot>
- : int -> int = <fun>
* rwmjones_
considers offering a prize to the first person to find an exploit
<mbishop>
Random.int 100;;
<xavierbot>
- : int = 60
<rwmjones_>
Random.int 100;;
<xavierbot>
- : int = 57
<mbishop>
Random.int 10000000;;
<xavierbot>
- : int = 3838629
<pango_>
rwmjones: did you add other modules beside Random ?
<rwmjones_>
no, just Random
<rwmjones_>
I think the version on the website is up to date apart from that single addition
<mbishop>
List.iter print_endline [1; 2; 3];;
<xavierbot>
Characters 26-27:
<xavierbot>
List.iter print_endline [1; 2; 3];;
<xavierbot>
^
<xavierbot>
This expression has type int but is here used with type string
<slack101>
anyways to hot ot be inside and Ober i do not troll in C as i said that dude and me dont get along from way back
<pango_>
Interesting. I didn't know about Random.State
<rwmjones_>
it's a functor -- never used it though
<Ober>
slack101: aja chupabicho
<slack101>
speak spanish ?
<slack101>
corvoavoduane ?
<pango_>
rwmjones: doesn't look like a functor, just a plain module
<pango_>
I could have used it to make some multithreaded benchmark a bit more deterministic
* rwmjones_
looks again
<slack101>
Ober, guess not
<rwmjones_>
pango_, oh yes, you're right :-)
<slack101>
threads look like of iffy in ocaml
Mr_Awesome has joined #ocaml
<pango_>
Xavier Leroy wrote the first version of LinuxThreads, that must be the reason ;)
tty56_ has quit [Read error: 110 (Connection timed out)]
gene9 has quit ["Meritocracy"]
kelaouchi has joined #ocaml
buluca has quit [Remote closed the connection]
buluca has joined #ocaml
<leo037>
1;;
<xavierbot>
- : int = 1
<leo037>
:)
love-pingoo has quit ["Connection reset by pear"]
<mbishop>
~1;;
<xavierbot>
- : int = 1
<mbishop>
heh
<mbishop>
-1;;
<xavierbot>
- : int = -1
<Smerdyakov>
0 / 0;;
<xavierbot>
Exception: Division_by_zero.
<Smerdyakov>
0.0 / 0.0;;
<xavierbot>
Characters 1-4:
<xavierbot>
0.0 / 0.0;;
<xavierbot>
^^^
<xavierbot>
This expression has type float but is here used with type int
<Smerdyakov>
0.0 /. 0.0;;
<xavierbot>
- : float = nan
<leo037>
1;;2
leo037 has quit ["Leaving"]
<rwmjones_>
1-2;;
<xavierbot>
- : int = -1
test1234 has quit [Read error: 110 (Connection timed out)]
<noteventime>
This may be a ridiculous question, but I keep getting "Reference to undefined global `Sdl'". I include the Sdl module in the beginning of the file, and sdl.mli e.t.c. seem to exist in /usr/lib/ocaml (where the compiler should be able to find them, shouldn't it?) Is there something else I have to do
<noteventime>
I'm still very new to OCaml
<Smerdyakov>
Do you understand the difference between header files and libraries in C?
<noteventime>
Yes
<Smerdyakov>
Here you are doing the equivalent of including the header without linking the library.
<noteventime>
Same thing like .ml and .mli?
<Smerdyakov>
No.
<noteventime>
Ok
<noteventime>
Only header source?
<noteventime>
I link it to the CMO?
<Smerdyakov>
Well, maybe "same thing like .ml and .mli" is accurate here.
<Smerdyakov>
You need to link with the .cma or .cmxa file, if it's a library.
<noteventime>
Ohh
<noteventime>
Can I do that in one compiler call, or do I have to compile my files and then link?
<Smerdyakov>
Either works.
<noteventime>
Do I need to know if the library was compiled with ocamlopts or ocamlc?
<Smerdyakov>
Yes. You can never combine code compiled with different of those two.
<noteventime>
I wasn't sure if the libraries always were stored as bytecode or not
<Smerdyakov>
At this point I'm thinking you should be reading the manual on the basic compilation tools.
<noteventime>
Yea
<noteventime>
Was just that everything was going so well this far :-)
<noteventime>
Thanks for the help
smimram has quit ["bli"]
<slack101>
anyone here have experince with threads and ocaml ?
<pango_>
a bit
<slack101>
well i answered my own question
<slack101>
:P
pattern has quit [anthony.freenode.net irc.freenode.net]
cmeme has quit [anthony.freenode.net irc.freenode.net]
Hadaka has quit [anthony.freenode.net irc.freenode.net]
pattern has joined #ocaml
<slack101>
i was wondering if unix/windows compatibilit ywas good
Mr_Awesome has quit [anthony.freenode.net irc.freenode.net]
slipstream has quit [anthony.freenode.net irc.freenode.net]
fluctus has quit [anthony.freenode.net irc.freenode.net]
bluestorm has quit [anthony.freenode.net irc.freenode.net]
G has quit [anthony.freenode.net irc.freenode.net]
Demitar has quit [anthony.freenode.net irc.freenode.net]
flux has quit [anthony.freenode.net irc.freenode.net]
ppsmimou has quit [anthony.freenode.net irc.freenode.net]
ulfdoz has quit [anthony.freenode.net irc.freenode.net]
kelaouchi has quit [anthony.freenode.net irc.freenode.net]
rwmjones_ has quit [anthony.freenode.net irc.freenode.net]
oracle1 has quit [anthony.freenode.net irc.freenode.net]
z__z has quit [anthony.freenode.net irc.freenode.net]
slack101 has quit [anthony.freenode.net irc.freenode.net]
fean has quit [anthony.freenode.net irc.freenode.net]
mnemonic has quit [anthony.freenode.net irc.freenode.net]
shawn has quit [anthony.freenode.net irc.freenode.net]
kosmikus has quit [anthony.freenode.net irc.freenode.net]
tty56 has quit [anthony.freenode.net irc.freenode.net]
jlouis has quit [anthony.freenode.net irc.freenode.net]
xavierbot has quit [anthony.freenode.net irc.freenode.net]
Ycros has quit [anthony.freenode.net irc.freenode.net]
Oatmeat|umn has quit [anthony.freenode.net irc.freenode.net]
TaXules has quit [anthony.freenode.net irc.freenode.net]
lucca has quit [anthony.freenode.net irc.freenode.net]
scode has quit [anthony.freenode.net irc.freenode.net]
svenl has quit [anthony.freenode.net irc.freenode.net]
ramkrsna has quit [anthony.freenode.net irc.freenode.net]
zmdkrbou has quit [anthony.freenode.net irc.freenode.net]
Ober has quit [anthony.freenode.net irc.freenode.net]
gim has quit [anthony.freenode.net irc.freenode.net]
Gabriell has quit [anthony.freenode.net irc.freenode.net]
thesoko has quit [anthony.freenode.net irc.freenode.net]
pango_ has quit [anthony.freenode.net irc.freenode.net]
smimou has quit [anthony.freenode.net irc.freenode.net]
tsuyoshi has quit [anthony.freenode.net irc.freenode.net]
mattam has quit [anthony.freenode.net irc.freenode.net]
bebui has quit [anthony.freenode.net irc.freenode.net]
haelix has quit [anthony.freenode.net irc.freenode.net]
lde has quit [anthony.freenode.net irc.freenode.net]
screwt8 has quit [anthony.freenode.net irc.freenode.net]
Amorphous has quit [anthony.freenode.net irc.freenode.net]
pattern has quit [anthony.freenode.net irc.freenode.net]
buluca has quit [anthony.freenode.net irc.freenode.net]
descender has quit [anthony.freenode.net irc.freenode.net]
Smerdyakov has quit [anthony.freenode.net irc.freenode.net]
gunark has quit [anthony.freenode.net irc.freenode.net]
Submarine has quit [anthony.freenode.net irc.freenode.net]
pantsd has quit [anthony.freenode.net irc.freenode.net]
noteventime has quit [anthony.freenode.net irc.freenode.net]
qwwqe has quit [anthony.freenode.net irc.freenode.net]
rwmjones has quit [anthony.freenode.net irc.freenode.net]
mbishop has quit [anthony.freenode.net irc.freenode.net]
vorago has quit [anthony.freenode.net irc.freenode.net]
joshcryer has quit [anthony.freenode.net irc.freenode.net]
Hadaka has joined #ocaml
scode has joined #ocaml
cmeme has joined #ocaml
Gabriell has joined #ocaml
pattern has joined #ocaml
buluca has joined #ocaml
Mr_Awesome has joined #ocaml
tty56 has joined #ocaml
qwwqe has joined #ocaml
Ober has joined #ocaml
descender has joined #ocaml
Smerdyakov has joined #ocaml
gunark has joined #ocaml
Submarine has joined #ocaml
jlouis has joined #ocaml
pantsd has joined #ocaml
slipstream has joined #ocaml
pango_ has joined #ocaml
smimou has joined #ocaml
thesoko has joined #ocaml
noteventime has joined #ocaml
bluestorm has joined #ocaml
xavierbot has joined #ocaml
screwt8 has joined #ocaml
fluctus has joined #ocaml
G has joined #ocaml
Demitar has joined #ocaml
joshcryer has joined #ocaml
mbishop has joined #ocaml
rwmjones has joined #ocaml
vorago has joined #ocaml
gim has joined #ocaml
zmdkrbou has joined #ocaml
Ycros has joined #ocaml
ramkrsna has joined #ocaml
haelix has joined #ocaml
lde has joined #ocaml
svenl has joined #ocaml
mattam has joined #ocaml
lucca has joined #ocaml
Oatmeat|umn has joined #ocaml
TaXules has joined #ocaml
bebui has joined #ocaml
tsuyoshi has joined #ocaml
Amorphous has joined #ocaml
zmdkrbou_ has joined #ocaml
kelaouchi has joined #ocaml
rwmjones_ has joined #ocaml
shawn has joined #ocaml
slack101 has joined #ocaml
mnemonic has joined #ocaml
kosmikus has joined #ocaml
flux has joined #ocaml
ppsmimou has joined #ocaml
z__z has joined #ocaml
oracle1 has joined #ocaml
fean has joined #ocaml
ulfdoz has joined #ocaml
TaXules has quit [Remote closed the connection]
Gabriell_ has joined #ocaml
Gabriell has quit [Read error: 104 (Connection reset by peer)]
tty56 has quit [Remote closed the connection]
tty56 has joined #ocaml
<rwmjones_>
noteventime, what is glcaml?
<noteventime>
OpenGL bindings for OCaml
<rwmjones_>
so it's same or different from ocaml lablgl?
<rwmjones_>
(which I have used ....)
<noteventime>
glcaml supports OpenGL up to version 2.1
<noteventime>
I think lablgl only goes up to 1.2
<noteventime>
And (according to the author of glcaml) lablgl is no longer maintained
<noteventime>
Oh
<rwmjones_>
hmmm
<noteventime>
No, skip that last thing :-)
<noteventime>
Confused it with another binding
xavierbot has quit [Read error: 110 (Connection timed out)]
<noteventime>
The real reason for me using it was that it was the first one I found when searching
<rwmjones_>
in that case I don't know ... lablgl seems to be better supported, but ...