<Smerdyakov>
Strange. I'm using that resolution, and it works fine. If you find how to fix it so that it displays properly in your browser and mine (Mozilla), then I'll gratefully accept your patch. :)
<malc_>
i'm not touching html with a ten foot pole. and fwiw i use seamonkey 1.0.7
<mbishop>
Yeah, doesn't fit here either, scrolls a little
<mbishop>
same res, but I'm using Konqueror
* Smerdyakov
leaves for about .75 hour; will read comments on return.
<mbishop>
Also, how are those poor little men supposed to get any work done with no arms? :)
pango_ has joined #ocaml
nonpop has left #ocaml []
pango has quit [Remote closed the connection]
johnnowak has quit []
_JusSx_ has quit [Client Quit]
malc_ has quit ["leaving"]
mbishop has quit [Remote closed the connection]
Demitar has quit [Read error: 110 (Connection timed out)]
<Smerdyakov>
So far #sml is winning, as far as feedback on the actual content of the page. Maybe I should include that as a new item. ;)
<tsuyoshi>
content of what page
<tsuyoshi>
oh
<tsuyoshi>
in the second paragraph, in the first sentence I think "distinction" would make more sense than "comparison"
<tsuyoshi>
and in the last sentence it should be "appear" rather than "appears"
<Smerdyakov>
Now we're talkin'! Thanks.
<tsuyoshi>
huh.. I think I'd like the sml negation better than ocaml
<Smerdyakov>
I usually like it better, too. :)
<tsuyoshi>
the parser sometimes gets confused so I have to put negative numbers in parentheses
<tsuyoshi>
in ocaml
johnnowak has joined #ocaml
<tsuyoshi>
so why does this rase an exception:
<tsuyoshi>
member (fun () -> ()) [fun () -> ()];;
<Smerdyakov>
Run it and get an idea!
<Smerdyakov>
Or are you asking about design motivations?
<tsuyoshi>
uh.. lessee
<tsuyoshi>
need to install ocaml on this computer
* tsuyoshi
is at his parents' house
<tsuyoshi>
ok, yeah, now I'm asking about design motivations
<tsuyoshi>
I would have figured that comparing functions would work ok
<Smerdyakov>
What concept of functional equality did you expect?
<tsuyoshi>
well.. if they are the same function, it should be true
<Smerdyakov>
I guess you've not had exposure to computability theory?
<tsuyoshi>
e.g. let foo () = () in foo = foo
<tsuyoshi>
that should be true
<Smerdyakov>
And what about: (fun () -> ()) = (fun () -> ())
<tsuyoshi>
that should be undefined, I think.. but I'd expect false
<Smerdyakov>
Yeah, that would work, I guess, to have largely undefined semantics for function comparison, but I'm glad the OCaml implementers made the more aesthetically appealing choice that they did.
<tsuyoshi>
I don't think it ought to raise an exception at all
<tsuyoshi>
if they're going to say you can't pass a function to =, then they should detect it at compile time
<Smerdyakov>
That would require pervasive type-system additions, like those that support SML's equality types.
<Smerdyakov>
But I certainly agree with you and prefer SML's choices.
johnnowak has quit []
m3ga has joined #ocaml
shawn_ has joined #ocaml
swater has quit ["Quat"]
shawn_ has quit [Read error: 104 (Connection reset by peer)]
<sponge45>
Smerdyakov: very instructive comparison.
<Smerdyakov>
sponge45, glad to hear it. :)
<m3ga>
Smerdyakov: I have wished that ocaml had immutable as well as mutable strings and arrays
<dark_light>
Smerdyakov, the nice thing about it it's that you advocate for (almost) each language preference, in both sides. but you may be biased into SML. :P
<dark_light>
and, too, very informative:)
<malc_>
Smerdyakov: claiming that labeled arguments do not add expressiveness to the language is wrong. you can't do currying with anonymous records in SML. i think you should read Jacques Garrigue papers and/or discuss it with him personally before making such claims
<Smerdyakov>
malc_, "you can't do currying with anonymous records" doesn't mesh with my idea of "expressiveness."
<malc_>
you can not express same thing in SML, hence it's less expressive than OCaml, but blah, whatever
<Smerdyakov>
Example?
<Smerdyakov>
Good definitions that I've heard of "expressiveness" center on the effectiveness of local transformations on bridging feature gaps
<Smerdyakov>
From what I understand of what you said, local (though super-linearly-sized, true) transformations can translate your class of examples to SML.
<malc_>
# let f ~a ~b = a + b;;
<malc_>
val f : a:int -> b:int -> int = <fun>
<malc_>
# f ~b:1;;
<malc_>
- : a:int -> int = <fun>
mbishop has joined #ocaml
<Smerdyakov>
fun f {a, b} = a + b;
<Smerdyakov>
fn a => f {a = a, b = 1};
<malc_>
erm.. one can emulate labeled arguemnts in C++ (i think boost does it), and if you insist that those things are the same i rest my case
<malc_>
argument even
<Smerdyakov>
It's all about local transformations. The transformation I used doesn't apply to C++, which doesn't have closures.
<Smerdyakov>
Boost must use that scary overloading of () that lets you call classes like functions, UNLESS you happen to want to treat these "functions" as first-class entitities interchangeably with _real_ functions, and then you're in trouble!
<malc_>
closures can be emulated in C++, and cx07 will have lambda.. judging by some arguments on your page, not having something is a blessing (and at times it sound like `it will be there soon' or `some random implementation' has them i just as good)
<malc_>
d'oh
<Smerdyakov>
My, my, it sounds like _someone_ takes this issue personally. :D
<dark_light>
the new c+ will have lambda? finally!
<malc_>
huh, you have a flawed reasoning w.r.t. labeled arguments, there's no equivalent feature in SML.. by YOUR OWN reasoning (i.e. no closures in C++)
<lmbdwr>
Smerdyakov, thanks a lot for the page .. really really good lecture
<malc_>
it's an awful crap (good material for #language_wars though)
<malc_>
Rossebergs page on the subject is much more succint and useful
<Smerdyakov>
malc_, his page is on a different bug related subject.
<Smerdyakov>
s/bug/but
<Smerdyakov>
malc_, maybe I can find a paper for you on the semi-formal notion of "expressiveness" that I'm using.
<malc_>
it's also much less inflamatory and contains far less bias (you'd probably call them comments)
m3ga has quit ["disappearing into the sunset"]
<Smerdyakov>
I think my comparison fills an important gap for people looking for substantial reasons to pick one language over the other.
<Smerdyakov>
And yours is so far the only negative feedback I've received out of about half a dozen responses, so I think I won't make any changes based on it.
<dark_light>
Contributions to the OCaml implementation are tightly regulated, and patches are often rejected. > hmm.. really?
<mbishop>
I hear ocaml produces the nicest machine code though
<Smerdyakov>
Yes, I've heard complaints from people who submitted contributions, dark_light.
<malc_>
i'd say ignored with extreme prejudice
<malc_>
mbishop: it does produce nice machine code, it does not do much in terms of highlevel optimizations though
<Smerdyakov>
malc_, I've never read this myself, only gotten a vague feel for the ideas behind it, so maybe what I've said won't follow from that exact approach. I'm going to at least start reading it now and see.
<malc_>
Smerdyakov: thanks, but i'm not going to read it. i lack the theoretical background
<Smerdyakov>
malc_, how do you know? You have some prior knowledge of this paper?
<malc_>
Smerdyakov: i took a quick glance
<malc_>
reading 45 pages of stuff with Gentzen(?) notation and other stuff is beyond my reach
<Smerdyakov>
Gosh, and you're in this channel. A very atypical individual. ;)
Eriridius has joined #ocaml
<malc_>
I use it as a practical tool (point already made few times before)
<Smerdyakov>
You're mistaken if you don't think formal logic is applicable to practice.
<Smerdyakov>
Here we're having this gentlemen's disagreement about whether a feature adds expressiveness, and here's this formal definition of expressiveness that could settle the argument. Sounds practical to me.
<malc_>
I certainly don't think formal logic is applicable, chiefly because i don't know what formal logic is
<malc_>
No it couldn't settle the argument, because i gave you my `naive' version of expersiveness that applies to this particular case, you cited a 45 page paper (which you didn't even read). Cited it here, not on the page where it belongs (should you find that it indeed represents your idea of expresiveness correctly)
<Smerdyakov>
This notion of expressiveness is free-floating in the community these days. Many people know about the main elements of the paper. I've only been in that community for a short while, and so I think it excusable that I haven't read all the well-known papers yet.
<malc_>
Suppose for a moment that some members of said `community' do not share your view thus your claims will seem blasphemeous to them.
<Smerdyakov>
By the way, I think you would find more traction in convincing others of your viewpoints if you presented them more politely.
<malc_>
sod off
<Shimei>
Getting a bit heated eh?
<Smerdyakov>
Shimei, one-sided heat, I think. :)
<Shimei>
Am I the only one who finds the notion of a OCaml vs. SML flame war hilarious? Let's not become like the Lispers. *jab jab* ;)
<Shimei>
Disclaimer: I like Lisp too.
<malc_>
Lispers had Naggum
<malc_>
which made it interesting
<malc_>
no such personality in these parts
<malc_>
sad sad
kiripan has joined #ocaml
<Smerdyakov>
Shimei, I don't think I've participated in any flaming. FP newcomers see these two languages and wonder which to choose. Many cogent properties should inform their decisions. Do you think it's wrong to set those properties out clearly?
sacarasc has joined #ocaml
<Shimei>
Smerdyakov: No, I liked your page. I'm almost done reading it, and it's tempted me to try SML.
<Shimei>
It's a shame that SML/NJ has no presence in Debian testing though. Playing with a compiler isn't as fun as with a toplevel.
sacarasc has left #ocaml []
sponge45 has quit ["zzzzzzzzzz"]
<Smerdyakov>
Yes, though it's fairly easy to install.
<Smerdyakov>
(Manually, I mean, from the project web site)
Eriridius has quit []
mbishop has quit [Remote closed the connection]
mbishop has joined #ocaml
<dark_light>
this kind of ugly necessity that sometimes i have (just to make functions tail recursive) is the worst example of ocaml for me: http://nopaste.tshw.de/11671065643f5bc/
<dark_light>
it seems to have no "generic" approach to this problem, and i must always do ad-hoc conversion of exceptions. this is killing me
<Smerdyakov>
What are you saying is the problem? Exceptions instead of option types?
<dark_light>
hmn, yes
<Smerdyakov>
I also prefer wider types over exceptions.
<dark_light>
i can't make something like.. try a with b -> `Exception b
<Smerdyakov>
But I also disprefer polymorphic variants. :D
<Smerdyakov>
Is this new code you are writing? If so, why are you using polymorphic variants?
Eriridius has joined #ocaml
<dark_light>
i don't like polymorph variants. but i dislike to make new types just to solve ad-hoc annoying problems
<dark_light>
because i will have this problem again to solve, and i will not want a new type for the next instance of the problem
<Smerdyakov>
I don't have a problem with creating a new variant type for each instance that truly has different output possibilities.
<Smerdyakov>
I have a feeling you might have some flaws in your program design, too, to come up with a function like that.
<dark_light>
I was trying to "generalize" using un_eof, un_notfound, etc. functions: http://nopaste.tshw.de/11671070823f5bc/ , but i had no sucess in combining them
<malc_>
another fallacy.. thinking that polymorphic variants are just there to provide less typing
<malc_>
sigh
<Smerdyakov>
malc_, I know a bit more about polymorphic variants than that, but I still don't think they're appropriate for this situation.
<malc_>
i was still refering to your page
<dark_light>
Smerdyakov, hmmmmm. yeah there are many flaws in my design. and aaaaah, each time i think about it, i come with different approaches (and that is no good)
<Smerdyakov>
malc_, where do you see any characterization of polymorphic variants as being present to "provide less typing"?
<malc_>
`Newcomers to OCaml often fall into using polymorphic variants by default, since they have a lower cost of entry'
<Smerdyakov>
They _do_ have a lower cost of entry.
<malc_>
I'm very tempted to take some logic/rethoric classes and write a treatise based on your page
<dark_light>
:o
<Smerdyakov>
Are you arguing that they _don't_ have a lower cost of entry?
* dark_light
hides
<dark_light>
well, this is the specific function that is mother of that wrapper: http://nopaste.tshw.de/11671073363f5bc/ , it don't seems really bad designed (for me). it builds a imperative data structure but could build a functional data structure
<Smerdyakov>
I think you should build a generic higher-order function for iterating through the lines of a file.
<Smerdyakov>
That handles catching End_of_File.
<Smerdyakov>
I don't know your context, but ignoring unfound elements without recording that fact for later action seems dodgy.
<Smerdyakov>
Maybe you could get away with catching Not_found at the function's top level.
<Smerdyakov>
If not, then you should probably be setting an error flag or similar.
<dark_light>
hmmm. this generic fuction returning a string list?
<Smerdyakov>
No. It's like List.iter, but it gets its data from the lines of a file.
<dark_light>
hmm. ah
<Smerdyakov>
Even just inlining make_case in iter and eliminating now-obvious redundancies, I think you'd find the resulting code clearer.
<Smerdyakov>
It's usually a bad sign if you use the 'rec' keyword. Time to go back to the drawing board and think of better higher-order functions for your utility library. :)
<dark_light>
!! do you think so?
<malc_>
by the same token it should be a bad sign to use 'fun' in SML
<malc_>
or am i missing something terribly important?
<Smerdyakov>
malc_, it sort of is. It's bad to use recursive 'fun'.
<dark_light>
i like recursive functions.. (i like high-oder ones too)
<dark_light>
order
<malc_>
boy oh boy
<Smerdyakov>
malc_, it just so happens that recursive definitions in OCaml all go through 'rec'. It's the custom recursion that raises the red flag.
<Smerdyakov>
I ignore my own advice all the time, but I can usually see afterward that I should have listened to me. ;)
kiripan has quit []
Eriridius has quit []
Smerdyakov has quit ["Leaving"]
<twobitsp1ite>
can modules not be mutually recursive?
checkmate has joined #ocaml
checkmate has left #ocaml []
Eridius has joined #ocaml
<dark_light>
can i have a source code saved in utf-8 and still the literal strings being parsed as iso-8859-1? it's just annoying having to save something with a encoding different from the system's default. (maybe i should use iconv on the makefile, in a way not much clear for me now)
<dark_light>
i meant: being parsed to the iso-8859-1 equivalent
<malc_>
there will be no conversion whatsoever, it just reads octets from the input sink. so i can put koi8-r or whatever to the file.
<malc_>
most likely (due to the way utf8 is constructed) the literal strings will be in utf8
<malc_>
and that's (almost) the only thing that can sorta-kinda matter
<twobitsp1ite>
malc_: I think you misunderstood his question... the source code is in a file that is utf-8 encoded, but he wants the string literals within that file read as iso-8859-1... am I right dark_light?
<dark_light>
hmmm no i want to, instead, convert them to iso-8859-1
<malc_>
ahem..
<twobitsp1ite>
you want the source code converted?
<twobitsp1ite>
malc_: ?
<malc_>
utf8 maps to iso8859-1.. first N chars are preserved
<twobitsp1ite>
ahh... it's late :P
<malc_>
and the rest just _can not_ be converted to iso8859-1
<dark_light>
that is: my string literals will be sent over a telnet connection, and most telnet clients reads iso-8859-1 (i don't know really if it's the default)
<dark_light>
erm..
<dark_light>
currently i am just saving as iso-8859-1
<malc_>
good
<dark_light>
but this is sad because my entire system is in utf-8
<malc_>
so save in utf-8
zak_ has joined #ocaml
<malc_>
if you don't use anything fance in the literals you will be quite safe
<malc_>
fancy rather
<dark_light>
... and the strings will be sent very weird
<malc_>
huh?
<malc_>
do you know how utf8 works at all?
<dark_light>
i use some characters outiside the ASCII
<malc_>
then YOU CAN NOT CONVERT them to iso8859
<dark_light>
i can because them has representation at iso-8859-1
<dark_light>
i can not convert most utf-8 characters, but the ones i am using i can! :P
<dark_light>
actually this is just a minor issue :)
<malc_>
0x7f, 0xa0 - 0xff range eh
<malc_>
no luck then
<dark_light>
(actually my problem is that gedit isn't recoginizing iso-8859-1 files as "plain text")
<dark_light>
recognizing. or anything similar to this
<dark_light>
so i must use the "all files" filter.. well, whatever. :P
zak_ is now known as llama32
danly has quit ["Leaving"]
shawn_ has joined #ocaml
sponge45 has joined #ocaml
mbishop has quit [Remote closed the connection]
mbishop has joined #ocaml
mbishop has quit [Remote closed the connection]
mbishop has joined #ocaml
mbishop has quit [Remote closed the connection]
mbishop has joined #ocaml
shawn_ has quit [Read error: 104 (Connection reset by peer)]
shawn_ has joined #ocaml
neall has joined #ocaml
kclancy has joined #ocaml
kclancy has left #ocaml []
kclancy has joined #ocaml
kclancy has quit [Read error: 104 (Connection reset by peer)]
malc_ has quit ["leaving"]
johnnowak has joined #ocaml
neall has quit []
seafood_ has quit [Read error: 60 (Operation timed out)]
pstickne_ has joined #ocaml
pstickne_ has quit [Client Quit]
smimou has joined #ocaml
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
ramkrsna has joined #ocaml
shawn_ has quit [Read error: 104 (Connection reset by peer)]
shawn_ has joined #ocaml
sponge45 has quit ["zzzzzzzzzz"]
seafood_ has joined #ocaml
seafood_ has left #ocaml []
dark_light has quit ["Ex-Chat"]
llama32 has quit [Read error: 110 (Connection timed out)]
llama32 has joined #ocaml
<llama32>
"ocamlmktop -o mytoplevel -I directory-to-some-libs -custom lib.cma lib2.cma" <-- is this correct?
bluestorm has joined #ocaml
bluestorm has quit [Remote closed the connection]
bluestorm has joined #ocaml
bluestorm has quit [Remote closed the connection]
bluestorm has joined #ocaml
bluestorm has quit [Client Quit]
bluestorm has joined #ocaml
Demitar has joined #ocaml
DRMacIver has quit [Read error: 131 (Connection reset by peer)]
malc_ has joined #ocaml
pstickne has joined #ocaml
malc_ has quit ["leaving"]
shawn_ has quit [Read error: 104 (Connection reset by peer)]
balrog-kun has joined #ocaml
<balrog-kun>
hiya
<balrog-kun>
is there a standard 32bit unsigned type?
<balrog-kun>
err, unsigned intereger
<balrog-kun>
*integer
<bluestorm>
there isn't
<bluestorm>
but you have Nativeint and Int32 (both signed) that may help
llama32 has quit ["Leaving"]
<balrog-kun>
ok, i'll use Int64 then, i need numbers from 0 to 2 ^ 32 - 1
bluestorm has quit [Remote closed the connection]
pantsd has quit [Read error: 110 (Connection timed out)]
johnnowak has quit []
swater has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
balrog-kun has left #ocaml []
eradman has joined #ocaml
malc_ has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
slipstream-- has joined #ocaml
bluestorm has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
_velco has joined #ocaml
_velco is now known as velco
Smerdyakov has joined #ocaml
nonpop has joined #ocaml
slipstream-- has quit [Read error: 104 (Connection reset by peer)]