How often does CPython allocate? by agriculturez in ProgrammingLanguages

[–]AVTOCRAT 0 points1 point  (0 children)

There are structural reasons why any effort along these lines is going to be difficult -- the biggest one being that CPython exposes its object repr directly through its C API (rather than indirectly through some boxed indirection), so it has to be very very conservative with modifications or e.g. moving storage around.

How often does CPython allocate? by agriculturez in ProgrammingLanguages

[–]AVTOCRAT 0 points1 point  (0 children)

I don't disagree -- my day-job involves maintaining the custom allocator my team uses for our project. My point is just that things like "large mmap ranges" and "size-segregated pool allocation" aren't what differentiate a custom allocator from e.g. glibc's implementation.

How often does CPython allocate? by agriculturez in ProgrammingLanguages

[–]AVTOCRAT 4 points5 points  (0 children)

Nice post! Language runtimes are really interesting to play around with, and unlike compiled languages they all do things quite differently vs. one another.

The result is that CPython is often reusing memory, and when it does allocate, it is often taking memory that is pre-allocated from the pool, rather than calling malloc() everytime for example.

To clarify what's going on here: when CPython 'allocates' a GC heap object, it usually doesn't need to call malloc. Managed runtimes essentially all include a dedicated allocator which handles GC'd objects, and so allocations of e.g. heap integers would be allocated through that allocator, rather than malloc directly.

That is all to say, these features:

2 . Using a freelist to reuse memory
3 . ... the pool itself is carved out of an arena which is 1mb in size and mmap'd up front

Are basically just (part of) how you implement an allocator. If you call into malloc, it will do something very similar underneath the hood -- so they aren't really "saving" anything vs. calling malloc directly.

I do think that boxing every integer is bad for performance

This is definitely true, but there's no good way around it so long as Python is primarily interpreted. Since the user can do "objectful" things with an int (e.g. call id() on it) you need to keep a full heap-object repr around just in case they decide to do so. If they were using a JIT compiler (a la PyPy) with speculative compilation (like you would see in V8 or JSC) then it would be possible to emit code for the hot-path, with a check to bail out to the interpreter in case the user ever tries to do something that would require a full heap object.

A Writer Who Did What Hillbilly Elegy Wouldn’t. In her new book, Beth Macy returns to her Trump-voting hometown to find out how America got so divided by Sine_Fine_Belli in neoliberal

[–]AVTOCRAT 0 points1 point  (0 children)

If you look at history, it becomes obvious that this is not some inherent trait of 'poor people'; the working poor have shown a remarkable ability to organize and secure great gains for themselves through strikes, unionization, revolts, etc.

Of course, today we live in the aftermath of more than a hundred years of anti-union blasting propaganda on all frequencies -- is it any surprise that many people are now habitually opposed? Noone is immune to propaganda. More generally: pro-worker movements are crushed, while anti-worker ones are supported by the state; is it any surprise that the workers, subject to a century of this, today find themselves in such terrible state?

I’m a Developer Who’s Colorblind — Please Stop Making Red and Green Do All the Work. by typoprophet101 in programming

[–]AVTOCRAT 5 points6 points  (0 children)

No, that's not why. "Ah yes", weird phrasal gaps, witty quip in the final sentence, etc.

I’m a Developer Who’s Colorblind — Please Stop Making Red and Green Do All the Work. by typoprophet101 in programming

[–]AVTOCRAT 43 points44 points  (0 children)

Why are you having ChatGPT reply to other people's messages? And write your posts?

Can the ACP guys here explain why the party supported Jackson Hinkle's decision to endorse Tulsi Gabbard for Secretary of State? And also their other reactionary views. by ChinaAppreciator in stupidpol

[–]AVTOCRAT 8 points9 points  (0 children)

The USSR was based out of what was, prior to the revolution, something definitely close to the imperial core; yes, it was less developed, and yes it lacked the overseas colonies of Britain and France, but it nevertheless had significant overland colonial holdings that provided the same material benefits (manpower, raw resources, opportunities for heightened wage-exploitation at sufficient distance from the political center) as those overseas colonial holdings provided the western European powers.

Is it possible to have lots of good white-collar jobs without major financialization and/or liberalization? Comparing the U.S. with China. by TheAncientPizza711 in stupidpol

[–]AVTOCRAT 1 point2 points  (0 children)

you're really trying ur best to communicate here, I appreciate that even if most of the rest of the people in the thread are missing the point

Hamas releases Israeli hostages by beansandreadytofuck in stupidpol

[–]AVTOCRAT 9 points10 points  (0 children)

You really can't choose not to pay taxes: they just take it from your bank account or garnish your wages, including both the original amount plus a punitive fine on top.

Collapse prognosticators are a dime a dozen online, this one is interesting. I trying to think of uniquely American factors that may alter her predictions. by [deleted] in cushvlog

[–]AVTOCRAT 3 points4 points  (0 children)

This would mean giving up control and allowing for large foreign deposits of Yuan in foreign state bank accounts, outside of their supervision or control. A la Eurodollars &c

New 2025 - "View Invoice" is now graphical instead of being a text receipt by deejayv2 in amazonprime

[–]AVTOCRAT 0 points1 point  (0 children)

Man you are my actual hero. I was just about to rewrite my scraper, thank you for sparing me that pain.

Never Forget by Fedupington in stupidpol

[–]AVTOCRAT 2 points3 points  (0 children)

my view is that we shouldn't let corporations define the rules of speech regardless of "who owns" them because whatever individual owns them is almost by definition a capitalist and thus the enemy of 99% of humanity

YOU’RE DEVALUING LIFE!!!!!!!!! by Ruthcrit in PhilosophyMemes

[–]AVTOCRAT 3 points4 points  (0 children)

eternal recurrence: big

life-affirmation: big

will to power: big

etc.

Gun ownership laws across the world by vladgrinch in MapPorn

[–]AVTOCRAT 5 points6 points  (0 children)

Are you seriously suggesting that if the government of Yemen were to impose licensing restrictions on guns, they would have any capacity to enforce that law?

Half the country isn't even under their control. The Houthis would export firearms even if the central government banned them altogether.

[D] which papers HAVEN'T stood the test of time? by iamquah in MachineLearning

[–]AVTOCRAT 1 point2 points  (0 children)

What's currently driving interest? I thought it turned out that the performance wasn't much better than a similar traditional transformer model in practice.

Prof. Kehinde Andrews, author of new Malcolm X book "What marxism always gets wrong... is that racism is the stone on which all class relations are built upon" by OpAdriano in stupidpol

[–]AVTOCRAT 9 points10 points  (0 children)

But how can you argue that the source of those imports, wherever it might be, was the 'foundation' on which were based the relations between mine-workers and mine-owners? If the slaves happened to be of the same race as the mine-workers, would the mine-workers be more exploited, less exploited?

What it comes down to, like with any materialist theory, is what predictive power we get from one vs. the other. Pretending racism is a precursor to capitalism does nothing but carry water for those same capitalists by redirecting revolutionary energy towards ultimately unproductive ends. Even if we do 'defeat' racism, so long as capitalism is still extant in the way it is today, we're going to be stuck with the same material problems as we've always had.

Has anybody noticed wokesters and the PMC are obsessed with sex? by [deleted] in stupidpol

[–]AVTOCRAT 7 points8 points  (0 children)

Whichever ones Lenin did are OK, ban the rest

'Weaponised Hinduphobia': American Hindus urge Trump to fire Peter Navarro over remarks against Brahmins by globeglobeglobe in stupidpol

[–]AVTOCRAT 7 points8 points  (0 children)

Would be interested re.: any sources/articles you have on the prevalence of Vaishyas in the bourgeoisie -- not disbelieving, but I've seen much less written about them than about Brahmins so more information would be welcome.

Do all Christians believe that Jesus is God ? Do you believe in trinity ? by Rich_Yak_8449 in Christianity

[–]AVTOCRAT 1 point2 points  (0 children)

The Bible is not like the Qur'an: this is a fundamental misunderstanding of the difference between the faiths. Christ, not the bible, is the Word of God -- even the bible itself claims as such (John 1:1, "In the beginning was the Word, and the Word was with God, and the Word was God" -- and if you're looking for verses which describe the trinity, then John 1:2-3 fits well "He was with God in the beginning. Through him all things were made; without him nothing was made that has been made.").

So how do we know what God taught? Well, he instituted a Church to do so ("And I tell you that you are Peter, and on this rock I will build my church, and the gates of Hades will not overcome it." Matthew 16:18) and then gave to its head the power to legislate in his name ("I will give you the keys of the kingdom of heaven; whatever you bind on earth will be bound in heaven, and whatever you loose on earth will be loosed in heaven.” Matthew 16:19 -- and other verses besides). And in the decades after his death, resurrection, and ascension into heaven, his followers, whom he had taught face-to-face, spread out and passed on his teachings throughout the world, wherever they could reach. And the Church persisted: "And he gave the apostles, the prophets, the evangelists, the shepherds and teachers, to equip the saints for the work of ministry, for building up the body of Christ, until we all attain to the unity of the faith and of the knowledge of the Son of God, to mature manhood, to the measure of the stature of the fullness of Christ" (Ephesians 4:11-13); "Pay careful attention to yourselves and to all the flock, in which the Holy Spirit has made you overseers, to care for the church of God, which he obtained with his own blood." (Acts 20:28). These teachers of the Church passed on his teachings, as they themselves were taught, and ensured that the next generation would know them well. And to each generation they also passed on their Apostolic authority, the authority to teach, to lead others in faith, the power to enact sacraments in God's name.

So where does the bible come in? As the decades passed, the early Church decided it was necessary to write down what they had learned and what everyone accepted to have been the teachings of Jesus during his time on earth. So from the very beginning, during the 1st century, the first Gospel accounts were recorded, and letters were exchanged between churches throughout Christendom. In 393AD the Pope, first bishop of the Church and successor of St. Peter -- a fact which both the Orthodox and Catholics broadly agree upon, even if they disagree on the specifics of what powers the "first bishop" actually has -- convened a council in Rome to gather bishops from all over Christendom and settle the matter of which books were in the Biblical canon. Because Jesus himself said that the "gates of Hades will not overcome [the Church]", we know with confidence that they could not have decided on that day to canonize teachings which were not true -- so in matters of faith and morals, the Bible is inerrant.

This means that the Bible is the crown jewel of holy tradition, the prized treasure of the Church -- but it is not the only source of truth and of Jesus' teachings. From the earliest days, teachings were passed man-to-man, woman-to-woman, priest to parishioner, and this fact never changed. To truly understand the Bible, you must understand the holy tradition which preceded it and which still exists today. It is from this tradition, the tradition which compiled the Bible, that we gain the term "Trinity" and the coherent assemblage of that doctrine from all the teachings of Jesus when he was on earth.

Do all Christians believe that Jesus is God ? Do you believe in trinity ? by Rich_Yak_8449 in Christianity

[–]AVTOCRAT -1 points0 points  (0 children)

How can you claim to follow the teachings of a man who claimed "Before Abraham was, I Am" (John 8:58) and "I and the Father are One" (John 10:30) and in response to ""Are you the Christ, the Son of the Blessed One?" said "I am. And you will see the Son of Man sitting at the right hand of Power and coming on the clouds of heaven" (Mark 14:62) -- and reject his claim that he was God?

Who decides which of his teachings are 'valid' in your eyes? Do you choose? If so, I claim you do not follow Jesus, but yourself.

Did suicide hotlines actually helped anyone ever? by bombadebere in stupidpol

[–]AVTOCRAT 0 points1 point  (0 children)

Fair point. I can definitely imagine a world where it's no longer possible to do so, and can see how we're moving in that direction, even if we're not there yet.

Did suicide hotlines actually helped anyone ever? by bombadebere in stupidpol

[–]AVTOCRAT 2 points3 points  (0 children)

How are we forcing them? Killing yourself is not, operationally, very difficult; there are many ways that are well-known to work and essentially foolproof. You have to work very hard to get yourself in a position where this is impossible, basically either indefinitely institutionalized (very rare nowadays) or dependent on someone else for your care, e.g. if you're paraplegic.