code logs -> 2017 -> Sat, 25 Feb 2017< code.20170224.log - code.20170226.log >
--- Log opened Sat Feb 25 00:00:39 2017
00:03
<~Vornicus>
What.
00:04 * McMartin is reading old computer manuals, which were... of a different attitude
00:04
<~Vornicus>
Apparently!
00:13
<&McMartin>
AHA
00:13
<&McMartin>
Unlike Commodore, the wacky technique for machine language linking speccies used was part of their BASIC manual
00:14
<&McMartin>
... and pre-Spectrum "newline" was assigned codee 0x76 instead of, say, 0x0a or 0x0d so that it could only shadow the HALT instruction, which ordinary code would never use
00:14
<&McMartin>
Which is great until your machine language program wants to, say, print a newline
00:15
<&McMartin>
NULL bytes are fine, because NULL is actually space
00:16 Kindamoody is now known as Kindamoody[zZz]
00:43 LadyOfLight` [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
00:45 LadyOfLight`` is now known as LadyOfLight
00:50
<&McMartin>
"Functions are practically indistinguishable from sausage machines but there is a difference: they work on numbers and strings instead of meat."
00:52 * ToxicFrog considers making a haggis burrito
00:52
<&[R]>
TIL there's a sausage machine capable of displaying PNG formatted porn on an LCD screen.
00:54
<~Vornicus>
Modern industrial machinery is inadequate unless it can play DOOM, seriously
05:37 * McMartin makes some progress with his Z80 hacking.
05:40
<&McMartin>
Type-in programs are way weirder when half the interesting bits are the graphics characters on the keyboard: https://hkn.eecs.berkeley.edu/~mcmartin/screenshots/zx81_typing.png
05:41
<&McMartin>
But I've been able to get a reasonable display, which started in BASIC and has been getting migrated bit by bit to machine code: https://hkn.eecs.berkeley.edu/~mcmartin/screenshots/zx81_screen.png
05:41
<&McMartin>
But then machine code lives in the BASIC program crammed into REM statements, which gets more than a little bit weird: https://hkn.eecs.berkeley.edu/~mcmartin/screenshots/zx81_ml.png
06:00
<~Vornicus>
what the shit
06:05 LadyOfLight` [catalyst@Nightstar-9q05n6.dab.02.net] has joined #code
06:09 LadyOfLight [catalyst@Nightstar-3r4knu.dab.02.net] has quit [Ping timeout: 121 seconds]
06:12 LadyOfLight` is now known as LadyOfLight
06:16
<&McMartin>
Once a REM statement won't fit on the entire screen all at once the ROM will hard-lock while attempting to display the current program editing status
06:16
<&McMartin>
So that will become An Issue shortly, but that's where my alternate techniques will come in
06:16
<&McMartin>
(Also shown: the lack of a SYS command, so you instead use RANDOMIZE USR)
06:26
<&McMartin>
But yeah, the more I learn of how much of this didn't change going forward, the more I'm convinced that Speccy fandom is based primarily on Stockholm Syndrome
06:28 macdjord|wurk is now known as macdjord
06:31
<~Vornicus>
what the heck is "randomize usr" supposed to do
06:33
<&McMartin>
USR is "call out to machine language function at target address and return the value in the register BC"
06:34
<&McMartin>
But USR isn't a statement, it's an expression
06:34
<&McMartin>
So you take the result and "do nothing" with it by using it to reseed the RNG.
06:35
<&McMartin>
Sinclair BASIC, as I outlined a night or three ago, is preposterously hardcore about statements vs functions because you in fact directly type bytecode in at the keyboard.
06:35 * Vornicus pokes around in Tiled, thinks he's figured a few things out
06:35
<&McMartin>
That's why the REM statement is full of random commands and function names; those are bytes corresponding to command tokens.
07:13
<&McMartin>
Awww yeah, just reached the point where the ROM soft-locks.
07:15
<~Vornicus>
utterly silly.
07:15
<&McMartin>
It's clearly a soft-lock, not a hard-lock
07:15
<&McMartin>
It tries to scroll the screen such that the line fits on the screen
07:15
<&McMartin>
And it can't, because it can't.
07:16
<&McMartin>
Current program size: 464 bytes
07:17
<&McMartin>
Already too large to run without a RAM expansion pack
07:17
<~Vornicus>
how much ram did this thing have
07:18
<&McMartin>
stock, 1KB. Everyone expanded it to 16KB, though.
07:18
<&McMartin>
The thing is, even with 1KB
07:18
<&McMartin>
You had a 32x24 screen, which, for reasons I will get to, was actually stored with a stride of 33
07:18
<&McMartin>
And then there were delimiters on both ends...
07:19
<&McMartin>
Leaving you 230 bytes for any program
07:19
<&McMartin>
This thing is less friendly than the Atari 2600.
07:19
<&McMartin>
To compensate for "230 bytes for the entire program, what is wrong with you" aspect, those delimiters are because if there *isn't* at least 8KB of expansion RAM, the screen is actually stored as a ragged array.
07:20
<&McMartin>
So it can be as short as 26 bytes long.
07:20
<~Vornicus>
the 2600, it was like the NES, you only got 128B ram but you could address the cartridge at will, right?
07:20
<&McMartin>
One of the reasons to insist on the 16KB expansion is that it means that it's actually feasible to walk around screen memory with offsets of +/-1 and +/-33
07:21
<&McMartin>
That's right, though unlike the NES the total addressable space was 8KB instead of 64, so as to save on IC packaging costs
07:21
<&McMartin>
The ZX81 is from 1981, and having an extra half-dozen pins was no longer a significant expense.
07:21
<~Vornicus>
interesting how three wires costs that much
07:21
<&McMartin>
1977 was, apparently, a grim time.
07:21
<~Vornicus>
Apparently!
07:22
<&McMartin>
(It also did not attach the interrupt pins.)
07:23
<&McMartin>
"The 6507 was only widely used in two applications, the best-selling Atari 2600 video game console and the Atari 8-bit family floppy disk controllers for the 810 and 1050 drives."
07:23
<&McMartin>
Did I say half-dozen pins? I meant an entire dozen.
07:24
<&McMartin>
28-pin vs. 40-pin packages, it seems.
07:24
<~Vornicus>
dang
07:25
<&McMartin>
Anyway, I've got screen setup, text display, and keyboard reading working properly.
07:26 * Vornicus definitely does have Tiled figured out to the point where Vornball might be able to use it.
07:38
<~Vornicus>
yaaaaas
07:41
<~Vornicus>
I can in fact hand write tileset files.
07:42
<~Vornicus>
not that I typically *want* to, but for many things I'll want to write the collision masks.
07:53 celticminstrel is now known as celmin|sleep
08:09
<@himi>
Hah
08:10
<@himi>
My program running crazy slow on my raspberry pi that took seconds on my laptop?
08:10
<@himi>
/Not/ the same queries being run on the sqlite database
08:10
<@himi>
Amazing the difference that index coverage makes
08:16
<~Vornicus>
slightly
08:38
<~Vornicus>
Ok nice. SVG does what I need too.
08:44 LadyOfLight [catalyst@Nightstar-9q05n6.dab.02.net] has quit [[NS] Quit: Bye]
08:54 Kindamoody[zZz] is now known as Kindamoody
09:02
<@abudhabi>
WTF, dropbox. Y U take up all of my swap?
09:04
<~Vornicus>
person on another network has the name "Della" and I keep misreading it as "Delia" and then thinking of TW's project that I don't remember what it does "DELIA GLOBE SILVER"
09:09
<&McMartin>
/me shaves 3 bytes off his program-so-far and it no longer soft-locks the ROM to try to list it.
09:09 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has quit [Ping timeout: 121 seconds]
09:12 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has joined #code
09:12 mode/#code [+o Alek] by ChanServ
09:18
<&[R]>
"Soft-locks the ROM"?
09:19
<&[R]>
Also congrats, that sounds impressive at least
09:24
<~Vornicus>
He's writing for the ZX series of computers
09:25 * [R] was aware it wasn't a modern system
09:25
<~Vornicus>
Look approx. 4 hours back, he explains it.
09:35 LadyOfLight [catalyst@Nightstar-9q05n6.dab.02.net] has joined #code
09:35 Kindamoody is now known as Kindamoody|afk
09:56 * abudhabi sighs at landlord company.
09:57
<@abudhabi>
They appear under the mistaken impression that everyone is a skilled user of the internet. Or that only such people live under their roof.
09:57
<@abudhabi>
They changed the way laundry machines work two weeks ago. Before, it was just walk in, write your room number on a chart, launder then.
09:58
<@abudhabi>
It wasn't a perfect system, but workable, even if there were sometimes instance of people washing in other people's reserved times.
09:58
<@abudhabi>
The notice they sent was only by email.
09:58
<@abudhabi>
When I returned from my business trip, I get asked by someone, why doesn't the washing machine work?
09:59
<@abudhabi>
And now two other people are clueless and wondering the same thing.
10:00
<@abudhabi>
What you have to do is show up DURING WORKING HOURS at the company office downtown, pay up a deposit for a token and maybe some cash for washing machine reservations, since they're no longer free to use.
10:00
<@abudhabi>
Then you have to go on the internet and use their webpage to reserve a time.
10:01
<@abudhabi>
A 60+ daytime-employed person, of which there are several living here, is going to have at least three problems with this.
10:23 LadyOfLight` [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
10:39
<&jerith>
You have to go to a building in a different part of the city in order to gain access to a machine in the building you live in?
10:39
<&jerith>
That's insane.
10:39
<@TheWatcher>
Sounds to me like they just want to close down the laundry, frankly
10:48 macdjord is now known as macdjord|slep
10:48
<@abudhabi>
jerith: Yes. If someone works in say, Sandvika, then the whole turnaround could take up to 4 hours. Welcome to either having a kind boss or having to take out a holiday just to be able to continue doing laundry.
10:50
<&[R]>
Organize an angry mail campaign?
10:50
<@abudhabi>
I already sent a complaint about it on behalf of the non-internety people.
10:51 * abudhabi is also annoyed because the machine that he reserved is broken, and found out only after it started spewing water everywhere.
10:52
<@abudhabi>
For a large company that owns 20 buildings, this is retardedly incompetent.
12:25 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
12:32
<@TheWatcher>
https://twitter.com/SwiftOnSecurity/status/835353645097095168 ... yep
12:35 LadyOfLight`` [catalyst@Nightstar-m16mu5.dab.02.net] has joined #code
12:37 LadyOfLight [catalyst@Nightstar-9q05n6.dab.02.net] has quit [Ping timeout: 121 seconds]
12:41
< LadyOfLight`>
D:
12:41
< LadyOfLight`>
wat
12:42 * LadyOfLight` spits on /r/n then detects it anyway
12:47
<&jerith>
"/r/n"?
12:47
<&[R]>
Why...? Ugh.
12:48
<&[R]>
And on the OS with the worst disk performance too
12:49
< LadyOfLight`>
Windows (well, DOS) line endings are /two characters/
12:49
< LadyOfLight`>
line-feed, newline
12:50
< LadyOfLight`>
so if I'm counting which line I'm on when lexing, I need to keep track of that
12:51
<&[R]>
\r\n is the DOS order. \n\r is old mac IIRC.
12:51
<&[R]>
\n is *NIX
12:51
< LadyOfLight`>
Fortunately, no-one who cares about programming uses apple products
12:59
<&[R]>
lol
12:59
<@abudhabi>
Not willingly anyway.
13:02
<&ToxicFrog>
I thought old mac was just \r
13:02
<&ToxicFrog>
LadyOfLight`: open file in text mode :D
13:06
< LadyOfLight`>
?
13:07
< LadyOfLight`>
huh
13:21
<&jerith>
I've seen all four variants (\r, \n, \r\n, \n\r) in the wild.
13:21
<&jerith>
Once, excitingly, all in one file.
13:22
< LadyOfLight`>
Have them culled
13:22
<&jerith>
That was output from some ancient program that got passed through several other ancient programs.
13:24
<&jerith>
Fortunately I could ignore empty lines, so I just split on "\r" and "\n" and threw away empty lines.
13:27
< LadyOfLight`>
error: no match for 'operator[]' (operand types are 'symbol_ptr {aka std::shared_ptr<const symbol>}' and 'symbol_ptr {aka std::shared_ptr<const symbol>}')
13:27
< LadyOfLight`>
but
13:28
<&ToxicFrog>
LadyOfLight`: text mode IO (ostensibly) translates all OS-specific newlines in the file into \n in memory (and vice versa)
13:29
<&ToxicFrog>
So if you know you're going to be processing text...
13:29
< LadyOfLight`>
it's actually moot at this moment since I'm reading it off the command line xD
13:35
<&ToxicFrog>
...huh. That's actually something I'd never thought about.
13:35
<&ToxicFrog>
If you pass something a multi-line string in argv on windows, does it use \n or \r\n newlines?
13:36
<&ToxicFrog>
(*can* you pass something a multi-line string in argv on windows? from the command line, I mean, not using CreateProcess())
13:38
< LadyOfLight`>
I doubt it
13:39
< LadyOfLight`>
oh
13:39
< LadyOfLight`>
hm
14:34
< LadyOfLight`>
Well, this is the furthest I've managed to get with this interpreter yet
14:46 * Azash kneads temples
14:47
<@Azash>
I do like testing with Robot a lot, but as soon as you abandon its carefree default approach of referring to elements with little to no context included, trying to stay on top of page structure and especially managing your sixty billion xpath locators becomes more work than the tests themselves
14:47
<@Azash>
I wonder if I could do a company blog post about the efforts on this project because this is the third major refactor in six months because of this specific issue and I think it's starting to get sorted
14:48
<@Azash>
Alternatively, come up with a non-garbage external tool to do it
14:49
<@Azash>
14:51 < LadyOfLight`> Fortunately, no-one who cares about programming uses apple products < I'll disagree but my facetiousness filter is out of commission right now
15:45 celmin|sleep is now known as celticminstrel
15:48
<&jeroud>
I love my macbook. It's Sufficiently Unixy.
15:53 * LadyOfLight` is being remarkably facetious
16:54 LadyOfLight`` [catalyst@Nightstar-m16mu5.dab.02.net] has quit [[NS] Quit: Bye]
17:57 LadyOfLight` is now known as LadyOfLight
20:03 Kindamoody|afk is now known as Kindamoody
20:07
<&McMartin>
I think I've got this working
20:08
<&McMartin>
Except my PRNG is being called a too-predictable number of times, so the puzzles aren't random enough, but that's easy enough to fix.
20:14
< LadyOfLight>
:)
20:22
<&McMartin>
Got it.
20:22
<&McMartin>
So the final program is 710 bytes long.
20:23
<&McMartin>
But the full program is 1641 bytes long, and because of the insanity of its screen memory I'm not yet sure if it will run right on systems without a full 16KB adapter.
20:41 macdjord|slep is now known as macdjord
20:48
<@Azash>
McMartin: Why not just build your PRNG on top of /dev/random?
20:49
<&McMartin>
... because it is program written in Z80 assembler running directly on the hardware of a kit computer sold in 1981 in the UK?
20:51 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:52 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:54
<@Azash>
McMartin: It was not really meant to be taken seriously
21:02 * McMartin tests. "Yep, looks like it doesn't run in 2K, though it does successfully load, at least. 4K is fine."
21:02
<&McMartin>
With the default 1K it doesn't even load~
21:03
<&McMartin>
Huh, and the ROM softlock bug is no longer triggered either. It must only happen if the screen boundary hits a keyword.
21:05
<&McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/screenshots/zx81_ml2.png
21:06
<&McMartin>
It's still not *happy about it*
21:06
<&McMartin>
But it's not trapped in an infinite loop trying to display it, either.
21:07
<&McMartin>
I have a few ideas re: how to make this less stupid that have gotten good results from initial tests.
21:08
<&McMartin>
(once that happens it's still basically the same program but when you LIST it it just says 10 RAND USR 16528)
21:09
<&McMartin>
ToxicFrog: The "backslash at the end of a line" trick doesn't work in cmd.exe. I don't know about powershell. I would expect those newlines to be stripped from argv entirely, but for them to appear as 0d 00 0a 00 as bytes inside GetCommandLineW().
21:10
<&McMartin>
argv parsing happens as its own step inside the console CRT0 and does not happen for Windows-windows apps. There's a separate API call for doing the parsing yourself, and standard practice IME is to keep all encoding at UTF-16 all the way down while so doing.
22:28
<@gnolam>
https://www.youtube.com/watch?v=73h4cjTeX44 <- Monster 6502
22:35 * McMartin got to see that running Apple Integer BASIC live a few months back.
23:50 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has quit [Ping timeout: 121 seconds]
23:54 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has joined #code
23:54 mode/#code [+o Alek] by ChanServ
23:59
<&McMartin>
Success
23:59 * McMartin now has a sane-looking program listing.
--- Log closed Sun Feb 26 00:00:40 2017
code logs -> 2017 -> Sat, 25 Feb 2017< code.20170224.log - code.20170226.log >

[ Latest log file ]