Originally posted by Weasel
View Post
Announcement
Collapse
No announcement yet.
GNOME 3 Might Be Too Resource Hungry To Ever Run Nicely On The Raspberry Pi
Collapse
X
-
The old desktops you mentioned before are faster than contemponary ones, since they do less - like Gtk1 is faster than Gtk2. The former lacks unicode support entirely.
C is nice, but it lacks abstraction and expressability. It's pure luck, if your recursive functions get tail call optimized. And don't get me started about the nightmare called preprocessor. Sane programming languages have macro support that operate on the language's AST. Not a tool that does text substitution resulting in code, that possibly never gets syntax checked.
I,however, share your concerns about garbage collection. Although it's good enough in most cases, if the garbage collector is well optimized. Funny side note: GC is usually faster than using C++'s shared pointers.
Luckily, there are alternatives to C, which don't have the beforesaid problems. While I used to code C and do C++ programming at work, I wouldn't start anything new using those two languages.
- 1 like
Leave a comment:
-
Originally posted by cybertraveler View PostI know that if a language doesn't have proper pointers, you lose some flexibility, but I think it's worth noting that many languages retain some of the power of pointers even though they don't expose real memory-pointers to the programmer. For example, in Python 2 & 3 all function arguments are sort-of, pass by reference. When you pass in an argument to a function or method, Python doesn't make a copy of that argument. Instead it passes in a reference (sort-of like passing a pointer to a function in C). So in Python you gain performance as a full copy does not have to be performed taking cpu and memory. This is in contrast to PHP (and even C infact) where it's pass by value.
My comment above isn't meant to be an argument for or against pointers and it's not meant to suggest that pass-by-reference languages like Python can be equivalent to languages with pointers. I'm just pointing out that some of the expressiveness and performance benefits that can be gained by use of pointers can also be exposed in other ways in other languages; often safer too.
I too like C pointers
Unfortunately, while I like C++ personally (heresy!), it's quite convoluted in this aspect; all the move semantics complications and the syntax (especially the && when used in templates) can make most people's head spin and I can't blame them. C keeps it simple (though I wish it had the constexpr capabilities of C++, just not the template complexity)Last edited by Weasel; 05 June 2018, 06:16 PM.
Leave a comment:
-
Originally posted by ermo View PostPersonally, I had to switch away from GNOME because simply idling at my 3x1080p desktop would put a non-trivial amount of load on my system and make it feel jerky
Fanboys apart, IMO many people just don't like Gnome's workflow (neither did I when I first tried it but I can't do without it now), and the fact that its interface seems too simple in comparison (again, now KDE feels way too cluttered to me and I don't miss any particular feature or setting).
- 1 like
Leave a comment:
-
Originally posted by Weasel View Post...
Can I also say that, my preference is to code with pointers (literally), a language without pointers has HUGE problems because I just can't get my head around it. Yes, it's the language's fault due to my pointer preference, and no I'm not trolling. To me, people who don't understand pointers or how easy it is to see how they work, should find a different goal in life. Coding is not for them.
...
My comment above isn't meant to be an argument for or against pointers and it's not meant to suggest that pass-by-reference languages like Python can be equivalent to languages with pointers. I'm just pointing out that some of the expressiveness and performance benefits that can be gained by use of pointers can also be exposed in other ways in other languages; often safer too.
I too like C pointers
- 1 like
Leave a comment:
-
Originally posted by cynical View PostI'm saying that if you could have the performance of C and a quality end product without having to deal with memory management, it would be preferable not to do memory management.
It's not because C is magic but these kind of things need to be programmed. Of course, an AI or toolkit could code it in the future perfectly optimally, but then it would still be C. Just because you don't code it doesn't mean it's not there and the language is still used, proving its superiority, even if not by humans (talking of hypothetical future where AI codes stuff).
Originally posted by cynical View PostThat's great, you have a workaround. Now imagine if that flaw was not there in the first place and you didn't have to think about any of this whatsoever. That you could just use the normal features of the language without having to code defensively. That's what I'm talking about when I say that C is flawed. You haven't actually solved the problem, because the problem is in the language.
Just because YOU or whoever else bashes it don't want to deal with X and Y doesn't mean the language has a problem. It has a problem when it can't be used for a specific task (cannot, not won't!), OR if it produces something slower/more bloated compared to another language (less efficient etc) or any other measurable objective factor.
Saying stuff like "it's not convenient for me to write in it, therefore the language has a problem" is absolutely ridiculous. Maybe it's your (or whoever) problem using it, or you need to learn to use it/code properly or whatever.
Might as well say stuff like "I don't like assignments being x = y, I'd prefer something like x <- y, therefore the language has a problem, definitely not me!!"
No point to answer the last part since you still go on the assumption that your preferences are "many of the problems in C". But, you realize I was talking about the application, right? I mean, the application's flaws can be fixed.
There is NO application vulnerability or code in existence, written in C, which cannot be solved. If it did, then yes, the language would have a problem. But as it stands, it's fully the application code's fault, which CAN get fixed, with CURRENT capabilities of C. On the other hand, some things are just straight out impossible to do in other languages which still rely on magic wrappers or libraries (that are implemented in C, usually, the irony is obvious). Especially languages without pointers are just horribly limited.
And as I said, if vulnerabilities keep getting fixed, and people would contribute to pure C code projects more, we'd get incremental security, instead of "writing from scratch" tons of alternative apps due to ease of language (but also bloat), which will replicate a lot of work that went into squashing bugs.
Can I also say that, my preference is to code with pointers (literally), a language without pointers has HUGE problems because I just can't get my head around it. Yes, it's the language's fault due to my pointer preference, and no I'm not trolling. To me, people who don't understand pointers or how easy it is to see how they work, should find a different goal in life. Coding is not for them.
I'm just using your logic here: my preferences makes other languages inherently bad right?Last edited by Weasel; 05 June 2018, 08:40 AM.
Leave a comment:
-
Originally posted by Weasel View PostBut it is objectively desirable for him if he cares about the end product.
Originally posted by Weasel View PostSo make a macro without it (well, some compilers have extensions for wide-strings though, like the L macro). You will have to handle it like an array or whatever it is, manually, with macro giving you the field (such as length).
Originally posted by Weasel View PostYes, it might have flaws, but those flaws *can* get fixed. They *will* get fixed, so it will be progressively *better* with time.
On the other hand, there is no fix for the bloated runtimes or slowness caused by "modern languages". NO FIX EVER. Forever sucking.
I actually like C, but I also really like the dynamic nature of LISPy languages. Not everything needs to be directly in touch with the hardware. I assume you like it because it gives you maximum control and efficiency, and believe that mastery over these things is a sign of skill right? I value flexibility and speed of development more. It's not an either/or thing, just a matter of taste. It all matters in the end.
Leave a comment:
-
Originally posted by cynical View PostDo you enjoy complexity for the sake of it? Time spent on memory management is time taken away from solving problems, and it introduces the potential for mistakes on the part of the programmer. All things being equal, it is objectively not desirable for a programmer to have to do it.
Originally posted by cynical View PostNothing to do with the language. Everyone has a choice on whether they want to load their page with a million scripts/external resources or not.
Originally posted by cynical View PostHow does a macro, struct, or byte-prefix replace a null terminating character for strings?
With C++ it's much easier to make a generic class that can even convert -- at COMPILE time (meaning the output is identical and not bloated) -- a string such as "blah" to anything you want. Literally. C is lacking in compile time capabilities, however, but it can be done (just a bit more manually, without using constant string literals). (i.e. use constexpr class, constexpr constructor, or even the literal operator"" in C++)
Leave a comment:
-
Originally posted by Weasel View PostWho's "we" again? I get it, 90% of "programmers" out there just treat it as a normal job, they don't think about code outside of their working hours.
Originally posted by Weasel View PostC is for real programmers.
Originally posted by Weasel View PostJavascript "makes sense" there, although it should be something even MORE lightweight and simple, since JS is already causing so many security issues in browsers.
See this: http://idlewords.com/talks/website_obesity.htm
Explains it well enough. It is amusing to see how much shit people tolerate these days when we should expect MUCH MUCH better from our hardware. If devs were forced to (i.e. C was the only available language or so), we'd have a much better world.
Originally posted by Weasel View PostYou can always use your own macros (yes, macro abuse is legit in C, since it doesn't have constexpr metaprogramming like C++). Nobody forces you to use null terminated strings. Make a struct, use byte-prefixed strings or whatever, unlike other languages where flexibility is thrown out the window for "programmer convenience". Ergo, C as a language is superior since you can do both X and Y.
Leave a comment:
-
Originally posted by cynical View PostIf you think avoiding errors is so important, it's surprising to me that you would be in favor of having an additional vector for mistakes rather than taking the decision out of error-prone human hands. Not having to do manual memory management is a feature. We only tolerate it for the lower level languages because we have to.
C is for real programmers. They code because they care about the end result. Analogous to artistic integrity if you will. And these aren't only my words, obviously the guy who initially wrote the kernel shares these beliefs. You know, people who like to write code and be proud of the result, not just to get it done asap "as long as it works".
Yes, it might have flaws, but those flaws *can* get fixed. They *will* get fixed, so it will be progressively *better* with time.
On the other hand, there is no fix for the bloated runtimes or slowness caused by "modern languages". NO FIX EVER. Forever sucking.
Originally posted by cynical View PostIf we had to do everything in C, we wouldn't be using this board right now because web technology would be in the stone age. Clearly, there is such a thing as tradeoffs, and a reason why languages like JavaScript exist.
Of course, using C as a language in a browser is suicide, because you're not supposed to run such a powerful language in a browser. Javascript "makes sense" there, although it should be something even MORE lightweight and simple, since JS is already causing so many security issues in browsers.
See this: http://idlewords.com/talks/website_obesity.htm
Explains it well enough. It is amusing to see how much shit people tolerate these days when we should expect MUCH MUCH better from our hardware. If devs were forced to (i.e. C was the only available language or so), we'd have a much better world.
Originally posted by cynical View PostPlease educate me. As far as I know, C has to have null terminated strings because of what a string is in C (an array of chars) and the fact that it decays to a pointer. How can you know where the array ends without some kind of symbol telling you, since C doesn't handle those checks itself?
Originally posted by cynical View PostIn many cases, the result is not having a product at all.
If implementing X project from scratch would be 10x more difficult, people would band together and contribute more to existing projects, ensuring more quality. There will be security vulnerabilities but they will get eventually fixed. Constantly improving instead of "writing from scratch" means you don't throw out all the progress done.
_______
Don't you find it absolutely ridiculous that we get "modern" APIs like Vulkan which are akin to C in the graphics programming world, which crash at the slightest programming error (segfault or even worse, lockup the entire GPU), when we have "bloated" hand-holding APIs before such as OpenGL, which would be akin to idk maybe Python or whatever? We call this "progress" in the graphics world because we need to start squeezing out performance.
But yet, on the other hand, CPUs have been pretty much stagnant for the past decade, with only minor performance improvements. And it's CPUs where we want even WORSE performance from software for "convenience"? To me this is completely absurd, full stop.
Leave a comment:
Leave a comment: