[00:17:24] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has joined the channel. [00:28:58] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has quit (Quit: ubolonton). [01:02:40] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has joined the channel. [01:12:47] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has quit (Quit: ubolonton). [01:16:20] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has joined the channel. [01:26:51] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has quit (Quit: ubolonton). [01:48:43] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has joined the channel. [02:55:05] i got all the functors ported to interpolate syntax [02:55:40] it turns out there are two main patterns we use depending on where the generated code goes [02:57:02] inline functors define words that live in the vocabulary that defined them. like a sorting functor that takes a quotation, e.g. to sort by length. "length" [ length ] define-sorting [02:57:40] that defines length<=> and length>=< which live in the vocabulary that had that line, sequences.parser in this case [02:58:15] the other pattern is an entirely new generated vocabulary, e.g. SPECIALIZED-ARRAY: int [02:59:22] you aren't supposed to use these vocabularies directly, you are supposed to repeat the syntax for which words you need everywhere. so ``SPECIALIZED-ARRAY: int`` appears many places, but it gets compiled once and memoized [03:01:21] IN: scratchpad SORTING: length [ length ] [03:01:35] "abc" "abcd" length<=> . [03:01:38] +lt+ [03:02:10] i'm declaring war on top-level code that is not in a definition form [03:02:51] functors were guilty of this but now they can all be syntax forms [03:08:09] also i think all code generation can be moved to functors. generating accessors for one [03:13:47] * ubolonton [ubolonton!~ubolonton@171.250.18.211] has quit (Quit: ubolonton). [03:30:50] I decided against top-level code in Popr. It caused too many problems to be worth it. [06:41:28] hackerfoo: yeah. i wanted what i'm calling shuffleability [06:41:49] you can parse everything into top-level forms, shuffle them, rewrite the file, and it should parse/compile the same as before [06:42:19] obviously top-level code breaks this property [06:48:17] (because the words don't parse together, stick together, as part of a form) [06:56:47] shuffleability also means that you can define words out of order (unlike the current factor parser) [09:30:36] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has joined the channel. [11:11:32] * xkapastel [xkapastel!uid17782@gateway/web/irccloud.com/x-zjcrizwcjvmpuvee] has quit (Quit: Connection closed for inactivity). [11:19:41] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has quit (Quit: ubolonton). [11:24:44] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has joined the channel. [11:35:37] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has quit (Quit: ubolonton). [12:02:38] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has joined the channel. [12:03:08] erg: This also allows mutual recursive definitions. [12:05:39] More important (to me), I wanted to avoid adding any sort of name binding to Popr, but I needed to name functions. [12:08:04] My solution was to keeping the concatenative language pure, and instead create an outer module language designed only for binding names. [12:09:39] This worked out pretty well, because it also allows functors by merging modules, which are sets of bindings. [12:27:25] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has quit (Quit: ubolonton). [12:36:46] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has joined the channel. [12:38:17] * ubolonton [ubolonton!~ubolonton@117.7.255.8] has quit (Client Quit). [15:13:44] * delvinj [delvinj!~Miranda@2601:448:c580:292d:2c4f:2da2:91d6:e43d] has quit (Quit: delvinj). [15:34:02] * FreeFull [FreeFull!~freefull@defocus/sausage-lover] has quit. [17:55:45] * FreeFull [FreeFull!~freefull@defocus/sausage-lover] has joined the channel. [19:15:09] hackerfoo: mutual recursive definitions are important imo. you probably know, but factor does DEFER: foo2 : foo1 .. foo2 .. ; : foo2 .. foo1 .. ; [19:15:43] DEFER: can go away or at least not be used for this purpose, which is basically all usages [19:16:35] ': add2 ( x y -- z ) _ _ + ; 3 4 + . 7 [19:17:46] hackerfoo: do you have an example? [19:40:57] erg: What would you like an example of? [19:43:24] merging modules functors, binding names [19:46:25] erg: Here's the standard library that I'm working on: https://github.com/HackerFoo/poprc/blob/master/lib.ppr [19:46:52] it looks a bit like yaml heh [19:47:26] A module starts with: module MODULE_NAME: [19:47:49] * xkapastel [xkapastel!uid17782@gateway/web/irccloud.com/x-iqdqvijegqkfmvpx] has joined the channel. [19:48:11] And then definitions are: NAME: ... body ... [19:49:07] where the body can be a function definition in the core language, or a list of modules to merge. [19:52:46] A special case of merging modules starts with `imports:`, because the module reference "imports" can be used without naming it explicitly. [19:53:32] Modules are flat and can't be nested, but modules can reference (the union of) other modules. [19:57:08] The module language was designed to be independent from the core language, so it could be used for other purposes, such as for describing packages or build configuration. [20:36:05] hackerfoo: i like having an independent module language, cool [22:32:51] * MrBusiness [MrBusiness!~ArcMrBism@2602:306:8325:a300:903a:f8ff:80f3:1854] has quit (Read error: Connection reset by peer). [22:38:48] * MrBusiness [MrBusiness!~ArcMrBism@2602:306:8325:a300:d4e2:353d:cc1a:6700] has joined the channel.