einval

joined 1 year ago
MODERATOR OF
6
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]
 

The local pict-rs database fails to migrate from v3 to v4 regardless of what I do so I've given up on it. This means all images uploaded prior to today are broken. This includes community icons, user avatars, etc.

Oh well.

1
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

Went well. No issues to report.

 

https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md#lemmy-v0184-release-2023-08-08

I originally intended to apply this shortly after it was released about two weeks ago, but things ended up a little busy at home. Better late than never I suppose. Enjoy!

[โ€“] [email protected] 1 points 1 year ago

Aliens: Special Edition

[โ€“] [email protected] 43 points 1 year ago (2 children)

RIF. Ugh, what a shame.

[โ€“] [email protected] 1 points 1 year ago

Hell yeah. No problem!

[โ€“] [email protected] 1 points 1 year ago

I can't think of any one truly terrible episode I secretly enjoyed. I hate all of the episodes that were laser focused on Wesley Crusher, boy genius. If I had to pick a best of the worst from that pool I'd go with "The Game". ๐Ÿ˜€

[โ€“] [email protected] 2 points 1 year ago (1 children)

I haven't had that happen to me yet, but it sounds annoying as hell. The "undetermined" language shouldn't exist. That needs be a silent default. The user should be able select their primary language with a drop-down menu. The combo box would still exist but it'd be completely optional.

In your case it'd be nice if the "Select Language" drop-down was automatically set to the community's default language. And maybe put a little red icon next to it when your language settings are incompatible.

2
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I unknowingly deselected "Undetermined" at some point and ended up missing out on a lot of posts for the past couple weeks.

I suspect this happened when I changed my account settings using my phone. And here I was thinking Lemmy died or something ๐Ÿ˜….

To fix this for myself I highlighted "Undetermined", scrolled down, control+clicked "English", then hit "Save".

[โ€“] [email protected] 1 points 1 year ago* (last edited 1 year ago)

What I use on Linux:

  1. Vim
  2. GNU Make
  3. NASM (nasm.us)

NASM uses Intel assembly syntax. If you want to learn and use AT&T syntax you can use GNU Assembler (as) provided by the bintutils package instead.

How I use it:

Create a project

mkdir hello_world
cd hello_world
touch Makefile hello_world.asm

Write a Makefile

Note the indents below are supposed to be TAB characters, not spaces.

Makefile

all: hello_world

hello_world.o: hello_world.asm
        nasm -o $@ -f elf32 -g $<

hello_world: hello_world.o
        ld -m elf_i386 -g -o $@ $<

.PHONY: clean
clean:
        rm -f hello_world *.o

Write a program

hello_world.asm

; Assemble as a 32-bit program
bits 32

; Constants
SYS_EXIT  equ 1         ; Kernel system call: exit()
SYS_WRITE equ 4         ; Kernel system call: write()
FD_STDOUT equ 1         ; System file descriptor to write to
EXIT_SUCCESS equ 0

; Variable storage
section .data
        msg:            db "hello world from ", 0
        msg_len:        equ $-msg
        linefeed:       db 0xa ; '\n'
        linefeed_len:   equ $-linefeed

; Program storage
section .text
global _start

_start:
        ; Set up stack frame
        push ebp
        mov ebp, esp

        ; Set base pointer to argv[0]
        add ebp, 8

        ; Write "hello world from " message to stdout
        mov eax, SYS_WRITE
        mov ebx, FD_STDOUT
        mov ecx, msg
        mov edx, msg_len
        int 80h

        ; Get length of argv[0]
        push dword [ebp]
        call strlen
        mov edx, eax

        ; Write the program execution path to stdout
        mov eax, SYS_WRITE
        mov ebx, FD_STDOUT
        mov ecx, [ebp]
        ; edx length already set
        int 80h

        ; Write new line character
        mov eax, SYS_WRITE
        mov ebx, FD_STDOUT
        mov ecx, linefeed
        mov edx, linefeed_len
        int 80h

        ; End of stack frame
        pop ebp

        ; End program
        mov eax, SYS_EXIT
        mov ebx, EXIT_SUCCESS
        int 80h

strlen:
        ; Set up stack frame
        push ebp
        mov ebp, esp

        ; Set base pointer to the first argument on the stack
        ; strlen(buffer);
        ;        ^
        add ebp, 8

        ; Save registers we plan to write to
        push ecx
        push esi

        ; Clear string direction flag
        ; (i.e. lodsb will *increment* esi)
        cld

        ; Zero counter
        xor ecx, ecx

        ; Load address of buffer into the "source index" register
        mov esi, [ebp]
        .loop:
                ; Read byte from esi
                ; Store byte in eax
                lodsb

                ; Loop until string NUL terminator
                cmp eax, 0
                je .return
                ; else: Increment counter and continue
                inc ecx
                jmp .loop

        .return:
                ; Return string length in eax
                mov eax, ecx

                ; Restore written registers
                pop esi
                pop ecx

                ; End stack frame
                pop ebp

                ; Pop stack argument
                ; 32-bit word is 4 bytes. We had one argument.
                ret 4 * 1

Compile and run

$ make
nasm -o hello_world.o -f elf32 -g hello_world.asm
ld -m elf_i386 -g -o hello_world hello_world.o
$ ./hello_world 
hello world from ./hello_world

Adding a debug target to the makefile

Want to fire up your debugger immediately and break on the main entrypoint? No problem.

Makefile

gdb: hello_world
    gdb -tui -ex 'b _start' -ex 'run' --args $<

Now you can clean the project, rebuild, and start a debugging session with one command...

$ make clean gdb
rm -f hello_world *.o
nasm -o hello_world.o -f elf32 -g hello_world.asm
ld -m elf_i386 -g -o hello_world hello_world.o
gdb -tui -ex 'b _start' -ex 'run' --args hello_world
# You're debugging the program in GDB now. Poof.
 

Federation traffic has improved. I'm not seeing a constant stream of HTTP header expiry errors in the log anymore. ๐Ÿ‘

1
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I picked up assembly programming in 2015 after my son was born while on paternity leave. I needed something to keep my mind busy between changing diapers and feedings, or I was going to go insane.

I started off with the 6502 through reading old magazines from the 70s and 80s on archive.org (Compute! Magazine was rich with examples and how-to articles. RIP Jim Butterfield). I bought two functioning C64s from a local Ham Fest with the hope of diving into the real-deal head first, but with kids that's much harder than it sounds. I had to shelve the machines and settle for VICE.

After about a year of mucking around trying different things I decided to start reading through old Intel and AMD architecture documents (8088/6). Around that time I discovered the "emu8086" emulator and purchased a license so I could watch my code execute and effect the system in real time. I knew about "insight" for DOS, and tried it too, but for the time being the emulator was a much better visual learning tool.

Shortly thereafter I became interested in operating systems and how they worked under the hood (i.e. DOS). So my next goal was to write a bootloader based on the Intel spec documents, and a tiny real-mode OS capable of reacting to user input. Nothing fancy, however this track turned out to be very beneficial.

I started programming in basic when I was little, copying DATA lines out of books so I could play games, and eventually graduated to C when I was 12-ish. Despite being able to program (fairly well) for years, I lacked the formal education of my peers at work. Assembly really jumpstarted potential in me that I didn't even know existed, and actually pushed me to become a more thoughtful developer. I used to be afraid of gdb but now it's my bread and butter.

If you want to take a look at the "OS" you can find it here:

https://git.einval.net/user/jhunk/minos.git/

I also wrote a program for my son at one point, though it's incomplete:

https://git.einval.net/user/jhunk/learncolors.git/

einval.net itself was supposed to be a programming blog. Again though, with kids I just don't have the time or energy anymore. Oh well. Perhaps I'll get back into doing that in 10 years or so ๐Ÿ˜‰

[โ€“] [email protected] 1 points 1 year ago

"Make it go, helmsman." ๐Ÿ‘‰

[โ€“] [email protected] 2 points 1 year ago

Oh cool! I'll have to check it out. I love how people have been going back and reverse engineering old game engines lately.

1
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
  • Email verification for new users has been re-enabled
  • Captcha is broken in this release so it has been disabled for now
 

I guess the GPL protects them from litigation here because users can still access the sources.

The new TOS pretty much states that if you "abuse" your RH subscription by repackaging their SRPMs and releasing them in the wild their lawyers will flay you in the town square.

Can IBM/Red Hat really lay claim to the modifications/patches they've made to open source packages? What about all of the contributions RH has made to the kernel over the years? Is that not "theirs" too?

In the software packaging world you see maintainers using freely available patches from Debian, Fedora, and so on for their own distros. So what happens now if a patch is only available through Red Hat? Is it reasonable to assume you'll get sued because it came from one of their SRPM packages?

I just think it's messed up. If this was limited to RH's own software projects maybe I wouldn't care, but making folks pay for access to what's already free (and they didn't write from scratch internally) is shitty. Unless I'm totally mistaken a lot of what ends up in CentOS and RHEL is derived from changes contributed to Fedora using the free labor/time/energy of everyday RPM maintainers.

[โ€“] [email protected] 1 points 1 year ago

Makes me wonder how many times "Fuck u/spez" is repeated in that data dump.

2
BattleBit Remastered on Steam (store.steampowered.com)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I purchased BattleBit the other day for $15 USD and I am enjoying it so far. The community seems pleasant at the moment. The developer-run servers have strict rules against being an asshole and a zero tolerance for spam/racism/politics, so that's definitely a plus. I can play the game instead of muting people constantly.

Server MOTD

If you're a fan of Battlefield (1 or 2) or Project Reality then BattleBit might be worth checking out. The pace is as fast or slow as you want it to be. If you prefer static defense -- go for it. If you want to run into the fray to drag incapacitated players from the field while tracers whiz by -- go right ahead. If you want to employ teamwork and tactics to capture objects -- no one will scoff at you.

[โ€“] [email protected] 1 points 1 year ago

Yeah, I think the story and voice acting saved this game from the fiery demise it rightfully deserved at launch. I wouldn't classify it as a timeless masterpiece but it does stick with you long after it ends. It'll be a few more years before it fades away or gets replaced by something else. You still have time. ๐Ÿ™‚

 

I'm one of those weirdos with several end-game saves on their hard drive for CP2077. If all of the Phantom Liberty quests are supposed to take place in the middle of the base game's story-line, it might be too easy going into it at level 50 with a maxed out skill tree and the best weapons in the game.

I haven't had a chance to sit down and read everything available yet but I sure hope they give the player another twenty or thirty levels to grind through.

[โ€“] [email protected] 1 points 1 year ago

It's a manual process. In theory an upgrade should be as easy as updating the image tags for Lemmy and Lemmy UI in the docker-compose.yml file, then taking everything down and praying it starts back up again.

I'm not sure how they're going to go about telling everyone they need to upgrade. Or I guess I'll wake up to an unfederated/dead instance with a massive error log at some point. ๐Ÿ˜‚

[โ€“] [email protected] 2 points 1 year ago* (last edited 1 year ago) (2 children)

Oh yeah, I've seen this too but only when I have multiple Lemmy instances open. When I posted "Death by user count" it told me I posted it to lemmy.einval.net through lemmy.ml's instance. I had to shift+ctrl+r to get it to show the correct pathway. Its definitely weird that session data is leaking around between logins. You'd think each cookie/session/socket would be totally unique.

I saw they've been working on ditching websockets in favor of a pure REST API. Hopefully this will stop when they release v18.0.

2
Death by user count? (lemmy.einval.net)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

The join-lemmy site no longer shows this instance's card because it's below the active user threshold. How are users supposed to find an instance that fits what they're looking for now?

This exists as well: https://github.com/maltfield/awesome-lemmy-instances

Doesn't this do more harm than good? I don't have time to promote and advertise. I really liked the idea that people could easily find this and join if they wanted to.

I'm not taking down the instance or anything. This serves as a "blog" if I'm the only one posting anything. I'm just a little disappointed that small or new instances aren't easily discoverable at a critical time when performance and uptime are kind of important.

People are flocking to Lemmy over the Reddit API debacle. By listing instances based on user count they're overloading and crashing the same old servers hourly (already), instead of treating instances like a federated decentralized network. I guess we'll see what happens come July...

view more: next โ€บ