HNHacker News
TopNewBestAskShowJobs

bashkiddie

70 karma · joined January 23, 2023

submissionscomments
bashkiddie··on Uv is the best thing to happen to the Python ecosystem in a decade
> (2) Are you not using official Python docker images?

Would you help me make it work?

  docker run -it --rm -v$(pwd):/venv --entrypoint python python:3.12-alpine -m venv /venv/remt-docker-venv
How do I source it?

  cd remt-docker-venv/
  source bin/activate
  python --version
  bash: python: command not found
bashkiddie··on Uv is the best thing to happen to the Python ecosystem in a decade
> (1) How old must the Python version of those projects be, to not be supported any longer with any decent GNU/Linux distribution?

Debian-13 defaults to Python-3.13. Between Python-3.12 and Python-3.13 the support for `pkg_config` got dropped, so pip projects like

https://pypi.org/project/remt/

break. What I was not aware of: `venv`s need to be created with the version of python they are supposed to be run. So you need to have a downgraded Python executable first.

bashkiddie··on Uv is the best thing to happen to the Python ecosystem in a decade
raises hand I hate python.

I am a user of pip binaries. Every few years one of them breaks.

As far as I understand, developers never cared about pinning their dependencies and python is fast to deprecate stuff.

  $ uvx remt
      Built pygobject==3.54.5
      Built remt==0.11.0
      Built pycairo==1.28.0
  Installed 12 packages in 9ms
  Traceback (most recent call last):
    File "/home/user/.cache/uv/archive-v0/BLXjdwASU_oMB-R4bIMnQ/bin/remt", line 27, in <module>
    import remt
  File "/home/user/.cache/uv/archive-v0/BLXjdwASU_oMB-R4bIMnQ/lib/python3.13/site-packages/remt/__init__.py", line 20, in <module>
    import pkg_resources
  ModuleNotFoundError: No module named 'pkg_resources'

  $ uvx maybe
  × Failed to build `blessings==1.6`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status:
      1)

      [stderr]
      /home/user/.cache/uv/builds-v0/.tmpsdhgNf/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289:
      UserWarning: Unknown distribution option: 'tests_require'
        warnings.warn(msg)
      /home/user/.cache/uv/builds-v0/.tmpsdhgNf/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289:
      UserWarning: Unknown distribution option: 'test_suite'
        warnings.warn(msg)
      error in blessings setup command: use_2to3 is invalid.

      hint: This usually indicates a problem with the package or the build
      environment.
  help: `blessings` (v1.6) was included because `maybe` (v0.4.0) depends on
        `blessings==1.6`
I heard rumors from computer vision developers that even libraries deprecate that fast.
bashkiddie··on Ruby Blocks
I heard some rumor that ruby was a type 2 lisp. There were some guys who rate programming languages on how much lisp features they reassemble. What is the source?
bashkiddie··on Ruby Blocks
> everything is an object, always.

I beg to differ. What object does the method `puts` belong to? Why do you not call puts with its objects name?

Ruby has a concept of mixins (Golang interfaces), these are not objects. Neither is `puts`

bashkiddie··on When I say “alphabetical order”, I mean “alphabetical order”
> not every single piece of software fucks up something as basic as string sorting

it is neither basic nor simple. Have you ever heard of UTF-8 and locales?

Here is an exercise for the curious reader: Pick any UTF-8 string "a", and another one "b", so that in increasing lexicographical order "a" sorts after "a+b" ("a" concatenated by "b"). ("a" > "a+b")

bashkiddie··on How Ruby executes JIT code
Are you aware of jruby?

https://www.jruby.org/

It is ruby running on a Java Virtual Machine. Imposes all downsides of the JVM (try to allocate more that 4GByte per object!) and provides JVMs concurrency model. Currently supports Ruby 3.1 (it claims to support 3.4, read the fine print if your specific feature is supported!)

bashkiddie··on How Ruby executes JIT code
The article targets MRI (Matzes Ruby Interpreter). It does not execute threads concurrently. Probably for the same reason that Python imposes limits on threads - to stay single threaded when calling into C libraries, most of which were written before threads were important enough to think about them
bashkiddie··on Show HN: Kitten TTS – 25MB CPU-Only, Open-Source TTS Model
TL;DR: If you are interested in TTS, you should explore alternatives

I tried to use it...

Its python venv has grown to 6 GBytes in size. The demo sentence

> "This high quality TTS model works without a GPU"

works, it takes 3s to render the audio. Audio sounds like a voice in a tin can.

I tried to have a news article read aloud and failed with

> [E:onnxruntime:, sequential_executor.cc:572 ExecuteKernel] Non-zero status code returned while running Expand node. Name:'/bert/Expand' > Status Message: invalid expand shape

If you are interested in TTS, you should explore alternatives

bashkiddie··on A short post on short trains
Munich is a counter example: It has many lines passing through (almost) 11 stations. They run at maximum speed of 40 trains per hour. It is a traditional block signal system with each block being shorter than a train - so they can run trains packed into tighter space. Each train opens left and right doors simultaneously so people can board and exit at the same time. Boarding still takes time. It is overcrowded at rushhour and brakes down regularily (a train being at a station for too long blocks all proceeding trains). And at Oktoberfest time, the stations are soo crowded that boarding takes longer.

Munich is planning on building a second subway route. It just does not have the money nor the space to build one. There has been discussion on building a second tunnel below the first, or on enabling the common train system for overflow by suburban trains -- by installing more signals to run more tightly packed.

bashkiddie··on How to Firefox
I am a heavy user of firefox and I am still unhappy with mozillas policy.

* Firefox-Hello is a easy to pick example of a broken service run by a 3rd party being imposed on users.

* Pocket is another service I never asked for.

* Instead of focusing on the browser, mozilla puts their effort into an English language database.

It appears to me mozilla does not understand their target audience.

Recently I tried to customize firefox for screen recording and ran into lots of outdated documentation about userChrome.css

bashkiddie··on The Awful German Language (1880)
I guess that beginner text books need to focus on teaching you one feature at a time.

It could be better if you aim for C1 level text books. But since free exercises are hard to check, it is probably not meant for a book.

bashkiddie··on The Awful German Language (1880)
I can only guess:

Once upon a time we used to write by hand. It was considered time consuming.

Once upon a time we used to set books in lead letters. There were ligatures, where two consecutive letters hat a special spacing - like "fi" or "sz". If we allowed three consecutive letters, we would need to invent new ligatures.

It is probably easier/cheaper to just forbid the spelling.

bashkiddie··on The Awful German Language (1880)
usually not. You need to guess either cat or tomcat, that designates a grammatical sex. All references are based on grammatical sex. It is strongly emphasized that a grammatical sex is not the same thing as a natural sex.

It is ok to guess the sex of an animal wrong. The same way nobody (should) cares whether an infant is a boy or a girl.

You can enforce to be neutral be refering to "das Tier" and "das Kind". But since it is just a grammatical sex, why should anyone bother?

There are some culturally assumed defaults:

* a nurse is assumed to be feminine, unless the distinction is important

* a cat is assumed to be feminine, unless the distinction is important

bashkiddie··on The Awful German Language (1880)
From a foreign learners perspective, it is easier to just learn the article together with the noun.

But there are rules for 2/3 of cases. https://sprachekulturkommunikation.com/genus-der-substantive...

You can classify by suffix.

* -ung, -heit, -keit -> feminin, e.g. die Schönheit

* -ling -> masculin, e.g. der Flüchtling

* -chen, -lein -> neutrum, e.g das Mädchen

You can classify by category. Every alcoholic drink is masculin, except for beer.

You can classify by phonetic spelling. That is probably the closest you have to Portugese.

bashkiddie··on The Awful German Language (1880)
Yeah, there has been a changeset in spelling rules

https://de.wikipedia.org/wiki/Reform_der_deutschen_Rechtschr...

... several times: 1996,2004,2006,2011,2017.

The current correct spelling is either Schiff-Fahrt or Schifffahrt.

bashkiddie··on The Awful German Language (1880)
Awesome example.

Germans are allowed to write compound nouns in hyphens

Donau-Dampfschifffahrts-Gesellschafts-Kapitänsmützenknopf-Farbenfabrik-Eingangstor

bashkiddie··on The Awful German Language (1880)
Reading the article I guess Mark Twain never had a knowledgeable teacher. Is there anything hacker news readers would like to know about the German language?
bashkiddie··on The Awful German Language (1880)
I am a native German and had Russian as a second foreign language. Try applying Russian Grammar rules to German, you will find they are almost identical.

Verb prefix system is the same. Noun conjugation even uses the same prepositions to decide the case. Compound words are slighly different, instead of a tram-station you would use tramlike station.

bashkiddie··on Hard numbers in the Wayland vs. X11 input latency discussion
AMD states that bugs only get fixed for Wayland.

Coincidentally I have got a graphics driver that likes crashing on OpenGL (AMD Ryzen 7 7840U w/ Radeon 780M Graphics)

bashkiddie··on Hard numbers in the Wayland vs. X11 input latency discussion
> I have had zero problems inputting Japanese and Chinese.

That may be fine.

Neo2 does not work. Neo has 3 modifier keys, Gnome/Mutter/Wayland/Whatever does only support two. Neo2 has a compose key, Wayland does not honor it.

https://neo-layout.org/

I use mod4 for navigation (arrow keys, site up) and compose for Slavish (read Polish) input (źżąę)

bashkiddie··on C stdlib isn't threadsafe and even safe Rust didn't save us
I guess the usecase is

    dlopen()
which passes on your environment. If you want to load libpam-keberos and pass

    DEBUG=verbose
you will need to setenv() your own environment.
bashkiddie··on Unless my phone can be a PC, I don't want to keep paying for extra performance
My personal opinion is: If you use it as a daily driver (as opposed to some boredom-only entertainment device) you should get the best money can buy.

Web requirements scale up over time, elder devices (some years old as opposed to yesteryears device) are CPU and RAM constraint.

Once a device is not manufactured anymore, its batteries are neighter. You will only get stocked elder batteries.

bashkiddie··on Unless my phone can be a PC, I don't want to keep paying for extra performance
That may be a vendors perspective. What is the users perspective?
bashkiddie··on Autossh – automatically restart SSH sessions and tunnels
I used to be a happy user of `autossh` until 2023. I used it on Cygwin on Windows and was quite happy how reliably it set up my tunnels (upon tunnels) in a flaky corporate network. `autossh` worked reliable compared to `ssh`s many timeout options.

I would still recommend it.

bashkiddie··on Ask HN: How do ADHD people cope on here?
I have been on Ritalin for 5 years when I was a teenager. The side effects are strong, the benefits are weak. Side effects:

* After eating I do not feel full. Never. There is a feeling of "my stomach starts to hurt, there is hardly any place left". * I am scared of the dark, I remember all the horror movie snippets I have seen in my life

The side effects still reside today

Benefit:

* After getting off Ritalin, my marks in school dropped by half a grade. Which is not that much, I still ranked best of class.

It was a good decision for my personal development to drop Ritalin.

← PreviousPage 2 of 2