code logs -> 2013 -> Thu, 19 Sep 2013< code.20130918.log - code.20130920.log >
--- Log opened Thu Sep 19 00:00:25 2013
--- Day changed Thu Sep 19 2013
00:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
00:31 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
00:34 You're now known as TheWatcher[T-2]
00:37 You're now known as TheWatcher[zZzZ]
01:25 Turaiel[Offline] is now known as Turaiel
01:55 ktemkin[awol] is now known as ktemkin
01:57 himi [fow035@Nightstar-36db723c.ffp.csiro.au] has joined #code
01:57 mode/#code [+o himi] by ChanServ
02:08
<&McMartin>
Oh man, I'm a bad person
02:08 * McMartin reorders basic blocks in this assembler code to shave six bytes off.
02:12 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Client exited]
02:14
<@Azash>
There are many ways to define it but yours is neat
02:15
<&McMartin>
Is that at me?
02:15
<@Azash>
Yeah
02:15
<&McMartin>
Now, the code is "bad" to begin with
02:16
<&McMartin>
I just realized that I can also reorganize them so that all branches respect standard control structure
02:16
<&McMartin>
But I can elide some jump instructions because I have an IF-THEN right before a WHILE, more or less...
02:16
<&McMartin>
... and then there's another IF inside the WHILE.
02:17
<&McMartin>
I can actually organize it so that the THEN clause of the if points to space between the WHILE and have it fall through.
02:17
<@Azash>
What are you working on?
02:17
<@Azash>
Nice
02:17
<&McMartin>
(A lot of these IFs result in an immediate function exit)
02:17
<&McMartin>
Music engine for the VIC-20. >_>
02:18
<@Azash>
Ooh, nice
02:18
<&McMartin>
It's super-basic, but I think I've just gotten it down to 159 bytes.
02:18
<&McMartin>
With this optimization.
02:18
<@Azash>
^_Ë
02:19 * McMartin has named it SoundNaif.
02:20
<&McMartin>
Sadly, this design doesn't convert well to the C64. The VIC's sound chip is so primitive that there's a lot of "empty space" I don't need to manage.
02:20
<@Azash>
Come up with an initialism for MUCHADO
02:20
<&McMartin>
Because it's About Nothing?
02:21
<&McMartin>
Oh man
02:21
<&McMartin>
I wonder if Rennaissance Chiptunes would even work
02:21
<@Azash>
I was alluding to the tiny size of it
02:21
<&McMartin>
(I have it playing meth-addled Bach now as its test suite)
02:21
<&McMartin>
Sadly, this is Kind Of Big
02:21
<&McMartin>
People that do sound-chip-abusingly-awesome players have fit their player and their songs into 100 bytes
02:22
<&McMartin>
I can't compete with the best of the demoscene~
02:22
<@Azash>
Ah
02:22
<@Azash>
Well, you have to start somewhere, right? :P
02:22
<&McMartin>
Yes, but that's also why a first effort has a more humble name >_>
02:26
<&McMartin>
But I'm a little concerned about complexity
02:26
<&McMartin>
Because this minuet is only, well, about a minute long
02:26
<&McMartin>
And it's a half-kilobyte of data
02:26
<&McMartin>
If I'm supposed to be surreptitiously added to another program here, that's a hefty footprint.
02:27
<&McMartin>
(The VIC-20 has all of 3.5KB of usable RAM)
02:27
<@Azash>
McMartin: If the instruction can jump by relative address, is there any way for you to use obscure XOR magic to amalgate jumps into less commands overall?
02:27
<&McMartin>
Only conditionals can do that, so while you can do this to save one byte per if you know for a fact a certain flag is a certain way...
02:28
<&McMartin>
... the reordering thing lets me *eliminate jumps entirely*, which is always gonna be best.
02:28
<@Azash>
True
02:28
<&McMartin>
XOR magics don't work on the 6502 because register pressure is too high, more or less.
02:29
<@Azash>
Ah, right
02:30
<&McMartin>
(Also, this branch of the chip is BRA-less)
02:30
<&McMartin>
I think only the Honeywells had that.
02:51 Turaiel is now known as Turaiel[Offline]
03:04 Thalass|KSP is now known as Thalass
03:23 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:06 Xires is now known as ^Xires
04:07 Turaiel[Offline] is now known as Turaiel
04:13 Thalass [thalass@Nightstar-4ab061cc.bigpond.net.au] has quit [Ping timeout: 121 seconds]
04:22 ^Xires [xires@Nightstar-c54fd8cd.feedthetrolls.net] has quit [Client closed the connection]
04:28
<&McMartin>
OK, that optimization pass ultimately managed to trim off 46 bytes of filesize and 75 bytes off of runtime footprint.
04:28 ^Xires [xires@Nightstar-c54fd8cd.feedthetrolls.net] has joined #code
04:29
<@Azash>
Nice!
04:30
<&McMartin>
There are some disadvantages, but for what I think the main application is going to be, that won't be a problem.
04:30
<&McMartin>
The biggest disadvantage is that I removed the init code entirely, moving .bss into the file itself and preloading it with hardcoded init values.
04:31
<&McMartin>
So I lose the ability to switch between multiple songs and I lose the ability to start the song over from scratch if you quit and then restart the program.
04:31 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
04:31 mode/#code [+ao Derakon Derakon] by ChanServ
04:31
<&McMartin>
But for "I need a thing that plays a background music for my demo" that's a perfectly valid set of things to sacrifice.
04:31 Kindamoody[zZz] is now known as Kindamoody
04:32
<@Reiv>
If you quit and restart the program, why would it not restart the song?
04:34
<&McMartin>
Because the variables that track where you are in the song are set by the act of loading the program and are modified in place.
04:35
<&McMartin>
Remember, this is an old micro. When a program quits back to BASIC it doesn't leave memory.
04:35
<&McMartin>
You can edit or list it or whatever at will.
04:35
<&McMartin>
And so RUN leaves the memory in the state it was in, basically going back to the beginning of the program.
04:36
<&McMartin>
And I ripped out the part that says "copy sensible initial values into these locations that you will then use as your state"
04:36
<&McMartin>
And instead says "just use that place where the sensible initial values were kept *as* the state"
04:38
<&McMartin>
If you *reload the program from disk or tape* then it will restart the song.
04:38
<&McMartin>
But there's no code anymore for "set the playback pointer to the beginning of the song"
04:38
<@Reiv>
Aaaah.
04:38
<@Reiv>
And doing so would be heavy on the bytes.
04:38
<&McMartin>
That's about 75 bytes of stuff, yeah
04:38
<@Reiv>
That's a lot of bytes.
04:39
<&McMartin>
67 bytes for the code, and then eight for having to have a way of saying "this is the song that you should load in"
04:39
<&McMartin>
Then the actual state - "where am I in this song" - is 29 bytes.
04:39
<&McMartin>
That didn't used to be in the file, I just said "use some RAM I didn't load into to keep this stuff"
04:39
<&McMartin>
But while running you're still paying double price for initial and later.
04:40
<&McMartin>
That's totally fine on, like, a C64
04:40
<&McMartin>
But this particular computer only has 3.5KB of space.
04:40 ktemkin is now known as ktemkin[z]
04:40
<&McMartin>
75 bytes is *a lot*
04:41
<&McMartin>
And then I also managed to trim out 6 bytes just by reorganizing the code, which made a couple of instructions entirely redunant
04:41
<&McMartin>
Basically, if I reordered some stuff the code looked like...
04:41
<&McMartin>
10 PRINT "DO STUFF"
04:41
<&McMartin>
20 GOTO 30
04:41
<&McMartin>
30 PRINT "DO OTHER STUFF"
04:41
<&McMartin>
And hey, I can just drop line 20~
04:42
<@Reiv>
yeah
04:42
<&McMartin>
(The "do stuff" includes a bunch of IFs and WHILEs, so it was not immediately obvious that you could drop it like in this example)
04:42
<@Reiv>
So any further savings would be architectural in nature?
04:42
<&McMartin>
p. much
04:42
<&McMartin>
I'm happy with the player now
04:42
<&McMartin>
Now I need to actually compose some stuff. >_>
04:43
<&McMartin>
For I have been challenged to write a chiptune!
04:43
<@Reiv>
Are you competing with the best of 'em yet?
04:44
<&McMartin>
Ahahaha, not even close
04:44
<@Reiv>
Feed your program its own source code
04:44
<&McMartin>
I'm aiming for "fail to embarass self"
04:44
<@Reiv>
Make it musically brilliant
04:44
<&McMartin>
That would be terrible
04:44
<@Reiv>
Victory
04:44
<&McMartin>
In part because literally half of all values you can send in are rests
04:45
<&McMartin>
Also, because my work here would not be the focus of the program it was made part of
04:45
<&McMartin>
This *also* means I have to use a different assembler than the one I prefer.
04:45
<&McMartin>
One that misses features I like a lot =(
04:45
<&McMartin>
But I've managed to do the translation to it, so oh well
04:45
<@Reiv>
....BIP!....BOP!... ... ... BIP!
04:45
<&McMartin>
Yeah, no thanks~
04:46
<&McMartin>
Unfortunately, the chiptune I've had running through my head lately has already been composed by someone else~
04:46
<&McMartin>
And I'm also not sure what kind of tempo the dude wants
04:47
<&McMartin>
(Said chiptune is http://www.youtube.com/watch?v=NiAgWhgp_mw )
04:47
<&McMartin>
(My engine does not have frame-level appregios or pitch bends, in part due to the hilariously grim limits on the VIC-20 sound chip)
04:48
<&McMartin>
(It only has seven bits to store the frequency, and on the high end you actually have bumping the value by one moving you more than a half-step.)
04:48
<&McMartin>
(So all VIC-20 chiptunes are slightly out of tune.)
04:49
<@Reiv>
Can you force that out of it~
05:04
<@celticminstrel>
Geh, I can't figure out which CSS rule is causing paragraphs to have an indent on the first line... :|
05:06
<@celticminstrel>
Trying to get rid of it because while it's nice for paragraphs it's also showing up in undesirable places, such as list items or code stretches.
05:07
<&McMartin>
Reiv: Can "one" - yes, but not in a hundred bytes while doing something else
05:07
<&McMartin>
Can I? No. I started doing VIC work yesterday~
05:09 Derakon is now known as Derakon[AFK]
05:09
<@celticminstrel>
And Firefox's inspect doesn't seem to be useful since first line is not a real element...
05:09
<@celticminstrel>
...
05:10
<@celticminstrel>
There's a text-indent attribtue...
05:10
<@celticminstrel>
<_<
05:10
<@Reiv>
McMartin: So basically your goal here is 'lightweight as possible, so the other dudes can do their own magic'?
05:20 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
05:21
<&McMartin>
Yeah
05:23 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
05:24 gnolam [lenin@Nightstar-f7705974.cust.bredbandsbolaget.se] has quit [[NS] Quit: Gone]
05:54
< Syka>
internet is shitstorming
05:54
< Syka>
heh
05:55
< Syka>
hmm
05:55 Syka [the@Nightstar-38afacc8.iinet.net.au] has quit [[NS] Quit: leaving]
05:55 Syka [the@Nightstar-38afacc8.iinet.net.au] has joined #code
06:01 Turaiel is now known as Turaiel[Offline]
06:04 ErikMesoy|sleep is now known as ErikMesoy|
06:07 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
06:07 mode/#code [+qo Vornicus Vornicus] by ChanServ
06:13 ErikMesoy| is now known as ErikMesoy
06:17 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
06:17 mode/#code [+o gnolam] by ChanServ
06:53 ^Xires is now known as Xires
06:53 Kindamoody is now known as Kindamoody|out
07:39 celticminstrel is now known as celmin|Zzzzzz
08:25 gnolaptop [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
08:26 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [Operation timed out]
08:28 gnolaptop is now known as gnolam
08:28 mode/#code [+o gnolam] by ChanServ
08:35 gnolaptop [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
08:38 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [Ping timeout: 121 seconds]
08:40 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
08:43 VirusHome [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
08:45 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
08:46 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
08:46 gnolam is now known as NSGuest15761
08:47 gnolaptop [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [Operation timed out]
08:54 himi [fow035@Nightstar-36db723c.ffp.csiro.au] has quit [Ping timeout: 121 seconds]
08:55 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
08:56 gnolam is now known as NSGuest25837
08:57 NSGuest15761 [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [Operation timed out]
09:05 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
09:06 gnolam is now known as NSGuest47114
09:07 NSGuest25837 [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [Operation timed out]
09:11 xybre [xybre@2B12AA.26C322.29F919.944077] has quit [Ping timeout: 121 seconds]
09:11 xybre [xybre@2B12AA.26C322.29F919.944077] has joined #code
09:13 NSGuest47114 is now known as gnolam
09:13 mode/#code [+o gnolam] by ChanServ
09:16 gnolaptop [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
09:17 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [Operation timed out]
09:20 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
09:20 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
09:20 gnolaptop is now known as gnolam
09:20 mode/#code [+o gnolam] by ChanServ
09:22 xybre [xybre@2B12AA.26C322.29F919.944077] has quit [Ping timeout: 121 seconds]
09:22 xybre [xybre@2B12AA.26C322.29F919.944077] has joined #code
09:26 gnolaptop [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has joined #code
09:27 gnolam [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [Operation timed out]
09:27 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
09:28 mode/#code [+o PinkFreud] by ChanServ
09:32 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
09:33 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
09:33 mode/#code [+o PinkFreud] by ChanServ
09:50 gnolaptop [lenin@Nightstar-b19b2ac3.addr.tdcsong.se] has quit [[NS] Quit: Vi skall visa dig vikingatiden]
10:12 You're now known as TheWatcher
10:16 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
10:21 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
10:21 mode/#code [+o PinkFreud] by ChanServ
10:25 Thalass [thalass@Nightstar-4ab061cc.bigpond.net.au] has joined #code
10:30 xybre [xybre@2B12AA.26C322.29F919.944077] has quit [Ping timeout: 121 seconds]
10:30 xybre [xybre@2B12AA.26C322.29F919.944077] has joined #code
10:31
< xybre>
Is it just me getting disconnected randomly?
10:32 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
10:32 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
10:32 mode/#code [+o PinkFreud] by ChanServ
10:33 Thalass is now known as Thalass|afk
10:34
<&McMartin>
No
11:04 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
11:10 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
11:10 mode/#code [+o himi] by ChanServ
11:36 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
11:42 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
11:42 mode/#code [+o PinkFreud] by ChanServ
12:20 * xybre has join/parts disabled, so yeah
13:24 Thalass|afk is now known as thalass
14:19 Turaiel[Offline] is now known as Turaiel
14:37 thalass [thalass@Nightstar-4ab061cc.bigpond.net.au] has quit [[NS] Quit: The meme o the day is talkin like a pirate, ye blaggards!]
14:49 VirusHome is now known as Pandemic
14:49 mode/#code [+o Pandemic] by ChanServ
14:53 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
16:00 celmin|Zzzzzz is now known as celticminstrel
16:15 gnolam [lenin@Nightstar-0fcc80a0.tbcn.telia.com] has joined #code
16:15 mode/#code [+o gnolam] by ChanServ
17:22 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Operation timed out]
17:24 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
17:36 Kindamoody|out is now known as Kindamoody
17:51 celticminstrel [celticminst@Nightstar-5d0169f9.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
18:09 Kindamoody is now known as Kindamoody|afk
18:43 Turaiel is now known as Turaiel[Offline]
19:33 Kindamoody|afk is now known as Kindamoody
20:26 Kindamoody is now known as Kindamoody[zZz]
21:08 TheSpaceWolf [NSwebIRC@Nightstar-a5c117d1.akrnoh.sbcglobal.net] has joined #code
21:08 TheSpaceWolf [NSwebIRC@Nightstar-a5c117d1.akrnoh.sbcglobal.net] has left #code [""]
21:23 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
21:23 mode/#code [+ao Derakon Derakon] by ChanServ
21:23 * Derakon blehs at the microscope.
21:23
<&Derakon>
I tell it to do something 20 times in a row, it very consistently does it 15 times properly and then 5 times wrong.
21:24
<&Derakon>
There's clearly something different about those last five times, but damned if I can figure out what it is...
22:13
<&Derakon>
The especially annoying part is that if I make a smaller control script to just do those things, it works flawlessly every time, so some aspect of the greater system is interfering, and I've no idea what it is.
22:14 gnolam [lenin@Nightstar-0fcc80a0.tbcn.telia.com] has quit [[NS] Quit: Gone]
22:27
<&Derakon>
Argh, how can a component behave differently when there is literally no difference in how it's bein invoked? >.<
22:27
< ToxicFrog>
to the strace and/or wireshark as appropriate?
22:28
<&Derakon>
I don't suspect network shenanigans here; I have logging on both sides of the connection.
22:28
<&Derakon>
This is main program telling program on secondary computer to tell hardware to do something.
22:29
<&Derakon>
And when I do this within the main program's normal framework, we get 15 perfect executions and 5 fuckups.
22:29
<&Derakon>
When I run it from a special debugging function, I get 20 perfect executions.
22:30
<&Derakon>
So clearly the special debugging function is different in some important way, but I'm logging everything the secondary computer is doing and AFAICT there's no difference.
22:30
< ToxicFrog>
How is it telling the hardware to do the thing
22:30
< ToxicFrog>
?
22:31
<&Derakon>
Python -> C++ -> third-party library -> PCI card.
22:32
<&Derakon>
(The hardware in question is a DSP card that we just tell to send certain outputs along its digital and analog output lines, with specific timings; the issue is that it is ignoring analog actions starting with rep #16)
22:33
<&Derakon>
There is, admittedly, a difference in the exact actions we tell it to perform at rep #16; a rounding error causes an action that used to be performed at the end of the previous rep now occurs at the beginning of the current rep.
22:34
<&Derakon>
But, again, works fine when run in a special debugging function that just mimics all the calls to that secondary computer.
22:37
<&McMartin>
In other news, bleh
22:37
<&McMartin>
xa65 is a kind of annoying assembler to use
22:38
<&McMartin>
Clearly solving the same problems as Ophis, but his solutions were all different enough that translating between the two is hard~
22:38
<&McMartin>
It's more mainstream in its decisions, but the mainstream was wrong
22:38 * Derakon blarghs, determines that his conscious mind is out of ideas.
22:47 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
22:55 ErikMesoy is now known as ErikMesoy|sleep
23:03 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:03 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:38 Xon2 [Xon@9C034E.A7474E.446F1A.DEA144] has joined #code
23:38 Xon [Xon@9C034E.A7474E.446F1A.DEA144] has quit [Ping timeout: 121 seconds]
--- Log closed Fri Sep 20 00:00:08 2013
code logs -> 2013 -> Thu, 19 Sep 2013< code.20130918.log - code.20130920.log >

[ Latest log file ]