I watched the animated gif in the readme and let out a shout of delight when I saw the lightning strike, and on the second loop appreciated how it also lit up the surroundings. Lovely attention to detail!
I looked at the snow one and almost expected snowdrifts to start accumulating.
same here in safari. first strike ok, second froze for a few sec. I did like the sort of 'obstruction' effect of the rain on the house for example. obvioulsy a limitation of the char based render, but it adds a pleasing kind of obscuring effect.
I initially built https://plaintextsports.com because I was annoyed with how slowly other sports websites loaded, but since then I have come to appreciate it more for the density of the information, and how few clicks it takes to get to the info you care about (usually at most two or three).
Unsolicited feedback because I clicked:
- Don't require picking a composition name before getting started
- Whatever scroll settings you have broke swipe to go back, and then when I tapped the back button I got stuck in an infinite loop between the home page and the create composition page
My favorite line in my .gitconfig is an alias that prints out the commit history as a tidy graph. (The default `git log --graph` uses 6 whole lines per commit!)
You just gave me a lesson "why one should not just paste things he found online into his terminal".
Your parameters have Em dash instead of a hyphen... I reinstalled git from dedicated official repositories before I realized my git is not old... the param is indeed incorrect.
For sports, ESPN does have http://www.espn.com/nba/lite/scoreboard, but most of the links go back to the normal website. It may have been been more robust in the past, but I don't imagine anyone works on it anymore. It seems like the developer listed in the credits (http://www.espn.com/espn/lite/credits) last worked there in 2002!!
So if you're looking for a sports alternative, https://plaintextsports.com (which I made) works great! All the scores, play-by-play, box scores, standings, and schedules, but just no news stories. Blazing fast.
(No, it's not technically "Content-Type: text/plain", it uses HTML and CSS. Yes, I know it's not necessarily easier to read; it's an aesthetic. Yes, this is shameless self-promotion.)
A personal gripe with progressive web apps: they cache the website!!
A lot of people have requested that I make a progressive web app for https://plaintextsports.com. I've looked into it, but it fundamentally doesn't work, because it caches the home page. My website doesn't load any data via JavaScript; it just relies on the HTML page updating every 30 seconds, so when the home page is cached, the website just stops working.
I don't want this service worker nonsense. In most cases offline access isn't useful; people want the live scores. (It'd be moderately useful for viewing schedules offline, but I think most people use it for live scores.) I just want the website to show up as its own app in the app switcher, and basically nothing else to change: I still want the swipe-to-go-back gesture to still work. I still want the address bar with the manual refresh button. But I can't do that.
It's frustrating that they've provided a way to make a certain style of websites into first-class apps, but it doesn't work for the most basic websites!!
Side note: this is partially a the-best-way-to-get-a-question-answered-on-the-internet-is-to-say-something-wrong post. If there's a way to make it a PWA and not have all the pages heavily cached, please let me know! I would love to be wrong on this. (Unfortunately my noprocast just triggered though, so I won't be able to edit this post or respond for the next three hours.)
Your service worker dictates what the browser should cache. You could cache static assets only and let the browser hit the server for document requests.
As for the refresh button, mobile users are now used to pull to refresh so you might not need an actual refresh button.
As an aside, I dig the design! It reminds of teletext haha
It has been awhile since I've personally tried creating a PWA, but I don't think iOS does any form of extra caching for PWAs. I think it is more likely that you copy/pasted an example service worker that was caching things you didn't expect it to cache. Some info about PWA caching here[0].
That page also talks about "What to Cache" here[1], and it specifically suggests that most apps will want to cache the main page's HTML.
Now that iOS will supports push notifications in PWAs, I definitely plan to try out the developer experience again soon.
> I still want the address bar with the manual refresh button. But I can't do that.
Yeah, I mean... you're meant to provide an app-like experience if you're doing a PWA. You could certainly build your own stylized, floating bar that only shows up in PWA mode, or think about new ways to let users control the way the page updates. Alternatively, you could just automatically refresh the page with a setTimeout?
I'm not sure how much you want to invest in experimenting with the technical foundations of your app, but I wrote out a few ideas that occur to me:
- Your Cache-Control header is kind of weird. `max-age=15`. I would expect to at least see a `public` or `private` directive in there to specify how this data is supposed to be handled by intermediate proxies. Something like your website is a prime candidate for caching in a CDN layer, and I think you generally want to specify `public` for CDNs to do anything useful. Maybe they default to `public`? I've honestly never felt the need to try. Beyond the `public` / `private` discussion, `stale-if-error` could be useful so the CDN could serve the most recent info even if your application is having a brief outage. If you're not using a CDN... probably something worth checking into.
- As cool as just serving self-contained HTML document is, your page is still transferring 6 kilobytes each time it refreshes. If the goal is to lower that as much as possible, I would start by pointing out that you don't need to send your JavaScript snippet every single time the page loads. It looks to be several thousand bytes uncompressed, although I'm not sure exactly how much it is affecting your compressed payload size. You could separate that into an aggressively cached JavaScript file that is served separately from the HTML. (As usual, best practice is to have a file hash in the name of the javascript file, that way the cache time can be infinite. If the javascript needs to be updated, the hash would change, so the browser wouldn't have that cached, and would fetch the new file immediately, as soon as the refreshed HTML file requests it.)
- But then after that... the next logical step is to render the actual score interface client-side, since the score data is significantly smaller than the HTML needed to render the score data. This would also allow you to handle refreshing more elegantly from the client by just fetching the data route that returns a JSON blob, and re-rendering the HTML. At this point, the HTML representing the empty app shell could be cached too, but it would probably be best to limit the cache duration depending on your preferences. The right value for HTML caching would likely be somewhere between a few minutes and a few days. Now, opening the app would load the locally cached HTML and JavaScript, and then the JavaScript would just fetch the tiny blob containing only the scores and nothing else. Of course, you could cache this information locally so that when the PWA is opened, the user can always see the last information (and when it was fetched) even if they don't have an internet connection, while the PWA can continue trying to fetch the updated scores.
- Taking this to the extreme, the maximally efficient design for something like this would probably involve an SSE (server sent events) endpoint that the client would subscribe to. Whenever the scores actually do change, the server could push that straight down to the client. This would reduce the latency from your current 30 second target, and it would also use even less data since people aren't refreshing and receiving the same stale data multiple times. (I will note that a good implementation of this would still send a tiny ping from server to client every minute or two just to ensure the connection doesn't get silently dropped by any weirdly configured firewalls along the way.)
- If you were really going all-in on features, well... this whole HN discussion is highly focused on push notifications, so you could always let people subscribe to specific teams, and send them a push notification when scores change for those teams.
I wish there were an option to export a video like the example on the homepage (with some ability to control the camera path). I'd love to be able to use it to make a promotional video for a developer tool similar to the announcement video for the Windows Terminal.
I got sick of waiting for ESPN to load so I made a site with the goal of providing immediate access to what people actually care about: sports scores.
It's pretty fully featured at this point, supporting the NFL, NBA, MLB, NHL, MLS, Premier League and Champions League, college basketball and college football, WNBA, NWSL, and the World Cup. And for a lot of leagues it has full schedules and standings as well.
It actually was really popular in South Africa during the World Cup when a "super-app" that points users to sites that don't use a lot of data linked to it.
The site is served off of S3 (which is cheap), but there's a job running on an AWS server that's fetching the data for all the games and republishing pages to S3. It's using Ruby and is making a lot of network requests, so it's definitely not super efficient. I need a least a couple virtual CPUs, so it ends up costing ~$60 a month. I could definitely reduce that number, but the trouble just isn't worth it to me right now.
I don't want to make money on it. It's been difficult enough to get people to use it; getting people to pay for it would be even hard. At this point I feel like I've gotten everything I've wanted from the project. (An eye-opening experience into the marketing world; a website that I use every day.)
I try to limit how much I work on it now to mostly just maintenance work. I'd rather work on other stuff. If I started making money that'd just be a number to obsess over, and, honestly, it's never going to make enough money to replace my salary as a software engineer.
I use it every MLB season and love it! Thank you for your work. Baseball is the perfect sport to go plain text, it already works really well over the radio etc.
Really love the site. Is there a way to view multiple football/soccer leagues (i.e. Premier League (PL) and Champions League (CL)) at once?
I know you said you're just maintaining the website, but if there were a simple way to follow a team, that would be a really nice QOL addition. That way I could follow a PL team and see their CL matches as well without having to switch between pages on the website to make sure I don't miss a match. Perhaps adding the team as an URL parameter could keep the design simple?
If you want to take it to the next logical step, there are more leagues that a football club can compete in such as the FA Cup and Europa League. This of course is Europe-centric.
The challenge is that these pages are really labor intensive, because I want to show relevant information for whatever league is happening, e.g., group stage points, leg of Champions League matches, and it's really difficult to figure out how to fit everything in just 45 columns.
For anyone using a Mac, the basic cursor movement commands available in readline and emacs—C-f, C-b, C-a, C-e, C-n, C-p—are also available in virtually any text input in any program, namely web browser inputs, url bars, and textareas, as well as all system UIs.
Once you get used to using these shortcuts that means you can compose and edit text anywhere without ever moving your hands.
I recently switched to using Linux full time for my job and it KILLS me that these shortcuts aren’t available outside of the terminal. I try to navigate to a search suggestion in Chrome using C-n and accidentally open three new windows. I try to add a sentence at the start of Slack message using C-a and accidentally highlight everything and delete it. I try to move my cursor up to edit a previous line using C-p and end up brining up a print dialogue. It’s breaking the muscle memory of my most basic interactions with the computer, and it sucks.
Ugh this destroyed my productivity too for a while. I even wrote an entire blog post about my woes and different experiments to get back to getting consistent shortcuts across terminal and GUI apps here: https://alexdav.id/2020/07/12/text-manipulation-and-modifier.... GTK key themes didn't end up working out for me, and I ended up with a custom QMK solution, but it's not great.
Note for people still using macos, you can enable many more readline shortcuts by creating a special file at ~/Library/KeyBindings/DefaultKeyBinding.dict. I made a repo that simplifies the process to just a single git clone when setting up a new machine: https://github.com/alexdavid/keybindings
Because on a particular three/four-decade-old physical terminal[0], Alt-$KEY was transmitted as "1B [sequence for $KEY]". Eg, Alt-X was "1B 58"[1]. The escape key happened to also transmit "1B" on its own. Consequently, "Alt-$KEY" and "Esc, $KEY" were indistinguishable unless you went out of your way to engineer a race condition. This has never really been fixed, despite intermittent attempts.
0: I think VT100, but don't quote me on that
1: or possibly "1B 78", depending on how it handled shift; I don't remember exactly.
I’m not sure about other OSs, but having cmd for standard mac shortcuts and ctrl for all things Linuxy is really useful in general. As you point out, loads of apps support the standard readline controls. I additionally wire ctrl-p / ctrl-n to be more generally useful in Linux and vim, but I find that they just work all over the place in Mac apps too (up / down in Alfred search results for example).
Unfortunately, GTK 4 has removed key themes. Eventually, Firefox, Chrom(e|ium) and all actual GTK applications will migrate to GTK 4, so this is not very future-proof.
I use a variant of the emacs key theme, so I'd be happy if there were a workaround...
It's unfortunate that the GTK devs feel they have to remove features which their users find useful to keep GTK maintainable. Keeping software complexity under control is a difficult task, and I can't begrudge them their choice.
> “I try to move my cursor up to edit a previous line using C-p and end up brining up a print dialogue.”
I used to be a big enthusiast of keyboard shortcuts, now I’m getting fed up of how many there are, every program has a zillion shortcuts all stacked on top of each other. Someone needs to come up with a better way (cough Jeff Raskin THE?).
This one is notably egregious, hands up anyone who prints often enough to need a keyboard shortcut; someone who prints as often as they new-tab, as often as they Ctrl-s a text file, as often as they copy/paste? Anyone? If only there was a universal way to unbind them.
I switched to Mac full time when I got frustrated with my Linux desktop having (far) worse support for Emacs keybindings than my work Mac. There was a certain amount of irony in it.
And just checked, it looks like chrome on openbsd uses the emacs keybindings as well. it just reinforces my feeling that openbsd makes the best desktop system.
Anyone using a Mac is probably not using readline but its replacement 'editline'.
So the configuration file is ~/.editrc.
man editrc
Note also that to have a full mapping of keys available to you, you have to be aware of the tty settings (see stty), the terminal emulator and the GUI environment in which it is running. I would appreciate a tool that would dump all this in a comprehensive list.
You find these all over the place[0]; I often try them and am unsurprised when they work. Have to train myself not to use ^w though. Try to erase word and it closes the window.
My favorite is that those can combined with the shift key, to get native highlighting. So Ctrl-Shift-a works like Shift-Home on windows (and Ctrl-Shift-e for Shift-End).
So you can do C-s-a and C-s-e, followed by cmd-C, to copy stuff to the native clipboard.
(Kill and yank (C-k and C-y) work too, but not across applications.)
keyd is a really nice key remapping daemon that supports application-specific remappings. You could use it to emulate readline bindings in Chrome. Or if you can't figure out how to emulate something, at least bind it to noop so it doesn't mess you up any more.
Command-A does select all. On Linux if you use defaults, ctrl+A will do that. If you change your gtk keyboard shortcut theme to ‘emacs’ it will do the equivalent of ‘home’ instead (which is what ctrl-A does on a Mac). To delete a message under these conditions, you can usually do e.g. C-A C-K. But that’s not so suitable for eg a high-risk text box on a buggy site where you want to regularly select all then copy in case the site crashes or loses your data.
Alright, my bike-related tally over ~6 years in SF:
- 2 stolen bike seats (one by 4th and King, one in the Mission)
- 1 entire bike stolen (left out in the Castro overnight)
- 1 rear wheel stolen (in a parking garage by the SF Symphony)
- 1 seat post clamp (literally just the clamp they had to remove the seat, take off the clamp, then put the seat back; during a 30 minute piano lesson in the Mission)
But that doesn't included the most egregious thing that I ever witnessed: I was running up to Twin Peaks on a Saturday morning, and right around noon, in the mini parking lot between the actual two peaks, with dozens of people milling about, heard someone break a car window while there was someone in the vehicle and grab a bag. A woman was seated in the passenger seat and they broke the rear driver-side window. Within seconds a car pulled up with no license plates, the guy jumped in and they sped off.
I looked at the snow one and almost expected snowdrifts to start accumulating.