@graywolf@emacs.ch avatar

graywolf

@graywolf@emacs.ch

SRE at day, learning GNU Guile and Guix at night. New to Emacs, love it so far.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

graywolf, to guix
@graywolf@emacs.ch avatar

I wonder if there are any maintainers willing to take a look at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70112 . I tried asking in room few times, not much luck. There are already new versions available, and I would prefer not to rebase it (again), testing it is quite annoying due to differences between podman 4 and 5...

graywolf, to guix
@graywolf@emacs.ch avatar

I have just posted a patch updating (to 5.0.0) and in . It involves somewhat large changes to the build process, so if there are any Guix users of podman and/or buildah here, it would be cool if you could test that it works fine for you.

https://issues.guix.gnu.org/70112

graywolf, to mastodon
@graywolf@emacs.ch avatar

I think I do not like how works with blocks. Sure, if you feel you do not want to interact with me any more, you should be able to mute me. But the fact that block also stops me seeing your public message is just wrong.

Now when I check my "Posts and replies", I look like a madman talking to myself.

At least give me a button to delete the threads that no longer have any context...

(Also, it is great how eventually-consistent the whole thing is, I saw 404 or the post randomly depending on what page I went... Now seems to be gone completely.)

jimray, to random
@jimray@mastodon.social avatar

Me, an idiot: “So, kids, by setting the thermostat a little lower and eating less meat, we’re doing our part to make the world more sustainable”

VCs, very smart: “We just raised $100 billion dollars from the sovereign wealth funds of three petrostates to build the world’s largest AI supercomputer. It uses as much power and water as Guatemala and the primary use case is for management consultants to autogenerate powerpoints for justifying mass layoffs.”

graywolf,
@graywolf@emacs.ch avatar

@yogthos @jimray I wonder what the alternative to capitalism is.

graywolf,
@graywolf@emacs.ch avatar

@yogthos @jimray I am not really enthusiastic about what the current capitalism looks like, but if the alternative is communism, regime with more blood on their hands than even Hitler, I am not sure I would prefer it. Is there a third option?

civodul, to guix
@civodul@toot.aquilenet.fr avatar

quiz!

What happens when you run literally the following command:

guix download --commit=9ffefd780d7379b5eef35ca92176a98bc462c7db \
http://example.org/whatever

?

graywolf,
@graywolf@emacs.ch avatar

@civodul So I admit I had to try it, but it seems to fetch from software heritage by the commit hash, so the url can be literally anything (I tried with `http://a').

That seems somewhat cool.

However the behavior seems bit.. confusing. Iff the url is not a git repository, it fallback to SWH. Otherwise it just tries to get the commit from the repository, but no fallback is done. That part seems weird.

I have no idea how resistant is git to hash collisions (if someone controls both repositories), so I am curious whether there is a possible attack vector.

louis, (edited ) to emacs
@louis@emacs.ch avatar

Not sure what I'm doing wrong, but I'm trying to do some project-find-regexp with an expression like this: func() and it still finds everything with func. I was expecting that it only finds "func()", what did I get wrong?

graywolf, (edited )
@graywolf@emacs.ch avatar

@louis I think func() is evaluated as func' followed by empty capture group. I tried C-x p g for just func()' and it seems to do what you want.

EDIT: https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexp-Backslash.html seems relevant.

graywolf, to firefox
@graywolf@emacs.ch avatar

Right, so you want to add new search engine into . So you open about:preferences#search only to find there is no Add button. After searching around, it seems you need to set browser.urlbar.update2.engineAliasRefresh' to true' before the Add button shows up. Just... why? :-O

graywolf,
@graywolf@emacs.ch avatar

Aaaand of course there is no way to edit the added search engine. ffs...

graywolf,
@graywolf@emacs.ch avatar

@louis Ah, I did no know about that. It does not help in this case, since I need to modify the URL the engine tries to add, but I see how it could be useful. Thanks for the tip.

However from looking at the source code of the search engine page, it needs an explicit support, so I am somewhat unlikely to have that on various intranet sites. So being able to do it manually is still of some value.

louis, to meta
@louis@emacs.ch avatar

IMHO the real threat of an open and functioning Fediverse is not or , it is the fact that only 6 small instances decide (by personal opinions of their moderators) if your instance is worth to be federated with, disguised as an algorithmic blocklist called Olifant, which was originally invented to make life of instance admins easier (by protecting against CSAM and other illegal content), and is now used to suppress opinions that are just different.

graywolf,
@graywolf@emacs.ch avatar

@PCOWandre @louis That is a very good point. I wonder whether there is any reason to not required a, well, reason for adding to the blocklist.

louis, to emacs
@louis@emacs.ch avatar

TIL Emacs TRAMP will fail to work with an ssh target when you change the prompt of your default remote shell to not end with $.

graywolf,
@graywolf@emacs.ch avatar

@louis There is tramp-shell-prompt-pattern, which might be of use here. But probably easier to just change the prompt...

louis, to apple
@louis@emacs.ch avatar

desperately trying to sell me up on a new MacBook by sneaking in random bugs, like it suddenly decides over night that connecting a Dell display over USB-C no longer works.

I don't know what quarrel Apple has with but the two never got along well.

I think it's time to finally switch to the ThinkPad and get over with this.

graywolf,
@graywolf@emacs.ch avatar

@daviwil @louis I definitely preferred the square charging connector I had on my old thinkpad. Seemed so much more robust :/

abcdw, to guix
@abcdw@fosstodon.org avatar

When Guix ABI updates, I need to do make clean-go make-go, it takes 47 minutes on my machine :/

graywolf,
@graywolf@emacs.ch avatar

@abcdw I think you can do make clean-go and make -j16 make-go instead, which does speed it up a lot, but I assume you are aware of that.

graywolf, to random
@graywolf@emacs.ch avatar

Is there anything wrong with this #c code (I am compiling with 13.2.1)?

int
stravis(char **outp, const char *src, int flag)
{
char *buf;
int len, serrno;

buf = calloc(4, strlen(src) + 1);
if (buf == NULL)
return -1;
len = strvis(buf, src, flag);
serrno = errno;
*outp = realloc(buf, len + 1);
if (*outp == NULL) {
*outp = buf;
errno = serrno;
}
return (len);
}

I am getting warning:

/home/build/repo/compat_vis.c: In function ‘stravis’:
/home/build/repo/compat_vis.c:222:23: warning: pointer ‘buf_15’ may be used after ‘realloc’ [-Wuse-after-free]
222 | *outp = buf;
| ~~~~~~^~~~~
/home/build/repo/compat_vis.c:220:17: note: call to ‘realloc’ here
220 | *outp = realloc(buf, len + 1);
| ^~~~~~~~~~~~~~~~~~~~~

I do not understand why, the code looks correct... What am I missing?

graywolf,
@graywolf@emacs.ch avatar

@louis But, according to my memory (and the link):

> If there is not enough memory, the old memory block is not freed and null pointer is returned.

So if *outp is NULL, the buf was not freed, so what I do not understand is why *outp = buf is invalid. Since it is inside if (*outp == NULL) block.

graywolf,
@graywolf@emacs.ch avatar

@louis I appreciate the help, but I am afraid I do not follow :/ You listed 3 cases, but then you said to use outp in two of them. That is fine, that is what I am doing. The if is for the third case.

The realloc can fail, and, when that happens, the buf should still be valid pointer no? Since the *outp = buf is guarded by the check for the fail (realloc returned NULL), I do not understand why gcc complains...

Maybe to directly ask the question at the core of my not-understanding: If realloc fails (returns NULL), the buffer it operated on is still valid and can be used, yes?

graywolf,
@graywolf@emacs.ch avatar

@louis But the assignment is executed only if the realloc fails...

graywolf,
@graywolf@emacs.ch avatar

@louis Ah, thank you for the explanation. This is taken from OpenBSD, it is not my original code, so I will leave it as it is, but now I have the peace of mind in knowing it is correct.

louis, to emacs
@louis@emacs.ch avatar

Migrated 99% of init.el to declarative use-package - and Emacs startup time is fast again. Is there any reason not to use it to a full extent?

https://www.gnu.org/software/emacs/manual/use-package.html

graywolf,
@graywolf@emacs.ch avatar

@louis Out of curiosity, why does emacs startup time matter? I start emacs exactly once a week, so few more seconds are not that important...

Albeit

> Ensure that errors encountered during startup disable only the package(s) raising the error(s), and as little else as possible, leaving Emacs as close to fully functional as possible.

seems definitely nice. I guess this is yet another info manual going onto the pile to read. It keeps growing. :/

louis, to emacs
@louis@emacs.ch avatar

Fabrice Niessen, Developer and evangelist for Org mode and creator of the org-html-themes, is offering hands-on Emacs training in a three day course in Rotterdam, Valencia and Paris this spring.

https://emacsboost.com/en/

graywolf,
@graywolf@emacs.ch avatar

@louis Too bad there is no remote option :/

abcdw, to guix
@abcdw@fosstodon.org avatar

@krevedkokun shared a cool thread about uki-bootloader implementation for guix, which brings alternative to grub and better encrypted root support. The solution has some drawbacks, but still very nice to see this work done!

https://yhetil.org/guix-patches/cover.1705465384.git.lilah@lunabee.space/

graywolf,
@graywolf@emacs.ch avatar

@abcdw @krevedkokun

> and it's annoying to have to enter in the root password
twice

My patch was merged, so that is no longer necessary.

> The main drawback is lack of kernel generation rollback in the case
of a botched upgrade

Seems somewhat important caveat.

Nevertheless, it looks like an interesting approach. Not sure I will be brave enough to switch (soon) though.

louis, to random
@louis@emacs.ch avatar

Starting work tomorrow with external monitor removed, single Laptop screen only. Trying to increase focus time.

Did anyone have success with that approach?

graywolf,
@graywolf@emacs.ch avatar

@louis I am pretty much using single screen as well, but not a laptop one. I have only 14 inch form factor, and that is too small to work with in a "desktop" setup. So the single screen I am using is external monitor, helps with the ergonomics.

rml, to guix
@rml@functional.cafe avatar

One of the maintainers has blocked me for my vocal support for , without any confrontation or interaction between the two of us. As a long time activist in the International Solidarity Movement, I'm used to it, but I was under the impression Guix is a more open & progressive project than what is the norm for and

Seems to confirm those bad interactions I started having every time I chimed in on the mailing list over the past two years were in fact people trying to push me out, rather than just people having bad days.

graywolf,
@graywolf@emacs.ch avatar

@rml @ekaitz_zarraga Maintainers are just people too and they should not be forced to read your anti-semitic propaganda.

As far as I know (from this thread) the block was done from a personal profile, so that feels well within their rights to do so.

It would be a different matter if it would be done from offical Guix's account, but that does not seem to be the case?

louis, to webdev
@louis@emacs.ch avatar

In the last few days I’m experimenting with substituting CRUD API code with Stored Procedures which directly produce the endpoints JSON as a single-row scalar value. API is then just a wrapper that authenticates, validates input and streams the DB’s JSON directly to the client.

  • No ORMs, no SQL generators etc.
  • All SQL is where it should belong: in the database
  • API does only single „CALL myfunc(…)“ db calls
  • A simple centralised error handler can accurately report errors from the database
  • No weird mixed row/json columns scanning into structs and re-marshalling everything to JSON
  • Codebase is collapsing to 20% (by LOCs)
  • Stored Procedures can use wonderfully declarative SQL code
  • Response times in the microseconds, even for multiple queries, all happens inside the DB

More side effects:

  • the data model can change and evolve without touching the API at all
  • Zero deploys mean zero downtime
  • the API application is so tiny, I could easily switch it to any programming language I want (yes, even Common Lisp) without worrying about available databases libraries, type mapping and rewriting tens of thousands of lines of intermixed language/SQL-code.

The general direction of the dev industry is heading in the opposite direction. More ORMs, more layers, more database abstraction. More weird proprietary cloud databases with each their own limited capabilities and query language.

So you tell me: Is it crazy? Is it wrong? Why do I have doubts despite everything working out beautifully?

graywolf,
@graywolf@emacs.ch avatar

@louis We considered this approach as well, and the limiting factor seems to be tooling. How to properly version the code? How to deploy it? How to rollback? How to make sure you have the same version in all instances of your database? How to do monitoring? Logging? Testing? For all these questions, these is an answer in the form of tooling for the "traditional" container-based applications, however for deploying, reviewing, developing, ... the store procedures, there does not seem to be widely used option (assuming there even is).

There is an other approach, you could still have traditional application, and just ditch the ORM and write SQL by hand. For golang, there is also sqlc, which seems to be fairly reasonable generator (basically just making golang functions from your SQL code, ensuring type safety).

Just to be clear, I am not saying "do not do it", do what you want :) I am just putting out there what did work for us.

Also, if you want to go full crazy, there is also a PostgREST: https://postgrest.org/en/stable/ :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • kavyap
  • everett
  • khanakhh
  • cubers
  • rosin
  • thenastyranch
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • InstantRegret
  • Youngstown
  • slotface
  • megavids
  • Leos
  • osvaldo12
  • Durango
  • tester
  • ethstaker
  • GTA5RPClips
  • cisconetworking
  • tacticalgear
  • provamag3
  • anitta
  • normalnudes
  • modclub
  • lostlight
  • All magazines