Jedai has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090115, built on: 2009/03/07 00:45:02 UTC http://www.kvirc.net/"]
Jedai has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
rjack has quit [Client Quit]
seafood_ has joined #ocaml
ulfdoz has joined #ocaml
rjack has joined #ocaml
rjack has quit [Client Quit]
seafood has quit [Read error: 110 (Connection timed out)]
rjack has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
xerxes__ has joined #ocaml
xerxes has quit [Read error: 110 (Connection timed out)]
ched_ has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
jli has joined #ocaml
<jli>
I've defined a parametric record type as follows: type 'a mylist = {list: 'a list; ordfn: ('a -> 'a -> bool); sorted: bool;}
<jli>
er, nevermind. weird.
<jli>
I was getting a strange type error, but I must have defined my test variable as an old version of the type
Narrenschiff has joined #ocaml
<jli>
is there a way to test equality of functional values?
<mrvn>
only == I think.
<mrvn>
physical equality
<mrvn>
# f == f;;
<mrvn>
- : bool = true
<mrvn>
It is too bad = does not first test ==.
<jli>
(<) == (<);;
<jli>
- : bool = false
<jli>
hum
<mrvn>
# let x = (<) in x == x;;
<mrvn>
- : bool = true
<jli>
yeah
<mrvn>
(<) and (<) are not physically equal.
<jli>
why not?
<mrvn>
even though I would think that common constant subexpression optimization would make them so.
<mrvn>
jli: I think (<) creates a new closure.
<mrvn>
# let (<<<) x y = true;;
<mrvn>
val ( <<< ) : 'a -> 'b -> bool = <fun>
<mrvn>
# (<<<) == (<<<);;
<mrvn>
- : bool = true
<mrvn>
Something to do with < being builtin.
<jli>
hm. oh well.
Associat0r has joined #ocaml
<mrvn>
you would never write that in real code anyway.
<jli>
what if I want to define a product type that has a function as a field, and I want to test if two objects have the same function for that field?
<mrvn>
then you compare with ==
ulfdoz has quit [Connection timed out]
<mrvn>
and use let less_than = (<) { fn = less_than; ... } to make them identical.
<jli>
well, okay
<mrvn>
jli: sucks a bit though. Could even be considered a bug.
<mrvn>
# (<) == (<);;
<mrvn>
- : bool = false
<mrvn>
# let (<) = (<);;
<mrvn>
val ( < ) : 'a -> 'a -> bool = <fun>
<mrvn>
# (<) == (<);;
<mrvn>
- : bool = true
<mrvn>
that is rather surprising.
verte has joined #ocaml
jeddhaberstro has joined #ocaml
rjack_ has joined #ocaml
sporkmonger has joined #ocaml
sporkmonger has quit []
sporkmonger has joined #ocaml
sporkmonger has quit []
seafood has joined #ocaml
sporkmonger has joined #ocaml
sporkmonger has quit []
sporkmonger has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
erikl has joined #ocaml
sporkmonger has quit []
jeddhaberstro has quit []
erikl has quit ["WeeChat 0.2.6.1"]
alexyk has joined #ocaml
sporkmonger has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
m3ga has joined #ocaml
sporkmonger has quit []
seafood_ has joined #ocaml
erikl has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
ztfw`` has quit [Remote closed the connection]
alexyk has quit []
vithos has quit [Read error: 110 (Connection timed out)]
ambient has left #ocaml []
komar_ has joined #ocaml
seafood_ has quit [Read error: 60 (Operation timed out)]
seafood has joined #ocaml
Associat0r has quit []
jamii has joined #ocaml
komar_ has quit [Read error: 60 (Operation timed out)]
komar_ has joined #ocaml
monadic_kid has joined #ocaml
Alpounet has joined #ocaml
Camarade_Tux has joined #ocaml
seafood has quit []
angerman has joined #ocaml
<Camarade_Tux>
hi :)
rjack has quit ["leaving"]
rjack_ has quit ["leaving"]
<monadic_kid>
Alpounet: there you, that was a bit lame of you the other day to tell me something I already know and leave without giving me a chance to respond, and you offended making assumptions that i have no cluse about C++. Well if you had any idea I use C++ professionally at work and for many and many years, I own a copy of the ISO C++ standard and even follow the standard committee's progress, I know and am well versed in boost, I know about C+
<monadic_kid>
+ TR1, lots about C++0x, I'm well beyond the average C++ programmer and I most definitely know more about C++ than you. The fact of the matter modern C++ or not C++ is ugly, overly complicated language than necessary and no amount of hackery abstractions is going to change that. You seem to think I can actually use my skills with preprocessor and template meta programming at work? you think I can use boost a lot work when I have I deal w
<monadic_kid>
ith varying levels of C++ skills? I have to write lowest common dominator C++ because everything interesting is just a hack to get something that wasn't orgianlly C++
<monadic_kid>
I really didn't want to say that here but you seriously offended and pissed me off the other day
rjack has joined #ocaml
<gl>
very interesting.
verte has joined #ocaml
jeanbon has joined #ocaml
<monadic_kid>
in C++0x there are lot of new things that are meant to solve the issues with current the C++ standard but in actual fact they used so many keywords and many meanings in different contexts C++0x is even more ugly, ffs a new type of function signature, the syntax for lambda expressions are butt ugly
<gl>
monadic_kid, i suggest you use the /query command
OChameau has joined #ocaml
<mrvn>
monadic_kid: so how do I overload delete so it calls a class specific method without inventing my own runtime type system?
<monadic_kid>
I don't understand what saying by "without inventing my own runtime type system"
<mrvn>
monadic_kid: delete foo; will call the global delete operator, which I can overload. But that gets called for every type. So then I have to filter out only the types I want with some kind of runtime type system and for those call the Foo::delete method instead of ::delete.
<monadic_kid>
mrvn: if it's a user-defined type you can overload it specifically for your user-defined type
<mrvn>
monadic_kid: nope.
<Alpounet>
mrvn, you can, IIRC.
<mrvn>
Nope. you can define one all you want but it doesn't get called.
<monadic_kid>
mrvn: well you know there are overloads for both array and non arrays and for each of those there can be one for throwing std::bad_alloc and one for non-throwing and there is a special form of new for user-defined types that can take an extra size_t parameter that the compiler automatically inserts the extra param
<monadic_kid>
mrvn: show me what you can't get working
<mrvn>
been a while. let me see if I can resurect an example.
<mrvn>
A common error is to attempt to use a delete expression to delete the object. This results in the wrong operator delete function being called.
<Alpounet>
bye
Alpounet has quit ["Ex-Chat"]
<monadic_kid>
mrvn: your originally problem never mention anything about separating allocaion/dealloaction from constructin/destruction.
<mrvn>
ocaml could use more flexibility for new/delete too. Some middle ground between plain ocaml blocks and full custom blocks.
<mrvn>
monadic_kid: yeah, sorry. was years ago.
<monadic_kid>
mrvn: And as the article states instead at the very end it would be better just to use class overloads
<mrvn>
monadic_kid: Also wasn't exactly that but related to placement new. Similar to the problem there.
<mrvn>
monadic_kid: I still don't get why there isn't a template <typename T> void operator delete(T *) throw();
<mrvn>
With the class overload you can't replace new/delete of existing clases.
<monadic_kid>
mrvn: you need to be more specific here
<mrvn>
never mind. It's way off-topic. I will just stick to ocaml. Much more fun.
<mrvn>
Browsing some pages about C++ reminded me how much not fun it can be.
<monadic_kid>
mrvn: yes more fun than trying to read the ISO standard on obscure cases
<mrvn>
and then figuring out how much of that is implemented right in g++. :)
seafood has joined #ocaml
<Camarade_Tux>
apparently it seems .lzma files are dead under linux and .xz will replace them (still lzma compression, but different format) : the latest release of xz-utils was considered good enough for slackware to migrate all its packages to a .txz format (.tar.xz)
rjack has quit ["leaving"]
erikl has quit [Read error: 110 (Connection timed out)]
fschwidom has joined #ocaml
seafood has quit []
hkBst has joined #ocaml
Yoric[DT] has joined #ocaml
monadic_kid has quit ["Leaving"]
xerxes__ has quit [Read error: 60 (Operation timed out)]
Yoric[DT] has quit ["Ex-Chat"]
damg1 has joined #ocaml
damg1 has left #ocaml []
Narrenschiff has quit []
slash_ has quit [Client Quit]
smimram has quit ["bli"]
ulfdoz has joined #ocaml
monadic_kid has joined #ocaml
smimou has joined #ocaml
monadic_kid has quit ["Leaving"]
fschwidom has quit [Remote closed the connection]
Kerris7 has quit ["Don't even think about saying Candlejack or else you wi"]
rjack has joined #ocaml
Kerris7 has joined #ocaml
bluestorm has joined #ocaml
rjack has quit ["leaving"]
jeanb-- has joined #ocaml
jeanbon has quit [Nick collision from services.]
jeanb-- is now known as jeanbon
ulfdoz_ has joined #ocaml
seafood has joined #ocaml
sporkmonger has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
seafood has quit []
seafood has joined #ocaml
rjack has joined #ocaml
rjack has quit [Client Quit]
<Camarade_Tux>
has anyone a gtk library for which he'd like to have bindings ?
sporkmonger has quit [Remote closed the connection]
sporkmonger has joined #ocaml
sporkmonger has quit [Client Quit]
seafood has quit []
AxleLonghorn has joined #ocaml
<flux>
camarade, too much energy left after writing the browser bindings?-)
<flux>
which reminds me: a library that would be designed to help writing binding generators
<Camarade_Tux>
flux, after a four months pause, it feels alright :p
<Camarade_Tux>
but I need to test my binding generator (and extend the types it knows)
<Camarade_Tux>
btw, when I dug through my hard drive to get my files back, I saw all the tries I had done for those bindings : take1, take2, take3, take4, take42, take5, take6... ;p
<hcarty>
Camarade_Tux: Could your generator handle Cairo bindings? I know they already exist, but I'm curious to see what your generator would produce.
<hcarty>
Cairo may not be Gtk-ish enough though
<Camarade_Tux>
when cairo-ocaml was mentionned on the channel, I checked the api, it doesn't seem gtk-ish at all unfortunately
<Camarade_Tux>
hmmm, probably : "Object oriented design via GObject with a familiar GTK+ like API."
<Camarade_Tux>
hcarty, should be enough :)
<hcarty>
Camarade_Tux: Nifty. It seems to be gaining some momentum.
alexyk has joined #ocaml
jbjohns has joined #ocaml
OChameau has quit ["Leaving"]
monadic_kid has joined #ocaml
* monadic_kid
join haskell
<monadic_kid>
join #haskell
<negacthulhu>
you what to type /join #haskell
<monadic_kid>
god it doesn't help typing with one hand
* Camarade_Tux
doesn't want to know where the other one is
<mfp>
reading RWH and one hand typing? gross
<monadic_kid>
other is holding a cup of green tea
<negacthulhu>
It's a pretty sexy book, but not *that* sexy
<monadic_kid>
i'll wait for the second edition, i don't feel i need to read it anyways
<monadic_kid>
not yet anyways
<negacthulhu>
Haskell has sort of spoiled me... Is there a nice readline front-end to the ocaml interpreter that's written in GNU readline?
<negacthulhu>
'cause I get kind of tired having to copy-paste crap
<Camarade_Tux>
rlwrap, ledit, or try libedit or editline 'iirc the names of the last two)
<mfp>
negacthulhu: most people just do rlwrap ocaml or use the Emacs stuff
<Camarade_Tux>
or use ocaml from emacs
<hcarty>
DrScheme + DrOCaml is reasonable as well
<Camarade_Tux>
drscheme is big =/
<jbjohns>
Does Ocaml support on windows rely on cygwin, etc.? I tried to install Goddi but it seemed like that did at least and even said that it couldn't install many packages on windows
<hcarty>
Camarade_Tux: True, but it's a but more than just a toplevel wrapper. And it's not much bigger than Emacs (though emacs does bring more with it)
<negacthulhu>
mfp: ...sigh... but my father was a VIM guy, and his father before him didn't program because they were kind of new...
<negacthulhu>
And so I was raised a VIM guy
<negacthulhu>
I *guess* I can try the emacs stuff...
<monadic_kid>
jbjohns: no, you can make builds for both mingw and vc
<hcarty>
negacthulhu: I certainly use vim for OCaml
<mfp>
negacthulhu: /me uses vim + rlwrap ocaml FWIW
<hcarty>
mfp: Word
<Camarade_Tux>
jbjohns, it doesn't need cygwin (there are three ports available, only one uses cygwin), the other problems are because of windows (/me is working on them)
<negacthulhu>
rlwrap looks like exactly what I want
<negacthulhu>
thanks a lot #ocaml!
<hcarty>
negacthulhu: rlwrap has a lot of other goodies ... some word completion, filename completion
<Camarade_Tux>
hcarty, iirc I have a 80-100MB emacs but drscheme is like 260MB =/
<Camarade_Tux>
(but emacs comes with my distro while drschem doesn't, so it's maybe my fault)
<hcarty>
Camarade_Tux: I just downloaded it... but I'm not particularly concerned with a few hundred MB toy sitting around
<jbjohns>
Ah ok, it seemed like if you do an install it was native, but I was surprised that the package manager seemed to not be platform dependant
<negacthulhu>
Why is drscheme 260MB?
<jbjohns>
if you don't compile your ocaml code native, is it platform independent?
<hcarty>
negacthulhu: It has a Scheme compiler/interpreter, libraries and other goodies. I've only used it for its DrOCaml plugin though.
<hcarty>
DrScheme is 209mb on my system
<Camarade_Tux>
I'll try harder to reduce it to a reasonnable size next time (200MB really counts when the whole system is 600MB)
<monadic_kid>
jbjohns: well choose to generate bytecode but if you have depedancies that are inherently platform dependant well you know common sense
<negacthulhu>
hcarty: What's DrOcaml?
<jbjohns>
well, the thing is, I need an ecommerce oriented CMS
<monadic_kid>
DrOcaml sounds pretty awesome
<monadic_kid>
DrCaml would have been a more fun name :P
<jbjohns>
I wanted to go with either Haskell or Ocaml because I like their type system. I want people to be able to create components for the CMS like people do with Joomla! and things like that
* rwmjones
is actually writing haskell at the moment, for the first time in a very long time
<monadic_kid>
CMS?
<jbjohns>
I'd prefer if they could just use the compiled package as the component. It seems like that's possible in Ocaml but not Haskell
<jbjohns>
Content management system. Like Wordpress, Joomla!, Drupal and dozens of others. In fact you could call Microsoft Sharepoint one as well
<jbjohns>
what I'm using right now is a special PHP CMS system, but I hate it. Horrible code and I refuse to learn PHP, so this thing has got to go
<mfp>
jbjohns: sounds doable with Dynlink
<jbjohns>
what would be the best framework to start with in Ocaml? Ocsigen ?
<jbjohns>
I tried with that one but it seemed pretty tough to get it set up in windows. I had hoped I could use Godi, but that seems to be unix-based systems only
<thelema>
ocaml's pretty difficult to mix binaries between developers. Maybe bytecode.
<thelema>
or there's something in batteries that sometimes runs external source inside your program... (I think)
<mfp>
jbjohns: Ocsigen is a server + framework; if you want something that relies on an existent server, maybe one of ocamlnet's connectors? (CGI, FastCGI, SCGI, Apache, etc.)
<jbjohns>
well, I want to write as little as possible. :)
<bluestorm>
rwmjones: I always considered Haskell a read-only language
<jbjohns>
I want to focus on my part of the CMS, not the common tasks like resource handlers and so on
<bluestorm>
I read haskell very often (nice blog posts, nice papers) and write it twice a year
<thelema>
n/m, it's just an interface to the compiler... It might be interesting to extend that code to allow eval-like semantics through dynlink
<bluestorm>
the horrible ghci experience and the tricky layout rules (nice to read, hard to write) support a "read-only" thesis
<mfp>
hmm actually Ocsigen's preferred mode of operation was (until recently) dynlinked bytecode
<jbjohns>
really? I think Haskell is beutiful. The biggest problem I see with them is it just seems immature. Dependencies on Perl, unix and so on
<jbjohns>
Ocsigen seems like it would be a good fit. I wish they had a ready made "Ocsigen in a box" type distro
<jbjohns>
I guess the persistence is set up in such a way that different instances can talk to each other? I understand that Ocaml can't run on multiple processors so I'd have to run multiple instances myself
<bluestorm>
(or use fork())
<mfp>
different instances?
<thelema>
OCaml can run on multiple processors, it's just that its built-in threading doesn't do SMP.
ztfw has joined #ocaml
<mfp>
Ocsigen is not like e.g. Rails with 1 req blocking a whole server instance, you don't need N processes
<mfp>
s/server/app server/
Kerris7 has quit ["Don't even think about saying Candlejack or else you wi"]
AxleLonghorn has left #ocaml []
<jbjohns>
ah ok
ztfw` has joined #ocaml
Associat0r has joined #ocaml
AxleLonghorn has joined #ocaml
<AxleLonghorn>
so I've been using omake for a long time, and just recently I got this error