HNHacker News
TopNewBestAskShowJobs

fks

347 karma · joined April 1, 2013

submissionscomments
fks··on Defaulting on Single Page Applications
An incredible example of what's suddenly possible with the View Transition API: https://twitter.com/charca/status/1637832314364497920 (Built with Astro)
fks··on Astro 2.0
https://youtrack.jetbrains.com/issue/WEB-52015/Astro-Languag...

> Hi everyone! Sorry for not posting the announcement here, too. I can confirm that we’re going to add Astro support in v2023.1. We will keep you posted on our progress once we start working on the issue and will ask you to give Astro support a try and share your feedback with us. Please keep monitoring the issue for updates.

Sounds like it's coming soon!

fks··on Alpine.js
Shameless plug: Astro supports Alpine.js and is a great dev environment for trying out Alpine for the first time. It runs in the browser as well, via Stackblitz!

- Astro: https://astro.build/

- Try Alpine in the browser: https://astro.new/framework-alpine?on=stackblitz

fks··on Fresh is a new full stack web framework for Deno
Congrats to the Deno team on v1.0!

If you’re interested in something similar for the Node.JS ecosystem, check out Astro (https://astro.build).

Fresh’s Zero-JS island architecture approach was largely inspired by it.

fks··on Astro: Ship Less JavaScript
Yup, static site means you can pretty much deploy anywhere! Just configure Vercel to point to the final destination build directory when you set up your project.
fks··on Astro: Ship Less JavaScript
Run `npm create astro` in any directory to load one of 4 starter demos!
fks··on Astro: Ship Less JavaScript
Elder is great! We're definitely fans. both Elder and Astro deliver Partial Hydration and the same "0kb JS by default" story. We wanted something less Svelte-specific and more pluggable, along with some other neat features mentioned in the README that couldn't fit in the launch post.
fks··on Astro: Ship Less JavaScript
There are a few sites in the wild already built with Astro that you can check out:

- https://www.snowpack.dev/ - https://divriots.com/

fks··on Astro: Ship Less JavaScript
No benchmarks yet, but I'll look into adding some. In the meantime there are a few sites in the wild already built with Astro that you can check out:

- https://www.snowpack.dev/

- https://divriots.com/

fks··on Astro: Ship Less JavaScript
:wave: Hey everyone, one of the Astro creators here! Happy to talk Astro or answer any questions you have about what we're building.

Our README has a bunch more info that we couldn't fit into the release post: https://github.com/snowpackjs/astro

fks··on Snowpack: Build a web application without a bundler
Yup, from the tl;dr on the site:

> TL;DR - Snowpack removes the need for bundlers (Webpack, Parcel, Rollup) in a traditional application build process by leveraging the ESM syntax you're already writing. Keep using your favorite web frameworks (React, Preact, Vue, Svelte) & build tools (Babel, TypeScript).

fks··on Snowpack: Build a web application without a bundler
This does! :D
fks··on Snowpack: Build a web application without a bundler
That's whats so cool about this: Unlike Create React App or other "starter apps" that try to hide complexity from you, Snowpack actually removes that complexity entirely. If you didn't want to use a single other tool, you could use Snowpack to build a fully modern web app by shipping your source code directly to the browser (cue the "View Source" nostalgia :)

Luke Jacksonn is someone who's done some interesting work in this space with zero-build-tooling sites: https://perf.link - https://github.com/lukejacksonn/perflink

https://www.pika.dev is built with Babel and TypeScript, so it's not technically "zero-tooling", but we still get almost instant iteration by skipping a "bundle" step during development.

fks··on Snowpack: Build a web application without a bundler
Frontend over-complexity is exactly the problem that this is trying to solve for! You can think of this as a simple post-install tool that removes a huge chunk of the complexity (bundling) from your stack, without limiting what you can build.

If this direction of simplified web development is something you're interested in, you'll enjoy this post I wrote back when we started this project (and it was called @pika/web): "A Future Without Webpack" - https://www.pika.dev/blog/pika-web-a-future-without-webpack/

Disclaimer: I created Snowpack & Pika (pika.dev).

fks··on Pika – The JavaScript package registry for the modern web
Thread / Discussion on Twitter from this morning: https://twitter.com/pikapkg/status/1196825435671158787
fks··on Lack of cdnjs activity
Really sad to see this, I remember relying on cdnjs at a few old jobs over the years. Hope they get this sorted.

If anyone is looking for alternatives, I created Pika CDN as a modern alternative for cdnjs/jsdelivr/unpkg. It runs off of npm (so no approval bottlenecks) and is 100% modern ESM (so you can `import` every package directly in the browser without a bundler). https://www.pika.dev/cdn

fks··on Pika/web: Web Apps Without the Bundler
Similar to what would happen today when a package exports both ESM (web) & CJS (node): frontend gets ESM via @pika/web, while node would use CJS via require. A Babel plugin comes bundled with @pika/web which can help you resolve imports correctly in the web build.

Although at that point, where your app needs to reliably run in both Node & the browser, there’s a good case to be made for bundling. All that complexity is giving you something valuable, which is the point that the article tries to make:

in 2019, use bundling because you want to and not because you have to.

fks··on Install NPM dependencies that run in browser without Browserify, Webpack
It does!

> By default, @pika/web will install all package.json dependencies with an ES "module" entrypoint to the web_modules/ directory. @pika/web is able to handle any legacy Common.js/Node.js transitive dependencies in your dependency tree, however the top-level dependencies (the ones that you import directly) must have a "module" entrypoint.

fks··on Pika/pack – NPM packaging, reimagined
Check out the build-umd plugin, which should give you exactly that (in addition to esm & node builds)

https://www.npmjs.com/package/@pika/plugin-build-umd

fks··on How to build a JavaScript package manager
Love this kind of format as a way to explain how Yarn works. Awesome article!
fks··on Show HN: Hellobox.org – Company gear for remote teams
Can you customize what's in the box? I know Hired sends out amazing swag to their companies/clients in boxes like these, it would be great to be able to use this to run something similar.
fks··on Help MuckRock crowd-FOIA Stingray usage around the country
...huh?
fks··on Making PHP Safer
fyi this is open sourced https://github.com/box/augmented_types
fks··on Designing Singletons in Node.js
My next post is on class design in Node. Keep on the lookout, would love to get your feedback on it.
fks··on Designing Singletons in Node.js
Haha you wouldn't like Node then :)
fks··on How much does a Lyft driver earn?
I know Uber drivers count driving/car costs as business expenses for a tax write off. Something to think about...
fks··on Want to Learn to Code? Start Small and Have Fun
Ah man... this is such a better title. What was i thinking???
fks··on Want to Learn to Code? Start Small and Have Fun
Totally agree with you that the skills learned from messing around won't turn you into a fully skilled programmer. My argument is that if he'd learned algoritms, recursion, data structures, etc. he probably would have hated and dropped it, while instead he at least knows something, has the ability to teach himself more, and hopefully has fond memories. It's much better to foster a true interest in programming - even if they're not very good - if it will then lead them to improve themselves and enjoy doing it.