ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
<Axle> lol, took longer than I expected. Couldn't copy-paste the camels
<Drup> ah, at least the message is short.
<Drup> I don't know enough about osx, sorry. you can try to get the sources and try to tweak it. You would then use opam pin. However, it may be a better idea to find what is missing your current install
<rgrinberg1> try $ brew install gdbm
<Drup> rgrinberg1: he said he did that already
<rgrinberg1> i'd try $ brew doctor then
<Axle> no problems detected by doctor
<Axle> find /usr | grep dbm outputs: /usr/lib/libdbm.dylib, /usr/local/include/gdbm.h, /usr/local/lib/libgdbm.a, /usr/local/lib/libgdbm.dylib, /usr/local/opt/gdbm among others
yminsky has quit [Quit: yminsky]
<Axle> hmm, looking at the configure script, it appears to only be looking in /usr/include
<Axle> rather than /usr/local/include
ontologiae has joined #ocaml
ptc_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Axle> further, the configure script is looking for ndbm.h, which homebrew doesn't appear to install, so adding /usr/local/include to the list of searched directories doesn't help
ptc has joined #ocaml
ptc is now known as Guest80045
yminsky has joined #ocaml
Guest80045 has quit [Ping timeout: 264 seconds]
yminsky has quit [Client Quit]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
enitiz has joined #ocaml
reem has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 245 seconds]
raphaelss has left #ocaml [#ocaml]
jao has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
reem has joined #ocaml
swgillespie has joined #ocaml
yminsky has joined #ocaml
mimrock has quit [Quit: This computer has gone to sleep]
<Axle> so, figured out the problem. the homebrew script needs an extra configure flag to generate the ndbm.h that camldbm is looking for. The camldbm package needs an addition to its configure script to look in /usr/local/include
<Axle> thanks for the help, folks
yminsky has quit [Quit: yminsky]
rand000 has quit [Quit: leaving]
<rgrinberg1> does `xxx == `xxx hold for any polymorphic variant?
reem_ has joined #ocaml
reem has quit [Ping timeout: 252 seconds]
<Drup> considering they are ints, yes.
mimrock has joined #ocaml
<rgrinberg1> oh yeah :D
<tcpc> :D
jao has quit [Ping timeout: 245 seconds]
andreypopp__ has quit [Quit: Connection closed for inactivity]
thomasga has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 245 seconds]
enitiz has quit [Quit: Leaving]
<Drup> ahahah xD
<Drup> you want to utf8ise it ? :)
<rgrinberg1> i have to.. otherwise merlin doesn't work
<Drup> you can't do it ? it would be easier
<rgrinberg1> actually, it is utf8 isn't it
<rgrinberg1> for some reason merlin thinks it's ascii
<Drup> s/merlin/vim/
<Drup> yep, already utf8
<rgrinberg1> vim :set encoding? -> utf-8
<Drup> I'm really surprised you have so much encoding-detection issues
<Drup> I have none whatsoever
mimrock has quit [Quit: This computer has gone to sleep]
reem_ has quit [Remote host closed the connection]
badkins has quit [Read error: Connection reset by peer]
badkins has joined #ocaml
badkins has quit [Client Quit]
<def`> rgrinberg1: and if you change the line to
<rgrinberg1> def`: fileencoding is blank for me :O
<def`> encoding = vim.eval("&fileencoding") or vim.eval("&encoding") or "ascii"
<rgrinberg1> i think that's more correct, let me tryi t
<rgrinberg1> def`: works!
<def`> good
<def`> thx!
darkf has joined #ocaml
<def`> not sure calling vim_encoding() for each line is an improvement though :)
<rgrinberg1> definitely isn't
reem has joined #ocaml
<rgrinberg1> fixed :D
reem has quit [Remote host closed the connection]
<def`> thx :) I will merge tomorrow. need some sleep now! bye
swgilles_ has joined #ocaml
<rgrinberg1> night :D
swgillespie has quit [Read error: Connection reset by peer]
yminsky has joined #ocaml
rgrinberg1 has quit [Quit: Leaving.]
antkong has joined #ocaml
enitiz has joined #ocaml
tg has quit [Ping timeout: 246 seconds]
sdegutis has joined #ocaml
<sdegutis> What makes OCaml particularly good at writing parsers?
tnguyen has joined #ocaml
antkong has quit [Ping timeout: 252 seconds]
yminsky has quit [Quit: yminsky]
sdegutis has quit [Quit: Leaving...]
tg has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
reem has joined #ocaml
yminsky has joined #ocaml
reem has quit [Remote host closed the connection]
struktured has joined #ocaml
marynate has joined #ocaml
yminsky has quit [Quit: yminsky]
yminsky has joined #ocaml
rgrinberg has joined #ocaml
<Axle> :/ is ocaml forge broken?
<Axle> I'm trying to set up an account and the email verification isn't working / wont let me login
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
<rgrinberg> ocamlforge still exists? :D
<Axle> I assume I need an account there in order to contribute to https://forge.ocamlcore.org/projects/camldbm/
<rgrinberg> is it a build system thing you want to edit?
<Drup> I think it will be the first contribution for years :D
<rgrinberg> seems like everyone is just hacking in patches in opam
yminsky has quit [Quit: yminsky]
<Axle> ooooohhhh, that makes sense
<Axle> also a little sad
<Drup> rgrinberg: it would not be a bad idea to move dbm and apply the patchs (with XL's approval, ofc)
<Axle> that makes things a lot easier though, thanks rgrinberg
<Axle> anyone know why ocsigen depends on it?
<rgrinberg> isn't it optional?
<rgrinberg> for session storage i believe
<Drup> what rgrinberg said. It's optional and it's for eliom references
<Drup> the other option is sqlite
<Drup> dbm is much more efficient, though
<rgrinberg> Drup: where's the lmdb backend :D
nullcat_ has joined #ocaml
<Axle> how do I toggle the option?
<Drup> Axle: just install sqlite
<Axle> hmm, how would I know that by using opam?
<Drup> "opam install sqlite3 eliom"
<rgrinberg> $ opam info ocsigenserver
<rgrinberg> should tell you the optional dependencies
<Axle> I see "(dbm | sqlite3)", gotcha
<Drup> rgrinberg: I don't plan on doing it, there is no point
<Drup> the lmdb binding, on the other hand, is waiting for free time
<Drup> (and assemblage =')
<rgrinberg> yeah i wasn't serious. lmdb seems to have more competitors now too
<rgrinberg> assemblage will be ready any day now
<Drup> well, that's not the point
<Drup> the main thing is that it's not mirage-compatible, and if I were to do a new ocsipersist backend, it would be for mirage
enitiz has quit [Ping timeout: 250 seconds]
BitPuffin has quit [Quit: See you on the dark side of the moon!]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Axle> why does mirage compatibility matter to you Drup?
<Axle> just curious
nullcat has joined #ocaml
q66 has quit [Quit: Leaving]
<rgrinberg> Drup: this module has such a nice ocamldoc and it's not even exported :O https://github.com/ocsigen/ocsigenserver/blob/master/src/extensions/ocsigen_comet.ml#L200
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<Drup> x)
<Drup> (I can't tell you anything about comet, I never looked at it :p)
<Axle> I haven't worked in ocaml code in like 5 years, so I'm not really up to date on what the community cares about.
<Axle> ran into mirageos the other day and thought it was really cool sounding, but couldn't tell if it was intended for serious use or was just an academic exercise
<Drup> it's intended for serious use :p
<Axle> you mentioned it, so I thought I'd ask about it.
<rgrinberg> yeah, it's more hassle than just using deploying on linux currently but it definitely works
<Axle> any of the other ocaml webservers run on it?
<Drup> Axle: cohttp
<Drup> (was pretty much made for it)
<rgrinberg> openmirage.org is self hosted on it
<Axle> I take it that cohttp is pretty low level?
<Axle> thus the desire to make ocsigen mirage compatible?
<Drup> and eliom :)
<Axle> I have to say, the ocaml community has gotten a ton better while I was away. opam is wonderful and ocamlbuild (which I didn't try back in the day) has mostly just worked
<Axle> haven't tried merlin yet, is it good?
<Axle> I use emacs
<Drup> merlin is great :D
<rgrinberg> yes
<rgrinberg> it's probably the biggest development in OCaml over your 5 year hiatus
<rgrinberg> ok maybe opam is first
<Axle> are people still using tuareg-mode?
<rgrinberg> actually, 1. assemblage 2. opam 3. merlin
<rgrinberg> Axle: is there an alternative?
<Axle> lol, I could have sworn there was weak ocaml-mode out there
<Axle> could be misremembering though
<Drup> rgrinberg: not yet assemblage, don't skin it before it's dead.
<Axle> http://www.emacswiki.org/emacs/CamlMode, this is what I was thinking of
<rgrinberg> Drup: bunzli told me it will be ready any day
<rgrinberg> now
<Drup> yay, I'm hearing that since september.
<Drup> yes*
keen__________56 has joined #ocaml
<Drup> I'm just saying, no point in getting pumped up over it before it's even there. Last timed I tried, it didn't even build on my system.
<rgrinberg> this is what's giving me all the confidence http://lists.xenproject.org/archives/html/mirageos-devel/2014-12/msg00025.html
keen__________55 has quit [Ping timeout: 240 seconds]
<Drup> I agree with this message.
<Axle> assemblage is intended as the one build tool to rule them all?
<Drup> yes
<Drup> rgrinberg: I'm wonder why it gives you confident, it says pretty much the opposite of what you said.
<Drup> confidence*
<rgrinberg> maybe we can speed up bunzli by irritating him with these rumours? ^_^
<whitequark> he'll just flame you to death
<whitequark> arguing with buenzli is like wrestlig in mud with a pig: after a while you realize the pig likes it a lot
<Drup> this comparison is fantastic xD
cdidd has quit [Remote host closed the connection]
<rgrinberg> Drup: do you think we can cherry pick this on master https://github.com/ocsigen/ocsigenserver/commit/830dededbadc74246a6322dac0e9b1f23e421d39
cdidd has joined #ocaml
<nullcat> lol
<Drup> rgrinberg: I'm pretty sure that's already done, and if not, yes
<Drup> there are lot's of thing to cherry pick
<rgrinberg> Someone needs to rebase that branch >_>
<Drup> oh yes.
<rgrinberg> Drup: i checked, that commit isn't in
zwer_o has joined #ocaml
<Drup> maybe not the exact commit, but check if something equivalent wasn't done
<rgrinberg> no, ocsigen_socket doesn't exist and ocsigen_server still depends on ocsigenserver_config
<Axle> is eliom similar to meteorjs?
zwer has quit [Ping timeout: 250 seconds]
<Drup> I ... was sure it was merged.
<Drup> I'll re-re-re-rebase that when I have time
<rgrinberg> and yeah this branch is so huge and messy
<rgrinberg> you really just have to chisel it away at the edges...
<Drup> rgrinberg: extensions-homogenization ? on the contrary, it doesn't do that many things, and I cleaned it up *A LOT*
<rgrinberg> no the cohttp branch
<Drup> Axle: you could say it like that, yes
<rgrinberg> is this branch closer to being merged https://github.com/ocsigen/ocsigenserver/pull/52
<nullcat> rgrinberg pull request created...
<Drup> except it's quite further along the road
<Axle> the client side is ocaml code run through js_of_ocaml, yes?
<rgrinberg> nullcat: thanks, avsm will review all the prs tomorrow
<Drup> Axle: yes
<Drup> rgrinberg: please re-read what I said :D
<Drup> (one of the issue is that dinosaure is playing a bit dead)
<rgrinberg> he's on exchange now right?
<Drup> right now, I don't know
<Drup> he was
<rgrinberg> so what's stopping this branch https://github.com/ocsigen/ocsigenserver/pull/52
<Drup> the last comment
<Drup> well, the last two
<Drup> and I kinda .. waited for dinosaure
anemator has joined #ocaml
anemator has quit [Client Quit]
<rgrinberg> I see. we need a new plan :D
<nullcat> rgrinberg can I help with this issue? https://github.com/mirage/ocaml-cohttp/issues/253ffff
<nullcat> ignore those fff...
<rgrinberg> pretty sure that one has been solved
<nullcat> sorry didn't read other pull requests...
<rgrinberg> you can review the existing PR's
<nullcat> yep i should
es917 has joined #ocaml
vodkaInferno has quit [Read error: Connection reset by peer]
vodkaInferno has joined #ocaml
Axle has quit [Read error: Connection reset by peer]
Axle has joined #ocaml
mfp has quit [Ping timeout: 245 seconds]
lyxia has quit [Ping timeout: 245 seconds]
lyxia has joined #ocaml
mfp has joined #ocaml
Pepe_ has quit [Ping timeout: 276 seconds]
Pepe_ has joined #ocaml
skinkitten has quit [Quit: Leaving]
reem has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
Axle has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
nullca___ has joined #ocaml
reem has quit [Remote host closed the connection]
nullcat has quit [Ping timeout: 245 seconds]
lostman has joined #ocaml
nullca___ has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ocaml
mcclurmc_ has quit [Read error: Connection reset by peer]
es917 has quit [Quit: es917]
<rgrinberg> Drup: i assume this is dead https://github.com/ocsigen/ocsigenserver/pull/34 :D
<rgrinberg> at least it taught dinosaure a valuable lesson "PS: I hate OASIS"
<rgrinberg> Drup: so ocsipersist hasn't been officially published and integrated to ocsigenserver right?
brendan has quit [Remote host closed the connection]
Thooms has joined #ocaml
reem has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
jave has quit [Ping timeout: 245 seconds]
ebzzry has quit []
ebzzry_ has joined #ocaml
AlexRussia_ has joined #ocaml
Kakadu has joined #ocaml
AlexRussia_ has quit [Quit: WeeChat 1.1-dev]
AlexRussia has joined #ocaml
slash^ has joined #ocaml
avsm has quit [Quit: Leaving.]
jao has quit [Ping timeout: 244 seconds]
badon has quit [Remote host closed the connection]
badon has joined #ocaml
ygrek has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Remote host closed the connection]
kalzz has quit [Ping timeout: 245 seconds]
zwer_o has quit []
MercurialAlchemi has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
badon has quit [Remote host closed the connection]
kalzz has joined #ocaml
psy_ has joined #ocaml
antkong has joined #ocaml
badon has joined #ocaml
jave has joined #ocaml
antkong has quit [Ping timeout: 255 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Remote host closed the connection]
Simn has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
araujo has joined #ocaml
araujo has joined #ocaml
brendan has joined #ocaml
reem has quit [Remote host closed the connection]
jeroud has quit [Read error: Connection reset by peer]
n1ftyn8 has quit [Ping timeout: 252 seconds]
leifw has quit [Ping timeout: 245 seconds]
msch has quit [Read error: Connection reset by peer]
jeroud has joined #ocaml
oskarth has quit [Read error: Connection reset by peer]
Sorella has quit [Read error: Connection reset by peer]
strmpnk has quit [Read error: Connection reset by peer]
msch has joined #ocaml
n1ftyn8 has joined #ocaml
Sorella has joined #ocaml
oskarth has joined #ocaml
strmpnk has joined #ocaml
leifw has joined #ocaml
ggole has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
reem has joined #ocaml
mort___ has quit [Quit: Leaving.]
psy_ has quit [Remote host closed the connection]
psy_ has joined #ocaml
swgilles_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marynate has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Quit: Leaving.]
strmpnk has quit [Ping timeout: 245 seconds]
oskarth has quit [Ping timeout: 245 seconds]
Sorella has quit [Read error: Connection reset by peer]
Sorella has joined #ocaml
strmpnk has joined #ocaml
oskarth has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody> how can I get opam to spit out the installation location of a package, or of a file in a package?
shinnya has quit [Ping timeout: 250 seconds]
reem has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
reem has joined #ocaml
ygrek has joined #ocaml
tane has joined #ocaml
Thooms has joined #ocaml
Anarchos has joined #ocaml
ontologiae has joined #ocaml
Thooms has quit [Ping timeout: 250 seconds]
slash^ has joined #ocaml
mimrock has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
rand000 has joined #ocaml
leowzukw has joined #ocaml
iorivur has quit [Ping timeout: 255 seconds]
Simn has quit [Ping timeout: 252 seconds]
mimrock has quit [Quit: This computer has gone to sleep]
ebzzry_ has quit [Remote host closed the connection]
mort___ has joined #ocaml
<MercurialAlchemi> SomeDamnBody: should be in your ~/.opam/$switch_name/lib, normally
<SomeDamnBody> oh I already found it
<SomeDamnBody> it was opam config env lib
ygrek has quit [Ping timeout: 245 seconds]
shinnya has joined #ocaml
iorivur has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
octachron has joined #ocaml
reem has quit [Remote host closed the connection]
SomeDamnBody has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 245 seconds]
diethyl has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
diethyl has joined #ocaml
octachron has quit [Quit: Leaving]
Thooms has joined #ocaml
pdewacht has quit [Ping timeout: 252 seconds]
darkf_ has joined #ocaml
<adrien> anyone know the standard compliance for "grep -v" ?
<adrien> cthuluh: ^ :)
darkf has quit [Ping timeout: 245 seconds]
darkf_ is now known as darkf
<adrien> it's SUSv2 so that's enough for me
<cthuluh> yup
<cthuluh> I don't remember about an implementation not supporting it, and I don't think you should care
<adrien> I was under the impression I had seen it categorized as a useless switch since the same can be done with sed very easily
<adrien> yup, I've raised the bar for which systems I care about
<adrien> since we can abandone OSes from the 80s
<adrien> abandon*
<cthuluh> "since the same can be done with sed very easily" isn't nearly a valid argument ;)
<cthuluh> crazy shit can be done with sed
<adrien> :D
<cthuluh> look at dc.sed from gnu sed
<adrien> "since the same can be done with emacs very easily" :)
<cthuluh> this troll would be easier to spot
<adrien> yeah, I wouldn't do that (*) but implementors have weird minds :)
<adrien> (*) I actually "env | sed -n '/foo/ p'" since grep says "binary input matches" and I never remember what is the switch to silence it
thomasga has joined #ocaml
<cthuluh> "INPUT FILES
<cthuluh> The input files shall be text files.
<cthuluh> "
<adrien> well, env is a bit special
<adrien> because the env vars can easily contain weird stuff
<adrien> I don't remember which variable triggers gnu grep's "this is a binary file, I won't print binary data
<adrien> "
<adrien> probably TERMCAP
<adrien> I hate the navigation on opengroup's website
<cthuluh> there are pdf and html dumps available, and some distros package posix manpages
<cthuluh> back to sys/kern/ hacking...
<adrien> :)
mort___ has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
<adrien> patch I'll send soon to the compiler: split ocamlbuild, ocamldoc and the debugger from the main build system
<adrien> there are a few other changes and this one has to be split into several commits
<adrien> if anyone feels like taking a look for now (the split version should be available in a few hours)
Simn has joined #ocaml
Kakadu has quit [Remote host closed the connection]
leowzukw has quit [Quit: Lost terminal]
leowzukw has joined #ocaml
Kakadu has joined #ocaml
iorivur has quit [Quit: No Ping reply in 180 seconds.]
iorivur has joined #ocaml
baz_ has joined #ocaml
thomasga has joined #ocaml
chinglish has joined #ocaml
yminsky has joined #ocaml
ygrek has joined #ocaml
thomasga has quit [Quit: Leaving.]
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
iorivur_ has joined #ocaml
iorivur has quit [Ping timeout: 245 seconds]
paolooo has joined #ocaml
Thooms has quit [Ping timeout: 250 seconds]
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
Kakadu has quit [Remote host closed the connection]
araujo has quit [Ping timeout: 264 seconds]
Thooms has joined #ocaml
Kakadu has joined #ocaml
paolooo has quit [Quit: Page closed]
destrius has joined #ocaml
yminsky has quit [Quit: yminsky]
Thooms has quit [Ping timeout: 250 seconds]
q66 has joined #ocaml
madroach has quit [Quit: leaving]
araujo has joined #ocaml
madroach has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
reem has joined #ocaml
PM has joined #ocaml
Axle has joined #ocaml
reem has quit [Ping timeout: 245 seconds]
skinkitten has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
Juxtin has joined #ocaml
Juxtin has left #ocaml [#ocaml]
yminsky has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
cdidd has quit [Remote host closed the connection]
tani has joined #ocaml
darkf has quit [Quit: Leaving]
tane has quit [Ping timeout: 246 seconds]
andreypopp__ has joined #ocaml
cdidd has joined #ocaml
yminsky has quit [Quit: yminsky]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
Haudegen has quit [Ping timeout: 246 seconds]
yminsky has joined #ocaml
Haudegen has joined #ocaml
thomasga has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
contempt has quit [Ping timeout: 264 seconds]
contempt has joined #ocaml
destrius has quit [Quit: Leaving.]
cdidd has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 250 seconds]
ontologiae has quit [Ping timeout: 250 seconds]
yminsky has quit [Quit: yminsky]
cdidd has joined #ocaml
<nicoo> cthuluh: Isn't GNU sed Turing-complete anyways?
<nicoo> adrien: Isn't it -q to silence grep ?
<mrvn> how do you loop?
<tokenrove> there are branch commands
<nicoo> mrvn: Labels and branches
<nicoo> adrien: Sorry, -q -s (--quiet --no-messages)
edith has joined #ocaml
yminsky has joined #ocaml
leowzukw_ has joined #ocaml
leowzukw has quit [Ping timeout: 246 seconds]
<ggole> Some guy wrote a ray tracer in sed
<ggole> Dunno how featureful it was though
Haudegen has quit [Ping timeout: 246 seconds]
<cthuluh> nicoo: google could have answered that question ;)
<cthuluh> (ok, the same could be told for grep -v ;)
<nicoo> cthuluh: adrien is a very lazy person
Haudegen has joined #ocaml
Thooms has joined #ocaml
<cthuluh> isn't he?
<cthuluh> good that he hl'd me, though; I should take a look at the state of native OCaml on powerpc
<tani> Btw: is there any community driven style guide?
<adrien> nicoo: who said anything about silencing grep?
<adrien> nicoo: it's not laziness: it's efficiency :P
<adrien> more seriously it's because cthuluh knows well what's outside of standards, much better than google-hive-mind
* cthuluh blushes
<adrien> :P
<Drup> (relevant user name, all that)
<Drup> tani: http://ocaml.org/learn/tutorials/ is pretty much that
<tani> alright, thanks
<Drup> but it's not a guide from end to end. Just on some specific things
<Drup> if you want something like that, there are several books.
<tani> my question would be.. if i have a function B which is only used in function A, would i define that function B inside of A, even if it doesn't reference variables in A (not a closure)
<Drup> define it outside
<tani> in haskell i'd use "where .." do increase readability
<tani> ok
<ggole> Define it outside unless there's a good reason
Axle has quit [Quit: Leaving.]
<tani> alright, thanks!
<adrien> well, actually I can't keep the "grep -v" stuff because the actual thing to do is slightly more complex
<Drup> (I'm of the opinion that "where" actually decrease readability, because it means that I have to go see what the where definition is about, then go back up to the code)
<adrien> like it's really different: it replaces some lines with empty ones in order to maintain line numbers
<tani> Drup, well, same if defined outside
<Drup> well, no, because then the definition is *before* the use
<Drup> I have a big issue with haskell's use before define.
<Drup> I find it really horrible for code comprehension
Thooms has quit [Ping timeout: 245 seconds]
SomeDamnBody has joined #ocaml
* MercurialAlchemi +1s Drup
<adrien> nicoo: and well, I can ask you too: what's pattern negation in awk? :)
<adrien> I have the following code and I'm not sure it's portable: echo 'a\nb\nc\nDEBUG\nd' | awk 'BEGIN { printf("# 1 foo\n"); } /DEBUG/ { printf("(* DEBUG statement removed *)\n"); } !/DEBUG/ { print $0; }'
<adrien> (that includes the test :) )
<adrien> as for why use awk: because it means less shell scripts and therefore better behavior on windows
Axle has joined #ocaml
madroach has quit [Quit: leaving]
pdewacht has joined #ocaml
<nicoo> Drup: let f = let helper arg = [...] in fun [...] is much better than where, in my opinion. Makes it clear that helper is only meant for f, and that you should read helper first
Anarchos has joined #ocaml
madroach has joined #ocaml
<Axle> hey all, what is the best json library to use, in your opinion?
<Drup> streaming or non streaming ?
<Axle> for use in conjunction with cohttp
<Drup> that doesn't really answer the question :D
<Drup> probably yojson :)
<Drup> (with ppx_deriving, possibly)
<Axle> thank oyu
yminsky has quit [Quit: yminsky]
<nicoo> adrien: !expr is in awk, according to IEEE 1003.1
* nicoo likes being (un)helpful, sometimes :3
<adrien> I had some doubts that /foo/ was an expression
andreypopp__ has quit [Quit: Connection closed for inactivity]
<cthuluh> "{ print $0; }" can be removed, it's the default (well, you could keep it, but I find it weird to use printf instead of print, then)
<cthuluh> I agree with nicoo's "let helper ... in"
<nicoo> I'm not sure it is. Expression patterns have a strange definition. I guess you can uglyfy and use '$0 !~ /foo/' but that's silly
<nicoo> cthuluh: Yay \o/
<cthuluh> ... but I would also add that given the amount of caml I write these days, my opinion should be taken with a grain of salt ;)
<adrien> nicoo: thought of that but ! /pattern/ works here and makes so much sense that I'd expect it to work
contempt has quit [Ping timeout: 245 seconds]
<adrien> cthuluh: if you don't do a lot of ocaml currently then your opinion about readability probably matters more ;-)
<adrien> cthuluh: ah, didn't know you could skip the part after /pattern/ but I find it looks weird without it
<cthuluh> both the expression and the statement can be omitted
<cthuluh> there are ##sed and #awk on freenode btw ;)
<adrien> language-specific channels scare me ever since I've heard of ##c :D
<adrien> but #awk should be quite useful, thanks, I wasn't expecting it
<adrien> (##sed probably not because standard sed usually doesn't have enough features for my needs)
<dmbaturin> adrien: What's wrong with ##c? Last time I visited it, it wasn't all that bad. :)
<cthuluh> as you want, but don't add unportable sed calls to ocaml or you'll hear me ;)
<adrien> cthuluh: that's why I don't want to add any sed call ;-)
<adrien> dmbaturin: well
<adrien> do you think that the ops on #ocaml do a good job?
<cthuluh> adrien has too much ego for ##c
<dmbaturin> If some function is never going to be partially applied, does it make sense to make it tupled rather than curried?
<adrien> cthuluh: as far as I know, moderation on ##c is awful
<Drup> dmbaturin: not particularly
<adrien> never read anyone speak positively of this channel
<dmbaturin> adrien: I've never seen ops using their op privileges here, so I think yes. ;)
<dmbaturin> (Or a situation when they should have done it)
<adrien> good, good :P
<adrien> as far as I know it's the opposite on ##c
<dmbaturin> Well, there are varying degrees or bad. After some other networks, virtually anything on freenode looks "not that bad". :)
<dmbaturin> * of
<adrien> heheh
yminsky has joined #ocaml
<dmbaturin> Drup: Are there any reasons not to make anything tupled?
leowzukw_ has quit [Ping timeout: 245 seconds]
<Drup> "f (x,y)"
<Drup> in the current compiler, this is not properly optimized
leowzukw has joined #ocaml
<Drup> so you will allocate a tuple and immediatly destroy it
<dmbaturin> Ah, this makes sense. So curried functions are not just as efficient as tupled, but actually more efficient?
<Drup> the only reason you would want to do that, is if you use your data tuples all the time and never the member by themselves
jonludlam has joined #ocaml
<Drup> which can happen ocasionally
cdidd has quit [Ping timeout: 245 seconds]
<ggole> Functions that take a single tuple are as efficient as the curried version when the function is called directly with known arguments
<ggole> I think there's an allocation for unknown applications
<jneen> hey all i'm trying to use ocamldebug to look into a stack overflow, and i'm having trouble printing values
<jneen> when i say like
<jneen> print c
<Drup> ggole: oh, the compile does at least that ? it's better than nothing :p
<jneen> (where c is a variable name in the current frame)
<jneen> it says "cannot load module Batteries.Printf"
Intensity has joined #ocaml
<ggole> Drup: yeah, I think it was catering for SML programmers
<jneen> my guess is some sort of load path shenanigans?
<jneen> i'm running it with ocamldebug ./path/to/executable
<jneen> is there some special oasis way i'm supposed to run this?
<Drup> jneen: ocamlfind ocamldebug --package batteries ?
<Drup> (completely wild guess)
<Drup> (otherwise, do it manually with -I)
<jneen> huh so
<jneen> does that mean i have to list every package manually on the command line?
<jneen> or is there some way to get that picked up from my oasis config
<Drup> I guess so, I never used ocamldebug more than for toy things, it's too annoying to use
<Drup> I'm pretty sure there is no oasis interaction :D
<ousado> ggole: but if the items that go into the tuple are available separately at the callsite, and the tuple has to be constructed for the call, that's one more allocation, no?
rand000 has joined #ocaml
<ggole> The tuple doesn't have to be constructed
<ggole> The calling convention is that such functions take the elements of the tuple in registers
<ousado> wow
<ousado> I've been worried about that here and there
<ggole> The *closures* of such functions have a special entry point that deconstructs a tuple, putting the elements in those registers, and then jumps to the function
<ggole> Called caml_tuplifyK
<ggole> So known calls use the fast path.
<Drup> ousado: I'm pretty sure that if you do "let x = (a,b) = f x", it will not be optimised. :D
<Drup> "in f x"*
<Drup> (or, maybe in this stupid case, but ...)
<ggole> Doesn't in 4.02.1
<ggole> The compiler is pretty poor at forwarding
<ggole> It does well at the reasonable cases though.
<Drup> but with flambda, soon™ !
<ggole> I wonder if I can stop manually lambda lifting in hot spots...
<ousado> if I understood correctly then c1 and c2 in: let c1 a b f = f a b (* versus *) let c2 (a,b) f = f a b (*called as *) c1 a b f (* versus *) c2 (a,b) f are equally efficient, right?
Hannibal_Smith has joined #ocaml
<ggole> My understanding is that tuplification is only done for functions that take a single argument that is a tuple.
thomasga has quit [Quit: Leaving.]
<ousado> Oh, I see
<Drup> (I read "tulipification". I wonder why ggole suddenly started to talk about flowers :O)
<ggole> Well, compilers and botany are pretty similar subjects...
cdidd has joined #ocaml
<ggole> Lots of classification.
<Drup> and you keep them growing by spraying water on them ?
<ggole> And they die in the spring when you least expect it.
Haudegen has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
ebzzry has joined #ocaml
<Anarchos> how old is this syntax :  let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")
<Drup> 4.01 ? I think
<Anarchos> so Module.(expr) means that Module is considered open inside of expr ?
<Drup> yes
AlexRussia has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ocaml
Guest80721 has joined #ocaml
<Guest80721> How are people writing modules like Foo.Bar where Bar is not another button but say like a string?
mort___ has joined #ocaml
<mrvn> module Bar = struct include String end
SomeDamnBody has quit [Ping timeout: 264 seconds]
yminsky has quit [Quit: yminsky]
<nicoo> Guest80721: I don't even understand the question but it seems mrvn does
<Guest80721> nicoo: for example, the multitude of all caps constants in the Curl module
<Drup> Curl.ALL_CAPS_CONSTANT ?
<nicoo> Guest80721: All caps cannot be values, unless they begin with _
The_Mad_Pirate has joined #ocaml
<Drup> nicoo: sure they can, constructors are values
<Guest80721> nicoo: Look at Curl.CURLPROTO_RTMP
<Guest80721> are all those all caps things in Curl just contractors?
<Guest80721> constructors*
<nicoo> Probably
* nicoo doesn't want to install curl here juste to check
rgrinberg has joined #ocaml
araujo has quit [Quit: Leaving]
<Drup> (05:50:54) rgrinberg: Drup: i assume this is dead https://github.com/ocsigen/ocsigenserver/pull/34 :D <- I'm pretty sure it is, yes
<Drup> about ocsipersist
<Drup> so, until now, it was inside ocsigen
<Drup> my plan is to split it out
<Drup> I put the code out, but I didn't (yet) integrated everything properly
<Drup> I'm probably going to do something smondet's thing
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
<rgrinberg> smondet's thing?
<rgrinberg> trakeva?
<Drup> I think that's the name
claudiuc_ has quit [Remote host closed the connection]
<rgrinberg> dinosaure2: you're alive!
claudiuc has quit [Ping timeout: 250 seconds]
<Drup> apparently he is :D
hilquias has joined #ocaml
<Anarchos> Drup i would like to evangelize ocsigen at work. How to convince them it is better thant node.js or tomcat java servers ?
Guest80721 has quit [Ping timeout: 246 seconds]
contempt has joined #ocaml
<Drup> That's a very good question
<Drup> I'm still wondering what arguments to give to this kind of person
<Drup> easy concurrency without callback hell is sometimes a very strong argument
edith has quit [Ping timeout: 250 seconds]
<Drup> verified client/server communication, too
<Drup> (compared to java, especially)
<rgrinberg> Anarchos: do you mean ocsigen, just the server? or the framework?
<rgrinberg> kind of unfair to compare the whole thing to tomcat for example
<Anarchos> rgrinberg the framework
<Drup> (js programmers don't care about verification, or they wouldn't write javascript in the first place)
<rgrinberg> Anarchos: so what java framework do you use?
<rgrinberg> b/c on a server to server basis i'd say tomcat > ocsigenserver :D
<Anarchos> rgrinberg j2ee essentially : struts/jsp/beans and so on
<rgrinberg> oh
<rgrinberg> anything is better than that...
AlexRussia has quit [Quit: WeeChat 1.1-dev]
<Anarchos> rgrinberg not for computer services company here it seems.... J2EE is there only horizon line :/
AlexRussia has joined #ocaml
<Drup> rgrinberg: you mean performance wise, or something else ?
Tamae has joined #ocaml
<rgrinberg> for a server I suppose performance matters the most
<Drup> ok
<rgrinberg> unless ocsigenserver has some secret features that tomcat doesn't
<rgrinberg> (aside from running eliom)
Stany has quit [Ping timeout: 255 seconds]
<Drup> I don't know tomcat, so can't answer that :)
<rgrinberg> Drup: actually, I've looked at ocsigenserver closely last night and I kind of don't understand the point of half the extensions
<rgrinberg> e.g. staticmod
AlexRussia has quit [Quit: WeeChat 1.1-dev]
<rgrinberg> aren't you going to run the server behind nginx anyway?
<dmbaturin> I bet ocsigen can't be a servlet container. :)
<Drup> rgrinberg: well, you don't *have* to
<Drup> rgrinberg: but don't worry, I don't either
<rgrinberg> maybe you don't have to, but nginx is simply much better at it
<rgrinberg> especially things like cgi
<Drup> rgrinberg: when I said web servers are not my forte, I'm not kidding, I know how it works, but I don't know the details of implementation and/or administration, and tbh, I'm not really interested. :p
leowzukw has quit [Quit: Lost terminal]
<Drup> I'm pushing ocsigen-mirage because nobody else do =')
<rgrinberg> well if you deploy an eliom app on linux, make sure it's behind nginx anyway :O
<rgrinberg> until the mirage gods grace us
<Drup> yeah
<rgrinberg> on the other hand, there's some things there that give me a chuckle
<rgrinberg> scroll to the examples
<Drup> why ?
mort___ has quit [Quit: Leaving.]
<Drup> Konqueror ? :)
<rgrinberg> conditionals in xml
<Drup> ah
<Drup> yes.
<dmbaturin> Mirage only runs on Xen PV by design?
<ousado> rgrinberg: I'm not sure, what's so great about tomcat?
<Drup> ousado: people cared enough to optimize it
<rgrinberg> ousado: it's battle tested i suppose
Haudegen has quit [Ping timeout: 245 seconds]
<ousado> usually (at least before that async servlet stuff was bolted on) tomcat is used as a threaded synchronous server
Haudegen has joined #ocaml
<rgrinberg> Drup: would it be crazy to try and run eliom directly on cohttp?
<Drup> rgrinberg: that's sort of the whole point of this huge PR, you know :D
<rgrinberg> i mean without ocsigenserver
<Drup> ah
<Drup> err, there is ... several things in between
<Drup> there are*
thomasga has joined #ocaml
<Drup> comet, session, cookies, things like that
antkong has joined #ocaml
<rgrinberg> yeah but it seems like it's easier to just rip out or implement those parts
<rgrinberg> at least possibly
<Drup> I'm ... not so sure
<Drup> and asserting the corectness of the glue in the middle would be much harder if you start back from scratch
<adrien> gasche: MSVC still isn't C99; however it is becoming C99-compliant
<adrien> gasche: meaning that depending on your version you will get varying results
<adrien> gasche: I heard Windows was simpler and with fewer variants :]
<rgrinberg> Drup: on the plus side, you don't have to assert correctness on the myriad extensions that you don't use
<Drup> err, no, you can't break the setup of everyone using ocsigenserver
<rgrinberg> well the point isn't to break the old setup, but to provide an alternative to running without ocsigenserver
<Drup> sorry rgrinberg, that's literally out of the question. deprecating is ok, but just droping is not
<Drup> I just don't believe you will manage to do that
yminsky has joined #ocaml
<Drup> in any cases, it means two ocsigen implementation basically and we already lack manpower to maintain one
AlexRussia has joined #ocaml
<Drup> it's just shooting ourselves in the foot
<Drup> I'm all for cleaning up ocsigenserver, but droping everyting and proposing a replacement is, I think, a rather bad idea
<Drup> (also, the cohttp branch already removes tons of code)
<Drup> as ugly as this branch is, it is the "right way" of doing it, regardless of the actual realization, which might be debatable
<rgrinberg> ok i'm convinced :D
slash^ has quit [Read error: Connection reset by peer]
<Drup> =)
slash^ has joined #ocaml
<adrien> gasche, whitequark : I have changes that will conflict with #6266
AlexRussia has quit [Remote host closed the connection]
AlexRussia has joined #ocaml
<whitequark> siiiiiiiigh
<whitequark> how about you integrate #6266? :p
<adrien> well, my changes split ocamlbuild, ocamldoc and ocamldebug from the regular build
<companion_cube> \o/
<adrien> and also remove their Makefile.nt files
<whitequark> will you put those changes into 4.02 branch?
<adrien> mine? definitely not
<adrien> the thing is that if compiler hackers are not already building with -no-debugger -no-ocamlbuild -no-ocamldoc for their day-to-day coding, they'll probably not want these changes quickly
<adrien> plus it has an impact on packaging
<adrien> for the better I'd say but you don't change packaging in a minor release :)
<adrien> packagers tend to be psychotic people with murderer tendencies, it's too dangerous
NoNNaN has joined #ocaml
<whitequark> ok, then i think you should rebase those after 6266 gets integrated
edith has joined #ocaml
<adrien> yup
<adrien> feedback from packagers welcome ^
vanila has joined #ocaml
edith has quit [Ping timeout: 250 seconds]
Algebr has joined #ocaml
Thooms has joined #ocaml
psy_ has quit [Ping timeout: 245 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
ebzzry has quit [Remote host closed the connection]
Haudegen has joined #ocaml
yminsky has quit [Quit: yminsky]
Axle has quit [Quit: Leaving.]
yminsky has joined #ocaml
NoNNaN has quit [*.net *.split]
badon has quit [*.net *.split]
nicoo has quit [*.net *.split]
slash^ has quit [Read error: Connection reset by peer]
bytbox has quit [Remote host closed the connection]
swgillespie has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Client Quit]
AlexRussia has quit [Remote host closed the connection]
skinkitten has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Client Quit]
yminsky has quit [Quit: yminsky]
ggole has quit []
mistym has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
AlexRussia has joined #ocaml
yminsky has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Thooms has quit [Ping timeout: 245 seconds]
antkong has quit [Ping timeout: 245 seconds]
Thooms has joined #ocaml
<Algebr> Can I use ocamlfind to somehow give a module and it tells me what package it belongs to?
<Drup> unfortunatly, not at the moment
<mrvn> that would require scanning all packages till the module is found
mistym has joined #ocaml
yminsky has quit [Quit: yminsky]
iorivur_ has quit [Ping timeout: 246 seconds]
skinkitten has joined #ocaml
Kakadu has quit [Remote host closed the connection]
<Algebr> say you have something like let () = Foo.a () in let () = Bar.b (). Is ; just sugar/shortcut? Could the previous be simply done as Foo.a (); Bar.b ()
ontologiae has joined #ocaml
tani has quit [Quit: Verlassend]
brendan has quit [Remote host closed the connection]
<Drup> except your first version is incorrect, you need "in ..." at the end
<Drup> or no let at all
<Drup> but yes, it's mostly equivalent
<Drup> the main different is that with ";", ocaml will only warn about non-unit result
<Drup> (that can be changed by turning the relevant warning into an error)
enitiz has joined #ocaml
yminsky has joined #ocaml
baz_ has quit [Quit: . . .. ... ..... ........]
thomasga has quit [Quit: Leaving.]
baz_ has joined #ocaml
mimrock has joined #ocaml
yminsky has quit [Quit: yminsky]
yminsky has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
jabesed has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
rgrinberg has joined #ocaml
bytbox has joined #ocaml
yminsky has quit [Quit: yminsky]
RossJH has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Anarchos has joined #ocaml
martintrojer has quit [Read error: Connection reset by peer]
martintrojer has joined #ocaml
swgillespie has joined #ocaml
Axle has joined #ocaml
antkong has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
araujo has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
Algebr has quit [Ping timeout: 244 seconds]
pdewacht has quit [Read error: Connection reset by peer]
yminsky has joined #ocaml
Rebelion has joined #ocaml
mcc has joined #ocaml
pdewacht has joined #ocaml
yminsky has quit [Quit: yminsky]
swgillespie has joined #ocaml
<mcc> hellos... so here is a thing i want to do. i want to take a path specification in argv (either item 0, the executable, or one fo the arguments) and get the full path to it.
<mcc> however, i can't just join the item to Sys.getcwd, because it might be a symlink.
<mcc> Is there a way to get the true full path of a file from inside ocaml?
<adrien> Unix.readlink
<Drup> hi mcc
<mcc> hi drup
<Drup> how is emily doing ? :p
<mcc> adrien: I guess the implication is i can't do this on Windows? :(
<mcc> drup, i released 0.1 if you saw, and i'm working on 0.2, which i guess the primary feature of is that it will have something like a standard library and the reader features will not be hardwired.
<Drup> sure I saw, I pointed you to the reddit discussion :D
<mcc> you did! i remember now.
<mcc> actually, wait, there's no equivalent of readlink on windows because this is not a problem windows has.
<Drup> mcc: I though a bit about the newline issue, and my conclusion is "for now, let's just have something not automatic"
<mcc> drup: i forget which issue that was!
<Drup> sedlex :p
<mcc> oh! yes.
<mcc> i think that's good advice. i don't have a better solution.
<mcc> drup: at some point i will try to get back to my sedlex patch. i have sort of done no work in the last week or two.
<mcc> my girlfriend went back to canada ;_;
<Drup> same here, on the work amount, but for teaching reasons. =p
<mcc> that sounds less depressing! ^_^
<adrien> mcc: "windows symlinks" are not posix symlinks
<adrien> also
<Drup> well, it sort of is, because I don't have time to work, but still
<adrien> you have my very special permission to refuse to handle windows symlinks
<adrien> they're completely unusable
enitiz has quit [Ping timeout: 246 seconds]
<adrien> also
<adrien> Unix module works on Windows the same at 95%
<mcc> oh good
araujo has quit [Quit: Leaving]
<mcc> so what would Unix.readlink do on Windows? a noop at worst?
* Drup gives to mcc an "adrien's stamp of approval"
SomeDamnBody has joined #ocaml
<mcc> i mean— i don't need to try to be careful to not access the Unix module from a win compile?
<mcc> If anyone complains I'll just be like "no, it's cool, adrien said it was ok"
<whitequark> Unix_error
<whitequark> if an operation is not supported
<whitequark> it's kind of perverse how you need to pervasively use Unix on win32
<mcc> is there documentation of which operations are Unix_error on windows?
<mcc> drup: cool
<adrien> 23:58 mcc : so what would Unix.readlink do on Windows? a noop at worst?
<adrien> raise a not-implemented exception
<adrien> well, too slow, bedtime
<mcc> thanks for the clarifications
<mcc> and would i be correct that there is no way to get a "full path" more sensible than getcwd ^ relative-path? It doesn't look like there's a path "normalizer" anywhere in the stdlib?
<adrien> I should write somewhere the reasosn windows "symlinks" are crap
<adrien> mcc: not in the stdlib, no
<mcc> 'k
<mcc> i think anyone who's ever attempted to use the windows symlinks will already understand the problems with them D:
<mcc> but i suppose such a link woudl be useful if anyone ever comes around asking if they could use them to solve a problem.
Algebr has joined #ocaml
enitiz has joined #ocaml
mimrock has quit [Quit: This computer has gone to sleep]
Simn has quit [Quit: Leaving]
mimrock has joined #ocaml
<mcc> Oh… kay… one more question. I use add some calls to Unix. I get the error: No implementations provided for the following modules: Unix.
<mcc> I add package(unix) to my _tags file. suddenly, ocamlfind finds Unix just fine.
<mcc> Unix is just straight up listed in http://caml.inria.fr/pub/docs/manual-ocaml/libref/ . Next to things like "List". Why is it I did not have to specify I used List, but I did need to specify Unix?
<thizanne> because some of the standard modules are not automatically loaded
<thizanne> namely at least Unix and Str, and I don't remember others
<thizanne> (bigarray ?)
<Drup> Bigarray yes, and Num/Bigint
<Drup> and Thread
<mcc> ok
<mcc> oh no
<mcc> so Unix.readlink is just an implementation of readlink(2), right? I can't just sanitize a path with it. I need to know ahead of time the file is a symlink? :O
<whitequark> yeah
<whitequark> lstat
<Drup> (you might be interested by fileutils)
<mcc> drup: it looks very nice... what guarantees does it make about what happens when you run it on win32? :O
<Drup> no idea, you'll need to ask adrien.
ontologiae has quit [Ping timeout: 250 seconds]
reem has joined #ocaml
<mcc> oh, adrien wrote it
<mcc> well i will wait for him to come back then :)
<Drup> he didn't wrote it, but I know he used it
<mcc> ok
<mcc> whitequark: i don't suppose you remember which error code (EUNKNOWNERR, etc) that calling a non-win32 function from the Unix module on win32 would result in?
badon has joined #ocaml
struktured has joined #ocaml
Algebr has quit [Ping timeout: 244 seconds]
<whitequark> mcc: Invalid_argument actually
<whitequark> I looked in the source
<mcc> Thanks. so that's a different exception from Unix_error?
<whitequark> yeah
<whitequark> I was wrong initially
AltGr has joined #ocaml
yminsky has joined #ocaml
rgrinberg has joined #ocaml
brendan has joined #ocaml
<mcc> At any rate, i'm realizing readlink(2) does not do at all what i expected, and links to the "contents" of the symlink
<mcc> i.e. if /path/to/symlink -> otherdir, the result is "otherdir" not "/path/to/otherdir"
<mcc> ...uh
<mcc> ...maybe i'll check out what fileutil does for me
<whitequark> um, yeah, readlink literally reads the link
<whitequark> if you made it as ln -s otherdir /path/to/symlink, it'll return "otherdir"
<mcc> this is a thing i did not know this morning but know now :(
<whitequark> if you made it as ln -s /path/to/otherdir, then /path/to/otherdir
<whitequark> ok
<mrvn> canonicalize_file_name - return the canonicalized absolute pathname
<mcc> mrvn: that's beautiful, what is that from?
<mrvn> just add a binding for it
<mrvn> CANONICALIZE_FILE_NAME(3) Linux Programmer's Manual CANONICALIZE_FILE_NAME(3)
<mrvn> #define _GNU_SOURCE /* See feature_test_macros(7) */
<whitequark> that's glibc...
<mcc> mrvn: sounds great, but i do not find any such function in the mac os manual.
jonludlam has quit [Quit: Coyote finally caught me]
<mrvn> there is also: realpath - return the canonicalized absolute pathname
<mcc> ooo, that i do have
<mrvn> 4.4BSD, POSIX.1-2001.
<whitequark> extunix has realpath
<whitequark> opam install extunix.
<mcc> i will keep that one in mind thank you
<mcc> the fileutils project page says "only Win32 and POSIX compatible". are there examples of platforms ocaml supports which do not fall into the category of either "win32" or "posix"?
<whitequark> don't think so
rand000 has quit [Quit: leaving]
<mcc> 'k
thomasga has joined #ocaml
<mcc> some of the documentation around fileutils indicates someone who is much better at English than I am at French, but still not quite 100% fluent...
baz_ has quit [Quit: baz_]