ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kdef has quit [Quit: Leaving]
<Algebr>
Is there like a special name for functions that are just for going from variant to string and vice versa, the match x with `y -> "y"
tg has quit [Ping timeout: 256 seconds]
thomasga has quit [Quit: Leaving.]
tg has joined #ocaml
ollehar has joined #ocaml
MrScout has quit [Ping timeout: 265 seconds]
ncthom91 has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Algebr>
I'm noticing that if you adopt Result.t in your code base that you basically have to use it everywhere
shinnya has quit [Ping timeout: 245 seconds]
mengu has joined #ocaml
struktured has quit [Ping timeout: 265 seconds]
mengu has quit [Ping timeout: 256 seconds]
darkf has joined #ocaml
<ilia>
I have a question, how to use Map inside my type, e.g. type point = {x:int;y:int;z:int}. I want to add Map string to int to type point. How to implement it? and then query/add data
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olibjerd_ has joined #ocaml
struktured has joined #ocaml
agarwal1975 has joined #ocaml
ncthom91 has joined #ocaml
nullcat has joined #ocaml
Algebr has quit [Remote host closed the connection]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
palomer has joined #ocaml
palomer has quit [Client Quit]
<kido1412>
Thanks @Algebr
palomer has joined #ocaml
kido1412 has quit [Quit: Page closed]
palomer has quit [Quit: palomer]
idegen has quit [Quit: Leaving.]
idegen has joined #ocaml
palomer has joined #ocaml
palomer has quit [Client Quit]
BitPuffin|osx has quit [Ping timeout: 272 seconds]
Algebr has quit [Ping timeout: 255 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dav has joined #ocaml
The_Mad_Pirate has quit [Ping timeout: 252 seconds]
palomer has joined #ocaml
dav has quit [Ping timeout: 255 seconds]
psy_ has quit [Remote host closed the connection]
The_Mad_Pirate has joined #ocaml
ygrek has joined #ocaml
wraithm has quit [Quit: leaving]
ncthom91 has joined #ocaml
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
monoprotic is now known as nooneever
nooneever is now known as monoprotic
psy has joined #ocaml
ir2ivps4 has quit [Remote host closed the connection]
bjorkintosh has quit [Ping timeout: 250 seconds]
mk270_ has joined #ocaml
frawgie has joined #ocaml
w0rp_ has joined #ocaml
mal``` has joined #ocaml
palomer has quit [Quit: palomer]
milosn has joined #ocaml
iZsh_ has joined #ocaml
maurer_ has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ir2ivps4 has joined #ocaml
tobiasBo1 has joined #ocaml
The_Mad_Pirate has quit [*.net *.split]
mal`` has quit [*.net *.split]
cdidd has quit [*.net *.split]
meteo_ has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
w0rp has quit [*.net *.split]
maurer has quit [*.net *.split]
frawgie_ has quit [*.net *.split]
mk270 has quit [*.net *.split]
iZsh has quit [*.net *.split]
w0rp_ is now known as w0rp
cdidd has joined #ocaml
meteo_ has joined #ocaml
bjorkintosh has joined #ocaml
MercurialAlchemi has joined #ocaml
manizzle has joined #ocaml
psy has quit [Disconnected by services]
psy_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
meteo_ has quit [Remote host closed the connection]
ontologiae has joined #ocaml
matason has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
struktured has quit [Ping timeout: 265 seconds]
GeorgeHahn has joined #ocaml
GeorgeHahn has quit [Read error: Connection reset by peer]
matason has quit []
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ygrek has joined #ocaml
hay207 has joined #ocaml
bjorkintosh has quit [Ping timeout: 245 seconds]
Gama11 has joined #ocaml
olibjerd_ has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
hay207 has quit [Ping timeout: 272 seconds]
antkong has quit [Quit: antkong]
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
hay207 has joined #ocaml
bjorkintosh has joined #ocaml
jonludlam has joined #ocaml
Cyanure has joined #ocaml
Cyanure has quit [Remote host closed the connection]
mort___ has joined #ocaml
thomasga has joined #ocaml
mort___ has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 276 seconds]
matason has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
avsm has joined #ocaml
jonludlam has quit [Ping timeout: 256 seconds]
dsheets has joined #ocaml
larhat has joined #ocaml
olibjerd_ has joined #ocaml
mort___ has joined #ocaml
larhat has quit [Quit: Leaving.]
arj has joined #ocaml
<arj>
how can I "reload" loaded binary modules in utop? I always get the error that the module disagrees with its interface.
freling has joined #ocaml
Simn has joined #ocaml
axiles has quit [Ping timeout: 256 seconds]
larhat has joined #ocaml
snikkers has quit [Ping timeout: 255 seconds]
avsm has quit [Quit: Leaving.]
larhat has quit [Client Quit]
larhat has joined #ocaml
mort___ has left #ocaml [#ocaml]
djellemah has joined #ocaml
thomasga has quit [Quit: Leaving.]
antkong_ has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antkong_ has quit [Ping timeout: 240 seconds]
Kakadu has joined #ocaml
avsm has joined #ocaml
jonludlam has joined #ocaml
divyanshu has joined #ocaml
igitoor has quit [Ping timeout: 272 seconds]
matason has quit []
matason has joined #ocaml
palomer has joined #ocaml
igitoor has joined #ocaml
thomasga has joined #ocaml
palomer has quit [Client Quit]
Haudegen has quit [Ping timeout: 256 seconds]
braibant has joined #ocaml
oscar_toro has quit [Ping timeout: 255 seconds]
igitoor has joined #ocaml
igitoor has quit [Changing host]
ggole has joined #ocaml
mort___ has joined #ocaml
snikkers has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
Haudegen has joined #ocaml
cross has quit [Remote host closed the connection]
yomimono has joined #ocaml
thomasga has quit [Quit: Leaving.]
oscar_toro has joined #ocaml
palomer has joined #ocaml
freling has quit [Quit: Leaving.]
sdothum has joined #ocaml
palomer has quit [Quit: palomer]
thomasga has joined #ocaml
palomer has joined #ocaml
thomasga has quit [Client Quit]
lordkryss has joined #ocaml
octachron has joined #ocaml
palomer has quit [Quit: palomer]
AlexRussia has quit [Ping timeout: 250 seconds]
divyanshu has joined #ocaml
igitoor has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ocaml
palomer has joined #ocaml
ousado_ has quit [Ping timeout: 256 seconds]
Kakadu has joined #ocaml
<Drup>
ilia: what's the issue exactly ?
divyanshu has joined #ocaml
asmanur has quit [Ping timeout: 256 seconds]
asmanur has joined #ocaml
PM has quit [Ping timeout: 265 seconds]
zapu has joined #ocaml
antkong has joined #ocaml
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
sgnb has joined #ocaml
bbc has joined #ocaml
hbar has joined #ocaml
igitoor has joined #ocaml
mearnsh has joined #ocaml
octachron has joined #ocaml
antkong has quit [Ping timeout: 272 seconds]
_andre has joined #ocaml
w1gz has joined #ocaml
palomer has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
palomer has quit [Client Quit]
sepp2k has joined #ocaml
rbocquet has joined #ocaml
freling has joined #ocaml
thomasga has joined #ocaml
palomer has joined #ocaml
oscar_toro has quit [Ping timeout: 272 seconds]
thomasga has quit [Client Quit]
AlexRussia has joined #ocaml
palomer has quit [Client Quit]
pdewacht has quit [Ping timeout: 265 seconds]
<xificurC>
if I have type suit = ... [@@deriving show] and then want to print an instance through printf should I printf "bla bla bla %s bla bla bla" (show_suit s) ? I see something called pp_suit being created as well but have no idea what it is
TheLemonMan has joined #ocaml
mengu has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Remote host closed the connection]
larhat has quit [Quit: Leaving.]
AltGr has left #ocaml [#ocaml]
mort___ has quit [Quit: Leaving.]
larhat has joined #ocaml
<reynir>
How would one use ppx_tools/rewriter with ppx_deriving.show ?
<ollehar1>
"left as an exercise for the reader"
<reynir>
:)
<Drup>
xificurC: that, or "bla bla %a blabla" pp_suit s
<dmbaturin>
What do people do to simplify compiling their projects from emacs?
<haesbaert>
ah interesting, in this case it might be worth to make a generic recvmsg ? akin to the syscall, and exporting the common ancilliary data options
struktured has joined #ocaml
<Drup>
dmbaturin: "cd .. && make" ? :D
<Drup>
(as compiling command)
oscar_toro has joined #ocaml
<tokenrove>
i have ((nil . ((compile-command . "cd .. && ocaml setup.ml -all")))) in my .dir-locals.el in a project, but i think it doesn't actually work
<dmbaturin>
Drup: So just do it by hand? I thought maybe someone made a fancy plugin that looks up where the top level dir is. :)
<Drup>
not that i'm aware of
<Drup>
I don't think it would be ocaml specific
uris77 has joined #ocaml
mort___ has quit [Quit: Leaving.]
cross has joined #ocaml
freling has quit [Quit: Leaving.]
dav has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
Denommus` has joined #ocaml
mcclurmc has joined #ocaml
dav has quit [Ping timeout: 272 seconds]
mcclurmc_ has quit [Ping timeout: 244 seconds]
fedjo has quit [Remote host closed the connection]
badkins has joined #ocaml
jonludlam has quit [Ping timeout: 265 seconds]
fedjo has joined #ocaml
larhat has quit [Quit: Leaving.]
mort___ has joined #ocaml
BitPuffin has joined #ocaml
mort___ has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
<xificurC>
I'm running something inside a lwt thread (Lwr.return) and need to print inside iter, which wants a function ('a -> unit). What is the difference between using print_string or ignore @@ Lwt_io.print?
<flux>
the latter sounds more heavyweight to me, but I'm just guessing.
<dsheets>
xificurC, why not use Lwt_list.iter? ignoring 'a Lwt.t values is probably not a good idea. Doing I/O on fds inside lwt is also not so great
<xificurC>
dsheets: it's Gen.iter
struktured has quit [Ping timeout: 256 seconds]
jonludlam has joined #ocaml
<xificurC>
I don't think there's an Lwt equivalent for that :)
<flux>
Gen.fold?
<xificurC>
flux: why fold? I don't follow probably, the purpose of the function is to print a line
<dsheets>
xificurC, fold the 'a Lwt.t to bind
<xificurC>
I see. Wouldn't have thought of that, thanks
uris77 has quit [Quit: leaving]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
larhat has joined #ocaml
dav has joined #ocaml
darkf has quit [Quit: Leaving]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
shinnya has joined #ocaml
mort___ has left #ocaml [#ocaml]
dav has quit [Ping timeout: 244 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
Denommus has quit [Ping timeout: 264 seconds]
arj has quit [Quit: Leaving.]
ncthom91 has joined #ocaml
dubosec has quit [Ping timeout: 276 seconds]
ollehar has quit [Quit: ollehar]
dubosec has joined #ocaml
freling has joined #ocaml
jonludlam has quit [Ping timeout: 265 seconds]
jeffmo has joined #ocaml
octachron has quit [Quit: Leaving]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sdothum has joined #ocaml
jonludlam has joined #ocaml
_andre has quit [Quit: leaving]
ncthom91 has joined #ocaml
ingsoc has joined #ocaml
nullcat has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kdef has joined #ocaml
snikkers has quit [Ping timeout: 276 seconds]
freling has quit [Quit: Leaving.]
badkins has quit []
MrScout has joined #ocaml
_obad_ has quit [Ping timeout: 245 seconds]
uris77 has joined #ocaml
Cyanure has joined #ocaml
Haudegen has quit [Ping timeout: 245 seconds]
yomimono has quit [Ping timeout: 256 seconds]
Algebr has joined #ocaml
sgnb has quit [Remote host closed the connection]
Denommus` has quit [Ping timeout: 252 seconds]
octachron has joined #ocaml
sgnb has joined #ocaml
ygrek has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
badkins has joined #ocaml
thomasga has quit [Quit: Leaving.]
slash^ has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dmbaturin>
smondet: I've been looking into it today, along with planck. Is there real documentation rather than just API reference, like that of Menhir?
avsm has joined #ocaml
<smondet>
dmbaturin: not that I know of
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lordkryss has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has quit [Remote host closed the connection]
matason has quit []
MercurialAlchemi has joined #ocaml
TheLemonMan has joined #ocaml
psy_ has quit [Ping timeout: 272 seconds]
tianon has quit [Ping timeout: 246 seconds]
nullcat_ has joined #ocaml
manizzle has joined #ocaml
avsm has quit [Quit: Leaving.]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MrScout has quit [Ping timeout: 265 seconds]
Kakadu has quit [Quit: Page closed]
maurer_ is now known as maurer
nopf has quit [Read error: Connection reset by peer]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vpm has quit [Remote host closed the connection]
vpm has joined #ocaml
larhat has joined #ocaml
psy_ has joined #ocaml
matason has joined #ocaml
octachron has quit [Quit: Leaving]
vpm has quit [Ping timeout: 264 seconds]
swgillespie has joined #ocaml
manizzle has quit [Ping timeout: 256 seconds]
<xificurC>
what to use for benchmarking?
tianon has joined #ocaml
<flux>
maybe 'bench' or 'benchmark' from opam?
<flux>
I don't recall which of them I've used :)
<flux>
look both and choose the one with more appealing output/interface?-)
nopf has joined #ocaml
<Drup>
benchmark is nicer
<Drup>
it's very configurable and produce nicely formated output
<xificurC>
yeah I was checking out both, will try benchmark, thanks for the tips :)
<xificurC>
is it ok to run the benchmarks simply from utop?
<xificurC>
or is there a specific way needed to get correct results
<Drup>
well, it's not wrong, but It's probably not a fabulous idea
<xificurC>
Drup: how do you suggest running the bench then :)
nopf has quit [Remote host closed the connection]
agarwal1975 has quit [Quit: agarwal1975]
<Drup>
put it in a file and compile it ? :D
<xificurC>
thought that much but wanted to make sure :)
agarwal1975 has joined #ocaml
uris77 has joined #ocaml
<Drup>
in native, obviously
<xificurC>
yeah :D
ygrek has joined #ocaml
tianon has quit [Quit: "I'm a very important man. I've got a tower!"]
xificurC has quit [Remote host closed the connection]
nojb has joined #ocaml
Kakadu has joined #ocaml
asQuirreL has joined #ocaml
vpm has joined #ocaml
ygrek has quit [Ping timeout: 272 seconds]
xificurC has joined #ocaml
antkong has joined #ocaml
nojb has quit [Ping timeout: 252 seconds]
slash^ has quit [Read error: Connection reset by peer]
antkong has quit [Ping timeout: 272 seconds]
tianon has joined #ocaml
ygrek has joined #ocaml
jeffmo_ has joined #ocaml
jeffmo has quit [Ping timeout: 252 seconds]
jeffmo_ is now known as jeffmo
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nojb has joined #ocaml
swgillespie has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
badkins has quit []
mengu has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
nullcat has joined #ocaml
axiles has joined #ocaml
rand000 has joined #ocaml
nojb has quit [Read error: Connection reset by peer]
nojb has joined #ocaml
nopf has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apache2>
does anyone have a link to using alcotest or similar unit testing framework ? which is your favorite, and why?
Khady_ has joined #ocaml
peterbb_ has joined #ocaml
hsuh_ has joined #ocaml
larhat has quit [Quit: Leaving.]
rwmjones_ has joined #ocaml
ohama has quit [Disconnected by services]
<tokenrove>
i would like to hear about that, too. i use TestSimple because it outputs TAP, and i'm often working with other things that emit TAP, but it's pretty minimal. i've been meaning to try kaputt on my next project.
ohama has joined #ocaml
dmbaturin_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
teiresia1 has joined #ocaml
Wandering_Glitch has joined #ocaml
Cyanure has quit [Remote host closed the connection]
peterbb has quit [Ping timeout: 250 seconds]
rwmjones has quit [Ping timeout: 250 seconds]
mrknife has quit [Ping timeout: 250 seconds]
hsuh has quit [Ping timeout: 250 seconds]
WanderingGlitch has quit [Ping timeout: 250 seconds]
dmbaturin has quit [Ping timeout: 250 seconds]
cdidd has quit [Ping timeout: 250 seconds]
teiresias has quit [Ping timeout: 250 seconds]
tristero has quit [Ping timeout: 250 seconds]
Khady has quit [Ping timeout: 250 seconds]
<apache2>
what's TAP?
tristero has joined #ocaml
cdidd has joined #ocaml
<tokenrove>
test anything protocol
<apache2>
oh, it's a cross-language spec?
<tokenrove>
yeah. so i may have tests in a few different languages, and i can run them all with prove(1).
<apache2>
useful!
agarwal1975 has quit [Quit: agarwal1975]
<apache2>
I think I'll try out testsimple then. let me know if you find anything better
Armael has quit [Ping timeout: 245 seconds]
<Drup>
apache2: cohttp and irmin are using alcotest
mrknife has joined #ocaml
mrknife is now known as Guest78106
agarwal1975 has joined #ocaml
<orbitz>
Anyone know if Core provides a temporary file interface?
<zozozo>
orbitz: if need be, there is one in the stdlib
<Drup>
doesn't the original stdlib already provide that ?
<orbitz>
Yeah, I was hoping for a Foo.with_temp_file ~f:(fun filname -> ...) interface
<zozozo>
orbitz: in oUnit there is something like that (for unit tests)
enitiz has joined #ocaml
Armael has joined #ocaml
<Drup>
orbitz: that's 3 linse of code.
Kakadu has quit [Ping timeout: 272 seconds]
sepp2k has quit [Quit: Leaving.]
hay207 has quit [Ping timeout: 240 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kakadu has joined #ocaml
enitiz has quit [Quit: Leaving]
Hannibal_Smith has quit [Quit: Leaving]
<dmbaturin_>
Do people use parser combinators with ocaml?
dmbaturin_ is now known as dmbaturin
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Simn has quit [Quit: Leaving]
matason has quit []
<tokenrove>
my own conclusion was that they aren't as popular due to the long-standing availability of decent parser generators, combined with the slight overhead of bind (which may have changed by now)
<dmbaturin>
Opam download stats and dependencies make me think no one uses them, so I wonder if I should even try.
<Drup>
My personal opinion is that parser combinators sucks and there is no reason to use them over menhir, but I may have an extreme opinion on the question :]
<tokenrove>
but that might be totally wrong. i just remember looking for a parser combinator library a year or two ago and coming to that conclusion.
<dmbaturin>
Well, I've got an idea that needs fairly small grammar and performance is not a big concern, so I was thinking if I should try the alternative approach.
<Drup>
I find parser combinators library really annoying to use, in fact. I much prefer a properly defined grammar
agarwal1975 has quit [Quit: agarwal1975]
<Drup>
And I find the usual argument about expressiveness of parser combinators to be very fishy in the context of something else than NLP-like stuff.
shinnya has joined #ocaml
tane has quit [Quit: Verlassend]
<nullcat_>
is there any reliable JavaScript parser written in OCaml?
ygrek has joined #ocaml
<Drup>
nullcat_: in pfff
<Drup>
(yes, it's a real library name, written by facebook)
ncthom91 has joined #ocaml
<Drup>
there may be one in jsoo too, or maybe we took the one from pfff
<Drup>
I don't remember
<nullcat_>
pfff's parser looks good
<nullcat_>
pfff looks a crazy tool...
<tokenrove>
there's also one in flow; is it the same one?
<nullcat_>
flowtype? yeah there is one
<Drup>
probably, considering it's the same people :D
<nullcat_>
i want to write something like a "semantic sed" for my final project. write in OCaml and compile to js for demo
olibjerd_ has quit [Ping timeout: 265 seconds]
<nullcat_>
vague idea, "semantic sed"
Gama11 has quit [Read error: Connection reset by peer]
<Drup>
nullcat_: why do you need a javascript parser for that ?
<nullcat_>
no... but I know INRIA has tons of good things that are little known outside of academia
<Drup>
Public Relation, the natural nemesis of the researcher.
klaymen has quit [Remote host closed the connection]
klaymen has joined #ocaml
<nullcat_>
my idea for this project is not fully clear yet. a small example could be matching ast using statement "if($int) {_} -> \1" just remove the if condition
<Drup>
you know ocp-grep ? :p
<nullcat_>
( actually the final project is determined by oneself, and it is graded by its creativity and difficulty. as long as it's related to PL or compiler )
<nullcat_>
i don't have many good ideas since I know most of the things I can figure out have been implemented...
<nullcat_>
ocp-grep... let me see
<nullcat_>
laptop running out of power...
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat_ has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
nullcat_ has quit [Client Quit]
uris77 has quit [Quit: leaving]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
lobo has joined #ocaml
<Denommus>
Drup: I'm almost rewriting NetwireOCaml to use some monadic abstract type just so ArrowLoop can be implemented, and mfix be provided by the user
<Drup>
do you really need the ArrowLoop instance ? ^^'
<Denommus>
Drup: absolutely
<Denommus>
Drup: say I have a wire that represents acceleration, which depends on another wire that represents drag
<Denommus>
Drup: drag depends on velocity, because the bigger the velocity, the bigger will be the drag
<Denommus>
Drup: but velocity depends indirectly on drag, because velocity depends on acceleration, which depends on drag
<Denommus>
Drup: the way to achieve that is with ArrowLoop
<Drup>
right
<apache2>
is it possible to explicitly define the type of a record field to match that of a previous?
<Denommus>
and since I want NetwireOCaml to be usable in games, this kind of recursive definition is essential
<apache2>
I can do it by type inferrence + hinting the compiler, but it would be nice to have type x = {name: string}; type y = {name: x.name}
avsm has joined #ocaml
<Drup>
apache2: "type x = y = ..."
<Denommus>
apache2: you can have type foo = string, type x = {name: foo}; type y = {name: foo}
swgillespie has joined #ocaml
<Denommus>
s/;/;;/
<apache2>
good point Denommus, perhaps that's easier to read as well
mengu has quit []
klaymen has quit [Ping timeout: 272 seconds]
rand000 has quit [Quit: leaving]
dav has joined #ocaml
klaymen has joined #ocaml
Algebr has quit [Ping timeout: 264 seconds]
nojb has quit [Ping timeout: 276 seconds]
freling has joined #ocaml
Kakadu has quit [Ping timeout: 240 seconds]
<Denommus>
Drup: another, ugly option would be to give the function a "initial value" for the wire
<Drup>
well, then, you are good for manual lazyness then
antkong_ has joined #ocaml
ollehar has quit [Quit: ollehar]
<apache2>
uh oh, records with similiarly named members, is there a way to add a record type qualifier to an expression? I have a List.map (fun z -> z.name) x_list and am getting an error saying that x_list is expected to be of the type (y list) because y = {name: string} too
<apache2>
I *can* rename the field, but would prefer not to
<Drup>
two solutions: z.Foo.name
<Drup>
Foo being the module where the record type is defined
<Drup>
or (fun (z : t) -> z.name)
<Drup>
(or any kind of type annotation, really)
<Drup>
and let the disambiguation fly
agarwal1975 has joined #ocaml
OnkV has joined #ocaml
<apache2>
oh, thank you. It's a nested List.map, I was unsuccessfully adding the type annotation to the outermost parameter
<apache2>
now it works! o/
theblatt1 has joined #ocaml
madroach_ has quit [Ping timeout: 264 seconds]
<Denommus>
Drup: yes, someone in ##programming raised a point confirming that I definitely need lazyness
madroach has joined #ocaml
<Denommus>
Drup: maybe even refactor the whole library
theblatte has quit [Ping timeout: 256 seconds]
<Drup>
did you look at React's fix combinator ?
antkong_ has quit [Quit: antkong_]
<Denommus>
Drup: I did, though to be honest I didn't quite grasp it
badkins has joined #ocaml
antkong_ has joined #ocaml
nullcat has joined #ocaml
Algebr has joined #ocaml
palomer has joined #ocaml
antkong_ has quit [Quit: antkong_]
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]