Listening to what ? To the dude that tells me that's not possible and proceeds to dump a big pile of authority on top of my head or to my own experiment that tells me another story ?
I would have preferred to be told:
- yes and no. You'll get warnings if you try to return a pointer to a local, however, doing this and that, you can manage to do it.
- but once you have achieved that, the result will be dependent on the way the stack is handled (not really in your control). You'll feel some comfort doing this in recursive calls, however beware of signal.h.
But this isn't the answer I received. I guess C programmers do not know the difference between what you can do (however risky) and what you shouldn't do. Also when someone asks such "weird" questions, do not assume he's a beginner with no notion of what constructs he can handle safely, maybe he's someone trying to find the limits of C – and once these limits are identified it can be a good conversation starter about C's internal and the way various compilers differ.
Edit: also downvotes on HN are not like downvotes on Reddit: there's actually a limit (-2 ?). Below this the comment disappears. Conclusion: only downvote when the comment engages in antisocial behavior (not respecting the rules or common human decency, etc ...), not when you disagree with it. I always upvote an unfairly downvoted comment for these reasons.
Went to an IRC chat room when I was learning C in school. Asked if you could return a pointer to something that lives on the stack. Was talked down by an all-knowing dude telling me to go read K&R again. Proceeded to write a code sample [1] that showed it is possible (it's not really stable but works reliably in recursive calls IIRC).
I do not like this attitude (then again it was just one random dude).
Officially I work 35h/w. A little less than 40k€. Senior level. Very efficient. I think my actual hourly pay is under the minimum wage. No overtime pay of course.
Although I have never used Julia, this is something that is possible in Ruby, and I think this feature is seriously underrated – i.e. to be able to jump quickly to the definition of external code, modify it and run it. When you work with multiple libraries/repo this is very valuable when debugging, saves a lot of time.
It should also be possible with Node.js I think (node_modules).
Some people get high on big frogs in Arizona. Or so said the urban legend. And then a few weeks ago Youtube suggested me a video (Joe Rogan maybe ?) where the differences between ayahuasca DMT and frog DMT were discussed. In the comments someone said. "It happened to my chihuhua ! I was walking my dog (I'm from Arizona) when that huge frog squirted his venom at her. The poor animal convulsed for 30 minutes."
Also beware of that kind of pseudo-wise thinking. Is there a point in climbing up a learning curve anymore ? Maybe you have a constant and massive stream of fresh bodies to throw at your "simple" solutions before laying them aside once those abstractions have clogged up their heads ... And maybe if you can unskilled workers at such a scale, it's because you have massive fundings as well...
More a question of financial optimization than software engineering I think
A few remarks on methodology in linguistics (the science).
A phone is a class of sounds (as opposed to their instances which are all unique) that can be reliably described by articulatory or acoustic features (phonetics) or by patterns found in EEG (I'm thinking of MIT's voiceless mic).
A phoneme is another type of "sound" class used in linguistics and it is arguably the more important: phonemes, as studied in the context of a particular language, is the finite set of sounds (a few dozens at most) from which you build different words in that language. Phonemes always come in pairs, since they are defined as the minimal distinctive linguistic unit that can yield a difference in meaning.
Substitute /p/ with /f/ in/fear/ and you get /pear/, i.e. another word, a difference in meaning --> thus /p/ and /f/ are phonemes.
But substitute /r/ with /rrrrr/ in /Braveheart/ and you get the same word but with a scottish accent. These do not form a phonemic pair but allophonic variations of the same phoneme (here according to different geographic areas but they can also vary according to age, social status, gender, etc ...)
I watched a documentary about domestication a while back. Turns out there are many "corollary features" to being domesticated: for instance, ears falling down are also to be found in domesticated fox.
One of the most common feature across domesticated species was tighter jaws.
The more I read about quantum mechanics the less i understand, and I'm absolutely unable to get into a proper learning path because it requires mathematics beyond my level and for which I'm not able to develop a taste on my own.
Of course I'm not interested in doing calculations but to appreciate quantum physics you have to know what the formalism behind are about and physicists are unable to explain it in simple terms for reasons I think I make out but can't properly formulate.
As an alternative path, Quantum Models of Cognition and Decision [1], may offer a less steep learning curve for the fact "you are the quantum system" and as such get to have actual experience with phenomena discussed in this book. To clear up the new-age vibe introduced in the last sentence, I think studying the maths through a phenomenon whose ambiguity is not questioned as a metaphysical abyss but is accepted as just being here in its mundane simplicity (semantic ambiguity in daily language use, that kind of thing) alleviates a lot of trouble in grasping what the maths mean in a physics course. Also the book is written for people coming from the fields related to psychology so it's a lot more approachable.
I don't get the reference, would you mind explaining? On a related note, I've always been baffled by Coursera founder & ML fame Andrew Ng's name. How am I supposed to pronounced it?