<flux>
but I really do wonder if it's easy to compile today..
<Shado>
flux: u mean it is old?
<flux>
slightly
<Shado>
flux: so can we say that 90% of actual use of ocaml is in compilers and proof checkers?
<flux>
I think 90% is way too high
<flux>
perhaps 30%
<Shado>
mmm
willb1 has joined #ocaml
<Shado>
well I am exicted to learn something new.. but I need something to motivate be about this language... unfortunately all I saw so far is poor number of books and OSS apps
<dcolish>
flux: have you considered doing a snapframework-like project in ocaml?
<flux>
dcolish, I don't know what is snapframework
<flux>
but I don't like frameworks a lot :). I prefer libraries..
<dcolish>
its not really a framework
<dcolish>
but its a haskell web library based on combinators
<flux>
so, what does it do? construct web pages?
<dcolish>
similar in design philosophy to python's flask
thomasga has quit [Quit: Leaving.]
<Shado>
ah you just reminded me of haskell! thanks folks! :D
<ocp>
it will help us attract more people to OCaml
<ocp>
by understanding what needs to be improved
<ocp>
thanks !
<ocp>
(won't take much time, only 7 questions)
thieusoai has quit [Remote host closed the connection]
<jonafan>
ocamljs is pretty nifty
oriba has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
<Anarchos>
I am looking for a way to dynamically add rules to an ocamlyacc grammar
olauzon has joined #ocaml
Cyanure has joined #ocaml
oriba has joined #ocaml
ymasory has quit [Quit: Leaving]
everyonemines has joined #ocaml
<everyonemines>
There's something I don't understand about Unix.fork (). When I compile this simple program:
<everyonemines>
output_string stdout ("test\n");;
<everyonemines>
Unix.fork ();;
<everyonemines>
"test" is printed twice.
<Anarchos>
everyonemines because outputs are delayed
<Anarchos>
until you call fflush(stdout)
olauzon has quit [Quit: olauzon]
<ocp>
because output_string puts the string in a buffer, that is only flushed at the end of the program
<everyonemines>
ah
<ocp>
and since your program terminates twice...
<everyonemines>
thanks
_andre has quit [Quit: leaving]
douknoukem has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
DOUK has quit [Ping timeout: 260 seconds]
enthymeme has quit [Ping timeout: 258 seconds]
ftrvxmtrx has quit [Read error: Connection reset by peer]
ocp has quit [Ping timeout: 248 seconds]
jderque has quit [Quit: leaving]
edwin has quit [Quit: Leaving.]
cthuluh has joined #ocaml
Cyanure has quit [Remote host closed the connection]
thelema has quit [Read error: Connection reset by peer]
ymasory has joined #ocaml
thomasga has quit [Quit: Leaving.]
DOUK has joined #ocaml
douknoukem has quit [Ping timeout: 260 seconds]
alexgordon has quit [Read error: Operation timed out]
astertronistic has joined #ocaml
thelema has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<everyonemines>
I'm trying to use Unix.system but it doesn't understand spaces in file paths.
<everyonemines>
I think that there's a faulty regex in there somewhere, which just splits by " "
<everyonemines>
without accounting for "\ "
<everyonemines>
All I want to do is run a command line argument normally....
<everyonemines>
I tried execv, and it replaces "\ " with " "
<everyonemines>
!!!!!
<ecc>
that's just OCaml handling the backslash in a string constant -- nothing to do with execv etc. If you want to escape the space in a filename for Sys.command, try using two backslashes.
<ecc>
for example, Sys.command "cat my\\ file\\ with\\ spaces"
<everyonemines>
I was using Unix.system, hmm
eikke has joined #ocaml
<ecc>
same logic applies, since the command line is passed to /bin/sh
<everyonemines>
thanks though
<everyonemines>
that works. should I have known that?
<eikke>
if (in a rather low-level app) I need to allocate some fixed-size chunks of memory (several kb each), which should never be released during the app runtime, and I should be able to easily copy strings into the block at any given position, whats the data type I should be looking at?
<everyonemines>
well i'm not an ocaml expert but how about
<everyonemines>
an array of chars with array.blit
<eikke>
I've been looking into that :) was wondering wheter there'd be a 'better' solution
<eikke>
sheets: looked into buffer as well. that seems to have resizing support, which I wont ever need, so might be some useless overhead there
<sheets>
eikke: the overhead would be a conditional on the range ops? is that too much?
<eikke>
sheets: not sure :) I should check the implementation for sure
<sheets>
eikke: if you use an array, i believe there is boxing overhead
<eikke>
oh
<sheets>
eikke: i am also not an expert, however, and so I may misunderstand the internals of both of these libs
<everyonemines>
you can use bigarray
<everyonemines>
that's unboxed right?
<everyonemines>
iirc array is boxed, bigarray is unboxed
<sheets>
you'll be storing characters in integers?
<eikke>
no
<eikke>
in C I'd malloc(size * sizeof(char)) and memcpy into the area ;)
<eikke>
I know I'm thinking too low-level from an FP pov
<sheets>
i think you'll have to force them to be int8 or int16 or whatever is appropriate for your chars, i don't think bigarray supports non-numeric parameter types
<everyonemines>
wait, I think you want String.blit
<everyonemines>
don't know the internal details of string but I'd guess that's what you want
<eikke>
hmh, might make sense... a string is a char[] with some metadata anyway, right?
<eikke>
night calls, will look into this further tomorrow. thanks!
impy has joined #ocaml
Yoric has quit [Quit: Yoric]
willb1 has quit [Ping timeout: 276 seconds]
eikke has quit [Ping timeout: 260 seconds]
thieusoai has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
everyonemines has left #ocaml []
enthymeme has joined #ocaml
willb has joined #ocaml
dnolen has joined #ocaml
alexgord- has joined #ocaml
Amorphous has quit [Ping timeout: 252 seconds]
olauzon has joined #ocaml
valross has joined #ocaml
Amorphous has joined #ocaml
olauzon has quit [Quit: olauzon]
lopexx has joined #ocaml
lopex has quit [Ping timeout: 240 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
boscop has quit [Read error: Connection reset by peer]