« first day (2324 days earlier)      last day (1385 days later) » 

02:04
@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
 
6 hours later…
08:08
Morning \o/
08:32
Morn
09:24
How is your Arch install @EnnMichael?
btw
 
2 hours later…
11:01
When I call a macro in a macro, do I have a guarantee that the expansion point is the one of the outer call (for this)?
@Jason It's great!
I'm really enjoying it
I still need to set up a script to do the install automatically
Like @PeterVaro has
@EnnMichael For the entire operating system?
That's great news.
Or rather, to install all the tools/utilities that I want to have
@Jason Well, yeah, the stuff that can be automated
I'll consult myself with Peter about his script, I'm very curious :)
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..
11:25
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 I don't know, but I wonder why they opted for that one and not github.com/microsoft/terminal. I use it on Windows and it's great so far.
@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?
@DenysSéguret SOYBOY
@DenysSéguret JS
@DenysSéguret DEVS
If you could do the opposite of starring a project, I'd do that
SoyBoyGang
@PeterVaro BTW this is a mystery, because it's not even true
For example, the electron-based Insomnia app does not work on my linux box
(Due to graphical glitches)
11:44
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.
@PeterVaro Oh, this is very relatable
(The above is loosely connected to glitches and Electron)
I relate so hard to this
And in fact, software might be getting worse over time
That is my own experience as well.
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
11:50
@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.
2
@PeterVaro I mean, to me that depends on what one is writing.
There's plenty of software that can help people in farming for example.
@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.
My problem is deeper than this.
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
It does need computerization due to the scale (feeding billions)
Yeah
11:56
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.
@Jason Yeah, and that's a terrible thing
As soon as you increase quantity to that scale, you lose quality. PERIOD.
We eat shit
I share all of @PeterVaro's opinions here and it's kind of unsettling to read them because I've been thinking about the exact same
Also, for those who haven't heard of him, Mark Pilgrim is a person who was huge
He wrote one of the best introductory books on Python and programming in general, and one of the best books I ever read on programming tbh
I don't know if he uses a computer anymore, but he's off the face of the internet
He was disappointed by similar things
12:14
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.
The biggest issue with this issue is that I don't believe we could do anything about this at the individual level.
We will have nothing left to do with our hands
Other than giving up as Mark Pilgrim in your example and do nothing whatsoever with this world.
@PeterVaro Move out of the fucking city
The world is a bunch of people
They all make individual decisions
Well, the ones who use their brain, anyway
And fuck the world, anyway
I'm concerned about myself being in this position. If some poor bastard wants to subject himself to what this world is becoming, why should I care
12:18
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.
And 1M is a hell of a lot of people.
And those 1M would live a much more fulfilled and happy life
They wouldn't be dying in a fucking capitalistic grind
Sure, but they didn't solve the problem of humanity for the rest. They solved their individual problems. Which is what I said above.
Inhaling toxins and eating shit
Well, OK, you and I seem to have different concerns, because humanity is not a concern of mine
Humanity is some collective thing and it's very easy to manipulate, so it's doomed to fail anyway
Probably I should let that target go as well.
Individuals think and make decisions
Humanity seems to generally follow agendas
So, "humanity" can go to hell
12:34
What's going on.
@E_net4wantsmoreflags The world is crumbling!
@E_net4wantsmoreflags We have thoughts akin to Rousseau.
Now we have established that not only would John Lennon have liked Rust but Rousseau would have hated Electron. We're making progress.
4
@DenysSéguret Ok, I had to laugh out loud at this.
12:45
@DenysSéguret That made me laugh really hard as well!
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 mean. There's a future to build, not just a past to mourn.
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.
13:18
This thing should be more popular: github.com/marcusbuffett/pipe-rename
14:08
Unfortunately, this is the data structure Elasticsearch provides, so there's no way to choose something else. :) But thank you! — Evaldas Buinauskas 8 hours ago
funny how ELK always come back telling me it's bad
 
1 hour later…
15:16
@DenysSéguret It does look like a nice tool.
I find it very convenient. When you know your code editor, it's so easy to just change lines of text
 
3 hours later…
18:16
@DenysSéguret Wow!
 
2 hours later…
20:17
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
like, read the lines in a vec while iterating, skip the unwanted one, then reopen the file in replace mode and write the collected lines in it?
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
ah yes, that seems saner than reading everything in memory. thanks for the advice :)
In some cases there's another solution: truncate the file with set_len, then append the part you want to keep at the tail
If the line to remove is near the end it might be more efficient
Or overwrite from the cut by copy-pasting content, then remove the length of the removed line
(but only if perfs matter. If that's not the case rewriting line per line is only a few obvious lines)
20:29
well, performance matters indeed, as in, I want this to perform in a way that after having happened, the file contains a line less.
apart from that specific performance criterion, as long as it runs ;)
@DenysSéguret I think that's more or less what I was trying to do at first
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'll report in if I find any measurable differences :)
No measurable difference would be an interesting result too
21:28
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
I don't understand this
How do you all benchmark your Rust code?
@EnnMichael This is referring to that UUID you had on your struct?
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?
Hum, I'm somewhat confused by the offered solution.
if (shipment1 == shipment2)
{
    // The shipments match
}
21:36
It's supposed to be a field-by-field comparison, I believe
Again, that doesn't fix the problem — what if it's OK to have multiple shipments with the same info? They're not necessarily the same shipment though
Shipments are a bit of a cheat example
Because I can identify a bunch of "natural keys" there
What about more abstract entities? In my case, file conversions
All data related to a file conversion is "is it done?" and such
There's no apparent natural key, therefore a field-by-field comparison conversion1 == conversion2 would rarely make any sense
Maybe I'm wrong though
Maybe I should just try avoiding ID's in domain logic and see what happens
But I'm not sure that that is worth it
It's always a tradeoff, and what are the chances I stop using ID's? Next to 0
I dunno
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.
@EnnMichael In the comment section there's an image (God forbid people that use assistive technologies want to read it) that clarifies:
> A: If we remove ID then what is the criterion for equality?
> B: It's not that you should remove the ID from the entity itself, it's that you shouldn't refer to it from the outside of that entity.
@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.
Also, how does this work with the repository pattern? It literally doesn't (?)
22:04
I'm not doing it. Not worth lol
 
1 hour later…
23:18
Dang, that crate @trentcl
Is there a reason the fields are all public, but have underscores that I'm missing? docs.rs/rabe/0.2.6/src/rabe/schemes/bdabe/mod.rs.html#44-50
Perhaps there's a reason for doing so that I'm unaware of, but my first thought was that it almost looks like generated code.

« first day (2324 days earlier)      last day (1385 days later) »