skysight-inc/HackerNews huggingface dataset:
Show HN: Grain – “ChatGPT for your docs” API
Hi HN,

We’ve built an API that allows developers to easily add "ChatGPT for your docs"-like features into your app to query/chat with your own or your users’ knowledge base.

You upload a PDF (or multiple) with 1 simple API call, and then chat with that PDF with another API call.

We handle securely storing documents, creating semantic embeddings, ensuring accurate responses, and maintaining high performance and reliability so that you can focus on everything else.

Here's an example where we upload our super long "Company Bylaws" PDF and then, ask the document "Where do the shareholders meet?":

Upload

> curl -X POST -H "Authorization: Bearer API_KEY" -F "file=@./company-bylaws.pdf" https://api.usegrain.co/v1/documents/upload

> {"status":"success","collection_id":"ad8b106a-7739-4798-8a58-3d66cdfd6183","filename":"company-bylaws.pdf"}

Query

> curl -X POST -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -d '{"query": "Where do the shareholders meet?", "include_sources": false}' http://api.usegrain.co/v1/collections/ad8b106a-7739-4798-8a5...

> {"result":"The meeting of shareholders can be held at any place designated by the Board of Directors, or at the registered office of the corporation if no other place is designated. It can be held within or outside the state of Delaware."} It’s free for now for early users. We’re aiming to get feedback so that we can continue to improve the API and make it even more useful.

To ensure accuracy, you can also get a list of sources highlighting the parts of the source document(s) that were used to generate the answer.

It’s free to try: https://www.usegrain.co/ Would love to hear your feedback and use cases!
If you’re using python, Modal (modal.com) was awesome to setup.

They’ll take a FastAPI setup too and just put it online to be used on demand.
While this article contains sage advice for maintaining a healthy software developer career, I've found that one additional aspect is crucial: be generally interested in people. This allows you to understand and navigate different people you will work with (including toxic ones) with ease and almost no stress.
+1 to SSRIs. One thing that's under-emphasized is that trying SSRIs is an experiment, rather than a commitment. After 5-6 weeks if they don't work for you or the side effects aren't worth it, you can drop them no problem. So if you feel like you might have clinically significant anxiety or depression, really consider an experiment.

I've had friends that have hated the side effects or not seen much benefit, who stopped. And I've had friends who've start and it's like a cloud has lifted - described as the best decision of their life.
The article is about Cook Medical, which is having homes built and arranging for them to be sold to employees. Nobody is renting anything.

In fact, the line you quoted is from the first of exactly two paragraphs in the entire story that mentions any other companies (and the second is a historical reference).
For me the difference is that "The key to becoming extraordinary" is just a garden-variety self-help blog title, whereas the Eno phrase is uncommon and thought-provoking.
What kind of documentation one would normally need for this sort of project? If the documentation are not great or missing something, is there steps that could be taken to figure out the chips functions in order to implement them?
Yes. That is all there was to it. Just an informertial
99% of PostgreSQL reserved keywords are singular (except `references`), so if you use plural table names, you're more likely to avoid using a reserved keyword (such as `user`)

97% of SQL-92 reserved keywords are also singular (exceptions: constraints, diagnostics, names, references, rows, values)

https://www.postgresql.org/docs/current/sql-keywords-appendi...
Figured that would be Peter Attia.

https://peterattiamd.com/podcast/

His podcast is amazing but can be dense and technical at times. He's evidence based and would probably fit in with the HN crowd.
I can totally vouch for this in my valueless opinion study of n=1.

I’ve always eaten “a little bad” diet. I don’t think I eat too much, and I keep things mostly balanced, but I tend to eat quite late, and carbs and calories was always something I’d just take down without considering totals for a day or week.

Was totally fine when I was walking to work every day, and doing a lot outside.

Early COVID era, with the same diet, I started ticking up in weight, and wasn’t feeling great. Once adding more exercise to my routine I slowly returned to my baseline. Maybe I could be doing better with a better diet, but I was kind of shocked by how much of an effect ~1hr of walking a day had on me.
Crying shame that so much work went into these recreations yet you can't (for now) visit them in VR. The sense of presence and scale adds so much.
Bulk real estate purchasers are furious and have infinite money and/or leverage. If the property is even remotely desirable or its location is, it's gone.
Why would I choose an Android phone? Apple does not spy on me, and does not sell my information to advertisers. An iPhone SE is $429, or can be financed at the same price, with zero interest, at $17.87 for 24 months.

Why would I want to join Google’s advertiser-driven ecosystem, and voluntarily make myself into Google’s product?
If you had a tornado siren go off every 20 minutes every single day of the year, how long before you stopped ignoring the siren? How surprised would you be when a tornado hit 2 year later?

"This product causes cancer" is ineffective when the warning is plastered on everything. Same goes for warning in computer systems.
.. the mods of most subreddits are public. This is a trivial thing to verify. It's as valid as any other information posted that you haven't personally inspected. I have no idea why you're so belligerent about this, but it's odd.
This settings/configure/adjust icon seems to be in the middle of a transition between abstract and universal. Something like a magnifying glass didn't need any transition period because humans already associate it with "searching" from fiction. Other icons required reinforcement to learn (e.g. the share icon - or, even more well learned, the pause icon). One of the downsides of the modern hyper-focus on metrics in UI is that it dictates that iconography already be intuitive. Sometimes we need to ignore this rule in order to teach users a new icon, which then helps us improve interfaces by communicating more without words.
That doesn't make sense to me. The array is a collection of users, so `users` makes more sense to me. And what you are calling users is `totalUsers` or a variant of that.
This is why, in retrospect, I miss my days as a junior engineer.

When I was a junior, there was plenty of room to learn and screw things up without much risk. I had plenty of opportunities to write brand new software for any which purpose, and the possibility of advancement was really exciting.

The longer my career went on, the more my job became about fixing crap, fighting brittle tests, and trying to squeeze enough information out of the org so I could actually get my job done properly. Now that I'm a senior engineer making above the average income for the role, the only advancement left for me is to become a lead or staff engineer, neither of which I am at all suited for. In either case, it would be more of the same.

I'd have more to say, but I've got to hop on a pair programming call with someone. :)
Mysterious titles aren't necessary linkbait. Not everything should explain itself right away—that follows from the principle of curiosity—and we've always taken the position that it's good for readers to have to work a little.

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...
How much Cycling do you have to do for that to become a credible risk though? I am imaging quite a bit more than a daily commute.
Why do we clinge on this type of ideas?

It's an EEG not a super high resolution device.

Yes our brain does stuff at the edge of breaking. EEG changes somehow when we put ourself under anesthesia . Still we don't really get it.

And weirdly enough comments here go into afterlife and other esoteric stuff.

We know enough about our brain that we know we are our brain...
I don't find the arguments either way particularly convincing. IMO just be consistent with the existing schema (if there is one), or use whatever you prefer.
PS Just to clarify we are hiring remote-global for most roles. Only our Backend/devops role is Canada focused.
One thing I would suggest for those suffering from anxiety that I don’t hear often is to try supplementing with lavender. I thought it sounded super goofy and hippie but has been by far the most effective for me. L-theanine and CBD are ok-ish, but yea try Calm-Aid.
Written in 2010, it will be interesting to see how much Microsoft's moves to repeatable builds in more recent times (e.g. https://github.com/bazelbuild/bazel/issues/9466#issuecomment...) will do away with this idea of embedding the Microsoft C/C++ compiler toolchain's daily build numbers into executables.
Garmin MonkeyC: SDK update breaks all static methods, still unfixed 5 months on
Why should they have that right?
What kind of basic minimum hardware I would need to take on a project like this?
A table naming thread reminds me that it has been a while since I’ve seen a schema with tables all named “tbl_whatever”. The last one I saw even had a view called tblUserGrants. I LOLed.
I'd like to get the ruler but the shipping is rather pricey. $17 for USPS priority when the product is $59.95. Perhaps because of its dimensions.
I see a lot of people here complaining that Mozilla isn't spending enough of its money on the development of Firefox, but a lot of that money comes from their Google deal. If Firefox started to gain market share over Chrome, do you think that Google would continue to fund them, and if not then who would?
I was thinking if Pi never repeats itself and infinity of integers can only go up then it seems to make sense that there are more decimals between any two numbers than infinite integers. I can't describe the thought process behind it just seems intuitive.
2 hours a day is good
Yea. I can’t give up my delicious Aeropresses.
Within that 70%, most of them can:

- Afford to eat healthier foods. Rice, potatoes, bell peppers, onions, lentils, ground beef, pork chops, eggs, are not expensive. Time is a bigger factor but I don't buy the time argument in most cases either. Just need to prioritize.

- Improve their sleep. Most people have terrible sleep habits and there is a load of free information available for anyone who wants to make a positive change.

- Exercise. Walking 30 minutes each day yields most of the available benefit. Strength training is also available for most of the population. A secondhand kettlebell is like 20 dollars. Calisthenics are free. Some gym memberships go as low as 10/month.

>Is your argument that most people are lazy and should suck it up and get over it and fix themselves?

If you want to phrase it that way in order to paint me as the bad guy, then sure. But I would prefer to start with not giving up personal responsibility. Not throwing our hands up and blaming externalities, big food, and big pharma. If someone has that attitude, what hope do they have? Do you not believe in empowering people? If we validate every single persons' victim card, they will eventually believe they have no control over their lives. And that's just not true.
You left out that the house cannot be rented out. So if you get fired in two years, you get to sell the house back to the company for what you paid for it (losing appreciation). Since you're not going to be able to stay in the neighborhood because there are no other jobs around.

Which means that the company can price in "forcing you to sell your home" into your salary discussion.
I was against this previously. But it simplifies things.

You need never wonder if you should write 'people_id' or 'person_id' if you consistently use singular nouns.

Reducing the mental load slightly is reason enough.
So I should put this article into the suggestion_i_will_ignore table instead of suggestions_i_will_ignore.
A scholar monk closely investigated a Sri Lankan case of xenoglossy here: https://audiobuddha.org/wp-content/uploads/2021/08/Rebirth-i...
This is very impressive, and kind of mind-blowing that it works. The sample questions are awesome, but I wonder how much veracity it has

I asked it "On average for the past 2 months, how many posts are made to hacker news per day?" It went through about 4 iterations, and was able to get to a table of how many posts were made per day for the past 2 months, but was unable to get the average posts given that, and ended up saying that only 1 post was average per day when that is clearly incorrect.

This was the final, incorrect SQL query. Pretty close, and really fun to see it work on figuring this out and getting close to the answer!

SELECT DATE_FORMAT(FROM_UNIXTIME(time), '%Y-%m-%d') AS day, AVG(1) AS avg_posts_per_day FROM items WHERE time >= UNIX_TIMESTAMP(NOW() - INTERVAL 2 MONTH) AND time <= UNIX_TIMESTAMP() GROUP BY day ORDER BY day DESC LIMIT 60;
Datamoshing is one effect that I don't think I'll ever process as an effect instead of an error (and as a result, I don't like it). My brain simply won't process it as "effect". I think it's from my history of downloading videos that had errors which produced the effect. Especially back in the slower less-reliable internet days, it was always soooo annoying to have spent hours downloading something only to have a glitch that caused the datamoshing effect. Plus, now all video I ever watch is digital, so I'm never totally sure that there wasn't a streaming issue or if it was intentional, unless it's being used heavily as an effect over and over and I see it enough in the same video to realize it's intentional.
Who said anything about betrayal? All the more reason to hate on ads/marketing then.
IBM i (AS/400) is ( I think) the last of the midrange/minicomputers still being developed by the original company. vs OpenVMS/VAX, HP 3000 - MPE/IX, etc.
what about pointers?
Yeah this was going on LONG before GPT4 or GPT3.5/ChatGPT or even GPT3. It's a huge reason why search engine queries against the general internet have become so unusable and people increasingly get their information from large moderated websites with anti-spam measures.
> but the browser really needs a lot more hands and funding

I had been using Firefox since 2002, when it was called Phoenix.

I switched to a Chromium-based browser because the performance difference was noticable enough, and I am in the browser often enough, to finally throw in the towel and switch.

They have a huge amount of money coming in from Google. Why is this going to acquisitions like this and not towards strengthening the development so that it remains competitive? Or are they, and I am not aware?

If it doesn't remain competitive on things like performance, standards compliance, etc. there are very few reasons for the average user to choose Firefox over any other browser at the moment. The privacy-focus is good, but there are other browsers that do the same on Chromium.
It won't kill it, it just means that porn sites will be hosted outside of those jurisdictions, and people will use VPNs to access them if needed (which, ironically, might actually spread awareness of VPNs in general, making it harder to regulate other online content in the future).
I just feel that Mozilla has spent way too much on PR, marketing and ventures that make no sense in their space. They got big by being a leader in the browser tech stack, and making tools developers and tech guys wanted to use. That led to the influence over other areas, but advising friends and family to use it.

Mozilla org has completely lost sight of their base. A good 70-80% of their budget should be on their core product development and adjacent products only. The fact that only recently have they discovered, hey, we had this pretty good email client that we let all but die off.

They should separate their core rendering and script engine teams to focus on better embed-ability and security structures. Another team(s) focused on the integration for Firefox as a browser. Another for Thunderbird. The fact that they killed off their Rust efforts, XULRunner and so many other things that could be really useful today is just painful.

Yeah, XUL didn't run great on 1998 hardware, but what are so many apps targeting today, Electron. And now there's a resurgence towards lighter options (Tauri and others) because it kind of makes sense to (re)use a browser rendering engine for general UI development. It's extremely flexible, has a flushed out (if somewhat complex) styling and theming system, multiple language support, complete font rendering, svg rendering, and accessibility support and runs on/under everything under the sun.

Maybe hire on some of the types that have tried and failed to remake email and browsers that have some creative vision on how users actually use these applications, and let them work with the engineering teams to make quality software again. Spend less time on branding, and more time on the core tech. They still have enough brand reach and clout that people will try the new stuff and if it's good, then organic growth can and would work (again).

Hell, if they want to branch out... make a REALLY great email and communications platform that is open-source with a hosted model. How big of a pain is it to self-host many of these things today? If they want to acquire someone, bring in Caddy, Fastmail and/or Zimbra for adjacent tech development.

I only harp on the email and Thunderbird side because two decades ago, they were in a better spot than anyone to offer a competing product to Outlook+Exchange and they just didn't even try. And now even Outlook kind of sucks because the cloud integration is what it is at scale. Leaving a gaping hole where that entire market used to live. A great open-source core product, with a good extensibility model and some commercially licensed integration points could have been insanely popular.
I want more businesses to try this. I think the kneejerk “company town bad” misses a lot of the contextual differences between how and why they were needed in the past, vs what employer-built/managed housing would look like today.

For starters, company towns in the past (and these actually still exist) were usually for raw resource extraction in isolated areas. The workforce was a lot poorer than today and whereas now you could probably go on SSI or take a different job to not starve, people were desperate enough to take these jobs just to put food on the table. Once there, technology and infrastructure were such that connections to the outside world were difficult to make, and done by the company (who imported all the goods and provided all the services). So yeah, putting a lot of desperate people in complete control of a for-profit business led to a lot of abuse, de facto indentured servitude or what we now call debt bondage/ modern slavery, and other bad stuff.

Employer housing in a place like the Bay Area would be entirely different. You’re completely connected to the rest of the world, you’d have plenty of money and options to switch jobs or engage in consumption outside the company development, you could just take your pay and use it for non-corporate housing (just like some people do with company food). There are for sure pitfalls we’d need to prevent, like lease or mortgage terms that make it too hard to switch jobs, or the employer being too nosy about what happens in its housing. But like, this model is a thing we’re all familiar with already in the form of university dorms, live-in resident managers, military housing, except it could be even more hands off.

I actually think it would incentivize a lot of win-win outcomes. Employees get reasonably priced housing, employers offer a perk with nice balance sheet effects, employees get to live in presumably a safer area nearby (but not with) friends and acquaintances (ie a community), employees get a short commute, employers don’t have to pay out the nose for expensive third party corporate housing, employers get to capture positive externalities of job creation, it incentivizes development and would actually be able to make it happen because it’s a priority for a well funded and more importantly well-organized pro-housing entity… and if you thought it were creepy or better for young people than families you could just not use it.

It’s a little dystopian at first glance, serfdom yadda yadda, but in the Bay Area we already have serfdom except our lords are random people who bought or inherited housing when it was cheap in the 70s-90s. And those people fight tooth and nail against development which keeps prices high and them in power. If we’re gonna have lords I’d rather have them be pro-development and giving me shares of their fiefdom.
Can you briefly describe how you got to the point of having this kind of intuition about language models?
Clearly not many Buddhists on Hacker News.
Congrats, you are the problem.

Half of my hardworking, law-abiding immigrant community of doctors, engineers, and scientists were on the_donald. These are people who’ve actually faced hate in this country and who likely have way more exposure to people of different races & backgrounds than the average American.

If that does nothing to make you reevaluate your opinion, then you are sadly and ironically a victim of divisive indoctrination.

Edit: For context, the parent advocated banning users from an entire subreddit as a sound moderation strategy.
WebGPU. It’ll be live in Chromium stable this Thursday and will be the biggest step change for browser-based GPU since the original WebGL.
> I really don't think that block quoting ChatGPT is a good contribution.

It's the first time I've done it. I agree with you. But didn't know until I tried!
I will always lend my voice to a vote for the TWSBI Eco. I have used it after leaving it in a drawer for months, and it just starts up without issues.
By "failed" I meant "Proved hard to parse". I don't think they failed at all.
> This kind of thing is generally both country and state specific.

Very. It ranges from "you're a creditor in the bankruptcy" to "CEO, you're under arrest".
Yes, my kids had debit cards too. But not credit cards; those have a minimum age of 18.
> You can't image where the connection to company towns could come from in an article about people renting from their employers?

You didn't read the article. The homes are for sale, not for rent.
> By the way, does anyone know of a good alternative to http://neverssl.com ?

http://http.rip/
There are plenty of people who most work with older tech, and they are quite often not the especially vocal ones, writing blogs, debating approaches on twitter, discussing on this site (which obviously skews a bit to people working in startups), etc.

People in startup, or software development social media bubbles tend to get a very distorted view of things. Like that everyone is using react, or that everybody is doing SPAs, unless they riding very front latest trends where things are headed a little more back to server side (e.g. server components etc).

But both of those are nowhere near everyone. The whole point of this article is a reminder that what everybody is talking about on sites like this is far from a complete reflection of the space. Most bloggers like to talk about the latest tech, and most startups often use either the latest or near latest, but it is important to remember that the resulting perceptions are skewed relative to the sheer number of developers out there.
Life is a series of endless choices.

I recently ran a 24hr relay. There were absolutely those who drank/partied while they participated. They posted slower times and probably slept less. I didn't sleep as much as usual (because I was waking up to run every 6hrs), but I slept more, didn't party, ran faster than them.

Neither of us was right/wrong in our choices. I would have felt like crap if I had their habits, but maybe it doesn't affect them.