lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
dnolen has quit [Quit: dnolen]
arubin has quit [Quit: arubin]
ulfdoz has quit [Ping timeout: 252 seconds]
ikaros has joined #ocaml
Cyanure has joined #ocaml
hto has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
Cyanure has quit [Remote host closed the connection]
ikaros has joined #ocaml
ttamttam has joined #ocaml
ygrek has joined #ocaml
struktured has joined #ocaml
edwin has joined #ocaml
raichoo has joined #ocaml
eikke has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
probst has joined #ocaml
maufred has joined #ocaml
musically_ut has joined #ocaml
ygrek has quit [Remote host closed the connection]
_andre has joined #ocaml
ygrek has joined #ocaml
struktured has quit [Ping timeout: 260 seconds]
everyonemines has joined #ocaml
joole_t has joined #ocaml
joole_t is now known as tommytom
<tommytom>
Hello, I use lablgtk, and with I need to use method (layout#move) but it need a
<tommytom>
Gobk.widget but my button inherit of it
<tommytom>
how to "cast" a button in GObj.widget ?
<adrien>
try #coerce
<adrien>
or maybe better
<adrien>
if you have a "notebook", try "#as_notebook"
<adrien>
I'm pulling this example but it's actually not available (I'm slowly adding them)
<tommytom>
Thanks Adrien, it works !!
<tommytom>
I tried as_widget before ^^
<adrien>
=)
sebz has quit [Quit: Computer has gone to sleep.]
<tommytom>
Do you now if it is possible to change height of a widget ?
<tommytom>
or width
<adrien>
which widget and change it according to what?
<tommytom>
separator
<tommytom>
I try to move manually element on screen with layout
<tommytom>
And I want manipulate size of widgets
<adrien>
never tried that; the widgets are supposed to take the size they need, maybe filling in available space too
<adrien>
isn't there a method for the layout to move it?
<adrien>
also, which module is the "separator" form?
<adrien>
GPack?
mcclurmc has quit [Excess Flood]
<tommytom>
yes I can move element with layout#move, but separator doesn't appear.
<tommytom>
GMisc
mcclurmc has joined #ocaml
<adrien>
you want to split a box in two and make it possible to resize both panes?
<tommytom>
I don't have box, just one layout
avsm has joined #ocaml
<tommytom>
just resize separator
<adrien>
box, or whatever area that is on the screen and square
<adrien>
wouldn't a GPack.paned be better?
<tommytom>
I look
everyonemines has quit [Quit: Leaving.]
<tommytom>
It seems good, i'll try it
<adrien>
=)
<tommytom>
But how to determine where the widget must go ?
<tommytom>
right or left panel
<adrien>
what do you mean? if you create a widget with ~packing:paned#pack1, it'll be the left one; but this widget is supposed to have also a widget on the right
destrius has quit [Quit: Leaving.]
<adrien>
you have only _one_ widget? and you want to be able to resize it dynamically?
<tommytom>
no no thank you ;)
<tommytom>
my bad
<adrien>
ok
ikaros has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
tommytom has quit [Quit: leaving]
larhat has joined #ocaml
joole_t has joined #ocaml
<joole_t>
re Hey, how to solve this ?? : /usr/bin/ld: cannot find -lgtkgl-2.0
joole_t is now known as tommytom
thomasga has joined #ocaml
ankit9 has quit [Remote host closed the connection]
musically_ut has quit [Ping timeout: 276 seconds]
ikaros has quit [Quit: Ex-Chat]
thomasga1 has joined #ocaml
musically_ut has joined #ocaml
thomasga has quit [Ping timeout: 245 seconds]
jamii has joined #ocaml
<adrien>
tommytom: you need the gtkgl-2.0 library: missing dependency
<tommytom>
gtkgl ?
<tommytom>
Okay i look
<tommytom>
it is not installed with lablgtk ?
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
<adrien>
tommytom: name is gtkgtlarea (with one or two dashes somewhere)
<adrien>
it's a C library
<tommytom>
It is installed, but not the devel package
Associat0r has joined #ocaml
<adrien>
yup, you probably need it
<tommytom>
yes it's compile, but little problem in execution : Fatal error: exception Gpointer.Null I think it is just because I declare the object but I don't use it
<adrien>
declare? you can't declare without initializing
dnolen has joined #ocaml
<tommytom>
I have let arer = GLGtk.area ~packing... in
<tommytom>
*GlGtk.area
ygrek has joined #ocaml
<tommytom>
I must go in class, I will not see your response :(
<adrien>
tommytom: compile with -g
<tommytom>
I ll try
<adrien>
run with the OCAMLRUNPARAM="b" environment
<tommytom>
Ok
<adrien>
OCAMLRUNPARAM="b" ./a.out
<adrien>
and you'll see where the exception is raised
<tommytom>
Nice
<tommytom>
Thank you
<adrien>
=)
tommytom has quit [Quit: leaving]
ikaros has joined #ocaml
lamawithonel has quit [Ping timeout: 240 seconds]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
sebz has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
dnolen has quit [Quit: dnolen]
sebz has quit [Quit: Computer has gone to sleep.]
Boscop_ has joined #ocaml
raichoo has quit [Quit: leaving]
<thelema>
https://groups.google.com/forum/#!topic/nodejs/1ESsssIxrUU <- "Try/catch is broken" -- In Go, the new convention for errors is to return a tuple `(result, err)` and test `err` before continuing (or ignore it, aided by the language semantics for tuple assignment. In OCaml, we have polymorphic variants which generalize well the practice of returning [foo option] to [`OK of foo | `Err of exn] and further.
<thelema>
The problem with this ocaml solution is that syntactically, pattern matching on the result gives similar heaviness to using exceptions in the first place.
<thelema>
Monadic combinators can be used to keep the `Err result hidden, but really change the syntax of the operation, and hide a lot of what's going on.
<adrien>
I want the exception checked to be updated ='(
<thelema>
adrien: ?
<adrien>
a tool/patch/* that checked there was no uncaught exception
<thelema>
Also, putting the tests for errors inline leads to timid coding.
<thelema>
adrien: yes, it'd be nice to verify that all exceptions were caught.
<thelema>
adrien: although this may be difficult in a functional language where codepaths aren't static
<thelema>
If you looked at everywhere that an exception could be raised, it would be simple to examine the heirarchy of scopes that could encapsulate that throw
<thelema>
but this heirarchy can be generated at runtime
<adrien>
right, but it could already help
<adrien>
sure, if you "let foo f () = f ()", f might throw whatever it wants
<adrien>
oh I want to murder this windows crap
<thelema>
:)
<adrien>
looks like I just did...
sebz has joined #ocaml
<adrien>
ah, idiot decided it should run some "optimization" software on the .net assemblies
<adrien>
and I'm on battery power
<thelema>
:)
larhat has quit [Quit: Leaving.]
<thelema>
yay windows.
<adrien>
hah, and it won't let me disable and stop a service which has to do with DRM but I can disable a service that it is dependant on :P
sebz has quit [Quit: Computer has gone to sleep.]
<thelema>
That's funny - I'll remember that if I have problems with DRM
<adrien>
I have no idea what it does but considering this is a VM so I can compile..... I don't really care about it
<adrien>
plus I think it was sucking CPU
<thelema>
that's what DRM is good for.
ikaros has quit [Quit: Ex-Chat]
<adrien>
hmm, it was "Window Licensing Monitoring Service", and now it's not telling me anymore that I have 10 days to register (eval version) ; we'll see what happens in ten days :P
<thelema>
:)
<adrien>
I hate windows..........
<adrien>
worse than "I'm not slacking, my code's compiling.", "I'm not slacking, windows is rebooting once more"
<thelema>
adrien: going back to exceptions - using variants for exceptions forces the type system to check exception catching
<thelema>
but they're not really exceptions anymore
ttamttam has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
<adrien>
gah, now I need all the cygwin stuff and I have no network
<adrien>
thelema: yeah, at th same time it's nice that exceptions are light to use
<thelema>
yes, using pattern matching to test for an exception on every statement would not be convenient.
ikaros has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
Cyanure has joined #ocaml
matt` has joined #ocaml
matt` has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
jimenezrick has joined #ocaml
avsm has quit [Quit: Leaving.]
ulfdoz has quit [Read error: Operation timed out]
ttamttam has joined #ocaml
ulfdoz has joined #ocaml
eikke has quit [Ping timeout: 248 seconds]
Boscop_ is now known as Boscop
Boscop has quit [Changing host]
Boscop has joined #ocaml
jamii has quit [Read error: Operation timed out]
ulfdoz has quit [Read error: Connection reset by peer]
ulfdoz has joined #ocaml
Tobu has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
<vivanov>
ocamldebug says: cant find module Batteries but batteries are installed
<thelema>
vivanov: you have to point ocamldebug at batteries' install dir
<vivanov>
thelema: `No source file for BatList.` still there
edwin has quit [Quit: Leaving.]
edwin has joined #ocaml
edwin has quit [Client Quit]
edwin has joined #ocaml
_andre has quit [Quit: leaving]
raichoo has joined #ocaml
<thelema>
vivanov: I'm making the assumption that the batteries source tree has not been `make cleaned` since a `make` was run
<vivanov>
yes
<vivanov>
i get similar error when using calling other modules
<vivanov>
not only battereis
<thelema>
yes, ocamldebug works great for self-contained projects, but needs much better support from ocamlfind for dependencies
<vivanov>
i see
<thelema>
I've made this work before, but apparently can't recall how.
<thelema>
do you really need to step into batteries files to do your debugging?
<vivanov>
thelema: no i dont -- can do without it hopefully
<vivanov>
thx for help :)
<vivanov>
i guess i need to `directory ` lots of directories
<thelema>
very likely.
<vivanov>
thelema: found the solution : `directory /home/vivanov/batteries-included/_build`
jimenezrick has quit [Remote host closed the connection]
<vivanov>
toplevel prints only part of list. how to ouput the whole list?
<thelema>
#print_depth n;; Limit the printing of values to a maximal depth of n. The parts of values whose depth exceeds n are printed as ... (ellipsis).
<thelema>
#print_length n;; Limit the number of value nodes printed to at most n. Remaining parts of values are printed as ... (ellipsis).
<vivanov>
thelema: thx
chambart has quit [Ping timeout: 245 seconds]
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
chambart has joined #ocaml
samposm has joined #ocaml
raichoo has quit [Ping timeout: 244 seconds]
<samposm>
I have a question. This [1] exaplain how to make external (I am thinkin calling C) functions "float", when all the values are floats, to avoit panking the floats into ocaml boxing (so, without boxing, calling is faster).
<samposm>
but he says: "OCaml isn't expecting that increment_it modifies a variable, so there is no guarantee that we will see the changed value next time around."
<samposm>
and anyway, mutating the contents of a ref, is probably not any faster way in intercommunication, that calling the external with a dummy float(?)
<thelema>
yes. You can hide your dummy float by declaring `let rnd () = rnd 1.0`
<samposm>
I kind formulated this conjecture, that with "noalloc" one can only return int's (without boxing, and boxing would be allocating), so returning a reference is possibel, but returning a double is not
<thelema>
samposm: one last thing - if you're using 3.12, the RNG has been significantly improved over previous versions, giving arguably better random numbers than even MT
<thelema>
as for your conjecture, it's almost correct - you can return int-like values you construct (which includes the empty list and variants without values attached)
<thelema>
but you can also return parts of structures you have a pointer to, so a `noalloc` function can take as input a tree and return a subtree of that tree.
raichoo has quit [Quit: leaving]
<samposm>
I use Ubuntu 10.04, so I seem to have ocaml 3.11.2
<thelema>
it's not difficult to compile the newest ocaml; there's been a lot of improvements.
Cyanure has quit [Quit: Quitte]
vivanov has quit [Quit: Lost terminal]
ttamttam has quit [Remote host closed the connection]
<samposm>
the "linear feedback shift register" RNG that comes in Random is like 7x slower (at least in my 3.11.2), at least when generatin floats
<thelema>
Yes, the builtin RNG in 3.11 is pretty poor quality too.
jimenezrick has joined #ocaml
<thelema>
well, a quick benchmark of 3.11 vs. 3.12 rand gives:
<thelema>
OCaml 3.11 Random @108.63 ns is 6.0% faster than
<thelema>
OCaml 3.12 Random 115.51 ns
<thelema>
adding MT to the comparison, I note that each MT float only has 32 bits of entropy, while the Random floats use up to 90 bits
avsm has joined #ocaml
<thelema>
ouch, the OCaml MT is quite slow - 662ns per float