--- Log opened Sat Feb 24 00:00:19 2018 |
00:39 | | Jessikat [Jessikat@Nightstar-hmqe21.dab.02.net] has joined #code |
00:40 | | Derakon[AFK] is now known as Derakon |
00:49 | | celticminstrel [celticminst@Nightstar-gil1m1.dsl.bell.ca] has joined #code |
00:49 | | mode/#code [+o celticminstrel] by ChanServ |
01:39 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
01:39 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
03:35 | | Vornlicious [Vorn@Nightstar-hhn8bt.sub-174-211-0.myvzw.com] has quit [[NS] Quit: Bye] |
03:35 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
04:28 | | Jessikat` [Jessikat@Nightstar-g3k6pr.dab.02.net] has joined #code |
04:30 | | Jessikat [Jessikat@Nightstar-hmqe21.dab.02.net] has quit [Ping timeout: 121 seconds] |
05:57 | | Derakon is now known as Derakon[AFK] |
06:35 | | celticminstrel is now known as celmin|sleep |
06:43 | | Vornlicious [Vorn@Nightstar-ahpk55.sub-174-211-7.myvzw.com] has joined #code |
06:44 | | * McMartin gets digital audio out of the Genesis/Mega Drive. |
06:44 | <&McMartin> | I am now Significantly More Impressed with Shiny Entertainment. |
06:45 | <&McMartin> | The Genesis sound chip is basically a Sound Blaster with a slightly later generation of Adlib, and no DMA for the digital audio channel. |
06:45 | <&McMartin> | Which means that if you want to do digitized sound effects you have to cycle-count your updates at the same time as keeping the synths playing the BGM. |
06:46 | <&McMartin> | And a lot of (especially early) Genesis games have noticable music hitches whenever there's a sound clip |
06:46 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
06:46 | <&McMartin> | But EWJ is completely seamless about it all. |
06:47 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
06:50 | < Vornlicious> | Ewj? |
06:50 | <&McMartin> | Earthworm Jim |
06:51 | < Vornlicious> | Aha |
06:51 | <&McMartin> | Did you see any of my five lines before that? |
06:51 | < Vornlicious> | I should have guessed that from Shiny |
06:52 | < Vornlicious> | From getting digital audio out to noticeable music hitches |
06:52 | <&McMartin> | And then the EWJ line, yeah, OK, you missed nothing |
06:53 | <&McMartin> | Because you are here three times and only disconnected twice. |
07:15 | <&McMartin> | New Bumbershoot post. https://bumbershootsoft.wordpress.com/2018/02/24/getting-ready-for-genesis-development/ |
07:24 | < Vornlicious> | Why are GCC chain assemblers so awful? |
07:24 | <&McMartin> | I don't know, but they have a *spectacular* talent for picking the worst syntax that anyone else ever promulgated. |
07:25 | <&McMartin> | And it generally isn't the chip manufacturer |
07:25 | <&McMartin> | Hence, AT&T syntax for Intel chips, instead of, you know, Intel syntax |
07:25 | <&McMartin> | I don't even know what the fuck for 68k |
07:25 | <&McMartin> | It uses a5@ instead of (a5), and then a5@+ and a5@- for (a5)+ and -(a5) |
07:25 | <&McMartin> | (Dereference, dereference post-increment, dereference pre-decrement) |
07:26 | <&McMartin> | (check out that fuckin' predecrement) |
07:26 | < Vornlicious> | (I don't get how it's supposed to tell) |
07:26 | <&McMartin> | (There is no postdecrement) |
07:26 | <&McMartin> | (So you can tell because it's a -) |
07:27 | <&McMartin> | (But ffs, the assemblers of the 80s and 90s put it on the side it happened on.) |
07:28 | <&McMartin> | If I were of a conspiracy-minded bent, I would suspect that gas is always horrific bullshit as an attempt to prevent people from using feeding the output of their glorious free software tools to evil closed-source backends. |
07:29 | <&McMartin> | Backing me up in this conspiracy theory was that the GCC steering committee resisted having a usable and serializable intermediate representation so hard it *forked the project for years* |
07:29 | <&McMartin> | With egcs being the ones who wanted to use something sane |
07:29 | <&McMartin> | And who, as a result, ultimately got enough actual support to subsume the original gcc. |
07:30 | <&McMartin> | But, well, yeah |
07:30 | <&McMartin> | To date my experience with gas is with x86, x86_64, m68k, and arm |
07:30 | <&McMartin> | and in no case do they actually use the manufacturer's syntax. |
07:33 | < Jessikat`> | gcc is explicitly built to thwart people trying to modularise it so probably |
07:33 | | Jessikat` is now known as Jessikat |
07:33 | < Jessikat> | (hence clang exists) |
07:36 | <&McMartin> | Anyway, clearly my TODO list now includes "record myself saying 'BUMBERSHOOT' in a variety of goofy voices so I can make an appropriately 90s splash screen" |
07:36 | <&McMartin> | gimple did eventually happen at least |
07:42 | < Vornlicious> | I'll see if I can get vash and I to record some umbrella themed harmony for you |
07:42 | < Jessikat> | :) |
07:42 | < Jessikat> | That's awesome |
07:45 | <&McMartin> | I'm using XPM as an intermediate graphics format -_- |
07:47 | <&McMartin> | Anyway, yeah, earthworm jim. |
07:48 | <&McMartin> | Cycle-counting out and I think actually mixing multiple PCM audio streams while also running an FM synth soundtrack... |
07:48 | <&McMartin> | ... on a Z80. |
07:48 | <&McMartin> | Because while the 68000 might be eight times as powerful it's got more important things to do! |
08:54 | | Jessikat [Jessikat@Nightstar-g3k6pr.dab.02.net] has quit [Ping timeout: 121 seconds] |
08:57 | <&McMartin> | Here's some fun comparisons of a bunch of games that used PCM for a bunch of things |
08:57 | <&McMartin> | https://www.youtube.com/watch?v=2W4yTL-9gZE |
08:58 | <&McMartin> | Ending with Toy Story and "WTF IS GOING ON HERE" because Toy Story actually managed to build a full-ass MOD player on a sound chip with no DMA |
08:58 | <&McMartin> | (And, it turns out, did it by managing the MOD decoding almost entirely on the 68k side and doing huge numbers of tiny transfers to the Z80's RAM.) |
09:14 | | Jessikat [Jessikat@Nightstar-ec5qvt.dab.02.net] has joined #code |
09:14 | | Jessikat [Jessikat@Nightstar-ec5qvt.dab.02.net] has quit [The TLS connection was non-properly terminated.] |
09:14 | | Jessikat [Jessikat@Nightstar-ec5qvt.dab.02.net] has joined #code |
09:47 | | Kindamoody[zZz] is now known as Kindamoody|out |
10:01 | | macdjord is now known as macdjord|slep |
11:34 | | Jessikat` [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
12:16 | <&ToxicFrog> | XPM ♥ |
12:16 | <&ToxicFrog> | It has been a long time since I've seen that format. |
12:17 | < Vornlicious> | Goodness |
13:01 | | Jessikat [Jessikat@Nightstar-ec5qvt.dab.02.net] has quit [Ping timeout: 121 seconds] |
13:27 | | Jessikat` [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed] |
13:38 | <&ToxicFrog> | And source code published: https://github.com/ToxicFrog/nono |
13:49 | | Jessikat [Jessikat@Nightstar-5a6fb2.dab.02.net] has joined #code |
15:25 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
15:25 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
15:25 | | Vornlicious [Vorn@Nightstar-ahpk55.sub-174-211-7.myvzw.com] has quit [[NS] Quit: Bye] |
15:25 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
15:29 | | Degi [Degi@Nightstar-orn9ji.dyn.telefonica.de] has joined #code |
15:29 | <~Vornicus> | Things I wish for in html, vol. 53: <template src=...> |
15:32 | <&[R]> | You can sort of do that now |
15:32 | <~Vornicus> | ? |
15:34 | <&[R]> | Ah no, I misunderstood |
15:41 | <&[R]> | Presumably you could abuse invisble iframes to immitate it for now |
15:57 | | celmin|sleep is now known as celticminstrel |
15:58 | <~Vornicus> | iframes are quite limited in that sense |
16:05 | <@celticminstrel> | What would that tag actually do? |
16:05 | <&[R]> | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template |
16:05 | <@celticminstrel> | Oh it already exists. |
16:06 | <&[R]> | Yeah |
16:06 | <&[R]> | It just lacks the src="" bit |
16:06 | <@celticminstrel> | Right. |
16:18 | <~Vornicus> | WHich if it existed would be *super* great but as it is it's just all right |
16:31 | | Degi [Degi@Nightstar-orn9ji.dyn.telefonica.de] has quit [Connection closed] |
16:38 | | Kindamoody|out [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
18:05 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
18:36 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
18:36 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
19:14 | | macdjord|slep is now known as macdjord|sushi |
20:04 | | Jessikat` [Jessikat@Nightstar-p8o959.dab.02.net] has joined #code |
20:07 | | Jessikat [Jessikat@Nightstar-5a6fb2.dab.02.net] has quit [Ping timeout: 121 seconds] |
20:12 | | Kindamoody|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code |
20:12 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
20:12 | | Kindamoody|autojoin is now known as Kindamoody |
20:37 | | macdjord|sushi is now known as macdjord|stuffedToBursting |
20:44 | <&[R]> | I'm attempting to make a math parser, right now I have a tokenizer function that generates an array of strings. Like [ '1d6', '+', 'Str', '+', '4' ], but I'd also like to be able to handle operator precedence, so I'm guessing I'll want to make some kind of tree data structure. I could draft something up myself, but I was wondering if anyone had any advice and/or gotchas? |
20:45 | <&McMartin> | If you're using a dynamic language like Python or JS or similar, note that nested lists are technically a handy tree data structure |
20:45 | <&[R]> | However, I have an additional constraint beyond just evaluating the math: I want to print out a string representation of the simplified math without the dice rolling being called. |
20:45 | <&[R]> | Yeah, this is pure JS |
20:46 | <&McMartin> | Evaluating a tree, in whole or in part, is basically what an interpreter is |
20:46 | <&[R]> | Eg: The above string could end up having Str = 3, so the resulting display string would be: '1d6+7' |
20:47 | <&McMartin> | yep, you're building a terp |
20:47 | <&[R]> | Terp? |
20:47 | <&McMartin> | Interpreter |
20:47 | <&[R]> | Alright |
20:47 | <&McMartin> | No real caveats. For things like Str there you'll need a side map when evaluating |
20:48 | <&McMartin> | For looking up values for the names |
20:48 | <&[R]> | So my next step is to try and group things that need to be grouped right? |
20:48 | <&[R]> | Yeah, that'll be handled seperately |
20:48 | <&McMartin> | That's one way; the other way would be to build the tree outright |
20:48 | <&McMartin> | If you have it broken up like that, you've basically made a lexer and are turning it into a parser |
20:49 | <&[R]> | I'm unfamiliar with the differences in that terminology |
20:49 | <&McMartin> | One ugly but harmless thing is that you can end up with something like [[[[2]] + [[3]]]] |
20:49 | <&McMartin> | They're just names for parts of a compiler frontent |
20:49 | <&McMartin> | *frontend |
20:49 | | * [R] has taken no post-secondary math or computer courses |
20:49 | <&McMartin> | lexers basically turn characters into words. You've got that |
20:50 | <&McMartin> | parsers impose structure on that |
20:50 | <&McMartin> | But you can parse at the letter level if you want. |
20:50 | <&McMartin> | You haven't, so don't~ |
20:50 | <&McMartin> | It's a good problem to work on; have a crack at it and see how you do. |
20:51 | <&[R]> | Alright, I have to head out pretty soon, so I'll focus on it when I get back |
20:51 | <&[R]> | Thanks |
20:52 | <&[R]> | My initial idea is to go through by operator order. So find all the parens, group those first, then find all the multiplications and divisions and group those, etc... |
21:04 | <&McMartin> | It turns out that you can actually do this parsing from left to right, flawlessly, while only paying attention to what the next token will be. |
21:04 | <&McMartin> | Should you find yourself struggling, I can go into that later |
21:04 | <&McMartin> | But I too need to head out pretty soon |
21:19 | <&jerith> | [R]: This is a problem that is best solved by using an existing parser library if you're doing it For Serious, but it's also a really good exercise to figure out yourself and gain a real understanding of what's involved. |
21:43 | <&[R]> | I found PEG.js, I'll use that if I give up here |
22:00 | | macdjord|stuffedToBursting is now known as macdjord |
22:12 | <@celticminstrel> | Is there some way to force Firefox to do something that normally throws a SecurityError? |
22:12 | <@celticminstrel> | Or do I have to recreate my tab? |
22:13 | | * celticminstrel is trying to clear a tab's history, but history.pushState won't work because the subdomain is different from the currently active page. |
22:13 | <@celticminstrel> | Or replaceState I guess is the one I actually want. |
22:14 | <@celticminstrel> | There should really be something like a sudo mode for the console though, to avoid SecurityError. :/ |
22:17 | <&jerith> | There's a reason it's a SecurityError. |
22:17 | <@celticminstrel> | I know. |
22:17 | <@celticminstrel> | But I just want to run it once in the console for my own purpose so that this tab doesn't have any history. |
22:18 | <@celticminstrel> | I think the developer console should be considered a "trusted source" for code. |
22:18 | <&jerith> | But if you can do it, so can Mallory's XSS or whatever. |
22:18 | <@celticminstrel> | Eh? |
22:18 | <@celticminstrel> | It's my browser, so why can't I do it? |
22:19 | <@celticminstrel> | (Mind you, if there were just a history.clear() we wouldn't even have this problem.) |
22:20 | <&jerith> | Same reason you don't want a backdoor in your crypto, even if it's your backdoor. |
22:20 | <@celticminstrel> | This has nothing to do with crypto. |
22:20 | <@celticminstrel> | What I'm describing is no different from entering a URL in the URL bar. |
22:20 | <@celticminstrel> | Except that it doesn't save the previous page in history. |
22:22 | <@celticminstrel> | (Also I have no idea what this XSS or whatever means.) |
22:22 | <&jerith> | If you can manipulate the history across domain boundaries, you can screw with things that look stuff up in the history or whatever. |
22:22 | <&jerith> | XSS is cross-site-scripting. |
22:22 | <@celticminstrel> | That applies evein if you can manipulate history within domain boundaries. |
22:23 | <@celticminstrel> | ^even |
22:24 | <&jerith> | I'm not really clear on exactly what the implications of history modification are. |
22:24 | <@celticminstrel> | Well, in any case, ideally I'd just want a simple way to clear history on a single tab. :/ |
22:25 | <&jerith> | But I trust that the browser developers have sensible reasons for disallowing it across domain boundaries. |
22:25 | <@celticminstrel> | I guess I have no choice this time but to create a new tab and close the old one. >< |
22:25 | <@celticminstrel> | Oh, I'm sure there are sensible reasons to disallow it when the code is coming from the web. |
22:25 | <@celticminstrel> | But I don't see why it can't be allowed when you literally typed in the code yourself. |
22:25 | <&jerith> | Why do you want to clear the history instead of creating a new tabb? |
22:26 | <&jerith> | -b |
22:26 | <@celticminstrel> | It's more convenient. Especially when the tab is pinned. |
22:26 | <@celticminstrel> | ...or wait, maybe especially when it's not pinned? I'm not quite sure all of a sudden. |
22:26 | <@celticminstrel> | Still, the point is... it's more convenient. |
22:40 | <&jerith> | https://developer.mozilla.org/en-US/docs/Web/API/Window/history seems to be the relevant documentation. |
22:41 | <@celticminstrel> | That's probably what I was looking at. |
22:41 | <@celticminstrel> | Or something similar at least. |
22:44 | <&jerith> | The intention of the API isn't to muck abobut with history. It's to make the history work with dynamic client-side stuff. |
22:45 | <&jerith> | So there's no way to actually remove a history entry. |
22:45 | <&jerith> | Well, not without navigating through it or something. |
23:02 | <@celticminstrel> | Well obviously there's a way to remove one, because that that happens every time you click a link. |
23:54 | <&[R]> | I think I got it |
23:54 | <&[R]> | http://rpgb.nobl.ca/tok.js |
23:54 | <&[R]> | Now to do the evaluation |
--- Log closed Sun Feb 25 00:00:20 2018 |