😈 The Evil Ideas thread



  • @da-Doctah said in 😈 The Evil Ideas thread:

    Evil idea: Signs for doors that read "PUSH" or "PULL" in a fancy ambiguous font that could easily be read either way.

    I do not like the signs on glass doors when they are partly transparent.
    Because I can read quickly from quite odd directions - I read the text from behind far faster than I realize that I read it from behind...
    So they are evil enough already! But terrible fonts would make take a closer look, and then I might detect the reading angle faster than decipher the text - that would actually be good for me.
    😛


  • ♿ (Parody)

    da00901b-ab97-4b67-828b-ad540c960fa8-image.png


  • ♿ (Parody)

    a6caf459-9b99-4507-ad4e-b4170e7c40f3-image.png



  • @boomzilla and the file won’t even be very big while it does this since it doesn’t store all the intermediate cells along the way.


  • BINNED

    I was curious to see what the print preview would look like for LibreOffice Calc, but all it did was monopolise a CPU core trying.


  • Considered Harmful

    So the file format writer stores only cells that have data in them, but Print Preview schlemiels through the entire workbook until it finds cells to print.
    How can it be so wrong? :wtf:



  • @Applied-Mediocrity that depends on if there was any content in the earlier cells too.

    It’s possible the likes of A1 exist immediately (the file might not store them but the in-memory version probably does) but once you populate XFD1048576 the range of possible cells suddenly becomes very large and it seems that LibreOffice doesn’t handle the sparse allocation well in print preview by buttuming that there’s possibly something in between the 16 billion cells between A1 and XFD1048576.

    Which is for the WTF bites thread, I feel.



  • @Arantor It might be enough that it allocates something for all the pages that its trying to generate.


  • Considered Harmful

    @Arantor Granted, this is an edge case that is unlikely to happen unless on purpose. But spreadsheet programs are old as fuck, and the core concept hasn't changed. I'd have expected an optimization there even for just a couple blank pages.



  • @Applied-Mediocrity but you're looking at an awful amount of blank pages here, so just a few bytes per page might be enough.

    XFD is 23x26x26 + some small change i.e. about 15 000 rows, and 1 million columns. With default parameters, my Excel prints about 35 rows per page (in landscape mode) and 15 columns, so that's a printout of 400 pages high by 66 000 pages wide, for a whopping total of about 30 million pages! Meaning each and every byte you store per page costs 30 MB.

    So OK, a modern computer should be able to handle a couple hundreds of 30 MB chunks, but not that many "couples" and a hundred bytes per page for some sort of memory structure doesn't seem that big, even for an empty page.

    ETA: I mixed up rows and columns, but you could also print in portrait mode instead and would get about the same numbers per page.



  • @remi 16384 columns, you’re welcome.



  • @Arantor and by default it prints 10 columns (and 48 lines) per page in portrait, which ends up being even slightly worse than my previous botched landscape count (21 846 pages high and 1 639 pages wide, total 35 805 594 pages).

    ETA: actually print preview says 36 567 729 pages.


  • Considered Harmful

    @remi It's not the memory it eats, nor does it appear to be allocating and deallocating large chunks. It just hogs the CPU while it probably does a linear search of A1:$last, which says "nope, no cell here" 16 billion times. Instead, it could iterate only over the cells known to have data, and since they aren't ordered, sweep for yet unmarked neighboring cells up to the required page size, taking into account that unused cells have a known constant width and height.



  • @Applied-Mediocrity fair enough. And, as my ETA in the previous post shows, Excel itself has no problem generating the print preview. It doesn't show it by default (I'm guessing above a certain size, it assumes it might take too long?) but when clicking the button to do the needful, it barely takes a couple of seconds to show it and then the whole thing works as well as can be expected in this situation (I can navigate to the last page and it shows the last cell etc.).

    So I'd say this one is more likely LibreOffice being... well, LibreOffice. :mlp_shrug:

    ETA: also, Excel sticks to about 100 MB of used memory so it doesn't seem to have any memory issues with blank pages. Looks like someone at MS did things properly, for once!



  • @Arantor said in 😈 The Evil Ideas thread:

    @boomzilla and the file won’t even be very big while it does this since it doesn’t store all the intermediate cells along the way.

    Unless you do an evil and, after you put a 0 there, change the font style of that last column and row. Then it stored all of that. Ask me how I know... Ok, it wasn't the last last one, but it was a bunch of pages down.



  • @Benjamin-Hall said in 😈 The Evil Ideas thread:

    @Arantor said in 😈 The Evil Ideas thread:

    @boomzilla and the file won’t even be very big while it does this since it doesn’t store all the intermediate cells along the way.

    Unless you do an evil and, after you put a 0 there, change the font style of that last column and row. Then it stored all of that. Ask me how I know... Ok, it wasn't the last last one, but it was a bunch of pages down.

    If you change just that one cell, it won’t hydrate everything, but if you fill in a full row and a full column, it behaves badly…



  • @Arantor said in 😈 The Evil Ideas thread:

    @Benjamin-Hall said in 😈 The Evil Ideas thread:

    @Arantor said in 😈 The Evil Ideas thread:

    @boomzilla and the file won’t even be very big while it does this since it doesn’t store all the intermediate cells along the way.

    Unless you do an evil and, after you put a 0 there, change the font style of that last column and row. Then it stored all of that. Ask me how I know... Ok, it wasn't the last last one, but it was a bunch of pages down.

    If you change just that one cell, it won’t hydrate everything, but if you fill in a full row and a full column, it behaves badly…

    Yeah. And it doesn't even need to be actual visible content. The case I ran into it (a friend was wondering why he couldn't transfer this simple XLSX file to Google sheets (IIRC, I don't remember the exact issue he was having, but it was borked)...Because he'd accidentally selected way too much and changed the font color and style. Had to go in to the underlying xml and edit it by hand to remove all the offending cells.



  • @Benjamin-Hall formatting counts as cell content so that shit gets hydrated. It’s good fun, but at least being XML it is at least a format you can do something with, without getting lost in a maze of binary bullshit.



  • @Arantor said in 😈 The Evil Ideas thread:

    @Benjamin-Hall formatting counts as cell content so that shit gets hydrated. It’s good fun, but at least being XML it is at least a format you can do something with, without getting lost in a maze of binary bullshit.

    Yeah. Thing is, if it had been actual cell contents, I'd have been able to see it. Or maybe he'd have been able to see it. It wasn't until I wondered "why the heck is this file so darn big" and extracted the xml that I figured out why it was borking all the imports into other programs (or whatever was going on).



  • @da-Doctah said in 😈 The Evil Ideas thread:

    Evil idea: Signs for doors that read "PUSH" or "PULL" in a fancy ambiguous font that could easily be read either way.

    Push sounds like the Portuguese world for pull (puxe)



  • @Arantor said in 😈 The Evil Ideas thread:

    @Applied-Mediocrity that depends on if there was any content in the earlier cells too.

    It’s possible the likes of A1 exist immediately (the file might not store them but the in-memory version probably does) but once you populate XFD1048576 the range of possible cells suddenly becomes very large and it seems that LibreOffice doesn’t handle the sparse allocation well in print preview by buttuming that there’s possibly something in between the 16 billion cells between A1 and XFD1048576.

    Which is for the WTF bites thread, I feel.

    Maybe it's grinding that hard to figure out if XFD1048576 should appear as 0.1299998 print dots or 0.1299999



  • @Arantor said in 😈 The Evil Ideas thread:

    @remi 16384 columns, you’re welcome.

    No one should need more than 640 columns.

    -- Bill Gates


Log in to reply