HNHacker News
TopNewBestAskShowJobs

stonewareslord

256 karma · joined January 30, 2017

submissionscomments
stonewareslord··on Tesla auto-pilot keeps confusing moon with traffic light then slowing down
For #1: wouldn't more sensors be even better for training? If vision does not pick up an object like a human, but lidar detects a human sized object, the vision portion of the model can 'learn' from it's mistakes.

The other two sound like good reasons though

stonewareslord··on The Greatest Regex Trick Ever (2014)
Which zsh version? On 5.7.1, echo \[b]anana works in both cases
stonewareslord··on Show HN: Earthly – Better Builds
Earthly has been great to use. My one issue is with docker. I would greatly prefer to use podman but it seems there is no support for it yet. Every issue I have had with earthly is with some weird quirk with Docker I don't have with podman. For the most part I can get around this with setting DOCKER_HOST, but it is still weird to depend on dockerd when I would expect podman to work fine.
stonewareslord··on Show HN: Earthly – Better Builds
I use earthly. I would not use it instead of bazel, but with bazel. You can imagine earthly working by building a DAG of docker commands (RUN, ENV, ...), similar to how bazel/make make one on your source files. If A depends on B and B changes, B then A are built, etc.

So keep bazel for building and testing, but you can use earthly to run above it so every bazel build is in a fresh docker container. Example:

    # All image deps
    RUN apt install -y bazel gcc
    
    build:
     RUN bazel build
    
    test:
     FROM +build
     RUN bazel test
    
    release:
     FROM +build
     RUN bazel package
     SAVE ARTIFACT AS LOCAL ./a.out a.out
     SAVE IMAGE cool-app:latest

Basel build runs before the other two targets, but testing and packaging run in parallel. I do this for elixir projects -- npm install assets and mix deps.get in parallel, then copy both results into the final image.

Edit: you can also inject arguments and the dependency graph will fork when needed. So for example, I can specify multiple version targets and earthly will only start running in parallel when it hits the build arg line (since subsequent run lines will have different build arguments)

stonewareslord··on The Greatest Regex Trick Ever (2014)
This almost always works, but it won't if the shell expands your bracketed letter. See for example:

    $ echo [b]anana
    [b]anana
    $ touch banana
    $ echo [b]anana
    banana
You can escape the bracket and it will work:

    $ echo \[b]anana
    [b]anana
stonewareslord··on Bash function names can be almost anything
You can also bypass aliases by escaping some part of the command

    ~ $ alias true='echo alias'
    ~ $ true
    alias
    ~ $ \true
    ~ $ 'true'
    ~ $ tr'u'e
    ~ $
stonewareslord··on Acer disables BIOS for laptops sold through Amazon? (2020)
Is the source of this a single Amazon review?
stonewareslord··on BLisp: A Statically Typed Lisp Like Language
What are the bugs? I am not familiar with lisp
stonewareslord··on Sorry, we replaced that old technology, “see-through glass”
For the ones with 3 or 4 buttons on each side, you can sometimes hit the second button from the top on the right and it will mute.
stonewareslord··on SeKVM verified hypervisor based on KVM
Ah that's a shame. It isn't nearly as powerful as uMatrix which allows up to per-subdomain configuring of per-subdomain loaded images/js/styles/...
stonewareslord··on SeKVM verified hypervisor based on KVM
What are you using for JS whitelisting? I used to used uMatrix before it died.
stonewareslord··on New Firefox
The save file thing is for security so you don't accidentally hit enter to download something you don't want.

You should be able to change that by going to about:config, searching security.dialog_enable_delay, and double clicking. You could also try changing your preferences to tell Firefox to always save to some location

stonewareslord··on Beads: Computer language and toolchain
That's definitely one way to solve the issue, but I wouldn't say it's the only way.

In Rust, you can configure Clippy to ban the usage of +-*/ and require explicit behavior of each calculation. For example, 10u8.checked_add(10) returns an Option<> (similar to Maybe in Haskell) so you can handle overflows. You can also use 1u8.saturating_sub(100) which will not allow wraparound but values will saturate at the max/min.

stonewareslord··on Than Average
Aritmentic mean is defined at the top of the linked Wikipedia page to be the average as we know it (sum/count)
stonewareslord··on Than Average
The mean, median, and mode are distinct, but mean is the average. See: https://en.m.wikipedia.org/wiki/Mean which says:

> In descriptive statistics, the mean may be confused with the median, mode or mid-range, as any of these may be called an "average" (more formally, a measure of central tendency). The mean of a set of observations is the arithmetic average of the values...

stonewareslord··on Overcoming Tab Overload
Looks like no.

Here is the one reference to `toolkit.tabbox.switchByScrolling`: https://searchfox.org/mozilla-central/source/toolkit/content... You can see here that the second param to advanceSelectedTab is false

This param controls wrapping according to the definition: https://searchfox.org/mozilla-central/source/toolkit/content...

To confirm, we can see that the shift+tab/shift+ctrl+tab (which wraps) definition passes that param as true: https://searchfox.org/mozilla-central/source/toolkit/content...

Maybe you can file a bug to add another bool pref instead of hardcoding false?

stonewareslord··on Overcoming Tab Overload
I cannot stand this functionality and it's the first thing I disable on new installations. For me, Ctrl+tab is right and Ctrl+shift+tab is left.

I much prefer Firefox's awesome bar navigation when jumping around. % app will show all tabs with a title or URL containing app, * yo does the same for bookmarks containing yo, and ^ for history.

https://support.mozilla.org/en-US/kb/address-bar-keyboard-sh...

Edit: unfortunately, the % shortcut does not work with containers.

stonewareslord··on System76 Launch Keyboard
Do you have a mechanical ps2 keyboard you recommend? Also what do you think of USB->PS2 converters?
stonewareslord··on Shelljs – Portable Unix shell commands for Node.js
> bundle Busybox, a 1.6mb binary, to run shell scripts with bashisms

What do you mean? Busybox doesn't come with bash so it wouldn't work with bashisms.

stonewareslord··on My MacBook Air M1 is dead
Yes, with uMatrix. Its like ublock but much more configurable. In one dimension you have cookies, images, js, xmlhttprequest, frames, etc; in another dimension you have domain, subdomain, TLD of the site URL; and in the third dimension you have domains that your current site is connected to. Each is configurable at different levels.

It is archived though. The developed stopped working on it I believe

stonewareslord··on What is Chia cryptocurrency and why is it bad news for hard drives?
Gridcoin is designed for this. It is based on scientific research and instead of sha256 hashes of random data, coins are earned by proof of your computer doing scientific research.

From their homepage:

> Examples include protein structure prediction (Rosetta@home), mapping the Milky Way galaxy (Milkyway@home), and tackling problems in public health and clean energy (World Community Grid).

stonewareslord··on Show HN: Science and math-flavored programming problems for beginners
That's true. I am most interested in testing if my code works though. I don't see a 'cheat' option that gives you the correct answer I could check against.

I do see that the engine is open source though. I'll look into contributing: https://github.com/project-lovelace

stonewareslord··on Show HN: Science and math-flavored programming problems for beginners
These problems look like a lot of fun! Unfortunately, I'm currently learning Rust and would prefer to use it to solve these problems.

It would be nice to support uploading a binary or solution (like project Euler) or a CSV of test cases next to solutions. Maybe I'll try compiling rust to c and upload the c file

stonewareslord··on Elegant Bash Conditionals
Echo is defined differently in different shells ("not portable"). Also it can have arguments which breaks things sometimes:

    echo Option -n invalid # OK
    echo -n is not valid # Uh oh
    printf '%s ' -n is not valid # Always okay
Generally you should use printf because of its consistency. For a simpler example of OP's:

    panic() { printf '%s\n' "${0}: ${*}"; exit 1; }
Is fine. I don't see the need to pass a format string to your function. Just call:

    panic "${download_url}: unable to download"
stonewareslord··on Ask HN: What are you working on?
For anyone interested in these features today, check out Git Annex. Fits all these requirements except for tagging. Add files just like with git, then git annex copy file --to some-remote. Intended for large files, you can Zip directories too if you like. I personally like directory organization but that's optional.
stonewareslord··on Jet Powered Volkswagen Beetle – $550k (sunnyvale)
Not sure what browser you’re on, but this redirects me to the page that requires JS on Firefox android
stonewareslord··on Five lines I put in a blank .vimrc
I have tried a custom linking script, Ansible, and stow. The best I have found is to just use a bare git repo based off of: https://www.atlassian.com/git/tutorials/dotfiles

The idea is to make an alias that runs git so that it treats your home directory as a git repository and you can directly commit them.

I would recommend bypassing that article's `config config --local status.showUntrackedFiles no` setting and setting a `~/.gitignore`. This way, git will never tinker with your home directory if you accidentally run the wrong command.

So the complete list of setup commands is:

    # Only needs to be done the first time
    cat >~/.gitignore<<'EOF'
    *
    !/.bashrc
    !/.zshrc
    EOF

    # On subsequent runs
    git clone --bare ssh://git/cfg.git "${HOME}/.cfg"
    function config() {
       git --git-dir="${HOME}/.cfg/" --work-tree="${HOME}" "${@}"
    }
    config checkout -- ~/.gitignore
    config reset ~
    config checkout -- ~
    config submodule update --init --recursive --remote
One caveat is adding files in subdirectories (`~/. config/...`), but just requires changes in your gitignore
stonewareslord··on Getting Started with Firecracker on Raspberry Pi
> moves more functionality to the guest kernel

I took the diagram to just mean the whole guest, not just the kernel. In the qemu case, the guest has to interact with the bios and other emulated peripherals. Firecracker skips the whole bios layer so it does operate at a different layer

stonewareslord··on K0s – Zero Friction Kubernetes
Technically, it would be an undefined number of times easier. n/0 is not infinite.
stonewareslord··on Future gun control has been shot down
According to the user's bio:

> Consultant in Johannesburg, South Africa

So probably closer to something that relates to him directly than posting because of the headline.

← PreviousPage 3 of 4Next →