code logs -> 2022 -> Mon, 21 Feb 2022< code.20220220.log - code.20220222.log >
--- Log opened Mon Feb 21 00:00:35 2022
00:31 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [[NS] Quit: -a- Connection Timed Out]
00:31 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
01:06 gizmore [kvirc@Nightstar-30r12s.dip0.t-ipconnect.de] has joined #code
01:08 gizmore|2 [kvirc@Nightstar-m9l5qd.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
01:33 Vorntastic [uid293981@Nightstar-phvupn.irccloud.com] has joined #code
01:33 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
02:38 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [[NS] Quit: -a- Connection Timed Out]
02:38 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
02:54 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
02:54 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed]
03:31 Degi [Degi@Nightstar-83avur.pool.telefonica.de] has quit [Ping timeout: 121 seconds]
03:31 Degi [Degi@Nightstar-7cpqg6.pool.telefonica.de] has joined #code
05:09 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed]
06:55 Kindamoody[zZz] [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
08:01
<&McMartin>
"Why yes, I do my pixel art in emacs" https://bumbershootsoft.files.wordpress.com/2022/02/xpm-example.png
08:01
<&McMartin>
(I don't, but I usually apply tile palettes there)
08:40 Kimo|autojoin [Kindamoody@Nightstar-4o2.1v2.178.5.IP] has joined #code
08:40 mode/#code [+o Kimo|autojoin] by ChanServ
08:49 Kimo|autojoin [Kindamoody@Nightstar-4o2.1v2.178.5.IP] has quit [Ping timeout: 121 seconds]
11:00 abudhabi_ [abudhabi@Nightstar-2q9glf.adsl.tpnet.pl] has joined #code
11:01 abudhabi__ [abudhabi@Nightstar-ik74ah.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
11:16
<&Reiver>
hahahah wtf
11:16
<&Reiver>
That's grand
11:17
<&Reiver>
(And my instinct is 'that could be compressed very effectively indeed even with a fantastically primitive algorathm indeed')
11:19 * Reiver ponders how efficiently it could be done without having to get *clever* with, like, memory usage and such, just crude as-you-see it code.
11:20
<&Reiver>
(Does it matter? No. But it's fun to think on how small that whole set of 'pixels' could be represented in the simplest possible compression schemes.)
11:22
<&Reiver>
My first instinct is binary gif-style 'how many pixels in this row until I change color'; so eg ~32~,5,4,5,2,4,1,2,3,2,4,7,3,1,1,7,3,4,3,1,7,8,1,2,~whoknows~ could be the first line
11:22
<&Reiver>
... but of course any use of a fixed size integer runs the risk that you over-inflate compared to just running true binary bitpacking
11:24
<~Vorntastic>
Rle
11:24
<&Reiver>
?
11:24
<~Vorntastic>
Run length encoding
11:24
<~Vorntastic>
Or you could do the, uh
11:24
<&Reiver>
... oh boy I am out of practice with this lingo ain't I
11:25
<&Reiver>
Yeah, that's my first thought, but the fun question is 'how small can you make the int bytes so that they're not losing to a straight up set of ones and zeroes'
11:26
<&Reiver>
... actually now I want McMartin's source, I could have some small fun with this
11:27
<&Reiver>
It's possible you make teeny tiny integers and optimise for how long you need for a useful length... even if it means the runs of blackspace and final pixels end up being strings of, eg, 80808 to get them printed out... if it saves you enough bits elsewhere in the pattern, still worth it.
11:27
<~Vorntastic>
Pokemon does a thing where it switches to encoding changes instead of pixel values and then running RLE on that
11:27
<&Reiver>
This isn't even code, as such, it's /math/
11:27
<&Reiver>
How does it know to switch?
11:28
<~Vorntastic>
?
11:28
<&Reiver>
Oh I guess it allows itself more state doesn't it, duh
11:29
<&Reiver>
I want runlength encoding and absolute minimum of callbacks, even though I know that McM's hardware can handle things smarter than racing the beam
11:29
<~Vorntastic>
Retro Game Mechanics Explained has a video on Pokemon's thing
11:29
<&Reiver>
Oh neat
11:29
<&Reiver>
I may look it up, cheers
11:29
<~Vorntastic>
There's so little here the direct approach works
11:32
<&Reiver>
5-bit integers with runlength encoding?
11:32
<&Reiver>
... actually, hm
11:35
<&Reiver>
nope, this is the wrong time of night I am starting to miscount my base 2 numbers haha
11:35
<&Reiver>
Tad embarrasing, leave it til morning ol chum
11:36
<&Reiver>
You never hit 8 nor 16, silly boy, it goes 0 to 7 and 0 to 15, and today that level of math matters~
11:36 * Reiver will ponder this as a fun question once he is awake again and ... fresh on his next round of painkillers? Oh, this could be amusing for a while yet.
14:00 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
15:06 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:06 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:13 Vorntastic [uid293981@Nightstar-phvupn.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
16:58 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code
18:23 Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
18:23 mode/#code [+o Kimo|autojoin] by ChanServ
18:37 Kimo|autojoin is now known as Kindamoody
19:18 catalyst_ [catalyst@Nightstar-3j04n3.dab.02.net] has joined #code
19:21 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed]
19:22 catalyst_ [catalyst@Nightstar-3j04n3.dab.02.net] has quit [Ping timeout: 121 seconds]
19:23 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
20:45 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
21:06 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed]
21:06 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
21:29 celticminstrel [celticminst@Nightstar-84debl.dsl.bell.ca] has quit [Connection closed]
21:36
<&McMartin>
Reiver: The point is not to make it compact, though
21:37
<&McMartin>
The point is that you get to *draw in your text editor by setting it to a fixed-width font and putting your cursor into overwrite mode
21:39
<&McMartin>
If the goal is "I want to put compressed graphics into a textual format, and possibly one that, like XPM, is also a legal and valuable input into a C compiler", I did that back with Hex Inverter >_>
21:39
<&McMartin>
And you can just use PNG and JPG there; there's a stock tool that turns those into similar source code (just piles of hex, really)
21:41
<&McMartin>
It turns out there's no reason to occupy the space between "uncompressed text 'image', X Characters Per Pixel" and "full image editing suite, embed the image binary and a stock decoder in the final program"
21:41
<&McMartin>
And with modern resolutions that latter starts winning *real* fast because there's an extremely easy to use, actually public domain/CC0, stock decoder for PNG and JPEG that ends up being 50KB
21:42
<&McMartin>
... you'll save more than 50 KB in compression with nearly any image set targeting any resolution 720p or higher
21:56
<&McMartin>
If you're on the NES though, you lose a lot of options with most PCBs (including the one this project uses)
21:56
<&McMartin>
Graphics have to be in a fixed format and it's not compressed in any way; four colors in the palette, so two bits per pixel, inconveniently organized
22:07 celticminstrel [celticminst@Nightstar-84debl.dsl.bell.ca] has joined #code
22:07 mode/#code [+o celticminstrel] by ChanServ
22:07
<&McMartin>
So yeah, "how can I represent this more efficiently" isn't the question; the question is "how do I get from Aseprite" to https://github.com/michaelcmartin/bumbershoot/blob/master/full/lights_nes.s#L304
22:36 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
22:36 mode/#code [+o himi] by ChanServ
22:37 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
23:14
<&McMartin>
Reiver: Commentary above, but also if you want to play with XPM stuff yourself, the conversion utilities I use are at https://imagemagick.org/script/download.php#windows
23:14
<&McMartin>
The commands "convert whatever.png whatever.xpm" and "convert whatever-edited.xpm whatever-edited.png" will swap back and forth between the two formats.
23:14
<&McMartin>
(You will have much better luck with monochrome or 16-color PNGs)
23:28
<&Reiver>
Yeah no this was... how to compress your lovely hunk of text in a way that could presumably be recompiled with as-close-to-zero memory requirements and a trivial amount of code and processing time as possible
23:28
<&Reiver>
As a fun question of data density and math on algorathms
23:29
<&Reiver>
A form of retrocoding but with compression, as it were, lol
23:36
<&McMartin>
Ah yes
23:37
<&McMartin>
The answer there, alas, is basically "PNG" because it turns out we care a lot about this both historically and in the modern era!
23:37
<&McMartin>
There's a program called pngcrush that spins all the knobs PNG has inside to make things even smaller
--- Log closed Tue Feb 22 00:00:36 2022
code logs -> 2022 -> Mon, 21 Feb 2022< code.20220220.log - code.20220222.log >

[ Latest log file ]