mrsolo__ has quit [Read error: 110 (Connection timed out)]
pangoafk is now known as pango
m3ga has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
m3ga has quit ["disappearing into the sunset"]
ski_ has joined #ocaml
ski has quit [Nick collision from services.]
ski_ is now known as ski
Skal has quit [Remote closed the connection]
pango is now known as pangoafk
pangoafk is now known as pango
pango is now known as pangoafk
pangoafk is now known as pango
mikeX has joined #ocaml
Bigb[a]ng is now known as Bigbang
_fab has joined #ocaml
pango is now known as pangoafk
Skal has joined #ocaml
pangoafk is now known as pango
mikeX has quit ["leaving"]
mikeX has joined #ocaml
Anarchos has joined #ocaml
<Anarchos>
join haiku
Bigbang is now known as Bigb[a]ng
dark_light has quit ["Fui embora"]
bluestorm has joined #ocaml
Revision17 has joined #ocaml
amak has joined #ocaml
amak has left #ocaml []
<Demitar>
fluxx: Yes, but this is for pixel images, and the matrix doesn't quite apply there. :) (Unless I draw in a stencil buffer of course.) If I'm wrong corrections would make things simpler of course. :)
mikeX has quit ["leaving"]
ski has quit [Read error: 110 (Connection timed out)]
Schmurtz has quit [Remote closed the connection]
ski has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
Smerdyakov has joined #ocaml
pango is now known as pangoafk
mattmcd has joined #ocaml
mattmcd has left #ocaml []
_JusSx_ has joined #ocaml
pangoafk is now known as pango
smimou has joined #ocaml
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo_ has joined #ocaml
<fluxx>
demitar, how are the ocaml opengl bindings, btw? nice and dandy to use?
Anarchos has quit [Read error: 104 (Connection reset by peer)]
Snark has quit ["Leaving"]
jo_l_apache has joined #ocaml
jo_l_apache has quit ["leaving"]
bluestorm has quit [Remote closed the connection]
_JusSx_ has quit ["leaving"]
gim has joined #ocaml
<Demitar>
fluxx: They're nice. Although, of course, programming directly with opengl rather than using a scene-graph is foolishness. :)
smimou has quit ["bli"]
_fab has quit []
Skal has quit [Remote closed the connection]
dark_light has joined #ocaml
nothingmuch has joined #ocaml
<nothingmuch>
where can I get info on the ocaml bytecode vm?
<nothingmuch>
i'd like to explore the possibility of abusing it as a target backend for pugs (#perl6) since lots of what we need for pugs ocaml can do very well
<zmdkrbou>
nothingmuch: read the source code, and ask vodka-goo next time you see him on this chan, he knows about that
<nothingmuch>
okay, thanks
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
m3ga has joined #ocaml
<dark_light>
how many bytes an int has on ocaml?
<dylan>
they're 31bits
<pango>
on 32 bits archs, that is
<dylan>
yeah
<dark_light>
dylan, and the another bit? the one that fiils the 32 bit word
<dark_light>
and.. why ocaml uses a bit for the signal (+-) and c doubles the size of int? o.o ..
<dylan>
well, to be accurate. ocaml ints are a word size, with one bit for something else
<pango>
it's used to tell apart unboxed values from pointers
nothingmuch has quit [Read error: 113 (No route to host)]
<dark_light>
i am in a amd64
<dark_light>
so the int actually has 63bits
<dark_light>
right?
<pango>
ocaml ints are 31 bits signed on 32bit archs, 63 bits signed on 64bit archs
<pango>
and C doubles the size of ints because int type is supposed to be the most efficient integer type available on the platform
<pango>
if your code depends on a specific size, it must specify that type exactly, not use int
<dark_light>
Hmmm..
<dark_light>
pango, there are any technical issue that explain why ocaml uses a bit for signal?
<pango>
it's not an issue, it's by design
<pango>
how it interacts with the garbage collector used
<dark_light>
english isn't my natural language, i don't know really the many meanings of 'issue', heh
<dark_light>
huuum
<dylan>
dark_light: "issue" would probably translate to same as "problem" in most romance languages. I think
<dark_light>
i am not talking about " technical problems", but about "technical reasons" :)
<dylan>
Oh.
<dark_light>
pango, so the ocaml ints are efficients, and aren't a great overhead before the c ints?
<pango>
seems not
<dylan>
dark_light: ocaml has boxed and unboxed types. This means they arn't pointers, at the C-level.
<dylan>
the first bit is used to indicate what it is.
<dark_light>
well.
<dark_light>
the first bit don't indicate the signal?
<pango>
it's used to keep the garbage collector simple, and avoid extra memory references, which would also have a cost
<dylan>
int, being unboxed, is a lot faster than int32, int64, or nativeint, as those are boxed.
<dark_light>
o.o
<dylan>
dark_light: it doesn't indicate the sign.
<dark_light>
oh well
<dark_light>
the second indicate the sign? third?:)
<pango>
actually it's the low bit that's used, whereas sign bit is usually the highest one (not to mention 2-based complement stuff)
<dylan>
Nothing does, all ocaml ints are signed.
<dark_light>
hum
<dylan>
oh, wait, ocaml ints have to be 2-based complement, as nothing else is used in computers. d'oh
<jer>
dylan, well, modern computers
<dylan>
jer: True.
<jer>
s/modern computers/modern binary computers/
<dark_light>
i don't know so much about computers that aren't binary. i though that the others were only designed but not actually made
<jer>
well there exists ternary computers; granted, most are either old (i.e., soviet setun) or not yet in physical form, right
<jer>
but never underestimate the power of the embedded market. if there is enough of a desire to use a ternary machine in an embedded arena for a particular product, it will happen (and if you round off the fractions, embedded computing accounts for 100% of microprocessor sales)
<pango>
dark_light: Check http://caml.inria.fr/about/papers.en.html... Maybe "[16] The effectiveness of type-based unboxing" is the most relevant here, but I don't remember all those papers by heart ;)
<jer>
(as in items shipped, not dollars made)
<dark_light>
pango, yeah
<dark_light>
jer, why i would want a ternary computer? the binary ones is working yet
<dark_light>
and i heard something about "the simplest one is better"
<dark_light>
:)
<pango>
you forget "everything else being equal part"
<pango>
you forget "everything else being equal" part even
<pango>
otherwise we wouldn't need optical or quantic computers :)
<dark_light>
but if i have many values for a particular data unit, it's more likely to be corrupted, right?
<pango>
ask your ADSL modem
<pango>
and modems in general
<dark_light>
hmm? i don't got it
<pango>
they encode several bits per baud... there's a risk, but it seems it's worth it
<dark_light>
oh well
<pango>
no doubt complex encodings happen in modern harddrives too
<dark_light>
i didn't knew that :)
<pango>
with reed solomon saving your *ss several times per minute
<Smerdyakov>
What's with the asterisk? :D
<pango>
a $, my finger slipped
<dylan>
that's a pain in the asterisk.
<pango>
if you ever used tools showing SMART statistics in real time, it can be several times per second... that's crazy
dylan has quit ["brb"]
dylan has joined #ocaml
twobitsprite has joined #ocaml
<twobitsprite>
is there a vim mode that will intelligently auto-indent ml code?
<dylan>
omlet
<twobitsprite>
dylan: E149: Sorry, no help for omlet
<twobitsprite>
n/m found it on vim.org
<twobitsprite>
thanks
<twobitsprite>
hmm... omlet wants to indent after "let foo = something in"
<dylan>
only a small one.
<dylan>
I find it pleasing.
<Smerdyakov>
Not many ML users use vi, proportionally.
<dylan>
Not many programmers use ML, proportionally.
<twobitsprite>
Smerdyakov: most use emacs?
* Demitar
has pondered that ocaml-ide idea brewing, but is a tad sceptical he'd use it himself.
<Smerdyakov>
twobitsprite, yes.
* Demitar
is one of them, emacs classic with tuareg-mode is quite wonderful (when you've tweaked the indentation "just right" of course). :)
<twobitsprite>
dylan: my first thought when I first learned ocaml was that let...in should be indented afterwards, but most sites and tutorials say not to, so I assumed it was norm not to.
<Smerdyakov>
twobitsprite, I hate that indenting style. I pile tons of lets in a row, and I would run out of screen space.
* Demitar
was just about to say what Smerdyakov said.
<dylan>
twobitsprite: Other people can always use can always use camlp4
<dylan>
omlet formats like this:
<Demitar>
All those "let ... = ... in" allows one to structure the code clearly.
<dylan>
let foo = bar in
<dylan>
let baz = quux in
<dylan>
non-let expression.
<twobitsprite>
dylan: ahh
<twobitsprite>
maybe I should just flow with it for a bit and see how smart it really is...
<dylan>
it's incredibly devious.
<dylan>
uses a lot of CPU, though.
<twobitsprite>
dylan: can't use as much as lisp mode... :P
<twobitsprite>
and sure as hell can't be as bad as emacs... although emacs is usually worst concerning RAM...
<dylan>
Okay, I need to sleep.
<dylan>
I thought you said:
<dylan>
"emacs is sexually active concerning RAM"
<twobitsprite>
dylan: I think you should take this as an omen... heed it... get laid :P
<dylan>
twobitsprite: That is... Not a problem. :)
<twobitsprite>
or maybe you're over sexed... happens to me sometimes, you start seeing things through the eyes of a sex-aholic...
<dylan>
I think it's just I'm tired. :P
<twobitsprite>
yar
<twobitsprite>
sleep now
<dylan>
or I have freuding urges for emacs.
<twobitsprite>
I don't think I've ever seen Freud used as a verb before.... I like it!
<dylan>
Freudian.
<twobitsprite>
:P
<twobitsprite>
is it considered bad style to do something like:
<twobitsprite>
let f x y
<twobitsprite>
= do_something
<twobitsprite>
... ;;
<Smerdyakov>
What is that?
<twobitsprite>
a function definition?
<Smerdyakov>
What I mean is, I don't understand what pattern you aim to illustrate.
<twobitsprite>
the '=' on a new line...?
<Smerdyakov>
You have to guess about what you meant?
<Smerdyakov>
I've never seen code laid out like that before, and I think it would be better to put the = on the same line as the last argument.
<twobitsprite>
I think it's just my C/etc background that likes to hints about what's going on in the first non-white-space character when visually scanning the code
<twobitsprite>
also because when I have to break a line in the middle of a long arithmetic expression, I like to break it before an operator... a la:
<twobitsprite>
(something + (get-value from some long expression))
<twobitsprite>
* 4
<Smerdyakov>
= isn't an operator in that use.
<twobitsprite>
Smerdyakov: I understand, but it has the same visual effect for me... it implies a relationship between two expressions...
<Smerdyakov>
...and, of course, "let f x y" isn't an expression. ;)
<twobitsprite>
Smerdyakov: thanks for splitting hairs, but I think you know what I'm getting at :P
<Smerdyakov>
Conversely, I can say that, with your method, you don't know if the function argument list is done yet without looking down to the next line.
<twobitsprite>
hmm... you scan horizontally/vertically, and I scan vertically/horizontally
<twobitsprite>
.oO( verticly? )
<Smerdyakov>
I also like to put binary operators at the beginnings of lines, but that's because expressions have involve binary operator applications nested arbitrarily deeply.
<Smerdyakov>
It isn't possible to nest 'let' in the same way; it's a one-level thing.
<Smerdyakov>
(Since it's really ternary)
<twobitsprite>
so... do you think I would be draw and quartered if I continued using that style?
<twobitsprite>
:P
<Smerdyakov>
Yes.
<Smerdyakov>
I think that, if you think it's important for clarity, then the problem is that you don't have enough experience with functional languages, not that you think in a different way.
<twobitsprite>
the inverse is also possible, donchya think?
<Smerdyakov>
What would the inverse be?
<twobitsprite>
the problem is that I think differently and not necessarily that I don't have enough experience with functional languages...
<Smerdyakov>
No, I don't think that's likely to be true.
<twobitsprite>
can you cite some data?
<Smerdyakov>
No.
<twobitsprite>
so what are you basing this assumption on?
<Smerdyakov>
Send yourself a message through time after you accumulate enough experience with ML. :)
<twobitsprite>
I'll build an ml time capsule :)
<Smerdyakov>
Syntactic conventions are important for avoiding ambiguity, and there just isn't any ambiguity possible for this sort of thing.
<Smerdyakov>
So the choice of = placement shouldn't matter.
<twobitsprite>
(I'm mostly discussing for the sake of it, I began reformating my code to the other method when you first told me it would be odd... :P)
<twobitsprite>
I still thinks it's just as likely that I just think differently
<Smerdyakov>
Here's another argument:
<Smerdyakov>
I place operators at the starts of lines so that I can tell just from looking at any single line what its relation to other lines arbitrarily distant from it is.
<Smerdyakov>
Indentation plays the same roll for the value being bound in a 'let' expression.
<Smerdyakov>
Look up one line and a few spaces to the left and you see what's up.
<twobitsprite>
Smerdyakov: you don't indent the subexpressions in a long expression of binary operators?
<twobitsprite>
Smerdyakov: wouldn't your argument work against your usage that very style?
<twobitsprite>
(my english is sucking today... :()
<Smerdyakov>
twobitsprite, + is nested arbitrarily. let is only used at one level. There is no significant complexity to manage.
<twobitsprite>
if you indented your nested operations, you could scan upwards to find the matching indentation level, and look at the end of that line
<twobitsprite>
(you'd have to scan upwards and to the end anyways to find out what you're adding to)
<Smerdyakov>
With let, there is only one level to keep track of.
<Smerdyakov>
Thus, the operator involved at that level is irrelevant: it's always 'let'.
<Smerdyakov>
With arithmetic expressions, the operator matters, so it should appear more prominently
<Smerdyakov>
It's also true that the '=' of 'let' adds no semantic information, while a '+' always adds information.
<twobitsprite>
alright, I think we've reached a stand still... but worry not, becuase you convinced me to switch from the beginning :P
Smerdyakov has quit ["Leaving"]
<twobitsprite>
(did I upset him?)
<dylan>
I doubt it.
<twobitsprite>
right on
<twobitsprite>
I've been hanging out in #scheme recently, and some of them can be _quite_ touchy... :P
<dylan>
He doesn't believe that different programmers work differently, especially not fundementally.
<twobitsprite>
I understand, I just enjoy a good discussion :)
<dylan>
Me too. :)
<twobitsprite>
and I'm notorious for defying type-casting such as "there's no possible way you think differently" :P
<twobitsprite>
anyways... back to the code...
<dylan>
twobitsprite: I think you're quite similar to me, then.
<twobitsprite>
dylan: (btw, I have to ask... does your nick have anything to do with the programming language of the same name?
<twobitsprite>
)
<dylan>
twobitsprite: it is my natural name.
<dylan>
it's welsh.
<twobitsprite>
right on
<dylan>
I didn't like 'DyLan' very much... Seems clunky
<twobitsprite>
it's not common to find people using thier birth names on IRC, so I thought I'd ask
<twobitsprite>
dylan: and a bit verbose...
<twobitsprite>
does ocaml have anything resembling call-with-current-continuation a la scheme?
<twobitsprite>
i.e. is the only way to return from a function to evaluate a tail expression?