James
@43081j.com
@e18e.dev - chaijs.com - tinylibs - parse5 - unjs - @lit.dev core contrib - github.com/43081j / Focusing on ecosystem perf & tooling π₯³
created April 29, 2023
1,270 followers 207 following 1,636 posts
view profile on Bluesky Posts
James (@43081j.com) reply parent
the most proficient users of LLMs i know lean on large stacks of tools (i.e. mcp). i think a lot of the poor results would be better with such a curated stack of tools it can call. much of the smarts come from those, not from the model
James (@43081j.com)
we have a conversation in the e18e discord at the min around why generators are so much slower than a regular iterator anyone who knows v8 and/or node internals better than us want to educate us? π
James (@43081j.com)
i do miss having a budget for conferences π
if anyone wants to sponsor me getting to squiggle, perf now or vue fes japan - ill be your best friend π
James (@43081j.com) reply parent
sway is the best! tiling window managers are awesome π
James (@43081j.com) reply parent
totally forgot about this! more antfu magic π
James (@43081j.com)
any good suggestions for slides-as-code? happy to use svelte, solid, vue, lit or preact. whatever works would be super nice to have some "live" slides (i.e. running code examples on them etc)
James (@43081j.com) reply parent
coming back to this a day after using it now... it seems to work great. the one thing i keep bumping into - many type imports don't seem to support go-to-def hover info of that same type shows correctly (so it has resolved it, just go-to-def doesn't work) will search the issues!
James (@43081j.com) reply parent
big thanks to the people who involved me in many of these, too too many to list, but to name a few: @natemoo.re @antfu.me @pi0.io and @keithamus.social the best projects to maintain are those where you have a team π
James (@43081j.com) reply parent
remember, you can also sponsor me over at github. these sponsorships help me out a lot π
James (@43081j.com)
i've updated my website a little to at least list the things i work on - its quite a lot now π
James (@43081j.com) reply parent
That register article is such nonsense. Sourced from a company that clearly just wanted some pr to sell their product Really terrible trying to damage the reputation of a good maintainer π¬
James (@43081j.com) reply parent
may end up dropping you a DM or two π
mostly its been a question of "which solution are people using these days"
James (@43081j.com) reply parent
aha thats great! i do a lot of them already but might still be handy
James (@43081j.com)
looks like @sxzz.dev is doing great work pushing people to use trusted publishing! happy to see e18e folks helping out too
James (@43081j.com) reply parent
also i feel like i want a "neovim hard mode" π some of this i already managed, but: - disable arrow keys - disallow switching buffers without saving - no autocomplete (in some languages, force ctrl+space)
James (@43081j.com) reply parent
i used the config from nvim-lspconfig, then `vim.lsp.enable('tsgo')` and it works great so far importantly, it fixes the issue i was having π
James (@43081j.com) reply parent
good to know about vtsls still. it does have the same issue though which makes me think its just a general diff between tsserver and lsp wrappers somehow π€
James (@43081j.com) reply parent
i have, but through individual language plugins like typescript-vim. then coc for lsp-like support all this stuff existed before language servers were a thing (so uses tsserver directly for example)
James (@43081j.com) reply parent
a wrapper! i didn't know there was an official one π im using nvim-lspconfig and the ts_ls wrapper they have there should i be using an official tsgo one in parallel to these configs (and turn off the one they have)?
James (@43081j.com)
so far so good but the lsp stuff (with typescript at least) gives a lot of poor suggestions go to def on a function pops a list of possible defs up: the function itself, and all the `Array` definitions inside TS (because thats what it returns maybe?) bit of a pain π just wanna hop to the function
James (@43081j.com) reply parent
I'm a long time vim user, and never really had a need to use neovim or any other alternative/successor But the language service stuff alone might be enough to make me move π
James (@43081j.com)
Weekend task - setup neovim π
James (@43081j.com)
added grouped updates to the preact signals devtools π thanks to @jovidecroock.com and the team for being open to early contributions π
James (@43081j.com) reply parent
i've found that claude code is very accurate at doing trivial/boilerplatey stuff my time shouldn't be needed for (stuff i'd give a junior dev if i had one! π) i still don't use them for complex things though
James (@43081j.com)
fixed an obscure bug in sveltekit today that i spotted by eye! it'd rarely get hit but still proud i found it π
James (@43081j.com) reply parent
Maybe we need a map of the fastest coffee shops π
James (@43081j.com)
published a new release of relit, its basically the vueuse of the lit world. check it out!
James (@43081j.com) reply parent
This is the bit that makes no sense in the write up to me It reads as if the attacker used the pr target trigger to get the GitHub token Then they committed to the source repo and ran the publish flow to get the npm token? So they had perm to also just publish via the flow at that point? π€
James (@43081j.com) reply parent
and here's some great recipes docs on common uses
James (@43081j.com)
have been checking out lfi recently - fairly small library of very useful async utils in repos that pull a lot of separate async util packages in, this could be a good unified replacement
James (@43081j.com)
on this, i think OIDC publishing would've prevented it since no human could publish then (without going through the GH workflow) - turn on trusted publishing - disable tokens in npm ("Require two-factor authentication and disallow tokens")
James (@43081j.com) reply parent
good job github!
James (@43081j.com) reply parent
there's so many npm keys in the published repos - we probably haven't seen the end of this yet how long until the same malware is published to the packages under those keys too?
James (@43081j.com)
nx was compromised and a new version w/ malware published to npm anyone at github can nudge someone to mass-hide/remove the repos it created? π
James (@43081j.com) reply parent
YES! i tried building this long ago but got side tracked π
do let me know if you want any help, i'd love to see something like this see wider use
James (@43081j.com) reply parent
you're basically a buffer so your team can focus and not have to context switch, feel pressure, etc on a side note, its not frustrating for all leads. some context switch better than others π
James (@43081j.com) reply parent
looking forward to catching up! π
James (@43081j.com)
doing a short talk later this year for anyone interested π
James (@43081j.com) reply parent
i like this idea a lot more i think `strict` just changes over time to have fewer settings as they graduate people can always individually turn them off still
James (@43081j.com)
this'll be so, so nice π
James (@43081j.com) reply parent
if you set `autoRenamePlugins: false`, you might be able to trim away some of that renaming code you have
James (@43081j.com) reply parent
You're an experienced dev - trying to "vibe code" is like trying to be junior again. Using an llm to get the boilerplate/trivial tasks out of the way is more useful (which isn't vibe coding)
James (@43081j.com)
we've just launched the replacements docs on the @e18e.dev site! this is part of a wider effort to document how to make your projects more performant. for now, just the replacements - but in future, perf tips and much more π all feedback much appreciated! β€οΈ
James (@43081j.com) reply parent
hah, that is a 3rd valid case - when two packages want to follow different paths of implementation. so it makes sense to diverge the ones im talking about are near identical implementations of the same thing. only diff is the owner
James (@43081j.com) reply parent
silly james! i've published a new version which fixes this thanks for letting me know
James (@43081j.com) reply parent
in a bunch of cases i've seen, the other maintainer is active and responsive. if they're not, i think i agree its fair to fork/replicate can't think of a good reason to duplicate active, well built packages otherwise!
James (@43081j.com)
some popular maintainers seem to have a habit of insisting on owning their dependency trees. even very simple established packages, they will make their own instead which is roughly the same code. is this a security thing? or what
James (@43081j.com) reply parent
3. its unlikely the maintainers would want to switch their dependencies to the ones we have (in slice-ansi and many others, they're known to prefer owning their dependencies rather than using someone else's). we may also choose to make some obscure edge cases optional instead of default in future
James (@43081j.com) reply parent
2. API differences. for now, we choose not to care about order of prepended/appended ANSI codes. e.g. if you slice `bar` out of `{bold}{fg:blue}foo bar{/fg}{/bold}`, you won't necessarily get `{bold}{fg:blue}bar`, you might get `{fg:blue}{bold}bar`. this makes no diff to rendering
James (@43081j.com) reply parent
1. we do have benchmarks but need to work on publishing some more realistic use cases (though i've been benching against some locally) here's a couple we've been using
James (@43081j.com) reply parent
you did. seems strange though since lit doesn't nuke the dom when props change. it updates attributes, text nodes, etc individually
James (@43081j.com)
fast-slice-ansi is a faster, modern alternative to slice-ansi check it out! π
James (@43081j.com) reply parent
Interesting π€ which requirements don't they fit?
James (@43081j.com) reply parent
yes with some effort you can kinda get svelte to run clientside without a build but its not really made for that i would just use lit in this case, or preact: preactjs.com/guide/v10/no...
James (@43081j.com) reply parent
Lit + signals maybe? Svelte is a good choice but leans towards build time stuff. Preact possibly too
James (@43081j.com)
when the npmgraph looks like this, maybe its time to back away
James (@43081j.com) reply parent
you can actually turn it on, reload bsky, turn it off. from then on, you can read DMs until you do a full reload again
James (@43081j.com)
James (@43081j.com) reply parent
chai 5.3.2 reintroduces the dual-publish meanwhile, since it turns out it was an unexpected breaking change this is one of the few cases where bundling a library makes sense, i think. since the dependencies are actually just part of chai but separated for organisation/cleanliness
James (@43081j.com) reply parent
we released 5.3.1 recently which dropped bundled chai (we had both bundled/unbundled). this actually slowed chai down, but did reduce the size. given that all of our deps are self-owned (and usually only used by chai), we've decided to bundle them in 6.x and no longer ship unbundled sources
James (@43081j.com)
chai 6.0.0 released π - this reduces the size to ~140KB and drops the individual entrypoints we used to have
James (@43081j.com) reply parent
a CLI tool! it was like a unified fuzzy finder across everything ever i'll remember it one day π
James (@43081j.com) reply parent
looks like you can pipe git into fzf at least, that might be good enough for now π
James (@43081j.com) reply parent
it was like fzf but over the top of many popular tools like it was already setup to do git, files, processes, etc
James (@43081j.com)
there's a tool out there which gives you fuzzy finding across a whole bunch of useful stuff (e.g. git). but i can't remember what its called. any ideas? π
James (@43081j.com)
have been using ctrl-z/fg to suspend and resume jobs so much lately. why didn't i do this all along π
James (@43081j.com) reply parent
aha it does have multi-select! i missed that, and pretty much the way im describing nice work π
James (@43081j.com) reply parent
and what about when someone asks for multi-select? π
in many cases in the past i've ended up using a tags input, basically. like a combo but populate a tags list
James (@43081j.com) reply parent
material (mwc) has one iirc but the project seems to have lost to politics somewhere along the way and isn't as maintained now would also love to see one. im surprised shoelace hasn't got one
James (@43081j.com)
started the week by shaving 150KB off chai in 5.3.0 π
James (@43081j.com)
good amount of github to catch up on π
James (@43081j.com) reply parent
The non fun part is the 5 hours+ of delayed trains and such going back toπ
James (@43081j.com)
Heading back home after a week stood in a field listening to music
James (@43081j.com) reply parent
I'll get to this when I'm back in a day or two π I think much of this is just because some things were rushed unfortunately. We put a lot of effort into following good contribution guidelines as a community, so it's a shame to see these problems/disagreements
James (@43081j.com) reply parent
The community has good intentions to this guidance, and probably just got ahead/looser as things started to get merged unfortunately. lodash rarely has a need these days since much of it exists natively, but that migration needs to happen at a pace the team can deal with
James (@43081j.com) reply parent
I'm the one who initially reached out to remix, I put a lot of effort to discuss things first and create issues, etc It can be difficult to keep an entire community on a track like that but I do try. I probably should've kept a closer eye on it
James (@43081j.com) reply parent
Seems unfortunate you've had a poor experience here. I'll try catch up on it when I'm back. Lodash still has a use but a large portion of it exists natively now, which covers most use cases
James (@43081j.com) reply parent
I've been away this week (and still am) but have tried to catch up on this stuff. The lodash creator joined our community long ago and was on board with moving to native utils instead of lodash. I think that's what the community is trying to do. The granular packages are not maintained either
James (@43081j.com) reply parent
Feel free to DM me which ones you think are poorly written. We have a very thorough contribution and advocacy guide - and the core contributors in the community certainly don't submit low quality changes. So I'm sure you've encountered an outlier - it is a fairly big community after all
James (@43081j.com)
Well that's new! Being blocked from creating issues on a repo for asking if we can drop browser support π
Top interaction
James (@43081j.com) reply parent
Yup that's the right thing to do but not possible in this case, since it's a library only for node buffers. So any browser support has to polyfill buffer π
some libraries very clearly should've never had browser support
James (@43081j.com) reply parent
100% - because you knew it was appropriate for a browser so might have use there one day But a lot of these libraries are not like that and exist just to work with node built ins. So the bundle contains browser implementations for them all π¬
James (@43081j.com)
Seen a popular library that is built specifically for working with node built ins but has a browser bundle. Things like this I'm almost certain never needed browser support but that initial design choice means they've been supporting it all these years... Build it when needed, instead!
James (@43081j.com) reply parent
Awesome! Will give it a go when I'm back at a laptop π₯³ thanks so much
James (@43081j.com) reply parent
When I try run it on apple silicon, it complains that there's no binary available then tries/fails to build one iirc (mobile at the min so can't try it). If I install regular pprof-node, I can run that programmatically without a problem (the Google one)
James (@43081j.com) reply parent
awesome, thank you :D ill check both out
James (@43081j.com)
disappearing to a festival for a few days! πͺ
James (@43081j.com)
now that pprof-it (and pprof itself) seem fudged on any modern mac, does anyone know of a good alternative for quickly making a pprof-able profile from a node process?
James (@43081j.com) reply parent
Quite a few clack projects install boxen which results in pulling in a whole other, slower stack of ansi libraries. So this should help avoid those situations and speed things up a bit!
James (@43081j.com)
new version of @bomb.sh clack - now published with OIDC π we've added a new `box` prompt, nested task logs, and a bunch of improvements
James (@43081j.com) reply parent
nice work! do you have a plan to get the improvements into semver itself? or the package managers would be some huge savings
James (@43081j.com)
replacing wrap-ansi with fast-wrap-ansi in clack dropped the unminified size from 90KB to 71KB π
James (@43081j.com) reply parent
is this using tsgolint under the hood? (the oxc fork) nice work!
James (@43081j.com) reply parent
should delve into the brain of @pngwn.at , sure hes been down that markdown rabbithole before π
& if you want any help, i'd love to join in :D
James (@43081j.com)
we now have an @e18e.dev github sponsors page! this community has helped so widely across the ecosystem - the prettier cli, esm migration, storybook/netlify/etc size reduction, and much more sponsorships will help support the people doing all of this work β€οΈ
James (@43081j.com)
Enable oidc publishing everyone! π₯
James (@43081j.com)
Heading down to London for the day! π
James (@43081j.com) reply parent
I shall do the same! This is great news π
James (@43081j.com)
Do I know anyone at GitHub? π Our e18e sponsors account has been stuck pending for a few months now I think I know why but struggling to find a human to ask about it π
James (@43081j.com)
a common thing i've run into this week: packages which exhaustively try to cover every possible edge case. but it turns out almost no consumer calls it in a way that would hit those cases some are 1/4 of the size when you cut those out. sometimes its ok to just... not support things