I'm back to coding my browser again. Making the padding colourful, not just the borders improved my tester's experience drastically. After a little other cleaning the code and output both look better :)

#doitmyself #programming

Last updated 1 year ago

I'm language-hopping again.
Now I hopped from to , earlier I have visited .

Perl isn't difficult, not with my XP.
I do have syntax problems, but once I developed an intuition for what a sigil means using the language gets smoother.

I do have the feeling I can concentrate on the task with less worrying about the types.

#ruby #perl #rust #programming #doitmyself

Last updated 1 year ago

Got it!
/usr/share/X11/xkb/rules/base.lst:887: caps:swapescape Swap Esc and Caps Lock
This needs to be added to Option "XkbOptions" in /etc/X11/xorg.conf.d

I haven't tested it yet, it might require an X reboot and I'm looking at another way, that I already found, to swap the 2 keys.

This will be fun.
It might not end at escape and caps lock... :)
That will be more fun.

Btw I used ArchWiki :)

#doitmyself #x #xorg

Last updated 2 years ago

I've just tracked down a really annoying Lua bug in my Minetest mod.
In Lua, assigning a table to a variable is assigning the reference to the table, not a copy of the table, while in C++, to which I'm used to unless I explicitly want the variable to store a pointer or reference, stuff will be copied.
Fixing the bug is easy: var = table.copy(mytable), but finding it wasn't.
table.copy is a small convenience function added by Minetest

[1/2]

#minetest #lua #doitmyself #programming #bug

Last updated 2 years ago

A few days ago I edited one of my Minetest mods over ssh... 😆
I couldn't test it, but it didn't matter.
Soon I could access the computer directly

#programming #minetest #doitmyself

Last updated 2 years ago

StackOverflow is a nice C problemset.

Solving an unanswered question would be fun even if you didn't post your answer.

#stackoverflow #c #programming #doitmyself

Last updated 2 years ago

I don't care about doing stuff the right way.
I do it in an effective way that works.
For example: I have a function that recursively copies a small tree, built on the stack with pointers to rodata, each node has a name assigned to it.
How do I make the nodes from one tree have different names to those of the nodes from the other tree?
Simple.

#programming #c #doitmyself #programmingstyle

Last updated 2 years ago

I'm starting to insert comments into my redo to remember the meanings of variables.

I know the variable names should speak for themselves, but they don't... as usual :blobcatnotlikethis: :blobcatshrug:

#httpclient #programming #doitmyself #programmingstyle

Last updated 2 years ago

I won't use any big blob of software like Chromium-based WebContent, because I want my browser to be secure, that is security must be kept in mind through the whole process of programming, not be left for extensions to manage.

[3/3]

#programming #c #doitmyself

Last updated 2 years ago

Again I had a look at a graphics library, this time only Qt. It has some good features, but since I want to implement everything (HTML, CSS; JavaScript if I want it at all) from scratch it doesn't make sense to use a high-level library that has it already implemented.

So I'm back to SimpleDirectmediaLayer.

[2/3]

#programming #c #doitmyself

Last updated 2 years ago

The HTML rendering part of my C++ HTTP client got a bit too messy, so I'm starting it again from nothing.

This time no sockets, no network, no URLs, no parsing HTML, no fighting against C++ inheritance and order of construction, just rendering protoHTML in plain, good old C.

[1/3]

#programming #c #doitmyself

Last updated 2 years ago

Since a few days ago I've been playing around with system calls in . I started in the direction of a TCP/IP6 echo, now I'm introducing ptrace.
Works fine, the part that's implemented.

#assembly #programming #doitmyself

Last updated 2 years ago

A finite while loop succeded:
var g := 5; while (g) g -= 1;
I'm steadily moving forward.
Next I'll fix my compiling which still doesn't support the 'if' conditional statement.

#programming #languageprogramming #doitmyself

Last updated 2 years ago

Now I see that it's too hard to both execute and compile at the same time, so my is still in bits and pieces, but it slowly takes some shape.
In the mean time I continue with the 'while' loop.

in

#assembly #doitmyself #languageprogramming #programming #cpp

Last updated 2 years ago

I'm now reading and parsing 1 command line argument to get the size from the user.
After playing around with time (I mean the buitin, haha), I think now, with I finally see the point of scattered/gathered I/O.
It might even be convenient.

#bash #assembly #programming #doitmyself

Last updated 2 years ago

This was just a silly error, I got confused and used a variable as both a table index and an iterator/subtable/pointer-to-subtable/pointer-to-element.

is easy. Sometimes I get blocked by an error and it's hard to find it, but once it's fixed it goes on smoothly.
Up to the next :)

Here's what I've manages so far:
Hanoi towers with a hardcoded size.

#assembly #bug #programming #doitmyself

Last updated 2 years ago

Some :rust concepts I already like, some not yet, but with the book, docs, rustc --explain and my experience it's easy to learn.

#rust #programming #doitmyself

Last updated 2 years ago

The write(2) system call returns -EFAULT (Bad address)

Why do I need to check %rax even after outputing to a terminal?

#programming #assembly #doitmyself #bug

Last updated 2 years ago

My was I loaded a 64bit register from 52(%rsp) instead of 56(%rsp).

And since I have a little endian CPU and 48(%rsp) and 56(%rsp) were both below 2^32 the value was 2^32 times too big.

How could I think that 52 is divisible by 8???
I needed it to be prinited in hex as 0x34 by to notice it's not.

#assembly #bug #gdb #programming #doitmyself

Last updated 2 years ago

I generated a SIGSEGV for my program by typing
print (long long) 40($rsp)
in

Ok, I know I expected a near that point, and my code contains
mov 40(%rsp), %rax
but the SIGSEGV should be raised a few instructions after this movq, when dereferencing a derivative of this 40(%rsp) and at both points (this gdb print and the normal SIGSEGV point) the stack pointer looks ok.

#assembly #gdb #SegmentationFault #programming #doitmyself #bug

Last updated 2 years ago