foxen has joined #ocaml
foxster has quit [Killed (NickServ (ghosted: foxen!~foxster@user-112v410.biz.mindspring.com))]
lus|wazze has quit ["sul °°"]
rhil|out is now known as rhil
rhil has quit ["Lost terminal"]
rhil has joined #ocaml
rhil is now known as rhil|out
thomas001 has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
rhil|out is now known as rhil|zzz
Zadeh_ has joined #ocaml
Zadeh_ is now known as Zadeh
<Zadeh> hellos
smklsmkl has joined #ocaml
smkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has quit [Read error: 104 (Connection reset by peer)]
m[kel[ has joined #ocaml
Smerdyakov has quit [Read error: 110 (Connection timed out)]
Psion has joined #ocaml
Psion is now known as Smerdyakov
Breeder has quit [Read error: 104 (Connection reset by peer)]
travisbemann has joined #ocaml
wax has quit [Remote closed the connection]
wax has joined #ocaml
wax has quit [Remote closed the connection]
miph has quit ["Client Exiting"]
wax has joined #ocaml
Yurik has quit [Read error: 104 (Connection reset by peer)]
Yurik has joined #ocaml
lus|wazze has joined #ocaml
<Zadeh> is there a way to specify generic functions that you can specialize by type?
<lus|wazze> yes, by including type annotations in the definition (or declaration) of the function
<Zadeh> how would I write a generic max?
<lus|wazze> let f g x = g x has type ('a -> 'b) -> 'a -> 'b , let f (g : int -> int) (x : int) : int = g x , though, has type (int -> int) -> int -> int
<lus|wazze> ?
<lus|wazze> let max l = let rec iter item l = match l with [] -> item | h :: t -> if h > item then iter h t else iter item t in match l with [] -> raise Invalid_argument | h :: t -> iter h t ?
<Zadeh> e.g. let max a b = if a > b then a else b;;
<lus|wazze> yup just like that
<Zadeh> I was wondering if I could write some specializtions incase a,b were int's or some other types
<lus|wazze> let max (a : int) (b : int) = ...
<lus|wazze> or you can do
<lus|wazze> let max_int = max : int -> int
<lus|wazze> though in the latter case you won't get any further optimizations out of it
<Zadeh> yeah but that makes a unique function only for int's right?
<lus|wazze> wasn't that just what you wanted? a specialization?
<lus|wazze> the generic max function is fun a b -> if a > b then a else b
<Zadeh> yeah, but with a generic name, e.g. max that selects a specialization at compile-time, kind of like a C++ template
<lus|wazze> nope
<Zadeh> damn
<lus|wazze> theres no way to do that in caml
* Zadeh is just converting some of his C++ programs to ocaml
<teratorn> happy happy
<teratorn> C++ must die.
<Zadeh> notationally thats all I miss so far
<travisbemann> death to C++!
<travisbemann> of course, right now i'm doing a lotta work in raw C, but that's because i'm writing the low level bitblitting layer of a GUI system - the rest'll be written in OCaml
<Zadeh> sounds rather ambitious
<lus|wazze> theres nothing wrong with C
<lus|wazze> C was a nice simple clean low-level language
<lus|wazze> the problems started with C++
<travisbemann> well, C has its own problems
<travisbemann> such as you can't bind a name in the middle of an expression, for instance
<Zadeh> operator precedence is screwed
<lus|wazze> yeah no language is perfect of course
<Zadeh> arrays decay
<Zadeh> I probably would have stuck with C longer if it had a more native array type
<mrvn_> travisbemann: so?
<mrvn_> travisbemann: niegther can ocaml
<teratorn> eh well
<lus|wazze> yes ocaml can but i dont know wouldnt that feature be rather superfluous in a language like C?
<mrvn_> lus|wazze: you can write an expression that has in itself some bindings but you can't bind something in the middle of an expression.
<lus|wazze> x = (int y = 3 in y*y); ?? i dont really see whats that supposed to be useful for :)
<lus|wazze> erm
<mrvn_> lus|wazze: you can do that with gcc in C/c++
<lus|wazze> :0
<travisbemann> the thing is i find the fact that there is no dichotomy between statements and expressions in OCaml to be very useful
<mrvn_> The syntax is needed for special define makros.
<travisbemann> mrvn_: but i don't like to use gcc specific features...
<mrvn_> define foo(x) { int y; ...; y}
<mrvn_> Its needed cause you couldn't define variables in the middle of a block.
<lus|wazze> um
<lus|wazze> you can
<lus|wazze> in C99
<mrvn_> the feature is way older.
<lus|wazze> but thats not the same thing as being able to define a variable in the middle of an _expression_
<lus|wazze> which i think is a bit exceeding for a language like C ...
<mrvn_> The problem with C is that alignment is largely implementation defined.
<mrvn_> Otherwise it would be an universal asm.
<travisbemann> really, being able to define a name in an expression is VERY useful when one is writing macros
<travisbemann> even though i wish the C macro system'd be more like the Common Lisp macro system - hehe
<mrvn_> You just need to be able to have a block that evaluates to something.
<mrvn_> That what the gcc extension provides and all functional languages have anyway.
lus|wazze has quit ["sul °°"]
<travisbemann> anyways, is anyone here interested in hacking on a new GUI system with ambitions of displacing X11 on UNIX?
<mrvn_> a gui system or new bindings for X11?
<Zadeh> travisbemann: I'm an ocaml newb but like the idea
<travisbemann> mrvn_: a whole new GUI system from the ground up
<mrvn_> And who should write all the hardware drivers?
<travisbemann> it may have an X11 compatibility layer, but all in all it is much more inspired by Quartz, Fresco, and NeWS than X11
<travisbemann> mrvn_: that's what SDL and GGI are for ;)
<mrvn_> Which means you already are very limited in your interface.
<Zadeh> travisbemann: got a url discussing the design ideas somewhere?
<travisbemann> well, i will likely keep X around just as a big bloated device driver set
<mrvn_> sdl is just a shitty framebuffer and cgi has a lot of drawbacks.
<travisbemann> Zadeh: not yet, as i just started the project this week, but i can lay out the basic principles:
<travisbemann> universal arbitrary alpha blending
<travisbemann> universal geometry transformation
<travisbemann> universal color transformation
<travisbemann> universal true color
<travisbemann> network transparency (in this way it is similar to X11 and NeWS)
<Zadeh> network transparency?
<travisbemann> and widgets specified by the client operating in virtual machines on the server side (in this way it is like NeWS)
<mellum> How about universal love, peace and happiness?
<mrvn_> and world peace
<mrvn_> and food
<mellum> and hot chicks
<travisbemann> note that unlike NeWS, the widgets will NOT specify how to draw graphics, but rather just the graphics' geometry
<mrvn_> and millions of peaches, peaches for free
<Zadeh> mellum: you seem to be everywhere :)
<mellum> travisbemann: in which way is this different from Berlin?
<travisbemann> mellum: which is now Fresco
<mellum> Zadeh: huh?
<mellum> travisbemann: yeah, whatever :)
<Zadeh> mellum: just saw you in #gcc on oftc last night
<travisbemann> well, the problem with Berlin is that it doesn't seem to be *getting* anywhere
<mellum> Zadeh: well, okay, I'm in more than one channel :)
<Zadeh> mellum: hehe
<mellum> travisbemann: well, that I'd agree with
<travisbemann> but yeah, this is very similar to Berlin in the basic ideas
<travisbemann> except for how widgets are to be handled, which will be more like NeWS that Berlin
<mellum> Hm, I don't really know NeWS
<travisbemann> NeWS was an old, long-extinct GUI system for UNIX created by Sun Microsystems, that ended up losing out to X11
<mellum> travisbemann: that was about what I already knew about it :)
<travisbemann> but it had a much cooler architecture than X11, as it was based on Display Postscript, and widgets were executed on the server rather than the client despite being specified by the client, and hence were actually more responsive than actual applications themselves were
<mrvn_> like next had?
<mellum> This is nice, but I wonder how important it really is... considering the most successful window system has *no network transparency at all*
* Zadeh was thinking the same
<travisbemann> mellum: still, the thing is that i'm aiming to displace X11, so network transparency is a major plus
<travisbemann> and remember that Windows still has stuff like Citrix Metaframe
<mellum> anyway, I need to get breakfast... see you later
<mrvn_> An X12 with integration of RGBA dn GL would be nice.
<mrvn_> or X11R7 or whatever
<mrvn_> s/dn/and/
<travisbemann> well, this'll have RGBA from the ground up ;)
<travisbemann> but it'll have more, still - for example, if one wants, one could program a window manager that'd allow one to ROTATE windows - hehehe
<Zadeh> any min. hardware reqs you have in mind?
<travisbemann> Zadeh: well, i'm aiming to be completely independent from OpenGL, except that OpenGL support will be *allowed* so as to take advantage of machines that do have high-end graphics cards, primarily for window compositing
gene9 has joined #ocaml
<travisbemann> but note that i'm aiming for primarily supporting workstations, NOT embedded devices or PDAs
<travisbemann> i'll leave the embedded device and PDA domain to PicoGUI, which is specifically designed for such anyways
<travisbemann> of course, Fluorine is just in the beginning stages at this point, but i can send one the current source code if they want
gene9 has quit []
travisbemann has quit ["[BX] Mr. Peanut uses BitchX. Shouldn't you?"]
wax has quit [Remote closed the connection]
wax has joined #ocaml
asquii has joined #ocaml
asqui has quit [Read error: 110 (Connection timed out)]
asquii is now known as asqui
gene9 has joined #ocaml
asquii has joined #ocaml
asqui has quit [Read error: 110 (Connection timed out)]
asquii is now known as asqui
asquii has joined #ocaml
asqui has quit [Connection timed out]
asquii is now known as asqui
lus|wazze has joined #ocaml
phubuh has quit [Remote closed the connection]
asquii has joined #ocaml
gene9 has quit []
asqui has quit [Read error: 110 (Connection timed out)]
asquii is now known as asqui
CybeRDukE has joined #ocaml
Yurik has quit ["Client exiting"]
rox has quit [Remote closed the connection]
rox has joined #ocaml
mattam has joined #ocaml
det has joined #ocaml
det has quit [Client Quit]
det has joined #ocaml
mattam_ has quit [Read error: 110 (Connection timed out)]
det has quit []
det has joined #ocaml
<det> mrvn_, hi
det has quit []
lus|wazze has quit ["sul °°"]
mrvn has joined #ocaml
mrvn_ has quit [Read error: 104 (Connection reset by peer)]
systems has joined #ocaml
systems has quit ["Client Exiting"]
docelic has joined #ocaml
CybeRDukE has quit ["Universe.SYS corrupted. Reboot? [Y/N]"]
TachYon has joined #ocaml
TachYon has quit [Remote closed the connection]
TachYon has joined #ocaml
Vincenz has joined #ocaml
Yurik has joined #ocaml
Vincenz has quit []
TachYon has quit [Remote closed the connection]
docelic has quit ["Client Exiting"]
Lunar^ has joined #ocaml
<Lunar^> Hi
<teratorn> hi
Lunar^ has quit ["Cya"]
phubuh has joined #ocaml
<phubuh> i'm planning on making o'caml work efficiently from within apache, sort of like what mod_perl does for perl
<phubuh> i'm thinking of a more generic underlying implementation; a module that dynamically links to a library and calls it on request from a client. some thin C glue would make this work with o'caml.
<phubuh> do you see any problems with this approach?
* Riastradh would like to see routines like the PLT web server's SEND/SUSPEND function provided into the dynamically linked library.
<Riastradh> Beyond that I don't really care how it operates, so you should probably be talking to someone else.
<Riastradh> Anyhow, pfhood.
<phubuh> i will look into that, thanks!