←2019-10-27 2019-10-28 2019-10-29→ ↑2019 ↑all
00:00:26 -!- Sgeo has quit (Ping timeout: 240 seconds).
00:05:58 -!- oerjan has quit (Quit: Nite).
00:06:57 -!- int-e has quit (Remote host closed the connection).
00:07:40 -!- int-e has joined.
00:08:52 -!- Sgeo__ has joined.
00:12:01 -!- Sgeo_ has quit (Ping timeout: 250 seconds).
00:13:05 -!- FreeFull has quit.
00:29:51 -!- Sgeo_ has joined.
00:33:14 -!- imode has quit (Ping timeout: 240 seconds).
00:33:41 -!- Sgeo__ has quit (Ping timeout: 276 seconds).
01:30:54 <esowiki> [[Semantic Brain]] https://esolangs.org/w/index.php?diff=66826&oldid=66326 * SilverWingedSeraph * (-216) Fix jump instruction behavior.
01:31:26 -!- imode has joined.
01:41:47 -!- Sgeo_ has quit (Read error: Connection reset by peer).
01:44:22 -!- Sgeo has joined.
01:56:55 <esowiki> [[Semantic Brain]] https://esolangs.org/w/index.php?diff=66827&oldid=66826 * SilverWingedSeraph * (-1966) Remove the unused instructions, bringing the instruction size down to 5 bits.
01:57:33 <esowiki> [[Semantic Brain]] M https://esolangs.org/w/index.php?diff=66828&oldid=66827 * SilverWingedSeraph * (+0)
02:55:37 -!- moony has quit (Ping timeout: 240 seconds).
03:05:14 -!- iovoid has quit (Ping timeout: 246 seconds).
03:05:47 -!- wlp1s1 has quit (Ping timeout: 276 seconds).
03:05:49 -!- Bowserinator has quit (Ping timeout: 268 seconds).
03:42:32 -!- atslash has joined.
03:43:18 <zzo38> How to disable kerning for editable text in Firefox?
03:46:36 -!- atslash has quit (Ping timeout: 240 seconds).
03:58:22 <shachaf> Why do you want to disable kerning for editable text in Firefox?
03:59:13 <zzo38> Because kerning is not very good for text editing; it is suitable only for text that is only for reading and not for editing.
04:00:21 <imode> override the editable text field to use a monospace font, then.
04:01:13 <zzo38> Yes, I suppose that would be one way to do.
04:01:20 <kmc> keming
04:04:40 <shachaf> If you use a font without kerning information I assume it would work.
04:07:29 <zzo38> Yes, although it uses fonts with kerning by default
04:14:56 -!- imode has quit (Ping timeout: 240 seconds).
04:29:10 -!- moony has joined.
04:30:07 -!- Bowserinator has joined.
04:30:34 -!- iovoid has joined.
04:30:57 -!- wlp1s1 has joined.
04:31:47 <zzo38> I added a fax encoder/decoder in Farbfeld Utilities now. Unlike the other programs, these ones are written in PostScript, although an implementation in C might also be added later.
04:33:45 <zzo38> ImageMagick will only decode Group 3 files if you specify EndOfLine=true for fffax, but ImageMagick will only decode Group 4 files if you specify EndOfLine=false for fffax. I don't know why. Also, when decoding a Group 4 file, ImageMagick will display 'Bad value 0 for "Orientation" tag.' even though it successfully decodes it.
04:33:51 <zzo38> Do you know why ImageMagick does that?
05:36:13 <esowiki> [[User:Moon/common.js]] https://esolangs.org/w/index.php?diff=66829&oldid=66764 * Moon * (+237) add sandbox link
05:39:32 <esowiki> [[MediaWiki talk:Common.js]] https://esolangs.org/w/index.php?diff=66830&oldid=56460 * Moon * (+526) /* Add a sandbox link */ new section
07:43:39 <b_jonas> I don't know. I only saw fax files on one website (though a large quantity there), and ImageMagick could read them fine.
08:07:54 <b_jonas> zzo38: re kerning: https://developer.mozilla.org/en-US/docs/Web/CSS/font-kerning
08:09:20 <b_jonas> that said I think kerning is still useful for editable text. it's non-greedy action-at-a-distance line break finding that you usually disable for editable text so that words don't jump around between lines.
08:39:33 -!- cpressey has joined.
08:54:47 -!- b_jonas has quit (Remote host closed the connection).
09:00:20 <cpressey> Good morning. I have another esolang and I plan to release it today.
09:53:40 <esowiki> [[Oxcart]] N https://esolangs.org/w/index.php?oldid=66831 * Chris Pressey * (+4013) Initial article for Oxcart, a continuation-passing concatenative language.
09:54:41 <cpressey> ^^
09:55:08 <cpressey> An implementation is available in the GitHub repo linked to therein.
10:05:23 <shachaf> I rewrote my printf-style function as a state machine, but I ran into the unfortunate issue that it supports custom formatters, and those also need to be written as state machines for maximal correctness.
10:05:51 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=66832&oldid=66797 * Chris Pressey * (+13) /* O */ Add Oxcart
10:06:42 <shachaf> I thought just restarting each formatter from scratch would be sufficient, but it can lead to infinite loops if you're using a fixed size buffer and the formatter tries to write something larger than that.
10:06:55 -!- LKoen has joined.
10:07:05 <shachaf> Oh, hmm, there's actual esolang activity in here.
10:08:34 <shachaf> :t let comp f g x k = f x (\s -> g s k) in comp
10:08:36 <lambdabot> (t1 -> (t2 -> t3) -> t4) -> (t2 -> t5 -> t3) -> t1 -> t5 -> t4
10:09:45 <shachaf> Too general.
10:11:51 <shachaf> I guess I should just read it as (b -> (c -> r) -> r) -> (a -> (b -> r) -> r) -> a -> (c -> r) -> r
10:12:10 <shachaf> Which is the obvious thing.
10:15:51 <shachaf> cpressey: I think you copied some text from the Wagon page.
10:18:23 <cpressey> I did copy some text from the Wagon page, to start it off, but did I fail to update it appropriately?
10:18:47 * cpressey reads
10:19:28 <shachaf> I just mean the Primitives section.
10:19:52 <cpressey> Ah, I see some errors. I'll fix them
10:20:43 <shachaf> Maybe (a -> (b -> r) -> r) should be ((b -> r) -> a -> r) instead.
10:21:47 <esowiki> [[Oxcart]] https://esolangs.org/w/index.php?diff=66833&oldid=66831 * Chris Pressey * (+8) Fix lead paragraph in Primitives section
10:22:57 <esowiki> [[Oxcart]] M https://esolangs.org/w/index.php?diff=66834&oldid=66833 * Chris Pressey * (+106) Note that Oxcart is not a minimal language
10:24:45 <shachaf> What is "continue as normal"?
10:25:29 <shachaf> I think I'm confused about how evaluation works.
10:25:35 <shachaf> Also I think I should go to sleep.
10:25:46 -!- wib_jonas has joined.
10:27:21 -!- oerjan has joined.
10:28:16 <esowiki> [[Oxcart]] M https://esolangs.org/w/index.php?diff=66835&oldid=66834 * Chris Pressey * (+179) Clarify what "continue as normal" means, and what the initial continuation is.
10:29:21 * wib_jonas disables layout.css.text-decoration-skip-ink.enabled in firefox after an annoying update made underlined text look ugly
10:29:29 <wib_jonas> in the about:config that is
10:30:43 <esowiki> [[Oxcart]] M https://esolangs.org/w/index.php?diff=66836&oldid=66835 * Chris Pressey * (+25) Add extra section in order to make ToC appear higher up in page
10:31:47 <wib_jonas> cpressey: there's also the magic word __TOC__ to insert the table of contents right where that magic word is
10:31:54 <wib_jonas> https://www.mediawiki.org/wiki/Help:Magic_words
10:32:36 <shachaf> What is the current continuation? Is it part of the program state?
10:33:06 <wib_jonas> shachaf: I think you'll have to read the source code of the implementation
10:34:10 <cpressey> shachaf: The current continuation is the second argument that the function receives.
10:34:15 -!- ais523_ has joined.
10:34:38 <wib_jonas> cpressey: but is the tape of stacks part of that continuation?
10:34:50 <wib_jonas> or does that live outside with only one copy?
10:34:54 <cpressey> wib_jonas: No, that's the first argument.
10:35:14 <ais523_> shachaf: if you have a sufficiently pure programming model, the current continuation is the %Ientire%I state of the interpreter / the running program; impure languages tend to leave bits of it out though
10:35:15 <cpressey> f(x, k) = f(state, kontinuation)
10:35:20 <wib_jonas> cpressey: so there's only one tape of stacks?
10:35:38 <ais523_> also apparently my usual shortcut for italics doesn't work with this client
10:36:23 <ais523_> although, "current" continuation is a bit misleading, the continuation that call/cc generates is the continuation that its first argument returns to
10:36:25 <cpressey> wib_jonas: No, it's a purely functional language, so each operation takes a state and passes a new, transformed state to its continuation
10:36:48 <shachaf> ais523_: How much of what you said is applicable to this language?
10:36:56 <shachaf> I know what continuations are in general.
10:37:01 <ais523_> I don't know, I don't know the language, haven't logread yet
10:37:53 <shachaf> I see. My question was about this language, not continuations in general.
10:37:59 <wib_jonas> ah, the github has more explanation, not only an implementation
10:38:01 <wib_jonas> let's see
10:39:56 <ais523_> looking at the definition of Oxcart, the spec seems to treat continuations as opaque data that is acted on by the program
10:40:16 <ais523_> I think a literal understanding of the esolangs.org page would have the stacks not be part of it
10:40:24 <ais523_> hmm, this reminds me of an Underload derivative I was working on a while back
10:40:33 <ais523_> with some introspection primitives
10:41:01 <ais523_> one captured the state of the entire stack; the other captured the entire list of commands that were yet to run
10:41:04 <esowiki> [[Oxcart]] https://esolangs.org/w/index.php?diff=66837&oldid=66836 * Chris Pressey * (+236) Try to clarify what continuation-passing style means in this instance.
10:41:29 <ais523_> those could be used to create various continuation-alikes that captured different amounts of state
10:41:45 <shachaf> cpressey: I see now. I forgot that each symbol represents a function of one argument.
10:42:51 <wib_jonas> cpressey: two arguments
10:42:57 <ais523_> cpressey: I think there's still an ambiguity, as to whether stack operations look at a stack that's stored within κ, or at a separate global stack
10:43:18 <ais523_> I think the latter is more likely given the specification on the page but it doesn't rule out either possibility
10:43:28 <cpressey> ais523_: κ is a function, there's nothing "stored within" it
10:43:56 <ais523_> OK, I guess that makes sense, functions-with-metadata aren't the sort of thing you expect to see unannounced
10:44:08 <wib_jonas> ais523: the tape of stacks is passed around in a separate argument
10:44:17 <wib_jonas> I still think there's only one of it, because there's no way to copy it
10:44:21 <ais523_> oh yes
10:44:30 <wib_jonas> so I think you can imagine it as a separate global stack, and functions with just the continuation argument
10:44:31 <ais523_> so it definitely isn't part of the continuation as it has an argument of its own
10:44:33 <shachaf> Ugh, the biggest problem with writing explicit state machines is that they don't compose well.
10:45:02 <ais523_> what notion of composition are you thinking of here? or do you not care?
10:45:15 <ais523_> there's more than one way I can think of to compose state machines
10:45:37 <ais523_> but those definitions seem to map to the explicit state machine notation fairly well?
10:45:43 <shachaf> I mean, it's certainly possible.
10:45:54 <shachaf> It's just much more awkward than function calls, in a language with no special support.
10:46:38 <wib_jonas> shachaf: about the printf function state machine, what exactly does that mean? can you feed it the format pattern character by character? can it output the formatted output character by character? both?
10:46:48 <ais523_> oh, I see; state machines compose well in the sense of function composition (Haskell . or Underload *), but not in the sense of function application (Haskell $ or Underload ^)
10:47:03 <shachaf> wib_jonas: No, you give it the format string all up-front. It produces output into a fixed size buffer.
10:47:29 <wib_jonas> shachaf: I sort of think that allowing general custom formatters in a printf function is a waste, and I think when I write my printf function, I'll make it so that you can't do that. I'll still add some limited hooks, but they have to behave in restricted ways.
10:47:31 <shachaf> I'm not quite sure what you mean by that.
10:47:36 <ais523_> although if you don't have recursion, you can statically allocate a state for every possible call stack
10:47:49 <shachaf> Yes, you can build your own call stack effectively.
10:47:59 <wib_jonas> shachaf: in what sense is it a state machine then? do you feed the arguments to be formatted one by one?
10:48:14 <shachaf> wib_jonas: You provide all the arguments upfront too.
10:48:22 <esowiki> [[Oxcart]] https://esolangs.org/w/index.php?diff=66838&oldid=66837 * Chris Pressey * (+291) Define what a continuation is in this instance
10:49:02 <wib_jonas> shachaf: how is it a state machine then?
10:49:51 <shachaf> It might be used something like this: sprintf_init(&state, fmt, va); while (!state.done) { char buf[4096]; int written = sprintf_chunk(&state, buf, sizeof buf); fwrite(buf, 1, written, stdout); }
10:50:15 <shachaf> The normal sprintf API doesn't let you do that -- it requires you to allocate an arbitrary-sized buffer.
10:51:03 <wib_jonas> shachaf: ah, so it's the second one that I said, it can continue output after it's ran out of a buffer
10:51:21 <wib_jonas> interesting, and potentially useful
10:51:31 <shachaf> Yes. I thought I said that but now I read my message again and it was unclear.
10:51:40 <wib_jonas> shachaf: do you have a wrapper that lets it write to a file descriptor easily?
10:51:44 <shachaf> I meant that each call puts some of the output into a fixed-size buffer.
10:51:57 <shachaf> You can write a wrapper like that, can't you?
10:52:12 <shachaf> I'm just worried about figuring out the core API that lets you write all the wrappers you want.
10:52:26 <wib_jonas> shachaf: also, is it possible to define a formatter that formats a bignum in hexadecimal, where the output can be longer than a few of the output chunks?
10:52:47 <shachaf> Formatters can produce arbitrary strings.
10:52:53 <shachaf> That's the problem.
10:52:59 <ais523_> hmm, I wonder if it might be more efficient to simply restart the sprintf from the start with a larger buffer
10:53:09 <ais523_> rather than maintain all the state needed for restarting
10:53:11 <ais523_> not sure though
10:53:12 <shachaf> Even the built-in formatters like %s have the same issue.
10:53:29 <shachaf> What state needed for restarting?
10:54:07 <ais523_> the "state" parameter of your sprintf_init
10:54:08 <shachaf> Certainly that state is no larger than a stack frame of snprintf's.
10:54:23 <ais523_> yes, it's not the size I'm concerned about, but the memory accesses used to update it
10:54:55 <wib_jonas> as for that M:tG three card deck game, I think the start is successful because we've got 4 new players in round 1, and one of them won the round
10:55:19 <shachaf> It's a very small amount of state.
10:56:18 <shachaf> Other than the varargs, the state is less than two pointersworth.
10:56:26 <wib_jonas> shachaf: it's not that simple. if you want to format big numbers in decimal (and they're stored in hexadecimal) then it's more efficient to do the conversion in one go, and that requires memory proportional to the size of the bignum
10:56:56 <wib_jonas> mind you, it's sort of pointless to print bignums in decimal to full precision
10:57:06 <shachaf> wib_jonas: Oh, well, you're free to allocate more memory and store it in your custom state, I guess.
10:57:20 <shachaf> (Store a pointer to it, I mean.)
10:57:24 <wib_jonas> sure
10:57:48 <shachaf> I don't think efficiency is a huge concern here anyway.
10:57:51 <wib_jonas> though now you need an abort function to deallocate the state if you don't want to continue the printf
10:57:59 <shachaf> But of course it would be a big concern in fairly similar APIs.
10:58:15 <shachaf> Yes, that's not ideal.
10:58:30 <shachaf> Although you can just store your extra state in an arena probably.
10:58:35 <ais523_> oh, I assumed getting maximum efficiency would be the reason for something like this
10:58:51 <ais523_> (rather than simply counting the characters needed for the output buffer in advance)
10:59:24 -!- arseniiv has joined.
10:59:31 <wib_jonas> I think I'll just use the more traditional approach where I call a callback when the output buffer runs out -- that callback can still give an error to abort, but I won't convert it to cps where you can pause the printf and store the state for later
11:00:25 <ais523_> hmm, if you can inline the callback, that's probably more efficient (it's less efficient if you have to call through a function pointer, especially given the workarounds needed for Spectre)
11:00:36 <shachaf> I think state machine APIs are generally much nicer and more flexible.
11:00:44 <wib_jonas> the callbacks are simply anyway, they either write, or allocate more memory, or always fail, plus in the first two cases there could be an output length limit that they obey
11:01:50 <wib_jonas> ais523: it's not just the callback that helps, I can also enforce that I can call flush early and require that the output buffer is always at least, say, 64 bytes long, which means I don't need to worry about the callback during converting fixed integers or floating point numbers
11:01:55 <ais523_> (the currently recommended way of calling through a function pointer is to call yourself twice and then overwrite the return address for the second call on the stack with the address of the function you actually want to call; this guarantees that the function call will be mispredicted, thus preventing it being used as a Spectre gadget)
11:02:10 <oerjan> <shachaf> cpressey: I think you copied some text from the Wagon page. . o O ( maybe cpressey is secretly A )
11:02:16 <wib_jonas> (mind you, formatting floats is still tricky for other reasons)
11:02:48 <ais523_> you also need something that halts speculation at the address that you don't return to because it's overwritten
11:02:49 <wib_jonas> a callback is effectively also what gnu libc and libstdc++ does
11:03:04 <wib_jonas> for libc, you can define FILE handles with custom callbacks,
11:03:27 <wib_jonas> for the C++ standard library, you can define custom classes for the output buffer
11:04:06 <ais523_> actually, the important point here isn't specifically that the call is mispredicted, rather it's that you statically know it'll be predicted to a specific value that's under your control (which prevents the predicted value being attacker-controlled)
11:04:24 <wib_jonas> ais523: it might not even involve a function pointer, since I will probably only use three different behaviors
11:04:31 <wib_jonas> possibly two because the last one isn't hard to unify
11:04:35 <wib_jonas> I can just use conditionals
11:04:40 <ais523_> wib_jonas: right, sorry, I started on an aside
11:04:52 <ais523_> and then needed to make my aside as technically precise as possible, lest I end up misinforming someone
11:05:04 <wib_jonas> sure, that's also important. for some things other than printf, you do want function pointers
11:05:20 <ais523_> oddly, the Spectre-proof indirect function call sequence is eerily similar to conditionals in INTERCAL-72
11:05:35 <ais523_> (not the same, but reminiscent)
11:05:51 <esowiki> [[Oxcart]] M https://esolangs.org/w/index.php?diff=66839&oldid=66838 * Chris Pressey * (-64) Move where it is explained what "current continuation" refers to
11:06:13 <shachaf> Do you like this style of API? https://gist.github.com/pervognsen/d57cdc165e79a21637fe5a721375afba
11:06:23 <shachaf> (The one in that post and also the one it links to.)
11:06:49 <wib_jonas> ais523: I really don't follow how sceptre-like prediction attacks can be prevented. at this point I sort of think I just have to buy separate (cheap) computer hardware to run the untrusted code on if I want to prevent all such attacks.
11:07:41 <wib_jonas> separating things to separate computer hardware can be useful for other reasons too, as in to prevent various human errors that cause security bugs
11:07:47 <ais523_> wib_jonas: I believe the commonly accepted technique is to ensure that you have control over all locations to which a branch could possibly be predicted to lead, and then audit them to ensure that they can't leak information when running speculatively
11:07:49 <wib_jonas> other than sceptre
11:08:44 <wib_jonas> ais523: how can that be possible? you can guarantee that the cpu can't falsely speculatively predict a location?
11:08:55 <ais523_> it's not as bad as it seems; most branches can only be predicted as taken or not taken, so there are only two places to check, and compilers can verify that, e.g., you don't make any memory accesses via potentially attacker-controlled pointers
11:09:11 <wib_jonas> I thought the jump target prediction is such that you can't do that
11:09:17 <ais523_> the crazy workarounds are needed for indirect branches and indirect function calls, which could lead anywhere
11:09:30 <ais523_> so you need to control the prediction yourself
11:09:37 <wib_jonas> because it would, like, predict targets of unrelated jumps if it doesn't recall the jump instructino that you're trying to predict
11:10:05 <ais523_> that's why you go via a function call and then rewrite the return value on the stack, because if you make a function call followed by a return, it's always predicted to return to the place the call came from
11:10:29 <wib_jonas> hmm
11:10:43 <cpressey> oerjan: That's one of more frightening Jekyll-and-Hyde theories I've heard lately. Perhaps I've been sleepwalking (and sleepwikiediting)
11:10:44 <wib_jonas> that could work, if you're careful not to confuse the return address cache
11:10:55 <wib_jonas> there's a separate return target cache from the usual stack cache, right?
11:11:18 <ais523_> wib_jonas: actually it's the opposite of "careful not to confuse", you're intentionally confusing the return address stack
11:12:07 <wib_jonas> which theory? the one where every esoteric language author is secretly the same person?
11:12:18 <wib_jonas> ais523: yes, but after that
11:12:25 <wib_jonas> dunno, it could work
11:12:28 <ais523_> the point is simply to make sure you have a known value on the return address predictor so that it can't be attacker-controlled
11:12:37 <wib_jonas> but the whole sceptre prevention seems hopelessly large in scope to me
11:13:06 <ais523_> well, it's at the point where the known spectre variants can be automatically fixed by compilers
11:13:21 <ais523_> there are probably unknown speculative-execution-related exploits, but at least the known ones were fixable
11:13:40 <wib_jonas> ok
11:14:36 <wib_jonas> though I am hoping that most of them will be fixed in new hardware, so in like 15 years all the cpu with most of the vulnerabilities will be phased out
11:15:41 <wib_jonas> that's like a close enough timescale that I'll probably still be alive and programming for cpus then
11:18:02 <shachaf> If you don't support user-defined formats, it's probably simple enough.
11:18:16 -!- LKoen has quit (Remote host closed the connection).
11:18:56 <arseniiv> <shachaf> Do you like this style of API? => interesting
11:19:09 <shachaf> I think %s is the only arbitrary-length format? You can just rerun the other ones if they happen to cross a boundary.
11:19:28 <shachaf> Or even just store a fixed-size buffer of what's left in the current argument.
11:19:38 -!- LKoen has joined.
11:20:23 <wib_jonas> although then we'll still have to worry about how to make efficient but secure quantum-attack resistant public key cryptography primitives. if the crypto theorists don't figure out soon, every fricking ssl handshake will take centiseconds because we can't do a key exchange without number theory.
11:21:41 <shachaf> But what's the right thing to do for custom formatters?
11:21:59 <shachaf> I could declare that they just can't produce more than 64 bytes of output.
11:23:04 <wib_jonas> shachaf: I wouldn't allow them in general. I'll have to figure out something to allow bignum formatters, and those can produce long output, plus I will allow custom complex types, but I'll format them with built-in formatters, it's just a type system magic that disappears at compile time.
11:23:56 <shachaf> I have types like struct V2 { F32 x, y; };.
11:24:02 <shachaf> It seems pretty useful to be able to format them.
11:24:23 <shachaf> I don't expect a huge number of custom formatters but it'll be nice to have the common ones.
11:24:36 <wib_jonas> shachaf: printf("(%f,%f)", p.x, p.y);
11:24:56 <wib_jonas> replace the "%f" with whatever specific format you want obviously
11:25:50 <wib_jonas> for more complicated cases, the users can write a formatter function that doesn't hook into printf
11:25:59 <arseniiv> from the link there: “API design is still considered a black art of programming, even today. Only little information can be found and mostly you just find small tips I hope every programmer already knows.” => BTW there are no books on that, really? With yet many books on code style practices?
11:26:02 <wib_jonas> but can use the same output buffer solutino as your printf
11:26:31 <wib_jonas> so you don't mix them in the same printf format string, but you can mix them into the same output file or output buffer or whatever you can output to
11:26:39 <wib_jonas> I think your api still allows that
11:27:08 <shachaf> arseniiv: I don't think there are many good books on that sort of thing.
11:27:58 <ais523_> I think API design is in part a language design problem
11:28:15 <ais523_> APIs are influenced so much by the language you're calling them from
11:28:34 <ais523_> I have a theory that perhaps, in a sufficiently tightly defined language, there would only be one obvious way to write any given API
11:29:00 -!- wib_jonas has quit (Remote host closed the connection).
11:29:00 -!- ais523_ has quit (Remote host closed the connection).
11:29:24 -!- ais523_ has joined.
11:30:28 -!- wib_jonas has joined.
11:31:04 <shachaf> arseniiv: Maybe https://gist.github.com/uucidl/495e7f1c2646fc8b5196 has some useful things to say.
11:31:20 <cpressey> arseniiv: fwiw I think API design is related to abstract datatype design... but different enough that I hesitate to say "closely related".
11:31:35 <wib_jonas> also, as a bonus, I'd like a printf that outputs utf16 directly, and can take both utf-8 and utf-16 strings as arguments to format
11:31:49 <ais523_> shachaf: that link appears to require logging in?
11:32:15 <ais523_> wib_jonas: I think Windows has one of those
11:32:22 <ais523_> (the same function in Linux outputs UTF-32)
11:32:30 <ais523_> any particular reason you want UTF-16?
11:33:40 <wib_jonas> ais523: at work I'm writing tables for a siemens program that can only read utf-16-le
11:33:55 <ais523_> that's a good enough reason, I guess
11:33:57 <wib_jonas> I could of course output utf-8 and iconv it afterwards
11:34:04 <wib_jonas> it's not like I need this very efficiently
11:34:08 <shachaf> ais523_: Which link?
11:34:09 <wib_jonas> but it'd be simpler
11:34:24 <ais523_> shachaf: the gist link you posted a few lines above
11:34:40 <shachaf> I'm reading it in a Private Browsing window logged out.
11:35:56 <wib_jonas> I also read utf-16 files
11:36:18 <shachaf> I have no particular interest in UTF-16 support.
11:36:23 <wib_jonas> currently I do these with perl and python, both of which have ways to input and output utf-8 and utf-16 streams, though perl's is somewhat buggy
11:36:24 <shachaf> It's a niche feature.
11:37:50 <ais523_> other than Microsoft-related code (which seems to use UTF-16 as default), the main use I see for UTF-8 is writing Funciton programs
11:38:00 <ais523_> *for UTF-16
11:38:07 <myname> funciton <3
11:38:23 <myname> i need to make a programming game out of that
11:38:31 <ais523_> because they're made primarily of non-ASCII characters, and yet there's no standard 8-bit character set that contains all the characters it uses + its standard library
11:38:42 <ais523_> so UTF-16 is normally the most efficient storage
11:38:56 <ais523_> (UTF-8 can be more efficient when the programs are primarily made of large constants)
11:39:08 <myname> to be fair, funciton uses something like utf-21 or the like internally
11:39:34 <arseniiv> shachaf: thanks, let’s see…
11:39:51 <ais523_> UTF-16 is also more efficient than UTF-21 if you rarely use astral plane characters :-P
11:40:15 <ais523_> also I think the UTF-21 is just for I/O, not used for storing the program internally
11:40:39 <arseniiv> cpressey: ah I think there is some kind of relatedness too, though I don’t have anything externalized on that count
11:40:42 <wib_jonas> ais523: this dataset is made of mostly ascii, so utf-8 would be more efficient
11:41:35 <ais523_> what do you think of the shift-code-based Unicode encodings which are efficient when outputting lots of characters from the same Unicode block?
11:42:11 <ais523_> hmm, thinking about it, you could probably do better with Huffman coding based on a digraph frequency table
11:43:40 <ais523_> one potential problem with both systems is that you can't split a string between characters any more, and concatentating strings will lead to an overlong encoding due to the shift state (or previous character state) being explicitly reset in between
11:49:39 <arseniiv> <ais523_> what do you think of the shift-code-based Unicode encodings which are efficient when outputting lots of characters from the same Unicode block? => my friend considered that but I don’t know if he succeeded in something. It seems he has the idea abandoned for a while
11:50:31 -!- LKoen has quit (Remote host closed the connection).
11:50:36 <ais523_> there are at least two "standardised" encodings like that, at least one is IIRC patented/commercial (of course, there's doubts about whether a text encoding can be patentable!)
11:55:33 <wib_jonas> http://www.unicode.org/notes/tn6/ ?
11:55:51 -!- LKoen has joined.
11:56:06 <ais523_> this is based on a memory from a Wikipedia page, I can't remember which one
11:59:03 <ais523_> that unicode.org link is probably the same thing, though, given that there's a reference to an IBM patent at the bottom
11:59:17 -!- ais523_ has quit (Quit: lunch).
12:05:45 -!- oerjan has quit (Quit: Later).
12:19:29 <wib_jonas> fungot: a week passed since #1183. please publish the next o strip.
12:19:29 <fungot> wib_jonas: and to optimize the code,
12:24:18 <wib_jonas> for some reason, the constitution of Hungary requires that the president of the republic must be at least 35 years old. the president of the US is also limited to at least 35 years of age. so now I'm trying to imagine a sci-fi story where the president gets a sci-fi rejuvenation threapy and that takes his age under the bound, so they have to retire
12:24:19 <wib_jonas> from the position.
12:34:10 -!- LKoen has quit (Remote host closed the connection).
12:36:15 <cpressey> So then they change the rule to "must have at least 35 years experience as a human being"
12:37:04 <cpressey> And then a 12-yo who claims to be the reincarnation of [insert famous dead person here] runs for president
12:37:19 <wib_jonas> cpressey: no, I think they should just drop that lower bound
12:37:22 <wib_jonas> it's a stupid rule
12:38:20 <wib_jonas> they can still tie it to people who have the right to vote, just like for members of the parliament, so that excludes almost all people under 18 years old
12:40:43 -!- LKoen has joined.
12:47:43 <cpressey> Stupid rules often make for better stories though
12:48:24 <wib_jonas> yes, there's at least one sci-fi story about this 35 year rule and relativistic speed space travel
12:48:48 <wib_jonas> the story is that the rule is stupid, people realize that, so want to work it aruond
12:49:13 <wib_jonas> https://scifi.stackexchange.com/q/181346/4918
12:49:50 <wib_jonas> which is exactly the sort of thing why the rule shouldn't be there
12:50:15 <wib_jonas> if someone is inexperienced, then the parlament just won't elect them as president because of that, and the age bound is irrelevant
12:50:59 -!- ais523_ has joined.
12:53:53 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
13:16:40 <wib_jonas> fungot, what is the abbreviation for the US state of Louisiana?
13:16:40 <fungot> wib_jonas: somewhere it is.)) yields 6, as does cl iirc. dylan got repurposed, but eventually i'll know what the accessors are right?
14:21:39 <esowiki> [[User:AnimaLibera]] M https://esolangs.org/w/index.php?diff=66840&oldid=66654 * AnimaLibera * (-145)
14:46:59 <esowiki> [[Transfinite program]] N https://esolangs.org/w/index.php?oldid=66841 * Chris Pressey * (+3072) Start on this article. Hope to be able to add more material, from examples found in the wiki, over time.
14:51:17 <esowiki> [[Transfinite program]] M https://esolangs.org/w/index.php?diff=66842&oldid=66841 * Chris Pressey * (+209) Note another interpretation of "inifinite" that we do not mean here.
14:58:39 <esowiki> [[Transfinite program]] https://esolangs.org/w/index.php?diff=66843&oldid=66842 * Chris Pressey * (+663) Incorporate material from Sequential tag system article.
15:00:07 <esowiki> [[Sequential tag system]] M https://esolangs.org/w/index.php?diff=66844&oldid=42801 * Chris Pressey * (+100) Link to the Transfinite program article.
15:19:12 -!- kspalaiologos has joined.
15:21:15 -!- ais523_ has quit (Quit: quit).
15:23:32 <esowiki> [[Transfinite program]] https://esolangs.org/w/index.php?diff=66845&oldid=66843 * Chris Pressey * (+755) Add brief mention of SMETANA
15:30:06 <esowiki> [[Transfinite program]] M https://esolangs.org/w/index.php?diff=66846&oldid=66845 * Chris Pressey * (-14) Bump up heading levels.
15:31:18 <esowiki> [[Transfinite program]] M https://esolangs.org/w/index.php?diff=66847&oldid=66846 * Chris Pressey * (-3) Link to infinite loop
15:37:12 -!- atslash has joined.
15:52:18 -!- LKoen has joined.
16:17:44 -!- voidio has joined.
16:17:56 -!- iczero has joined.
16:18:00 -!- wlp1s1 has quit (Ping timeout: 246 seconds).
16:18:04 -!- iovoid has quit (Ping timeout: 264 seconds).
16:27:54 -!- cpressey has quit (Quit: A la prochaine.).
16:44:44 -!- wib_jonas has quit (Remote host closed the connection).
16:58:56 -!- atslash has quit (Ping timeout: 268 seconds).
16:59:06 -!- atslash has joined.
17:24:35 -!- kspalaiologos has quit (Quit: Leaving).
17:40:25 <esowiki> [[Cliff L. Biffle]] https://esolangs.org/w/index.php?diff=66848&oldid=30798 * CMinusMinus * (+261) Added Informations. I will add more stuff later. Maybe (Shoud I send him an Email?)
17:52:19 <esowiki> [[PTSL]] N https://esolangs.org/w/index.php?oldid=66849 * Moon * (+1204) begin
17:58:56 -!- kspalaiologos has joined.
18:13:46 <esowiki> [[User:Moon/sandbox]] N https://esolangs.org/w/index.php?oldid=66850 * Moon * (+11) Created page with "s a n d box"
18:25:12 <esowiki> [[PTSL]] https://esolangs.org/w/index.php?diff=66851&oldid=66849 * Moon * (+42) Begin defining instructions.
18:25:25 -!- FreeFull has joined.
18:25:25 <esowiki> [[PTSL/instrtable]] N https://esolangs.org/w/index.php?oldid=66852 * Moon * (+113) large table
18:27:32 <esowiki> [[PTSL]] https://esolangs.org/w/index.php?diff=66853&oldid=66851 * Moon * (+74)
18:29:57 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66854&oldid=66852 * Moon * (+159)
18:30:41 <esowiki> [[PTSL]] https://esolangs.org/w/index.php?diff=66855&oldid=66853 * Moon * (+96)
18:32:25 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66856&oldid=66854 * Moon * (+56) add header
18:35:23 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66857&oldid=66856 * Moon * (+236)
18:38:55 <arseniiv> is there (I think there is) a special name for algebraic types isomorphic to a sum of products of such types?
18:40:11 <arseniiv> like, { data Nat = Z | S Nat; data NatList = Nil | Cons Nat NatList } is a subset of these. Or { data T = TA | TB U; data U = UA | UB T } is too
18:41:07 <arseniiv> I think I heard “polynomial functor” regarding sums and products but these aren’t exactly one-to-one with functors
18:41:51 <arseniiv> as of “simple inductive type”, I’m not sure the term isn’t too general
18:49:02 <arseniiv> or maybe I should allow something like data T = T (U → T). I consider how to define generalized Minsky machines / recursive functions
18:50:23 <arseniiv> hm I think it won’t be good. How on earth could I make values of U → T there
18:51:07 <arseniiv> okay I think I’ll call these datatypes polynomial, seems not too general, not too specific
18:52:34 <arseniiv> hm no, there’s recursion… polynomial-inductive it should be
18:53:15 <shachaf> So in order to make the state machine printf API actually correct for sprintf, I think it'll need a bunch more state.
18:54:04 <shachaf> I was only outputting formatted arguments all-or-nothing, but the snprintf API actually requires you to output them to the last byte possible.
19:02:25 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66858&oldid=66857 * Moon * (+697)
19:05:49 <shachaf> Apparently subtracting two null pointers is undefined behavior in C?
19:08:00 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66859&oldid=66858 * Moon * (+91)
19:11:49 <fizzie> Subtracting even one should be, surely.
19:12:35 <fizzie> "When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; --"
19:12:47 <shachaf> Yep.
19:12:59 <shachaf> But that doesn't say anything about what happens when one pointer is subtracted.
19:17:53 <esowiki> [[PTSL]] https://esolangs.org/w/index.php?diff=66860&oldid=66855 * Moon * (+655) Example.
19:17:57 <fizzie> I guess it's the same as the one hand clapping.
19:18:44 <esowiki> [[PTSL]] https://esolangs.org/w/index.php?diff=66861&oldid=66860 * Moon * (+2) fix
19:19:52 <fizzie> If a tree falls in the forest, does it generate a log?
19:29:02 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66862&oldid=66859 * Moon * (+227)
19:33:08 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=66863&oldid=66832 * Moon * (+11) /* P */ Add PDSL
19:33:37 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=66864&oldid=66863 * Moon * (+0) /* P */ err, PTSL. Yea, PTSL.
19:40:19 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66865&oldid=66862 * Moon * (+28) Casually forgets return instruction.
19:50:39 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66866&oldid=66865 * Moon * (+430) Add comparison instructions.
19:55:00 <esowiki> [[Special:Log/newusers]] create * DeeBo * New user account
19:55:35 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66867&oldid=66866 * Moon * (+243)
19:57:15 -!- Phantom_Hoover has joined.
20:16:40 -!- subleq has quit (Remote host closed the connection).
20:16:59 -!- subleq has joined.
20:24:03 -!- subleq has quit (Ping timeout: 250 seconds).
20:25:57 -!- subleq has joined.
20:31:11 -!- subleq has quit (Remote host closed the connection).
20:31:28 -!- subleq has joined.
20:32:47 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66868&oldid=66867 * Moon * (+413) More arithmetic ops.
20:34:16 -!- kspalaiologos has quit (Quit: Leaving).
20:35:09 <esowiki> [[PTSL/instrtable]] https://esolangs.org/w/index.php?diff=66869&oldid=66868 * Moon * (+112)
20:39:58 <esowiki> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=66870&oldid=66821 * DeeBo * (+227) /* Introductions */
21:18:02 -!- subleq has quit (Ping timeout: 240 seconds).
21:20:07 -!- subleq has joined.
21:22:18 -!- voidio has changed nick to iovoid.
21:34:35 -!- subleq has quit (Ping timeout: 268 seconds).
21:36:16 -!- subleq has joined.
21:48:31 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
21:50:39 -!- b_jonas has joined.
21:56:37 -!- oerjan has joined.
21:58:27 -!- imode has joined.
22:02:40 -!- subleq has quit (Ping timeout: 265 seconds).
22:04:33 -!- subleq has joined.
22:16:02 -!- arseniiv has quit (Ping timeout: 240 seconds).
22:23:18 -!- subleq has quit (Ping timeout: 268 seconds).
22:24:43 -!- subleq has joined.
22:26:23 -!- imode has quit (Ping timeout: 268 seconds).
22:40:00 <esowiki> [[ZALIBY]] N https://esolangs.org/w/index.php?oldid=66871 * Groowy * (+2191) Created page with "'''ZLIBY''' is a simple programming language created as part of a programming competition run by students at Charles University. An implementation by [[User:Groowy]] can be..."
22:45:33 <esowiki> [[ZALIBY]] https://esolangs.org/w/index.php?diff=66872&oldid=66871 * Groowy * (-19)
23:32:40 <b_jonas> "Cleaning and maintenance shall not be performed by children." says the user's manual. I can see that my new electric toothbrush is american lawyer compliant.
23:35:27 -!- subleq has quit (Ping timeout: 268 seconds).
23:41:23 -!- imode has joined.
23:45:17 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds).
23:58:23 -!- FreeFull has quit.
23:59:59 -!- oerjan has quit (Quit: Nite).
←2019-10-27 2019-10-28 2019-10-29→ ↑2019 ↑all