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
JuggleTux has quit [Read error: Connection reset by peer]
JuggleTux has joined #ocaml
_um has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
RossJH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
madroach_ has quit [Ping timeout: 264 seconds]
sdothum has joined #ocaml
madroach has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
WraithM has quit [Read error: Connection reset by peer]
Sorella has joined #ocaml
Jefffrey has quit [Quit: Leaving...]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Ping timeout: 246 seconds]
rand000 has quit [Quit: leaving]
shinnya has quit [Ping timeout: 264 seconds]
JuggleTux has quit [Ping timeout: 272 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
badon has quit [Disconnected by services]
wagle has quit [Remote host closed the connection]
badon has joined #ocaml
wagle has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wagle has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
darkf has joined #ocaml
wagle has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
rgrinberg has joined #ocaml
antkong has joined #ocaml
JuggleTux has joined #ocaml
ollehar1 has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 245 seconds]
badkins has quit [Remote host closed the connection]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
yminsky has joined #ocaml
JuggleTux has quit [Read error: Connection reset by peer]
JuggleTux has joined #ocaml
JuggleTux has quit [Read error: Connection reset by peer]
yminsky has quit [Quit: yminsky]
JuggleTux has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
psy_ has quit [Ping timeout: 264 seconds]
tianon has joined #ocaml
dsheets has quit [Ping timeout: 265 seconds]
antkong has quit [Ping timeout: 244 seconds]
ygrek has quit [Ping timeout: 255 seconds]
idegen has quit [Ping timeout: 252 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
ghostpl_ has quit [Remote host closed the connection]
ygrek has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rgrinberg has joined #ocaml
meteo has joined #ocaml
ZenosDance has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
swgillespie has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
shinnya has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat1 has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
JuggleTux has quit [Quit: leaving]
rgrinberg has joined #ocaml
ggole has joined #ocaml
ghostpl_ has joined #ocaml
<rgrinberg> j0sh: there's no multipart support for the client or the server
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
badkins has joined #ocaml
ghostpl_ has quit [Ping timeout: 255 seconds]
memoized-pyon is now known as extensional-pyon
badkins has quit [Ping timeout: 250 seconds]
virtualeyes has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
antkong has joined #ocaml
antkong has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ocaml
mal``` has joined #ocaml
ygrek has quit [Remote host closed the connection]
mal`` has quit [Ping timeout: 245 seconds]
c74d has quit [Remote host closed the connection]
ygrek has joined #ocaml
c74d has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
slash^ has joined #ocaml
ghostpl_ has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
swgillespie has joined #ocaml
ghostpl_ has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
ygrek has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
nlucaroni has quit [*.net *.split]
MercurialAlchemi has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
user__ has joined #ocaml
swgillespie has joined #ocaml
AlexRussia has quit [Ping timeout: 264 seconds]
swgillespie has quit [Client Quit]
swgillespie has joined #ocaml
nlucaroni has joined #ocaml
ZenosDance has quit [Ping timeout: 256 seconds]
swgillespie has quit [Client Quit]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
swgillespie has joined #ocaml
kakadu has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
AlexRussia has joined #ocaml
swgillespie has joined #ocaml
ghostpl_ has joined #ocaml
swgillespie has quit [Ping timeout: 255 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
ygrek has quit [Ping timeout: 255 seconds]
ghostpl_ has quit [Ping timeout: 265 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
_um has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
swgillespie has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
swgillespie has quit [Client Quit]
psy_ has quit [Ping timeout: 256 seconds]
ChristopheT has joined #ocaml
user__ has quit [Remote host closed the connection]
Simn has joined #ocaml
dsheets has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
ghostpl_ has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
ghostpl_ has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
monod has joined #ocaml
larhat1 has quit [Quit: Leaving.]
matason has joined #ocaml
leowzukw has joined #ocaml
avsm has joined #ocaml
ghostpl_ has joined #ocaml
xificurC has joined #ocaml
matason has quit [Ping timeout: 245 seconds]
ghostpl_ has quit [Ping timeout: 244 seconds]
moviuro has left #ocaml ["Konversation terminated!"]
monod has quit [Remote host closed the connection]
extensional-pyon has quit [Quit: My morality has evaporated under the harsh UV light.]
freling has joined #ocaml
rgrinberg has joined #ocaml
pyon has joined #ocaml
pyon has quit [Client Quit]
lordkryss has joined #ocaml
pyon has joined #ocaml
RossJH has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
avsm has quit [Quit: Leaving.]
yomimono has quit [Ping timeout: 264 seconds]
freling has quit [Read error: Connection reset by peer]
freling has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
ygrek has joined #ocaml
ghostpl_ has joined #ocaml
AlexRussia has quit [Quit: WeeChat 1.2-dev]
sdothum has joined #ocaml
ghostpl_ has quit [Ping timeout: 256 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<bernardofpc> PERL5LIB="/home/bernardofpc/.opam/system/lib/perl5:" -> why, oh why
<bernardofpc> (and, if it was not enough not to point to the real system perl, I have moreover) ls: cannot access /home/bernardofpc/.opam/system/lib/perl5: No such file or directory
ollehar1 has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
badkins has joined #ocaml
axiles has quit [Ping timeout: 256 seconds]
axiles has joined #ocaml
Haudegen has joined #ocaml
badkins has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
kapil___ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
yminsky has joined #ocaml
ghostpl_ has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
larhat has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
c74d has quit [Remote host closed the connection]
c74d has joined #ocaml
gdsfh1 has left #ocaml [#ocaml]
martintrojer has quit [Ping timeout: 250 seconds]
rand000 has joined #ocaml
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
<ollehar1> yo yo
<ollehar1> how to check that all element in a list are equal (in some way)?
<ollehar1> *elements
<ollehar1> manual recursive function?
<ollehar1> should be a list iterator that compares two elements at a time?
<srax> ollehar1: what do you means by that ? You want to check that your lists are totaly equal, or that all the elements of a list are present in the other one ?
<ggole> match list with [] -> true | x::xs -> List.for_all (fun e -> x = e) xs
<ollehar1> xml structure of each list element should be equal to other element.
<ollehar1> ggole: good one
avsm has joined #ocaml
grmartin has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
rgrinberg has quit [Ping timeout: 245 seconds]
idegen has joined #ocaml
yminsky has quit [Quit: yminsky]
oriba has joined #ocaml
yomimono has joined #ocaml
Haudegen has joined #ocaml
yminsky has joined #ocaml
yminsky has quit [Client Quit]
yminsky has joined #ocaml
darnuria has quit [Quit: WeeChat 1.2-dev]
yminsky has quit [Client Quit]
struktured has quit [Ping timeout: 256 seconds]
darkf has quit [Quit: Leaving]
leowzukw has quit [Quit: leaving]
MercurialAlchemi has joined #ocaml
<ollehar1> Not_found is not good :(
<ollehar1> know problem?
<ollehar1> *known
<ggole> It's a common exception
<ggole> The List functions in particular are fond of raising Not_found to make your life more fun
<ollehar1> what's wrong with return empty results?
<mrvn> what's an empty result?
<ollehar1> or options
<ggole> That's an approach many would prefer.
<ggole> It's not the approach the stdlib has taken.
<mrvn> options you always have to match. If you know it's not gonna fail that is extra typing.
<mrvn> overall it's just a matter of taste
<ggole> assert false might be more typing, but at least it tells you where the explosion took place
<mrvn> but then you can't catch that in case you expect a failure once in a while
<ggole> I meant matching on the result of an option-returning thing with assert false
tianon has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 256 seconds]
<mrvn> for a reusable module it's best if you have both ways. It's easy enough to wrap the option types with match None -> raise Not_found ...
tianon has joined #ocaml
<ggole> Yeah, that's not a bad choice.
kapil___ has quit [Quit: Connection closed for inactivity]
ghostpl_ has joined #ocaml
etehtsea has joined #ocaml
etehtsea has quit [Max SendQ exceeded]
ghostpl_ has quit [Ping timeout: 246 seconds]
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 252 seconds]
<mrvn> the theoretical thing to explain recursion in untyped lambda calculus
<mrvn> ups
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
Anarchos has joined #ocaml
badkins has joined #ocaml
ollehar1 has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
yomimono has quit [Ping timeout: 252 seconds]
Sim_n is now known as Simn
badkins has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 252 seconds]
vanila has joined #ocaml
struktured has joined #ocaml
dsheets has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
tianon has joined #ocaml
ygrek has joined #ocaml
yminsky has joined #ocaml
yac has joined #ocaml
AlexRussia has joined #ocaml
<vanila> anyone know about mirage?
<vanila> I was wondering if I could use it instead of openssl?
<vanila> (without rewriting my website in ocaml..)
<mrvn> so you want a different sticker on your bumper so you buy a new car?
* vanila facepaml
<vanila> why am i on irc
<whitequark> vanila: "can i use photoshop instead of chromium?"
vanila has left #ocaml ["Leaving"]
<ggole> ...
<yminsky> Probably we could have given him a nicer answer than that.
dsheets has joined #ocaml
<yminsky> It’s true the question was slightly disjointed, but it’s pretty clear what he wanted to know about...
<kakadu> I think that some exception is raised when ppx extension being executed. How to debug it? OCAMLRUNPARAM=b doesn't print backtrace
<kakadu> It seems that ppx extension itself accepts some [in_file] and [out_file] but it seems that they shouldnot be text ones
<mrvn> does mirage support https at all?
<whitequark> kakadu: no, these are not text
<whitequark> they're serialized ASTs
<yminsky> mrvn: there is indeed a new SSL implementation that works with Mirage.
<yminsky> It’s pretty sweet, actually.
<kakadu> whitequark: What can you recommend in case '/home/kakadu/.opam/4.02.1/lib/ppx_tools/rewriter got signal and exited' ?
boogie has joined #ocaml
dsheets has quit [Remote host closed the connection]
Jefffrey has joined #ocaml
Jefffrey_ has joined #ocaml
Jefffrey has quit [Read error: Connection reset by peer]
<whitequark> kakadu: looks like your rewriter outputs an invalid AST
<whitequark> do you happen to print anything to stdout?
<yminsky> So really, it was a reasonable question, even though it wasn’t worded quite correctly.
<whitequark> you can use -ppx 'cp -t d/' to pull out the files that ocamlc (or rewriter) outputs before it deletes those
<yminsky> It highlights why it’s useful to default to polite responses, even to questions that seem silly.
<kakadu> whitequark: Using ' ocamlfind c -ppx 'cp -t d/' -ppx ../_build/src/ppx_getenv.native -c g.ml' I got four files with AST, what is next?
<whitequark> you should've skipped the second ppx, so you'd get only two files, but it is not important
<whitequark> some of these files have size 0, some have not
<whitequark> you need the latter
Jefffrey_ has quit [Quit: Leaving...]
<whitequark> try `../_build/src/ppx_getenv.native input output` with input being the file you just got, and output can be whatever
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<kakadu> whitequark: I got an output files without errors
<whitequark> wait, are you using stock ppx_getenv and it segfaults?
<kakadu> after `../_build/src/ppx_getenv.native input output`
<whitequark> or did you modify it?
<kakadu> Yeah, I did modify this
<whitequark> ok
<whitequark> hexdump -C output
<whitequark> ... hm. better yet: can you show me your modified source and the dump?
<whitequark> hm that looks acceptable
octachron has joined #ocaml
<kakadu> https://github.com/Kakadu/ppx_parsers/blob/master/caml/src/ppx_getenv.ml#L33 Some shit have started when I did add constructors RepSep, Left and Right
<whitequark> do I understand you right? ocamlc -ppx ... segfaults?
freling has quit [Quit: Leaving.]
<kakadu> ➜ samples git:(master) ✗ ocamlfind c -ppx ../_build/src/ppx_getenv.native -c g.ml
<kakadu> ocamlc.opt got signal and exited
<whitequark> ok can you run it under gdb?
<whitequark> and get a backtrace
<kakadu> ocamlc?
<whitequark> yes
<whitequark> ocamlfind c runs ..../ocamlc.opt
<kakadu> whitequark: 0x00000000004f337d in camlAst_mapper__map_1520 ()
<whitequark> hrm
struktured has quit [Ping timeout: 244 seconds]
<whitequark> are you sure the version of compiler-libs you used to build the ppx with matches the version of your compiler?
<whitequark> and you didn't forget eval `opam config env`?
<whitequark> well, it shouldn't happen either way, there's a signature
<whitequark> but I have no other ideas
<kakadu> eval is in my bashrc:)
<kakadu> I was writing some code and it worked fine
<kakadu> but I have added something else into extension and everything brokes
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<kakadu> And it happens only for g.ml
ghostpl_ has joined #ocaml
<kakadu> And when I comment part after '| Right (l_ast,r_ast) ->' it works
<whitequark> you have some kind of unsoundness and it just manifests in that case
<kakadu> ah!
<kakadu> me idiot
<whitequark> oh?
<whitequark> wait
<whitequark> > [%e Obj.magic() ]
<whitequark> what do you /expect/
<kakadu> everymody can laugh
freling has joined #ocaml
<ggole> Naughty!
mort___ has joined #ocaml
ghostpl_ has quit [Ping timeout: 246 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
reem has quit [Read error: No route to host]
reem has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
antkong has joined #ocaml
waneck has joined #ocaml
mort___ has quit [Quit: Leaving.]
dsheets has joined #ocaml
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
antkong has quit [Ping timeout: 264 seconds]
badkins has joined #ocaml
badkins has quit [Remote host closed the connection]
ollehar1 has joined #ocaml
<ollehar1> any way to do `if var = None then foo else bar`?
<ollehar1> or `if var = Some x then x else y`
<ollehar1> instead of match case
reem has quit [Read error: Connection reset by peer]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
psy_ has joined #ocaml
<kakadu> if var = None should work, I think
<ggole> match or a function call
<mrvn> ollehar1: have you tried it?
<ggole> let get_or opt alt = match opt with Some x -> x | None -> alt, then get_or var y
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
dant3 has quit [Remote host closed the connection]
oriba_ has joined #ocaml
dant3 has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
oriba has quit [Ping timeout: 250 seconds]
<xificurC> 2 questions on `ocamlbuild -use-ocamlfind -pkgs lwt.unix,lwt.ppx,str,ppx_deriving.show main.native'
<xificurC> 1) in what file can I put this _recipe_ so that I don't have to write it all over?
<xificurC> 2) ppx_deriving.show <== I found this out by trial and error, what does foo.bar stand for?
<kakadu> 1) _tags
<kakadu> 2) very likely package.subpackge
ghostpl_ has joined #ocaml
<xificurC> kakadu: thanks, I'll look into the _tags file's syntax. Package/subpackage - those are OPAM terms, right?
<kakadu> ocamlfind ones
<xificurC> I see. I'll look into that as well then I guess. Thanks
<bernardofpc> (by the way, apparently people here don't like Str; myself I've never used it, but maybe you can ask what should it be replaced by)
<xificurC> bernardofpc: indeed. I'm planning to replace it with Re
struktured has joined #ocaml
larhat has quit [Quit: Leaving.]
ghostpl_ has quit [Ping timeout: 250 seconds]
<ollehar1> mrvn: var = None should work yes, but I don't you can deconstruct variables directly in if-clause...
<ollehar1> *don't think
yminsky has quit [Quit: yminsky]
<ollehar1> I'm stupid, it works
<ollehar1> # if a = Some x then x else 36;;
<ollehar1> - : int = 10
<ollehar1> where a = Some 10, and x = 10
<ollehar1> pretty cool!
<ollehar1> no wait...
<ollehar1> x in then-clause might be another binding
<ggole> Uh
<ggole> You know that's not pulling the x out of the option, right?
<kakadu> I though that I discovered something new about OCaml...
<ollehar1> I know now
<ggole> The two xs are the same, of course
<ggole> So it'll "work"
<ollehar1> mnm
<ollehar1> *mm
<ollehar1> # if a = Some w then w else 36;;
<ollehar1> Error: Unbound value w
<ggole> I think that 'if let' has been suggested which would allow a similar patten
<ollehar1> ok
<ggole> eg, if let Some x = var then x else y
<ollehar1> yeah
avsm has joined #ocaml
dav has joined #ocaml
RossJH has quit [Ping timeout: 272 seconds]
pobivan has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
tianon has quit [Changing host]
tianon has joined #ocaml
A1977494 has joined #ocaml
<ollehar1> match cases as first-class values?
octachron has quit [Ping timeout: 264 seconds]
<ggole> I think there are languages which do that...
<ggole> I'd settle for abstraction over patterns
<ollehar1> what's that?
Hannibal_Smith has joined #ocaml
<ggole> Where instead of typing the same pattern twice (maybe with slightly different bits) you bind it to a name and then use that
joncfoo has joined #ocaml
<joncfoo> anyone have experience with getting utop to work with org-mode in emacs?
<ollehar1> ggole: yeah, sound good, could use that. :)
<joncfoo> I have some source code blocks that I'd like to have eval'd in utop but I haven't figured out how to do it yet - it starts up the ocaml interpreter and just sits there at the moment
A1977494 has quit [Quit: Leaving.]
A1977494 has joined #ocaml
RossJH has joined #ocaml
A1977494 has left #ocaml [#ocaml]
mort___ has joined #ocaml
avsm has quit [Quit: Leaving.]
freling has quit [Quit: Leaving.]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<Drup> put ;; at the end and press enter
Submarine has quit [Quit: Leaving]
virtualeyes has quit [Ping timeout: 252 seconds]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
rgrinberg has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
octachron has joined #ocaml
octachron has quit [Client Quit]
<joncfoo> Drup: C-c C-c doesn't eval the block - it's not even copied to the interpreter
<joncfoo> and the interpreter is the standard ocaml one not utop
<joncfoo> outside org-mode it all works well
<joncfoo> C-c C-e evals into utop
<joncfoo> just not in org-mode
dav has quit [Ping timeout: 272 seconds]
Haudegen has quit [Ping timeout: 272 seconds]
<ggole> You need to bind it to whatever the command is in tuareg-mode
<ggole> And that might not work, depending on the contents of the buffer and how tuareg does its phrase parsing
<ggole> It's tuareg-eval-phrase, try that (just with M-x for now)
mxv has quit [Remote host closed the connection]
ZenosDance has joined #ocaml
Haudegen has joined #ocaml
dav has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<ollehar1> ggole: btw, if you had abstraction over patterns, you could stick it into modules and have first-class patterns that way.
<ollehar1> which might lead to some weird code
myst has quit [Ping timeout: 265 seconds]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 245 seconds]
ggole has quit []
<reynir> is "if let" new syntax?
<adrien> if let x = 42 in x = 42 then ();;
<adrien> that ?
<ollehar1> no
<ollehar1> possible deconstructing in if-clause
<reynir> ggole wrote this earlier: let Some x = var then x else y
<ollehar1> he also wrote "it's been suggested" :)
<reynir> err, if let*
<reynir> ah, suggested for ocaml
myyst has joined #ocaml
<ollehar1> yes
<reynir> I interpreted it as a suggeted solution heh
<ollehar1> I wish :)
ZenosDance has quit [Ping timeout: 256 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
swgillespie has joined #ocaml
myyst is now known as myst
Nahra has quit [Remote host closed the connection]
<def`> +1 for first-class patterns, though it's unlikely to happen :P
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
<ousado> it'd be awesome
thomasga has joined #ocaml
swgillespie has quit [Client Quit]
matason has joined #ocaml
swgillespie has joined #ocaml
yminsky has joined #ocaml
seangrove has quit [Remote host closed the connection]
<whitequark> can be done with ppx
<whitequark> i mean, you lose exhaustiveness checks anyway
qnix has joined #ocaml
matason has quit [Quit: Leaving...]
<ousado> my preference would be compile-time pattern aliases/replacements/functions, however you want to call it, not passing 'pattern values' around at runtime
<ousado> the latter is nicely covered by functions
matason has joined #ocaml
freling has joined #ocaml
<ousado> but e.g. in case of the haxe compiler, there's certainly lots of code duplication in the various backends
<whitequark> the former can /definitely/ be done with ppx
<whitequark> and very elegantly so
<whitequark> even with multiple files
<Drup> the issue is, obviously, exporting such aliases.
<whitequark> read the .cmt :p
RossJH has quit [Quit: Textual IRC Client: www.textualapp.com]
<Drup> it's starting to get in the territory "just do it in the compiler duh" :p
<Drup> but yeah
<Drup> I have yet to see a completely convincing design for first class pattern though, every one of them is slightly different
<Drup> (or not-slightly)
esden has quit [Remote host closed the connection]
<ousado> being able to reuse a complex pattern with its bindings as "| Patsy.alias_name a b c -> " would be sufficiently awesome already, IMO
reem has joined #ocaml
reem has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
<whitequark> ousado: it's twenty lines ppx
<whitequark> write it
reem has joined #ocaml
qnix has left #ocaml [#ocaml]
yminsky has quit [Quit: yminsky]
<ousado> whitequark: could I get the above syntax?
esden has joined #ocaml
reem_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
<whitequark> no
<whitequark> Patsy.Alias_name (a, b, c), yes
pobivan has quit [Quit: pobivan]
<whitequark> but I prefer [%patsy alias_name a b c]
pobivan has joined #ocaml
reem has quit [Ping timeout: 256 seconds]
pobivan has quit [Client Quit]
<ousado> hm, maybe one could do away with the patsy, it might become quite redundant in most cases, I guess
badkins has joined #ocaml
<ousado> perhaps I'll try that when haxe moves away from 3.xx
dav has quit [Ping timeout: 255 seconds]
dav has joined #ocaml
hh has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
xificurC has quit [Ping timeout: 264 seconds]
swgillespie has quit [Max SendQ exceeded]
adrien has quit [Quit: leaving]
swgillespie has joined #ocaml
tel has joined #ocaml
adrien has joined #ocaml
reem_ has quit [Remote host closed the connection]
<tel> \join #nixos
<tel> ah. hah, oops.
swgillespie has quit [Max SendQ exceeded]
<tel> too much tex lately
swgillespie has joined #ocaml
swgillespie has quit [Max SendQ exceeded]
swgillespie has joined #ocaml
psy_ has quit [Ping timeout: 264 seconds]
reem has joined #ocaml
swgillespie has quit [Max SendQ exceeded]
swgillespie has joined #ocaml
ghostpl_ has joined #ocaml
psy_ has joined #ocaml
shinnya has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
ghostpl_ has quit [Ping timeout: 256 seconds]
c-c has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
Simn has quit [Read error: Connection reset by peer]
<joncfoo> is there a way to define an inline operator that uses letters - e.g. let (and_then) r f = ...
<Drup> no
<joncfoo> ok thanks
matason has quit [Quit: Leaving...]
antkong has joined #ocaml
<esden> hi everyone, I have a question regarding ocamlfind and ocamlc
kdef has joined #ocaml
<companion_cube> please ask
<esden> On linux you can run "ocamlfind ocamlc -g -linkpkg mylibrary.so mycode.ml" and it detects correctly that mylibrary.so is a shared library and all is dandy. On OS X "ocamlfind ocamlc -g -linkpkg mylibrary.dylib mycode.ml" it fails as it does not know what to do with dylib
<esden> any tips?
<esden> obviously if I run the same code on osx "ocamlfind ocamlc -g -linkpkg mylibrary.so mycode.ml" it will fail as it can't find the mylibrary.so ...
<companion_cube> I don't have a mac, sorry :/
<esden> I can't find any pointers related to .so vs .dylib handling even through google
<esden> obviously that was my first try
<esden> so it has to be something obvious if noone beside me has the issue :)
<companion_cube> is mylibrary.dylib a local lib, or a systemwide lib?
<esden> local lib
<companion_cube> erf
<esden> well it is provided in a directory through -dllpath
<companion_cube> have you tried a combination of -dllpath . -dllib mylibrary ?
<companion_cube> although, that would be dynlink
struktured has quit [Ping timeout: 256 seconds]
<esden> ok here is the full command:
<esden> ocamlfind ocamlc -g -I /Users/esdentem/projects/paparazzi/paparazzi-git/var/build/ocaml -I /Users/esdentem/projects/paparazzi/paparazzi-git/sw/simulator -I /Users/esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim -o /Users/esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim/simsitl -package glibivy,pprz -linkpkg -dllpath-pkg pprz autopilot /Users/esdentem/projects/paparazzi/paparazzi-git/sw/simulator/sitl.cma /Users
<esden> /esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim/simsitl.ml -dllpath /Users/esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim -dllpath /Users/esdentem/projects/paparazzi/paparazzi-git/sw/simulator
<esden> urgh
<esden> that is already a butchered command call ... just a second
<esden> ok there we go
<esden> ocamlfind ocamlc -g -I /Users/esdentem/projects/paparazzi/paparazzi-git/var/build/ocaml -I /Users/esdentem/projects/paparazzi/paparazzi-git/sw/simulator -I /Users/esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim -o /Users/esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim/simsitl -package glibivy,pprz -linkpkg -dllpath-pkg pprz autopilot.dylib /Users/esdentem/projects/paparazzi/paparazzi-git/sw/simulator/sitl.cma
<esden> /Users/esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim/simsitl.ml -dllpath /Users/esdentem/projects/paparazzi/paparazzi-git/var/aircrafts/Bixler/sim -dllpath /Users/esdentem/projects/paparazzi/paparazzi-git/sw/simulator
<esden> obviously on linux the autopilot.dylib would be autopilot.so
<esden> and that works
<esden> on osx providing the different ending results in:
<companion_cube> i'm sorry, I can't help much. I can just say that order on the command line matters, so I would put the libs first
<esden> ocamlc.opt: don't know what to do with autopilot.dylib.
<esden> companion_cube: no worries :)
<esden> will try further
<companion_cube> if that's not too urgent, if I were you, I would ask again tomorrow (a bit earlier if possible, many people here are at CT + 1)
freling has quit [Quit: Leaving.]
Hannibal_Smith has quit [Quit: Leaving]
struktured has joined #ocaml
dav has quit [Ping timeout: 255 seconds]
boogie has joined #ocaml
<ollehar1> ousado: you're doing haxe?
kakadu has quit [Ping timeout: 246 seconds]
<ousado> ollehar1: I'm not a core developer, working on a C target currently
<ollehar1> ok
<c-c> so anyone get paid for writing in ocaml?
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
<esden> companion_cube: if I can't solve it myself till then then I will definitely try again tomorrow :)
<esden> thanks! :)
<reynir> I wrote a bit of ocaml at work
ZenosDance has joined #ocaml
<ousado> c-c: or perhaps for asking rhetorical questions?
<c-c> I'm dreaming of getting ocaml programming experience and getting paid
<ousado> learning ocaml will both help you getting paid for working with any language and increase the likelihood you'll find a job where you can use ocaml
thomasga has quit [Quit: Leaving.]
<esden> companion_cube: ok, I think I figured it out. Although I feel like this is a "bug" in ocamlc. So ocamlc assumes that all .so files are dynamic libraries. It does not do that for .dylib files. I had to compile the .dylib file on osx and save it away with the .so ending then ocamlc accepts it as a dynamic library and all is good. The "clean" way would be if ocamlc assumed a .dylib file is a shared library on darwin the same way it assumes .so files
<esden> are dyramic libraries on linux. :)
<kdef> I'm having trouble installing cohttp because of ocamlfind/ocamldoc http://hastebin.com/jokunicunu - any ideas?
kdef has quit [Quit: Leaving]
thomasga has joined #ocaml
kdef has joined #ocaml
<Drup> kdef: you don't have ocamldoc installed ?
<kdef> Drup, I do. from Fedora repo ocaml-ocamldoc-4.01.0-24.fc21.x86_64
keen_________ has quit [Read error: Connection reset by peer]
<Drup> ah, just saw the first line, yeah
<Drup> don't know a thing about fedora, just use a non-system switch
<Drup> (opam switch 4.02.1)
yminsky has joined #ocaml
<kdef> Drup, ok that sounds easier. will try
keen_________ has joined #ocaml
<kdef> Drup, this set up works much better. thanks
<c-c> haha I'm too crappy with ocaml for those jobs, and my bachelors is in fine arts, thanks, I'd forgotten about the hob board
<c-c> *job
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
contempt has quit [Ping timeout: 272 seconds]
swgillespie has joined #ocaml
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
contempt has joined #ocaml
dant3 has quit [Ping timeout: 264 seconds]
yomimono has joined #ocaml
Algebr has joined #ocaml
<Algebr> I'm using Cohttp and I'm having a function just exit the entire program and not even raise an exception. Not quite sure what to do about it
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yminsky has quit [Quit: yminsky]
rand000 has quit [Quit: leaving]
avsm has joined #ocaml
yminsky has joined #ocaml
hh has quit [Quit: Page closed]
seangrove has joined #ocaml
<rgrinberg> Algebr: can you show us your program?
shum has joined #ocaml
sdothum has quit [Ping timeout: 256 seconds]
ollehar1 has quit [Quit: ollehar1]
swgillespie has joined #ocaml
<Algebr> rgrinberg: http://pastebin.com/zWv9KweM I need to use my own custom headers, is that a problem?