<thelema>
hcarty: ok, batLog.Easy now supports changeable output channels.
<thelema>
hmm, I'm thinking that I can remove the getter/setter for the output channel and just expose the ref, as I think I won't need them for thread safety (when this is added)
<thelema>
ref updates are atomic, right?
bobry has joined #ocaml
NihilistDandy has joined #ocaml
KDr2 has joined #ocaml
bobzhang1988 has quit [Ping timeout: 240 seconds]
jimmyrcom has joined #ocaml
mjambon has joined #ocaml
mjambon has left #ocaml []
Tobu has joined #ocaml
andreypopp has quit [Ping timeout: 244 seconds]
andreypopp has joined #ocaml
iago has quit [Quit: Leaving]
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 245 seconds]
twittard has quit [Quit: twittard]
oriba_ has quit [Quit: oriba_]
philtor has joined #ocaml
larsrh has quit [Ping timeout: 276 seconds]
larsrh has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
andreypopp has quit [Quit: Computer has gone to sleep.]
philtor has quit [Ping timeout: 252 seconds]
ben_m has joined #ocaml
ben_m has quit [Quit: Leaving]
twittard has joined #ocaml
andreypopp has joined #ocaml
philtor has joined #ocaml
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
NihilistDandy has quit []
ulfdoz has joined #ocaml
jimmyrcom has quit [Ping timeout: 244 seconds]
abdallah has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
Snark has joined #ocaml
Tobu has joined #ocaml
philtor has quit [Ping timeout: 246 seconds]
andreypopp has quit [Quit: Computer has gone to sleep.]
abdallah has quit [Quit: Ex-Chat]
adamgolding has joined #ocaml
<adamgolding>
I need to 'downgrade' the ocaml that came with cygwin to 3.11--how do I do this?
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
emmanuelux has quit [Ping timeout: 245 seconds]
<adrien>
adamgolding: you install a separate one
<adrien>
maybe through godi
<adrien>
may I ask you why?
<adamgolding>
HOL Light does not work with the newest OCaml
<adamgolding>
i just tried to build OCaml 3.11.2 after getting it via svn and am getting errors
pango is now known as pangoafk
<adamgolding>
"user@X220 /3.11.2 $ ./configure Configuring for a i686-pc-cygwin ... gcc found Unable to compile the test program. Make sure the C compiler gcc -O is properly installed. "
<adamgolding>
I don't know what 'godi' is
<adamgolding>
I'm using cygwin on windows 7 x64
<adrien>
why are you tring to go back to 3.11 precisely?
<adrien>
what makes you think it'll work better?
ousado_ has joined #ocaml
<adamgolding>
someone on a mailing list told me to, lol
<adrien>
cygwin ML or HOL Light ML? and did he give a reason?
<adamgolding>
on the 'hol light' mailing list, specifically
<adamgolding>
I was told:
<adamgolding>
"The problem you get is due to there being significant changes between OCaml 3.11.X and 3.12.X, and the version of HOL Light you have (presumably the snapshot from 10th Jan 2010?), does not cater for OCaml 3.12.X. Versions of HOL Light since the 10th Jan 2010 snapshot are only available as a Subversion snapshot. There are 3 possible solutions:"
<adamgolding>
"1. Download the latest HOL Light Subversion shapshot (see the HOL Light webpage). For this you need to install Subversion. 2. Tweak the version of HOL Light you have to work with OCaml 3.12.X. This doesn't take long, and I can tell you how if needed. 3. Install an older version of OCaml. I've had problems installing OCaml 3.11.X (and OCaml 3.12.0) on 64-bit Linux, so perhaps OCaml 3.10.2 is the safest choice."
_KDr2_ has joined #ocaml
<adrien>
I'd rather get HOL Light SVN
<adamgolding>
after failing at option 1 (I coudl paste the errors) someone told me that option would not in fact work--at least, they claimed that option 3 was the only way they could make it work
<adrien>
I believe it's better to fix 1
<adamgolding>
well, when trying 1, i got some errors, was told I had the wrong version of Campl5
<adamgolding>
then i had errors trying to build the 'right' version of campl5
<adamgolding>
"/usr/bin/flexlink: line 2: exec: /usr/lib/flexdll/flexlink.exe: cannot execute: No such file or directory"
ftrvxmtrx_ has quit [Quit: Leaving]
<adamgolding>
actually, i did just have cygwin 'reinstall' flexlink, let me try that step again
silver has joined #ocaml
<adrien>
can you check the second flexlink.exe file exists?
<adamgolding>
ok, now i get: "Error: Error during linking Makefile:27: recipe for target `../meta/camlp5r.opt' failed make[2]: *** [../meta/camlp5r.opt] Error 2 "
<adamgolding>
when running make opt in the camlp5-5.15 dir
<adrien>
and don't you have a longer error message?
<adamgolding>
hmm, i have been using transitional rather than strict
KDr2 has quit [*.net *.split]
f[x] has quit [*.net *.split]
ousado has quit [*.net *.split]
<adamgolding>
oops, i missed the earlier error in the printout: "** Fatal error: Cannot find file "libm" "
<adrien>
libm? that's a C library which I'd expect to always be installed (math library)
<adamgolding>
indeed
<adamgolding>
although there may be path problems
<adamgolding>
i'm currently trying the steps in the thread you linked to
Cyanure has joined #ocaml
f[x] has joined #ocaml
<adamgolding>
does it matter where i put the camlp5-5.15 folder to begin with?
<adamgolding>
i am a novice when it comes to linux/cygwin
<adamgolding>
i mean, the "$ make world.opt" command is running, butI have no idea if where it places things is relative to where i placed the folder initially
<adrien>
it does not matter
<adrien>
it should place things in /usr/local or next to the ocaml installation (which is quite likely)
<adrien>
(meaning in /usr/ probably)
<adamgolding>
why is there no stage in this installation procedure that corresponds to 'choosing the installation directory' when using a 'installation wizard'?
<adamgolding>
augh, once again i got the 'cannot find file "libm"' message
<adrien>
you cannot chose where it installs: what you chose is the "prefix", and that has broader implications than just the directory where it put files
<adrien>
but imagine you put files in 20 different places for 20 different softwares, how could a subsequent software find all of them?
<adrien>
so what you see here is consistency
<adrien>
why is it after a file named "libm"... "libm.a" exists but not "libm"
<adamgolding>
dunno
<adamgolding>
yeah i found libm.a in C:\cygwin\opt\lib
<adrien>
can you try this in a new folder somewhere else?
<adrien>
touch a.ml
<adrien>
ocamlopt a.ml
<adrien>
ldd a.exe | grep libm
<adrien>
what does the last step say?
<adrien>
(actually the question is: does the second step work? :p )
<adrien>
(but you should do things in your HOME, not directly in /)
<adrien>
you were tring to install ocaml 3.11, did you do anything so far?
<adamgolding>
yeah i think i got as far as errors running the configure script
<adrien>
ok
<adrien>
I was wondering if you had bits of another ocaml install but you don't
<adrien>
I don't have a cygwin box so I can't tell you for sure but to me it looks like a broken package
<adrien>
do you have "ocamlopt.opt"?
<adrien>
can you run the command
<adrien>
?
<adamgolding>
just type that in any folder?
<adrien>
yeah
<adrien>
(you could also see with tab-completion but I don't know how well it's working in cygwin)
<adamgolding>
it appears to run with no output at alll
<adrien>
ok
<adamgolding>
cygwins tab completion leaves a lot to be desired compared to my dos prompt
<adrien>
can you try "ocamlopt.opt a.ml"
<adrien>
compared to the _dos_ prompt? why?
<adrien>
that's maybe a configuration difference
<adamgolding>
sometimes it refuses to tab-complete because there are multiple ways to do so, as opposed to the dos prompt where it will cycle through the options
<adrien>
adamgolding: yeah, bash (by default?) has this behaviour; I don't like it either =)
<adamgolding>
i don't know if that's a linux thing or a cygwin thing but it drives me crazy, lol
<adamgolding>
oh, ok, or a bash thing :p
<adamgolding>
oh, and it can't tab-complete directories with spaces in them, as far as i can tell
<adamgolding>
or it won't add quotation marks
<adrien>
you need to see zsh ;-)
<adamgolding>
in fact, i've had to abandon all hope of having hol_light in my usual "R:\Program Files (Portable)" folder, since every other make file seems to choke if there are spaces in the path
<adrien>
there's a wizard at the start (usually) asking you to configure it; takes around one hour I'd say (because you'll be testing everything probably) but it's worth it imho
<adrien>
yeah, spaces are not a very good thing usually
<adrien>
well
<adrien>
rather: spaces are fine but poorly handled
<adamgolding>
they are bread an butter in windows land--i have to say, despite "being a programmer" I find all this command-line stuff to feel rather stone age compared to what I'm used to in windows
<adrien>
can you call "ocamlopt -verbose a.ml" and copy-paste the output in a _pastebin_ ?
<adamgolding>
sure
<adrien>
adamgolding: zsh makes command-line a completely different story
<adrien>
bash has "bash-completion" too which makes it better but not as good as zsh yet
<adrien>
so /usr/bin and /usr/lib or /usr/lib64 mostly
<adrien>
you'll have to first find the right files before overwriting them
<adrien>
find / -iname NAMEOFTHEFILE
<adrien>
will help
<adrien>
(slow the first time and then pretty quick)
<adamgolding>
heh, i'm already at it with WIN+F
<adrien>
works too
<adamgolding>
while i hate the command line, i do love my windows hotkeys :p
<adrien>
I've been annoyed at the windows search, I've been under the impression it was sometimes blind
<adrien>
well
Cyanure has quit [Remote host closed the connection]
<adamgolding>
yeah you have to choose "search again in computer" usually
<adamgolding>
oookay, i've got like four copies of flexlink.exe
<adamgolding>
let's see, some of those i put there manually before i asked cygwin to reinstall it
<adrien>
mkdir t && cd t && unzip ../flexlink*.zip && for i in flexlink*/*; do find /usr/ -name $i | xargs cp $i; done && cd .. && rm -r t
<adrien>
that should automate the process ;-)
<adrien>
(obviously, not tested but you get the idea)
<adamgolding>
ok i got rid of the ones i didn't add manually, now I have flexdll under cygwin/opt/lib and cygwin/lib
<adrien>
hmmm
<adrien>
/opt/ ?
<adrien>
/opt/ is meant for stuff from outside the package manager
<adamgolding>
hmm
<adrien>
so cygwin's shouldn't put anything there
<adamgolding>
i have a lot of stuff in C:\cygwin\opt\lib
<adrien>
(again, there are some weird things in the mac os x land)
<adrien>
it's also possible: KDE on linux used to be in /opt too
<adrien>
well, see where the .o files are, then remove the cygwin package
<adamgolding>
i have almost nothing in cygwin/lib -- just a flexdll dir and some libfl files
<adrien>
extract flexlink.exe to /usr/bin, the dll to the same place, the .o files where cygwin was putting them
<adrien>
don't you have much more files in cygwin/usr/lib ?
<adamgolding>
"see where the .o files are, then remove the cygwin package" <-- where which .o files are? do what to remove what cygwin package?
<adamgolding>
no, ther eis no C:\cygwin\usr\lib
<adrien>
the .o files that are in flexlink*.zip
<adrien>
ah, ok, cygwin is a weird beast sometimes
<adrien>
in other words: put flexlink.exe and flexlink.dll in the folder named "bin" which is not too deep in the filesystem tree and which already has gazillion of files
ftrvxmtrx has joined #ocaml
<adamgolding>
that woudl be C:\cygwin\bin
<adrien>
ok
<adamgolding>
ok when running at the command line it still catches the 0.26 version
<adamgolding>
i guess i should overwrite in the other locations
<adrien>
which flexlink.exe
<adrien>
run that ^
<adrien>
well, you shouldn't overwrite in several locations
<adrien>
buit have it in only one location
<adamgolding>
"/usr/bin/flexlink.exe "
<adamgolding>
uhh, but C:\cygwin\usr\bin does not exist
<adrien>
remove it :P
<adamgolding>
huh?
<adamgolding>
lol
<adrien>
/usr/ is actually a symlink in cygwin I think
<adrien>
see under C:\cygwin\cygwin or something like that
<adrien>
or use the command-line
<adrien>
rm /usr/bin/flexlink.exe
<adamgolding>
i'm just replacing them all for now
Tobu has quit [Ping timeout: 260 seconds]
<adamgolding>
maybe some were pasted by me before
<adrien>
well, usually it's reallly better to only have one
cago has joined #ocaml
<adamgolding>
i can see that, although I'll do anything to actually run hol tonight, lol
<adamgolding>
ok, i can run 0.27 from bash
<adamgolding>
i.e. it is what is run when i type flexlink -help
<adrien>
do you still have the "/tmp/camlstartup32594e.o" file? (just run: ls /tmp/camlstartup32594e.o)
<adamgolding>
ls: cannot access /tmp/camlstartup32594e.o: No such file or directory
<adrien>
='(
<adrien>
I guess that this flexlink dll has not been compiled for cygwin
<adamgolding>
well, it's trying to build camlp5 again now
<adrien>
for a program to understand cygwin paths (/tmp/ for instance), it needs to have been linked against cygwin1.dll
<adrien>
it'd be pretty good if someone here was on cygwin (so, anyone else? :-) )
<adamgolding>
:p
<adamgolding>
i'm inclined to think i should scrap my cygwin and start fresh
<adrien>
I'd expect that someone else had a working flexlink
Submarine has quit [Ping timeout: 246 seconds]
<adrien>
well, try removing all the instances of flexlink and all files with "flexlink" inthe name and reinstall it for starters
<adamgolding>
ok, well the camlp make file is still running
<adrien>
flexlink will really only be invoked at the end of the build
<adamgolding>
yeah
ezyang has quit [Ping timeout: 265 seconds]
<adamgolding>
ugh, for some reason the cygwin setup.exe is not being very selective about what it considered to 'already' be installed
edwin has joined #ocaml
edwin1 has joined #ocaml
edwin has quit [Disconnected by services]
edwin1 has quit [Client Quit]
edwin has joined #ocaml
Cyanure has joined #ocaml
<adamgolding>
oh, i see, it's 'updating' some packages
shachaf_ has joined #ocaml
shachaf_ has quit [Client Quit]
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
Tobu has joined #ocaml
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
MaskRay has quit [Quit: leaving]
cago has quit [Ping timeout: 240 seconds]
adamgolding has quit [Ping timeout: 245 seconds]
cago has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
djcoin has joined #ocaml
Kakadu has joined #ocaml
Tobu has joined #ocaml
<Kakadu>
hi all
<Kakadu>
can I specify on the Forge for a project GitHub's SCM (to share development version of a project)?
_KDr2_ has quit [Remote host closed the connection]
albacker has quit [Remote host closed the connection]
avsm has joined #ocaml
<adrien>
I don't know but see how batteries does it
cyphase has quit [Ping timeout: 252 seconds]
<Ptival>
wow I don't understand the question
<Ptival>
can't parse
<adrien>
afaiu: use the forge to host the projects except the source code which will be hosted on github (that leaves forums, mailing-lists, bug tracker, ...)
MaskRay has quit [Remote host closed the connection]
cago has quit [Ping timeout: 265 seconds]
cago has joined #ocaml
<Drakken>
Is there a way to insert program logic into a camlp4 grammar entry that dynamically affects how a symbol matches? The manual says the section after the arrow is an "action", so I suppose code may be allowed there, but what about the symbols to the left of the arrow?
djcoin has quit [Ping timeout: 252 seconds]
djcoin has joined #ocaml
edwin has left #ocaml []
Kakadu has quit [Quit: Page closed]
Zedrikov has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
Kakadu has joined #ocaml
edwin1 has joined #ocaml
snearch has joined #ocaml
smondet has joined #ocaml
KDr2 has quit [Remote host closed the connection]
jimmyrcom has joined #ocaml
oriba has joined #ocaml
ezyang has joined #ocaml
zcero has joined #ocaml
<zcero>
Hello. How suitable would functors be to structure an algorithm where some parts should be interchangeable?
<mrvn>
verry
<zcero>
mrvn: I toying a bit with it right now and my idea currently is to parameterize a functor with one module for each interchangeable part. Is there another way to include functionality from different modules?
<zcero>
mrvn: Pack the modules in some kind of specification module?
<mrvn>
callbacks (records of them), object or first class modules
<mrvn>
But they all intoduce some form of indirection, meaning runtime cost
<zcero>
mrvn: first class modules sounds like what I'm looking for. Trying to look for an example.
<mrvn>
do you want to switch them out at runtime?
<zcero>
mrvn: The interchangeable parts are quite coarse grained. No inner loop stuff so I'm not to worried. No runtime switching.
<mrvn>
then look at functors
adamgolding has joined #ocaml
<adamgolding>
adrien: whoops, fell asleep, lol
<zcero>
mrvn: Ok. Thanks!
<adamgolding>
adrien: reinstalling cygwin from scratch now
<adamgolding>
someone on the hol list has asserted that the newest ocaml should work fine with the newest hol light
<adamgolding>
but that i have to be very careful about the campl5 version
letrec has joined #ocaml
<Kakadu>
hallo!
<Kakadu>
I have some problems while reading documentation
<Kakadu>
Str.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.
<Kakadu>
> receives s (the whole text) as argument.
<Kakadu>
Why??
<Kakadu>
why not a substring matched by regexp?
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
<adrien>
I wonder what Str.matched_string would return
andreypopp has joined #ocaml
Zedrikov has quit [Quit: Bye all, see you next time!]
edwin1 has quit [Remote host closed the connection]
edwin has joined #ocaml
<thelema>
Kakadu: I agree it's wierd. I guess it's so that you can build the replacement function without knowledge of the string being matched. I think string -> int -> string would be better; at least indicate the offset of the match.
edwin has quit [Read error: Connection reset by peer]
edwin has joined #ocaml
edwin has quit [Client Quit]
letrec has quit [Ping timeout: 245 seconds]
letrec has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
<zcero>
part
zcero has left #ocaml []
flx_ has joined #ocaml
flux has quit [Ping timeout: 260 seconds]
flx_ is now known as flux
MaskRay has quit [Quit: leaving]
vivanov has joined #ocaml
andreypopp has quit [Quit: Computer has gone to sleep.]
<vivanov>
does anyone use typerex with oasis -- what files to modify in oasis project ?
snearch has quit [Quit: Verlassend]
adamgolding has quit [Ping timeout: 245 seconds]
<cago>
vivanov: If you have a myocamlbuild.ml file, you can add this line " Options.ocamlc := S [ A "ocp-ocamlc"]" or you can also invoke ocambuild with these options "ocamlbuild -ocamlc ocp-ocamlc.opt -ocamlopt ocp-ocamlopt.opt"
<thelema>
so nothing built in to oasis at the moment, but it's possible by modifying the generated myocamlbuild.ml file
letrec has quit [Ping timeout: 260 seconds]
Submarine has quit [Ping timeout: 260 seconds]
sander_ has joined #ocaml
<cago>
yep, you can modify your myocamlbuild.ml file
<cago>
You also need to add "CMT _build" in your .typerex
<thelema>
maybe oasis (or ocamlfind) could be patched to look for ocp-ocamlc[.opt] and prefer it to ocamlc.opt
<adrien>
ocamlfind, you only need to change environment variables
<cago>
yes, imo it's more easy to change your ocamlfind.conf
<pippijn>
I use the automaton description to generate better default error messages
twittard has quit [Quit: twittard]
avsm has quit [Quit: Leaving.]
twittard has joined #ocaml
cyphase_ is now known as cyphase
cyphase has quit [Changing host]
cyphase has joined #ocaml
Tobu has quit [Read error: Connection reset by peer]
pangoafk is now known as pango
emmanuelux has quit [Ping timeout: 245 seconds]
albacker has joined #ocaml
Snark has quit [Quit: Quitte]
Kakadu has quit [Quit: Konversation terminated!]
Kakadu has joined #ocaml
<flux>
pippijn, pretty neat
fezghoul has joined #ocaml
lorill has joined #ocaml
<fezghoul>
I am having trouble building ounit (in the process of building batteries). "ocaml setup.ml -build" complains that ocamlbuild.cmx cannot be found despite ocamlbuild being installed. Is there a way to use a ocamlbuild.cmo instead?
_andre has quit [Quit: leaving]
thelema has quit [Read error: Connection reset by peer]
<lorill>
hi, I wrote some code that works, but is probably ugly to an experienced ocaml'er. Could anyone take a look and help me make this more readable / classical ocaml ?
<lorill>
now I have this : http://codepad.org/kSwNePuS - better, but probably still improvable. Any suggestions ?
cyphase has quit [Ping timeout: 250 seconds]
milosn has joined #ocaml
cyphase has joined #ocaml
avsm has joined #ocaml
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 244 seconds]
<thelema>
lorill: I have some minor suggestions on your from_string, but that's not really going to change your runtime much (that's what you're still looking to improve, no?)
<lorill>
no, i'm quite content with my performances
<lorill>
i'm now looking to be more "standard" ocaml
<lorill>
and a bit more readable would be great too
<thelema>
ok.
<thelema>
gotta do something else quickly now, I'll see what suggestions I can make in a bit
<xenocons>
curious if anyone has written a generic map so i can leech and learn
<xenocons>
where map can take any n functions as parameters
ftrvxmtrx has joined #ocaml
<thelema>
xenocons: n functions?
<xenocons>
e.g. map ((+) 5) [1;2;3] works aswell as map (+) [1;2;3] [4;5;6]
<thelema>
what would the type of such a map be?
<xenocons>
unsure
<thelema>
I don't think it's expressible in ocaml.
<thelema>
which is why the stdlib has map2 and map.
<xenocons>
ya, my googling agrees
<xenocons>
slowly getting attracted more and more to haskell heh
<thelema>
Feel free to wander off into theoretical purity land. I'm happy staying in practical elegance land.
<xenocons>
haha, that is true
<xenocons>
it is important to think about such things though (when i say important i mean it has attracted my curiosity)
<thelema>
lorilan: don't use matrix.(fst node).(snd node), just pattern match node in the function: instead of "node", use "(x,y)" and then you can do "matrix.(x).(y)"
<thelema>
agreed, higher levels of abstraction and generality are intriguing
<thelema>
but there's often a price to pay for them.
<thelema>
lorilan: if you need (x,y) and node, do "(x,y as node)"
<xenocons>
good point
<xenocons>
i wasted an entire day pointfreeing everything in my code :)
Submarine has quit [Ping timeout: 240 seconds]
<thelema>
this price isn't always in runtime efficiency, it's sometimes in readability and pointless code transformations...
<xenocons>
its pretty much a spiral down into OCD
<thelema>
:)
<thelema>
lorilan: also, instead of using loop () with a ref for openset, you can have openset be a parameter of loop.
<thelema>
lorilan: this means that instead of iterating across neighbors, you fold across them to build a new openset. This will feel wierd at first.
<thelema>
lorilan: as you don't use Exploration.heuristic, there's no reason for L92
<thelema>
gotta go, maybe more notes later.
smondet has quit [Remote host closed the connection]