linuxtk10 has quit [Read error: 104 (Connection reset by peer)]
mbishop has quit [Read error: 110 (Connection timed out)]
Nucleo_ has quit [No route to host]
[azoic] has joined #ocaml
G_ is now known as G
G has quit ["FATAL: Module brain not found."]
rutlov has joined #ocaml
rutlov has left #ocaml []
Smerdyakov has joined #ocaml
cpst has quit [Read error: 110 (Connection timed out)]
martin_ has joined #ocaml
martin_ is now known as mbishop
mbishop is now known as mbishoptesting
mbishoptesting is now known as mbishop
ita has joined #ocaml
rutlov has joined #ocaml
rutlov has left #ocaml []
seafoodX has joined #ocaml
martin_ has joined #ocaml
mbishop has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has quit ["Leaving"]
ita has quit [Read error: 110 (Connection timed out)]
martin__ has joined #ocaml
martin_ has quit [Read error: 110 (Connection timed out)]
martin__ has quit [Read error: 110 (Connection timed out)]
martin__ has joined #ocaml
martin_ has joined #ocaml
martin_ is now known as mbishop
slipstream-- has joined #ocaml
martin__ has quit [Read error: 110 (Connection timed out)]
Nucleo_2 has joined #ocaml
slipstream has quit [Read error: 113 (No route to host)]
buluca has quit [Read error: 113 (No route to host)]
authentic has joined #ocaml
[azoic1 has joined #ocaml
cpst has joined #ocaml
seafoodX_ has joined #ocaml
bluestorm_ has joined #ocaml
seafoodX_ has quit []
[azoic] has quit [Read error: 110 (Connection timed out)]
seafoodX has quit [Read error: 110 (Connection timed out)]
[azoic1 is now known as [azoic]
gmh33 has joined #ocaml
seafoodX has joined #ocaml
seafoodX has quit [Client Quit]
seafoodX has joined #ocaml
seafoodX has quit []
seafoodX has joined #ocaml
[azoic] has quit ["Leaving."]
gmh33 has quit [Remote closed the connection]
Mr_Awesome has joined #ocaml
ygrek has joined #ocaml
cannedfish has joined #ocaml
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
slipstream has joined #ocaml
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
pango has quit [Remote closed the connection]
bluestorm_ has quit [Remote closed the connection]
pango has joined #ocaml
bluestorm_ has joined #ocaml
ingeB0RG is now known as ulfdoz
Nucleo_2 has quit [Connection timed out]
<flux>
hmh.. the map/set from ocaml-reins doesn't appear to support the split-operation of Set
<flux>
it's already annoying that Map doesn't support split, I need to use both Set and Map to have a Map with that feature
Mr_Awesome has quit ["aunt jemima is the devil!"]
CRathman_ has joined #ocaml
CRathman has quit [Read error: 110 (Connection timed out)]
ita has joined #ocaml
Nucleo_2 has joined #ocaml
olegfink has quit [Read error: 101 (Network is unreachable)]
ita has quit ["Hasta luego!"]
Nucleo_2 has quit [Read error: 104 (Connection reset by peer)]
Nucleo_2 has joined #ocaml
<svenl>
anyone knows how the termios setting of a Unix terminal file descriptor interact with the Stream standard library.
<svenl>
i need to set Unix.c_vmin and Unix.c_vtime, in order to be able to react if i don't get a char after a given time, when a read would return 0 read chars.
<svenl>
it would block and return 0 read chars that is.
<svenl>
I am unsure how the Stream library behaves with regard to blocking or non blocking reads.
<svenl>
since it does a string_unsafe_get, which is mapped to some bytecode/asmcode generation, and i lost the trace in the code there.
<pango>
using timeouts will make terminal reading non deterministic, so tackling a Stream on top of that looks like a bad idea
<svenl>
pango: non-deterministic ?
<svenl>
pango: i am actually writting a program which monitors a serial input, and should raise a warning if no input is comming.
<pango>
I'd go for select()
<svenl>
pango: past experience with select over sockets proven not so nice.
<svenl>
pango: i was going to set vtime to some timeout, and do a recusrive read.
<svenl>
if there is no input in a given time, as set in vtime, i know something is wrong, and raise the warning.
<pango>
no experience with termios
<svenl>
pango: why you said it would be non-deterministic ?
<pango>
maybe it's not the best term... but it will stop behaving as a ideal stream, returning the same results in the same order
<svenl>
pango: i still don't understand. If there are characters to be read inside the timeouts, they will be read.
<svenl>
pango: if they are not,
<svenl>
pango: if they are none such characters to be read, it will block during vtime*0.1 s, and then return empty, or whatever.
cpst_ has joined #ocaml
cpst has quit [Read error: 104 (Connection reset by peer)]
<svenl>
if characters arrive later on, they will be read in a subsequent read.
<pango>
so you'll have a problem encoding that in the middle of a stream, not to mention further characters will be translated by an arbitrary number of place
<pango>
it seems to be just as bad as using buffered sockets with select(), same kind of error
<svenl>
pango: are you speaking about the slow streams, or something else ?
<pango>
about Stream.t
<svenl>
ok.
<svenl>
Stream.t uses string_unsafe_get to do the actual hcaracter reading.
<svenl>
but i was unable to map this to something which actually reads the file descriptor.
<svenl>
so i don't know how it reacts with regard to blocking/nonblocking mode.
<svenl>
I guess the best solution is just to use Unix.read, and put this in a buffer of my chosing.
seafoodX has quit []
<pango>
yes, because you were trying to mix fire and ice
<svenl>
and then hand-process this buffer, without resorting to the stream thingy.
<svenl>
pango: well, not trying, but wondering if i could.
<svenl>
pango: thanks for the help.
<pango>
even not knowing the implementation details, it looked like a weird idea
<svenl>
ok.
<pango>
streams are lazy datastructures, so the exact time the underlying values are evaluated shouldn't matter
<pango>
even if the order of evaluation should be known, it doesn't feel like the right place to put timing-dependant tests
<svenl>
indeed.
<svenl>
its a neat interface for parsing though.
<pango>
lazy datastructures can have many uses, too bad ocaml standard lib doesn't even have a lazy list (Streams are good, but destructive...)
<bluestorm_>
hm
<bluestorm_>
there is a FStream lib in camlp4
<pango>
old or new camlp4? :)
<pango>
in old one, I had the feeling that functional streams were deprecated
<bluestorm_>
hm
ygrek has quit [Remote closed the connection]
<flux>
I don't think it even really worked
<flux>
would be fun to have, though
<bluestorm_>
i can't find it
ygrek has joined #ocaml
<bluestorm_>
they may have been removed, as you say
seafoodX has joined #ocaml
<bluestorm_>
hm
<bluestorm_>
i don't know why aren't the developpers considering extension of the standard lib
<pango>
they don't want to have to maintain a large library, I'd guess
<bluestorm_>
are pure-ocaml library that much work ?
<pango>
maybe more than what they want to spend on it
Nucleo_ has joined #ocaml
<bluestorm_>
as an example, we could add a little "Option" module wich some convenience functions
<bluestorm_>
they are canonical
<pango>
at one time, my guess was that they wanted more functions to be left as exercices for students ;)
<bluestorm_>
i do not see how you could "maintain" them
<bluestorm_>
(the ('a -> 'b) -> 'a option -> 'b option and ('a -> 'b option) -> 'a option -> 'b option for example, how could you have to change them later ?)
<pango>
for those, an argument I've seen in mailing lists (maybe not official source, however) is, "you can easily define them yourself". Which is probably the worse reason ever given
Nucleo_2 has quit [Read error: 113 (No route to host)]
<bluestorm_>
hm
<bluestorm_>
i end up having a little "Prelude" module in my OCaml projects
<pango>
like most ;)
<tsuyoshi>
so why not write a module with that stuff.. and submit it to extlib
<pango>
because as long as it's not "official", you can't assume it will be available... and use your own Prelude module instead
<pango>
the whole extlib suffers from this problem
<pango>
that's specially true because extlib extensively uses runtime implementation-dependant features (Obj.magic ?), so many people will avoid it, unless it's officially supported
<tsuyoshi>
well, I am not going to just stick to the standard library.. there's hardly anything in it
<bluestorm_>
i haven't used the extlib yet
<bluestorm_>
difficult not to think "i don't really need that much" "i can code it myself, it's really simple"
love-pingoo has joined #ocaml
olegfink has joined #ocaml
<pango>
bluestorm_: that plagues many projects. Related problem is project embedding all the libraries they use, because there's no official automatic library installation mecanism (godi looks interesting, but it's not officially endorsed, is it?)
<bluestorm_>
hm
<bluestorm_>
i currently use godi
<bluestorm_>
and have seen no problem with it
<bluestorm_>
the 3.09 -> 3.10 transition is far more problematic
<bluestorm_>
i'm not sure "official endorsment" is something important for a package manager
<pango>
I'm sure of it
<pango>
That's 50% of Perl success
kelaouch1 has quit ["leaving"]
|Jedai| has joined #ocaml
screwt8 has quit [Remote closed the connection]
screwt8 has joined #ocaml
jedai has quit [Read error: 110 (Connection timed out)]
Cygal has joined #ocaml
dmentre has joined #ocaml
Smerdyakov has joined #ocaml
seafoodX has quit []
pango has quit [Remote closed the connection]
pango has joined #ocaml
[azoic] has joined #ocaml
cpst_ is now known as cpst
[azoic] has quit ["Leaving."]
CRathman_ has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
slipstream-- has joined #ocaml
gmh33 has joined #ocaml
slipstream has quit [No route to host]
np has joined #ocaml
np has quit ["User is away."]
np has joined #ocaml
np has quit [Client Quit]
buluca has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
olegfink has quit [Read error: 104 (Connection reset by peer)]