News for hackers. Stuff that matters.

ryantriangles

Re:Entire website in a single HTML file on Friday December 24, 2021 @11:59AM (#29675203)
An epub is indeed a zip file containing HTML, CSS, font, image, and metadata files.

I'd argue that that's not meaningfully different to OP's suggestion of a HTML file with all the content inlined, though. It's still a single file grouping everything required together and can be easily edited and read practically anywhere. It has a few advantages over the inlined-content HTML file, too:

- You can read the compressed file directly, an epub being typically half the size of the uncompressed files (going by a quick test of 30 randomly-selected files I had on hand).

- Storing the actual JPEG, PNG, OTF, etc files inside the zip is more efficient than inlining them as base64 and then making the browser decode them, in terms of both speed and filesize.

- While reading an epub, different sections can be a different HTML files, and only one needs to be loaded into memory at a time. This can be irrelevant for smaller things but it can make a big difference sometimes--with pages that include many charts and tables, documentation for graphics libraries that include images and animations for each documented function, etc.

- Epub files have native support for highlighting and bookmarking, to keep your place in long documents and share the file with your highlights attached.

Re:Git ls-files is Faster Than Fd and Find on Sunday November 21, 2021 @04:52PM (#29300112)
Everything's approach has important tradeoffs: the indexing service must be run as administrator/root, and by reading the USN journal it gives users a listing of _all_ files and mtimes on the filesystem regardless of directory permissions. That means that any user who can run a file search can also see every other users' files, which includes their partial web history (since most browsers, including Firefox and Chrome, cache data in files named for the website they're from, and the mtime will often be the last visit time). If you want to avoid this, you can only switch to Everything's traditional directory-traversal-based index, which has the same performance as updatedb/mlocate, Baloo, or fsearch.

I think these tradeoffs are why there hasn't been as much interest in replicating it, combined with the fact that mlocate/fd/find/fsearch are already a lot faster in most circumstances than the default Windows search and good enough for the most common use cases (although there are certainly usecases where they're not).

Re:Rust for Windows on Saturday January 23, 2021 @03:21AM (#25880627)
Here's the colormap I use, which I've made sure never has too-bright colors on the near-white background: https://pastebin.com/raw/AdR3sBSs

Microsoft publish a tool in the Windows Terminal GitHub repo, ColorTool.exe[1], which can turn iTerm2 color scheme files into Windows Terminal ones. That might be your best bet because there are huge repositories of good iTerm2 schemes[2] and really slick tools to quickly make your own with live previews.[3]

[1] https://github.com/Microsoft/Terminal/tree/main/src/tools/Co...

[2] https://github.com/mbadolato/iTerm2-Color-Schemes

[3] https://terminal.sexy/

It seems madness to give your card to someone to take off somewhere. In Australia they either bring you a terminal to touch at the table (for a fancier place), or you touch the terminal on your way out (for a casual place).
Debit payments are around 3x as popular as credit payments here and there is, last I heard, a 50-50 split between using cards and phones to make them. There's an interesting demographic association to it as well, credit is much much more popular with older people (50+). Every few months you see a "millennials are killing the credit card industry" fuss.
Re:Netflix Now Streaming AV1 on Android on Thursday February 06, 2020 @01:32AM (#22253898)
Not all of them, hardware AV1 has been rolling out over the last year. LG include hardware AV1 decoding in two of their TV lines now (OLED ZX and NanoCell). MediaTek's new SOCs include it, and they're being used in Xiaomi, Nokia, and Motorola phones this year. Amlogic's TV and set-top box SOCs, used in things like the Amazon Fire TV as well as Android smart TVs and dedicated media players, include it. Realtek's TV SOC with hardware AV1 support ships "early 2020."

Hardware AV1 decoding is available on some Android devices right now, and will ship with a lot more over the course of the year. So it seems the perfect time to ship an AV1 option behind an opt-in setting, which is what they've done. If you don't have hardware support and it's not worth the battery drain then you don't have to select it and there's no way they're removing H.264 support anytime soon.

Re:Building all of our new mobile apps using React Native on Thursday January 30, 2020 @06:17PM (#22197048)
Is there a difference now? Websites in Safari ask me to pay with an Apple ID popup that takes my fingerprint and charges me exactly the same way apps do, I don't see any difference in how it appears or is handled.
Re:The iPad Awkwardly Turns 10 on Wednesday January 29, 2020 @10:49AM (#22181793)
"just going to be a big iPhone (...) lay back in bed and casually browse the web, read magazines, watch movies, play games? On something with a decently large screen" -- isn't that just a big iPhone, then? Especially now that the iPhones are fairly large themselves, and mobile layouts are almost universal. I have an iPad, but I've never really found a good use for it. Web browsing, reading, and watching videos I find more comfortable on a phone (or a Kindle) I can hold in one hand. The form factor of the iPad combined with its touch screen means I can never find a comfortable way of holding it long-term.

To me the big draw of the iPad is that it combines the simplicity of a phone OS with a screen that can render large fonts and still be usable. That's great for people with poor eyesight, like my grandparents, who can fit only a few words at a time onto a 5" phone display and who find the Windows interface frustrating (being full of small buttons, accidentally-pressed keyboard shortcuts, things minimizing to the tray, and multiple windows containing multiple tabs). As someone lucky enough to have escaped that problem so far the iPad exists in a strange halfway point between a laptop (large, powerful, keyboard-equipped, capable of running and doing anything) and a phone (comfortable, portable, long-lasting) that's never quite right for the job.

Admittedly I've never used the Pencil which I imagine can be quite nifty.

Re:Microsoft Is Killing ePub Support in Edge Classic on Friday August 30, 2019 @06:54AM (#20837409)
I have to say I disagree there. "Our program for handling HTML+CSS content should handle HTML+CSS content stored in containers" is a much more reasonable idea than "Our program for opening containers should also handle whatever content is inside those containers." It's a common thing for programs to do. VLC plays videos in zip files and RetroArch plays games in zip files, for example.

And I don't think reading a book and browsing the web are fundamentally different activities. They're near-identical. The web was created as a way to access documents consisting of text, images, and links to other points within the current document or to other documents. A book is a document consisting of text, images, and links to other points within the current document (endnotes, footnotes, "see page X") or to other documents (references/citations). The UX and features you'd want for a book reader are the same you'd want for a browser's Reader Mode, as implemented by Edge, Firefox, and Safari. I don't see any difference between reading an ePub file and reading a long article on a website.

Popular video file players have supported generating iframe tracks for fast forwarding and thumbnail scrubbing for many years now, is there something about the way eg MPCBE and PotPlayer operate that is somehow unreasonable?
Re:H.264 is magic (2016) on Friday May 24, 2019 @01:11AM (#19998668)
libx264 isn't used as a decoder, it only encodes.
Re:YouTube Demonetizes Anti-Vaccination Videos on Saturday February 23, 2019 @07:49AM (#19233110)
There is a crackdown on falsely promoting junk food as healthy or promoting it to people who don't know better (namely children). Maybe not on YouTube, but in various countries' legislation.

http://news.bbc.co.uk/2/hi/health/6154600.stm

https://www.wsj.com/articles/SB106919100053167300

https://publications.parliament.uk/pa/cm200304/cmbills/110/0... (Section 3)

It's not really a fair comparison, though. The main issue with anti-vaccination content is dangerous misinformation, not simply promoting something harmful. The other issue is that the people who fall for this content aren't usually the ones who get hurt, their innocent children are. It would only be a fair comparison if there were a large movement of very influential, powerful, and famous people posting "vegetables cause autism, and Burger King cures it" videos out there to hundreds of millions of viewers and a boom in child obesity tied directly to parents viewing them.

Re:You probably don't need a single-page app on Sunday February 17, 2019 @08:24PM (#19188034)
The accesskey feature is usually discouraged because it can break screen readers and other accessibility tools.
Re:Show HN: Jetpack – Webpack made more convenient on Thursday January 03, 2019 @07:00PM (#18820666)
It's also an equally tremendous and even older classic game for the ZX Spectrum and VIC-20 by the artists later known as Rare https://en.wikipedia.org/wiki/Jetpac
Re:Recovering Nintendo’s Lost SimCity for the NES on Wednesday December 26, 2018 @02:27AM (#18761104)
Is it possible you're thinking of the SNES, rather than the NES?
Re:Amazon Web Services in Plain English on Sunday November 18, 2018 @04:58AM (#18479610)
I got the impression that overly simplified was sort of the goal. They don't seem like genuine suggestions for alternative names; the column might have been better named "Think of it as sort of like."

S3 has nothing to do with the FTP protocol, but if someone completely new to AWS and similar platforms asked "What's this S3 thing?", you might say "Think of it as sort of like an unlimited FTP server." You can connect to it through programs like CrossFTP, browse a folder hierarchy, upload files, link those files from a website, and in general do all the things people commonly use (S)FTP for, with the same tools they use for (S)FTP stuff. It's similar enough that it makes a good starting analogy.

App Scripts is another description I think is reasonable. Personally, I don't think manual invocation or modification of a stateful resource is key to the term 'script.' I think of a script as a relatively simple program that is invoked, accomplishes one task, and then ends without interaction. "Erase duplicate files in folder X" and "send me an email listing all files added today" are examples of scripts you might run as a cron job or in response to an event (like free space dropping below some level). Lambda is close enough to this that I think "Lambda's where you store scripts and define when they get run" is a reasonable explanation.

Re:The Missing Computer Skills of High School Students on Thursday November 01, 2018 @03:26AM (#18351927)
I've always thought Miller columns were underused.
Re:JavaScript is now required to sign in to Google on Thursday November 01, 2018 @12:20AM (#18351429)
You can continue using your email address for your Google account even if you've got someone else handling the mail now. You can also sign up for a Google account with an email account from any domain or provider.
Re:JavaScript is now required to sign in to Google on Thursday November 01, 2018 @12:15AM (#18351412)
With credential stuffing, isn't it unlikely the perpetrator wants to make more than one or two attempts per user ID?
They changed that policy last year. You're no longer guaranteed a free month of Prime to compensate for shipping failures. CS reps can still give you this if they choose, but people are now being denied, especially if they've already been given free months before.