Posts
4629
Following
317
Followers
482
Linux kernel hacker and maintainer etc.

OpenPGP: 3AB05486C7752FE1

@jani I’ve been doing ZMODEM that was also a thing in the 90s :-) https://github.com/jarkkojs/zmodem2

I guess this is sort of retro modern project :-)

Just want to sort out the issue of difficult file transfers when you have only a serial cable access and get a basic serial terminal with nothing special except file transfers of which progress you can see and also cancel them. It is 2023 and we still have to curse lrzsz so it is better to fix that issue…

I mean I had a decent experience with ZMODEM last time when using MS-DOS and software such as Telemate and Telex.

I have also TUI client in progress but had to halt that because could not find an appropriate crate with decent quality.

0
0
1
it is already tested with `sz` and `rz` but it would be nice to have matching tests for the examples..
0
0
0

Jarkko Sakkinen

Edited 1 year ago

generated documentation starts to look a bit like actual documentation after fixing all the clippy::pedantic errors.i was not aware of this flag until some sent a PR fixing a few of these. not that experienced with the language yet..

only thing that is left is two integration tests for examples in order call this 0.1, i.e. test_sz_to_rzm and test_rz_szm but I need a. stable and idiomatic way to point out to the executables. I guess I could make this happen by injecting stuff through build.rs, right?

after that is sorted out it is good for what i needed it originally for (my serial terminal), i’ll set up github runner for CI (tests + clippy), make the crate release and call it a day. after that not going to do proactively do anything to it except review and merge pull requests.

#zmodem2 #rustlang

1
0
1
@jani Too bad my daughter is already 18 I mean this would be perfect for kids to learn how to program :-) Nicely put set of tutorials and preservation of computing history at the same time...
0
0
1
@jani I watched this few months ago when I stumbled upon it: https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLtjBEWQ66xeLEqAUssJEDQRV1cbQR2-xk. Like not as a tutorial but more like entertainment. A culture act IMHO :-)
0
0
1
@matthiasott With decades of coding experience I don't have the skills to implement web sites from scratch :-) It requires a whole set of skills of which coding experience might not be even the most important one.
0
0
0
@josh @bugaevc why there can't be an additional pipe (i.e. not stdin/stderr/stdout) for reporting how things are?
1
0
0

Jarkko Sakkinen

Edited 1 year ago
A #Polyend #Tracker song has 8 tracks and 48 instruments at most. A pattern can have 128 steps.

Let's consider MIDI export.

Since an instrument can change per step (instrument is one of the note parameters), in the worst case scenario you would need 48 * 8 = 384 MIDI tracks to export a single 8 track pattern. This sort of gives perspective on the complexity of this instrument.

#Ableton and #Bitwig have a sort of solution for this: drum rack. So if you had a plugin that can play polyend instrument then you would need 8 instances of drum rack each with in worst case 48 instances of that plugin and choke group spanning all of the instances. I.e. in worst case you would be running 8 drum racks and 384 instances of the plugin. Pitch could be changed with generated pitch automation. More feasible than 384 MIDI tracks but still somewhat exhausting.

Did not realize how complex problem it can be to do 1:1 correct export of a tracker project until I started to actually think of it :-) As odd as it sounds it would easier to implement software clone of the tracker than to implement a DAW export of a tracker project.
0
0
3

Jarkko Sakkinen

Edited 1 year ago
@bugaevc @josh or alternatively to this scheme shm known by all processes could be used as a database to keep track of things. For me this looks like sort of problem that is pretty nasty to solve without any shared repository to get bird eye view of the process tree.
0
0
0

Jarkko Sakkinen

Edited 1 year ago
@josh @bugaevc Maybe it is not a fit for the case but one more heavy-lifting way would be to have a daemon/service that you would connect with UDS socket and processes would report the situation and that service could perhaps send fd that could be used to query/report. This is about what I was thinking but probably too far fetched I guess.

I.e. you have a piped process tree and outside service to keep track of things...
2
0
0
@josh @bugaevc I meant just that when you receive fd's you can check by sender's sgid's whether it is legit sender and make assumptions that fd's are legit for whatever you are doing. Or check LSM labels if the target is only linux.
1
0
0

@josh @bugaevc I mean with SCM_RIGHTS you can send a payload and the receiver can check uid/sgid and thus is often quite useful tool to do all sorts of handshakes within a single machine.

0
0
0

@josh @bugaevc what about using sgid as an identifier + SCM_RIGHTS? Not sure if it fits to the context, just.came to mind.

2
0
0
@bugaevc @josh thanks for educating, nice to learn details like this, appreciate it :-) i had no idea tbh. just thought that a test program could help out with the question
0
0
0

@josh

So you mean like (words can mix up stuff):

#include <sys/stat.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>

int main(int argc, char **argv)
{
	char *line = NULL;
	struct stat sb;
	size_t len;
	int fds[2];
	pid_t pid;
	ssize_t n;
	if (pipe(fds) < 0) {
		perror("pipe");
		exit(1);
	}
	pid = fork();
	if (pid < 0) {
		perror("fork");
		exit(1);
	}
	if (pid == 0) {
		dup2(fds[1],  STDOUT_FILENO);
		close(fds[0]);
		close(fds[1]);
		if (fstat(STDOUT_FILENO, &sb) < 0) {
			perror("fstat");
			exit(1);
		}
		printf("child: st_dev=%u, st_ino=%llu\n", sb.st_dev, sb.st_ino);
	} else {
		dup2(fds[0],  STDIN_FILENO);
		if (fstat(fds[1], &sb) < 0) {
			perror("fstat");
			exit(1);
		}
		printf("parent: st_dev=%u, st_ino=%llu\n", sb.st_dev, sb.st_ino);
		close(fds[0]);
		close(fds[1]);
		n = getline(&line, &len, stdin);
		if (n < 0)  {
			fprintf(stderr, "Unexpected EOF\n");
			exit(1);	
		}
		fwrite(line, n, 1, stdout);
		free(line);
		wait(&pid);
	}
	exit(0);
}

? With M1 generation MacBook Pro I get:

$ ./test
parent: st_dev=0, st_ino=9204210306621897207
child: st_dev=0, st_ino=9204210306621897207
1
0
0
Hyvä esimerkki tällaisesta lopputuotteesta on yli puoli miljoonaa riviä sisältävä SoC-suunnitteluohjelma Tampereen yliopistolta: https://github.com/kactus2/kactus2dev. Tuota voi pitää jopa edelläkävijänä joillain alueilla. Hatun nosto, että tuollaista on saatu aikaiseksi "siinä sivussa".
0
0
1

Jarkko Sakkinen

Edited 1 year ago
suomalainen #yliopisto-maailma kaipais enemmän praktiikka-työrooleja, eikä pelkkää #tutkija-urapolkua. se on mun näppituntuma tän tilapäisen spin offin aikana. jotkut tutkimusprojektit sisältää sen verran monimutkaisia ohjelmisto- ja rautalopputuotteita, että ihmiset joutuu hoitamaan tällaisia rooleja käytännössä väärällä virkanimikkeellä. se johtaa heikoilla prosesseilla toteutettuun kehitykseen, koska praktiikkaa tehdään ikäänkuin tiskin alta, koska se ei ole virallisesti tunnustettu maali samalla tavalla kuin itse julkaisut.

jos näin tehtäisiin, saataisiin parempaa laatua vähemmällä ajankulutuksella ja paineella, ja ihmiset saisivat parempaa tunnustusta käytännön sorvauksesta. vaikka työroolit aiheuttaa budjettiin lisäkustannuksia, koska silloin tekemisestäkin pitää maksaa parempaa liksaa, niin työtuntisäästöt vastaisivat varmasti useampaa kuin yhtä henkilötyövuotta per tutkimushanke. tässä ehkä katsotaan liikaa suoraa kustannusta, eikä mietitä epäsuoria kustannusvaikutuksia tarpeeksi.
1
0
1
@spubby ok thanks for sharing :-) it is sort of "how to exit vim" of helix
0
0
1

Jarkko Sakkinen

Edited 1 year ago

well, returned back safe #neovim. i did like experimenting with #helix tho and am going change my neovim configuration based on that. I’ve used vim for 25 years so pretty hard to get out of old habbits.

Some glitches that would need to be fixed before I would try it again:

  1. Doing quick changes to tabbing was too much effort compared to something like set ts=2 sw=2 et. Creating a .helix directory for upstream projects in not always even an option.
  2. I don’t like multiselect, totally useless and confusing feature to me, and the whole philosophy is based on this concept. I generally do not want the text editor to be too symbol aware to the point that it gets in the way. This is actually why I never got into Emacs. It is way too smart editor for me :-)
  3. I was not able to format (gq) email paragraphs when responding with aerc.
  4. No remote editing so not very nice to use with tmux. I usually open my files from command-line, not from the editor.
  5. Probably just user incompetence but I did not know how to exist from that stupid multi-select once I had done search replace. So I exited the whole editor after every single search-replace.

In producing code it is not very important how fast you can write the code because 95% of time goes to QA anyway and making first functional version to actually work with real workloads. So personally I think that new editors optimize a local maximum that does not help to deliver all that much as you might first think.

2
0
1

@harrysintonen For uneducated person on these attacks like me, the best protection has been to stick to text based email clients :-) Haven’t had an issue to separate a phishing email from legit when I read all my email previously with mutt and these days with aerc.

I would have no chance to survive from these or notice them if I used Outlook/Thunderbird or similar :-)

0
0
0
Show older