<d_bot>
<thangngoc89> Can I use Marshal to cache result from database? I have a query that takes 20 seconds to run on application start-up. Assuming that I won't change ocaml compiler version between deployment.
johnel_ is now known as johnel
cedric has joined #ocaml
vizard has joined #ocaml
Tuplanolla has joined #ocaml
<d_bot>
<antron> generally yes
<d_bot>
<antron> as long as it's, roughly speaking "just data," and doesn't have anything strange in it like closures (inserted during the interpretation of the result), opaque blocks of C data that contain e.g. pointers into the C heap that have meaning, etc
<d_bot>
<thangngoc89> @antron yeah. It’s just data (big data dump)
bronsen has joined #ocaml
gravicappa has joined #ocaml
glassofethanol has joined #ocaml
bartholin has joined #ocaml
gravicappa has quit [Ping timeout: 252 seconds]
gravicappa has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
reynir has quit [Ping timeout: 240 seconds]
reynir has joined #ocaml
domq has quit [Ping timeout: 252 seconds]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bartholin has quit [Ping timeout: 246 seconds]
bartholin has joined #ocaml
reynir1 has joined #ocaml
reynir has quit [Killed (NickServ (GHOST command used by reynir1))]
reynir1 is now known as reynir
mro has quit [Remote host closed the connection]
Haudegen has joined #ocaml
favonia has joined #ocaml
<Absalom>
Which modulewould you suggest for using curl: rather "curly" or "ocurl"?
gravicappa has quit [Ping timeout: 240 seconds]
mro has joined #ocaml
<d_bot>
<thangngoc89> Absalom: carl
<Absalom>
carl? Didn't notice it at first glance; I have a look.
<Absalom>
Ah OK, but which would be the ost convenient one for production work?
mbuf has quit [Quit: Leaving]
<d_bot>
<thangngoc89> Sorry I don’t use either curly or ocurl. I try to use pure ocaml libs as much as possible.
<d_bot>
<thangngoc89> If you want to go with that route then cohttp/piaf is the way to go.
<d_bot>
<thangngoc89> There is quests which is a nice wrapper on top of cohttp that I uses daily.
<Absalom>
Does it handle https?
<d_bot>
<thangngoc89> Yes
mro has quit [Remote host closed the connection]
mro has joined #ocaml
gravicappa has joined #ocaml
asm has quit [Changing host]
asm has joined #ocaml
gravicappa has quit [Ping timeout: 246 seconds]
mro has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 252 seconds]
mbuf has joined #ocaml
bartholin has joined #ocaml
unyu has quit [Quit: WeeChat 3.2]
<Absalom>
I tried to install piaf, but I have an error when the 'ssl' dependancy is processed: see https://termbin.com/c5q29
<d_bot>
<thangngoc89> I have no ideas. Actually not an opam user myself (I use esy)
<Absalom>
What are the differences between both (opam and esy)?
<d_bot>
<thangngoc89> Some people say that esy gives folks a similar workflow to npm (since esy was built by ReasonML community) but I would say it doesn't do esy any justice. To me, the most important one would be reproducible. Even with `opam` and local switches, one could easily forget to add an dependency to `opam` file before pushing . You can't do that with esy because the world state is derived from `esy.json` and `esy.lock` .
<d_bot>
<thangngoc89> I'm not saying this to convince you to switch, because esy has its own issues as well.
<Absalom>
Well, I have my working Opam installation now; just sad I can't use ssl-related packages (but it has probably nothing to do with Opam and is probably rather architecture related).
<d_bot>
<EduardoRFS> you need to pin ssl to a specific stuff
<d_bot>
<EduardoRFS> this is what I use, yes, not using dream because httpaf stuff
<d_bot>
<NULL> Is it possible to remove an optional argument from a function using some sort of explicit type cast like
<d_bot>
<NULL> `let f ?a:_ () = 0;; let g : unit -> int = (f :> unit -> int);;`
<d_bot>
<NULL> If not, are there theoretical reasons ?
<d_bot>
<thangngoc89> @EduardoRFS what’s wrong with httpaf stuff?
<companion_cube>
EduardoRFS could you use a paste next time please?
<d_bot>
<octachron> @NULL : it is not a subtyping coercion. However, the simpler `(f : unit -> int)` works.
<d_bot>
<NULL> Oh ! I went too complicated. Thanks
<dmbaturin>
Is there a way to return two tokens at once in ocamllex actions?
<d_bot>
<thangngoc89> @companion_cube : I have always want to see what does it look like from the other side (IRC)
<d_bot>
<EduardoRFS> companion_cube: my bad forgot about it
<d_bot>
<EduardoRFS> @thangngoc89 dream uses it's own httpaf
<d_bot>
<thangngoc89> @EduardoRFS ah I see. Dream vendors all *af stuff. I've always wondering why. cc @antron
<d_bot>
<antron> well its not "its own" http/af, its just the latest commit (if i didnt miss any) of anmonteiro's
<d_bot>
<antron> i don't have my own forks 🙂
<d_bot>
<antron> well not true, i stashed anmonteiro's forks for stability, but its the same commits
<d_bot>
<antron> sometimes during development i need to fix something immediately, so i point dream to a PR branch, but then i point it again to the tip after @anmonteiro merges it
<d_bot>
<antron> only happened a couple times so far
<d_bot>
<thangngoc89> @antron interesting. I'm wondering why you have to vendor the dependencies instead of letting the packager manager do its job?
<d_bot>
<antron> because it doesnt work well for opam releases to rely on opam in that way
<d_bot>
<antron> one could say drop opam maybe at this point, but im reluctant to fully do that (as opposed to figure out how to upstream or rename and release these forks)
<d_bot>
<antron> at the time i started dream, melange wasnt released, most of reason seemed dormant, etc., its all picking up since. so i will see what to do
<d_bot>
<antron> i absolutely want to resolve this though
waleee has joined #ocaml
<d_bot>
<thangngoc89> I see. thank you for your thorough explanation. This is not the first time "dream is having its own httpaf/piaf" prevents people from using it.
<d_bot>
<antron> i think piaf is in the same boat, right? it also has its own http/af, etc.
<d_bot>
<antron> which is *almost the same* as dreams 😛 i think actually only the websocketaf differ ATM since i didnt upgrade to one of the last commits
Haudegen has quit [Quit: Bin weg.]
<d_bot>
<antron> im pretty sure both me and @anmonteiro dont want this situation to continue 🙂
waleee has quit [Client Quit]
bartholin has quit [Quit: Leaving]
<d_bot>
<thangngoc89> Well. esy has its own issues . if it works, it works wonderfully, if it breaks, no ideas why
waleee has joined #ocaml
<d_bot>
<antron> yeah i hope to fix a few esy bugs along the way, seems like dream users are hitting a few
<d_bot>
<antron> maybe there can be a branch of dream with an esy manifest and no vendored code
glassofethanol has quit [Quit: leaving]
<d_bot>
<thangngoc89> It would be exhausting to keep the 2 of them in synced
gravicappa has joined #ocaml
Guest8235 has quit [Quit: Konversation terminated!]
spip has joined #ocaml
spip is now known as Guest8905
vicfred has joined #ocaml
vicfred has quit [Remote host closed the connection]
vicfred has joined #ocaml
mbuf has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
gravicappa has joined #ocaml
gwizon has quit [Remote host closed the connection]
<reynir>
do mind that people use widely different clients so there will be differneces
<d_bot>
<thangngoc89> oops Blocked by DNSBL
<reynir>
oh dang
<d_bot>
<EduardoRFS> @antron that's actually a nice idea, I think having an esy manifest is a great idea. Maybe I give it a try soon, same for piaf, as I actually use both at work
Guest4 has joined #ocaml
Guest4 has quit [Client Quit]
<d_bot>
<antron> it shouldnt be too bad, i should be able to basically cherry-pick the "esyfication" commit over `master` repeatedly, say, once a week, or whenever someone needs it updated. or even in CI. it would just delete `vendor` and add the `esy.json`
<d_bot>
<thangngoc89> @antron that's interesting
<d_bot>
<antron> i created <https://github.com/aantron/dream/issues/111> about it to track it and for a more permanent discussion in case we want to do it in piaf too, and ccd you, its not any kind of pressure to do it. i might do it myself if i get to it after some other issues 🙂
p4bl0 has quit [*.net *.split]
greenbagels has quit [*.net *.split]
engil has quit [*.net *.split]
_tjr_ has quit [*.net *.split]
rks` has quit [*.net *.split]
ralu has quit [*.net *.split]
Cypi has quit [*.net *.split]
pieguy128 has quit [*.net *.split]
tizoc has quit [*.net *.split]
Serpent7776 has quit [*.net *.split]
richbridger has quit [*.net *.split]
olle_ has quit [*.net *.split]
energizer has quit [*.net *.split]
nfc has quit [*.net *.split]
damien2 has quit [*.net *.split]
Armael has quit [*.net *.split]
Enjolras_ has quit [*.net *.split]
rwmjones has quit [*.net *.split]
gahr has quit [*.net *.split]
rak has quit [*.net *.split]
jtck has quit [*.net *.split]
bacam has quit [*.net *.split]
oisota has quit [*.net *.split]
st has quit [*.net *.split]
sleepydog has quit [*.net *.split]
noddy has quit [*.net *.split]
micro has quit [*.net *.split]
_tjr_ has joined #ocaml
engil has joined #ocaml
rks` has joined #ocaml
p4bl0 has joined #ocaml
pieguy128 has joined #ocaml
tizoc has joined #ocaml
richbridger has joined #ocaml
micro has joined #ocaml
st has joined #ocaml
oisota has joined #ocaml
damien2 has joined #ocaml
olle_ has joined #ocaml
Cypi has joined #ocaml
Serpent7776 has joined #ocaml
ralu has joined #ocaml
greenbagels has joined #ocaml
nfc has joined #ocaml
energizer has joined #ocaml
bacam has joined #ocaml
Armael has joined #ocaml
Enjolras_ has joined #ocaml
jtck has joined #ocaml
rwmjones has joined #ocaml
sleepydog has joined #ocaml
gahr has joined #ocaml
noddy has joined #ocaml
rak has joined #ocaml
d_bot has quit [Excess Flood]
pieguy128 has quit [Max SendQ exceeded]
richbridger has quit [Max SendQ exceeded]
d_bot has joined #ocaml
pieguy128 has joined #ocaml
richbridger has joined #ocaml
waleee has quit [Quit: WeeChat 3.2]
waleee has joined #ocaml
gravicappa has quit [Ping timeout: 252 seconds]
mro has joined #ocaml
<companion_cube>
@thangngoc89 connect to libera.chat, it's not hard :)
domq has quit [Ping timeout: 252 seconds]
<d_bot>
<thangngoc89> @companion_cube I tried web.libera.chat and I'm `Blocked by DNSBL`