<Drup>
1) I know the author 2) eliom is cited in the state of the art :p
Tekk_ has joined #ocaml
Bluddy has quit [Quit: Connection closed for inactivity]
thizanne has quit [Ping timeout: 250 seconds]
alkoma` has joined #ocaml
alkoma` has quit [Remote host closed the connection]
hugomg has quit [Quit: Leaving]
michael_lee has joined #ocaml
<artagnon>
whitequark: The feature is basically done; for some reason the function gets executed automagically.
<artagnon>
So, without link_gc_components, it works just as well.
<whitequark>
static initializer perhaps?
<artagnon>
I'm not sure what it is.
<artagnon>
When I remove the call to LLVMGCLinkComponents from link_gc_components, it's not initialized anymore.
<artagnon>
I should probably send you the diff.
<artagnon>
I've been looking over this for too long.
<Tekk_>
Could someone explain why it's permissible to append a list of a to the end of a new list of as, but not in the middle? 1 :: 2 :: [3] vs 1 :: [2] :: 3
<Tekk_>
the former is fine, yet the latter complains about an 'a list where an int was expected
<artagnon>
Tekk_: The type of (::) is 'a -> 'a list -> 'a list
<artagnon>
You're trying to give it 'a list -> 'a in the second example.
<artagnon>
'a is int here, if you're finding that hard to read.
michael_lee has quit [Ping timeout: 256 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
<Tekk_>
yeah
<Tekk_>
OH
* Tekk_
thought that :: worked with 'a there
<Tekk_>
is there any way to look at the type of something from the repl?
manizzle has quit [Ping timeout: 244 seconds]
<Tekk_>
like :t with ghci I guess
<rgrinberg1>
Tekk_: typing in the expression should be enough to print the type
<artagnon>
whitequark: Any leads on how to sidestep the static initializer issue?
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
<whitequark>
I'm not sure what is the issue
<artagnon>
So, if there is a caller to the cpp file or a #include to the header file somewhere in the codebase, the values contained within are initialized at startup.
manud_ has quit [Ping timeout: 264 seconds]
<artagnon>
We're trying to control which static variables will be instantiated at runtime.
<artagnon>
The issue is that it's decided immediately during the compile.
<artagnon>
The "runtime" control we have in the cpp world is to #include a header (which is a preprocessor directive; decided at compile time)
<whitequark>
look at how LLVMInitializeNativeTarget works
rgrinberg has quit [Read error: Connection reset by peer]
samrat has quit [Ping timeout: 252 seconds]
samrat has joined #ocaml
larhat has joined #ocaml
kandu_ has quit [Ping timeout: 244 seconds]
Pepe_ has quit [Ping timeout: 250 seconds]
Pepe_ has joined #ocaml
natrium1970 has joined #ocaml
<natrium1970>
In the Janestreet performance notes, one suggestion is to “ry to avoid writing functions that have free variables - instead pass all the arguments explicitly.” I’m not sure I understand what a “free variable” means in this context. I know what it means in predicate logic.
rgrinberg1 has quit [Quit: Leaving.]
<acieroid>
natrium1970: eg. let foo x = let bar y = x + y in bar 3, bar has x as free variable
rgrinberg has joined #ocaml
kandu has joined #ocaml
<natrium1970>
acieroid: And the alternative is to pass foo’s x into bar as a parameter, I guess. Is one or the other considered better style? The Janestreet also mentions that some of their performance suggestions might conflict with good programming style, but I’m not sure if that’s one of those cases.
sinelaw has joined #ocaml
<sinelaw>
hi. with -rectypes, how does the type inference avoid infinite loops?
<acieroid>
natrium1970: yup I would say that passing foo's x is a performance trick that doesn't really conform with good style
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<sinelaw>
Where can I see ocaml PRs?
rgrinberg has quit [Read error: Connection reset by peer]
<sinelaw>
(the change log mentions fixes as "PR#3999" etc.)
<natrium1970>
On the other hand, I kind of like the idea that a function depends only on the values passed to it.