Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
epage
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
epage
1y ago
That was only in an update, not in the original text.
62.
▲
by
epage
1y ago
Note that the original article came across as there being no package unification. A later update said that versions would be selected "closest to the root". I was speaking to that version of the article. There was no way to over
63.
▲
by
epage
1y ago
Let's play this out in a compiled language like Cargo. If every dependency was a `=` and cargo allowed multiple versions of SemVer compatible packages. The first impact will be that your build will fail. Say you are using `regex` and
64.
▲
by
epage
1y ago
Likely, comparing on `char` ('+') would be slower as it requires decoding the `&str` as a `char` which comes with some significant overhead (I've seen 9% on a fairly optimized parser). Ideally, when you grammar is 7-bit
65.
▲
by
epage
1y ago
Likely the reason `split_whitespace` is so slow is > ‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space. If they used `split_ascii_whitespace` things would likely be faster. Switching parsing
66.
▲
by
epage
1y ago
> Second (and a much worse problem) are macros. They actually hit the same issue. A macro that expands to 10s or 100s of lines can very quickly take your 10000 line project and turn it into a million line behemoth. Recently, support as a
67.
▲
by
epage
1y ago
It runs counter to Cargos curreat model where the top-level workspace has complete control over compilation, including dependencies and compiler flags. I've been floating an idea of "opaque dependencies" that are like python
68.
▲
by
epage
1y ago
That work is being tracked in https://github.com/rust-lang/cargo/issues/5931 Someone has taken up the work on this though there are some foundational steps first. 1. We need to delineate intermediate and fina
69.
▲
by
epage
1y ago
That is not for build artifacts but global caches like for `.crate` files but its a stepping stone.
70.
▲
by
epage
1y ago
A little of both. Incremental compilation cache is likely the single largest item in the target directory but it gets cleaned up on each invocation so it doesn't scale in size with time. I believe the next release will have a cache GC
71.
▲
by
epage
1y ago
> It seems wild to consider such intermediate files as part of public API. Someone relying on it does not automatically make it a breaking change if it’s not documented. To find what is considered an intermediate vs a final artifact from
72.
▲
by
epage
1y ago
> It looks like Rust. All Rust scripting languages do. Not koto ( https://koto.dev/ ) which is one of the reasons I appreciate it. I want an embeddable language targeted at my users, rather than myself which I feel Rust-l
73.
▲
by
epage
1y ago
We can also offer more precise choices: say you have an ambiguous `Deref`, instead of saying `T` in the turbofish (for brevity), we could let the user select from the different available `Deref` impls what should be inserted.
74.
▲
by
epage
1y ago
> The general platonic ideal is "have the product automatically fix the issue" `cargo fix` will apply programmatic suggestions from rustc. We are very conservative of which suggestions we apply but will expand it when we add an
75.
▲
by
epage
1y ago
Those are generally used as asserts, not control flow / error handling.
76.
▲
by
epage
1y ago
My ideal workflow is commits are as small as possible and PRs "tell a story", meaning that they provide the context for a commit. I will split up a PR into - Individual steps a a refactor, especially making any moves their own com
77.
▲
by
epage
1y ago
Looking at some of the examples, I don't feel like I can interpret how some of the strings are suppose to work. I feel like this is a flaw with over-emphasizing Postel's Law. Also, while indentation "works" for Python, t
78.
▲
by
epage
1y ago
Loss of inlining
79.
▲
by
epage
1y ago
It is a rustc backend, ie an alternative to llvm, gcc, or the cranelift backends. It started as a .NET backend but they found that their approach could easily support C code generation as well so they added that. They do this by turning wha
80.
▲
by
epage
1y ago
> As a downside, Rust libraries typically have a large fan-out of dependencies, much like Node.js. This requires taking care to avoid the blow-up of dependencies, and to deal with annoyances of dependabot. In the linked situation, the we
81.
▲
by
epage
2y ago
Sorry, I meant the Koto language and built-in library compatibility story. Whats on the roadmap for a 1.0 and will you allow a 2.0? One of my annoyances with Tcl and Lua is their breaking changes would be pushed into my application and I&#x
82.
▲
by
epage
2y ago
What are your plans for language and in-language library compatibility?
83.
▲
by
epage
2y ago
I'm still running in my vibrams mostly because I've not had a reason to change and researching alternative shoes is annoying and expensive, limiting my experimentation with different brands and models. I also put in a good amount
84.
▲
by
epage
2y ago
It did to a degree but still left a sizeable amount of use cases as they were ill suited for Java. I feel like this is repeatedly happened since where each new or newly hyper language has peeled off parts of C++'s use cases but never
85.
▲
by
epage
2y ago
I was really excited by this but unfortunately this has major blockers in the use cases I care about (e.g. inside of `cargo`). Generally if you care about error recovery, you also care about error formatting. Libraries like `serde_json` an
86.
▲
by
epage
2y ago
To add to what was said, one of the main ways to leak memory is `Box::leak` [0], meaning most memory leaks are explicit and intentional, rather than implicit and accidental. Likely the main implicit/accidental way to leak memory are R
87.
▲
by
epage
2y ago
Looking through https://dbohdan.com/scripts-with-dependencies , I see - JS: Deno and Bun - Scala: Scala CLI and Ammonite - Python: fades ( https://github.com/PyAr/fades )
88.
▲
by
epage
2y ago
What cargo is doing is something like #!/usr/bin/env cargo --- [dependencies] regex = "1" --- fn main() { } I think this is proposing something like #!/usr/bin/
89.
▲
by
epage
2y ago
> The one goal of the port we did not succeed in was removing CMake. > That’s because, while cargo is great at building things, it is very simplistic at installing them. Cargo wants everything in a few neat binaries, and that isn’t ou
90.
▲
by
epage
2y ago
For some insight into what more can be done, see - https://internals.rust-lang.org/t/slow-incremental-compilati... - https://internals.rust-lang.org/t/feedback-request-performan... (there is more
More ›