Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Please don't post about US Politics. If you need to do this, try !politicaldiscussion@lemmy.world
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu
view the rest of the comments
I just talk about my stupid interests all the time. Do you all not do that?
I try to, but some of them are very niche, so it can be hard to find someone willing to listen. Especially for things like programming language design!
My husband is a programmer. I really love when he tells me about a cool way he solved a problem at work. You could tell me! But I reckon your friends would be more interested than you would think.
Hah, thanks! I already try to tell my friends often enough, but usually they lose concentration while I'm still explaining prerequisites :D
One thing I'm very interested in is Turing-completeness of type systems. In every programming language you have pieces of data, and the computer has to know what kind of data it is - for example a number, or a piece of text. Some languages are "dynamically typed", in that you don't have to specify what kind of data you'll put somewhere, it just accepts any kind of data and you have to give the right things (it keeps track internally what you're putting where). This is something the industry is moving away from after it had been a hype for a couple of years - it leads to problems in the long run, since it's more difficult to understand the code when reading it (the more information there is, the better, as long as it's not duplicated or irrelevant).
Turing-completeness is an attribute of computer systems. Turing proved that, if a mathematical system supports a couple of operations, you can do any calculations with it - it's what our computers today, and information theory, are based on.
(prerequisites mostly done here!)
Some languages are going further than just specifying what kind of data you're putting somewhere. You can take one of these type definitions, and calculate a new definition from that one! For example, I might store the state of an internet connection as either "connecting", "connected" or "disconnected". In another place I can take this list of three words, and add one or remove one - essentially, I can compute a new definition from this old one. And it turns out, if there are a couple of specific operations implemented, you can actually do anything with this!
For example, let's say you have a piece of data that is executable code for the computer. You can write a type definition that executes this piece of code, which means you're running the calculation before your program is running! There are many cool development things you can do with this, mostly to prevent bugs or make your life a bit easier. But it's incredibly fascinating just how global these concepts are. Heck, you can even build a computer from literal crabs that is Turing-complete, which could run this Turing-complete type system for a Turing-complete language!
Oh! I know about data types a little already. Why are languages moving away from strict data typing? That's very disappointing to hear. Which languages were you thinking about? Will they at least let you configure the compiler to use strict data types in the future?
It's the other way around, dynamic typing has been hyped in the last decades to years, but the industry is moving away from it, back to static typing :)
Great examples are JavaScript and Python: both are fundamentally dynamically typed, but both have efforts to add static typing (TypeScript for JavaScript, and type hints for Python). So we're slowly but surely rectifying these problems!
Oh! Good! I'm glad to hear that.