HNHacker News
TopNewBestAskShowJobs

Hasnep

897 karma · joined August 31, 2019

website: https://www.ha.nnes.dev contact: h[at]nnes.dev github: hasnep
submissionscomments
Hasnep··on My new hobby: finding public domain images that Getty sells for $500
By the way, you're missing a comma between "AI" and "copyrighted". It really confused me because I was expecting a comment about the rise of AI copyrighted image infringements
Hasnep··on GPT-4
Seems like a pretty apt analogy. People want to use LLMs like a fully self-driving Tesla, but the "self-driving Tesla" version of LLMs doesn't exist either.
Hasnep··on GitHub Desktop 3.2: Preview your pull request
I commit small chunks so often that I have a keyboard shortcut set up for that "stage selected range" command in VSCode, definitely recommend it to get a more useful commit history.
Hasnep··on New F-Droid repository format for faster and smaller updates
Yes, but it has the limitation that it can only automatically update apps that it installed. So if you've already installed an app through the F-droid app, you can either uninstall and reinstall an app using NeoStore or manually do the first update through NeoStore and then all subsequent updates will be automatic.

This is the reason I use NeoStore to install apps like NewPipe on my family members' phones. Before, when Newpipe broke they wouldn't know how to update it, now it just stays updated all the time.

Hasnep··on New F-Droid repository format for faster and smaller updates
I recommend NeoStore [1], which is an alternative frontend for F-droid. I can't say it never crashes, but I prefer it to the F-droid app.

[1] https://www.f-droid.org/en/packages/com.machiav3lli.fdroid/

Hasnep··on Python is two languages now
I've had lots of success using pyright [1] for Python projects, it has sensible defaults and can be configured with a pyproject.toml file so everyone's using the same settings. I use the Pylance VSCode extension to catch errors earlier, but I also put it in pre-commit and as a CI check, so all contributors are committing the same quality of typed code.

With more complex types, I've found it isn't necessary to do anything more complex than specifying the element type of a list or dict most of the time. I have typehinted lambda function arguments before, but just using the plain Callable typehint is usually enough. When I forget if I need to use an Iterator or an Iterable (which is every time), then I just try one and run the type checker and change it to the other if i guessed incorrectly.

Type checking Python can become complex if you expect to be able to express everything in the typehints, but Python's type system isn't powerful enough for that. I feel its strength is that it lets you add as much detail to the types as is convenient.

[1] https://github.com/microsoft/pyright

Hasnep··on KanjiVG – SVGs of Kanji character strokes including order, shape and direction
As a beginner Mandarin learner, my understanding is that historically, people wrote using the traditional stroke order, this informed what people think of as the aesthetically pleasing or "correct" way that the characters look. Now, if you want to write the characters in a legible and aesthetically pleasing way, the easiest method is to write them in the traditional stroke order. I think it's analogous to the way cursive writing in the west was taught, which informed the way it was written and what people thought of as the "correct" way to write cursive. If you wanted to learn to write in cursive, you could just look at existing cursive writing and try to copy it, but if for example you guessed that you should write it from right to left then you'd probably find it harder because cursive evolved to be written from left to right.

You can normally tell when someone uses the incorrect stroke order because things will be the wrong size. For example, when writing 因 you're supposed to write the outer ㄇ first, then the inner 大 and then the bottom horizontal stroke of the 口. If you start with the 大 then it's harder to write the outer 口 the right size.

Again, this is all from a beginner, so take it with a good amount of salt.

Hasnep··on Transmission v4.0
For more FOSS torrents, see FossTorrents.com [1] :)

[1] https://fosstorrents.com/

Hasnep··on My Journey from R to Julia
One of the key points of Julia is that the language you use for performance critical parts is also Julia. That applies to both the libraries like DataFrames.jl and for situations where you'd drop to a lower level language when optimising. I think being productive in Fortran or C++ is unrealistic for most scientific programmers.
Hasnep··on What new Python features are the most useful for you?
I've found Typer [1] pretty intuitive to integrate with existing code, it uses type hints to generate the CLI arguments.

[1] https://typer.tiangolo.com/

Hasnep··on Modern Polars: A comparison of the Polars and Pandas dataframe libraries
An alternative I found recently is RedFrames [1] which wraps Pandas dataframes in a more consistent interface. That might be a better alternative if you need easy compatibility with Pandas.

[1] https://github.com/maxhumber/redframes

Hasnep··on Modern Polars: A comparison of the Polars and Pandas dataframe libraries
I'm not GP, but I find the pandas API incredibly inconsistent and difficult to remember how to do simple transformations. For example, it sometimes overloads operators because it doesn't use built in language features like lambdas. There are reasons for the inconsistency, but using the alternatives like R's tidyverse or Julia's DataFramess.jl is like night and day for me.

I found RedFrames [1] recently which wraps Pandas dataframes with a more consistent interface, it's probably what I'd use if I had to write data transformations that had to be compatible with Pandas.

[1] https://github.com/maxhumber/redframes

Hasnep··on Automatic1111's GitHub account suspended for "ToS violations" [restored]
Forgejo [1] (a fork of Gitea) is working on integrating activitypub [2].

[1] https://forgejo.org/ [2] https://codeberg.org/forgejo/forgejo/issues/59

Hasnep··on Functional Programming – How and Why
Julia has the convention that mutating functions have names that end with a bang, e.g.

  sort(x)
returns the sorted object, but

  sort!(x)
returns a "nothing" and mutates the object in place.
Hasnep··on PRQL: a simple, powerful, pipelined SQL replacement
dbt-prql lets you write prql in your DBT

https://pypi.org/project/dbt-prql/

Hasnep··on Building a website like it's 1999
One factor that makes me prefer that retired professor's website is that it works perfectly with reader mode, which a JS heavy website isn't guaranteed to.
Hasnep··on What does Overture Map mean for the future of OpenStreetMap?
Zooming in on my hometown the buildings that I expect to be commercial are tagged as commercial, but on Google maps the same buildings are pretty inconsistently coloured. Are there other commercial maps that do a good job at that?
Hasnep··on In praise of MIDI
To clarify, Musescore doesn't use midi to store notation, it's used to send note information to VSTs for real time playback of the score. The new protocol sends the whole score in advance so better phrasing can be calculated.
Hasnep··on Every modeler is supposed to be a great Python programmer
You can now set up a Julia environment non-interactively from the command line by running:

    julia --project=. -e 'import Pkg; Pkg.instantiate()'
Not as clean as running

    python -m pip install -r requirements.txt
but it's something.
Hasnep··on Programming Languages
To me, languages are all Turing complete in a similar way to how all food contains calories. Some are better for your health than others.
Hasnep··on Podman Desktop: A Free OSS Alternative to Docker Desktop
I've been telling my colleagues with M1 Macs to use the

  --platform linux/arm64
argument with Docker Desktop and that seems to be working for them.
Hasnep··on Most people don’t finish online job applications
I'm interested why you think a diabetic isn't disabled?
Hasnep··on Ask HN: Who are the technically competent CEOs in tech world?
Those are the CEOs of AMD, Nvidia, Intel and TSMC for anyone like me who didn't know.
Hasnep··on How Mondragon Became the World's Largest Co-Op
Mondragon is a worker co-op, Fonterra is a dairy co-op, which is a type of producer co-op. So I think they mean that Mondragon is the largest worker co-op in the world.
Hasnep··on Google Launches Carbon, an Experimental Replacement for C++
The pun is that C is the chemical symbol for carbon.
Hasnep··on Developing Godot Projects with Neovim
Not an expert in Godot and definitely not an expert in C#, but I'd say the only real difference is that the documentation for GDScript is slightly better and there are significantly more tutorials for using GDScript than C# with Godot. All of the functions and concepts that are used in GDScript have an equivalent in C#, and you normally can just use the same function in camelCase.

You can use both languages in one project, so I'd recommend trying GDScript at first. It's a very simple language so it can be picked up quickly, but as soon as you feel yourself reaching for LINQ or wanting a proper type system then switch that script to C#.

Hasnep··on Amazon is intimidating and harassing organizing workers in Montreal
I think a key fact is the right to unionise in America is protected by law. You could make two contradictory statements like:

> If they cannot afford proper safety equipment then the business is a liability.

And

> If buying safety equipment causes an employer financial distress then it is a liability.

But I think most people would agree with the first statement and disagree with the second.

Hasnep··on The Vale Programming Language
GP that you're replying to is talking about Vala, not Vale
Hasnep··on Tesseract.js wraps an Emscripten port of the Tesseract OCR Engine
Can emscripten compile to JS? I thought it could only compile to WASM.
Hasnep··on My Taipei Quarantine
Not to be rude, but how many people died in the process? There is a reason Taiwan had less than 20 deaths in the first year of the pandemic and still have less than 1000 in a country of 20 million while never having a lockdown. It's only absurd if you don't value people's lives over things like convenience.
← PreviousPage 8 of 11Next →