@LeviMorrison My first thought (after ruling out "just use a crate") would be to call timer_create from Rust with an extern "C" function pointer as the notify_function. I don't see any reason why it shouldn't work
Mine is broken at the moment, but what I created was a meta-package-manager, on top of pacman and yay. I have an Arch installation at work, at home, at my bench, on a few SBCs, so I wanted to have a single configuration where I can declare which packages to install for the different setups and how to configure the different environments (dotfiles, other configs, automations, services, etc.)
I just couldn't have the time to fix it and update it, and for the last year, there was no need for it. But I plan to, because it is useful and very much a time and energy saver.
The only part I haven't figured out yet (i.e. haven't designed it) is how to keep the list of packages in-sync with pacman and the meta-packager I created. Because it is one thing that you can install stuff, but it is another to maintain that, when packages renamed, when you swap a package with another, etc.
That's where my current scripts are broken: I failed to maintain it manually. And TBF, it shouldn't be a manual process to begin with..
Following a report by a Windows user of broot that it was slow, I discovered this user was using broot on a terminal application based on... Electron... and more than 1000 times slower than a normal terminal. How comes an electron based terminal can be so popular ?
@DenysSéguret Why do people use Electron-based shit in the first place? That's the real question.
All of them, Atom, VSCode, other apps, etc. are memory hogs.
I understand that the developers can cut down on their development times by "writing code once run it everywhere" but is that a good enough excuse to waste energy and time of their users?
If I could be honest for a single second between fellow engineers, quite recently I started thinking about giving up on technology as a whole, and do farming or anything that does not involve computers. Every. Single. Flipping. Software is broken AF. All the time. Nothing works and as far as I can tell, nothing ever will. The industry feels more and more like the financial sector: it is for itself and its purpose is to maintain itself -- not much more.
I'm insanely disillusioned after more spending more than a decade in this industry.
This gives me anxiety. I feel like our industry is in a bubble. Colleges keep pumping out graduates who are all going to be "software" "engineers" and I look around: there is nothing really left to do (all software has essentially already been built and nearly all problems are solved by now), and software is getting worse and worse and more bloated and useless
"Tech" "startups" keep a cash flow because rich old people haven't caught on yet, but this can't last forever
@EnnMichael I have good news for you. There's a new language which makes it possible to make efficient and high quality programs again. I'd suggest you have a look at it.
@EnnMichael I don't agree with all of that. I would say 90% of what engineers do today on a daily basis have been implemented by others, probably in a better way, but we're not sharing and thus building the same things again and again. That's why the industry needs more devs, that's why schools pumping out them in this rate.
Most software is specific to a narrow domain, or to some people or organization. Most developpers don't spend their days making new software for everybody
I believe it fundamental: I lost my naivete about software in general. I believe it is fundamentally broken and it doesn't matter what we do, we can't fix it. We're bad at writing software, yet we do it. We're bad at designing software, yet we do it.
And most of the tech startups' produce is about fixing another, currently more successful startup's failure.
(This is on the note on how tech startups behave)
L'art pour l'art.
@Jason That's not the real question. The real question is: is there really a need to computerise an industry that does not need computerisation to begin with?
Sure, you could say, on vast scale of industrial farming, it is unavoidable
but then I would ask, why do we need industrial farming (as in, why are we requiring such scale over requiring self-sufficient communities)?
Same goes for other industrial activities. Most of the products we manufacture are garbage: overengineered, deliberately with a short-life-span, garbage. Right out of the box. Garbage.
And then you could say, yeah, but you need to give billions products, so you need to cut on every cent and make it as fast as you can, so we do industrial production.
The question is then the same as before: do we really need that?
We move people into overpopulated mega cities
most of them work in deadend jobs, in the "service" industry
Instead of living on the country side and do farming, or metal working, or pottery, or whatever.
Aaanyway. It feels like I'm just disillusioned about the entire post-industrial-revolution world.
(But OTOH I'm very proud of the NASA landing last night.. which would've been impossible without any kind of computers and software on them..)
@PeterVaro Hum, there's no space for this in the Netherlands. It's in the top three, if not first, of countries that have taken agricultural industrialization to an extreme.
Don't get me wrong, the wrold / situation is not black and white (as nothing ever is). It is one the most complex issues humanity faced for the last one, one and half centuries.
I don't hate technology. I hate the abuse. We've abused it beyond all reason, and we're headed in a direction that nobody needs. If people used their heads, I think they'd realize all this. That they don't need huge cities. That they don't need fake meat. That they don't need huge industrialization.
That sounds good on paper, but realistically, say in London, 100k, no, 200k, no, 1M people would move out of the city. What would happen then? Nothing. There's still 13M left in the city.
Let's not waste this petal of attention. Rousseau was not just negativity but established some important foundations for a better world. en.wikipedia.org/wiki/The_Social_Contract
@DenysSéguret Indeed, remarkable man, he was. I merely brought him up to demonstrate, that this is after all an age old problem, predates any computer or even the industrial revolution.
In some ways, (in a very dark and sarcastic way), it is funny that we keep running in (the same) circles again and again.
I don't get this, sorry. I thought we were moaning about the present not the past, and by mentioning the past we just established we're crying about the same things again as we did two centuries ago.
Unfortunately, this is the data structure Elasticsearch provides, so there's no way to choose something else. :) But thank you! — Evaldas Buinauskas8 hours ago
funny how ELK always come back telling me it's bad
I want to delete a line from a file from an index number. I have no idea how to do this, but am thinking that I could 1. iterate 2. if index = i 3. skip line but keep position in file 4. write the rest of the file from the position 5. delete the remainder of the file
that feels like it could work, but it also feels like I can mess it up big time.
You'll have to write all the file's content after the index. So unless the index is probably near the end you should probably just use the usual solution of rewriting the whole
I was more thinking about reading line per line, filtering, and write in another file the lines you keep, then replace the original file with the new one
I'm too lazy to code and compare the various solutions (and I have a few hundreds issues to solve in my FOSS projects, too). But I'll be interested in the result
I recently read some blog post where a guy was saying that you should never have ID fields on your business logic types, even if you do store them in the DB
It was written by a person who looks like a buddhist
@Jason Yes, haha
Because otherwise, how do I differentiate them?
If you have something that you can use as a natural key, then you can avoid having ID's on your business logic objects, but it still sounds like a terrible idea because then what if your business rules change and you no longer need that field? What do you know use as an index in your database? :/ Very confusing
> Ids are essentially persistence logic implementation details; they have no relation to your domain. (from the blog post)
I think this is where he is wrong
Sometimes that's true... but other times, it's not
ID is literally what it says: the identity of an object. And in my domain logic, they're very important and useful, because they tell me that two objects are the same (or not the same). Or in other words, they have the same or different identity
> I must point out an important note, though. All stated above refers to domain entities only. You can - and should - use Ids in infrastructure and application services, because Ids are natural for objects identification. (from the blog post)
Also sort of confusing
Because 1) Don't use ID's in your domain => interfaces exposed by the domain cannot mention ID's 2) Use ID's in infrastructure => but now the usefulness is kind of limited because they are not on any of the domain logic interfaces... right?
bah. the original idea is sound; knowing that Bob is user 5887509e-8353-4701-bba0-0b157203307a brings no value to the domain. However, there are two concerns crammed into the comparison metaphor (which makes it less sound to me) : entity identity and entity equivalence.
@FélixGagnon-Grenier When we want to add an item to Bob's order, we absolutely need to add it to the right entity. When we want to know if two orders are the same maybe we really want to compare the actual items.
So yeah, I see how it's useful to not overemphasize the ID here and there and everywhere, but the cumbersome example of equivalence in the article applies but partly, and brings the attention on avoiding IDs instead of bringing it on knowing when we want an identifying information vs equivalence of entities.