00:05:04 <arseniiv> hm I tried to abuse PuTTY for telnet to no result
00:18:07 <imode> my REPL hung up on you?
00:19:11 <arseniiv> I get a terminal window which closes almost instantly
00:19:50 <imode> maybe try netcat instead.
00:21:02 <arseniiv> oh now I get ::> but then a dialog box tells me “connection closed by remote host”
00:21:50 <imode> no errors on my end.
00:26:37 <imode> usually I'd see "broken pipe" or something.
00:34:11 <imode> a tape with an insertion feature that can be implemented as a constant time operation is starting to look better than a queue.
00:34:29 <imode> can be implemented internally as a circular buffer that can expand on either end.
00:36:10 <arseniiv> anyway maybe later I’ll run your old interpreter code if it’s not too old yet
00:37:24 <imode> arseniiv: https://hatebin.com/usnmammjft in case you want to run the REPL locally, sorry it's not working remotely.
00:54:07 <arseniiv> imode: roll won’t work for a singleton queue but last presumably will, so…
00:54:08 <imode> something I take issue with as well is the concept of "atomization" in the style of bohm. structured languages need validation (matching beginning/ending loops, etc.) while unstructured needs minimal validation (checking that all jumps are within memory bounds).
00:54:16 <imode> arseniiv: singleton queue?
00:54:23 <imode> a queue with a single element?
00:54:47 <imode> you can do : roll dup drop ;
00:55:03 <arseniiv> but wouldn’t you make roll a primitive?
00:55:17 <arseniiv> considering that circular buffer thing
00:55:18 <imode> why not, when you can define it?
00:55:27 <imode> ah yeah if I was using a tape, I'd just have left and right.
00:56:21 <imode> roll would be 'right' and last would be 'left'.
00:56:38 <imode> operands would just look left or right.
00:57:43 <imode> if you were to add two numbers together, for example, it'd "consume" them and insert the result under the cursor. internally, if you wanted to compile this down to something that didn't have insertion/deletion capabilities, you could implement shifting the tape left or right.
00:59:10 <arseniiv> <imode> you can do : roll dup drop ; => neat! I haven’t checked immediately
00:59:46 <imode> because I implemented 'dup' to just examine the head of the queue.
01:00:15 <imode> i.e 1 2 dup -> 1 2 1, vs. 1 2 dup -> 2 1 1
01:00:40 <imode> if you implemented it to be destructive, you'd do something like : roll dup last drop ;
01:00:40 <arseniiv> it makes sense as you take arguments from the left… or right, I take from the right
01:01:29 <imode> yeah. it's either "look at the head of the queue, see what its value is, enqueue a copy of it without dequeueing it."
01:01:38 <imode> or "dequeue an element, enqueue two of that element".
01:01:48 <imode> if you use the former, it's just : roll dup drop ;
01:02:02 <imode> if it's the latter, it's : roll dup last drop ;
01:02:06 <arseniiv> if I had realized queue programming is so much more fun that stack one some time ago
01:02:39 <imode> honestly this is more like tape-based programming with insertion and deletion under the cursor.
01:02:43 <arseniiv> alas I remember writing two or three half-finished stack concatenative language implementations
01:02:45 <imode> but it _is_ hella fun.
01:02:57 <imode> same... I used to be a stack evangelist.
01:03:07 <imode> I can't justify the juggling and arbitrary stack primitives.
01:03:18 <arseniiv> imode: now the tape, yes, it’s still fun and it even acquires additional charm
01:03:34 <imode> I had a sketch of a language that was essentially built in two parts.
01:04:02 <imode> the underlying state machine description of an operation/machine, and the macro language for stitching together machines.
01:04:23 <imode> I never got to a place where I was happy with it.
01:04:45 <imode> the macro language looked a lot like forth.
01:05:26 <imode> if you placed down a machine, and it was identified to have "anchor points", any machines you placed after that would be "glued" to those anchor points in sequence.
01:06:26 <imode> so 1 2 + if 4 5 + ; 6 7 + would reduce to an actual state graph.
01:07:28 <arseniiv> hm I just had a non-minimalistic idea: if one is to go with a circular tape to the end, for every operation F there could be a dual operation F* taking each of its arguments from the other end and placing its results likewise, and if you define F, F* is defined automatically as the elementwise * of its body
01:07:38 <imode> 1 -> 2 -> + -> if/1 -> 4 -> 5 -> + -> ; if/2 -> 6 -> 7 -> + -> halt
01:07:50 <imode> arseniiv: _exactly_.
01:08:31 <arseniiv> and I still haven’t read the last posts
01:08:32 <imode> would definitely want a circular tape. for no other reason than it's confusing when considering boundary conditions.
01:09:03 <imode> a bounded tape is just a circular tape with markers.
01:10:38 <imode> you _could_ implement a two or one-way infinite tape, though.
01:10:59 <imode> just insert a blank.
01:11:59 <arseniiv> why did we need an infinite tape yet?
01:12:12 <imode> TMs traditionally have an infinite tape.
01:12:24 <imode> i.e you can keep going in a direction and you have the memory you need.
01:12:52 <imode> so if your goal is to reach the end of the universe and put a bit there, you can build a machine that does that... but it won't halt.
01:12:55 <arseniiv> ah, there is a plan to fit a TM in this setting?
01:13:08 <imode> well, what you're slowly drilling down to _is_ a turing machine.
01:13:16 <int-e> /if/ you want to be Turing-complete, you need an infinite number of states (configurations)... the unbounded tape is how TMs achieve that.
01:14:38 <imode> the difference here is we're just talking about things built as extensions to TMs.
01:14:45 <arseniiv> imode: I don’t want to end up with TM! :P I’m happy with a circular tape with a thing between two cells working on it, it’s better than a marked cell
01:15:35 <imode> well, what's a circular tape but a bounded/unbounded tape that has markers signifying where to seek when you wrap around.
01:16:20 <arseniiv> of course there is an isomorphism
01:16:29 <imode> if your tape looks like [ 1 2 3 4 >5< ], and you move right, you can seek all the way back to [ and move right once.
01:16:45 <arseniiv> hm or how is it called when one bounded tape corresponds to a class of unbounded tapes
01:17:24 <imode> point is there's always a way to "drill down".
01:17:40 <imode> any operation can be reduced to its appropriate state graph.
01:17:56 <arseniiv> though I like the circular presentation, it implies left/right are O(1)
01:18:13 <imode> exactly. you can "stop" at a certain set of operations and present them as constant time.
01:18:17 <arseniiv> on TM they are linear on our tape length
01:18:18 <imode> and impement them as primitives.
01:20:32 <imode> the only issue I have is the command representation as it stands. this queue language is really just some macros that could reduce to a state graph.
01:21:06 <arseniiv> I’ll go sleep of circular tapes of nonstandard lengths flying through ℵ₁ parallel universes
01:21:18 <imode> hahaha, dream well man.
01:22:08 -!- arseniiv has quit (Quit: gone completely :o).
01:26:50 -!- imode has quit (Ping timeout: 240 seconds).
01:34:08 <HackEso> [U+2135 ALEF SYMBOL] [U+2081 SUBSCRIPT ONE]
02:10:08 -!- Phantom_Hoover has joined.
02:13:40 -!- Sgeo_ has joined.
02:16:42 -!- Sgeo__ has quit (Ping timeout: 245 seconds).
02:17:38 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds).
02:43:31 -!- imode has joined.
03:51:03 -!- Sgeo has joined.
03:53:38 -!- Sgeo_ has quit (Ping timeout: 240 seconds).
04:09:46 -!- Lykaina has joined.
04:44:35 -!- Lord_of_Life has quit (Ping timeout: 265 seconds).
04:47:40 -!- Lord_of_Life has joined.
04:54:35 <esowiki> [[1+]] M https://esolangs.org/w/index.php?diff=66333&oldid=66331 * TwilightSparkle * (+6) /* Examples */ Hash index starts from 0!!
05:10:51 <esowiki> [[1+]] https://esolangs.org/w/index.php?diff=66334&oldid=66333 * TwilightSparkle * (+149) /* Turing-Completeness */
05:12:04 <esowiki> [[1+]] https://esolangs.org/w/index.php?diff=66335&oldid=66334 * TwilightSparkle * (+53) /* Turing-Completeness */
05:19:29 -!- Sgeo has quit (Ping timeout: 276 seconds).
05:20:28 <esowiki> [[1+]] https://esolangs.org/w/index.php?diff=66336&oldid=66335 * TwilightSparkle * (+34) /* Turing-Completeness */
05:25:53 -!- Lykaina has quit (Quit: leaving).
05:31:53 -!- Frater_EST has joined.
06:00:25 -!- oerjan has quit (Quit: Nite).
06:39:01 -!- Sgeo has joined.
07:05:23 -!- Lord_of_Life has quit (Read error: Connection reset by peer).
07:10:46 -!- Lord_of_Life has joined.
07:42:02 -!- imode has quit (Ping timeout: 268 seconds).
07:45:45 -!- LKoen has joined.
07:50:20 -!- LKoen has quit (Remote host closed the connection).
07:51:20 -!- LKoen has joined.
08:18:01 -!- cpressey has joined.
08:27:47 -!- MrBismuth has quit (Read error: Connection reset by peer).
08:31:36 -!- Phantom_Hoover has joined.
08:38:25 -!- LKoen has quit (Remote host closed the connection).
08:40:37 -!- LKoen has joined.
08:42:19 -!- LKoen has quit (Remote host closed the connection).
08:44:52 -!- LKoen has joined.
08:56:57 -!- LKoen has quit (Remote host closed the connection).
09:03:22 -!- LKoen has joined.
09:25:39 <int-e> Hah: "As long as theoretical computer scientists can’t even prove basic conjectures like P≠NP or P≠PSPACE [...]"
09:26:02 <int-e> (from Q8 at https://www.scottaaronson.com/blog/?p=4317)
09:27:41 <myname> i once witnessed someone trying to explain to somebody who really didn't get it why P is a subset of PSPACE
09:28:43 <int-e> intuitively this is easy... a P algorithm can only touch a polynomial amount of memory (tape, whatever).
09:29:02 <int-e> Making it formal is probably quite tedious.
09:29:54 <int-e> (Especially if your model of computation is *not* Turing Machines but something closer to reality like RAM machines)
09:32:00 <int-e> Whose name is attached to NSPACE(f(x)) = DSPACE(f(x)^2)?
09:32:14 <cpressey> idk, I've always seen RAM machines as just hiding (a polynomial number of) head movements
09:33:09 <int-e> cpressey: Well personally I find P too coarse; exponents matter in practice.
09:33:47 <Taneb> There's the old joke that theory is more important than practice, except in practice
09:35:28 <int-e> Savitch (I meant \subseteq instead of =... I kind of forgot to go back and change it.)
09:38:12 <cpressey> What's all this about quantum supremacy now. Oh gosh. Scott Aaronson. I'm not sure I want to read this.
09:39:09 <myname> Taneb: i once was told a piece of conversation like "so, how are your studies different from mine" "well, we are doing more theorie: runtime analysis, proofs, ..." "if you proove something, it isn't theory anymore"
09:40:25 <cpressey> I suppose debunking quantum hype is a noble calling, but so is not caring about it.
09:40:42 <int-e> cpressey: But he does care now.
09:40:42 <Taneb> cpressey: that article is neither
09:41:21 <cpressey> >_> I should stop trying to make jokes.
09:42:08 <int-e> Sorry, I didn't observe any joke when I collapsed your sentence.
09:47:26 <HackEso> [U+2630 TRIGRAM FOR HEAVEN] [U+1D301 DIGRAM FOR HEAVENLY EARTH] [U+1D303 DIGRAM FOR EARTHLY HEAVEN]
09:55:06 <fizzie> Is there also a trigram for just plain earth?
09:58:20 <int-e> ski: ^^ question for you ;-)
10:10:27 <HackEso> [U+2637 TRIGRAM FOR EARTH]
10:20:21 <fizzie> I saw those at home, but at work they're just boxes. :/
10:20:26 <fizzie> Must be missing some fonts.
10:41:17 -!- Frater_EST has quit (Ping timeout: 245 seconds).
10:41:44 -!- LKoen has quit (Remote host closed the connection).
10:46:14 -!- LKoen has joined.
10:50:54 -!- LKoen has quit (Ping timeout: 246 seconds).
11:21:11 <esowiki> [[Byter]] M https://esolangs.org/w/index.php?diff=66337&oldid=66332 * PaniniTheDeveloper * (+0)
11:46:03 -!- Phantom_Hoover has quit (Ping timeout: 265 seconds).
12:38:37 <ski> int-e : also ⌜𝌅⌝ (and apparently also ⌜𝌀⌝ ?)
12:38:55 <HackEso> [U+1D305 DIGRAM FOR EARTH] [U+1D300 MONOGRAM FOR EARTH]
12:39:39 <ski> "usually associated with human (Chinese ren), rather than earth" (the latter one)
12:41:56 <ski> int-e : i was pondering the other day, using these (mono|di|tri|tetra|hexa)-grams as pixels (sortof), wondering why the internal ordering was inconsistent among them, and trying to make some sense of the associations of different meanings to the bits/trits
12:42:41 <ski> (perhaps the I Ching would explain some of it ?)
12:43:35 <ski> (in particular the internal ordering of the hexagrams is strange)
12:44:28 * ski glances at fizzie
12:49:40 -!- sebbu has quit (Quit: reboot).
12:50:46 <int-e> ski: hmm it embeds a fancy complementation operation (mirror image, except when the symbol is vertically symmetric; in that case, the boolean complement is taken instead)
12:50:47 * ski just realized what int-e meant by
12:50:53 <ski> <int-e> ski: Now does that mean that shift-o (for example) can produce any of A, B, H or I?
13:15:39 <esowiki> [[Pie]] N https://esolangs.org/w/index.php?oldid=66338 * InfiniteDonuts * (+327) Created page with "==Introduction== <b>Pie</b> is an 2-dimensional esoteric programming language created by [[User:InfiniteDonuts]] that is sort of a [[Befunge]]/[[PATH]] hybrid. Like Befunge, i..."
13:16:48 <esowiki> [[User:InfiniteDonuts]] https://esolangs.org/w/index.php?diff=66339&oldid=66269 * InfiniteDonuts * (+68)
13:21:28 <esowiki> [[Pie]] https://esolangs.org/w/index.php?diff=66340&oldid=66338 * InfiniteDonuts * (+176)
13:23:50 <myname> the github link results in a 404
13:26:02 <int-e> InfiniteDonuts doesn’t have any public repositories yet.
13:33:35 <esowiki> [[Pie]] https://esolangs.org/w/index.php?diff=66341&oldid=66340 * InfiniteDonuts * (+5)
13:41:39 <int-e> ski: https://en.wikipedia.org/wiki/King_Wen_sequence somewhat explains the duality (but there's also a lot of mystification surrounding all this)
13:47:27 <cpressey> I wonder about compiling Scheme to Javascript using CPS. JS has poor TCO support so you'd want to make a trampoline. But would you construct a custom trampoline for each program? It sounds like a neat approach regardless of the practical benefits it may or may not have.
13:51:16 <cpressey> I remember borrowing "Compiling with Continuations" from the library years & years ago. I remember liking it but I never got too deep and I don't remember any of the content specifically.
13:53:28 -!- Frater_EST has joined.
13:54:24 <cpressey> I think there's usually an assumption there that you'll be compiling to a machine language that has conventional jumps, though. Compiling to another high-level language with functions (and closures, even), but not TCO, would be putting a different twist on it.
13:55:06 <int-e> there's always for (;;) { switch (foo) { ... } }
13:55:20 <cpressey> Yeah, that's what I meant by "trampoline".
13:55:44 <int-e> or stuff like while (next != NULL) { next = (*next)(); }
13:57:50 <cpressey> Great. I now want to write a Scheme compiler that compiles to trampolined code, as if I don't already have enough on my todo list.
13:58:08 -!- Frater_EST has quit (Ping timeout: 246 seconds).
13:58:15 <cpressey> Thanks, personal interests! You're really helpful sometimes.
13:58:31 -!- Frater_EST has joined.
14:04:50 -!- Frater_EST has quit (Ping timeout: 240 seconds).
14:06:36 -!- Frater_EST has joined.
14:06:44 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=66342&oldid=66275 * InfiniteDonuts * (+10) /* P */
14:11:01 -!- Sgeo_ has joined.
14:13:57 -!- Sgeo has quit (Ping timeout: 268 seconds).
14:24:55 -!- Frater_EST has left.
14:31:46 -!- arseniiv has joined.
14:37:03 <arseniiv> I thought up a monoid thinking about types for stack operations. Though I already knew how to encode them with heterogeneous lists, I think a monoid looks more operationally usable. Or at least it looks neat in case we’re concerned only with stack under/overflow and not types of its elements;
14:38:45 <esowiki> [[L]] https://esolangs.org/w/index.php?diff=66343&oldid=53989 * InfiniteDonuts * (+100) /* Hello World */
14:39:57 <esowiki> [[L]] https://esolangs.org/w/index.php?diff=66344&oldid=66343 * InfiniteDonuts * (+77)
14:41:09 <arseniiv> in generic case, it’s a free monoid on t⁺, t⁻ for all types t, factored by t⁺t⁻ = e; in the simplest it’s a free monoid on +, − factored by +− = e. Now the last one looks almost like integers but with a quirk, so I thought maybe we need to name these things numbers too. Here, all balanced strings of + and − equal to e and we end up with a unique presentation of each element as −^m +^n
14:41:36 <arseniiv> in stack op terms it means m elements are popped and then n are pushed
14:41:53 <arseniiv> we can’t pop from empty stack so −+ is not e
14:42:27 <arseniiv> likewise with the general version, and we even may generalize to deques
14:43:55 <arseniiv> as two ends of a deque are basically independent from this perspective if we don’t know its length
14:43:56 <esowiki> [[Pie]] https://esolangs.org/w/index.php?diff=66345&oldid=66341 * InfiniteDonuts * (+87)
14:44:53 -!- imode has joined.
14:45:05 <arseniiv> now, we could do something like this with checking well-placedness of [ and ] but ? and ; would get in the way
14:47:13 <arseniiv> . o O ( now I propose calling those +−-things plumbers as the stack may be viewed as a tube )
14:48:36 -!- Frater_EST has joined.
14:51:09 <shachaf> whoa, if you link with -fno-plt, ld will turn statically linked calls from indirect jumps to direct jumps.
14:55:09 -!- Frater_EST has quit (Remote host closed the connection).
14:55:42 <esowiki> [[Special:Log/newusers]] create * Lewis * New user account
14:58:36 <ski> arseniiv : hm, reminds me of some kind of bra-ket description of something with regexen ?
14:58:52 <arseniiv> (BTW how old is trampoline idea)
14:59:18 <ski> perhaps you could find some mention in some Scheme paper
14:59:31 <arseniiv> ski: it reminded me about something QM too, creation and annihilation operators should work that way too IIRC
15:01:53 <ski> arseniiv : <https://web.archive.org/web/20180726144531/http://library.readscheme.org/> might have some relevant paper about it
15:02:31 <ski> cpressey : that ^ was for you
15:05:01 <imode> are you still working with that C compiler?
15:07:11 <imode> arseniiv: the thing I don't like about my current language is [ and ]. it kind of fails the model of computation check because [ and ] have to be balanced for the underlying logic to work.
15:08:33 <imode> which means that a PDA or counter machine is required to validate the language.
15:09:28 * ski supposes it was possibly both for arseniiv and cpressey ..
15:12:30 <myname> I fail to see how pie is notably different from befunge except it being underspecified
15:15:11 <cpressey> arseniiv: http://www.cs.indiana.edu/hyplan/dfried/ts.ps talks a bit about the history. As I understand it, the idea is old but appears in slightly different forms and doesn't get the name "trampoline" until about 1995.
15:17:30 * ski supposes cpressey got that link off <library.readscheme.org> :)
15:17:59 <cpressey> Indirectly, yes (The paper was listed there but wasn't archived; I had to search to find a copy of it)
15:18:14 <ski> too bad the domain expired
15:19:45 <arseniiv> <imode> arseniiv: the thing I don't like about my current language is [ and ]. it kind of fails the model of computation check because [ and ] have to be balanced for the underlying logic to work. => right. That they stand in the way of typing the program is almost the same thing here
15:20:32 <arseniiv> cpressey: thanks! (hmm I need a postscript viewer…)
15:21:02 <ski> arseniiv : perhaps `gv' ?
15:21:45 <ski> (someone mentioned `zathura' and `okular' too. and i think `evince' can do it ?)
15:22:02 * ski . o O ( `xpdf' )
15:23:10 <imode> I don't think there's a real solution to that problem. apart from manual jumps. I still think there needs to be a linear notation for state machines.
15:23:52 <cpressey> I'm on Ubuntu; `evince` can view .ps directly, and there is also `ps2pdf`
15:25:29 <cpressey> (apparently `ps2pdf` is part of `ghostscript`)
15:27:44 <cpressey> arseniiv, imode: fwiw, the last few concatenative languages I've designed have not had nesting or names, sort-of for the same reasons you mention. I've been calling them "purely concatenative" for that reason. They're not very nice to program in though.
15:28:19 <imode> cpressey: mine doesn't have nesting. [ and ] form an infinite loop.
15:28:31 <imode> it's a control flow construct more than anything.
15:32:02 -!- GeekDude has quit (Ping timeout: 240 seconds).
15:36:21 * ski usually uses `gv'
15:37:38 * ski idly ponders mapping concatenative to categorical
15:38:53 * ski idly ponders how to convert PDF to PS
15:39:02 <arseniiv> now I can uninstall ghostscript mwahaha
15:39:38 <imode> any structured control flow requires an external validator, so I guess it fits under a model of programming rather one of computation. unstructured, state-driven or pattern-based control flow are the only candidates for a model of computation.
15:42:13 <imode> why are array languages classified under "unstructured", I wonder.
15:43:27 <imode> https://en.wikipedia.org/wiki/Non-structured_programming <-- right-hand sidebar, right under "Non-structured".
15:43:45 <imode> I mean I guess APL has a goto statement, doesn't it?
15:43:55 <ski> maybe they mean "structured" in the sense of the "structured programming" paradigm ?
15:44:05 <imode> more than likely, yeah.
15:44:14 <imode> which APL fits under.
15:44:24 <ski> hm, looks that way
15:44:30 <imode> never liked array languages. they're complicated to implement.
15:45:00 <ski> <https://en.wikipedia.org/wiki/NESL>
15:45:13 <ski> "Nested data parallelism"
15:45:50 <imode> are you saying this isn't complicated to implement?
15:46:37 <imode> or that this fits the definition of an array language.
15:47:16 -!- GeekDude has joined.
15:56:00 <ski> hm, perhaps rather that it is complicated to implement
15:56:16 <ski> (and mayeb fits the definition, not sure ?)
15:57:52 <cpressey> ok well TIL there's a very close correspondence between CPS and A-Normal Form. (I knew of ANF previously but didn't see the connection to CPS at all.)
15:58:00 <imode> probably. I've seen people touting APL and K, etc. as "languages with the smallest implementations", but when your implementations are obfuscated and optimized for size rather than simplicity, it's a moot damn point.
15:58:22 -!- cpressey has quit (Quit: A la prochaine.).
16:01:28 <imode> array languages _are_ interesting, though. while they do have control flow operations, a lot of code I see doesn't even have any of them.
16:01:41 <imode> it's all operations on data.
16:03:13 <imode> they're hella messy, though..
16:05:50 * ski . o O ( <https://en.wikipedia.org/wiki/SAC_programming_language> )
16:10:38 <imode> unstructured control flow is hard to compose without sophisticated tooling, though. for example, creating a state machine that enters either a 'true' or 'false' state upon some comparison operation is fine, but composing two machines means identifying where the "anchor" points are for that given machine and attaching two subsequent machines accordingly.
16:14:10 <imode> stitching together state machines is also complex because you need names for duplicate/intermediary states as well...
16:20:32 <imode> if you used a line numbering approach, it could work. you still need some machinery to stitch together arbitrary code snippets, though.
16:23:07 * ski . o O ( ⌜10 PRINT "VOOB ";20 GOTO 10⌝ )
16:25:11 -!- grumble has quit (Quit: And this chaos, it defies imagination).
16:29:48 -!- grumble has joined.
16:32:01 -!- sebbu has joined.
16:43:43 -!- Sgeo has joined.
16:43:44 -!- Lord_of_Life_ has joined.
16:44:37 -!- Sgeo_ has quit (Ping timeout: 240 seconds).
16:46:37 -!- Lord_of_Life has quit (Ping timeout: 240 seconds).
16:46:38 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
17:10:52 <imode> arseniiv: you could probably get away with not validating [ and ] if you mean [ to be "push a symbol to the tape representing the current instruction pointer" and ] to be "jump to the instruction pointer represented on the tape".
17:12:22 <imode> though "conditional/unconditional break" would be difficult at that point, because you have to jump to an unspecified address..
17:15:03 <imode> you know what I didn't think of, though. relative addressing.
17:23:17 -!- FreeFull has joined.
17:25:36 <arseniiv> imode: `[ ] ? ;` are not so hard to validate as to represent as something typeful
17:26:29 <imode> they aren't hard to validate, no. but because they require validation, they don't meet my requirement anymore.
17:27:13 <arseniiv> oh, also it occurred to me as I drifted off that your new implementation of `pick` now can take any nonnegative integer index. Even if it’s too big, we’ll just wrap around several times and that’s it
17:28:12 <arseniiv> <imode> but because they require validation, they don't meet my requirement anymore. => yeah. I meant from my typing perspective
17:30:15 <arseniiv> of course that’s why compilers don’t use typing as the only kind of static information, but still I’ll be glad to unify them for cases as simple as this
17:32:15 <arseniiv> anyway it looks too philosophical. There is a constructive approach: program a validator which takes word at a time and then try to encode that as types; this is how I ended up with that +− monoid
17:32:34 <imode> this whole thing is largely philosophical lol
17:32:35 <arseniiv> previously I thought of those types as m → n where m, n : N
17:33:27 <arseniiv> but in this form they have no easy law of composing (f: m → n, g: m′ → n′, f ∘ g: ???); and the monoid representation has, it’s just a concatenation
17:34:08 <ski> "vertical composition" ?
17:34:17 <ski> (or is it "horizontal" ?)
17:34:22 * ski can never recall ..
17:36:12 <arseniiv> though maybe the notation is too cryptic, here f: m → n means f pops m values and then pushes n values
17:37:36 * ski idly wonders whether there's a name for monoids with left- and right- inverses like that
17:38:46 <arseniiv> FTR I was going to ask about that too
17:39:45 <arseniiv> they seem to be in a sense halfway to a free group
17:44:16 <ski> yea, first i was going to suggest free group, to you :)
17:44:39 <ski> (until i saw "we can’t pop from empty stack so −+ is not e")
17:44:57 * ski idly recalls talking to someone doing random walks in groups
18:04:06 <arseniiv> also we can define “multiplication” as can be done on (N, +) and (Z, +), by considering all [anti]endomorphisms. Here, they seem to form a group ≅ Z, so this “multiplication” is not that good; anyway “multiplying” by n would mean replacing each ± by ±^n if n ≥ 0, or by ∓^n if n ≤ 0. This makes not a lot of sense for applications of that monoid here, though
18:08:14 <ski> would that be a group action ?
18:08:18 <imode> now that I'm thinking of it, I don't think there's any model of computation that _doesn't_ require some validation of the code prior to execution other than perhaps cellular automata.
18:12:15 <rain2> depends how you set things up
18:12:33 <rain2> CA source code is binary strings and CA valid source code is binary strings
18:12:45 <rain2> lisp source code is ascii text and valid lisp source code is well balanced brackets
18:13:08 <rain2> but you could say, CA source code is ascii text and the only valid CA inputs are ones only using the 0 and 1 symbols
18:13:48 <imode> not really the case, here. state machines need to be stored in some format in some place, and that format needs to be some form of a state table.
18:14:15 <imode> brainfuck and my language are stored as linear text sequences, but only valid sequences contain matched brackets.
18:15:03 <imode> CAs are literally just "here's some data, with some regions linked together in some topological fashion, and data exists in those regions, and depending on what data is next to what, data in certain regions changes".
18:15:56 <rain2> I disagree completely
18:16:11 <imode> feel free to, I guess.
18:17:35 <arseniiv> ski: if I’m correct it would be a monoid action as (Z, ⋅) is what acts in this case, not (Z, +): m×(n×a) = (mn)a
18:24:29 -!- MDude has quit (Ping timeout: 246 seconds).
18:49:49 <shachaf> `asm label: nop; nop; addr32; jmp label
18:49:49 <HackEso> 0: 90 nop \ 1: 90 nop \ 2: 67 eb fb addr32 jmp 0 <label>
18:50:00 <shachaf> Is that just a no-op prefix byte?
18:50:21 <HackEso> 0: 67 e9 00 00 00 00 addr32 jmpq 0x6
18:57:08 -!- Phantom_Hoover has joined.
19:28:02 <ski> is that Z80, or what ?
19:29:02 <ski> instruction word size didn't look that large
19:30:11 <ski> a single byte for `nop' ?
19:31:03 <ski> oh, `67 eb' was the instruction, not just `67'
19:31:30 <shachaf> 67 is the addr32 prefix which I think doesn't do anything.
19:31:45 * ski talked to someone today who claimed that reading x86 opcodes in octal made more sense
19:31:57 <shachaf> ld inserts it when it wants a 6-byte immediate jump instruction.
19:32:03 <shachaf> ski: I've claimed that in this channel several times.
19:32:16 <ski> oh, must've missed that, then
19:32:22 * ski doesn't really do x86
19:32:27 <shachaf> I mean, I also heard the claim from someone else originally.
19:32:56 <shachaf> The main reason, I think, is that x86 has eight registers, which are encoded with one octal digit.
19:33:59 <shachaf> So e.g. "xchg %eax,REG" is encoded as 0220 | REG
19:35:59 <shachaf> The registers are numbered eax ecx edx ebx esp ebp esi edi
19:36:12 <shachaf> `asm .byte 0220, 0221, 0222, 0223
19:36:13 <HackEso> 0: 90 nop \ 1: 91 xchg %eax,%ecx \ 2: 92 xchg %eax,%edx \ 3: 93 xchg %eax,%ebx
19:36:58 <shachaf> Also there are some bytes that are encoded in 2-3-3 pieces.
19:38:23 <shachaf> "mov REGX, REGY" can be encoded as "0x8b 03YX"
19:38:46 <shachaf> (The encoding is redundant so it can be encoded two ways.)
19:41:14 -!- shapr has joined.
19:41:37 <HackEso> shapr: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: <https://esolangs.org/>. (For the other kind of esoterica, try #esoteric on EFnet or DALnet.)
19:42:13 <shapr> just dropping by to check out this place
19:42:20 * shapr goes back to writing useful code
19:42:21 -!- shapr has left ("ERC (IRC client for Emacs 26.3)").
19:43:46 <imode> as opposed to useless code.
19:48:27 <imode> are any esolangs based on logic programming?
19:49:51 <imode> prolog is an esolang to you, then?
19:52:09 <shachaf> It's about seeing what sorts of things you can do under bizarre constraints.
19:53:05 <imode> I'm caught between wanting a language to perform computations in, vs. a language that you can describe things in.
19:59:31 <arseniiv> <shachaf> I think so? => I agree too
20:00:39 <arseniiv> a small embedded Hoare disjunct engine may be useful, but a full-blown language? hello cuts
20:01:01 <imode> the latter seems to be a good thing to implement in the former, I guess.
20:01:28 <shachaf> I also think C++ is an esolang.
20:26:18 -!- hppavilion[1] has joined.
20:37:37 -!- hppavilion[2] has joined.
20:39:59 -!- hppavilion[1] has quit (Ping timeout: 268 seconds).
20:43:47 <imode> I think I should just be happy with what I've done. if I reduce any further, I hit the bottom, dealing with jumps and addresses, and if not that, state graphs the size of russia.
20:46:01 <imode> pay no mind to the fact that it's essentially a brainfuck clone with the conditional branching split from the unconditional branching.
20:46:15 <shachaf> I should be fair and call Prolog a "research language" rather than an "esoteric language".
20:46:20 <shachaf> Though the difference is hard to pinpoint.
20:46:35 <imode> companies actually use prolog, though.
20:47:09 <shachaf> They also actually use C++.
20:47:22 <imode> what's your point.
20:48:05 <shachaf> C++ is an esoteric language and not a research language.
20:48:14 <imode> define esoteric, I guess.
20:48:15 <shachaf> I guess Prolog is probably both, but more the latter?
20:48:48 <imode> if it's "intended for or likely to be understood by only a small number of people with a specialized knowledge or interest."... no, C++ is not esoteric.
20:48:52 <imode> neither is Prolog.
20:49:26 <shachaf> I think C++ is esoteric because it introduces artificial constraints that make things difficult, and people have a fun time solving puzzles within those constraints.
20:50:13 <imode> yeah, I'd disagree. C++ makes a lot of things easy. and some things hard. and it's hardly fun solving puzzles with it.
20:50:24 <imode> it's "Java but I can't use Java".
20:50:35 <imode> or insert managed language here, I guess.
20:50:44 <shachaf> I'm not saying it's always fun, but I think the original motivation is fun rather than practical.
20:51:06 <imode> if you examine the history, it was definitely designed to be practical.
20:51:26 <imode> it went from being practical to being practically comical, though.
20:52:13 <shachaf> Hmm, I don't think people would design C++ templates the way they are to be practical.
20:52:29 <shachaf> They would design better metaprogramming schemes if they weren't artifically constraining themselves.
20:53:52 <lambdabot> Raphael L. Levien's language with continuations as fundamental structure, described in his paper "Io: a new programming notation" (1989-09-10) at <http://dl.acm.org/citation.cfm?id=70931.70934> and
20:53:52 <lambdabot> in chapter 2 of Raphael A. Finkel's book `APLD', implementations `Amalthea',`Ganymede' - (perhaps you were looking for `@wiki Introduction to IO' ?)
20:54:40 <shachaf> It seems very similar to the thing I was talking about?
20:55:14 <shachaf> There's no way a person trying to design metaprogramming from scratch would end up with SFINAE and recursive template expansion rather than if statements and for loops.
20:55:27 <shachaf> It's just absurd, come on.
20:55:46 <imode> you'd be surprised at how bad some people's ideas can be.
20:56:09 <shachaf> I think it's a matter of extremely local optimizatin.
20:56:25 <imode> like, like it or not, someone came up with the idea of template metaprogramming.
20:56:34 <shachaf> C++ compiler people introduce templates for a very limited use, for generics. They add SFINAE as an afterthough.
20:56:37 <imode> it wasn't an artificial constraint, the idea was just crappy. :P
20:56:56 <shachaf> Then C++ programmers find out you can do ridiculous things with it to accomplish simple metaprogramming tasks.
20:57:37 <shachaf> Rather than introduce a better facility for metaprogramming, compiler people add more and more template ridiculousness (giving the people more of what they're using, rather than what they need).
20:58:24 <imode> bear in mind this is also a standard we're talking about. with multiple companies spearheading it.
20:58:51 <shachaf> Anyway writing in C++ templates is as esoteric an experience as any esolang.
20:59:50 <imode> yeah, I'll give you that...
21:08:03 -!- LKoen has joined.
21:20:37 -!- Sgeo_ has joined.
21:23:47 -!- Sgeo has quit (Ping timeout: 245 seconds).
21:29:37 -!- hppavilion[2] has quit (Ping timeout: 245 seconds).
21:50:53 -!- hppavilion[1] has joined.
22:30:55 <shachaf> `asm .byte 0x67, 0x67; jmp 0
22:30:56 <HackEso> 0: 67 67 e9 00 00 00 00 addr32 addr32 jmpq 0x7
22:31:14 -!- hppavilion[1] has quit (Ping timeout: 240 seconds).
22:37:00 <lf94> Is this good forth code? https://gist.github.com/jzakiya/4544459
22:37:12 <shachaf> `asm .byte 0x67; movq %rcx, (%rax)
22:37:13 <HackEso> 0: 67 48 89 08 mov %rcx,(%eax)
22:41:49 <imode> lf94: it's reasonable forth code. reasonably factored.
22:41:55 <imode> some words are larger than I'd like.
22:42:11 <lf94> if this is "good" forth code
22:42:14 <lf94> I dont like forth at all.
22:42:38 <lf94> assembly looks nicer than this
22:42:48 <imode> honestly, it's not that good.
22:43:08 <imode> it's passable. but again, large words mean shortcuts.
22:43:21 <imode> not a lot of things are defined for reuse here.
22:44:33 <shachaf> Is there a common version of Turing machines that lets you add or delete cells?
22:44:47 <shachaf> If you think of a Turing machine as being made of two stacks that's a natural operation.
22:45:27 <imode> queue machines allow you to do that trivially.
22:58:18 <imode> 2stack machines. 1 > 2. :P
22:59:43 <imode> there's some questions on stackexchange about insertion and deletion operators but they all boil down to "they can be simulated by TMs".
23:01:03 <shachaf> I guess that's fair enough.
23:01:14 <shachaf> Obviously all these things can simulate each other.
23:02:06 <imode> pretty much anything like this involves "what compound operations can I make constant time".
23:18:39 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).
23:20:47 -!- FreeFull has quit.
23:31:31 <arseniiv> hm any ideas about safe metaprogramming? I think I haven’t yet seen a language with a good one (for my tastes), I heard TemplateHaskell extension isn’t good enough? At least it has quoting and well-typed(?) syntax presentation?..
23:34:42 <shachaf> What kind of safety are you into?
23:34:52 <arseniiv> I mean, macro interoperability is probably a concern even there. Do we need a formalized extended languages for checking if several macros wouldn’t work together? Does it need a knowledge of semantics? (probably expressed in terms of semantics of some core language)
23:35:51 <arseniiv> also what concerns me are extensions for helping compiler with optimization, like again Haskell’s rewrite rules
23:36:29 <shachaf> It seems to me that some kinds of "safety" are less important for metaprogramming, because "runtime" failures manifest at compiletime.
23:40:55 <arseniiv> IIRC now they aren’t checked at all, it seems unsafe. There should be a way to make more optimizations and by users not as expirienced as the writers of GHC. But this will demand some checking of soundness which needs explicit proofs about semantics of the code and it’s impossible all such proofs would be inferrable automatically so there should be a friendly interface to a programmer to tell that their optimization is sound with no
23:41:41 <arseniiv> <shachaf> It seems to me that some kinds of "safety" are less important for metaprogramming, because "runtime" failures manifest at compiletime. => yeah, it’s better when we have some guarantees about will the code compile or not and how long will it take
23:42:09 <shachaf> I think code generation isn't such a bad way of doing some types of metaprogramming.
23:43:15 <arseniiv> like `makeLenses` in Haskell, right
23:43:40 <shachaf> In this case I meant literally printing strings that the compiler parses.
23:44:02 <shachaf> It's not ideal but it's probably better than a lot of things.
23:44:03 <arseniiv> ah, not via well-typed syntax trees?
23:44:41 <imode> give me string substitution or give me death.
23:46:02 <int-e> imode: "death" is much less effort to type
23:46:55 <HackEso> 118) <Phantom_Hoover> OK, so is conspiring to conspire to commit a crime a crime? <cpressey> Let's all get together and talk about defacing public property sometime \ 132) <alise> "Europe is the national anthem of the Republic of Kosovo." <cpressey> alise: I <cpressey> I was going to say something then your last line floored me \ 212) <quintopia> who is guido van rossum <olsner> you could say he's a man who grew a beard but acquired none of the associa
23:47:36 <HackEso> 212) <quintopia> who is guido van rossum <olsner> you could say he's a man who grew a beard but acquired none of the associated good properties
23:49:49 <arseniiv> like `makeLenses` in Haskell => BTW that’s almost the only macro I used there, and just for a couple of times. Yet
23:51:34 <Sgeo_> I need to get this out of my system somewhere. FUCK THE FUCKING ANTI-VAXXERS
23:52:31 <imode> what sparked that.
23:53:22 <Sgeo_> Someone I knew IRL being all anti-vaxxy. With kids. And her claiming that one of them is vaccine injured. And her also posting one of those things equating autism with deadly diseases
23:54:21 <imode> you're right to be angry, then.
23:57:35 <kmc> that's shitty
23:57:38 <kmc> i hate those people
23:57:51 <kmc> i hope her kids can get vaccinated against her will
23:57:53 <kmc> it's possible some places
23:59:41 <HackEso> TG is short for Turing-Gödel, the highest possible level of difficulty for a multiplayer game. At this level, it's undecidable whether you can manage to halt before losing or not.