hkBst has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has quit ["Ex-Chat"]
r0bby has quit [Read error: 60 (Operation timed out)]
alexyk has joined #ocaml
seafood has quit []
alexyk has quit []
alexyk has joined #ocaml
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
r0bby has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
seafood has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
Axioplase has joined #ocaml
alexyk has quit []
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
alexyk has joined #ocaml
schme_ has quit ["leaving"]
m3ga has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
alexyk has joined #ocaml
cataska has quit ["Lost terminal"]
cataska has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
alexyk has quit []
sporkmonger has quit []
munificent has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
m3ga_ has joined #ocaml
sporkmonger has joined #ocaml
seafood_ has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
m3ga_ has quit ["disappearing into the sunset"]
m3ga has quit ["disappearing into the sunset"]
Stefan_vK1 has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
|jedai| has quit [Read error: 110 (Connection timed out)]
munificent has left #ocaml []
|jedai| has joined #ocaml
Stefan_vK has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
sporkmonger has quit []
seafood_ has quit []
manju has joined #ocaml
<manju>
hello
<manju>
do you guys have links to some simple programs written in ocaml ?
ikaros has quit [".quit"]
Waleee has quit [Connection timed out]
|jedai| has quit [Connection timed out]
|jedai| has joined #ocaml
olgen has joined #ocaml
Yoric[DT] has joined #ocaml
m3ga has joined #ocaml
seafood has joined #ocaml
olgen has left #ocaml []
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
|jedai| has quit [Read error: 145 (Connection timed out)]
|jedai| has joined #ocaml
fschwidom has joined #ocaml
rwmjones_ has joined #ocaml
_jedai_ has joined #ocaml
seafood has quit []
|jedai| has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
rwmjones_ has quit [Remote closed the connection]
_jedai_ has quit [Read error: 110 (Connection timed out)]
_jedai_ has joined #ocaml
_zack has joined #ocaml
<gildor>
manju: depends on what you are looking for
<manju>
I am still learning ocaml (I just am working through the exercises on functions) but I have never seen how ocaml code looks like and the book has only code snippets. Some small prgrams or such would be nice...
ido has quit [Read error: 104 (Connection reset by peer)]
<manju>
thanks for the links
Axioplase is now known as Axioplase_
_jedai_ has quit [Read error: 110 (Connection timed out)]
_jedai_ has joined #ocaml
Camarade_Tux has joined #ocaml
hkBst has joined #ocaml
_jedai_ has quit [Connection timed out]
OChameau has joined #ocaml
_jedai_ has joined #ocaml
fschwidom has quit [Connection timed out]
mohbana has quit [Read error: 110 (Connection timed out)]
_jedai_ has quit [Read error: 110 (Connection timed out)]
_jedai_ has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
robocop has joined #ocaml
<robocop>
hello.
<robocop>
what's the best ? let () = or let _ =
<robocop>
?
jknick has quit [Read error: 113 (No route to host)]
<flux>
I often use let _ because it's shorter. if you want to be certain that the right hand side indeed does return a unit value, use let ()?
<robocop>
Ho, yes, you right :
<robocop>
# let _ = 5;;
<robocop>
- : int = 5
<robocop>
# let () = 5;;
<robocop>
This expression has type int but is here used with type unit
<robocop>
thanks.
<olegfink>
by the way, speaking about types
<olegfink>
# let (a:int) = 5;;
<olegfink>
val a : int = 5
<olegfink>
# let (_:int) = 5;;
<olegfink>
#
<olegfink>
why there's no feedback in the second case?
<flux>
apparently it only gives types and values to named bindings
<flux>
a reasonable approach I'd say
<olegfink>
# let _ = 5;;
<olegfink>
- : int = 5
<olegfink>
doesn't support your theory
<flux>
let (a, b, _) = (1, 2, 3);; supports
<flux>
apparently let (_) = 5 and let (_ : int) = 5 are handled somehow differently, don't know the specifics
<olegfink>
I'd vote for keeping (_:int) behaviour
<olegfink>
# 5;;
<olegfink>
- : int = 5
<olegfink>
so one might say that '-' stays for haskell's/F#'s 'it'
<olegfink>
let _ = 5 isn't a value
<olegfink>
s/stays/stands/
_jedai_ has quit [Read error: 110 (Connection timed out)]
_jedai_ has joined #ocaml
_jedai_ has quit [Read error: 60 (Operation timed out)]
_jedai_ has joined #ocaml
robocop has left #ocaml []
jonafan_ has joined #ocaml
Waleee has joined #ocaml
jeddhaberstro has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
froschi has joined #ocaml
itewsh has joined #ocaml
kelaouchi has quit ["leaving"]
_zack has quit ["Leaving."]
_zack has joined #ocaml
_zack has quit [Client Quit]
_jedai_ has quit [Read error: 110 (Connection timed out)]
_jedai_ has joined #ocaml
Snark has joined #ocaml
froschi has quit ["Ex-Chat"]
kelaouchi has joined #ocaml
ikaros has quit [".quit"]
kelaouchi has quit [Client Quit]
kelaouchi has joined #ocaml
sporkmonger has joined #ocaml
ppsmimou has joined #ocaml
_jedai_ has quit [Connection timed out]
_jedai_ has joined #ocaml
l_a_m has quit ["Lost terminal"]
Yoric[DT] has joined #ocaml
<Yoric[DT]>
Bon, ben ça commence à se faire officiel : je suis en train d'encadrer un doctorant.
<Yoric[DT]>
Ça fait tout drôle.
hkBst has quit [Read error: 104 (Connection reset by peer)]
ido_ has quit [Read error: 104 (Connection reset by peer)]
hkBst has joined #ocaml
ido has joined #ocaml
snhmib has joined #ocaml
<Yoric[DT]>
Arf, wrong channel.
l_a_m has joined #ocaml
ikaros has joined #ocaml
vixey has joined #ocaml
manju has quit [Remote closed the connection]
manju has joined #ocaml
<ppsmimou>
Yoric[DT]: félicitations :)
<Yoric[DT]>
:)
* Camarade_Tux
gets the machinegun and snipes gtk
<olegfink>
wait, ocaml doesn't yet have a qt interface, so we're left with none. :-(
<olegfink>
ah, it does.
|jedai| has joined #ocaml
_jedai_ has quit [Read error: 110 (Connection timed out)]
manju has quit [Remote closed the connection]
manju has joined #ocaml
<Camarade_Tux>
oh right, they seem nearly done (well not exactly but they can't fail now)
<Yoric[DT]>
:)
<Camarade_Tux>
and they'll have webkit bindings for free whereas I'm stuck with a stupid error
<Camarade_Tux>
would anyone happen to know how to fix that : In callback for signal navigation_requested, uncaught exception: Failure("Gobject.is_a : type webkit_network_request is not yet defined")
* Yoric[DT]
has no clue.
* Yoric[DT]
isn't sure he wants to know.
<Camarade_Tux>
I can fix that one actually but then it complains that an object of type WebKitNetworkRequest is not of type webkit_network_request, so I try to use "WebKitNetworkRequest" and then it complains that an object of type "WebKitNetworkRequest" is not of type "WebKitNetworkRequest" :)
<Camarade_Tux>
now you know even less ;)
<Camarade_Tux>
\o/
<Camarade_Tux>
actually using the caml-cased version works, I probably had an unsaved file or something that stupid
* Camarade_Tux
dances
<Yoric[DT]>
:)
willb has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
* Camarade_Tux
wonders if there's one thing ocamlnet can't do
<gim>
coffee ?
<olegfink>
compile out of the box... :-(
<Camarade_Tux>
ocaml is the only thing I don't try to compile myself
<Camarade_Tux>
I even (cross-)compile gtk (and X soon)
<Camarade_Tux>
bbl
|jedai| has quit [Connection timed out]
|jedai| has joined #ocaml
mikeX_ has quit [Read error: 60 (Operation timed out)]
mikeX has joined #ocaml
jeremiah has joined #ocaml
jeremiah has quit [Connection reset by peer]
mikeX has quit [Read error: 60 (Operation timed out)]
mikeX has joined #ocaml
itewsh has joined #ocaml
jeremiah has joined #ocaml
jeddhaberstro has quit []
<fremo>
IMAP :(
<alexyk>
what is the separator in OCAMLRUNPARAM, e.g. =b ?? l=512M
<alexyk>
with ?? being the separator?
<Camarade_Tux>
: or space iirc
<fremo>
from the man page: "export OCAMLRUNPARAM='s=256k,v=1"
<Camarade_Tux>
ok :p
<fremo>
;)
<alexyk>
fremo: thx!
<fremo>
you're welcome
<alexyk>
I get a strange error from an ocamlopt compiled executable: ./treeru.opt:206: command not found: in
<alexyk>
at the same time, byte-compiled one treeru works ok
<alexyk>
why would native binary emit such an error right at the start?
MichaelGG has joined #ocaml
mohbana has quit [Read error: 110 (Connection timed out)]
mohbana has joined #ocaml
OChameau has quit ["Leaving"]
<mrvn>
alexyk: file treeru.opt
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
<alexyk>
mrvn: ?
<alexyk>
mrvn: file treeru.opt
<alexyk>
treeru.opt: Mach-O executable i386
<fremo>
what kind of OS do you use ? :)
<fremo>
MacOSX ?
<fremo>
Hurd :)
<fremo>
NextStep ? :D
<alexyk>
fremo: Mac of course
<fremo>
hum...
<alexyk>
hmm: factoring out the offending function into a different module, also natively compiled, made it work again
<alexyk>
worked before adding the function to main and works again when calling from a module
|jedai| has quit [Connection timed out]
<alexyk>
so seems the ocamlopt problem
|jedai| has joined #ocaml
mohbana has quit [Read error: 110 (Connection timed out)]
mohbana has joined #ocaml
robocop has quit [Remote closed the connection]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
mikeX_ has joined #ocaml
mikeX has quit [Read error: 110 (Connection timed out)]
|jedai| has quit [Read error: 110 (Connection timed out)]
jeremiah has joined #ocaml
|jedai| has joined #ocaml
rwmjones_ has joined #ocaml
willb is now known as willb-commute
snhmib has quit ["Good riddance!"]
Snark has quit ["Ex-Chat"]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
willb-commute has quit [Read error: 110 (Connection timed out)]
giovana has joined #ocaml
<giovana>
alguem sabe algum canal brsil?
<giovana>
brasil
<giovana>
do you speak portuguese?
giovana has left #ocaml []
mohbana_ has joined #ocaml
ikaros has quit [".quit"]
_zack has joined #ocaml
<Camarade_Tux>
I always forget : in lablgtk2, I pack several widgets inside boxes but I want one (and one only) to take as much space as possible, how should it be done ?
<Camarade_Tux>
(I'll offer champagne once this is done btw ;p )
<Yoric[DT]>
To whom? :)
<Yoric[DT]>
GtkExpander?
mohbana has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
<Yoric[DT]>
I mean, put the widget inside its own GtkBox and make that box use GtkExpander.
<Yoric[DT]>
Just a guess, mind you.
<det>
Camarade_Tux, ~expand:true ~fill:true
<det>
something like that when you pack it
<Camarade_Tux>
that should be something with expand and/or true, now I need to figure out where to put that
|jedai| has quit [Connection timed out]
<Camarade_Tux>
(I'm folding over a list of functions which each add something like scrollbars, or menu bar, or status bar, or ..., and folding makes things a bit complicated)
<Camarade_Tux>
and champagne will be for everybody ;)
mohbana_ has quit [Read error: 60 (Operation timed out)]
<jonafan>
this isn't a problem i've come across, i'm just surprised to see that it does that
<vixey>
um the person that posted that blog is confused :P
<MichaelGG>
I think F# could do that in some manner
<mrvn>
you have to write let thread f1 f2 (a, x) (b, y)
<jonafan>
yeah
<vixey>
MichaelGG, yuck
<MichaelGG>
yea well just sayin
<jonafan>
yes, it's not the end of the world
<vixey>
MichaelGG, just saying yuck
willb-commute is now known as willb
<vixey>
jonafan, it's sort of amusing someone would be surprised that HM is limiting though
<jonafan>
yeah, it seems to mostly work extremely well
<MichaelGG>
am i dumb or i dont really get his complaint
<MichaelGG>
he wants f to be multiple dispatch or something?
<jonafan>
it seems to be inferring the type of f incorrectly
<mrvn>
He wants f to remain polymorphic even after it gets infered.
<jonafan>
you should be able to write his concat function as just let concat = thread (@);;
<mrvn>
jonafan: yes. But then it only works for (int list, int list), not (int list, float list)
<jonafan>
hmmmmmmmmmm
<jonafan>
yes i see why it doesn't like it
<mrvn>
He wants to preserve the fact that (@) works on any type of list but the type inference only knows that f will work on one type and inferes that the tuples must have equal types.
hkBst has quit [Read error: 104 (Connection reset by peer)]
MichaelGG has quit ["Leaving"]
Gionne has quit ["Leaving"]
<mrvn>
It is a similar problem to having a ('a, 'a -> unit) list with different 'a in the same list.
<mrvn>
does haskel or mlton or something have a more complex type inference?
<vixey>
what's that :> stuff?
<vixey>
subtyping?
<mrvn>
yes
<vixey>
mrvn, yes haskell is much more complex to the point nobody has a clue what it does
<mrvn>
int list as ueber type of '_a list for example. If ocaml could have that.
<mrvn>
vixey: hehe
<vixey>
I wish it was a joke :P
<mrvn>
With classes can you type a function as ('a :> 'b -> 'c :> 'd) and somehow specifiy what 'a map to what 'c?
alexyk has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
seafood has joined #ocaml
munificent has joined #ocaml
munificent has left #ocaml []
<Camarade_Tux>
\ ( ^ _ ^ ) /
<Camarade_Tux>
champagne ! =D
<Yoric[DT]>
:)
_zack has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
it seems it's not equivalent to use 'GMisc.statusbar ~packing:vbox#add ()' and 'let sb = GMisc.statusbar () in ~pack:vbox#pack sb#coerce'
_zack has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
<Camarade_Tux>
killall -9 firefox-bin
<Camarade_Tux>
killallkillall -9 firefox-bin
<Camarade_Tux>
as you have guessed I had some troubles with firefox :)
|jedai| has quit [Read error: 110 (Connection timed out)]
Waleee has quit [Read error: 60 (Operation timed out)]
mikeX_ has quit [Read error: 60 (Operation timed out)]
mikeX has joined #ocaml
munificent has joined #ocaml
munificent has left #ocaml []
_zack has quit ["Leaving."]
mohbana_ has quit [Remote closed the connection]
Amorphous has quit [Read error: 60 (Operation timed out)]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
<alexyk>
how would you use List.merge to merge odd and even lists into one: [1;3;5] [2;4;6] -> [1;2;3;4;5;6] ?
mfp has quit [Read error: 104 (Connection reset by peer)]
<vixey>
like this: List.merge (fun a b -> if a < b then -1 else 1) [1;3;5] [2;4;6];;
<alexyk>
vixey: well, in fact I need lists of odd positions and even ones; there can be anything in each list
<vixey>
what
<alexyk>
and I wonder what's the right way to split the original into odd and even ones is, too
<alexyk>
perhaps List.partition
<alexyk>
those rarely used List functions
<vixey>
idk just write the program is the easiest way
marmotine has quit ["mv marmotine Laurie"]
<vixey>
so you really want [1;2;3;4;5;6] -> [1;3;5] [2;4;6]?
<vixey>
[1;3;5], [2;4;6]*
<alexyk>
vixey: true, but I wonder if there's a "right" way to use the list functions
<vixey>
no there isn't
<alexyk>
vixey: not to confuse with numbers, I want [a;b;c;x;y;z] -> [a;c;y] [b;x;z] and then back
<vixey>
yeah just write it
<alexyk>
vixey: I saw you in Haskell! :) What's System F anyway?
<vixey>
alexyk, ocaml and so on are sort of like System F
<alexyk>
vixey: which is what? language class?
<vixey>
do you know simple typed lambda calculus?
<vixey>
I guess not
Amorphous has joined #ocaml
<alexyk>
vixey: not yet
<alexyk>
so it's from there I guess?
<vixey>
alexyk, it's just lambda, variables, and applications
<alexyk>
ok, thx! another stimulus to look it up
<vixey>
and the type rules are: (app) gamma; m : s -> t; n : s |- m n : t (var) gamma |- x : gamma(x) (lam) x:t |- b:s ==> lambda x, b : t -> s
<vixey>
alexyk, System F is like basically that at the type level (without lambda), and then in the values you have got a new kind of abstraction /\t, b : forall t, s
<vixey>
alexyk, best thing I can think of is to read Lectures on Curry-Howard Isomorphism
<alexyk>
vixey: cool, making sense of lambdas
|jedai| has quit [Read error: 110 (Connection timed out)]