<gasche>
that was 5 hours ago, and now people in Europe are sleeping
<Algebr`>
just a matter of waiting i guess.
<Algebr`>
there is no one with opam-repo access in north america?
Guest56624 has quit [Ping timeout: 260 seconds]
<gasche>
I don't know
<gasche>
most of my interactions are with Jeremy Yallop
darkf has joined #ocaml
sh0t has quit [Ping timeout: 276 seconds]
zpe has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
phase_ has quit [Ping timeout: 276 seconds]
zpe has quit [Ping timeout: 276 seconds]
copy` has quit [Quit: Connection closed for inactivity]
sh0t has joined #ocaml
tmtwd has joined #ocaml
wtetzner has joined #ocaml
kushal has joined #ocaml
phase_ has joined #ocaml
wtetzner has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
tobiasBora has quit [Ping timeout: 244 seconds]
_y has quit [Ping timeout: 276 seconds]
pierpa has quit [Ping timeout: 258 seconds]
fluter has quit [Ping timeout: 250 seconds]
fluter has joined #ocaml
johnelse has joined #ocaml
johnelse is now known as Guest27490
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Algebr` has joined #ocaml
Guest27490 has quit [Ping timeout: 250 seconds]
phase_ has quit [Remote host closed the connection]
travula has joined #ocaml
sh0t has quit [Remote host closed the connection]
Simn has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
Mercuria1Alchemi has joined #ocaml
_y has joined #ocaml
_y has quit [Ping timeout: 244 seconds]
jeffmo has joined #ocaml
tmtwd has quit [Ping timeout: 244 seconds]
cdidd has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
kitf has joined #ocaml
cdidd has joined #ocaml
johnelse has joined #ocaml
johnelse is now known as Guest71939
Guest71939 has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
kitf has quit [Quit: Page closed]
travula has quit [Ping timeout: 276 seconds]
travula has joined #ocaml
bigs has quit [Ping timeout: 250 seconds]
pootler_ has quit [Ping timeout: 250 seconds]
<Algebr`>
Drup: how can I get the ocaml code generated by a ppx?
Sorella has quit [Ping timeout: 250 seconds]
MorTal1ty has quit [Ping timeout: 250 seconds]
<Algebr`>
for example I want to pass js_of_ocaml.ppx on my .ml, have it be desugared and dump another .ml
msch has quit [Ping timeout: 240 seconds]
pootler_ has joined #ocaml
msch has joined #ocaml
bigs has joined #ocaml
MorTal1ty has joined #ocaml
Sorella has joined #ocaml
kushal has quit [Quit: Leaving]
orbifx1 has joined #ocaml
AltGr has joined #ocaml
silver has joined #ocaml
kushal has joined #ocaml
larhat has joined #ocaml
tristero has quit [Ping timeout: 250 seconds]
trystero has joined #ocaml
tobiasBora has joined #ocaml
_y has joined #ocaml
orbifx has joined #ocaml
dexterph has joined #ocaml
travula has quit [Ping timeout: 258 seconds]
ontologiae_ has joined #ocaml
johnf has joined #ocaml
teiresias has quit [Remote host closed the connection]
teiresias has joined #ocaml
<jun>
seems ppx_tools/rewriter does exactly that
gustav___ has quit [Ping timeout: 276 seconds]
gustav___ has joined #ocaml
<Algebr`>
yea was trying to get it to work but failing
<Algebr`>
but what do I provide for the rewriter,
<Algebr`>
not sure if jsoo provides?
<Leonidas>
oh great, patdiff created dependency conflicts. gnaaaah, core
<Leonidas>
Algebr`: you're asking at 4am :p
<Algebr`>
okay, its 1:30 am for me too
<Algebr`>
lol
<Algebr`>
actually nvm, will figure it out later.
nickapos has quit [Ping timeout: 276 seconds]
travula has joined #ocaml
ontologiae_ has quit [Ping timeout: 240 seconds]
johnelse has joined #ocaml
johnelse is now known as Guest51323
jstolarek has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
orbifx has quit [Ping timeout: 276 seconds]
jwatzman|work has joined #ocaml
tane has joined #ocaml
ggole has joined #ocaml
Guest51323 is now known as johnelse
rand__ has joined #ocaml
zpe has joined #ocaml
dhil has joined #ocaml
toolslive has joined #ocaml
yomimono has joined #ocaml
johnelse has quit [Quit: leaving]
johnelse has joined #ocaml
johnelse has quit [Client Quit]
johnelse has joined #ocaml
johnelse has quit [Quit: leaving]
johnelse has joined #ocaml
alpen has quit [Ping timeout: 244 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
dave24 has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
alpen has joined #ocaml
<dave24>
how can I pass a string that is not null terminated from C to an ocaml function?
<dave24>
In the manual I can only find caml_copy_string, but that requires the string to be null terminated
<dave24>
also, how do I deallocate 'value's?
zpe has quit [Remote host closed the connection]
sdothum has joined #ocaml
zpe has joined #ocaml
redpoppies has joined #ocaml
redpoppies has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 258 seconds]
<toolslive>
it might an idea to look at the non-null terminated string as a bigarray (or Lwt_bytes.t)
<dave24>
toolslive: it needs to be a normal string on the ocaml side, I want to create one in the C code from a char* and a length to pass to caml_callbackN
<toolslive>
I think you will have to copy as ocaml strings have some weird encoding at the end.
<toolslive>
hence the caml_alloc_string
<dave24>
so I can caml_alloc_string and then memcpy into it?
<toolslive>
so: caml_alloc_string(len); memcpy(....)
<dave24>
:D
<toolslive>
yes
<dave24>
thanks
<dave24>
do I need to deallocate those?
<toolslive>
if you want to avoid the copy, consider bigarray
<toolslive>
or in your case, use that to call your function. no deallocation as you don't know if the ocaml side keeps it in a data structure or not...
<toolslive>
it's the gc's responsibility
<dave24>
right
<dave24>
so what about values i get from an ocaml function?
<dave24>
how does it know when I'm done with them?
<toolslive>
you create the value on the C side, and hand it to an ocaml function, right ? then you're done with them as soon as you hand it over.
<toolslive>
it might even be that the buffer itself is already moved by the gc during the time it's in use on the ocaml side. You're not in charge of the value anymore.
<dave24>
right, but if the function gives me back another different `value`... I need to free that somehow right?
<dave24>
or do I have to copy it right away?
<toolslive>
so you get a different value back ? and you want to use it on the C side ?
<dave24>
yes, to pass to another ocaml function
<toolslive>
then you need to register it as a local value in the C code otherwise, the gc on the ocaml side might move it while you're looking at it from the C side.
<toolslive>
there are macros for that.
<toolslive>
CAMLlocal....
<toolslive>
hold on. see if I can find a link for you
<dave24>
toolslive: to me it seems ocaml only has access to `*closure_f`
<toolslive>
and to the parameters you give it (in this case Val_unit) and in your case probably the allocated ocaml string
<dave24>
yes
<dave24>
but that guide says ocaml will set closure_f to NULL, but I never pass it that
nicholasf has quit [Remote host closed the connection]
<dave24>
nowhere does it say `caml_something(&closure_f);`
<toolslive>
caml_callback(*closure_f, Val_unit);
<dave24>
yes, that passes the value pointed by closure_f. But never its address
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
<toolslive>
it's a static value that you want to keep across calls, but you want to initialize it on first usage. I don't think the gc will touch that value.
<toolslive>
(I might be wrong)
<dave24>
thats what I think as well
<dave24>
but the guide says this: "But you still have to test if it is equal to NULL in case the caml garbage collector has freed it"
<mrvn>
if you register it as root then it won't free it.
<mrvn>
and if you don't register it then it is totaly undefined.
phasip has joined #ocaml
thizanne has joined #ocaml
<phasip>
I am looking at some code that does Format.printf "... @[%a@]@. " what does the @ characters do here? to me it seems like the output is as if "... %a" as used.
<mrvn>
dave24: that guide looks sketchy. better follow the manual.
<Drup>
phasip: I encourage you to look in the Format documentation, it's explained at lenght
<phasip>
Oh, thanks Drup apparently I opened the Printf manual that said that @ outputs @
<phasip>
Printf.printf != Format.printf
<companion_cube>
phasip: @ stuff is for formatting, that is, manage linebreaks and indentation
<companion_cube>
(and yeah, look at Format's manual)
<dave24>
mrvn: is there an equivalent of CAMLlocal/CAMLreturn that works for non-local variables? I need to pass a reference to a value around in a pointer. That pointer is passed as userdata to places I can't control.
<dave24>
is that was register as root does?
<mrvn>
dave24: caml_register_global_root
<mrvn>
You need to malloc a value, register its address and then pass the address of the value around.
<dave24>
so, if its a value I get from an ocaml function, do I need to copy that?
<mrvn>
if you want to keep it past the function exiting then yes
tane has joined #ocaml
<dave24>
ok, thanks a lot!
<mrvn>
just assign it to your malloced value*
<dave24>
assign? but thats not a copy then?
<mrvn>
it's a shallow copy
<dave24>
so its like this?: v = ocaml_callback(..) -> value my_ref = v -> caml_register_generational_global_root(&my_ref) -> i have my_ref until i call remove register
<mrvn>
no, that would make my_ref a stack variable and when the function exits its becomes invalied and the GC gets total garbage.
<mrvn>
Anything on the stack must always be CAMLparam/local
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<mrvn>
unless you ment: value my_ref; void init() { caml_register_generational_global_root(&my_ref); }
<mrvn>
my_ref being a global variable.
<dave24>
hm, i think i understand now. I was confused because i keep thinking of `value` as a reference, but its an actual value i need to copy
<dave24>
i duplicate the value onto the heap, and pass the duplicates address to the register function.
<dave24>
i think....
<mrvn>
dave24: "value" can be a value like 1,2,3 or Foo | Bar or []. Or it can be a pointer to int64, Blub of int, { x:int; }, class foo, or other more complex types.
<mrvn>
dave24: you can use *my_ref = ocaml_callback(..)
<dave24>
ok thanks again!
travula has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
nicholasf has quit [Remote host closed the connection]
aggelos_ has quit [Quit: leaving]
aggelos_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
rgrinberg has joined #ocaml
pyon has joined #ocaml
lol-icon is now known as Guest2645
Guest2645 has quit [Killed (weber.freenode.net (Nickname regained by services))]
<ggole>
Is this a question about optimisation or semantics? In OCaml, calling a function twice is distinguishable from only calling it once.
<mrvn>
if you write it twice it happens twice
<beginner_>
ggole: I was just wondering if the compiler can store the result from the first evaluation and uses it directly instead of evaluating it twice
<mrvn>
beginner_: it could if the function is pure. Does flamba do anything towards that?
<phasip>
So, whats the name of this operator ">>|" ? (Or what does it do / where can I read about it?)
<beginner_>
mrvn: I don't know, but it would be really nice if that gets optimized
<ggole>
I wouldn't expect it.
<mrvn>
beginner_: usualy I just write better code
tane has joined #ocaml
<mrvn>
in your example: A -> f A
<beginner_>
mrvn: i was just something that came up recently and i was curious whether or not i gets removed. I guess the only way to tell would be to look into the assembly code?
<mrvn>
beginner_: till flambda ocaml never optimized anything but inline functions.
<mrvn>
made it verry clear what happens when you write something.
<beginner_>
mrvn: the example was just the quickest thing i could write to express the question
<mrvn>
beginner_: try it with "let f = let t = ref true in function A -> t := lnot !t; !t
<beginner_>
mrvn: that was not a real world example, just a minimal example for my question.
<beginner_>
mrvn: but i really appreciate this input
shinnya has joined #ocaml
dhil has quit [Ping timeout: 244 seconds]
<gasche>
beginner_: it does not get removed
<gasche>
as a rule of thumb, you should assume that OCaml executes the code as it is written
iorivur has joined #ocaml
<gasche>
(this is not always true, but it's a better base assumption than expecting magical things to happen)
<beginner_>
so what are companies like jane street do? do they look at the resulting assembly code and look for the most efficient ways or just by benchmarking?
<companion_cube>
ggole: what? in OCaml, calling a function twice calls it twice
<companion_cube>
because of possible side effects
<beginner_>
companion_cube: there are no exceptions to that rule?
<gasche>
companion_cube: ggole wrote "distinguishable"
<gasche>
beginner_: programmers write reasonable, readable code, and then they profile and optimize what needs be
orbifx1 has quit [Quit: WeeChat 1.5]
<gasche>
you don't need to be constantly looking at assembly code whenever you learn a new programming language
<gasche>
(this is a bad habit that some C programmers have, along with the inability to think of language semantics other than through compilation to assembly)
<companion_cube>
oh sorry ggole, misread :(
zpe has quit [Remote host closed the connection]
<beginner_>
gasche: it was just this special case, were i was wondering if there is potential optimization
<pierpa>
as everyone has already said to you, that would not be an optimization, it would be a miscompilation
<ggole>
Looking at assembly is usually more about cost model than semantics if you ask me
<ggole>
(Unless you are working on an implementation at that level.)
<ggole>
Dumping stuff at a higher level is also useful for that, though.
<Drup>
phasip: iirc, "fmap"
<Drup>
(or just "map")
dhil has joined #ocaml
<beginner_>
thanks for all the information
johnelse has quit [Ping timeout: 264 seconds]
johnelse has joined #ocaml
SpiceGuid has joined #ocaml
nicholasf has quit [Remote host closed the connection]
StatelessCat has quit [Quit: WeeChat 1.5]
fraggle-boate has joined #ocaml
<Bluddy[m]>
companion_cube: have you seen my -safe-syntax PR?
<companion_cube>
oh yeah, saw the message
<companion_cube>
32 comments already!?
fraggle-boate has quit [Remote host closed the connection]
<Bluddy[m]>
Yeah. What do you think of my backwards-compatibility solution?
<Bluddy[m]>
Does it make sense?
octachron has joined #ocaml
silver_ has joined #ocaml
fraggle-boate has joined #ocaml
<Drup>
Bluddy[m]: if you need to do sed (or cppo) magic, it's precisely *not* backward compatible.
<companion_cube>
I don't know
<Bluddy[m]>
Drup: of course it's not directly backwards compatible -- I'm changing the syntax. What I'm saying is that given the fact that the changes are precise and minimal, a simple sed command is all that's needed to get -safe-syntax compiling on -unsafe-syntax (ie. old) compilers
<companion_cube>
I think it's better to migrate old code bases
<companion_cube>
I think the good way of doing it is by parsing the old syntax, and printing the new one
<companion_cube>
(maybe building on ocp-indent, which knows how to parse without removing comments)
silver has quit [Ping timeout: 244 seconds]
<companion_cube>
if there is a tool to easily migrate, I'd really switch
<Bluddy[m]>
Yeah that will happen companion_cube. I'm trying to address the issue people brought up of LTS releases with old OCaml compilers
<Drup>
Bluddy[m]: also, you assume that most matches/if are wrapped in begin/end, which is not the case
<Drup>
migrating would be more work
<Drup>
and regardless, the existence of a translation tool (which is more or less certain) doesn't change the fact that it breaks compat
<Bluddy[m]>
Drup: This is an instant migration from new -safe-syntax code to old -unsafe-syntax code. Any compiler can compile -safe-syntax code easily. That's what I'm saying.
<Bluddy[m]>
Of course the migration to -safe-syntax should be manual/requires better tooling.
<Bluddy[m]>
Maybe I should clarify that in the PR.
copy` has joined #ocaml
<companion_cube>
Drup: depends on the style
<companion_cube>
if you have lots of nested matches, well, begin…end everywhere
<Drup>
Bluddy[m]: except that you are mistaken about what backward compatibility is about
<Bluddy[m]>
Drup: I understand I'm breaking backwards compatibility. That's not what I'm addressing here.
<Drup>
your answer is simply "well, it doesn't matter to be backward compatible, we just have to provide something to ease transition", which is not really an answer
ocaml242 has joined #ocaml
silver_ is now known as silver
ocaml242 has quit [Client Quit]
orbifx has joined #ocaml
ChristopheT has joined #ocaml
ChristopheT has quit [Client Quit]
<companion_cube>
Drup: on the other hand a switch -unsafe-syntax could be provided, same as -safe-string
<companion_cube>
(which is already a large breaking change)
<Bluddy[m]>
Drup: If every build tool can detect the OCaml version, and convert files on the fly using a simple sed command (or the simple OCaml alternative) is it a big problem?
shinnya has quit [Ping timeout: 244 seconds]
ChristopheT has joined #ocaml
<Bluddy[m]>
You don't need any fancy tooling to convert safe-syntax to unsafe-syntax. That's my point. It's a trivial change, and this means that even if every project today converts to safe-syntax, they'll still be buildable with old OCaml versions stuck in LTS releases and such.
phasip has quit [Quit: Page closed]
Mercuria1Alchemi has quit [Ping timeout: 252 seconds]
<companion_cube>
you'd have to modify the build process though
<companion_cube>
which might be annoying
<pierpa>
"The thing is that experienced users won't see the benefits of the new syntax and will actually suffer from it"
<pierpa>
sigh
<pierpa>
:)
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
<pierpa>
there's no hope. Just realize this.
<companion_cube>
I don't know, do experienced users here think this has no benefit?
<sspi>
Drup: you here? I saw your comment on my Reason JSX PR :)
<sspi>
I was wondering if you had advice for me on how not to mess things up, besides using PPX instead
<Drup>
I'm always here.
<sspi>
(I know :P)
* Drup
haunts the IRC channel.
* pierpa
thinks drup actually is 4 twin brothers
<Drup>
sspi: I didn't know you were SanderSpies.
<Drup>
Frankly, my advice at this point would just be to improve tyxml's ppx instead :/
<Bluddy[m]>
So typical of yallop to burst my bubble :)
<Drup>
sspi: regardless if you want to use tyxml underneath, you probably want to use something like markup and adopt a similar quoting mecanism as the one we did for tyxml
<companion_cube>
well, the compatibility tool from unsafe to safe, could also do safe to unsafe
<companion_cube>
it would "just" have to embed both parsers :D
noddy has joined #ocaml
seangrove has joined #ocaml
<gasche>
we can use the ppx or camlp4 machinery to process newer-ocaml-syntax code and output a binary AST that an older compiler understands (with correct location information etc.)
<gasche>
this requires plumbing (downgrading functions from new parsetree to old parsetrees) but it's a generic tool
tane has quit [Quit: Verlassend]
lol-icon has quit [Read error: Connection reset by peer]
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.40/20160120202951]]
pyon has joined #ocaml
Denommus has joined #ocaml
pyon is now known as lol-icon
ChristopheT has quit [Ping timeout: 258 seconds]
dexterph has quit [Ping timeout: 250 seconds]
SpiceGuid has joined #ocaml
<sspi>
Drup: tyxml looks nice and could probably also be changed to fit our purpose, however I believe the JSX syntax a certain appeal that I like to keep :-) (and yes, I'm biased here)
<sspi>
it's also not clear to me how to pass attributes from tyxml to plain OCaml code (eg. I can do <Foo bar=true /> with JSX which translates to Foo.createElement ~bar:true [])
Denommus has quit [Quit: going away]
pierpa has quit [Ping timeout: 276 seconds]
groovy2shoes has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
dexterph has joined #ocaml
slash^ has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.40/20160120202951]]
larhat1 has quit [Quit: Leaving.]
shinnya has joined #ocaml
struk|desk has quit [Read error: Connection reset by peer]
<dave24>
does caml_startup behave different in a shared object? Or does it do exactly the same things?
sepp2k has joined #ocaml
<seangrove>
I can't quite figure out how to call window.setTimeout in jsoo. Anyone have an example?
jeffmo has quit [Quit: jeffmo]
gasche has quit [Remote host closed the connection]
<Algebr`>
also how did it happen that there is OCamlbuild AND Ocamlbuild modules
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
toolslive has quit [Ping timeout: 264 seconds]
toolslive has joined #ocaml
zpe has joined #ocaml
seangrove has joined #ocaml
zpe has quit [Remote host closed the connection]
<Drup>
sspi: which purpose are you refering to ? I would realy like a set of concrete things you want to do that are not possible currently
noddy has quit [Quit: "it's a bit backwards around here"]
rgrinberg has quit [Quit: WeeChat 1.5]
AltGr has left #ocaml [#ocaml]
rgrinberg has joined #ocaml
zpe has joined #ocaml
rand__ has joined #ocaml
<sspi>
Drup: it's basically connecting React with Reason, JSX is a logical step in this process
<Drup>
why would you want to connect a javascript rendering library with an alternative ocaml syntax ?
<Algebr`>
because it makes using the libray concise and easy
<Drup>
Algebr`: if there are other ways, which doesn't compromise separation of concern, it would probably better to use them
<Drup>
I know it's a bit tendancy lately to add billions of special purpose syntaxes in languages (let's put xml literals, then sql strings, then, then)
<Algebr`>
actually I was looking at ripping out tyxml's ppx
<Drup>
Ah, that would be fine by me
<Algebr`>
but replacing the markup usages with function calls to reactjs bindings
<Algebr`>
but where anntron
<Algebr`>
aantron
<Algebr`>
that I think would be easiest and fastest, in a way.
<Drup>
I still think we should have a tyxml thing for your reactjs binding, but I really don't have time to look at it now
<Algebr`>
that's what I'm saying
<Drup>
hum, is it ?
<Algebr`>
most of the effort i think is there and well done, just replace using markup.ml with function calls to reactjs bindings
<Drup>
markup.ml is the parser, you need it ... to parse
<Algebr`>
I mean more about identifiying [%html [<div id="123"]]
<Algebr`>
html and div id
<Algebr`>
those things I need a handle on
<Drup>
yes, that's markup's job
<Algebr`>
right but couldn't they also be %div %id
<Algebr`>
instead of something to be parsed
<Drup>
I'm not sure I understand what you are trying to say
<Algebr`>
hmm, nvm, maybe i don't either. jumping through all these languages/syntaxes hurt my brain
<Drup>
yeah, that's why I like the simple solution
<Drup>
normal ocaml/reason + html quotations with ppx
<Drup>
you put html in the quotations, nothing special here
<Drup>
and then it emits function calls (to Tyxml combinators)
<Drup>
you can then obtain tyxml combinators for any structure, given you can implement the right module signature
<Drup>
it's flexible, extensible and concerns are separated
<Algebr`>
it won't work
<Algebr`>
because the tyxml_ppx won't let me put arbitrary expressions in the syntax
<Drup>
or do you mean being able to put non-html tags, such as <Foo ...> directly in the html ?
<Algebr`>
yes too
<Drup>
that second thing, we considered did, and decided it to not do it at first
<Algebr`>
what about [<div onClick=(fun _ -> 123)]
<Drup>
considered it*
<Drup>
yeah, that works too
<Algebr`>
hmmmm
<Drup>
the non-html tags, it's something we were planning to revisit for subsequent versions
darkf has quit [Quit: Leaving]
octachron has joined #ocaml
wtetzner has joined #ocaml
ggole has quit [Ping timeout: 260 seconds]
<Algebr`>
in myocamlbuild.ml, you can do, there's flag ["c"; "compile"] for compiling and that invokes ocamlc, which ones invokes ocamlopt? its at the linking stage, is that like flag ["l"; "link"]?
trystero is now known as tristero
unbalancedparen has joined #ocaml
SpiceGuid has joined #ocaml
toolslive has quit [Ping timeout: 264 seconds]
wtetzner has quit [Remote host closed the connection]
johnelse has joined #ocaml
<octachron>
Algebr`, I think ocamlopt is chosen through the "native" tag (?)
<Algebr`>
well I mean I can do what oasis does with CCOpt with flag ["c"; "compile"]
<Algebr`>
what is the equivalent for CClib
johnelse has quit [Ping timeout: 240 seconds]
strykerkkd has joined #ocaml
toolslive has joined #ocaml
jeffmo has quit [Quit: jeffmo]
ollehar has joined #ocaml
<ollehar>
anyone knows about an llvm lib for ocaml where llvm ir represented as adt get compiled?
<ollehar>
in my compiler I went from typed ast immediately to using the llvm api by whiteshark. I think a middle layer between those two would be good. :P
slash^ has quit [Read error: Connection reset by peer]
<johnkeates>
ocamlfind: Package `threads' not found
<johnkeates>
context: I'm using xenserver-buildroot on Debian Jessie to compile Xen as it's a dependency for yet another Xen project, the Xen-API (XAPI) which is also written in OCaml
<johnkeates>
the part that it breaks on is when building libre-ocaml-1.2.2
<johnkeates>
it configures fine, but then fails when checking for threads availability
<ollehar>
package?
<ollehar>
did you google the error message?
<johnkeates>
yes
<johnkeates>
it's generic, but I'm not familiar enough with ocaml to know where to start checking on why it might not find threads
<johnkeates>
now, I know ocamlfind is used to figure out what ocaml components are where
<johnkeates>
but what i don't know is why it's not finding threads while it's installed
wolfcore has quit [Ping timeout: 264 seconds]
<ollehar>
I didn't think thread was a package. :P
<ollehar>
which ocaml version?
<ollehar>
big program, big makefile?
<johnkeates>
yes
<ollehar>
can you paste the compilation line that fails?
<johnkeates>
basically, it's a huge project, with a ton of spec files, it's using shell scripts, and omake via pbuilder inside cowbuilder
<johnkeates>
the thing i'm doing is not hugely supported, which is also why i'm doing it, XenServer as a distribution is CentOS/RHEL based, but there is support for Debian in the built root, it's just not kept up-to-date, so that's why i started hacking on it
wolfcore has joined #ocaml
luzie has quit [Quit: WeeChat 1.5-rc1]
<ollehar>
johnkeates: do `locate thread.cmx`
<ollehar>
but thread != threads
<ollehar>
maybe you should report an issue to the project owner?
<johnkeates>
well, i don't think citrix wants to have a chat
<johnkeates>
unless $$$
<ollehar>
why?
<ollehar>
no support?
<ollehar>
what does grep threads give?
<ollehar>
in the src
orbifx has joined #ocaml
<johnkeates>
i'm not sure yet, the src is 190MB
<johnkeates>
the sources are from Xen, which is now a Linux Foundation project, but commercially supported by Citrix, which used to have the closed source XenServer which is now open source
<mrvn>
have you tried building it on centos?
<johnkeates>
yes, that works
<johnkeates>
but i'm porting build root to debian
<mrvn>
johnkeates: so do they have a threads.cmx?
<johnkeates>
yes
<johnkeates>
well, it's /usr/lib/ocaml/process/threads.cmxa and /usr/lib/ocaml/threads/threads.cmxa and there is a cothreads version too