AnAverageHuman has quit [Ping timeout: 256 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
caltelt_ has joined #ocaml
nullifidian_ has quit [Ping timeout: 245 seconds]
nullifidian has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
barockobamo has joined #ocaml
flodin has quit [Remote host closed the connection]
barockobamo2 has joined #ocaml
barockobamo has quit [Ping timeout: 245 seconds]
Birdface has joined #ocaml
caltelt_ has quit [Ping timeout: 245 seconds]
Birdface has quit [Client Quit]
Birdface has joined #ocaml
Keodedad has quit [Remote host closed the connection]
barockobamo2 has quit [Remote host closed the connection]
barockobamo has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody>
So, I have a circular build detected by ocaml
<SomeDamnBody>
And I can't find where it is
<SomeDamnBody>
There's absolutely no mention of any module that is talked about on the command line
themsay has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
dmtd has joined #ocaml
Haudegen has joined #ocaml
sonologico has joined #ocaml
kvda has joined #ocaml
<def`>
SomeDamnBody: what is the error message?
kjak has quit [Ping timeout: 245 seconds]
andrewlitteken has quit [Quit: Connection closed for inactivity]
<SomeDamnBody>
Circular dependencies: xyz already seen in [ "abc"; "xyz" ]
<SomeDamnBody>
def` ^
SomeDamnBody has quit [Ping timeout: 245 seconds]
barockobamo has quit [Remote host closed the connection]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
barockobamo has joined #ocaml
freyr69 has joined #ocaml
madroach has joined #ocaml
kvda has joined #ocaml
mfp has joined #ocaml
crowley95 has quit [Ping timeout: 255 seconds]
crowley95 has joined #ocaml
dmtd has quit [Quit: Connection closed for inactivity]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu has joined #ocaml
sz0 has joined #ocaml
kakadu has quit [Ping timeout: 245 seconds]
kakadu has joined #ocaml
sagax has quit [Ping timeout: 268 seconds]
<flux[m]>
otini: you've found a subtle part of ocaml memory model
<flux[m]>
otini: `type t = T of string * int` and `type t = T of (stirng * int)` are actually represented differently
<flux[m]>
so in the latter case it's not possible to put reference to x inside T, you must put two separate values
<flux[m]>
oops, I mean in the former case, such as in your example
<flux[m]>
if you use the latter syntax your code works
<flux[m]>
personally I wouldn't mind if the semantics were changed to be the same and you would need ie [[@unboxed]] to express that code
silver has joined #ocaml
zolk3ri has joined #ocaml
Haudegen has quit [Remote host closed the connection]
<flux[m]>
yes
ggole has joined #ocaml
<sonologico>
Using ctypes, I'm calling a c function that does something in a while loop. If I would like to run it in parallel with my own code, should Lwt_preemptive.detach be enough or do I need to write a c wrapper that starts the loop in a separated thread before returning?
<flux[m]>
if you C function doesn't access OCaml heap, then it should also release the OCaml GC lock. I don't recally what .detach does, but I guess it's applicable.
<sonologico>
my c function is from a library I don't control, so I would have to wrap it to release the lock then
<flux[m]>
yes
<flux[m]>
but you must not access ocaml-allocated heap during that function, as if OCaml GC can run, it can move the data
<flux[m]>
so you may need to do some copies to C heap before or so
jnavila has joined #ocaml
<sonologico>
that is the case already, thankfully
<def`>
releasing the lock will let another OCaml thread runs concurrently.
<def`>
Lwt_preemptive.detach provides a high-level API to create that thread and let the lwt scheduler runs other stuff
<sonologico>
ah, just notice that foreign from ctypes has a release_runtime_lock parameter
<sonologico>
thanks, flux[m] and def`
<sonologico>
detach + releasing the lock with the foreign parameter did the trick (:
<flux[m]>
what are you doing if you don't mind? long-running C functions always sound serious business ;-).
<sonologico>
controlling an audio synthesizer, which is the thing running in the second thread
kjak has joined #ocaml
<flux[m]>
sounds cool!
<def`>
yep :)
<sonologico>
I'll share it once it gets usable
<sonologico>
I'm hoping to use it to perform at the end of the month, so it has to be somewhat usable by then
<def`>
yes please keep us posted, I am looking forward to it
Haudegen has joined #ocaml
<Leonidas>
I just applied ocamlformat 0.9 to our codebase and it shaved off 600 LOC <3
<Leonidas>
(in all fairness, they were all introduced by 0.8)
Birdface has quit [Remote host closed the connection]
Birdface has joined #ocaml
xuib has joined #ocaml
xuib has quit [Quit: xuib]
<companion_cube>
:DDD
jao has joined #ocaml
freyr69 has quit [Ping timeout: 244 seconds]
xorpse has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
freyr69 has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
AnAverageHuman has joined #ocaml
lukky513 has quit [Ping timeout: 246 seconds]
al-damiri has joined #ocaml
ygrek has joined #ocaml
FreeBirdLjj has joined #ocaml
<spew>
tr '\n' ' '
<spew>
worked wonders on my code base
AnAverageHuman has quit [Ping timeout: 256 seconds]
freyr69 has quit [Ping timeout: 244 seconds]
jaar has joined #ocaml
AnAverageHuman has joined #ocaml
SomeDamnBody has joined #ocaml
barockobamo has quit [Remote host closed the connection]
<SomeDamnBody>
Hey I'm looking for the source of a circular dependency
<SomeDamnBody>
I can't see it from my own personal knowledge of the code.
<octachron>
SomeDamnBody, self-advertisement: you can try codept (aka opam install codept) and see if it can find the cycle
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
okuu has joined #ocaml
AtumT has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
smondet has joined #ocaml
AnAverageHuman has joined #ocaml
jnavila has joined #ocaml
smondet has quit [Quit: leaving]
smsm has joined #ocaml
keep_learning has quit [Remote host closed the connection]
smsm has quit [Quit: leaving]
<SomeDamnBody>
octachron, how do I use codept?
<octachron>
If you have your source file in src: "codept src" should report any dependency cycle that it founds in ml/mli files in src (maybe with -no-alias-deps)
smondet_ has joined #ocaml
smondet_ has quit [Client Quit]
AnAverageHuman has quit [Ping timeout: 256 seconds]
<smondet>
starts a C thread controlled by Jackd in parallel of the ocaml side
<smondet>
(it was written long before the ctypes library so it's old-school FFI)
okuu has quit [Ping timeout: 245 seconds]
<octachron>
SomeDamnBody, if codept outputs all dependencies, there should not be any real circular dependency at the module level.
<octachron>
It might be that ocamldep over-approximations are misleading your build system, this can happen if you have submodules/module name collisions.
<octachron>
(e.g a file "a.ml" which defines a submodule "B" and a file "b.ml" that opens "A" and then access "A.B" with just "B")
xorpse has joined #ocaml
okuu has joined #ocaml
AnAverageHuman has joined #ocaml
Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<SomeDamnBody>
Oh hmm
<SomeDamnBody>
octachron, that sounds like what it is
assemblyman has joined #ocaml
jaar has quit [Ping timeout: 245 seconds]
kakadu has quit [Quit: Konversation terminated!]
jnavila has quit [Ping timeout: 258 seconds]
<Ankhers>
Would someone that considers themselves good with algorithims help me with something? I would be willing to pay if we manage to get a working solution.
jnavila has joined #ocaml
<SomeDamnBody>
Thank you octachron, I believe that fixed it.
<SomeDamnBody>
Ankhers, yeah what have you got?
<SomeDamnBody>
Well shit, it didn't fix it
<Ankhers>
SomeDamnBody: Essentially I am trying to create a graph of a production line. You have X resources going in, you have Y parts coming out. I believe I have that (mostly) working. The trouble I am having is coming from when I'm trying to make the system "perfect", (i.e., no extra parts produced). In order to help with that, there are "splitters" and "mergers" that will split and merge the various conveyers. But I am having trouble with
<Ankhers>
the splitting and merging logic. Does that sound like something you may be able to help with?
<Fardale>
This looks like factorio!
<Fardale>
And that sound like something I may be able to help with. But I will need more information to be sure
<Ankhers>
Fardale: In this particular case it is Satisfactory. But I also wanted to adapt it to factorio once I am done.
<Ankhers>
Fardale: What kind of information do you need?
<SomeDamnBody>
Sounds like a matching problem
<SomeDamnBody>
You could probably model it by making some augmentation to a graph before running a max-flow algorithm, and then interpreting the results.
<SomeDamnBody>
^ Ankhers
<Ankhers>
SomeDamnBody: I will look into that. Thanks.
FreeBirdLjj has quit [Remote host closed the connection]
okuu has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #ocaml
kakadu has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
ggole has quit [Quit: Leaving]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 250 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
AnAverageHuman has joined #ocaml
Keodedad has joined #ocaml
Keodedad has quit [Client Quit]
gravicappa has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
assemblyman has quit [Ping timeout: 245 seconds]
bartholin has quit [Remote host closed the connection]
okuu has joined #ocaml
FreeBirdLjj has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 246 seconds]
Netsu has quit [Ping timeout: 256 seconds]
okuu has quit [Ping timeout: 246 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
zolk3ri has quit [Remote host closed the connection]
AnAverageHuman has joined #ocaml
<sonologico>
smondet, thanks. I'll check it out
sagax has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
jao has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
keep_learning_M has quit [Ping timeout: 245 seconds]
kvda has joined #ocaml
jao has joined #ocaml
Birdface has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
smondet has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
jstolare1 has quit [Ping timeout: 245 seconds]
jstolarek has joined #ocaml
sonologico has quit [Ping timeout: 250 seconds]
kakadu has quit [Remote host closed the connection]
AnAverageHuman has quit [Ping timeout: 256 seconds]
smondet has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
nullifidian_ has joined #ocaml
nullifidian has quit [Ping timeout: 245 seconds]
j-r has joined #ocaml
FreeBirdLjj has joined #ocaml
keep_learning has joined #ocaml
silver_ has joined #ocaml
silver has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]