<yziquel>
julm: well. i took a brutal approach. symlink everything in my directory. then -dllib everything, since there is .so for everything, and hunt for symbols with a nm --print-file-name * 2>& 1 | grep UgLy_SyMbOl.
Ched has quit [Read error: 60 (Operation timed out)]
yziquel has quit []
Ched has joined #ocaml
lutter1 has quit ["Leaving."]
booboo1a has joined #ocaml
booboo1a has left #ocaml []
jeddhaberstro has quit []
jeddhaberstro has joined #ocaml
palomer has quit [Read error: 110 (Connection timed out)]
johnnowak has joined #ocaml
pantsd has joined #ocaml
ikaros has joined #ocaml
Snark has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
jeff_s_1 has quit [Read error: 104 (Connection reset by peer)]
mishok13 has joined #ocaml
jeddhaberstro has quit []
eevar2 has joined #ocaml
Asmadeus has quit ["replop somewhere else"]
Asmadeus has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
Associat0r has quit []
Ched has quit [Read error: 60 (Operation timed out)]
Camarade_Tux has joined #ocaml
<gildor>
hi
th5 has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
jmou has joined #ocaml
_zack has joined #ocaml
jeanbon has joined #ocaml
_zack has quit ["Leaving."]
_zack has joined #ocaml
Ched has joined #ocaml
jeanbon has quit [Read error: 104 (Connection reset by peer)]
jeanbon has joined #ocaml
youscef has joined #ocaml
jmou has quit [Read error: 113 (No route to host)]
_zack has quit ["Leaving."]
jeanbon has quit ["EOF"]
Amorphous has quit [Read error: 113 (No route to host)]
Amorphous has joined #ocaml
itewsh has joined #ocaml
julm has joined #ocaml
komar_ has joined #ocaml
sporkmonger has quit []
johnnowak has quit []
sporkmonger has joined #ocaml
julm has quit ["Quitte"]
julm has joined #ocaml
pantsd has quit [Read error: 113 (No route to host)]
pantsd has joined #ocaml
pantsd has quit ["Leaving."]
sporkmonger has quit []
sporkmonger has joined #ocaml
bombshelter13_ has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
komar_ has quit [Read error: 54 (Connection reset by peer)]
komar_ has joined #ocaml
_zack has joined #ocaml
Alpounet has joined #ocaml
willb has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
_andre has joined #ocaml
julm has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
eevar2 has quit ["This computer has gone to sleep"]
ikaros has joined #ocaml
itewsh has joined #ocaml
<itewsh>
How to send an integer with Unix.send insofar as the argument should be a string?
<Yoric[DT]>
Serialize it?
<itewsh>
with Marshal ?
<itewsh>
Marshal.to_string int []?
<flux>
itewsh, it really depends what you want to send. in the end you send a stream of octets.
<flux>
itewsh, mostly it depends on what the receiving end expects to receive..
<itewsh>
it expects to receive a 4 bytes integer
<flux>
big or little-endian?
<itewsh>
little-endian
<itewsh>
I should probably build my own library in c?
<flux>
do something like this: let int4_of_int = let s = String.create 4 in for i = 0 to 3 do s.[c] <- Char.code ((i lsl (24 - c * 8)) land 0xff) done; s
<flux>
or you can use the bitstring library which is built for things like this (except it's even more accurate, as it allows bit-based alignment)
<flux>
that turned out to be big-endian, oh well
jmou has joined #ocaml
<itewsh>
thanks!
<flux>
and it's Char.chr too
julm has quit [Read error: 110 (Connection timed out)]
<flux>
good luck!
<itewsh>
thanks :)
<flux>
uh
<flux>
the biggest bug is that I used lsl instead of lsr :)
Associat0r has joined #ocaml
jmou has quit [Read error: 110 (Connection timed out)]
jeanbon has joined #ocaml
jmou has joined #ocaml
th5 has quit []
sgnb has quit [Broken pipe]
sgnb` has joined #ocaml
catechu has joined #ocaml
sporkmonger has quit []
shazam has joined #ocaml
catechu has quit ["leaving"]
Yoric[DT] has quit ["Ex-Chat"]
_zack has quit ["Leaving."]
jmou is now known as julm
psnively has joined #ocaml
psnively has left #ocaml []
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
jmou has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
julm has joined #ocaml
jmou has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Ex-Chat"]
julm has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
jeanbon has quit ["EOF"]
<shazam>
well...
shazam is now known as palomer
<palomer>
julm, you around?
<julm>
here
hkBst has joined #ocaml
Alpounet has quit [Remote closed the connection]
<ehird>
Does godi's camlp5 work with 3.11.1 yet? If not, can I tell ./bootstrap to do 3.11.0?
<Camarade_Tux>
ehird, no, doesn't
<Camarade_Tux>
but afaik, that's because it has a blacklist of versions it works with and you can maybe patch it to update that list
<Camarade_Tux>
if not, you can contact ddr, he's pretty reactive usually
<ehird>
mm
<Camarade_Tux>
(ddr being Daniel De Rauglaudre)
<ehird>
for a quick fix I think I'd rather use 3.11.0 for now, but I'll look into that
<Camarade_Tux>
I should try compiling it but well, I feel a bit lazy today ;)
<Camarade_Tux>
(a --no-version-check switch for camlp5's configure would be nice)
<hcarty>
ehird: I'm not sure if you can force GODI to use 3.11.0 without telling it to build the appropriate CVS tag, now that 3.11.1 is in place
<ehird>
>..
<ehird>
*>.>
<ehird>
Bleah
<hcarty>
ehird: You could edit the camlp5 installation info - there is a newer release out which supports 3.11.1
<ehird>
Yeah, I might just.
<hcarty>
The camlp5 whitelist is an unfortunate-for-GODI-users feature
Camarade_Tux has quit ["Leaving"]
<ehird>
It's a shame that OCaml's infrastructure is a bit of a pain to set up.
<palomer>
try setting it up in windows!
digitake has joined #ocaml
Camarade_Tux has joined #ocaml
<ehird>
palomer: can I not breath for an hour instead?
<ehird>
*breathe
<ehird>
it'd be significantly less stressful
julm has quit [Read error: 60 (Operation timed out)]
<hcarty>
ehird: Yes, it is definitely a shame. GODI is wonderful, but still takes some work to get up and running.
<hcarty>
And package updates, or lack of updates like camlp5, can really throw things off
julm has joined #ocaml
<ehird>
I'd appreciate godi more if it focused on command-line stuff instead of an annoying ncurses gui, but yes, it works
<hcarty>
Everything in GODI can be done from the commandline
<ehird>
i know
<ehird>
it just isn't the focus
<hcarty>
I haven't used it much, but it has apparently improved in recent releases
<Camarade_Tux>
yeah, godi is really usable from the command-line
<palomer>
is there an in-caml godi API?
<hcarty>
Still, a CPAN-like tool for OCaml would be Super Cool
<flux>
camarade_tux, yes, except for performance
<hcarty>
palomer: Godi_script and Godi_script_wrapper. I don't know what they do though.
<Camarade_Tux>
flux, I find it faster than when using the gui
<Camarade_Tux>
(maybe because there is one less step, and most likely because I don't notice the lag since it's unattended)
<hcarty>
palomer: The findlib API would be a nice base to work from
<flux>
but I wonder if something lighter, more library-oriented, CPAN-like could be built upon findlib
<Camarade_Tux>
flux, also, unless godi has an algorithm in exp(n), I'm really wondering why it takes so long with less than 150 packages...
<flux>
for one, META files should have version numbers in the dependencies
<hcarty>
flux: Once Batteries is up and running at 1.0stable, Batteries + findlib could probably provide the base for such a tool
<flux>
camarade_tux, I think it uses make a lot for doing excess work..
break has left #ocaml []
<ehird>
incidentally, are there any proposals to add hierarchical modules to ocaml?
<Camarade_Tux>
I really think it could be improved quite easily, for instance when downloading files, it could have wget reuse an already-existing connection to a server, that would reduce network lag a *lot*
* palomer
wonders if shameless self linking is frowned upon
<ehird>
no reason for it to be...
<brendan>
as long as it's shameless it's ok
<hcarty>
ehird: What do you mean by hierarchical modules? The way Perl handles modules?
<ehird>
the way Haskell, Perl, ... handle modules
<hcarty>
That would certainly be nice.
<ehird>
, Python, heck even C++, ...
<ehird>
it's just curious to me that they'ren ot present
<ehird>
*they're not
<hcarty>
Perhaps a design limitation of the compiler
<ehird>
That would be odd.
<ehird>
What sort of patch would I need to do to the camlp5 thingy to install it on 3.11.1?
<palomer>
I don't know if namespaces == modules
<ehird>
oh, sheesh, I've forgotten to install coreutils before installing batteries again
<ehird>
grumble cp -a grumble... :p
<palomer>
I don't see how ocaml modules aren't hierarchical
<hcarty>
palomer: For example, only Batteries itself can put modules under Batteries.* - in Perl (as an example), anything under the Batteries/ directory would end up under Batteries.*
<hcarty>
That is along the lines of a change I would like to see
<palomer>
and you could have modules in different files be mutually recursive!
<ehird>
Oh, there are hierarchical modules, eh?
<ehird>
It's just I keep seeing Appname_foo thrown about
* palomer
does that
<hcarty>
ehird: You can certainly have Foo.Bar.Baz.value
<hcarty>
ehird: And there are different ways of putting modules together that way
<ehird>
so it's just a lack of convention then
<ehird>
Oh brother, now I have a checksum mismatch for bin-prot.
<hcarty>
ehird: I don't think so. The Appname_foo is likely used for longer module names, or to separate pieces of a library in to distinct parts.
<ehird>
mm
<palomer>
my library spans several files, so I prepend "libname" to every filename
<hcarty>
The bin-prot checksum error is odd. I just rebuilt against 3.11.1 and bin-prot built without issue.
<hcarty>
palomer: You can also pack them in to one library
<ehird>
I just tried again and the same thing happened. WTF?!
<hcarty>
palomer: I have a library with myArray.ml, myList.ml, etc. all packed under the Mylib name.
<hcarty>
ehird: Check the source?
<ehird>
hcarty: Which source?
<hcarty>
Perhaps the server is down or the file was moved
<ehird>
Well, you said it worked...
<hcarty>
ehird: Sorry, the source URL
<hcarty>
This was a few hours ago
<palomer>
hcarty, yeah, that's what I did
<hcarty>
And the file may have been cached locally
<hcarty>
palomer: Cool :-) I don't think I would have bothered without ocamlbuild, since it does most of the heavy lifting on its own.
<palomer>
I didn't use ocamlbuild
<ehird>
hcarty: Where can I find the source url?
<palomer>
OCamlLibrary(oset,$(FILES)) <--packs into oset.cma
<palomer>
(in omake)
<hcarty>
ehird: The GODI messages should list it. If not, then you can delete the local copy to force GODI to grab it again.
<ehird>
### Building package godi-bin-prot
<ehird>
> ===> Cleaning for godi-bin-prot-1.2.14godi1
<ehird>
> => Checksum mismatch for bin-prot-1.2.14.tar.gz.
<ehird>
Doesn't list it for me... where's the local copy?
<hcarty>
palomer: Very nice. I've thought about trying omake, but ocamlbuild came out right at the time I was looking for something other than OCamlMakefile.
<hcarty>
ehird: build/distfiles/ contains all of the downloaded sources
<ehird>
mm
<palomer>
is the function "input_value" seem familiar to anyone?
* palomer
wishes there was a way to find the module in which a function is defined
<flux>
palomer, what about it?
<mrvn>
pervasives?
<palomer>
oh wait, it's in pervasives!
<palomer>
hah:P
<ehird>
Pervasives is such an odd name :)
<flux>
palomer, btw, you can maybe use cmigrep for some similar behavior
<ehird>
Hokay, now I have to figure out what I need to patch for camlp5. /me looks in ~/godi.
<julm>
palomer: you could also use ocamlbrowser
<hcarty>
ehird: No stranger than Prelude :-) But both seem like odd choices, perhaps without better substitutes.
<ehird>
Base? Core?
<hcarty>
Perhaps. But "Pervasives" is nice because the name tells you what it is - it's everywhere
<mrvn>
And nobody will name their own module that and cause a conflict.
<ehird>
I'm tempted to try and do some low-level hackery to make a module that doesn't have Pervasives in it now, if that's even possible :-)
<hcarty>
ehird: There is a -no-pervasives or similar compilation flag
<hcarty>
ehird: build/godi/godi-camlp5 is likely a good start for your camlp5 hacking
<hcarty>
ehird: That directory holds the general build information for the package, as far as I know.
<ehird>
OK
<palomer>
camlp5 is the old camlp4, right?
<hcarty>
distinfo holds the names of the source files and their hashes
<hcarty>
palomer: Yes, though it's been updated since and does not have 100% backwards compatibility.
<hcarty>
ehird: I think editing distinfo and Makefile in that directory should get you what you want, if you change them to update camlp5 to 5.12
<det>
Do people here think order of operations is important for a syntax?
<det>
I mean "i+2*3" being parsed as "1+(2*3)"
<ehird>
det: You mean associativity?
julm has quit [Read error: 110 (Connection timed out)]
<det>
I think associativity is different, right ?
<ehird>
Well, what do you mean?
<det>
that is left/right
<det>
I mean, * taking precedence over +
<ehird>
Operator precedence
<mrvn>
essential
julm has joined #ocaml
<ehird>
It's not wildly important; if your rules are weird people will forget them anyway and use parens, but if you're not too weird about them, they won't be dreadfully useful.
<ehird>
Lisp has none of it, J uses strict right-associativity with no precedence; both aren't a problem (well, Lisp is disputable)
<ehird>
hcarty: OK, those files look right, but I think camlp5 will still complain about the version no matter what I do.
<mrvn>
1+2*3 == 9 is awfully confusing.
<ehird>
I think I might have to patch camlp5...
<ehird>
mrvn: so parenthesize it
<hcarty>
ehird: Yes, you'll also need to download camlp5 version 5.12
<ehird>
hcarty: ah; so .12 probably works with 3.11.1 OOTB
<ehird>
so I can just change the version numbers?
<mrvn>
ehird: Why should I if I mean that?
<hcarty>
ehird: Yes, according to the changelog it does
<hcarty>
ehird: I /think/ so. Worth a shot :-)
<ehird>
mrvn: you always have to specify things for the language because the language is not omnipotent
<ehird>
there's always ambiguity
<ehird>
it's better to be careful than to shave off a few parens
<det>
I am thinking about having no precedence on infix operators, and having associativity defined by the first character
<mrvn>
There is also common sense and the least surprising way.
<det>
I think I prefer "1+(2*3)" anyways
<ehird>
mrvn: Bah to that, "common sense" is just a gloss meaning "things I know".
yziquel has joined #ocaml
<mrvn>
I prefer operator precedence
<ehird>
It's better to have a consistent, logical language than one with a shallow learning curve.
<mrvn>
ehird: in this case things people have been thought sicne first grade
<ehird>
mrvn: on paper i'd write 1+(2*3) as "1 + 2*3"
<ehird>
but whitespace-based precedence is just ridiculous :)
<det>
I'm also on the wall about bracy syntax vs layout syntax :-)
<ehird>
hcarty: Yay it works.
<det>
But yeah, whitespace precedence is really silly :-)
<ehird>
it
<ehird>
's funny, the main reason I looked at ocaml was its syntax
<hcarty>
ehird: Hooray - Now perhaps you can do whatever it is you've been planning to do with OCaml :-)
<ehird>
most people seem to hate it, but I like the general feel
<ehird>
hcarty: get around to actually learning it fully? :-)
<ehird>
hcarty: btw, won't this break when I update the package list?
<hcarty>
I like the OCaml syntax a lot. It drove me a little nuts at first, but I like it's feel now more than most other languages I've seen.
<det>
I dont like Ocaml syntax, I'd prefer bracy syntax or python-esque syntax
<mrvn>
det: then use ()
<hcarty>
ehird: I'm not sure. Depends on how GODI determines what is out of date.
<ehird>
for me, python syntax is something that seems ok when you look at the individual elements, but the sum total is just bland and ugly
<ehird>
this is, of course, highly subjective...
<ehird>
not many language designers seem to regard syntax as a user interface, which is a shame
<ehird>
Yay, "bcaml" now runs a Batteries Included toplevel with ledit line editing.
<palomer>
well...if anyone wants a nice user interface for their programming language, they should consider oset
<ehird>
never been much of a fan; or rather, I've never seen a good one
<ehird>
i might try that out
<palomer>
not a structure editor...
<palomer>
a structure editor generator
<palomer>
generates them automagically from datatype declarations
<ehird>
hcarty: same thing modulo indirection :)
<hcarty>
ehird: Yes, I just liked the feel of rlwrap more :-) I have not used ledit since I started with OCaml though, so the changes may have diminished even further.
<ehird>
oops, I meant palomer: some thing modulo indirection :)
<ehird>
but it sort of applies that way too, heh
<ehird>
hcarty: that's odd, switching away from an ocaml tool when you start using ocaml
<flux>
ehird, but it's the pragmatic approach: a tool is just a tool :)
<ehird>
indeed
<hcarty>
ehird: I tried ledit first because it was the first thing I heard of. rlwrap Worked Better For Me.
<mrvn>
A tool is a tool is a too. But a swiss army knife...
<det>
ledit doesn't automatically save history across sessions
<det>
I think that was the main reason I prefered rlwrap
<flux>
rlwrap requires some command line switches to do that, no? or is ledit is fully incapable of doing that?
<hcarty>
I've been spoiled by: Foo.open "fil<TAB>";; giving me what I want with a few saved keystrokes
<det>
flux, talking to me ?
<flux>
det, yes
<det>
rlwrap does it automatically
<flux>
hmm
<det>
ledit requires command line switches of file to save history to, IIRC
<flux>
ah, indeed it does
<flux>
I must've mixed it to socat
<flux>
which I use for almost the same task (it has a readline mode)
<ehird>
hmm
<ehird>
I have html docs for godi-batteries but not for Pervasives (I've seen one for pervasives on the web iirc), odd
<hcarty>
ehird: I think the OCaml docs are in a separate package under GODI.
<ehird>
bam, it's just like the library reference, but uglier :)
<hcarty>
Ah, that. It's not the proper library reference, just an overview of Pervasives.
<hcarty>
As you pointed out, the libref/ directory has the complete and much nicer looking version.
<ehird>
right
<ehird>
Apologies for the trivial question — is there a simpler way to just concatenate a few strings (say, an operator) than String.concat "" [...]?
<gildor>
^
<ehird>
Ah, thanks.
<ehird>
"global_substitute regexp subst s returns a string identical to s, except that all substrings of s that match regexp have been replaced by the result of function subst. The function subst is called once for each matching substring, and receives s (the whole text) as argument." it receives the whole text? Doesn't that mean you can't depend the result on e.g. a match?
<ehird>
Or does it give the substring?
<Camarade_Tux>
Str evil :P
<ehird>
I won't use Str then :-P
<Camarade_Tux>
ehird, no idea what it does but use (fun s -> print_endline s; s) as an argument and it will tell you what it receives ;)
<ehird>
Oh yeah, OCaml isn't referentially transparent, I forgot :P
<Camarade_Tux>
ehird, pcre is probably better
<hcarty>
And PCRE is installed by default with GODI
<ehird>
I don't really need regexps; I'm just trying to replace all non-alphanumeric characters. Oh, it's installed already? Then I might give it a shot :P
<Camarade_Tux>
I use Str in very small projects which could nearly be compiled with 'ocamlc a.ml'
<AxleLonghorn>
ehird: yes, ocamllex/ocamlyacc are the programs to use for making parsers. If you need some examples, I believe all of the languages in the PL zoo have lex/yacc parsers. http://andrej.com/plzoo/
<ehird>
thanks
komar_ has quit ["WeeChat 0.2.6.2-ohshi"]
<AxleLonghorn>
anyone see what's wrong?
<gildor>
AxleLonghorn: where does it hang ?
<AxleLonghorn>
I don't know
<gildor>
put some prerr_endline around
<AxleLonghorn>
will do
<julm>
it hangs on get_line
<julm>
on Pervasives.input_scan_line more precisely
<gildor>
what is parrot ?
<AxleLonghorn>
a virtual machine
<gildor>
perl
<gildor>
ok
<AxleLonghorn>
yes
<julm>
it hangs also with a simple [cat]
<AxleLonghorn>
"parrot -" should read from stdin and run the passed code
<gildor>
I propose you to "close_out out_of_proc" before get_line
<gildor>
I think parrot don't output anything before it receive and EOF
<gildor>
and to generate an eof you need to close "into_proc"
<mrvn>
Maybe it is an ex-parrot.
<gildor>
(sorry i mean close_out into_proc)
<AxleLonghorn>
that did the trick gildor
<gildor>
great, didn't have time to run the program by myself
<gildor>
;-)
<AxleLonghorn>
thanks a bunch everyone
<ehird>
Error: This expression has type char list but an expression was expected of type string
<ehird>
"This is your brain. This is your brain on Haskell..."