fantasticsid has quit [Read error: Connection reset by peer]
fantasticsid has joined #ocaml
sebz has joined #ocaml
Snark has joined #ocaml
MarcWeber has left #ocaml []
ttamttam has joined #ocaml
ttamttam has left #ocaml []
Snark has quit [Quit: Quitte]
edwin has joined #ocaml
milosn_ has quit [Ping timeout: 240 seconds]
Snark has joined #ocaml
Kakadu has joined #ocaml
milosn has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
edwin has quit [Ping timeout: 240 seconds]
edwin has joined #ocaml
letrec has quit [Ping timeout: 252 seconds]
fantasticsid has quit [Remote host closed the connection]
fantasticsid has joined #ocaml
probst has joined #ocaml
sgnb has joined #ocaml
fantasticsid has quit [Ping timeout: 245 seconds]
ikaros has joined #ocaml
Drup has joined #ocaml
iago has joined #ocaml
fantasticsid has joined #ocaml
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 260 seconds]
ttamttam has joined #ocaml
<adrien>
wmeyer: found!
milosn_ has quit [Ping timeout: 244 seconds]
<adrien>
wmeyer: char d; value x = Val_int(d); <- d is a *signed* char; it gets cast to intnat which is defined to a *signed* long here
<adrien>
and when d is negative, the sign bit is kept but moved
<adrien>
and that makes the char something invalid for ocaml
milosn has joined #ocaml
<adrien>
I had thought about the signed/unsigned char issue when I first wrote my C code (the protocol definition is a C struct) but thought that it wouldn't be an issue; I hadn't thought of integer promotion
milosn has quit [Read error: Operation timed out]
milosn has joined #ocaml
jlouis_ is now known as jlouis
philed has joined #ocaml
buriedhead has joined #ocaml
buriedhead has quit [Ping timeout: 260 seconds]
ftrvxmtrx_ has quit [Quit: Leaving]
ftrvxmtrx_ has joined #ocaml
buriedhead has joined #ocaml
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
pilki has joined #ocaml
The_third_man has quit [Read error: Connection reset by peer]
The_third_man has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
buriedhead has quit [Ping timeout: 268 seconds]
ygrek has joined #ocaml
ttamttam has quit [Quit: ttamttam]
milosn has quit [Ping timeout: 244 seconds]
milosn has joined #ocaml
letrec has joined #ocaml
buriedhead has joined #ocaml
buriedhead has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
emmanuelux has joined #ocaml
pilki has quit [Quit: This computer has gone to sleep]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
ttamttam has joined #ocaml
avsm has quit [Quit: Leaving.]
emmanuelux has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
oriba has joined #ocaml
ttamttam has left #ocaml []
emmanuelux has quit [Ping timeout: 240 seconds]
<edwin>
adrien: write a Val_char macro that casts to unsigned char and then uses Val_int
<edwin>
not sure why char defaults to signed char as its an annoyance most of the time, like indexing an array with a char: you have to use unsigned again. I don't think I can bring up an example where a signed char is actually useful
emmanuelux has joined #ocaml
<adrien>
edwin: I've done the unsigned char cast as a temporary fix but it should at least be mentionned in the doc I think
<hcarty>
adrien: Regarding your question yesterday about running a code when used as a program but not when used as a library - I don't think that is possible in a direct way, given that OCaml has no "main" function, so every linked module is on fairly equal footing.
<adrien>
(part of my problem was that I wasn't sure how chars are stored in ocaml)
<adrien>
hcarty: ='(
<adrien>
edwin: I guess it defaults to signed because everything else defaults to signed too afaik
<hcarty>
adrien: There was a stack overflow question about this I think. There may have been some kind of work-around.
emmanuelux has quit [Remote host closed the connection]
<hcarty>
adrien: You could have a toplevel expression that only evaluates when a certain flag is passed in Sys.argv
<hcarty>
adrien: But every linked module has its top level expression run. So if you want something like that it probably makes the most sense to have "let run () = ..." in foo.ml, then use bar.ml with "let () = run ()" to build the executable version.
<adrien>
in caravel (where I control the usage both as a library and a program), I've added a check like: if Sys.argv.(0) = "current_filename.native" then ...
<adrien>
hcarty: oh, I'll check SO, thanks
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
raichoo has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
<NaCl>
adrien: caravel!!!!!!!!!!!!
<adrien>
NaCl: build it! :P
raichoo has quit [Ping timeout: 268 seconds]
raichoo has joined #ocaml
jamii has joined #ocaml
letrec has quit [Ping timeout: 240 seconds]
philtor has joined #ocaml
<NaCl>
adrien: laziness
ftrvxmtrx_ has quit [Ping timeout: 240 seconds]
ftrvxmtrx_ has joined #ocaml
<adrien>
pffft, everything's ready!
<adrien>
and you even get to have time-limited bugs if you build now!
<adrien>
special offer, it won't last
<NaCl>
ooooh
<NaCl>
got a dual-way hashtbl-like data structure lying around anywhere?
<NaCl>
adrien: what are the deps? I'll try running it on Mac OS.
<adrien>
it's been quite funny because it turned out that the ocaml dependencies aren't a problem: the C ones are
<Drakken>
Is there a way to install Batteries if you don't have tcl/tk? godi-console said it couldn't find some tcl header file(s), even after I installed tcl with netpkg.
<adrien>
Drakken: are you _only_ installing batteries?
<NaCl>
tell godi to disable it
sebz_ has quit [Quit: Computer has gone to sleep.]
* NaCl
doesn't use godi because he doesn't like the UI
<adrien>
use the command-line UI ;-)
<Drakken>
adrien I already installed Ocamlnet and yojson.
emmanuelux has joined #ocaml
<adrien>
Drakken: I mean: if you install lablgtk with glgtk support, it will pull lablgl which will pull labltk iirc
<adrien>
so, do you tell godi to build something else _now?
<Drakken>
adrien how do I figure that out? I *think* I only selected Batteries, but I'm not sure how to verify it in godi_console. For some reason I got the impression that godi_console remembers uninstalled selections after you quit it.
<adrien>
Drakken: can you pastebin the whole output from godi when you starart the process?
<Drakken>
adrien how do I do that? I only see one screenful of output.
<adrien>
Drakken: hmmm, on command-line, can you run: godi_wish -print
<adrien>
Drakken: "keep as is" in godi is "cancel the request you've set"
<adrien>
Drakken: have you unselected the conf-tcl package too?
<Drakken>
adrien yea, I got that. What about that Important Note?
<Drakken>
conf-tcltk and godi-ocaml-labltk
emmanuelux has quit [Ping timeout: 240 seconds]
<Drakken>
by "conf-tcl" do you mean "conf-tcltk"?
emmanuelux has joined #ocaml
<adrien>
yeah, that one
<adrien>
and you've configured lablgl to not build TOGL?
<Drakken>
I'm on the last screen ([o]k) before installation, so I can't see the package list without aborting.
<adrien>
are you sure you've "saved" your changes? the UI is a bit vague for that
<Drakken>
right. nb: <DELETE> works but <BACKSPACE> doesn't.
<adrien>
try Ctrl-W (whole word)
<Drakken>
I saw " = no" on the screen after I hit <RTRN>.
<Drakken>
Is that not enough?
<oriba>
someone here knows ocaml-ncurses?
<adrien>
Drakken: hmm
<oriba>
how does init_pair(1, COLOR_RED, COLOR_BLACK); attron(COLOR_PAIR(1)); be converted to Ocaml-ncurses? My attempts did not work in Ocaml, but work in C
<adrien>
Drakken: try going over the 3 packages once more and then start the process
<Drakken>
adrien is that "note" a problem?
philed has quit [Remote host closed the connection]
<adrien>
Drakken: well, it shows that the conf-tcltk is still selected
philed has joined #ocaml
<adrien>
maybe pulled by deps
<Drakken>
I don't see a "b" next to it.
<adrien>
when you tell godi to start, it first resolves deps (which can add packages) and then asks you for confirmation before building anything
<Drakken>
the package screen says "[b]uild&install" instead of "[k]eep as is", so it's probably not selected.
<adrien>
if you exit and run godi_wish -print again, what do you get now?
<wmeyer>
does anybody know how to force GODI to keep the build directory somewhere?
<adrien>
wmeyer: dirty way 1: [a]bort the build when it's creating the package
<wmeyer>
I've just playing around with ocamlspot and seems to work, but I am tired of rebuilding a package, and then copying around *.sp[oi]t files into the GODI tree
<wmeyer>
(rebuilding, just copied from godi/dist-files)
<wmeyer>
adrien: thanks, I tend to use godi-console, I wish there was a way of doing that nicely
<wmeyer>
otherwise I admit ocamlspot is really good thing, I keep it as my default compiler
<adrien>
Drakken: well, try to proceed with the build; it looks like it should be fine
<wmeyer>
oriba: probably what you would like to look at is lambda-term.
<adrien>
but according to the output from godi_console, it's going to build 10 packages while your output from godi_wish only shows 8
<adrien>
wmeyer: you could hack the .mk files
<adrien>
not guaranteed but should work for some/most packages
<wmeyer>
adrien: yes that's another way
BiDOrD_ has joined #ocaml
<adrien>
wmeyer: in pmake and therefore mk I think, when you write "install: foo", the "install" rule will _also_ depend on rule "foo"
<adrien>
so you can add rules that way and they'll accumulate
BiDOrD has quit [Ping timeout: 245 seconds]
<adrien>
wmeyer: see the lines after "The special package-building targets", "You probably won't need to touch these" in bsd.pkg.mk
<Drakken>
adrien you were right, it's still looking for conf-tcltk, even after I deselected it. same result.
<wmeyer>
adrien: It seems like it's not easy to achieve. The directory were the spot files are need to be permanent and is absolute, and the spot files needs to be copied where the package is being installed - so probably there is no easy way to do it.
<adrien>
wmeyer: ah ='(
<adrien>
Drakken: it's suprising but you could try disabling godi-lablgl ("keeping it as is") and disable gl support in lablgtk2
<wmeyer>
adrien: yeah, so the easiest way is just to copy the packages incrementally when they are needed from godi, rebuild them, keep the contents of tarball, and copy spot files to the pkg-lib or site-lib.
<wmeyer>
note, that you don't need to install the actual package, just copy the spot files.
<wmeyer>
I was working on better integration of OCaml in Emacs, and I have incremental error highlithing via. flymake - as you type - and ocamlspot working across libraries.
<wmeyer>
so now I need to write the actual code :(
<Drakken>
adrien am I still *not* installing conf-tcltk and godi-ocaml-labltk?
* wmeyer
procrastinating hard.
<wmeyer>
Drakken: did you try: godi_console perform -build godi-ocaml-labltk ?
<Drakken>
PS: those two packages keep getting automatically reselected. I have to keep re-UNselecting them.
<wmeyer>
BTW: labltk is included in OCaml tarball
<adrien>
he doesn't have tk
<Drakken>
wmeyer I'm too much of a noob for that right now
<wmeyer>
adrien, Drakken : Yep, tcl packages always beat me down to search with apt-file, everytime I use godi I can't remember which -dev Ubuntu packages I need to install.
<wmeyer>
oriba: you should be able to generate them via. ocamldoc, and *.mli files are usually sufficient. For the examples you can look at utop or zed.
<oriba>
does not compile with my old lwt
<wmeyer>
wow, the project suddendly start compiling after my destruction of GODI with ocamlspot
<oriba>
Just to habve a better ocaml-ncurses documentation would be sufficient to me btw
<wmeyer>
oriba: yes, the dependencies are PITA here.
<Drakken>
adrien which way would you like to try first? (a) try disabling godi-lablgl ("keeping it as is") and disable gl support in lablgtk2, or (b) configure the conf-tcltk package and set the right -I and -L options for gcc?
<wmeyer>
oriba: I don't know much about ocaml-ncurses..
<oriba>
aha
<wmeyer>
Drakken: which distro you on?
<oriba>
and also nobody else seems to know it?
<Drakken>
wmeyer Zenwalk 70. It's a Slack derivative.
<Drakken>
used to be called "minislack"
<Drakken>
7.0
<wmeyer>
Drakken: :O
<Drakken>
wmeyer it's supposed to be "dev-centric" :/
<adrien>
Drakken: (a) would be simpler, (b) is better in the long-run
<wmeyer>
Drakken: yes, it's, now you are solving problems, and devs are solving problems :)
<adrien>
I'd say (b) if you have 2 minutes to do it :-)
<wmeyer>
so it's dev-centric in some sense
<wmeyer>
so what's the exact problem Drakken
<wmeyer>
?
<wmeyer>
with the tcl/tk?
<Drakken>
adrien I have plenty of minutes, but I don't really know what I'm doing.
<adrien>
well, slackware doesn't split packages into -run, -doc, -dev, ... so it already helps a lot
<Drakken>
I'll need help.
<wmeyer>
is gcc looking in a wrong place for the headers?
<adrien>
Drakken: you're with ocaml 3.11 in godi?
<wmeyer>
oriba: ocaml-ncurses looks like a pretty much tiny wrapper over ncurses..
<Drakken>
wmeyer godi-console said it couldn't find some tcl header file(s), even after I installed tcl with netpkg.
<hcarty>
Drakken: Do you know what version of Tcl and Tk?
<hcarty>
Drakken: I think GODI only auto-detects
<hcarty>
< 8.5
<adrien>
hcarty: <= 8.5 (just checked)
<hcarty>
adrien: Ah, that's good. It wasn't that way last time I did a fresh GODI install.
<oriba>
wmeyer if ocaml-ncurses is just a wrapper over ncurses, how then is init_pair(1, COLOR_RED, COLOR_BLACK); attron(COLOR_PAIR(1)); translated to ocaml-ncurses? I don't see that
<hcarty>
oriba: Where is the documentation for ocaml-ncurses?
<hcarty>
oriba: Or source code
<oriba>
ah, I found it!
<Drakken>
hcarty probably the most recent. netpkg did the download, so I don't have the tarball & I don't remember which one it was, and I don't see a -version arg to tclsh.
<oriba>
wmeyer, this seems to work: init_pair 1 Color.green Color.yellow; attron (A.color_pair 1);
<adrien>
hmmm, tcl 8.6 is available
<adrien>
that could be an issue
<hcarty>
adrien, Drakken: That seems likely.
<Drakken>
adrien, wmeyer too much output from *tk*.h. lots of gtk stuff.
<wmeyer>
Drakken: sorry, i forgot about gtk
<adrien>
Drakken: what about "find /usr/ -name "libtk*so" 2>/dev/null" ?
<wmeyer>
yes, but you are looking now for tk.h really
<Drakken>
is there a glob pattern for [^g] ?
<adrien>
(it'll give the version number)
<adrien>
afaict, godi should say " This version is not supported." when it encounters tcl 8.6 but the test might not work as it shoul
<adrien>
d
<hcarty>
Drakken: GODI godi_console remembers whatever installtion/removal selections you made between runs. So if a package was previously selected for installation but not installed, it will still be selected the next time you run godi_console.
<adrien>
tcl 8.6 is from last august or earlier; hadn't seen that
<Drakken>
hcarty what if it was UNselected and then I exited godi_console? It seems to get selected again.