Better HN
topnewbestaskshowjobs
Log inSign up

qbasic_forever

10,505 karma · joined Feb 3, 2021 (5y ago) · 2,505 submissions

Submissions

comment 5y ago · link · parent

Can you really lay blame on the kernel though? All of this stuff with secrets is happening in userspace and mostly at the shell. If anything, systemd would probably be the place you'd want to build a secret storage system--perhaps build something API driven similar to Hashicorp's vault.

edit: Apparently systemd now has an option to pass secrets/credentials to a service through a more secure by default (i.e. only stored in memory) file option: https://www.freedesktop.org/software/systemd/man/systemd.exe...

comment 5y ago · link · parent

The world before Comic Sans looked a lot like this to most people: https://int10h.org/oldschool-pc-fonts/fontlist/font?ibm_vga_...

(IBM VGA 9x16 font, used by MSDOS and pretty much every PC from the mid 80s to 90s)

comment 5y ago · link · parent

It's sad no one really uses block characters anymore in text UIs. :(

comment 5y ago · link · parent

Same, and Brother has an Android app that works great for printing and scanning from Android phones. I never connect my printer to a computer anymore.

comment 5y ago · link · parent

Scanning too, get a multifunction printer that uploads PDF straight to dropbox and you'll never, ever pull your hair out trying to scan and sign a document ever again. Printers and scanners are a class of tools that are best served _not_ connected to computers anymore. They should be like your refrigerator, just living on their own and doing one thing very well.

comment 5y ago · link · parent

Very cool! Yeah I wish SSR was more of a thing in the web component world. Someday soon hopefully!

comment 5y ago · link · parent

Check out the islands architecture info, or search around for info on partial hydration. It's similar to how things worked in the jQuery days--you serve up plain old HTML and have a JS function that runs on page load to attach all the event handlers (onclick, etc.) to your dynamic elements (i.e. 'hydrating' the static HTML into dynamic HTML + JS components). The thing with frameworks like Astro is that they try to automate and manage all of that hydration for you, which is nice because for complex sites with lots of different components it becomes a huge, error prone chore to manually wire things up.

edit: Island architecture background info: https://jasonformat.com/islands-architecture/

comment 5y ago · link · parent

How well do web components fit into astro pages? Do you get the same kind of partial hydration/load on first view semantics with them as it looks like you can do with React/Vue/Svelte components?

comment 5y ago · link · parent

Everything is kind of converging. In the SPA world they realized the SEO sucks and they need static server rendered content, so there's a whole realm of SSR (server side rendering) built around it with Next.js, Vuepress, Sveltekit, etc. And on the static site side folks realized static sites can kinda suck and feel clunky, so loading some JS to add smoothness is nice. Check out Docusaurus for an example of a static site generator that actually uses React internally to build a SSR friendly SPA with fluid page loads. You don't have to choose one or the other anymore, you can get both a smooth SPA experience with full server rendered and SEO friendly content.

comment 5y ago · link · parent

Yep they have single static binaries now that are way more convenient. Better yet too, there's a nice docker image that's easy to use as-is or build on with your own plugins/filters/etc: https://hub.docker.com/r/pandoc/core

comment 5y ago · link · parent

I'm surprised there isn't more love for pandoc in the SSG world. It is an unbelievably flexible and fast tool in my experience, with very little opinions or concepts to learn. Yet despite the simplicity it opens up a huge amount of customization with its AST filtering (either in lua or bring your own executable plugin). Pandoc + a shell script or even makefile could likely replicate many folks needs for a simple SSG.

comment 5y ago · link · parent

No one wants a bespoke template language for every different project. You want to be able to share and use the same template for rendering a dynamic contact list populated by an AJAX call on your site's dynamic pages, with the simple static marketing page that lists all the project creators for example. React/Vue/Svelte/etc. are just templating systems that started as dynamic frontend-only solutions but now see use in generating static pages too. The idea is that the same templates can be reused, shared, mixed and matched, etc. in all uses. You don't need to spend weeks building and maintaining two separate types of templates--those used for dynamic vs. static pages.

comment 5y ago · link · parent

Hugo can be that simple if you don't have a complex frontend template. As soon as you want to make a SPA (or SPA-like experience), use a framework like React/Vue/Svelte/etc., or even try out stuff like TailwindCSS you're going to get sucked into the deep rabbit hole of bundling frontend assets, webpack/esbuild/etc.

So you kind of have to decide, are just static templates and static assets all you need? Stick with Hugo and enjoy the speed, simplicity, etc. There are some even simpler alternatives you might enjoy too, like mdbook or mkdocs. Both are more oriented towards technical docs but are similar to hugo at their core--send in some markdown (in the case of these tools you don't even need frontmatter or other schema) and get out some HTML.

If you're building something fancier or using more complex frontend setups then... there's no perfect answer right now. It's all about balancing complexity of the build system with what it gives you in the output. IMHO webpack and gnarly dependencies can be tamed pretty well with a simple docker container. Spend some time getting your perfect workflow setup, chuck it in a container that a CI system can run all day, every day without fail, and you'll be pretty well setup.

comment 5y ago · link · parent

LSP stuff is done asynchronously in VS code (and other editors). This doesn't slow down the main editing UI at all. It just means when you start typing and expect to see linter warnings, autocomplete suggestions, etc. it can take a bit longer if the LSP server is slow to respond.

If someone has all their CPU fans, etc. spinning up when opening a big monorepo it's probably just aggressive indexing inside the LSP server they're using. Almost certainly it's an optimization trade-off made by the LSP server author, trying to balance the common case of people typically opening smaller repos and assuming they immediately want search, etc. to be fast and ready.

There's nothing inherent to the LSP protocol or design that causes this problem--someone could build a better LSP server designed to handle large monorepos by deferring indexing, etc. until absolutely needed (but potentially with some tradeoffs like searching inside a subunit being delayed until its used). It's the same basic problem git faced with enormous repos over time slowing down and all the hacks/workarounds people have bolted on to try to limit how much of the monorepo state needs to be available at any moment.

comment 5y ago · link · parent

The IBM Deskstar drives from the early 2000's are the most infamous to me. I remember having to put one in the freezer for a bit in a last ditch attempt to get one more boot out of it and copy data off before it was lost for good. Early 2000's computer hardware in general was a total nightmare at times.

comment 5y ago · link · parent

For any sysadmins or future sysadmins reading this though, do NOT put your service's 2FA on SMS. Do not use SMS for anything other than sending your grandparents a happy birthday message. It is trivially broken with a sim card hijack and we have seen many high profile incidents of people being hacked precisely through this vector.

comment 5y ago · link · parent

Agreed, hover over it if you have a mouse and the tooltip should show the full name.

comment 5y ago · link · parent

Is there some zero day that's getting out and causing a lot of these recent ransomware attacks? Has anyone been able to do some root cause analysis on the exact exploits that oil pipeline, meat processing, etc. plants have faced with their ransomware attacks?

On one hand it seems a bit expected to see an increase in attacks after big, public ones... but on the other hand how are these networks and computers actually getting compromised with what appears to be such speed and ease?

edit: I also wonder if defenses need to get more proactive about detecting these attacks. Why can't block devices have a mode where they immediately shut down into a fail safe if they see a huge amount of sustained block overwrites (like attempting to overwrite 50% of data within a short time span)? Or maybe bake copy on write filesystems into the hardware such that no matter what happens on the host side a perfect history of previous blocks is kept intact to be restored through some manual/external intervention.

comment 5y ago · link · parent

Even with backups we've seen companies are more than willing to pay a modest ransom, like the pipeline last month. It takes a long time to fully restore big infrastructure from backup--especially if it's something like old tapes.

But yeah, companies should stop viewing security and IT as a cost center and start paying up for good penetration testing every few years.

comment 5y ago · link · parent

A lot of folks work like mad in tech to build up a small nestegg and then go pursue a passion. Starting with a food truck is a great way to suss out and ease into eventually owning and running restaurants. It's like the MVP of a cuisine/restaurant idea.

comment 5y ago · link · parent

There's a benefit to reduce stress on your hand in my experience too. Constantly switching from keyboard to mouse and back again, or even worse keyboard to trackpad, can really get aggravating after a while for some folks. I sometimes like a happy medium of VS code or other fancy editor with a VIM key mapping plugin.

comment 5y ago · link · parent

Using host volumes can have big performance problems on OSX and Windows. Node or frontend development with huge node_modules folders in particular can run into problems like flakey file change notifications or just general slowness accessing files.

Linux users aren't immune from trouble either. Host volume permissions are a big source of pain--if your mounted files don't have the same UID/GUID as the user baked into the dockerfile then you'll hose access to the files on your local machine. Most simple dockerfiles run as root (especially dockerfiles created by windows or mac developers who never deal with this problem) and all the created files inside them show up as root owned on your localhost. You have to take special care to craft your dockerfile to not run as a root user, launch with explicit user UID/GUID that matches your host machine, and use a tool like fixuid as an entrypoint to fix up mismatches.

A good workaround though is to use docker's internal volumes instead of host mounts. This fixes all the Linux permission issues (the internal volumes live in their own root/docker managed location), and fixes the slowness on other platforms (no VM folder mount slowdown). But you give up the freedom of seeing your files locally and need to go all in with something like VS code remote containers, or running your IDE directly in the container.

comment 5y ago · link · parent

If it looks like we're heading down that path, we should send a probe with a complete history of our race, all of our known science, etc. to a lagrange point for safe keeping.

comment 5y ago · link · parent

Aw come on let's not shame the poor robot arm. Space is a cold and lonely place--I'd want a blanket too. :)

comment 5y ago · link · parent

Space debris isn't a new problem or something that's coming entirely out of the blue. NASA has almost certainly built it into the plans and engineering to keep ISS going for years and years. The fact they do maneuvers, keep meticulous track of large debris, etc. is a great sign that the systems they have in place are working. I'd honestly be more worried about the political capitol and will to spend money on the space program drying up more than debris strikes.

comment 5y ago · link · parent

No, what you're asking for is exactly what screen and tmux were designed to do though. In the not too distant past many online services (frontend servers, databases, etc.) were basically just run out of tmux instances so different sysadmins could connect and monitor them, redeploy them, etc. It's a basic form of interactive process management which is what you're after.

I agree tmux especially can get pretty complex and frightful to learn. However just learn the basics of creating a session, exiting, and re-entering a session and you will be golden. Ignore all the fancy stuff like window splitting, layout, etc. until you need it.

edit: What you could do perhaps though is have a tool like GoTTY launch into your tmux session directly and attach to it instead of launching a plain bash or login shell. This way the less technical folks wouldn't have to remember how to use tmux. As far as they're concerned whenever they open the webpage they connect back to the running process.

comment 5y ago · link · parent

Not that far, someone just needs to make a JupyterLab plugin that uses Automerge or a similar OT/CRDT structure for collaborative editing documents in a workspace (perhaps using WebRTC data channels for P2P sync between clients, or stick with the tried and true server model like Google docs). The trouble is turning that into something as polished and secure as Google Docs collaborative editing experience--there's a _lot_ of work to get there with tons of little corner cases, security issues (you're potentially giving strangers over the internet access to remotely run code in your browser--that should raise big alarm bells), etc. to think through. But the basic stuff is all out there for someone motivated to pick up and go wild with.

comment 5y ago · link · parent

This is perfect for integrating into a web app behind a proxy that adds authentication, SSL, etc. Put it on a small cloud instance, add your favorite text editor, install all your development CLI tools and you've got a completely productive and 100% mobile development environment for example. You could load it up on a tablet while lounging in the sun and get real work done.

comment 5y ago · link · parent

No, read more from the README. This uses pyodide, a WASM port of desktop Python that runs entirely in the browser (obviously stuff like file access is sandboxed). In addition it adds a web worker that runs a Javascript kernel powered by your browser's JS engine. All of this runs 100% in your browser, there is no server component at all.

comment 5y ago · link · parent

This is _really_ cool. I don't know why a lot of commenters here are going into the weeds to grouse about Java, flash, and general anger at computational notebooks.

What we have here is a complete client-side browser environment for development. Not some half-assed language or hyper restricted toy--this is real Python, and your browser's full JS engine all available in JupyterLab's IDE (basically a simpler VS Code at this point, it uses the same editing component).

We all freaked out a bit as Apple drove out IDEs from their app store, Google locked down Termux and similar developer tools from Android. Well, here's the answer to those situations. Something no app store owner can kill on a whim. I love stuff like this and hope it helps to enable and inspire the next generation of developers.

1
697071
84