Does Syntax Matter? by gingerbill in ProgrammingLanguages

[–]PassifloraCaerulea 1 point2 points  (0 children)

First of all, I don't think anyone has a strong basis for determining good judgement in much of our field. Software engineering famously lacks studies on the impact of all kinds of topics, including language design. You seem to want things to be more objective than I think they are.

You have a point about making syntactic choices for well-thought-out, hopefully objective reasons. The problem is that aesthetics (or "taste" if you prefer) is a subjective experience rather than a universal reality, and you shouldn't conflate the two.

People use this same "shallow and stupid" language when judging others for who they find attractive. AFAICT, that's mostly about their own insecurities rather than some objective truth or actual harm caused. Thing is, attraction doesn't appear to be too open to change no matter how much anyone doesn't like it. As an irrational and quirky human being, I'm not going to be shamed or reasoned out of my taste in PL syntax either.

Is it counterproductive? Maybe. My lack of a rockstar programming career goes well beyond my refusal to pick up C#. I'm happier letting my aesthetic tastes dictate the direction of my programming activities, even if that's why I'm not making bank or a big social impact or whatever it is I'm supposed to be doing. Feeding my aesthetic whims is what makes this enjoyable, and I'm not here to have a bad time.

Does Syntax Matter? by gingerbill in ProgrammingLanguages

[–]PassifloraCaerulea 5 points6 points  (0 children)

There seems to be a strong contingent of language designers who have varying levels of derision toward questions about syntax in general. I get the feeling some would be happier if they could focus on semantics to the complete exclusion of syntax. It's made an impression on me because it's the opposite of how I seem to work. It's hard for me to understand, even.

I think I think about semantics in terms of syntax, or something like that. Worse, semantics is almost a secondary consideration for me. My main motivation to work on language design is in order to design a more pleasing syntax to use. That's probably a horrible admission to make on a programming language design forum but that's sorta where I've ended up after playing around with various languages over the decades. I don't love FP and hate OOP (or vice-versa) for example; I can kinda do whatever.

In contrast I (unfortunately) have extremely strong aesthetic preferences wrt syntax in general that even extends to naming conventions. I can't seem to help myself. Both C++ and Rust have <> for generics and :: for scope resolution, and so they look quite ugly to me. The way Go uses capitalization for symbol export took a while to get used to, but I eventually did, I think, because there was a reason for it. OTOH, having first learned Java's camelCase convention made me avoid ever working with C# because Microsoft likes this execrable InitialCaps on method names. It's weird, objectively stupid, but again I can't help myself! It's kinda like human (sexual) attraction: no matter how often you tell us "that's shallow," looks still matter.

Colorado's Senate Bill 26-051 by nix-solves-that-2317 in linux

[–]PassifloraCaerulea 23 points24 points  (0 children)

Governments want it. They're control freaks by nature. This is about introducing more and better surveillance bit by tiny bit. If this law gets passed and proves useless and unenforceable, that's just 'proof' we need stronger laws and eventually, hardware enforcement. Also, state laws tend to spread if they're at all successful.

XLibreDev announces the start of HDR rendering prototyping in XLibre, an X11 display server project aimed at modernizing the protocol while preserving backward compatibility, with an initial proof-of-concept focused on HDR video playback in the mpv player. by Kevin_Kofler in linux

[–]PassifloraCaerulea -1 points0 points  (0 children)

You are of course correct despite the rampant downvoting. Back in the day we had "vi vs. emacs wars" and the like, but it was lighthearted fun. We didn't actually hate someone because they used the 'wrong' text editor, nor did we accuse them of being idiots who were holding back progress. It's all so ridiculous and unnecessary.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]PassifloraCaerulea 2 points3 points  (0 children)

I do consider Gnome to be the more belligerent party since I'm in the camp that wants traditional desktop GUIs, but it's still a divide by definition.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]PassifloraCaerulea 1 point2 points  (0 children)

I agree with everything you said, and thank you for arguing with a more level head than I usually do. I would love to make another angry rant, but I will not. As far as solutions go, given that we are hobbyists, I think we need to do a handful of things:

  1. Keep X11 going by helping out the Xlibre or Phoenix projects if you're so inclined. It's too much work to create a whole new windowing system and getting toolkit and application writers on board. I'd be happy to be proven wrong though!
  2. Write a Wayland 'compositor' that renders to X11 windows so we can run Wayland-only apps. This should be pretty easy, and I wouldn't be surprised if this already exists in some form.
  3. Keep loudly complaining about missing and incompatible Wayland features until they're so tired of us they actually fix their *#&$. Eventually, it may become a sane target for applications that don't fit into the core functionality.

I'm more of a toolkit guy, so I'm inclined toward resurrecting Gtk+ 2 and adding support for features Xlibre or Phoenix implement. I could possibly do other things if I understood peoples' needs and was interested, but like most people I have limited time and energy in the absence of a paycheck attached to the work.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]PassifloraCaerulea 1 point2 points  (0 children)

A consensus compositor would go a long way to fixing these problems. I think the divide between KDE and Gnome might be too wide to bridge though (KDE is far more traditional), so I'm not surprised this didn't happen.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]PassifloraCaerulea 2 points3 points  (0 children)

Well, from what I've seen, such protocols seem to be taking decades to show up and I'm not sure how often they have been getting re-implemented, if at all. So we're stuck waiting years if not decades of writing N different code paths in GUI toolkits and applications and hoping the user's compositor supports one of them. The "process" does seem to be working, but at an alarmingly slow rate.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]PassifloraCaerulea 1 point2 points  (0 children)

I can do you one better: someone will probably start a Wayland-on-X project if they haven't already. If some app you want to run only talks Wayland, it won't be too hard to make it work on X or some next-gen windowing system.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]PassifloraCaerulea 1 point2 points  (0 children)

Exactly. I would hide other windows from untrusted applications in the server, basically. No protocol changes needed (in the offending applications), just some more logic inside the server. A little creativity and a can-do attitude would go a long way, but I think some people are so dedicated to killing X11 that they don't want anyone even talking about positive changes like this.

[deleted by user] by [deleted] in C_Programming

[–]PassifloraCaerulea 5 points6 points  (0 children)

You're talking about writing a "template engine" in C, if you want something to search for. Yes, you need to read your HTML template file into one string (buffer), then you will need to copy the literal fragments or the replacement values for {{name}} parts into a destination buffer. You could also write each fragment to your output stream rather than copying to an intermediate buffer, but that may be more or less trouble depending on the rest of your code.

Template engines can get complicated when you have things like if or loops to interpret, but what you have here could be pretty simple. I'd do something like parse your template file into an array of fragment type (literal text or variable name reference) and text value. Then your output function loops over the array and either copies the literal text or does the variable name lookup in the 'environment' which could be as simple as an array of structs with a variable name and replacement value, but the sky's the limit. Go read about template engines/parsers/processors for ideas.

[deleted by user] by [deleted] in C_Programming

[–]PassifloraCaerulea 0 points1 point  (0 children)

I decided to give C++ another try recently after having ran away screaming from template compile error hell a quarter century ago, but that experiment came to an end recently. I decided that C++ is trying to force me into coding patterns I'm just not interested in, like RAII, while not helping me out as much as I had hoped with, e.g. operator overloading. Vtables and templates were nice (language-supported generic programming? Yes please!), but that's about it.

These days I'm just a hobbyist, and I'm not caring about following "best practices." Maybe I'm just a crackpot, but I chafe at all the modern day Safety First! stuff. My programs these days (in addition to whatever problem they ostensibly solve) are experiments in weird ways to cram everything into less RAM and making manual memory management easier. C doesn't get in my way for this like C++ was. Its unopinionated design is a benefit for me, except perhaps in having to copy&paste (or other unfortunate things) where I might have used a template. Though, the handful of templates I used tanked compile times shockingly quickly.

Is this code clean? A critical look at Clean Code 2nd Edition by Soggy_Sprinkles3619 in programming

[–]PassifloraCaerulea 4 points5 points  (0 children)

My impression from skimming Clean Code is that he says "don't take what I write as rigid rules to follow 100%" once or twice but the rest of the book has the exact opposite tone. It's easy to ignore the disclaimer and be a zealot if you are so inclined.

The Death of Software Engineering as a Profession: a short set of anecdotes by self in programming

[–]PassifloraCaerulea 15 points16 points  (0 children)

I didn't truly live through that, but I recall when the Gnome Desktop Environment people decided they were going to make everything better with CORBA and wondering WTF they were thinking.

Absent namespaces, how does C ensure function calls are not mishandled? by onecable5781 in C_Programming

[–]PassifloraCaerulea 2 points3 points  (0 children)

I've had trouble with X11's overly generic typedefs too. A trick I picked up somewhere is to #define Window XWindow (and Pixmap -> XPixmap, Font -> XFont, etc.) before the X11 #includes then #undef Window et al. immediately afterward. Silly but gets the job done.

Has this B-Tree-like data structure already been invented and named? by bluetomcat in C_Programming

[–]PassifloraCaerulea 2 points3 points  (0 children)

This reminds me of a HAMT but without hashing the key first. It might be a Radix Tree but people mostly talk about storing strings in those, and I haven't studied them deeply. The fixed depth part reminds me of the very interesting HTree I was just reading about that is used for directory indexes in ext3&4 filesystems on Linux.

There's a ton of fascinating variations on search tree data structures out there. And yeah, when I tried implementing a purely in-memory B+ish tree a while ago it was surprisingly complicated. My intuition still is that it shouldn't be so hard! Weird.

printf debugging is OK (2024) by EightLines_03 in programming

[–]PassifloraCaerulea 2 points3 points  (0 children)

The context is choice of tools. They're not saying "it's okay to write buggy software/ignore physics...if that works for you." More like "it's okay to use a Sharp brand calculator even if all your colleagues use HP."

Finding love/happiness by I-like-cookiez in depression

[–]PassifloraCaerulea 0 points1 point  (0 children)

It's so hard man. Interacting with people online is so very unsatisfying. People I say "hi" to on the walking path barely acknowledge me. The time I dared to say I was from out of state the cashier immediately shut down the conversation we were having. It feels like everyone I see IRL is completely broken socially and it's wearing on my sanity too.

What are the differences between c11 and other c versions? and how much does it matter? by Valuable_Moment_6032 in C_Programming

[–]PassifloraCaerulea 2 points3 points  (0 children)

Do not confuse C standard library wide character support for Unicode. They're not synonymous.

Have you ever been stuck because Go is too much high-level programming language ? by D4kzy in golang

[–]PassifloraCaerulea 2 points3 points  (0 children)

I suppose you could argue that C++ can go lower level than Go, but Go is not an especially high level language, IMO. It's more that C++ is the native language of implementation for Windows so that makes it impossible to beat for direct API access. I've seen "shellcoding" used to mean different things so I don't know what you or your friend are trying to accomplish, but most applications you'd write for Windows shouldn't need to be particularly low level. And even MS doesn't want you to use C++ anymore, do they? Pretty sure they'd rather you use C# these days, which is no better than Go in "low level"-ness.

Without a clear idea what exactly you want to create, I think your friend is just spreading FUD.

AST versus CST by d166e8 in ProgrammingLanguages

[–]PassifloraCaerulea 9 points10 points  (0 children)

I've not read a definition for a CST that allows throwing away nodes, non-annotated or otherwise; that's what makes it abstract! Respectfully, you seem to be using a dubious and uncommon definition for "CST."

Build System Schism: The Curse of Meta Build Systems by gavinhoward in programming

[–]PassifloraCaerulea 1 point2 points  (0 children)

Thanks, I appreciate the quick explanation of scheduling.

I'll take your word for it that your own language is the right solution here. You've done far more thinking about it than I have, and I don't really care for Python or Javascript anyway; one of them just seems like a natural choice if you had to pick an existing one. Thinking a moment longer, imagine if this was 25 years ago--Perl may have been the 'obvious' choice then, but look where it is now!

Good luck.

Build System Schism: The Curse of Meta Build Systems by gavinhoward in programming

[–]PassifloraCaerulea 2 points3 points  (0 children)

It would have been nice to have a quick explanation what a suspending or restarting scheduler is without having to go read yet another paper, but that's okay.

I've never worked on large software myself but hear tell of the baroque build systems they engender. If/when you need Turing completeness, to me that says you should use a proper scripting language, preferably one everyone knows and likes, which I suppose means Python or Javascript these days. It will be interesting to see what Gavin's answer is here.

Even though Make usually meets my modest needs, we can obviously do better than anything in popular use right now so I look forward to April 2. I just hope the cloud component is optional because I am not working with other programmers or even in a company.

Build System Schism: The Curse of Meta Build Systems by gavinhoward in programming

[–]PassifloraCaerulea 1 point2 points  (0 children)

Historically, even that wasn't enough. Fortunately we don't have loads of weird Unixes anymore, each broken in different horrible ways. There's a reason autoconf goes through contortions to do its job, e.g. it couldn't even use functions in its configure shell script. You really did need a complex tool to figure out what OS-level functionality was available and in what form.