Comment on
i++
Isn't the evaluated value different from the expression? i++ returns the value of i before increasing. i-=-1 would return the value after it has been increased. Wouldn't it be more correct to make it equal to ++i
Comment on
i++
Isn't the evaluated value different from the expression? i++ returns the value of i before increasing. i-=-1 would return the value after it has been increased. Wouldn't it be more correct to make it equal to ++i
Comment on
i++
Reply in thread
Well, not all languages allow for fun programming :)
Comment on
i++
Reply in thread
If you're hell bend on achieving the goodness of i++ equivalent you could wrap it up like this:
(i-=-1,i-1)
We're talking C here of course.
Comment on
dd will never reach the end
Reply in thread
In some parallell universe this happened at the first try...
Comment on
AI and Coding.
It is a conversational tool that can generate decent code if properly prompted but it lacks for the most part enough context. For it to be really useful it has to be able to be trained on my entire project that I'm working with, not just a single file or function.
What I miss is the ability to "chat with my project". I.e. have the whole project in the trained context, and then reason about architectural changes, pros and cons, have suggestions for refactoring, help with complex renaming schemes and moving code, etc.
It would be super interesting to be able to give instructions like:
Things like that.
Comment on
i++
Reply in thread
It works the same because the value of the last expression in the for loop is not used for anything. It's the side effect of that statement that counts. Eg, the value of i is checked the next time the for loop is executed by the condition check. Try replacing i in the condition check instead with i++ or ++i and you would see different results.
Something like: for (int i = 0; ++i < 10;) { ... }
Comment on
What are your must-have packages?
To add to all great comments here I have one that I’ve used for ages and not seen mentioned here: lftp
It supports many protocols for ftp like over ssh and allows for shaky connections with resume and back in the days when this was more common I used to just run it in the background to download huge files that took days to download and it would gracefully just reconnect/resume/retry until done.
Comment on
Updated: Reddit is quietly restoring deleted AND overwritten posts and comments
Reply in thread
I think they're creating enough trouble for themselves anyway just by constantly shooting themselves in the head. Also moving on is probably the least good thing for them. Losing users gradually will bleed them to death.
Comment on
i++
Reply in thread
In C you can group expressions within ( and ) separated with ,. Expressions are evaluated in order and the last expression in the group is the returned value of the group.
Comment on
ELI5: Would it be possible for a "fediverse" app to exist?
As ActivityPub is just an underlying protocol, the question is similar to asking something like "Is it possible to make an Internet app for everything?".
There will be new ways to use the #fediverse in the future and new applications will be developed and adopted and it makes little sense in trying to provide every possible way to view the fediverse in an ever playing catch-up implementation of a view into it.
Try to look at it as the Internet itself.
It's an attempt at providing a finite and limited answer to an open ended question. Doesn't make a lot of sense.
Comment on
How to say “y’all sound crazy” in a professional setting
Just smile and nod slowly..
Comment on
Interview with an Emacs Enthusiast in 2023 [Colorized]
OMG! Some great quotes in there: "The real disease is VIM" and "I spend more time customising my computer than actual using it" and of course "I treat my whole life as a text buffer"! (EDIT: Fixed spelling)
Comment on
[Noob] Is it worth getting a LTS kernel?
Don't worry too much about it if it doesn't make sense to you. It can be really valuable if you're deploying a substantial amount of IoT devices on the edge with no to little possibility to do over the air upgrades reliably or when the cost of failure is high (i.e. a technician has to be on site to fix it). So, sometimes you just want it to be running as stable as possible for as long as possible without management.
Comment on
What was your first experience using Linux? How old were you? Stick around or did you go back to windows before eventually circling back to Linux?
I think it was about 1995. I was going to the university and was looking for something Unix compatible I could use at my home computer to perform assignments instead of needing to go into school computer lab. Remote work basically. Think I was using LessTif instead of Motif for some coding task.
Ahh. Those were the days. Used modem to connect to school and connect remotely to the network using Linux. :)
Comment on
Code that lives forever
Reply in thread
Yes, yes, and someone else's problem will be your problem after the job hop! :)
Comment on
When introducing members to kbin/lemmy don't mention the fediverse!
First rule of fediverse: Don’t talk about the fediverse.
Comment on
What is the thing that has surprised you the most about the Fediverse?
Reply in thread
I’ve been thinking a bit about this lately since the Reddit migration started. I believe it could be solved at the client level at least. Unifying magazines over instances and behind the scenes pull in and follows twin magazines at other instances and presents them in a single abstract magazine.
There are probably reasons why you at the server level or user level want the low level community access and behavior we have today but judging of all comments and how we typically behave as humans I would say that is rather the unusual case not the mainstream.
Such users could easily then opt in at the instance level and everyone else looking for a more “centralized” experience can still have that through the client app.
No doubt it would take some work but I believe it is very doable given my understanding of the Activity Pub protocol and how it works today.
Comment on
kbin.social is getting the hug of death right now, consider signing up for another instance
Reply in thread
The instance name is part of your handle. Think of it like an email address. With a domain part.
Comment on
ELI5: Would it be possible for a "fediverse" app to exist?
Reply in thread
Comment on
Daily traffic visits to the top two #Kbin and #Lemmy servers over the last 28 days, up until June 11th.
Reply in thread
Signup and there is also an intangible more positive feeling here at kbin.