flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
mcclurmc has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
<wlhlm> close
<wlhlm> sorry, mistyped irc command.
wlhlm has left #ocaml []
talzeus has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
skchrko has quit [Quit: Leaving]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
kyrylo has quit [Ping timeout: 246 seconds]
Arzaga has joined #ocaml
dsheets has quit [Read error: Operation timed out]
Xenasis has quit [Remote host closed the connection]
ollehar1 has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
manizzle has quit [Remote host closed the connection]
Arzaga has quit [Quit: Computer has gone to sleep.]
Arzaga has joined #ocaml
ygrek_ has quit [Ping timeout: 265 seconds]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
mcclurmc has joined #ocaml
breakds has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
watermind has quit [Quit: Konversation terminated!]
ollehar has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest30066
ygrek_ has joined #ocaml
manizzle has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
kizzx2 has joined #ocaml
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
breakds has quit [Quit: Konversation terminated!]
ollehar has quit [Ping timeout: 245 seconds]
TDJACR has quit [Ping timeout: 245 seconds]
TDJACR has joined #ocaml
osa1 has quit [Ping timeout: 240 seconds]
michael_lee has joined #ocaml
strobegen has joined #ocaml
mye_ has joined #ocaml
mye has quit [Ping timeout: 245 seconds]
mye_ is now known as mye
justdit has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
justdit has joined #ocaml
justdit has quit [Ping timeout: 252 seconds]
justdit has joined #ocaml
ggole has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
willy_ has joined #ocaml
Arzaga has joined #ocaml
Asmadeus has quit [Quit: I will be baaaack!]
Asmadeus_ has joined #ocaml
ygrek_ has quit [Ping timeout: 245 seconds]
Asmadeus_ is now known as Asmadeus
wormphlegm has quit [Quit: leaving]
Guest30066 has quit [Remote host closed the connection]
willy_ has quit [Remote host closed the connection]
Neros has quit [Ping timeout: 252 seconds]
ygrek_ has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest86881
Guest86881 has quit [Ping timeout: 260 seconds]
robink has quit [Quit: No Ping reply in 180 seconds.]
robink has joined #ocaml
mye has quit [Quit: mye]
robink has quit [Quit: No Ping reply in 180 seconds.]
robink has joined #ocaml
ttamttam has joined #ocaml
snyp has joined #ocaml
mye has joined #ocaml
wolfnn has joined #ocaml
Kakadu has joined #ocaml
snyp has quit [Quit: leaving]
cago has joined #ocaml
mika1 has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
wolfnn has quit [Ping timeout: 245 seconds]
AltGr has joined #ocaml
Arzaga has joined #ocaml
hto has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
hto has joined #ocaml
Yoric has joined #ocaml
zpe has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 252 seconds]
Neros has quit [Ping timeout: 245 seconds]
michael_lee has quit [Quit: Ex-Chat]
Arzaga has quit [Quit: Computer has gone to sleep.]
Neros has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest14734
Kakadu has quit [Ping timeout: 265 seconds]
kyrylo has joined #ocaml
Guest14734 has quit [Ping timeout: 246 seconds]
hto has quit [Ping timeout: 246 seconds]
nikki93 has joined #ocaml
robink has quit [Quit: No Ping reply in 180 seconds.]
robink has joined #ocaml
hto has joined #ocaml
djcoin has joined #ocaml
thomasga has joined #ocaml
michael_lee has joined #ocaml
Simn has joined #ocaml
thomasga has quit [Quit: Leaving.]
csakatoku has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
manud has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
manud has joined #ocaml
<gasche> adrien: looks ok, I made a couple formulation changes
<gasche> jpdeplaix: going fine (but not finished yet)
n0v has quit [Ping timeout: 272 seconds]
n0v has joined #ocaml
justdit has quit [Ping timeout: 245 seconds]
Yoric has quit [Ping timeout: 245 seconds]
ggole has quit [Ping timeout: 272 seconds]
mye has quit [Quit: mye]
<jpdeplaix> gasche: :/ They need it for today
<jpdeplaix> (before 16h)
<adrien_oww> gasche: thanks; I already sent it but I can still change things until fosdem prints on paper
<adrien_oww> (if I can do the talk that is :P )
ggole has joined #ocaml
skchrko has joined #ocaml
rossberg has joined #ocaml
justdit has joined #ocaml
pminten has joined #ocaml
_andre has joined #ocaml
jonludlam has joined #ocaml
justdit has quit [Ping timeout: 240 seconds]
peregrin_ has joined #ocaml
sepp2k has joined #ocaml
kyrylo has quit [Quit: WeeChat 0.4.2]
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
avsm has joined #ocaml
thomasga has joined #ocaml
cesar_ has joined #ocaml
nikki93 has quit [Remote host closed the connection]
cesar_ is now known as Guest93966
csakatoku has quit [Ping timeout: 240 seconds]
peregrin_ has quit [Ping timeout: 250 seconds]
Guest93966 has quit [Ping timeout: 252 seconds]
q66_ has joined #ocaml
<jpdeplaix> whitequark: can you ask for a merge of the ocaml directory in release_34 ? :)
q66 has quit [Disconnected by services]
q66_ is now known as q66
Kakadu has joined #ocaml
csakatoku has joined #ocaml
ontologiae_ has joined #ocaml
jonludlam has quit [Ping timeout: 245 seconds]
Neros has quit [Ping timeout: 245 seconds]
Yoric has joined #ocaml
kyrylo has joined #ocaml
justdit has joined #ocaml
justdit_ has joined #ocaml
csakatok_ has joined #ocaml
justdit has quit [Ping timeout: 240 seconds]
ygrek_ has quit [Ping timeout: 252 seconds]
hto has quit [Ping timeout: 245 seconds]
csakatoku has quit [Ping timeout: 272 seconds]
jonludlam has joined #ocaml
Kakadu_ has joined #ocaml
Kakadu has quit [Ping timeout: 250 seconds]
pminten has quit [Remote host closed the connection]
Neros has joined #ocaml
rand000 has joined #ocaml
peregrin_ has joined #ocaml
BitPuffin has joined #ocaml
Xenasis has joined #ocaml
darkf_ has joined #ocaml
milosn_ has quit [Ping timeout: 272 seconds]
robink has quit [Ping timeout: 240 seconds]
esden has quit [Ping timeout: 240 seconds]
ggherdov has quit [Ping timeout: 240 seconds]
bitbckt has quit [Ping timeout: 240 seconds]
bitbckt has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
rossberg has quit [Ping timeout: 240 seconds]
darkf has quit [Ping timeout: 240 seconds]
rossberg has joined #ocaml
Yoric has joined #ocaml
esden has joined #ocaml
robink has joined #ocaml
thomasga has quit [Quit: Leaving.]
milosn has joined #ocaml
ggherdov has joined #ocaml
ontologiae_ has quit [Ping timeout: 245 seconds]
kizzx2 has quit [Quit: Leaving.]
kyrylo has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 246 seconds]
csakatoku has joined #ocaml
zxqdms has quit [Quit: leaving]
osa1 has joined #ocaml
BitPuffin has quit [Ping timeout: 245 seconds]
csakatoku has quit [Ping timeout: 246 seconds]
Xenasis has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
talzeus has quit [Remote host closed the connection]
justdit_ has quit [Quit: Lost terminal]
cesar_ has joined #ocaml
cesar_ is now known as Guest11932
osa1 has quit [Ping timeout: 246 seconds]
Guest11932 has quit [Ping timeout: 272 seconds]
osa1 has joined #ocaml
Kakadu_ has quit [Ping timeout: 250 seconds]
rand000 has joined #ocaml
hto has joined #ocaml
ollehar has joined #ocaml
rand000 has quit [Ping timeout: 248 seconds]
pminten has joined #ocaml
talzeus has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
darkf_ has quit [Quit: Leaving]
rand000 has joined #ocaml
yacks has joined #ocaml
peregrin_ has quit [Ping timeout: 250 seconds]
Kakadu has joined #ocaml
mcclurmc has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Remote host closed the connection]
<gasche> avsm: OPAM taken as an example of community-distributed package curation https://groups.google.com/forum/?fromgroups#!topic/elm-discuss/aUTPcNwbqE0
<gasche> (I think the original poster went to far in interpreting opam's pull requests; they only curate packaging information, not the code itself)
<gasche> *too
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 248 seconds]
thomasga has joined #ocaml
osa1 has quit [Ping timeout: 260 seconds]
osa1_ has joined #ocaml
<avsm> gasche: there's more curation in some remotes, such as the xapi-project (where new updates get peered at by the architects before being merged)
pminten has quit [Remote host closed the connection]
cesar_ has joined #ocaml
cesar_ is now known as Guest23215
Arzaga has joined #ocaml
electronplusplus has joined #ocaml
<electronplusplus> Hi, what's the complexity of pattern matching in ocaml?
Guest23215 has quit [Ping timeout: 240 seconds]
<companion_cube> electronplusplus: it's pretty efficient, in most cases
<electronplusplus> O(n +m)?
<Drup> what is n and m ?
<electronplusplus> DFS search, n is numbers of nodes and m the number of edges.
<Drup> are we still talking about pattern matching ? :|
<electronplusplus> yes, I want to know how it's implemented in ocaml.
<Drup> pattern matching are compiled statically to a long jump in assembly
<companion_cube> or nested tests
<Drup> constructors are just ints
djcoin has quit [Quit: WeeChat 0.4.1]
rand000 has joined #ocaml
osa1_ is now known as osa1
q66_ has joined #ocaml
q66 has quit [Disconnected by services]
q66_ is now known as q66
mcclurmc_ has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
<gasche> I hoped Batteries would turn out into a large-but-not-too-much repository of *collectively maintained* code of general utility
<sgnb> what do people mean by "curation"?
<gasche> sgnb: maintaining some quality standards
<gasche> as opposed to only "exposing what exists"
<gasche> I think my Batteries views are reasonably fullfilled, but we could see a bit more activity than there is today
<sgnb> ah, ok
t0yv0 has joined #ocaml
ygrek_ has joined #ocaml
<gasche> with the wide acceptance of decent package managment tools, I think we could extend collective maintenance to set of loosely-dependent packages
<sgnb> funny that's the first time I see this word used in this context
<Drup> gasche: I think i would preferer a more separated batteries indeed
<gasche> sgnb: it comes directly from Latin where officials were in charge of maintenance of services
<gasche> (where => in the Roman empire)
<Drup> gasche: in particular a smaller version, without unix dependencies
<gasche> yeah; but I was not merely talking about Batteries-the-software as it exists now
<companion_cube> you mean that batteries would be a set of repo/projects?
Arzaga has joined #ocaml
<gasche> I think this vision coincides with "the OCaml platform" in important ways
<adrien_oww> "OCaml platform" sounds way too much like "SDK" to my tastes
<adrien_oww> I'm quite scared of splitting libraries into smaller ones only to force gluing them together again
paolooo has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
pminten has joined #ocaml
talzeus has joined #ocaml
Kakadu_ has joined #ocaml
travisbrady has joined #ocaml
Neros has joined #ocaml
rand000 has quit [Ping timeout: 260 seconds]
cago has quit [Ping timeout: 240 seconds]
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
mcclurmc_ is now known as mcclurmc
<AltGr> fun fact: using the `or` operator triggers the "deprecated" warning
<AltGr> but you can still redefine it without warning (let (or) x y = ...)
rand000 has joined #ocaml
<sgnb> also, the warning is still there even if ( || ) has been redefined to something completement different
<ggole> You can bind all sorts of fun stuff
<sgnb> making the suggestion plain wrong
<ggole> type this_is_a_bad_idea = ::
<gasche> |
<gasche> hm
<gasche> || is a keyword as per the OCaml manual
<gasche> rebinding it is a Bad Idea
talzeus has quit [Ping timeout: 246 seconds]
<gasche> (the implementation doesn't complain about that, and maybe should)
<ggole> It is suspicious, since || is not really a function anyway
<Drup> gasche: I think it's fine, you can rebind it inside a module to do a mini-DSL
<gasche> the order of evaluation will depend on whether it has been rebound
<Drup> oh, maybe there is the short circuit issue, yeah
<gasche> I get your point Drup, but I would still avoid that
<ggole> (||) a b won't short circuit, too (iirc)
<sgnb> gasche: where do you see that?
<gasche> if (or) hadn't been (rather annoyingly) reserved as an infix identifier, I think or (as an usual function, not infix) would be a reasonable choice for a DSL
<ggole> No, that's wrong. It will short circuit.
<ggole> What's the history behind that, anyway? Did and and or used to be the boolean ops before 'and' was added to the language as a keyword?
<gasche> I don't know
rand000 has quit [Ping timeout: 248 seconds]
<sgnb> but there is nothing else with similar priority level
<sgnb> how sad
<gasche> SML has 'andalso' and 'orelse'
<gasche> (which are explained by their desugaring into if-expressions)
Arzaga has quit [Quit: Computer has gone to sleep.]
<sgnb> for some reason, other '|...' have different priority which annoyed me when I tried to get rid of deprecated operators in Coq
<Drup> gasche: It would still be super cool to have a bit more liberty on the operator side, but I do understand the limitation, especially after coding in haskell
<ggole> I find funky operators tend to impede understanding
<Drup> ggole: I agree
<ggole> After a lifetime of practice, my brain is rather good at recognising words and word fragments, and terrible at recognising random sequences of !@#$%^
<Drup> you have to find a good balance between "have simple operators" and "allow to build interesting dsl"
<ggole> The built-in ones are ok since you see them absolutely all the time, I think
<ggole> Yeah, taste is a difficult thing
<Drup> ggole: did you do any haskell or scala ? :D
<Drup> (or worse, Agda)
<ggole> A bit of Haskell. Scala looks a bit, uh, ornate.
<ggole> So I haven't played with it yet.
<ggole> (Funny how aesthetics play such a large role in technology.)
<Drup> haskellish people like funky operators a lot, they put them everywhere and most of the time, without any rules. Since they don't have local open, it's mostly a disaster.
baz_ has joined #ocaml
<ggole> So you get to guess which definition of ^^^ it is this time?
<Drup> preciselly, and you get to guess the priority and the associativity too
<ggole> Oh right, those are configurable in Haskell. I forgot that.
<Drup> In scala, 1) you can use arbitrary utf8 chars in identifiers 2) you can "detach" the method of the object : "3 + 2" is in fact suggar for "3.+ 2"
<ggole> And people use that all the time?
<Drup> In agda, you can declare arbitrary mixfix operators with utf8 char, but you have to put spaces everywhere, in order not to confuse the parser
<Drup> (hence, you can declare if_then_else_ as a mixfix for example, it's not an issue)
<Drup> ggole: afaik, yes, they do.
<ggole> :(
<Drup> the good point is that you can have super integrated and very cool DSL
<ggole> Sometimes I think Lisp is the only language to get it right
* sgnb too
<ggole> But of course people hate the parens
<Drup> I have no issue with parens in the long run
<Drup> but I do hate the (non-existent) type system.
<ggole> That could probably be fixed
<sgnb> there is ocaml with lisp syntax...
<ggole> There's things like Qi, and Typed Racket
<sgnb> in camlp5 at least, I don't know if it was kept in the new camlp4
<sgnb> pa_scheme
<sgnb> as in http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/camlp5.git;a=blob;f=etc/pa_scheme.ml;hb=HEAD
cago has joined #ocaml
<ggole> Hmm
<ggole> The parenthesised match syntax sure is... uh, pareny
cago has quit [Ping timeout: 252 seconds]
Kakadu_ has quit []
Arzaga has joined #ocaml
<gasche> sgnb: I think Daniel marked it as unmaintained
<gasche> (before 3.10)
Kakadu has quit [Quit: Page closed]
<Drup> ggole: I remove what I just said, this is far too pareny for me xD
<electronplusplus> I'm trying to read a file but for some reason it doesn't work. check path function 1st line. http://pastebin.com/mkyTpnq9
mye has joined #ocaml
pminten has quit [Remote host closed the connection]
michael_lee has quit [Quit: Ex-Chat]
<electronplusplus> someone?
Arzaga has quit [Quit: Computer has gone to sleep.]
<kerneis> electronplusplus: problem of parentheses
ttamttam has quit [Quit: ttamttam]
<electronplusplus> where?
<kerneis> think about it: why do you need "[]" on line 8
<kerneis> ?
<kerneis> oh no, sorry
<kerneis> I'm tired
<electronplusplus> good question. this code from stackoverflow and some blog.
<kerneis> hmm…
<electronplusplus> btw can you explain me the []?
noddy2OOO has quit [Ping timeout: 248 seconds]
avsm has quit [Quit: Leaving.]
<kerneis> it's to make the type-checker happy
<electronplusplus> ok
<kerneis> both branches of try … with … must return the same type
<kerneis> since the "with" branch returns a list, the "try" one must return a list as well
<electronplusplus> I 'm expecting a List but nothing is printed on my console.
<kerneis> except in that case, this code is never reached
<kerneis> you could replace "[]" with "assert(false)"
mika1 has quit [Quit: Leaving.]
<kerneis> well, the code works for me
<kerneis> oh, wait, are you compiling it?
<electronplusplus> does it print? kerneis
<kerneis> if you run it in the top level, you will see the list
<kerneis> but there is nothing to print the result here
<electronplusplus> ocamlc french.ml -o french
<kerneis> yeah
<kerneis> well, on line 29, try instead:
thomasga has quit [Ping timeout: 248 seconds]
<kerneis> List.iter print_endline (List.rev lines) ;;
Arzaga has joined #ocaml
<kerneis> this will call print_endline on every element of your list, in reverse order
<electronplusplus> works :)
<kerneis> (because "path" builds the list in reverse order in the first place)
<whitequark> jpdeplaix: working on it
shinnya has joined #ocaml
manizzle has quit [Ping timeout: 272 seconds]
ttamttam has joined #ocaml
<electronplusplus> kerneis: can I pass a function with arguments to List.iter?
<Drup> electronplusplus: what arguments ? The function must take as argument one element of the list at a time (and return units)
<ggole> You can partially apply, if that's what you mean
<electronplusplus> how?
<ggole> List.iter (takes_three_args a b) list calls takes_three_args with arguments of a, b and the element for each element of the list
<electronplusplus> ggole: Can i get the counter from the iterator?
<Drup> electronplusplus: you can use "List.iteri" for that
<Drup> the function will take the counter at the first argument, and the element as second
caseyjames has joined #ocaml
<Drup> (the "i" is common idiom in ocaml for "the same generic function, but with a counter")
<whitequark> jpdeplaix: emailed the 3.4 RM, ping me if it doesn't go through
<whitequark> does module Graphics work on OSX?
<ggole> It claims to be portable, so I'd guess so
<ggole> Graphics is pretty old and broken though
<whitequark> I have a kind of guilty pleasure from using it
<whitequark> I wrote an Lwt-based OO graphics toolkit based on Graphics... https://gist.github.com/whitequark/14aec4dd48a444f95056
<ggole> I seem to remember that there was no way to change the background color
<whitequark> there's no background color in it, just "color"
ttamttam has quit [Quit: ttamttam]
<whitequark> draw_ functions use it for lines, fill_ functions use it for areas, and no functions draw both lines and areas
<ggole> Graphics.background;; - : Graphics.color = 16777215
<whitequark> I think this is only used for clearing the entire window
<whitequark> with clear_graph
<ggole> Yeah
Yoric has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Konversation terminated!]
<ggole> Seems kind of odd that have that and no way to set it, though
<ggole> s/that/to/
<whitequark> imo a much weirder and worse thing is that it only knows one mouse button
<whitequark> or rather, it interprets all mouse buttons all the same
<ggole> I dig the pixel fonts though
<Drup> whitequark: it goes well with OSX then ! :]
<ggole> Oldschool
<whitequark> ggole: X core fonts is probably the most horrible font interface ever invented
<whitequark> well, X11 in general, but core fonts are especially awful
<ggole> I hear bad things about X
<whitequark> Drup: you mean Mac OS? :p
<ggole> But I'm happy to know none of the gory details.
<whitequark> >let xcf = Printf.sprintf "-%s-medium-r-normal--%d------iso10646-1" font.name font.size in
<Drup> whitequark: yes
thomasga has joined #ocaml
<whitequark> maybe I should just use lablgtk
<whitequark> but it's no fun if no wheels are reinvented
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
snyp has joined #ocaml
thomasga has quit [Client Quit]
ollehar has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
avsm has joined #ocaml
<caseyjames> Hi, I'm trying to build an OCaml proj on OSX using Bash 4.2.45 -- the scripts were written for linux. On linux the paths seems to work in relation to the script dir, but osx is giving me issues without the full path - anyone encounter this?
Arzaga has quit [Quit: Computer has gone to sleep.]
avsm has quit [Quit: Leaving.]
<companion_cube> caseyjames: do you use !#/usr/bin/env bash or something like this.
<companion_cube> ?
<caseyjames> mmm i don't know... i am really not very versed in unix stuff
avsm has joined #ocaml
<caseyjames> Here is one of the scripts https://gist.github.com/caseybasichis/511e401feba1eadf8a51
<companion_cube> well, try to use /usr/bin/env bash instead
<companion_cube> because bash may not be in /bin
Xenasis has joined #ocaml
<caseyjames> How can I use that? I am setting bash like this - chsh -s /usr/local/bin/bash - is that what you mean?
<companion_cube> you can try to change the shebang (the first line)
<caseyjames> ahh i see
<companion_cube> #!/bin/bash fails because your bash isn't in /bin (apparently)
<caseyjames> Hmm, I'm still getting running script ./build_JJ.sh: line 15: /ocaml_lib/build_ocaml_libs.sh: No such file or directory failed
<maurer> companion_cube: On what system is bash not in bin?
<companion_cube> no idea; but it can happen imho
<maurer> I guess this isn't a system thing in this case, but traditionally it is invoked via the /bin/bash instead of /usr/bin/env bash to support execution early in boot when /usr may not be available
<maurer> (though I also know very few people who have /usr separate from /bin these days)
<caseyjames> if I add a dot here like "if .$SHAPE_ROOT/$script " it seems to find the script (though gets hung up later in the process in similar errors) why would the . allow that to wrok?
zpe has joined #ocaml
<adrien> wat
<adrien> ah, bash arrays
<adrien> useless dirty addition
<adrien> for script in ${SCRIPTS[@]}
<adrien> do
<adrien> echo running script $s
<adrien> $s <- nice unbound variable
<adrien> replace "/bin/bash" with "/bin/bash -eux" and fix issues as the appear
<adrien> e: stop on first error
<adrien> u: error on undefined variables
manizzle has joined #ocaml
<adrien> x: trace (i.e. the script says what it's going to do)
<adrien> also
<adrien> - if $SHAPE_ROOT/$script
<adrien> + if /bin/bash -eux $SHAPE_ROOT/$script
zpe has quit [Ping timeout: 272 seconds]
<adrien> if you don't either set shebangs in script that is going to be run or explicitely set which shell script interpreter you want, chances are it won't use the right one
<adrien> maurer: bash wouldn't be in /bin on BSDs probably
ollehar has joined #ocaml
<maurer> adrien: Really?
<adrien> if you install it through a port-like system, it'd go in /usr/local/ or something like that
<maurer> Yeah, just checked the bsd manual
<maurer> evidently they don't put bash in /bin
<caseyjames> I downloaded bash 4.2.45 from homebrew its really at "/usr/local/Cellar/bash/4.2.45/bin/bash" but there is an alias ar /usr/local/bin/bash
<maurer> because it's not the default root shell
<adrien> alias or symlink?
<adrien> alias is a bad idea
<caseyjames> symlink
<adrien> maurer: yeah, instead they have phatologically-bad shells
<adrien> (csh?)
<caseyjames> it was generated automatically. the install instructions were "chsh -s /usr/local/bin/bash"
<adrien> that's going to change your login shell
<maurer> adrien: tcsh
<adrien> i.e. the interactive one
<adrien> but not the one used for scripts
<adrien> maurer: I think some have csh; difficult to say with the number of BSDs around though
<caseyjames> right now I have - #!/usr/local/Cellar/bash/4.2.45/bin/bash in my script - shouldn't that do the trick?
<adrien> you need that too in the scripts that will be called
<adrien> see my message from 15 minutes ago
<adrien> (i.e. 33)
<caseyjames> cool, I didn't totally get what that was at first... I'll try that
<dkg> hi ocaml folks -- i'm trying to figure out how to compare an IPv4 address of a peer that came in via a listening IPv6 socket that doesn't have IPV6_ONLY set.
<dkg> i'm an ocaml newbie, so i'm having trouble even writing a test case for this :/
<dkg> the basic workflow i want is:
<dkg> * code listens on "::" on some TCP port, which binds to both IPv4 and IPv6
<dkg> * code looks up an IPv4 address for the name of a known peer
<dkg> * code receives a connection and checks if the peer's IP address matches the looked up IPv4 address
<ggole> The Unix module has a reasonable binding for getaddrinfo
AltGr has left #ocaml []
travisbrady has quit [Ping timeout: 246 seconds]
Yoric has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
travisbrady has joined #ocaml
<dkg> ggole: yep, it's giving me a list back (as i think it probably should) but now i don't know how to get a single item out of the list :/
Yoric has quit [Ping timeout: 248 seconds]
<dkg> probably a pointer to some examples would help me along. i'll try to find some
<ggole> match ... with [] -> (* deal with empty list somehow *) | x::xs -> ...
caligula has quit [Remote host closed the connection]
<ggole> So you would walk the list remembering a list of ip addresses (there can be more than one), and check that list upon recieving a connection
ygrek_ has quit [Ping timeout: 272 seconds]
<ggole> I guess.
jonludlam has quit [Ping timeout: 264 seconds]
paolooo has quit [Quit: Page closed]
w0rm_x has joined #ocaml
w0rm_x has left #ocaml []
<jpdeplaix> whitequark: ok
shinnya has quit [Ping timeout: 240 seconds]
electronplusplus has quit [Ping timeout: 272 seconds]
travisbrady has quit [Quit: travisbrady]
tianon has quit [Read error: No route to host]
tianon has joined #ocaml
ollehar has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
caligula has joined #ocaml
rossberg has quit [Remote host closed the connection]
snyp has quit [Quit: leaving]
rand000 has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 252 seconds]
Arzaga has joined #ocaml
Yoric has joined #ocaml
Neros has quit [Ping timeout: 246 seconds]
Sim_n has quit [Read error: Connection reset by peer]
Sim_n has joined #ocaml
travisbrady has joined #ocaml
baz_ has quit [Ping timeout: 272 seconds]
mye has quit [Quit: mye]
<dkg> what is the difference between "open Unix" and "module Unix=UnixLabels" ? (sorry for the newbie questions, i'm still very confused)
caseyjames has quit [Ping timeout: 250 seconds]
<thizanne> dkg: let's say Unix has a value g in it
<thizanne> with open Unix, you use it by typing g
<thizanne> with module B = Unix, you use it by typing B.g
<dkg> ah, ok
<thizanne> (with module Unix = UnixLabels, you can use under the name Unix.g a value provided by the module UnixLabels)
dsheets has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 245 seconds]
baz_ has joined #ocaml
<dkg> thizanne: so what does "Reference to undefined global `Unix'" mean when compiling with "ocamlc -o test test.ml" ?
ollehar has joined #ocaml
kyrylo has joined #ocaml
<smondet> dkg: it means you're not compiling with the unix library
<smondet> ocamlfind ocamlc -package unix -linkpkg test.ml -o test
<dkg> smondet: thanks!
thomasga has quit [Quit: Leaving.]
Arzaga has quit [Quit: Computer has gone to sleep.]
ggole has quit []
baz_ has quit [Remote host closed the connection]
MorphinTime is now known as silmakuoppaaniki
avsm has quit [Quit: Leaving.]
baz_ has joined #ocaml
nikki93 has joined #ocaml
<whitequark> jpdeplaix: done
nikki93 has quit [Ping timeout: 246 seconds]
Arzaga has joined #ocaml
milosn_ has joined #ocaml
mye has joined #ocaml
milosn has quit [Ping timeout: 246 seconds]
_andre has quit [Quit: leaving]
baz_ has quit [Remote host closed the connection]
ivan\ has joined #ocaml
Sim_n is now known as Simn
Arzaga has quit [Quit: Computer has gone to sleep.]
swistak35 has quit [Ping timeout: 260 seconds]
caseyjames has joined #ocaml
nikki93 has joined #ocaml
swistak35 has joined #ocaml
<jpdeplaix> whitequark: ok, cool. Thanks !
Ptival has quit [Ping timeout: 252 seconds]
Ptival has joined #ocaml
swistak35 is now known as Guest16625
travisbrady has quit [Quit: travisbrady]
tobiasBora has joined #ocaml
caseyjames has quit [Ping timeout: 250 seconds]
travisbrady has joined #ocaml
mye has quit [Quit: mye]
<dkg> if anyone manages ocaml.org here, http://ocaml.org/learn/faq.html#Intputoutput should probably change s/Intput/Input/
<smondet> dkg: there is a bug-tracker: https://github.com/ocaml/ocaml.org/issues :)
avsm has joined #ocaml
wolfnn has joined #ocaml
tane has joined #ocaml
Arzaga has joined #ocaml
t0yv0 has quit [Quit: Page closed]
travisbrady has quit [Quit: travisbrady]
Arzaga has quit [Quit: Computer has gone to sleep.]
mye has joined #ocaml
CamelFodder has joined #ocaml
dsheets has joined #ocaml
<orbitz> omg, this code is driving me bananas
nikki93 has quit [Remote host closed the connection]
thomasga has joined #ocaml
Xenasis has quit [*.net *.split]
fosap2 has joined #ocaml
nikki93 has joined #ocaml
fosap2_ has joined #ocaml
<fosap2> I just came across Maru ( http://piumarta.com/software/maru/ ) a beautifull, tiny, selfhosting lisp compiler.
<fosap2> Are there any toy compilers for a subset of ocaml?
<adrien> too many to count them on my fingers
<adrien> I actually have this tab in my browser: http://esumii.github.io/min-caml/index-e.html
<adrien> and there are others
<fosap2> thank you very much
<Drup> japanese comments included :D
<fosap2> First step: Understand the compiler. Second step: Lear japanese from the context :P
<adrien> :)
<adrien> there are others but I can't remember them :)
<adrien> ah
fosap2_ has quit [Ping timeout: 250 seconds]
<fosap2> adrien: Is this yours? https://github.com/adrieng/NanoML
<adrien> can't find again what I was after
<adrien> fosap2: no
Arzaga has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
ddosia has quit [Ping timeout: 245 seconds]
Arzaga has joined #ocaml
darkf has joined #ocaml
ddosia has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
strobegen has quit [Quit: Leaving.]
Neros has joined #ocaml
kyrylo has quit [Ping timeout: 272 seconds]
tane has quit [Quit: Verlassend]
fosap2 has quit [Ping timeout: 240 seconds]
CamelFodder has quit [Remote host closed the connection]
fosap2 has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
travisbrady has joined #ocaml
Arzaga has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
talzeus has joined #ocaml
fosap2_ has joined #ocaml
Xenasis has joined #ocaml
fosap2 has quit [Ping timeout: 272 seconds]
rand000 has quit [Quit: leaving]
Yoric has quit [Ping timeout: 248 seconds]
mye has quit [Quit: mye]
thomasga has quit [Quit: Leaving.]
mye has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
nikki93 has quit [Remote host closed the connection]
fosap2_ has quit [Ping timeout: 272 seconds]
Xenasis has quit [Remote host closed the connection]
Arzaga has joined #ocaml
milosn has joined #ocaml
wolfnn has quit [Ping timeout: 260 seconds]
milosn_ has quit [Ping timeout: 272 seconds]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
ontologiae_ has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
nikki93 has joined #ocaml