Hacker News new | past | comments | ask | show | jobs | submit | wikfwikf's comments login

I asked ChatGPT to write a function which takes a year as input and determines whether or not it's a leap year - a classic basic programming question. It answered perfectly. Of course, there are lots of examples of this code.

Then I asked it "Could you adapt the function so that it works on Venus, where years have 224 days?"

It offered me a new version of the function, which simply checks if the year is a multiple of 224. Apparently on Venus the number of days in a year and the frequency of leap years are the same number. It qualified the answer: "It's worth noting that this function is based on current knowledge and understanding of Venus..."

I asked it "What if we want the function to use Venus days as well as Venus years?"

It offered me the same function, except that a) the variable 'years' was now called 'days', and b) the modulus was changed from 224 to 224.701.

So I asked "Should the argument to the last function be a float or an integer?"

It gave me 3 pars of complete nonsense about how the difference between floats and integers affects the precision of calculating leap years (while again warning that the exact value of the Venus year might change).

ChatGPT does a very good imitation of a certain type of candidate I've occasionally interviewed, who knows almost nothing but is keen to try various tricks to bluff you out, including confidently being wrong, providing lots of meaningless explanation, and sometimes telling you that you are wrong about something. I have never hired anyone like this, but I've occasionally come close.

I have been trying various interview questions on ChatGPT, originally because my colleagues warned me that a candidate who was surreptitiously using it could ace almost any interview. I was skeptical and I have not been convinced.

But I think it's actually a great exercise to practice interviewing on it. If ChatGPT can answer your questions accurately (try to be fair and ignore its slightly uncanny tone), then you probably need better questions. If you are quite technical and put some thought into it, you should be able to come up with things which are both novel enough and hard enough that ChatGPT will simply flounder catastrophically. (I'm not referring to 'tricks' like the Venus question, but real questions on how to achieve something moderately complicated using code.) It's a really good reminder too that when we ask candidates to write code, we should examine and debug it in detail, then ask decent follow-up questions, rather than just accepting something that looks right.


But the point of the GP comment was that language has not 'evolved', but is intentionally being used in a misleading way here.


Yes, and I'd rather go to prison in Munich than to Rikers Island.


If investors see layoffs and judge that the company just became more valuable, either they are right or they are wrong.

If they are right, then isn't the job of management, in a principle fundamental to the US economic system, to follow their wishes? Management doesn't have to do whatever investors ask for, but there is no real justification for them to do something which is both against their wishes and against the interests of the company.

If they are wrong, then surely the problem is that most US companies are having their decision-making driven by a group of people who are paramount but who are making misguided or misinformed decisions. Any tweaking of the exact incentives which doesn't solve this problem is both a distraction and subject to the law of unintended consequences.

Note that I am not strongly in favor of either sweeping layoffs or of the specific US variant of capitalism in general. I just think that one should be honest about to what extent problems are unavoidable to the extent that one cleaves to a given system.


Firstly, so that I can understand the strength of the correlation, can you pinpoint when "women were given freedom there" and what that consisted of?

Secondly, regardless of the cause of the lowered birth rate, do you agree that freedom for women is a fundamental and inalienable right, and that the problem is how society should advance so that birth rates and family formation go back up without rolling back freedon?


"the cultural norm of the country, as well as its "visual" identity has shifted from a european country to a (mostly) african one"

This is delusional, and yes, I did read the rest of your comment.


not a native english so i'm not sure what you mean by delusional ?

We can't legally compile ethnics statistics in France, so all we have to rely on is our personal feeling, which is of course very subjective ( and this has been the counter argument to my type of argument for a very long time). But it has reached such a level now that nobody is contesting that diagnosis. People give it different names depending on their political orientation ( "creolisation" for the left, "grand remplacement" for the right), but it's basically the same conclusion.


>We can't legally compile ethnics statistics in France

This is bullshit, because even if France made it illegal (it's obviously not) other groups would definitely still do it. France is still 86% white people, mostly french. Nobody is being replaced anywhere, because immigration is tiny everywhere.

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


From your own article :

"Due to a law dating from 1872 at the start of the Third Republic, France has prohibited the collection of data on a citizens race, ethnicity or their beliefs such as religion through national censuses,[47][48] however estimates have been made of the ethnic and racial demography of the country in the present"

We're talking estimation as it is indeed illegal, no matter how crazy it may sound like. Estimation is highly dependant on who's doing the estimation, and for what purpose, and as you can see in the article itself, the topic is highly controversial among specialist.

Now, if you were living in france for the past 40 years, and had regularely travelled across the country, you would see that in that particular case, the situation is very obvious, and the only circle left still debating the issue is demographic specialists.

Politicians and media used to deny the issue and flagged anyone mentioning it as racist, but things have recently changed and we finally start talking about it like grown ups.


I have lived and travelled in France for around 40 years and I don't at all recognize what you are describing.

Your claims appear to be based on suggesting that you (and, in a laughable falsehood, the wide range of opinion in French society) knows for a fact that this situation exists, but if anyone does not agree with you, that is merely their opinion, since it is impossible to measure.


may i ask where you have lived and travelled in france ?

Have you ever been to any suburb, not just in Paris ( which already has some suburbs with close to 99% non-french inhabitants) but in pretty much any average sized city in the country ?

based on your saying I can only assume you only lived in the central part of paris, and went on holidays in the west coast such as bordeaux or brest. Because all the rest of the country is pretty much in transition.


What do you mean by "non-french"?


The same i would mean if i said "non-japanese ", only applied to france.


I understand your reluctance to answer a straightforward question: you know exactly what you are, and yet you are ashamed to admit to it.

This is not the political culture of Vercingetorix, nor of Charles de Gaulle ;)


You'd be surprised. Since we seem to have moved to ad-hominem argumentation :

I think your categories and your political reflexes prevent you from thinking straight. Everybody in the world would have a broad understanding of what "french" means (or "japanese", "americans", "italian", etc). For some reason you pretend to ignore there are some cultural norms that are associated to a nation ("cultural" in the broadest sense, which includes the way you look). I believe because this fact scares you or have been associated to a taboo.

Those taboos prevent you from addressing questions, and not addressing the issues don't make them magically disappear. Worst, you risk leaving those questions to people that have a political agenda.


You seem to be the one subject to taboos. You don't want to say what you mean by 'French' or 'non-French'.

I am perfectly capable of understanding and discussing what can be meant by 'Frenchness', and what I mean by it.


I've already had this conversation many times with people arguing against the obvious situation, and it inevitably leads to absurd conclusions that defy the immediate cognitive conclusions and intuition of anyone looking at a given city landscape (you could tell just by looking at a picture if a city looks european, african or asian, for example).

However this is most of the time a total waste of time, because the reason the person is arguing against the obvious is not because of intelligent caution, but rather out of scare.

So sorry if i'm not going this route with you. If you're sincerely curious i suggest you go on a bike ride in Argenteuil on a friday.


What do you mean when you say "French" or "non-French"?

What are the words you are scared of using if you answered this question?

Why won't you use them?


not sure you understood my point. I rely on immediate cognitive understanding of what "french" means.

It's a mix of the way you dress, your body features (yes, skin color is one of them obviously but that's far from the only one), your language, all your daily habits, the food you eat, author you've read, etc.

It's the general picture people have in their mind when they think of an archetypal "french". Doesn't mean all french are like that, obviously. Much like i'm pretty sure you could find japanese with natural blond hair who never eat raw fish.

You may also argue that this image of french people is completely outdated, and that the metropolitan french population has evolved in the past 50 years. But that's precisely my point.


"France is still 86% white people, mostly french." Now look forward 30-50 years, and see who is more: the native population who has no kids or very few ones, or the immigrant cultures that encourage 3-5+ kids per family. It's just basic population maths.


One of the amazing things about Hypothesis is that it's very good at generating weird inputs that trigger bugs in cases when it would be impossible to test more than a tiny fraction of all possible inputs.

There is very very clever code that does things like create weird dicts where the keys are weird strings and the values are other weird dicts or arrays or strings..

If it finds a test failure, it then applies a reduction step, where it replaces the extremal test case with something slightly more benign and checks if the test still fails. This allows it to generate a test case which is just hairy enough to trigger the bug, but no more. This makes it easier to understand why that specific test case fails.


Oh so it’s like QuickTest in Erlang and Haskell. Very interesting, thanks!

Does anyone have any recommendations for papers on this?


I believe it was heavily inspired by QuickTest.


This is a catalogue of irrational scare-mongering.

Do you honestly believe that "housewarmings, birthdays, holidays, sports games, barbecuing, karaoke, ... parties ... for people joining the team, for people leaving, for projects kicking off or finishing" have decreased because of the prevalence of false sexual accusations, allergies, smartphones, or intense goal-driven schooling?

Do you have a credible reason to think that poverty of young adults, narcissism, or lack of patience, is materially different and has a material effect on the number of parties in the present day compared to 10 or 20 years ago?

Would you also claim that there haven't been other prior time periods where people were just as poor, self-centered or impatient as they are now, and there were more parties? Or is the claim only based on interpolation of specific, correlated changes in the recent past?


What is your standard for a "credible" reason?

What should the parent comment's claim be based on?

The last paragraph of your comment is hard for me to understand.


It's difficult to explain credibility beyond the definition of the word, but if you have any purported reason "to think that poverty of young adults, narcissism, or lack of patience, is materially different and has a material effect on the number of parties in the present day compared to 10 or 20 years ago", I can tell you whether or not I think it's credible.


On the last par: suppose that it is true that a) 10 years ago people were less self-centered, impatient or poor than they are now and b) 10 years ago there were more parties.

Does this form the basis of a well-evidenced claim that there are fewer parties because of increased poverty, narcissism or impatience? Of course not, because there are lots of other time periods we can easily look at.

For example, in the 1950s young people were probably on average poorer than they are now. Perhaps they were also more narcissistic, or equally narcissistic as they are now. Were there also fewer parties? If not, this suggests there is something wrong with the theory.

My question to the GP is: do they believe that there are no time periods like the 1950s in my example, which might raise doubt about their theories? If they think there aren't any, is it because we have never been so poor and narcissistic as we are now? Or is it because there have never been so many parties at any prior time period, as there were in the golden age they identified where we were at our least poor and narcissistic (whenever that might be)? If there are such periods, why isn't that part of their theory? If 'the 1950s' were different, what is it that makes them different, and is that reflected in the theory?

It should be clear here, that any variable which has moved monotonically in one direction for ever and so is currently at a global extreme, is correlated with every other, especially if it is a phenomenon which can't be measured in formal units (like narcissism or fear of strangers). Saying that (satirizing the GP here) 'we have never had so many smartphones, and we have also never had so many allergies, therefore allergies are caused by smartphones', is laughably easy to dismiss, for a number of reasons.


Hmm in the 50s people were poorer yes but everyone could buy a house with a garden and actually on one wage only because the wife wouldn't work.

I totally agree hosting parties at home is much more problematic as people live closer together and get annoyed. I can see it around me a lot. I live in a major partying neighborhood (50m from the most infamous square in town for noise) and I don't care about the noise because it makes me feel good hearing people having fun. But my neighbors hate it. And most of them have moved here in the last decade knowing full well what they were getting into.

When you have a free standing house it's really a different story.


I think this phenomenon is actually something else: in the 1950s people who were commonly depicted as being part of society tended to have a house with a garden and a nuclear family structure where the husband, but not the wife, worked.

There were plenty of people who couldn't afford a house with a garden, or who didn't have one for other reasons, or who were not married or had a different type of family structure, or men who didn't work, or women who did work. But they were made invisible by the lack of portrayal, both in that society's image of itself, and in our image of that society.

(Or by a different mechanism: when people outside of that structure were portrayed, it was as outsiders and aberrations, whereas married couples with children who lived in houses were portrayed as the norm. For example, the protagonist of 'On the Road', commonly associated with that era, does not have a fixed address or a job, nor a wife, nor children. The protagonist of 'Invisible Man', a book central to the discourse of who does and does not get represented in media, lives in a basement apartment alone without a wife or family. The protagonist of 'The Bell Jar' is a woman who lives alone in an apartment in New York while working at a job, then in her mother's house, then in a mental asylum.)


You can't flip a circuit breaker every night and every morning.

Firstly the school's safety code would not allow it. Secondly they are not designed for that. Thirdly, there are probably lots of things in a high school which need to be kept on overnight: computers, fridges, lab equipment.


They are designed for that https://diy.stackexchange.com/questions/21685/does-turning-c...

But I agree some organizations will prohibit staff from touching the breakers.


Several answers on that page suggest that daily operation of circuit breakers is not harmless.


Most circuit breakers that you’ll find on lighting circuits are designed for switching duty of modern lighting loads. Circuit breakers so designed will have an “SWD” printed in them (“switching duty”)


Circuit breakers are designed to be flipped thousands of times. You can most certainly flip a circuit breaker every night and every morning for years. It's tripping a breaker that you don't want to do very often.


Since you can turn off the lights with a normal switch every night and morning, I’m inclined to say you can do the same with an entire circuit.


Circuit breakers are not designed for many cycles.


For flipping a breaker they are rated for thousands of cycles.

It's only tripping the breaker that requires a replacement after a few cycles.


Well, I can’t speak to the school of course, but mine are.


The lighting and sockets should be on separate circuits.


Yes, but now you're redesigning a normal electricity setup for a large building like a school. This is the system that was, presumably, replaced by the broken IoT system, plus the absolute minimum of traditional kit outside of that.


It is certainly in the book.


Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: