PhilipTheBucket
- 14 Posts
- 26 Comments
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English1·17 hours agoDude you were the one that asked the fucking question lol
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English1·18 hours agoYou define it in exactly the same way you just did. Completely fine, you have to do it for lots of things. It’s nice that Python can do that too.
Now, I’ll grab a random snippet of code from some random file from my source dir:
existing_bookmarks = db.session.execute( text('SELECT post_reply_id FROM "post_reply_bookmark" WHERE user_id = :user_id'), {"user_id": user_id}).scalars() reply = PostReply.query.filter(PostReply.id.in_(existing_bookmarks), PostReply.deleted == False).first() if reply: data = {"comment_id": reply.id, "save": True} with pytest.raises(Exception) as ex: put_reply_save(auth, data) assert str(ex.value) == 'This comment has already been bookmarked.'
You can see some classes in use, which again is fine. But you also see inline instantiation of some reply JSON, a database returning a list of post_reply_id values without needing a special interface definition for returning multiple values, lots and lots of cognitive and computational load per line of code that’s being saved because the language features are saving people the heavy lifting of depending on user-defined classes for everything. It means you don’t have as many adventures through the code where you’re trying to modify a user-defined interface class, you don’t need as much strong typing, that kind of thing.
I would bet heavily that a lot of the things that are happening in that short little space of code, would need specific classes to get them done if the same project were getting implemented in some C+±derived language. Maybe not, I just grabbed a random segment of code instead of trying especially hard to find my perfect example to prove my point.
It is fine, there are significant weaknesses to Python too, I’m not trying to say “yay python it’s better for everything,” anything like that. I’m just saying that if you don’t get familiar with at least some language that does things more that way, and instead get solely accustomed to just user-defined classes or templates for every information exchange or functional definition, then you’ll be missing out on a good paradigm for thinking about programming. That’s all.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English1·18 hours agoComplex data structures are not “more of a C++ type of program structure”.
Oh, they are not at all. Equating complex data structures with user-defined data structures (in the form of classes and fields and whatnot), and using the latter as the primary method of storing and working with data (so that you’re constantly having to bring into your mental scope a bunch of different classes and how they need to interact), is 100% a C++ type of program structure. It’s pretty unusual in my experience in Python. Or, I mean, it’s perfectly common, but it’s not primary in the same universal way that it is in C++ and derivatives. It gets to exist as its own useful thing without being the only way. That’s what I am trying to say.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English0·21 hours agoIDK, I just have never really had this become a serious issue for me. I get what you mean, some actions are a little bit of a pain in the neck because people are often sloppy about typing, but literally the only time I can remember it being an issue at all has been when numpy is involved and so I have to figure out if something is a native Python thing or a numpy-fied custom structure.
I mean there’s just not that many types. Generally something is a list, a number, a map, or a string, and it’s pretty obvious which. Maybe there are OOP domain things where a lot of variables are objects of some kind of class (sort of more of a C++ type of program structure), and so it starts to become really critical to have strong type tools, I’m just saying I haven’t really encountered too much trouble with it. I’m not saying it’s imaginary, you may be right in your experience, I’m just saying I’ve worked on projects way bigger than a few hundred lines and never really had too much of an issue with it in practice in my experience.
PhilipTheBucket@piefed.socialOPto Politics@beehaw.org•German court declares Karl Marx's teachings unconstitutionalEnglish3·21 hours agoHm… yeah, maybe so. They linked to taz, they quoted a random member of Masch, and they cited some other cases, but yeah maybe it would have been good to have an actual legal expert weighing in on how realistic it is that this will mean anything significant.
PhilipTheBucket@piefed.socialOPto Politics@beehaw.org•German court declares Karl Marx's teachings unconstitutionalEnglish4·22 hours agoThat’s not really clear in actuality. Different people have different opinions on what might be the results, and a few of them are quoted in the article stating their takes on it. The fact that the reality isn’t clear yet isn’t exactly the article’s fault.
PhilipTheBucket@piefed.socialOPto Politics@beehaw.org•German court declares Karl Marx's teachings unconstitutionalEnglish5·22 hours agoThe headline isn’t clear. The article goes into quite a lot of detail (the situation is much more complex, and the headline is probably a pretty misleading summary) and is perfectly clear.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English61·22 hours agoPlus I felt python was too new and would skip a lot of core programming skills id just like to know. Im not super interested in doing it the new way with all the helpers, or I wont feel like I learned anything.
Okay, you definitely want to learn C then. C# and C++ both add a ton of helpers. C# has a massive runtime environment that’s opaque and a little bit weird, and C++ has a massive compile-time environment that’s opaque and very weird. It’s sort of pick your poison. If you learn C and get skilled with it, you’ll be well set up for understanding what is actually going on and having strong fundamentals that will set you up well for whatever higher-level language you want to learn in the future.
Put another way: C# will hide just as many of the fundamentals and hardcore details from you as python will, it’ll just do it in a weird and counterintuitive fashion that will make it more confusing and with more weird C#-specific details.
I’d eventually like to learn unity as well so i decided on c#
I would actually just cut out the middleman and start with the Unity editor then. It actually might be a really good introduction to the nature of programming in general without throwing a bunch of extra nonsense at you, and in a really motivating format.
I do have the .net sdk and it seems to try to compile a simple program, it just throws errors even on an example program that shouldn’t have any. Im sure its something dumb.
What’s the program and what’s the error? I’m happy to help if something jumps out at me. I’m voicing my opinion otherwise on what might be better ways to attack this all in general, but I’m sure me or people here can help sort out the issues if you really want to take this approach and you’re just getting stuck on something simple.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English29·22 hours agoC# represents about 12% of the jobs out there.
https://www.devjobsscanner.com/blog/top-8-most-demanded-programming-languages/
It’s not unpopular, but it’s definitely not “massively” popular anymore. Different languages have different strengths and weaknesses, but C# has a few more weaknesses than most. In my opinion. Yes, there’s nothing wrong with learning any particular language you want to learn (and I’m a little surprised to see C++ has fallen significantly lower than C#, sure, fair enough). I’m just struggling to see an upside for learning it in the modern day (and now knowing more about what this person’s goal is I feel even more strongly that C# is the wrong answer for them. In my opinion.)
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English3·22 hours agoYou can do strict typing in python if you want it, it’s very highly recommended if you’re doing a big project.
PhilipTheBucket@piefed.socialOPto Politics@beehaw.org•Trump’s attacks on Democratic-run US cities will not stop with WashingtonEnglish6·24 hours agoYeah. I am hopeful that he’ll run into resistance from the rank and file he is trying to depend on to get this stuff done. The California National Guard is already pissed about LA, and now he’s asking for support and cooperation from the same force that watched his supporters beat the fuck out of the Capitol Police like a medieval siege not that long ago and then him give them hearty congratulations for it.
I’m not saying it won’t work as he keeps trying (and as ICE gets staffed up and better funded), but I’m glad he’s a moron, that’s all I’m saying.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English315·1 day agoI really would not recommend specializing in C# at this point in computing history. You can do what you want obviously, but Python is much more likely to be what you want. C++ or Java might be okay if you want a job and are okay with a little bit dated / not ideal languages, or you could learn one of the proliferation of niche backend Linuxy languages, but C# has most of the drawbacks of C++ and Java without having even their relative level of popularity.
IDK what issue you’re having with VSCode, but I think installing the .NET SDK and then using
dotnet
by hand from the command line, to test the install, might be a good precursor to getting it working in VSCode. But IDK why you would endeavor to do this in the first place.
PhilipTheBucket@piefed.socialOPto Videos@lemmy.world•Linus Torvalds on why desktop Linux sucksEnglish2·1 day agoYeah. It feels like the issue is that really solving it is hard work (you can feel, with the proliferation of Linux/Windows runtimes that get downloaded behind the scenes for Steam, how much effort they’re continuously putting into releasing new runtimes that make slight adjustments for particular issues), and organizations like Ubuntu are always tempted into these kind of “we’ll just set up a simple system that means we don’t have to work on it because it’ll be solved” approaches.
Honestly I think Linus is being a little over simplistic about how easy it would be to create ABI compatibility in userland. In the kernel it’s realistic, but in userland it would be hopeless. But he’s not wrong that the current situation, however it arrived, is pretty crappy from a POV of wanting to ship something to people outside of the distro’s package management, and IMO none of the solutions that have come along since then are effective at solving the problem.
PhilipTheBucket@piefed.socialOPto Videos@lemmy.world•Linus Torvalds on why desktop Linux sucksEnglish2·1 day agoWhen did he discuss OnePackage or any other packaging project?
PhilipTheBucket@piefed.socialOPto Videos@lemmy.world•Linus Torvalds on why desktop Linux sucksEnglish4·2 days agoterrible for developers
He brought up specific things from the POV of working on subsurface where Linux made things a lot more difficult for them than every “consumer” operating system.
I worked on the packaging projects he is discussing.
Which packaging projects? I don’t even remember him talking about particular projects (aside from Debian itself), just about the general landscape of the problem and the attitudes of distro makers that have created it.
AppImage at the time was essentially the same thing as he was aiming for, but it has some security drawbacks. He hated them. He wanted to be them.
Post this talk, Flatpak came out, which is an improvement on the AppImage premise, but has layers, so uses less disk…in theory. He hated it.
I notice neither of these has made all that much of an impact. I have never in my life used either one of them or been encouraged to by anyone else, it has always been package management, or Docker, or pick your binary tarball, or
curl | sudo sh
and cross fingers.He wants the unattainable technical solution just like every other developer.
He attained two totally separate attainable technical solutions which solved massive problems in the tech ecosystem and shape the landscape of computing today (one-and-a-half, GNU deserves quite a bit of credit.) I happen to agree mostly with his judgement on this particular problem, so it’s easier for me to see it that way, but I definitely would not dismiss out-of-hand his judgement on the right way to approach significant problems.
PhilipTheBucket@piefed.socialOPto Videos@lemmy.world•Linus Torvalds on why desktop Linux sucksEnglish9·2 days agoSteam I think is probably the closest thing to “right” for the problem he was describing. You pick your app, it downloads and then it works. There’s some behind-the-scenes nonsense involved, but it is in actuality hidden from the end-user, in a way that it is not in any of the “we fixed the Linux desktop!” solutions I have seen that are in actuality just another instance of XKCD 927. I was actually really pleased that he brought up Valve since that was the example that came to mind when he was laying out the problem.
I think it is okay if Linux is bad on “the desktop,” honestly. The world needs tractors and consumer-grade cars. They both have use cases. If what you need is a tractor, and you’re comfortable with the fact that it’s not going to work like a car, then a tractor will do things that are totally impossible with a Hyundai Elantra. That doesn’t mean we need to make tractors just as user-friendly as cars are, so that people can have one vehicle that does both. It is okay for some things to have a learning curve. But I think the example of the difficulties they had with subsurface are really significant things, it’s not just a question of “oh yeah it works different,” there are things that are just worse.
I think something like Arch or NixOS is probably the closest to “right” at this point. There is still a learning curve, so maybe not for everyone, but it’s manageable and things aren’t set up in gratuitously difficult ways. Maybe Bazzite, based on what I’ve heard, but I have not tried it so IDK.
PhilipTheBucket@piefed.socialOPto Videos@lemmy.world•Linus Torvalds on why desktop Linux sucksEnglish172·2 days agoI do too, clearly as does Linus. He’s just talking about some of the issues that prevent it from getting adopted by the normies.
PhilipTheBucket@piefed.socialto Programmer Humor@programming.dev•Please spare me from having to get in touch with that shit I wrote back thenEnglish7·4 days agoI thought I had it worked out, how to sort of strike a balance so I can keep my focus intact and let it be helpful without wasting time constantly correcting its stuff or shying away from actually paying attention to the code. But I think my strategy of “let the LLM generate a bunch of vomit to get things started and then take on the correct and augmentation from a human standpoint” has let the overall designs at a high level get a lot sloppier than they used to be.
Yeah, you might be right, it might be time to just set the stuff aside except for very specialized uses.
PhilipTheBucket@piefed.socialto Programmer Humor@programming.dev•Please spare me from having to get in touch with that shit I wrote back thenEnglish4·4 days agoCertainly possible
I’m also genuinely a little bit alarmed looking back now at my pre-LLM code and seeing the quality vs. the with-LLM code.
One of the most important parts of a propaganda framework is the introduction of code-words, little phrasings that automatically call to mind a particular narrative you’re trying to construct. “People are fleeing California to move to red states” may be true, it may not be, it may be because of property values more than anything else. Doesn’t matter. By incorporating that same phrasing and framing into as many different contexts as possible, it does two things:
It’s very effective.