flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
jeffmo has joined #ocaml
dhil has quit [Ping timeout: 250 seconds]
yunxing_ has joined #ocaml
jmasseo_ has quit [Quit: wtf]
jeffmo has quit [Read error: Connection reset by peer]
rgrinberg has quit [Ping timeout: 258 seconds]
jmasseo has joined #ocaml
Algebr has joined #ocaml
buddyholly has quit [Ping timeout: 240 seconds]
yunxing_ has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
buddyholly has joined #ocaml
nojb_ has joined #ocaml
nojb has quit [Ping timeout: 246 seconds]
yunxing_ has quit [Remote host closed the connection]
dakk has quit [Ping timeout: 260 seconds]
yunxing_ has joined #ocaml
kushal has joined #ocaml
|2321 has joined #ocaml
d0nn1e has joined #ocaml
<chenglou> what happens when library file A.cma and B.cma both include a dependency C? Is there a way to compile A and B while having C deduped (one copy, and no duplicate interface warning)
fluter has quit [Ping timeout: 250 seconds]
yunxing_ has quit [Remote host closed the connection]
<mrvn> happens automatically
<mrvn> just don't link C A C B or you get two since you asked for it
<chenglou> mrvn: really? When I linked A and B there's the duplicate interface warning
<chenglou> like, "Interface someIntfInC.cmi occurs in several directories"
<mrvn> oehm, do you have two files named C in different dirs?
<mrvn> this only works if they both depend on the same C
<chenglou> C is another lib (same dir, so single copy) that A's lib file and B's lib file included when they're were independently compiled
<mrvn> Is C also a lib or is it include din both A lib and B lib?
vfoley has joined #ocaml
<vfoley> Is there a setting to properly indent the |> operator (à la F#)%
<chenglou> C is a lib
<chenglou> just like A and B
uriznik has joined #ocaml
groovy2shoes has quit [Ping timeout: 250 seconds]
vfoley has quit [Ping timeout: 246 seconds]
fluter has joined #ocaml
ansiwen has quit [Read error: Connection reset by peer]
ansiwen has joined #ocaml
Bahman has joined #ocaml
Bahman has quit [Quit: ave atque vale]
adelbertc has quit [Quit: Connection closed for inactivity]
al-damiri has quit [Quit: Connection closed for inactivity]
kushal has quit [Quit: Leaving]
sh0t has quit [Remote host closed the connection]
tautologico has quit [Quit: Connection closed for inactivity]
jonasen has joined #ocaml
pierpa has quit [Ping timeout: 264 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
demonimin has quit [Ping timeout: 276 seconds]
demonimin has joined #ocaml
al-damiri has joined #ocaml
slash^ has joined #ocaml
yunxing_ has joined #ocaml
erai has joined #ocaml
vfoley has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
tmtwd has joined #ocaml
yunxing_ has quit [Quit: Leaving...]
Kakadu has joined #ocaml
Kakadu has quit [Remote host closed the connection]
vfoley has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
leyyin has joined #ocaml
Algebr` has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
seangrove has quit [Ping timeout: 276 seconds]
seangrove has joined #ocaml
uriznik has quit [Quit: Leaving.]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spion has quit [Ping timeout: 244 seconds]
jonasen has joined #ocaml
spion has joined #ocaml
seangrove has quit [Ping timeout: 246 seconds]
tmtwd has quit [Ping timeout: 272 seconds]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 260 seconds]
octachron has joined #ocaml
MercurialAlchemi has joined #ocaml
troydm has quit [Ping timeout: 244 seconds]
A1977494 has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
octachron has quit [Ping timeout: 240 seconds]
atbagautdinov has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
Algebr` has joined #ocaml
octachron has joined #ocaml
nicholasf has joined #ocaml
atbagautdinov has quit [Quit: atbagautdinov]
ob_ has joined #ocaml
ob_ has quit [Quit: Leaving]
ygrek_ has joined #ocaml
ygrek has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
Simn has joined #ocaml
dakk has joined #ocaml
AltGr has joined #ocaml
zol1 has joined #ocaml
zol1 has quit [Client Quit]
StrykerKKD has joined #ocaml
stryker_kkd has joined #ocaml
StrykerKKD has quit [Remote host closed the connection]
dhil has joined #ocaml
boegel has left #ocaml ["http://quassel-irc.org - Chat comfortably. Anywhere."]
nicholasf has quit [Remote host closed the connection]
reynir has quit [Quit: WeeChat 1.4]
reynir has joined #ocaml
Algebr` has quit [Ping timeout: 258 seconds]
dakk has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
struktured has quit [Ping timeout: 250 seconds]
nicholasf has joined #ocaml
malc_ has joined #ocaml
TheLemonMan has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
octachron has quit [Ping timeout: 258 seconds]
sdothum has joined #ocaml
octachron has joined #ocaml
A1977494 has quit [Quit: Leaving.]
AlexRussia has quit [Ping timeout: 276 seconds]
shinnya has joined #ocaml
sh0t has joined #ocaml
osa1 has joined #ocaml
<osa1> friends, I want to learn about flambda's design. which paper/manual/source code should I read? I found a user manual section that explains transformations done on the language but I'm wondering about the language definition, syntax etc. if it's typed then also the type system and typing rules ...
<def`> intermediate languages are not typed in OCaml.
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<def`> You can read flambda code (flambda.mli), it is documented
<osa1> ty
dhil has quit [Ping timeout: 250 seconds]
osa1 has left #ocaml ["Konversation terminated!"]
nicholasf has quit [Remote host closed the connection]
dhil has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
malc_ has quit [Remote host closed the connection]
Sorella has joined #ocaml
pierpa has joined #ocaml
nicholasf has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
tane has joined #ocaml
octachron has quit [Read error: Connection reset by peer]
ollehar1 has joined #ocaml
ollehar1 has quit [Remote host closed the connection]
zozozo has quit [Quit: WeeChat 1.5]
ollehar1 has joined #ocaml
zozozo has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Client Quit]
<ollehar1> this repo seems old, anyone knows a good replacement?
<ollehar1> tia
malc_ has joined #ocaml
<ollehar1> with json_of_point, point_of_json, etc
<ollehar1> hm, yojson
<ollehar1> or atd?
nicholasf has joined #ocaml
loocash has joined #ocaml
loocash has quit [Client Quit]
<Drup> ollehar1: ppx_deriving_yojson is the direct equivalent
atbagautdinov has joined #ocaml
<ollehar1> Drup: thanks!
slash^1 has joined #ocaml
slash^1 has left #ocaml [#ocaml]
<ollehar1> did Lwt_websocket ever exist in opam...?
<ollehar1> and has it changed name or been replaced?
vfoley has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
TheLemonMan has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
ncthom91 has joined #ocaml
ncthom91 has quit [Client Quit]
ncthom91 has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vfoley has quit [Ping timeout: 264 seconds]
tmtwd has joined #ocaml
groovy2shoes has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
shinnya has joined #ocaml
d0nn1e has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
spip has joined #ocaml
spip has left #ocaml ["Konversation terminated!"]
ollehar1 has quit [Ping timeout: 264 seconds]
dhil has quit [Ping timeout: 244 seconds]
A1977494 has joined #ocaml
tane has quit [Quit: Verlassend]
rgrinberg has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
someone1 has joined #ocaml
<someone1> hi
<someone1> I am reading a mly file here
<someone1> what does this mean: test : { None } | blabla
<someone1> what does the { None } mean?
<someone1> another:
<someone1> test2 : { [] } | blabla
Algebr` has joined #ocaml
<Drup> It's an action associated to the empty production
<Drup> test : /* the empty word */ { None } | bla { Some action }
<someone1> ah ok thanks
Algebr` has quit [Read error: Connection reset by peer]
Algebr` has joined #ocaml
cat5e has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ocaml
sdothum has quit [Client Quit]
sdothum has joined #ocaml
sdothum has quit [Client Quit]
sdothum has joined #ocaml
sdothum has quit [Client Quit]
sdothum has joined #ocaml
sdothum has quit [Client Quit]
Soni has joined #ocaml
sdothum has joined #ocaml
Soni is now known as cat5e
seangrove has joined #ocaml
<seangrove> Hey all, my lwt code seems to exit before it's finished. I'm sure this is an obvious thing, just not sure what it is
<Algebr`> seangrove: show
<Algebr`> probably forgot to call Lwt_main.run
<seangrove> (updated with output)
<Algebr`> I think fetch_and_print already gives back a Lwt.t
<Algebr`> and you're wrapping it again with a Lwt.return
<seangrove> Ah, that could be it, let me check
<seangrove> Yup, that did it, thanks!
<seangrove> The type system let me down :P
<Algebr`> well what was the signature of it?
<seangrove> (I understand the type was technically correct, but semantically I was wrong)
<seangrove> unit -> unit Lwt.t
<Algebr`> ah
<seangrove> Then wrapping that with Lwt.return, unit Lwt.t Lwt.t
<Algebr`> yep
<seangrove> So the first Lwt.t return quickly, and then the program exist
<seangrove> exited
<Algebr`> the unit Lwt.t Lwt.t should have been a hint
<seangrove> Owell, good to know
<seangrove> Algebr`: Oh certainly, but I didn't think to look there
<Algebr`> eh, just getting acquainted with ecosystem is all
<seangrove> Too used to errors being brought to my attention :)
<Algebr`> lol
<seangrove> Now I just have to figure out how to get Syndic to build properly
<Algebr`> not building?
<seangrove> Well, it's in my _oasis file and my .merlin file, but running "make" says Syndic is an unbound module
someone1 has quit [Quit: Page closed]
<seangrove> Algebr`: By the way, we were all pretty excited about your JSC work
<seangrove> very cool stuff
<Algebr`> thank you, I pulled it out and now it builds on Linux
<Algebr`> I'm gonna focus a lot of energy into it. I really like the possibilties.
<Algebr`> syndic is in your builddepends?
<Algebr`> Maybe you are doing the static oasis setup, so you added it but then didn't do oasis setup
ollehar1 has joined #ocaml
<seangrove> Muddling through it with Daniel, better with two people at least
<Algebr`> almost there...
<seangrove> Making things worse now. Getting "Reference to undefined global `Cohttp_lwt_unix'"
tmtwd has quit [Ping timeout: 246 seconds]
<Algebr`> got it
<Algebr`> one second
vfoley has joined #ocaml
darkf has joined #ocaml
psnively has joined #ocaml
<seangrove> Algebr`: That did it - can you explain the change?
rgrinberg has quit [Ping timeout: 252 seconds]
A1977494 has quit [Quit: Leaving.]
dhil has joined #ocaml
<Algebr`> moved BuildDepends to specific units (the exectuable), redid with oasis setup dynamic since the 8k line long setup.ml indicated it was still assuming plain oasis setup, you had a typo with a trailing , and then assuming you fixed those things you were missing opium.unix since it would crap out with linking
AltGr has left #ocaml [#ocaml]
DocFox has joined #ocaml
DocFox has left #ocaml [#ocaml]
SomeDamnBody has joined #ocaml
<SomeDamnBody> So, does anybody know anything about ppx_jane having a version retracted on the opam repository?
ollehar1 has quit [Ping timeout: 264 seconds]
Algebr` has quit [Read error: Connection reset by peer]
Algebr` has joined #ocaml
<gasche> Algebr`: what is your "very cool JSC stuff" people are excited about?
<Algebr`> I am linking against JSC in OCaml, executing JS inside of OCaml and getting values back.
<gasche> ah
<gasche> JavaScript Core?
<Algebr`> yes
<gasche> that's the bit I needed :-'
<Algebr`> and speaking of which, having an annoyance with getting it to build on Linux but fine on OS X. Yea JavaScriptCore. Getting it out of webkit wasn't that bad
<gasche> SomeDamnBody: doing "git log" on the opam-repository does not reveal anything of the kind, but maybe I'm not looking the right way
<Algebr`> oh lol, guess you thought meant Jane Street?
<gasche> that was my guess without further context, yes
<SomeDamnBody> oh, I guess I didn't do an update
<SomeDamnBody> I just did opam update, then another opam show ppx_jane and it showed the version I wanted
<gasche> it may also be that your solver rejects some versions for some reason (for example if you are using the fallback solver)
<gasche> Algebr`: why did you pick JavaScript Core, is it easier to embed / more stable than v8?
<Algebr`> I think so yes
<Algebr`> I like it more than v8
<Algebr`> v8's C++ API is massive and hard for me, plus building it is a nightmare.
<malc_> Algebr`: you need it to be fast?
<Algebr`> JSC is pretty fast
<Algebr`> and feature rich
<malc_> Algebr`: but how fast do you need it to be?
<gasche> I would guess embeddings of javascrpit inside OCaml are more for scriptability
<gasche> but in any case I would indeed trust JSC's performances
<Algebr`> performance isn't something I care about right now, but I know JSC is very fast.
<Algebr`> Not so much scriptability but for reusing the JS ecosystem
<Algebr`> I imagine creating an OCaml server with separate version of ReactJS on each route, rendering approrpirately the UI for each route.
Sorella has quit [Quit: Connection closed for inactivity]
<Algebr`> Or replace Babel with a command line OCaml program, using small bits of babel's JS code to do the tedious work
<Algebr`> Or phantom JS replaced by OCaml with bits of JS for things not wanted to be reimplemented
<Algebr`> Or OCaml compiled to ARM with JS for libs that create charts or whatever, reuse them in an iOS program
<Algebr`> Many interesting, cool things.
Simn has quit [Ping timeout: 264 seconds]
<Algebr`> getting frustrated with this. I have a fooBar.cmxa which is being passed to ocamlopt but on linux it craps out with unbound module FooBar
slash^ has quit [Read error: Connection reset by peer]
<SomeDamnBody> gasche: thanks for the suggestion and the consideration, but I got that working now
<SomeDamnBody> Does anybody know what kind of information a debug file can contain?
<SomeDamnBody> Say I compile a C program. Does debug information indicate the start of every instruction?
groovy2shoes has quit [Remote host closed the connection]
groovy2shoes has joined #ocaml
ollehar1 has joined #ocaml
psnively has quit [Quit: Textual IRC Client: www.textualapp.com]
AlexRussia has joined #ocaml
<Drup> seangrove: your mistake was to use "let _ = ..."
<Drup> You should do "let () = ..."
<Drup> it would force the return type to be unit, and the type system would have yelled
<Algebr`> def`: merlin doesn't work with 4.03 right
rgrinberg has joined #ocaml
<gasche> Algebr` : ocaml still needs to be told where fooBar.cmi is
<gasche> for type-checking
<rgrinberg> What's the annotation to disable a particular warning for a module?
<Drup> [@@@ocaml.warning ...]
<rgrinberg> thanks Drup
<rgrinberg> atdgen should add these annotations to the source it generates :/
<Drup> or generate code with no warnings :p
<Drup> it's 4.02 only, it's understandable not to do it
<rgrinberg> how come?
<gasche> the ocaml.warning attribute is only available in 4.02 and futher
<gasche> so most code generators, which have been developed for earlier OCaml versions, have not been updated to produce them
<gasche> (and arguably if they do it today they have to worry about being incompatible with users with older OCaml versions)
<mrvn> Is there a warnign for [@@@ocaml.warning_that_doesn_texist ]?
ygrek has joined #ocaml
<mrvn> And cann you annotate the attribute with an ocaml version for which it should take effect?
<def`> Algebr`: the git version works
<def`> Algebr`: and about your proposal... this is exactly what ppx's are for
<Algebr`> yea, that's what I'm saying but I need merlin to recognize this hook
<Algebr`> how are then done, these ppxes?, like lwt.ppx or whatever
<rgrinberg> gasche: oh yeah, thanks
<rgrinberg> pre ppx seems so long ago
<Algebr`> okay, anything extra needed to play nicely with merlin?
<def`> prefereably using the git version, but nothing special is needed
<def`> (stable merlin tried to do some caching which broke ppxs that are more complex than a simple mapping)
<Algebr`> hmm, but merlin will want the OCaml type right
<def`> of course
<Algebr`> yea, I would have speak directly to merlin
<rgrinberg> gasche: is menhir + ocaml still on the cards?
<Algebr`> and tell merlin which type checker to call for this block of code
<Algebr`> and what to spit out for the type checking.
<def`> Algebr`: wtf
<Algebr`> right
<Algebr`> lol
<Algebr`> dude give me an api
<def`> you cannot just plug another type-checker. You can do whatever you want on your side
<def`> But give OCaml types back (merlin will still have to do proper type checking)
<Algebr`> hmm, but then how can I give merlin the type of the expression, i would call the other typechecker and store that result where?
<Algebr`> because its not like ocaml code is run each time you ask merlin to typecheck stuff
<def`> uh? it is?
<Algebr`> err, nevermind I was trying to express somethig else
<Algebr`> but merlin is analyzing it right, but in the example I have it would be all JS code
<Algebr`> so it wouldn't make sense to merlin
<def`> Let's do that step by step.
<def`> Write your ideas on paper, when what you are trying to achieve is clear, make a first implementation with ppxs.
<Algebr`> yea, you're right, this is a bit scatterbrained.
<def`> If you want to report custom information, we can use attributes.
<Drup> what are you trying to do exactly ?
<Algebr`> Have one buffer where in a ppx extension I have JS code and this JS code can be type checked and results reported through merlin
<Algebr`> and use another typechecker for the JS Code
<Drup> what do you do with the js code ?
<Algebr`> also, any way to make opam only show the packages that are installable on my machine , aka taking version constraints into account?
<Algebr`> Doesn't matter but the JS Code will be evaled in a JS VM
<Drup> I see
<Drup> how do you typecheck it ?
<Algebr`> let js_Code = [%js_code_raw var thing = 123] in
<Algebr`> using another typechecker
<Algebr`> either Flow or ternjs
<Algebr`> would really love to have Flow provide an OCaml api, then things would be much nicer/seamless and cool.
<Drup> Ok
<Drup> So you can do something, but I'm not really sure that's what you want
<def`> Algebr`: I don't say it is impossible, but it is certainly not high in on merlin todo list
<Drup> and separated type-checking is going to be delicate
seangrove has quit [Ping timeout: 240 seconds]
<def`> A first approximation with ppx would be a first step.
<Algebr`> damnit! cohttp doesn't work yet with 4.03??
<Drup> def`: well, I don't see any other way than ppx
<Algebr`> def` Drup: yea, I don't imagine it would be high on anyone's list and the added complexity given having to generalize some code.
<Algebr`> None the less would be really cool.
<Algebr`> I think
ygrek_ has joined #ocaml
<def`> Drup: ppx + attributes for custom information
<Drup> Algebr`: you can call the typechecker in the ppx and return an error node with the type error(s)
<Drup> and that would workish
<Drup> (and merlin does the job just fine with error nodes)
<Drup> def`: which custom information would be needed here ?
<Drup> ah, for C-c C-t inside jscode ? right
<gasche> mrvn: it's hard to give warnings for "non-existing" attributes
<gasche> because the model of attributes is 'anyone can grab them', so you never know whether an extension further down the chain will use a given attribute
ygrek has quit [Ping timeout: 260 seconds]
<gasche> but Jérémie Dimino has worked on that as part of Jane Street's ppx tooling
<Algebr`> rgrinberg: does cohttp not work with 4.03?
<gasche> (I *think* their ppx driver has some logic for that, or maybe another piece)
<Algebr`> Drup: yea, for C-c C-t inside jscode
<gasche> rgrinberg: menhir+ocaml, I haven't worked on it since my pull request, but yes I'd like to work on it
<Drup> gasche: yes, it's in the ppx driver
<gasche> mrvn: basically to be able to warn you need to move from an open-world model "anyone may interpret any attribute" to more a closed-world model "we'll cooperate to declare the attributes we support'
<gasche> (I think it would be good for everyone to migrate towards such a more structured model, but I think for the early OCaml versions aiming for maximum flexibility was the right cohice)
<mrvn> gasche: it starts with "ocaml." that makes it internal.
<rgrinberg> Algebr`: Should work. I haven't tried it yet. Waiting for merlin to be released for 4.03
<Algebr`> doesn't, opam won't install it from git
<gasche> mrvn: good point, but "warning" is also supported
<gasche> rgrinberg: could you send me an atdgen-generated file?
<gasche> I decided I may work on the 4.03-segfault issue, but I don't have an example at hand
rgrinberg has quit [Ping timeout: 240 seconds]
<gasche> hm
<gasche> in fact the testsuite has some
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
A1977494 has joined #ocaml
<Algebr`> ocamlopt yelling at me: ar: no archive members specified
<Drup> hum, that's an OSX bug
<Drup> which library ?
tane has joined #ocaml
<Algebr`> doing: ocamlfind ocamlopt jscore_stubs.o javaScriptCore.o -cc /usr/bin/clang++ -ccopt '-std=c++11 -stdlib=libstdc++' -cclib '-framework JavaScriptCore -lc++' -a -linkall -o javaScriptCore.cmxa
<Drup> it usually means you have an empty library
kolko has quit [Quit: ZNC - http://znc.in]
<Algebr`> yea, that's what I figure but they aren't empty, I was thinking the jscore_stubs.o, which was clang++ created, maybe needed a -shared?
<Drup> C libraries are not statically linked by default, and I don't know more about that stuff, sorry
atbagautdinov has quit [Quit: atbagautdinov]
<Algebr`> yea, but i didn't need it ot be statically linked because that's taken care of at the end
rgrinberg has joined #ocaml
<rgrinberg> Algebr`: what error do you get?
<Algebr`> from cohttp?
<Algebr`> its in the pastebin
<rgrinberg> oh, i disconnected and missed it.
Kakadu has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
<rgrinberg> ok I see the log. Hmm that's a bit puzzling. Wondering if it's some oasis issue
<Algebr`> rgrinberg: worthwhile to make github issue?
<rgrinberg> Algebr`: Yeah. I'll install 4.03 and give it a try
seangrove has joined #ocaml
<Algebr`> okay, will wait on reply
<Algebr`> Drup: figured it out. Combination of ordering -cclib and I think because the file only consisted of type and externals, its was considered empty
<Algebr`> and clang on os x has some extra things, like undefined, etc etc. I recalled having this issue before
octachron has joined #ocaml
<Algebr`> compiling consistently between OS X and linux is always a pleasure..
AlexRussia has quit [Ping timeout: 260 seconds]
<Algebr`> although getting this interesting warning on OS X: ld: warning: could not create compact unwind for _camlHtml5_f__fun_9021: stack subq instruction is too different from dwarf stack size
seangrove has quit [Remote host closed the connection]
<Algebr`> presumably coming up because I'm linking against another thing that uses tyxml
seangrove has joined #ocaml
<rgrinberg> Algebr`: hmm. $ opam install cohttp works in 4.03 for me. I wonder if it's an OSX only issue
<Algebr`> this was from git
<Algebr`> opam pin add -y cohttp https://github.com/mirage/ocaml-cohttp will try from plain opam
<rgrinberg> well installing cohttp#master worked or me as well :/
<rgrinberg> Algebr`: could you try cloning cohttp and regenerating oasis with $ oasis setup?
<rgrinberg> See if that changes anything for you
<Algebr`> rgrinberg: looks like its conduit crapping out: http://pastebin.com/bfvn9rGE
<rgrinberg> Algebr`: that log is lwt though
<Algebr`> it says that condiut crapped out I thought
<Algebr`> rgrinberg: great, oasis setup -> opam pin cohttp . -y
<Algebr`> works
ygrek_ has quit [Ping timeout: 246 seconds]
<rgrinberg> what's that oasis constraint I need to add to make it generate saner ocamlbuild?
<rgrinberg> and setup.ml
<tormen> Hi. Is it correct that you cannot have a let without a in within a function ? ... I thought something like this should be possible : let b () = begin let x = 30; a (); end
<ollehar1> tormen: that is correct
<ollehar1> the operator `;` expects type unit
<tormen> ollehar1: ahhh that's interesting!
<tormen> ollehar1: oooooookey
<mrvn> tormen: "let x = 30; a ()" would be "let x = (30; a ())"
<tormen> mrvn: also very cool !!!
<mrvn> or "(let x = 30); a ();" which would mean x disapears at the closing )
<tormen> I am still lacking this ability to think like the compiler some times :))
<mrvn> The first still looks for the in and the second would be pointless
<ollehar1> mrvn: no type error?
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
<ollehar1> hm, maybe a warning
<ollehar1> "expects type unit"
<tormen> mrvn: When you said :: let x = 30; a ()" would be "let x = (30; a ())" you mean ocaml will parse it like this, right ?
<ollehar1> fyi, both f# and reason changes this. but personally I've never found "in" intrusive or noisy.
seangrove has quit [Remote host closed the connection]
<tormen> mrvn: thanks a lot
<tormen> ollehar1: as well !!!
seangrove has joined #ocaml
<tormen> Really cool !! I love understanding things ^^ :)))
<ollehar1> ;)
<tormen> ollehar1: I suppose a ";;" will expect unit as well, right ?
<ollehar1> `;;` is different than `;`
<ollehar1> for top-level defs? don't remember :P
<ollehar1> you don't really need it.
<ollehar1> except in the toplevel, maybe. someone else will answer this better.
<tormen> ollehar1: but I think you can have it in the program code as well... but what it exactly does is still unclear to me
<ollehar1> let x = 30;;
<ollehar1> let x = 30
<ollehar1> defines x = 30 in that file, but
<ollehar1> works just as fine.
<tormen> ollehar1: I read "The best way to avoid syntax error messages located far away from the actual error: use the ;; at the end of each phrase" ... but would like to understand how ";;" works (differently) than ; ... I guess it has to do with the lexer (parser?) ... pouh me visiting the compiler lecture has been a few years...
<ollehar1> uh, where did you read that?
<tormen> I guess the question I have is : What is the "phrase" that the guy talks about
<tormen> ;)
<ollehar1> I would guess phrase = top-level definition
<pierpa> expr1; expr2 means execute expr1 and then expr2; expr1;; means expr1 and nothing interesting regarding the evaluation of this expression follows.
<ollehar1> pierpa: you just used ";" in two different meanings ;)
seangrove has quit [Remote host closed the connection]
<pierpa> yes!
seangrove has joined #ocaml
<tormen> pierpa: ... so ... if I have other code after the ";;" it won't get .... parsed ? compiled ? executed ?
<octachron> ";;" is never necessary. In the toplevel, it is a phrase separator
<ollehar1> (toplevel = the interactive shell thing)
<tormen> ollehar1: ;)
A19774941 has joined #ocaml
<pierpa> tormen: it will get parsed later, but it has no influence on the current expression
<octachron> tormen, in the toplevel, anything after ";;" is not interpreted, yes
A1977494 has quit [Ping timeout: 252 seconds]
<pierpa> that would be ^D
<tormen> pierpa: ahhh it is still fuzzy.... I know that it somehow separates (hard-cuts) expressions... but can you maybe provide an example where introducing ;; actually changes something ?
<tormen> (introducing an new ";;" and/or replacing a ";" with a ";;")
<pierpa> it changes the way syntax errors are detected and reported
<tormen> pierpa: ok it has no other influence ?
<pierpa> no
<tormen> ah that helps
<tormen> So I can actually use it whereever I want, how often I want (at the end of expressions) ...
<tormen> ... and this changes nothing in my resulting code ?
<pierpa> I suggest you use it at the end of expressions
<tormen> (resulting code = compiled)
<pierpa> it changes the time it takes a newbie to from zero to ccorrect code
<pierpa> *to go
<tormen> :)
<tormen> so it could help ;)
<pierpa> definitely
<tormen> pierpa: thanks a lot! will preciously save this to /learn/it/ocaml/\;\; :)
<pierpa> ;]
tane has quit [Quit: Verlassend]
<rgrinberg> gasche: helpful comment in that atdgen PR. thanks
<gasche> I have mixed feelings about this issue
<gasche> Sys.opaque_identity has a relatively well-defined semantics that should let us know when it is *correctly* used
<gasche> here, I believe it is not correctly used (in the sense that it does not guarantee that the code will remain correct)
<gasche> so one might argue that it's better not to use it at all, to avoid contributing to a cargo-culting practice of sprinkling it all over the place
<gasche> but still this library seems useful to many, so it deserves a workaround
<Algebr`> Drup: Okay, so lwt on opam doesn't work with 4.03.0?
<Drup> it does
<Algebr`> sigh, didn't for me,
<Algebr`> built from source worked
<rgrinberg> gasche: i'm a bit curious how much perofrmance is gained by that trick atdgen uses.
<Algebr`> okay, so cohttp + lwt on 4.03.0 does not work cleanly on OS X. all had to be done from source and locally pinned
copy` has joined #ocaml
<Kakadu> Folks, I invoke ocaml to compile .c to .o but it doesn't pass -o option to g++ and I get object file in the wrong directory. Recently it was OK. Do you know something about that? http://paste.in.ua/1727/#10
<rgrinberg> Drup: what's that oasis trick to make it generate nicer code?
<Kakadu> maybe it is somehow related to https://github.com/ocaml/ocaml/pull/464 but I can't understand how exactly....
<Algebr`> kakadu: pass options with -cclib 'foo bar'
nichola__ has joined #ocaml
<Drup> rgrinberg: "generate nicer code" ?
nicholasf has quit [Ping timeout: 244 seconds]
<Kakadu> Algebr`: Yeah, but it will require copy-paste some code from ocambuild's recipes. Any ideas why the behaviour have changed?
<Algebr`> Drup: where did Tyxml.Html5.P.print_list go
<Drup> Html.pp
<Algebr`> kakadu: I don't know about that, I don't use ocamlbuild yet.
<rgrinberg> Drup: you've told me about this originally. That oasis generates very pessimistic myocamlbuild.ml and setup.ml because it assumes that it will run on very old ocaml/ocamlbuild. Ther's a way to make it generate code that assumes 4.01 or something for example.
<Algebr`> Drup: I had this before: let show_tag e =
<Algebr`> Html5.P.print_list print_string [e]
<Drup> ah, yes
<Algebr`> what would be update to date tyxml?
<Drup> Algebr`: "(Html.pp ()) fmt e"
<gasche> kakadu: when you say that it worked better before, where you using a development version?
<Drup> (with fmt a Format.formatter)
<Drup> you can use it with %a too, it's explained in the documentation.
<Drup> Actually, it's probably pp_elt, in your case, but still, please look at the documentation.
nicholasf has joined #ocaml
<gasche> kakadu: because there has been back-and-forth on the semantics of -o in the compiler
<Kakadu> gasche: maybe. Yesterday I used pinned sources of ocamlbuild 0.9.0 and it didn't work
<gasche> we improved (in trunk), then we had to revert stuff because it broke existing software
<gasche> you may have tested in between
<Drup> rgrinberg: "OCamlVersion: >= X"
<Drup> iirc
<Kakadu> gasche: which version of ocamlbuild should work? Will it work with 4.02.3?
<Drup> It doesn't do as much as it could, but it's a bit better
<Algebr`> Drup: thanks
<gasche> kakadu: I would need a repro-case to tell more about what works and what should work
<gasche> (maybe you could upload an archive with a small directory tree and a .c that exhibits the issue?)
malc_` has joined #ocaml
<gasche> your problem is probably pending on https://github.com/ocaml/ocaml/pull/464, but it's hard to know for sure
nichola__ has quit [Ping timeout: 240 seconds]
malc_ has quit [Ping timeout: 250 seconds]
<Algebr`> what the hell: ld: warning: could not create compact unwind for _caml_start_program: dwarf uses DW_CFA_same_value
seangrove has quit [Ping timeout: 244 seconds]
<Algebr`> although program works
<Algebr`> yay, 4.03 finally works
malc_` has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
octachron has quit [Read error: Connection reset by peer]
<Drup> rgrinberg: it will also make oasis activelly check for the ocaml version during configure
<rgrinberg> Drup: That's fine if it works well. Does it handle minor versions properly? E.g. 4.02.3 or something
<Drup> I think so, haven't checked myself
SomeDamnBody has quit [Remote host closed the connection]
<gasche> kakadu: do you have a version that does not require qt5?
<Kakadu> Oh, I forgot to cut it
dhil has quit [Quit: Quit]
<Kakadu> gasche: pull
nojb__ has joined #ocaml
nojb_ has quit [Ping timeout: 244 seconds]
ollehar1 has quit [Quit: ollehar1]
<gasche> kakadu: it seems to fail under 0.9.0, and work under 0.9.{1,2}
<gasche> this corresponds to #51
<gasche> so indeed it is caused by the upstream revert, itself due to compatibility issues, but it works in more recent ocamlbuild versions
<gasche> (and if you were using 0.9.0 + ocaml-trunk before the revert, then it also worked)
<Kakadu> Is it possible to have >= 0.9.1 with ocaml 4.02.3 in easy way?
nojb_ has joined #ocaml
<Kakadu> I'm using 4.02.3 btw
seangrove has joined #ocaml
stryker_kkd has quit [Quit: Leaving]
nojb__ has quit [Ping timeout: 246 seconds]
<gasche> hm
<gasche> if you are using 4.02.3, why are you not using the ocamlbuild distributed with OCaml?
<gasche> I guess the easiest way to get 0.9.x is to build from sources then
<gasche> (but it will still try to prevent you from overriding the compiler-distributed ocamlbuild)
seangrove has quit [Ping timeout: 240 seconds]
<Kakadu> Ah, I think that I got an idea
nicholasf has quit [Remote host closed the connection]
<Kakadu> probably when I compiled new ocamlbuild and removed it after that opam didn't put old one back because it was distributed with compiler and opam doesn't know how to put old one back
seangrove has joined #ocaml
* Kakadu is reinstalling switch
nojb__ has joined #ocaml
<Kakadu> yeah, it's fixed
<Kakadu> gasche: thanks for your time
nojb_ has quit [Ping timeout: 246 seconds]
seangrove has quit [Ping timeout: 250 seconds]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
A19774941 has quit [Remote host closed the connection]
nojb_ has joined #ocaml
Kakadu has quit [Remote host closed the connection]
nojb__ has quit [Ping timeout: 244 seconds]
nojb__ has joined #ocaml
nojb_ has quit [Ping timeout: 244 seconds]
MercurialAlchemi has quit [Ping timeout: 276 seconds]
nojb_ has joined #ocaml
nojb__ has quit [Ping timeout: 244 seconds]