<gildor>
f# on mono is not always running, depending on the version of the two products
<gildor>
(as far as i know)
<gildor>
some combination works, some doesn't
<Hhhhh>
hmm
<Hhhhh>
gtg, bbl
Hhhhh has left #ocaml []
miyako has quit [Read error: 60 (Operation timed out)]
mogunus has joined #ocaml
<mogunus>
Hello #ocaml!
<mogunus>
"As SICP is to lisp, so __________ is to ocaml."
<mogunus>
(right now I'm just reading the manual)
miyako has joined #ocaml
_zack has joined #ocaml
<mrvn>
sicp?
rwmjones_ has joined #ocaml
<mrvn>
Why do people join here and ask f# questions so often?
s4tan has joined #ocaml
kaustuv_` has joined #ocaml
Yoric[DT] has joined #ocaml
<mogunus>
SICP = structure and interpertation of computer programs
<mogunus>
It's a classic computer science textbook.
<mogunus>
It's a really fantastic read, it is done in lisp.
<mogunus>
I'm wondering if there is a similarly high quality book for ocaml, that everyone should really read?
<mogunus>
Not that the docs aren't good. I mean, something that applies the language in really cool ways to demonstrate things about computer science?
kaustuv_ has quit [Read error: 110 (Connection timed out)]
m3ga has joined #ocaml
jeanbon has joined #ocaml
hkBst has joined #ocaml
LeCamarade has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
Yoric[DT] has quit ["Ex-Chat"]
pants1 has joined #ocaml
hto has quit ["leaving"]
pants3 has joined #ocaml
pants1 has quit [Read error: 60 (Operation timed out)]
Mr_Awesome has quit [Read error: 60 (Operation timed out)]
Yoric has joined #ocaml
kaustuv_` has quit [Remote closed the connection]
kaustuv_` has joined #ocaml
ztfw has joined #ocaml
rwmjones_ has quit [Read error: 104 (Connection reset by peer)]
hto has joined #ocaml
_andre has joined #ocaml
<gildor>
mrvn: maybe there is no f# IRC channel ?
<javax_>
Yes there is
<gildor>
where it is (so we can tell people to ask things there) ?
rwmjones_ has joined #ocaml
<gildor>
ok #fsharp @ irc.freenode.net, but seems that there is only 12 people in there
<thelema>
people get better answers here, so they ask here
<Camarade_Tux>
ubuntu users ask in ##slackware too
dkcl has joined #ocaml
Mr_Awesome has joined #ocaml
<jamii>
How do I write corecursive functions in ocaml - something like "let rec f ... and let rec g"?
<Camarade_Tux>
let rec f = ... and g = ...
<jamii>
Cheers :-)
Mr_Awesome has quit [Connection timed out]
Mr_Awesome has joined #ocaml
<Camarade_Tux>
I wonder why there's no int32_unsigned_elt or int64_unsigned_elt in the Bigarray module, only 8 and 16 bits
<tsuyoshi>
well, unsigned int64 is not really possible.. there's no ocaml type you can use with that
<hcarty>
Camarade_Tux: I put a feature request in to Mantis for this
<tsuyoshi>
unsigned int32 would be easy enough though
th5 has joined #ocaml
<hcarty>
There is an unsigned integer library on the forge which provides uint32 and uint64 types and functions. No Bigarray support though.
<Camarade_Tux>
int32_elt is alright for me although I'd prefer int32_unsigned_elt but was surprising : the Bigarray module lists nearly all types you could wish, but two
* Yoric
has just finished his last lecture.
<mrvn>
Should be trivial to add UInt64.t and UInt32.t
<hcarty>
The Bigarray C portion is pretty straightforward to modify. If the UInt32 and UInt64 modules were added to OCaml (or Community OCaml) then updating Bigarray appropriately should be a pretty simple process.
<th5>
Is there an existing tool to serialize ML values (and types) into XML?
<kaustuv_`>
th5: no, but one can be written in principle with Camlp4. Cf. sexplib
<kaustuv_`>
If Bigarray is changed, I would also like to see unboxed ints as the accessor type for an Int32 bitarray on a 64 bit platform.
<kaustuv_`>
s/bit/big/
<th5>
thanks - i thought that something in camlp4 would be good but i wasnt sure what - right now i'm writing some code "by hand" to do it for some types im interested in - maybe i should look into doing it in the general case
deech has quit [Read error: 54 (Connection reset by peer)]
deech has joined #ocaml
<mrvn>
kaustuv_`: I would like to see type Int32.t = int
<mfp>
th5: there's also json-static, similar to sexplib, with JSON
<mrvn>
kaustuv_`: would make interfacing with C more difficult though.
<mrvn>
How can one even declare a type as type t = #if __amd64__ int #else Int32.t #endif?
<mfp>
th5: you can reuse most of sexplib's code: just convert the Sexp.t tree into an XML one type t = Sexplib.Type.t = Atom of string | List of t list
<mrvn>
Have an amd64.ml and i486.ml and copy the right one into place before building?
<mfp>
a trivial mapping is <atom>whatever</atom> / <list> ... </list>
<th5>
mfp: thanks - very helpful pointers
<mfp>
(if you don't want any particular XML structure, that is)
<th5>
right
<mfp>
th5: json_wheel's (json-static's underlying JSON lib) json_type is richer and easier to convert to XML
<kaustuv_>
mrvn: Int32.t = int is not possible because marshalling is meant to be portable
<th5>
any of these will work - i'm really just interested in algebraic data types
<mrvn>
kaustuv_: then how does it marshal an 63bit int to 31bit?
<kaustuv_>
It gets truncated on a 32 bit platform. Same as marshalled nativeints
<kaustuv_>
the point is that the memory layout is compatible
<mrvn>
kaustuv_: when reading or when writing?
willb has joined #ocaml
<kaustuv_>
Reading an int that was marshalled on a 64 bit architecture will truncate if the native word size on the reader is 32 bits. In the other direction there are no problems -- a 64 bit architecture can unmarshall anything.
kaustuv_ has left #ocaml []
<mrvn>
Does marshaling output ints as 64bit or does it have a flag saying 32/64?
munga_ has joined #ocaml
ztfw has quit [Read error: 104 (Connection reset by peer)]
<mfp>
mrvn: IIRC it uses a variable length encoding, so small values are encoded in 1 byte and so on
<mrvn>
mfp: wow
<mfp>
wow?
<mfp>
that's pretty common
<mrvn>
It is too bad there is no int32/int64 tag for blocks. With that one could have int32 as tagged value or tagged block and marshal from/to each.
Yoric has quit ["Ex-Chat"]
<flux>
would it break anything if such tags were added?
<Camarade_Tux>
and no sort for bigarrays =/
palomer has joined #ocaml
<hcarty>
mrvn: pa_do has an int63 example
<hcarty>
mrvn: It uses Int64.t on 32bit systems and int on 64bit systems
<hcarty>
Camarade_Tux: You could submit one for Batteries!
th5 has quit []
Spiwack has joined #ocaml
pants3 has quit [No route to host]
<Camarade_Tux>
not having a sort on bigarrays is a major pain for me : I can't play with 512MB arrays ;p
<Camarade_Tux>
so maybe I'll end up writing one but I'm not sure, those arrays are getting needlessly big ;p
pants1 has joined #ocaml
<flux>
camarade_tux, I guess you want in-place sort too, which is something ocaml doesn't have
<hcarty>
flux: Array.sort sorts in-place
<flux>
ah, indeed
<flux>
I misread the signature
<flux>
was going to copypaste it to you ;)
<kaustuv>
<mrvn> It is too bad there is no int32/int64 tag for blocks.
<kaustuv>
It's easy enough to do. See, for example, http://ln-s.net/3$O3
Amorphous has quit [Connection timed out]
<kaustuv>
the to_custom function is of type 'a -> custom where
<kaustuv>
type custom = I32 of int32 | I64 of int64 | Ni of nativeint | Custom
Amorphous has joined #ocaml
s4tan has quit []
<mrvn>
kaustuv: I'm talking about the GC, not variant types.
pants1 has quit [No route to host]
<kaustuv>
As am I.
<mrvn>
type custom would be a block with 2 values. Int32/Int64 is block+value.
<kaustuv>
type custom is just the return type. The to_custom function examines the identifier in the custom_ops field of the input to figure out if it's an int32/64/nat
<mrvn>
kaustuv: You guess but you are not sure.
pants1 has joined #ocaml
<mrvn>
kaustuv: On 64bit I want Int32.t to be a (x<<2+2) or something.
<mrvn>
Like normal int but with a different tag.
<kaustuv>
Ah, I think we're talking about different things here.
<mrvn>
On 32bit a boxed value with int32/int64 tag.
<mrvn>
That way you could still marshal them
<mrvn>
kaustuv: yes.
<kaustuv>
You can suggest this on mantis, but I think it has been considered before and discarded
pants2 has joined #ocaml
<mrvn>
First I should try both ways and see if it makes a speed difference worth the effort.
pants1 has quit [Read error: 60 (Operation timed out)]
<mrvn>
But it is probably better to make the source use int32/int depending on arch directly and forget about marshaling.
<mrvn>
aynway, train calls.
<kaustuv>
sorry to rant, but why is there an Haskell vs. Ocaml flamewar every day on reddit these days?
<Spiwack>
Only once a day?
<Spiwack>
That's a bit disapointing
<Spiwack>
Anyway, Haskell is for fags
<Spiwack>
(now I can get back to work)
smimou_ is now known as smimou
LeCamarade has quit ["Gone."]
willb has quit [Connection timed out]
<Camarade_Tux>
I "enjoyed" the recent bad comments against haskell, after seeing only good ones, I was starting to think it had no flaw
<kaustuv>
is there any Emacs support for the revised syntax?
Hydrant has left #ocaml []
_zack has quit ["Leaving."]
willb has joined #ocaml
munga_ has quit ["Ex-Chat"]
ChristopheT has joined #ocaml
ChristopheT has quit [Remote closed the connection]
<mellum>
kaustuv: does anyone really use it?
<Camarade_Tux>
he, it seems there will soon be 10 gui frameworks in ocaml :p
<Spiwack>
10?
willb has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
2 or 3 frameworks have been announced in about one week ;-)
<Spiwack>
There was a need, now I guess the focus needs a shift :p
<Spiwack>
Gotta go, good night
<mrvn>
Any one suitable for games?
Spiwack has quit ["Leaving"]
komar_ has quit [Read error: 104 (Connection reset by peer)]
komar_ has joined #ocaml
jamii has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has joined #ocaml
willb has joined #ocaml
Snark has quit ["Ex-Chat"]
thelema has quit [Read error: 110 (Connection timed out)]
_andre has quit [Read error: 104 (Connection reset by peer)]
_andre has joined #ocaml
<palomer>
cool
<palomer>
im working on a gui framework too!
dkcl has left #ocaml []
kaustuv has quit ["ERC Version 5.3 (IRC client for Emacs)"]
fremo has quit [Remote closed the connection]
fremo has joined #ocaml
fremo is now known as Guest77599
TaXules has quit [Remote closed the connection]
<palomer>
hrmph
<palomer>
how do you encode existentials using universals?