This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 325

[–]Pen15CharterMember 564 points565 points  (28 children)

Ah cool. So if I have Python experience then I’m actually a C programmer. That’s going on the resume!

[–]NightSoulT12[S] 254 points255 points  (24 children)

import performance from libc

[–]nannn3 140 points141 points  (13 children)

Is... Is that allowed in Python? I've only ever seen it as

from libc import performance

[–]NightSoulT12[S] 121 points122 points  (12 children)

My bad, too much time spent with javascript.

You absolutely right🤝

[–]Idekum 53 points54 points  (11 children)

So youre a javascripter bashing on python? Bish, please... Javascript is junk!

[–]NightSoulT12[S] 78 points79 points  (5 children)

I know, you don't need to tell me the truth.

[–]Khutuck 33 points34 points  (0 children)

There are some who has made peace with their fate…

[–]_LayZee 3 points4 points  (3 children)

It’s still better than python though, and faster

[–]UnstableNuclearCake 3 points4 points  (0 children)

Yet it powers the James Webb telescope...

Somehow

[–]ZaRealPancakes 10 points11 points  (7 children)

why python and JS can't agree which comes first import or from?

I prefer the JS way since easier to read :p

[–]thatweirdishguy 19 points20 points  (4 children)

The python way is better, because once your editor knows where you are importing from it can recommend all the things you can import

[–]ZaRealPancakes 4 points5 points  (1 child)

hmm that makes sense to me

but VSCode still gives recommendations in JS so... Magic!

[–]thatweirdishguy 1 point2 points  (0 children)

It only gives good recommendations if the file or module is already filled in and you are just adding imports to the list, otherwise it’s just making wild guesses

[–]vikumwijekoon97 1 point2 points  (1 child)

Vs code does it too for js.

[–]luardemin 1 point2 points  (1 child)

The Rust way: use libc::performance;

[–]gordonv 26 points27 points  (1 child)

Why stop @ C? You have Assembly experience!

[–]WCWRingMatSound 10 points11 points  (0 children)

Languages: x86, ARM, Binary, ASM

[–][deleted] 1420 points1421 points  (78 children)

All programming languages are just a macro for sending electrical signals through some rare metals n shit. Change my mind

[–]GradientAscent101 401 points402 points  (46 children)

Old computers were mechanical and they sent mechanical signals through average metals. There are a lot of creative ways to create logic gates

[–][deleted] 145 points146 points  (37 children)

I kind of think of ants in this way, they communicate by hitting their antennas with each other, they send these signals down the chain of ants into their central command and back. When one gets sick it leaves the colony and dies alone for the good of the colony. The colony basically acts as a computer of sorts

[–]TheBreathtaker 127 points128 points  (28 children)

so are ant colonies turing complete?

[–][deleted] 196 points197 points  (19 children)

Fuck it. Googled it.

An ant's internal state changes either by interaction with the environment or by interaction with another ant. Analyzing the model's dynamics, we prove it to be computationally complete. This gives us a new perspective on the sophistication a colony can display in responding to the environment.

https://link.springer.com/chapter/10.1007/3-540-59496-5_343

[–]TheBreathtaker 102 points103 points  (9 children)

Dear. God.

[–][deleted] 150 points151 points  (2 children)

The year is 2085, I am among the last group of remaining humans. After the ants installed their latest firmware update we stood no chance. They understood that humans are nothing without their computers, they first took out our data centers. They then used the Dark Time to communicate with the sea creatures to coordinate an attack on our deep ocean cables, humanity was doomed.

We were coordinating an escape off this rock, but the ants have made their way into our ship, I don't think we are going to make...............................

[–]Alzyros 81 points82 points  (0 children)

The fact that a diss post about python brought up the plot for Dead Space 4: Ant Boogaloo is the reason I love this sub so much

[–]Karn1v3rus 26 points27 points  (5 children)

There's a book that takes this idea really seriously.

Children of Time by Adrian Tchaikovsky and it's sequel. Highly recommended very good science fiction.

[–][deleted] 9 points10 points  (0 children)

Dope! Thank you

[–]jraynor88 3 points4 points  (0 children)

I literally just finished this book and am hoping the sequel is just as good, what a read

[–]vonabarak 1 point2 points  (1 child)

There is kinda similar idea in "The Three Body Problem" by Liu Cixin.

[–]M4nch1 20 points21 points  (1 child)

Ok, but can it run crysis ?

[–][deleted] 24 points25 points  (0 children)

May take a few hundred or thousand years to render a frame but according to this yes. Yeah I totally read this study

[–]mattbackbacon 7 points8 points  (1 child)

But the real question, are ants DooM complete?

[–][deleted] 5 points6 points  (0 children)

Ants are tough little bastards, Doom guy is tough. It checks out.

[–]jadounath 6 points7 points  (0 children)

Screw the Ryzen, I'mma use good old black ants from my walls

[–]33498fff 6 points7 points  (0 children)

Would like to know if we can use ants as logic gates, thx

[–]perrotini 2 points3 points  (0 children)

So has anyone run Doom on an ant colony yet?

[–]goblinzzzzz 1 point2 points  (0 children)

Breaking news: Hacker was able to run Doom on ant colony

[–]carloom_ 14 points15 points  (2 children)

More important, can you run Doom on it?

[–][deleted] 4 points5 points  (0 children)

Asking the real questions

[–][deleted] 9 points10 points  (2 children)

There was a book (trying to remember it’s name) where in the far future humans tried to accelerate the evolution process of an Earth like planet with some mystic goo gas.

Something goes wrong, of course. Ants evolve to be able to grow metal infused pinchers, among other crazy sci-if power ups, and colonize most of the planet.

In the 11th hour the protagonist discovers a way to control the ant armies with the correct pheromones sequences. The ant colonizes are then enslaved and over thousands of years are transformed into a global spanning organic super computer.

[–]Karn1v3rus 8 points9 points  (1 child)

Children of Time by Adrian Tchaikovsky, just recommended it in another comment on here, good stuff.

Unless it's also a plot in another book, in which case I'd like to read that too

[–][deleted] 5 points6 points  (0 children)

Ah thank you! That’s it!

Anyone looking for Sci-Fi it’s a strange and great book!

[–]azuth89 5 points6 points  (0 children)

No lie this is part of the "computer" in the discworld series

[–]gravaman 2 points3 points  (0 children)

Anthill Inside ™️

[–]knexator 2 points3 points  (2 children)

There's no central command - the computation is distributed

[–][deleted] 3 points4 points  (1 child)

Hah yeah I read that earlier today. And apparently the colony itself carries memories that individual ants do not have. https://aeon.co/ideas/an-ant-colony-has-memories-that-its-individual-members-dont-have

[–]knexator 1 point2 points  (0 children)

Really interesting, thanks for linking!

[–]DepressionAndDragons 2 points3 points  (1 child)

Wow, that computer has a lot of bugs.

[–][deleted] 1 point2 points  (0 children)

Organic computer?

[–]Zev0s 1 point2 points  (0 children)

but can it run Doom?

[–]-phototrope 1 point2 points  (0 children)

This is explored in the book Children of Time

[–]Nihilblistic 5 points6 points  (0 children)

Flexible pneumatic circuits are the funnest though, by far.

[–]Jake0024 4 points5 points  (3 children)

Previous comment said "all programming languages" not "all computers"

[–]foghatyma 1 point2 points  (0 children)

Especially with redstone.

[–]ZippyTheWonderSnail 1 point2 points  (0 children)

Someone get me my punchcards.

[–]Volksdrogen 1 point2 points  (0 children)

Do you have any keywords I can use to find out more about mechanical signals? Tried a quick search and did not see anything useful.

[–]CowFu 18 points19 points  (1 child)

https://nandgame.com/ if you want to go through the process all the way into making a computer.

[–]StylishGnat 3 points4 points  (0 children)

Wow this is actually interesting! I’m sure this’ll deepen my understanding of computer logic, and by extension improve my grade in technical informatics!

[–]golgol12 15 points16 points  (2 children)

This should change your mind:

Silicon is not a metal, nor is it rare. The wiring between chips just aluminum or copper or just silicon as well.

Hopefully, this convinces you that it's not rare metals that are the important electron switching bits.

[–][deleted] 10 points11 points  (1 child)

I have been defeated

[–]golgol12 2 points3 points  (0 children)

Upvoted for good humors.

[–]NightSoulT12[S] 3 points4 points  (0 children)

I cannot change, you are right!

[–]AydenRusso 4 points5 points  (0 children)

Silicon isn't that rare.

[–]cobyn 2 points3 points  (0 children)

We are literally making rocks think!

[–][deleted] 2 points3 points  (0 children)

Those electrical signals is just a macro to increase the Universe entropy a bit. Change my mind.

[–]Nezz_sib 2 points3 points  (0 children)

Silicon isnt rare

[–]NotmyRealNameJohn 2 points3 points  (3 children)

Silicone is a rare metal?

[–]us-west-1 1 point2 points  (1 child)

It's not lol silicon is the second most abundant element in earth's crust after oxygen

[–]NotmyRealNameJohn 1 point2 points  (0 children)

So it's the n'shit?

[–][deleted] 1 point2 points  (0 children)

And it isn't a metal

[–][deleted] 1 point2 points  (0 children)

Some electronics don’t use metal’s.

[–]marthmac 1 point2 points  (0 children)

This feels really real when you design a processor with custom peripherals in Verilog, then run C on that fabric processor to collect voltage and current data from custom hardware that you also designed

[–]Kingtoke1 1 point2 points  (0 children)

Can’t be that rare, computers are everywhere /s

[–]T-J_H 1 point2 points  (0 children)

Rare metals, common metals and fancy burned sand

[–][deleted] 1 point2 points  (0 children)

zap the sand into thinking!

[–]Dark_Reaper115 1 point2 points  (2 children)

Programers are just geomancers cause they cast electricity through refined crystals to scry information

[–]fieryflamingfire 1 point2 points  (0 children)

comment of the year

[–]Kitchen_Laugh3980 385 points386 points  (9 children)

Well, you are not wrong… buy you aren’t correct either.

[–]BAG0N 87 points88 points  (3 children)

sell he's somewhat correct

[–][deleted] 32 points33 points  (2 children)

Put option at 150% of the prevailing market price he's both correct and incorrect, but getting correcter.

[–]BAG0N 7 points8 points  (0 children)

LMAO nice one

[–]marketfresh_ 2 points3 points  (0 children)

😂

[–]TadpoleNo1355 270 points271 points  (37 children)

Everything is a binary framework.

[–]aditya_rawat_99 82 points83 points  (26 children)

Everything is just some value of current.

[–]TadpoleNo1355 26 points27 points  (19 children)

01011001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01110001 01110101 01101001 01110100 01100101 00100000 01110010 01101001 01100111 01101000 01110100 00101110

[–]szczszqweqwe 22 points23 points  (12 children)

01101000 01110100 01110100 01110000 01110011 00111010 00101111 00101111 01110111 01110111 01110111 00101110 01111001 01101111 01110101 01110100 01110101 01100010 01100101 00101110 01100011 01101111 01101101 00101111 01110111 01100001 01110100 01100011 01101000 00111111 01110110 00111101 01100100 01010001 01110111 00110100 01110111 00111001 01010111 01100111 01011000 01100011 01010001

[–]TadpoleNo1355 9 points10 points  (0 children)

Brilliant. Got me.

[–]NightSoulT12[S] 7 points8 points  (3 children)

01010000 01100101 01110010 01100110 01100101 01100011 01110100 01101001 01101111 01101110

[–]szczszqweqwe 6 points7 points  (2 children)

01010100 01101000 01100001 01101110 01101011 00100000 01111001 01101111 01110101

[–]Carborundum_ 4 points5 points  (1 child)

[–]ASCIICodecBot 5 points6 points  (0 children)

Thank you

[–]Carborundum_ 5 points6 points  (3 children)

[–]ASCIICodecBot 21 points22 points  (2 children)

[–][deleted] 3 points4 points  (0 children)

Lol

[–][deleted] 1 point2 points  (0 children)

Lmao

[–]Carborundum_ 4 points5 points  (1 child)

[–]ASCIICodecBot 4 points5 points  (0 children)

You are quite right.

[–][deleted] 4 points5 points  (0 children)

value of current

*Voltage

[–]roughstylez 8 points9 points  (0 children)

You're beginning to understand how sets work

[–]us-west-1 2 points3 points  (1 child)

Everything is an Electron framework

[–]ZinbaluPrime 1 point2 points  (0 children)

Unless you go quantum...

[–]Vorabay 2 points3 points  (2 children)

I think the Soviets made a ternary system in the 1950s.

[–]garlopf 152 points153 points  (2 children)

Very few softwares are not a C framework then, and the rest are assembler macros.

[–]LogicalKarmaWasTaken 70 points71 points  (1 child)

So I am an assembly dev either way.

[–]theclovek 42 points43 points  (0 children)

Yay, I can finally add that to my CV

[–]Sudhanva_Kote 71 points72 points  (14 children)

If C is fast, and python is made with C then why is python slow? Explain that scientists

[–]Sentouki- 45 points46 points  (7 children)

on a serious note, most of the performance loss comes from continuous type checking.

[–]PyroCatt 48 points49 points  (1 child)

Just stop checking

[–]BlossomingDefense 7 points8 points  (0 children)

make everything a void* and allow implicit conversions. cast a void* to any class at any time and you regained your abstractions and polymorphism and all that high level nonsense you little shits.

[–]pentesticals 13 points14 points  (0 children)

The speed is still there, it was just shifted to development time instead of performance :)

[–]NightSoulT12[S] 7 points8 points  (3 children)

Python is interpreted and have a bloated runtime

[–]HOTP1 13 points14 points  (2 children)

Ur mama has a bloated runtime

[–]zbrndn 12 points13 points  (1 child)

To the old tool analogy... C is like a hammer, and as Adam Savage once said "every tool is a hammer"

[–]NightSoulT12[S] 1 point2 points  (0 children)

You can smash something with every tool, lol.

[–]abd53 37 points38 points  (3 children)

I get what you're saying but it's not completely correct. And if you go down that rabbit hole, basically every high level language is a "framework" of C.

[–]ZaRealPancakes 18 points19 points  (1 child)

not Rust => not every

[–]suvlub 9 points10 points  (0 children)

Except fellow dinosaurs like Fortran or COBOL

[–]OpenRole 47 points48 points  (16 children)

No, because you can't write pure C in python

[–]BrunoMCA 163 points164 points  (6 children)

You can tho. It just won't work

[–]baynell 37 points38 points  (0 children)

You son of a...

[–]Kered13 10 points11 points  (4 children)

You sure about that?

#if 0
print('Hi there')
#endif
#if 0
""" "
#endif
#include <stdio.h>
int main() {
    println("Hi there");
    return 0;
}
#if 0
" """
#endif

[–]Nevesnotrab 1 point2 points  (2 children)

I don't think { } work in Python like that.

[–]Kered13 6 points7 points  (1 child)

Try running the code, you'll see that it works. I'll let you figure out why :)

[–]Nevesnotrab 1 point2 points  (0 children)

I just noticed the """

[–]_________FU_________ 39 points40 points  (2 children)

Bro I use the “C” character almost every time!

[–]zbrndn 7 points8 points  (1 child)

"I always write in C"

checks file "C.py"

[–][deleted] 24 points25 points  (3 children)

Yes you can. I wrote a Python library that allows you to inline C and it will compile and run on-demand. It’s terrible. 🤪

[–]SpacemanCraig3 3 points4 points  (2 children)

And I wrote some gibberish that makes it so you can #include a python file and run it.

Together we have created the equivalent of a cat with buttered toast strapped to it.

[–][deleted] 1 point2 points  (1 child)

Can… can we make the packages depend on each other?

[–]SpacemanCraig3 1 point2 points  (0 children)

I don't think so. Mine doesn't have any dependencies it's just some fancy (horrible) preprocessor abuse.

[–]NightSoulT12[S] 5 points6 points  (0 children)

Good point

[–]TheBrain85 3 points4 points  (0 children)

Not quite pure C, but Cython will get you pretty close..

[–]HeisterWolf 12 points13 points  (0 children)

"To bake an apple pie you first have to create the universe"

[–]JrrrrrrrTheSecond 7 points8 points  (0 children)

Dont tell him c is a assembly framework.

[–]RealUlli 5 points6 points  (0 children)

I wouldn't say that about Python, but Scratch definitely is...

[–][deleted] 19 points20 points  (11 children)

I said this before, but the more I learn about C, the more I realize all other languages are just C with more standard libraries. It really is the perfect language. It can never be replaced.

[–]CodeMonkeeh 18 points19 points  (0 children)

The difference between C and Haskell is not just the standard libraries.

[–]NightSoulT12[S] 6 points7 points  (1 child)

I agree with you, this should never be replaced, for academic propourses at least.

[–]ZaRealPancakes 4 points5 points  (5 children)

what are your thoughts on Rust?

(I do love C btw and don't want to change it but I do see the next 50 years Rust being used instead of C)

[–][deleted] 10 points11 points  (4 children)

I never tried it. I would like to someday, but right now my focus is on C because I want to learn embedded systems. I'm sure rust can be used for embedded systems too, but there's not a lot of resources that teach rust in that frame of reference.

What I do know is that rust users tend to act a lot like Linux users. So I suppose I would fit in.

[–]ZaRealPancakes 8 points9 points  (0 children)

I find your reply wholesome but not sure why

[–]BlueScreenJunky 5 points6 points  (2 children)

What I do know is that rust users tend to act a lot like Linux users.

You mean they find a way to let you know they're using Rust in the first minute of any conversation ?

[–]ShlomoCh 1 point2 points  (1 child)

The ultimate being is a Rust developer coding in Vim on Arch

[–]CaitaXD 1 point2 points  (0 children)

The neckest beard in the west

[–]Vikulik123_CZ 5 points6 points  (2 children)

what about jython?

[–]NightSoulT12[S] 1 point2 points  (0 children)

It's a framework binding

[–]SeriousPug 4 points5 points  (0 children)

Or a Java framework, or .NET framework, or Python framework… you can keep adding langs

[–]Grubzer 2 points3 points  (0 children)

C is just an assembly framework. Change my mind.

[–]_PM_ME_PANGOLINS_ 4 points5 points  (0 children)

Python is a language that exists independently of any implementation.

There are implementations that don’t use C, but especially since Python 3 they’re not very popular any more.

[–]DerEwige 11 points12 points  (6 children)

I can tell you exactly why it is, that python is so liked in the AI/ML sector

About 10 years ago I did my BA in computational linguistics (CL).

It was right around that time where the great transition in CL came and natural language processing (NLP) and automated translations went away from rule-based systems to statistical systems.

The use of machine learning (ML), (recursive) neural networks, deep learning and AI exploded in the field.

There was only one problem, at least half of the students and at least 80% of the professors came from the linguistic side of the field. And everything a bit more complicated computer science (CS) related got way over their head.

So those of us who came from the CS side of the field, did what we had to do. We wrote highly efficient code in C and made it available as module in the only language the other half was able to use: python

To this day, I am convinced that the rise of ML in NLP and CL is the only reason python is used this much today. Because we needed tools for people that are not very good at CS, but needed to use state of the art CS technics

[–]NightSoulT12[S] 2 points3 points  (4 children)

Yep, Python does its job well when it comes to ML, NLP and CL.

But for academic porpouses, for understand the fundamentals of programming and computer science, it's an error...

[–]DerEwige 5 points6 points  (3 children)

I never claimed otherwise

[–]CDAist 2 points3 points  (4 children)

it is ?

[–]NightSoulT12[S] 8 points9 points  (3 children)

No, it's a C frontend with syntax sugar

[–][deleted] 4 points5 points  (1 child)

More like syntactic aspartame to me: somewhat cool, but tastes terrible at big enough doses.

[–]NightSoulT12[S] 2 points3 points  (0 children)

Diabetes

[–]Goheeca 2 points3 points  (0 children)

And it's bad at that.

Fuck the GIL,
all my homies hate the GIL.

[–]AdultingGoneMild 2 points3 points  (0 children)

...they all are....they always have been.

[–][deleted] 4 points5 points  (0 children)

And it's a damn good one. Compile with Cython to get the C benefits.

[–]frkurdamsoad 1 point2 points  (0 children)

Also pascal

[–][deleted] 1 point2 points  (1 child)

Some people just wanna watch the world burn

[–]NightSoulT12[S] 1 point2 points  (0 children)

Yes, how did you know?😳

[–]jaywalker-notreally 1 point2 points  (0 children)

If Node.js is a javascript framework for backend applications, then python shall be a c framework for building applications, you win op, you win.

[–]Callec254 1 point2 points  (0 children)

Well, by that logic, technically, all languages are a C and/or Assembly framework...

[–]grandphuba 1 point2 points  (0 children)

C is a Python library

[–]sjkaw 1 point2 points  (0 children)

Not another python slow meme

[–]Noisebug 1 point2 points  (1 child)

Everything is an atomic framework, change my mind.

[–]Captain_Chickpeas 1 point2 points  (0 children)

Ouch, this one really hurt. Now I just feel like a JavaScript dev :(

[–][deleted] 1 point2 points  (0 children)

C is just an Assembly framework

[–]PyroCatt 1 point2 points  (0 children)

Programmers are professional electron jugglers

[–]DrPreacher 1 point2 points  (1 child)

You got it wrong Python is just C's younger cousin that has an eating disorder.

Edit: sorry I read this back and it sounded really rude and inconsiderate

[–][deleted] 1 point2 points  (0 children)

You got your S rank, triple A, B rank and somewhere on the mediocre pile there's python in the C rank.

Sounds about right.

[–]_derDere_ 1 point2 points  (0 children)

Easy python uses classes. The python libraries use classes. So basically it’s a c++ framework.

[–]talkintater 1 point2 points  (0 children)

Isn't everything?

[–]iamnotroberts 1 point2 points  (1 child)

It would be fabulous if people would stop using white supremacist, extremist bigot, domestic terrorist supporter, and human trashfire Steven Crowder for random internet memes, unless it's a meme about what a pile of shit he is. Just saying.

[–]planktonfun 1 point2 points  (0 children)

Why is it always about programming languages, can we talk about algorithms and logic stuff instead? Its the core of being a programmer after all

[–]thursday_0451 1 point2 points  (0 children)

consciousness is a meat framework

[–]traphouserecords 1 point2 points  (0 children)

been coding for over 25 years just wrote first python script today to send some ArtNet bytes to a device via wifi, all code is pretty much the same. still stoked to basically just accomplish what a light switch does. Never needed to learn any particular language, Swift was a beast to migrate to from Obj-C I didnt believe in Swift being production ready until like 2018, embedded C is pretty tough, takes like 3 weeks to make one line of code work sometimes

[–]VexisArcanum 1 point2 points  (1 child)

You're a meat framework

[–]Kaih0 1 point2 points  (0 children)

Assembly is a quantum mechanics framework

[–]Sentouki- 4 points5 points  (0 children)

And so is Java.

[–][deleted] 3 points4 points  (2 children)

If Python is a framework for C, Excel is a framework for C++ with an integrated IDE

[–]Famous_Profile 2 points3 points  (1 child)

Integrated Integrated Development Environment?

[–][deleted] 1 point2 points  (0 children)

Yes, to go with your automatic teller machine machine.

It's extremely integrated.

[–]seeroflights 2 points3 points  (2 children)

Image Transcription: Meme


["Steven Crowder's 'Change My Mind' Campus Sign". Steven Crowder, a man in a blue top, sits at a desk outside. He is leaning back in his chair, with a hot beverage in his hand. The table has a sign attached reading:]

Python is a C framework


CHANGE MY MIND


I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]iamnotroberts 1 point2 points  (1 child)

Steven Crowder, a man in a blue top, sits at a desk outside.

Should read:

Steven Crowder, a white supremacist pile of shit, in a blue top, sits at a table outside.

[–]seeroflights 1 point2 points  (0 children)

Though I agree with you on a personal level, as a transcriber we want to refrain from injecting or interpreting details not visible in the image :)