MarvelousWololo has quit [Ping timeout: 264 seconds]
mizlan has joined #ocaml
<mizlan>
Hello! How may I encode a value of type (string * int) list to a value of type Yojson.t as an object? Or anything like int -> Yojson.t (`Int)
SoniEx2 has quit [Ping timeout: 245 seconds]
Soni has joined #ocaml
Soni has quit [Ping timeout: 272 seconds]
xd1le has quit [Quit: xd1le]
Soni has joined #ocaml
spip has quit [Quit: Konversation terminated!]
chrisz_ has quit [Ping timeout: 246 seconds]
chrisz has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
neuroevolutus has quit [Quit: Client closed]
mechap has quit [Ping timeout: 260 seconds]
mechap has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #ocaml
MarvelousWololo has joined #ocaml
MarvelousWololo has quit [Read error: Connection reset by peer]
MarvelousWololo has joined #ocaml
MarvelousWololo has quit [Read error: Connection reset by peer]
mizlan has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
mizlan has joined #ocaml
Serpent7776 has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
mizlan has quit [Ping timeout: 272 seconds]
neuroevolutus has joined #ocaml
neuroevolutus has quit [Client Quit]
mizlan has joined #ocaml
mizlan has quit [Ping timeout: 246 seconds]
olle has joined #ocaml
bartholin has joined #ocaml
mizlan has joined #ocaml
mizlan has quit [Ping timeout: 272 seconds]
mizlan has joined #ocaml
spip has joined #ocaml
Tuplanolla has joined #ocaml
mizlan has quit [Ping timeout: 246 seconds]
mizlan has joined #ocaml
Trillion1uroNote has quit [Ping timeout: 246 seconds]
TrillionEuroNote has joined #ocaml
tomku has quit [Ping timeout: 260 seconds]
waleee has joined #ocaml
mizlan has quit [Ping timeout: 272 seconds]
xd1le has joined #ocaml
mizlan has joined #ocaml
waleee has quit [Ping timeout: 246 seconds]
mizlan has quit [Ping timeout: 250 seconds]
<discocaml>
<JM> I wouldn't hold my breadth for OCaml 5 support. The activity on esy has been pretty low, and the OCaml community is more focused on opam+dune so you'll have better support by sticking to these tools.
mizlan has joined #ocaml
<discocaml>
<Ada> yeah, i pretty much came to the conclusion myself that i should just learn my way around dune and opam
<discocaml>
<Ada> itβs a shame cause ocamls existing tools can definitely be daunting but idk
<discocaml>
<Ada> everything to do with reason now seems to be more focused on rescript which as far as i can tell is ocaml rewritten to look like typescript, then compiled to javascript
<discocaml>
<JM> It's true that the folks behind rescript have diverge from the OCaml ecosystem, but the original "philosophy" of Reasonml is still much alive, and we have tools like https://melange.re/ that will allow you to use OCaml and/or Reason for backend as well. (so one more reason to learn dune π )
<discocaml>
<deepspacejohn> Unless there's a very concrete reason to use Esy, my unofficial suggestion is to just use OPAM. The time it takes to learn how to use it is a small price to pay for having a more reliable package manager. Source: I personally tried using Esy when I was new and I kept running into random incompatibilities or edge-case bugs that I wasn't prepared to deal with. Most things have "just worked" with OPAM and there's much more community support
<discocaml>
<deepspacejohn> Just my personal/anecdotal opinion, and I'm sure others may disagree. But I believe OPAM is more beginner friendly, either way.
MarvelousWololo has joined #ocaml
tomku has joined #ocaml
mizlan has quit [Ping timeout: 272 seconds]
mizlan has joined #ocaml
gareppa has joined #ocaml
<discocaml>
<tym972> Hi, I have a problem with an interactive program. The "flush stdout" don't work as excepted. Could someone help me?
<discocaml>
<octachron> With more information, probably. With the available data, the most likely culprit is `Format` internal buffer.
<remexre>
I'm trying to make a Hashtbl with mutable keys, compared by pointer; is there an Obj function to get the (address >> 1)
<remexre>
Or does with_tag do what I want
<discocaml>
<tym972> I'll find out, thank you
<discocaml>
<octachron> Pointer addresses are not stable you cannot store them or use them for comparison.
<remexre>
Hm, is the recommended approach to use the generic hash function on a tuple of all the immutable fields then?
<discocaml>
<contificate> Can use polymorphic hash, `Hashtbl.hash`, if things you define to be "equal" would hash to the same values. Things can be considered equal, like sets implemented atop balanced trees, even if structurally unequal, so you'd roll your own in that case.
<discocaml>
<contificate> To get around the pointer stuff, you can just ascribe tags yourself. That's not too uncommon when you can't rely on an actual pointer value, since the object it points to may be moved (during collection/movement from minor to major heap).
dhil has joined #ocaml
<remexre>
Yeah, Hashtbl.hash doesn't work because of the mutability; by a tag, you mean add a field with unique contents to each value? I think that'd work, actually...
<discocaml>
<contificate> I've done it before, although I haven't done it for mutable keys.
<discocaml>
<contificate> In the past, I've thought I'd need mutable keys but managed to work around it.
<discocaml>
<contificate> For example, you can do a LALR parser generator (which is like sets of item sets, modulo lookahead - you merge them, blah blah), and I just had a kind of "canonical representation" map, immutable keys (the immutable component) mapping to the mutable representation (which I modified during processing, then basically "resolved" every item set by gets its representative from the map at the end).
<discocaml>
<contificate> For example, you can do a LALR parser generator (which is like sets of item sets, modulo lookahead - you merge them, blah blah), and I just had a kind of "canonical representation" map, immutable keys (the immutable component) mapping to the mutable representation (which I modified during processing, then basically "resolved" every item set by getting its representative from the map at the end).
<discocaml>
<contificate> For example, you can do a LALR parser generator (which is like sets of item sets, modulo lookahead - you merge them, blah blah), and I just had a kind of "canonical representation" map, immutable keys (the immutable component - LR(0)/core item set) mapping to the mutable representation (the LR(0) core w/ lookaheds - which I modified during processing, then basically "resolved" every item set by getting its representative from the map at th
<discocaml>
<contificate> For example, you can do a LALR parser generator (which is like sets of item sets, modulo lookahead - you merge them, blah blah), and I just had a kind of "canonical representation" map, immutable keys (the immutable component - LR(0)/core item set) mapping to the mutable representation (the LR(0) core w/ lookaheads - which I modified during processing, then basically "resolved" every item set by getting its representative from the map at t
mizlan has quit [Remote host closed the connection]
mizlan has joined #ocaml
mizlan has quit [Remote host closed the connection]
mizlan has joined #ocaml
<discocaml>
<Et7f3 (@me on reply)> It depend of the os. On windows it seems to be a viable option
gareppa has quit [Quit: WeeChat 3.8]
John_Ivan__ has quit [Quit: Disrupting the dragon's slumber one time too often shall eventually bestow upon all an empirical and indiscriminate conflagration that will last for all goddamn eternity.]
gareppa has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
Serpent7776 has quit [Ping timeout: 272 seconds]
John_Ivan has joined #ocaml
olle has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml
bartholin has quit [Quit: Leaving]
waleee has quit [Ping timeout: 272 seconds]
gareppa has quit [Quit: WeeChat 3.8]
waleee has joined #ocaml
hrberg has quit [Ping timeout: 245 seconds]
hrberg has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
azimut has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
MarvelousWololo has quit [Ping timeout: 264 seconds]