Kakadu has quit [Remote host closed the connection]
<asdf12z_>
i'm looking for some tips or inspiration, in ocaml how would one express an idea like (fn1 (fn2 (fn3 (fn4 ...))), where indepedent functions actually compose well together, so i want to express this, is the best way just writing it out and using a function wrapper?
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
AlexRussia has joined #ocaml
orbifx has quit [Ping timeout: 264 seconds]
deko-pyon has joined #ocaml
pyon has quit [Killed (orwell.freenode.net (Nickname regained by services))]
deko-pyon is now known as pyon
struk|desk|away is now known as struk|desk
<def`>
asdf12z_: what do you want? another syntax?
<asdf12z_>
def`: no, well i don't want one, if there exists one sure
<asdf12z_>
def`: no so much syntax, but a convention of expressing an idea if that makes sense, obviously the way i mentioned is in algebra so i guess that's pretty conventional lol
<asdf12z_>
like in other langs you don't have to write it that way, you could put them into a list
<asdf12z_>
i'm guessing that's true in ocaml
<asdf12z_>
and just iterate the list
<asdf12z_>
so i'm just looking for other ideas of expressing that
<def`>
x |> f1 |> f2 |> ...
<def`>
f2 @@ f1 @@ x
<def`>
This is mostly syntax, it encodes a similar control flow.
<asdf12z_>
ok thanks def`
<def`>
if you want to reify your list of function in a data structure, you will realize that unless your functions are all endo, the type is quite tricky (existential types for each intermediate results)
<def`>
so... unless you really need to introspect this list, staying with function composition is simple and efficient
<asdf12z_>
so what endo mean? not familiar with that term
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<asdf12z_>
what does* endo mean
<def`>
functions og the form 'a -> 'a
<aantron>
domain is the same as codomain
<def`>
of*
pyon has quit [Quit: test]
larhat has joined #ocaml
SIGGIL has joined #ocaml
Sorella_ has joined #ocaml
jmasseo_ has joined #ocaml
cross_ has joined #ocaml
Nazral_ has joined #ocaml
cschneid_ has joined #ocaml
Sorella has quit [Ping timeout: 248 seconds]
cschneid has quit [Ping timeout: 248 seconds]
Ravana has quit [Ping timeout: 248 seconds]
larhat1 has quit [Ping timeout: 248 seconds]
cross has quit [Ping timeout: 248 seconds]
clog has quit [Ping timeout: 248 seconds]
TheAuGingembre has quit [Ping timeout: 248 seconds]
cross_ has quit [Remote host closed the connection]
yunxing has quit [Remote host closed the connection]
cross has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<asdf12z_>
thanks for the link, that's pretty good reading
<def`>
yep, nice S11001001
Nazral_ is now known as Nazral
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
lokien has quit [Ping timeout: 268 seconds]
struk|desk is now known as struk|desk|away
tennix has joined #ocaml
lokien has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
nicoo has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
yunxing has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
pandeiro has joined #ocaml
sh0t has quit [Ping timeout: 268 seconds]
pandeiro has quit [Remote host closed the connection]
struk|desk|away is now known as struk|desk
tennix has quit [Ping timeout: 252 seconds]
hxegon has quit [Quit: BRB]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ygrek has joined #ocaml
FreeBirdLjj has joined #ocaml
<please_help>
Trying to use pgocaml's low-level interface (due to using ppx in other parts of the program), when trying to PGOCaml.connect, I get "Error: The type of this expression, '_a PGOCaml.t PGOCaml.monad, contains type variables that cannot be generalized"...
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<aantron>
what is the expression? are you partially applying something?
pierpa has joined #ocaml
seangrove has joined #ocaml
<please_help>
The expression is simply "let dbh = PGOCaml.connect ()", and that's it. No partial application.
sgnb` has joined #ocaml
sgnb has quit [Ping timeout: 276 seconds]
<seangrove>
seliopou: Is there a tutorial on how to use ocaml-aws? The code snippet on the repo references Aws_ec2, but I don't see that module name anywhere
<aantron>
please_help: can you constrain the type of dbh?
<seangrove>
seliopou: does it *have* to be pinned in order to get the codegen working?
sh0t has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
sh0t has quit [Client Quit]
Emmanuel` has joined #ocaml
yunxing has quit [Remote host closed the connection]
govg has joined #ocaml
<please_help>
aantron: I can't specify a specific type instance for its parameter and get away with it (as I've no idea what it could possibly be). However, using int as a test, the error disappears.
<seangrove>
Does anyone have examples of projects using ocaml-aws?
<j0sh>
now that i've converted sqlite to ppx, maybe pgocaml should be next...
<seangrove>
j0sh: Do you have a link of what the sqlite ppx syntax looks like?
<please_help>
(I get some weird file not found from oxygen in that setup though)
<please_help>
ocsigen*
clog has joined #ocaml
<seangrove>
j0sh: Looks nice!
<j0sh>
seangrove: thanks. not quite 100% there, there is a PR to hoist cached statements (minor optimization really), but it works well overall
oxcsh has joined #ocaml
lambda_foo has joined #ocaml
struk|desk is now known as struk|desk|away
tumdum has quit [Ping timeout: 260 seconds]
tennix has joined #ocaml
spion has quit [Ping timeout: 240 seconds]
tumdum has joined #ocaml
tumdum has quit [Changing host]
tumdum has joined #ocaml
spion has joined #ocaml
fantasticsid has quit [Ping timeout: 268 seconds]
nicoo has quit [Ping timeout: 260 seconds]
nicoo has joined #ocaml
struk|desk|away is now known as struk|desk
<seangrove>
Bah, totally lost with ocaml-aws
<seangrove>
It just doesn't seem to provide the modules it says it does. I see templates that look like it's supposed to generate the namespaces, but there are no appropriate .cm* files in the opam directory
oxcsh has quit [Remote host closed the connection]
aantron has quit [Quit: Leaving...]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Algebr``` has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
<Algebr```>
My brain is hurting from the following situation. I need to provide a C function pointer as a call back to a C function but I want it to be an OCaml callback instead. I'm not sure what the cleanest way because I guess I could wrap the ocaml closure with a c function and then somehow pass that, or do Callback.register ? not sure what's the best solution
<Algebr```>
but callback.register doesn't work great nor does using the ocaml closure directly because the signatures don't match
pyon has joined #ocaml
<Algebr```>
Also, what is the difference between caml_callback and caml_callback_exn versions? (Clearly something to do with exceptions but funcs don't have doc strings)
struk|desk is now known as struk|desk|away
<asdf12z_>
disclaimer> learning ocaml so asking to learn and not criticizing, not picking on core, just happens to be popular and what i had in front of me. https://github.com/janestreet/core/blob/master/src/core_thread.ml#L3 i thought in a functional environment we should avoid global mutable vars acting as state?
<asdf12z_>
so basically why is it acceptable in that example? is it because the use of it is very limited (1 func) or is it because its the only option here?
<Algebr```>
probably cause its super limited and was easy, that also seems like something that changes just once.
<Emmanuel`>
asdf12z_: (good choice of nickname btw) at the end of the day, you're programming a computer (basically flipping bits) and it sometimes make sense to not be /pure/ all the time
struk|desk|away is now known as struk|desk
<Algebr```>
it would be a pain to have to thread through that variable, har har.
<asdf12z_>
i'm just debating a design decision, whether to make a read only state accessible globally available, it would of course break down in a multithreaded environment
<asdf12z_>
or have some half baked dependency injection, because I won't know which functions might need it
<asdf12z_>
it's meant to be a library
<Algebr```>
you're learning ocaml and already jumping to a multithreaded environment? I wish I was a your level
govg has quit [Ping timeout: 240 seconds]
sgnb`` has joined #ocaml
<def`>
asdf12z_: it is global state but used in a monotonic way
<def`>
you can think of this as lazy initialization
<asdf12z_>
Algebr```: haha! no i'm not, i'm just trying to figure out design patterns
<def`>
and the purpose is precisely to know if there are multiple threads or not.
govg has joined #ocaml
sgnb` has quit [Ping timeout: 240 seconds]
<def`>
this is not a design pattern, more a low-level function for tracking use of threads
<asdf12z_>
ah lazy initialization, that's interesting way to think about it
<def`>
yeah, this a bit stretched
<def`>
since it is not only lazy, but also allows you to observe whether this has been used or not
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<def`>
it is monotonic because threads_have_been_created can only goes from false to true
<asdf12z_>
def`, can you comment about the problem i mentioned above? if i had a library, i can share a read only state, i consider this global, or i can do some sort of half baked dep injection idea, i need an option to either, because users may or may not need some piece of data from this state
govg has quit [Ping timeout: 244 seconds]
<def`>
that is, there is a time t where threads_have_been_created before t = false and after t = true
<def`>
not sure what you mean by the dep injection idea
govg has joined #ocaml
govg is now known as Guest47069
<asdf12z_>
well exactly how it'll be implemented i don't know that's why it'll probably be half baked if i try it, but the idea is generally that, or at the most basic level without DI, they just explicitly request it
<asdf12z_>
but i hate both since it's not user friendly
<def`>
the general idea would be don't use global state unless your problem requires that
<def`>
here it is the runtime service for multithreading, it obviously requires state
<asdf12z_>
ok
<def`>
and this record the existence of multiple threads, because this irreversibly changes the semantics of the language (less guarantees)
<def`>
if it is very hard to avoid global state and users of your library are aware, then that is a possible solution (used by the compiler for instance)
<def`>
but in general you should avoid making assumptions on the users of your library (pretty obvious advices, sorry if that's not help much :))
<asdf12z_>
no it's helpful, i'm trying to rethink everything since ocaml is the first functional lang i'll be learning
<asdf12z_>
well technically i did try clojure before
<def`>
ok. then the intention is to stay functional but don't hide the fact that the underlying hardware (or OS, well any abstract view of the machine that will execute your program) is effectful
<def`>
threads is one kind of effect, I/O, global flags of the unix process, time, etc.
<asdf12z_>
ok
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Muzer has quit [Ping timeout: 244 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Guest47069 has quit [Ping timeout: 264 seconds]
govg_ has joined #ocaml
blockzombie has quit []
Muzer_ has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
<Kakadu>
I found in the maillist a couple of messages about heterogenous maps. Do you know is it possible to adjust the interface to make key to be searchable only in specific maps? (Trying to find the key in the another map should give type error)
SIGGIL is now known as SIGILL
warp has joined #ocaml
govg has quit [Ping timeout: 244 seconds]
kushal has quit [Quit: Leaving]
<octachron>
Kakadu, it should be possible by using a generative functor to create new heterogeneous map type
tane has quit [Ping timeout: 244 seconds]
<Kakadu>
I thought about GADTs but Don't really sure how to involve them into this task....
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<zozozo>
Kakadu: if you just do something like 'module Make() = struct include Hmap end module M1 = Make() module M2 = Make()', then the key and map types for M1 and M2 should be incompatible
<octachron>
Kakadu, GADTs sound overkill, a matching phantom type parameter added to key and map would be enough
tane has joined #ocaml
<octachron>
zozozo, the problem is that include will preserve type equality
<zozozo>
oh
<zozozo>
the one time the typing algorithm is smarter than what you want
<octachron>
A solution might be to replace directly Hmap = struct ... end by Hmap() = struct ... end
<zozozo>
right, but not so easy when it's in a library
<companion_cube>
ah! with a^29b in aaaaaaa....aaa I get a 625% speedup with KMP
<companion_cube>
about time
<zozozo>
companion_cube: nice
<companion_cube>
but it still needs improvement...
<companion_cube>
crush those pesky constant factors!
<companion_cube>
ok, at least that justifies replacing the naive algo
<octachron>
zozozo, correction, using a signature to hide type equalities works : module Make() = struct include (H:module type of H) end
<Kakadu>
Yeah, I did an example
<Kakadu>
Now I should decide how to apply it to my task
<Kakadu>
It's very like I will fail to do this and come back ;)
<def`>
module Make () : module type of H = H
<def`>
even more efficient :) (no dynamic computation)
<def`>
but the trick with a phantom type is much better
dhil has joined #ocaml
ontologiae has joined #ocaml
<freehck>
people, why could assoc return "assertion failed"?
<def`>
Not_foi
<def`>
Not_found but not assertion failure
cross has quit [Quit: Lost terminal]
tane has quit [Quit: Verlassend]
firebird_ has joined #ocaml
<firebird_>
Hi -- I'm having an issue with Unix.open_process_full - I wonder if anyone knows the right way to fix this.
<firebird_>
I'm opening a subprocess that I'm reading and writing to (from its perspective, the I/O is on stdin/stdout).
<firebird_>
Occassionally, the subprocess outputs a large amount of data
<firebird_>
and it seems it's causing blocking because my OCaml program isn't reading from the pipe fast enough
<firebird_>
I'm on a Mac, and it seems to happen when there's over ~65k bytes sent from the subprocess before my OCaml parent process does the read
<firebird_>
I wonder if there is a natural way to apply their solution in OCaml
<adrien>
pipes have a buffer size of around 64k
<adrien>
typically
<adrien>
this feels like stating the obvious but: what should be the behaviour of your program if the consumer can't process fast enough what the producer creates?
<freehck>
def`: thanks, I've realised that I'm looking to the wrong file.
kushal has joined #ocaml
<firebird_>
Hi, Adrien - good question. Ideally, I don't want that to be possible (provided I have enough memory/disk space) - is there any way to communicate with a subprocess that would ensure I don't hit those hard limits?
_andre has joined #ocaml
<orbifx>
What is the rationale of using @@ as a composition symbol?
<companion_cube>
its precedence
tane has joined #ocaml
<orbifx>
?
<companion_cube>
it is right associative
<companion_cube>
also it's not a composition symbol, but an application symbol
<orbifx>
Ok, so maybe @, as in applied?
tane has quit [Ping timeout: 252 seconds]
<companion_cube>
@ is already used for list concatenation
<companion_cube>
so, @@ was natural, I guess
<adrien>
firebird_: if you could do asynchronous code, typicallyy that would help
<adrien>
lwt async and ocamlnet can help for that
darkf has quit [Quit: Leaving]
tane has joined #ocaml
<firebird_>
adrien: thank you, this is very helpful. I've now found the async_unix module, but haven't yet found any examples of my use-case (interactive i/o with a subprocess over its stdin/stdout). Do you know of any examples of this?
copy` has joined #ocaml
Sorella has joined #ocaml
tane has quit [Quit: Verlassend]
AltGr has left #ocaml [#ocaml]
infinity0 has quit [Remote host closed the connection]
govg has joined #ocaml
silver has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
tane has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
FreeBirdLjj has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
<Kakadu>
Folks, Are there any smart papers about usefulness of implicits? (except Yallop's 'Staging Generic Programming')?
infinity0 has joined #ocaml
FreeBird_ has joined #ocaml
myst|fon has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<Kakadu>
TT, this strange feeling when you don't understand enything at all
<Kakadu>
Heared something about GADTs, something about implicits, know some simple examples but can't apply them in the real world
<Kakadu>
I kind of understand people which are feared of monads
<Kakadu>
It's very likely the same feeling
lpaste has quit [Ping timeout: 250 seconds]
Leonidas has quit [Ping timeout: 246 seconds]
Leonidas has joined #ocaml
<adrien>
firebird_: I don't have specific examples; the main thing to have in mind is that it lets you resume other work while the pipe is being emptied; any tutorial with one of these libs should be enough to get you started
lpaste has joined #ocaml
ewanas has joined #ocaml
ewanas has quit [Changing host]
ewanas has joined #ocaml
<firebird_>
adrien: great, thank you
firebird_ has quit [Quit: Page closed]
<ggole>
Kakadu: GADTs are mostly about inflicting suffering on yourself
<ggole>
With a side order of tedious type hackery
mettekou has joined #ocaml
<Drup>
ggole: you are being a bit pessimistic there, GADT works really great for some type encoding and terribly bad for others.
<edwin>
Kakadu: the slightly confusing bit about GADTs is that you have to declare the return type, so you often see arrows in the type, e.g if you want to write this with a GADT type 'a t = X of 'a | Y it'll look like: type 'a t = X: 'a -> 'a t | Y: 'a t, but of course with GADTs the return type doesn't have to match declared type exactly, you could also write this GADT (which you couldn't with normal variants): type 'a t = X: 'a -> 'a t | Y: int t
Emmanuel` has quit [Quit: Konversation terminated!]
<Kakadu>
edwin: The arrows are OK, I got it. It's funny that you have described the only thing that is clear about GADTs
Emmanuel` has joined #ocaml
<ggole>
Kakadu: have you written the usual stupid typed interpreter example?
<Kakadu>
ggole: like https://paste.in.ua/1434/ ? Using GADTs to express that expression under IF should be `bool expr` and not `int expr` ?
lobo has quit [Quit: WeeChat 1.4]
govg has quit [Ping timeout: 260 seconds]
<ggole>
That's it
<ggole>
If you want to level up your GADT skillz, then add an arbitrary size tuple to that language.
sgnb`` has quit [Remote host closed the connection]
sgnb`` has joined #ocaml
<ggole>
That should both clarify your understanding of GADTs and make clear what I meant when I talked about suffering and type hackery.
Haudegen has quit [Ping timeout: 276 seconds]
<edwin>
type hackery you mean the need to annotate almost every function that uses GADTs?
<ggole>
No
cross has joined #ocaml
<ggole>
The problem is that there is no OCaml type that cleanly expresses "variadic tuple"
<ggole>
So you have to do strange encodings.
<octachron>
ggole, heterogeneous lists are not that painful... if you don't try to do anything useful with them
cross has quit [Client Quit]
<companion_cube>
GADTs are nice to give some monadic-ish DSL
<ggole>
Well, in a language implementation you are going to be indexing into tuples
<ggole>
Check out TypedTerm, isn't it nice and readable?
<companion_cube>
yeah...
<companion_cube>
I've benn trying this kind of things, but meh
<ggole>
It's a puzzle rather than a practical programming method
cross has joined #ocaml
<ggole>
(I am not claiming that all uses of GADTs are impractical in this sense.)
cross has quit [Client Quit]
cross has joined #ocaml
ontologiae has joined #ocaml
jgw25 has joined #ocaml
jgw25 has quit [Client Quit]
lokien_ has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
xardon has joined #ocaml
Haudegen has joined #ocaml
clog has quit [Ping timeout: 276 seconds]
clog has joined #ocaml
govg has joined #ocaml
jeffmo has quit [Quit: jeffmo]
<Kakadu>
General question: is everything that involves Leibniz's type equality a puzzle?
<Drup>
ggole: on the other hand, format is a rather useful thing in OCaml ;)
<Drup>
I agree the programming itself is mostly a puzzle, but as long as you can manage to make a good external API out of it, well, it doesn't matter
<ggole>
We had that before GADTs!
<ggole>
But yes, there are reasonable uses.
<zozozo>
Kakadu: everything that involves proving non-trivial things with trivial axioms is usually a puzzle, :p
avsm has joined #ocaml
avsm has quit [Client Quit]
govg has quit [Ping timeout: 244 seconds]
govg has joined #ocaml
kushal has quit [Quit: Leaving]
govg has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
sh0t has joined #ocaml
hxegon has joined #ocaml
mort___ has joined #ocaml
<mort___>
naive question — does merlin support ppx_deriving, specifically [@@deriving sexp_of]?
<mort___>
(i know EXT sexplib.syntax works for the camlp4 extension)
<Drup>
yes
<mort___>
cool! how?
<Drup>
PKG ppx_deriving
<Drup>
"it just works" :D
mort___ has quit [Quit: Leaving.]
<rks`>
you might just need "PKG ppx_sexp_conv" (or whatever the name of the package) and deriving should be loaded properly
struk|desk|away is now known as struk|desk
govg has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
clog has quit [Ping timeout: 246 seconds]
jeffmo has joined #ocaml
GeorgeHahn has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
shinnya has joined #ocaml
AlexRussia has joined #ocaml
dhil has joined #ocaml
d0nn1e has quit [Ping timeout: 276 seconds]
lobo has joined #ocaml
d0nn1e has joined #ocaml
struk|desk is now known as struk|desk|away
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ewanas has quit [Quit: leaving]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
mettekou has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
FreeBird_ has quit [Ping timeout: 244 seconds]
GeorgeHahn has quit [Read error: Connection reset by peer]
struk|desk|away is now known as struk|desk
uris77 has joined #ocaml
mettekou has quit [Read error: Connection reset by peer]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
uris77 has quit [Ping timeout: 276 seconds]
uris77 has joined #ocaml
slash^ has joined #ocaml
<maker>
hey people, I'm having some troubles with opam. So right now `opam switch` gives me:
<maker>
4.02.3 C 4.02.3 Official 4.02.3 release
<maker>
system I system System compiler (4.02.3)
<maker>
but when installing something I still get:
<maker>
Not running as root, the following command will be run through "sudo":
<maker>
apt-get install -qq -yy ncurses-dev
<maker>
and therefore asks for the root password
<maker>
err, my user's password.
<companion_cube>
it's for installing a "depext", a dependency outside of opam, I think
<maker>
but it shouldn't! It should (1) do its own buisness in the ~/.opam/ directory and (2) even if there were dependecies to check at system level, it should check if they're already satisfied without asking for my password
<companion_cube>
yes, I'm surprised it directly tries to install it
<maker>
companion_cube: it is installing some ncurses bullshit actually
<companion_cube>
libncurses-dev, I suppose?
<companion_cube>
I don't know why ocamlfind depends on this now
<seangrove>
cargo-culting from a working makefile in my No.-derived riseos app :)
<seangrove>
I've removed them, but same output
<seangrove>
Drup: Surely I'm just missing some package?
bernardofpc has joined #ocaml
<Drup>
Surely aws's META is wrong
<Drup>
just to try it, can you reverse the order of the packages ? :)
<seangrove>
That did it!
<seangrove>
That's the exact opposite of the order I expected it to work in. I feel sad.
yunxing has joined #ocaml
kdas__ has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
jknick has joined #ocaml
t4nk474 has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
sh0t has quit [Ping timeout: 240 seconds]
nicholas_ has joined #ocaml
<t4nk474>
I'm using ppx_deriving_yojson with structs and a Variant type V amongst other primitives, including lists. Lists are enclosed in [ and ] in json. But my variant type V is also being enclosed in [ and ]. If I make the field of type "V list" instead of V then it gets enclosed in [[ and ]]. Why? Is this correct? This was causing me problems parsing json.
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
sh0t has joined #ocaml
<please_help>
what's the correct way to register cleanup actions to perform at the time ocsigenserver quits as part of the Eliom app process?
<Drup>
You mean, when the server shut downs ? Doesnt at_exit works ?
orbifx1 has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
Ruff has joined #ocaml
hxegon is now known as hxegon_AFK
uris77 has quit [Quit: leaving]
rand__ has quit [Quit: leaving]
<mfp>
please_help: should probably be Lwt_main.at_exit though (not Pervasives')
hxegon_AFK is now known as hxegon
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
JacobEdelman_ has quit [Quit: Connection closed for inactivity]
seangrove has quit [Ping timeout: 252 seconds]
<please_help>
I never actually used Lwt before, so I wasn't aware that was a thing. Thanks.
ygrek has joined #ocaml
please_help has quit [Ping timeout: 244 seconds]
please_help has joined #ocaml
<please_help>
Any good tools to sanitize strings for use in sql statements?
<orbifx1>
please_help: look in OPAM
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
keep_learning has quit [Quit: This computer has gone to sleep]
tane has quit [Quit: Verlassend]
<tobiasBora>
I would like to know, if there a good and easy to use way to compile Ocaml with LLVM for further optimisations ?
<malc_>
no
<tobiasBora>
malc_: Do you know why ? I thought that bytecode was quite easy to parse and translate.
<malc_>
tobiasBora: GC
yunxing_ has joined #ocaml
yunxing has quit [Read error: Connection reset by peer]
orbifx1 has quit [Ping timeout: 276 seconds]
<Kakadu>
Btw, I have seen and article about OCaml+LLVMN where this problem seems to be claimed to solved better than in original ocaml+llvm which was presented on some OCaml Workshop
Kakadu has left #ocaml [#ocaml]
Kakadu has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<please_help>
orbifx1: I don't see anything relevant on opam, github or via google, that's why I asked.
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<tobiasBora>
Hum I see...
<tobiasBora>
kakadu: Is the original ocaml+llvm usable in practice ?
<Kakadu>
AFAIR, no
<Kakadu>
but I didn't tried
<tobiasBora>
And don't Haskell has similar problem with GC ?
<tobiasBora>
*doesn't
<Kakadu>
No idea
<Kakadu>
The 2nd implementation was going to add LLVM in more deep way while the 1st one was going to add LLVM in kind of "easy" way
<tobiasBora>
kakadu: Don't worry, I will use the native code, it should be enough, and I don't think it will be the bottle neck of my program. Thank you !