gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
ulfdoz has quit [Ping timeout: 244 seconds]
ulfdoz has joined #ocaml
smerz has quit [Ping timeout: 245 seconds]
smerz_ has quit [Ping timeout: 245 seconds]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
ulfdoz_ is now known as ulfdoz
wtetzner has joined #ocaml
wtetzner has quit [Client Quit]
wtetzner_ has joined #ocaml
wtetzner_ is now known as wtetzner
oriba has quit [Quit: oriba]
tomodo has joined #ocaml
<tomodo> hi ocaml
<_habnabit> hi tomodo
cdidd has joined #ocaml
<wmeyer> tomodo: hi
<tomodo> i might make a chess board in ocaml and hook it up to an AI
tautologico_ has joined #ocaml
<wmeyer> tomodo: did you see my js_of_ocaml chess board?
<wmeyer> tomodo: I need to put it back
<wmeyer> tomodo: onto danmey.org
<tomodo> that sounds cool
<wmeyer> tomodo: will then put it tomorrow
<wmeyer> now it's 3:30 here
<wmeyer> so need to wait
<wmeyer> I might publish it somewhere
tautologico has quit [Ping timeout: 248 seconds]
tautologico_ is now known as tautologico
<tomodo> I don't know if I will do it, I am worried I start and not finisj by low motivation
<wmeyer> tomodo: trying is already OK :-)
<wmeyer> tomodo: There is no AI in my board
<wmeyer> tomodo: Just a slick web frontend
<orbitz> Anyone run into issues installign godi on Mac? "ld: warning: in ../otherlibs/str/libstr.a, file was built for unsupported file f
<orbitz> ormat which is not the architecture being linked (x86_64).."
wtetzner has quit [Ping timeout: 246 seconds]
wtetzner has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
tautologico has quit [Quit: tautologico]
tomodo has quit [Quit: Lost terminal]
Tobu_ has quit [Remote host closed the connection]
Tobu has joined #ocaml
tomodo has joined #ocaml
<tomodo> lablgtk is the best thing to make a GUI on GNU/Linux?
<pippijn> ok, now I have definite proof: classes are slower than plain modules with records
<pippijn> I had some ocaml code that totally overuses classes, and I changed one core class into a record with functions
<pippijn> the program ran in 9.5 instead of 10.5 seconds
<tomodo> very good discovery
<tomodo> your test case may be useful to people who work on the compiler
TDJACR has quit [Read error: Operation timed out]
cdidd has quit [Ping timeout: 252 seconds]
TDJACR has joined #ocaml
nimred has joined #ocaml
nimred has quit [Changing host]
nimred has joined #ocaml
Tobu has quit [Ping timeout: 248 seconds]
Tobu has joined #ocaml
eni has joined #ocaml
Tobu has quit [Ping timeout: 248 seconds]
Tobu has joined #ocaml
eni has quit [Ping timeout: 246 seconds]
ftrvxmtrx has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
Snark has joined #ocaml
cdidd has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
eni has joined #ocaml
munga has joined #ocaml
ggherdov has joined #ocaml
Tobu has quit [Ping timeout: 248 seconds]
Tobu has joined #ocaml
GPHemsley has quit [Ping timeout: 240 seconds]
Hussaind has joined #ocaml
Hussaind has left #ocaml []
<mrvn> f[x]: extunix looks good.
<adrien> tomodo: right now, lablgtk is your best solution, yeah
<adrien> there are alpha bindings to qt, but alpha
<adrien> and there are upcoming bindings to the EFL
Tobu_ has joined #ocaml
Tobu has quit [Read error: Connection reset by peer]
<mrvn> efl?
<adrien> enlightenment foundation libraries, enlightenment.org
<adrien> heavily geared towards embedded and touch screens but also heavily themable
<adrien> plus they need something usable on the desktop for e17 itself
Yoric has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 260 seconds]
<Ptival> wmeyer: where did you get that huge list of e_machine?
smerz has joined #ocaml
smerz_ has joined #ocaml
Tobu_ has quit [Ping timeout: 272 seconds]
ftrvxmtrx has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
Tobu has joined #ocaml
<wmeyer> Ptival: Emacs macro, and elf.h header
<Ptival> wmeyer: ok
<Ptival> might do that later
snearch has joined #ocaml
<wmeyer> Ptival: Are you interested in Elfoncaml
<wmeyer> ?
<wmeyer> Ptival: Ah yes, hi
<wmeyer> Ptival: You can reuse some of the parts
<Ptival> wmeyer: yes I'm Valentin
<wmeyer> Ptival: I need to tide up this stuff, in particular I should not separate 64/32 bit at all - I meant to do it type safe
<wmeyer> Ptival: :)
<Ptival> actually I didn't look at ELF64's specs
<wmeyer> Ptival: I know, but my brain stopped working today at 5AM
smerz__ has joined #ocaml
smerz has quit [Remote host closed the connection]
smerz__ has quit [Remote host closed the connection]
smerz_ has quit [Remote host closed the connection]
smerz has joined #ocaml
<Ptival> guess I'll pretty much dump my work as it is, and from there see with you how we should rearrange it
<wmeyer> I needed in hury 64 bit support
<Ptival> there's probably some design decision to discuss if we want to extend it
<wmeyer> Ptival: OK - no worries. I'm very happy that you want to spend time on it - strangely there is no OCaml ELF library
<wmeyer> Ptival: and libelf C library wasn't a good choice
eni has quit [Ping timeout: 246 seconds]
<mrvn> are you binding libelf?
<wmeyer> I would like ELF entity to be first class - possibly also operations encoded as monads
ggherdov has quit [Ping timeout: 265 seconds]
<wmeyer> mrvn: yes
<wmeyer> mrvn: (unfortunately)
<wmeyer> mrvn: and the main reason why it hasn't been released is never ending problems with libelf
<wmeyer> mrvn: Valentin has some nice pure OCaml code to handle ELF - so maybe changing the concept would be perhaps beneficial
<wmeyer> as I was tired of being limited by the C library
* Ptival called it ocamelf
ftrvxmtrx has quit [Quit: Leaving]
<wmeyer> :)
<wmeyer> Ptival: you can catch me on jabber too
<wmeyer> Ptival: danmey at jabster tod pl
<wmeyer> Ptival: In general ELF headers contain some useful information
<wmeyer> also the document called libelf tutorial is a nice introductory to the general idea behind ELF
ftrvxmtrx has joined #ocaml
pmurias has joined #ocaml
<pmurias> is this the right channel for asking lablgtk questions?
<pmurias> i get a (complete:6163): Gtk-WARNING **: IA__gtk_text_view_buffer_to_window_coords: Unknown GtkTextWindowType error
<adrien> not related to your error, you should use printf rather than several print_int, string, newline, ...
<adrien> also, what goes wrong? when? what is your version of gtk+, and run your program with the OCAMLRUNPARAM environment variable set to "b"
cyphase has quit [Read error: Connection reset by peer]
Razzllls has joined #ocaml
<Razzllls> hello, I am using yojson parser to create equivalent Ocaml types, but it is pretty slow and I think I am doing it wrong
<Razzllls> I am using a record that is originally initiated with empty/meaningless data then I fold left on the json object and return a new record with additional data
<mrvn> nothing wrong so far
Tobu has quit [Ping timeout: 272 seconds]
<pmurias> adrien: gtk_text_view_buffer_to_window_coords gets a wrong argument
<pmurias> what does setting OCAMLRUNPARAM to "b" do?
ggherdov has joined #ocaml
<Ptival> pmurias: it prints a backtrace of the stack when exceptions raise to toplevel
<pmurias> adrien: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.1
<pmurias> 14:42 -!- Channel #ocaml created Sun Nov 26 07:42:40 2006
<pmurias> 14:42 -!- Irssi: Join to #ocaml was synced in 7 secs
<pmurias> 14:42 < pmurias> is this the right channel for asking lablgtk questions?
<pmurias> sorry
<Ptival> pmurias: it only works well with bytecode compiled with -g
<pmurias> adrien: 20.20-1.2
<mrvn> works fine with binary code here
<pmurias> adrien: there is no exception, just a warning from gtk and it returns garbage values
<pmurias> the binding of the function lablgtk2 looks very suspect, i'll have to check that
<Ptival> mrvn: I believe with binary the stack is incomplete (like, tailcalls and stuff...)
<Ptival> usually I just get a "in pervasives.ml" which is not useful :d
GPHemsley has joined #ocaml
GPHemsley has quit [Changing host]
GPHemsley has joined #ocaml
<adrien> pmurias: "20.20-1.2"? what is that?
<adrien> gtk+ version number?
Tobu has joined #ocaml
<pmurias> adrien: ye
<pmurias> s
<adrien> where is it from?
<adrien> I mean gtk+
<pmurias> where did i get the gtk+ from?
<adrien> yeah
<pmurias> the debian repo
<adrien> so "20.20-1.2" is the version number of the debian package?
<pmurias> yes
<pmurias> i'm not really sure, it's not important
<pmurias> as the error is in lablgtk2
<adrien> 20.20-1.2 or 2.20-1.2?
<Razzllls> mrvn: but it is kinda slow, compared to the time I retrive data from servers and the time the library parses json
<mrvn> is the record big and do you create a new one on every change?
<pmurias> adrien: 2.20.1-2
<Razzllls> mrvn: yes, I return a new one on every change
<Razzllls> mrvn: should I use mutables instead?
<Razzllls> last time I tried with mutables it didn't change values, very strange
<Razzllls> basically the object is returned after each modification
<Razzllls> and reused , added a new field and reused again
<mrvn> you can parse the data into temporary bindings and construct the record at the end or use mutables and see how that compares.
<pmurias> how do I send a patch to lablgtk2?
<adrien> and I agree something looks wrong
<pmurias> i found and fixed the error
<Razzllls> mrvn: I will try to experiment with mutables then, but that is so much code to change meh ok
Razzllls has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
ggherdov has quit [Read error: Connection reset by peer]
ggherdov has joined #ocaml
<pmurias> adrien: i sent a patch to the bug tracker
<pmurias> adrien: are you the maintainer of lablgtk2?
* pmurias just noticed that lablgtk2 has a git repo
<adrien> yup, I am
<adrien> I agree on the patch but I'm really surprised the bug got made in the first place; explicit casts in bindings is something that is almost always guaranteed to be an error :P
<adrien> seems to be the only one in that file at least
<adrien> well, the patch is almost probably good and is probably complete too but there still is a bug with the code you've pasted
<pmurias> what's the problem with that code?
<adrien> dunno; I still get warnings at each char:
<adrien> (a.out:13848): Gtk-WARNING **: Attempt to convert text buffer coordinates to coordinates for a nonexistent or private child window of GtkTextView
<adrien> {12288,0}
<pmurias> adrien: for what code?
Yoric has quit [Ping timeout: 260 seconds]
<pmurias> the version of complete that works: http://paste.scsys.co.uk/198378
<adrien> works here :-)
Yoric has joined #ocaml
<pmurias> adrien: do you know how to call ml_gtk_menu_popup_at from src/ml_gtkmenu.c?
notk0 has joined #ocaml
<notk0> hello, if I have a record with mutable types, how can I obtain an instance with variables initiated ?
<notk0> for example if I have type t = { mutable i :int }
<notk0> and empty= { i =0; }
<notk0> how can I obtain a clone of empty
<flux> any suggestions on working v4l2 bindings for ocaml? savonet's don't work for some reason (invalid ioctl) and the debian gstreamer bindings don't work either..
<adrien> pmurias: hmm, no, if you can't find how to, I can take a look
* adrien needs to start a gcc build first
<adrien> flux: fix savonet's?
<flux> adrien, well, probably yes
<flux> or write my own
<adrien> the invalid ioctl shouldn't be terribly hard to fix although ioctl() is pure crap
<flux> turns out the bindings are really specific
<adrien> well, I expect savonet's to only need updating
<adrien> ah
<flux> for example, it requires that the video device outputs interlaced video
<flux> that wae asy to fix, now how about pixel format..
<adrien> you're not going to have a lot of fun =/
<adrien> ioctl and v4l2...
<adrien> notk0: how do you define "a clone of"?
<flux> it assumes RGB frames, but my camera produces JPEG frames
<flux> (uses an assertino to check that requirement, thank it for that)
<flux> it's probably easier to just write my own
<flux> it has some code to deal with palette :P
<flux> (well, various bit depths really, but I really doubt they're going to work with raw JPEG frames)
<notk0> adrien, same data, not same pointers
<notk0> If I do a = empty and b = empty
<notk0> I don't want a.i to modify b.i
emmanuelux has joined #ocaml
<adrien> notk0: well, there is a construct but with your example, ocaml will spit a warning:
<adrien> let new_record = { old_record with some_field = new_value } in
<adrien> that allows you to make a copy except for one field which you can set to a new value
<adrien> (actually, I guess you can set several fields at the same time but I've probably never used that)
<adrien> the warning is only because in your example, there is only one field
<mrvn> why doesn't let new_record = { old_record } work?
<adrien> it doesn't look very useful to me
<adrien> and I guess you could Obj.dup
<mrvn> notk0: don't declare an empty. use let make () = { i = 0; }
<adrien> also, I second mrvn's advice (I hadn't looked at what you were trying to achieve)
<pmurias> adrien: that function only seems to be defined in the c file, should i try to export it to ocaml land?
<adrien> no
<adrien> how do you see it's only in a .c file? (there's a catch)
<Qrntz> adrien, you can set several fields at the same time, separating the assignments with «;»
<Qrntz> «let y = { x with foo = 1 ; bar = 2 }»
<pmurias> adrien: i ack (better grep) for popup_at
<adrien> ocaml has quite a lot of source code generation, so, yeah, better to search for "popup_at"
<adrien> or grep after building
<notk0> mrvn, I see I will try that
<adrien> pmurias: how do you get changes in lablgtk on your system? you rebuild the debian package?
<pmurias> make install
<adrien> arf
<pmurias> i used the debian package for gtk only
<pmurias> arf?
<adrien> you've used lablgtk git?
<adrien> well, guess not
<pmurias> i checkout out the repo now
<pmurias> ack after make helps
<adrien> well
<adrien> now you have two installs of lablgtk on your system
<adrien> so you should remove the debian package, and clean what lablgtk's make install has installed (there's maybe a "make uninstall" to try)
<adrien> the build system in lablgtk's git head should be different
<adrien> hmm, no uninstall, and no new build system (that is still in a branch)
<pmurias> i have very little ocaml knowledge/experience so i'm likely doing all the ocamlish thing incorrectly
<adrien> you should make install lablgtk2 again, and check what it installs, then remove the .cm*, .a, .so files
Kakadu has quit [Quit: Konversation terminated!]
<pmurias> popup_at works :)
<pmurias> walk&
<adrien> what did you do?
<pmurias> just typed the name with the package correctly ;)
<pmurias> GtkMenu.Menu.popup_at
<adrien> well, yeah, the function is currently available in the non-object interface; if you can use it, that's great
<adrien> otherwise, the fix is to add a trivial line to gMenu.ml
munga has quit [Ping timeout: 248 seconds]
<notk0> can I post one of my function so someone could tell me where the slow part is?
eni has joined #ocaml
<flux> if I want to link a c-file with ocamlbuild, must I use a custom myocamlbuild.ml?
<adrien> you shouldn't have to; but I'd avise you to use oasis and CSources
<flux> I only want one C file, I don't even want libraries :)
<adrien> you want a .h?
<flux> I want to include some .h-files in my .c-file, sure..
<flux> there's this but obviously all links to source (tar.gz, zip, git) are down: http://dvide.com/labs/ocamlbuild-ctools/
tautologico has joined #ocaml
<adrien> if you want to have a local .h file, use oasis
<adrien> ocamlbuild doesn't understand that foo.h and foo.c are two separate files
<flux> oh, I don't need to use a h-file
<flux> it just seems this is the only relevant example and seems to go over the top: http://brion.inria.fr/gallium/index.php/Ocamlbuild_example_with_C_stubs
tomodo has quit [Ping timeout: 276 seconds]
<adrien> I thought I could remember but I stopped using ocamlbuild for C stubs at http://caml.inria.fr/mantis/view.php?id=5107
<adrien> so I can't help much :-)
Yoric has quit [Ping timeout: 252 seconds]
<flux> it seems to me there's no avoiding writing a myocamlbuild.ml for this purpose
<mrvn> flux: I do that with oasis and it generated the myocamlvuild.ml for me.
ikaros has joined #ocaml
<flux> ocamlbuild is possibly one of the more annoying tools in ocaml, possibly neck-to-neck with camlp4. both that could be fixed by excellent documentation.
<adrien> one annoying thing with ocamlbuild is that it seems to be made for the ocaml compiler itself
<adrien> but it won't change in order to help things for other projects (or not much)
<flux> well, now it compiles my stubs, but doesn't seem to link if I'm to believe its "The external function `v4l2_open' is not available"
<mrvn> missing -lv4l
<adrien> bytecode?
<flux> yes. now I went from no definition to multiple definition :)
<adrien> I used to know that stuff pretty well but then I've mostly stopped building by hand; I'm a bit sad I can't remember but at the same time, I'm also pretty happy
<flux> finally
<flux> I put these to dispatch: flag ["ocaml"; "link"; "use_v4l2"] (S[A"-custom"]); dep ["link"; "ocaml"; "use_v4l2"] ["v4l2_stubs.c"]; and these to _tags: <*>: use_v4l2
<flux> I've not learned where the ocaml-mm code originates from
<flux> the first hit on v4l2 example also does only interlaced video :P
<adrien> ocaml-mm?
<flux> savonet subproject, some multimedia bindings
<adrien> ah
Submarine has joined #ocaml
snearch has quit [Quit: Verlassend]
<wmeyer> did anybody generate declaration polymorphic variant type through Camlp4?
<wmeyer> I have some weird problem, when I use camlp4of and preprocess my DSL I can compile the resulting file. However, when using -pp flag, and camlp4 pipe marshaled AST to ocamlc it fails badly
<wmeyer> perhaps becase of leading |
<wmeyer> this gets generated: "type rl = [ | `AL | `CL | `DL | `BL]"
<wmeyer>
<wmeyer> which compiles fine under normal circumstances
<wmeyer> but chokes when AST is consumed
<wmeyer> it's a production stop --- however I might consider just dumping the ML file anyway
<mrvn> Why not remove the |?
<wmeyer> How?
<mrvn> No idea how you are generating that code.
<wmeyer> mrvn: I use Ast.tyOr_of_list
<wmeyer> which is the preffered way
<wmeyer> I don't have idea how to not generate the leading bar
<wmeyer> because I don't even include the bar in my qutation
<wmeyer> it feels like a bug, need to ask Jeremie about it
iago has joined #ocaml
lopex has quit [Ping timeout: 252 seconds]
IbnFirnas has quit [Read error: Operation timed out]
IbnFirnas has joined #ocaml
lopex has joined #ocaml
goncalo has quit [Quit: leaving]
goncalo has joined #ocaml
IbnFirnas has quit [Read error: Operation timed out]
<wmeyer> I'm going to file a bug - it looks like the problem is with marshaling on camlp4 side, when pretty printed, even to the output file it works like a charm
wtetzner has quit [Ping timeout: 246 seconds]
bobry has quit [Ping timeout: 240 seconds]
lopex has quit [Ping timeout: 244 seconds]
IbnFirnas has joined #ocaml
<wmeyer> beautiful
<wmeyer> this rule killed the problem
lopex has joined #ocaml
notk0 has quit [Remote host closed the connection]
bobry has joined #ocaml
eni has quit [Ping timeout: 252 seconds]
eni has joined #ocaml
ikaros has quit [Remote host closed the connection]
eni has quit [Ping timeout: 245 seconds]
ikaros has joined #ocaml
untroubled has joined #ocaml
eni has joined #ocaml
untroubled has quit [Quit: leaving]
eni has quit [Ping timeout: 245 seconds]
hto_ has joined #ocaml
Submarine has quit [Quit: Leaving]
<flux> cool, I got a jpeg frame in an ocaml string from v4l2
<flux> suggestions for the easiest way to go from that to RGB?
eni has joined #ocaml
<flux> for example CamlImages only supports jpegs from file
<wmeyer> flux: Which version of CamlImages you are talking about? the new revamp by furuse?
<wmeyer> flux: I am sure you can use streams
<flux> 1:4.0.1-4+b2 in debian unstable
<flux> well, that would be great. I'll check ocamlsdl first, I already use that library as well
<flux> Sdlloader.ml comes with val load_image_from_mem : string -> Sdlvideo.surface
<wmeyer> hmm sorry, yes, you are using the new ones
<flux> which is probably even easier, as my original image processing thingy uses Sdl surfaces already
<flux> wmeyer, hmm, how does the stream system work in camlimages then?
<wmeyer> I am sure you can do it with camlimage
<flux> I don't see any signs of it in jpeg.mli
<flux> nor the word 'stream' in *.mli
<wmeyer> flux: AFAIR it was wrapped into objects
<wmeyer> flux: What exactly you want to do?
<flux> I get a JPEG frame from a webcam over V2L4
<wmeyer> flux: the example directory in the tarball might answer your question
<flux> I need to decode that into RGB24 to process it in my program
<wmeyer> flux: OK, that should be not-a-problem with Camlimages, just look into examples :)
eni has quit [Ping timeout: 245 seconds]
<flux> nope, pretty sure it doesn't.. its jpegread.c seems to deal only with files.
<wmeyer> I'm sorry to hear that
<wmeyer> it's quite useless though then, you often want to load an image from the memory
<flux> depends what one is doing I suppose :)
<flux> but on the other hand I must agree, I've often had that need
<wmeyer> whatever you do a bit of flexibility better :)
<wmeyer> browser for instance
<wmeyer> a driver for camera - like you do
<wmeyer> etc.
<flux> a game, an image editor, a thumnbail-generator - not so much :)
<wmeyer> of course they are dirty hacks - involving /tmp directory
<wmeyer> there*
eni has joined #ocaml
eni has quit [Client Quit]
cyphase has joined #ocaml
gnuvince_ has quit [Ping timeout: 265 seconds]
Yoric has joined #ocaml
Snark has quit [Quit: Quitte]
dsheets has quit [Ping timeout: 244 seconds]
Yoric has quit [Ping timeout: 246 seconds]
rly has quit [Quit: WeeChat 0.3.6-dev]
pmurias has quit [Quit: Lost terminal]
pr has joined #ocaml
ggherdov has quit [Ping timeout: 250 seconds]
gnuvince has joined #ocaml
<thelema> I just added the ability for odb to install packages by giving their URI on the command line. Example: ocaml odb.ml https://forge.ocamlcore.org/frs/download.php/878/ocaml-extunix-0.0.4.tar.gz
<thelema> maybe it's at this point that I should seriously look into extracting dependencies from _oasis files
<pippijn> flux: imagemagick
ikaros has quit [Quit: Ex-Chat]
<pippijn> also, a web application, a voip+camera program, they all need in-memory image processing
<pippijn> web application as in web server
Haseo has joined #ocaml
<hcarty> thelema: Perhaps an odb-heavy version which can be installed with odb
<hcarty> thelema: That would ease the burden of having a dependency on oasis, not to mention Batteries and other libraries.
<hcarty> odb.ml could stay close to where it is. odb dot nothing (.native, .heavy, .full...) could provide more comprehensive support.
<hcarty> Or the two could be made to cover separate cases. odb for interaction with oasis-db, new-unwritten-odb for local/special/outside-of-oasis-db packages