companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
olle has quit [Ping timeout: 264 seconds]
John_Ivan has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
williewillus has joined #ocaml
genpaku has quit [*.net *.split]
theblatte has quit [*.net *.split]
sagax has quit [*.net *.split]
troydm has quit [*.net *.split]
Putonlalla has quit [*.net *.split]
xgqt has quit [*.net *.split]
johnel has quit [*.net *.split]
motherfsck has quit [*.net *.split]
lthms has quit [*.net *.split]
qwr has quit [*.net *.split]
tomku has quit [*.net *.split]
hannes has quit [*.net *.split]
greenbagels has quit [*.net *.split]
Leonidas has quit [*.net *.split]
Leonidas has joined #ocaml
qwr has joined #ocaml
johnel has joined #ocaml
lthms has joined #ocaml
troydm has joined #ocaml
greenbagels has joined #ocaml
Putonlalla has joined #ocaml
genpaku has joined #ocaml
greenbagels has quit [Changing host]
greenbagels has joined #ocaml
xgqt has joined #ocaml
motherfsck has joined #ocaml
tomku has joined #ocaml
hannes has joined #ocaml
theblatte has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
chrisz has quit [Ping timeout: 264 seconds]
chrisz has joined #ocaml
waleee has quit [Ping timeout: 246 seconds]
spip has joined #ocaml
bobo_ has quit [Ping timeout: 268 seconds]
kuso has quit [Ping timeout: 252 seconds]
fuji has joined #ocaml
jao has quit [Ping timeout: 248 seconds]
gwizon has joined #ocaml
xd1le has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
gwizon has quit [Ping timeout: 250 seconds]
gwizon has joined #ocaml
gwizon has quit [Ping timeout: 264 seconds]
gwizon has joined #ocaml
gwizon has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has joined #ocaml
azimut has joined #ocaml
gwizon has joined #ocaml
bartholin has quit [Quit: Leaving]
gwizon has quit [Read error: Connection reset by peer]
gwizon has joined #ocaml
williewillus has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
gwizon has quit [Ping timeout: 260 seconds]
foldleft has joined #ocaml
mro has joined #ocaml
mro has quit [Quit: Leaving...]
Serpent7776 has joined #ocaml
foldleft has quit [Quit: Bye]
foldleft has joined #ocaml
Tuplanolla has joined #ocaml
olle has joined #ocaml
xgqt has quit [Quit: WeeChat 3.5]
xgqt has joined #ocaml
szkl has joined #ocaml
wonko has joined #ocaml
foldleft has quit [Quit: Bye]
Haudegen has joined #ocaml
foldleft has joined #ocaml
foldleft has quit [Quit: Bye]
John_Ivan has joined #ocaml
wingsorc has joined #ocaml
gwizon has joined #ocaml
rgrinberg has joined #ocaml
Everything has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gwizon has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
gwizon has joined #ocaml
dian has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gwizon has quit [Ping timeout: 268 seconds]
hashflu has joined #ocaml
wonko has quit [Ping timeout: 260 seconds]
<ski> olle : "with the stack as phantom types" ?
jao has joined #ocaml
foldright has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 250 seconds]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
spip has joined #ocaml
bobo_ has quit [Ping timeout: 252 seconds]
<olle> Sure
<olle> ski: Not clear?
xd1le has quit [Quit: xd1le]
jao has quit [Ping timeout: 250 seconds]
zebrag has joined #ocaml
hashflu has quit [Quit: Connection closed for inactivity]
foldright has quit [Quit: Bye]
Everything has quit [Quit: leaving]
mro has joined #ocaml
gentauro has quit [Quit: leaving]
perrierjouet has quit [Quit: WeeChat 3.7]
gentauro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
olle has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
olle has joined #ocaml
mro has joined #ocaml
wonko has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
jao has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Read error: Connection reset by peer]
mro has joined #ocaml
<ski> olle : not sure what you intend by that, no
mro has quit [Read error: Connection reset by peer]
mro has joined #ocaml
mro has quit [Read error: Connection reset by peer]
<ski> olle : that's the link that was shown before i think (?). yea, reasonably so
mro has joined #ocaml
<olle> Alright, well just ask if something is not :)
bartholin has joined #ocaml
perrierjouet has joined #ocaml
<ski> olle : well, i don't see what that post has to do with concatenative languages or stacks
mro has quit [Quit: Leaving...]
Stumpfenstiel has joined #ocaml
bartholin has quit [Ping timeout: 260 seconds]
<olle> ski: The stack can be simulated inside the type-system, so you move errors from runtime to compile-time
wonko has quit [Ping timeout: 268 seconds]
<ski> yes
<ski> i figured out one way to do it, years ago. might be the same as the one mentioned in Armael's link (haven't checked yet). you can also do it with pairs
<ski> but i'm not sure how (or in which sense) phantom types would fit in
<ski> (or row types)
<ski> olle ^
wonko has joined #ocaml
Serpent7776 has quit [Ping timeout: 248 seconds]
<olle> ski: Type-level peano numbers, yes
<olle> Since a word in forth expects a certain stack structure, the function would accept a stack state with the correct type only
fuji has left #ocaml [#ocaml]
<ski> oh, you mean like a "vector" GADT / indexed family, indexed by peano yes
<ski> (sorry, when i hear "phantom", i don't directly think of GADT)
<olle> Not sure what that is
<olle> No, GADT is not phantom, true
<olle> You'd have to check examples further down in the thread, unrelated to GADT
rgrinberg has joined #ocaml
<ski> "that" being ?
<ski> oh, vector
<ski> in Haskell terms, `data Vector a :: Nat -> Type where Nil :: Vector Zero; Cons :: a -> Vector a n -> Vector a (Succ n)'. here `data Nat = Zero | Succ Nat' is a (`data' type promoted to a) `data' kind
<ski> (in Agda it's basically the same, except there's no need to "promote", type of `Vector' can be `Set0 -> Nat -> Set0' with `Set0' being a `Set1' and `Nat' being a `Set0')
<olle> Hm
<ski> (.. but in your case, you'd want to index by a list of types, rather than a peano natural, i guess. `data Stack :: [Type] -> Type; Nil :: Stack '[]; Cons :: a -> Stack as -> Stack (a ': as)')
<ski> (in OCaml, i think without promotion, you could use `type Zero',`type 'a Succ', or `type Nil',`type ('a,'as) Cons' ?)
<ski> type _ stack =
<olle> Don't know what promosion is, sorry :)
<ski> | SNil : Nil stack
<ski> | SCons : 'a -> 'as stack -> (('a,'as) Cons) stack
<ski> something like that, possibly ?
<olle> ski: Yep
<olle> Such a special language, this forth thing
<ski> dead article ? works here
<ski> (without the "u" before the "https")
<ski> Forth is neat, yea
<ski> <https://en.wikipedia.org/wiki/Threaded_code> is quite interesting
<olle> hm hm
<olle> Not much resources out there, mostly related to embedded boards
<olle> Gotta sleep, see ya \o
<ski> g'night
* ski should try out some Commodore 64 Forths
<ski> e.g. ultraForth^WvolksForth, since CC64 (a (non-cross) C compiler on the C64) was written using that, by Philip Zembrod. he's recently taking up coding on it, again
olle has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wingsorc has quit [Remote host closed the connection]
wingsorc has joined #ocaml
wingsorc has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 248 seconds]
wingsorc has joined #ocaml
Stumpfenstiel has quit [Ping timeout: 246 seconds]
wingsorc has quit [Remote host closed the connection]
azimut has quit [Ping timeout: 258 seconds]
wingsorc has joined #ocaml
wonko has quit [Ping timeout: 260 seconds]
wingsorc has quit [Remote host closed the connection]
wingsorc has joined #ocaml