<TheDracle>
My Calc teacher had a filthy rich wife.
<TheDracle>
Lol.
<Riastradh>
Yes.
<TheDracle>
So he didn't care where he worked.
<Riastradh>
I don't think my algebra 1 teacher even had any significant source of income or anything -- no rich wife, no second job, anything like that --. He just really wanted to teach.
<TheDracle>
Weird.
<TheDracle>
I'm not sure if I'd really want to teach.
<TheDracle>
I mean, it's kindof like that broken window thing with kids.
<TheDracle>
When they come out of a shitty class where they were bored out of their heads and their teacher didn't seem to give a crap about them into your class, it's going to be difficult to get them out of that mindset.
<TheDracle>
I mean, human beings are complicated. They're more willing to respect something if it's already ordered, and work hard to maintain that order.
<Riastradh>
Have you seen the movie _Stand and Deliver_?
buggs^z is now known as buggs
<TheDracle>
If they detect that it has passed the threshold from being orderly to choatic, they no longer care.
<TheDracle>
No, what's it about?
<Riastradh>
It's about a similar teacher to my algebra 1 teacher, who was just a truly amazing teacher and who came from a similar background, teaching calculus -- and _succeeding_ -- to a class in one of the worst schools in Southern California.
<Riastradh>
(Of course, it's a true story; otherwise it would be crap unworthy of laying eyes on.)
<Riastradh>
It was, in fact, recommended to me by that algebra 1 teacher a few years ago.
<TheDracle>
Ah, is this about that entire class who passed the AP Calc exam, and everyone thought they had cheated?
<Riastradh>
Yup.
<TheDracle>
Yeah, they all missed the same problems.
<Riastradh>
For an obvious reason: they had the same teacher.
<TheDracle>
Right.
<TheDracle>
Lol.
<TheDracle>
Yeah, I've seen that.
<TheDracle>
That's a very rare thing though.
<Riastradh>
Indeed.
<TheDracle>
I mean, especially in a school like that.
<TheDracle>
That school wouldn't be such a dungheap if it had any funding.
<TheDracle>
It's just, people who live in rich areas don't want any of their tax-base going to support children of people in poorer areas.
<TheDracle>
And, of course they're going to have enough political influence to make certain that's the case.
<TheDracle>
They'd rather be spending that money to blow people up in Iraq.
<Riastradh>
Leave no billionaire behind!
<TheDracle>
Heh.
<TheDracle>
They litteraly have to hire people from overseas to develop the technology with which they're blowing people up as well.
<TheDracle>
The majority of the PhDs here are from some other country.
<Riastradh>
All the recent standardized test crap isn't helping, either.
<TheDracle>
Nah, it's just so they can pull even more federal funding from these schools.
<TheDracle>
Sorry, you didn't meet your standardized testing standard, "Yoink!"
<TheDracle>
And then they want vouchers as well.
<TheDracle>
So even more local money can be pulled from the public schools and placed in private religious schools.
<Riastradh>
Blehhhhh.
<TheDracle>
Where they can teach children about God's beautiful universe.
<TheDracle>
And the evil Darwin and his crazy ideas about humans comming from monkeys, what a bunch of crap!
* Riastradh
grumbles and mumbles and mutters incomprehensibly.
<TheDracle>
The Earth was created in 7000 years, this radioactive carbon was just placed several halflifes away from being stable in these layers of rocks by Satan!
monotonom has quit ["Don't talk to those who talk to themselves."]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
yauz has quit [Read error: 113 (No route to host)]
yauz has joined #ocaml
smimou has quit ["?"]
yauz has quit [bear.freenode.net irc.freenode.net]
cjohnson has quit [bear.freenode.net irc.freenode.net]
mattam has quit [bear.freenode.net irc.freenode.net]
Herrchen has quit [bear.freenode.net irc.freenode.net]
gl has quit [bear.freenode.net irc.freenode.net]
Smerdyakov has quit [bear.freenode.net irc.freenode.net]
kosmikus|away has quit [bear.freenode.net irc.freenode.net]
fab_ has quit [bear.freenode.net irc.freenode.net]
cmeme has quit [bear.freenode.net irc.freenode.net]
tautologico has quit [bear.freenode.net irc.freenode.net]
greenrd has quit [bear.freenode.net irc.freenode.net]
pattern has quit [bear.freenode.net irc.freenode.net]
gzl has quit [bear.freenode.net irc.freenode.net]
mellum has quit [bear.freenode.net irc.freenode.net]
Hipo has quit [bear.freenode.net irc.freenode.net]
yauz has joined #ocaml
cjohnson has joined #ocaml
cmeme has joined #ocaml
greenrd has joined #ocaml
tautologico has joined #ocaml
mattam has joined #ocaml
fab_ has joined #ocaml
Herrchen has joined #ocaml
kosmikus|away has joined #ocaml
Smerdyakov has joined #ocaml
gl has joined #ocaml
pattern has joined #ocaml
mellum has joined #ocaml
Hipo has joined #ocaml
gzl has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
mrsolo_ has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
AshW8rk3 has joined #ocaml
AshW8rk3 has quit [Remote closed the connection]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
pattern has quit [Read error: 104 (Connection reset by peer)]
pattern has joined #ocaml
pac_away has joined #ocaml
<pac_away>
Hi again
pac_away is now known as pac
pac is now known as pac_
<pac_>
someone awake ?
<tautologico>
almost
<tautologico>
pac_, do you use windows ?
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo has joined #ocaml
<pac_>
tautologico: no
<pac_>
tautologico: because?
<tautologico>
I need masm
<pac_>
what is it ??
<pac_>
I need a polymorph function 'a -> string
<pac_>
for my parametric class
<pac_>
does this exist?
<tautologico>
masm is an assembler
<pac_>
oki
<tautologico>
omg this xine version is giving me a headache
<pac_>
why are you here what is the connection with OCaml ?
<tautologico>
I was just chatting
<pac_>
kii
<Smerdyakov>
pac_, why do you want a garbage function like _that_?
Herrchen_ has joined #ocaml
<pac_>
it is for my polymorphic class
<pac_>
point
<pac_>
:)
<Smerdyakov>
So?
<pac_>
which can be float or int
<pac_>
so I need a to_string method
<Smerdyakov>
Can't you pass it to the class constructor?
<pac_>
to pass what ?
<Smerdyakov>
A to_string function
<pac_>
there is no other way ?
<Smerdyakov>
It's better to use a functor instead of OO stuff, so the dispatch can be resolved statically!
<pac_>
But I will still have my class with a functor ?
<Smerdyakov>
I don't know.
<Smerdyakov>
Are you using dynamic dispatch in a crucial way?
<pac_>
I am just learning back OCaml
<pac_>
I am not developing something
<pac_>
I will have tomorrow a look on the functor stuff now time for sleeping
<pac_>
thx Smerdyakov
<pac_>
see ya tomorrow
<pac_>
good night
pac_ has quit ["leaving"]
Herrchen has quit [Read error: 110 (Connection timed out)]
tautologico has quit ["Leaving"]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
runonnn has joined #ocaml
runonnn has left #ocaml []
mrsolo has joined #ocaml
Nutssh has joined #ocaml
cjohnson has quit [Read error: 104 (Connection reset by peer)]
lambdawar has joined #ocaml
ionOS has joined #ocaml
_shawn has quit [Read error: 54 (Connection reset by peer)]
vezenchio has joined #ocaml
Herrchen_ is now known as Herrchen
shawn has joined #ocaml
shawn has quit [Read error: 54 (Connection reset by peer)]
shawn_ has joined #ocaml
maihem has joined #ocaml
mrsolo has quit [Read error: 110 (Connection timed out)]
Nutssh has quit [Read error: 60 (Operation timed out)]
smimou has joined #ocaml
AshW8rk3 has joined #ocaml
smkl has joined #ocaml
jlouis_ is now known as jlouis
AshW8rk3 has quit [Read error: 110 (Connection timed out)]
lambdawar has quit ["Leaving"]
mattam has quit [Read error: 110 (Connection timed out)]
gl has quit ["BitchX: the original point-and-click interface."]
mij has joined #ocaml
fab_ has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
Nutssh has joined #ocaml
bk_ has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
pac_away has joined #ocaml
<pac_away>
Hi
pac_away is now known as pac_
systems has joined #ocaml
systems has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
<Nutssh>
hi.
mij has quit ["leaving"]
bk_ has joined #ocaml
mrsolo has joined #ocaml
menace has joined #ocaml
whee has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
<pac_>
I want to manipulate an object (a point) the same way whether it is a float point or an int point. How should I do that in OCaml ?
<Smerdyakov>
You need to be more specific.
<pac_>
atm I have two class , int point and float point with specific operation (like to_string or translate) methods according to the type. I want to be able to code something like that : let p = Point.create 0 0 0 or let p = Point.create 0.0 0.0 0.0 (this function should return a int or a float point object)
<Smerdyakov>
And what is stopping you from doing that now?
<pac_>
how should I do it ? what is the prefered way to do it ?
<Smerdyakov>
Are you asking how to create an object of a parameterized class?
<pac_>
no
<Smerdyakov>
Then can you try rephrasing your question to use real OCaml syntax whenever possible? I don't think I've understood you.
<mrsolo>
he probably mean he wants similar behavior as to let p = 0 and let p = 0.0
<mrsolo>
on ocaml class
<Smerdyakov>
I don't understand what that means, mrsolo.
<pac_>
mrsolo: exactly :)
<whee>
Smerdyakov: the Point.create function behaves differently depending on whether it was passed int or float arguments, returning a different type of point
<Smerdyakov>
What is 'Point' here?
<Smerdyakov>
A module?
<Smerdyakov>
If so, you should just be able to use: let create = new point
<pac_>
yep returning but create returns a class
<pac_>
brb
<pac_>
whee: so is it possible ?
<Smerdyakov>
pac_, did you see my answer?
menace has quit ["Leaving"]
<pac_>
Smerdyakov: this one : 12:44 < Smerdyakov> If so, you should just be able to use: let create = new point
<pac_>
?
<Smerdyakov>
Yes
<pac_>
Smerdyakov: I have already do that but it does not solve my problem
<Smerdyakov>
Why not?
<Smerdyakov>
I.e., can you give a single OCaml program that you want to use Point.create, but that does not compile with my definition?
<Smerdyakov>
(minimal size possible, so don't just paste what you have so far)
<pac_>
what create does it just to instanciate a class BUT the implementation of this class should be type dependant. Think about a toString method of a point which depend on the type because you would call string_of_int OR string_of_float according to the type
<Smerdyakov>
It is impossible to make the implementation type dependent.
<Smerdyakov>
Use different functions to allocate with different types.
<Smerdyakov>
You could then coerce either case to match a single parametric class type.
<pac_>
atm I have a 'a point class but I can not write the to_string method
<Smerdyakov>
Right. It is impossible.
cjohnson has quit [Read error: 110 (Connection timed out)]
<Smerdyakov>
(Side note: In case you don't know, most OCaml programmers rarely if ever use the OO features. There are better ways to do most things.)
cjohnson has joined #ocaml
<pac_>
Smerdyakov: well I need object
<Smerdyakov>
In general, you never _need_ to use objects.
<Nutssh>
I'm doing OO for the first time I've ever wanted to do it in ocaml. Want width subtyping.
CapNemo has joined #ocaml
<pac_>
Smerdyakov: well I NEED them
<CapNemo>
plop :)
<Smerdyakov>
pac_, anyway, do you understand that OCaml stores no runtime type information, so you can't make any kind of function (class constructor or otherwise) that does different things based on types?
<pac_>
yes
<Smerdyakov>
pac_, why do you "need" objects?
<Nutssh>
No ad-hoc polymorphism in ocaml.
<pac_>
Smerdyakov: because I need method on them, heritage, agregation and private members and because all design that I am porting is object based
<Smerdyakov>
pac_, OK. The last reason you give is the only valid one, and that's not a "need" reason, but a convenience reason.
<CapNemo>
if you dont need object why there is object in ocaml :)?
<pac_>
Smerdyakov: If I do not have object I should have record right ?
<Nutssh>
Just because they exist doesn't make them the best choice or only choice to use.
<Smerdyakov>
pac_, you never need to use either of those. You can design several possible interfaces that give you the high-level properties that you want.
<CapNemo>
Nutssh, of course :) i prefer a mix of all these methods
<pac_>
Smerdyakov: but how do I store values ?
<Smerdyakov>
pac_, now, what is the problem with having separate create_int and create_float?
<pac_>
it is not problem it is a more convenient
<Smerdyakov>
pac_, which language are you translating from?
<pac_>
C++/Java
<Nutssh>
Yup. But now I need OO, and its... interesting in ocaml. :)
<Smerdyakov>
OK. Java doesn't allow what you are asking, either!
<mrsolo>
you don't need oo in ocaml for most case
<mrsolo>
not is not its strength
<Smerdyakov>
Who knows what that awful C++ template system allows.
<mrsolo>
if you want to learn oo, there are better language for that
* CapNemo
reminds that OO is *only* a philosophy nothing less nothing more ;)
<mrsolo>
oo is not its strength
<mrsolo>
of course
<whee>
io is a fun language for playing with OO concepts D:
<pac_>
Smerdyakov: yep but in C++ I can do it
<mrsolo>
pac_: it doesn't mean it is the most efficient way to solve the problem
<Smerdyakov>
pac_, that's a monstrosity and you should feel bad for doing it.
<mrsolo>
pac_: because that is the only way C++ can do it
<CapNemo>
Smerdyakov, are you a bene geserit :)??
<Smerdyakov>
CapNemo, your mom is.
<pac_>
Smerdyakov: using templates in C++ is bad ? --> looooooooooooooool
<Smerdyakov>
pac_, it sure is. They're a major kludge.
<CapNemo>
hey pac it seems that Smerdyakov is a fanatic religious glued in a circle no ;)?
<pac_>
Smerdyakov: tell that to Bjourn Stroustrup and paste me his answer
<buggs>
Smerdyakov, all of c++ is
<pac_>
CapNemo: yep
<Smerdyakov>
pac_, besides, C++ can't do this either, since it doesn't have runtime parametric polymorphism.
<mrsolo>
template is c++ is bad
<mrsolo>
even java and c# are not using templating
<Smerdyakov>
pac_, the template system has some support for automatically doing things that you can easily do by hand.
<CapNemo>
mrsolo, oki let's assume it's bad . now why :)?
<CapNemo>
dont play the politician
<Smerdyakov>
CapNemo, it's a completely unprincipled preprocessor mechanism.
<mrsolo>
camnemo: there is some detail discussion on C# threads.. don't remember :-)
<mrsolo>
C++ is not my strong point :-)
<Smerdyakov>
CapNemo, you can't check that a template is valid without instantiating it on ALL possible parameters.
<mrsolo>
but C#/java are going for generic
<pac_>
Smerdyakov: yes it can
<CapNemo>
Smerdyakov, ohhh what a big problem :)
<Smerdyakov>
pac_, what?
<Riastradh>
CapNemo, it horribly complicates syntax, the specification is so horribly convoluted that no compiler supports templates correctly, templates are almost impossible to debug in a straightforward manner.
<Smerdyakov>
CapNemo, it sure is a big problem to me....
<mrsolo>
having said that
<mrsolo>
STL is a marvel i heard if you learn to use it finally
<CapNemo>
Riastradh, i agree .. the syntax is really horrible
<Smerdyakov>
Imagine if you wrote a library of functions that couldn't be type checked without testing them on all possible inputs.
<Smerdyakov>
C++ templates are like that.
<Riastradh>
Templates try to solve three entirely different problems, and fails at doing very well at either of them: parametric polymorphism, macros, and parameterized modules.
<Riastradh>
s/fails/fail/1
<buggs>
how you think they should solve the problem instead of templates ?
<Riastradh>
s/solve three entirely different problems/act as three entirely different things/1
<Riastradh>
buggs, by having three separate facilities.
<Riastradh>
You might note that OCaml has three separate facilities too: real parametric polymorphism, real parameterized modules (functors), and camlp4.
<buggs>
Riastradh, exaplin on the example of strto* functions ?
<buggs>
*explain
<Riastradh>
...?
<CapNemo>
Riastradh, camlp4 ?
<Riastradh>
Caml PreProcessor/Pretty-Printer -- a macro engine for OCaml.
<buggs>
ya but c++ macros suck too
<mrsolo>
well someone people macro shouldn't exist in first place
<buggs>
it's not like they had a lot of choice :)
<Riastradh>
mrsolo, that sentence makes no sense.
<mrsolo>
ah..sorry
<Riastradh>
buggs, 'C++ macros?' Do you mean cpp or templates?
<mrsolo>
some people think macro shouldn't exist in the first place
<buggs>
cpp (i am not sure how they do their templates, could be based on macros i guess?)
<Smerdyakov>
I think macros are not very useful compared to other features, but it's not so bad to make limited use of them for special situations.
<Riastradh>
cpp is one of the worst things in existence that could be considered a programming language's 'macro facility.'
<Riastradh>
Macros _CAN_ be done better.
<buggs>
being dragged down by their heritage i don't see how they could have done so much better than with their templates
<Smerdyakov>
Are you saying you think parametric polymorphism or parametric modules are incompatible with some aspect of C?
<pac_>
Smerdyakov: yes in C++ I do not need two write a float Point class and a int point class
<Smerdyakov>
pac_, you don't in OCaml, either. You can use a functor to produce them, but statically, same as in C++.
<pac_>
Smerdyakov: ah ? how ?
<CapNemo>
Smerdyakov, it was in fact the question of pac : how :)
<Smerdyakov>
So you can't have some function that has a value that knows it is an int or a float, and then magically creates the right class for it.
<Riastradh>
pac_, read the section in the manual about functors.
<Smerdyakov>
pac_, actually, I'm not sure if you can do that. Depends on if class definitions can be within functor bodies.
<buggs>
is that so much different from templates ?
<Riastradh>
Why couldn't they be, Smerdyakov?
<Smerdyakov>
Riastradh, I'm talking about dynamically.
<mrsolo>
buggs: actually no but it is better implemented
<Riastradh>
buggs, yes. Parameterized modules do _not_ act somewhat as macros, like templates do, and the theory of parameterized modules is _much_ clearer.
<pac_>
Riastradh: the manual is just educationnaly insane
<mrsolo>
similar to the difference between to functional pointer and delegates
<CapNemo>
pac_, insane .. you are too kind loll
<pac_>
lool
<Smerdyakov>
buggs, functors and templates are fundamentally different because of static signatures and checking.
<mrsolo>
Smerdyakov: but the end result is more or less the same
<Riastradh>
'More or less the same?'
<Smerdyakov>
mrsolo, you mean the final machine code?
<mrsolo>
i mean to solve what desinger is trying to do
<Smerdyakov>
I don't think so.
<mrsolo>
its like the different between functional pointer and delegate
<Smerdyakov>
Functors lead to shorter development times.
<mrsolo>
s/different/difference/
<Smerdyakov>
And they can also be implemented slightly more efficiently, I think, since they give more information.
whee has quit []
<mrsolo>
funny that F# inventor says the reason functor isn't in is because he doesn't see them to be too useful
<Nutssh>
*BLINK* Thats it. Thats the solution. I didn't think of functors.
<Smerdyakov>
This F# guy has gotten way too much publicity for an uninteresting project.
<Riastradh>
People have space in their brains to consider F#?
<mrsolo>
its a pet project
<Riastradh>
s/have/allocate/1
<mrsolo>
i heard it is horribly slow too
<CapNemo>
someone knows if ocaml can embed itself ?
<Riastradh>
CapNemo, it would help if you clarified your question.
<CapNemo>
i mean : run a ocaml script inside in a ocaml program
<CapNemo>
perhaps it's not possible
<Riastradh>
It is difficult to do that, apparently, due to the silly overly static nature of OCaml, or so I heard indirectly from the QC-- team.
<CapNemo>
or perhaps someone has embed a scriptic langage in ocaml ?
<mrsolo>
yea you can call perl or python from ocaml