Ptival has quit [Read error: Connection reset by peer]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz_ is now known as ulfdoz
<NaCl>
is there a way to signal aa .iter operation to stop?
groovy2shoes has joined #ocaml
m3ga has joined #ocaml
<m3ga>
hi, i'm on linux, trying to call out to an external C lib. in my .ml file i have "external whatever : int -> int -> string -> (int * int * string) = "c_whatever"
<m3ga>
in the C stub, I unpack what i need, call the C lib function, then "v_response = caml_alloc_tuple (3) and then "Store_field (v_response, 0, caml_copy_nativeint (width)) ; Store_field (v_response, 1, caml_copy_nativeint (height)) ; Store_field (v_response, 2, caml_copy_string (code)) ;" followed by "CAMLreturn (v_response) ;"
* NaCl
is afraid to ask m3ga to use a pastebin
<m3ga>
thats all the relevant code really. i can pastebin it if you want.
<NaCl>
oh
<m3ga>
weird thing is back in the ocaml code, the two ints in the tuple are screwed up, but the string is fine.
* NaCl
bows to m3ga
<m3ga>
really?
<NaCl>
uh
<NaCl>
I may be confusing you with someone else
<NaCl>
oh
<NaCl>
nope
<m3ga>
?
<NaCl>
ah, you don't remember the fun in #wicd
<m3ga>
oh, right wicd. yeah, i remember.
<NaCl>
hm could it have something to do with that extra bit that ocaml reserves?
<m3ga>
nope, the int values are small, < 100.
<NaCl>
I'm guessing, really. And of numbers negative?
<m3ga>
numbers are > 10, < 100
<m3ga>
hmm, what i get back in the ocaml code looks like a pointer
<m3ga>
thats a clue
<NaCl>
indeed
<quackv2>
hey everyone, im just starting to learn ocaml and im having trouble with modules
<quackv2>
is there a naming scheme that modules need to follow with respect to filename?
<quackv2>
probably a noob question, but having trouble googling it
<m3ga>
quackv2: its a bit weird.
<NaCl>
just like the rest of ocaml. :P
<m3ga>
the case of the first filename letter doesn't matter. ocaml assumes it is uper case regardless. all following letters are cases sensitve.
<quackv2>
interesting
<NaCl>
much of ocaml is case sensitive
<m3ga>
also, filenames can only contain valid identifier chars, so '-' (minus) is not allowed
<NaCl>
yeah, that threw me for a loop
<quackv2>
do they need to mwatch? like can i do moocow.ml and have a module named CowSoup ?
<m3ga>
modules don't need to match either
<quackv2>
okay cool
<quackv2>
sweet, thanks for the info
<m3ga>
sorry module name doesn't need to match filename
<quackv2>
ah okay
<quackv2>
i think i saw this, but want to verify, can a file have multiple modules?
<NaCl>
most stuff I've seen has the modules match the names, probably to make it easier to find stuff
<quackv2>
yea, feels like good practice to make it match
<NaCl>
yeah, I think you can
<quackv2>
okay cool
<NaCl>
I haven't tried such a thing, though. You can do stuff like "module A = Array" and "module L = List" in the same file
<m3ga>
quackv2: yes, multiple modules in a single file is fine, as are nested modules
<NaCl>
and paramaterized modules. :P
<quackv2>
heh eim not there yet
<quackv2>
thanks for the help! =)
<NaCl>
np
bzzbzz has quit [Ping timeout: 260 seconds]
<m3ga>
hmm, Val_int works where caml_copy_nativeint doesn't.
groovy2shoes has quit [Quit: leaving]
jamii has quit [Ping timeout: 246 seconds]
m3ga has left #ocaml []
StepanKuzmin has quit [Read error: Connection reset by peer]
gno has joined #ocaml
hcarty has quit [Read error: Connection reset by peer]
sebz has quit [Quit: Computer has gone to sleep.]
StepanKuzmin has joined #ocaml
sebz has joined #ocaml
junsuijin has quit [Quit: Leaving.]
dnolen has quit [Quit: dnolen]
sebz has quit [Quit: Computer has gone to sleep.]
ulfdoz has quit [Ping timeout: 246 seconds]
sebz has joined #ocaml
gno` has joined #ocaml
gno has quit [Ping timeout: 255 seconds]
larhat has joined #ocaml
f[x] has joined #ocaml
rixed has quit [Ping timeout: 240 seconds]
<thelema>
f[x]: error on batteries freebsd on your jenkins - disk space limit reached
<f[x]>
argh, /tmp is filled with ocamlXXXpipe files, thanks for the heads-up
StepanKuzmin has quit [Read error: Connection reset by peer]
ankit9 has quit [Ping timeout: 255 seconds]
ankit9 has joined #ocaml
StepanKuzmin has joined #ocaml
quackv2 has quit [Quit: leaving]
Ptival has joined #ocaml
<flux>
I think maybe quackv2 was missing a critical piece of information: files alway introduce a module, and the modules inside it go below that
sebz has quit []
bobry has joined #ocaml
thomasga has joined #ocaml
<Ptival>
is it possible for a function to take any kind of Map and fold it?
<sgnb>
Ptival: what do you mean by "any kind of Map"?
<Ptival>
not sure about Ocaml's terminology
<Ptival>
any module SomeMap = Map.Make(...)
<raphael-p>
Ptival: you can fold over the 'bindings' with List.fold and SomeMap.bindings
<Ptival>
should work
<Ptival>
I want to write a "generic" map printer
<Ptival>
the problem is I wanted it to call SomeMap.fold, but SomeMap changes when the map changes, so I tried to take it as an argument but that doesn't quite work
Cyanure has joined #ocaml
avsm has quit [Quit: Leaving.]
<sgnb>
Ptival: you can make a functor that takes a map in parameter
<sgnb>
Ptival: or, alternatively, use first-class modules of ocaml >= 3.12
avsm has joined #ocaml
StepanKuzmin has quit [Read error: Connection reset by peer]
StepanKuzmin has joined #ocaml
<Ptival>
sgnb: thanks
bobry1 has joined #ocaml
seafood has joined #ocaml
seafood has quit [Quit: seafood]
sebz has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 250 seconds]
lopex has joined #ocaml
Amorphous has quit [Ping timeout: 252 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
Amorphous has joined #ocaml
gno` is now known as gno
StepanKuzmin has quit [Read error: Connection reset by peer]
StepanKuzmin has joined #ocaml
bobry1 has quit [Ping timeout: 260 seconds]
pdhborges has joined #ocaml
<pdhborges>
Hi!
<pdhborges>
what is the difference between using Lwt.detach and using Lwt_unix jobs?
<adrien>
hmmm, don't seem to have much things in my logs either but I think I rather suck at keywords
<kfx>
any hints on the godi build failure? there's an outside chance that if I can get a newer version installed the problem will have been addressed
Cyanure has quit [Ping timeout: 240 seconds]
<adrien>
remove pcre-ocaml-6.2.2.tar.gz from your system and try to download it again, you can also get it from http yourself and put it in the right place
sebz has joined #ocaml
Cyanure has joined #ocaml
nimred has quit [Quit: leaving]
nimred has joined #ocaml
<_habnabit>
hmm, interesting. godi fails at the 'creating boot console' step if I just run the bootstrap script, but if I go into the ocamlrun directory after it fails and do `make clean; make ocamlrunfat` then rerun the bootstrap script, it succeeds.
<adrien>
how are you running it?
<_habnabit>
running which part?
<adrien>
godi, how are you calling it, and on which platform and ...
<_habnabit>
just doing `./bootstrap` after unpacking rocketboost.
<_habnabit>
10.6; Xcode 3.
<adrien>
ah, os x
<_habnabit>
yes
<_habnabit>
hm, nope, it looks like it failed again eventually.
<_habnabit>
... hahaha, and right as I'm about to explain, someone else just posts to the godi list with my exact error.
<kfx>
I just set NO_CHECKSUM="yes" in build/bsd.pref.mk
<_habnabit>
ah.
<kfx>
obviously this is not the proper solution
<_habnabit>
and then how did you restart the build?
<kfx>
sh bootstrap -restart
<_habnabit>
ah okay.
<_habnabit>
hmm, I don't have a file called that. did you have to create it?
<kfx>
no, that file will appear in the target directory
<_habnabit>
oh, did you mean build/mk/bsd.pref.mk ?
<kfx>
yes, that one
<kfx>
sorry
<kfx>
look for .undef NO_CHECKSUM
<kfx>
comment it out, then put NO_CHECKSUM="yes" on a line before or after
<_habnabit>
okay.
<kfx>
(and make yourself a note to remove that edit once this bug is addressed :)
<_habnabit>
okay, rerunning it while I go to lunch. thanks, though.
<kfx>
yep
Ptivalternative has joined #ocaml
Ptival has quit [Disconnected by services]
Ptivalternative is now known as Ptival
<_habnabit>
aha, that did it.
<_habnabit>
so let's rebuild all the packages I need now..
<_habnabit>
huh, it looks like godi's batteries is really old.
<_habnabit>
when do packages get updated in godi?
Anarchos has joined #ocaml
ulfdoz has quit [Ping timeout: 255 seconds]
_andre has quit [Quit: leaving]
iratsu has quit [Ping timeout: 264 seconds]
<hcarty>
_habnabit: When the packagers update them. It varies from package to package.
<hcarty>
oasis + oasis-db/odb makes the release process simpler, so hopefully that will eventually translate into a simple way to get more timely updates
<hcarty>
It's already a good portion of the way there
<Anarchos>
adrien ca avance :)
<_habnabit>
so, it seems like really the only reason to use godi is that it's ocaml that comes with, like, findlib.
<hcarty>
_habnabit: It's usually more up to date than anything other than possibly Debian Sid; It makes rebuilds of everything much more simple when you update OCaml or a core package; It provides a large number of packages in an easily managed form.
<_habnabit>
yeah, but I use OS X.
<hcarty>
s/much more simple/much easier/
<_habnabit>
(and doesn't oasis take care of most of those things?)
<hcarty>
oasis is just a build system
<_habnabit>
ah.
<hcarty>
oasis-db may eventually take care of some or all of them, but oasis-db doesnt't exist as anything other than a server right now.
sebz has quit [Quit: Computer has gone to sleep.]
<hcarty>
odb provides a simple/proof-of-concept cleint which may eventually grow into more
<hcarty>
*client
<kfx>
I can't get godi to build a working ocamlgsl
george_z0rwell has quit [Read error: No route to host]
<kfx>
it's like it's missing include files or something
<kfx>
it passes tests, but then no software can actually link against it
<hcarty>
kfx: What OS, version of OCaml and version of GSL are you using?
<kfx>
RHEL5, 3.12, 1.13
<hcarty>
kfx: It should work? What error(s) are you getting?
<kfx>
I get no error during godi_perform -build godi-ocamlgsl
<kfx>
but when I try to build any package against ocamlgsl, I get a torrent of errors, which I will now pastebin
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
sebz has joined #ocaml
<hcarty>
kfx: It looks like you need to configure ocamlgsl to look at the correct GSL include and lib directories. Or it could be some problem related to those static linking errors.
<kfx>
hcarty: yes that's what I assumed
<kfx>
but the godi build process is a little obtuse, and it's not obvious where I would go to instruct it
<kfx>
it looks like it's based on pkgsrc?
<hcarty>
kfx: There may be configuration options for the godi-ocamlgsl package
<hcarty>
You can see them from godi_console and probably from somewhere else as well
<kfx>
ok, will check.
<kfx>
it's strange that it builds and installs with this problem.
<kfx>
godi_console doesn't offer any configuration
<hcarty>
I'm not sure - I've used it on Fedora, Debian and Ubuntu
<hcarty>
Good luck tracking down the problem, whatever it ends up being!
Cyanure has quit [Remote host closed the connection]
avsm has joined #ocaml
iratsu has joined #ocaml
ztfw has joined #ocaml
bobry has quit [Ping timeout: 246 seconds]
pheredhel has quit [Ping timeout: 240 seconds]
pheredhel has joined #ocaml
mundkur has quit [Ping timeout: 276 seconds]
mundkur has joined #ocaml
technomancy has joined #ocaml
avsm has quit [Quit: Leaving.]
<technomancy>
is there a way to look up function documentation from the command line or from within Emacs?
<zorun>
the tuareg-mode for emacs does that, iIrc
<technomancy>
looks promising; thanks
<zorun>
yeah, it does a lot more :)
<bitbckt>
M-x tuareg-help :)
philtor has joined #ocaml
<technomancy>
why would I not have access to Str.regexp in my toplevel?
<technomancy>
anything special I need to declare first?
<philtor>
Anybody try to install the new godi lately?
<philtor>
I'm getting:
<philtor>
### Building godi-pcre
<philtor>
=> Checksum mismatch for pcre-ocaml-6.2.2.tar.gz.
<philtor>
Make sure the Makefile and checksum file (/home/phil/godi-3.12.1/build/godi/ godi-pcre/distinfo)
<philtor>
are up to date. If you want to override this check, type
<technomancy>
I'd like to port dmenu to ocaml. basically it just needs to take input one char at a time and output a list of strings straight to the gui. would it be reasonable to use the Xlib library for this? http://www.linux-nantes.org/~fmonnier/OCaml/Xlib/doc/Xlib.html