thelema has quit [Read error: 110 (Connection timed out)]
thermoplyae has joined #ocaml
awesame has quit []
morner has quit ["let's try a reboot"]
^authentic has joined #ocaml
thermoplyae has left #ocaml []
palomer__ has joined #ocaml
<palomer__>
hellp
<palomer__>
hello
<palomer__>
is it possible to get around the value restriction with type annotations?
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
<qwr>
palomer__: what value restriction?
<qwr>
about generic types?
<qwr>
palomer__: only on object methods afaik
thelema has joined #ocaml
<hcarty>
tsuyoshi: Thanks, seems to be working without it
ulfdoz has quit [brown.freenode.net irc.freenode.net]
gaja has quit [brown.freenode.net irc.freenode.net]
gim has quit [brown.freenode.net irc.freenode.net]
ppsmimou has quit [brown.freenode.net irc.freenode.net]
cygnus_ has quit [brown.freenode.net irc.freenode.net]
ertai has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
qwr has quit [brown.freenode.net irc.freenode.net]
ertai has joined #ocaml
ulfdoz has joined #ocaml
gaja has joined #ocaml
qwr has joined #ocaml
cmeme has joined #ocaml
ppsmimou has joined #ocaml
gim has joined #ocaml
a13x has quit [Read error: 113 (No route to host)]
a13x has joined #ocaml
ttamttam has joined #ocaml
ttamttam has left #ocaml []
wy has quit [Read error: 110 (Connection timed out)]
goalieca has quit ["Ex-Chat"]
hordf has joined #ocaml
love-pingoo has joined #ocaml
petchema has joined #ocaml
Demitar_ has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
ppsmimou has quit ["Leaving"]
ppsmimou has joined #ocaml
OChameau has joined #ocaml
Snark has joined #ocaml
Mr_Awesome has quit ["aunt jemima is the devil!"]
a13x has quit [Read error: 113 (No route to host)]
Yoric[DT] has joined #ocaml
seafood_ has quit []
dwmw2_gone is now known as dwmw2
Tetsuo has joined #ocaml
coucou747 has joined #ocaml
Snark has quit ["Ex-Chat"]
prince has joined #ocaml
hkBst has joined #ocaml
seafood_ has joined #ocaml
middayc has joined #ocaml
ppsmimou has quit [Remote closed the connection]
mwc has joined #ocaml
seafood_ has quit []
ppsmimou has joined #ocaml
Yoric[DT] has quit [Read error: 110 (Connection timed out)]
middayc_ has joined #ocaml
Yoric[DT] has joined #ocaml
AxleLonghorn has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
l_a_m has joined #ocaml
Jedai has joined #ocaml
bongy has joined #ocaml
hordf has quit ["Bye"]
AxleLonghorn has left #ocaml []
<ziph>
Can anyone think of a way to do something similar to a List.iter but with a call to a function between each item? I.e. if I have "write" as a function with a side effect and [1, 2, 3] I want to write "1, 2, 3".
<Smerdyakov>
You probably want a new higher-order function. Are you asking for suggestions for its type?
<ziph>
No, I'm trying to think of a way to do it with List.* since I'll only be doing it once in this application. ;)
<ziph>
It looks like a fold but with side effects. ;)
<petchema>
btw [1, 2, 3] is an (int * int * int) list
<ziph>
[1; 2; 3] rather
<Smerdyakov>
ziph, there's no good way to do it with [List.*].
<ziph>
It isn't a string, I was just using that as an example. It's a list of tokens that then get joined by something else (that is aware of formatting conventions).
<OatTop>
is there a way to read a single charecter from stdin? I've tried using "input_char stdin" but that buffers the input and requires the user to type a charecter and then press return.
<petchema>
Unix.select?
<Smerdyakov>
OatTop, your question is about your terminal settings, not OCaml.
<ziph>
Ocaml can't adjust the terminal settings?
<OatTop>
right... can I change the terminal settings somehow within the program to get the desired behavior?
<Smerdyakov>
Most people don't realize that, with standard terminal apps, it's not possible to "read a key," in any language. You have to set up your terminal weirdly.
<Smerdyakov>
OatTop, you might be headed towards using curses or similar.
<ziph>
I must be thinking of output buffering.
<OatTop>
curses is a bit too heavy for this application
<Smerdyakov>
I don't think you'll find another way that isn't similarly heavy.
<ziph>
Curses will either be calling unix functions on the stdin to change it and/or sending VT100 or similar codes to do it. If you can find out what those are (i.e. how you'd do it in C) you could implement that part.
<ziph>
If it is just VT100 codes you just need to send the sequences out of stdout.
<Smerdyakov>
ziph, except then the application won't work with other terminal emulations....
<ziph>
As nice as termcap is, does anything other than VT100 exist these days? ;)
<ziph>
But yes, if it is going to be a robustified application you probably want to look in to termcap (if it turns out you can do what you want with terminal codes)