[-] dr_robotBones@reddthat.com 1 points 6 days ago

Thank you, that worked! I just set export PERLDOC_PAGER=less in my .bashrc.

1

When I try to run perldoc, for example perldoc perldoc or perldoc perldsc I get the error read error (press RETURN) and after pressing return, /tmp/L8_Qhmc9u8 (END).

I don't understand why this is happening, perldoc worked last time I used it. The error is not the least bit descriptive. The file it shows me, /tmp/L8_Qhmc9u8, is empty.

Looking up "perldoc read error" on the internet gives me nothing.

6
submitted 1 month ago* (last edited 1 month ago) by dr_robotBones@reddthat.com to c/vim@lemmy.sdf.org

When I searched for this I saw an answer on Reddit which did not work.

I created the ~/.config/clangd/config.yaml file and using clangd's documentation I found out I needed to put:

Completion:
    HeaderInsertion: Never

Back in Vim, #include statements are still being thrown in willy-nilly. This is incredibly annoying because its inserting C++ libraries when I am using C, and its throwing around unnecessary duplicate includes when I already have a header with all the common includes used throughout the project.

Does anyone use clangd as an LSP in Vim? How do I configure it properly? Where am I supposed to put the config?

Edit: I think my clangd is outdated, as its version 11. I got it through vim-lsp. If I install a newer version into my $PATH will it work with Vim?

Edit2: I solved my own problem. For anyone in the future who is having this issue, the configuration to prevent header insertion is available in clangd-21 or newer. You can simply install the newer clangd using your package manager, on Fedora its dnf install clang-tools-extra. The vim-lsp plugin will automatically use it if its in your system path, which your package manager will handle for you.

1

The computer originally had Windows 98 installed on it, but when booting it would give a blue screen of death. I've tried a number of things to try and get this laptop working again:

  1. I tried reinstalling Windows 98 since I have the original official disk, after the install and reboot the system displayed the error: "Invalid system disk Replace the disk, and then press any key" I don't know what it means by "system disk"

  2. I tried installing Devuan daedalus, the last 32 bit version of the operating system. It failed.

  3. I tried installing a really old Linux, Fedora 3. The installer ran successfully enough that the hard drive partitions and names appear on other Linux environments, but the system shows the error "Operating System not found"

  4. I booted up TinyCore linux, which successfully runs as a live environment from RAM. It was the one that detected the previous partitions created by the Fedora installer. It also cannot install onto the hard drive (some USB error? I'm using DVD so idk what that's about). I ran fsck successfully once, it told me the hard drive is dos paritioned. So fdisk -l detects Linux partitions, fsck detects dos, what is going on?

  5. I tried SystemRescueCD, which crashed with a kernel panic.

Is anyone familiar with the ins and outs of an IBM Thinkpad T20? Does anyone know what the "Invalid system disk" error is about, it does not show up in any user manuals I found online. Does anyone know how to get any operating system working on one of these, or a way I can atleast definitively diagnose the issue?

7
submitted 1 month ago* (last edited 1 month ago) by dr_robotBones@reddthat.com to c/csharp@programming.dev

I'm following along with the book, Crafting Interpreters, but I'm implementing jlox in C# instead, as I thought it would help me understand the code better if I had to do some amount of porting. I am running into language specific issues though, particularly, I believe, with how C# handles null.

After implementing the resolver from chapter 11, my interpreter can no longer handle for loops (and probably while loops too, though I didn't test this).

The resolver does not seem to properly store the location of the variable declaration in the for loop in its dictionary. This leads to it passing the wrong 'distance' to the interpreter.

Here's an example:

for (var i = 0; i < 10; i = i + 1) {
    print i;
}

My interpreter will crash with this code that should be valid, because when it encounters print i it won't be able to find the declaration for i. The next chapter of the book is about classes, so this error is not supposed to be here.

I apologize for the complexity of the code and the low amount of comments, my plan was to complete this part of the book and then reread it and go over and comment all my code so I can understand it better. I've attached a link to the GitHub issue on this post, it has a simple explanation and the stack-trace .NET throws when it encounters a for loop.

Please let me know if you need more information.

I won't be surprised if it turns out to be a very simple mistake, but I will facepalm.

8
submitted 2 months ago* (last edited 2 months ago) by dr_robotBones@reddthat.com to c/csharp@programming.dev

I can't figure out what is going on in my program, I'm having a hard time wrapping my mind around what steps its taking to get to the wrong result.

I have this function which should make my parser ignore C-style comments, ie /* */. When I type /* * */ or any number of * in the comment my program is detecting the * characters inside the comment itself, and when it detects a * it also detects the last /:

	// Handle C-style comments
	private void HandleComment() {
		// Consume until closing characters, multi-line comments are supported
		while (Peek() != '*' && PeekAhead() != '/' && !IsAtEnd()) {
			if (Peek() == '\n') line++;
			Advance();
		}

		Advance();
		Advance();
	}

I figured I would need to Advance() twice in order to consume both the characters that denote the end of the comment.

Peek(), PeekAhead(), Advance() and IsAtEnd() are functions from the book, Crafting Interpreters, here they are:

	// Peek at the next char
	private char Peek() {
		if (IsAtEnd()) return '\0';
		return source[current];
	}

	// Peek after next char
	private char PeekAhead() {
		if (current + 1 >= source.Length) return '\0';
		return source[current+1];
	}

	private char Advance() {
		return source[current++];
	}

	private bool IsAtEnd() {
		return current >= source.Length;
	}

The source variable is just a string that contains the text contents of a file or the input from Console.ReadLine().

I based the comment logic on the string logic here:

	// Handle string lexemes
	private void HandleString() {
		// Consume until closing quote, multi-line strings are supported
		while (Peek() != '"' && !IsAtEnd()) {
			if (Peek() == '\n') line++;
			Advance();
		}

		// Handle unterminated strings
		if (IsAtEnd()) {
			DotLox.Error(line, "Unterminated string.");
			return;
		}

		// Consume
		Advance();

		// Tokenize string and store value without quotes
		string value = source[(start+1)..(current-1)];
		AddToken(TokenType.STRING, value);
	}

I almost forgot to share this crucial bit of logic here:

	private void ScanToken() {
		char c = Advance();

		// Match characters to tokens
		switch(c) {

			// Division and comments
			case '/':
				if (Match('/')) {
					// Consume comment but don't turn it into a token
					while (Peek() != '\n' && !IsAtEnd()) Advance();
				} else if (Match('*')) {
					// Handle C-style comments
					HandleComment();
				} else {
					// Turn lone slash into a token
					AddToken(TokenType.SLASH);
				}
				break;
                }
       }
10

I found few resources online which may have lead me astray, as I can't get even basic functionality out of LLDB.

I used the dotnet-sos tool to supposedly automatically load SOS into LLDB and I attached LLDB to my program's process, but I am getting errors when trying to use any command:

error: 'bpmd' is not a valid command.
error: 'clrstack' is not a valid command.

Its behaving as if SOS isn't installed, I think? I really don't know what is going on, searching for these errors gives me nothing which is insane, usually there would be GitHub issues or Stack Overflow posts. I think I'm about to never touch C# ever again.

16
submitted 2 months ago* (last edited 2 months ago) by dr_robotBones@reddthat.com to c/programming@programming.dev

Though I primarily use vim, I got VSCodium so I could use it as a debugger since its much easier to set up. I am having alot of trouble getting any use out of it though, when I run the program the IDE gives me errors if I type in the debug console, and closes the terminal if I type in the integrated terminal. I've changed the config to allow integrated terminal, but nothing has changed.

Can anyone help me figure this out, or recommend an alternative tool for debugging a C# program?

Edit: I finally found my answer: https://discuss.cachyos.org/t/debugging-c-console-apps-on-linux-with-vs-codium-readline-input-not-working/16493

Unfortunately there is no FOSS way to debug a C# application in VSCodium. Might have to see what this lldb tool is.

[-] dr_robotBones@reddthat.com 21 points 2 months ago

Chinese animation and videogames have been taking off more and more, so if what you're saying is true I'd expect it to change in time.

[-] dr_robotBones@reddthat.com 42 points 2 months ago

LLM usage has been shown to have a negative impact on cognition and in my experience it can really destroy a dev's confidence and coding ability. If he's being forced to use LLMs at work by idiots with business degrees then that could be effecting his work on rsync, amplified by the burn out.

[-] dr_robotBones@reddthat.com 27 points 3 months ago

That's what happens when you leave operating the industrial death machines to the professionals. Its insane how much our society relies on regular people operating 2 ton death machines. Regular people.

[-] dr_robotBones@reddthat.com 14 points 3 months ago

What does AMOC stand for? Is it that atlantic air current?

[-] dr_robotBones@reddthat.com 48 points 5 months ago

🤣 😂 😭

I'm going back to curl

[-] dr_robotBones@reddthat.com 14 points 5 months ago
156
submitted 6 months ago* (last edited 6 months ago) by dr_robotBones@reddthat.com to c/retrocomputing@lemmy.sdf.org

Does anyone know how I can cross-compile software for a 1999 iMac G3 with a PowerPC processor? Are there resources on how to develop for this CPU and is there any community around it?

1

cross-posted from: https://reddthat.com/post/57765446

Is it even possible? It seems every third-party tool that did it is abandoning the feature and I can't get the deprecated but still present feature to work in Detekt or ktlint. I didn't realise the biggest challenge with Kotlin would be detecting unused import statements so I can easily remove them.

10
submitted 7 months ago* (last edited 7 months ago) by dr_robotBones@reddthat.com to c/programming@programming.dev

Is it even possible? It seems every third-party tool that did it is abandoning the feature and I can't get the deprecated but still present feature to work in Detekt or ktlint. I didn't realise the biggest challenge with Kotlin would be detecting unused import statements so I can easily remove them.

Edit: Thanks for the help everyone, but I could not get anything working so I eventually just did it manually with a little help from the android linter.

[-] dr_robotBones@reddthat.com 19 points 10 months ago

The useful skill of being born rich so you could go to an Ivy League School.

30
submitted 1 year ago* (last edited 1 year ago) by dr_robotBones@reddthat.com to c/selfhosted@lemmy.world

I'm trying to self host my portfolio on an old laptop running Ubuntu server. I've successfully set up docker and nginx. I got a DNS subdomain from freedns.afraid.org.

The IP connected to the DNS matches my server's public IP address.

I can connect with https://mypublicip/ from outside the network, but it shows as an insecure connection and the https has lines going through it in the browser.

Any attempts to connect to the website via DNS have failed, and trying to connect via IP on port 80 fails as well. I really have no clue what is going on, let me know if you need more information, or if this is the wrong place to ask for help with this sort of thing.

Edit: Whatever problem I had before, it seems its been fixed. However my subdomain is being blocked by ISPs. Thank you for the help everyone, I'll probably have to do cloudflare tunneling instead of fully self-hosting it.

5
submitted 1 year ago* (last edited 1 year ago) by dr_robotBones@reddthat.com to c/paradoxgames@lemmy.world

Whats the deal with this non-standard file type? Has Paradox ever talked about why they created it? Does anyone know when they made this change to the file system?

Edit: I've been trying to save my edited gamestate by figuring out how to recompress it into a .ck3 file. I don't really know how to replicate the header. Its really a shame I didn't back up the original save. The file starts with SAV and then a unique set of metadata bytes and then the plaintext stuff which, it turns out, is for the main menu and the icon next to the save name, and then it has the rest of the save data compressed with the PK header, which means its in the .zip format. I can replicate all this but the save doesn't properly load due to the incorrect metadata in the header I believe.

[-] dr_robotBones@reddthat.com 63 points 1 year ago

The problem is the law of popularity. My friends wont move to an open-source decentralized alternative unless their friends do and their friends wont unless their friends do and...

[-] dr_robotBones@reddthat.com 15 points 1 year ago

True, he should learn to speak anishinabe like a real american

[-] dr_robotBones@reddthat.com 34 points 1 year ago

Thats great! KDE is a cool desktop environment, I love how customisable it is.

view more: next ›

dr_robotBones

0 post score
0 comment score
joined 1 year ago