lamawithonel has quit [Read error: Connection reset by peer]
wagle has quit [Ping timeout: 260 seconds]
wagle has joined #ocaml
fraggle_laptop has joined #ocaml
ymasory has quit [Quit: Leaving]
fraggle_laptop has quit [Quit: Quitte]
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
ankit9|zzz has quit [Ping timeout: 240 seconds]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
bzzbzz has quit [Quit: leaving]
philtor has joined #ocaml
ymasory_ has quit [Quit: Leaving]
ymasory has joined #ocaml
emmanuelux has quit [Quit: Ex-Chat]
vivanov has joined #ocaml
ygrek has joined #ocaml
mjonsson has quit [Ping timeout: 276 seconds]
mcclurmc_home has joined #ocaml
hto_ has joined #ocaml
jderque has joined #ocaml
hto has quit [Ping timeout: 240 seconds]
spicey has joined #ocaml
<spicey>
How exactly to get a new slice of a flat c/int8 bigarray? I have a blob loaded from file and would like to extract a block (len, offs) to a new byte array to pass to external function, but am confused at how to do that
<spicey>
(i.e. apart from creating a new array and manually copying via loop, byte after byte)
<adrien>
spicey: Bigarray.Array1.sub?
<spicey>
yes, thank you! (aargh, looked at Bigarray.Genarray, but didn't look into obvious Bigarray.Array1)
<adrien>
=)
Snark has joined #ocaml
jderque has quit [Quit: leaving]
Cyanure has joined #ocaml
mcclurmc_home has quit [Ping timeout: 246 seconds]
philtor has quit [Read error: Operation timed out]
jamii has joined #ocaml
hto_ has quit [Ping timeout: 258 seconds]
ikaros has joined #ocaml
mattam has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Quit: Associat0r]
vivanov has quit [Ping timeout: 276 seconds]
vivanov has joined #ocaml
hto has joined #ocaml
jderque has joined #ocaml
hto has quit [Ping timeout: 240 seconds]
edwin has joined #ocaml
Rolands has joined #ocaml
Rolands has quit [Ping timeout: 240 seconds]
jamii has quit [Ping timeout: 248 seconds]
edwin has quit [Quit: Leaving.]
edwin has joined #ocaml
wieczyk has quit [Quit: leaving]
vivanov has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
impy has quit [Quit: impy]
emmanuelux has joined #ocaml
boscop_ is now known as boscop
orbitz has quit [Ping timeout: 240 seconds]
lopex has joined #ocaml
orbitz has joined #ocaml
ymasory has quit [Quit: Leaving]
lopex has quit [Ping timeout: 240 seconds]
oriba has joined #ocaml
impy has joined #ocaml
lopex has joined #ocaml
pdhborges has joined #ocaml
jderque has quit [Quit: leaving]
emmanuelux has quit [Ping timeout: 248 seconds]
pdhborges has quit [Quit: Leaving.]
vivanov has quit [Quit: Lost terminal]
impy has quit [Quit: impy]
hto has joined #ocaml
jderque has joined #ocaml
impy has joined #ocaml
smerz has joined #ocaml
mjonsson has joined #ocaml
vivanov has joined #ocaml
Associat0r has joined #ocaml
philtor has joined #ocaml
drunK has joined #ocaml
hto has quit [Ping timeout: 246 seconds]
_habnabit has joined #ocaml
ymasory has joined #ocaml
yezariaely has joined #ocaml
yezariaely has left #ocaml []
impy has quit [Quit: impy]
philtor has quit [Ping timeout: 240 seconds]
pdhborges has joined #ocaml
pdhborges has quit [Client Quit]
__marius__ has joined #ocaml
lpereira has quit [Ping timeout: 260 seconds]
mfp has quit [Ping timeout: 248 seconds]
mfp has joined #ocaml
Associat0r has quit [Quit: Associat0r]
__marius__ has quit [Remote host closed the connection]
jderque has quit [Quit: leaving]
jderque has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
<adrien>
does anyone know if the Str module uses low-level functions that wouldn't be available early in the boot process (_right_ after init)
Associat0r has joined #ocaml
<flux>
by boot process you mean operating system boot?
<adrien>
yes, sorry for not mentionning it
<flux>
I don't see what it could possibly use that aren't available there
<flux>
init typically links against libc.
<flux>
there could be some room if you mean 'the first init' in a booting linux system, in an initrd configuration
<flux>
but even then..
<adrien>
I'm making slackware boot zomgfast and I'm using bootchart to get a profiling but it uses bash scripting and it's too slow for the resolution I need
<adrien>
the way to use bootchartd is: init=/sbin/bootchartd (replace init)
<adrien>
anyway, rebooting now, with strace
<flux>
I wonder how far you'll get :)
<adrien>
currently, I'm trying to find where I can write strace's output
<thelema>
even if Str made wierd kernel calls, they're all available when init is running
Cyanure has quit [Ping timeout: 240 seconds]
<adrien>
I wasn't really thinking that was the issue but Str is a bit weird and it's hard to get infos that early in the boot
<adrien>
think I can have strace's output now
eye-scuzzy has joined #ocaml
<thelema>
adrien: str is pure ocaml except for a backtracking NFA interpreter written in C
Cyanure has joined #ocaml
<adrien>
looks like it's a call to rt_sigaction
impy has joined #ocaml
Snark has quit [Quit: Ex-Chat]
nantralien has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
nantralien is now known as Anarchos
goodside has quit [Quit: Lost terminal]
impy has quit [Quit: impy]
<NaCl>
is there a way to "open" a module in a function?
<flux>
in 3.12 you can do let open M in ..
<NaCl>
ooooohh
<NaCl>
kewl
* NaCl
is not used to type inference
* NaCl
thought that it could infer from previous uses of a variable
<thelema>
it can
<NaCl>
in this case, it seems not to be doing so
ygrek has quit [Ping timeout: 246 seconds]
<NaCl>
It probably doesn't help that I am using the same fields within a record
ztfw has joined #ocaml
<NaCl>
I reference fields up and right in the previous two lines, which are unique to that type, but the moment I use "direction", ocaml thinks the type has somehow magically changed
<flux>
are you using the toplevel, btw?
<NaCl>
not here
<NaCl>
compiling with ocamlbuild
<NaCl>
(to native)
<flux>
can you give a small example demonstrating the issue?
<NaCl>
sure, one moment
ymasory has quit [Quit: Leaving]
<Anarchos>
NaCl you can also do local modules : let L = module X in L.f();;
<NaCl>
Anarchos: I am close to doing that, but Module.(+) doesn't look pretty
<NaCl>
adrien: are record accesses like whatever.x interpreted like a function "get_x whatever"?
<NaCl>
because that would explain the problem
<flux>
nacl, yes, sharing field names doesn't really work
<flux>
it's not different, from ocaml's point of view, than sharing value names or type names
<NaCl>
ah.
<flux>
works in a similar fashion: new definitions shadow older ones
<NaCl>
do objects have this limitation?
<flux>
no
<flux>
what I do is that I prefix field names with some memento
<flux>
it can nice when reading code as well: you always know what type the code is referring to
<NaCl>
gotcha
<flux>
alternatively you can pack the types into their own modules
<NaCl>
hm
<flux>
module Foo = struct type t = { x : int; b : int } end
* NaCl
is still a relative newbie :P
<flux>
and then let a = { Foo.x = 42; y = 15 }
<flux>
or let extract_x foo = foo.Foo.x
__marius__ has joined #ocaml
<flux>
so it gets a bit more verbose. the local open in 3.12 should remedy that a bit.
<flux>
nacl, don't worry about it, this is something I think most newcomers will bump into sooner or later :)
<NaCl>
So, for infix operators, it would just be "a Module.(+) b"?
<adrien>
Module.(+) a b
<adrien>
when you write (+), you get a "regular" function: (+) a b
<flux>
hey, I learned something new here as well :)
<flux>
but typically infix operators have non-infix aliases as well
<NaCl>
blah
* NaCl
was trying to make this pretty
<NaCl>
oh, well
<flux>
nacl, btw, the another syntax for local open might help
<flux>
nacl, you can do this: SomeModule.(a + b)
<flux>
..in 3.12
<NaCl>
flux: that's a lot better. Yeah, I've got 3.12
* NaCl
has 16 ocaml packages in openSUSE
<flux>
ah, I just installed debian on my new shiny SSD
<flux>
..and now I have easy access to 3.12 as well \o/
<flux>
(I used to run ubuntu 9.10)
__marius__ has quit [Remote host closed the connection]
<flux>
there isn't an ocaml meta package around to install all useful stuff for me, is there?
__marius__ has joined #ocaml
<NaCl>
I wouldn't know. I've avoided debian since I realized how much they mess with packages.
<flux>
so, other distributions mess less? or you just don't know that about them?-)
<NaCl>
Well...
<NaCl>
I came from Slackware, which messes with nothing
<NaCl>
I wouldn't like to run SUSE on a server too much
oriba_ has joined #ocaml
<NaCl>
I haven't tried server apps too much, but on debian, the default module layout made me headdesk for about 2 hours
<NaCl>
and I have no idea what they did to pure_ftpd
Cyanure has quit [Remote host closed the connection]
oriba has quit [Ping timeout: 246 seconds]
<adrien>
to be fair, in the case of ocaml, I don't think there can be many complains about ocaml on debian =)
<NaCl>
flux: ask gildor. :P
<NaCl>
adrien: probably true
<NaCl>
adrien: the problem with caml in suse is that, well, I don't want to maintain 15 extension modules
<adrien>
yeah, it's too much for only one, except some of the people in the slackware team maybe :P
<NaCl>
There's more group ownership there
impy has joined #ocaml
<adrien>
ah, reminds me I had to find an ocsigen developper and force her to stop it from messing with my /dev/null during build (or maybe it's only with the godi package)
<NaCl>
adrien: nice thing about suse is that I can recycle RPM spec files
* NaCl
thanks rwmjones
<adrien>
yeah, and the packages are pretty good too
<NaCl>
yeah. they only require minimal modification
<NaCl>
adrien: I doubt they will be accepted into the distribution, though. I use the internal RPM dep generator.
<NaCl>
SuSE doesn't
<adrien>
(no idea what that means ;p )
<NaCl>
adrien: suse uses shell scripts to resolve dependencies. by default, rpm (and thus fedora) use a builtin generator
<adrien>
hmmm, ok
<adrien>
bootchart(.org) is really limited: the "sensor" uses so much shell scripting that it doesn't "scale"
<NaCl>
quick! reimplement the whole thing in ocaml!
* NaCl
is having to do a lot of typecasting
<NaCl>
uh
<adrien>
NaCl: of course I'm rewriting it in ocaml =)
lamawithonel has joined #ocaml
<Anarchos>
adrien hello
<adrien>
hi Anarchos
<Anarchos>
adrien i found a solution
<Anarchos>
adrien use a ref declared in lexer.mll
<Anarchos>
and open it as a local module which i can modify at will
<NaCl>
adrien: you know what ould be nice? If there were imagemagick bindings for ocaml
<adrien>
there are gd graphics and hllll
<NaCl>
hllll?
<adrien>
typo: 'l' and 'm' are adjacent on azerty keyboard