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

> a roughly 70 percent reduction in memory-safety vulnerabilities.

Couldn't find this in the reference text. Is it my interpretation? https://www.memorysafety.org/docs/memory-safety/#how-common-...


Pretty cool, tested it!


Did you find it hard to create structured output while also trying to make it reason in the same prompt?


You use a two-phase prompt for this. Have it reason through the answer and respond with a clearly-labeled 'final answer' section that contains the English description of the answer. Then run its response through again in JSON mode with a prompt to package up what the previous model said into structured form.

The second phase can be with a cheap model if you need it to be.


Great, will try this! But, in a chain-based prompt or full conversational flow?


You can do this conversationally, but I've had the most success with API requests, since that gives you the most flexibility.

Pseudo-prompt:

Prompt 1: Do the thing, describe it in detail, end with a clear summary of your answer that includes ${THINGS_YOU_NEED_FOR_JSON}.

Prompt 2: A previous agent said ${CONTENT}, structure as JSON according to ${SCHEMA}.

Ideally you use a model in Prompt 2 that supports JSON schemas so you have 100% guarantee that what you get back parses. Otherwise you can implement it yourself by validating it locally and sending the errors back with a prompt to fix them.


Thanks!


Why this? Because for OpenAI you can set it using API.


I think you misread. With the API you're not using this standard chat system prompt, but whatever one you set: https://docs.anthropic.com/en/docs/build-with-claude/prompt-...


Yeah, our host is a big trump supporter


"except anyone resident in Quebec, Nova Scotia, Yukon, or Ontario"...it is essentially 75% of Canada!


To be fair, Nova Scotia, Yukon, and Ontario each only add a handful of extra nodes. I just didn't want to bother with those because I'm in BC.

Quebec is a different matter; far more complicated to calculate payroll deductions for there.


And if the crazy proposal from the UCP in Alberta to divorce from the CPP and have their own pension system (like Quebec) is successful, it will get even crazier.

Imagine the complications of moving back and forth between provinces. Or seasonal work, etc.


There's several pages of formulas for dealing with people moving between CPP and QPP. So glad I don't have to deal with those.


I was born in Alberta and lived there for the first 24ish years of my life, I didn't contribute much when I was there, but it would be something. I shudder to imagine the complications of trying to claim the amounts from that once I retire -- if that proposal happens. Pure insanity.


Quebec is essentially a different country altogether - there are a legion of strange HR rules and requirements that are entirely specific to QC.


Yes, and heavily subsidized by other parts of Canada via transfer payments.


Well transfer payments are a lot more complicated than some folks would have you believe - Canada as a nation benefits from all our parts being within a common business zone so while some areas are mineral rich other areas have strong service economies that have needed help through the pandemic.


"Needed help" because the powers of the day decided to lock down the economy far past any reasonable length of time. I suppose if I quit my job I "need help" feeding myself too.

Another example is Quebec sitting on a gargantuan natural gas reserve, but preferring to keep it in the ground because it's more advantageous to simply receive payments from other provinces (Alberta). Carbon/emission considerations aside, this shows just how broken the incentive structure is for equalization payments between provinces.

But that's just the tip of the iceberg as far as Canadian governmental issues go, and it's hard to know where to start improving things.


>Carbon/emission considerations aside

This seems like a massive thing to just throw aside.


He's also neglecting to mention what a mammoth hydroelectric powerhouse Quebec is, because of that, they have a giant surplus of electricity that makes their utility bills extremely cheap relative to anywhere else in North America, helps manufacturing businesses and gives them the ability to export power, to boot.

Meanwhile Alberta burns (and leaks) natural gas and coal and gripes because the rest of the country is punishing them for it, and complains to high heaven that we're not making new markets for them (or others) to burn and leak more of it.

Quebec and Ontario have prioritized manufacturing over resource extraction, and that benefits their population.


Well, if Quebec is the economic powerhouse you claim it is, then surely they will be just fine if the equalization payments stop, right?


The whole point of the equalization payments is to level the playing field regarding the budget of provinces. The formula has to do with the amount of provincial taxation that a province charges its residents versus the rest of Canada. Given that the Quebec income taxes are higher, the province receives transfer payments. Some of the Federal income tax that Quebec residents pay ends up going to the province, so it's not just coming out of the income tax of non-quebec residents.


Sure, but I'm talking specifically about incentives here. If it wasn't for the inverted incentive structure that benefits them (also from fossil fuels, but that money comes from Alberta), I'm sure they'd be more than willing to extract that resource.


>Canada as a nation benefits from all our parts being within a common business zone

But there is no Free Trade between Provinces (Inter-Provincial Trade). Canadian Provinces have more Free Trade with the USA and Mexico than they do with each other. Canada isn't really a country in the economic sense. And aren't there restrictions on professions like Engineers and Nurses such that you can't just pick up sticks and go to work in another Province? There's bureaucratic paperwork to fill out before you are good to go.


"old and boring" made my day more fun. Thanks!


Sure i'm also interested


Perfect!


Amazing amount of work spent in constructing an efficient workstation. Makes me wonder what i am i doing with only custom .dotfiles. Clapping my hands


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

Search: