00:04:41 <esowiki> [[Esolang:Wiki dumps]] https://esolangs.org/w/index.php?diff=58296&oldid=53557 * Fizzie * (+859) Update dump instructions re HTTPS (or lack of it)
00:05:11 <fizzie> I keep trying to write markdown instead of wiki-markup.
00:16:58 -!- Phantom_Hoover has quit (Remote host closed the connection).
00:18:25 -!- arseniiv has quit (Ping timeout: 246 seconds).
00:18:43 -!- Essadon has quit (Quit: Qutting).
00:58:55 <ais523> I'm annoyed at markdown taking over the world because so many versions of it have obvious shortcomings
00:59:29 <ais523> the original version is decent enough for its stated purpose, but I don't like markdown being used as a sandboxing method, because the syntax is awkwardly inexpressive when you don't have the escape to HTML
01:07:30 <zzo38> I happen to like the MediaWiki format, which has support for templates. (I have used the templates feature to make databases, although a block containing SQL codes might be better for this.)
01:48:27 <ais523> the one thing Markdown really got right was `…` for code formattinig
01:48:44 <ais523> it's quickly becoming standard even outside Markdown
01:56:31 <shachaf> I don't really like Markdown.
01:56:35 <shachaf> What should I use instead?
01:57:00 <shachaf> Mediawiki seems a lot more complicated than I want probably.
02:03:54 <shachaf> In e.g. C++, ; isn't associative, because of destructors: { { A; B; }; C; } ≠ { A; { B; C; }; }. What sort of meaning does {} have? Is it something like the "reset" operator for delimited continuations?
02:09:31 <ais523> shachaf: {} introduces a scope
02:09:39 <ais523> and destructors are tied to the end of a scope
02:10:12 <zzo38> There is also Fossil Wiki format
02:10:27 <ais523> shachaf: what purpose do you want this markdown-like language for?
02:10:46 <shachaf> Maybe writing some things to put on my website.
02:10:53 <ais523> I've been considering writing my own, but there are three jobs that a markdown-like language has to do and I'd be optimising for one of them specifically, which probably isn't the one you'd want
02:11:43 <ais523> a) making it easy to write formatted text quickly; b) being easy to read the resulting text without a specialised viewer; c) being able to represent everything you might want to write accurately, without special cases or other mishaps
02:11:58 <ais523> Markdown isn't so bad at a); I use it for my own blog for that reason
02:12:25 <shachaf> I'd like all three, with a preference of a over b
02:12:48 <ais523> the language I had in mind was optimizing for b, c secondary, a not really at all
02:12:51 <shachaf> Wait, these aren't the things I thought about at all.
02:12:59 <ais523> for writing your own personal website or the like, b is irrelevant
02:13:19 <ais523> what were your considerations?
02:14:07 <shachaf> I don't even know anymore.
02:14:14 <shachaf> You can implement a "defer" statement in C++ such that "A; { B; defer Z; C; }; D;" = A; B; C; Z; D
02:15:19 <ais523> how do you prevent Z being evaluated immediately? or is it a representation of a thunk or the like?
02:15:22 <shachaf> In this sense "defer" captures things up to the nearest {}
02:15:27 <ais523> I can see how you'd evaluate it at the end of the scope
02:15:38 <shachaf> I guess I should say "defer { Z }"
02:16:39 <shachaf> Usually it's something like #define defer Thing blah##__LINE__ = ()[&]
02:18:18 <shachaf> I'm wondering what exactly a scope is, or should be.
02:18:44 <shachaf> The fact that this defer is implemented with a destructor is kind of irrelevant. As is often the case for RAII objects.
02:19:10 <ais523> well, the normal definition of a scope is that variable names inside it shadow variable names outside it and aren't available outside it
02:19:17 <ais523> that's why the destructor runs at the end of the scope
02:19:42 <ais523> one interesting way to think about it is based on INTERCAL's STASH/RETRIEVE operations, which basically allow you to implement scopes that don't nest in the normal manner
02:19:56 <ais523> you explicitly shadow a variable (STASH) and revert to the old variable (RETRIEVE)
02:20:46 <shachaf> There's a sense in which a thing like defer gets a sort of continuation as an argument, but it's bounded up to the enclosing scope.
02:20:59 <shachaf> Is that something like dynamic scope?
02:21:35 <ais523> so the difference between dynamic scope (`local` in Perl), and lexical scope (`my` in Perl), is kind-of complex
02:21:47 <ais523> it's to do with what happens with things that already have a reference to the shadowed variable
02:22:15 <ais523> `perl-e $c=4; $d=\$c; {my $c=6; print $c, " ", $$d;}
02:22:21 <ais523> `perl-e $c=4; $d=\$c; {local $c=6; print $c, " ", $$d;}
02:22:33 <ais523> that's not the result I expected
02:22:41 <ais523> now I'm wondering what I did wrong
02:23:40 <shachaf> Does $$ resolve variables by string name in the current scope or something?
02:24:02 <shachaf> I think I read that PHP does that.
02:24:09 <ais523> $$ dereferences a reference
02:24:22 <ais523> if you try to use a variable name as a reference it does what PHP does, that's insane though
02:24:32 <ais523> in this case $d is a proper reference to $c
02:24:34 <shachaf> Dynamic scope mostly seems like scow, but recently I've been wondering whether some things are effectively dynamically scoped and I haven't noticed.
02:25:09 <shachaf> In particular are "break"/"continue"/"return" effectively dynamically scoped?
02:25:19 <shachaf> This question doesn't quite make sense in any language I know of unfortunately.
02:27:42 <ais523> `perl-e $c=4; sub rc {return $c;} {my $c=6; print rc();}
02:27:47 <ais523> `perl-e $c=4; sub rc {return $c;} {local $c=6; print rc();}
02:27:51 <ais523> OK, /that/'s the difference
02:28:01 <ais523> that's even more confusing than I thought it was
02:30:09 <shachaf> Even Haskell has dynamic scope
02:30:13 <shachaf> > let { ?c = 4 } in let { f x = x + ?c } in let { ?c = 40 } in f 5
02:30:16 <shachaf> > let { c = 4 } in let { f x = x + c } in let { c = 40 } in f 5
02:39:43 <ais523> I guess `local` isn't changing the value of the variable temporarily; it's actually changing the variable itself temporarily
02:40:03 -!- Sgeo__ has quit (Ping timeout: 245 seconds).
02:41:02 <shachaf> I as wondering whether you can make a monad thing for this.
02:41:20 <shachaf> E.g. do { A; bracket $ do { B; defer Z; C; }; D } -> do { A; B; C; Z; D; }
02:41:35 <shachaf> And bracket $ do { ret <- getCC; A; bracket $ do { B; defer Z; C; ret 0; D; }; E } -> do { A; B; C; Z; return 0; }
02:41:53 <ais523> that should be pretty easy, I think? at least the first example
02:42:04 <ais523> just have a state monad with a list inside the state, that counts up all the arguments to `defer`
02:42:09 <ais523> then have `bracket` run them all
02:43:10 <shachaf> Yes, I think bracket+defer on its own is pretty doable
02:43:31 <shachaf> Though defer isn't the only kind of effect I'd want. It's more like an arbitrary effect that can operate on the continuation up to the enclosing bracket.
02:44:04 <shachaf> Someone in #haskell implemented it, actually: https://gist.github.com/Lysxia/8a5c8d20f6c7c1332481190fb6f1c8b7
02:44:09 <shachaf> But it's not quite right, I think.
02:44:19 <ais523> "operate on the rest of the continuation" is pretty much literally what a monad /is/
02:44:27 <ais523> so I guess we're trying to make a dynamic monad? a monad that gets defined at runtime?
02:44:46 <shachaf> Right, except e.g. C++'s {}/; don't obey the associativity monad law.
02:45:01 <shachaf> Normally there's a law that (a >> b) >> c = a >> (b >> c)
02:45:15 <shachaf> But it's true that monads and continuations closely related.
02:45:33 <ais523> I think ; is still associative, just that {} are not ()
02:46:08 <shachaf> In C++ "A; B; C" means "A; { B; C; }"
02:46:25 <shachaf> With destructors running in reverse order and so on.
02:47:07 <ais523> well, if you see A; as being "A, and run the identity function on the rest of the block", that implies the same associativity here too
02:47:28 <shachaf> Monads in general don't have an equivalent of bracket
02:48:15 <shachaf> One extra thing is that e.g. C++ supports early-exit outside of the enclosing block.
02:48:52 <shachaf> foo() { A; { B; if (p) return; }; C; }
02:48:55 <ais523> bracket takes a monad action as argument, and returns another monad action
02:49:04 <ais523> I don't think that's very common among monads
02:49:23 <ais523> what it's doing in between is basically running the monad actoins inside it, and bundling the result up into another monad action
02:49:55 <ais523> early exit should be easy to implement like this, anyway; just don't run the rest of the block
02:50:26 <shachaf> But you want to run the appropriate defers, and whatever else, on the way up.
02:50:59 <shachaf> I don't think things that operate on actions are very uncommon.
02:51:25 <ais523> normally they return a value, though, not another action
02:52:13 <shachaf> :t local -- this is in the spirit of what you're talking about, I think
02:52:14 <lambdabot> MonadReader r m => (r -> r) -> m a -> m a
02:52:15 -!- oerjan has joined.
02:52:48 <shachaf> (Both for dynamic scope and for monad action actions.)
02:53:44 <lambdabot> Monad m => m a -> (a -> m b) -> m b
02:54:05 <shachaf> Of course (>>=) and fmap and so on also qualify
02:54:32 <ais523> what we effectively want here is a monad where each action defines its own >>=
02:54:36 <ais523> I'm trying to work out what type that has
02:55:19 <ais523> GenericMonad a = forall b.(a -> GenericMonad b) -> GenericMonad b
02:56:29 <shachaf> That's like a fixed point of Codensity or something
02:57:28 <ais523> so we have "return a atmb = atmb a", and "(>>=) ma atmb = ma atmb"
02:57:55 <lambdabot> Prelude ($!) :: (a -> b) -> a -> b
02:57:55 <lambdabot> Data.Function ($) :: (a -> b) -> a -> b
02:58:13 <ais523> there really isn't a flip ($) in the standard library?
02:58:21 <ais523> but yes, looks like return is flip ($), and >>= is %
02:58:35 <ais523> this kind-of makes sense given how generic the monad is
02:59:12 <ais523> it feels like this should obey the monad laws, it's 3am though and I'm lazy so I'm not going to try to work that out right now
03:00:11 <shachaf> I'm not sure I understand it but it seems like it might not be associative based on what you were trying to do?
03:02:05 <ais523> bleh, let's try to work through this anyway
03:02:18 <shachaf> I'll see if I can figure out what you mean.
03:02:58 <ais523> return a >>= f → return a f → f a, as required
03:04:18 <ais523> m >>= return → m return → -- OK, I don't think this one holds without an extra condition on what monad actions we allow
03:05:04 <ais523> and yes, associativity doesn't hold without a side-condition either
03:06:15 <shachaf> You could use the Codensity monad instance for this, which I think would have to make the laws hold?
03:06:57 <shachaf> m >>= k = (\c -> m (\a -> k a c))
03:07:24 <shachaf> It enforces associativity by reassociating everything to the right.
03:07:42 <shachaf> But that doesn't get the desired effect anymore, I guess.
03:08:24 <zzo38> (Codensity f) does form a monad regardless of what (f) is. It is possible to defer; I have managed to do that with a Codensity monad.
03:09:06 <shachaf> zzo38: This monad is like the fixed point of Codensity (?)
03:09:29 <ais523> shachaf: it looks like Codensity has the same monad definition and "return" as what I wrote above
03:09:45 <shachaf> Yes. It's the same (>>=) as Cont.
03:11:19 <ais523> reassociating everything to the right is correct, I think; you'd need a separate monad action → monad action function to add explicit rebracketing
03:11:44 <shachaf> Right, otherwise you can make things that are bracketing-aware.
03:14:16 <shachaf> You can define a similar thing for monoids and run into the same thing, I guess?
03:14:35 <ais523> I can't see one in the Codensity docs, but maybe I'm just missing it, or maybe it's a special case of something that's already there
03:15:10 <shachaf> I don't think it exists for arbitrary Codensity but only over some specific monads?
03:16:43 <shachaf> You can have a "monoid" that has an element x where, in x*(abc), x gets to make some decision based on abc
03:17:57 <shachaf> But that's not compatible with associativity. You could right-reassociate everything à la difference lists, but then you kind of lose the point. You could add explicit brackets to recognize that you're really representing a tree.
03:18:34 <ais523> right, if you have the fixed point of Codensity, then bracket (runCodensity k) = k return
03:19:11 <shachaf> Also someone suggested that Cont/runCont do the appropriate operations. I should figure that out.
03:19:18 <ais523> I'm not in the right state of mind for working throuhg this
03:19:28 <shachaf> https://www.vex.net/~trebla/haskell/cont.xhtml talks about it in terms of reset/shift at the end
03:19:49 <shachaf> OK, thanks for your help, I'll think about this thing.
03:21:45 <ais523> I've been thinking about this same subject myself, incidentally
03:21:51 <ais523> as it really seems like an important primitive
03:21:55 <ais523> (the "monad that can be anything")
03:23:43 <shachaf> "the mother of all monads"
03:23:48 <shachaf> I'm pretty sure the answer is Codensity.
03:28:56 <zzo38> There are other kind of monads such as Free and CodensityAsk, as well as Codensity.
03:29:46 <shachaf> But you can lift them all to Codensity
03:31:10 <zzo38> Yes, although still it is a different monad; (Codensity Maybe) is difference from just Maybe.
03:45:52 <esowiki> [[Keg]] https://esolangs.org/w/index.php?diff=58297&oldid=58285 * JonoCode9374 * (+565) /* Example Programs */ -- Added 99 bottles of beer program
03:46:36 <esowiki> [[Keg]] https://esolangs.org/w/index.php?diff=58298&oldid=58297 * JonoCode9374 * (+62) /* Example Programs */
03:51:28 <esowiki> [[Messyscript]] https://esolangs.org/w/index.php?diff=58299&oldid=56035 * Rdebath * (+57) Is a TBF
04:03:52 -!- ais523 has quit (Quit: quit).
04:15:37 <HackEso> #!/bin/bash \ perl -e "$@"
04:28:38 -!- Sgeo has joined.
04:37:42 <oerjan> today's http://www.mezzacotta.net/garfield/ appears to have a pun that only a norwegian would understand.
04:38:14 <oerjan> (and editor manyhills isn't norwegian afaiu)
04:39:32 <oerjan> so he probably thought it was only a surreal submission (well, it's that too)
04:48:32 <oerjan> ooh, dmm must have fixed my registration problem from way back...
04:48:46 <oerjan> (although i didn't get an email back)
05:16:32 -!- xkapastel has quit (Quit: Connection closed for inactivity).
05:28:43 <oerjan> Hoolootwo: no, https://no.wikipedia.org/wiki/Pusur
06:24:00 -!- oerjan has quit (Quit: Nite).
07:26:05 <zzo38> Now I implemented a QOTD server (TCP only; the UDP one is subject to attacks so it is not implemented)
08:03:46 -!- xkapastel has joined.
08:22:37 -!- Hoolootwo has changed nick to Hooloovo0.
08:42:28 <esowiki> [[User:Salpynx]] https://esolangs.org/w/index.php?diff=58300&oldid=57993 * Salpynx * (+243) /* Working on */
08:43:29 <esowiki> [[User:Salpynx]] M https://esolangs.org/w/index.php?diff=58301&oldid=58300 * Salpynx * (+10) /* Interested in */
09:13:52 <esowiki> [[User:Salpynx]] M https://esolangs.org/w/index.php?diff=58302&oldid=58301 * Salpynx * (+19) /* Interested in */
09:53:44 -!- AnotherTest has joined.
10:59:12 -!- moei has joined.
11:41:33 -!- Essadon has joined.
11:52:03 -!- Lord_of_Life_ has joined.
11:52:27 -!- Lord_of_Life has quit (Ping timeout: 244 seconds).
11:54:10 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
11:54:56 -!- Lord_of_Life has quit (Changing host).
11:54:56 -!- Lord_of_Life has joined.
11:56:44 -!- wob_jonas has joined.
11:57:44 <wob_jonas> ais523: yes, markdown format sucks. yes, file-level diff downloading is a hard problem that is possible in theory but no good practical solutions exist, so we use workarounds like splitting to smaller files, append-only logs, or (the old solution) sequences of patches.
11:59:35 <wob_jonas> for a format, to be able to accurately represent complicated things, I'd prefer to just allow most HTML codes in the formatted text even if there are other shortcuts, though of course if you have untrusted input, then you have to filter the HTML.
12:00:16 <wob_jonas> and I for one thing that every non-common extra feature should just use HTML-like syntax, rather than all other sort of ad-hoc syntax like magic templates, and non-HTML syntax only reserved for very common formatting
12:00:52 <wob_jonas> I might eventually try to implement such a formatting language, with multiple versions, as in one for trusted input and one for untrusted input, and specifically the features I need
12:01:57 <wob_jonas> I can't promise anything, but if I do get something like this done, I will mention it in this channel if possible
12:02:57 <wob_jonas> Back lots of years ago I already improved perlmonks' HTML-based markup language a bit, in particular I proposed adding the <c>...</c> shortcut for the very common <code>...</code> tags.
12:03:16 <wob_jonas> Note that in Perlmonks markup, <code>...</code> is magical, it's not the plain HTML tag.
12:03:59 <wob_jonas> The text between it is interpreted as plain text (sort of like in a CDATA), with & and < not being special
12:22:44 <wob_jonas> Whoa! "Subversion 1.11 is the first of the new 6-month regular releases with an emphasis on introducing new features more quickly and a shorter support See <a href="http://subversion.apache.org/docs/release-notes/1.11#non-lts-release">Subversion 1.11 is a Regular Release</a> below."
12:23:07 <wob_jonas> I did get surprised, because the minor release 1.10 was released this year.
12:23:54 -!- arseniiv has joined.
12:33:23 -!- xkapastel has quit (Quit: Connection closed for inactivity).
13:02:04 -!- AnotherTest has quit (Ping timeout: 250 seconds).
13:16:10 <wob_jonas> ais523: however, I believe you can use subversion for serving updates with in-file deltas over the internet, as long as the server stores old versions of the file and the client has one of those versions.
13:16:29 <wob_jonas> so that may work as incremental downloading for your purposes
13:24:16 <wob_jonas> subversion also stores the versions of files on disk in a compressed format that takes the similarity of different version to account and also compresses ordinary obvious low-entropy stuff, so storing lots of versions isn't too expensive
14:46:47 -!- sleepnap has joined.
15:03:14 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
15:12:11 -!- AnotherTest has joined.
15:36:30 -!- sleepnap has quit (Ping timeout: 252 seconds).
16:23:51 -!- moei has quit (Read error: Connection reset by peer).
16:24:27 -!- moei has joined.
16:53:03 <zzo38> Fossil wiki supports stuff like <verbatim-1> so that even if the text contains </verbatim> it can still work.
18:37:40 -!- xkapastel has joined.
18:56:05 <zzo38> Can Heirloom-mailx be made to work with NNTP?
20:15:12 <esowiki> [[BrainfuckX]] https://esolangs.org/w/index.php?diff=58303&oldid=46431 * Salpynx * (+27) formatting
20:15:19 <zzo38> Now I added into my "sqlext_remote" program, the possibility to use UNIX domain sockets.
20:46:28 <esowiki> [[Pluso]] https://esolangs.org/w/index.php?diff=58304&oldid=39848 * Rdebath * (+89) Golf!?
20:48:32 <zzo38> RFC 1288 says that the finger protocol can be used with vending machines. Are there vending machines that implement it?
20:56:08 <zzo38> (I suppose you might use it in a local network in a building, but it is not so useful for internet)
20:59:29 <zzo38> It says there were a few (and they were connected to the internet, even though they admitted it is not useful for internet), but I don't know if there are any now.
21:04:02 <zzo38> The account looks like it still exists, although it just says "No Plan" now.
21:18:37 -!- Phantom_Hoover has joined.
21:21:41 <esowiki> [[Special:Log/newusers]] create * MilkyWay90 * New user account
21:24:28 <esowiki> [[Esolang:Introduce yourself]] M https://esolangs.org/w/index.php?diff=58305&oldid=58291 * MilkyWay90 * (+138)
21:24:44 <esowiki> [[User talk:Maxsteele2]] https://esolangs.org/w/index.php?diff=58306&oldid=43118 * MilkyWay90 * (+100)
22:47:14 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).
22:59:01 <esowiki> [[Keg]] M https://esolangs.org/w/index.php?diff=58307&oldid=58298 * JonoCode9374 * (+1) /* Command Glossary */
23:00:28 <esowiki> [[Keg]] https://esolangs.org/w/index.php?diff=58308&oldid=58307 * JonoCode9374 * (+263) /* Example Programs */
23:06:37 -!- AnotherTest has quit (Ping timeout: 250 seconds).
23:43:18 -!- Melvar has quit (Quit: rebooting).
23:49:35 -!- Lord_of_Life_ has joined.
23:52:54 -!- Melvar has joined.
23:53:09 -!- Lord_of_Life has quit (Ping timeout: 268 seconds).
23:53:10 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
23:53:10 -!- Lord_of_Life has quit (Changing host).
23:53:10 -!- Lord_of_Life has joined.