There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

Deiv , in When you forget to set a boundary conditions in your logic

You’re special, #6,211,583

🤣

Thorry84 , in “It’s not that hard”

Yes the compiler/interpreter can figure it out on the fly, that’s what we mean by untyped languages. And as stated both have their merits and their faults.

Elon doesn’t know what the words mean and just chimes in with his AI future BS.

janAkali ,

Yes the compiler/interpreter can figure it out on the fly, that’s what we mean by untyped languages.

Are there untyped languages? You probably meant ‘dynamically typed languages’.

But even statically typed languages can figure out most types for you from the context - it’s called ‘type inference’.

Thorry84 ,

Well that would depend on the definition and what you exactly mean by untyped.

The untyped part is usually referring to the way the programmer interacts with the language, for example not setting a type for variables and parameters. But then there is the question of is the programmer ever allowed to explicitly set the type. And further more, if the programmer explicitly set the type, does this mean the type can’t change at a later point? And another question could be, can the programmer check or enforce what type a variable or parameter is? And the question, if there is only one type of data in the language, would that be a typed or untyped language? But I would consider these to be details and all fall under the untyped umbrella, with untyped just meaning not-typed.

Then there’s the question of the technical implementation of the language. Defining a language is one thing, actually having it run on a real system is another. Usually technical systems at some point require explicit types. Something somewhere needs instructions on how to handle the data and this usually leads to some kind of typing instructions being added along with the data. But depending on how many abstraction layers there are, this can soon become a very pedantic discussion. I feel what matters is the design, definition and intend of a language. The actual technical implementation isn’t what matters in my opinion.

I feel like there are so many programming languages and technical systems at this point, every variation and exception exists. And if you can think of one that doesn’t exist, expect a follow up comment of somebody pointing out it does exist after all, or them having started a project to make it exist in the near future.

Poutinetown ,

Would you say OCaml or any ml family language would be untyped since they have type inference?

Thorry84 ,

From what I know about those I would consider those to be typed languages. Even if the programmer doesn’t explicitly assign the types, he needs to be aware of them and take into account what type something will be. I am familiar with F# and it’s strongly typed for example.

Witchfire , (edited )
@Witchfire@lemmy.world avatar

We’re also at the point where traditionally untyped languages can be strictly typed (strict typescript), and typed languages can be weakly typed (Java’s var)

ParetoOptimalDev ,

Most statically typed languages can’t because they don’t implement Hindley-Milner type inference.

Traister101 ,

Assembly probably? So low level you kinda just play with bits. That’s all I can think of for an untyped language. Everything else I’m aware of is dynamically or statically typed

Chobbes ,

I kind of feel like “untyped” is a term that doesn’t really have a proper definition right now. As far as I can tell when people say “untyped” they usually mean it as a synonym for whatever they consider “dynamically typed” to mean (which also seems to vary a bit from person to person, haha). Sometimes people say assembly is untyped exactly for this reason, but you could also consider it to have one type “bits” and all of the operations just do things on bits (although, arguably different sized registers have different types). Similarly, people sometimes consider “dynamically typed languages” to just be “unityped” (maybe monotyped is more easily distinguished from untyped, haha) languages at their core, and if you squint you can just think of the dynamic type checks as a kind of pattern matching on a giant sum type.

In some sense values always have types because you could always classify them into types externally, and you could even consider a value to be a member of multiple types (often programming languages with type systems don’t allow this and force unique types for every value). Because you could always classify values under a type it feels kind of weird to refer to languages as being “untyped”, but it’s also kind of weird to refer to a language as “typed” when there isn’t really any meaningful typing information and there’s no type system checking the “types” of values. Types sort of always exist, but also sort of only exist when you actually make the distinctions and have something that you call a “type system”… In some sense the distinction between static and dynamic typing is sort of an arbitrary implementation detail too (though, of course, it has impacts on the experience of programming, and the language design makes a bit of a difference in terms of what’s decidable :) (and obviously the type system can determine what programs you consider to be “valid”)… But you can absolutely have a mix of static type checking and dynamic typing, for instance… It’s all a little more wishy washy than people tend to think in my opinion).

Traister101 ,

Well like asembly has “int types” and “float types” as there’s specific instructions for those operations but those instructions don’t actually care if the bits are for a float or an int. Types in a language are used to restrict the valid operations. In a statically typed language you cannot call cat.bark() or dog.meow() because the property’s of the type, what things you can do with it are known before the program runs. In a dynamically typed language such as Python cat.bark() might or might not be valid so it has to check at runtime for a method throwing an error if it doesn’t exist.

Static/Dynamic typing is a difference of when. Java has static typing but you can also just pass raw Objects around and cast when needed. It even throws a runtime exception similar to how Python or JavaScript would fail. However Java is of course ultimately statically typed everything just shares a common parent class and has types at runtime which allows for some some psudo dynamic behavior

Chobbes ,

There’s operations that treat bits like floats and operations that treat them like various kinds of ints, but the meaning of bits is in the eye of the beholder. There’s even good examples of mixing and matching integer and floating point operations to clever effect, like with the infamous fast inverse square root. I feel like people often think mathematical objects mean something beyond what they are, when often math is kind of just math and it is what it is (if that makes sense… it’s kind of like anthropomorphizing mathematical objects and viewing them through a specific lens, as opposed to just seeing them as the set of axioms that they are). That’s kind of how I feel with this stuff. You can treat the bits however you want and it’s not like integer operations and bitwise operations have no meaning on supposedly floating point values, they do something (and mixing these different types of operations can even do useful things!), it just might not be the normal arithmetic operations you expect when you interpret the number as a float (and enjoy your accidental NaNs or whatever :P).

The difference of static and dynamic typing being when you perform the type checking is partially why I consider it to be a somewhat arbitrary distinction for a language (obviously decidable static type checking is limited, though), and projects like typescript have shown that you can successfully bolt on a static type system onto a dynamic language to provide type checking on specific parts of a program just fine. But obviously this changes what you consider to be a valid program at compile time, though maybe not what you consider to be a valid program overall if you consider programs with dynamic type errors to be invalid too (which there’s certainly precedence for… C programs are arguably only real C programs when they’re well-defined, but detecting UB is undecidable).

nul ,

Most of my code is untyped. First I type it, then I realize it’s all wrong and use backspace to untype it.

RazorsLedge ,

This is the dumbest thing I’ve read all week. Congrats. Lol

Knock_Knock_Lemmy_In ,

VBA you can declare everything as variant.

Is that untyped?

AVincentInSpace ,

I guess “untyped” could mean “weakly typed”, like how shell and DOS batch are, where everything is a string until you say “hey I want to do math on this” at which point the interpreter turns it into a number, does math on the number, and then turns it back into a string before saving it back to the variable

lseif ,

assembly

Blue_Morpho ,

And as stated both have their merits and their faults.

Yes! Just because a compiler could guess the type doesn’t mean it should. Elon didn’t understand the meme at all.

AVincentInSpace ,

why would you not want it to? what circumstance, other than an integer not given an explicit type, could it guess wrong?

Blue_Morpho ,

Dynamic vs Static is a huge debate that I’m not qualified to answer. My personal preference is static because I like to know my mistakes at compile time instead of after running and something weird happens. That goes along with my preference that all variables should be declared at the top of a function.

hackernoon.com/i-finally-understand-static-vs-dyn…

AVincentInSpace ,

I’m not talking about dynamic vs static though. I’m talking about static typing with or without compiler type inference a la Rust or C++'s auto

(note that Java making generic parameters optional does not count since that is, in fact, dynamic typing)

RepulsiveDog4415 ,

Well, if there is nof fixed (explicit or implicit) type it’s imposible for the compiler to optimise your code. Also imho programming with typed languages is way easier because your IDE can recognize function argumentd before you compile/run. I tried python and found it baffling how anyone can get any work done with it :D

Sharpiemarker ,

Untyped as in written? Or is this programming term I’m not familiar with?

jtk ,
@jtk@lemmy.sdf.org avatar

Might be able to call assembly untyped. Everything beyond that I think would be called either statically or dynamically typed, maybe weakly typed?

RagingRobot , (edited )

By typed they mean declairing a type for your variables.

In some languages, variables needs to be told what kind of data they can hold. That’s it’s type. For instance a number without decimals would be an integer type. While text might be a string type or a list of character types.

Other languages don’t require types and sometimes don’t even support them. They will just infer the type from the data that’s in the variable.

If you see Elon Musk please explain this to him.

Sharpiemarker ,

If you see Elon Musk please explain this to him.

I’m an idiot, and I still don’t think I could dumb it down to his level.

some_guy ,

It’s actually hieroglyphics.

MinekPo1 , in “It’s not that hard”
@MinekPo1@lemmygrad.ml avatar

Not that it will matter in the AI future

that statement makes so little sense I feel like Mount stupid does not give it justice .

lvxferre ,
@lvxferre@lemmy.ml avatar

Websearch “transhumanism silicon valley”, and it starts making sense: Musk has faith that artificial general intelligence is coming, Soon®, and that it’ll replace grunt labour like programming.

MinekPo1 ,
@MinekPo1@lemmygrad.ml avatar

no it still doesn’t because unless that ai will code in assembly (which you could argue is a statically typed programming language with just one type , but lets not be pedantic) , it will still use programming languages , which means it will still matter if a language something is made is statically or dynamically typed .

even with the assumption that AI will be able to efficiency code in assembly , lets entertain the exponential growth version of ai often shown in fiction , it will still not be worth for that super intelligence to write in assembly (except for what we humans would call fun or for small cases where its necessary like os headers etc) because a compiler will do it faster and likely good enough , especially as it will then be able to make a better compiler . it will also likely not want to spend time/focus to scan the assembly code which is another advantage to not writing in pure assembly .

making that statement requires a complete lack of understanding how programming works along with an over"optimistic" view on the future of ai nya

lvxferre ,
@lvxferre@lemmy.ml avatar

A compiler does it “good enough”, but AI = god in a bottle, thus it’ll do it “perfectly”. And for perfection you need to edit the raw metal using butterflies and cosmic rays, it’ll be the only real programmer to ever appear. Pressures like time and focus will stop existing. Why? Because AI = god, QED.

…or at least that’s the sort of crap that those Silicon Valley muppets believe in. The content itself doesn’t make sense, but why that pile of nonsense is uttered does - a fringe religious-like belief increasingly common among them.

conditional_soup , in “It’s not that hard”

Quick, somebody teach this man JavaScript.

BoastfulDaedra ,

JESUS CHRIST MAN! Is the internet still not broken enough for you!?!?

hansl ,

Wasn’t PayPal coded in PHP? That might explain a lot of things…

lvxferre , in “It’s not that hard”
@lvxferre@lemmy.ml avatar

Musk being an assumer (note how he’s vomiting certainty on future events) doesn’t surprise me a tiny bit.

xmunk , in “It’s not that hard”

Elon Musk loves to speak confidently about shit he knows nothing about. This leads to him being a confident speaker on every topic… I just wish we could figure out a way to shut him up.

knfrmity ,

The French had a pretty good way of shutting up insufferable rich asshats.

skwnssmnstr ,

Does it rhyme with “vaseline”?

Sailing7 ,

Yes. Yes it does :D

stown ,
@stown@sedd.it avatar

I’ll grab my Ovaltine.

DarkDarkHouse ,
@DarkDarkHouse@lemmy.sdf.org avatar

I’ll grab my gasoline

Stern ,
@Stern@lemmy.world avatar
hemmes ,
@hemmes@lemmy.world avatar

Maybe I’m out of the loop - what’s he been saying about software?

Draghetta ,

This post’s image man

It’s not that hard™

hemmes ,
@hemmes@lemmy.world avatar

Oh. This post’s image has him talking types in January and the “obligatory” image above has someone saying he’s been talking software in December, so I thought maybe Musk has been spewing about software for a few weeks or something.

FrostyTheDoo ,

Twitter is a software, he’s been saying stupid stuff about how it works for the last year+

Squibbles ,

December from '22 not '23. The image was from a few months after he took over twitter and was still going on about that stuff and how it was doing all these useless things that needed to be removed or rewritten. I just remembered another one about how he was going on about a single request to twitter causing thousands of RPCs or something? I think that’s not really unheard of in a microservices infrastructure and it’s not like they’d be synchronous. There’s probably tons of calls that go to things like tracking, analytics, or cross DC sharing I would imagine for such a large and high volume service like twitter.

Squibbles ,

When he took over twitter there was a bunch of stuff he was spouting about things like Twitter’s stack needing a full rewrite and such. Going so far as to fire the engineer that challenged him on it during a live spaces thing if I recall correctly.

Ephera ,

One example that stuck with me is that he said some shit along the lines of 80% of Twitter’s microservices being superfluous and he’ll be shutting them off.

Yes, the dev teams just spent 4/5 of their time building shit no one asked for. It just annoys me so much, because anyone with basic reasoning should be able to work out that this cannot possibly be the case, but it’s easy to give it the benefit of the doubt.

Well, except that many, many Twitter outages followed.

MajorHavoc ,

Well, except that many, many Twitter outages followed.

Yeah. As a software dev, it was pretty awkward explaining this to colleagues who rely on Twitter/X.

“It sounds like you think Twitter is a software company and that Elon is utterly unqualified to run a software company. That can’t possibly be true, right?”

…Then we end up doing the “Concerned Padme” meme…

Zoboomafoo ,

I’ve heard horror stories on the programming subreddits of incompetent managers that require their employees to write X new lines of code per week. Those code bases probably could have huge chunks taken off.

Clearly that hasn’t happened here

flynnguy ,

He asked employees to print out their code so he could review it.

floofloof ,

He also seems to have the idea that the best developer is the one who produces the most code. That shows a pretty major lack of understanding of how software development works. Sometimes the best day is when you produce negative amounts of code.

Bonehead ,

The rockets are fine. SpaceX has a team specifically designed to distract Musk and keep him away from the actual work on the rockets. Tesla didn't have that though. That's how we ended up with that lame presentation with the weird "S3XY" acromin. That was really the point I realized that he was just an idiot frat boy with too much money. He really is his own worst enemy.

Pringles ,

What’s your source on the spacex team distracting him? I can’t find anything supporting that. I do find some interviews from anonymous employees saying it’s calmer now that he’s so focused on twitter.

cupcakezealot ,
@cupcakezealot@lemmy.blahaj.zone avatar

the thing about spacex is everything they do is because of nasa and government.

the only thing spacex has going for it is the fact that they can spend a billion dollars exploding a rocket five times before it slightly works the sixth whereas the government can’t do that.

Bumblefumble ,

As someone who does know about this field, and absolute despise Musk, that’s not quite true. SpaceX is very successful thanks to help from the US government, and despite the influence of Musk, but also because they are a team of very competent people who have actually innovated and pushed the boundaries of launch vehicles. To say they have nothing going for them and are being propped up by the government is not at all accurate, and they have been much more succesful than traditional government contractors.

zalgotext ,

To say they have nothing going for them and are being propped up by the government is not at all accurate

That isn’t what they’re saying though, is it? They’re saying that SpaceX has the ability to fail more than NASA, because they’re not a government organization funded solely by taxes.

jacksilver ,

Admittedly I think the biggest failures that hurt NASA were incidents when people, not rockets, blew up. It’ll be interesting to see if things change if/when there is a death from a SpaceX rocket.

jasondj ,

People die in work related incidents all the time. The only thing different about deaths from NASA incidents is that they are (usually) spectacular incidents (like massive explosions or cabin fires…not good things, just stunning) and high-profile.

SpaceX does well because they basically ignore Elon.

onlinepersona ,

He doesn’t notice he’s the Duning-Kruger effect personified.

CC BY-NC-SA 4.0

derpgon ,

Well, looking at ChatGPT and other LLMs, they also lie confidently. Maybe there is a correlation and Elon is just a poor AI.

LillyPip ,

Oh, thanks for pointing that out.

I was formulating an angry rebuttal in my head, then saw your comment and realised I hadn’t noticed the username. Of course it’s Musk. That’s rebuttal enough.

autokludge , in When rubber duck debugging just doesn't cut it.
@autokludge@programming.dev avatar
sirdorius , in Always

Well, it’s winter, so that’s like 4pm to start coding

oce , in Always
@oce@jlai.lu avatar

I think some of it is the mental load expectation to go back to a difficult process. I find using genAI to start the task allows the load to come more progressively.

GnomeKat , in Always
@GnomeKat@lemmy.blahaj.zone avatar

ITT: a lot of undiagnosed sensory issues

lseif , in Always

visual studio finished starting

HiddenLayer5 , in Always

Coding at night with the lights off makes you feel like one of the cool movie hackers.

OttoVonNoob , in Always

As a hobbyist, daughter goes to bed I start reading and experimenting.

blackn1ght , in Always

This isn’t my experience. I’m way more focused in the morning and then it’s all downhill after lunch. By the time it’s the evening I have zero motivation to do any code.

oce ,
@oce@jlai.lu avatar

My best focus is before lunch and before the end of the day.

CodingCarpenter ,

I’m the opposite I’m useless until after lunch

weird_nugget ,

Jokes on you, I’m useless all the time

AVincentInSpace , in When you forget to set a boundary conditions in your logic

Maybe they meant your account is 915 days old as of this year?

Username ,

I think that’s fairly obvious with the smaller text and context.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines