dave caruso Profile
dave caruso

@thepaperdave

977
Followers
0
Following
96
Media
390
Statuses

living, right now, right here

Joined July 2021
Don't wanna be here? Send us removal request.
@thepaperdave
dave caruso
11 months
In the next version of Bun "vite dev" runs
Tweet media one
14
50
671
@thepaperdave
dave caruso
8 months
In the next version of Bun You can switch to 'bun install' from npm without upgrading dependencies.
Tweet media one
8
7
147
@thepaperdave
dave caruso
3 months
In the next version of Bun console.log formats large numbers with exponent notation.
Tweet media one
6
3
124
@thepaperdave
dave caruso
5 months
today, i got "bun run <npm package>" to work on windows ~800ms faster than npx. bun cowsay yooo: 79ms (11x faster) npx cowsay yooo: 925ms
Tweet media one
2
4
104
@thepaperdave
dave caruso
4 months
sharp works in bun for windows
Tweet media one
3
5
102
@thepaperdave
dave caruso
5 months
bun for windows gets initial ffi support
Tweet media one
1
4
92
@thepaperdave
dave caruso
1 year
In the next version of Bun Discord.js works
Tweet media one
2
7
86
@thepaperdave
dave caruso
6 months
got bored and started cleaning up some random error messages in bun. before on the left, after on the right.
Tweet media one
2
2
77
@thepaperdave
dave caruso
7 months
In the next version of Bun, You can pass -e to evaluate scripts. This also exposes node/bun builtins as top level variables.
Tweet media one
4
7
74
@thepaperdave
dave caruso
1 year
In the next version of Bun Hashing with "crypto" is 2.7x faster than Node.js on small input.
Tweet media one
7
1
66
@thepaperdave
dave caruso
9 months
In the next version of Bun 'server.requestIp(req)' returns the IP of the Request, as this isn't available on the web Request object.
Tweet media one
4
7
56
@thepaperdave
dave caruso
9 months
One reason Next.js does not work perfectly on Bun right now is that they override 'Module.prototype.require', aka the "require" function for all CommonJS modules.
Tweet media one
4
1
55
@thepaperdave
dave caruso
7 months
In the next version of Bun, You can run any file as a test file by passing it as a path.
Tweet media one
3
2
51
@thepaperdave
dave caruso
11 months
In the next release of Bun async_hook's AsyncLocalStorage works. This API lets you pass state through await & promises, like a request ID
Tweet media one
2
4
45
@thepaperdave
dave caruso
7 months
i very much enjoy making error messages better
Tweet media one
2
1
32
@thepaperdave
dave caruso
8 months
hold my chocolate while i build bun for windows.
Tweet media one
4
1
32
@thepaperdave
dave caruso
27 days
In the next version of Bun Sourcemaps 'just work' when you run the output of `bun build --target=bun --sourcemap`
Tweet media one
2
2
31
@thepaperdave
dave caruso
10 months
@jarredsumner progress on the app router: it can render one page, but then it breaks. we're definitely close.
Tweet media one
1
0
30
@thepaperdave
dave caruso
11 months
In the next version of bun test "bun test -t <pattern>" lets you filter tests to run via regex
Tweet media one
2
2
29
@thepaperdave
dave caruso
3 months
small thing coming to all platforms, "bun pm cache rm" deletes bunx cache
Tweet media one
0
1
26
@thepaperdave
dave caruso
7 months
Every macOS computer includes a JavaScript shell in terminal, run: /System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Helpers/jsc
Tweet media one
0
1
27
@thepaperdave
dave caruso
7 months
@thdxr i get 10ms-100ms on node, then <10ms on (upcoming) Bun.
Tweet media one
0
2
25
@thepaperdave
dave caruso
6 months
😭
Tweet media one
3
0
25
@thepaperdave
dave caruso
6 months
fun fact, all CommonJS modules support html comments.
Tweet media one
2
2
24
@thepaperdave
dave caruso
10 months
In the next version of Bun, Add custom formatters to objects with "Bun.inspect.custom" (compatible with Node's inspect)
Tweet media one
0
1
22
@thepaperdave
dave caruso
2 months
hi im 20
2
0
22
@thepaperdave
dave caruso
7 months
i set github actions to upload core dump and .. o.. oh
Tweet media one
4
0
19
@thepaperdave
dave caruso
8 months
@tsoding @discord why are you on a two year old version of chromium
3
0
19
@thepaperdave
dave caruso
1 month
i wish typescript checking was faster
1
0
19
@thepaperdave
dave caruso
9 months
@thorstenball i like to think of it in frames. 16ms is one frame on a 60hz display. if you can do an action in under that time, it is quite literally instant.
1
0
17
@thepaperdave
dave caruso
5 months
this is the stupidest thing in all of javasscript
Tweet media one
11
3
18
@thepaperdave
dave caruso
6 months
you can import "bun:test" in any file now. it lets you do some useful things but also you can be really silly. i wonder if setSystemTime has any non-test applications.
0
1
16
@thepaperdave
dave caruso
7 months
Bun.spawnSync() on windows almost barely works.
Tweet media one
2
0
16
@thepaperdave
dave caruso
6 months
my phone passcode is the last 4 digits of pi
2
0
15
@thepaperdave
dave caruso
6 months
@bunjavascript oh btw, huge internal changes to help the upcoming windows build. for example, youll notice that "node:path/win32" module actually works now. lot of other subtle things changed too but i think the rest arent too clearly visible
2
0
15
@thepaperdave
dave caruso
9 months
i wasted 10 hours to find this fix:
Tweet media one
1
0
16
@thepaperdave
dave caruso
4 months
fixing up lot of bunx edge cases on windows. dont have a good screenshot that will wow anyone, but i will be able to say it works as expected. it has a lot of special paths to do things faster. alot of which are only doable on windows. some are because windows forces me.
2
0
16
@thepaperdave
dave caruso
6 months
what i've been spending the past 6 months on in my free time:
Tweet media one
2
0
14
@thepaperdave
dave caruso
9 months
@imUnsmart @jarredsumner it's nearby a "fixes ..." comment and the issue i mention is related. the full line is "Does not fix #4660 but this probably lays out most of the work for it to work."
1
0
14
@thepaperdave
dave caruso
3 months
was messing around
Tweet media one
0
0
14
@thepaperdave
dave caruso
6 months
this is what my workspace looks like when triaging issues/testing features for bun
Tweet media one
3
0
12
@thepaperdave
dave caruso
23 days
at some point you learn all programming is actually just instructions for how to move data around.
0
1
14
@thepaperdave
dave caruso
1 month
insane
Tweet media one
0
0
13
@thepaperdave
dave caruso
11 days
busy
Tweet media one
0
0
13
@thepaperdave
dave caruso
7 months
I forgot to mention it supports typescript, top-level-await, and also JSX
Tweet media one
0
1
12
@thepaperdave
dave caruso
4 months
this is why i dont really trust LLMs at all anymore
Tweet media one
0
0
13
@thepaperdave
dave caruso
1 year
i started working on a really nice TS library to interface with @OpenAI 's new chat + functions api. the defined "weather" function gets called in order to respond, since the prompt is asking for it. also supports streaming with async iterators. will publish tomorrow or so
Tweet media one
3
1
12
@thepaperdave
dave caruso
7 months
windows environment variable keys can contain emojis
2
0
11
@thepaperdave
dave caruso
8 months
this causes bun's ci to take one minute longer than it really needs to. lol.
Tweet media one
0
0
10
@thepaperdave
dave caruso
11 days
the more i use git submodules the less and less i enjoy them. at the start i thought they were great, now life is
Tweet media one
1
0
12
@thepaperdave
dave caruso
2 months
in my opinion this is a design flaw in the typescript language
Tweet media one
2
0
12
@thepaperdave
dave caruso
1 year
@Joshument @uwukko its a result of css modules or similar techniques that allows you to have per-component styles where the actual class names might be the same, but when compiled theyre mapped to something else to not conflict with each other (). its a better dev experience.
2
0
11
@thepaperdave
dave caruso
7 months
pro tip: alias a bunch of file conversion command with opinionated default presets
Tweet media one
1
0
11
@thepaperdave
dave caruso
5 months
import { fileURLToPath } from 'url'; function isWindows() { try { fileURLToPath("file:///") } catch { return true; } return false; }
1
1
11
@thepaperdave
dave caruso
4 months
reminder: the operating system is not responsible for clearing the temp folder. mac and linux usually do, but it is not guaranteed
1
0
11
@thepaperdave
dave caruso
5 months
its both fun and pain to write this code. its very low level. not linking libc
Tweet media one
0
0
10
@thepaperdave
dave caruso
5 months
@bunjavascript hexdump of tsc.bunx
Tweet media one
1
0
10
@thepaperdave
dave caruso
9 months
also, it was not fun tracing this bug in Bun from a difference in how <Head /> renders lol
Tweet media one
0
0
10
@thepaperdave
dave caruso
6 months
and minifiers cannot remove the space in a less than not decement operation
Tweet media one
0
0
10
@thepaperdave
dave caruso
3 months
took one day to figure out this bug, added an assertion so future situations that run into this will instantly know why.
Tweet media one
0
0
10
@thepaperdave
dave caruso
3 months
taking more than one second to save a file (small, this one is 1586 bytes) should be considered an editor/tooling bug nowadays.
1
0
8
@thepaperdave
dave caruso
2 months
switching web browsers again: arc -> safari
1
0
9
@thepaperdave
dave caruso
5 months
@jarredsumner its always annoyed me that the process already recieves sigint -- meaning in almost every case answering no to "terminate batch job" still terminates the application.
0
1
8
@thepaperdave
dave caruso
5 months
oh wait till i drop `direct_launch_with_bun_js` i think its going to get much faster
0
0
9
@thepaperdave
dave caruso
3 months
the more software i see that claims it is fast *because of* the language it's written in, the more i want to never write any software ever again. the reason fast software is fast is because of technical decisions made along the way writing it.
1
0
8
@thepaperdave
dave caruso
2 months
been doing some frontend stuff and for simple projects, i do not see the need to use anything complicated. this project is single page and i am going to fit the entire frontend under 10kb before gzip.
2
0
8
@thepaperdave
dave caruso
7 months
you know how theres that one ai model that can separate singing from instrumental. can someone do that but to remove the laugh track from tv shows.
0
0
8
@thepaperdave
dave caruso
11 months
@wojtekmaj91 @jarredsumner way earlier when i was testing this, i ran an http stress test benchmark on the dev server (not really a realistic thing) and it was something like twice as fast. (this is off memory so don't quote me)
0
0
7
@thepaperdave
dave caruso
3 months
instead of using node version manager, i have a ten line shell script which re-downloads and installs such program. anything more complicated than this is silly.
2
0
8
@thepaperdave
dave caruso
1 year
I'm making a web framework with #reactjs (server components support) and bun ( @oven_sh ). here's an HMR demo with the first build in 20ms, and client components reloading in ~5ms per change. very experimental
0
2
8
@thepaperdave
dave caruso
7 months
i hate that the price to recover my data is quite literally an order of magnitude above the cost to buy cloud storage for the entire time i've been alive. this thing i'm going to pay for is the biggest waste of money in my life for the stupidest mistake ever: forgetting backups
0
0
8
@thepaperdave
dave caruso
7 months
have not emptied trash since i got this macbook earlier this year. lol
Tweet media one
0
0
7
@thepaperdave
dave caruso
8 months
Fun Fact: powershell can copy directories without -r, but it will only copy the directory without the contents. On unix, trying to do this fails. Didn't realize till now that I pushed a build without headers.
Tweet media one
0
0
7
@thepaperdave
dave caruso
1 month
@umaar can you just make it custom so i can make it like 30000x slowdown and see my page work in slow motion
1
0
7
@thepaperdave
dave caruso
11 months
reminder that synchronous js module formats like commonjs are faster than esm modules. but es import/export statements are nice
1
0
7
@thepaperdave
dave caruso
7 months
im glad im not paying the ci bill
0
0
7
@thepaperdave
dave caruso
9 months
@JLarky where is the cli? like "npx is-bun" / "bunx is-bun"
1
0
7
@thepaperdave
dave caruso
3 years
orange
1
0
7
@thepaperdave
dave caruso
4 months
to keep my password manager safe, i store it's password in a different password manager. i think i have 3 or 4 of them, storing each other's passwords.
0
0
7
@thepaperdave
dave caruso
4 months
dear all developers. write more assertions please.
1
1
7
@thepaperdave
dave caruso
8 months
migrating from yarn and pnpm will come later; most of the work for that is going to be on writing parsers for their lockfiles, and then reusing this 'package-lock.json' -> 'bun.lockb' code.
0
0
7
@thepaperdave
dave caruso
9 months
They also override 'Module._resolveFilename' which is an observable node internal that is sort of the internal implementation of 'require.resolve'. I knew about this one for a while, but somehow I didn't see the require override until just now.
Tweet media one
2
0
7
@thepaperdave
dave caruso
6 months
added the warning for long lifecycle install scrip, but also slightly smarter printing of newlines vs current behavior.
Tweet media one
0
0
6
@thepaperdave
dave caruso
7 months
does anyone else on macos 14.1.1 have a bug where something overnight eats 700gb of storage. yesterday i cleaned up some space and i am once again out
Tweet media one
2
1
7
@thepaperdave
dave caruso
4 months
the ~ in shells can query any user's home directory
Tweet media one
0
0
7
@thepaperdave
dave caruso
7 months
I have downgraded to macOS 13. I will never update this laptop's operating system ever again.
1
0
7
@thepaperdave
dave caruso
5 months
@uncentr yes it is technically how let works but this in the context of a repl: - always reporting undefined is often unhelpful - once you declare a let you can no longer put another let, which means you cant uparrow+enter a command you typed.
2
0
6
@thepaperdave
dave caruso
4 months
today i found out how to control my own mind
1
0
6
@thepaperdave
dave caruso
5 months
@jarredsumner ill fix bun repl after windows
0
0
6
@thepaperdave
dave caruso
3 months
also i fixed the various % formatters so bun now matches the unintuitive spec :)
Tweet media one
0
0
5
@thepaperdave
dave caruso
7 months
Node.JS pop quiz: path.win32.resolve("/one", "D:two", "thre", "F:four", "five")
F:\four\five
26
F:\one\thre\four\five
8
F:\one\two\thre\four\five
9
0
0
6
@thepaperdave
dave caruso
7 months
been kinda on a spiral of being mad because people say that LLMs do way more than they really do. every use case seems to be a demo, but applying it into larger tasks falls apart in subtle or explosive ways. probably gonna cancel chatgpt+, humans can create better art
0
0
5
@thepaperdave
dave caruso
11 months
it's a fun nightmare adding a new bytecode operation type to JavaScriptCore (done as a way to implement bun's AsyncLocalStorage faster)
1
0
6
@thepaperdave
dave caruso
8 months
do you ever write code that feels "too simple to be the correct solution"
0
0
6
@thepaperdave
dave caruso
11 months
@iddar @jarredsumner I'm going to be spending most of my time tomorrow before the release trying as many vite plugins and configurations to make sure everything works. i know there is one bug still preventing sveltekit but it's being worked on already.
2
0
6
@thepaperdave
dave caruso
4 months
@jarredsumner can be fixed by uninstalling coreutils i don't think we should be using them in our windows tests, especially considering we implement almost all of the apis exposed there within bun.exe
1
0
6
@thepaperdave
dave caruso
6 months
javascript code: Array.prototype.reverse .call({ 0: 'a', 1: 'b', 2: 'c', 3: 'untouched', length: 3 })
1
0
6
@thepaperdave
dave caruso
19 days
it would be funny if typescript autocomplete had a list of every function from every npm package so you could just autocomplete any package, like if you typed `init`, you would get like a million completions for every function named `init()`
0
0
5
@thepaperdave
dave caruso
9 months
These issues aren't hard to fix, but they cause slowdowns considering our module resolver is entirely in native code. It's also funny to see the ways that people hack into node internals (footnote: in node you can override 'fs.readFileSync' to alter how require loads source code)
2
0
6
@thepaperdave
dave caruso
3 months
@thorstenball still waiting for better zig support, the `gq` vim binding to reflow text, auto-save, and maybe some more light themes. currently it's at the point that in non-zig programs i flip between vscode and zed depending on the action.
1
0
5