orsetto

joined 2 years ago
[–] [email protected] 13 points 2 weeks ago (8 children)

I understand what argument could be made against musl, which is licensed under MIT, but what's wrong with GPLv2?

I remember Torvald saying something about not wanting to change the kernel's license to GPLv3, but I've never understood the differences

1
Help with sed commands (lemmy.dbzer0.com)
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]
 

Hi all! I have always only used sed with s///, becouse I've never been able to figure out how to properly make use of its full capabilities. Right now, I'm trying to filter the output of df -h --output=avail,source to only get the available space from /dev/dm-2 (let's ignore that I just realized df accepts a device as parameter, which clearly solves my problem).

This is the command I'm using, which works:

df -h --output=avail,source \
    | grep /dev/dm-2 \
    | sed -E 's/^[[:blank:]]*([0-9]+(G|M|K)).*$/\1/

However, it makes use of grep, and I'd like to get rid of it. So I've tried with a combiantion of t, T, //d and some other stuff, but onestly the output I get makes no sense to me, and I can't figure out what I should do instead.

In short, my question is: given the following output

$ df -h --output=avail,source 
Avail Filesystem
  87G /dev/dm-2
 1.6G tmpfs
  61K efivarfs
  10M dev
...

How do I only get 87G using only sed as a filter?

EDIT:

Nevermind, I've figured it out...

$ df -h --output=avail,source \
    | sed -E 's/^[[:blank:]]*([0-9]+(G|M|K))[[:blank:]]+(\/dev\/dm-2).*$/\1/; t; /.*/d'
85G
[–] [email protected] 17 points 3 months ago

If they keep raising my food subscription I'm gonna start pirating from supermarkets too

[–] [email protected] 13 points 4 months ago

well, you suffer from social anxiety, than yes, it's normal

[–] [email protected] 19 points 5 months ago (3 children)

I think their point is that, even if blink is a good technology and all, it's just another way for google to assure its monopoly, and that's not a good thing.

 

If you have typed an <ESC> by mistake, you can get rid of it with a C-g.

quoting the emacs tutorial. made me giggle

[–] [email protected] 134 points 1 year ago (3 children)

I'd like to add this one:

Uhhuh. NMI received for unknown reason 31 on CPU 3.
Dazed and confused, but trying to continue

I get this one like once a week and it always makes me laugh. One day I'll investigate

[–] [email protected] 8 points 1 year ago (2 children)

The anguish of being stuck in the present

[–] [email protected] 1 points 1 year ago

Getting used to it is going to be a hell of a ride, but this is a wonderful thing.

Also using other pc is going to be even harder lol

[–] [email protected] 3 points 1 year ago (2 children)

Same. Forward slash always annoys me. It's in the middle of the keyboard, so you have to either 1. make a very uncomfortable move with your right hand, or 2. make an uncomfortable move with your right hand, or 3. use both your hands, which sucks.

Luckily I'm using linux, so I have tilde and backtick (`) as AltGr+' and AltGr+ì, which are pretty easy to type.

[–] [email protected] 0 points 1 year ago

i think i'll submit a report with the exact info of the other environment, when i'll get back at it. for now i'll keep going.

as another comment is saying, if it's not useful they'll just ignore it.

[–] [email protected] 1 points 1 year ago

yeah i'll probably do this, as soon as i get back to the other environment. thank you :)

 

Hi. I'm working on a project that compiles Rust code to WASM, and uses WASI in Node.js to execute it. After some development, I encountered a segmentation fault happening in the wasi.start() function. Considering that I'm kinda new to Node I was only able to understand that it was happening after the call to the exported WASM method returned.

This happened almost two months ago, and while I thought about reporting this to the node devs (WASI's also experimental), I was going to move soon and a lot has gone on.

Yesterday I tried to reproduce the bug on my laptop (that is not my usual development environment, which I don't have access to right now) but I wasn't able to.

I had to start fresh and install all the necessary tools from zero, so my theory is that there was something wrong in the previous environment. I'm also on Gentoo now, while I was running Arch previously.

Unfortunately I don't have the means to check on other environments. I tried to reproduce the old environment, installing the same versions of node and rust, with no luck. I also tested this with the latest versions and everything works fine.

This situation is upsetting. I don't know what's changed that caused the problem to "disappear", so i feel uncomfortable considering this solved. What would be the best approach in this situation?

EDIT: I also just tested it on Debian live, and I still wasn't able to reproduce the segfault

[–] [email protected] 3 points 1 year ago

Guess i'll have to read his memoirs

 
[–] [email protected] 33 points 1 year ago (3 children)

Why do you say it's from the police?

 

cross-posted from: https://lemmy.dbzer0.com/post/5629178

This happened yesterday, when prime minister Giorgia Meloni went to Turin to present the new policies regarding schools and universities.

This morning a strong procession of university students3 and medi3 crossed the streets of the center of Turin to show their dissent towards the policies carried out by the current government, present today in the city on the occasion of the Festival delle Regioni in the figure of Giorgia Meloni. We took to the streets with the anger of those who, for more than a year now, see their dignity, well-being and rights continually trampled upon. We took to the streets with the awareness that, during this year, the current government has done nothing but rage on our condition, belittling our struggles and treating them as the lament of a spoiled and listless youth. That same youth that today was in the streets, together and united, to contest all this in its most representative figure, the president of the council Giorgia Meloni.

The deaths due to merit in universities, healthy daughters of a system that only legitimizes the sacrifice of oneself and one's sociality as the only way to succeed, were not enough. And not even the demonstrations and demonstrations during which we dared to dream of more accessible and less expensive cities, for a truly universal right to study. Our blood and our voices have been greeted only with mockery and mockery (if not directly with repression) by the authoritarian bureaucracy that governs us, able only to defend itself from criticism by accusing of anti-democracy and fascism by wiping tears with one hand, while with the other it aims to resort more and more to buffer and unsustainable solutions to structural problems. And what happens when, like today, you try to put all this on the plate? The response was one and only one from the Turin Police Headquarters (which is nothing more than a symptom of clear national political choices): violence and repression. A scenario that should make every democratic society shudder, but which is becoming an increasingly alarming practice.

The violence of the Police is narrated as necessary, as positive, in the name of a phantom security that hides behind it authoritarianism, racism, colonialism, segregation, silencing of dissent; The same principles that move our government. There is no shortage of journalistic narratives that speak of "accidents" and "some truncheons" in describing the work of the Police: yet that blood in the middle of the street is ours, not theirs. But it will not be the truncheons to stop our will to change everything, to dream of a different world. Meloni, we will repeat it again if necessary: in Turin you are not welcome. No room for fascism, neither in our cities nor in our lives.>>>

Translated with DuckDuckGo

 

This happened yesterday, when prime minister Giorgia Meloni went to Turin to present the new policies regarding schools and universities.

This morning a strong procession of university students3 and medi3 crossed the streets of the center of Turin to show their dissent towards the policies carried out by the current government, present today in the city on the occasion of the Festival delle Regioni in the figure of Giorgia Meloni. We took to the streets with the anger of those who, for more than a year now, see their dignity, well-being and rights continually trampled upon. We took to the streets with the awareness that, during this year, the current government has done nothing but rage on our condition, belittling our struggles and treating them as the lament of a spoiled and listless youth. That same youth that today was in the streets, together and united, to contest all this in its most representative figure, the president of the council Giorgia Meloni.

The deaths due to merit in universities, healthy daughters of a system that only legitimizes the sacrifice of oneself and one's sociality as the only way to succeed, were not enough. And not even the demonstrations and demonstrations during which we dared to dream of more accessible and less expensive cities, for a truly universal right to study. Our blood and our voices have been greeted only with mockery and mockery (if not directly with repression) by the authoritarian bureaucracy that governs us, able only to defend itself from criticism by accusing of anti-democracy and fascism by wiping tears with one hand, while with the other it aims to resort more and more to buffer and unsustainable solutions to structural problems. And what happens when, like today, you try to put all this on the plate? The response was one and only one from the Turin Police Headquarters (which is nothing more than a symptom of clear national political choices): violence and repression. A scenario that should make every democratic society shudder, but which is becoming an increasingly alarming practice.

The violence of the Police is narrated as necessary, as positive, in the name of a phantom security that hides behind it authoritarianism, racism, colonialism, segregation, silencing of dissent; The same principles that move our government. There is no shortage of journalistic narratives that speak of "accidents" and "some truncheons" in describing the work of the Police: yet that blood in the middle of the street is ours, not theirs. But it will not be the truncheons to stop our will to change everything, to dream of a different world. Meloni, we will repeat it again if necessary: in Turin you are not welcome. No room for fascism, neither in our cities nor in our lives.>>>

Translated with DuckDuckGo

view more: next ›