sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
m3ga has quit ["disappearing into the sunset"]
Submarine has quit [Remote closed the connection]
pango_ has joined #ocaml
Eridius has joined #ocaml
twobitsprite has joined #ocaml
<twobitsprite>
I know this isn't the proper channel for this, but has anyone heard of/used the C-- compiler back-end? (the reason I ask here is that it's writen in OCaml)
<twobitsprite>
and I was starting to think that C-- was kind of dying; it's webpage hasn't been updated in a while, and I can't find any info on it anywhere...
<malc_>
there's quite short wikipedia article
<malc_>
there's -dcmm in ocaml.. though its relevance to c-- escapes me
pango has quit [Remote closed the connection]
<twobitsprite>
hmm
<tsuyoshi>
what is c--
Eridius has quit []
<mbishop>
a middle man for C and machine code
<tsuyoshi>
huh? c isn't good enough?
<tsuyoshi>
did they ditch the shorts and longs and move to dwords and words?
<malc_>
this sentence makes no sense whatsoever
<tsuyoshi>
uhm.. you ever program in assembly?
<flux__>
tsuyoshi, read up on it.. it seemd to me c-- is better suitable for an intermediate stage bdefore assembly than c
<flux__>
for example c doesn't really provide tail-calls, although the compiler _may_ provide them in some cases
<malc_>
uhm.. don't you think that assembly in arbitrary context is a tad bit underdefined to begin with
<flux__>
well, what tsuyoshi seemed somewhat relevant to and sane to me, I have thought words and dwords being somewhat universal machine concepts?
<malc_>
nope
<tsuyoshi>
well.. outside of x86 I think they usually just call them words and not dwords
<malc_>
the ISA definition for my other machine has word at 32bit dword at 64bit and 16bit is halfword
<malc_>
and fwiw bit is binary
<flux__>
well,, their width might not be, so maybe you have a point there :)
<mbishop>
still, making asm output for all your archs can get kind of annoying, easier to go to C--, then make that work on the arch
<flux__>
but the point is that word for an architecture is atleast more meaningful than for a c-colmpiler
<tsuyoshi>
yeah.. tail calls in c are difficult
<malc_>
mbishop: and this declaration is based on what exactly?
<malc_>
i mean was there a study?
<mbishop>
No? maybe the haskell guys did one though :P
<flux__>
people in real world got annoyed by it and switched to c-- ?-)
<mbishop>
it's the same idea as LLVM
<flux__>
I believe c-- exists due to a real need
<twobitsprite>
well... it's sponsored by microsoft research, no?
<malc_>
twobitsprite: yes
<malc_>
exists yeas, being used.. well let's just say - not yet
<malc_>
-a
twobitsp1te has joined #ocaml
<flux__>
hmph, (www.)cminusminus.org doesn't resolve to an ip for me..
<flux__>
oops, I missed a line.. my mobile terminal nevertheles refused to resolve it :)
<flux__>
hmph, but it doesn't work with an IP - darn vhosts
<flux__>
time to sleep I guess
<tsuyoshi>
hmm.. but isn't nearly everyone using x86 now
<tsuyoshi>
what's the point in going higher than assembly anymore for a compiler
<tsuyoshi>
I guess there's still arm
<twobitsp1te>
that mentality leads to stagnation
<twobitsp1te>
who knows if someday PPC will make a come back, or some other architecture will come around
<tsuyoshi>
haha ppc isn't making a comeback anymore than 68k is
<twobitsp1te>
and besides... plenty of businesses/etc still use things like AIX on pSeries, etc
<tsuyoshi>
is aix still developed?
<malc_>
erm.. yes
<malc_>
and fwiw PPC powers "all" current consoles
<malc_>
and Intel still thinks that Itanium is the future
<malc_>
so narrowing it down to x86(_64) is a bit premature
<mbishop>
embedded devices still use ARM or MIPS
<mbishop>
and in the field of telecommunications, there are some seriously outdated systems, still running on god knows what architecture :)
<malc_>
it's a crynig shame PDP-11 is no longer in production.. <homer>mmmmm... middle endian</homer>
<malc_>
crying rather
twobitsprite has quit [Read error: 110 (Connection timed out)]
<tsuyoshi>
the consoles all use ppc? I didn't know that
<tsuyoshi>
ok, that counts as "not dead" then
pango_ has quit [Remote closed the connection]
<malc_>
xbox-360, wii and ps3 are powered by designs based on ppc yes
<mbishop>
well, PS3 is "Cell", but that's IBM, Wii and X360 both use powerpc, as did the gamecube
pango_ has joined #ocaml
malc_ has quit ["leaving"]
mbishop has quit [Remote closed the connection]
johnnowak has joined #ocaml
smimou has quit ["bli"]
Eridius has joined #ocaml
twobitsp1te has quit [Read error: 110 (Connection timed out)]
Eridius has quit []
ikaros_ has quit [Read error: 60 (Operation timed out)]
Mr_Awesome has joined #ocaml
<Mr_Awesome>
is there any way to specify unsigned 32-bit integers? the compiler is complaining that 1376312589 is too big to be represented by an integer, even though it is less than 2^32
twobitsprite has joined #ocaml
ikaros has joined #ocaml
<Mr_Awesome>
hmm, apparently using hex notation solves the problem
<sponge45>
Be careful, 0x7fffffff is the maximum on 32 bit platforms. It's not 0xffffffff.
<Smerdyakov>
Mr_Awesome, int isn't 32 bits in OCaml.
<Smerdyakov>
Mr_Awesome, you have to use Int32 for 32-bit integers.
<Mr_Awesome>
sponge45: then why does it accept that number written in hex?
<Mr_Awesome>
Smerdyakov: will using Int32 allow unsigned 32-bit ints?
<Smerdyakov>
Mr_Awesome, beats me. The whole situation is weird. I prefer SML's separation into INTEGER and WORD structures. :)
<Mr_Awesome>
sponge45: i mean, why doesnt it accept that number written in decimal
<Mr_Awesome>
Smerdyakov: do you prefer sml to ocaml?
<Smerdyakov>
SML
<Mr_Awesome>
really... i should look into sml
<ChoJin>
when you use a hex notation I think it generates a Int32
<ChoJin>
not an int
Eridius has joined #ocaml
<ChoJin>
it's funny, I have been here for a few days, and each time I see Smerdyakov trying to convert people to SML ;)
pingu has joined #ocaml
mbishop has joined #ocaml
<twobitsprite>
ChoJin: I think when I was in here a couple of months ago I noticed the same, actually...
<Eridius>
what's SML?
<twobitsprite>
Standard ML
<twobitsprite>
it's "the other ML"
<Eridius>
ah
<Eridius>
why would you want Standard over Objective? And why would you try and evangelize for it anyway?
<twobitsprite>
much like Ocaml, but different
<ChoJin>
isn't it slower?
<ChoJin>
(runtime-wise)
<twobitsprite>
Eridius: well... it's not like "Ocaml minus the objective part"... it's just a different way of implementing the ML design philosophy
<Eridius>
well, I don't actually know much about ML. I've only gone through a bit of tutorial so far. I'm hanging around here mostly for the heck of it ;)
<Smerdyakov>
No. The OCaml compiler produces significantly less efficient binaries than the best optimizing SML compiler.
<twobitsprite>
MLton is a great compiler
<twobitsprite>
There are just some nuances about SML that I don't quite like...
<twobitsprite>
however, there are also aspects that I wish Ocaml would learn from SML
<twobitsprite>
doesn't SML use "print" instead of "print-string"?
<Smerdyakov>
Yes
<twobitsprite>
yeah... print-string is a long name for a function
<twobitsprite>
just mildly iritating
<Smerdyakov>
You must mean 'print_string'.
<twobitsprite>
er, that's what I meant
<twobitsprite>
(I've been using so many different languages recently :P)
<Mr_Awesome>
he's a lisper!
<twobitsprite>
You can't prove anything!! :P
<Eridius>
hehe
<Eridius>
i started trying to learn both OCaml and Tcl in the same day
<ChoJin>
is there any good webpage to compare ocaml and sml (feature/syntax wise)?
<Mr_Awesome>
wow, my implementation of perlin noise is ridiculously slow
<Eridius>
naturally, I didn't get very far in either yet
<twobitsprite>
google: ocaml vs sml
<twobitsprite>
I seem to have found something pretty good that way
<twobitsprite>
Eridius: heh... very different languages, although my experience with TCL is probably about 5 years sepperated from my time with Ocaml
<ChoJin>
twobitsprite, yeah, but I was hoping for some pruning from the guys "who know" :)
<Eridius>
indeed
<twobitsprite>
ChoJin: yeah, I wouldn't know execpt by googling... so, you'll get no help from me :P
<Eridius>
oddly, I was learning Tcl because I was learning OCaml
<twobitsprite>
Eridius: eh?
<Smerdyakov>
I should write up an article about the differerences some day.
* Eridius
wanted to write a few MacPorts Portfiles (MacPorts is a package manager for OS X) for ocaml's findlib and extlib, and the Portfiles are written in Tcl, and I had to learn Tcl to figure out how to do some esoteric stuff :D
<twobitsprite>
Smerdyakov: I'd like to see something on the semantic differences... syntactical ones seem to be appearant and documented
<twobitsprite>
Eridius: ahh... interesting... I didn't realize anything was done in TCL anymore
<Eridius>
hehe
<ChoJin>
Eridius, I'm using godi under mac
<ChoJin>
it works great
<Mr_Awesome>
i suppose this code is quite slow: Random.full_init (Array.of_list [x; y]); (Random.float 1.) *. 2. -. 1.
<twobitsprite>
run it and see...?
<Mr_Awesome>
that wasnt a question
<twobitsprite>
ahh
<twobitsprite>
sorry
<Mr_Awesome>
right now im searching for a good 2d noise function
<twobitsprite>
plenty of people imply questions with statements like that
<ChoJin>
but I don't see labels in sml for example
<twobitsprite>
ChoJin: yeah, syntactically they are very similar... most differences lie in, i.e. small changes to the syntax (which can be overlooked and confusing at first) ...
<twobitsprite>
as well as they way the stdlib is layed out, or minor semantic differences
<twobitsprite>
first-class constructors are nice
<twobitsprite>
I always want to pass constructors around like functions in Ocaml and get confused by the errors
<twobitsprite>
(and I've never used SML... makes me wonder how the idea of 1st-class constructors was overlooked by the Ocaml guys)
<ChoJin>
well, for the moment I'm still wondering why Xavier Leroy started ocaml if sml was already existing
<ChoJin>
there must be a logicial explanation :)
<twobitsprite>
hmm... was SML already existing...?
<Smerdyakov>
OCaml is an offshoot of Caml, which is approximately as old as SML.
<ChoJin>
k, I didn't know caml was as old as sml
<mbishop>
Is Xavier still anti SMP?
<ChoJin>
so basically two teams were competing ?
mpc has quit []
<twobitsprite>
ChoJino: or maybe they weren't aware of each other...?
<twobitsprite>
where did the "ca" in caml come from, anyways...?
<ChoJin>
However, the language we implemented then was not SML but ... Caml. Why? Our main reason for developing Caml was to use it for sofware developments in the Formel project and indeed, it was used for the development of the Coq system which became, after Thierry Coquand's thesis in 1985, the main aim of the project. We were reluctant to adopt a standard that could later prevent us to adapt the language to our programming needs.
<ChoJin>
it's kind of sad, because it splits the human resources :)
<ChoJin>
twobitsprite, apparently it's not ca + ml, it's CAM + L :)
<Eridius>
CAM + ML
<ChoJin>
btw, speaking of goole... do you guys know www.clusty.com?
<ChoJin>
really cool meta-search engine
<ChoJin>
with a clustering/classification algorithm to sort the results per themes
<ChoJin>
google wanted to organize the informations, clusty is organizing the results of this organization ;)