HNHacker News
TopNewBestAskShowJobs

ben-schaaf

4,396 karma · joined November 11, 2015

submissionscomments
ben-schaaf··on Migrating away from Rust
You don't need to derive anything, sqlx creates structs with the query results for you. The rest of your complaints are just the natural consequence of SQL's design. sqlx is no more difficult to use than similar libraries in other languages.
ben-schaaf··on Migrating away from Rust
Building a proper ORM is hard. Querying a database is not. See the postgres crate for an example.

Querying a database while ensuring type safety is harder, but you still don't need an OEM for that. See sqlx.

ben-schaaf··on The hidden cost of AI coding
Exactly. If LLMs were like higher level languages you'd be committing the prompt. LLMs are actually like auto-complete, snippets, stackoverflow and rosetta code. It's not a higher level of abstraction, it's a tool for writing code.
ben-schaaf··on Subnanosecond Flash Memory
> How far away the memories are in space is way more critical than the speed of any one element in isolation.

Correct me if I'm wrong, but I don't think this is true. If you put instant memory a whole meter away it'll still only have a round trip of 6.6ns at the speed of light, which is approximately the latency of L2. Given how close L2 is, I don't think distance is a large factor of its latency.

ben-schaaf··on Making a smart bike dumb so it works again
This is why I avoid anything that advertises as having an app. Whether it's adding huge latency to a volume change, using it for advertising or removing functionality entirely; the manufacturer simply has too much ownership over a product you've supposedly bought.
ben-schaaf··on Apple M3 Ultra
Except that you're stuck with macOS, so there aren't any drivers for NVIDIA, AMD or Intel GPUs.
ben-schaaf··on XOR
To cut down the storage overhead of the linked list. You're saving 8 bytes per element on 64-bit systems.
ben-schaaf··on I still like Sublime Text
You can achieve the same thing using the arithmetic command in the command palette: `__import__('datetime').datetime.now().strftime("%Y-%m-%d %H:%M")`.
ben-schaaf··on I still like Sublime Text
There's not much to it: we wanted steadier income and our customers wanted more consistent updates but also perpetual licenses. This model was the natural conclusion. We tried it out with Sublime Merge and then brought it over with ST4.
ben-schaaf··on I still like Sublime Text
ST3 won't be receiving any bugfixes or new features, so it's effectively EOL. Anyone's of course free to use ST3 or 2 or 1 if they don't wish to upgrade, we still make those available on our website.
ben-schaaf··on I still like Sublime Text
It's myself and my colleagues full time jobs, yes. Jon Skinner (ST's creator and owner) also works full time with us.
ben-schaaf··on I still like Sublime Text
We already offer ST and SM in a discounted bundle :)
ben-schaaf··on I still like Sublime Text
> It then opens up a new tab instead of an inline dropdown. Apparently that tab isn't normal text, it's clickable text.

If you're talking about the built-in goto-definition then it's definitely not a tab, it's a popup similar to goto-anything and the command palette. You can type to filter, use the arrow keys, press enter, ctrl+enter for side-by-side, etc.

If you want to use the mouse you can hover over the symbol and get a list of definitions and references.

> it contains usages as well as definitions

That sounds like you've got a syntax that isn't classifying its symbols correctly. I vaguely remember Microsoft's Typescript package doing this. All the built-in syntaxes properly classify definitions so you won't have references show up in that list. It's possibly simply removing a package will fix this for you.

> When you click on a result, it opens the file, but doesn't quite scroll to the definition, although it's in view (but not highlighted! So you have to scan for it again!)

Not scrolling to the definition is odd, it's working fine for me. I agree we could highlight the definition better; by default the line is highlighted though. You can enable line highlighting if that's too subtle.

> The little pseudo terminal that pops up at the bottom when you press ctrl+b (build) is also highly annoying. Why does it not accept keyboard input? I keep having to open a separate terminal where I can compile and test my TUI apps. If I just use ctrlB, then my app hangs waiting for stdin that I can never provide. And that waiting process never gets removed by ST either when I press ctrlB again.

We don't currently have a terminal, but the Terminus plugin is fairly popular if that's what you're looking for.

> Furthermore, ST isn't capable of recognizing my various Makefile build commands. ST only shows make clean and make when I press ctrl shift B.

We generally don't integrate that tightly with build systems; doing so effectively requires a plugin per external build system. Though I don't know if you'd actually want to have all targets listed for Make, since virtually everything is a target (and apparently this wasn't possible until --print-targets was added last year).

> Farthestmost, why does ST not recognize when I'm in a different directory, that it should use a different build system? Why do I have to manually tell it to use python instead of C when I am editing a python file?

If you have the build system set to "Automatic", then ST will automatically pick which ones to make available. For Make it'll check for a Makefile for instance. You can then use Build With… to select the one you want to use. If you've manually picked a different build system then that's what ST will use.

> Ok last one. Setting up a "replace occurances within selection" is highly unintuitive. When you enter the search term, that RESETS your selection. And you have to start over. Ugh. I want to select my search area, then tell it what to look for, then tell it what to replace with, then replace all within that area.

The behavior you want it to have sounds like how I remember it being, but that's clearly not the case; I'll have to look into that, thanks.

ben-schaaf··on I still like Sublime Text
Similar to LSPs our approach to this sort of thing is to enable plugins authors to integrate 3rd party tools.
ben-schaaf··on I still like Sublime Text
We list the big ones on our front page:

  * GPU rendering
  * Apple & Linux arm64 support
  * Tab multi-select
  * context-aware auto-complete
  * TypeScript, TSX and JSX syntax support
  * Much more powerful syntax engine
  * Adding python 3.8 for plugins
Some personal standouts not listed are:

  * Syntax-aware code folding
  * Mixed-indentation highlighting ("draw_white_space" setting)
  * Kinetic scrolling on Linux
  * Preserved undo history
  * Change-aware white-space trimming
  * Asynchronous file saving
  * Find result highlighting in the scroll bar
  * Find-in-files filtering by gitignore
ben-schaaf··on I still like Sublime Text
My colleague does Sublime Merge, but I can look into this for you. Have you reported this on our issue tracker: https://github.com/sublimehq/sublime_merge/issues?
ben-schaaf··on I still like Sublime Text
If you want IDE-like behavior you'll need to install the TypeScript LSP: https://packagecontrol.io/packages/LSP-typescript. We do have our own limited language-agnostic indexing and auto-complete if you open your projects folder; it relies on existing code to provide suggestions.
ben-schaaf··on I still like Sublime Text
The license does not expire after 3 years, it is perpetual, but it doesn't apply to versions released more than 3 years after your purchase. If you don't want any newer features or fixes you can simply turn off updates. We warn you before updating to a version not covered by your license.
ben-schaaf··on I still like Sublime Text
With the new licensing model we no longer need to hold back changes and do major releases. Avoiding the big pause in updates was partly why it was changed.
ben-schaaf··on I still like Sublime Text
That could be any number of things, I suggest posting an issue on our public issue tracker: https://github.com/sublimehq/sublime_text/issues
ben-schaaf··on I still like Sublime Text
Sublime Text developer here, thank you for all the praise! I'm looking forward to what we can accomplish this year. If you have any questions I'd be happy to answer.
ben-schaaf··on I still like Sublime Text
I'm curious where you're seeing jet brains subscriptions for $65 per year? Only RustRover and WebStorm seem to be somewhat close, with the rest being significantly more expensive.
ben-schaaf··on The FizzBuzz that did not get me the job
What's the plan for the candidate choosing C when they hit rule 7 and simultaneously have to use strings but the `char` type is banned? How are they supposed to loop through the input array without an increment operation? Pointers are basically also numerical types, are those banned as well?
ben-schaaf··on 'Passive house' survives fire in California
Going off Wikipedia: When outside temperature is good natural ventilation is used, otherwise a heat recovery ventilation system is used to replace all inside air every ~2 hours. So to answer your question: you don't need to open windows for ventilation.
ben-schaaf··on Ropey – A UTF8 text rope for manipulating and editing large text
VSCode uses a piece table (https://code.visualstudio.com/blogs/2018/03/23/text-buffer-r...).
ben-schaaf··on Writing a simple pool allocator in C
I don't think you understand how the allocator in the article works. Allocating and freeing are already O(1), creating and closing the allocator are necessarily O(n). There is no search being done here.
ben-schaaf··on After a 24-second test of its engines, the New Glenn rocket is ready to fly
I was perhaps exaggerating a little with the fuel cost comparison, but we've had rockets like Astra R3 and SS-520 fly for under $5M per launch. Rocket Lab's Electron is ~$7.5M. That's all within a factor of 10.
ben-schaaf··on Ask HN: Does the Framework laptop stand the test of time?
Framework have extensive, ifixit-style guides on their website: https://guides.frame.work/c/Framework_Laptop
ben-schaaf··on After a 24-second test of its engines, the New Glenn rocket is ready to fly
I don't see how that makes any sense. Starship is 100t dry; simply the fuel costs of a launch will necessarily be higher than disposable alternatives.
ben-schaaf··on Debugging memory corruption: who the hell writes "2" into my stack? (2016)
When the assertion on the stack sentinel was reached they could have watched the value and then reverse continued, which in theory would reveal the APC causing the issue - or at least the instruction writing the value. Not sure how well reverse debugging works on Windows though, I'm only familiar with rr.
← PreviousPage 8 of 34Next →