00:07
KirinDave has quit []
00:16
delamarche has joined #ocaml
00:31
_fab has quit [Remote closed the connection]
01:10
david_koontz has quit ["Leaving"]
01:19
dibblego has joined #ocaml
01:29
delamarche has quit [Client Quit]
01:32
romildo has quit ["Leaving"]
01:41
chessguy has joined #ocaml
01:54
mikeX_ has joined #ocaml
02:02
mikeX has quit [Read error: 145 (Connection timed out)]
02:24
levi_hom1 is now known as levi_home
02:35
haelix_ has joined #ocaml
02:35
haelix has quit [Read error: 54 (Connection reset by peer)]
02:35
batdog|gone is now known as batdog
02:43
pango_ has joined #ocaml
02:52
chessguy has joined #ocaml
02:59
pango has quit [Remote closed the connection]
03:06
mikeX_ has quit [Read error: 110 (Connection timed out)]
03:48
ramki has joined #ocaml
03:53
ktne has joined #ocaml
04:01
batdog is now known as batdog|gone
04:37
shekmalhen has joined #ocaml
05:15
pango_ has quit [Remote closed the connection]
05:16
pango_ has joined #ocaml
05:25
kilimanjaro is now known as mmmbeef
05:27
mmmbeef is now known as kilimanjaro
05:32
Snark has joined #ocaml
05:57
_velco has joined #ocaml
06:27
_fab has joined #ocaml
06:33
Snark has quit ["Leaving"]
06:42
dibblego has quit ["Leaving"]
06:49
Skal has joined #ocaml
06:54
pauldia has joined #ocaml
07:06
velco has joined #ocaml
07:38
pauldia has quit [Read error: 110 (Connection timed out)]
07:49
pango_ has quit [Remote closed the connection]
07:51
<
ktne >
anyone here who used sqlite with ocaml?
07:57
pango has joined #ocaml
08:21
love-pingoo has joined #ocaml
08:45
Leonidas has joined #ocaml
08:58
Snark has joined #ocaml
09:14
yondalf has joined #ocaml
09:26
lmbdwr has joined #ocaml
09:49
rillig has joined #ocaml
09:55
Leonidas has quit ["An ideal world is left as an exercise to the reader"]
10:38
yondalf has quit ["leaving"]
11:03
Snark has quit ["Leaving"]
11:29
romildo has joined #ocaml
12:35
david_koontz has joined #ocaml
12:54
Skal has quit [Remote closed the connection]
12:54
chessguy has joined #ocaml
13:12
<
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?
13:13
<
ktne >
never used lablgtk :)
13:17
batdog|gone is now known as batdog
13:24
seto has joined #ocaml
13:25
<
seto >
I think I must use emacs for ocaml edit
13:25
<
seto >
can someone give me a good .emacs ?
13:25
<
ktne >
yes i've started too to use emacs for ocaml
13:25
<
ktne >
a good .emacs?
13:26
<
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
13:26
<
ktne >
seto have you dowloaded the tuareg mode for emacs?
13:26
<
seto >
ktne: currently I run vim.. but I make an exception
13:26
<
ktne >
seto you have to download that then inside the archive there is a sample .emacs, i use that
13:26
<
pango >
seto: ftp://ftp.berlios.de/pub/mldonkey/pango/goodies/dot-emacs
13:26
<
seto >
ktne: ok thx
13:27
<
seto >
pango: thx to you .. my dear :D
13:28
<
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.
13:29
<
love-pingoo >
romildo: search for set_image, it may be a method of gtkButton
13:30
<
romildo >
But it should have been using the external C gtk_button_set_image, which would then be mentioned somewhere in the source.
13:30
<
romildo >
Likewise gtk_button_se_label
13:30
<
romildo >
$ grep gtk_button_set_label *
13:30
<
romildo >
ml_gtkbutton.c:ML_2 (gtk_button_set_label, GtkButton_val, String_val, Unit)
13:33
ramki has quit [Read error: 104 (Connection reset by peer)]
13:39
<
seto >
pango: with this you have a white background no ?
13:41
<
seto >
pango: you are french too ?
13:43
<
pango >
maybe... you don't need to adopt the whole .emacs, just cut&paste what you need...
13:46
<
seto >
ok .. sorry for bothering you pango
13:47
<
seto >
Is there a differecne between caml-mode and tuareg-mode
13:49
<
seto >
ok I find the answer on the web
13:54
shekmalhen has left #ocaml []
13:59
<
romildo >
Wouldn't the code:
13:59
<
romildo >
GMisc.image ~stock:`MEDIA_PLAY ~packing:boxLeft#pack ()
13:59
<
romildo >
be enough to add the MEDIA_PLAY stock icon to a box?
14:00
<
romildo >
Yes, it worked. I have just missed the small icon at a first glance.
14:35
love-pingoo has quit ["Leaving"]
14:46
<
romildo >
Does anybody know how to put an image in a button in lablgtk?
15:08
pauldia has joined #ocaml
15:20
mikeX has joined #ocaml
15:21
chessguy has joined #ocaml
15:30
Skal has joined #ocaml
15:36
datrus has joined #ocaml
15:37
<
datrus >
hello. can anyone please tell me how to represent negative number in ocaml?
15:38
<
datrus >
-2 doesn't seem to work for example
15:38
<
datrus >
let plus a b = a + b;;
15:38
<
datrus >
plus 1 -1;;
15:38
<
datrus >
This expression has type int -> int but is here used with type int
15:39
<
rillig >
# plus 1 (-2);;
15:39
<
rillig >
- : int = -1
15:40
<
rillig >
"plus 1 -1" seems to be interpreted as "plus (1 - 1)".
15:40
<
datrus >
is there any other notation more convenient than (-2) ?
15:42
<
rillig >
I don't think so.
15:47
<
romildo >
What is the difference between Gtk.widget and GObj.widget in lablgtk?
15:49
<
pango >
datrus: there's ~- but I'm not sure it's more convenient than parenthesis ;)
15:49
<
pango >
not to mention ~-. for floats ;)
15:50
<
pango >
# ( + ) 1 ~-1 ;;
15:50
<
pango >
- : int = 0
16:12
velco has quit ["Ex-Chat"]
16:35
love-pingoo has joined #ocaml
16:48
piggybox has quit []
16:48
Demitar_ has joined #ocaml
16:52
postalchris has joined #ocaml
16:54
smimou has joined #ocaml
17:04
Demitar has quit [Read error: 110 (Connection timed out)]
17:12
bluestorm has joined #ocaml
17:22
<
romildo >
But I did not get the type correctly for the GtkWidget* from the Gtk+ API.
17:23
<
romildo >
Maybe someone has a clue on how those methods must be typed. In Gtk+ the functions have the prototypes:
17:23
<
romildo >
GtkWidget* gtk_button_get_image (GtkButton *button);
17:23
<
romildo >
void gtk_button_set_image (GtkButton *button,
17:23
<
romildo >
GtkWidget *image);
17:53
Snark has joined #ocaml
17:53
jajs has joined #ocaml
17:53
jajs has quit [Remote closed the connection]
17:53
jajs has joined #ocaml
17:56
salamero has joined #ocaml
17:57
salamero has left #ocaml []
18:08
danly has joined #ocaml
18:09
jajs has quit ["Leaving"]
18:33
gim_ has joined #ocaml
18:44
gim__ has joined #ocaml
18:47
shawn__ has joined #ocaml
18:48
<
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.
18:48
<
romildo >
I am going to submit it in the lablgtk mailing list.
18:49
shawn__ is now known as shawn
18:53
gim_ has quit [Read error: 60 (Operation timed out)]
19:14
gim__ is now known as gim_
19:16
chessguy2 has joined #ocaml
19:16
fab__ has joined #ocaml
19:16
_fab has quit [Read error: 110 (Connection timed out)]
19:16
chessguy has quit [Nick collision from services.]
19:16
chessguy2 is now known as chessguy
19:46
Snark has quit [Remote closed the connection]
19:46
jajs has joined #ocaml
19:49
pango has quit ["Leaving"]
19:49
pango has joined #ocaml
19:58
_velco has quit ["I'm outta here ..."]
20:31
jajs has quit [Read error: 54 (Connection reset by peer)]
21:00
gim_ has quit [Read error: 54 (Connection reset by peer)]
21:00
gim_ has joined #ocaml
21:24
gim_ has quit [Read error: 110 (Connection timed out)]
21:24
gim__ has joined #ocaml
21:35
mikeX_ has joined #ocaml
21:42
mikeX has quit [Read error: 145 (Connection timed out)]
21:42
luca83 has joined #ocaml
21:53
pauldia has quit [Read error: 110 (Connection timed out)]
21:53
rillig has quit ["exit(EXIT_SUCCESS)"]
21:57
smimou has quit ["bli"]
22:07
love-pingoo has quit ["Connection reset by pear"]
22:12
gim__ has quit ["blah"]
22:36
batdog is now known as batdog|gone
22:38
bluestorm has quit ["Konversation terminated!"]
23:00
Skal has quit [Remote closed the connection]
23:16
<
datrus >
is it possible to access a component of a tuple using it's index?
23:16
<
datrus >
t(0) or t[0] doesnt seem to work
23:20
<
postalchris >
datrus: I'm pretty sure not. In SML tuples are "special" records
23:21
<
postalchris >
datrus: there may be a camlp4 extension that will do this for you
23:22
kryptt has left #ocaml []
23:24
<
pango >
there's no such thing as an index in a tuple
23:28
<
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
23:29
<
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?
23:30
<
pango >
I guess fields of a record cannot be accessed thru indexes in SML either
23:30
<
pango >
unless restricted to constant indexes
23:31
<
postalchris >
Oh, that's right.
23:31
<
postalchris >
Was datrus asking for var-indexes? I don't think so...
23:32
<
pango >
I didn't think of that possibility at first, so maybe you're right
23:34
<
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)
23:40
<
postalchris >
I'm thinking of the syntax #1(tuple) in SML
23:42
<
postalchris >
Which works for arbitrary tuples. I think this is a consequence of the impl. of tuples in SML vs Ocaml
23:44
<
postalchris >
Yeah, doesn't work for var indexes though.
23:44
postalchris has quit ["Leaving."]
23:45
<
pango >
in OCaml you'd go like, let comp_2of5 (_, x, _, _, _) = x (with a new function for each tuple size...)