←2015-04-16 2015-04-17 2015-04-18→ ↑2015 ↑all
00:02:21 <int-e> Fun, that problem is EXPSPACE-complete.
00:02:46 <int-e> ( https://en.wikipedia.org/wiki/EXPSPACE )
00:02:47 <idris-bot> (input):1:9: error: unexpected
00:02:47 <idris-bot> Operator without known fixity:
00:02:47 <idris-bot> ://, expected: space
00:02:47 <idris-bot> https://en.wikipedia.org/wiki/EXPSPACE )<EOF>
00:02:47 <idris-bot> ^
00:02:53 <int-e> idris-bot: ah yes.
00:03:01 <shachaf> int-e: Oh, I didn't find that.
00:03:10 <shachaf> EXPSPACE-complete is pretty bad.
00:03:29 <shachaf> Hmm, that's regular expressions with squaring, though.
00:03:54 <int-e> yeah
00:04:00 <int-e> sorry, I didn't read far enough.
00:04:31 <shachaf> I guess it's better if you don't allow squaring?
00:04:56 <int-e> (Nor did I think, equivalence of NFA is in PSPACE)
00:05:54 <shachaf> But with squaring your NFA can be exponential in the size of the expression, I guess.
00:05:59 <int-e> So PSPACE-complete it is.
00:06:17 <int-e> squaring goes beyond regular languages.
00:07:00 <shachaf> http://cs.stackexchange.com/a/12625 says that in practice NFA equivalence can often be done efficiently.
00:24:37 -!- hjulle has joined.
00:34:00 -!- rdococ has quit (Ping timeout: 246 seconds).
00:36:01 -!- rdococ has joined.
00:40:13 <int-e> shachaf: does ^(|.*((a[^a]|[^a]a).............[^a]|(aa|[^a][^a]).............a).*|[^a].*|..?.?.?.?.?.?.?.?.?.?.?.?a.*|.*a|.*[^a].?.?.?.?.?.?.?.?.?.?.?.?.?.)$ match all strings? What about ^(|.*((a[^a]|[^a]a).............[^a]|(aa|[^a][^a]).............a).*|[^a].*|..?.?.?.?.?.?.?.?.?.?.?.?a.*|.*a|.*[^a].?.?.?.?.?.?.?.?.?.?.?.?.?.?.)$?
00:40:36 <shachaf> int-e: ?
00:40:54 <int-e> just a puzzle
00:41:13 * oerjan wakes up again
00:41:47 <int-e> which I have messed up, let me try that again...
00:42:47 <oerjan> ah they went with my suggestion 2+3, essentially
00:43:29 <shachaf> int-e: Did you produce those by using some algorithm to take the complement of a string?
00:43:36 <oerjan> now i started to briefly worry about * -> # -> *
00:44:03 <shachaf> Er, of a regular expression.
00:44:47 <oerjan> however, there's _probably_ no way to construct something that's ambiguously # or *, so it _should_ be fine.
00:44:50 <int-e> the first one should be ^(|.*((a[^a]|[^a]a).............[^a]|(aa|[^a][^a]).............a).*|[^a].*|..?.?.?.?.?.?.?.?.?.?.?.?(a.*|)|.*a|.*[^a].?.?.?.?.?.?.?.?.?.?.?.?.?.)$, and the second one ^(|.*((a[^a]|[^a]a).............[^a]|(aa|[^a][^a]).............a).*|[^a].*|..?.?.?.?.?.?.?.?.?.?.?.?(a.*|)|.*a|.*[^a].?.?.?.?.?.?.?.?.?.?.?.?.?.?.)$
00:44:59 <int-e> shachaf: it's much much worse than that.
00:46:01 <shachaf> i,i they're just regular languages, how bad could it possibly be?
00:46:02 -!- Phantom__Hoover has joined.
00:47:07 -!- Phantom_Hoover has quit (Remote host closed the connection).
00:47:13 <int-e> shachaf: how about, the shortest string that's not accepted has 32769 characters?
01:05:21 -!- rdococ has quit (Quit: Page closed).
01:12:41 <int-e> slightly shorter expressions, same idea, and correcting a mistake with the second expression: ^(|.*(([^a]a|a[^a]).............a|([^a][^a]|aa).............[^a]).*|.?.?.?.?.?.?.?.?.?.?.?.?.?.?(a.*|.?)|.*a.?.?.?.?.?.?.?.?.?.?.?.?.?.?)$ and ^(|.*(([^a]a|a[^a]).............a|([^a][^a]|aa).............[^a]).*|.?.?.?.?.?.?.?.?.?.?.?.?.?.?(a.*|.?)|.*a.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?)$
01:14:47 -!- hjulle has quit (Ping timeout: 246 seconds).
01:15:32 <int-e> (the first expression has a slightly longer minimal non-accepted string, too: 32782 characters. the second one now accepts all strings; this went wrong in my previous attempt.)
01:17:26 -!- rdococ has joined.
01:17:59 <rdococ> decided to get mIRC 6.35 and then get trial reset script...
01:18:07 <rdococ> was that a good decision?
01:18:17 <rdococ> oh I know! an esolang based on mIRC.
01:19:02 <int-e> Anyway, sleep. I can explain those regexps tomorrow if anyone cares.
01:19:35 <rdococ> goodnight int-2... sorry. just had to
01:26:20 -!- Encapsulation has quit (Remote host closed the connection).
01:36:04 -!- rdococ has quit.
01:36:32 -!- rdococ has joined.
01:55:59 <oerjan> hm int-e is asleep, i was going to ask if lambdabot had any unboxed functions
01:56:17 <oerjan> :k Int#
01:56:18 <lambdabot> Not in scope: type constructor or class ‘Int#’
01:56:18 <lambdabot> Perhaps you meant one of these:
01:56:18 <lambdabot> ‘Int’ (imported from Data.Int), ‘Int8’ (imported from Data.Int)
01:56:25 <oerjan> :k GHC.Exts.Int#
01:56:26 <lambdabot> #
01:59:15 <oerjan> :k Typeable
01:59:16 <lambdabot> k -> Constraint
02:00:53 <oerjan> :k Typeable GHC.Exts.Int#
02:00:53 <lambdabot> Illegal unlifted type: GHC.Prim.Int#
02:00:54 <lambdabot> In a type in a GHCi command: Typeable GHC.Prim.Int#
02:01:00 <oerjan> aha
02:01:12 <oerjan> :k Typeable (GHC.Exts.Int# -> GHC.Exts.Int#)
02:01:13 <lambdabot> Constraint
02:01:20 <oerjan> hm
02:04:38 <Hijiri> is there a separate Typeable for unboxed types?
02:06:38 <oerjan> i'm not sure how it works now
02:06:52 <oerjan> i am steadfastly refusing to try to install GHC HEAD :P
02:07:20 <oerjan> (or 7.10, until the platform comes out.)
02:08:05 <oerjan> they're not allowed 7.8, anyway.
02:08:12 <oerjan> *in
02:08:31 <Hijiri> what's not allowed
02:08:35 <Hijiri> # -> Constraint ?
02:08:39 <oerjan> Typeable Int#
02:08:42 <Hijiri> oh
02:08:46 <oerjan> i cannot get it to derive
02:09:10 <oerjan> but in 7.10, Typeable is so magical that it _probably_ exists.
02:10:05 <oerjan> it allowed =>, after all, util this latest fix.
02:10:19 <oerjan> *these latest fixes
02:12:17 <oerjan> i just don't know how to test it in lambdabot if it doesn't export any unboxed types in its > environment
02:13:11 <oerjan> :t typeRep (Proxy :: Proxy Int#)
02:13:12 <lambdabot> Not in scope: type constructor or class ‘Int#’
02:13:12 <lambdabot> Perhaps you meant one of these:
02:13:12 <lambdabot> ‘Int’ (imported from Data.Int), ‘Int8’ (imported from Data.Int)
02:13:20 <oerjan> :t typeRep (Proxy :: Proxy GHC.Exts.Int#)
02:13:21 <lambdabot> Illegal unlifted type: GHC.Prim.Int#
02:13:22 <lambdabot> In an expression type signature: Proxy GHC.Prim.Int#
02:13:22 <lambdabot> In the first argument of ‘typeRep’, namely
02:13:29 <oerjan> hmph
02:13:44 <shachaf> there's Proxy# type but i'm not sure what it does
02:13:46 <oerjan> :t typeRep (Proxy :: Proxy (GHC.Exts.Int# -> GHC.Exts.Int# -> *))
02:13:47 <lambdabot> parse error on input ‘*’
02:13:51 <oerjan> oops
02:14:17 <oerjan> :t typeRep (Proxy :: Proxy (Proxy :: GHC.Exts.Int# -> *))
02:14:18 <lambdabot> ‘GHC.Prim.Int#’ of kind ‘#’ is not promotable
02:14:18 <lambdabot> In the kind ‘GHC.Prim.Int# -> *’
02:14:18 <lambdabot> In an expression type signature:
02:14:31 * oerjan may be confusing emself
02:14:46 <oerjan> i suppose they're not allowed in enough places
02:15:01 <shachaf> :t typeRep (Proxy :: Proxy (GHC.Exts.Int# -> ())) -- ?
02:15:02 <lambdabot> TypeRep
02:15:13 <oerjan> ah.
02:15:48 <oerjan> ok it thinks that exists, at least.
02:17:20 -!- Sgeo|web has joined.
02:17:30 <oerjan> :t let x :: forall a b c. (a b c ~ GHC.Exts.Int# -> ()) => TypeRep in typeRep (Proxy :: Proxy a)
02:17:31 <lambdabot> parse error on input ‘->’
02:17:36 <Sgeo|web> So, many Wikias now have autoplaying loud video ads
02:17:50 <oerjan> :t let x :: forall a b c. (a b c ~ (GHC.Exts.Int# -> ())) => TypeRep in typeRep (Proxy :: Proxy a)
02:17:51 <lambdabot> The type signature for ‘x’ lacks an accompanying binding
02:17:55 <oerjan> oops
02:18:08 <oerjan> :t let x :: forall a b c. (a b c ~ (GHC.Exts.Int# -> ())) => TypeRep; x = typeRep (Proxy :: Proxy a) in x
02:18:09 <lambdabot> Couldn't match kind ‘*’ with ‘#’
02:18:09 <lambdabot> When matching types
02:18:09 <lambdabot> b0 :: *
02:18:19 <oerjan> BAH
02:18:57 -!- Hijiri has quit (Ping timeout: 248 seconds).
02:19:33 <oerjan> :k (a b c ~ (GHC.Exts.Int# -> ())) => a
02:19:34 <lambdabot> Expecting two more arguments to ‘a’
02:19:34 <lambdabot> Expected a type, but ‘a’ has kind ‘k0 -> k1 -> *’
02:19:34 <lambdabot> In a type in a GHCi command: (a b c ~ (GHC.Prim.Int# -> ())) => a
02:19:48 -!- edirc has joined.
02:20:24 * oerjan is confusing himself again
02:22:56 <elliott> does Typeable impredicativity actually cause any problems
02:22:58 <elliott> even theoretically
02:23:14 <elliott> I mean other than GHC being really broken
02:27:13 <oerjan> of => you mean? i doubt it, but it's sort of intuitively fishy.
02:29:53 <oerjan> because the things on the left of => are of a fragile existence, being automatically instantiated all the time
02:30:32 -!- Phantom__Hoover has quit (Read error: Connection reset by peer).
02:32:19 <oerjan> so depending on whether Eq T has been instantiated, Eq T => U is in a sense the same thing as U.
02:32:48 <oerjan> and having something in the language that can distinguish them is fishy.
02:35:21 <oerjan> it gets even worse if you somehow break coherence of type classes so that there are two different Eq Ts in scope
02:35:50 <oerjan> (i saw someone complain on stackoverflow, i think, about this sometimes happening with GADTs)
02:36:15 <oerjan> (well, at least the part about not picking the instance from the right source.)
02:43:29 -!- GeekDude has quit (Ping timeout: 248 seconds).
02:52:20 -!- TodPunk has quit (Read error: Connection timed out).
02:52:51 -!- TodPunk has joined.
02:53:03 <oerjan> :t I#
02:53:03 <edirc> 0
02:53:03 <edirc> ?
02:53:04 <lambdabot> Not in scope: data constructor ‘I#’
02:53:04 <lambdabot> Perhaps you meant ‘In’ (imported from Lambdabot.Plugin.Haskell.Eval.Trusted)
02:53:18 <oerjan> oh wtf
03:29:00 <Sgeo|web> Is it weird to find syntax-rules more elegant than imperative macros
03:29:14 <Sgeo|web> I feel like what I'm doing isn't cheating because it's syntax-rules only
03:29:44 <Sgeo|web> Like, if what I wanted to do was too inelegant, then I'd be forced into syntax-case
03:29:50 -!- dianne has quit (Ping timeout: 272 seconds).
03:31:07 -!- dianne has joined.
03:35:52 <izabera> did you know that printf has "int" in it? i just found out it does, with s/int/float/g
03:35:54 <izabera> prfloatf
03:36:51 <oerjan> floateresting
03:36:57 <izabera> haha
03:40:21 -!- bb010g has joined.
03:46:51 <oerjan> @tell int-e <int-e> [...] I've narrowed it down to KindSignatures + ScopedTypeVariables + TypeFamilies for the first one and PolyKinds + ScopedTypeFamilies for the second one. [...] <-- pretty sure you switched those
03:46:51 <lambdabot> Consider it noted.
03:47:21 * oerjan ignores the actual typo
03:50:54 -!- zadock has joined.
03:53:45 <shachaf> oerjan: the actual typo is that you didn't @tell float-e hth
03:54:11 <oerjan> O KAY
03:57:29 <rdococ> someone needs to make a programming language using prfloatf
03:58:58 <oerjan> the problem is, what should it _do_? printf already prints floats.
04:00:16 <shachaf> oerjan: clearly it should prfloat them hth
04:00:31 <oerjan> O KAU
04:07:03 -!- ProofTechnique has joined.
04:13:08 <oerjan> `addquote <rdococ> what? I just wanted a laugh... lol <rdococ> I need to stop using lol, lol <olsner> just stop then
04:13:10 <HackEgo> 1240) <rdococ> what? I just wanted a laugh... lol <rdococ> I need to stop using lol, lol <olsner> just stop then
04:13:17 <oerjan> oops
04:13:21 <oerjan> `addquote <rdococ> what? I just wanted a laugh... lol <rdococ> I need to stop using lol, lol <olsner> just stop then, hth
04:13:25 <oerjan> oh wait
04:13:27 <HackEgo> 1241) <rdococ> what? I just wanted a laugh... lol <rdococ> I need to stop using lol, lol <olsner> just stop then, hth
04:13:32 <oerjan> `delquote 1240
04:13:34 <HackEgo> ​*poof* <rdococ> what? I just wanted a laugh... lol <rdococ> I need to stop using lol, lol <olsner> just stop then
04:13:51 <rdococ> lol
04:14:07 <rdococ> ...
04:14:13 <rdococ> I just used lol again, lol
04:14:43 <oerjan> careful or your lol may become another django
04:15:07 <rdococ> sorry, I don't know what a django means
04:15:12 <oerjan> `quote django
04:15:23 <HackEgo> 261) <olsner> django is named after a person? <olsner> thought it would be a giraffe or something \ 306) <cpressey> `quote django <HackEgo> ​352) <olsner> django is named after a person? <olsner> thought it would be a giraffe or something <cpressey> thankfully only one \ 307) <monqy> `quote django <HackEgo> ​352) <olsner> django is named a
04:16:16 <rdococ> oh yeah...
04:16:21 <rdococ> lol
04:16:34 <oerjan> `` quote django | tail -n +5
04:16:35 <HackEgo> 318) <elliott_> `addquote <olsner> two quotes about quotes about django <olsner> I guess the worst part is that I appear in all three hackego quotes about django <olsner> elliott_: another quote? you're not helping :/ \ 884) <oerjan> `pastequotes django <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.5404 <ols
04:16:57 <oerjan> oh miscounted
04:17:16 <oerjan> `` quote django | tail -n +3
04:17:16 <HackEgo> 307) <monqy> `quote django <HackEgo> ​352) <olsner> django is named after a person? <olsner> thought it would be a giraffe or something \ 407) <cpressey> `quote django <HackEgo> ​352) <olsner> django is named after a person? <olsner> thought it would be a giraffe or something <cpressey> thankfully only one <monqy> thankfully only two \ 31
04:17:36 <elliott> `pastequotes django
04:17:41 <HackEgo> http://codu.org/projects/hackbot/fshg/index.cgi/file/tip/paste/paste.22857
04:18:28 <rdococ> django must be a giraffe!
04:19:53 <oren> new operator:
04:20:18 <oren> if(var =! var2){
04:20:40 <oren> the =! operator is for messing
04:21:24 <oerjan> gah why is youtube so slow
04:23:23 <oren> html5?
04:24:11 <elliott> right, because <video> is a crashy CPU hog and flash isn't
04:24:29 <rdococ> yes
04:24:30 <rdococ> lol
04:24:41 <oren> elliott: depends on video format hth
04:24:49 <rdococ> why not just use pausable gifs
04:25:00 <elliott> not really
04:25:04 <rdococ> so a blank div with a button that inserts a gif into the div
04:25:08 <oren> some <video> formats screw up a lot for me
04:25:13 <elliott> flash's decoding is never accelerated in pretty much any way afaik
04:25:37 <elliott> the only ~relevant formats are VP8/9 and H.264, the latter is more likely to get accelerated on mobile or whatever than the others
04:25:50 <elliott> but flash just always seems to be terrible about video decoding
04:27:46 <oerjan> rdococ: a bit bad for sound, perhaps.
04:27:53 <rdococ> true
04:28:11 <rdococ> the button could invoke a function that inserts a gif AND plays an audio file
04:28:17 <elliott> gifs also load awfully, compress awfully and are limited to 256 colours, but who's counting
04:28:34 <rdococ> but it loads the gif and audio first so theyre synched
04:28:58 <rdococ> thought youtube was awful anyway
04:29:30 <elliott> youtube do like serious bandwidth limiting so buffering is painful on slower connections
04:29:36 <oren> youtube has always been awful compared to downloading the video and playing it with vlc
04:29:39 <rdococ> also, internet explorer -6 will support gifs
04:29:42 <elliott> it's not inherent they just do it to increase capacity I guess
04:29:44 <rdococ> will probablyish
04:29:48 <rdococ> who knows
04:30:09 <elliott> oren: that's half flash's fault, half doing all the buffering upfront, basically
04:30:13 <elliott> youtube does especially badly if you seek around
04:30:54 <oren> youtube with html5 seems worse
04:31:18 <elliott> there's a browser extension to force it to serve H.264 instead of VP8/9
04:31:20 <elliott> that might help
04:32:08 <elliott> since I think that maybe flash didn't do VP8/9? so you could have been going from H.264 flash to VP8/9 <video>, which could be worse I guess
04:33:37 <elliott> oh also if you're using firefox then I dunno if they do DASH yet (right click youtube player -> "stats for nerds"), chrome probably works best there for obvious reasons
04:34:00 <elliott> seems to make seeking a lot better too
04:35:30 -!- ProofTechnique has quit (Ping timeout: 250 seconds).
04:39:27 <oren> the state for nerds says I have HTTPS/DASH/VOD and software rendering and decoding
04:41:06 <oren> http://snag.gy/T7AYP.jpg
04:42:13 <elliott> uh why does it look different for you than it does for me
04:42:17 <elliott> are you sure that's HTML5 :P
04:43:02 <oren> Hmm, this video is flash
04:43:20 <oren> explains why it hasn't frozen yet
04:43:50 <oren> HTML5 freezes firefox every 15 minutes
04:44:11 <pikhq> Weird, HTML5 video actually works perfectly fine for me.
04:44:20 <oren> of course, my computer has only 2 GB of ram
04:44:25 <pikhq> elliott: They do DASH as of the latest release.
04:44:26 <elliott> sounds like you have other problems
04:44:47 <elliott> no, "uses all 2GB of your RAM unlike flash and then crashes firefox" is not a known drawback of HTML5 video :p
04:45:01 <pikhq> Sometime a bit before that they appear to have made HTML5 video playback not suck.
04:45:13 <elliott> I mean on windows flash is actually kind of okay
04:45:14 <oren> firefox uses all my ram from some stylesheets....
04:45:18 <elliott> but on linux/osx it is beyond useless
04:45:35 <elliott> also especially on linux the flash plugin for firefox is like... several major releases behind because they only do the Pepper one now? so chrome/ium only
04:45:42 <elliott> I don't even know if it still gets security releases
04:45:49 <pikhq> It does still get those.
04:45:58 <izabera> who needs flash in 2015?
04:46:00 <rdococ> got a gif player working in pure HTML and JS
04:46:06 <elliott> was the NPAPI interface really that hard to maintain
04:46:22 <elliott> I mean they still support it on every platform but linux right
04:46:24 <pikhq> elliott: No, but the distinction is *Adobe doesn't maintain anything at all on Linux*.
04:46:29 <rdococ> once HTML5 dominates, flash won't even exist
04:46:31 <pikhq> Google maintains the Pepper version.
04:46:37 <elliott> well okay
04:46:39 <elliott> who does the security fixes
04:46:39 <rdococ> but thats if it does
04:46:46 <pikhq> Some poor single guy.
04:46:47 <oren> rdococ: what sbout animations
04:46:55 <elliott> flash is already well on its way to dying...
04:46:57 <rdococ> oren: yeah, it animates
04:47:03 <elliott> doesn't it even output HTML5 gunk these days?
04:47:06 <pikhq> (I don't remember where, but he's got a blog. Seriously, it's just him.)
04:47:12 <pikhq> Yes, it does.
04:47:15 <rdococ> oren: found a funny banana animation to test
04:47:26 <rdococ> I could watch this all day
04:47:34 <elliott> btw you might run out of your 2 GB RAM less if you had fewer than 20 extensions in firefox :P
04:47:38 <pikhq> Flash as an animation util lives on, as an Internet file format it's not quite dead but it's getting there.
04:47:44 <elliott> since a lot of firefox's awful RAM hungriness and leakiness is bad extensions
04:48:02 <pikhq> Believe it or not Adblock Plus is one of the worse ones in that regard.
04:48:04 <elliott> in particular you had adblock plus which is awful for RAM usage, so...
04:48:13 <elliott> is there a uBlock for firefox yet. there is, right?
04:48:18 <elliott> I know it forked recently... *sigh*
04:48:19 <pikhq> Yes, there is.
04:48:23 <pikhq> I'm using it.
04:48:26 <oren> what is ublock
04:48:37 <elliott> like adblock plus except it doesn't double your memory usage
04:48:42 <pikhq> Newer ad blocker, works without injecting a lot of shit into the DOM.
04:49:21 <elliott> pikhq: should I be using the gorhill one or the "official" one on chrome
04:49:27 <elliott> since I don't care enough to figure out why they are separate now
04:49:38 <pikhq> elliott: I'm not sure which one is the "sane" one as yet.
04:49:49 <elliott> I hate computers
04:50:17 <pikhq> Ah, the gorhill one is the one you really do not want to use because it's no longer maintained.
04:50:37 -!- variable has joined.
04:50:52 <elliott> yes it is
04:50:58 <elliott> he said he was going to keep working on it in his own time
04:51:00 <pikhq> In effect he's just bug-fixing.
04:51:01 <elliott> he just isn't taking feature requests
04:51:10 <pikhq> I was under a misconception and google quickly fixed it.
04:51:16 <elliott> he definitely said he was going to keep adding things to it
04:51:28 <elliott> that's the amount to which I did check up wtf was happening and why the extension changed name for me
04:51:50 <elliott> Important note: This is a fork of the new official repo. Although both projects are essentially the same as of 0.9.3.0, they will probably start to diverge as time goes (update: they already started to diverge feature-wise).
04:51:52 <pikhq> He's still working on it but not particularly caring about WTF anyone else demands from it, then?
04:51:55 <pikhq> Hum.
04:52:05 <elliott> [...]
04:52:05 <elliott> I may add features whenever I feel the need to do so -- I use the extension myself, so if I feel it definitely needs something more, I will just go ahead and add it.
04:52:11 <pikhq> I suppose that's a question of which one sucks less.
04:52:13 <elliott> whatever
04:52:18 <elliott> it's not like it matters since uMatrix does the heavy lifting
04:52:35 <pikhq> It sounds like right *now* there's only going to be trivial differences.
04:54:21 <pikhq> I suppose stick with ublock "official" for now unless it starts sucking then.
04:55:01 <elliott> well
04:55:05 <elliott> it automatically upgraded to gorhill's uBlock for me
04:55:13 <pikhq> Huh, go figure.
04:55:23 <elliott> I guess because he owned the chrome store entry for it
04:56:14 <oren> anyway, the reason firefox crashes is becasue I wrote a script to monitor the computer and kill -9 firefox if the computer starts to freeze. before, firefox would put the whole computer in a coma
04:56:29 <elliott> wow
04:56:38 <elliott> chrome crashes too because I kill -9 it periodically. dont use chrome
04:56:53 <rdococ> added stop feature to the gif player
04:57:05 <elliott> anyway if you switch from adblock pro to ublock then you can continue pretending you don't need to upgrade your RAM for another few months
04:57:06 <pikhq> Pity that Firefox, like a lot of things, is of the philosophy that "free() everything before exit is a useful behavior".
04:57:15 <elliott> in the meantime it's not really firefox itself that is destroying your RAM
04:58:43 <pikhq> (if you don't free() before exit, the kernel gets to free pages without mutating them. i.e. it can avoid reading them out of swap just to mark them as no longer used. :))
04:59:05 -!- Melvar has quit (Ping timeout: 265 seconds).
04:59:21 -!- idris-bot has quit (Ping timeout: 264 seconds).
04:59:30 <pikhq> elliott: For now I'd advise "meh, whatever".
04:59:52 <elliott> yeah I kinda already decided that before I even asked
05:00:09 <elliott> I should switch to IE and stop caring about everything
05:00:15 <pikhq> *wince*
05:00:23 <pikhq> Though a much smaller *wince* than it once was.
05:00:36 <rdococ> noo don't go for IE
05:00:39 <pikhq> These days IE is merely not as good as its alternatives, rather than actively terrible.
05:00:50 <oren> I dunno. basically what happens is, firefox normally takes 18% to 30% of my ram (including flash plugin container). Sometimes on certian sites, suddenly that climbs rapidly without warning, causing the mouse to stop moving and sort of blink from one place to the next. So my utility checks if memory usage of firefox is above 50% and kills it if it is
05:01:23 <pikhq> Here's a nickle, kid; get yourself a real computer.
05:01:54 <oren> You're one of those condescending UNIX users!
05:02:40 <pikhq> (seriously though, my *phone* has as much RAM as your computer)
05:03:47 <oren> your phone probably cost more than this computer
05:03:57 <rdococ> my laptop is a little dodgy but it works
05:03:59 <pikhq> Maybe. How much did it cost and when?
05:04:00 <oren> my computer was 200
05:04:05 <pikhq> And when?
05:04:07 <elliott> oren can I buy you some RAM just so I don't have to hear about how little RAM you have again
05:04:14 <oren> *canadian* dollars, 2 years ago
05:05:08 <izabera> there are lightweight browsers you know
05:06:02 <elliott> I seriously doubt it's even firefox's fault rather than extensions here
05:06:43 <oren> I think it is javascript's fault
05:07:07 <pikhq> By the way, *mine* cost more but there are in fact phones for that price with 2G of RAM...
05:08:06 <pikhq> But heck. What type of RAM do you have? DDR3?
05:09:23 <pikhq> How much would you be willing to spend on RAM right now?
05:10:11 <pikhq> Lowest we can go right now is 18 USD.
05:10:21 <pikhq> (to double your RAM)
05:10:32 <oren> I dunno, it's a laptop
05:11:25 <oren> seems it is DDR3
05:11:42 <pikhq> Fine then, http://www.newegg.com/Product/Product.aspx?Item=N82E16820239853 Here, if you have a spare slot.
05:12:13 <rdococ> look someones done it already http://slbkbs.org/jsgif/
05:12:43 <oren> apparently I have 3 spare slots. it's hard to type with the case of the laptop hanging off it though
05:12:53 <pikhq> (seriously though, RAM is both cheap and something that's really painful to skimp on)
05:13:09 <elliott> rdococ: don't worry, nobody knows who made *that*
05:14:06 * pikhq wonders how long until a RPi with 2 or more gigs of RAM.
05:15:23 <oren> is ddr3 ram hot swappable?
05:15:28 <pikhq> No.
05:15:40 <oren> what if i'm only putting one in?
05:16:00 <pikhq> Still no, but at least less obviously so.
05:16:25 <oren> well, i guess I should shut down beofre trying this then
05:16:38 <pikhq> What, do you *have* some spare RAM handy?
05:16:39 <elliott> did the ram arrive already
05:16:47 <elliott> newegg shipping really is a marve
05:16:47 <elliott> l
05:17:12 <oren> i have some ram that may or may not be fried due to an incident
05:17:22 <izabera> lol
05:17:27 <pikhq> Might I recommend memtest86?
05:17:39 -!- ProofTechnique has joined.
05:17:45 -!- oren has quit (Quit: leaving).
05:18:19 -!- MDude has changed nick to MDream.
05:19:53 <elliott> well either he will have more RAM or his computer will catch fire
05:19:59 <elliott> either way we won't have to hear about it any more
05:20:07 <pikhq> That's like winning.
05:20:41 <pikhq> Maybe I'll just tinker with my silly HTTP server s'more then.
05:21:08 <pikhq> (y'know it's lazy when it uses dprintf!)
05:23:19 <pikhq> Actually, more to the point, when it uses a thread per connection. :)
05:23:25 <shachaf> hi rdococ
05:23:57 <rdococ> hi
05:24:57 <shachaf> i can't tell whether you hilighted me on purpose
05:25:16 <shachaf> i must be missing some context
05:25:42 <rdococ> who highlighted you
05:26:48 <shachaf> i guess not
05:27:50 <rdococ> why, what did you see
05:28:26 <rdococ> huh...
05:28:30 <rdococ> find tool says nothing
05:28:49 <shachaf> "slbkbs" highlights me but i guess that wasn't related
05:29:00 <rdococ> oh
05:29:25 <rdococ> right
05:29:35 <rdococ> ugh my scroll bar
05:29:35 <pikhq> shachaf: We did actually talk about jsgif so that might have been all that was needed.
05:30:12 <shachaf> that's such a terrible program
05:30:18 <shachaf> especially the lzw decoding
05:30:25 <shachaf> utter scow
05:30:38 <pikhq> Can't be as bad as the gzip decoder I've got laying around here.
05:30:50 <pikhq> Or the PNG encoder. :)
05:31:08 <rdococ> ah its back to normal
05:31:52 -!- orin has joined.
05:32:13 <orin> based on that i still have 2GB of ram, thi ram is indeed fried
05:34:24 <orin> I also taped the case shut more ecurely
05:35:06 <oerjan> are people being fake humble about their code
05:35:19 <oerjan> also, what does slbkbs mean
05:35:31 <pikhq> Nah, I'm openly mocking my code. It's impressive shit.
05:35:49 <shachaf> oerjan: no, it's actually terrible
05:35:59 <oerjan> does shachaf have a middle name starting with l
05:36:06 <shachaf> MAYBE
05:36:23 <pikhq> When you write a PNG encoder that doesn't do compression you know it's terrible.
05:36:28 <oerjan> in which case, who's the s at the end
05:41:31 <orin> pikhq: PNG supports raw data?
05:42:07 <pikhq> No, but you don't have to compress to output zlib data.
05:43:19 <orin> oh
05:43:22 <orin> lol
05:43:30 <orin> i see
05:44:43 <orin> you just a output a bunch of literal blocks
05:45:09 <pikhq> Yep!
05:49:02 <orin> normally, literal blocks are used for when the data is too hard to compres... I guess in this case, you just give up beofre you even start
06:05:18 <rdococ> blocks
06:10:43 -!- ProofTechnique has quit (Ping timeout: 252 seconds).
06:13:08 <oerjan> @tell olsner <olsner> isn't it spelled trawling when you do it to fish? <-- different terms hth
06:13:08 <lambdabot> Consider it noted.
06:14:00 -!- zadock has quit (Ping timeout: 265 seconds).
06:15:58 -!- zadock has joined.
06:16:55 <oerjan> @tell olsner mainly trolling uses a line but trawling uses a net, i think. except there seems to be some overlap in meaning.
06:16:55 <lambdabot> Consider it noted.
06:26:19 -!- ProofTechnique has joined.
06:31:51 * Taneb hello
06:32:06 * oerjan g'day
06:33:51 <oerjan> wat why didn't i see int-e's response right underneath
06:34:11 <oerjan> what a scow hth bbq
06:39:29 <quintopia> i don't understand this comparing of programs to boats thing
06:39:43 <quintopia> what makes a piece of code especially like a boat?
06:40:00 <Taneb> I saw a proof of Sylow's first theorem yesterday and it seemed really elegant
06:40:04 <Taneb> But now I have forgotten it
06:40:20 <oerjan> so elegant it slides right through
06:48:21 <Taneb> Huh, DMM is doing a patreon to bring IWC back
06:48:52 <Taneb> https://www.patreon.com/dmmaus
06:49:44 <oerjan> IWC? i thought it would be for general projects
06:51:17 <Taneb> $50 goal was for 1 new IWC comic a week
06:51:30 <oerjan> ooh
06:51:41 * oerjan didn't visit the patreon page before
06:52:21 <Taneb> $75 is for *two* comics a week
06:52:37 <Taneb> $54000 is for the Allosaurus' presidential campaign
06:53:59 <oerjan> it says $42,000,000
06:54:16 <shachaf> oerjan: sorry about the scow hth
06:54:38 <oerjan> shachaf: OKAY tdh hand bbq fnord
06:56:05 <shachaf> oerjan: the l is a finnish translation of the s hth
06:56:13 <oerjan> ooh
06:56:49 <Taneb> I have a poor memory for numbers
06:57:02 <oerjan> lokki guy
06:57:31 <Taneb> David Morgan Mar is someone who changed my life without really meaning to
06:59:17 -!- Sgeo|web has quit (Quit: Page closed).
07:00:06 -!- variable has changed nick to trout.
07:00:17 <Taneb> If it weren't for him I'd probably be doing a pure maths degree
07:00:30 <Taneb> Well
07:00:37 <shachaf> What are you doing instead?
07:00:39 <Taneb> A degree that is only maths
07:00:47 <Taneb> I am doing a degree that is maths and computer science
07:01:01 <shachaf> which maths twh
07:02:41 <Taneb> Right now, a fair amount of group theory and a bit of linear algebra
07:03:55 <shachaf> whoa, you should teach me about linear algebra
07:05:02 <Taneb> There are things called vector spaces over a given field, which have some axioms
07:05:26 <Taneb> And there are things called linear transformations which are really vector space homomorphisms
07:05:42 <Taneb> Thing is, linear transformations work out to be almost but not quite matrices
07:07:18 <Taneb> And if a property holds true for all matrices that are similar to one representing a linear transformation, something like it will be true for the linear transformation itself!
07:08:06 <Taneb> That's basically all I know
07:09:02 <shachaf> can you elaborate on the last bit
07:09:24 <shachaf> in the past i would have asked things like whoa, where do matrices come from. but now i know the answer
07:09:32 -!- nszceta has joined.
07:10:45 <oerjan> well when a matrix and a patrix love each other very much...
07:11:16 <shachaf> what does "diagonal matrix" correspond to
07:11:28 <oerjan> that's a base-dependent notion
07:11:34 <shachaf> yes
07:11:42 <shachaf> ok, what does "diagonalizable matrix" correspond to
07:12:06 <oerjan> that it has a spanning set of eigenvectors
07:12:15 <shachaf> what about "doubly-stochastic matrix"
07:12:25 <shachaf> what are left eigenvectors
07:12:51 <oerjan> ordinary eigenvectors of the transpose
07:13:07 <shachaf> ok, what's the transpose of a matrix
07:13:16 <oerjan> i'm not entirely sure what "doubly-stochastic" means
07:13:27 <shachaf> the matrix is stochastic and also its transpose is stochastic
07:13:31 <oerjan> for a matrix it's simply the same as haskell transpose
07:13:39 <Taneb> shachaf, the transpose of a matrix is a contravariant endofunctor
07:13:39 <shachaf> i.e. rows and columns sum to 1
07:14:01 <shachaf> oerjan: in terms of linear transformations, not of matrices
07:14:35 <Taneb> Are transposes of similar matrices similar?
07:15:15 <oerjan> if you have a linear transformation, and a functional on its range space, then you can compose them to get another functional on the domain
07:15:41 <oerjan> that's a linear transformation of the dual spaces in the opposite direction, so a contravariant functor
07:16:24 <shachaf> but you need to choose a basis?
07:16:28 <oerjan> now i've forgotten what similar means
07:16:37 <oerjan> shachaf: no, not for the l.t. concept
07:16:54 <oerjan> but to _identify_ the space with its dual space, you need a basis.
07:16:57 <Taneb> oerjan, two matrices A and B are similar if there exists a matrix C such that A = CBC^-1
07:17:54 <Taneb> In terms of linear algebra, that means that a linear transformation is still valid if you change your basis
07:17:55 <oerjan> yeah that's preserved by transposes
07:18:16 <oerjan> A^t = (C^t)^-1 B^t (C^t)
07:18:39 <Taneb> Oooh
07:18:51 <oerjan> transposition reverses order of multiplication and preserves inverses
07:18:52 <Taneb> That makes sense
07:19:52 <Taneb> I ought to do some linear algebra revision at some point
07:22:21 <oerjan> shachaf: i think stochastic is pretty base-dependent. it's essentially that inner product with the vector (1,1,...,1) is preserved. And maybe some positivity requirement. No wait I think that's automatic.
07:22:46 <Taneb> Oh yeah! We started doing inner products the other day
07:22:47 <oerjan> or is it hm
07:23:21 <shachaf> oerjan: i thought it had some basis-invariant properties
07:23:27 <shachaf> maybe not
07:31:26 <shachaf> another linear algebra puzzle is why do people say "eigenvector with eigenvalue 1" instead of "fixed point" twh
07:32:19 <oerjan> well it's silly to use a special name for a special case if it has no interesting special properties, or something.
07:32:20 <quintopia> ...sometimes they do say "a fixed point"
07:34:45 -!- trout has quit (Ping timeout: 264 seconds).
08:00:06 <fizzia> "I don't know how I could design an interpreter to interpret a picture. "
08:00:07 <fizzia> o_O
08:01:05 <rdococ> wut?
08:03:28 <rdococ> ..well, how?
08:03:37 <rdococ> lol
08:03:55 <rdococ> what? are you staring at me through your screen?
08:04:02 <rdococ> ...
08:04:17 <rdococ> ugh scrollbar
08:05:22 <rdococ> stop judging me through your screen
08:07:06 <oerjan> i think he's just pietying you
08:08:11 <oerjan> ^wiki piet
08:08:11 <fungot> http://esolangs.org/wiki/piet
08:08:50 <HackEgo> [wiki] [[Version]] http://esolangs.org/w/index.php?diff=42587&oldid=30453 * Rdococ * (-7) instructions whose labels match this regular expression will not be executed.
08:08:52 <orin> Hmm... this is an interesting result.
08:09:00 <rdococ> I know of Piet, yes
08:09:41 <orin> My experimental compression alogrithm, followed by gzip, beats gzip done alone
08:09:49 <oerjan> EXCELLENT
08:09:59 <rdococ> but does it take a million years?
08:10:11 <b_jonas> ohai
08:10:13 <oerjan> i don't think orin is that old
08:10:20 <elliott> fizzia: nice unconfusing nick
08:10:33 <rdococ> also, is it lossy compression (if that even makes sense for folders)
08:10:45 <oerjan> WAT
08:10:51 * oerjan swats fizzia -----###
08:11:07 <elliott> I was like "would fizzie really use o_O"
08:11:33 * oerjan didn't notice that.
08:11:36 <orin> It is completely lossless...
08:12:01 * oerjan leaves most of his spammer recognition to elliott
08:12:09 <oerjan> also trolls
08:12:37 <oerjan> i don't think we've seen any of the regular trolls in a while...
08:12:42 <orin> http://snag.gy/tyoi4.jpg
08:13:10 <orin> see screenshot. the file out is the compressed of the file 14.12.23
08:13:22 <elliott> oerjan: you mean like c'er or h'rd
08:13:32 <elliott> or someone else
08:13:33 <rdococ> can you decompress it?
08:13:34 <oerjan> elliott: y's
08:13:36 <fizzia> rdococ: well you read in an image into a pixel array?
08:13:50 <fizzia> images are good for 2D languages probably because they are already 2D
08:13:55 <orin> yes
08:14:08 <rdococ> true
08:14:10 <fizzia> videos are good for 3D languages
08:14:14 <fizzia> because they are already 3D
08:14:17 <oerjan> orin: i cannot quite fathom how people can stand transparent text windows.
08:14:18 <rdococ> but what about 1D?
08:14:32 <rdococ> guess you could use text
08:14:36 <fizzia> you can always have a width*1 picture
08:14:40 <fizzia> then it's 1D
08:14:43 <elliott> well the cool part is that those screenshots are jpegs
08:14:45 <rdococ> or a height=1
08:14:49 <elliott> so they look even worse than they otherwise would
08:15:14 <orin> http://snag.gy/CgJuv.jpg
08:15:32 <orin> here no transparent
08:17:43 <oerjan> i wasn't complaining, just unfathoming
08:18:38 <orin> http://arin.ga/Ct6O7c <- compressor http://arin.ga/36DMJG <- uncompressor
08:20:38 <orin> I have been experimenting with variants of thi sort of thing for a bit
08:22:58 <orin> The idea is that many files do not use every byte from 00 to ff. we can encode pairs of bytes they use a lot, like '==' using them.
08:23:53 <orin> so we append, say \000== to the start of file, then inside file replace every \000 with == and vice versa
08:26:20 <orin> So even if there is like one capital R or something we can still use Rll to reduce size if there are a lot of 'll's.
08:27:45 -!- Patashu has joined.
08:28:11 <fizzia> elliott: oh. right.
08:28:13 -!- fizzia has changed nick to mroman.
08:28:17 <mroman> Never changed it back.
08:35:09 <quintopia> orin: i don't really see this beating a huffman encoding. why do you do it?
08:36:34 <int-e> oerjan: you mean you don't like ScopedTypeFamilies? (The confusion about the order arose because I copied the second example first, and then worked from an editor)
08:37:17 <orin> quintopia: this algorithm, followed my gzip, beats gzip used alone
08:37:25 <oerjan> oh i'm sure they will revolutionize haskell once they're implemented
08:37:33 <quintopia> i mean if you're gonna rename things to shorter things, might as well go further. for instance, in the file with one R and tons of ll, would it not make sense to swap all ll's for R's? but this idea just ends up leading to a huffman coding if taken to its extreme
08:37:47 <int-e> oerjan: and I'm not consciously providing any unboxed types in lambdabot but how can I ever be sure?
08:38:29 <orin> quintopia: my algorithm already does that
08:38:39 <quintopia> does what?
08:39:09 <int-e> especially when @let lets you import new modules as long as they're safe... which makes it tricky to get anything that reexports stuff from GHC.Exts; it would have to come from a trusted package; but not impossible, I suppose.
08:39:23 <orin> it goes through all x,y,z and if occurs(yz)-occurs(x) is large enough it swaps all x for yz and vice versa
08:39:59 <quintopia> sounds slow
08:40:14 <orin> it is slow to compress, but very fast to uncompress
08:40:45 <quintopia> but again...why stop there? you could swap some uncommon letters for very common trigrams or tetragrams too!
08:40:49 <oerjan> int-e: i actually found out how to get unboxed kinds
08:41:16 <b_jonas> oerjan: are those kinds for types of unboxed values?
08:41:19 <orin> quintopia: eaxtly...
08:41:20 <oerjan> > let f x = let #42 = x in x in typeOf f
08:41:22 <lambdabot> <hint>:1:11: parse error in let binding: missing required 'in'
08:41:24 <oerjan> oops
08:41:42 <oerjan> > let f x = let 42# = x in x in typeOf f
08:41:43 <lambdabot> Int# -> Int#
08:41:46 <int-e> oh, literals. right.
08:42:00 <int-e> Meh. I should've known.
08:42:14 <int-e> (I knew that MagicHash is in there)
08:42:27 <oerjan> however, it seems it _refuses_ to let you take apart that kind
08:42:35 <int-e> (Because, you know, "what harm could it possibly do?)
08:43:18 <FireFly> @ty typeOf
08:43:19 <oerjan> let f x = 2 :: Int where {3# = x}; p2 :: t a b -> Proxy t; p2 _ = Proxy in typeRep (p2 f)
08:43:19 <lambdabot> Typeable a => a -> TypeRep
08:43:22 <oerjan> oops
08:43:26 <oerjan> > let f x = 2 :: Int where {3# = x}; p2 :: t a b -> Proxy t; p2 _ = Proxy in typeRep (p2 f)
08:43:27 <lambdabot> Couldn't match kind ‘*’ with ‘#’
08:43:27 <lambdabot> When matching types
08:43:27 <lambdabot> a0 :: *
08:43:55 <oerjan> but
08:44:03 <oerjan> > let f x = 2 :: Int where {3# = x}; p2 :: t b -> Proxy t; p2 _ = Proxy in typeRep (p2 f)
08:44:04 <lambdabot> (->) Int#
08:44:50 <oerjan> so there's some kind of protection against removing unboxed arguments from a -> b
08:45:15 <oerjan> (also i tried unboxed tuples before i remembered ghci doesn't support them)
08:45:41 <quintopia> orin: i would guess there would be some types of files that it does poorly, on account of they already use all available bytes, or each byte is used with roughly equal frequency. (notice this is not the same condition as the sort of randomness you see in compressed files)
08:45:57 <orin> right
08:46:24 -!- nszceta has quit (Quit: Textual IRC Client: www.textualapp.com).
08:46:35 <b_jonas> oerjan: does that mean that the kind of a function on an unboxed type is not supposed to have (->) as the top kind constructor?
08:47:32 <orin> but consider for example acrives of C code... they might not even use the characters @ or `
08:47:45 <quintopia> you know what i want to see? a lossy english language compression algorithm. one that is guaranteed to decompress to grammatical english text with the same approximate semantics as the compressed file, but not exactly the same file
08:48:24 <orin> um... maybe we can compress synonyms to the same number?
08:48:26 <oerjan> <int-e> (Because, you know, "what harm could it possibly do?) <-- well the manual explicitly says it doesn't import anything or change semantics, so the literals is all you get immediately
08:48:28 <quintopia> perhaps because it maps synonyms to the same word, or considers certain sentence structures equivalent...
08:48:41 <b_jonas> quintopia: you have to ask the journalist bots for that. they already have a model to rewrite journal articles with the same meaning (not compress though), to very quickly produce articles that aren't direct quotes of the article they steal from
08:49:08 <quintopia> b_jonas: i'd love to check those out
08:49:08 <orin> ooh. it would be good if it eliminated double negatives and the passive voice
08:51:09 <quintopia> orin: well, it would be difficult to eliminate double negatives. sometimes people actually use double negatives to intensify negatives, rather than flip back to positives. or you could just say "this is guaranteed to work only if you start with something grammatical and formal. start throwing conversational or dialectal stuff at it at your own risk"
08:52:41 <oerjan> b_jonas: it means that -> with unboxed kinds involved is deeply magical and confuses things at the core stage. and it's the same kind of magic that we used to make an exploit involving * vs. Constraint. although they've patched enough now that i don't think there's an exploit in HEAD any longer.
08:53:08 <oerjan> basically => and -> _are_ the same constructor, afa core is concerned.
08:53:16 <b_jonas> oerjan: I see
08:56:56 -!- zadock has quit (Ping timeout: 240 seconds).
08:58:28 -!- Melvar has joined.
09:00:39 <quintopia> what sort of data naturally has an unlabelled undirected graph structure?
09:02:10 <elliott> quintopia: it's hard to do *any* semantics-preserving transformation on english text
09:04:21 <oerjan> exercise: prove there are no two english phrases with the exact same semantics hth
09:06:20 <rdococ> hello and hi
09:08:01 <int-e> :t ppp
09:08:01 <edirc> ?
09:08:02 <lambdabot> forall (k :: BOX) (k1 :: BOX) (a :: k -> k1 -> *) (b :: k) (c :: k1). a b c -> Proxy c
09:08:22 <int-e> > let c _ = 1# in ppp c
09:08:25 <lambdabot> Couldn't match kind ‘*’ with ‘#’
09:08:25 <lambdabot> When matching types
09:08:25 <lambdabot> c :: *
09:08:31 <int-e> oerjan: yeah, weird.
09:09:44 <b_jonas> oerjan: you can't prove that. there are text with identical semantics, it's just that we can't handle English with computers well enough to find them
09:10:25 -!- zadock has joined.
09:10:40 <oerjan> b_jonas: you can't prove that either hth
09:10:48 <b_jonas> oerjan: in particular, if you have a long spam advertisment mail, its semantics doesn't change if you modify its end to almost anything, after the part that's enough to make it clearly a spam ad. however, recognizing spam ad mails automatically is difficult
09:11:06 -!- idris-bot has joined.
09:12:45 <int-e> oerjan: but then again, type-level (->) is weird; I mean..
09:12:49 <int-e> :k (->)
09:12:50 <edirc> ?
09:12:50 <lambdabot> * -> * -> *
09:12:52 <quintopia> elliott: obviously. else it would be done already. for all i know, even the simple not-guaranteed-to-work version i envision is already AI-hard
09:13:01 <int-e> :a
09:13:05 <int-e> :k (->)
09:13:06 <lambdabot> * -> * -> *
09:13:31 <elliott> well, I think some such transformations are done in practice
09:13:32 <elliott> but it is hard
09:14:07 -!- zadock has quit (Read error: Connection reset by peer).
09:14:34 <rdococ> I need something to do
09:15:39 <quintopia> rdococ: learn steno
09:15:45 <rdococ> steno?
09:19:27 <f|`-`|f> steganography
09:19:39 <int-e> f|`-`|f: ...
09:19:41 <f|`-`|f> the art of hiding things in plain sight
09:19:55 <int-e> I'm sure that steno = stenography, a short script.
09:21:07 <f|`-`|f> steno -> short script
09:21:08 <int-e> But I guess you could say that the 'ga' was hidden in plain sight and you found it...
09:21:18 <f|`-`|f> stegano -> concealing messages in script
09:21:35 <f|`-`|f> I usually see people use steno in place of steganography
09:21:42 <oerjan> stenorphy
09:21:52 <elliott> oregano - a herb
09:21:57 <int-e> f|`-`|f: well, they shouldn't ;)
09:22:04 <elliott> stegosaurus - a dinosaur
09:22:38 <quintopia> rdococ do you have a nkro keyboard?
09:23:03 <rdococ> a qwerty keyboard
09:23:06 <oerjan> the steganosauri are still among us
09:23:26 <f|`-`|f> 2 bade mate
09:23:34 <rdococ> ??
09:23:39 <f|`-`|f> I also have Gregg Steno book around my desk
09:23:43 <f|`-`|f> Which is neat
09:23:52 -!- augur has quit (Ping timeout: 272 seconds).
09:24:30 -!- augur has joined.
09:24:53 -!- int-e has set topic: Stenosteganography | https://dl.dropboxusercontent.com/u/2023808/wisdom.pdf http://codu.org/logs/_esoteric/ http://tunes.org/~nef/logs/esoteric/.
09:25:20 <oerjan> int-e: i can understand that they don't want to allow unlifted types as type parameters, i just don't see why it should claim that the other match is a *
09:25:56 <int-e> oerjan: At this point I rather suspect that the defaulting of -> to * -> * -> * is somewhat overaggressive.
09:28:53 <f|`-`|f> it's an issue of kinds
09:28:56 <f|`-`|f> not types
09:29:10 <int-e> oerjan: for example, and this is pure speculation, if that happens whenever the solver sees a standalone (->), then a b c = Int# -> Int# would be decomposed into a :: k -> k1 -> k2 = (->) :: * -> * -> *, b :: k1 = Int# :: # and c :: k2 = Int# :: #...
09:29:24 <f|`-`|f> ...
09:29:26 -!- zadock has joined.
09:29:55 <f|`-`|f> so youare trying to figure out how to deal with kindedness
09:29:57 <oerjan> int-e: hm...
09:30:07 <f|`-`|f> not why -> has a kind of * -> * -> *
09:30:29 <oerjan> oh i know why the standalone (->) gets that kind.
09:30:59 <f|`-`|f> does it involve (a -> b) :: *
09:31:14 <oerjan> what i don't understand is how a function that is already of type Int# -> Int#, doesn't allow you to split out the (->) :: # -> # -> * that is already in there
09:31:16 <orin> bumpy jumpy
09:31:46 <f|`-`|f> because kinds are in terms of types, they aren't functions per se
09:31:53 <oerjan> gah headache
09:31:53 <int-e> oerjan: hence "overaggressive"
09:32:27 <f|`-`|f> I mean, not until you get to liquid of dependant types, but that is way ahead of my pay grade
09:32:38 <f|`-`|f> or* not of
09:34:32 <oerjan> int-e: oh i see what you mean, the * comes from (->) not from the b or c
09:35:22 <oerjan> a weird thing to do. also this worked:
09:35:51 <oerjan> > let f x = 2 :: Int where {3# = x}; p2 :: t b -> Proxy t; p2 _ = Proxy in typeRep (p2 f)
09:35:52 <lambdabot> (->) Int#
09:36:45 <oerjan> while it doesn't if you make the result of f unboxed
09:38:32 <oerjan> i cannot quite tell if this is a bug or an intended feature
09:39:08 -!- zadock has quit (Ping timeout: 245 seconds).
09:39:49 <oerjan> but if i try to replace a by Int# i get "Illegal unlifted type" instead.
09:40:02 <oerjan> so i suspect it's intended.
09:41:54 <oerjan> hm...
09:46:07 <elliott> f|`-`|f: I'm not sure this is relevant to what oerjan is talking about
09:46:23 <f|`-`|f> i noticed
09:46:23 <elliott> oerjan is talking about representations of types with Typeable
09:49:10 <int-e> oerjan: looking at a type-checking traces... found this bit: http://sprunge.us/JNUB
09:50:19 <oerjan> huh
09:50:35 <int-e> (Heh, plural. The thing is over 1000 lines... maybe that justifies this abuse of grammar.)
09:51:03 <int-e> oerjan: you do know about -ddump-tc-trace, right?
09:51:47 <oerjan> not specifically.
09:53:22 <oerjan> anyway, all of this makes it even less likely that there's a way to get Typeable confusion out of this.
10:02:45 <HackEgo> [wiki] [[Gibberish (programming language)]] M http://esolangs.org/w/index.php?diff=42588&oldid=42567 * Vriskanon * (+4) Made 'Turing-complete' a link to wiki.
10:04:14 <HackEgo> [wiki] [[Gibberish/JavaScript/HTML interpreter]] http://esolangs.org/w/index.php?diff=42589&oldid=42557 * Esowiki201529A * (+83) /* HTML code */
10:09:06 -!- Phantom_Hoover has joined.
10:18:27 <Melvar> ( Type
10:18:28 <idris-bot> Type : Type
10:20:12 -!- boily has joined.
10:25:01 <oerjan> aftlexarnoondre
10:25:36 <int-e> oerjan: Ok, I was right. http://sprunge.us/FLGU ... so when some t -> u (i.e. FunTy t u) gets decomposed into (->) [t, u], that's when the (->) gets a * -> * -> * constraint.
10:25:41 <boily> bsoren matsen!
10:26:49 <int-e> oerjan: To compensate for this, if the type checker unifies t -> u with t' -> u', it will not decompose, but unify t with t' and u with u' directly.
10:27:08 <oerjan> aha
10:27:35 <oerjan> huh i didn't know the change had to do with Arrows
10:27:38 <int-e> oerjan: and, as the comment says, (->) t y is not the same as t -> u. That bit is good to know.
10:28:26 <oerjan> boily: i do not know what you did there
10:29:12 <int-e> oerjan: I did not fully understand this either; obviously Arrow expects an argument of kind * -> * -> *, but I didn't see the problem with providing something more general (which could then be specialized)
10:29:15 <boily> oerjan: you used the other part of my name, so I went with what I remembered was yours. IMO, it doesn't fit well with French mornings.
10:29:40 <oerjan> i think you may have misremembered.
10:29:51 <oerjan> except for the -se
10:29:55 <oerjan> *-sen
10:30:22 <oerjan> oh you think i'm sørensen
10:30:26 <oerjan> WELL YOU'RE WRONG
10:30:41 -!- ProofTechnique has quit (Ping timeout: 252 seconds).
10:31:44 <boily> OKAY
10:32:42 <oerjan> int-e: oh i think the problem is the idea that the Arrow instance would have the same kind, but there's no reason that cannot be restricted to *
10:32:58 <quintopia> helloily
10:33:00 <quintopia> how morning
10:33:27 <quintopia> or should that be bon matily
10:34:40 <boily> bon matintopia!
10:34:56 <oerjan> int-e: i have the feeling the Arrow explanation doesn't hold water, then.
10:40:17 <oerjan> presumably they would have had to change the tcSplitTyConApp_maybe line to extract the kinds of arg and res, then.
10:40:36 -!- ProofTechnique has joined.
10:42:58 <int-e> oerjan: I can imagine that having several different funTyCon values around (same constructor, but different kinds) would get messy; especially when those kinds are ? and ??... (does ghc even know about these explicitly? judging by the definition of isSubOpenTypeKindKey in compiler/types/Kind.hs that doesn't seem to be the case anymore[4~))
10:44:13 <oerjan> i think they merged ? and ?? when they let unboxed tuples become arguments
10:45:17 <int-e> https://github.com/ghc/ghc/blob/d8d541d85defcf3bbbddaeee8cfac70b74f47ffc/compiler/types/Kind.hs#L190-L205
10:45:58 <int-e> note: okArrowArgKindCon = isSubOpenTypeKindCon and okArrowResultKindCon = isSubOpenTypeKindCon
10:46:43 <int-e> so hmm. openTypeKindTyConKey *mumble*
10:47:25 -!- ProofTechnique has quit (Ping timeout: 244 seconds).
10:49:08 <int-e> Ok, I'm lost. And I should do different stuff anyway.
10:49:12 <oerjan> they should clearly implement edward's method
10:49:19 <oerjan> *edwardk
10:49:37 <int-e> what's that? unsafeCoerce is ok unless the compiler can prove it's wrong?
10:50:18 <oerjan> no, from https://ghc.haskell.org/trac/ghc/ticket/9858#comment:89
10:50:21 -!- ProofTechnique has joined.
10:51:21 <int-e> oh that
10:51:34 <b_jonas> unsafeCoerce is unsafe
10:51:44 <oerjan> b_jonas: *GSAP*
10:51:57 <int-e> b_jonas: wait until you see reallyUnsafePointerEquality
10:52:19 <Jafet> @quote roconnor unsafeCoerce
10:52:19 <lambdabot> roconnor says: unsafeCoerce isn't even safe
10:52:20 <int-e> sorry, reallyUnsafePtrEquality#
10:52:33 <int-e> @quote int-e unsafeCoerce
10:52:33 <lambdabot> int-e says: What, unsafeCoerce# is kind-preserving? how boring :/
10:52:45 <b_jonas> lol
10:52:46 <int-e> (this predates polykinds)
10:53:09 <int-e> (it's still true, of course, but it's less funny now)
10:53:44 <int-e> @quote reallyUnsafePtrEquality
10:53:44 <lambdabot> No quotes match. My pet ferret can type better than you!
10:53:49 <int-e> pity :)
10:56:08 <int-e> oerjan: well, it sounds like a rather big change to me. so I wouldn't hold my breath
10:56:30 <b_jonas> hmm
10:56:56 <b_jonas> but why does Constraint come in here in first place?
10:57:06 <b_jonas> I can see why unboxed types have to be handled separately,
10:57:26 <int-e> I suppose that's because => is just another name for ->
10:57:29 <b_jonas> but why can't Constraint actually be an ordinary * typed value?
10:57:40 <b_jonas> int-e: yes, but can't it just _really_ be that?
10:57:49 <b_jonas> for the compiler internals that is, without lying to itself?
10:58:03 <b_jonas> what makes it necessary to handle it separately in some cases?
10:59:22 <int-e> ordinary values can be bottom; evidence never should be. so if anything, it'd have to be some unlifted thing ...
10:59:34 <b_jonas> int-e: what? why not?
10:59:50 <b_jonas> I mean, evidence can be lazy,
10:59:57 <b_jonas> so why can't it also be bottom?
11:00:19 <int-e> because you want to be able to erase it
11:00:40 <b_jonas> I mean especially if higher-rank types are involved
11:01:10 <b_jonas> but even without that
11:01:40 <b_jonas> int-e: I don't understand what you mean by "erase" there. doesn't "erase" usually just mean to pass around the evidence or type in runtime?
11:02:10 <oerjan> if Constraint and * weren't distinguished, you could write f :: (Ord a, Int) => Int and what would that mean
11:02:12 <b_jonas> (well, "erase" and "remove" and "delete" means way too many things, because we've ran out of synonyms everywhere, but still in this sense)
11:02:19 <int-e> coerce :: (a ~ b) => a -> b <-- no evidence is ever passed to coerce; the equality is satisfied by the caller.
11:02:43 <b_jonas> oerjan: it would mean a question-mark constraint probably, like (Ord a, ?a :: Int) =>
11:02:56 <oerjan> b_jonas: but under which name?
11:03:09 <int-e> This would become much harder when you make (a ~ b) "just another value".
11:03:47 <int-e> Also things of Constraint types is something the type checker can manufacture itself (looking up type classes, etc); it cannot produce arbitrary values.
11:04:22 <oerjan> b_jonas: but in that case, Ord a would _also_ mean ?a :: Ord a because the kind is the only thing distinguishing them
11:04:44 <int-e> There may not be a foundational reason for treating constraints as values (I don't know; since you can embed them in GADTs that suggests this is theoretically doable), but there are plenty of practical reasons to treat them specially.
11:04:47 <b_jonas> int-e: um, don't you still have to pass an evidence there, it's just of unit type so it's often optimzied otu or something?
11:05:11 <int-e> b_jonas: () has two values
11:05:26 <b_jonas> int-e: yes, and don't you still need two values for passing (a ~ b)?
11:05:34 <b_jonas> a bottom and a non-bottom
11:05:35 <int-e> b_jonas: you cannot erase that. that's what I meant when I wrote about "something unlifted".
11:05:54 <int-e> b_jonas: no. it's never passed; there is no undefined a ~ b value (except nontermination)
11:07:21 <b_jonas> int-e: yes, I'm talking about nontermination. you could have an existentially quantified value of type, say, (exists a b. (a ~ b) => (a, b)) that is so non-terminating it can't even prove the constraint
11:07:39 <oerjan> <int-e> oerjan: well, it sounds like a rather big change to me. so I wouldn't hold my breath <-- maybe goldfire could include it since he's already messing with all the kinds
11:07:44 <b_jonas> now actually passing the constraint might be optimized away because if the constraint is non-terminating then the value is also non-terminating
11:07:54 <b_jonas> but that's just an implementation detail
11:08:28 <int-e> b_jonas: but you don't have to *represent* nontermination. the caller still may have to do some work to produce the evidence (if the type-checker can't figure it out on the spot), but no value ever gets passed to coerce.
11:09:05 <b_jonas> hmm
11:09:08 <b_jonas> I dunno
11:09:26 <b_jonas> I probably have to trust the ghc people that this is so
11:09:49 -!- lleu has joined.
11:10:47 <b_jonas> did the original problem get solved, the problem where phantom kinds in a type did not get represented in the Typeable?
11:11:10 <b_jonas> at least I can now see why this new problem is related to that
11:11:23 <int-e> So I stick to what I said initially. a) evidence should be unlifted (so that trivial evidence like type equalities can be erased; clearly class dictionaries are a different matter...), and b) it's good for the type-checker to know where to look for opportunities for manufacturing its own evidence.
11:11:44 <b_jonas> ok, I think you use "erase" in a different sense than I thought
11:11:58 <oerjan> b_jonas: that's solved yes, then we found another problem which is now also solved
11:12:02 <int-e> Now if you were writing a type theory based theorem prover ... I'd change my opinion and claim the opposite.
11:12:12 -!- Sprocklem has quit (Ping timeout: 250 seconds).
11:12:39 <b_jonas> int-e: can't the trivial evidence be just optimized out later, when generating the machine code?
11:12:54 <int-e> b_jonas: "erasure" refers to values that clearly exist on the System Fc/whatever level, but have no runtime representation.
11:13:06 <int-e> b_jonas: Only if it's never bottom.
11:13:17 <int-e> b_jonas: where "bottom" means a non-terminating, undefined value
11:13:29 <int-e> which *operationally* makes a huge difference.
11:14:10 <b_jonas> int-e: right, that's a different use of "erasure"
11:14:14 -!- Sprocklem has joined.
11:14:25 <int-e> (I really should talk about a different domain, where nontermination and undefined are distinct values.)
11:15:33 <oerjan> f :: ('True ~ 'False) => a; f = launchMissiles
11:15:54 <int-e> note that ghc's unboxed types have the same quality: you can write expressions like let x = 1# + x in ...; despite being unboxed, it's still bottom. but there are no (terminating) undefined values.
11:16:26 <int-e> s/\.\.\./x/
11:16:36 <b_jonas> int-e: what do you mean by a terminating undefined value, for other types? one that throws a runtime exception?
11:16:40 <Melvar> ( :let f : (Ord a, Int) => Int; f = %instance
11:16:40 <idris-bot> defined
11:16:49 <Melvar> oerjan: ↑
11:17:03 <b_jonas> or one that has some side effect when evaluating, but never gets to the point of returning?
11:17:37 <oerjan> > let x = 1# + x in x
11:17:38 <lambdabot> Couldn't match kind ‘*’ with ‘#’
11:17:39 <lambdabot> When matching types
11:17:39 <lambdabot> a1 :: *
11:17:45 <oerjan> int-e: NOPE
11:18:19 <oerjan> (i saw in the manual earlier that recursive definitions of unboxed variables isn't allowed)
11:18:26 <oerjan> oh hm
11:18:49 <oerjan> that may be just because + doesn't apply to Int#s
11:19:09 <b_jonas> > let x = 1# +# x in x
11:19:10 <lambdabot> Not in scope: ‘+#’
11:19:10 <lambdabot> Perhaps you meant one of these:
11:19:11 <lambdabot> ‘++’ (imported from Data.List), ‘+’ (imported from Prelude),
11:19:27 -!- boily has quit (Quit: PROEMINENT CHICKEN).
11:19:30 <oerjan> Prelude Data.Typeable GHC.Exts> let x = 1# +# x in x
11:19:30 <oerjan> <interactive>:42:5: Recursive bindings for unlifted types aren't allowed: x = 1# +# x
11:20:45 <b_jonas> is "unlifted types" the same as "unboxed types"?
11:21:07 <oerjan> Melvar: i don't think idris has coherent instances so it doesn't really apply
11:21:17 <Melvar> Correct.
11:22:29 <oerjan> b_jonas: not exactly. unlifted means "no thunk", unboxed means "no pointer"
11:22:46 <mroman> Make sure that when you use the <pre> and <code> tags, you use the unicode variants for the opening and closing tags: &lt; and &gt;.
11:22:49 <mroman> what
11:22:51 <oerjan> there are unlifted arrays that still use pointers to heap
11:22:51 <mroman> &lt; isn't unicode
11:23:14 <oerjan> mroman: BRAAAAINS
11:23:19 <Melvar> oerjan: Also:
11:23:22 <Melvar> ( :t mkShow
11:23:22 <idris-bot> BotPrelude.mkShow : (a -> String) -> Show a
11:23:23 <mroman> oerjan: ?
11:23:29 <b_jonas> oerjan: I see
11:23:39 <oerjan> mroman: well that guy obviously isn't using theirs
11:24:00 <mroman> That's taken from a bootstrap how-to website :)
11:24:10 <oerjan> b_jonas: mainly because they're too big to keep in registers/stack
11:24:19 -!- edirc has quit (Excess Flood).
11:24:27 <oerjan> afaiu from what i read this morning
11:24:37 <b_jonas> right
11:24:54 <Jafet> `unicode &lt;
11:24:55 <HackEgo> No output.
11:25:43 <oerjan> Melvar: AAAAAAAAAAAAAAAAA
11:26:24 <Melvar> oerjan: ∀∀∀∀∀∀∀∀∀∀∀∀∀∀∀∀∀
11:26:31 <int-e> oerjan: ok, some actual loop then. let f :: () -> Int#; f x = f x in I# (f ())
11:26:33 <oerjan> mroman: presumably the distinction between unlifted and unboxed only makes sense for a non-strict language.
11:26:57 <oerjan> or hm
11:27:13 <oerjan> strict languages have no values that are lifted.
11:27:56 <Melvar> Except for those of type Lazy' t a .
11:27:57 <int-e> oerjan: Anyway, fun insight: The Scott topology that we so often use to discuss Haskell semantics cannot distinguish between Int and Int# (the two types are isomorphic; note that I# is strict.)
11:28:00 <oerjan> int-e: right, results that never return are allowed.
11:29:06 <b_jonas> fungot, what do you think would be the best fix for these Typeable problems?
11:29:07 <fungot> b_jonas: t-rex, i left a party early to go have a bath, and there i don't feel like i look down and notice you're not there cannot help but to fade a bit! i meant real emails.
11:30:14 <oerjan> int-e: hm
11:30:40 <int-e> b_jonas: yes, a terminating undefined value is something like `undefined` or `error "foo"`.
11:30:43 <oerjan> oops
11:30:52 <oerjan> b_jonas: oops that was to you not mroman
11:31:12 <b_jonas> int-e: ok
11:31:53 <oerjan> fungot: i agree, it would be nice if ghc trac's Cc: worked properly
11:31:53 <fungot> oerjan: people have worried! the fact, you were like, " hey, i wonder if i've become one
11:31:57 <FireFly> ( :t Show
11:31:57 <idris-bot> Prelude.Show : Type -> Type
11:32:05 <FireFly> Makes sense
11:32:49 <Melvar> I sometimes feel like Idris’ typeclasses currently have the wrong amount of magic.
11:32:58 <HackEgo> [wiki] [[Language list]] M http://esolangs.org/w/index.php?diff=42590&oldid=42568 * Vriskanon * (+8) /* Non-alphabetic */ Added 4
11:33:00 <HackEgo> [wiki] [[4]] N http://esolangs.org/w/index.php?oldid=42591 * Vriskanon * (+117) Created stub. Will develop later.
11:33:19 <oerjan> :t error
11:33:20 <lambdabot> [Char] -> a
11:33:40 <oerjan> that a is not *, but OpenKind iirc
11:34:03 <int-e> it's not.
11:34:05 <oerjan> just so it can be used with unlifted types
11:34:21 <Melvar> That is, they should either be more magical like Haskell’s, perhaps with coherence, or they should be less magical to be more flexible.
11:34:34 <int-e> > let a :: Int#; !a = error "foo" in ()
11:34:35 <lambdabot> Not in scope: type constructor or class ‘Int#’
11:34:36 <lambdabot> Perhaps you meant one of these:
11:34:36 <lambdabot> ‘Int’ (imported from Data.Int), ‘Int8’ (imported from Data.Int)
11:34:38 <Melvar> I’m kinda favoring the latter at the moment.
11:34:45 <int-e> huh
11:34:54 <FireFly> Melvar: how are they currently magical?
11:34:55 <int-e> oerjan: sorry, you're right... very interesting.
11:35:46 <oerjan> int-e: which means that let e = error does not make e equivalent to error
11:36:11 <oerjan> or hm
11:36:19 <FireFly> That sounds scary.
11:36:43 <FireFly> Somehow it reminds me of JS's `eval`, which changes behaviour if you alias it and invoke the alias
11:36:46 <oerjan> > let !a = error "foo" where 3# = a in ()
11:36:47 <lambdabot> Recursive bindings for unlifted types aren't allowed:
11:36:48 <lambdabot> !a
11:36:48 <lambdabot> = error "foo"
11:36:53 <oerjan> bah
11:37:30 <oerjan> hm does that mean
11:37:43 <oerjan> > let 3# = error "foo" in ()
11:37:44 <lambdabot> *Exception: foo
11:37:49 <oerjan> huh it does
11:38:10 <FireFly> So because 3# is strict, the error is evaluated immediately?
11:38:15 <oerjan> > let 3# = e "foo"; e = error in ()
11:38:16 <lambdabot> Couldn't match kind ‘*’ with ‘#’
11:38:16 <lambdabot> When matching types
11:38:17 <lambdabot> a0 :: *
11:38:22 <FireFly> well, when binding 3#
11:38:24 <oerjan> there you go
11:38:31 <oerjan> FireFly: yeah so it seems
11:39:24 <FireFly> > let !a = e "foo"; e = error in ()
11:39:26 <lambdabot> *Exception: foo
11:39:50 <Melvar> FireFly: Well, declared instances are available for the search to find alongside local variables, and values of declared classes can only be constructed through an instance declaration. Constraints kick off the search.
11:40:31 <int-e> Ok, operationally there's no problem here; error just traverses the stack, executing various updated frames (which only point to boxed things), until it reaches a catch frame, where it stops.
11:40:55 <b_jonas> what does (let 3# = error "foo" in ()) even mean? how can 3# be a pattern? isn't it a literal?
11:41:06 <b_jonas> oh
11:41:23 <b_jonas> maybe there are numeric rules that make it check equality when you use it as a pattern
11:41:33 <oerjan> b_jonas: literals have always been patterns
11:41:46 <oerjan> otherwise, how would fac 0 = 1 work
11:41:47 <b_jonas> oerjan: right, there's specific rules for them
11:41:50 <b_jonas> to check equality
11:41:52 <b_jonas> ok
11:41:57 <int-e> b_jonas: we're outside of Haskell2010 territory anyway. ghc implements patterns for unboxed ints.
11:42:03 <FireFly> Well, a literal is a data constructor
11:42:10 <Melvar> FireFly: (mkShow does not circumvent the second limitation; it uses a single named instance as glue.)
11:42:15 <int-e> n#-patterns, if you well
11:42:16 <oerjan> FireFly: not in theory
11:42:18 <int-e> will
11:42:19 <b_jonas> FireFly: nah, not a numeric literal, no
11:42:25 <FireFly> Oh hm, okay
11:42:27 <oerjan> :t 1
11:42:28 <lambdabot> Num a => a
11:42:34 <FireFly> Right, true
11:43:08 <oerjan> :t \x -> let 3 = x in x
11:43:09 <lambdabot> (Eq a, Num a) => a -> a
11:43:21 <FireFly> Melvar: hm, I don't think I know enough about Idris to understand that properly, but thanks anyway
11:43:31 * FireFly should learn Idris
11:43:34 <Jafet> > let f 1.0 = () in f 1.0
11:43:36 <lambdabot> ()
11:43:46 <Jafet> Why the fuck
11:44:13 <Jafet> > let f 1.0 = () in f (1.0 + 1e-15)
11:44:14 <lambdabot> *Exception: <interactive>:3:5-14: Non-exhaustive patterns in function f
11:45:04 <Melvar> > let f : Rational -> (); f 1 = () in f 1
11:45:06 <lambdabot> <hint>:1:18: parse error on input ‘->’
11:45:13 <Melvar> > let f :: Rational -> (); f 1 = () in f 1
11:45:15 <lambdabot> ()
11:45:46 <Jafet> > let f (1%3) = () in f (1%3)
11:45:47 <lambdabot> <hint>:1:8: Parse error in pattern: 1 % 3
11:46:01 <Jafet> > let f ((==1%3) -> True) = () in f (1%3)
11:46:03 <lambdabot> ()
11:46:23 <Jafet> Priorities
11:46:53 <Melvar> Do numerical literal patterns turn into use of (==)?
11:47:03 <b_jonas> Melvar: yes
11:47:06 <oerjan> they _removed_ n+k patterns, they're not going to add %
11:47:43 <b_jonas> Melvar: and numeric literals as either patterns or values turn to a use of FromInteger or FromRational I think
11:48:02 <oerjan> b_jonas: uncapitalized
11:48:12 <b_jonas> oh right
11:48:17 <b_jonas> fromInteger or fromRational
11:48:28 <Melvar> I was only unclear on the semantics of the patterns.
11:48:33 <int-e> oerjan: Hmm, so the distinguishing feature of unlifted types is not that they can't be bottom, but that a function cannot be lazy in an unlifted type argument. Fun.
11:49:21 <mroman> what the fuck is let f ((==1%3) = () in f (1%3)
11:49:23 <oerjan> int-e: erm... OKAY
11:49:30 <Jafet> I hope nobody actually uses floating point patterns
11:49:45 <mroman> > 1 % 3
11:49:46 <lambdabot> 1 % 3
11:49:48 <int-e> oerjan: sorry, I'm having an epiphany here.
11:49:53 <mroman> @type (%)
11:49:54 <lambdabot> Integral a => a -> a -> Ratio a
11:50:02 <Jafet> (The only reasonable uses for those would be matching Infinity or NaN, but neither of those can be achieved.)
11:50:05 <Jafet> > 2 % 6
11:50:05 <oerjan> mroman: ((==1%3) -> True) is a view pattern
11:50:06 <lambdabot> 1 % 3
11:50:12 <mroman> ah.
11:50:17 <mroman> I haven't looked at recent extensions.
11:50:32 <oerjan> it's not _that_ recent >:)
11:50:45 <mroman> Maybe not in haskell terms :D
11:50:58 <Melvar> @let (∶) = (%)
11:51:00 <lambdabot> Defined.
11:51:12 <int-e> oerjan: (The distinction is so very subtle.)
11:51:39 <Melvar> @type 1∶10000
11:51:40 <lambdabot> Integral a => Ratio a
11:51:47 <Jafet> @let (÷) = (%)
11:51:49 <lambdabot> Defined.
11:52:03 <oerjan> <Jafet> I hope nobody actually uses floating point patterns <-- well you could use them Rationals if you wanted
11:52:06 <Melvar> Jafet: I picked RATIO there on purpose.
11:52:45 <int-e> > let f 0 i = i; f x i = f (x/2) (i+1) in f 1 0
11:52:47 <lambdabot> 1075
11:52:53 <oerjan> *+for
11:52:55 <Jafet> But it looks like a constructor. Imagine the confusion that would sow.
11:53:04 <b_jonas> do we have foo=>bar view patterns too now
11:53:05 <b_jonas> ?
11:53:14 <b_jonas> you know, the ones involving a Maybe
11:53:27 <b_jonas> meh, never mind
11:53:35 <b_jonas> haskell syntax extensions in ghc are screwed up anyway
11:53:38 <b_jonas> I don't like them
11:54:14 <Jafet> Not even the list comprehension SQL extensions?
11:54:17 <oerjan> they sacked the syntax czar too early
11:54:23 <Jafet> (... "paging zzo")
11:54:29 * oerjan swats Jafet -----###
11:55:09 * int-e is silently hoping for an sqlite-based Haskell compiler.
11:55:18 <Melvar> Jafet: Would full monad comprehensions suffice?
11:55:43 <oerjan> Melvar: i think those two extensions are compatible
11:55:56 <oerjan> as in, there are classes for the SQL things
11:56:33 <Jafet> > (-----###)
11:56:35 <lambdabot> Not in scope: ‘-----###’
11:57:50 <Melvar> (In Idris, comprehensions of course turn into >>= and guard so you can once again do whatever you want. >ω>)
11:57:50 <oerjan> with the weakening of the distinction between values/types/kinds, the type notation is so screwed up
11:58:22 <mroman> "Bootstrap's global default font-size is 14px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px by default)."
11:58:33 <mroman> why would they choose a pixel sized font-size :(
11:59:38 <Jafet> 0.014 imperial cubits
12:03:25 <Melvar> Apparently the cubit is the latin equivalent of the ell.
12:09:09 <mroman> It's surprising americans actually use hours, seconds and minutes
12:09:11 <mroman> and not something else
12:09:16 <mroman> like ticks and tocks
12:09:16 -!- hjulle has joined.
12:09:18 <b_jonas> thi sis surreal, I'm sitting in an office with a rabbit stuffed toy, and talking nonsense about the ghc type system that I don't understand
12:09:29 <b_jonas> who's have thought my life would get to this?
12:09:37 <mroman> where a tick is 0.978 seconds and a tock is 53 ticks
12:12:15 <FireFly> Hm
12:15:02 <int-e> mroman: px are not physical pixels.
12:15:23 <oerjan> mroman: that's because hours, seconds and minutes predate the metric system hth
12:16:53 <b_jonas> yeah
12:17:03 <b_jonas> but days and weeks are are even older
12:19:05 <b_jonas> I can't type "vocabulary". I keep trying to type "covabulary" instead
12:19:58 <int-e> Funny, I once saw a beamer that (apparently, it's the only explanation I have) reported its physical resolution, which made pt-based fonts (which, also apparently, the login manager used...) ridiculously small.
12:21:20 <int-e> (it would be about 30 dpi)
12:23:20 <int-e> mroman: do you know about https://en.wikipedia.org/wiki/French_Republican_Calendar ? It didn't catch on...
12:23:53 <FireFly> There's also Swatch time
12:24:07 <int-e> (I suspect that a big factor in this was that nobody liked having their birthday on quartidi every year.)
12:24:25 <int-e> (I'm kidding.)
12:35:20 -!- tellybot has joined.
12:36:05 -!- tellybot has left.
12:42:41 <mroman> int-e: yeah but it overwrites my default browser font-size
12:45:11 <mroman> but a year has ~365 day
12:45:35 <mroman> what did they do with those 5 days at the end?
12:46:31 <int-e> https://en.wikipedia.org/wiki/French_Republican_Calendar#Complementary_days
12:46:46 <Phantom_Hoover> didn't they have a holiday or something
12:50:36 <mroman> You should be using internet time anyway
12:50:40 <mroman> currently we have 577 beats.
12:50:53 <mroman> it's @577 to be precise.
12:51:27 <b_jonas> `perl -eprint time
12:51:33 <HackEgo> 1429275159
12:51:36 <b_jonas> `date +%s
12:51:37 <HackEgo> 1429275164
12:52:12 <int-e> mroman: oh you were not saying that they should've used pt instead...
12:54:17 <HackEgo> [wiki] [[4]] http://esolangs.org/w/index.php?diff=42592&oldid=42591 * Vriskanon * (+3145) Added summary, table of functions, formatting (check for correct wiki formatting?) and basic example code.
13:00:39 -!- ProofTechnique has quit (Quit: ZNC - http://znc.in).
13:11:28 <nortti> idea: there are an unbounded number of memory cells, numbered from 1 onwards. you can move between them using the operations 2n, (n-1)/3, and collatz function
13:12:13 <HackEgo> [wiki] [[4]] M http://esolangs.org/w/index.php?diff=42593&oldid=42592 * Vriskanon * (+172) /* Sample codes */ Added Hello World program
13:13:34 <oerjan> well that gives you at least a one-sided tape on powers of 2
13:14:41 <oerjan> in fact an infinite number, although moving between them is more awkward.
13:15:07 -!- Phantom_Hoover has quit (Remote host closed the connection).
13:15:40 <nortti> hmm, actually, should one be allowed to go to 4 from 13? because if yes, you do (n-1)/3, then collatz, and end in someplace completely different
13:15:48 <nortti> and also, it would no longer be a tree
13:16:12 <oerjan> oh hm
13:16:35 <int-e> so just stick to powers of two
13:16:44 <HackEgo> [wiki] [[Language list]] M http://esolangs.org/w/index.php?diff=42594&oldid=42590 * Vriskanon * (-16) /* D */ Removed Daft Punk - Have given up on the project
13:16:47 <oerjan> (n-1)/3 only if you end up at an odd number, naturally
13:17:39 <HackEgo> [wiki] [[Daft Punk]] http://esolangs.org/w/index.php?diff=42595&oldid=42234 * Vriskanon * (-317) Removed all text - please delete the page (project given up)
13:18:09 <int-e> Alternatively, make a competition: limit n to 2^16, and write programs that can reverse strings up to some length M; the person with the best M/sqrt(program size) ratio wins.
13:18:27 <int-e> (not sure what the scoring formula should be)
13:19:11 <HackEgo> [wiki] [[Special:Log/delete]] delete * Oerjan * deleted "[[Daft Punk]]": Author request: content was: "{{stub}}" (and the only contributor was "[[Special:Contributions/Vriskanon|Vriskanon]]")
13:19:12 <Jafet> Can that simulate a RAM with logarithmic overhead?
13:27:20 -!- ProofTechnique has joined.
13:29:00 -!- Patashu has quit (Ping timeout: 256 seconds).
13:33:33 -!- oerjan has quit (Quit: leaving).
13:35:25 <HackEgo> [wiki] [[User:Vriskanon]] M http://esolangs.org/w/index.php?diff=42596&oldid=42266 * Vriskanon * (+10) /* Vriskanon */ Added credit for 4
13:41:01 -!- Sprocklem has quit (Ping timeout: 244 seconds).
13:43:21 -!- Phantom_Hoover has joined.
13:55:20 <Taneb> There are going to be 2 new IWC comics A WEEK
13:55:23 <Taneb> Aaaaaah
13:56:12 <nortti> IWC?
13:56:19 <b_jonas> nortti: http://www.irregularwebcomic.net/
13:56:34 <nortti> ah
14:06:28 -!- `^_^v has joined.
14:12:57 <mroman> fungot: Good evening.
14:12:57 <fungot> mroman: so, hey, it was our table! if he's interested, he'll push it back to your side. the salt shaker over to their side, this means that, for all intents and purposes
14:13:23 <int-e> fungot: what a cliffhanger...
14:13:24 <fungot> int-e: in a good story, they function in an undiagnosable way?
14:13:33 <int-e> fungot: spot on
14:13:33 <fungot> int-e: so! i intend to do today! we can't hang up the phone to talk to a t-rex... nostalgia, doesn't that make them equally valid?!
14:13:50 <int-e> wth
14:14:24 <int-e> But I still want to know what pushing the salt shaker over to their side means :-/
14:14:47 <int-e> Etiquette is hard.
14:16:07 -!- adu has joined.
14:28:02 -!- MDream has changed nick to MDude.
14:28:10 <HackEgo> [wiki] [[Element]] http://esolangs.org/w/index.php?diff=42597&oldid=40776 * 63.232.95.4 * (-1) /* Documentation */ minor typo fixes
14:28:56 -!- Phantom_Hoover has quit (Ping timeout: 246 seconds).
14:29:21 <HackEgo> [wiki] [[Special:Log/newusers]] create * Phi * New user account
14:31:47 <mroman> We can't hang up the phone to do that, indeed.
14:33:42 <b_jonas> int-e: probably he wanted to show a trick with the salt shaker, like Reg from ''Dirk Gently'' did
14:33:50 <HackEgo> [wiki] [[Element]] http://esolangs.org/w/index.php?diff=42598&oldid=42597 * Phi * (+1492) Updated documentation
14:34:21 <int-e> b_jonas: good idea (great trick, too.)
14:35:03 <mroman> fungot: What does the shalt shaker mean?
14:35:03 <fungot> mroman: and so: " probably not!"
14:35:09 <mroman> :(
14:36:24 <int-e> fungot: what can you tell us about electric monks?
14:36:24 <fungot> int-e: dromiceiomimus, i have a great idea, dromiceiomimus: stories for women! stories with " and in april, your ' i got it'" letters forever
14:36:47 <int-e> fungot: can we try that again?
14:36:47 <fungot> int-e: i i guess!
14:36:52 <int-e> fungot: go ahead then
14:36:52 <fungot> int-e: as a man concerned, t-rex, that going shopping was your default activity? by this i mean, t-rex?
14:37:56 <mroman> fungot: I like shopping.
14:37:56 <fungot> mroman: i've never been to the bottom of a bottle. doctor: as a male, i can be one of those people are going to think you're a pedophile, and he's on a friggin' universe. and then there'll be a day shortly afterwards when we can simulate universe on our cell, because there'd have been no controversy.
14:38:07 <int-e> b_jonas: Oh, and for some reason the phrase "horses were so cheap to make" stuck to my mind.
14:38:39 <b_jonas> int-e: where's that phrase from?
14:38:42 <mroman> fungot: That doctor sounds weird.
14:38:43 <fungot> mroman: but t-rex, you can't play the game optimally! and assuming that in a man... or a woman, dromiceiomimus
14:38:43 <int-e> b_jonas: same book
14:39:03 <int-e> b_jonas: they allowed the [electric monk] to keep his horse though, because horses were so cheap to make
14:39:04 <b_jonas> I'll have to re-read that book. it's been a lot of time.
14:39:55 <b_jonas> s/lot of/long/
14:49:36 -!- Sprocklem has joined.
14:53:40 <HackEgo> [wiki] [[Element]] http://esolangs.org/w/index.php?diff=42599&oldid=42598 * Phi * (+1284)
14:57:21 -!- Phantom_Hoover has joined.
15:04:14 -!- hjulle has quit (Ping timeout: 265 seconds).
15:11:02 <FireFly> <Taneb> There are going to be 2 new IWC comics A WEEK ← sounds rather regular
15:12:05 <b_jonas> FireFly: from http://www.irregularwebcomic.net/special/faq.html "But so far this comic has been more regular than many webcomics that actually claim to be updated regularly!"
15:13:32 -!- S1 has joined.
15:17:02 <b_jonas> hehe, http://www.savagechickens.com/2015/04/stomping.html totally looks like qwantz
15:39:15 -!- S1 has quit (Quit: S1).
15:44:58 -!- SopaXorzTaker has joined.
15:48:07 <HackEgo> [wiki] [[4]] http://esolangs.org/w/index.php?diff=42600&oldid=42593 * SuperJedi224 * (+10)
15:49:42 -!- GeekDude has joined.
15:52:13 -!- ProofTechnique has quit (Ping timeout: 256 seconds).
16:01:58 -!- ProofTechnique has joined.
16:02:10 -!- adu has quit (Quit: adu).
16:03:35 <HackEgo> [wiki] [[Turing tarpit]] http://esolangs.org/w/index.php?diff=42601&oldid=30149 * 162.247.72.213 * (+1) Spelling fix
16:05:15 -!- variable has joined.
16:07:48 -!- variable has quit (Client Quit).
16:10:38 -!- variable has joined.
16:12:20 -!- MDude has quit (Ping timeout: 245 seconds).
16:18:37 -!- GeekDude has quit (Ping timeout: 244 seconds).
16:18:41 -!- bb010g has quit (Quit: Connection closed for inactivity).
16:20:57 -!- GeekDude has joined.
16:21:30 <ProofTechnique> I love the docs for booktabs
16:23:06 <shachaf> `olist 980
16:23:07 <HackEgo> olist 980: shachaf oerjan Sgeo FireFly boily nortti
16:25:33 -!- zzo38 has joined.
16:52:35 <zzo38> When opening a ZIP archive I will first list the files in the archive before extracting it
17:12:16 -!- nszceta has joined.
17:14:00 * Taneb hello
17:17:19 -!- variable has quit (Quit: 1 found in /dev/zero).
17:17:59 <tromp> ni hao
17:19:01 -!- variable has joined.
17:21:26 <rdococ> hi
17:26:41 -!- atrapado has joined.
17:30:51 <zzo38> O, hello, OK
17:31:36 -!- Guest75683 has changed nick to Gregor.
17:33:29 -!- SopaXorzTaker has quit (Read error: Connection reset by peer).
17:37:46 -!- Sprocklem has quit (Ping timeout: 264 seconds).
17:39:27 -!- variable has quit (Quit: 1 found in /dev/zero).
17:41:34 -!- atehwa_ has changed nick to atehwa.
17:42:52 -!- variable has joined.
18:13:23 -!- nszceta has quit (Quit: My Mac has gone to sleep. ZZZzzz…).
18:42:47 -!- Sprocklem has joined.
19:01:49 -!- ProofTechnique has quit (Remote host closed the connection).
19:07:05 -!- ProofTechnique has joined.
19:11:09 -!- ais523 has joined.
19:13:09 -!- atrapado has quit (Ping timeout: 265 seconds).
19:24:55 -!- rodgort has quit (Ping timeout: 272 seconds).
19:31:08 -!- rodgort has joined.
19:37:25 <olsner> @messages
19:46:47 -!- ais523 has quit (Remote host closed the connection).
19:46:53 -!- callforjudgement has joined.
19:46:59 -!- callforjudgement has quit (Changing host).
19:46:59 -!- callforjudgement has joined.
19:51:19 -!- bb010g has joined.
19:51:30 -!- variable has quit (Quit: 1 found in /dev/zero).
19:51:58 -!- variable has joined.
19:52:38 -!- callforjudgement has changed nick to ais523.
19:53:04 <ais523> so, my yacc implementation has now reached the point where, if everything works out correctly, it can successfully parse something
19:53:14 <ais523> i.e. far from 100% functionality, but a sufficient percentage that it works sometimes
19:53:18 <ais523> this is quite the milestone
19:53:53 -!- Phantom__Hoover has joined.
19:54:45 -!- Phantom_Hoover has quit (Ping timeout: 256 seconds).
19:54:54 -!- callforjudgement has joined.
19:55:00 <ais523> also, I found a place where Bison violates the letter of the POSIX spec, because POSIX is asking for something unreasonable
19:55:02 -!- ais523 has quit.
19:55:21 <callforjudgement> here: http://nethack4.org/pastebin/default-yyclearin.y
19:55:28 <callforjudgement> also, looks like I arrived in time to see the last message I sent
19:55:36 <callforjudgement> which, as usual, makes no sense
19:55:37 -!- callforjudgement has changed nick to ais523.
19:55:51 <pikhq> What was so unreasonable about the POSIX spec?
19:56:05 <ais523> it doesn't limit the situations in which yyclearin can be called
19:56:17 <ais523> which allows you to retroactively invalidate any sort of optimization that the yacc impl might have made
19:57:22 <ais523> you can try that example in Bison (or ayacc, it comes to the same thing, default config in both cases)
19:58:00 <b_jonas> let me look up what that means
19:58:21 <ais523> this means I have to do stupid things, like checking to see if the lookahead character has a particular value to know to run a particular reduction, then checking it again to make sure it hasn't changed
19:58:27 <ais523> which are likely to really slow down parsing
19:58:28 -!- rdococ has quit (Quit: Page closed).
19:58:39 <ais523> I'm on the point of just grepping for "yyclearin" in the user's actions and optimizing if I don't see it
19:58:39 <pikhq> When is a lookahead token read, exactly?
19:58:49 <ais523> whenever it's needed to determine between two possible parses
19:59:04 <pikhq> "If the current lookahead token has not yet been read, yyclearin shall have no effect."
19:59:27 <ais523> in the example I pasted, it's as clear as possible that that's happening
19:59:44 <ais523> because you clearly can't distinguish an x from a y without reading the x_indicator or y_indicator
19:59:49 <b_jonas> pikhq: it's a token that hasn't been shifted yet. the lr parser works in a way that it can apply a grammar rule reducing symbols only if the last symbol that's already been shifted is part of that, it can't reduce "below" the last shifted symbol
19:59:56 <b_jonas> (dunno if that makes sense)
20:00:45 <b_jonas> ais523: what if you just make yyclearin a macro that always gives a compile error saying that feature is unsupported if you try to use it?
20:00:48 <b_jonas> :-)
20:00:58 <ais523> b_jonas: I'm trying to be POSIX-compatible even when it makes no sense
20:01:04 <b_jonas> also, why do they put these kinds of things in POSIX?
20:01:06 <ais523> just look at the location of the comment in that example :-)
20:01:24 <b_jonas> these seem like historical artifacts that were added because they were easy to implement in one particular yacc implementation
20:01:28 <b_jonas> and then they got stuck
20:01:32 <ais523> another fun bit is that the POSIX spec mentions that yychar is renamed by -p, but doesn't define any job for it to do
20:01:47 <b_jonas> argh stupid historical cruft we're carrying
20:01:48 <ais523> so I just didn't implement it
20:02:19 <ais523> yyclearin is very easy to implement in almost any yacc implementation, it just invalidates pretty much any optimization you might think of that involves reductions
20:03:18 <ais523> and it makes sense to put it in an error recovery rule
20:03:18 <pikhq> Now that's real interesting. :)
20:03:36 <ais523> I just can't think of a different sensible place to put it, IMO it'd be confined to error recovery only
20:03:37 <b_jonas> wait, yychar is a _variable_, writable?
20:03:42 <b_jonas> that makes no sense
20:03:46 <ais523> in Bison, it is
20:03:48 <b_jonas> how would that not break the states?
20:03:50 <ais523> global variable
20:03:52 <b_jonas> as in, the parser states?
20:04:03 <pikhq> It looks like traditionally it contains the lookahead token.
20:04:05 <b_jonas> can you just write anythign in it?
20:04:17 <ais523> and the reason (probably the only reason) it works is that Bison verifies tokens for syntaxiness on shift, not on reduce
20:04:18 <pikhq> b_jonas: Doing so probably invokes UB.
20:04:51 <pikhq> Most of the state in traditional yacc is mutable global state that a yacc program isn't permitted to touch.
20:05:11 <b_jonas> this is crazy stuff I didn't want to see or know about
20:05:16 <b_jonas> I'll have to try to unsee it hard now
20:05:18 <ais523> according to Bison you can just change yychar when you want
20:05:27 <pikhq> Because yacc straight-up compiles to C code that just mutates all that state.
20:05:50 <pikhq> (yacc is *not* designed for, say, reentrant use. :))
20:05:54 <b_jonas> people back then didn't understand encapsulation
20:06:10 <pikhq> Yes, it was designed to compile compilers.
20:06:13 <pikhq> And that's about it.
20:06:28 <ais523> pikhq: the way I'm handling this in ayacc is, it has an entry point yyparse_symbol that takes yylex as an argument
20:06:36 <pikhq> It is *entirely* suitable for the task of, say, writing a simple C compiler.
20:06:51 <ais523> and then yyparse is a wrapper around that, which gives it a wrapper around yylex as an argument
20:07:57 <ais523> the only problem with doing this is that yylex has to /exist/ even if you use the sensible API (although it won't be called)
20:08:06 <pikhq> ais523: Ah, spiffy. So essentially none of it assumes that the state is global, it just so happens that when used in a purely POSIX fashion it behaves that way.
20:08:17 <ais523> yep
20:08:33 <ais523> I'm glad yychar isn't /necessarily/ a global because otherwise I couldn't keep it in sync with yylval
20:08:36 <ais523> (which is necessarily a global)
20:09:13 <b_jonas> ais523: and is each parser re-entrant so you can start multiple instances? if so, is there a defined api for how to break out of one cleaning up all the memory it's allocated?
20:09:21 <pikhq> Done anything with lex, or is flex "good enough" for you? :)
20:09:39 <b_jonas> oh, new OOTS this evening
20:10:03 <ais523> b_jonas: yes to the first; for the second, I don't have destructors or the like, but in a language which has exceptions, if you use exception-safe code it should work
20:10:33 <pikhq> So you essentially just have to be aware that it's C.
20:11:11 <pikhq> Mind me asking why you started working on ayacc?
20:11:19 <ais523> because I couldn't find a decent yacc impl for Windows
20:11:32 <b_jonas> hmm, how'd she get the knife back? I'll have to read back
20:11:42 <pikhq> Hum. Does ayacc work on not-Windows?
20:11:48 <ais523> that's where I'm testing it
20:11:54 <ais523> I haven't tried it on Windows yet
20:11:58 <pikhq> Ah. Wonderful.
20:12:02 <b_jonas> ais523: do you mean it is guaranteed to allocate memory only on the stack, as in, it won't call malloc?
20:12:04 <ais523> but I'm not doing anything unportable yet
20:12:14 <ais523> b_jonas: right, no malloc anywhere (unless you write it in your semantic actions)
20:12:19 <b_jonas> good
20:12:22 <pikhq> And hopefully by the time it matters musl-on-windows will be an option.
20:12:32 <b_jonas> and sure, if I allocate, that's of course mine to cleanup
20:12:50 <ais523> I'll need help from a C++ expert to figure out how this should work in C++, you can copy everywhere and it'd work but be inefficient
20:12:59 <b_jonas> ais523: it also won't start threads or coroutines or processes of course, right? not that it would make sense, but that's also required for just jumping out to work.
20:13:20 <b_jonas> ais523: to figure out how what should work?
20:13:26 <b_jonas> and copy what everywhere?
20:13:30 <ais523> no, but it currently uses setjmp/longjmp in C for error handling
20:13:34 <ais523> b_jonas: semantic values, mostly
20:13:55 <ais523> atm I just pass them around with assignment commands
20:14:01 <ais523> and return them and pass them from functions plain
20:14:32 <ais523> in C they're nearly always integers or pointers, so that works pretty well
20:14:35 <b_jonas> ais523: hmm... the problem is mostly when you destroy symbols on the stack, either during error handling or when the whole stream is rejected
20:14:37 <ais523> but in C++ it'd make sense to use objects
20:14:39 <b_jonas> ais523: you need some sort of destructors
20:14:45 <ais523> right
20:14:49 <ais523> Bison has a nonstandard extension for this
20:14:50 <b_jonas> ais523: as in, most of the symbols are destroyed when they're reduced
20:15:00 <b_jonas> ais523: lemon handles this sanely actually:
20:15:17 <b_jonas> it has destructor function for symbols (terminal and non-terminal) that it calls if they're non-reduced
20:15:34 <b_jonas> setjmp itself should be no problem unless you somehow call it from inside a user action
20:15:34 <ais523> anyway I could implement things like that but it'd cost a lot of performance, as I'd need a separate error path in every function
20:15:52 <b_jonas> but even without error handling, you have to do something when the input doesn't match the grammar
20:15:54 <ais523> well YYERROR is a longjmp call, but thankfully that's already documented to not terminate normally
20:16:03 <b_jonas> clean up the symbols on the stack somehow
20:16:07 <ais523> I think it normally compiles to a goto, because traditionally everything's one function
20:17:17 <ais523> anyway the POSIX approach is to just leak them
20:17:24 <ais523> which is completely fine if they're ints
20:17:36 <ais523> btw, something that shocked me is that POSIX yyparse has no way to return a value, other than success/fail
20:17:51 <ais523> you have to write a top-level semantic action that stores it in a global variable
20:18:42 <b_jonas> ais523: there's a mode where there's no %union but only one type for representing all nonterminals, right? if that's what I do, there'll be no union in the emitted C code?
20:19:00 <b_jonas> if so, then it will probably "just work" if you make that one type a C++ object with a destructor,
20:19:23 <ais523> b_jonas: right, if you don't use <> marks anywhere
20:19:26 <b_jonas> however, it might be better if you could make ayacc call some sort of destructor in C mode too
20:19:32 <ais523> although I'm having trouble understanding what POSIX says to do in that situation
20:19:40 <ais523> some bits imply the global type should be int
20:19:46 <b_jonas> um
20:19:49 <b_jonas> isn't there another declaration?
20:19:51 <b_jonas> let me look this up
20:20:16 <GeekDude> >>> from __future__ import division; 1/2**6 * sum(map(lambda n: (-1)**n/2**(10*n) * (-2**5/(4*n+1) - 1/(4*n+3) + 2**8/(10*n+1) - 2**6/(10*n+3) - 2**2/(10*n+5) - 2**2/(10*n+7) + 1/(10*n+9)), range(50)))
20:20:31 <GeekDude> is there not a python bot in here?
20:20:49 <pikhq> ais523: Well, at least with C11 you could make it a thread-local and then you'd have *a* way of behaving sanely.
20:20:53 <ais523> there was like 5 years ago
20:21:05 <b_jonas> pikhq: not so
20:21:09 <ais523> I guess HackEgo might be able to do it?
20:21:09 <b_jonas> thread local isn't enoguh
20:21:16 <b_jonas> I can call parsers recursively
20:21:38 <pikhq> b_jonas: I was meaning you could wrap it into a vaguely sane API.
20:21:42 <ais523> b_jonas: I wasn't expecting anyone to do that, but yes, I think with ayacc it does actually work
20:22:00 <b_jonas> ais523: the point is, if you're using a union (as in the C/C++ thing) in the emitted code, then it's only your parser's code that's somehow tracking which type it contains, so even the C++ compiler won't know how to destroy the values
20:22:40 <b_jonas> ais523: so there's two choices to clean up properly: either ayacc has to support calling a destructor depending on the type of the symbol (ayacc probably knows the type), or you have to use a single type and no union
20:23:15 <ais523> b_jonas: currently I am using a union, but that's only temporary
20:23:20 <ais523> I'm hoping to optimize the union out
20:23:34 <ais523> even inventing a generic syntax for %union that makes sense for languages other than C so that the optimization works
20:23:47 <ais523> (the rule is "%union consists of a sequence of target-language declarations")
20:23:50 <b_jonas> ais523: you can certainly do that in some cases, but I think you need the union in some other cases
20:24:00 <b_jonas> oh wait
20:24:03 <b_jonas> you mean that way
20:24:17 <b_jonas> I thought you meant you'd store just one member instead of the whole union in some cases when you know its type
20:24:24 <b_jonas> sorry
20:24:40 <ais523> if I know the type, I want to be storing in a variable of that type
20:24:56 <ais523> occasionally you need a union though because you can reduce in two different ways (depending on lookahead) and they have different tyeps
20:25:08 <ais523> then your function is basically returning a tagged union, so you can unpack it as soon as you arrive at the destination
20:25:09 <b_jonas> ais523: sure, you almost certainly need a union some times
20:25:27 <b_jonas> but if you want to store just a member sometimes, then you have to be able to parse the union declaration, don't you?
20:26:11 <ais523> you do, but the amount of actual parsing needed is minimal
20:26:24 <b_jonas> what? how so?
20:26:33 <b_jonas> don't you have to parse out the member name _and_ the type name?
20:26:39 <b_jonas> for each elemetn
20:26:46 <ais523> b_jonas: I defined %union as "a sequence of target-language declarations", then all you have to do is swap out the member name
20:26:57 <b_jonas> but how do you know where the member name is?
20:27:10 <ais523> you know /what/ the member name is, so you just look for it
20:27:14 <b_jonas> heck, how do you even know where the boundary between the members is?
20:27:18 <ais523> semicolons :-)
20:27:31 <b_jonas> can't semicolons occurr inside declarations these days?
20:27:35 <b_jonas> hmm
20:27:37 <ais523> that's one of the few concessions I had to make, but luckily they're valid as statement separators in most languages
20:27:51 <ais523> the only case I know, in C at least, is int (/*;*/ *x)
20:27:54 <ais523> and the like
20:27:59 <b_jonas> ok, I get the semicolon
20:28:01 <ais523> and I think I can get away with a "please don't do that"
20:28:04 <b_jonas> but how can you find the member name?
20:28:21 <ais523> you're thinking about this backwards
20:28:29 <ais523> what you already know is the member name, what you don't know is the full declaration
20:28:36 <ais523> but it'll only appear in one of the declarations, so you know it's that one
20:28:39 <b_jonas> nah, more like struct { int u; int v; } foo;
20:28:41 <ais523> and it'll only appear once, so you just look for it
20:28:56 <ais523> right, if you do that, then u and v become invalid as %union tags
20:28:57 <b_jonas> (or struct { int u; char v[';'/4]; } foo; if I want to be evil
20:29:13 <b_jonas> oh
20:29:21 <ais523> it's a bit fragile but I think it's an acceptable price, especially if I give an option to disable the optimization
20:29:25 <b_jonas> you mean you know the member name from %type declarations?
20:29:27 <b_jonas> ah!
20:29:30 <ais523> yes
20:29:35 <b_jonas> but what if a member name is never used?
20:29:42 <ais523> then you never have to use it
20:29:47 <ais523> so it doesn't matter that you can't
20:29:53 <b_jonas> hmm
20:30:13 <b_jonas> and what if the same symbol as the member name appears in another context in the declarations? I guess that's just don't do it territory
20:30:58 <b_jonas> ah, I see, Crystal takes it away from Haley in just the previous strip
20:31:19 <ais523> I was going on the basis that it's not going to be a target-language keyword in almost any cases
20:31:22 -!- fractal has quit (Changing host).
20:31:22 -!- fractal has joined.
20:31:23 <ais523> *almost all cases
20:31:34 <ais523> technically you can call a variable $my in Perl, but if you do that, IMO you deserve what you get
20:31:41 -!- variable has quit (Quit: 1 found in /dev/zero).
20:31:51 <b_jonas> ais523: I don't mean a keyword. an identifier. but it's a union tag, so it can appear in other structs or something.
20:32:12 <ais523> yep, I didn't think of the "struct defined in-place" case
20:32:21 <b_jonas> like, %union { float x; struct { float x, y; } point; }
20:32:33 <ais523> admittedly it doesn't seem like a /useful/ case, but it's nice to be as general as possible, especially in #esoteric
20:32:45 <b_jonas> I guess you could just ban that and ask for the types to be defined elsewhere
20:32:50 <ais523> what about this: if the tag isn't unique in the entire %union definition, I just don't optimize
20:33:07 <b_jonas> ais523: if there's an inline struct, you'll have problems with the semicolons anyway
20:33:52 <b_jonas> hmm wait wait
20:33:54 <ais523> actually no because ayacc knows enough to not detect semicolons inside braces
20:34:06 <b_jonas> I think you actually can't use an in-place defined struct usefully
20:34:13 <b_jonas> because you can't easily refer to it from elsewhere
20:34:22 <b_jonas> even if it has a name, you can refer to that name only if you know the name of the union
20:34:41 <b_jonas> you can still use it in a type-unsafe way or by using the value in the rules without referring to the types of coures
20:34:44 <ais523> it has a subset-of-C parser, which you need to use to find the end of the %union declaration anyway
20:34:45 <b_jonas> it's just less useful
20:34:56 <ais523> also, you do know its name, it's YYSTYPE (specified by POSIX)
20:35:14 -!- orin has quit (Read error: Connection reset by peer).
20:35:27 <pikhq> Be fun to use ayacc to put together a naive-but-usable C compiler.
20:35:30 <b_jonas> ais523: yeah... but it's not YYSTYPE from another compilation unit, especially if you compile multiple grammars
20:35:48 <pikhq> My definition of "usable" here would ideally include "can be used to build Linux".
20:35:59 <b_jonas> ais523: by the way, this kind of nonsense might explain why they use bison in the implementation of bison
20:36:00 <ais523> that's a pretty lofty definition
20:36:05 <ais523> even clang had trouble doing that until recently
20:36:08 <pikhq> Yes, yes it is.
20:36:15 <ais523> b_jonas: somehow that doesn't surprise me
20:36:17 <pikhq> Though "naive" helps matters significantly.
20:36:31 <ais523> I think the hard part of building Linux is all the gcc extensions
20:36:47 <pikhq> Yep.
20:36:53 <b_jonas> that's one hard part
20:36:55 <b_jonas> but yes
20:37:00 <pikhq> Which are simpler if you're not doing a significantly complicated optimizer.
20:37:21 -!- Sgeo has joined.
20:37:23 <Sgeo> New laptop
20:37:29 <b_jonas> there's also that Linux relies on particular non-optimizations, and newer gcc and Linux together has to avoid optimizations breaking those old assumptions
20:37:37 <Sgeo> And using Hexchat instead of Quassel
20:37:38 <pikhq> "Which are simpler if you're not doing a significantly complicated optimizer."
20:38:18 <ais523> b_jonas: a naive compiler doesn't need to worry about reliance on non-optimizations
20:38:19 <b_jonas> stuff about atomic accesses that are handled in a strange way (because they had to exist before there was a sane way to handle them in user programs), and objects being ordered in segments in a particular order
20:38:26 <b_jonas> ais523: yes
20:38:37 -!- hjulle has joined.
20:38:46 <ais523> pikhq: I assume you'd be outputting asm?
20:38:51 <pikhq> *nod*
20:39:19 <b_jonas> also, that's not too hard, but they have to make sure the kernel code is compiled in a way that it never tries to touch xmm and x87 state
20:39:20 <pikhq> If we're going full-naive but usable for bootstrapping, the compiler should do as little work as it can get away with. :)
20:39:29 <olsner> outputting asm directly from the parser?
20:39:46 <FireFly> From a compiler, as opposed to machine code, I presume
20:39:50 <olsner> might be horrible, but nice to have just a single yacc input file be the whole compiler
20:40:00 <b_jonas> and have to handle old gcc style tagged structure initializers, which for some reason the Linux developers are fond of, even over c99 style initializers
20:40:28 <b_jonas> I think they also have some gcc-style inline assembly, which isn't actually so easy to implement correctly in a compiler
20:40:37 <b_jonas> even without optimizations
20:41:15 <ais523> b_jonas: I'm trying to remember what the old-style even was
20:41:30 <ais523> { [field] value, [field] value } ?
20:41:32 <ais523> or was that just for arrays?
20:41:47 <b_jonas> ais523: I think struct point p = { x: 4, y: -1 };
20:41:53 <ais523> oh right, colons
20:42:04 <b_jonas> wheras new stype is struct point p = { .x = 4, .y = -1 }; I think
20:42:05 <ais523> that does look a bit prettier than the C99 version
20:42:11 <ais523> the C99 syntax is more logical though
20:42:25 <b_jonas> I mostly do C++ so I don't see either
20:42:35 <b_jonas> there's also similar syntax for array initializers
20:42:36 <ais523> and C syntax has a traditional of being 100% logical and predictable, and yet somehow still massively ugly and unintuitive
20:42:44 <olsner> doesn't c++xy import any of that?
20:42:49 <ais523> { [0] = "zero", [1] = "one" }
20:42:50 <ais523> for arrays
20:43:00 <b_jonas> ais523: yes, but what's the old gcc style?
20:43:05 <ais523> I use that in NH4 quite a bit for enum-valued arrays
20:43:11 <ais523> I think old style is that without the = signs?
20:43:19 <b_jonas> no way
20:43:24 <Sgeo> "Just so you know, your computer does not meet Second Life's minimum system requirements."
20:43:30 <b_jonas> that would totally conflict with C++11 lambda syntax
20:43:51 <fizzie> { .x[1][2].y.z = 42 }
20:43:53 <b_jonas> well, you need braces for that but those can occurr in an initiali9zer
20:44:04 <ais523> b_jonas: this is way older than C11
20:44:08 <ais523> err, C++11
20:44:10 <olsner> "An alternative syntax for this which has been obsolete since GCC 2.5 but GCC still accepts is to write `[index]' before the element value, with no `='."
20:44:14 <b_jonas> ais523: of course it is
20:44:16 <ais523> it was obsolete in 1999
20:44:34 <ais523> so the fact that it conflicts with C++11 syntax is not really a strike against its having existed
20:44:43 <b_jonas> hmm, actually
20:45:02 <b_jonas> now I wonder if the C11 initalizer syntax can conflict syntactically with C++11 lambdas too
20:45:07 <b_jonas> but I think it probably can't
20:45:58 <ais523> you can't put an = there in C++
20:46:02 <ais523> and it's required in C11
20:46:07 <b_jonas> ais523: sure, but maybe in some more complicated cases
20:46:24 <b_jonas> let me think
20:46:30 <ais523> well in C++, after the closing square bracket
20:46:38 <ais523> don't you have to have an opening parenthesis next?
20:46:49 <b_jonas> in C11, you have a bracketed stuff, then either an equal sign, or another bracketed stuff, or a dot, right?
20:46:56 <ais523> (wow, my brain is definitely in parser mode)
20:46:56 <b_jonas> you don't need the parenthesis
20:46:59 <ais523> b_jonas: yep
20:47:02 <b_jonas> () is optional
20:47:07 <b_jonas> the return type is also optional
20:47:18 <b_jonas> I don't think a dot can follow in C++
20:47:24 <b_jonas> and probably no equals sign either
20:47:26 <ais523> oh wow, that much optional?
20:47:34 <b_jonas> ais523: yes
20:47:42 <b_jonas> ais523: the braces are required though
20:47:43 <ais523> so []{puts("hello world");} is a valid lambda in C++?
20:47:48 <b_jonas> yes
20:47:57 <b_jonas> this is why people are joking about [](){}();
20:48:02 <b_jonas> which is a valid statement in C++11
20:48:34 <b_jonas> and some people want explicit template lambda syntax which would make []<>(){}(); valid too
20:48:44 <b_jonas> but it probably won't happen, sadly
20:48:51 <olsner> template lambdas o.O
20:49:09 <b_jonas> olsner: they exist now, but without an explicit <>
20:49:11 <b_jonas> don't laugh
20:49:25 <b_jonas> they actually make sense
20:49:25 <ais523> b_jonas: I saw the [](){}() syntax being thrown around as an example of the horrors of C++ well before I knew what it did
20:49:30 <ais523> I was a little disappointed to hear it was a no-op
20:50:02 <ais523> meanwhile, it's crazy hard to write a switch statement efficiently in Perl
20:50:03 <HackEgo> [wiki] [[Taktentus]] http://esolangs.org/w/index.php?diff=42602&oldid=42137 * 80.53.184.190 * (-1) /* External resources */
20:50:07 <olsner> my c++ must be slipping, I can't imagine any way to use a templated lambda
20:50:19 <ais523> my current attempt is a hash from values to subroutines
20:50:20 <b_jonas> ais523: no-op when allowed
20:50:38 <b_jonas> olsner: it's basically an object with a member function template called operator()
20:51:48 <b_jonas> olsner: so it's sort of like auto m = [](auto x){ printf("hello"); } is similar to like struct foo { void template<typename T> operator()(T x) { printf("hello"); } }; foo m;
20:52:01 <HackEgo> [wiki] [[Taktentus]] http://esolangs.org/w/index.php?diff=42603&oldid=42602 * 80.53.184.190 * (+44) /* Syntax */
20:52:11 <b_jonas> don't take that as strict truth, but that's the idea
20:52:23 <olsner> ah, right, the operator() becomes a templated function
20:52:47 <b_jonas> olsner: the main use is just when you're lazy and don't want to explicitly name the argument type, even though you could; but there can be a use when you actually use the same lambda with multiple instantiations of that function
20:53:13 <b_jonas> you can even pass such a polymorphic lambda to other functions, and those functions can call it with multiple typse
20:53:50 -!- f|`-`|f_ has joined.
20:55:04 <b_jonas> ais523: the difficult part of that is that you don't get to use closed values inside the subroutines
20:55:13 <b_jonas> so you have to pass them as arguments explicitly
20:55:21 <b_jonas> ais523: one hack you can use in perl is computed goto
20:55:29 <b_jonas> but that's somewhat evil
20:55:41 <ais523> that might actually be less evil than the hash of subs
20:55:48 <ais523> actually the hardest part was the scope of "return"
20:55:48 <b_jonas> what? no way
20:55:53 <b_jonas> a hash of subs isn't evil
20:55:58 <b_jonas> it's quite normal
20:55:58 <ais523> because you just return from the inside
20:56:02 <b_jonas> it just has some limitations
20:56:09 <b_jonas> sure
20:56:18 <ais523> so you need another layer of "return" around the outside, so the evil part is
20:56:23 <b_jonas> so just use a goto/last to return from deep :-)
20:56:27 <ais523> now the only way to continue in the same function is to jump out of the inside subs using goto
20:57:44 -!- f|`-`|f has quit (Ping timeout: 264 seconds).
20:57:45 -!- f|`-`|f_ has changed nick to f|`-`|f.
20:58:00 <ais523> or last, but that's more evil than goto I think (at least, there's a warning on last and not on goto)
20:58:43 <b_jonas> the incantation is our $RETFOO; sub foo { ... bar(); ... ENDFOO: $RETFOO } sub bar { ...; if (...) { $RETFOO = ...; no warnings "exiting"; goto ENDFOO; } ... }
20:59:03 <ais523> I know you can turn it off
20:59:14 <b_jonas> ais523: actually, you can also jump out with die and eval{}
20:59:15 <ais523> this is how Test::More does its "SKIP:" blocks
20:59:18 <b_jonas> rather than goto
20:59:23 <ais523> b_jonas: I use that for the syntax error path
20:59:27 <ais523> or will, that bit isn't implemented yet
20:59:43 <b_jonas> there are some constructs die can't jump out of, and constructs goto can't jump out of, and neither of these are subsets of the other
20:59:48 <b_jonas> but in practice die can jump out of more things
21:00:19 <b_jonas> in particular, die can jump out of some well-behaved XS subroutines whereas I think goto can't ever jump out of any XS (but I could be wrong)
21:00:32 -!- Guest3780 has quit (Read error: Connection reset by peer).
21:00:49 <b_jonas> whereas goto can jump out of sort comparison blocks but die can't (I think)
21:02:02 -!- AnotherTest has joined.
21:02:17 -!- Guest3780 has joined.
21:02:25 <ais523> the reason you can't goto out of XS is because the code outside the XS and the callback from the XS are running in different interpreters
21:02:29 <ais523> just ones that share most of their state
21:02:36 <ais523> the instruction pointer's part of the state that isn't shared
21:02:55 <ais523> hmm, can you goto out of a block eval?
21:02:57 <b_jonas> ais523: also, if you jump out from regexes or the right hand side of s/// substitutions, you may get into unexpected trouble with very old versions of perl
21:03:53 <b_jonas> but I think s/// is fine since the oldest perls you want to support
21:04:06 <ais523> ayacc doesn't work as far back as aimake
21:04:10 <ais523> it's something like 5.14 I think
21:04:26 <b_jonas> and you probably don't want to use /(?{ blocks at all if you want to use old perls, regardless of whether you jump out of them or recurse into the regex engine from them or anything
21:04:32 <ais523> I'm using modern Perl stuff if I want to (although not experimental stuff), on the basis that the platforms stuck on old Perl also tend to have a working yacc
21:04:58 <b_jonas> ais523: yes, but /(?{ semantics has changed even after that, so it's best to avoid complicated tricks with that
21:05:08 <ais523> btw, ayacc has a language-generic backend, the syntax of the target language is basically just in one big hash that contains code fragments
21:05:16 <ais523> that are combined to make the target program
21:05:32 <b_jonas> but I support targetting 5.14+
21:06:01 <b_jonas> ais523: hmm, are there placeholders in those code fragments so the code can be re-ordered?
21:06:07 <b_jonas> or only constant strings?
21:06:30 <ais523> lots of placeholders
21:06:42 <ais523> I might have to change my templating syntax eventually but it's working OK atm
21:07:14 <b_jonas> ais523: but you'll still make the C language backend such that it emits a single version of that code that should work in all systems and compilers, right?
21:07:17 <ais523> on the assumption that even though we might have false positives on constructs that exist in the target language, we can avoid generating code that confuses our own internal parser
21:07:20 <ais523> and yes
21:07:30 <ais523> although, one thing I did was
21:07:45 <ais523> you can define a macro YYUNREACHABLE to __builtin_unreachable or the like and it makes your code more efficient
21:07:49 <ais523> if you don't, it substitutes an infinite loop
21:08:08 <b_jonas> ais523: just get the code from libecb and use the ecb_unreachable macro for that
21:08:12 <b_jonas> that's portable
21:08:21 <b_jonas> (that's the whole point)
21:08:22 <ais523> (also, I realised that there's really only one correct way to write a macro that expands to an infinite loop)
21:08:47 <ais523> my first attempt was do { for(;;) ; } while (0)
21:08:58 <ais523> but it's clearly possible to do better :-)
21:09:27 <b_jonas> ais523: um, an infinite loop of what?
21:09:33 <b_jonas> like, what's in the loop body?
21:09:46 <ais523> an infinite loop of nothing
21:09:50 <ais523> the code never runs
21:09:53 <int-e> {} while (1) clearly works
21:09:56 <ais523> it's to help the compiler optimize it out
21:09:59 <ais523> int-e: in C?
21:10:02 <b_jonas> oh, you implement that as an inline function
21:10:12 <ais523> ah right, you missed the "do"
21:10:16 <b_jonas> and then the macro just expands to a call to that function
21:10:22 <ais523> yep, I eventually golfed it down to "do; while (1)"
21:10:35 <ais523> (this is a weird sort of golf that requires correct whitespace)
21:10:55 <b_jonas> like, on the top level, inline ecb_noreturn void yyinfiniteloop() { for (;;) pause(); }
21:11:00 <b_jonas> or something
21:11:13 <b_jonas> (void) instead of () probably, in C
21:11:20 <ais523> b_jonas: the libecb stuff relies on implementation namespace, doesn't it?
21:11:21 <int-e> ais523: oh, yes.
21:11:34 <b_jonas> ais523: what do you mean by "implementation namespace"?
21:11:49 <ais523> b_jonas: anything starting with double underscore or underscore and capital letter
21:11:57 <ais523> (or a few other cases which don't matter here)
21:12:01 <ais523> whether you use them yourself, or just look at them
21:12:12 <ais523> exception: anything that's specifically specified in a relevant C standard
21:12:20 <ais523> (and the relevant standard is C99)
21:12:37 <b_jonas> ais523: it probably relies on it in that it refers to some non-standard compiler extensions on particular compilers, yes
21:12:42 <ais523> so you can look at __STDC_VERSION__ but not __GNUC
21:12:47 -!- oren has joined.
21:12:48 <int-e> ais523: That was a brain fart, but ... interestingly ... gcc accepts that without the do, why?
21:12:49 <ais523> b_jonas: right, POSIX disallows that
21:12:58 <ais523> int-e: two different statements
21:13:04 <ais523> {} and while(1); are both valid statements
21:13:15 <int-e> ais523: oh. silly me.
21:13:24 <b_jonas> ais523: but for most stuff, it refers to those things only on particular compilers
21:13:44 <b_jonas> and on unknown compilers, it will use standard replacements for everything where it's possible
21:13:52 <ais523> b_jonas: yes, but even /detecting/ the compiler is implementation namespace stuff, unless the compiler is outright breaking the standards
21:13:57 * int-e simply shouldn't write infinite loops as a macro
21:14:05 <b_jonas> ais523: well sure
21:14:09 <b_jonas> ais523: but there's a way out
21:14:23 <ais523> working on gcc-bf was weird
21:14:28 <b_jonas> ais523: POSIX specifically says you can't rely on compiler extensions except where you document that in your implementation
21:14:30 <pikhq> Though in general you can get *away* with just testing for compiler-defined macros.
21:14:36 <ais523> because suddenly I was working in implementation namespace myself
21:14:44 <ais523> pikhq: sure, that's the sensible and sane way to go about things
21:14:49 <pikhq> ('get away', not 'you are permitted to by the standard' of course.)
21:14:55 <ais523> but I decided to implement POSIX literally to see what happened
21:15:11 <pikhq> It is much harder for some things than others.
21:15:22 <b_jonas> ais523: but if you're really picky about this, you could make it an option of ayacc to not include the ecb definitions
21:15:53 <ais523> you mean an option /to/ include them?
21:15:56 <b_jonas> ais523: either
21:16:13 <b_jonas> I'd always just ask ayacc to include them
21:18:45 <b_jonas> ais523: basically, if I'd be on a compiler where libecb as a whole didn't work (as opposed to it just can't provide a few of its more tricky features), then I'm already screwed and my code will break in other places too
21:18:57 <b_jonas> I don't go strictly POSIX or strictly C99 or anything
21:19:28 <pikhq> In general I try to write strict POSIX or "will work on anything strict POSIX".
21:19:35 <b_jonas> I'm content with just marking nonportable stuff in my code with #ifndef #error so when you try to port it you get compiler errors pointinng out where all the code you ahve to modify is
21:19:42 <ais523> I guess there's a scale from "practical" to "meets the letter of the standard"
21:19:45 <ais523> what I do depends on what I'm doing
21:19:53 -!- variable has joined.
21:20:06 <ais523> but every now and then I jam right against the right-hand end of the scale, just for fun
21:20:16 <ais523> last time was C-INTERCAL's autotools-based build system
21:20:18 <b_jonas> I don't, like, deliberately break compatibility when I don't need to
21:20:31 <b_jonas> but I write nonportable code when it's easier, and mark it so I can change it later when it has to be ported
21:20:37 <ais523> possibly the only time an autotools-based build system has worked exactly in the way that the autotools maintainers intend, for a nontrivial project?
21:21:10 <b_jonas> ais523: which one is the right hand end?
21:21:27 <ais523> the one where you follow the standard exactly
21:21:45 <b_jonas> ok
21:23:18 -!- ProofTechnique has quit (Ping timeout: 256 seconds).
21:25:05 <HackEgo> [wiki] [[Element]] http://esolangs.org/w/index.php?diff=42604&oldid=42599 * Phi * (+878)
21:25:08 -!- callforjudgement has joined.
21:25:39 <b_jonas> ais523: are you alreay planning to write specific backends other than the C/C++ one?
21:25:41 -!- ais523 has quit (Disconnected by services).
21:25:44 <b_jonas> if so, for what language?
21:25:44 -!- callforjudgement has changed nick to ais523.
21:25:59 <ais523> b_jonas: I have a Perl backend written already, although I haven't tested it yet beyond visual inspection of the source
21:26:08 <b_jonas> I see
21:26:20 <b_jonas> but that's not because you want to use ayacc to implement ayacc itself, right?
21:27:13 <b_jonas> hehe, if ayacc got so successful that bison is abandonned, then the perl people will be in trouble because it will be difficult to bootstrap perl without perl
21:27:20 <ais523> indeed, it isn't implemented in itself
21:27:35 <ais523> b_jonas: nah, they'd just keep a copy of its output around
21:27:51 <b_jonas> well sure
21:28:34 <pikhq> And it's not like Perl doesn't already have bootstrapping problems.
21:28:43 <b_jonas> pikhq: what?
21:28:47 <pikhq> Perl builds Perl so it can build more Perl.
21:28:57 <ais523> the Perl build system builds a minimal Perl
21:29:00 <b_jonas> sure, but it boostraps fine withotu a perl to start from
21:29:01 <ais523> then uses that for the rest of the build
21:29:11 <pikhq> Yeah, but it doesn't cross compile well. :)
21:29:12 <b_jonas> and it's only one level deep anyway
21:29:48 * pikhq does not understand the obsession with having languages with only a bootstrapping implementation
21:29:53 <b_jonas> pikhq: sure, but it native compiles everywhere, and is relatively quickly compile
21:30:21 <ais523> pikhq: well, if your language is intended to be for compiler writing, then bootstrapping it is a good demonstration of that fact
21:30:35 <pikhq> (note, "only". I can understand having one, and even having that be the preferred one. But c'mon, you should at least have a simple compiler in C so you can use it without having a compiler already.)
21:30:37 <b_jonas> ais523: and also a good test
21:30:41 <ais523> many languages don't need a boostrap because compiling's not what they're for
21:30:54 <ais523> I was going to bring up INTERCAL as an example, but then I remembered CLC-INTERCAL
21:31:07 <b_jonas> there's a lot of errors, including hardware errors, that you can catch by getting a segfault during compiling gcc
21:31:08 <ais523> which is written in IACC, and the IACC compiler is also written in IACC
21:31:38 <ais523> and the distribution contains a precompiled bytecode version of the compiler so that you can get started
21:31:53 <ais523> I suspect CLC_INTERCAL does thst just because it can, though
21:31:59 <b_jonas> ghc actually scares me a lot
21:32:04 <b_jonas> because of the way it's built
21:32:09 <pikhq> Like, c'mon GHC. There should be a simple, generic Haskell compiler that can build you.
21:32:19 <ais523> doesn't GHC outright run regex on the output asm?
21:32:22 <ais523> or is that something else?
21:32:26 <pikhq> I don't care if it's shit or not, it should at least be good enough to get you a GHC.
21:32:30 <pikhq> ais523: It *used to*.
21:32:39 <pikhq> ais523: When it compiled by way of C.
21:32:52 <ais523> doesn't that lose like half the reason to compile via C?
21:32:54 <pikhq> Now it either code gens itself entirely or uses LLVM.
21:33:11 <b_jonas> well admittedly
21:33:35 <olsner> there was an evil mangler and the satanic splitter, iirc both are/were some horrific perl mess
21:33:37 <b_jonas> ghc scares me in ways other than its build procedure too
21:33:44 * pikhq has a similar complaint with C++...
21:33:45 <b_jonas> there's very few things in ghc that don't scare me
21:33:57 <ais523> btw, ayacc's output is designed to be easy to optimize, so I've been looking at the output asm and it does seem to be optimized quite well
21:34:13 <pikhq> And Rust.
21:34:21 <b_jonas> but I think ghc is getting somewhat saner these days
21:34:23 <b_jonas> still very scary
21:34:28 <b_jonas> but improving
21:34:52 <b_jonas> it won't get to the state where you can just build it without a haskell implementation ever of course
21:34:56 <b_jonas> but still
21:35:35 <b_jonas> I think it just works as a sane direct compiler these days, implemented in haskell
21:35:36 <ais523> pikhq: what language do you think Rust should be implemented in? C is clearly unthinkable, because the point of Rust is to replace C
21:35:42 <b_jonas> without any of the evil mangler or compile through C stuff
21:36:03 <pikhq> ais523: I *am 100% fine with* the reasonable, high quality implementation being bootstrapped.
21:36:04 <b_jonas> ais523: couldn't there be two implementations, one in C or C++ and one in rust?
21:36:35 <pikhq> The point is there should be at least a naive, inefficient but functional implementation that is suitable for bootstrapping said implementation.
21:36:38 <ais523> most compiler teams have enough problems maintaining just one implementation
21:37:02 <ais523> hmm, how easy would type erasure be for Rust?
21:37:09 <pikhq> You're not telling me a parser that outputs naive C is going to be that bad.
21:37:23 <b_jonas> ais523: no no, it'd be two teams: the gcc team maintains the C++ implementation, like they do for gccgo, and the rust enthusiasts maintain the rust implementation
21:38:11 <pikhq> And I do mean "naive"... When you're wanting something that's just sufficient for getting something going it doesn't have to be even faintly optimizing or even all that efficient.
21:38:43 <pikhq> Or even all that general if you don't mind writing your "real" compiler in a subset of the language...
21:39:30 <b_jonas> pikhq: yes, but a good compiler is complicated and hard to maintain, which is why gcc is written in C++ these days, not in, like, portable c89
21:39:48 <pikhq> I'm not asking for a good one.
21:39:53 <b_jonas> and C++ is very difficult to compile even naively
21:39:57 <b_jonas> as opposed to C
21:39:58 <pikhq> I'm asking for one that suffices to get your good one running.
21:40:02 <b_jonas> that's why they're separate languages really
21:40:15 <b_jonas> C is easy to compile if you don't want optimizations, C++ is very difficult
21:40:32 <pikhq> C++ is kinda an all-around bad language though.
21:40:37 <b_jonas> no it's not!
21:40:55 <pikhq> Okay, so it's a spectacular esolang.
21:41:15 <b_jonas> not that either
21:41:15 <b_jonas> I like C++
21:41:15 <b_jonas> I really like it
21:41:45 <pikhq> Stockholm syndrome much?
21:42:18 -!- AnotherTest has quit (Remote host closed the connection).
21:46:16 <b_jonas> ais523: how much does trying to support multiple restrict what kind of optimized code you can want to emit?
21:46:57 <ais523> the way it works is, some fragments don't exist in some languages, then you don't run the matching optimizations
21:47:03 <ais523> either because you can't or because you don't need to
21:47:09 <b_jonas> I see
21:47:23 -!- ProofTechnique has joined.
21:47:39 <ais523> for example, atm pointing multiple switch case labels at the same code works in C but not in Perl, it just copies the body
21:48:10 <b_jonas> what? why wouldn't it work in perl?
21:48:33 <ais523> not with the hash-of-subs thing, at least not as a literal
21:48:41 <b_jonas> but you don't have to use a hash literal
21:49:09 <b_jonas> a hash literal doesn't even have an advantage because I think it won't ever be optimized to creating the hash only once
21:49:13 -!- `^_^v has quit (Ping timeout: 256 seconds).
21:49:22 <b_jonas> you can just write my%h; $h{foo}=$h{bar}=sub{...};
21:50:14 <ais523> you have to use the hash literal for readability
21:50:17 <ais523> although, hmm
21:50:22 <b_jonas> no
21:50:28 <b_jonas> a hash literal is actually less readable
21:50:48 <b_jonas> $h{foo} = sub { ... }; is better because the sub bodies can be long and that way you see at the sub head what you're defining
21:53:10 <b_jonas> some people write hash literals for this but I just don't agree with that. it's just pointless. I think it's mostly beginners who don't understand what a hash is and think of it as a braced list syntactical thing rather than a structure you can indexed lookup and indexed assign efficiently
21:53:39 <b_jonas> (that clearly doesn't apply to you)
21:53:54 <b_jonas> $h{foo} = sub { ... }; is good syntax and readable
21:54:46 <b_jonas> ais523: anyway, even with a hash literal you can just say sub foo { ... }; our %h = { foo => \&foo, bar => \&foo, };
21:55:01 <ais523> yes, although then you have to name the block
21:55:13 <ais523> but the point is that these are short one-off things
21:55:18 <b_jonas> they are?
21:55:19 <b_jonas> oh
21:55:25 <b_jonas> if they are then a hash literal might make sense
21:55:27 <ais523> they're the cases of a switch statement
21:55:35 <tswett> I'm shoving SLOBOL aside and creating a different language called SLOBOL.
21:55:36 <b_jonas> yes, those can be long blocks too
21:55:46 <ais523> they're mostly just a couple of function calls and a goto, some are even simpler than that, few are more complex
21:56:16 <b_jonas> anyway, even for simple blocks $h{foo} = sub { ... }; isn't too much of an overhead probably
21:56:30 <HackEgo> [wiki] [[Special:Log/move]] move * Tanner Swett * moved [[SLOBOL]] to [[SLOBOL (2005 language)]]: Shoving this aside to make a new language with the same name
21:56:30 <HackEgo> [wiki] [[Special:Log/move]] move * Tanner Swett * moved [[Talk:SLOBOL]] to [[Talk:SLOBOL (2005 language)]]: Shoving this aside to make a new language with the same name
21:56:43 <HackEgo> [wiki] [[4]] M http://esolangs.org/w/index.php?diff=42609&oldid=42600 * Vriskanon * (+115) Explained the mathematically inaccurate joke surrounding the language's origin
21:57:22 <b_jonas> the old and ugly interpreter in http://www.math.bme.hu/~ambrus/pu/psz-snapshot.tgz has one or two large code dispatcher hashes defined in the $h{foo} = sub { ... }; way,
21:57:45 <b_jonas> including the $op has which defines how each operation of the optree is implemented, mapping opcode names to subs that run them
21:58:23 <b_jonas> and two smaller code dispatch hashes that help parsing
21:59:13 <b_jonas> mind you, normally if something appears in that interpreter, then it's a bad idea code-style wise
21:59:36 <b_jonas> but I think provided you actually want hashes of code, then that's the best syntax
22:00:07 <b_jonas> so it's got that particular thing right
22:02:15 <ais523> what I actually want is a C-style switch statement
22:02:28 <b_jonas> ais523: yes, you're correct that such a thing is difficult in perl
22:02:58 <b_jonas> is this for the perl backend? or for the ayacc interpreter itself?
22:03:02 <ais523> perl backend
22:03:10 <b_jonas> ok
22:03:24 <ais523> basically because in a parser impl, you have to at least /try/ to aim for efficiency
22:03:41 <b_jonas> make it output xs code that calls back the actions in perl :-)
22:03:41 -!- variable has changed nick to trout.
22:03:50 <b_jonas> and yes, certainly
22:04:02 <b_jonas> well
22:04:14 <b_jonas> you have to try to aim for efficiency in a general parser generator
22:04:17 <b_jonas> not in all handwritten parsers
22:04:47 <ais523> I'm not 100% convinced that the parser it uses for reading yacc code is even O(n)
22:05:09 <b_jonas> ais523: is it at least O(n**(1+epsilon)) ?
22:05:55 <ais523> it's O(n**2) for finding the end of a %{%} or %union {} block, I think
22:06:17 <b_jonas> (or O(n**(1+epsilon)) on condition that the yacc code doesn't contain tokens (such as identifiers) that are longer than a constant)
22:06:23 <b_jonas> I see
22:07:26 <b_jonas> well, you'll certainly try ayacc on largish grammars, and if this doesn't cause a practical problem there then it's probably fine
22:08:03 <b_jonas> like, I dunno, the C-intercal grammar, the perl grammar, the ruby grammar, I dunno what else
22:08:41 <b_jonas> actually, compiling perl with ayacc and then running the perl testsuite might be a good test for ayacc
22:09:04 <ais523> I've never compiled Perl from source
22:09:14 <b_jonas> what
22:09:17 <b_jonas> strange
22:09:19 <b_jonas> anyway, I have
22:09:24 <b_jonas> many times
22:09:35 <b_jonas> not on windows, mind you
22:10:28 <b_jonas> I might try to compile it with ayacc, though I can't guarantee I can do that
22:10:57 <b_jonas> I'll definitely be able compile the geo interpreter with ayacc, but that's a simple toy with very few tests so it doesn't help much
22:11:36 <ais523> b_jonas: atm the grammar has to be weird enough that it isn't optimized into something the backend can't handle
22:12:14 <b_jonas> in fact, maybe I should try to compile ruby with ayacc too
22:12:20 <b_jonas> but again I can't guarantee anything
22:12:32 <b_jonas> and it's not as good a test as with perl
22:13:01 <b_jonas> you will build c-intercal with ayacc, right?
22:13:15 <ais523> as a test, yes
22:13:21 <ais523> it won't become part of the build system permanently
22:13:27 <b_jonas> right
22:13:59 -!- b_jonas has quit (Remote host closed the connection).
22:16:44 -!- TieSoul_ has joined.
22:19:31 <HackEgo> [wiki] [[Element]] http://esolangs.org/w/index.php?diff=42610&oldid=42604 * Phi * (+735)
22:20:09 <HackEgo> [wiki] [[SLOBOL]] http://esolangs.org/w/index.php?diff=42611&oldid=42606 * Tanner Swett * (+1254) New language
22:20:34 -!- TieSoul has quit (Ping timeout: 248 seconds).
22:20:53 <tswett> Can someone give me admin access on the wiki, thanks.
22:21:40 <ais523> tswett: possibly, what do you want it for?
22:21:56 <tswett> Deleting [[Talk:SLOBOL]].
22:21:59 <ais523> actually let me check I have the perms first
22:22:09 <ais523> oh, the redirect?
22:22:14 <ais523> I can just delete that for you
22:22:25 <tswett> I'll just edit it, actually.
22:22:35 <ais523> yeah, that'd probably be easier
22:22:39 <HackEgo> [wiki] [[Talk:SLOBOL]] http://esolangs.org/w/index.php?diff=42612&oldid=42608 * Tanner Swett * (+0) Change redirect to a bit of text saying "see also"
22:22:57 <tswett> I had admin access eight or so years ago, and surely I'm only more mature now.
22:23:32 <ais523> seems I do have the perms, but it's probably worth talking it over with the other admins first; there's no rush
22:23:55 <tswett> Here's my campaign speech:
22:24:01 <tswett> "Feel free to give me admin access if you want."
22:24:06 <ais523> tswett: you actually already do have admin access, just on another account
22:24:07 <FireFly> You people change nicks too often
22:24:15 <ais523> at least, I'm assuming ihope127 is yours
22:24:26 <tswett> ihope127 is mine indeed.
22:24:46 <tswett> I don't use it any more and I don't remember the password. I could reset the password if I wanted, but I won't.
22:25:10 <ais523> don't have an email set, so I can't verify it like that
22:25:14 <ais523> at least not publicly
22:25:48 <ais523> I guess the problem is that when it comes to wiki administration, I slip into Wikipedia mode
22:26:25 <ais523> and am thinking "I'd be happy to move admin perms between accounts, but how do I know that the person who's editing as Tanner Swett and is on IRC as tswett right now is formerly-ihope127 and not an imposter"
22:26:43 <tswett> Mm.
22:29:03 <ais523> <oerjan> ok so tswett is not ihope127 but elliott is me. got it.
22:29:09 <ais523> the log history is looking bad ;-)
22:29:13 <tswett> Would you believe me if I sent you an email from ihope127@gmail.com and/or received an email there?
22:30:10 <ais523> it's a case of believing you but being unsure how much verification I need
22:30:53 <ais523> tswett: OK, I've verified that ihope127+w@gmail.com is ihope127
22:31:21 <ais523> from B Nomic archives
22:31:25 -!- Patashu has joined.
22:31:29 <ais523> so yes, we can do this by email
22:31:37 <ais523> I'll send, From: addresses can be forged
22:32:17 <tswett> All right.
22:33:51 <ais523> OK, sent
22:33:57 <ais523> it may well end up in with other B Nomic stuff
22:36:19 <tswett> Did you get an autoresponse instructing you to use a different contact method?
22:36:55 <HackEgo> [wiki] [[Special:Log/rights]] rights * Ais523 * changed group membership for User:Ihope127 from sysop to (none): Moving permissions to a different account, via IRC request (I've verified account ownership)
22:37:15 <HackEgo> [wiki] [[Special:Log/rights]] rights * Ais523 * changed group membership for User:Tanner Swett from (none) to sysop: Moving permissions to a different account, via IRC request (I've verified account ownership)
22:37:43 <ais523> I did now, it was a little slow
22:42:36 <elliott> that's not proof, tswett could have emailed that address and seen that it gives such an autoresponse prior
22:42:51 <tswett> But that's not what the verification was.
22:43:00 <elliott> oh
22:43:09 <tswett> The verification was that I knew the content of an email sent to that address.
22:44:09 <int-e> Advanced Account Accountability
22:44:20 -!- Tritonio has joined.
22:44:38 <ais523> elliott: I sent a randomly generated string to the address, tswett sent it back by IRC PM
22:44:48 <elliott> right
22:45:12 <elliott> how do you know he didn't just intercept it
22:45:23 <elliott> along its path to the destination
22:45:32 <int-e> There are no proofs.
22:45:45 <ais523> wiki is http, so someone who could do that could do the same to an admin password
22:45:48 <int-e> ais523 might be living in a simulation for all he knows. (if ais523 exists...)
22:45:49 <ais523> and take over an admin account that way
22:46:58 <FireFly> elliott: it's fizzie's domain that rot14's to 'nsa', not tswett's
22:47:30 <ais523> what does it say about me that I can reverse rot14 in my head? (albeit slowly)
22:47:52 -!- trout has quit (Ping timeout: 264 seconds).
22:48:10 <elliott> ais523: mail is more susceptible, though
22:48:36 <elliott> I mean compared to being an AS or something
22:48:49 <ais523> elliott: OK, so what you do instead is, you send a password reset for an admin
22:48:50 <ais523> and intercept that
22:49:07 <elliott> hmmm
22:49:12 <elliott> ais523: you don't get to choose either address there, though
22:49:17 <elliott> tswett got to choose the destination address here
22:49:39 <ais523> well, no, he had to pick an address that verifiably belonged to ihope127
22:49:43 <int-e> ais523: lbh pna ernq ebg guvegrra syhragyl?
22:50:42 <ais523> that isn't rot14 :-(
22:51:01 <int-e> Of course not, rot14 is too uncommon.
22:51:15 <ais523> oh, if it's rot13, the second word is "can"
22:51:16 <ais523> this seems promising
22:52:20 <ais523> "you can read rot thirteen fluently?"
22:52:25 <ais523> nah, still pretty slow
22:52:37 <ais523> would have been faster to just use a rot13 decoder
22:53:02 <ais523> but given the subject of the conversation, I pretty much had to do it manually
22:53:03 <int-e> (tbf I *did* use a rot13 encoder)
22:53:15 <ais523> encoding is much harder than decoding, if you're doing it manually
22:53:36 <int-e> egb13 is the only thing I recognize reliably.
22:53:41 <ais523> because you can guess words from a partial decoding
22:53:50 <int-e> (note the swapped letters ;) )
22:53:56 <ais523> 14 is harder than 12 because it's not trivially reversible
22:54:13 <ais523> well, rot26 and rot52, as are sometimes used on Slashdot, are easiest
22:54:39 <int-e> aka double-rot-13 and quadruple-rot-13?
22:55:29 <ais523> yep
23:03:12 <FireFly> You'd think it'd be more secure
23:03:19 <FireFly> á la triple DES
23:03:23 <tswett> Quadruple rot13 is actually less secure than triple rot13.
23:03:47 -!- callforjudgement has joined.
23:04:00 -!- ais523 has quit (Remote host closed the connection).
23:04:09 <tswett> rot13 is a so-called... uh, what's it called.
23:04:18 <tswett> Characteristic-2 automorphism, I think it's called?
23:04:24 -!- callforjudgement has changed nick to ais523.
23:04:35 <tswett> Which results in cancellative properties of iterations which are multiples of 2.
23:04:40 <ais523> *14 is harder than 13
23:05:27 <int-e> tswett: https://en.wikipedia.org/wiki/Involution_%28mathematics%29
23:05:50 <tswett> It's not just a -tion, it's an -ism!
23:05:54 <tswett> ...in the category of sets.
23:06:25 <int-e> I don't like all the abstract nonsense.
23:07:10 <olsner> `? category theory
23:07:25 <HackEgo> In category theory, category theory is a theory in the category of theories.
23:07:39 <ais523> theories form a category?
23:07:48 <tswett> Certainly.
23:08:00 <ais523> I can make them into a discrete category
23:08:07 <int-e> Oh, of course. There's work on embedding logics (theories) in other logics
23:08:09 <ais523> but I can't see an obvious way to add extra structure
23:08:18 <tswett> A morphism from a theory T to a theory U consists of a function from terms in T to terms in U, and a function from models of U to models of T, which are adjoint.
23:08:30 <tswett> OSLT.
23:08:40 <int-e> `? OSLT
23:08:40 <HackEgo> OSLT? ¯\(°​_o)/¯
23:08:46 <olsner> is that actually true? I was just putting words together to make it look good
23:08:52 <tswett> "or something like that"
23:10:05 <int-e> thanks, that helped
23:11:39 <tswett> "Adjoint" here means that given a term in T and a model of U, interpreting the term in T in the image of the model of U gives the same result as interpreting the image of the term in T in the model of U.
23:17:57 <ais523> olsner: it's category theory, it's hard to find something it doesn't apply to
23:18:06 <ais523> a few years in my research, I found something that wasn't a category
23:18:11 <ais523> and everyone was very surprised
23:28:01 -!- TieSoul_ has quit (Quit: No Ping reply in 180 seconds.).
23:28:52 -!- Sprocklem has quit (Ping timeout: 250 seconds).
23:29:25 -!- TieSoul has joined.
23:33:58 <tswett> Legend tells of categories that can't be represented as concrete categories.
23:35:10 <tswett> So, let's see if we can write a program in SLOBOL.
23:37:15 -!- ais523 has quit.
23:37:26 -!- ais523 has joined.
23:44:12 <tswett> You can probably do AND and OR, aye?
23:44:26 <tswett> This group is alive if and only if this group and/or this group is alive.
23:49:27 <FireFly> That sounds more like go than programming
23:49:41 -!- Frooxius has joined.
23:51:01 <tswett> It's Go programming.
23:51:36 <tswett> Simpler problem: make it so that group B is alive iff group A is alive.
23:53:58 -!- Sgeo has quit (Quit: Leaving).
23:55:31 -!- Sgeo has joined.
←2015-04-16 2015-04-17 2015-04-18→ ↑2015 ↑all