Hacker Newsnew | past | comments | ask | show | jobs | submit | steve_gh's commentslogin

One correction I'd make to the article's taxonomy: Ruby is an object oriented language not an Algol. Its inspiration is Smalltalk, and much of the standard library naming comes from that route (eg collect rather than map).

Ruby is object oriented from the ground up. Everything (and I do mean everything) is an object, and method call is conceived as passing messages to objects.

While Ruby is most often compared to Python (an Algol), they come from very different evolutionary routes, and have converged towards the same point in the ecosystem. I think of Ruby as a cuddly Alpaca compared to Python's spitting camel.


Since Python introduced new style classes, it also became a pure OOP language, even though it might not look like it at "Hello World" level, all primitive types have become objects as well.

I love to point this out to OOP haters,

    >>> type(42)
    <class 'int'>

    >>> dir(42)
    ['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_count', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'is_integer', 'numerator', 'real', 'to_bytes']


I have found the definition of OOP to be fuzzy. For example, I don't see why having methods would make a data type object oriented. I associate OOP with factories, inheritance, using classes in places that might be functions otherwise, and similar abstractions.

Perhaps this is the counterfactual: I program in Python regularly, but don't program in an OOP style; I use dataclasses and enums as the basis, in a way similar to Rust, which by some definitions can't do OOP. So, if Rust can't do OOP (assumption) and I can write Python and Rust with equivalent structure (Assumption), does that mean Python isn't strictly OOP?


Rust can definitely do OOP, not only I could easily convert "Raytracing in one Weekend" from C++ into Rust, while keeping the same design, Microsoft has no issues adding a Rust projection for COM/WinRT, which are OOP ABIs.

However that is not the same as Python, which is 100% OOP, when using basic stuff like numbers, from Python language semantics those things are object, and there is the whole machinery in place even for basic stuff like addition.

And yes OOP is fuzzy from CS point of view there are multiple approaches and it doesn't get reduced to the way C++ and Java do it, just like FP and LP are fuzzy as well.

Some folks would swear if it isn't Haskell or Prolog, than it isn't FP or LP, when a CS book and programming language evolution will be more fuzzy.


> if Rust can't do OOP (assumption)

Rust handles basic OOP, but not all of the characteristics seen in C++ or Java:

https://doc.rust-lang.org/book/ch18-01-what-is-oo.html


If that's enough to make a language pure OOP, then Common Lisp is also a pure OOP languge:

  CL-USER> (class-of 42)
  #<BUILT-IN-CLASS COMMON-LISP:FIXNUM>


If you're class of `42, you're probably a Lisp graybeard.


Common Lisp Object System and The Art of Metaobject Protocol.

Yes.


This is very cool, and I did not know this. Thank you!

I wonder if my formal university python training predated this change (~2010), or if the professors were themselves unaware of this.


They were unaware of it, or unwilling to talk about it, article from 2002, about changes introduced in 2001

https://gnosis.cx/publish/programming/metaclass_1.html

https://www.python.org/download/releases/2.2/descrintro/


> I love to point this out to OOP haters

That seems like a pretty lame gotcha--saying "Aha! The language you write in uses your hated paradigm under the hood" seems to invite the immediate response of "So? I don't use it."


It is more about those that proudly use Python because it isn't an OOP language, yep those do exist.


I think the choice to identify a specific ur-language as "Object oriented" throws people off since OO is just a style of programming in the same way that procedural is. I don't think it's useful to say that Python and C++ are both the same kind of language because they both have multiple inheritance, rather that's just an observable commonality, like noticing that both Delhi and Vegas are too hot. Yeah, but I don't think that's because they're the same kind of place...


Object-oriented programming is less of a syntax and more of a philosophy. While Erlang’s syntax belongs to the ML family, its creator, Joe Armstrong, argued that Erlang aligns more closely with the original OOP philosophy defined by the inventor of Smalltalk than Java does: 'The essence of object-oriented programming is messaging, not classes and inheritance.'


Yeah, but the thing about Vegas is that it's really more of a dry heat


Compared to Delhi? Ok. But I've had a soaking uncomfortable shirt every time I've been to Vegas, while in Phoenix it evaporates quickly.


Aren't camels a Perl thing?


> Aren't camels a Perl thing?

That's a deep cut. :-)

For anyone reading this, O'Reilly was once legendary for their cover-art mascots.


Kids those days. There's always one explaining the joke to others.


They're just doing their bit for today's lucky 10,000. Which, if you're unaware, is a reference to this XKCD comic: https://xkcd.com/1053/


Ruby keywords are not objects.


Both object oriented and an Algol.


How does this help? 99% of the population aren't technically minded enough. Most people just buy a wifi router, plug it in (maybe having read the instructions) and that's it. They have neither the skills nor the inclination to update firmware.

The real problem is: assuming that firmware can be updated, how do you run a nationwide update programme overcoming a population that doesn't really care or have the skills to do it.

Vehicle safety standards (mandated annual safety checks like the UK MoT test) is the closest analogy I can think of - in the UK you can't insure your car without a valid MoT. If you were serious, then maybe tying ISP access to updated router firmware would be the way to go.


Automatic updates. Now it also applies to cars.


Are there are other flavours of proton still to be discovered? Can you (theoretically) build a proton with any two quarks selected from {up, charm, top} and one selected from {down, strange, bottom}?


Yes, also mixes like up+top+strange. There is a list in https://en.wikipedia.org/wiki/List_of_baryons but note the note:

> Particles with † next to their names have been predicted by the Standard Model but not yet observed.

---

There are some technical details, because QM rules makes everything more complicated and you can potentially have a mix of quarks. I (mis)remember something weird in barions, but I can't find what it was.

But there is something weird in mesons. For example the pi_0 is 50% up+antiup and 50% down+andidown . More details inhttps://en.wikipedia.org/wiki/List_of_mesons


Good questions…

Another one: Is this newly discovered particle stable, or does it only exist for a short time before transforming in some way? I didn’t see any mention of that in the article.

Is it theoretically possible to have atoms with 4x the proton mass, starting with hydrogen at atomic weight 4? Pu-239 could theoretically have an atomic weight of 521 instead of 239… Wild!


It's not stable, and no it's not theoretically possible.

A proton is the lightest stable baryon, and thus the only only stable one. It's not a coincidence - in particle physics if a lighter elementary particle is possible the heavier one will ALWAYS decay into it. "Whatever is not forbidden is mandatory." (Combination particles like atoms are more complicated because there are other things that might force the particle to exist.)


I agree.

The closest example I can remember is that you can have atoms with muons instead of electrons for a shot time ~2.2E-6 seconds, that is a pretty long time for for an unstable particle. You can do some chemistry in that "long" time. (Can you put a muon around a heavy atom like gold and get some extra time for special relativity corrections?)

If you want to replace protons, I guess you can try with "strange" particles instead of "charmed" particles. The difference of mass is small, like only a 10% more instead of a x4 increase. In particular, the sigma particle (up+up+strange) has a half life of ~2E-10 seconds that is shorter than the half life of a muon but much longer that the half life of this new particle. (I can find the number, but let me handwave a ~~~1E-22 seconds(???).)


Haven't read this article but I think the one I read yesterday about this said it was short lived on the millionth of a millionth of a second scale.


It's not actually a proton. And yes you can built a particle made from any combination. I posted elsewhere in the thread with a bit more details.


Lovely tales. I'm a keen climber - one of these stories has just explained to me why the fantastic sea cliffs at Gwennap Head are known as Chair Ladder.


Is the LLM acting as my agent? If the LLM has been exposed to the source code then have I been exposed to the source code? So in that case is a "clean room" implementation possible?


Brilliant! Loving it as an idea.

Maybe what it needs is a testing framework - Σωκράτης (Socrates), that will demonstrate to you that everything you thought you knew about how your programme would behave (or the thought underpinning it) was at best problematic, or at worst just plain wrong!


Good idea... a Socratic testing framework :) Taking PRs from anyone but I'll tinker on it soon.


Gloves: if you have to take them off outside, brush the snow off them first, then put them in an inside pocket. You will naturally sweat a little, so the gloves will be a little damp inside even if you don't notice it. If your gloves are in an inside pocket they stay warm. Otherwise you will find that your hands freeze when you put your gloves back on.


good tip, but gloves are like all season tires! winter = mittens!


I was somewhat dissapointed at the perspective :-) seeing the article was from morningstar.com, I was expecting a radical left wing critique of EU and US tech policy.

[The "Morning Star" is a left wing UK paper, whose editorial stance is in line with the Communist Party of Great Britain (morningstaronline.co.uk)]

Interesting article though.


I don't know if your wrong or right about "The Morning Star" but Morningstar.com is a financial firm specialized in research and recommendations. They have a lot's of influence relative to their relatively small holdings.


It's a joke. The Morning Star is well known in the UK as being the mouthpiece of the UK Communist Party. It was originally founded in 1930 as the Daily Worker, before becoming the Morning Starin 1966. So the idea of the Morning Star offering a critique of the tech policy of the decadent capitalist running dogs is intrinsically funny from a UK perspective.

But given the downvotes maybe there has just been a massive sense of humour across the pond...


They are asking the wrong question. The right question is about the trustworthiness of sources, not about whether AI was used.


What could possibly go wrong?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: