companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Quit: Leaving.]
vicfred_ has quit [Quit: Leaving]
waleee has quit [Ping timeout: 276 seconds]
berberman has quit [Ping timeout: 256 seconds]
berberman has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
average has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 265 seconds]
gravicappa has joined #ocaml
average has quit [Quit: Connection closed for inactivity]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
glassofethanol has joined #ocaml
nd__ has quit [Ping timeout: 258 seconds]
mbuf has joined #ocaml
mro has quit [Remote host closed the connection]
nd__ has joined #ocaml
Kakadu has joined #ocaml
olle has joined #ocaml
Tuplanolla has joined #ocaml
mro has joined #ocaml
mro has quit [Quit: Leaving...]
Tuplanolla has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
<Anarchos> I made a pull request in order to let ocaml install on Haiku 64 bits (x86/amd)
nd__ has quit [Quit: leaving]
nd__ has joined #ocaml
dhil has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
bartholin has quit [Ping timeout: 256 seconds]
olle has quit [Ping timeout: 258 seconds]
olle has joined #ocaml
<d_bot> <Bluddy> what's the deal with Haiku? What is it for?
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
olle has quit [Ping timeout: 250 seconds]
nd___ has joined #ocaml
olle has joined #ocaml
nd__ has quit [Ping timeout: 252 seconds]
nd___ has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
bartholin has joined #ocaml
<d_bot> <Bluddy> sorry for the non-sequitur, but I'm genuinely curious
nd__ has joined #ocaml
<Anarchos> i need help about porting dune to an architecture without wait3()
jtck has quit [Read error: Connection reset by peer]
jtck has joined #ocaml
waleee has joined #ocaml
Brocoli_ has joined #ocaml
damien3 has joined #ocaml
tizoc` has joined #ocaml
p4bl01 has joined #ocaml
rks`_ has joined #ocaml
engil1 has joined #ocaml
dmbaturin_ has joined #ocaml
gahr_ has joined #ocaml
Cypi_ has joined #ocaml
Cypi has quit [Killed (NickServ (GHOST command used by Cypi_))]
Cypi_ is now known as Cypi
ccx_ has quit [*.net *.split]
Armael has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
p4bl0 has quit [*.net *.split]
greenbagels has quit [*.net *.split]
engil has quit [*.net *.split]
rks` has quit [*.net *.split]
damien2 has quit [*.net *.split]
tizoc has quit [*.net *.split]
gahr has quit [*.net *.split]
tizoc` is now known as tizoc
greenbagels has joined #ocaml
ccx_ has joined #ocaml
zebrag has joined #ocaml
mbuf has quit [Quit: Leaving]
gahr_ is now known as gahr
reynir has quit [Quit: WeeChat 2.3]
mro has joined #ocaml
reynir has joined #ocaml
olle has quit [Ping timeout: 265 seconds]
mbuf has joined #ocaml
Brocoli_ is now known as Armael
mbuf has quit [Quit: Leaving]
glassofethanol has quit [Quit: leaving]
mro has quit [Quit: Leaving...]
dmbaturin_ is now known as dmbaturin
nd__ has quit [Ping timeout: 272 seconds]
olle has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 258 seconds]
Kakadu has quit [Remote host closed the connection]
vicfred has joined #ocaml
PinealGlandOptic has quit [Ping timeout: 245 seconds]
olle has quit [Ping timeout: 258 seconds]
<d_bot> <monk> what would be the simplest approach to writing parser combinators using ocaml's stdlib? would composing them out of scanf make sense?
<companion_cube> the simplest approach is to use a library :D
<d_bot> <monk> not looking for sophistication, more for just learning the general premise/strategy
<companion_cube> (but no, scanf is most likely a bad idea, even in C)
<d_bot> <monk> wait, so scanf is bad idea with ocaml
<d_bot> <monk> for this at least
<companion_cube> well, for a start, you'd need scanf to work on string slices, not a full string
Anarchos has quit [Ping timeout: 258 seconds]
<companion_cube> scanf can be useful in very small parts (like, you read a hexadecimal number some other way, get a substring, and then use `sscanf thesubstring "%x" (fun x->x)` or sth like that)
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 258 seconds]
<Drup> honestly, using scanf is not a very good idea in general
<kvik> i always found it... curious, how performing a seemingly basic task of working with input data just about requires a computeering degree. you better not use this thing (scanf) that claims it does what you want. you better not write your own scanner because it'll be brittle (say in c) and the errors will suck. you better not import this framework of a library because... etc.
<kvik> moral of the story: computers are terrible listeners
<companion_cube> something like angstrom is basically a scanner framework, I think
<companion_cube> it does lack stuff to read integer or float literals
PinealGlandOptic has joined #ocaml
nd__ has joined #ocaml
<Corbin> Workflow question: I have an expression that I want to typecheck in a context; like, I have a #use that I give to utop, and get the context all set up, and then I ask utop to tell me the type of some fun.
<Corbin> Is there a more ergonomic way to do this than to go through a toplevel prompt, given that most/all of the context is in a .ml file already?
<companion_cube> install merlin/ocamllsp, use the key binding for "type of expression"
<companion_cube> + under cursor
nd__ has quit [Ping timeout: 265 seconds]
xenu is now known as xenu[libera]
xenu[libera] is now known as xenu[i]
xenu[i] is now known as xenu
<d_bot> <monk> yeah I basically wanted to roll a naive and smaller subset of angstrom parser combinatory
<d_bot> <monk> Combinators*
<companion_cube> can't blame you, I did that as well
oriba has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
haesbaer1 has quit [Quit: leaving]
haesbaert has joined #ocaml
nd__ has joined #ocaml
<Corbin> companion_cube: That's acceptable. Is there a programmatic way to do it? I guess I don't know what a programmatic handling of types would look like, but I'm interested in what other folks do.
nd__ has quit [Ping timeout: 250 seconds]
<companion_cube> oh, hmm, I use tools, I don't write them :/
<companion_cube> I imagine you use emacs, no? :D
<Corbin> I use vim (grew up on the West Coast), but what I'd like to do is take snippets of compiled-towards-OCaml code and compose them with type-correct frontends in an automatic way. I was hoping not to involve myself in the process.
<Corbin> (I am looking at integrating Merlin right now, but I don't normally do tab-completion in editors, so I'm not sure if I'd benefit much. It is quite nifty, for sure.)
<companion_cube> hmm that sounds hard :p
<companion_cube> don't use it for tab completion, use it for goto-def and fast type errors return
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 272 seconds]
nd__ has joined #ocaml
<d_bot> <Alistair> Whats the best way of getting the rewritten AST of test file using a local ppx rewriting (build w/ dune)?
nd__ has quit [Ping timeout: 272 seconds]
<companion_cube> I have no idea, I'd look in _build/…
bartholin has quit [Quit: Leaving]
olle has joined #ocaml
Serpent7776 has quit [Quit: leaving]
olle has quit [Ping timeout: 256 seconds]
sagax has quit [Ping timeout: 268 seconds]
<d_bot> <monk> wondering how dumb it would be to try rolling parser combinators as described in the hutton & meijer paper
<companion_cube> is that in Haskell?
nd__ has joined #ocaml
<d_bot> <monk> yeah but it's not really advanced haskell, it's pretty legible and comes across as something easily transcribed
<d_bot> <monk> do not mistake me for someone comfortable in haskell or programming generally, fyi lol
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
nd__ has quit [Ping timeout: 272 seconds]
<companion_cube> it's not going to be easily transcribed because of lazyness, I'm afraid
dhil has quit [Ping timeout: 245 seconds]
<d_bot> <monk> didn't occur to me 😦
<companion_cube> Also it might be on lists of chars
<d_bot> <monk> i actually figured that part not really avoidable
<d_bot> <monk> at least for how i figured it
<d_bot> <monk> the goal really wouldn't be so much about efficiency as it would be figuring it out
<d_bot> <Alistair> If you’re looking for simple monadic parser combinators try: https://github.com/pyrocat101/opal
<d_bot> <monk> wow that's exactly the style of code i had in mind
<d_bot> <monk> 150 lines
<d_bot> <monk> dang
<d_bot> <Alistair> If you’re planning on using parser combinatory in a library tho, would recommend angstrom
<d_bot> <monk> nah it was going to be for a dumb small programming language implementation
<d_bot> <monk> the hope was to roll them myself
<d_bot> <monk> angstrom looks very nice, i have nothing against it
<d_bot> <monk> was just hoping i could figure out (if very naive and inefficient) ocaml flavored parser combinators on my own 😭
<d_bot> <monk> sigh
<d_bot> <Alistair> I mean I think the translation from Haskell to ocaml shouldn’t be too bad (modulo type classes etc), I remember doing it for some supo work a couple months ago (will check if I ran into anything now)
<companion_cube> @monk you could also look at CCParse in containers, it's internediate complexity I'd say
<d_bot> <Alistair> I just checked, translation was fine (used `Sequence` from `Base` for my lazy input stream)
<d_bot> <monk> are lazy streams a pattern that are explored somewhere?
<d_bot> <monk> this comes up as a result and seems good https://www.cs.cornell.edu/courses/cs3110/2018sp/l/12-streams/notes.html
<d_bot> <monk> it's obvious in retrospect but i would have absolutely owned myself without seeing the opal impl at top
<d_bot> <monk> and feel kinda dumb for that one lol
<d_bot> <monk> i will def checkout
<d_bot> <monk> thank you