adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
Haudegen has quit [Remote host closed the connection]
al-damiri has quit [Quit: Connection closed for inactivity]
pierpal has joined #ocaml
brettgilio has quit [Quit: Konversation terminated!]
pierpal has quit [Ping timeout: 252 seconds]
jao has quit [Ping timeout: 245 seconds]
KeyJoo has quit [Ping timeout: 245 seconds]
silver has quit [Read error: Connection reset by peer]
neatonk has quit [Ping timeout: 245 seconds]
mfp has quit [Ping timeout: 246 seconds]
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 240 seconds]
tokomak has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
dedgrant has quit [Quit: Leaving]
cobax has quit [Ping timeout: 250 seconds]
Eskatrem has quit [Remote host closed the connection]
pierpal has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
brettgilio has joined #ocaml
caltelt has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<sshine> reynir, cool§
<sshine> is there a neater way to write: List.filter ~f(fun (foo, bar) -> bar > 0)?
<sshine> whoops, ~f:
brettgilio has quit [Read error: Connection reset by peer]
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 252 seconds]
jbrown has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
Rosslaew has joined #ocaml
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
KeyJoo has joined #ocaml
brettgilio has joined #ocaml
thomas_scrace has joined #ocaml
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
thomas_scrace has quit [Ping timeout: 252 seconds]
brettgilio has quit [Quit: Konversation terminated!]
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
sz0 has joined #ocaml
trochdewei has joined #ocaml
trochdewei has quit [Quit: Leaving]
TC01 has quit [Ping timeout: 244 seconds]
TC01 has joined #ocaml
zlsyx has quit [Quit: Leaving...]
orbifx has joined #ocaml
bartholin has joined #ocaml
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
AltGr has joined #ocaml
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
Haudegen has joined #ocaml
sagotch has joined #ocaml
AltGr has quit [Disconnected by services]
freyr69 has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
<sagotch> I guess that it has already been discussed many time, but why isn't there a Array.make without values initialization? (Like Array.create_float)
<sagotch> I guess it would be okay to pass a dummy value to get the needed length.
c4rc4s_ has joined #ocaml
c4rc4s has quit [Read error: Connection reset by peer]
c4rc4s_ is now known as c4rc4s
<def`> sagotch: because it would be unsound?
<sagotch> unsound?
<def`> let x = Array.make_without_init 1 in x.(0)
<ZirconiumX> Uninitialised variables, I think def` means
<gikiam> UNDEFINED BEHAVIOR
<gikiam> :>
<gikiam> not exactly
<sagotch> Just dont write this
<def`> lol
<ZirconiumX> That's not a solution
<ZirconiumX> Which is why it doesn't exist
<ZirconiumX> Alternatively you can turn the initialisation function into useful logic
<def`> also it is not possible to implement in presence of float array specialization
<sagotch> I am turning a hashtbl into an associative array. I cannot use init
<sagotch> why float array specialization is a problem?
<reynir> one way of "just dont write this" is to make it impossible
_andre_ has joined #ocaml
_andre has quit [Ping timeout: 264 seconds]
nicoo has quit [Ping timeout: 250 seconds]
nicoo has joined #ocaml
<sagotch> I known, and I agree, but this is okay to have unsafe operation (unsafe getter and setters are available) if you know what you are doinf
<def`> if you know what you are doing, then just use Obj.magic()
<sagotch> def`: it would be Array.make_without_init 1 [], so type and length are known,
<def`> what does that mean?
<sagotch> I don't get the unsound problem
<def`> My expression above has type 'a, for any 'a, that's what unsound means.
<ZirconiumX> The whole point of the type system is to make illegal states unrepresentable
<sagotch> yes, but with a dummy parameter you know the type of the array
<def`> Then just use Array.make ?
<ZirconiumX> And if you have a dummy parameter, you might as well use it to initialise something
<def`> If you ignore unsoundness issues, float array specialization means that an array has a different representation in memory if it stores float. There is a representation for float, and one for anything-but-float.
<def`> Here you would have some causality breaks because the representation would have to be chosen when the type of the array becomes known (that does not make much sense :)).
<def`> which can happen (dynamically) arbitrarily long after allocations in you rmodel.
<sagotch> In some (many?) cases, this https://github.com/ocaml/ocaml/blob/trunk/runtime/array.c#L342 is unnecessary
<emily> have you profiled it as being a bottleneck in your application?
<sagotch> Of course that it will never be a bottleneck
<emily> hard to justify adding unsafety (potentially to the level of a security vulnerability) for something that will never be a bottleneck
<def`> sagotch: what are you trying to achieve? You have a dummy value but you just want to skip the initialization?
<sagotch> Yes
<def`> It won't change the asymptotic complexity of your program, so why bother?
<def`> The caml_initialize in your example could be made slightly more efficient, if that happens to be a bottleneck
<def`> Open a mantis issue.
<sagotch> "hard to justify adding unsafety (potentially to the level of a security vulnerability) for something that will never be a bottleneck"
<sagotch> That's true
<def`> There is one thing worrying about that caml_initialize, it seems easy to make the remembered set grow as big as the array that is being initialized with that, so it doubles the amount of work. That's a trade-off.
<def`> If you know the type is not going to be float and that you will not read an uninitialized field, then Array.make len (Obj.magic ()) is ok.
<def`> In your example, Array.make_without_init 1 [], [] is a constant so there is no initialization either.
<def`> (The whole buffer will be written, but it will be this case: https://github.com/ocaml/ocaml/blob/trunk/runtime/array.c#L337)
Bronsa has joined #ocaml
caltelt has quit [Ping timeout: 245 seconds]
thomas_scrace has joined #ocaml
<sagotch> Hum... in what case does it go through the final else loop?
<ZirconiumX> Does unit actually have a runtime representation, or is it completely elided by the type system?
<def`> for a block
<def`> "bla", (1,2), etc
<def`> ZirconiumX: unit is represented as the constant 1
<def`> The type system is just there to rule out incorrect program, types are not used to change runtime representation (even the float array specialization do not deal with types)
<def`> However, when unit is used like "void" would be in C, it is elided (because it does not have to be represented at all).
<ZirconiumX> TIL, thanks
<sagotch> So using ("", []) as a dummy value does run https://github.com/ocaml/ocaml/blob/trunk/runtime/array.c#L342 ? I do not understand`Is_block(init) && Is_young(init)` test,sry
<def`> No, ("", []) will be old at that point.
<def`> Using (String.make 0 ' ', []) will likely be young however.
<def`> The reason is that because ("", []) is a literal constant, the compiler will optimize it (it does not need to be allocated).
jao has joined #ocaml
Eskatrem has joined #ocaml
<Eskatrem> Hi, I am trying to compile a file, but `#load graphics.cma` at the first line is causing a syntax error
<_y> while i see the issue with type soundness, i feel that initializing your array with a dummy value is a “value hack” of the same order of magnitude as returning −1 instead of None
<_y> it may make you believe that your array is initialized whereas it actually isn’t, which may prevent you from catching bugs where you read a cell which has not been given a meaningful value yet
<_y> but i guess that for that, you would have to use a wrapper datatype “'a option array” with an exception‐raising “get” method, with a huge performance penalty
<sagotch> hum... a unitialized_array type could force you to use `Obj.magic` to use it as an array. You would then know that you should be very careful here.
<_y> a datatype which brings Obj.magic into normal use sounds like a very bad idea
<sagotch> def`: I should have understood it wrong, is Array.make n (String.make 0 ' ', []) likely to be faster than Array.make n ("", [])?
<_y> but well you may have array_of_uninitialized_array (wow, that’s so hard to spell) which would raise an exception if your array is not fully initialized
<sagotch> How would you known?
<_y> well as the implementor of your abstract datatype, you know how it is implemented :p
<def`> without float array specialization, it is possible to do the hack :P (with a special repr for "null")
<_y> either 'a option array, or terrible hacks around float arrays, or who-knows-what
<def`> sagotch: uhhh, it is too complicated to really say which one is faster. Just consider that caml_initialize is fast.
<def`> the other case does a minor collection.
mfp has joined #ocaml
<def`> Our discussion is quite pointless, these problems are not really relevant :P
<sagotch> C'est vrai
<sagotch> But I needed to know, sorry ^^
dacid has joined #ocaml
<_y> def`, which hack would be possible without the float array optimization, which is not possible today?
<def`> The truth is that reality is a bit more complex :) and I think this part could be marginally optimized, but hmm, that's not really worth the effort unless you come with a test case that really degenerates.
<emily> _y: i agree that constant initialisers for arrays are disappointing
<emily> rust manages to do a bit better in this area fwiw
<reynir> There's also Array.init
jaar has joined #ocaml
<_y> def`, i never looked into the GC, does it understand null pointers (NULL, as in zero),ç or would null pointers make it crash?
thomas_scrace has quit [Ping timeout: 252 seconds]
<def`> _y: null pointers make it crash, but that could be "fixed"
<Eskatrem> sorry, nobody can help me to compile a file where I load a module?
thomas_scrace has joined #ocaml
<Ulrar> Wait, you can't do "open X as Y" in ocaml ?
<Ulrar> Spent too much time on haskell ..
<ZirconiumX> File I/O in OCaml is fairly imperative
<Eskatrem> if I do `open Graphics;;` I get the compile error `Error: Could not find the .cmi file for interface graphics_test.mli.`. If I do `#loadd "graphics.cma"` it says I have a syntax error
<bartholin> #load
<Eskatrem> yes, #load
<Eskatrem> (not #loadd - the syntax error is at the first character anyway)
<bartholin> in the toplevel?
<Eskatrem> what do you mean, toplevel?
thomas_scrace has quit [Ping timeout: 250 seconds]
Haudegen has quit [Remote host closed the connection]
<bartholin> Eskatrem: on a terminal, type ocaml to launch the ocaml toplevel (the command-line ocaml interpreter).
<def`> Ulrar: module Y = X
thomas_scrace has joined #ocaml
<Eskatrem> bartholin: ah, in the interpreter it works, it's when I am trying to compile the file with ocamlc
<bartholin> ok
<Eskatrem> if I run "ocaml myfile.mli" it works
<Ulrar> def`: Oh right
<Ulrar> thanks
<sagotch> For graphics module, I think that youb should add graphics.cm(x)a to your compilation line
<bartholin> Eskatrem: ocamlc graphics.cma myfile.ml
<Eskatrem> bartholin: nope, that didnt work either
<Eskatrem> can I pass you the code in a pastebin? maybe I did something dumb and unrelated
<bartholin> ok
<def`> you have to compiler graphics_test.mli before compiling graphics_test.ml
<def`> -r
<Eskatrem> there you go: https://pastebin.com/djVBmWvi
<Eskatrem> def` with the program ocaml or ocamlc?
<bartholin> Eskatrem: remove the #load "graphics.cma" line (put it in your .ocamlinit file), then ocamlc graphics.cma file.ml -o program
<_y> def`, oh i see :-) if you use your datatype with immediate values (int, bool, …) will the GC be fine with the fact that you mix pointers and immediate values in an array?
<bartholin> (generated program name is what you write after -o)
<_y> also, i guess that you could add a dynamic check that the array returned by Array.make is not a float array, and throw Float_array_are_not_supported
<Eskatrem> bartholin: I have to compile the .mli file before that no? when running your instruction I get: "Error: Could not find the .cmi file for interface graphics_test.mli."
<bartholin> Eskatrem: is graphics_test.ml your source code file?
kini has quit [Remote host closed the connection]
<Eskatrem> bartholin: yes
<def`> _y: this test would have to take place in set
<bartholin> graphics_test.mli should be an empty file
<def`> _y: That's sketchy but ok with current implementation
<def`> :P
<Eskatrem> it's the code I put on pastebin. I removed the #load "graphics.cma" and put that in .ocamlinit
<bartholin> for now
<Eskatrem> ok, so I have my .ml file with the code. I create a .mli file with nothing in it, then I run `ocamlc graphics.cma graphics_test.ml -o program" ??
<bartholin> the .mli file is optional
<Eskatrem> ok, but when I do that, I get the error: "Error: Could not find the .cmi file for interface graphics_test.mli."
<bartholin> oh ok
<bartholin> Eskatrem: ocamlc graphics.cma graphics_test.mli graphics_test.ml -o program
kini has joined #ocaml
<Eskatrem> graphics_test.mli is empty?
<bartholin> yes
<Eskatrem> wow, that one worked
<bartholin> you put in the .mli file the stuff you declared in the .ml file (let () = ... does not count), so there is nothing.
sagotch has quit [Quit: Leaving.]
<bartholin> now you can do ./program
<Eskatrem> bartholin: do you know where to find about it - I googled before asking this stuff but I couldn't find anything
<xvilka> Eskatrem: just start with dune project from the beginning
<Eskatrem> what's a dune project?
<ZirconiumX> Dune is a build system
<xvilka> Eskatrem: buildsystem - https://github.com/mjambon/dune-starter
<Eskatrem> ok xvilka will check
<Eskatrem> so far I found ocaml quite neat and really fast, it's a shame it can be so complicated to build something
<xvilka> Eskatrem: it is not, with dune
<Eskatrem> xvilka: I believe you, but dune is not the default "ocaml builder"
<xvilka> Eskatrem: cargo is not default "rust builder" too, but everyone uses it. In OCaml it is similar
<Eskatrem> fair enough
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
sagotch has joined #ocaml
Rosslaew has quit [Ping timeout: 260 seconds]
neatonk has joined #ocaml
ziyourenxiang has joined #ocaml
sagotch has quit [Client Quit]
keep_learning has quit [Ping timeout: 252 seconds]
Rosslaew has joined #ocaml
<def`> yes, there was not a consensus until a few months ago, but since everybody agreed that dune is ocaml builder :P (fairly recent but lot of traction)
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
thomas_scrace has quit [Ping timeout: 245 seconds]
thomas_scrace has joined #ocaml
<_y> yes, i was surprised to find it under ocaml/ on github, rather than janestreet/
sagotch has joined #ocaml
silver has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
* emily finds the (apparent?) recent momentum in the ocaml community heartening (as a former haskell user)
<dmbaturin> emily: Haskell survivor? :)
<dmbaturin> Recently someone who tried to cross-compile my project found that dune doesn't appear to follow the (mode (bytes)) directive properly. I need to reproduce it myself of course.
<emily> survivor is quite the word for it ^^
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Rosslaew has quit [Ping timeout: 260 seconds]
Denommus` has joined #ocaml
<flux[m]> IMO dune is really the first ocaml build system that's both easy to configure but also flexible. I think with my minimal exposure ;-), but certainly beats dealing with myocamlbuild.ml. everyone should just switch to is ASAP :)
<flux[m]> certainly a boon that it's also composable.
<flux[m]> what I miss that dune doesn't by default just build some default target like make does. you basically need to accompany a ./make.sh along the project or instruct it in the README.md. not just for your users' sake (who has users anyway?!) but yourself sake when you return to the project after a long hiatus ;-).
<flux[m]> my make.sh says dune build -j 8 @install; ln -sf _build/install/default/bin/ibt ibt - I guess dune is not able to do those steps automatically with plain configuration?
Denommus has quit [Ping timeout: 252 seconds]
<_y> i do not find dune flexible
<flux[m]> what did you want it to do?
<_y> maybe that’s because what i try do to is not The Right Way
<_y> but i feel like it has been designed for a very precise workflow
<_y> “opinionated” in dune’s description is the keyword
<_y> but still it’s a thousand times better than having to talk to the actual compiler :-}
<flux[m]> I guess I'll see when porting old projects to that
<flux[m]> I never quite got my _tags and myocamlbuidl.ml right for a project involving multiple directories, multiple phases (ml -> bytecode -> ml + c + h -> compile) dependencies working correctly.
brettgilio has joined #ocaml
<discord> <mseri> @flux[m] you should be able to say dune exec ibt.exe and have it compiled if needed and run by dune itself
<flux[m]> that's a nice feature though not what I'm really looking for
<flux[m]> I mean who really runs their program via their build system, unless it's for the test cases?-)
<discord> <mseri> Fair enough, but why do you need the executable on the root of your project
<flux[m]> well, root might be overkill, but it's something a non-ocaml-coding admin might expect to happen when they build software. plain bin/ibt would be appropriate as well.
<flux[m]> but it's nice how it does come with 'dune install' AND uninstall
<flux[m]> and dune install --prefix=$HOME works mostly as I hope
<discord> <mseri> I see, but I think it would be probably enough to specify this on the readme if it is really an issue. I think keeping the workspaces clean and separate is a benefit of dune compared for example to oasis
<discord> <mseri> I think also cargo does the same now that I think of it
<discord> <mseri> I wonder what else
erkin has quit [Remote host closed the connection]
Bronsa has quit [Remote host closed the connection]
Bronsa has joined #ocaml
al-damiri has joined #ocaml
KeyJoo has quit [Ping timeout: 240 seconds]
spew has joined #ocaml
brettgilio has quit [Quit: Konversation terminated!]
thomas_scrace has quit [Ping timeout: 240 seconds]
sagotch has quit [Quit: Leaving.]
thomas_scrace has joined #ocaml
sagotch has joined #ocaml
jbrown has joined #ocaml
johnelse_ has quit [Ping timeout: 250 seconds]
aciniglio has joined #ocaml
thomas_scrace has quit [Ping timeout: 272 seconds]
mfp has quit [Ping timeout: 240 seconds]
aciniglio has quit [Ping timeout: 252 seconds]
sagotch has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
gareppa has joined #ocaml
Evel-Knievel5 has joined #ocaml
klx``22 has joined #ocaml
Evel-Knievel5 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
Eskatrem` has joined #ocaml
klx``22 has quit [Remote host closed the connection]
__idiot__ has joined #ocaml
Eskatrem has quit [Ping timeout: 272 seconds]
__idiot__ has quit [Remote host closed the connection]
Hoosilon18 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Hoosilon18 has quit [Ping timeout: 240 seconds]
thomas_scrace has joined #ocaml
freyr69 has quit [Remote host closed the connection]
mfp has joined #ocaml
FreeBirdLjj has joined #ocaml
Xe16 has joined #ocaml
Xe16 has quit [Ping timeout: 240 seconds]
Bonn33320 has joined #ocaml
Bonn33320 has quit [Remote host closed the connection]
<_y> flux[m], i should have added that i only have a very short experience with dune
<_y> the two issues i ran into are: (1) hiding internal modules (to be fair, the namespacing problem is not dune’s guilt; but abstraction is not only about namespacing, and that issue feels really weird, for a language which praises so much its module system geared towards abstraction)
<discord> <anuragsoni.13> If you really need to copy the executable to the root of your project, dune can do it via user-actions https://dune.readthedocs.io/en/latest/dune-files.html#user-actions
<discord> <anuragsoni.13> something like (action (run cp %{deps} <your preferred directory>)) should work
<discord> <anuragsoni.13> you can add that as an alias for your target
<_y> and (2) “installing” the HTML documentation (what i meant by not The Right Way, as we have seen in an earlier discussion here)
Haudegen has joined #ocaml
<_y> also, reading dune’s documentation, i got lost in all the distinct concepts (profiles, contexts, build environments and what-not)
<_y> targets, aliases
aOssed- has joined #ocaml
aOssed- has quit [Remote host closed the connection]
Ishaq12 has joined #ocaml
Ishaq12 has quit [Remote host closed the connection]
radiofree10 has joined #ocaml
radiofree10 has quit [Remote host closed the connection]
gtrak has joined #ocaml
dacid has quit [Ping timeout: 246 seconds]
ziyourenxiang has quit [Ping timeout: 240 seconds]
thomas_scrace has quit [Ping timeout: 244 seconds]
|jbrown| has joined #ocaml
jbrown has quit [Ping timeout: 240 seconds]
Bronsa has quit [Ping timeout: 252 seconds]
mdk29 has joined #ocaml
mdk29 has quit [Remote host closed the connection]
Karasu has joined #ocaml
Karasu has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
jaar has quit [Ping timeout: 250 seconds]
darxun8 has joined #ocaml
darxun8 has quit [Remote host closed the connection]
roygbiv has joined #ocaml
FreeBirdLjj has joined #ocaml
Denommus` has quit [Ping timeout: 244 seconds]
szt29 has joined #ocaml
szt29 has quit [Ping timeout: 245 seconds]
|jbrown| has left #ocaml [#ocaml]
jbrown has joined #ocaml
alja has joined #ocaml
alja has quit [Remote host closed the connection]
jnavila has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
seym0ur has joined #ocaml
seym0ur has left #ocaml ["+++++++++++++++++++++++++++++++++"]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
roygbiv has quit [Quit: ™]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
brettgilio has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Denommus has joined #ocaml
orbifx has joined #ocaml
Denommus has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 240 seconds]
gareppa has quit [Quit: Leaving]
brettgilio has quit [Quit: Konversation terminated!]
infina0 has joined #ocaml
infina0 has quit [Ping timeout: 240 seconds]
thomas_scrace has joined #ocaml
orbifx has joined #ocaml
thomas_scrace has quit [Ping timeout: 252 seconds]
iczero27 has joined #ocaml
Bronsa has joined #ocaml
iczero27 has quit [Remote host closed the connection]
thomas_scrace has joined #ocaml
gtrak has quit [Ping timeout: 240 seconds]
gtrak has joined #ocaml
Bronsa has quit [Ping timeout: 244 seconds]
Guest44294 is now known as ec
jnavila has quit [Ping timeout: 246 seconds]
nate25 has joined #ocaml
TC01 has quit [Ping timeout: 250 seconds]
TC01 has joined #ocaml
nate25 has quit [Remote host closed the connection]
<Leonidas> is there a way to say in an MLI file that a module has the same signature as the OCaml Stdlib module?
<Leonidas> (aka do the stdlib modules have module types declared somewhere)
void_pointer has joined #ocaml
spew has quit [Quit: going home]
dh12819 has joined #ocaml
<thizanne> module MyList : module type of Stdlib.List ?
dh12819 has quit [Ping timeout: 250 seconds]
<Leonidas> thizanne: I found tis thread by companion_cube, exactly what I wanted https://discuss.ocaml.org/t/extend-existing-module/1389 :-)
pierpal has quit [Ping timeout: 252 seconds]
_andre_ has quit [Quit: leaving]
<orbifx> folk, I'm naming a package, can't decide between logarion-httpd or logarion-web
jnavila has joined #ocaml
jnavila has quit [Client Quit]
<orbifx> It's the "web" server module for logarion
<orbifx> Any thoughts?
brettgilio has joined #ocaml
<thizanne> logarion-webserver
JeanMax has joined #ocaml
<companion_cube> ok so anyone knows how to tell dune to compile a C library?
<companion_cube> I mean, to invoke some `action` before it builds an OCaml library
<companion_cube> (e.g. to build a local C library)
<companion_cube> the way deps can be specified is really… basic)
<orbifx> thizanne: I had just gone the other way. Care to throw in a reason, before I go rename everything? :P
<orbifx> companion_cube: I think I may have done this a long time ago, no longer remembering if and how... :/
<companion_cube> this is really terrible
<orbifx> my memory, your situation, or both? :P
<companion_cube> my situation
<companion_cube> well I made horrible hacks to have it build the lib anyway, but now it's all a nightmare of .so and all
<companion_cube> I need to find how to statically link the C library into the stubs' .so
jack5638 has quit [Ping timeout: 245 seconds]
<thizanne> orbifx: I don't have a strong opinion and you're the author anyway, but it seemed clearer to me so I was throwing it just in case you did not think about it
<orbifx> thizanne: that's why I was asking. I'm split about it and wanted a nudge someway. Some days I think it's a narrow to think the web as http+html, but it's what it has become
<orbifx> companion_cube: how do you feel about Makefiles? :P
<companion_cube> right now I feel like they're pretty nice -_-
<companion_cube> well I don't know the low level OCaml compilation commands, though, when it comes to using C stubs
<orbifx> I think my solution was to wrap the whole process in a Makefile, which would call gcc or jbuilder (At the time)
jack5638 has joined #ocaml
<companion_cube> still doesn't help me link statically my .a into the stubs .so
<companion_cube> well, I can disable dynlink for now… toplevel be damned
<orbifx> are you not producing the .so with gcc?
<companion_cube> no, with rustc… :s
<orbifx> can't you tell that to statically link?
<companion_cube> I mean it's produced, but I don't want it, I'd rather merge it into the stub .so
<companion_cube> thing is: I can make a foo.a and foo.so, that's fine
<companion_cube> but then `dune runtest` doesn't know about foo.so so it fails to link it in the test program (and probably also in the toplevel)
bartholin has quit [Remote host closed the connection]
pierpal has joined #ocaml
<orbifx> companion_cube: this has changed since I did it: https://github.com/Kakadu/lablqml/blob/master/lib/dune
<orbifx> but might provide a useful hint
brettgilio has quit [Quit: Konversation terminated!]
thomas_scrace has quit [Ping timeout: 245 seconds]
<companion_cube> thanks
<companion_cube> but that seems easier, because ocaml/dune knows about c++ code
thomas_scrace has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
tx17 has joined #ocaml
thomas_scrace has quit [Ping timeout: 246 seconds]
tx17 has quit [Remote host closed the connection]
Jesin has quit [Quit: Leaving]
Haudegen has quit [Remote host closed the connection]
oldschool^0 has joined #ocaml
oldschool^0 has quit [Remote host closed the connection]
pierpa has joined #ocaml
orbifx has quit [Ping timeout: 245 seconds]
Guest78852 has joined #ocaml
JeanMax has quit [Remote host closed the connection]
Jesin has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
void_pointer has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]