Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dannymi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
dannymi
3y ago
One of the main reasons to use async in the first place is to distribute the work to all the cpu cores that you have. So you will still have all the concurrency issues with async in that case. Only if you limited async to only one thread on
32.
▲
by
dannymi
3y ago
>I mean, it's great that you can write some of your code in C. But wouldn't it be great if you could just write your libraries in Python and have them still be really fast? That really depends. To make the issue clear, let'
33.
▲
by
dannymi
3y ago
>¹(but there has to be a crate for this) num-traits' FromPrimitive https://docs.rs/num-traits/latest/num_traits/cast/trait.From...
34.
▲
by
dannymi
3y ago
>what do you mean by my "guix checkout" I mean the working copy (the local directory) created by git clone. >Looks like it's a huge effort. Probably. I've never used Dart in my life, so I don't have so much Da
35.
▲
by
dannymi
3y ago
In general adding a build system to Guix works like this: 1. Git clone https://git.savannah.gnu.org/git/guix.git 2. Nicolò Balzarotti already has a work in progress patchset adding Dart itself--see https://i
36.
▲
by
dannymi
3y ago
I wrote https://github.com/daym/idea-native2-debugger as a stop-gap. It uses gdb and works in IntelliJ IDEA Community edition. Setting it up the first time is kinda weird since you need to add a new run/debug conf
37.
▲
by
dannymi
3y ago
>The big problem is; if you have a thread reading from a socket, how can you ever interrupt it if you wish to do so? EINTR on signals is really not so bad when you think of it from that angle. Yeah, but what if the thread is not currentl
38.
▲
by
dannymi
3y ago
>So, I'd love a language with a type checker that when ahead-of-time compiling code would refuse to emit libraries/binaries when it couldn't statically prove types were used correctly. In interpreted mode, it would only re
39.
▲
by
dannymi
3y ago
>I thought the whole point of the exercises was to show that C has lots of undefined behavior, so you should only rely on the behavior of the specific system you’re coding for. In my opinion, the whole point of the exercise was to show t
40.
▲
by
dannymi
3y ago
Just a heads-up to the author: >Ancestor(X, Y) → Parent(X, Y) ∨ (Parent(X, Z) ∧ Ancestor(Z, Y)). That's a bug. The arrow needs to go to the left. Also, then, you can also opt to dispense with the disjunction and just use first-order
41.
▲
by
dannymi
3y ago
>The proof of uncountability of real numbers starts with a process of enumerating this infinite list of infinitely long binary numbers. Then says that we construct a number that can't be on them by flipping bits the down the diagona
42.
▲
by
dannymi
3y ago
>After playing around with a bit of C and trying gdb, I asked myself if this is really what people use. The display constantly breaks and there's not a lot of stuff to quickly walk through code and visualize what it's doing. &g
43.
▲
by
dannymi
3y ago
Guix builds are sandboxed per package (I'm pretty sure it cannot be turned off at all). The Guix build containers don't have network access. Guix package definitions include a cryptographic hash of the source, don't autoupdat
44.
▲
by
dannymi
3y ago
Open bug report about inability to set a breakpoint on Err: https://github.com/rust-lang/rust/issues/54144
45.
▲
by
dannymi
3y ago
This crate is nice to have for debugging. Thank you for writing it. I just had the case already over the past decades where everyone wants to turn every error into Java backtraces (even when not in Java ;) ) and want to emphasize that this
46.
▲
by
dannymi
3y ago
Imagine that you try to open your washing machine while it is washing. Correctly, you will get an error that this is not possible because you would be drenched with water. In addition, with this crate, you will also get the information that
47.
▲
by
dannymi
3y ago
Errors are for the regular case when the program detected that something wasn't allowed or set up right and the program did everything right (by returning an error). Why then do you need the rs source code file&line of the place w
48.
▲
by
dannymi
3y ago
>Does Rust give you _maximum_ control over performance the way C and C++ do? In general yes. What do you mean, exactly? Rust doesn't have hidden things going on in your programs--and the culture is very much "if it's slow
49.
▲
by
dannymi
3y ago
>These are placed on the outputs of a neuron and are one of those weird mathematical hacks where I can't really explain why it's needed, Because when you compose linear functions you get linear functions. So having linear every
50.
▲
by
dannymi
3y ago
>but it would still be nice to actually call rust functions I agree. > data-structures like maps opaquely instead of just their complex internals. Works for me: use std::collections::HashMap; fn main() { let mut m
51.
▲
by
dannymi
3y ago
There's debugger integration included in CLion but not in idea community edition.
52.
▲
by
dannymi
3y ago
Your level editor looks awesome :)
53.
▲
by
dannymi
3y ago
Sudo 1.8.0 to 1.9.12 (the latter is from 2023(!)) are memory unsafe. Sudo before 1.9.5p2 is memory unsafe. Sudo before 1.8.26 is memory unsafe. Sudo before 1.6.6 is memory unsafe. Source: https://cve.mitre.org/cgi-bin/c
54.
▲
by
dannymi
3y ago
>Adding too many abstraction can be exceedingly dangerous in an environment where not having a full view of how memory and hardware registers are laid out leads to even worse errors than just buffer overflows. svd2rust is pretty good for
55.
▲
by
dannymi
3y ago
It's in the body--but it's supposed to be in the head.
56.
▲
by
dannymi
3y ago
>But maybe this is a tooling problem? What if we could see the code in a simpler way even if the actual code involves macros and templates? Intelllij Rust plugin does this. println!("Hello, world! {}", x); >Recurs
57.
▲
by
dannymi
3y ago
If you run programs that you can't trust (for example because the source is unavailable and/or nobody reads it, no one is a gatekeeper of program updates etc), then you are opening yourself to attack because the default unix secur
58.
▲
by
dannymi
3y ago
It depends on your use case. For example, .NET core is nonexistent in Guix and nobody in the community seems to have any use for it. Also, there's an upstream bug report in dotnet core stating that it doesn't have functioning boot
59.
▲
by
dannymi
3y ago
The manifest stuff is so you can have a more declarative way to specify packages (think Cargo.toml instead of mutable Debian installation). (env)$ exit $ guix package --export-manifest -p ~/profiles/developer (specif
60.
▲
by
dannymi
3y ago
Somewhat un-guixy-but-easy way to get started in: $ mkdir -p ~/profiles $ guix package -p ~/profiles/developer -i gcc-toolchain gfortran-toolchain emacs $ guix shell -p ~/profiles/developer --check
More ›