@kytta@fosstodon.org
@kytta@fosstodon.org avatar

kytta

@kytta@fosstodon.org

I write open-source Python and JavaScript to make computers go brrrr

I made #Shareon (https://shareon.js.org) and #Share2Fedi (https://s2f.kytta.dev)

Alts:
по-русски: https://mastodon.ml/@n
auf Deutsch: https://norden.social/@n

#fedi22

This profile is from a federated server and may be incomplete. Browse more on the original instance.

jeffmcneill, to random
@jeffmcneill@fosstodon.org avatar

Mother's day by country

kytta,
@kytta@fosstodon.org avatar

@jeffmcneill the data is a bit misleading for some countries, like Russia. 8th of March is not Mother's Day, but the International Women's Day, where it is customary to congratulate mothers, of course.

But Russia also has a Mother's Day on the last Sunday in November. In Kazakhstan, it's on the third Sunday in September. In Belarus, it's 14th of October.

The English Wikipedia page does list both dates: https://en.wikipedia.org/wiki/Mother%27s_Day

gaborbernat, to random
@gaborbernat@fosstodon.org avatar

pyproject-fmt just got a new major release https://github.com/tox-dev/pyproject-fmt/releases/tag/2.0.0 now using rust under the hood (faster and more powerful)

kytta,
@kytta@fosstodon.org avatar

@gaborbernat

Quite disappointed with this change. The project was never slow to begin with, and the amount of data it has to process is so small that it’s honestly ridiculous to rewrite it into Rust.

But now that it is not pure Python any more, one can await problems that will arise when trying to run it on a non-mainstream platform. No Windows ARM, no PyPy, no musl+aarch64… The probability of having to compile it when installing is not worth it for a primarily CI-used tool.

kytta,
@kytta@fosstodon.org avatar

@hugovk @gaborbernat yeah, maybe not CI, although I do offload some CI tasks onto an Alpine (musl) machine with ARM64, which does not have wheels in this case. But it's also a problem for developers, who might work from an ARM-based Surface and might not want to get a whole Rust compiler to just run a tool locally.

But yes, I usually don't run linters in all platforms; I'm sorry for the confusing wording ofy previous post 😅

hund, to markdown
@hund@fosstodon.org avatar

Can anyone recommend me a good Markdown editor? I can't seem to find anything that's based on some web engine, which tends to use its own font rendering.

kytta,
@kytta@fosstodon.org avatar
rauschma, to random
@rauschma@fosstodon.org avatar

Simple(!) Node.js frameworks that support TypeScript (think small hobby project where performance doesn’t matter): Which ones do you like?

kytta,
@kytta@fosstodon.org avatar

@dunsap @rauschma I was going to mention Hono, too. I also love how easy it is to migrate runtimes with it, as you can do Node, Deno, and Serverless with pretty much the same code.

tonybaloney, to random
@tonybaloney@fosstodon.org avatar

Darn it Python, why??

>>> bool("False")
True
>>> bool("false")
True
>>> bool("FALSE")
True
>>> bool("0")
True

kytta,
@kytta@fosstodon.org avatar

@tonybaloney because otherwise:

username = request.form.get("username", None)
if not username:
return "Bad Request", 400

Full Name: John False
Username: false

Registration failed: 400 Bad Request

kytta,
@kytta@fosstodon.org avatar

@tonybaloney sounds like a hack, but would json.loads("false") not be kind of a "friendly" string-to-bool conversion? 😂

kytta, to random
@kytta@fosstodon.org avatar

In the past, I’ve really wanted to try out other search engines: Mojeek, Kagi, Ecosia; but there was one thing that made me stay with DuckDuckGo — the Bangs. Well, not any more!

Introducing : https://codeberg.org/kytta/interro

interro is a shim for your search engine that enables DDG Bangs, but better! Instead of routing your requests via DDG, it loads all Bangs into memory and handles redirects locally. You can use any search engine as fallback.

kytta,
@kytta@fosstodon.org avatar

Another useful feature: Custom bangs! You can create bangs for any website you want.

I’ve deployed a test instance, so you can try and see how it works: https://interro.deno.dev/. On this one, the fallback search is Mojeek, and there is a special bang !ky that will search the contents of my website.

The page is very much WIP; interro was built to be used from the browser’s search bar 😅

kytta,
@kytta@fosstodon.org avatar

Damn, it’s been less than two days, and I am already about to rewrite this whole project because does not seem to support Linux on ARM 🥲

louisderrac, to random French
@louisderrac@framapiaf.org avatar

Chez Ecosia, on pousse le greenwashing (littéralement, tout y est vert) à un niveau assez haut...

Maintenant avec un navigateur vert, et même une IA (verte elle aussi, évidemment).

Bref, rien de vraiment nouveau, c'est fatiguant...

https://www.ecosia.org/browser

kytta,
@kytta@fosstodon.org avatar

@louisderrac Qui a besoin d’une infrastructure d’IA durable quand on peut avoir des « réponses durables »? 🤦🏻‍♂️

rauschma, to random
@rauschma@fosstodon.org avatar

What monospaced font would you use for source code in a print book?

– I like serif fonts but couldn’t find any good free monospaced serif fonts.
– I do not like fonts with ligatures because those make it difficult to figure out what to type.

Options (current favorite first):
– JetBrains Mono: https://fonts.google.com/specimen/JetBrains+Mono
– Source Code Pro: https://fonts.google.com/specimen/Source+Code+Pro
– Ubuntu Mono: https://fonts.google.com/specimen/Ubuntu+Mono (fewer glyphs, e.g. no →)
– Courier Prime: https://fonts.google.com/specimen/Courier+Prime (fewer glyphs, e.g. no →)

kytta,
@kytta@fosstodon.org avatar

@rauschma my coding font of choice is Iosevka. While you might not like its defaults, and I don't know how it looks on paper, but the font is immensely customizable, with multiple variants for each character.

https://typeof.net/Iosevka/customizer

thegreybeardofthetree, to openSUSE
@thegreybeardofthetree@fosstodon.org avatar

How do you pronounce 'Suse'?

Ans: Soo-sah

Didn't know that. I always see-sawed between soo-zay and soo-zee.

https://www.youtube.com/watch?v=nLdexZlVkAY

kytta,
@kytta@fosstodon.org avatar

@thegreybeardofthetree since they're German, I've been (and will be) saying [zuːzə] (ZOO-zeh) :P

kytta, (edited ) to random
@kytta@fosstodon.org avatar

My fellow devs, I need your opinion:

Say, you have a software project. To do some operations more quickly, you write helper scripts. Think build.sh, download_dependencies.py, whatever. You may use them yourself or in CI.

What is your directory name of choice for these scripts?

See next post for clarification.

kytta,
@kytta@fosstodon.org avatar

./scripts is so far the most popular, it’s just what I have seen across projects.

./script was proposed (and is still used?) by GitHub. See https://github.com/github/scripts-to-rule-them-all

./build is sometimes used because these scripts are often executed at build-time (and thus in CI)

Another thing I’ve seen were scripts in the repository root, but for the sake of the poll let’s assume there are too many scripts for this.

ru, to Letters
@ru@fosstodon.org avatar

Wrote a #postcard to a fedi friend a few days ago.

👀 😍

The content is so basic cause it was all very impromptu.

But yeah - maybe I can start writing #letters??? Internationally???

How much does this kind of thing cost

kytta,
@kytta@fosstodon.org avatar

@ru depends on the sender's country. In Germany, sending internationally costs about 35% more than local post, which is 1.10 € for a typical 20 g letter. The price is the same for all recipient countries. Quite cheap in comparison to Belgium, where I had to pay 9 € for three postcards to (neighbouring) Germany 😵‍💫

drewdevault, to random
@drewdevault@fosstodon.org avatar

Someone responsible for enforcing the code of conduct in a project reaches out to you to discuss your behavior.

Do you (1) listen to them in earnest, ask questions if things are unclear, and take the opportunity for introspection and improvement, or (2) interpret everything they said as a threat, immediately escalate it into an argument, and characterize the email as a harassment campaign targeted against you and endorsed by the employer of the conduct enforcement person?

🤦‍♂️

kytta,
@kytta@fosstodon.org avatar

@drewdevault (3) I get embarrassed, delete all questionable comments and never reply 👉🏻👈🏻

frank, to random
@frank@frankwiles.social avatar

Write your tests folks! Kept having a minor annoying issue with some utility code that I run manually for a client. Have re-read it each time it messes up and didn't spot the issue until I took an extra 10 minutes and wrote comprehensive tests with example data.

kytta,
@kytta@fosstodon.org avatar

@frank and that's why I use len(...) <= 0 when checking for empty lists 😛

You can never know for sure!

kytta, to javascript
@kytta@fosstodon.org avatar

Coming back to a project after 1–2 months of not working on it. pnpm up reports ~150 updated dependencies out of 875. And those are just minor/patch updates.

I feel like JS developers get punished if they don’t release daily 🙄

kytta,
@kytta@fosstodon.org avatar

“+1101 -841”, it’s only been six weeks 😩

kytta, to Podcast
@kytta@fosstodon.org avatar

A lifehack for @AntennaPod users!

  1. Go to the app settings for AntennaPod
  2. Go to “Open by default”
  3. Make sure opening supported links is enabled and all links are selected

Now you can open Apple and Google URLs in AntennaPod, which saves some steps when you want to add a new podcast :blobcatheadphones:

munhitsu, to random
@munhitsu@fosstodon.org avatar

I wonder when someone will rewrite xz to Rust

kytta,
@kytta@fosstodon.org avatar
kytta,
@kytta@fosstodon.org avatar

@munhitsu sure thing https://github.com/uutils/coreutils 😂

But tbh we just need to kill autoconf and embrace readable config files

kytta, to random
@kytta@fosstodon.org avatar

Given how popular Logitech MX mice are, also amongst developers, how come nobody has still made a usable version of the ‘Options’ software? Reverse-engineer the drivers, make a lightweight daemon and native UI. Are the projects that currently are or have tried tackling this?

kytta,
@kytta@fosstodon.org avatar

I already have enough unfinished side projects, but I am freaking pissed by Logitech adding AI to their mice (and software). So, I hereby announce that I have started reverse engineering the Logi Options+ software.

My plan is to bypass the installer, re-implement the drivers and daemons and add simple text-based configuration (to begin with). I’ll focus MX Master 3 + macOS + Apple Silicon first (I’ve nothing else to debug on). The licence will be GPLv3-only.

PSA: This will take me ages (:

kytta, (edited )
@kytta@fosstodon.org avatar

Hardest decision for a project like this: What language to use?

I really want to try out Zig, and it’s handy that it can compile C, too. I am also considering Swift, given that it would be easy to integrate it with macOS and easy to incorporate pieces from the original code for testing/experimenting. It might be that Protobuf will be used, and I only really know how to use it in Go. Rust is an obligatory option, but I don’t like it.

P. S. Don’t expect me to follow the poll results :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • tsrsr
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • hgfsjryuu7
  • Youngstown
  • InstantRegret
  • slotface
  • khanakhh
  • rosin
  • ngwrru68w68
  • kavyap
  • PowerRangers
  • Leos
  • tacticalgear
  • cubers
  • everett
  • vwfavf
  • ethstaker
  • osvaldo12
  • Durango
  • mdbf
  • modclub
  • cisconetworking
  • GTA5RPClips
  • tester
  • anitta
  • All magazines