rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Haudegen has quit [Quit: Bin weg.]
anpad has joined #ocaml
alfiee has joined #ocaml
pi3ce has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
dh` has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
casastorta has quit [Remote host closed the connection]
casastorta has joined #ocaml
malte has quit [Read error: Connection reset by peer]
malte has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
<tetrislife>
Just curious. Why don't caching implementations be pessimistic? All threads that don't find it in the cache compute it redundantly, but queries will start succeeding once one of them updates the cache.
<tetrislife>
String interning seems to be more constrained, since it returns deduplicated IDs and can't be computed in the threads. Maybe also have thread-local IDs initially pointing to local string copies and later pointing to interned strings.
kron has quit [Quit: kron]
kron has joined #ocaml
<discocaml>
<passerby0296> Hello everyone. Here's a piece of my code
<discocaml>
<passerby0296> Is it possible to generalize it to an arbitrary amount of elements, i.e. write an implementation for match case "LLTuple elements" . Kind of hard to wrap my hand around CPS.
<discocaml>
<passerby0296>
<discocaml>
<passerby0296> If you need more context, ask!
<discocaml>
<passerby0296> Hello everyone. Here's a piece of my code
<discocaml>
<passerby0296> Is it possible to generalize it to an arbitrary amount of elements, i.e. write an implementation for match case "LLTuple elements" . Kind of hard to wrap my hand around CPS.
<discocaml>
<passerby0296>
<discocaml>
<passerby0296> Here's the closests I've come to
<discocaml>
<passerby0296>
<discocaml>
<passerby0296> ```
<discocaml>
<passerby0296> | LLTuple elems ->
<discocaml>
<passerby0296> let rec process_elems env elems acc =
gentauro has quit [Read error: Connection reset by peer]
alfiee has joined #ocaml
gentauro has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
y331 has joined #ocaml
ds-ac1 has quit [Ping timeout: 272 seconds]
olle has joined #ocaml
Haudegen has joined #ocaml
alfiee has joined #ocaml
bartholin has joined #ocaml
alfiee has quit [Ping timeout: 265 seconds]
ds-ac1 has joined #ocaml
bartholin has quit [Quit: Leaving]
<discocaml>
<octachron> The issue is probably `return (List.rev acc)` which is leaking the `imm` variable outside of the context of the `anf_expr` call, you want to call a continuation here.
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 248 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
mange has quit [Remote host closed the connection]
agentcasey_ has quit [Ping timeout: 248 seconds]
Haudegen has quit [Quit: Bin weg.]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
agentcasey_ has joined #ocaml
agentcasey_ has quit [Ping timeout: 248 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
y331 has quit [Ping timeout: 260 seconds]
agentcasey_ has joined #ocaml
Haudegen has joined #ocaml
Inline has joined #ocaml
boozec has joined #ocaml
boozec has quit [Client Quit]
boozec has joined #ocaml
boozec has quit [Client Quit]
spynx has joined #ocaml
spynxic has quit [Read error: Connection reset by peer]
boozec has joined #ocaml
boozec has quit [Client Quit]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 246 seconds]
agentcasey_ has quit [Remote host closed the connection]
<discocaml>
<_4ad> tetrislife: if you do string interning for performance (caching), you can do something like that. in my case the algorithm requires that failure in physical equality implies the strings are different.
<discocaml>
<_4ad> and I can't change the algorithm really, because it relies on doing only atomic instructions. so something a pointer size must fully determine a string.
mbuf has joined #ocaml
terrorjack45 has quit [Ping timeout: 265 seconds]
agentcasey has quit [Quit: ZNC 1.10.x-git-27-bfd731cf - https://znc.in]
<discocaml>
<purringhutao> I'm having some issues with ocamlmklib. When do I need to pass -cclib? -cclib means that when executables are linked to the library, the C library flags are passed along, right?
<discocaml>
<octachron> First question, why are you using ocamlmklib?
<discocaml>
<purringhutao> I'm trying to modify the CMakeFiles in LLVM, which use ocamlmklib for building the OCaml bindings
alfiee has joined #ocaml
<discocaml>
<purringhutao> But I arrived at an issue where I can't get the C++ standard library linked in properly no matter what I do
mbuf has left #ocaml [Leaving]
alfiee has quit [Ping timeout: 245 seconds]
<discocaml>
<octachron> As far as I can see, you don't need `-cclib` at all with ocamlmklib. Using `-l<lib>` flag is enough.
<discocaml>
<octachron> But yes `-cclib` and `-ccopt` options are recorded inside the cma/cmxa files.
pi3ce has quit [Read error: Connection reset by peer]
<discocaml>
<octachron> No they are the same? The code that you linked is merely collecting the arguments before sending them to ocamlc/ocamlopt.
<discocaml>
<purringhutao> Okay, I misread. There's c_libs and caml_libs, but both get the -cclib prefixed
<discocaml>
<purringhutao> Is there anything functionally different between -lfoo and -cclib -lfoo for ocamlmklib?
<discocaml>
<purringhutao> For some reason, the CMakeFile is giving different build output depending on whether I add -cclib
<discocaml>
<purringhutao> Even though the flag `-lstdc++` is passed, I get errors that look like `.text._ZN4llvm10DataLayout5clearEv+0xe6): undefined reference to operator delete(void*)`
<discocaml>
<purringhutao> When building the final executable
<discocaml>
<purringhutao> I have trouble understanding when to use -cclib when using ocamlmklib, but adding it or leaving it out gives different results
ygrek has joined #ocaml
alfiee has joined #ocaml
<discocaml>
<contificate> @passerby0296 A nice way to solve the problem of ANF-converting an arbitrary number of things (a list), when the normalisation routine is in CPS, is to fold a closure. E.g. you begin with an initial value `value list -> anf` whose body creates the normalised ANF tuple (using the `k` from the outside). Then, you fold each expression (of the tuple) into it and the accumulate a closure. Each intermediary closure converts one element and then
alfiee has quit [Ping timeout: 252 seconds]
<discocaml>
<contificate> Seems you've done that - sorry, I only glanced over the code initially.
keyboard has quit [Quit: keyboard]
Haudegen has quit [Quit: Bin weg.]
alfiee has joined #ocaml
olle has quit [Ping timeout: 272 seconds]
alfiee has quit [Ping timeout: 260 seconds]
f[x] has joined #ocaml
alfiee has joined #ocaml
ygrek has quit [Remote host closed the connection]
user_ has quit [Remote host closed the connection]
fmira has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
agentcasey has joined #ocaml
Serpent7776 has quit [Ping timeout: 248 seconds]
agentcasey has quit [Read error: Connection reset by peer]
keyboard has joined #ocaml
end has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
agentcasey has joined #ocaml
bcksl has quit [Ping timeout: 265 seconds]
Absalom has quit [Ping timeout: 252 seconds]
agentcasey has quit [Read error: Connection reset by peer]
agentcasey has joined #ocaml
copy has quit []
copy5 is now known as copy
agentcasey_ has joined #ocaml
agentcasey has quit [Ping timeout: 272 seconds]
bcksl has joined #ocaml
end has joined #ocaml
alfiee has joined #ocaml
agentcasey_ has quit [Ping timeout: 245 seconds]
agentcasey has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
agentcasey has quit [Read error: Connection reset by peer]
agentcasey has joined #ocaml
bartholin has joined #ocaml
_alix has quit [Ping timeout: 260 seconds]
whereiseveryone has quit [Ping timeout: 260 seconds]
_alix has joined #ocaml
GreaseMonkey has quit [Ping timeout: 260 seconds]
greaser|q has joined #ocaml
whereiseveryone has joined #ocaml
greaser|q has quit [Changing host]
greaser|q has joined #ocaml
greaser|q is now known as GreaseMonkey
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 246 seconds]
<discocaml>
<gooby_diatonic> How can I get the `Location` module from `Compiler_libs` available in a dune-built project? Ignoring the fact I maybe shouldn't use it in the first place
<discocaml>
<gooby_diatonic> In utop it works with `#load "compiler-libs/ocamlcommon.cma";;` but can't seem to get it to work with dune, despite trying with `(libraries compiler-libs)` and `(libraries compiler-libs.common)`
<discocaml>
<octachron> `(libraries compiler-libs.common)` should work . What issues are you observing?
alfiee has joined #ocaml
<discocaml>
<gooby_diatonic> The module just isn't found, `Error: Unbound module Compiler_libs`. Now, I realised that maybe the library just makes the module `Location` available bare, without the `Compiler_libs` wrapper, in which case the issue for me was that ppxlib's `Location` was shadowing it
<discocaml>
<octachron> The compiler-libs are not wrapped.
<discocaml>
<octachron> And you should not mix the vanilla compiler-libs with ppxlib
<discocaml>
<octachron> (too many rooms for mistakes)
<discocaml>
<gooby_diatonic> I realised that ppxlib provides their own `Location.print` which I think works for my scenario, but it's good to know about compiler libs for the future 🙏 Thanks for the answer
alfiee has quit [Ping timeout: 252 seconds]
y331 has joined #ocaml
y331 has quit [Client Quit]
Inline has quit [Quit: Leaving]
f[x] has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
Inline has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
rgrinberg has joined #ocaml
spynx is now known as spynxic
f[x] has joined #ocaml
YuGiOhJCJ has joined #ocaml
Serpent7776 has quit [Ping timeout: 260 seconds]
Tuplanolla has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]