<herrschreinerei>
So, I am trying to get an opium handler working. Here is the code of the routes module https://controlc.com/4412e9d1
<herrschreinerei>
The retrieval endpoint should issue an http request and pass the body of that request to the response.
<herrschreinerei>
The problem is that my retrieval handler issue the request when the application start. After that, I always receive the same page, it is like the value is bound.
sagax has joined #ocaml
<herrschreinerei>
ok I think I have fixed it. retrieval is a closure so it certainly binds the value for the entire runtime.
chrisz has quit [Ping timeout: 260 seconds]
chrisz has joined #ocaml
Serpent7776 has joined #ocaml
<reynir>
for a second I forgot about the opium framework and thought opium would be an obvious explanation why you were tired :D
<herrschreinerei>
hehe they share some effects
Tuplanolla has joined #ocaml
<herrschreinerei>
no tbh opium is really nice. I vastly prefer the cowboy interface to the rack interface (what they went for in opium) but still, it's nice to use.
noonien6 has joined #ocaml
noonien has quit [Ping timeout: 272 seconds]
noonien6 is now known as noonien
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
azimut has joined #ocaml
Haudegen has joined #ocaml
bartholin has joined #ocaml
<d_bot>
<pseud> Speaking of opium (a few hours later).
<d_bot>
<pseud> Any good examples of using opium for small RESTy services using JSON ? Have seen "Making a CRUD in OCaml (as a millionaire in Cambodia)" (great title, btw). But it stops short a little.
<d_bot>
<pseud> For example, pleading me NOT to use a certain function, but never doubling back and finding a better solution.
<d_bot>
<pseud>
<d_bot>
<pseud> Is there anything in writing perhaps ? Or any good, small'ish projects on e.g. Github that you'd recommend looking at ?
hsw_ has joined #ocaml
hsw has quit [Ping timeout: 272 seconds]
gopiandcode has quit [Ping timeout: 246 seconds]
gopiandcode has joined #ocaml
noonien has quit [Ping timeout: 268 seconds]
gopiandcode has quit [Ping timeout: 246 seconds]
gopiandcode has joined #ocaml
noonien6 has joined #ocaml
hsw__ has joined #ocaml
hsw_ has quit [Ping timeout: 272 seconds]
Haudegen has quit [Quit: Bin weg.]
bartholin has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
<d_bot>
<Drup> Is someone around familiar with the compilation of OCaml objects ?
<d_bot>
<Drup> In particular: in which case does something like this is fine: https://bpa.st/HD6A ?
<d_bot>
<Drup> (I'm aware there exists private fields in OCaml, but I need to access them from the outside here for a syntax extension)
<zozozo>
Drup : I asked Pierre and he said that, even though it was really not a good idea (I'll spare you the exact words, :p ), you don't really lie about the type, so it should be fine
<d_bot>
<Drup> Noted, I'll take that as garantie that Pierre that this will not break 😄 😄
<d_bot>
<Drup> (say hello from me 👋 )
Everything has joined #ocaml
<zozozo>
XD
<zozozo>
Drup : Pierre says hello back, ^^
<d_bot>
<Drup> (would the compiler be able to remove the "useless" call to o#field ? :p)
<zozozo>
Hm ... Flambda shouldn't, as the call could have arbitrary effects (and flambda cannot inline method calls for now, and for a long time I suspect)
<d_bot>
<Drup> mmh, but If I hide the method call behind a thunk, it should not affect typing and be removable
<d_bot>
<octachron> If the call is just here to obtain the type, would `let (_:(<field:'a; ..>) = o in` not work too?
<d_bot>
<Drup> ... true !
Haudegen has joined #ocaml
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 268 seconds]
<d_bot>
<octachron> Otherwise, in term of semantics: since `:>` is a no-op in the untyped semantics, it seems like it would be pretty hard to optimize away the private field? (and nothing of the sort is done in the compiler).
bartholin has quit [Quit: Leaving]
raskol has joined #ocaml
<d_bot>
<Drup> that was partially my question, so I guess it's fine yeah
<d_bot>
<Drup> (the converse in the module system is completely false :p)
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away,and yet it always breaks free.]
raskol has joined #ocaml
Haudegen has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
omegatron has joined #ocaml
raskol has quit [Ping timeout: 246 seconds]
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
raskol has joined #ocaml
Guest9654 has joined #ocaml
<d_bot>
<pseud> Just going to ask again to feel out my luck 🙂
<d_bot>
<pseud>
<d_bot>
<pseud> Good, small projects or articles/writeups on how to write a rest service in ocaml ? Opium preferred (because I've played with it a little), but any other reasonably used library is OK.
Guest9654 has left #ocaml [#ocaml]
motherfsck has quit [Ping timeout: 240 seconds]
raskol has quit [Ping timeout: 268 seconds]
raskol has joined #ocaml
raskol has quit [Ping timeout: 246 seconds]
raskol has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raskol has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.5]
azimut_ has quit [Remote host closed the connection]
jpds has quit [Remote host closed the connection]
jpds has joined #ocaml
azimut has joined #ocaml
Serpent7776 has quit [Quit: leaving]
perrierjouet has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
zebrag has quit [Ping timeout: 264 seconds]
waleee has joined #ocaml
waleee has quit [Ping timeout: 260 seconds]
motherfsck has joined #ocaml
jpds has quit [Remote host closed the connection]
jpds has joined #ocaml
raskol has joined #ocaml
<companion_cube>
@Drup: funny, I actually reimplemented a form of OBDD today
<companion_cube>
pretty cool
<companion_cube>
I wonder what a mix of BDD and congruence closure would look like