snhmib has quit [Read error: Connection reset by peer]
<bartholin>
If you look for the sentence "In particular, we can explicitly use the type name as part of the pattern match, by prefixing it with a #:", it is followed by an example with no #
<bartholin>
As I don't know polymorphic variants, I don't know what that means.
jao has joined #ocaml
jao has quit [Ping timeout: 264 seconds]
kakadu has joined #ocaml
Haudegen has joined #ocaml
muelleme has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
muelleme has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
<Drup>
bartholin: I agree the example seem out of place
<Drup>
You can do this : type foo = [ `Foo | `Baz] type bar = [ `Bar ] let f = function #foo -> "foo" | `Bar -> "bar"
<Drup>
and f has type [ `Foo | `Baz | `Bar ] -> string
Haudegen has quit [Remote host closed the connection]
spew has quit [Ping timeout: 265 seconds]
<Drup>
rgr[m]: I have a chalenging potential dunification for you
Guest90922 has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
<rgr[m]>
Something other than tyxml?
<Drup>
rgr[m]: zarith
<Drup>
with custom configure file that checks various features, C files, assembly files and file selection that depends on the architecture
<rgr[m]>
Umm I tried porting another one of Xavier's packages to dune and he wasn't enthusiastic
<rgr[m]>
If he ever accepts my port of cryptokit we'll see..
<Drup>
Well, either it's jbuilder, or zarith will not have a ppx :>
<Drup>
I can't have an in-tree independant package for the ppx (as he asks, with reason) with the current spagetti makefile
<rgr[m]>
Now make this argument to him ;)
<Drup>
well, maybe it's possible, but I don't know how to write it :D
<Drup>
rgr[m]: anyway, I would be interested to know if it's even possible
<rgr[m]>
Very likely that it is. Much more involved projects have been ported. 95% of the work is usually just reverse engineering the shite makefiles.
<rgr[m]>
So it helps to know that a port would be accepted before spending time on this
huglovefan has joined #ocaml
muelleme has joined #ocaml
zolk3ri has joined #ocaml
dakk has joined #ocaml
pioneer42 has joined #ocaml
<sh0t>
skype
<sh0t>
lol wrong tab
AG4Koz0e has joined #ocaml
<AG4Koz0e>
What would be a good default implementation strategy for stdlib collection functions in a toy language created in 2018? Transducers, iteratees, something else?
<AG4Koz0e>
(#haskell seems to be too noisy, so I ask here too if you don't mind.)
<Drup>
AG4Koz0e: pure, impure, strict, lazy, with ad hoc polymorphisms, ... ?
webshinra has quit [Ping timeout: 256 seconds]
<AG4Koz0e>
Drup: definitely strict, probably impure, with ad-hoc polymorphism in the foreseeable future
<Drup>
Take rust's solution then
<AG4Koz0e>
Drup: I'm not really familiar with rust; they use iterators don't they?
<Drup>
generators, iirc
<Drup>
unit -> 'a option
Guest90922 is now known as Haudegen
<Drup>
alternatively, use the same as the new ocaml module, since it's quite easy to implement
<AG4Koz0e>
So, according to https://doc.rust-lang.org/std/collections/ they basically use the same old approach, only with linear types we can still be pure even if we mutate in-place
<Drup>
yeah, which is fine, for pragmatic purposes
<AG4Koz0e>
I mean, yeah, it's fine, but for a toy language I'd like to try something more adventurous and hopefully generic\extensible
<AG4Koz0e>
btw by the "new ocaml module" you mean ... ?
<AG4Koz0e>
Drup: well, yeah, kind of :) I quickly glimpsed over the code - it's nice, but basically the same thing as in e.g. clojure, lazy caching iterators dressed as cons-cells
<AG4Koz0e>
I want to try something that would work equally good on non-sequential collections out of the box
<Drup>
Right, I can't really recommand fancy haskelly things, because my opinion is that they are far too complicated for their own good (and most of their complexity come from lazy IO)
pierpa has quit [Ping timeout: 260 seconds]
pierpa_ has joined #ocaml
<AG4Koz0e>
That's true. (By the way, I'm not a haskell expert or even haskell practitioner by any means.) But it has crazy lots of stuff to explore and draw ideas from (maybe even too much!), so I'm kinda checking it out (slowly).
<AG4Koz0e>
Although right now I'm reading about transducers, and they seem very generic and easy enough to understand and use
<Drup>
yeah, until you check how they are implemented x)
<Drup>
and then you are like "wow, why does this has 5 type variables ?!"
<Drup>
(This is a slight exageration, but only slight :p)
<AG4Koz0e>
Well, I mean... If you're not in a pure language and don't go for fancy categorical interpretations of the thing... I've checked clojure implementations, it's pretty simple
<AG4Koz0e>
Except the local state maybe
<Drup>
Fair enough, I only looked at the haskell one
<Drup>
well, one of the haskell ones
<Drup>
Actually, there was some guy that did lot's of experimentations for iterators in OCaml
<AG4Koz0e>
Do you by any chance remember some terms that might help in googling that guy with his experiments? :D
pioneer42 has left #ocaml [#ocaml]
<AG4Koz0e>
By the way, since rust was mentioned earlier, I wonder how would transducers (or any fold-based solution for that matter) play with linear types... I guess you would need an iterator-based versions anyway
<Drup>
AG4Koz0e: I'm looking in my history, but I can't find it :/
<Drup>
ranger is more or less an overlay for slices
<companion_cube>
but what's the difference with what you want?
<Drup>
ranger will never handle importing a sequence in a lazy fashion
<companion_cube>
hmmmm
<companion_cube>
you want lots of caching, don't you? :)
<Drup>
I want all the caching \o/
ziyourenxiang has quit [Ping timeout: 240 seconds]
<companion_cube>
I mean, you're going to end up with a lazily populated patricia tree ^^
<Drup>
tree ? why tree ?
<Armael>
sounds wasteful memory-wise
<companion_cube>
or hashtable
<companion_cube>
whatever
<Drup>
I used growing vectors in the actual implementation
<companion_cube>
isn't that asusming you mostly access elements in consecutive order?
<Drup>
well, you need the previous elements to generate the nexts anyway
<companion_cube>
ah! ok
<companion_cube>
well it looks like you aleady have a lib? :)
<Drup>
I have an handrolled hack
<Drup>
It's not generic at all, and the structure is not very clever, it's just good enough for my use case
<companion_cube>
honestly I'm not very interested in such a structure ^^
<companion_cube>
I should do more urgent stuff like rebasing my IO PR :s
<Drup>
:(
AG4Koz0e has left #ocaml ["ERC (IRC client for Emacs 25.3.1)"]
dakk has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
spew has joined #ocaml
spew has quit [Ping timeout: 264 seconds]
cbot has joined #ocaml
huglovefan has joined #ocaml
ShalokShalom2 has joined #ocaml
ShalokShalom has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
malina has joined #ocaml
bartholin has quit [Read error: Connection reset by peer]
leah2 has quit [Ping timeout: 276 seconds]
pierpa has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
slash^ has quit [Read error: Connection reset by peer]
sh0t has joined #ocaml
leah2 has joined #ocaml
letoh has quit [Ping timeout: 260 seconds]
muelleme has joined #ocaml
cbot has quit [Ping timeout: 276 seconds]
sh0t has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
bartholin has joined #ocaml
argent_smith has quit [Quit: Leaving.]
jimmyrcom_ has quit [Ping timeout: 265 seconds]
_whitelogger has joined #ocaml
rain1 has joined #ocaml
<rain1>
hello
<rain1>
i was wondering about the possibility of bootstrapping ocaml from source alone (not using an existing ocaml binary)
<rain1>
is there any way to achieve that?
<octachron_>
It depends what you mean by source alone. If you are allowing yourself to use another compiler, an OS, and the hardware to run all this, you could write a new OCaml compiler to build the OCaml source files
<rain1>
yeah or maybe something like a rough ocaml interpreter that didnt bother with types
<rain1>
i wonder what path would be the simplest\
<octachron_>
Starting with just a book containing the OCaml code source sounds much harder
<Drup>
rain1: is your goal purely academic, or do you have a practical usage in mind ? ^^'
<rain1>
academic
<Drup>
rain1: johnelse wrote an evaluator for ocaml code that ignores types. You can't really use that to bootstrap since it covers very little of the language, but that's the only lead I can think of
<rain1>
it could certainly be valuable code to build upon
<octachron_>
Drup, and optionally typechecking, it seems
muelleme has quit [Ping timeout: 264 seconds]
moolc has joined #ocaml
jnavila has quit [Remote host closed the connection]
cbot has joined #ocaml
sh0t has joined #ocaml
zv has quit [Ping timeout: 240 seconds]
tarptaeya has quit [Quit: Byeeeeeee!]
zolk3ri has quit [Quit: Lost terminal]
letoh has joined #ocaml
isd has joined #ocaml
bartholin has quit [Quit: Leaving]
Chobbes has quit [Ping timeout: 240 seconds]
Chobbes has joined #ocaml
Chobbes has quit [Ping timeout: 240 seconds]
Chobbes has joined #ocaml
lostman has quit [Quit: Connection closed for inactivity]
moolc has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
huglovefan has quit [Quit: huglovefan]
zv has joined #ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 265 seconds]
Tykling-24800888 has joined #ocaml
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl yikyy: infinity0 ▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl bdrlqaxhsu: andrewalker ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl ozrdjiayw: igitoor ▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl fiksnyfglk: malina ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl llkcrm: catern ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl phznkpkbme: M-jimt ▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl uudbllwq: wagle ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl igeqlhgne: peddie[m] ▄▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iÑ�Ñ�.sцреÑ�иетs.оÑ�g Ñ�ни sцреÑ�воwl zgwjtssd: xaimus â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl gxxxag: talyian[m] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl rdfpfpx: malina ▄▄▄▄▄▄▄▄▄▄▄
<Tykling-24800888>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ HAPPY APRIL FLOODS DAY BROUGHT TO YOU BY iяс.sцреяиетs.ояg сни sцреявоwl doaxazf: seliopou ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Tykling-24800888 has quit [Remote host closed the connection]