I stopped everything and started writing C again
311–320 of 475 posts
Re: I stopped everything and started writing C again
#312Earlier quoted context omitted.
This is objectively nonsense
Interesting use of the word 'objectively' there.
Re: I stopped everything and started writing C again
#313Earlier quoted context omitted.
He's not making a comment about everyone , it's a specific comment about how often long time C programmers make basic mistakes after a million SLOC or so. In this instance Walter is correct - the mistakes he listed are very rarely made by experienced C programmers, just as ballet dancers rarely trip over their own feet walking down a pavement. The problem of those errors being commonplace in those that are barely fiv…
> just as ballet dancers rarely trip over their own feet walking down a pavement What about about walking down a busy construction site? The most charitable and correct interpretation I can think of is "I'm a professional. Seatbelts and OSHA destroy my productivity."
Coordinated people with some years of experience pay attention to the ground and overhead cranes and conveyor belts and survive walking through construction sites, mine sites, aviation hangers, cattle yards, musters, et al on a routine basis. I'm 60+ and have somehow navigated all those environs - including C for critical system control.
These are dangerous environments. No one denies this. It's still true that the longer you inhabit such spaces the safer your innate learned behaviour is.
C has seatbelts and OSHA - valgrind, et al tools abound for sanity checking.
Walter's GP statement is literally little more than "eventually you grow out of making the simple basic maistakes" - eventually, after some years of practice - which is a real problem with C, it takes time to not make the basic mistakes. After all that, there's always room, in C, in Rust, whatever, to make non basic non obvious mistakes.
Re: I stopped everything and started writing C again
#314Earlier quoted context omitted.
If you're using VS Code then you can add `"rust-analyzer.check.command": "clippy"` to your `settings.json`. I assume there's a similar setting for rust-analyzer in other editors.
You might want to reconsider use of rust-analyzer, it isn't safe to use on code you haven't written yourself. https://rust-analyzer.github.io/book/security.html
Neither is cargo (nor npm, nor any other package manager, for that matter).
I'm not sure what value being that paranoid is buying you in the long run.
Re: I stopped everything and started writing C again
#315So nobody would use code written in common lisp... but they will use code written in an entirely new language.... right...
I love Common Lisp, but I would definitely think twice before implementing anything I want other people to use on their machines in it. A tiny C executable is pretty nimble in comparison to anything you'll get out of Common Lisp.
Re: I stopped everything and started writing C again
#316Here's what kc3 code looks like (taken from [1]): def route = fn (request) { if (request.method == GET || request.method == HEAD) do locale = "en" slash = if Str.ends_with?(request.url, "/") do "" else "/" end path_html = "./pages#{request.url}#{slash}index.#{locale}.html" if File.exists?(path_html) do show_html(path_html, request.url) else path_md = "./pages#{request.url}#{slash}index.#{locale}.md" if File.exists?(p…
Re: I stopped everything and started writing C again
#317Earlier quoted context omitted.
You can certainly do entirely absurd things in Perl. But it is a lot easier / safer work with. You get / can get a wealth of information when you the wrong thing in Perl. With C segmentation fault is not always easy to pinpoint. However the tooling for C, with sone if the IDEs out there you can set breakpoints/ walk through the code in a debugger, spot more errors during compile time. There is a debugger included wit…
Eh Segfaults are like the easiest error to debug, they almost always tell you exactly where the problem is.
Re: I stopped everything and started writing C again
#318What is your killer app? What CL has to do with no one running it? What problem you had with garbage collectors? Why is C is the only option? Are you sure all those RCEs because of VMs and containers and not because it all written in C? "There are no security implications of running KC3 code" - are you sure?
Re: I stopped everything and started writing C again
#319Earlier quoted context omitted.
> C takes me more time to feel productive. I have to write code, then unit test, then property tests, then run valgrind, check ubsan is on. Make more tests. Do property testing, then fuzz testing. So … make && make check ?
"How to install and use "make" in Windows?" https://stackoverflow.com/questions/32127524/how-to-install-...
Re: I stopped everything and started writing C again
#320Earlier quoted context omitted.
The single best feature (and I would say the _core_ feature separating it from C) that C++ has to offer is RAII and zig does not have that. So I don’t know which good parts of C++ they kept. Zig is more of its own thing, and they take from wherever they like, not just C++.
Zig has defer, which is arguably way simpler. Is there something RAII can do that defer can't? Not everyone likes RAII by itself. Allocating and deallocating things one at a time is not always efficient. That is not the only way to use RAII but it's the most prevalent way.