foxen has quit [orwell.freenode.net irc.freenode.net]
mrvn has quit [orwell.freenode.net irc.freenode.net]
mellum has quit [orwell.freenode.net irc.freenode.net]
wax has quit [orwell.freenode.net irc.freenode.net]
rox has quit [orwell.freenode.net irc.freenode.net]
cm has quit [orwell.freenode.net irc.freenode.net]
vect has quit [orwell.freenode.net irc.freenode.net]
asqui has quit [orwell.freenode.net irc.freenode.net]
vect has joined #ocaml
foxen has joined #ocaml
cm has joined #ocaml
mrvn has joined #ocaml
mellum has joined #ocaml
wax has joined #ocaml
asqui has joined #ocaml
rox has joined #ocaml
brwill has joined #ocaml
docelic has joined #ocaml
docelic has quit [Connection reset by peer]
palomer has quit [orwell.freenode.net irc.freenode.net]
phubuh has quit [orwell.freenode.net irc.freenode.net]
mattam has quit [orwell.freenode.net irc.freenode.net]
Smerdyakov has quit [orwell.freenode.net irc.freenode.net]
skylan has quit [orwell.freenode.net irc.freenode.net]
brwill has quit [orwell.freenode.net irc.freenode.net]
vect has quit [orwell.freenode.net irc.freenode.net]
asqui has quit [orwell.freenode.net irc.freenode.net]
wax has quit [orwell.freenode.net irc.freenode.net]
mellum has quit [orwell.freenode.net irc.freenode.net]
mrvn has quit [orwell.freenode.net irc.freenode.net]
cm has quit [orwell.freenode.net irc.freenode.net]
foxen has quit [orwell.freenode.net irc.freenode.net]
rox has quit [orwell.freenode.net irc.freenode.net]
liyang has quit [orwell.freenode.net irc.freenode.net]
karryall has quit [orwell.freenode.net irc.freenode.net]
systems has quit [orwell.freenode.net irc.freenode.net]
Khortl has quit [orwell.freenode.net irc.freenode.net]
vect has joined #ocaml
brwill has joined #ocaml
rox has joined #ocaml
asqui has joined #ocaml
wax has joined #ocaml
mellum has joined #ocaml
mrvn has joined #ocaml
cm has joined #ocaml
foxen has joined #ocaml
systems has joined #ocaml
karryall has joined #ocaml
phubuh has joined #ocaml
mattam has joined #ocaml
palomer has joined #ocaml
Smerdyakov has joined #ocaml
skylan has joined #ocaml
Khortl has joined #ocaml
liyang has joined #ocaml
taw has joined #ocaml
systems has quit ["Client Exiting"]
brwill is now known as brwill|zzz
foxen has quit [Client Quit]
foxster has joined #ocaml
baader has joined #ocaml
<baader>
# let ar = [| |] ;;
<baader>
val ar : 'a array = [||]
<baader>
# let ls = [ ] ;;
<baader>
val ar : 'a array = [||]
<baader>
# ?
<baader>
erm
<baader>
what's the distinction between list and array in ocaml ?
<baader>
# val ls : 'a list = []
<baader>
nm, i've made a mistake, apparently
polin8 has joined #ocaml
<mrvn>
[ ( expr (; expr )* (;)) ] is a list
<mrvn>
[| ( expr (; expr )* (;)) |] is an array
<mrvn>
[< ( expr (; expr )* (;)) >] is a stream (or something like that)
<mrvn>
is [{ }] used?
<baader>
i wouldn't know, i'm having trouble doing the most basic things
<mrvn>
keep asking
foxster has quit [Client Quit]
<baader>
this is so embarassing, i'm trying to do something very very basic
<baader>
reading a file into memory and printing it out afterwards, line-by-line
<baader>
i'm already getting confused about how to store the lines i've read from the file
<baader>
ie. in a list ? in an array ?
<Smerdyakov>
If you are just learning functional programming, IO is not a good subject to be handling yet.
<baader>
i've a small program now, but it took ages
<mrvn>
let rec loop accu = match (try Some (input_line ()) with End_of_file -> None) with None -> List.rev accu | Some s -> loop (s::accu)
<mrvn>
(ofhand, untested)
* baader
wanders off laughing
<baader>
brb gonna make coffee
<baader>
ok
<baader>
well, why is IO such a big deal w/ functional languages ?
<Smerdyakov>
IO is not a big deal with OCaml precisely because it's not a pure functional language. :-)
<Smerdyakov>
And that's why you should focus on learning idioms and methods that are unique to functional programming without worrying about grungy IO, for the time being.
<baader>
hmhm
<baader>
i know you recommended learing haskell earlier when i was here, however even tho ocaml is not purely functional i should (in theory) be able to do the same things with it that i could do with haskell
<Smerdyakov>
I'm not sure what you mean. How do you determine "what things you can do" with a language?
<mrvn>
You test for turing completness.
foxster has joined #ocaml
<baader>
for example i regard C and C++ as more or less all purpose languages
<baader>
even tho i'm aware that some specific tasks may be a pain in the ass if you're trying to do them in C
<mrvn>
Asm, c, c++, obj-c, java. all the same
<mrvn>
All imperative (with OO features for some)
<baader>
yes i know
<mrvn>
and probably all turing complete
<mrvn>
same as pretty much any other language you come accross.
<mrvn>
Because if its not turing complete its pretty useless
<baader>
currently i sort of fail to see what gives functional languages 'the edge' over imperative languages
<baader>
unless perhaps i'm trying to hand-code what i could do w/ mathlab
<mrvn>
baader: since you can simulate a turing maschine in both equally well nothing.
<mrvn>
They are equally powerfull, they can compute anything thats computable.
<mrvn>
Its just a question how much pain it is to implement something
<baader>
right, then why do you use haskell or whatever flavour of functional language ?
<mrvn>
And a question of how many bugs you end up with
<baader>
hm yes, that was one of the reasons i was considering to learn a functional language
<mrvn>
If you write something in ocaml you end up with fixing compiler errors and once it compiles it usually works. In C/C++ you only get a few errors but then it segfaults or has undefined behaviour.
<baader>
exactly, that is definitely why C/C++ have started to turn me off
<phubuh>
<mrvn> baader: since you can simulate a turing maschine in both equally well nothing.
<mrvn>
so for "a=b" ocaml deduces that a and b must have the same type which isn't true.
<baader>
yes, i can see that now
<baader>
ok
<mrvn>
You can't compare things of different types.
<baader>
any, enough now, been up all nite
<mrvn>
You have to learn that there is no assignment with "=" in ocaml. Takes a while to get used to "let a = b" or a := b or a <- b depending on the types.
<baader>
yep
<baader>
well, i'm learning :p
<mrvn>
I have a meeting in 6 hours and am thinking of going to be too. But its 9:30 am here.
lightstep has joined #ocaml
<baader>
hm, well don't be late at the meeting
<lightstep>
is this a good place to ask questions about oc.tar.gz?
<baader>
yes
<lightstep>
i try to compile hanoi\grahanoi-eng.ml (i use windows), and i get an error "The external function `gr_clear_graph' is not available"
<lightstep>
the other hanoi programs, as well as all the programs in the basics directory, compile well
<baader>
uh dunno
<baader>
i'm on linux and it did compile w/o problems
<lightstep>
i also tried to compile showsort, but ocamlc complained that it doesn't know of the global 'Graphics'
<mellum>
probably that module does not exist on Windows
<mellum>
Try using an X based system.
<lightstep>
the thing is, i have graphics.cma, .cmi, .cmx, .cmxa and .lib in my ocaml lib directory
<mrvn>
Graphics should exist, GraphicsX not.
<mrvn>
lightstep: do you link them in?
<lightstep>
ummm... no
<lightstep>
i don't know what file i should link with. i don't have a .cmo
<lightstep>
if i link with the .cma or the .lib file, ocamlc agrees to accept it, but still complains "Error while linking showsort.cmo: Reference to undefined global `Graphics'"
<lightstep>
and about grahanoi-eng.ml - i checked in the OCamlBrowser, and the graphics module does not contain a gr_clear_graph function
<karryall>
lightstep: you're probably linking in the wrong order
palomer has quit [orwell.freenode.net irc.freenode.net]
taw has quit [orwell.freenode.net irc.freenode.net]
mattam has quit [orwell.freenode.net irc.freenode.net]
phubuh has quit [orwell.freenode.net irc.freenode.net]
Smerdyakov has quit [orwell.freenode.net irc.freenode.net]
skylan has quit [orwell.freenode.net irc.freenode.net]
foxen has quit [orwell.freenode.net irc.freenode.net]
vect has quit [orwell.freenode.net irc.freenode.net]
cm has quit [orwell.freenode.net irc.freenode.net]
mrvn has quit [orwell.freenode.net irc.freenode.net]
mellum has quit [orwell.freenode.net irc.freenode.net]
wax has quit [orwell.freenode.net irc.freenode.net]
asqui has quit [orwell.freenode.net irc.freenode.net]
rox has quit [orwell.freenode.net irc.freenode.net]
brwill|zzz has quit [orwell.freenode.net irc.freenode.net]
lightstep has quit [orwell.freenode.net irc.freenode.net]
liyang has quit [orwell.freenode.net irc.freenode.net]
karryall has quit [orwell.freenode.net irc.freenode.net]
Khortl has quit [orwell.freenode.net irc.freenode.net]
vect has joined #ocaml
palomer has joined #ocaml
skylan has joined #ocaml
Smerdyakov has joined #ocaml
mattam has joined #ocaml
phubuh has joined #ocaml
taw has joined #ocaml
liyang has joined #ocaml
Khortl has joined #ocaml
karryall has joined #ocaml
cm has joined #ocaml
mrvn has joined #ocaml
mellum has joined #ocaml
wax has joined #ocaml
asqui has joined #ocaml
rox has joined #ocaml
brwill|zzz has joined #ocaml
foxen has joined #ocaml
lightstep has joined #ocaml
<lightstep>
i have another question, about a program i wrote and tried to compile. it is a few lines, and i get a syntax error on the last two semicolons: http://nopaste.snit.ch:8001/11 . what is my error?
<karryall>
missing 'done' for the for
<karryall>
and you don't need the ;; for compiled programs
<baader>
you don't ? oh
<karryall>
no, it's only needed for the toplevel
<baader>
i see
<mrvn>
And you can't do stuff like 'print_string "Hello World\n";;' in compiled programs, you have to allways bind it to something (like 'let _ = print_string "Hello World!\n"')
<lightstep>
what?
<mrvn>
Oh wait, actually you can.
<lightstep>
there are lots of compiled programs that don't bind the results of printing operatioons
<lightstep>
anyway, programs compile well with ;; in the end, but i really didn't notice that missing done
<mrvn>
hmm, somehow I used to get compiler errors when using just print_string "Hello World!\n";; without any let
<mrvn>
Aren#t there cases where ;; gives an error when compiled but not in the toplevel?
<karryall>
mrvn: yes if you didn't end the previous structure element with a ;;
<karryall>
example : let foo m = print_string m print_string "hello" ;;
<mrvn>
like let a = 17 print_string "Hello World!\n";;
<karryall>
gets an error
<mrvn>
?
<karryall>
let foo m = print_string m ;; print_string "hello" ;;
<karryall>
no error
<mrvn>
karryall: But the above allways gets an error.
<karryall>
yes
<lightstep>
karryall, you need one semicolon between the two prints
<lightstep>
if you want to group them to the same block, like (begin ...) in scheme
<mrvn>
lightstep: with one ; its a sequence.
<lightstep>
yeah, that's what i meant
<mrvn>
and begin ... end is just glorified () :)
<mrvn>
Has better font colorings so I prefer them.
<mrvn>
# begin 1, 2 end;;
<mrvn>
- : int * int = (1, 2)
<mrvn>
:)
<mrvn>
Even works for tuples.
two-face has joined #ocaml
<lightstep>
by the way, why do while and for need a done in the end? why isn't it like pascal?
<mrvn>
Its a do done pair.
<mrvn>
It could just do one expression like C does without {} but then you would need a begin...end block most of the time.
<lightstep>
i mean, between the do and the done, you are only allowed to have one expression, no?
<lightstep>
you can't write loop do 1 2 done or something like that
<mrvn>
lightstep: no, but without the done you would have problems defining the end of a for.
palomer has quit [orwell.freenode.net irc.freenode.net]
taw has quit [orwell.freenode.net irc.freenode.net]
Smerdyakov has quit [orwell.freenode.net irc.freenode.net]
mattam has quit [orwell.freenode.net irc.freenode.net]
phubuh has quit [orwell.freenode.net irc.freenode.net]
skylan has quit [orwell.freenode.net irc.freenode.net]
foxen has quit [orwell.freenode.net irc.freenode.net]
brwill|zzz has quit [orwell.freenode.net irc.freenode.net]
asqui has quit [orwell.freenode.net irc.freenode.net]
mellum has quit [orwell.freenode.net irc.freenode.net]
cm has quit [orwell.freenode.net irc.freenode.net]
rox has quit [orwell.freenode.net irc.freenode.net]
mrvn has quit [orwell.freenode.net irc.freenode.net]
wax has quit [orwell.freenode.net irc.freenode.net]
vect has quit [orwell.freenode.net irc.freenode.net]
lightstep has quit [orwell.freenode.net irc.freenode.net]
liyang has quit [orwell.freenode.net irc.freenode.net]
karryall has quit [orwell.freenode.net irc.freenode.net]
Khortl has quit [orwell.freenode.net irc.freenode.net]
vect has joined #ocaml
lightstep has joined #ocaml
foxen has joined #ocaml
brwill|zzz has joined #ocaml
rox has joined #ocaml
asqui has joined #ocaml
wax has joined #ocaml
mellum has joined #ocaml
mrvn has joined #ocaml
cm has joined #ocaml
karryall has joined #ocaml
liyang has joined #ocaml
Khortl has joined #ocaml
<lightstep>
can't te parser figure it out by finding the end of an expression?
taw has joined #ocaml
phubuh has joined #ocaml
mattam has joined #ocaml
Smerdyakov has joined #ocaml
skylan has joined #ocaml
<lightstep>
or it isn't possible?
<mrvn>
Its would eigther be multiple expressions like let has (which would be more obvious) but then you need to add () around every for or just have one expression and then you need () inside the for if you have more than one expression.
<lightstep>
oh, okay. thanks for all the help, i need to go now
lightstep has quit []
palomer has joined #ocaml
docelic has joined #ocaml
CybeRDukE has joined #ocaml
docelic has quit ["later"]
mrvn has quit [orwell.freenode.net irc.freenode.net]
wax has quit [orwell.freenode.net irc.freenode.net]
mellum has quit [orwell.freenode.net irc.freenode.net]
cm has quit [orwell.freenode.net irc.freenode.net]
vect has quit [orwell.freenode.net irc.freenode.net]
asqui has quit [orwell.freenode.net irc.freenode.net]
foxen has quit [orwell.freenode.net irc.freenode.net]
rox has quit [orwell.freenode.net irc.freenode.net]
brwill|zzz has quit [orwell.freenode.net irc.freenode.net]
palomer has quit [orwell.freenode.net irc.freenode.net]
CybeRDukE has quit [orwell.freenode.net irc.freenode.net]
liyang has quit [orwell.freenode.net irc.freenode.net]
karryall has quit [orwell.freenode.net irc.freenode.net]
Khortl has quit [orwell.freenode.net irc.freenode.net]
liyang has joined #ocaml
Khortl has joined #ocaml
karryall has joined #ocaml
palomer has joined #ocaml
vect has joined #ocaml
foxen has joined #ocaml
brwill|zzz has joined #ocaml
cm has joined #ocaml
mrvn has joined #ocaml
mellum has joined #ocaml
wax has joined #ocaml
asqui has joined #ocaml
rox has joined #ocaml
two-face has quit [Read error: 110 (Connection timed out)]
docelic has joined #ocaml
mattam has quit [orwell.freenode.net irc.freenode.net]
phubuh has quit [orwell.freenode.net irc.freenode.net]
taw has quit [orwell.freenode.net irc.freenode.net]
Smerdyakov has quit [orwell.freenode.net irc.freenode.net]
skylan has quit [orwell.freenode.net irc.freenode.net]
taw has joined #ocaml
phubuh has joined #ocaml
mattam has joined #ocaml
Smerdyakov has joined #ocaml
skylan has joined #ocaml
skylan has quit [Success]
docelic has quit ["Client Exiting"]
ragzter has joined #ocaml
foxen has quit [Client Quit]
det has joined #ocaml
docelic has joined #ocaml
two-face has joined #ocaml
<two-face>
hi
docelic has quit ["Client Exiting"]
owll has joined #ocaml
<vect>
hu ? i'm op ?
<vect>
mh
<two-face>
:)
<vect>
visiblement le canal n'etait plus enregistre
<vect>
salut two-face, pnou te cherchait
<two-face>
il m'a envoyé un mail
<two-face>
merci
<vect>
ok
<two-face>
c calme ici
<vect>
ca doit etre a cause de la chaleur
<two-face>
j'ai la clim ici :)
<vect>
pfff, moi je suis sous les velux :)
<two-face>
ouch
<vect>
'doit faire 40
<two-face>
tu dois transpirer :)
<vect>
a grosses gouttes, c'est horrible
<two-face>
hihi
<two-face>
tu fais de l'ocaml ?
<vect>
disons que j'en fais plus depuis quelques mois
<two-face>
ah ?
<vect>
je n'ai pas vraiment eu l'opportunite
<vect>
/nick gl
<vect>
c'est peut-etre pour ca que tu demandes :)
<two-face>
ah oui
<vect>
j'ai fait un compilateur dans le cadre de la maitrise, mais depuis, silence radio
<two-face>
tu n'as pas de projet perso ?
<vect>
non.. manque de motivation probablement.. et puis si je suis en train de me mettre a la xlib, et un peu a l'assembleur, la
<vect>
(x86)
<two-face>
ok
<vect>
en fait, ce qui me manque vraiment, ca doit etre l'idee, puisque je ne me suis pas vraiment pose la question
<two-face>
j'imagine
<vect>
two-face et toi ? sur Epeire ?
<mrvn>
What he says?
<vect>
who ?
asqui has quit ["Now I am gone..."]
<mrvn>
you two french speaking people.
<two-face>
vect pas exactement
<two-face>
mrvn sorry for this
<mrvn>
np
<two-face>
vect : I have a project which is stalled called 'camelot', on savannah
<mrvn>
Just means you won't get any help from me.
<mrvn>
s/help/snipy comments/
<two-face>
we can switch to english, but this channel was so silent that we felt alone, so ..
<mrvn>
you never are. THEY are allways listening .)
<two-face>
heh
<two-face>
mrvn what's your ongoing ocaml hacking project ?
<mrvn>
two-face: a F2F protocol/server/client-gui
<mrvn>
(Friend 2 Friend)
<two-face>
friend 2 friend ? perr to peer ?
<taw>
hey, let people invent new buzzwords ;)
<taw>
they don't need to mean anything new
<mrvn>
P2P but with public/private key auth so only friends can conect and noone can listen.
<two-face>
ah!
<mrvn>
Thus making file sharing legal cause your allowed to share with friends if they ask you.
<mattam>
clever
<taw>
well
<taw>
not really ;)
<two-face>
mrvn do you get inspired by mldonky?
<mattam>
at least from a legal pov
<mrvn>
taw: yes really.
<taw>
you can't just make 100 copies of cd and give it to all your friends
<taw>
that's not really legal
<mrvn>
two-face: not so much.
<mrvn>
taw: if you have 100 friends and they all ask you for it by themself you probably still can.
<taw>
the court isn't likely to buy that argument
<two-face>
mrvn encryption is going to slow things down
<mrvn>
Do you realy have 100 friends?
<mrvn>
two-face: not realy. Only for people with 100 Mbit+
<two-face>
mrvn really?
<taw>
mrvn: if you count - friend = person i know then sure
<mrvn>
two-face: I was thinking about sending data (files) unencrypted and just keep the auth and metadata/filenames/file listings crypted but its not worth the extra work for dsl.
<taw>
"level of friendship" isn't legally meaningful concept i think
<mrvn>
taw: people you physically met and exchanged pgp keys with?
<two-face>
mrvn it is better like this
<taw>
mrvn: physically met yet, exchanged pgp keys with, not really ;)
<mrvn>
two-face: Doing blowfish at 100 MBit/s shouldn#t be a problem on modern cpus though. So who cares.
<taw>
two-face: mrvn is right, encryption is fast enough
<two-face>
mrvn me I think, I don't have such hardware
<mrvn>
two-face: Do you have a 100MBit connection at home?
<two-face>
I have 64kb/s down and 16kb/s up
<two-face>
but it is ADSL
<mrvn>
Anyway, compared with the time it takes you friend to insert the right CD with the file on you want the encryption doesn't realy change the speed.
<mrvn>
two-face: Anything better than a P90 should have no problems doing blowfish at full speed without problems.
<two-face>
probably, yes
<mrvn>
What is more likely a problem is reconstructing a file from partial chunks + redundancy chunks.
<mrvn>
Together with fragmentation that can realy kill your drive performance.
<mrvn>
Reading from 64 files and writing to 64 different files in parallel or something like that.
<two-face>
hmmm, I see
<det>
mrvn, at least do aes or twofish
<det>
mrvn, twofish succedes blowfish
<mellum>
blowfish sounds cooler
<det>
mrvn, and aes is the new standard
<taw>
well, i wouldn't trust aes
<det>
rijndael sounds even more cool!
<det>
taw, why is that ?
<taw>
it looks weird, and could have been already broken by nsa
<det>
and twofish ?
<taw>
versions of aes with smaller numbers of rounds are already broken
<taw>
that doesn't mean that real aes will be too
<taw>
but nsa have chosen it for a reason
<taw>
of course, that should be good enough for skr1pt k1ddi3s
<det>
well, I was rooting for twofish ;)
det has quit ["TE) (Swing them udders"]
docelic has joined #ocaml
docelic has quit ["l8r"]
two-face has quit ["two-face has no reason"]
owll has quit ["Client Exiting"]
lam_ has quit ["Lost terminal"]
docelic has joined #ocaml
lam has joined #ocaml
ragzter has quit ["bye"]
mrvn_ has joined #ocaml
foxster has joined #ocaml
docelic has quit ["Client Exiting"]
mrvn has quit [Read error: 110 (Connection timed out)]
mrvn_ is now known as mrvn
CybeRDukE has joined #ocaml
foxster has quit [Client Quit]
foxster has joined #ocaml
docelic has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
docelic has quit ["l8r"]
Demitar has joined #ocaml
CybeRDukE has quit ["Universe.SYS corrupted. Reboot? [Y/N]"]
foxen has joined #ocaml
brwill|zzz is now known as brwill
foxster has quit [Client Quit]
mattam_ is now known as mattam
foxster has joined #ocaml
Demitar has quit ["There are bubbles in the air..."]
foxster has quit [Client Quit]
foxster has joined #ocaml
skylan has joined #ocaml
foxen has quit [Client Quit]
<mrvn>
re
<baader>
re
<mrvn>
Got your lists sorted out?
<baader>
yes, for now at least
<baader>
i'll replace the list with a array now
<baader>
also i figured i need to do some more reading, because so far what i did was very 'experimental'
Khortl has quit [orwell.freenode.net irc.freenode.net]
Khortl has joined #ocaml
Khortl has quit [orwell.freenode.net irc.freenode.net]
Khortl has joined #ocaml
polin8 has quit [Read error: 104 (Connection reset by peer)]