pixelscript

joined 1 year ago
[–] pixelscript@lemmy.ml 1 points 6 months ago

it’d be poor style to put more than one statement on a line

Unlike Python, most languages do not endorse a specific concept of style. You're free to dabble in all the bad style choices you like, on the off chance that once in a blue moon they prove to be situationally useful.

[–] pixelscript@lemmy.ml 1 points 6 months ago

The only difference between a novice and a professional is that a professional checks what they are copying to understand it first before allowing it into their codebase.

Novices copy code to avoid having to understand it. Professionals copy code to avoid reinventing the wheel.

[–] pixelscript@lemmy.ml 1 points 6 months ago

I replied to that thread.

OP was claiming to be working on a static HTML-serving search engine. They suggested that because it's just HTML and CSS, and that interested parties can use Inspect Element to read the network requests, that it constituted "open source".

Commenters then got on his case about not open sourcing the server backend. OP defended that choice saying they didn't want a competitor taking their code and building a company off of it that would "drive [them] out of business". Uh-huh. So, proprietary software, then. Bye.

[–] pixelscript@lemmy.ml 1 points 6 months ago (1 children)

No one said it was shameful?

[–] pixelscript@lemmy.ml 2 points 6 months ago (3 children)

It's a huge win, but not the kind of win people reading the statistic with no context (like me) probably thought.

I'm sure a lot of us looked at "15 percent of desktop PCs in India run Linux" and, regardless of whether it was hasty and irresponsible for us to do so, extrapolated that to, "15 percent of Indian PC users are personally selecting Linux and normalizing its paradigms".

But in reality, it sounds more like "15 percent of Indian PC users use Linux to launch Google Chrome". Which is impressive, but not the specific kind of impressive we wanted.

It feels a bit like how I imagine, say, a song artist feels when they pour their heart and soul into a piece of music, it gets modest to no traction for a while, and then years later a 20 second loop becomes the backing track for a massive Tiktok meme, and almost zero of that attention trickles back to their other work.

[–] pixelscript@lemmy.ml 1 points 6 months ago

Stateless functions still deal with state, they just don't hold onto it. Without state to mutate, a so-called stateless function doesn't do anything.

In declarative languages, your state is the sum of everything you've declared. You don't query results out of thin air. Computational results logically conclude from everything you set up.

HTML ""has state"", as in it has a DOM, but it doesn't do anything with it. You don't mutate the DOM after it's built, or query the DOM to compute results that weren't trivially evident from the state you declared.

You can do those things with JavaScript. But all that proves is JavaScript is a programming language, and HTML is just a data format it can interact with.

[–] pixelscript@lemmy.ml 1 points 6 months ago (1 children)

Sure. Which is why I would only make this distinction in a place where I can reasonably expect people to know better. Like, perhaps, a niche community on an experimental social media platform dedicated to programming.

[–] pixelscript@lemmy.ml 1 points 6 months ago (6 children)

The bar for me is whether the language describes an executable program that has state and control flow.

You could perhaps be generous and describe the DOM as a (write-only) state and the parser as a control flow. I don't, personally.

HTML is just a data container format to me. Belongs with the likes of XML, JSON, JPG, PNG, GIF, MP3, MOV, etc.

The umbrella term I'd use for all of these is "coding". That's the skill of understanding structured languages and format specifications, and understanding how you can and can't piece things together to make something coherent. This is a critical requisite skill to programming. But programming is more.

Programming is the art of juggling of state and control flow in clever ways to trick funny rocks into computing something you don't know. It doesn't need to be general purpose, but I would argue it indeed needs to have a purpose. It has to be something more than just a pile of declarations you know from the outset. Otherwise it's just structured data.

[–] pixelscript@lemmy.ml 2 points 6 months ago (2 children)

Maybe you do know, but in case you don't, the "convenience fee" is (usually) just the price the vendor has to pay to process a credit card transaction. Because in order to accept credit cards as payment in the first place, they have to pay the credit card network for the privilege.

Providing the exact same service to you is more expensive for them based entirely on the method you use to pay. You bet they're going to pass that extra expense onto you. The alternative is raising their service charge to eat the cost and screwing over people who pay with check or cash. Which is what most retail stores tend to do.

Though, I agree, I'd rather they just do the fucking math and charge a rate that covers their operating expenses. It's shouldn't be my problem to pay their itemized expenses. Just know that if they did so, we'll be charged the same total either way.

It's a similar argument with tipping culture. "Oh, you have to tip, employees rely on it to make ends meet!" Sure, but why is that my problem? If the business can't create a business model that properly pays for the expenses it needs to function, they should go out of business. Raise prices. I'll pay the same as the tip, fine, just stop playing these frivilous smoke and mirror games with my bill.

[–] pixelscript@lemmy.ml 1 points 7 months ago

In a rather unorthodox way, yes.

Android is one of those rare examples of a Linux kernel not being paired with GNU tools. I believe Android wrote their own versions of all the tools they wanted.

The kernel is also extremely locked down by default. They very intentionally designed the OS in such a way that every facet of the kernel is kept abstracted away from you. It's about as black-boxed as you can get, to the point where the fact that it's Linux underneath is almost meaningless.

[–] pixelscript@lemmy.ml 5 points 7 months ago (2 children)

Man, I haven't seen a pony in the wild in ages.

view more: next ›