HNHacker News
TopNewBestAskShowJobs

drran

1,205 karma · joined July 10, 2019

submissionscomments
drran··on Bash functions are better than I thought
Yes, arguments::generate_parser function. Install bash-modules, then run `. import.sh log arguments`, then call `arguments::generate_parser '--foo)FOO;String'` , and it will generate function with parser, which include parser for foo option for both `--foo VALUE` and `--foo=VALUE`:

  ...
  
        --foo)
          FOO="${2:?ERROR: String value is required for \"-f|--foo\" option. See --help for details.}"
          shift 2
        ;;
        --foo=*)
          FOO="${1#*=}"
          shift 1
        ;;
  ...
drran··on Bash functions are better than I thought
You can use bash-modules arguments library to generate argument parser for you.
drran··on The Internet Archive transforms access to books in a digital world
You can convince copyright holders to assign the copyright to you, e.g. by paying them money, and then release their work using a permissive license, like Mozilla Foundation or Apache foundation are doing.

If you unlike their software or hardware, then just stop buying it and buy or support free software and hardware. Freedom is not free.

drran··on U.S. spy agencies say origins of Covid-19 may never be known
SARS CoV grows on VERO substrate, so it's relatively easy to make mutations of the virus. Here is example for IBV CoV: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2898227/
drran··on U.S. spy agencies say origins of Covid-19 may never be known
It will not clear doubts, because «they destroyed the evidence!!!11».

BTW, there are few other labs, which are candidates for forensic analysis: Vector BSL4 lab in Novosibirsk, RF, which had major incident right before epidemic, and maybe other labs should be checked too, because China and US have different strains of SARS CoV2 with common ancestor outside of both countries.

drran··on The Internet Archive transforms access to books in a digital world
Copyright is a functionally eternal state-granted monopoly on data that's hard to produce. It's a monopoly on bits, numbers. Not only is it an utterly helpful notion, enforcing copyright in the 21st century helps us to protect our computing freedom.
drran··on Why are our brains shrinking?
Primitive saw is just a rope + sand + water.

The problem was not to make things, ancients were able to produce few very advanced tools, mechanisms, and technologies, but to save them and pass knowledge of making them to future generations.

To make a dent, you will need a tool for mass spreading of knowledge en masse: a church, a library, a copier, or a book making machine.

drran··on Your code displays Japanese wrong
> The locale might be set to something completely different.

Follow the choice of user, please.

drran··on GitHub Copilot available for JetBrains and Neovim
It's easy to achieve 100% coverage with happy-path code and low quality shallow tests, agreed.

AFAIK, «high coverage» may have different meaning for different people. For me, it's «high quality», for others it's «high percentage», e.g. «full coverage» or «80% coverage», which is easy to OKR.

drran··on GitHub Copilot available for JetBrains and Neovim
Find a torrent with sources of M$ Windows and copilot them: M$: 1, Open Source: 1.
drran··on GitHub Copilot available for JetBrains and Neovim
> The tests doesn't actually test functionality, edge cases etc, just that things doesn't crash in a happy-path.

This is low coverage.

> Any changes to an implementation breaks a test needlessly, because the test tests specifics of the implementation, not correctness.

This is bad design.

> In codebases for dynamic languages, most of what these tests end up catching is stuff a compiler would catch in a statically typed language.

So they are not useless.

drran··on Roy Fielding's Misappropriated REST Dissertation (2020)
Web sockets are used now to push data to clients. REST+WS is a good combo.
drran··on My experience of losing a friend to heroin (2020)
Yep. My classmates, which started to smoke cannabis in school, died because they switched to opiates.
drran··on My experience of losing a friend to heroin (2020)
> it's just useless

Why? Cannabis market thrive is US. More and more people use cannabis every day, making profits for sellers. Some people will switch to hard drugs and die, of course, but car incidents are not stopping car sales.

drran··on Software Freedom Conservancy files GPL lawsuit against Vizio
Perma-locked bootloaders can be made illegal, if they prevent you, the owner of the device, from patching a security hole in your device. In essence, it's a backdoor mechanism installed by the vendor.
drran··on T0* – Series of encoder-decoder models trained on a large set of different tasks
How are in a water molecule?

> two hydrogen atoms

water molecule?

> isotopes of hydrogen

How water molecule?

> is arranged in a tetrahedral structure

drran··on Sequoia PGP is now LGPL 2.0
Static linking good for vendor, dynamic linking good for maintainers. Some distros already made exception from "no bundled libraries" rule for Rust. Now we need to add another exception just for Rust. Maybe, it's time for Rust to catch up and implement dynamic linking instead?
drran··on NixOS on Framework Laptop
Good parts of SystemD are good, bad parts are bad. SystemD is easy to use when it fits your needs, but pain to use otherwise.

For example, `systemd-analyze` is a good tool for boot performance analysis, so + for systemd, but if I want/need to use perf for boot performance analysis, then systemd stands in my way, while for initd it's just yet another boot mode.

drran··on Speed Matters
In Linux, just select and middle-click.
drran··on FTC Puts Hundreds of Businesses on Notice about Fake Reviews
It's the problem. We need a spam filter for reviews. Let's create a startup and fake it growth with fake reviews. «Fake it, until you make it.»
drran··on Why I built my own static site generator
It better to generate single-purpose tools, which can be reused, instead of single-use static generator, which cannot be reused.
drran··on Major nuclear fusion milestone reached as ‘ignition’ triggered in a lab
A low-grade heat is OK for heating of buildings, so it can replace natural.

LENR is hard to reproduce even for those who can reproduce, but at this point we can be sure that LENR is not a fantasy land. Multiple scientists in multiple institutions are able to reproduce the experiment sometimes, so this is the science.

IMHO, external factors are involved, e.g. cosmic rays, which generate muons[0], or radioactive elements or gases decaying, and LENR devices are just boosting them.

[0]: https://en.wikipedia.org/wiki/Muon-catalyzed_fusion

drran··on Intellectuals urge Germany to keep nuclear plants online
Do you include atomic station itself after EOL into your calculation?
drran··on SQL for Distributed Systems
I clicked at wrong tab when responding, sorry.
drran··on SQL for Distributed Systems
Sorry, I clicked on wrong tab, when responding.

It was a sane choice, to use local timezone for dates, in the past, but it's no longer a sane choice in today's world, because a database can be at another continent, while users can be all around the world.

«Timestamp» is somewhat different from «date». Timestamps can be represented by different dates in different time zones or different chronicle. «Local timestamps» with time zone are prone to error when time zone shifts.

drran··on SQL for Distributed Systems
> Storing UTC values in a timestamp without time zone column is, unfortunately, a practice commonly inherited from other databases that lack usable timezone support.

WTF? Timestamp is not a user-facing value, so it doesn't need to have user time zone. Timestamps are always in UTC.

drran··on Major nuclear fusion milestone reached as ‘ignition’ triggered in a lab
Yep, but if you want to have cheap energy, then it better to start with something cheaper, like LENR, which is still pain to reproduce, but give it $100bn and 20 years and then compare with ITER.
drran··on 2,050-year-old Roman tomb offers insights on ancient concrete resilience
We should replace iron rebar with corrosion resistant fiberglass rebar.
drran··on 2,050-year-old Roman tomb offers insights on ancient concrete resilience
It's easy to prove that ancients were unable to produce concrete. You just need to prove that they had no access to stone, fire, and water — the key ingredients required to make concrete.
drran··on Programming PIC32 Microcontroller with Rust
My attempts on this:

https://github.com/vlisivka/rust-arduino-blink - just minimal blink

https://github.com/vlisivka/rust-arduino-hello-world - just print "Hello, world" to serial port.

https://github.com/vlisivka/rapt - little shell for pin testing (turning them on/off via serial port).

← PreviousPage 18 of 34Next →