HackerTrans
トップ新着トレンドコメント過去質問紹介求人

sbjs

no profile record

投稿

Show HN: Mid-level Node.js helpers for building a front-end website

immaculata.dev
1 ポイント·投稿者 sbjs·昨年·0 コメント

Comparing Immaculata to Vite

immaculata.dev
1 ポイント·投稿者 sbjs·昨年·0 コメント

(ab?)using Node module hooks to speed up development

immaculata.dev
38 ポイント·投稿者 sbjs·昨年·16 コメント

Why I ever wrote Clojure

thesoftwarephilosopher.com
89 ポイント·投稿者 sbjs·昨年·50 コメント

[untitled]

2 ポイント·投稿者 sbjs·昨年·0 コメント

Build.js.dev.build

thesoftwarephilosopher.com
1 ポイント·投稿者 sbjs·昨年·1 コメント

Build.js.dev.build

thesoftwarephilosopher.com
1 ポイント·投稿者 sbjs·昨年·0 コメント

A New Way to Vendor

immaculata.dev
1 ポイント·投稿者 sbjs·昨年·0 コメント

Immaculata

immaculata.dev
4 ポイント·投稿者 sbjs·昨年·3 コメント

Show HN: Immaculata.dev, TypeScript DX Primitives

immaculata.dev
1 ポイント·投稿者 sbjs·昨年·0 コメント

Show HN: Immaculata.dev, web build tool for engineers

immaculata.dev
1 ポイント·投稿者 sbjs·昨年·0 コメント

Show HN: Immaculata, simple front-end build tool

github.com
1 ポイント·投稿者 sbjs·昨年·0 コメント

Standardize JSX while there's time

thesoftwarephilosopher.com
1 ポイント·投稿者 sbjs·昨年·0 コメント

I can't delete my framework

thesoftwarephilosopher.com
2 ポイント·投稿者 sbjs·昨年·2 コメント

Show HN: A new way to create universal/ssr TypeScript apps with JSX

github.com
1 ポイント·投稿者 sbjs·3 年前·0 コメント

Fairly sure I just made something better than React

github.com
2 ポイント·投稿者 sbjs·3 年前·5 コメント

A Letter to Dr. Pusey on His Recent Eirenicon, by Dr. John Henry Newman (1868)

archive.org
2 ポイント·投稿者 sbjs·3 年前·1 コメント

Show HN: Fast Jekyll Alternative in TypeScript with JSX

github.com
13 ポイント·投稿者 sbjs·3 年前·5 コメント

Show HN: Simple/Fast JSX Ssg

github.com
4 ポイント·投稿者 sbjs·3 年前·0 コメント

The simplest SSG I could think of

sdegutis.github.io
2 ポイント·投稿者 sbjs·3 年前·0 コメント

コメント

sbjs
·昨年·議論
It's a highly optimized and extremely simple yet robust implementation of it, sure. Is that reason to dismiss it?

Consider Vite's node-side HMR implementation. It creates its own module system on top of Node's native module system, using `node:vm`. So its modules are really second class citizens that have to be glued to the native module system.

This library used to do that, but moved to using Node's native module hooks, so that there's nothing magical going on, and you can still use the `import` expression to import your HMR modules, they just auto-update when saving.
sbjs
·昨年·議論
That's orthogonal, and in fact you probably would use TypeScript to translate JSX to JS when using this library. What this does is (a) provide a Node.js module hook to call your transpile function when it encounters TSX/JSX files, and (b) provide a Node.js module that lets you remap imports, including "react/jsx-runtime" if you want a different JSX implementation.
sbjs
·昨年·議論
It's English, it just looks like regex. In English, the ? belongs inside the parens in this case.
sbjs
·昨年·議論
Just updated the text to be hopefully much clearer.
sbjs
·昨年·議論
Oh no, I must have mis-explained it.

The file `site/myfile.js` does exist. All FileTree does is recursively load all files in a dir into memory.

The `useTree` module hook does two things:

* Pulls the file from memory when loading it instead of from disk

* Adds a cache busting query string when resolving it for invalidation

Combined with tree.watch(), this essentially allows you to add a very lightweight but extremely accurate hot module replacement system into Node.js

    const tree = new FileTree('src', import.meta.url)
    registerHooks(useTree(tree))
    tree.watch().on('filesUpdated', () => import(tree.root + '/myfile.js'))
    import(tree.root + '/myfile.js')
Now save src/myfile.js and see it re-executed
sbjs
·昨年·議論
Just added some code samples, thanks for the suggestion.
sbjs
·昨年·議論
Can't remember, was like 10 years ago. But basically after I finished mastering the last feature I needed to, probably macros.
sbjs
·昨年·議論
To clarify, I don't mean that Rich didn't also have extremely good reasons to make Clojure, given he was using Java (and maybe C++) in 2007. They're not the best languages now, but they were so broken back then that they practically caused the language revolution that caused Clojure and Go and Node etc to flourish.
sbjs
·昨年·議論
I thought it was self explanatory. It had new idioms I had not yet learned and internalized, so I fully absorbed it. When that was finished, I needed something else to do the same thing with. It's like listening to a song on repeat 10-100 times (depending on the song) when you first hear it. You get everything you can out of it and move on when it's empty.
sbjs
·昨年·議論
I guess that confirms my theory.
sbjs
·昨年·議論
Thanks, yeah it sounds like we have similar goals. Where's your project so I can take a look?
sbjs
·昨年·議論
Your patience with Michael Saboff is incredible.
sbjs
·昨年·議論
Infeasible not because it's difficult but because you have more awareness of your limited time that you have to prioritize, and maintaining software falls lower and lower on the list of things you should do.
sbjs
·3 年前·議論
Yes.
sbjs
·3 年前·議論
I posted an example in the thread.
sbjs
·3 年前·議論
Hi everyone. I know that's a bold statement you'd expect from a new coder and not an experienced guy unless it's the real deal. And I've got so many decades of experience that I'm really looking forward to hearing feedback :)
sbjs
·3 年前·議論
Full title: A letter to the Rev. E. B. Pusey, D.D. on his recent Eirenicon. by John Henry Newman, D.D., of the Oratory.
sbjs
·3 年前·議論
I wrote one and it's the only software I still maintain and am proud of. I'm kind of inventing a new React like thing in it. It's way cool.
sbjs
·3 年前·議論
TypeScript is no headache for me and has no header files.
sbjs
·3 年前·議論
It's a false dichotomy to dislike OOP or prefer it. It's like saying I prefer hammers over screwdrivers. Just learn how the tools you have should be used and use them well.

The only app I'm currently maintaining and proud of[1] makes tons of use of "traditional" OOP. It uses lambdas and FP when necessary. I think it makes absolutely no use of JavaScript's dynamic features. I'm fairly sure this code would port easily to ObjC.

After 15-20 years, you just get bored of doing things in novel or "pure" ways, and do the bare minimum needed to get the job done that's in front of you.

[1] https://github.com/sdegutis/immaculatalibrary.com