<salierix>
bluestorm_, binary int32? What else would it be?
<bluestorm_>
you could read a textual representation of an int
<salierix>
Oh that's what you meant... yeah it's a binary int32.
buluca has joined #ocaml
piggybox_ has quit [Connection timed out]
piggybox has joined #ocaml
seafood_ has joined #ocaml
mvitale_ has joined #ocaml
seafood_ has quit []
buluca has quit [Read error: 113 (No route to host)]
Jedai has joined #ocaml
gim has quit [Remote closed the connection]
gim has joined #ocaml
jlouis has joined #ocaml
Torment has quit [Read error: 110 (Connection timed out)]
<flux>
salierix, read four bytes (characters) and produce the final value from those bytes
jlouis_ has quit [Read error: 110 (Connection timed out)]
<flux>
rwmjones, the library looks very nice; also nice that you've bothered to write the web page which seems to give a very nice overview of its capabilities
<bluestorm_>
rwmjones: do you know what XenSource is using ocaml for ?
<rwmjones>
bluestorm_, all their proprietary enterprise stack is apparently written in it
<rwmjones>
XenEnterprise is the name
<flux>
rwmjones, are the licencing conditions still under consideration? not finding a copying- or licence-file..
<rwmjones>
for libunbin?
<rwmjones>
it's basically LGPL, except for standalone programs which are GPL -- standard Red Hat licenses for everything
<flux>
plain LGPL is problematic for ocaml program, which doesn't have shared libraries - essentially renders LGPL into GPL
<flux>
(hence the often-found exception when people LGPL ocaml libraries)
<rwmjones>
sorry I meant LGPL with the linking exception
<rwmjones>
I'll change the web page to state this later (on a call at the moment)
<flux>
no horry, I don't think I'll really have any use for that now, but perhaps I will at some day :)
<flux>
no hurry, even
<flux>
also, perhaps a link to the cil web page would be nice, apparently it does a lot of the magic
<flux>
I don't think there is much other cil-based C-interoperability-software for ocaml?
<flux>
hm, apparently there is a Cil around with a META-file - in redhat, I suppose?
Ian__ has joined #ocaml
Ian__ has left #ocaml []
univac has quit [Read error: 104 (Connection reset by peer)]
<tristram>
do you know if it possible to have a gaussian random distribution (easily if possible ?)
<rwmjones>
it's a pain in the neck to get it into a reasonable shape for an RPM, because it hard-codes a (stupid) directory structure all over the place
Tetsuo has quit [Remote closed the connection]
szsz_ has joined #ocaml
<hcarty>
tristram: ocaml-gsl may have something you can use
<tristram>
thks
szsz_ has quit [Read error: 113 (No route to host)]
<salierix>
Is it possible to grow an array?
<tristram>
no
crathman has joined #ocaml
<unfo->
but if you get Array seeds from the garden shop?
<hcarty>
rwmjones: libunbin looks very useful. Thanks for putting it out.
<rwmjones>
salierix, no, but extlib has a hairy implementation of a growable array
<rwmjones>
salierix, called DynArray - it's hairy because it uses Obj.magic IIRC
<Yoric[DT]>
salierix: from what I see, I assume it's floating point arithmetics.
<Yoric[DT]>
OCaml is not very good at that...
<salierix>
Why doesn't the ocaml interpreter seem to have any history to recall previously entered expressions?
<bluestorm_>
salierix:
<bluestorm_>
you can use an external tool for that
<bluestorm_>
i use rlwrap
<bluestorm_>
but ledit does the job too
<flux>
rlwrap is perhaps the nicer one; I used to use ledit..
<flux>
although it doesn't actually answer the requestion: I suppose because external tools handle the case so nicely that it hasn't been a priority :)
<flux>
s/re//
<bluestorm_>
i think the main explanation is that GNU readline raise licensing issues
<bluestorm_>
but anyway flux is right
<bluestorm_>
having an external tool for that is nice
<bluestorm_>
flexible and simple, no code bloat
<flux>
gnu readline isn't the only option, there is a bsd-licensed competitor; I don't recall its name
<flux>
s/competitor/alternative/ :)
* Yoric[DT]
uses rlwrap.
<salierix>
The rlwrap gentoo package is masked for some reason :\
<flux>
I use rlwrap with some other tools also.. like gnuplot.
<mbishop>
rlwrap is nice
<bluestorm_>
flux: doesn't gnuplot have a native history handling ?
<flux>
it does, but its command line editor sucks otherwise
<salierix>
Why didn't I hear about rlwrap until now... pretty cool.
<bluestorm_>
alias ocaml='rlwrap ocaml' might be a good idea
<flux>
you might want to add a flag for saving the history too, it's pretty useful
<salierix>
Anyway, to grow an array couldn't I just call Array.append?
<bluestorm_>
yes you could
<bluestorm_>
but that would'nt modify your first array in-place
<bluestorm_>
that's not "growing" : there is a higher overhead
<salierix>
Do you mean the elements are copied?
<bluestorm_>
yes
<Yoric[DT]>
Really, if you want growable arrays, use Extlib.
<bluestorm_>
the question is : are those array in an important part of your code ?
<bluestorm_>
if you use them 3 times during initialisation, you could even use association list or whatever
<salierix>
I'm trying to implement the cult of the bound variable um from the 2006 icfp contest.
<salierix>
Hm, actually I could probably use a list...
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
<flux>
uh.. I just wrote a function produce_consume (('a -> unit) -> unit) -> (('b -> 'a option) -> 'c) -> 'c, and it's bloody ugly
<flux>
btw, who can guess what it does, based on name and types?-)
<bluestorm_>
hm
* Yoric[DT]
notices that 'b is ignored.
<flux>
that's actually a good point!
<flux>
it can be ()
<flux>
but maybe it's a bug :)
<flux>
yes, had a function with parameter where a unit was to be expected; obviously unit worked too
<flux>
the purpose of the function is to glue to higher order functions together - yes, it's side-effectful
<flux>
that is something I've been intending to do, but my results have not been very satisfying
<flux>
I've had the same approach though: select, project, join
<flux>
however, expressing joins wasn't very nice. and it didn't have static properties the compiler would be able to check - on the other hand, that allows even more dynamic queries
<flux>
but being able to compose the queries is definitely a very interesting thing for me, because I have tons of hand-written sql-expressions; many would be simplified if they could use other queries as part of them
<flux>
(it doesn't have any camlp4, which would also be nice)
<flux>
that document does give me a few more ideas, though..
<bluestorm_>
however, his use of polymorphic variant seems very useful to retain typing information
<bluestorm_>
see
<flux>
I don't think it's that strange it's similar, it stems from the theory.. however, I haven't read the theory that much, perhaps I should :)
<bluestorm_>
if you had blogged this just a few days ago, i'd have said "looks very interesting" :-'
<bluestorm_>
(sometimes i think 'we' (= the others) could do something like a planet)
<flux>
I think my approach may be a bit more pragmatic than his, though.. but he hasn't revealed everything, so it's difficult to say
<flux>
I'm thinking all the troublesome queries that don't directly map into a simple cross join etc
<bluestorm_>
:p
<flux>
also, my system doesn't construct working queries for all situations, so perhaps there is a reason for not attempting to implement everything sql can do :)
<flux>
actually what could really simplify my code would be to grab that idea of renaming columns, that has been a real problem for me
<flux>
when I'm joining two tables, I still refer to the original names in the select. so if I then again join that with something else, I still need to refer to the original names
<flux>
and finally if I join something with a table that's already in the query, I'm in deep trouble
<flux>
not to mention the queries can become quite hideous: SELECT * FROM (SELECT site, name FROM site) AS i4g(i4g_0, i4g_1) WHERE (i4g.i4g_0) IN (SELECT i6j.i6j_2 FROM (SELECT * FROM (SELECT client, name FROM client) AS i1g(i1g_0, i1g_1) LEFT JOIN (SELECT host, ip, site, client FROM host) AS i3g(i3g_0, i3g_1, i3g_2, i3g_3) ON ((i1g.i1g_0) = (i3g.i3g_3))) AS i6j(i6j_0, i6j_1, i6j_2, i6j_3, i6j_4, i6j_5)) - it's not very smart..
<salierix>
Anyone here know anything about CPU architecture?
<tristram>
is #øcaml the place to ask about cpu architecture ?
<salierix>
Not really, I'm just curious about something.
<flux>
about what?
<salierix>
I'm curious why CPU designers keep adding more cache to the chips instead of on-die addressable memory.
<flux>
I've thought that's because lots of memory takes lots of space, and it is advisable to keep distances short when you are running at 3GHz - and when you don't want to have a very large cpu
Tetsuo has quit [Remote closed the connection]
<flux>
also I think the on-die memory is somehow different from your regular system memory. but perhaps someone else knows the specifics, or perhaps some website explains these things.
<flux>
and I'm not off to sleep, happy research :)
<salierix>
Yeah, there is probably some reason for it.
<flux>
uh, s/not/now/, quite a change in meaning..
<bluestorm_>
hm
<bluestorm_>
i haven't considered it before
<bluestorm_>
but when you're running at 3Ghz
<bluestorm_>
you actually have to do really small circuits
<bluestorm_>
to avoid problems with the "slow" speed of light :)
<salierix>
The most disappointing aspect of computers right now is that system memory is so slow.
<salierix>
In comparison to the CPU.
<salierix>
That and winchester hard drive are still exist.
Yoric[DT] has quit [Read error: 113 (No route to host)]
salierix has left #ocaml []
nuncanada has joined #ocaml
ita has joined #ocaml
asmanur has quit [Remote closed the connection]
piggybox has quit [Read error: 104 (Connection reset by peer)]
kelaouchi has quit [Read error: 110 (Connection timed out)]
filp has quit ["Bye"]
ita has quit ["Hasta luego!"]
szsz_ has joined #ocaml
thermoplyae has joined #ocaml
<thermoplyae>
if i make two record types with overlapping names, ocaml gets angry when it tries to type them on its own
<thermoplyae>
is there a way to explicitly type them and shut the compiler up?
szsz_ has quit [Read error: 104 (Connection reset by peer)]
<bluestorm_>
thermoplyae: afaik, you cannot
<bluestorm_>
you have to avoid overlapping names
<bluestorm_>
modules could be helpful
<thermoplyae>
lame, but modules are a reasonable solution. thanks