Searching yarn

Twts matching #coding
Sort by: Newest, Oldest, Most Relevant
↳ In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@movq@www.uninformativ.de The vast majority, yes. However, I know it’s hard to believe, I have seen black sheep that actually improved the code base. Sometimes. Much more often, it’s not the case and I’m far from really understanding the merge request that I’m supposed to review.

One really looses the feeling for the software quickly. Those who think this is a bad thing are in the minority, unsurprisingly.

⤋ Read More
↳ In-reply-to » Made a little program to print the system’s uptime on DOS, OS/2, and Windows NT:

@movq@www.uninformativ.de Oh, it’s been a hot minute since I last came across Pascal. :-) When I first quickly skimmed through the code, my eyes fell on the reproducer in the comment and I immediately thought: This reminds me of Delphi! And sure enough, I then saw the .PAS file extension in the URL. That Kiwi applied some strange code formatting, I have to say, though.

Haha, that’s a sweet trick with stdin. Crazy, who comes up with things like that? It would have never crossed my mind to do stunts like that. :-D

Today, I also learned that -R is an alias for -r in rm. I think I never saw -R used here before. Of course for chmod and chown, but not rm.

⤋ Read More

Hey, folks. Sorry to disappear for the last couple of weeks.

Last weekend, I took the family to Atlanta, GA for a visit to the Georgia Aquarium and the Center for Puppetry Arts, both of which were fantastic (pics forthcoming). Unfortunately, amongst the souvenirs we brought home was the worst sickness my wife and I have had in years, which basically laid us both out until Thursday, and we’ve been recovering since.

On top of it, just before we left, I accidentally broke TwtStrm (my WIP TwtTxt reader), so I didn’t even have a functional way to keep up with the only ā€œsocial media platformā€ I actually give a hoot about (nor a functional brain to try and fix it).

As of this morning, though, I’m happy to report that we’re basically all better, and TwtStrm is back to working. I’m actually hoping to get some code written this weekend (and maybe even try to get Parley running), but we’ll see how things go. šŸ™‚

⤋ Read More

Real tired of doing these, but here’s another Android developers vs Google update, this time there’s both good and bad news.

The good:
-Users will be able to enable ā€œsideloadingā€ for all current and future devices, attached to their Google account, rather than having to undergo the tedious 24 hour wait including process, on each device.

-Rather than these changes to ā€œsideloadingā€ and ā€œadvanced workflowsā€ being implemented at random different dates, in different countries, we’ll all get them come 2027.

The bad:
As GrapheneOS developers recently mentioned ā€œGoogle replaced pushing Git tags for certain source code with obtaining source code via Google Drive after making a request through Google Forms. It’s completely ridiculous and they’ve gradually become very slow at handling requests. They’re in clear violation of the GPLv2 now.ā€

whole thread: https://grapheneos.social/@GrapheneOS/117057099753905023

⤋ Read More

It is such a nice feeling that Mu is such a capable little language šŸ˜… And I decided to write code code in Mu by hand 🤚 haha 🤣 and start solving Project Euler problems, like Problem 8 which works out to be a nice elegant solution in Mu:

#!/usr/bin/env mu

// Largest Product in a Series

import "fp"
import "sys"

fn usage() {
  print("Usage: cat |", args()[0], "<n>")
}

fn products(xs) {
  return fp.reduce(xs, 1, fn(x, y) {
    if y == nil {
      return x
    }
    return x * y
  })
}

fn main() {
  if len(args()) < 2 {
    usage()
    exit(1)
  }

  s := must(sys.read_all(0))
  if len(s) == 0 {
    usage()
    exit(1)
  }

  n := must(int(args()[1]))
  r := fp.max(fp.map(fp.sliding(fp.map(s, int), n), products))
  print(r)
}

main()

⤋ Read More
↳ In-reply-to » The author of the Xfce Wayland compositor on LLMs:

Most of this insane power consumption happens during the models training, so the additional cost of prompting, is minimal. Facebook invented cool ways to exted the environmental damage far beyond the training stage, by dumping the dirty data center water into nearby water sources, but that’s more so a Facebook problem, than a fault of AI.

I would still never waste my own money, paying for any AI subscriptions that my employer doesn’t already pay for, no matter if we use them, or not.

I am also against aggressive scraping and taking everything as training data, disregarding the authors wishes and license. I allow it on my website, mostly as proof that no matter how much they scrape my stuff, the real me remains both a superior webdev and artist.

I am well aware this makes me come across really egotistical, especially after developers far better than me, embraced vibe coding, arguably way too much. To give an example, all attempts to get Microsoft Copilot, that’s embedded into SharePoint, to generate an extension/uBlock filter to make SharePoint revert to the old superior UI failed, but I was able to do that in three lines of code ( https://thecanine.smol.pub/ublock-filters ), in half an hour, despite me never seeing the code of that page before. After a few of these comparisons, it is increasingly hard to see most of these tools, as my replacement.

I am not even going to talk about the people trying to imitate my art style with AI, until they can show me a result where all the squares are the same size, in a grid and actually square.

⤋ Read More
↳ In-reply-to » The author of the Xfce Wayland compositor on LLMs:

I am a bit split on this, don’t think there’s any real use for AI in things like art, at absolute most getting a reference to compare with multiple non-AI ones, or possibly some animation in between frames, if it ever gets better at making those. Would not rely on it for any of my personal projects, more than maybe a quick search that would have previously been done on Stack Overflow, but if I work somewhere and they demand it be used similarly to how it is described on this site, considering the current IT job market, I’d probably take the slop bullet, over being unemployed.

Obviously even in that case, I’d only do this to generate code I can understand, improve and review. I’m definitely not advacating people just put their feet up on the table and let some random combination of ā€œAI agentsā€, vibecode their entire codebase.

⤋ Read More
↳ In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@david@daiwei.me Sorry, I can’t do this anymore. A large part of my work (text, code, thoughts, …) of the last 20-25 years has been stolen and is now being sold at rampant prices to idiots who then complain about me being a backwards bitch (I get to hear this every single day). Everything I say and do in public is being abused.

Fuck that, I’m out.

⤋ Read More
↳ In-reply-to » Advertise in ChatGPT | Hacker News Seriously?! 😳 wut da actual fuq?! 😱

@lyse@lyse.isobeef.org @movq@www.uninformativ.de @klaxzy@klaxzy.net @david@daiwei.me I’m in a similar boat, they pushed us to use it, then pushed us to keep our usage below a certain threshold (although they do allow certain ā€œpower usersā€ go beyond the limit, LOL). I dragged my feet at first, but they finally broke my spirit about a month before the limits were put into place. Unfortunately, I’ve been doing more managing than coding lately, so I mostly just use it for creating JIRA tickets (I find it to be very good at producing ā€œAgile artifactsā€).

⤋ Read More
↳ In-reply-to » Dunno if anyone will find this interesting... But some ~6 months or so ago I experimented briefly with creating a whole bootloader + kernel + userland -- Basically an entire OS in the Mu programming language (which as you know I also designed and created) -- 6 months later I've worked on it some more after spending the last week working on improvements to Mu itself, which is now able to compile itself with its own Mu implemented compiler and now have an os/arch backend called muos/amd64 that boots into a running shell, with a tiny little vfs, UNIX-like semantics, syscalls, read/write, etc. It works pretty nicely, and aside from a small Assembly "nucleus", most of the Kernel and Userspace is written in Mu.

@david@daiwei.me It’s somewhat expected to have a fair bit of Assembly (machine code) to get some of the bits you need going. But I think I can reduce this a bit. Let’s see…

⤋ Read More

I am sooooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOoooooooooooooooo tired of ā€œfast-movingā€ software. ruff changed a ton of stuff and now all my code bases ā€œneed fixingā€. Blah.

And SemVer is worth nothing if your 4 year old program with over 16’000 commits is still at ā€œversion 0.xā€. Blah!

Everything is horrible.

⤋ Read More
↳ In-reply-to » I’m seeing some slowdowns in Vim lately. Must have something to do with syntax highlighting or indentation rules or something: When I hit Enter to go to the next line, it sometimes freezes for like 100 ms. It’s pretty annoying.

@movq@www.uninformativ.de Similar to my Go IDE at work. GoLand hangs so often in this giant code base. :-D (But it could also be one or the other snake oil that’s forcefully installed and fucks with me every day.)

⤋ Read More
↳ In-reply-to » @prologic Hmmm, I have no idea how to solve that problem. šŸ˜… Some jenny stuff aside, I received zero bug reports or code contributions since leaving GitHub in 2018.

@movq@www.uninformativ.de Finally, your software is just perfect and finished by now, no need to report non-existing bugs or send in code changes. :-) How many tickets and merge requests did you get before moving to your own server?

I have to admit that I use git format-patch so rarely, I always have to pull it up from my shell history. Haven’t used git send-email even once. I definitely have to look into that soon. Wanted to do that for several years. I typically upload the patch to my server and send a link via IRC.

Maybe I was just very unlucky, but my experience is that you can perfectly ignore people and their work who only do it for the ā€œfameā€. It’s almost always been from inferior quality to say the least.

⤋ Read More
↳ In-reply-to » Okay, so, my website also includes my code / git repos, and those are made browsable by stagit. What I don’t like about this (these days) is that this includes all the diffs of my commits. In other words: All my code.

@prologic@twtxt.net Hmmm, I have no idea how to solve that problem. šŸ˜… Some jenny stuff aside, I received zero bug reports or code contributions since leaving GitHub in 2018.

I thought I had made that super easy, because you can just send me an email – no sign-up process, nothing. But that’s way too old-school, people don’t know how to use git format-patch (let alone git send-email) and they also don’t understand that they can just send me a link to their forked Git repo (which can be hosted anywhere). Git is super flexible and powerful, but those features are hardly ever used.

Maybe people even need some kind ā€œrewardā€, or ā€œfameā€. Like those ā€œachievementsā€ that you can unlock on GitHub. (Something to put in their CV … ?)

⤋ Read More
↳ In-reply-to » Okay, so, my website also includes my code / git repos, and those are made browsable by stagit. What I don’t like about this (these days) is that this includes all the diffs of my commits. In other words: All my code.

@movq@www.uninformativ.de Works good. I fully get and support your reasoning behind that change. There’s only one downside. Quickly looking at some code snippets in the browser helps me to quickly judge whether it’s worth to clone a repo or not. Oh well. :-) After all I know that movqware always is.

⤋ Read More
↳ In-reply-to » After many months of hardā„¢ work, I've finally been able to get Mu (µ) lang to a point where the duplication of machine code / assembly between the ARM64/AMD64 and Mach-O and ELF formats are not all eliminated. This now means that writing a new backend target os/arch for Mu is now relatively simple to do, or far less duplicated work/effort.

On that note, I just finished writing the linux/risc64 backend and it only took ~2k lines of code šŸŽ‰

⤋ Read More

After many months of hardā„¢ work, I’ve finally been able to get Mu (µ) lang to a point where the duplication of machine code / assembly between the ARM64/AMD64 and Mach-O and ELF formats are not all eliminated. This now means that writing a new backend target os/arch for Mu is now relatively simple to do, or far less duplicated work/effort.

⤋ Read More

Okay, so, my website also includes my code / git repos, and those are made browsable by stagit. What I don’t like about this (these days) is that this includes all the diffs of my commits. In other words: All my code.

This makes it super easy for malicious crawlers to slurp up valuable data. I don’t like that.

I’m thinking about switching to this instead:

https://movq.de/git2/

It still shows project infos and there are Atom feeds, but to get the code, you have to actually clone the repos.

šŸ¤”

(If you spot any bugs, let me know.)

⤋ Read More
↳ In-reply-to » šŸ“£ ACTION REQUIRED: Hey folks šŸ‘‹ For those of you whom are using the Twtxt App either via the Hosted option or on your own twtd instnace or via Github/Gitea or any other publishing backend (doesn't amtter). Please read.

and @david@daiwei.me your rename shipped šŸ™Œ it’s ā€œGenerate recovery codeā€ now (you were right — mints a fresh one each press), + it asks before replacing an existing code so you don’t nuke the one you saved šŸ˜…

⤋ Read More
↳ In-reply-to » šŸ“£ ACTION REQUIRED: Hey folks šŸ‘‹ For those of you whom are using the Twtxt App either via the Hosted option or on your own twtd instnace or via Github/Gitea or any other publishing backend (doesn't amtter). Please read.

quick correction on that cleanup timing šŸ™ it’s not 28 days. nothing gets deleted for the first 30 days at all (observe-only), and after that only setups unused for ~6 months that also never saved a recovery code. saved a code = safe forever šŸ‘

⤋ Read More
↳ In-reply-to » šŸ“£ ACTION REQUIRED: Hey folks šŸ‘‹ For those of you whom are using the Twtxt App either via the Hosted option or on your own twtd instnace or via Github/Gitea or any other publishing backend (doesn't amtter). Please read.

IMPORTANT: Treat the re oery code like a password.

⤋ Read More

šŸ“£ ACTION REQUIRED: Hey folks šŸ‘‹ For those of you whom are using the Twtxt App either via the Hosted option or on your own twtd instnace or via Github/Gitea or any other publishing backend (doesn’t amtter). Please read.

Please open the app and you should be prompted to save your recovery code for your device. This basically is all of your settings, follows, etc in the app itself. This is synced to the Origin everytime you make a change, and also stored on-device. This is what makes it possible to sync your setting across services, move to another device, etc.

Please save a copy of the recovery code somewhere. This is only your only way to recover your settings.

Thank you šŸ™

⤋ Read More
↳ In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@david@daiwei.me Not sure if you only mean the code segments or in general. In theory, a general darker text color for read messages would probably work. The thing is that regular white on black is quite standard. In Newsboat, new articles are red (I opted for yellow here) and read ones white. I found that useful and kinda copied it for tt.

⤋ Read More
↳ In-reply-to » Unread messages are yellow, while read messages are white in tt. Focusing them just alternates the fore- and background colors. With the old color scheme, I disliked that inline code and code blocks were basically just the opposite of normal text. Hence, unread code was white and read code yellow. I found this often confusing, especially with larger code blocks. Sure, there are the timestamp and author columns that still show the usual white (read) and yellow (unread) background for selected messages, but still.

As an alternative, I also gave a much simpler teal on gray with reversed colors on focus a shot. Hmm, not so sure either. :-?

Unread messages:

Read messages:

⤋ Read More

Unread messages are yellow, while read messages are white in tt. Focusing them just alternates the fore- and background colors. With the old color scheme, I disliked that inline code and code blocks were basically just the opposite of normal text. Hence, unread code was white and read code yellow. I found this often confusing, especially with larger code blocks. Sure, there are the timestamp and author columns that still show the usual white (read) and yellow (unread) background for selected messages, but still.

This is how it was before with unread messages:

Before with read messages:

So, I just reworked the code styles. Not sure if I like that or if it is actually an improvement. Unread code is teal on gray when not in focus and becomes blue on orange when focused. I thought the dark gray code background on a black regular background is still nice and subtle. The same similarity in colors for focused messages meant to go with an orange code background on a yellow regular background. The teal was too light, so went with a blue foreground color:

When read and unfocused, the new color scheme calls for the same code style teal on dark gray. However, with white as the main background for selected messages, I went with a light gray code background and a blue code foreground. Again, the contrast with white and teal wasn’t good enough. Vice versa, blue on dark gray is also not all that readable:

It looks like a parrot. Let’s see if I begin to like it.

⤋ Read More

I trip over this in our code at work all the time.

Python has this concept of ā€œpropertiesā€:

class Oink:
    def __init__(self):
        self._foo = 3

    @property
    def my_property(self):
        return self._foo


a = Oink()
print(a.my_property)

my_property() is a method but it can be used as if it were a field.

This can also be used to define a setter:

class Oink:
    def __init__(self):
        self._foo = 3

    @property
    def my_property(self):
        return self._foo

    @my_property.setter
    def my_property(self, value):
        self._foo = 123 * value

Because, for some reason, Python people don’t like getters and setters. Instead, they hide it behind a property.

The result is, when you read this:

a.my_property = 5
print(a.my_property)

You have no idea that this actually calls a method.

⤋ Read More

I really think I should go back to Java.

Writing programs in Python is so exhausting. I want a compiler and I want static typing. No, linters and type checkers and IDEs are not good enough. Compilers catch way more errors in advance.

Rust is also exhausting. They’re constantly adding language features and, at the same time, the runtime library remains tiny and you need 3rd party libraries for everything. Many of those are still at version 0.x (SemVer!) and you can’t rely on anything. Often times, you need the latest Rust nightly compiler.

Go is … I don’t like it. And huge binaries.

I like C as a language, but it’s too fragile. I want to have a proper HashMap every now and then.

None of the above have good GUI libraries, at least not on Linux.

And then there’s Java. This is my fractal renderer that I wrote over 17 years ago:

https://movq.de/v/fcd3c4e557/vid-1784121825.mp4

It’s fast. It has a GUI with custom widgets and those weren’t even hard to make. It still works without changing a single line of code. The source code files have timestamps from 2009 and I just noticed that the JAR file I’m using in the video was compiled in 2010.

Java as a language is relatively easy to learn and to master. There are few surprises. The source code organization with packages is good. Java API docs are clear and well written.

The JVM ramp-up times have improved considerably:

https://movq.de/v/e7314e521e/vid-1784121998.mp4

This isn’t like the Dark Ages anymore. Might even be usable for some CLI tools.

The only thing where Java really sucks is anything close-ish to the kernel. Try issuing an ioctl() … I couldn’t have made my TUI framework in Java, but then again, I wouldn’t have needed to because Swing already exists and it just works.

⤋ Read More
↳ In-reply-to » New in the Twtxt App 🄳 a Hosted feed backend — claim a nick, one tap, no account, no server, nothing to run. Your feed lives at https://twtpub.com/u/yournick and you're posting from the app straight away šŸŽ‰

@david@collantes.us heads up šŸ‘‹ that verification code never reached you — outbound email was broken on my end (my mail relay was rejecting twtxt.net senders šŸ¤¦ā€ā™‚ļø). Fixed + deployed now 🄳 give the hosted feed another go, it’ll land this time šŸ¤ž

⤋ Read More
↳ In-reply-to » The original twt is unavailable. It may have been edited or deleted, or is from an unknown or muted feed.

@david@daiwei.me Ta, I continued my fun with studying the tcell and cbind code bases for key bindings. My plan is to eventually not only support custom key bindings in the tt configuration file, but also to enable multi-key sequences, such as gg to jump to the top of a list/tree. Or use other vim-like navigation movements like 7j or 25gg etc.

And it turns out there are only a hand full oft tcell/cbind version combinations that work together. Only if all stars align, there’s chance of success. I will probably end up pulling cbind in to simplify my life. There are situations where tcell.EventKey’s triple of key, modifiers and rune are not all that intuitive to me. Let’s see.

⤋ Read More

Anyone using XMPP? I’ve been hearing a lot about how it is the OG messaging protocol. That G00gle Talk used to use it as a back-end, that FB messanger and w_hatsapp use some modified version of it or something; And that setting up a server (or even using a public one) would be a better alternative to the aforementioned apps, so I did. Now the question is: ā€œWhere the Fu__ are my video calls at!!? šŸ¤£ā€ … The protocol supports videoconferencing and I’m yet to find a decent Desktop/Mobile client that implements it. I wish I knew enough Code-Fu to contribute/help implement some, somewhere.

⤋ Read More

Java 1.3 on Windows 95 with Proton as the editor could be another option for next Advent of Code.

Win95 runs pretty smoothly on my old box (no surprise, that box came with Win95) and I like Java, so … why not …

Not sure about the speed, though. 🄓

⤋ Read More

I just read @kat@yarn.girlonthemoon.xyz’s blog post over here:

https://bubblegum.girlonthemoon.xyz/articles/learning-to-code-like-it-s-the-90s

Jesus, it must be so overwhelming for young people to get started with programming.

When I started programming, there was the built-in ROM BASIC of that PC and probably a bit of BASIC on a floppy, and that was it. Nowadays? Millions of libraries and frameworks and languages and what not – and, much worse, there’s the expectation that you need to make something fancy. When I started, printing something and understanding IF was good enough.

⤋ Read More

I noticed that there are quite a few UI glitches in vim-classic – and quickly found the cause: It comes with outdated Unicode tables.

I have to admit that I wasn’t aware that there’s a new Unicode release every year:

https://en.wikipedia.org/wiki/Unicode#Versions

Look at this huge number of changes. Every program has to keep track of that, often through libraries but sometimes not (like in Vim’s case).

I use Unicode extensively, but this shit is extremely expensive …

My TUI framework is having the same problem. At the moment, this is all offloaded to wcwidth, but if that library was to become unmaintained, I’d have to track Unicode myself.

Gah!

The DOS days were simpler. CP437, end of story. (Yes, I know that’s a lie.)

⤋ Read More

Oh come on! Why such a stupid anti-feature!?

WARNING: Your yt-dlp version (2026.03.17) is older than 90 days!

     It is strongly recommended to always use the latest version.
     You cannot update when running from source code; Use git to pull the latest changes.
     To suppress this warning, add --no-update to your command/config.

⤋ Read More
↳ In-reply-to » @lyse Is it this one? https://github.com/rivo/tview It’s almost 10 years old but hasn’t seen a 1.0.0 release yet? šŸ¤”

@movq@www.uninformativ.de Yes. The author tries hard not to break existing code, but apparently he did this time. In his defense, it’s not an official release, I just updated to master. Which is exactly what I always did in the past as there are no real versions (I even think that in one ticket he wrote years ago that master is always stable). That has finally changed a year ago, though: https://github.com/rivo/tview/releases/tag/v0.42.0

⤋ Read More
↳ In-reply-to » Every now and then, I think that I have carefully proof-read my message enough times and hit the "Add message" button in tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:

Fuck me! I tried to upgrade tview and the first thing I notice is a shitload of added dependency versions:

go.mod | 18 ++++-----
go.sum | 97 ++++++++++++++++++++++++++++++++++++++-----------

My code does not compile anymore as the view.FormItem interface was extended. Get/SetDisabled(…) are quickly implemented, no worries.

But the tview.Primitive (what makes a widget) interface has now a bunch of PRIVATE methods. For focus handling. Would you believe that!? Thanks, I cannot satisfy this interface in my very custom widgets anymore. Okay then, I just embed *tview.Box. tt now successfully compiles, but does not react anymore on key presses and the message tree is not focused either.

I’m not in the mood to debug this shit. :-( Lunch time.

⤋ Read More
↳ In-reply-to » Every now and then, I think that I have carefully proof-read my message enough times and hit the "Add message" button in tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:

Getting the vim key bindings to work for focus switching in this modal dialog took me forever. Only cursors and (Shift+)Tab are supported out of the box. I absolutely understand that, it’s fine. I installed an input handler on the dialog, but the focus always stayed the same.

After two wasted hours, I was in despair to copy the tview.Modal into my own code base. Of course, I had to fix all the private tview field accesses first. But even installing the input handler directly on the buttons themselves did not work. Even though, the handler was definitely executed, the focus did not shift. Forcing redraws as a last resort also did not work.

Looking through all the messy chained input handling, I eventually stumbled across another place in the tview.Form, which is internally used by tview.Modal. This messed around with app focus receptions and input handlers. This gave me the idea to make the tview.Application refocus my modal dialog after I told the modal dialog which button to select. And would you look at that, this did the trick! I haven’t completely figured out what is going on exactly, but I could get rid of my Modal clone again.

I always go through hell with focus handling in tview. Each and every time. It just does not feel natural to me. Complete brainfuck to wrap my head around. The Urwid API felt sooo much more refined, it never was an issue. It just works. In fact, I cannot think of any other TUI library that has remotely the same pain level when it comes to focusing widgets as tview.

Now I’m curious how movwin deals with that. ;-)

⤋ Read More