Better HN
topnewbestaskshowjobs
Log inSign up

qbasic_forever

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

Submissions

comment 4y ago · link · parent

Totally agree on ESM supporting being a mess. We're going to see projects littered with .mjs files for decades to come. People will whisper in hushed tones.. what the heck is a mjs file, isn't this just javascript? Why did we do this again? No one will remember.

comment 4y ago · link · parent

Package.json is a mess, it combines a million different concerns like project metadata, dev environment, scripts, and random key/value pairs along with all the dependency information. It's a node and npm specific configuration that ballooned into a dumping ground for metadata. There's no reason to keep it around in a new runtime.

You create the import map by figuring out what dependencies you want to use and crafting it and your code to reference them. You can do anything--you can import five different versions of the same library but under different names if you want. This was not something even possible with node and npm. You can make it as simple or as complex as your needs require. For most people they'll keep it simple and drop a few import urls directly in their source, never even needing to touch a tool or other file to worry about dependencies.

They're giving users what they want, an ability to run packages which haven't been ported to work with deno yet. The blog post explicitly makes this clear. This is not some grand conspiracy like so many replies seem to be trying to imply.

comment 4y ago · link · parent

Atlassian bootstrapped to a billion dollar public company without any VC: https://www.indiehackers.com/post/how-atlassian-bootstrapped...

comment 4y ago · link · parent

Package.json is a mish mash of a lot of concerns. It has project metadata, that's also duplicated in your readme and github descriptions. It has scripts, that are also probably just calling into other shell scripts and such in your project. It has your dependencies. It has your development environment setup. It has random key value pairs you decided to place there years ago and forgot the exact reason for now but are too scared to remove them. It's a royal mess of a file to manage.

Having a file to manage locked dependency versions isn't bad. Having a file that has grown into a crufty monster with millions of uses can be bad.

comment 4y ago · link · parent

Deno has a dependency inspector: https://deno.land/manual/tools/dependency_inspector

Deno has a concept of locking dependencies to specific versions with a lock file: https://deno.land/manual/linking_to_external_code/integrity_...

Its the same stuff npm does but it doesn't depend on npm's CLI. It sounds like you're mad they're moving the cheese a bit. IMHO I'm glad to be rid of the npm ecosystem baggage.

comment 4y ago · link · parent

You can use import maps too: https://deno.land/manual/linking_to_external_code/import_map...

Deno's philosophy is to be aligned with web browser standards. I suspect import maps will be the path forward for most projects as it's what browsers will or are supporting today too.

comment 4y ago · link · parent

Deno has had a node compatibility flag for a while now, and quite a few node packages have worked flawlessly. For anyone who has been using deno for some time this is not a big surprise to see smoother npm import support. I think all the people saying this is such a giant, game-changing big deal or that deno has changed, blah blah haven't actually been using it...

comment 4y ago · link · parent

Deno runs both JS and TS. It still uses V8 internally, but with a rust wrapper around it that does TS conversion and more.

comment 4y ago · link · parent

It's not even 5 years old, give it some time for people to pick it up and use it. Python was created in '91 but even by '96 it still wasn't widely used.

comment 4y ago · link · parent

Deno still won't have a package manager, at least in the style of npm. You don't need to learn a bunch of CLI and janitor a package.json file. You just add an import to your source code and you're done. Pulling in a npm package is the same as pulling in code from github, it's just a special URL. That's it... that's the 'package manager'.

comment 4y ago · link · parent

I use Google maps in exactly the same way and have the same complaint about street names not being visible. Sometimes I'll drop in to street view at an important intersection to see what landmarks pop out, like a certain gas station or business on the corner where I need to turn.

It's so funny when I'm with someone and navigating, they see me using Google maps and then are bewildered when I don't turn on the turn by turn yet still get where we're going. They almost can't believe it's possible.

comment 4y ago · link · parent

Following a trail means you have some reference of a foot path to stay on and follow. Navigating could mean anything--it might be reading a vague description like "follow the trail to a cairn at mile 5, then bushwhack up hill 1500 vertical feet to a ridge, follow the ridge as it ascends the mountain choosing an obvious class 3 scramble on the east side that avoids serious exposure (if you encounter class 5 terrain you are off route)". With navigation you have to use a lot more senses and tools and knowledge, the path isn't immediately obvious.

comment 4y ago · link · parent

There's some great 90's and early 2000's era stereo gear that's basically free or very cheap at goodwill and thrift stores these days. I feel like right now is the time to snag good CD playback gear before it goes into the upswing in price as collectors items. No one is going to be building or selling 200 disc changers or high quality portable CD players any time soon for example, but CD collectors will love to have those things in decades to come. CDs in general I think are prime for a comeback like vinyl and tape have seen. Right now you can find them and the gear to play them for dirt cheap--it won't stay that way forever.

comment 4y ago · link · parent

I am genuinely curious who is using production node.js web apps on Windows server OS. I'm sure there are niche things like a massive legacy Windows shop that's slowly moving off, or trivial load internal applications where it doesn't matter. But it would really surprise me to see someone take a major bet on running large public, internet facing load on node + Windows server.

ASP.NET + Windows, sure that makes total sense. Even C++ + Windows is solid and very performant. But node.js has always been a second class citizen with Windows support (it wasn't until Microsoft themselves put fulltime devs working on node that it supported Windows) and it's a huge bet to take with very little benefit and tons of potential failures.

comment 4y ago · link · parent

Deno doesn't use node_modules so you won't have a problem there. You specify each dependency as an import URL (either in the code or in an import map) and it grabs them directly (also using a local cache directory). There's no need in the deno world to even use a package manager.

comment 4y ago · link · parent

For the past decade money has been effectively free to borrow with interest rates at zero. All the companies that immediately went bankrupt, into layoffs, etc. when interest rates were raised this year were coasting on these financial fumes.

comment 4y ago · link · parent

I dunno IMHO there's a lot of rose colored glasses looking back at them. I cut my teeth learning Linux in the era of howtos and such of the late 90s/2000s, and it was a real mess. Someone on an IRC channel would tell you to RTFM and point at a guide, you'd read it and slog through pages and pages of bloviation about unix philosophy, incredible minutia about every CLI parameter (half of which don't exist anymore) or whatever and be even more confused than when you started. You'd go back to IRC and someone else would say oh yeah don't read that guide, it's old and not up to date. Here read this guide... and the process starts over again. There were some good guides, but it was really hard to find them and sort out the good from the bad.

comment 4y ago · link · parent

Digital Ocean's guides are IMHO the spiritual successor: https://www.digitalocean.com/community/tutorials

comment 4y ago · link · parent

Yeah aluminum is still great, it's actually a lot better than cast iron for heat distribution. Thick aluminum stuff in particular is amazing in my experience. I have an anodized aluminum sauce pan that is a perfect rice cooking pot--it heats up and boils water super fast, retains heat well, and nonstick interior is great for rice. Still looks as nice and clean as the day I bought it 15 years ago too.

comment 4y ago · link · parent

One thing I've recently discovered with my cast iron pan (now 20 years old!) is cooking pan pizza at home with it. I follow the America's Test Kitchen recipe here and it comes out unbelievably good, just like Pizza Hut from the 80s: https://www.youtube.com/watch?v=-srfPL5CWZs

It's super trendy to obsess over getting the hottest pizza oven--something that gets up to 800 degrees, etc--so you can get super authentic restaurant pizza at home. That's great and a fun hobby for some folks I'm sure, but a cast iron pan with a long overnight fermentation of the dough is a game-changer for from scratch pizza for me.

comment 4y ago · link · parent

Aluminum, even anodized, will definitely stick to food. Most anodized pots are treated with a teflon nonstick interior though and its color is very similar to the grey color of the anodization.

You do have to be careful about scratching anodized stuff too. The anodization will scratch and flake off if hit with hard material like steel. But again it's usually not anodized material directly in contact with the cooking surface since they put nonstick there.

comment 4y ago · link · parent

Because I don't want to have to read and figure out each person's bash idiosyncrasies, bugs, etc. in pile of undocumented scripts to add a new task that runs a new test case. Just gives you a framework to put all your tasks in one file, document them, and find and run them easily.

If bash works for you, stick with it. It does not work with large teams and people who aren't deeply experienced in all the footguns of bash in my experience.

comment 4y ago · link · parent

Realistically a poisoned ARP or DNS attack that redirects your machine's traffic to the attacker's server, both for the download and the download page, is something to be concerned about. This only requires someone to have access to your local network, not to your machine. It could be as innocent as working at a coffee shop from their wifi network and an attacker being on it too...

comment 4y ago · link · parent

If someone has pulled off a sophisticated enough attack to intercept your http curl of the script and inject a malicious version, why can't they also intercept your brower http requests for the download page and inject different html that gives a good hash/checksum of the malicious script?

Going even further, what is stopping a malicious attack on the package source itself--like someone gaining control of the package source and committing a malicious version (as NPM, pypi and other registries have seen)?

The point is, "use your package manager" is not any better in the grand scheme of things than blindly curling and executing a script. Neither option is perfectly secure.

comment 4y ago · link · parent

Those terminals support bold rendered using ANSI bright colors as a config option and then you can set the ANSI brights to whatever custom colors you prefer.

comment 4y ago · link · parent

Oh wow I had no idea they emulated a VT100. That's awesome!

comment 4y ago · link · parent

What feature of Windows Terminal are you missing? It's been ages since I've used it but I can't think of anything I haven't seen in Linux terminal emulators. Gnome Terminal is the closest IMHO as it has custom profiles and colorschemes that are similar to what I remember from Windows. Pixel shaders are the only thing I can think that you won't commonly find in Linux terminals, but there is cool-retro-term for that kind of stuff.

comment 4y ago · link · parent

Alacritty, because the config is simple YAML and it can display with zero window embellishments or other UI. It's great for tiling window managers in particular.

The font rendering is great and you can adjust padding, margin, etc. to tweak readability for your tastes. I'm a fan of plain background with good contrast color, larger than normal font, and a clean one character wide padding around the terminal. It feels a lot like a web browser display. I hate terminals that go for the smallest possible font and super dense output.

comment 4y ago · link · parent

Scripts in bin have no documentation, no easy way to enumerate them, etc. There is definitely a time and a place for bin scripts, especially as things grow in complexity. However the beauty of just is that there's one file (the justfile) that defines all of your project's actions. You don't have to go spelunking into bin to figure out how to tweak a compiler flag, etc. And since just will run anything there's no reason why your complex bin scripts can't just be called from a simple one liner task in a justfile.

Could your write a bash script that does stuff like enumerate all the bin scripts, pull out documentation comments, etc.? Absolutely, and people have followed that pattern for a while (see https://github.com/qrush/sub) but it's a bunch of boilerplate to copy between projects. Just pulls out that logic into a simpler config file.

comment 4y ago · link · parent

You might find checkexec useful to pair with just, it is basically a tool that only does the file-based dependency part of make: https://github.com/kurtbuilds/checkexec
1
353637
84