test1234 has quit [Read error: 110 (Connection timed out)]
Azure_Ag has joined #ocaml
<Azure_Ag>
Good evening, gentle creatures.
<mbishop>
I'm not sure how gentle Smerdyakov is
<Azure_Ag>
Well, I just can't be helpd for the quality of his evening if he's not.
<Azure_Ag>
Err, held.
<Azure_Ag>
I'm wondering if someone could tell me what I'm doing wrong in OCaml. I'm running Debian (amd64, sid) and I've got the libvorbis-ocaml-dev package installed, but when I try to do a #load "vorbis/vorbis.cma";; It tells me it can't load the dllvorbis_stubs library and gives the reason /usr/lib/ocaml/3.09.2/stublibs/dllvorbis_stubs.so: undefined symbol: ov_clear.
<Azure_Ag>
I tried recompiling it (the vorbis library) from source and it compiled cleanly, but I get the same error. I get the same one with libmad-ocaml-dev.
robyonrails has joined #ocaml
vorago has joined #ocaml
robyonrails has quit [Read error: 110 (Connection timed out)]
rhz has joined #ocaml
shawn has quit [Read error: 110 (Connection timed out)]
<rhz>
Is there a similar construct in ocaml to @ used in pattern matching in Haskell (I think it is called an as-pattern)?
yminsky has joined #ocaml
yminsky has quit []
boto has quit [Remote closed the connection]
robyonrails has joined #ocaml
david_koontz has quit ["Leaving"]
screwt8 has quit [Remote closed the connection]
m3ga has joined #ocaml
piggybox has joined #ocaml
dark_light has quit [Remote closed the connection]
<rhz>
How can I convert something of type unit list to just unit by sequencing everything together?
buluca has quit ["Leaving."]
screwt8 has joined #ocaml
rhz has quit ["This computer has gone to sleep"]
m3ga has quit [Read error: 104 (Connection reset by peer)]
robyonrails has quit [Connection timed out]
shawn has joined #ocaml
vorago has quit [Read error: 113 (No route to host)]
bluestorm_ has joined #ocaml
bluestorm_ has quit [Client Quit]
robyonrails has joined #ocaml
Azure_Ag has quit ["Zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz-POP!"]
SanityInAnarchy has joined #ocaml
<SanityInAnarchy>
I've downloaded some ocaml source, and compiling dies on a line: "open Types;;"
<SanityInAnarchy>
I am guessing this is some standard library I'm missing?
SanityInAnarchy has quit ["leaving"]
rhz_ has joined #ocaml
<pango>
rhz_: (pattern as variable)
<pango>
match [1;2;3] with ((h::q) as l) -> Printf.printf "%d %d %d" h (List.length q) (List.length l) | [] -> assert false ;;
<xavierbot>
1 2 3- : unit = ()
Submarine has quit [Remote closed the connection]
<pango>
rhz_: I'm not sure I understand your second question... My guess is that you're misusing some iterators (List.map instead of List.iter, or something)... Who needs unit lists? ;)
b00t has joined #ocaml
bluestorm_ has joined #ocaml
robyonrails has quit ["me ne vo'"]
<rhz_>
pango: yeah, my second question was pointless. never mind that one.
Nutssh has quit ["Client exiting"]
rhz_ has quit ["This computer has gone to sleep"]
minciue has joined #ocaml
love-pingoo has joined #ocaml
test1234 has joined #ocaml
seafoodX has joined #ocaml
ygrek has joined #ocaml
shawn has quit [Connection timed out]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
rhz has joined #ocaml
yminsky has joined #ocaml
Smerdyakov has quit ["Leaving"]
yminsky has quit []
m3ga has joined #ocaml
m3ga has quit [Client Quit]
Nutssh has joined #ocaml
rhz has quit [Read error: 110 (Connection timed out)]
test1234 has quit [Read error: 104 (Connection reset by peer)]
lde has quit [Connection timed out]
test1234 has joined #ocaml
splt has joined #ocaml
buluca has joined #ocaml
noteventime has joined #ocaml
seafoodX has quit []
love-pingoo has quit ["Connection reset by pear"]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
b00t has quit ["Leaving"]
buluca has quit [Read error: 113 (No route to host)]
test1234 has quit [Read error: 110 (Connection timed out)]
buluca has joined #ocaml
descender has quit ["Elegance has the disadvantage that hard work is needed to achieve it and a good education to appreciate it. - E. W. Dijkstra"]
hsuh has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
hsuh has quit [Remote closed the connection]
hsuh has joined #ocaml
hsuh has left #ocaml []
zmdkrbou_ is now known as zmdkrbou
hsuh has joined #ocaml
splt has left #ocaml []
leo037 has joined #ocaml
hsuh has quit [Remote closed the connection]
hsuh has joined #ocaml
hsuh has left #ocaml []
hsuh has joined #ocaml
piggybox_ has joined #ocaml
yminsky has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
piggybox_ is now known as piggybox
yminsky has quit []
<flux>
ocamlidl seems nice. it was quite simple to wrap some of esound api with it.. there are still some non-trivial parts left, though (like converting a linked list from C to an ocaml list)
<flux>
let find x = try Hashtbl.find factoids x with Not_found -> let r = Str.regexp x in match Hashtbl.fold (fun key value v -> if Str.string_match r key 0 then (Some (key, value)) else v) factoids None with None -> Printf.printf "Not found" | Some (key, value) -> Printf.printf "%s = %s" key value;;
<xavierbot>
Characters 84-293:
<xavierbot>
let find x = try Hashtbl.find factoids x with Not_found -> let r = Str.regexp x in match Hashtbl.fold (fun key value v -> if Str.string_match r key 0 then (Some (key, value)) else v) factoids None with None -> Printf.printf "Not found" | Some (key, value) -> Printf.printf "%s = %s" key value;;
<xavierbot>
This expression has type unit but is here used with type string
<flux>
sigh..
<flux>
ah
<flux>
let find x = try Hashtbl.find factoids x with Not_found -> let r = Str.regexp x in match Hashtbl.fold (fun key value v -> if Str.string_match r key 0 then (Some (key, value)) else v) factoids None with None -> Printf.printf "Not found" | Some (key, value) -> Printf.sprintf "%s = %s" key value;;
<xavierbot>
Characters 289-294:
<xavierbot>
let find x = try Hashtbl.find factoids x with Not_found -> let r = Str.regexp x in match Hashtbl.fold (fun key value v -> if Str.string_match r key 0 then (Some (key, value)) else v) factoids None with None -> Printf.printf "Not found" | Some (key, value) -> Printf.sprintf "%s = %s" key value;;
<xavierbot>
^^^^^
<xavierbot>
This expression has type string but is here used with type unit
<flux>
let find x = try Hashtbl.find factoids x with Not_found -> let r = Str.regexp x in match Hashtbl.fold (fun key value v -> if Str.string_match r key 0 then (Some (key, value)) else v) factoids None with None -> "Not found" | Some (key, value) -> Printf.sprintf "%s = %s" key value;;
<Smerdyakov>
Both of the challenge examples you ask for can be implemented easily doing things the old fashioned way, without those nasty polymorphic variants.
* Smerdyakov
writes some code to demonstrate.
<rwmjones_>
Smerdyakov, by "old fashioned way" what do you mean?
<Smerdyakov>
You'll see. It's the only way we do it in SML.
<rwmjones_>
ok :-)
* rwmjones_
did read the Paulson book on SML, but found it deadly dull (the book, not necessarily the language)