« first day (3687 days earlier)      last day (93 days later) » 

12:00 AM
The PNG loads as an image in Ren-C as expected, and Red's DECOMPRESS/ZLIB does the above transformation, but I can't get GUNZIP to produce the same
#{
89504E47
0D0A1A0A

0000000D
49484452
00000001000000030806000000
52DD6582

0000000F
49444154
789C63608083F894A8FF00046A021D
54C10693

00000000
49454E44
AE426082
}
(the full PNG)
 
12:17 AM
posted on December 04, 2020 by rgchris

Should this be permitted? Here is an annotated PNG: #{ 89504E47 ; PNG Signature 0D0A1A0A ; Integrity Check 0000000D ; Chunk Length 49484452 ; Chunk Name (IHDR) 00000001 ; Width 00000003 ; Height 08 ; Colour Depth 06 ; Colour Type 00 ; Compression Method 00 ; Filter Method 00 ; Interlace Method 52DD6582 ; Chunk CRC 0000000F ; Chunk Length

 
 
2 hours later…
2:01 AM
R3A really doesn't like file:///
 
 
2 hours later…
4:18 AM
@rgchris That is a zlib envelope. use ZINFLATE
"The gzip format is used in HTTP compression, a technique used to speed up the sending of HTML and other content on the World Wide Web. It is one of the three standard formats for HTTP compression as specified in RFC 2616. This RFC also specifies a zlib format (called "DEFLATE"), which is equal to the gzip format except that gzip adds eleven bytes of overhead in the form of headers and trailers."
ZINFLATE is INFLATE with /ENVELOPE 'ZLIB... GUNZIP is INFLATE with /ENVELOPE 'GZIP. By default INFLATE and DEFLATE have no envelope information. There is also a detect option:
>> inflate/envelope #{789C63608083F894A8FF00046A021D} 'detect
== #{00000000000000000000005F645AFF}
Generally speaking, I feel this level of compression handling benefits from being specific about what you are doing. INFLATE and DEFLATE are as best I can tell the name for the shared algorithm--separate from what CRC or information to hint you at the decompressed size so you know how big a buffer to make.
 
4:51 AM
At higher levels, I've had some thoughts about "ephemeral" formats as a default, where if you say something like checksum that you could get something with a signature in it that's specific to the current running session. Then it will match against checksums you do in that same session. It would pick some "good enough" checksum of the day that was available.
But if you tried to serialize it, and load it and use that checksum in another run, it would recognize you'd done this and complain and say "hey, that was an ephemeral checksum. If you really want to be saving and loading it back and having it match over time, you need to specify which method you use"
Anyway, point is that's a lead in to why I don't think DETECT is a cognitively good default for decompressing when you have to be aware or specify the method when you are compressing. It creates cognitive problems that wind up biting everyone down the line.
I might be able to be convinced that INFLATE and DEFLATE should default to the zlib checksum, with envelope options 'GZIP 'ZLIB and 'RAW. But I felt like saying you have no envelope by default and then having GZIP and ZLIB as options for adding one made more sense.
And historically speaking, DEFLATE the algorithm has nothing to do with zlib headers or the adler32 hash: en.wikipedia.org/wiki/DEFLATE
 
 
9 hours later…
1:36 PM
@HostileForksaysdonttrustSE Why are GZIP and GUNZIP rolled out into their own functions? Are they that much more common?
 
 
3 hours later…
4:39 PM
@rgchris Specialization is cheap, not any great reason not to.
 
 
2 hours later…
6:35 PM
posted on December 04, 2020 by hostilefork

So... browsers aren't making it easy to use SharedArrayBuffer--a requirement for the pthreads web build. This is due to something called COOP/COEP. It's making what was already some tough work to turn on threads even tougher: https://web.dev/coop-coep/ (What I see is a lot of half-baked security theater, where the answer is putting flags on things saying "yes, I meant to use t

 
 
2 hours later…
8:55 PM
Single Pixel PNG Generator—a small distraction
 
9:06 PM
@rgchris Even taking small examples like this for case study to try and make them "ideal" is worth it. I'll point out that checksums are all BINARY! now, as that helps avoid signed/unsigned issues.
‌>> checksum-core 'CRC32 #{1010}
== #{CA10AC16}
The core offers CRC32 and ADLER32 as they come built in with zlib. The CRYPT extension is required for everything else.
I wasn't sure about the + and +/- in ENBIN but I think over time I've decided that's actually kind of getting at "the point", to use things in such ways.
 
@HostileForksaysdonttrustSE I guess that's the line that was breaking in the latest Ren-C (pasted into Ren Garden), otherwise works there too
 
I want to be able to use the crypt stuff from JS, so all the interesting hashes, and give people a kind of "interactive cryptography playground".
But we need to divide it up so extensions can be loaded dynamically in JS, that's a bit of a trick with "side modules"; it can be done. The C#-in-the-browser does a DLL simulation of sorts, we could rig something up too.
I want to break it up so that the console is loaded dynamically. So you can load the interpreter into your page to power it with code via PARSE and such, and not load a console unless you need it...then have it pop on the screen with debugging ability after being fetched on demand.
To bring this back to the point above ^-- I think there's a lot of interesting JS features that are probably being held back by being spread too thin between two builds; and we should let go of pthreads and aim for improving the experience with stackless...that gives benefits across the board and will ultimately eliminate asyncify's bloat.
Focusing on stackless means focusing on helping the native builds too.
 
9:32 PM
@HostileForksaysdonttrustSE That's what I trying a couple of years ago
@HostileForksaysdonttrustSE I also wanted to do that as well so we could finish the chat migration from here
 
10:09 PM
@GrahamChiu Well a lot hinges on knowing the architectural decisions and which way the wind is blowing. Webassembly stuff is still breaking every other day, and all the APIs have "don't bet on this not changing", so it's still hard to make plans. But I think the plan is shaping up and will shape up more with a remote debugging infrastructure in place.
> "Reports that say that something hasn't happened are always interesting to me, because as we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don't know we don't know."
> "And if one looks throughout the history of our country and other free countries, it is the latter category that tends to be the difficult ones."
As far as big picture architecture goes...remote debugging is the current known unknown that I want pinned down, along with rules for iterator holds and releases.
I lean to thinking that we aren't necessarily served that well by the GC free-for-all where nothing has lifetime control via scope.
But I've mentioned this need to kind of keep a clarity about not boxing in the constructs so we wind up getting "the syntax strictness of pure functional programming, without having any of the actual benefits of pure functional programming"...
And in terms of avoiding the worst of both worlds situation, that holds too for lifetime scoping...where we'd have "all the fiddly details of lifetime and borrow checking of Rust, without any of the actual memory security guarantees of Rust"
It's hard to draw inspiration from the current leading edges while not having any of their foundations, kind of a mad puzzle, but when I see usages of things like ENBIN it reminds me what the baby in the bathwater is.
Our minimum bar in underlying execution model would be "don't be worse than CPython". But if that's all we can pull off that's kind of sad, because we aren't under the constraints of compatibility they are.
 

« first day (3687 days earlier)      last day (93 days later) »