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

> Stanza provides an optional type system, garbage collection, and a multimethod based object system. But if you don't like Stanza's object system, there is no way to write your own. This is one of the main directions of programming language research. Can we design a language so expressive that library writers can easily write the most appropriate object system, or most appropriate type system, to fit their application? Perhaps one day we'll have such a language.

We already have it. It's an obscure little language called C++. Tise interested in those kinds of extensions to a language should look into Herb Sutter's experiments with cppfront: https://hsutter.github.io/cppfront/welcome/overview/


C++ is most definitely not it.

Lisp is what you are after if you want to include some object system as a library, or a new type of switch statement as a library or a new kind of if statement as a library.

C++ can do none of that.


C++ can do some of that. Let's say I want an if statement that takes an integer and three blocks of code. It executes the first block if the integer is less than zero, the second if it is zero, and the third if it is positive.

OK, if you squint enough that by "block of code" you mean closure, or function object, then I can write that in C++. I can make the if statement a free-standing function (that is, not a member of a class), and add it to any library I wish.

Now, you can say that it's going to be tedious to use that, because you have to set up three closures every time you want to call this "super if". And you'd be right, but that's a different argument.


One problem is that closures don't actually behave like blocks. Consider that you might want to use this three-legged-if inside a loop. If it's a real statement, then those branches can have `break;` and `continue;` statements which affect the surrounding loop. If those branches are just closures being passed to a function, then they can't.

> OK, if you squint enough that by "block of code" you mean closure, or function object,

But we aren't squinting here; those closures can't perform a return where your `new-if` function is being used, they can't perform a `return` like a proper `if` can, you can't goto, or break or continue.

It's just a function taking functions, with all the restrictions that that entails.


How can you declare new syntax in C++? Wouldn't it just be a function call?

Yes, a function call. Not new syntax. But as a function, it would be trivial to add to a library.

My point was that you can often get the effect you want with no new syntax. (Cue 10,000 replies that state "but you can't get this effect without new syntax!" Perhaps not. Many of those tend to be rather contrived, though. I'm more sympathetic to the argument that new syntax would make something less clumsy. If it's something you need to do a lot, that matters.)


Yes - I see what you mean. There are degrees of ease of use at between - at the extremes - what writing assembly provides, which technically can do it too, and what something like, say, Haskell provides. C++ is of course closer to Haskell than Assembly, but there's still quite a headache in using your solution that is down to absent C++ language features.

You can always use macros! Just look at how beautiful and elegant and easy to learn and transparent to debug the Microsoft C++ MFC COM/OLE/IDispatch/ActiveX object system macrology is. /s

https://learn.microsoft.com/en-us/cpp/mfc/tn038-mfc-ole-iunk...


C++26 reflection alongside compile time code execution, and template metaprogramming, can already do a lot.

It is the best way? Probably not, but we seldom get to chose what mainstream languages win out on the field.


The two fields in the struct are expected to be false unless changed, then initialize them as such. Nothing is gained by leaving it to the compiler, and a lot is lost.


I think the point is that sometimes variables are defined by the language spec as initialized to zero, and sometimes they aren't.

Perhaps what you mean is, "Nothing is to be gained by relying on the language spec to initialize things to zero, and a lot is lost"; I'd agree with that.


Please don't be pedantic. Compilers implement the standard, otherwise it's just a text document.


Not trying to be pedantic. When I hear "leave it to the compiler", I normally think, "let the compiler optimize it, rather than optimizing it yourself". The compiler is doing the initialization either way, but in one case you're relying on a correct understanding of minutiae of the language spec (both for you and all future readers and writers of the code), in another case you're explicitly instructing the compiler to initialize it to zero.


Yes and I'm saying that in this case the correct and practical choice is to be explicit. No one needs to go read the standard to know that two fields defaulted to false in the strict definition are defaulted to false...


Compilers implement the parts of the standard they agree with, in the way they think is best. They also implement it in the way they understand the standardese.

Read a complex enough project that's meant to be used across compiler venrdos and versions, and you'll find plenty of instances where they're working around the compiler not implementing the standard.

Also, if you attended the standards committee, you would hear plenty of complaints from compiler vendors that certain things are implementable. Sometimes the committee listens and makes changes, other times they put their fingers in their ears and ignore reality.

There are also plenty of places where the standard lets the compiler make it's own decision (implementation defined behavior). You need to know what your compiler vendor(s) chose to do.

tl;dr: With a standard as complex as C++'s, the compilers very much do not just "implement the standard". Sometimes you can get away with pretending that, but others very much not.


Who said compilers "just" implement the standard?

The standard (to the extent that it is implemented) is implemented by compilers. At this point this whole thread has nothing to do with my original point, just weird one-upping all around


What prepares one to read Finnegan's wake?


>What prepares one to read Finnegan's wake?

Listening to Joyce read it aloud: https://m.youtube.com/watch?v=M8kFqiv8Vww&pp=ygUcam95Y2UgcmV....

I had so much trouble trying to read him before understanding the intended pacing. It's more poetry than prose.


This was my experience, too. A Skeleton Key To Finnegan's Wake by Joseph Campbell helped me understand the overall themes of the book, and hearing Joyce read it helped me appreciate the language and the rhythm of the words. I found it more approachable once I saw it as a story told in wild poetic dream sequence imagery.


Your previous readings of Finnegans Wake are your preparation for your next one.


Absolutely nothing, just let it carry you. I'd recommend a skeleton key after going through it the first time if you want to go deeper.


The only thing I know about it is that the book is supposedly the inspiration for the naming of the quark. I feel as if this satisfies any obligation I have regarding it.


It's been sitting on my shelf for a few years now. I take it out and read a couple of pages each time and then put it back. Keep thinking I should buy a guide to reading this book but never got around to it.


Even a short summary of the Wake can suffice to get you started. You're never going to understand it all, and that's okay, but even a brief chat with a Wake fan can give you the basic clues of its structure and the HCE/ALP Shem/Shaun dualities. I think it's a mistake to spend time with guidebooks than with the text itself if you want to read it for pleasure as opposed to writing a thesis on it. At least, postpone the guides until after your first trip once around.


Thanks, this is useful!


I think Finnegan's Wake is meant to be listened to, not read.


A little bit Ulysses, a little bit knowledge of every language ever.


It took me 20 years to read Ulysses and I still don't know what happened in it.


You might consider visiting Dublin on the week of June 16th and partake in the readings and pub crawls... though there are other Bloomsday commemoration events. That said, the only time I've stumbled across this was trying to find a seat in an Irish pub in the early '00s and being confused as to why it was that busy that night.


Willingness.


Is Debian linked to Canonical? Isn't tat Ubuntu?


Ubuntu is built on top of Debian


Sure. But Ubuntu and Debian are distributed by different organizations. Canonical does not distribute Debian.


Qbs is deprecated. Building with qmake is still supported for end users of the Qt framework. For building Qt itself, since Qt6, the build system was moved to CMake.


> “Fake it until you make it” is often dismissed as shallow, but it’s closer to Franklin’s truth. Faking it long enough is making it. The repetition of behavior, not the sincerity of belief, is what shapes character. You become the kind of person who does the things you repeatedly do.

Then you become the kind of person who fakes things?


I have read it in the past as a way to deal with imposter syndrome. You push past it by believing that you're tricking the system by faking it despite your own perceived inadequacy, when in fact you are performing perfectly fine. You do this until the results of your work are evident enough to ward off imposter syndrome. If you are indeed doing bad fake work then I guess this would fall apart, yes.


Exactly, and it has the potential to really burn others as well as yourself, when they do their work/job on top of what you claimed you had. I am not a fan of the "fake it til you make it" approach.


From the video:

"The most advanced AI is not conscious. It actually has an entirely different basis. It is not alive. It has no body. It has no feelings. It does not participate in some sort of struggle for survival or anything like that. It doesn't actually care about what it's doing.

The point is not really whether it is more or less intelligent than a human being, which people seem to be obsessed with answering. As I've said, it's already superhuman in many ways. In other ways, it can be very very stupid. But they are fundamentally different things. It's an extension to our consciousness that we have made which if used correctly would have tremendous advantages for ourselves, allowing us to save energy and discover new materials. If we had a socialist society it would allow us to plan the economy much better because we could centralize all the data and allow AI to spot patterns.

It is a tremendously powerful thing but it also rather limited and one-sided. But that's not a bad thing. That's not a mistake. We ont want something that's somehow independently conscious, we already have humans for that, and we know how to create new human beings.

There is no magic ingredient to consciousness. There's no mystical property to it that we haven't yet discovered. There's no "perceptronium" out there. No new state of matter that needs to be discovered and understood. It is not a direct product of the soul of some technical wizardry of the brain.

To understand it scientifically we have to grasp the role of consciousness in society. To understand anything you have to be active. You don't understand something by just being passive and having no interest in it. Therefore of course it's no coincidence that the ones who really understand society the best are the ones struggling to change it, who then discover how society really is, without illusions, in other words Marxists, communists. And it's in the struggle to change society that we really become self-conscious as human beings, where we understand what society is without illusions. And when we take control of society in our hands properly as a species, collectively, that is when we will really understand what we are doing and why and adjust our behavior accordingly. So that we may finally live to our full capacities, and not live in this kind of confused and alienated existence that we do under capitalism."


Alien or syntethic life will have to go through similar challenges to those that shape human life, human intelligence and our consciousness. No text prediction machine, no matter how complex or "large", has to change its evolving environment and itself, for example.


What you are talking about is experience/knowledge, not raw intelligence.

It has been proven that a Turning Machine and Lambda Calculus have the exact same equivalent expressiveness, that encompasses the _entire set_ of computable functions. Why are you so sure that "text prediction" is not equally expressive?


Why are you so sure that reality is reducible to your notion of computation, whatever that is?


I'm all ears if you want to explain how you have a magic soul that is too important and beautiful to ever be equalled by a machine. But if intelligence is not equivalent to computation, then what is it? Don't take the easy way out of asking me to define it, you define it as something other than the ability to successfully apply computation to the environment.

Was Hellen Keller not intelligent because she lacked the ability to see or hear? Is intelligence defined by a particular set of sense organs? A particular way of interacting with the environment? What about paraplegics, are they disqualified from being considered intelligent because they lack the same embodied experience as others?

Whenever you give someone kudos for being brilliant, it is always for their ability to successfully compute something. If that isn't what we're discussing when we're talking about intelligence, then what are we discussing?


Yes, put words in my mouth and then ask me to defend them. Clearly I expressed support for the view that humans have a "magic soul that is too important beautiful to ever be equalled by a machine"...

On the other hand, you are clearly stating that intelligence is computation. But you're right, it would be too easy to ask you to define what any of those words mean AND to back that claim.


I've done my best to express a logical argument for my assertions. I've defined what I mean by intelligence, and given examples of humans who lack major senses or physical capabilities, and yet are still considered intelligent; attempting to argue that intelligence is not tied to any physical characteristic, but is rather a dexterity and facility with computation. I haven't yet grokked what you're actually arguing, though. You just seem to dislike the idea of intelligence being compared to computation, but I don't know what you're offering as an alternative.


The supposed target of this game do not at all match who can actually play it. Kids don't have Macs. Those who want to hack don't have iPhones. I would even say that a kid with an iPhone will never get the necessary curiosity about computers to want to hack anything.


My son has been highly motivated to learn about hacking in his iPad to hack some of the games they play for school (blooket and prodigy). Those are web based games, true, but fiddling with the dev console, editing the dom, and finding and pasting scripts, is not nothing.


>> the dev console, editing the dom, and finding and pasting scripts, is not nothing.

this is awesome, but way easier on a cheaper, more accessible device.


I think it's fair to say that the most accessible device is the one they are already using.


This is categorically not true. Source: watched a bunch of people enter the jailbreak scene


I was with you up until the last statement which does not seem plausible at all. Curiosity about computers is not something you are born with.


Curiosity is not something you are born with, yes. It's influenced by the experiences you have. I don't think iPhones allow for the experiences that push kids to want to hack things. It is pretty much a sealed environment where all details about how the computer works is hidden behind some app. Even access to the filesystem (iirc from my 2014 experience) is hidden away (like being unable to access your picture files except through the gallery app). That kind of environment stiffles curiosity imo.


i think this is a terrible assumption to make. the computer or phone a kid gets from their parents has nothing to do with their curiosity, intelligence, interests or ambitions.


I am no hacker, but for me it was exactly this which made me go What?!


Why would people who want to hack not have iPhones?


What non-biological systems do we know of that have consciousness, sentience or emotions?


We have no known basis for even deciding that other than the (maybe right, maybe wrong) guess that consciousness requires a lot of organized moving complexity. Even with that guess, we don't know how much is needed or what kind.


It’s frequently pretty funny, anyway.


This sounds like a bot comment.


Well, you do tend to repeat yourself, maybe ChatGPT really is your peer with language?


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

Search: