Evil Ones - Lemmy.World

Lemmy

Wait, do vegetables have good feelings or evil ones??
Even more evil, trust me, I lived with one once
I find the hardest part about eating vegetables is getting around the wheelchair.
Replace the bathtub with a cooking pot and you’ll have your vegetables slide in just like that.
Plop them on the bed first
Our mass media can incite fear of chickens, pigs, and cattle. Then their existence itself can be defined as a terrorist act. We’ll redefine vegan to mean only those that eat terrorists to save the other animals. Actual vegans can call themselves “vegetablers”. Nothing changes and everyone feels good because if they don’t feel good then they’re not human.
If the existence is a terroristic act how do you call farmers who breed these creatures on purpose? I guess the new ‘vegans’ could then eat the very last generation of terroristic animals and then everyone needs to go ‘vegetabler’. I guess that doesn’t sound too bad to those that are vegetabler on purpose. ;)

If the existence is a terroristic act how do you call farmers who breed these creatures on purpose?

Capitalists.

I’ve been programming in typescript recently, and can I say. I fucking hate JavaScript and typescript. It’s such a pain so much odd behaviors.

Lol name one outside of it’s well known equality rules that linters check for.

Also, name the language you think is better.

Because for those of us who have coded in languages that are actually bad, hearing people complain about triple equals signs for the millionth time seems pretty lame.

@masterspace "Undeclared variable" is a runtime error.

Perl.

Learn how to configure your linter:

eslint.org/docs/latest/rules/no-undef

no-undef - ESLint - Pluggable JavaScript Linter

A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.

@masterspace

I haven’t used Perl though, what do you like better about it?

"Undeclared variable" is a compile-time error.

K, well configure your linter the way a professional Typescript environment should have it configured, and it will be there too. Not to be rude but not having a linter configured and running is a pretty basic issue. If you configured your project with Vite or any other framework it would have this configured OOTB.

@masterspace

Not to be rude but not having a linter configured and running is a pretty basic issue.

Yeah, if you're a C programmer in the 1980s, maybe. But it's 2006 now and compilers are able to do basic sanity checks all on their own.

Interpreted languages don’t have compilers, and one of the steps that compilers do is LINTING. You’re literally complaining about not configuring your compiler properly and blaming it on the language.

@masterspace Love the confidence, but your facts could do with some work.

  • "Interpreted language" is not a thing. Interpreted vs compiled is a property of a particular implementation, not the language.
    (I wonder how you would classify lazy functional languages like Haskell. The first implementations were all interpreters because it was not clear that the well-known graph reduction technique for lazy evaluation could be compiled to native code at all.Today, hugs (a Haskell interpreter written in C) isn't maintained anymore, but GHC still comes with both a native compiler (ghc) and an interpreter (runghc, ghci).)

  • Most implementations that employ interpretation are compiler/interpreter hybrids. It is rare to find an interpreter that parses and directly executes each line of code before proceeding to the next (the major exception being shells/shell scripts). Instead they first compile the source code to an internal representation, which is then interpreted (or, in some cases, stored elsewhere, like Python's .pyc files or PHP's "opcache").

  • You can tell something is a compile-time error if its occurrence anywhere in the file prevents the whole file from running. For example, if you take valid code and add a random { at the end, none of the code will be executed (in Javascript, Python, Perl, PHP, C, Haskell, but not in shell scripts).

  • The original "lint" tool was developed because old C compilers did little to no error checking. (For example, they couldn't verify the number and type of arguments in function calls against the corresponding function definitions.) "Linting" specifically refers to doing extra checks (some of which may be more stylistic in nature, like a /*FALLTHRU*/ comment in switch statements) beyond what the compiler does by itself.

  • If I refer to an undeclared variable in a Perl function, none of the code runs, even if the function is defined at the end of the file and never called. It's a compile-time error (and I don't have to install and configure a linting tool first). The same is true of Haskell.
    What's funny to me is that Javascript copied use strict directly from Perl (albeit as a string because Javascript doesn't have use declarations), but turned it into a runtime check, which makes it a lot less useful.

None of that nitpicking changes the core point that they’re misconfiguring a dev environment and blaming the language.
Not to play the devil’s advocate, but with compiled languages you can just install the language, “run” your script and it’ll work, if not the language will catch undeclared variables for you, and more. With interpreted languages you need to not only install the language but also third party tools for these fairly Barovia things.
To play devil’s advocate to that, why is it better that a language is monolithic vs having its various components be independent let different frameworks mix and match different parts?
I mean, it could just do very basic checking…

Recently I encountered an issue with “casting”. I had a class “foo” and a class “bar” that extended class foo. I made a list of class “foo” and added “bar” objects to the list. But when I tried use objects from “foo” list and cast them to bar and attempted to use a “bar” member function I got a runtime error saying it didn’t exists maybe this was user error but it doesn’t align with what I come to expect from languages.

I just feel like instead of slapping some silly abstraction on a language we should actually work on integrating a proper type safe language in its stead.

I think that might be user error as I can’t recreate that:

Yeah, you would get a runtime error calling that member without checking that it exists.
Yeah, because it doesn’t exist.
JavaScript only has a single number type, so 0.0 is the same as 0. Thus when you are sending a JS object as JSON, in certain situations it will literally change 0.0 to 0 for you and send that instead (same with any number that has a zero decimal). This will cause casting errors in other languages when they attempt to deserialize ints into doubles or floats.
It will cause casting errors in other languages that have badly written, non-standards compliant, JSON parsers, as 1 and 1.0 being the same are part of the pfficial JSON ISO standard and have been for a long time: json-schema.org/…/numeric
JSON Schema - Numeric types

JSON Schema

JSON schema is not a standard lol. 😂 it especially isn’t a standard across languages. And it most definitely isn’t an ISO standard 🤣. JSON Data Interchange Format is a standard, but it wasn’t published until 2017, and it doesn’t say anything about 1.0 needs to auto cast to 1 (because that would be fucking idiotic). datatracker.ietf.org/doc/html/rfc8259

JSON Schema does have a draft in the IETF right now, but JSON Schema isn’t a specification of the language, it’s for defining a schema for your code. …ietf.org/…/draft-handrews-json-schema/

RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format

JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data. This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.

IETF Datatracker

Yes it is. Try googling things before confidently mistaking them:

www.iso.org/standard/71616.html

Page 3 of INTERNATIONAL STANDARD

  • ISO/IEC 21778 - Information technology — The JSON data interchange syntax

8 Numbers A number is a sequence of decimal digits with no superfluous leading zero. It may have a preceding minus sign (U+002D). It may have a fractional part prefixed by a decimal point (U+002E). It may have an exponent, prefixed by e (U+0065) or E (U+0045) and optionally + (U+002B) or – (U+002D). The digits are the code points U+0030 through U+0039.

ISO/IEC 21778:2017

Information technology — The JSON data interchange syntax

ISO

That confirms exactly what tyler said. I'm not sure if you're misreading replies to your posts or misreading your own posts, but I think you're really missing the point.

Let's go through it point by point.

  • tyler said "JSON Schema is not an ISO standard". As far as I can tell, this is true, and you have not presented any evidence to the contrary.

  • tyler said "JSON Data Interchange Format is a standard, but it wasn’t published until 2017, and it doesn’t say anything about 1.0 needs to auto cast to 1". This is true and confirmed by your own link, which is a standard from 2017 that declares compatibility with RFC 8259 (tyler's link) and doesn't say anything about autocasting 1.0 to 0 (because that's semantics, and your ISO standard only describes syntax).

  • tyler said "JSON Schema isn’t a specification of the language, it’s for defining a schema for your code", which is true (and you haven't disputed it).

Your response starts with "yes it is", but it's unclear what part you're disagreeing with, because your own link agrees with pretty much everything tyler said.

Even the part of the standard you're explicitly quoting does not say anything about 1.0 and 1 being the same number.

Why did you bring up JSON Schema (by linking to their website) in the first place? Were you just confused about the difference between JSON in general and JSON Schema?

You clearly do not understand the difference between a specification and a schema. On top of that you clearly don’t even understand what you wrote down doesn’t even agree with you. No where in that spec does it say anything about auto casting a double or float to an int.

I like custom types and them being able to follow custom interfaces; it makes for great type safety that almost no other language can guarantee!

What I’m saying is I’m learning Rust.

why do beards make men shitheels ?

even santa only gives the good stuff to rich kids

Look at those butthurt downvotes, haha. Currently 2 - 4.

Let me reach around mine to give you an upvote.

If a chicken could code, it would probably work like JavaScript. This is accurate.

When I had a flock, for example, sometimes one would flip over a bucket onto itself and then decide it must be night and go to sleep.

if a chicken could code, it would use CHICKEN.
CHICKEN Scheme

Oh this is actually a real thing I was rolling my eyes like “just show me the clicks and clucks in the code”
Like the cow one that’s just a sequence of differently-capitalised moos.
Chicken chicken chicken

YouTube
I wish I could go to sleep at any time of day with just a bucket.
Flying short distances and ability to expand your neck like 4x also looks cool.
What if it was on purpose?

I wouldn’t put it past them. The one I saw climb into the hay loft on an upright human ladder knew what it was doing. Ditto for the time they excavated out a secret base under the deck and started laying eggs inside.

Never a dull moment with those guys.

😆 keep an eye on em, everyone I know who interacts with chickens has said the same thing.

Honestly the meme of JavaScript bad is so tired and outdated it’s ridiculous.

Typescript is hands down the most pleasant language to work in, followed closely by the more modern compiled ones like Go, Swift, C#, and miles ahead of widely used legacy ones like Java, and PHP etc. and the white space, untyped, nightmare that is python.

I’m like 99% sure that it’s just because JavaScript / Typescript is so common that for anyone who doesn’t start with it, it’s the second language they learn, and at that point they’re just whiny and butthurt about learning a new language.

Few people use just Typescript, though - there’s always dangerously exposed native libraries in the mix.
I would somewhat disagree. These days virtually every popular library on npm is pure typescript and every new project I see at a company is pure typescript, with only legacy migrations of old systems still mixing the two.

I’m not involved enough to really comment on that, but it’s not a 14 year old joke as much as a 1 or 2 year old joke if so.

Glad to hear it’s taking off. Hopefully browsers migrate to supporting it natively and depreciating JavaScript next.

That’s just what I’d expect an evil chicken to say.

Typescript is hands down the most pleasant language to work in

Agreed. But doesn’t make “JavaScript bad” any less true…

Nothing says language of the year better than a language that needs to be compiled to an inefficient interpreted language made for browsers and then grossly stuffed into a stripped out Chrome engine to serve as backend. All filled thousands of dependencies badly managed through npn to overcome the lack of a standard library actually useful for backend stuff.

Oh I’m sorry, I was waiting for you to name a more successful cross platform development language and framework?

Oh, you’re listing Java, and Xamarin, and otherwise rewriting the same app 4 times? Cool beans bro. Great development choices you’ve made.

All filled with thousands of dependencies badly managed through npm to overcome the lack of a standard library actually useful for backend stuff.

Bruh, this is the dumbest fucking complaint. “Open source language relies on open source packages, OMG WHAT?!?!!”

Please do go ahead and show me the OOTB OAuth library that comes with your backend language of choice, or kindly stfu about everything you need being provided by the language and not by third party libraries.