Readit News logoReadit News
chunkyguy commented on Top Programming Languages 2025   spectrum.ieee.org/top-pro... · Posted by u/jnord
chunkyguy · 3 months ago
If there is HTML in the list then why not JSON?
chunkyguy commented on Object-oriented design patterns in C and kernel development   oshub.org/projects/retros... · Posted by u/joexbayer
moregrist · 4 months ago
> In Smalltalk and Objective-C, you just check at runtime whether an object instance responds to a message. This is the original OOP way.

This introduces performance issues larger than the typical ones associated with vtable lookups. Not all domains can afford this today and even fewer in the 80s/90s when these languages were first designed.

> It's sad that OOP was corrupted by the excessively class-centric C++ and Java design patterns.

Both Smalltalk and Objective-C are class based and messages are single-receiver dispatched. So it’s not classes that you’re objecting to. It’s compile-time resolved (eg: vtable) method dispatch vs a more dynamic dispatch with messages.

Ruby, Python, and Javascript all allow for last-resort attribute/message dispatching in various ways: Ruby via `method_missing`, Python by supplying `__getattr__`, and Javascript via Proxy objects.

chunkyguy · 4 months ago
> This introduces performance issues larger than the typical ones associated with vtable lookups.

Don't know about other programming languages but with Objective-C due to IMP caching the performance is close to C++ vtable

  Name Iterations Total time (sec) Time per (ns)
  C++ virtual method call 1000000000 1.5 1.5
  IMP-cached message send 1000000000 1.6 1.6

https://mikeash.com/pyblog/friday-qa-2016-04-15-performance-...

chunkyguy commented on I want an iPhone Mini-sized Android phone (2022)   smallandroidphone.com/... · Posted by u/asimops
GarnetFloride · 5 months ago
What was so odd was how Apple fumbled the iPhone mini launch by launching the iPhone SE first. At that point there hadn't been a small phone for a few years, There was pent up demand. The SE came out and it was a big success, lots of people wanted ti because it was a small phone.

Then few months later they launched the mini expecting it to sell even more or something. Somehow they missed that everyone that wanted a small phone had just bought the SE, and it just wasn't long enough for them to be worth upgrading to the much better mini.

Had they waited for a year to pass the mini might have done much better because those who wanted a more powerful phone could find an excuse for an upgrade after a year, less then 6 months, not so much.

chunkyguy · 5 months ago
This is so true. I switch from iPhone 5s to iPhone SE to iPhone 13 mini. After my current phone dies I don't know what phone would I get next.
chunkyguy commented on Is this the weirdest thing in C?   craftofcoding.wordpress.c... · Posted by u/rbanffy
chunkyguy · a year ago
C has many syntactic sugar and [] operator is one of them. -> is another popular one.
chunkyguy commented on Chimpanzees' performance on computer tasks changes when people watching them   cell.com/iscience/fulltex... · Posted by u/giuliomagnifico
akira2501 · a year ago
> The significance of witnesses to humans under various contexts could be explained by the importance of reputation management to our species.

It could also be explained as the researches accidentally recreating "Clever Hans."

https://en.wikipedia.org/wiki/Clever_Hans

chunkyguy · a year ago
> After a formal investigation in 1907, psychologist Oskar Pfungst demonstrated that the horse was not actually performing these mental tasks, but was watching the reactions of his trainer.

Sounds like machine learning

chunkyguy commented on Should JavaScript be split into two languages?   devclass.com/2024/10/22/s... · Posted by u/em-bee
chunkyguy · a year ago
> The tooling idea is particularly appropriate for JavaScript since many developers actually code in TypeScript and rely on compilers such as Babel, Webpack or the TypeScript compiler to output JavaScript.

Hot take

chunkyguy commented on Ask HN: How do apps get into Apple App Store pretending something they are not?    · Posted by u/cosmorocket
chunkyguy · a year ago
Can you not simply use a feature flag that you control remotely to toggle the app between fake and real modes? You just need to toggle the flag on when submitting for review
chunkyguy commented on Göttingen was one of the most productive centers of mathematics (2019)   theconversation.com/how-o... · Posted by u/marvinborner
lkrubner · a year ago
Sadly, this article does not answer the question of why such a concentration of brilliance developed at Göttingen. If we wanted to build a new Göttingen, how would we do it? What factors allowed Göttingen to exist? For most of a century, Germany was leading in most scientific and academic fields, but what allowed this? When we think of the Golden Age of physics we are thinking of a cultural event that had its center in Germany, but why? And why has Germany been so dull and flat ever since? Clearly, building a liberal democracy is not enough to ensure such a cultural event. Much of Germany was liberal but non-democratic during its golden age, as other places were, but what made Germany special at this time?
chunkyguy · a year ago
this sounds like a good explanation:

> University of Göttingen had more academic freedom than generations past. They were promised intellectual autonomy and freedom from close religious supervision. Instead, they were recruited solely to advance knowledge and carry out original research. The education of students was also more egalitarian than it had been previously in Europe, as both rich and poor were admitted and trained.

chunkyguy commented on C-Macs – a pure C macOS application   github.com/CodaFi/C-Macs... · Posted by u/dgellow
chunsj · 2 years ago
It seems that the code is the result of the ObjC preprocessor. :-)
chunkyguy · 2 years ago
There's also `clang -rewrite-objc` that "Rewrite Objective-C source to C++" which does the same trick of mapping objc code to `objc_msgSend`

https://clang.llvm.org/docs/ClangCommandLineReference.html#c...

chunkyguy commented on Swift for C++ Practitioners, Part 1: Intro and Value Types   douggregor.net/posts/swif... · Posted by u/ksec
turdprincess · 2 years ago
Id be interested in a C++ for Swift developers version.

u/chunkyguy

KarmaCake day149March 2, 2013
About
I make apps and games. https://whackylabs.com
View Original