flux__ changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
<pango> mmmh type something = t followed by type t = something, both in HashedType module, seem to work... (ugly, but works ;) )
shawn has joined #ocaml
<Smerdyakov> You must be using the -rectypes option, or whatever it's called.
<Smerdyakov> I usually try to avoid igt.
<Smerdyakov> it
<pango> not afaik... but type definitions are recursive by default
<Smerdyakov> I thought they weren't, at least in recent past OCaml versions.
<Smerdyakov> That default is somewhat heretical. :P
<pango> always have been, otherwise you could define any usual recursive variant type, lists, trees,...
<Smerdyakov> 'type' is overloaded in OCaml. I believe that recently by default the uses corresponding to the SML 'type' declaration were not recursive but the uses corresponding to SML 'datatype' were.
<pango> -rectypes makes type checker accept some kinds of recursive definitions that would otherwise be rejected
<Smerdyakov> But maybe this was just a poor assumption that things were like SML.
<dylan> mostly recursive non-funtional values
<Smerdyakov> It's definitely a flaw to force all type definitions to be recursive, as far as I'm concerned.
Wizz_Kidd has quit [Remote closed the connection]
<pango> but in that case, the fact that 'type' is recursive by default gets in the way ;)
* pango nods
<Smerdyakov> Use Coq instead. No such trouble. :)
* pango hear that before ;)
<dylan> So, I wonder who deserves the castration for the current brokenness of debian-amd64
Wizz_Kidd has joined #ocaml
<Wizz_Kidd> looks like i am going ot use ocaml
<dylan> etch seems to lack common things lik vim... unstable has a version of vim that is older than vim-runtime...
<dylan> and removing X resulted in ifupdown being removed, too
<dylan> Ah, and python2.4 depends on python2.3, but python2.3 is broken (this is not limited to amd64, it seems. Which means it'll be fixed...)
<dylan> Wizz_Kidd: use ocaml for what?
<Wizz_Kidd> my im client
<dylan> Your proprietary one?
<Wizz_Kidd> proprietrary?
<Wizz_Kidd> you know I was making a IM client
<dylan> Well, you were talking about licenses and stuff.
<Wizz_Kidd> oooo
<Wizz_Kidd> i remember you
<dylan> and why GPL-only stuff is the spawn of santa
<Wizz_Kidd> this im client is for my bussiness
<Wizz_Kidd> Lanceit.com
<Wizz_Kidd> :P
* pango notice the need for a now long overdue s/could/couldn't/ substitution in one of his previous messages... :)
<Smerdyakov> Wizz_Kidd, you mean your hypothetical business that might generate income some day? :D
<Wizz_Kidd> Smerdyakov, you keep thinking that
<Wizz_Kidd> almost 1.5 years in the making here
<pango> add or remove negations from all my previous messages as you see fit ;)
<Smerdyakov> Wizz_Kidd, does it generate income nwo?
<Smerdyakov> now
<Wizz_Kidd> Smerdyakov, have alot of programming magazines and alot of promotion in business magazines and ways to make your bussiness expand , C++ journal is one
<Wizz_Kidd> hell no not even a dollar
<Wizz_Kidd> lanceit.com
<Wizz_Kidd> look at it
<Smerdyakov> Wizz_Kidd, OK, so it's _hypothetical_.
<Wizz_Kidd> testcoder
<Wizz_Kidd> test
<Wizz_Kidd> pretty much guarneteed 2 me but hypothetical to you
<Wizz_Kidd> typo*
<Wizz_Kidd> i have set it up so well
<Wizz_Kidd> so much programming
<Wizz_Kidd> great desgin user inerface
<Wizz_Kidd> chat 9+ payent gateways
<Wizz_Kidd> a set of debit cards for only our people
<Wizz_Kidd> a built in email system
mikeX has joined #ocaml
<Wizz_Kidd> and a bunch more exlclusive stuff
<Wizz_Kidd> that you wont find anywehre else plus i have invested alot on promotion
<Wizz_Kidd> just alotof great stuff
<Wizz_Kidd> but enough about that
<Wizz_Kidd> but i am going ot use ocaml to make my im client
<Wizz_Kidd> i started on it wit hC but thats no fun
<Wizz_Kidd> ocaml looks like a great language imma give it a try
<dylan> you'll need C for a non-gtk interface in ocaml
<Wizz_Kidd> ummmmm
<Wizz_Kidd> just gtk and win32 gui
<dylan> you'll need C for win32 gui
<Wizz_Kidd> and a win32 gui lib exist for caml
<dylan> Unless there is a module I overlooked
<Wizz_Kidd> ^^^^^^^^^^^^
<Wizz_Kidd> yes u overlooked ;)
<Wizz_Kidd> and C and GTK is all I need
<dylan> who is this 'u' you keep refering to?
<Wizz_Kidd> and if i really wanted to I could do GTK on windows ;)
<Wizz_Kidd> u!!
<Wizz_Kidd> there is a win32 module
<dylan> Cool.
<dylan> Well, \ (lambda) thinks this is a good thing.
danly has joined #ocaml
smimou has quit ["bli"]
helix6 has joined #ocaml
helix6 has quit [Excess Flood]
mikeX has quit [Read error: 110 (Connection timed out)]
pirata has quit [Read error: 110 (Connection timed out)]
helix7 has joined #ocaml
helix7 has left #ocaml []
helix7 has joined #ocaml
helix7 has left #ocaml []
helix7 has joined #ocaml
helix7 has left #ocaml []
helix7 has joined #ocaml
helix7 has left #ocaml []
helix7 has joined #ocaml
helix7 has left #ocaml []
helix7 has joined #ocaml
helix7 has left #ocaml []
helix7 has joined #ocaml
helix7 has left #ocaml []
CosmicRay has joined #ocaml
skew has joined #ocaml
khaladan has quit [" HydraIRC -> http://www.hydrairc.com <- IRC for those that like to be different"]
ramkrsna has quit [Connection timed out]
ramkrsna has joined #ocaml
Wizz_Kidd has quit [Remote closed the connection]
Purice has joined #ocaml
jcreigh has joined #ocaml
skew has quit ["leaving"]
CosmicRay has quit [Read error: 113 (No route to host)]
jcreigh has quit ["Do androids dream of electric sheep?"]
Purice has quit ["Leaving"]
jcreigh has joined #ocaml
Smerdyakov has quit ["Leaving"]
Smerdyakov has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
ramkrsna has joined #ocaml
jcreigh has quit ["Do androids dream of electric sheep?"]
Smerdyakov has quit ["Leaving"]
Snark has joined #ocaml
_JusSx_ has joined #ocaml
rillig has joined #ocaml
rillig has quit ["rebooting ..."]
rillig has joined #ocaml
rillig has quit [Remote closed the connection]
rillig has joined #ocaml
mattam has joined #ocaml
rillig has quit [Remote closed the connection]
rillig has joined #ocaml
Wizz_Kidd has joined #ocaml
<Wizz_Kidd> anyone up
rillig has quit [Remote closed the connection]
<ski> Wizz_Kidd : hm ?
<Wizz_Kidd> how cna i make my code work on anyones comp
<Wizz_Kidd> i mean
<Wizz_Kidd> i took a hello world did the
<Wizz_Kidd> ocamlc -o etc etc
<Wizz_Kidd> and it works on my computer but says permissions denied on others
<ski> what says 'permission denied' ?
<ski> invoking 'ocaml' ?
<ski> (s/l'/lc'/)
<Wizz_Kidd> ./hello
<Wizz_Kidd> works on my computer
<Wizz_Kidd> but when i send it to my friend it doesnt work
<Wizz_Kidd> he doesnt have ocaml
<ski> is the problem that the execute bit is not set (assuming unixish) ?
<Wizz_Kidd> huh?
<Wizz_Kidd> i odnt knwo what the problem is
pango is now known as pangoafk
<Wizz_Kidd> i thoguth when you used ocamlc that th user did not have to have ocaml on the computer
<ski> what OS is your friend using ?
<Wizz_Kidd> same as me slackware
<Wizz_Kidd> only differnce is he doesnt have ocaml on the computrer
<ski> and is the file permissions (specifically execution bit) set correctly, on 'hello' on his computer, yes or no ?
<Wizz_Kidd> what do you mean
<ski> e.g. what does the command 'ls -l hello' display, if you run it in some shell ?
<Wizz_Kidd> bash-3.1# ./hello
<Wizz_Kidd> bash: ./hello: /usr/local/bin/ocamlrun: bad interpreter: No such file or directory
<Wizz_Kidd> but i thoght when yourun ocamlc the user doesnt have to have ocaml on the computer
<Wizz_Kidd> i thought it nateviel compiles
<ski> no, i want you to try 'ls -l hello', not './hello'
<ski> hrm
<ski> actually
<Wizz_Kidd> i tok ocaml off my computer i have to install myself also
pangoafk is now known as pango
<pango> Wizz_Kidd: ocamlc is bytecode compiler, you want ocamlopt
<Wizz_Kidd> ahhhhhhhhhhh
<Wizz_Kidd> what will the size of a hello world be
<Wizz_Kidd> with ocamlc it was 11 KB
<Wizz_Kidd> will it maintain that
<pango> no, it will be slightly larger, someone told ~80kB already
<pango> bytecode version probably not only relies on installed runtime for interpretation, but also for standard libs
<Wizz_Kidd> thanks thanks i will install ocaml on my new distro n try
slipstream has joined #ocaml
love-pingoo has joined #ocaml
<Wizz_Kidd> so whats the size ?
<Wizz_Kidd> of the one you made
<pango> 78408 bytes (76.57kB)
<pango> ocamlopt has an (undocumented) -nopervasives flag to prevent automatic linking of default lib... But then you're on your own, not even print_endline will be available ;)
<Wizz_Kidd> what do you mean
<Wizz_Kidd> what would preventing automatic linking do ?
<pango> that if you want, say, to send strings to stdout, you'll have to provide your own wrapper for libc's puts(), etc.
<pango> the runtime environment would be stripped to the bare minimum (garbage collector, etc.)
<Wizz_Kidd> what would the size be then ya think ?
<pango> pervasives.cmx is ~4kB, so it's probably not worth it
<Wizz_Kidd> what you mean
<Wizz_Kidd> i mean if you did that and had a hello world
<Wizz_Kidd> what woukd the size be around then
<Wizz_Kidd> half ?
<pango> no, you'd probably gain few kBs
slipstream-- has quit [Read error: 110 (Connection timed out)]
<Wizz_Kidd> wtf then whats the point of it
<Wizz_Kidd> im trying to conserve space ofr this make it as small as possible
<pango> it's probably used for specific uses (where Pervasives could get in the way) rather than for executable size benefit
<Wizz_Kidd> well you know any other ways to make it smaller
<Wizz_Kidd> besides upx
<pango> ocamlopt also has a -compact flag, but I don't know how effective it is (for above hello world example, it has no effect, maybe on larger programs...)
<love-pingoo> Wizz_Kidd: what's your compilation target actually ?
<Wizz_Kidd> what do you mean?
<mellum> If you ask that, the answer is "i386" :)
<love-pingoo> why are you so bothered by the size of your executables ?
<love-pingoo> you said you were doing game dev ?
<love-pingoo> mellum: could be arm
<Wizz_Kidd> no no
<Wizz_Kidd> this is for something different
<Wizz_Kidd> this is for im client
<Wizz_Kidd> i want to keep im client under 300 KB
<Wizz_Kidd> well anything under 1 MB would be fine i guess
<Wizz_Kidd> then upx
<love-pingoo> ok
<love-pingoo> then your questions might not be relevant
<Wizz_Kidd> but games is laaaterrrr me and my other guy gotta talk about it and if ocaml will work and if we want to write an engine
<pango> problem of upx, under Linux at least, is that the executable is actually unpacked in /tmp before it's run
<Wizz_Kidd> Yes?
<love-pingoo> ocaml doesn't support dynamic linking, so you client will contain all of the ocaml libs it will use, which could make it really fat
<pango> so the benefit is mostly psychologic ;)
<Wizz_Kidd> grrrrrr
<Wizz_Kidd> so gtk
<Wizz_Kidd> so it will contain alll GTK libs
<love-pingoo> Wizz_Kidd: exactly
<love-pingoo> liquidsoap weights 3MB (ocaml-vorbis,mad,shout, and a few others)
<pango> love-pingoo: not exactly
<Wizz_Kidd> wow
<Wizz_Kidd> f thsi then lol
<pango> love-pingoo: ldd still reports lots of dynamic links
<love-pingoo> Wizz_Kidd: forget that liq is bytecode compiled
<Wizz_Kidd> i thoght ocaml had some kind of dynaimc linking
<love-pingoo> pango: the C libs are dynamically linked
<love-pingoo> but the caml libs are completely included in every binary as far as I know
<Wizz_Kidd> whaaaat
<pango> love-pingoo: yes, so it will not contain "GTK libs" like Wizz_Kidd said
<love-pingoo> no but lablgtk is quite big
<Wizz_Kidd> ok so if i do a ocaml / gtk ap p are my people gonna get gtk libs with my program
<love-pingoo> dbaelde@igloo ~ $ ls -lh /usr/bin/coqide.opt
<love-pingoo> -rwxr-xr-x 1 root root 5.9M Feb 14 09:07 /usr/bin/coqide.opt
_jol_ has joined #ocaml
<love-pingoo> this is a native ocaml app using lablgtk
<Wizz_Kidd> immm sooo confused
<love-pingoo> (and probably not much more)
<Snark> Wizz_Kidd: notice that having a small exec makes it fast to load... and long to link !
<pango> mlim is ~5MB
<Wizz_Kidd> yea well including the gtk libs would be a for sure overkill
<pango> 3.6MB stripped
<Wizz_Kidd> i am trying ot make a ocaml / gtk im client in under a MB
<love-pingoo> I'd say you can't.. then the question is: do you really need this constraint ?
<pango> under 3MB may be possible
<Wizz_Kidd> theres gotta be some way to dynamic link big stuff like gtk and such
<love-pingoo> OCaml is a good choice, will make your app fast, I'd hate to make you move to another language :)
<Wizz_Kidd> i know C very well
<Wizz_Kidd> but i like ocaml syntac
<Wizz_Kidd> x
<Wizz_Kidd> a chnage
<Wizz_Kidd> change
<love-pingoo> maybe you can use Dynlink
<Wizz_Kidd> buuuut i need dynamic linking for stuff like gtk
<love-pingoo> only available for bytecode, and not completely transparent to use
<Wizz_Kidd> well i need native code also lol
<Wizz_Kidd> but i jus cant see this thing packing all gtk libs
<love-pingoo> Wizz_Kidd: another possibility is to write the gtk stuff in OCaml, then bind your widgets to OCaml (not full lablgtk)
<love-pingoo> it'll avoid writing gtk in OCaml, which I didn't like when I tried (no doc)
<Wizz_Kidd> i know gtk
<Wizz_Kidd> love-pingoo, your statment didnt make any sense ....
<Wizz_Kidd> lol
<Wizz_Kidd> write in ocaml then bind in ocaml
<love-pingoo> sorry
<love-pingoo> write your gtk code in C, then bind it to OCaml
<Wizz_Kidd> yea man but then it would jus be quciker ot use C
<Wizz_Kidd> c is also pretty easy
<Wizz_Kidd> but i jus like ocaml syntax
<Wizz_Kidd> cool stuff
<love-pingoo> the app logic is still in OCaml, the protocol handling and so on
<Wizz_Kidd> :(
<Wizz_Kidd> theres gotta be a way to dynamic link with ocaml and native code :P
<love-pingoo> ask on the caml-list, some guru may have a trick to do that..
<Wizz_Kidd> if euphoria has got it ocaml has ot have it some how
<Wizz_Kidd> euphoria = a scripting lang with a C translator that dynamiclly links
<Wizz_Kidd> translator is also first party
<Wizz_Kidd> and it oweuld be coll to use ocaml instead of C all the time
<pango> I think there's such lib (natlink ?) that was created as a byproduct of MetaOcaml... but it's no longer maintained, iirc
<pango> btw using dynamic linking for native ocaml code will only be a space saver if you have more than one native ocaml app installed ;)
<Wizz_Kidd> what do you mean????
<pango> that seems obvious, if you only have one app, disk space usage will be roughly the same, whether ocaml libs are separate files dynamically linked, or statically linked in the app
<Wizz_Kidd> i am taling for distributing apps
<Wizz_Kidd> i dont want to distribute GTK libs with my app
<pango> reread what was said previously, .so libs *are* dynamically linked; only native ocaml libs aren't
<Wizz_Kidd> i want jus my app and for it to use gtk libs already installed
<Wizz_Kidd> ooooooooo
<pango> yes, does that already
<Wizz_Kidd> so like lablgtk
<Wizz_Kidd> or w/e
<Wizz_Kidd> ?
<Wizz_Kidd> of course i would expect for that to be dynamcally linked what would be the point
_jol_ has quit ["leaving"]
<pango> lablgtk(2) itself will be linked in, but it will (dynamically) use system's GTK libs
<Wizz_Kidd> yea
<Wizz_Kidd> thatswhat i expected
<Wizz_Kidd> from the way love-pingoo was making it sound he said GTK libs would be LINKED in as well static
<pango> only if asked for (ocamlopt -static I think)
<Wizz_Kidd> what is mlgui
<pango> some GTK2 gui for mldonkey
<pango> (not sure of -static)
<pango> probably -ccopt -static
<Wizz_Kidd> how big is a hello world in GTK
<pango> who knows ;)
<Wizz_Kidd> olol
ski has quit [Nick collision from services.]
ski has joined #ocaml
<pango> beside the fact that it sends lots of failed assertions and displays no window...
<pango> it's 1MB, 729kB stripped
<love-pingoo> nice !
<love-pingoo> seeing that lablgtk.cma is only 750K I wondered why coqide is so huge...
<love-pingoo> now I wonder how you got something smaller than lablgtk.cma
<pango> at least it compresses well, down to 248kB once upx'ed
<love-pingoo> do many people use upx ? or is it only meant for distributing binaries ?
<pango> it's not a good thing under Linux... since Linux uses on demand paging, the executable has to be unpacked in /tmp before it's run
<pango> and then, if you start several instances of the application, since the unpacked executables are separate, they don't share memory...
<pango> so it's not really useful
<pango> maybe with slow devices + /tmp in ramdisk...
<pango> yuck
<pango> ok, I forgot to link in gtkInit.cmx, now it works, very similar sizes
<Wizz_Kidd> lol why is lablgtk soo large
<Wizz_Kidd> how baout wxocaml
Wizz_Kidd is now known as Wizz_Kidd-away
smimou has joined #ocaml
dark_light has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
ski_ has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
love-pingoo has quit [Remote closed the connection]
love-pingoo has joined #ocaml
ramkrsna has quit [Remote closed the connection]
love-pingoo has quit ["Connection reset by by pear"]
ski_ has quit [Read error: 110 (Connection timed out)]
ski_ has joined #ocaml
gim has joined #ocaml
kral has joined #ocaml
_jol_ has joined #ocaml
love-pingoo has joined #ocaml
_jol_ has quit ["leaving"]
love-pingoo has quit ["Connection reset by by pear"]
pango is now known as pangoafk
Smerdyakov has joined #ocaml
Smerdyakov has left #ocaml []
pangoafk is now known as pango
ski_ has quit [Read error: 110 (Connection timed out)]
ski_ has joined #ocaml
kral has quit ["Live fast, die young."]
Smerdyakov has joined #ocaml
bohanlon has quit [Remote closed the connection]
Snark has quit ["Leaving"]
bohanlon has joined #ocaml
finelemo1 has joined #ocaml
rillig has joined #ocaml
finelemon has quit [Read error: 110 (Connection timed out)]
Wizz_Kidd-away is now known as Wizz_Kidd
Wizz_Kidd has quit [Remote closed the connection]
ski_ has quit [Read error: 110 (Connection timed out)]
ski_ has joined #ocaml
CosmicRay has joined #ocaml
_JusSx_ has quit ["leaving"]
jcreigh has joined #ocaml
gim has quit []
CosmicRay has quit ["Client exiting"]
jcreigh has quit ["Do androids dream of electric sheep?"]
smimou has quit ["bli"]