dan2 has quit [Read error: 104 (Connection reset by peer)]
noteventime has quit [Remote closed the connection]
scruffie has quit []
romanoffi has joined #ocaml
descender has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
jeffs has quit ["Leaving."]
tomppa has joined #ocaml
akrito has joined #ocaml
tomppa has quit ["Ex-Chat"]
G_ has joined #ocaml
G has quit [Read error: 110 (Connection timed out)]
G_ is now known as G
bluestorm_ has joined #ocaml
screwt8 has quit [Remote closed the connection]
screwt8 has joined #ocaml
ayrnieu has joined #ocaml
smimou has joined #ocaml
screwt8 has quit [Remote closed the connection]
ygrek has joined #ocaml
screwt8 has joined #ocaml
G_ has joined #ocaml
G has quit [Read error: 60 (Operation timed out)]
G_ is now known as G
mwc has quit ["Lost terminal"]
Cygal has joined #ocaml
pantsd has joined #ocaml
Mr_Awesome has quit ["...and the Awesome level drops"]
ygrek has quit [Remote closed the connection]
mikeX has joined #ocaml
zarvok has joined #ocaml
_blackdog has joined #ocaml
mikeX_ has joined #ocaml
lde has quit ["ERC Version 5.2 (IRC client for Emacs)"]
mikeX has quit [Read error: 110 (Connection timed out)]
_blackdog has quit ["Ex-Chat"]
Demitar has quit [Read error: 113 (No route to host)]
pango has quit [Remote closed the connection]
SooW has joined #ocaml
pango has joined #ocaml
akrito has quit [Remote closed the connection]
<SooW>
hi, anyway to do something like "string_of_char" ?
<SooW>
the function isn't in Pervasives
<Oatmeat>
use String.make 1
<SooW>
yep, I've just seen it ^^
<SooW>
thnak you
<pango>
it's not inefficient, because there's usually ways around, that are much faster
<pango>
1?2
<pango>
it's not in standard library, because there's usually ways around, that are much faster
<pango>
like, using the Buffer module
<flux>
hmm..
<flux>
actually this would be fast:
<flux>
let string_of_char = let map = Array.init 256 (fun n -> String.make 1 (Char.chr n)) in fun char -> map.(char)
<pango>
array lookups are rather slow on modern computers
<pango>
also, there's the problem that strings aren't immutable
<flux>
true
<flux>
well, benchmarking would reveal the truth.. I would expect the array lookup version to be faster.
<pango>
the performance problem with string_of_char is not that it's implementation is extremely slow, and cannot be improved, but that's it's usually better to avoid it in the first place
<flux>
true: if you're going the string_of_char-way, you're probably not doing it very fast anyway
<pango>
SooW: so the question is, what are you using this string_of_char for?
<flux>
well.. actually.. it was you who you brought the performance issue up, so perhaps he doesn't care?-)
<pango>
still, I think it explains why it's not in standard lib, which also partially answers his question
<SooW>
pango, I'm iterating over objects that have a mutable char to concatenate them into a word
<pango>
check Buffer module then
<SooW>
actually, this is really words, which means about 20 chars... if I need to optimize something, I think this is something else :)
<SooW>
but I'll check it thought
<SooW>
still 3 days, until I forget ocaml forever :)
<pango>
that'd mean you learned nothing from it, then
<pango>
# let word = Buffer.create 5 in List.iter (Buffer.add_char word) ['a';'b';'c';'d';'e';'f';'g';'h']; Buffer.contents word ;;
<pango>
- : string = "abcdefgh"
<SooW>
right, that's easy :)
<SooW>
I was doing sth like "let rec add_char = function [] -> "" | h::t -> (String.make 1 h#value) ^ add_char t in add_char my_object_list"
<SooW>
that's surely pretty, but I don't wanna be my processor
<pango>
Buffer takes care of the geometric buffer growth, so that cost stays O(n) (amortized)
<SooW>
actually, I didn't tell you everything
<SooW>
I've a block which contains lines which contains words which contains characters
<SooW>
so that's natively recursive
<SooW>
(and forget the 's' I put at the end of contain) ^^
<SooW>
I'm French :/
Demitar has joined #ocaml
JeffSmac has joined #ocaml
JeffSmac has quit []
<pango>
Just learned that the TeX renderer of the Wikipedia is written in OCaml...
malc_ has joined #ocaml
Oatmeat has left #ocaml []
JeffSmac has joined #ocaml
klapmuet1 has joined #ocaml
GoNoGo has joined #ocaml
JeffSmac has quit []
klapmuetz has quit [Read error: 110 (Connection timed out)]
<bluestorm_>
Smerdyakov: i'm afraid this is too technical for me
<Smerdyakov>
bluestorm_, if you've never been to POPL, it probably is. :-)
<bluestorm_>
hm
<bluestorm_>
from having a quick look at the titles it seems you tried to introduce each notion to the reader
<Smerdyakov>
Yes, but I assume a ground knowledge of type theory.
<bluestorm_>
hum
<Smerdyakov>
It's great to hear if you could read it and learn something, but it isn't necessary for it to be understandable to non-experts for this conference, and there is a strict page limit, so adding extra background has a cost.
<bluestorm_>
of course
<bluestorm_>
i'm even surprised that you seems to introduce Coq
<bluestorm_>
-s
<Smerdyakov>
I think fewer than 10% of POPL attendees are familiar with Coq today at the level that I present it.
JeffSmac has joined #ocaml
<mbishop>
I saw a link the other day to some haskell guy talking about Coq
<mbishop>
he seemed to really like it
<Smerdyakov>
HINT: Everyone who has tried to do serious theorem proving and used Coq likes it. ;)