gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
ski has quit [Read error: Connection reset by peer]
ski has joined #ocaml
joewilliams_away is now known as joewilliams
Amorphous has quit [Ping timeout: 245 seconds]
Tobu has quit [Ping timeout: 245 seconds]
Tobu has joined #ocaml
Amorphous has joined #ocaml
_y_ has joined #ocaml
<_y_> do I need to know anything special about compiling modules into my custom toplevel? I built ocamlgraph from source and specified it in the makefile in my -output-obj step, but I can't access it when I'm running the toplevel (even though I can access it when I'm running OCamlWin.exe, where I have it installed in my lib\ directory)
<_y_> Characters 0-10:
<_y_> open Graph;;Error: Unbound module Graph
<_y_> for reference, the command line used while compiling the toplevel looks like this: boot/ocamlrun boot/ocamlc -nostdlib -I boot -output-obj -o idatop/ida_idatoplib.c toplevel/toplevellib.cma idatop/ida_toploop.cmo idatop/ida.cmo idatop/graph.cma
<_y_> and I can access the other modules listed on the command line
philtor has quit [Ping timeout: 245 seconds]
rks has quit [Ping timeout: 265 seconds]
rks has joined #ocaml
joewilliams is now known as joewilliams_away
Tobu has quit [Ping timeout: 240 seconds]
philtor has joined #ocaml
Tobu has joined #ocaml
Tobu has quit [Ping timeout: 255 seconds]
philtor has quit [Ping timeout: 245 seconds]
mal`` has quit [Quit: Coyote finally caught me]
mal`` has joined #ocaml
iris1 has quit [Read error: Connection timed out]
_y_ has quit [Ping timeout: 265 seconds]
xcthulhu has quit [Quit: Ex-Chat]
Edward_ has quit []
mjonsson has quit [Remote host closed the connection]
carm has quit [Read error: Connection reset by peer]
carm has joined #ocaml
Edward_ has joined #ocaml
carm has quit [Ping timeout: 240 seconds]
Fullma has joined #ocaml
carm has joined #ocaml
carm_ has joined #ocaml
carm has quit [Ping timeout: 255 seconds]
ikaros has joined #ocaml
Edward_ has quit [Ping timeout: 245 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
ygrek has joined #ocaml
ldunn has joined #ocaml
ldunn has quit [Changing host]
ldunn has joined #ocaml
<flux> hm, how do I perform a 303 See Other -redirection with Ocsigen/Eliom?
<kerneis> flux: it depends
<kerneis> you can use Redirectmod
<kerneis> if you want to define the redirections in a config file
ulfdoz has joined #ocaml
<flux> kerneis, I mean in response to a form
<kerneis> hum, and redirectmod seems to only support 301 & 307
<flux> kerneis, currently I can use Eliom_predefmod.redirection.register_new_post_service
<flux> and it has ~options:[`Permanent | `Temporary]
<flux> those map to 307 and 301
<flux> the send-function that has that encoding can also support other codes, but I don't know how to pass them to it..
<flux> ah, got it :-)
<flux> the register_new_post_service (etc) also have ~code..
<kerneis> yes
<kerneis> for more complex stuff, you could also have defined your own module
<kerneis> (copy/pasting Eliom_predefmod.redirection and changing whatever you needed)
<flux> kerneis, apparently eliom doesn't directly support services that respond to PUT, but I guess it'd be easy to add?
<flux> (DELETE would be another to support)
pikachuyann has joined #ocaml
ikaros has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ski_ has joined #ocaml
ski has quit [Ping timeout: 272 seconds]
Snark has joined #ocaml
ztfw has joined #ocaml
ygrek has joined #ocaml
boscop has quit [Ping timeout: 276 seconds]
boscop has joined #ocaml
ldunn has quit [Remote host closed the connection]
seafood has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
init1 has joined #ocaml
Yoric has joined #ocaml
seafood has quit [Quit: seafood]
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
ztfw has quit [Remote host closed the connection]
Tobu has joined #ocaml
<adrien> anyone has a zipper implementation?
<julm> you have
<adrien> I can't remember where I've put it, and ... this implementation lacks a license
<adrien> I found one in ocaml-reins but ocaml-reins isn't available in godi
<julm> who cares about licenses
<adrien> I do :P
<julm> « Several libraries already use zippers »
<julm> « All this code is available on the web. »
<adrien> but the code is coupled
<adrien> well, I'll see that later on I think, won't have time for it right now =/
<julm> coupled?
<adrien> I want the zipper component of zen, not the whole zen codebase :p
<adrien> xD
<adrien> [ [ ] ® ((Top,t) : focused_tree)
<adrien> 'registered' :p
iago has joined #ocaml
dark has quit [Remote host closed the connection]
Yoric has quit [Quit: Yoric]
mjonsson has joined #ocaml
lpereira has joined #ocaml
<orbitz> hey
yezariaely has joined #ocaml
yezariaely has left #ocaml []
kisp has joined #ocaml
rwmjones has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
rwmjones has joined #ocaml
philtor has joined #ocaml
BiDOrD has joined #ocaml
Edward_ has joined #ocaml
joewilliams_away is now known as joewilliams
mjonsson has quit [Ping timeout: 265 seconds]
ikaros has quit [Ping timeout: 264 seconds]
ikaros has joined #ocaml
DimitryKakadu has joined #ocaml
<DimitryKakadu> Hallo
<DimitryKakadu> How to debig progames linked with Janestreet Core?
<DimitryKakadu> debug*
<DimitryKakadu> (ocd) load /usr/local/lib/ocaml/3.11.2/core/core.cma
<DimitryKakadu> Error during code loading: error loading shared library: /usr/local/lib/ocaml/3.11.2/stublibs/dllcore_stubs.so: /usr/local/lib/ocaml/3.11.2/stublibs/dllcore_stubs.so: undefined symbol: caml_ba_byte_size
<DimitryKakadu> (ocd)
<DimitryKakadu> Can you show me some techniques to resolve `dll hell`?
<thelema> sadly findlib doesn't support ocamldebug, so debugging becomes hard
<thelema> It's possible to get the list of libraries used in linking, topo-sort them, and load them all in the right order.
<thelema> but in general, it's easier to just add printfs
<DimitryKakadu> thelema: my type definition is about 150 lines, that's why I don't want to add printfs
<thelema> hmmm... any chance of loading your code in the toplevel?
<DimitryKakadu> It will be difficult, but I try this way
<ygrek> DimitryKakadu, try resolving deps youself, caml_ba_bytesize is obviously bigarray
Tobu has quit [Ping timeout: 240 seconds]
kisp has quit [Remote host closed the connection]
<DimitryKakadu> ygrek: I've tried this way. But I'm looking some method that is easier than a manualy resolving dependecies.
<ygrek> sorry, never tried ocamldebug
<DimitryKakadu> Next question. When I've added binprot,bigarray and sexplib ocamldebug says that there is `Reference to undefined global `Condition'` in core.cma. But file core_condition.ml exisits in core sources and must be inside core.cma! I don't understand why this message appears. Any ideas?
<thelema> link in threads
<DimitryKakadu> thelema: which threads?
<DimitryKakadu> between core.cma ans sexplibs?
<DimitryKakadu> and*
<DimitryKakadu> ocamlfind ocamlc -g -a -thread -dllib dllcore_stubs.so -custom -I +camlp4 -I . -cclib -lcore_stubs -cclib -lrt -o core.cma core.cmo
<DimitryKakadu> I really don't understand how to add dllcore_stubs.so to ocamldebug....
<thelema> DimitryKakadu: for dllcore_stubs, try loading /usr/lib/ocaml/bigarray.cmxa first
<DimitryKakadu> (ocd) load /usr/lib/ocaml/bigarray.cmxa
<DimitryKakadu> Error during code loading: /usr/lib/ocaml/bigarray.cmxa is not a bytecode object file
<DimitryKakadu> thelema: ?
lpereira has quit [Quit: Leaving.]
<thelema> oh, bytecode... then the .cma file
<thelema> .cmxa is native
Snark has quit [Quit: Ex-Chat]
<DimitryKakadu> thelema: OK, I fixed problem with dllcore_stubs. But what about error while linking /usr/local/lib/ocaml/3.11.2/core/core.cma. Reference to undefined global `Condition'
<thelema> is part of the thread library
<thelema> /usr/lib/ocaml/threads/threads.cma
<DimitryKakadu> thelema: thanks. I have next messages about other libs, but I'll try to resolve it by myself. thanks a lot
seanmcl has joined #ocaml
fabjan has quit [Remote host closed the connection]
<kerneis> gildor: my patch to darcs (that we discussed the other day) has been accepted, it should be available in the next release
lpereira has joined #ocaml
gildor has quit [Read error: Operation timed out]
gildor has joined #ocaml
Lajla has joined #ocaml
<Lajla> I currently don't have an implementation of OCaml running here, but I read that ; is essential an operator going unit -> 'a -> 'a, so would ( ; ) (print "Hello, Nurse!") 3 also work?
<ygrek> no, it is not an operator
<Lajla> THEN THEY LIED
<Lajla> =(
<Lajla> THey told me it was essentially fully functionally an operator going unit -> 'a -> 'a and I thought the idea was so elegant.
<ygrek> those mysterious they often say something like that
<Lajla> But why isn't it?
<Lajla> I mean, it would be so beautiful if it was.
<Lajla> Not to mention that it needn't be a primitive.
* ygrek doesn't know nor care
<Lajla> Well I do, that is why I ask, and as a member of the OCaml support channel, you are morally obliged to answer
<Lajla> EvanR-work...
<Lajla> We meet again it seems
<ygrek> lol
<Lajla> i always meet him on functional programming channels, until I get banned for being too much of a spazz. =(
Edward_ has quit []
ldunn has joined #ocaml
DimitryKakadu has quit [Remote host closed the connection]
ldunn has quit [Ping timeout: 240 seconds]
seafood has joined #ocaml
ulfdoz has quit [Ping timeout: 272 seconds]
seafood has quit [Quit: seafood]
joewilliams is now known as joewilliams_away
<gildor> kerneis: ok, good news, in the meantime I will use a simple chmod +x in the predist
ftrvxmtrx has quit [Ping timeout: 240 seconds]
ftrvxmtrx has joined #ocaml
ldunn has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
shaun234324 has joined #ocaml
<shaun234324> hi, would someone be able to help me with a problem with ocamlc?
<shaun234324> the problem is that I get "this is not a valid bytecode file"
<shaun234324> when I try to #load it
<shaun234324> ocamlc terminates without errors, but the hexdump of the bytecode file reveals
<shaun234324> 00002bd0 5f 64 79 6e 6c 69 6e 6b 5f 67 65 74 5f 63 75 72 |_dynlink_get_cur| 00002be0 72 65 6e 74 5f 6c 69 62 73 00 63 61 6d 6c 5f 72 |rent_libs.caml_r| 00002bf0 65 63 6f 72 64 5f 62 61 63 6b 74 72 61 63 65 00 |ecord_backtrace.| 00002c00 63 61 6d 6c 5f 62 61 63 6b 74 72 61 63 65 5f 73 |caml_backtrace_s| 00002c10 74 61 74 75 73 00 63 61 6d 6c 5f 67 65 74 5f 65 |tatus.caml_get_e| 00002c20 78 63 65 70 74 69 6f 6e 5f
<shaun234324> sorry, it says ... Out_of_memory.)Sys_error
thelema has quit [Read error: Connection reset by peer]
thelema has joined #ocaml
<shaun234324> this happens for multiple modules that work fine when executing #use ...ml
<shaun234324> anyone? :)
<orbitz> teastcse?
<orbitz> are you trying to load a cmx file?
<kerneis> gildor: sadly, I missed the release of darcs 2.5 by one day (!), which means next release might be in a long time
<kerneis> anyway, predist does the work
<shaun234324> module Test_module= struct let even n = n mod 2 == 0 let odd n = not (even n) type foo = Bar of float module Inner= struct type car = Bike of int | Moped of int end end;;
<shaun234324> in a file called test_module.ml
<shaun234324> then run ocamlc -o Testp.cmo test_module.ml
<shaun234324> run ocamlc
<shaun234324> #load "Testp.cmo";;
<shaun234324> File Testp.cmo is not a bytecode object file.
<shaun234324> i'm using ocaml 3.12.0 compiled from source for linux, but get the same problem with 3.11.0 on windows
<gildor> shaun234324: the -o option create an exec
<gildor> shaun234324: just run ocamlc test_module.ml
<gildor> and #load test_module.cmo
<gildor> or
<gildor> ocamlc -a -o Testp.cma test_module.ml (create a bytecode library)
<shaun234324> it still doesn't say anything when i run #load "test_module.cmo";;
<shaun234324> does it need a capital letter?
ikaros has quit [Quit: Leave the magic to Houdini]
<thelema> shaun234324: not the filename
<gildor> shaun234324: what do you want it to say?
<shaun234324> now, after loading, it gives no output and says Test_module.even is unbound
<shaun234324> loaded successfully maybe?
<gildor> shaun234324: does my method still generates an error
<shaun234324> there is no error in the bytecode and it seems to load fine, but i can't use the functions defined inside
<gildor> if you want to use functions from it, you need to be able to open the matching .cmi
<shaun234324> so load "...cmi"?
<gildor> no, but the search path should include "."
<gildor> (but I am not sure if it is the default or not)
<gildor> just a question do your test_module.ml contains a "module Test_module = " ?
<shaun234324> yep
<gildor> so you should try Test_module.Test_module.even
<gildor> (because the capitalized filename is already the module name)
<shaun234324> ahhhh
<orbitz> shaun234324: do
<orbitz> module M = Test_module;;
<shaun234324> yes, that works, thank you so much!
<orbitz> you should see an int rmodule
<orbitz> word
<orbitz> I'm not sure if I find that behvaior a positive or negative for ocaml
zubeen has joined #ocaml
ldunn has quit [Read error: Connection reset by peer]
shaun234324 has quit [Quit: Page closed]
joewilliams_away has quit [Excess Flood]
joewilliams has joined #ocaml
iris1 has joined #ocaml
init1 has quit [Quit: Quitte]