Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
joshka
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
331.
▲
by
joshka
2y ago
I use GitHub CoPilot both in and ouside my existing experience. Mostly I'm working with Rust, so access to the API surface of a library is fairly simple (docs.rs/cratename) and something which can be provided to the context by pas
332.
▲
by
joshka
2y ago
Continue the thought... Google failed to keep a link shortner running... Which will break billions of links... Perhaps this other company can do better and never face that problem... Anyone could have predicted that link shortner failure wa
333.
▲
by
joshka
2y ago
>I am struggling to teach AI to stop dreaming up APIs which don't exist and failing to solve relatively simple but not often written about problems. Try giving them more context of APIs that actually exist then as part of the inputs
334.
▲
by
joshka
2y ago
The API docs[1] often have a decent amount of guide level information on items within the library, but are perhaps lacking in the "use this crate for ..." type space. What specifically do you think is missing? [1]: https:/&#
335.
▲
by
joshka
2y ago
For the style of reading I normally do, this particular width is actively harmful to my reading comprehension. I would prefer just a bit wider text generally. This is something which the site does inflict on the reader. I agree that many si
336.
▲
by
joshka
2y ago
Good riddance, but thinly veiled marketing post.
337.
▲
by
joshka
2y ago
> Of course, these LLMs won’t replace software engineers anytime soon, because it requires a strong engineering background to recognize what is actually a good idea, along with other constraints that are domain specific. Even with the am
338.
▲
by
joshka
2y ago
Sure, the issue is that it doesn't gracefully degrade when presented with 24bit color.
339.
▲
by
joshka
2y ago
It however doesn't have 24bit color still
340.
▲
by
joshka
2y ago
Make the tutorial text include the code verbatim from a working repo that passes CI. No pasting necessary. Sure you still have to verify that the tutorial text aligns with the code changes, but you don't have to do anything manual to u
341.
▲
by
joshka
2y ago
What was the comment context here? It's flagged so I didn't see it.
342.
▲
by
joshka
2y ago
Yeah, Rust-analyzer's palette of refactorings is woefully underpowered in comparison to other languages / tooling I've used (e.g. Resharper, IntelliJ). There's a pretty high complexity bar to implementing these too unfor
343.
▲
by
joshka
2y ago
Yeah, true. But that (assuming you're saying give me es_MX if it exists otherwise es) has a similar possible solution. Model your Language and variants hierarchically rather than flat. So languages.get("es_MX") becomes
344.
▲
by
joshka
2y ago
Rust definitely forces you to make more deliberate changes in your design. It took me about 6 months to get past hitting that regularly. Once you do get past it, rust is awesome though.
345.
▲
by
joshka
2y ago
One approach to solving item 1 is to think about the default as not being a separate key to the HashMap, but being a part of the value for that key, which allows you to model this a little more explicitly: struct WithDefault<T>
346.
▲
by
joshka
2y ago
Neat :)
347.
▲
by
joshka
2y ago
It's technically feasible to add SpanTrace support to thiserror fairly easily (30 mins work - Issue: https://github.com/dtolnay/thiserror/issues/400 , PR: https://github.com/dtolnay/t
348.
▲
by
joshka
2y ago
> That is not a bug, it's a feature which was explicitly allowed for. I agree entirely :) It's why I prefer to use the MIT / Apache Dual license (and generally to avoid the GPL in certain contexts). Apache's condition
349.
▲
by
joshka
2y ago
> It’s entirely acceptable for someone to use your MIT-licensed projects to make money without even acknowledging your name. Well, actually... > The above copyright notice and this permission notice shall be included in all copies or
350.
▲
by
joshka
2y ago
Maybe just learn to pronounce it with a very strong Australian accent. If you're missing the point, the first syllable rhymes with punt.
351.
▲
by
joshka
2y ago
RUST The rust code is really checking how big Tokio's structures that track timers are. Solving the problem in a fully degenerate manner, the following code runs correct correctly and uses only 35MB peak. 35 bytes per future seems pret
352.
▲
by
joshka
2y ago
I think we're really talking past each other at this point, so I'm probably not going to respond more on this. Maybe in C++ where you don't have better techniques available, then assertions *are* the best tool you can reach f
353.
▲
by
joshka
2y ago
> Basically what you're saying is > "If you never have an accident you don't need seat belts in the car, and since we test drove the vehicle in the factory parking lot and didn't have an accident we decided not to
354.
▲
by
joshka
2y ago
The better question is why should you need to (test the invariant)? If your tests cover all branches of a loop, then it doesn't matter if a loop invariant is violated within the loop. Write tests that exercise the {0, 1, Some, Bounds}
355.
▲
by
joshka
2y ago
> since you've had some bad experiences No, I've had great experiences with assertions in code. People have paid my salary because the assertions are invalid and cause more problems than they solved. :D > Failing an assert i
356.
▲
by
joshka
2y ago
I don't think I've ever in 30+ years of programming seen a runtime assertion that wouldn't be improved by doing something else instead. Writing unit tests and choosing designs that codify the constraints in the type system ar
357.
▲
by
joshka
2y ago
Previous comments yonder: - https://news.ycombinator.com/item?id=41434637 - https://news.ycombinator.com/item?id=41463330
358.
▲
by
joshka
2y ago
Why are you telling it not to explain? Allowing the LLM space to "think" may be helpful, and would be definitely worth explorying? Why are you manually guessing ways to improve this? Why not let the LLMs do this for themselves and
359.
▲
by
joshka
2y ago
The rust version of this has an inherent complexity that is very similar to your requirement. Processing at most X requests at once is the job of a Semaphore, until there's none left to process is the job of join_set. let mut tas
360.
▲
by
joshka
2y ago
Last time I tested mold/sold on Mac, there was no measurable time difference.
More ›