dark_light 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/
KirinDave has quit []
delamarche has joined #ocaml
_fab has quit [Remote closed the connection]
david_koontz has quit ["Leaving"]
dibblego has joined #ocaml
delamarche has quit [Client Quit]
romildo has quit ["Leaving"]
chessguy has joined #ocaml
mikeX_ has joined #ocaml
mikeX has quit [Read error: 145 (Connection timed out)]
levi_hom1 is now known as levi_home
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Try something fresh"]
haelix_ has joined #ocaml
haelix has quit [Read error: 54 (Connection reset by peer)]
batdog|gone is now known as batdog
pango_ has joined #ocaml
chessguy has joined #ocaml
pango has quit [Remote closed the connection]
mikeX_ has quit [Read error: 110 (Connection timed out)]
ramki has joined #ocaml
ktne has joined #ocaml
chessguy has quit [" Want to be different? HydraIRC -> http://www.hydrairc.com <-"]
batdog is now known as batdog|gone
shekmalhen has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
kilimanjaro is now known as mmmbeef
mmmbeef is now known as kilimanjaro
Snark has joined #ocaml
_velco has joined #ocaml
_fab has joined #ocaml
Snark has quit ["Leaving"]
dibblego has quit ["Leaving"]
Skal has joined #ocaml
pauldia has joined #ocaml
velco has joined #ocaml
pauldia has quit [Read error: 110 (Connection timed out)]
pango_ has quit [Remote closed the connection]
<ktne> hello
<ktne> anyone here who used sqlite with ocaml?
pango has joined #ocaml
love-pingoo has joined #ocaml
Leonidas has joined #ocaml
Snark has joined #ocaml
yondalf has joined #ocaml
lmbdwr has joined #ocaml
rillig has joined #ocaml
Leonidas has quit ["An ideal world is left as an exercise to the reader"]
yondalf has quit ["leaving"]
Snark has quit ["Leaving"]
romildo has joined #ocaml
david_koontz has joined #ocaml
Skal has quit [Remote closed the connection]
chessguy has joined #ocaml
chessguy has quit [" Try HydraIRC -> http://www.hydrairc.com <-"]
<romildo> Hi.
<ktne> hi romildo
<romildo> I am writing a GUI for my program with lablgtk. I am missing the gtk_button_set_image from the Gtk API. Isn't it implemented in lablgtk?
<ktne> dunno
<ktne> never used lablgtk :)
batdog|gone is now known as batdog
seto has joined #ocaml
<seto> I think I must use emacs for ocaml edit
<ktne> hi seto
<seto> can someone give me a good .emacs ?
<ktne> yes i've started too to use emacs for ocaml
<ktne> a good .emacs?
<flux__> romildo, might not be, I don't know, but changes are it is very simple to add, if you have any experience with C
<ktne> seto have you dowloaded the tuareg mode for emacs?
<seto> ktne: currently I run vim.. but I make an exception
<ktne> seto you have to download that then inside the archive there is a sample .emacs, i use that
<pango> seto: ftp://ftp.berlios.de/pub/mldonkey/pango/goodies/dot-emacs
<seto> ktne: ok thx
<seto> pango: thx to you .. my dear :D
<romildo> flux__: searching for gtk_button_set_image on lablgtk-2.6.0.orig/src/* returns nothing. So I suppose I can conclude lablgtk does not have it.
<love-pingoo> romildo: search for set_image, it may be a method of gtkButton
<romildo> But it should have been using the external C gtk_button_set_image, which would then be mentioned somewhere in the source.
<romildo> Likewise gtk_button_se_label
<romildo> $ grep gtk_button_set_label *
<romildo> ml_gtkbutton.c:ML_2 (gtk_button_set_label, GtkButton_val, String_val, Unit)
ramki has quit [Read error: 104 (Connection reset by peer)]
<seto> pango: with this you have a white background no ?
<seto> pango: you are french too ?
<pango> maybe... you don't need to adopt the whole .emacs, just cut&paste what you need...
<seto> ok .. sorry for bothering you pango
<seto> Is there a differecne between caml-mode and tuareg-mode
<seto> ok I find the answer on the web
shekmalhen has left #ocaml []
<romildo> Wouldn't the code:
<romildo> GMisc.image ~stock:`MEDIA_PLAY ~packing:boxLeft#pack ()
<romildo> be enough to add the MEDIA_PLAY stock icon to a box?
<romildo> Yes, it worked. I have just missed the small icon at a first glance.
ktne has quit []
love-pingoo has quit ["Leaving"]
<romildo> Does anybody know how to put an image in a button in lablgtk?
pauldia has joined #ocaml
mikeX has joined #ocaml
chessguy has joined #ocaml
Skal has joined #ocaml
datrus has joined #ocaml
<datrus> hello. can anyone please tell me how to represent negative number in ocaml?
<datrus> -2 doesn't seem to work for example
<datrus> let plus a b = a + b;;
<datrus> plus 1 -1;;
<datrus> This expression has type int -> int but is here used with type int
<rillig> # plus 1 (-2);;
<rillig> - : int = -1
<rillig> "plus 1 -1" seems to be interpreted as "plus (1 - 1)".
<datrus> is there any other notation more convenient than (-2) ?
<rillig> I don't think so.
<datrus> ok thanks
<romildo> What is the difference between Gtk.widget and GObj.widget in lablgtk?
<pango> datrus: there's ~- but I'm not sure it's more convenient than parenthesis ;)
<pango> not to mention ~-. for floats ;)
<pango> # ( + ) 1 ~-1 ;;
<pango> - : int = 0
velco has quit ["Ex-Chat"]
love-pingoo has joined #ocaml
piggybox has quit []
Demitar_ has joined #ocaml
postalchris has joined #ocaml
smimou has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
<romildo> I have written the patch http://rafb.net/paste/results/swsmmH66.html to add the methos image and set_image to class Button with gtklabel.
<romildo> But I did not get the type correctly for the GtkWidget* from the Gtk+ API.
<romildo> Maybe someone has a clue on how those methods must be typed. In Gtk+ the functions have the prototypes:
<romildo> GtkWidget* gtk_button_get_image (GtkButton *button);
<romildo> void gtk_button_set_image (GtkButton *button,
<romildo> GtkWidget *image);
Snark has joined #ocaml
jajs has joined #ocaml
jajs has quit [Remote closed the connection]
jajs has joined #ocaml
salamero has joined #ocaml
salamero has left #ocaml []
danly has joined #ocaml
jajs has quit ["Leaving"]
gim_ has joined #ocaml
gim__ has joined #ocaml
shawn__ has joined #ocaml
<romildo> I am glad I could patch lablgtk to include the methos image and set_image to class Button.button. It is working right now.
<romildo> If anyone want to test it, the patch is available at http://rafb.net/paste/results/6UXmkA59.html
<romildo> I am going to submit it in the lablgtk mailing list.
shawn__ is now known as shawn
gim_ has quit [Read error: 60 (Operation timed out)]
gim__ is now known as gim_
chessguy2 has joined #ocaml
fab__ has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
chessguy has quit [Nick collision from services.]
chessguy2 is now known as chessguy
Snark has quit [Remote closed the connection]
jajs has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
_velco has quit ["I'm outta here ..."]
jajs has quit [Read error: 54 (Connection reset by peer)]
gim_ has quit [Read error: 54 (Connection reset by peer)]
gim_ has joined #ocaml
chessguy has quit [" Like VS.net's GUI? Then try HydraIRC -> http://www.hydrairc.com <-"]
gim_ has quit [Read error: 110 (Connection timed out)]
gim__ has joined #ocaml
mikeX_ has joined #ocaml
mikeX has quit [Read error: 145 (Connection timed out)]
luca83 has joined #ocaml
pauldia has quit [Read error: 110 (Connection timed out)]
rillig has quit ["exit(EXIT_SUCCESS)"]
smimou has quit ["bli"]
love-pingoo has quit ["Connection reset by pear"]
gim__ has quit ["blah"]
batdog is now known as batdog|gone
bluestorm has quit ["Konversation terminated!"]
fab__ has quit []
luca83 has quit ["Download Gaim: http://gaim.sourceforge.net/"]
Skal has quit [Remote closed the connection]
<datrus> is it possible to access a component of a tuple using it's index?
<datrus> t(0) or t[0] doesnt seem to work
<postalchris> datrus: I'm pretty sure not. In SML tuples are "special" records
<postalchris> datrus: there may be a camlp4 extension that will do this for you
kryptt has left #ocaml []
<datrus> ok thanks
<pango> there's no such thing as an index in a tuple
<pango> and in a strongly statically typed language there's no way the type of t.(i), (if that syntax existed), could depend on the value of i
<postalchris> pango: why doesn't ocaml treat tuples-as-records like SML? Then t.(i) induces a partial type... is this a type-safety problem?
<pango> I guess fields of a record cannot be accessed thru indexes in SML either
<pango> unless restricted to constant indexes
<postalchris> Oh, that's right.
<postalchris> Was datrus asking for var-indexes? I don't think so...
<pango> I didn't think of that possibility at first, so maybe you're right
<pango> OCaml only allows deconstructing tuples thru pattern matching; but you need as many patterns as tuple sizes and components (well, there's fst and snd functions that are predefined for pairs)
<postalchris> I'm thinking of the syntax #1(tuple) in SML
<postalchris> Which works for arbitrary tuples. I think this is a consequence of the impl. of tuples in SML vs Ocaml
<pango> probably
<postalchris> Yeah, doesn't work for var indexes though.
postalchris has quit ["Leaving."]
<pango> in OCaml you'd go like, let comp_2of5 (_, x, _, _, _) = x (with a new function for each tuple size...)