skysight-inc/HackerNews huggingface dataset:
This definition of "perfect" might be counterintuitive for those that haven't read the piece.

The idea is there might some ideal memory allocation scenario that Rust doesn't do "perfectly" that you can theoretically do better in Zig, which I buy. Most particularly, my experience with arenas and defer drop is -- they aren't always perfectly easy in Rust. But this definition of perfection tends to ignore all the manual, boilerplate memory management you have to do in the interim, that you may still mess up in some subtle way.
Yeah, but there are lots of things that can be footguns if you use them incorrectly, that's simply a part of the job as a software engineer. Otherwise you could argue that `rm -rf` should be removed as it could potentially delete files if you're not careful, but I haven't seen anyone argue for that instead of arguing for "Do be careful when using rm -rf". Same goes for feature flags, and a ton of other things.
Initially packfiles were absolutely about filesystem overhead, "a lot of small files" were terrible performance-wise. OSes got better tho, don't know in windows side, but on linux side "few tens of thousands of small files" case really isn't that bad

But I'm really talking about ability to just directly load an asse via reading a blob of data vs having to munge it thru SQLite code. Or even just mmap'ing data directly
Not that I heard, though it doesn't matter either way with regard to the specific issue I was critiquing.
> Java does indeed represent an anti-pattern of verbose and frequently trivial getters and setters.

It's not an anti-pattern.

This is how Java provides the exact functionality that you describe as very important (field encapsulation). Because Java doesn't support properties, it needs to go through getters and setters.

As you point out, more modern languages support this functionality directly in the language with properties.
How to evaluate AI based solutions for your team?
Hello everyone,
I recently created a requirement matrix for applying AI solution to our functional workflow. Different criteria of evaluating AI for business use case, I wanted to share it with this community.

In this solution requirement <> vendor matrix, you'll find categorized items of
- Features / UI needed for customer support use cases
- Reporting and analytics for business KPIs
- Data and integration to customer support software
- Administration and Security systems for team management

This document is aimed at managers and directors looking to evaluate different AI-based solutions available in market and help improve productivity of their teams.

If you're currently looking for AI solution, I'm happy to share the document and discuss how can we improve evaluation?
Ping me in this thread or DM me.
There are several scenarios where a cryptographic-quality random number generator might be needed within the context of a shell script.

My favorite tool for this is "openssl rand" and I can find the manual page on rhel7 with "man rand."

Here are 8 bytes of randomness in base64:

$ openssl rand -base64 8
mGHxYcVOmA8=

If you like decimal:

$ printf %d\\n 0x$(openssl rand -hex 2)
21924

When I've got dozens of users to create, this is how I am assigning their initial passwords.

The shell's $RANDOM is somewhat less trustworthy than other sources here. It also does not appear to be POSIX, but comes from ksh88, where it is described as returning a random integer between 0 and 32767 each time it is referenced. If unset in a script, it cannot be used again for the life of the shell.
B extention does add have 'cmov' see:

https://raw.githubusercontent.com/riscv/riscv-bitmanip/maste...

If you do instruction fusion, you might be able to transform the typical pairs that would create a short branch and simply convert them into a cmov micro-instruction. That it does not make the branch predictor much more complex.
Are you saying that when “laid off” began being used 30-40 years ago it implied you’d be rehired? Because that’s the claim being made above about the current meaning of the term.

Edit: Wikipedia agrees that this is a generational difference and the term laid off used to imply it was temporary. Today I learned…

https://en.m.wikipedia.org/wiki/Layoff
Internet Is Beautiful – A collection of interesting and useful websites
My biggest concern is typo-squatting.

> connection closes mid-stream

I get around this by using wget to download the script, and THEN use sh.
Example: HackerNews alternative - https://aicode-weld.vercel.app/r/-_Wx4iunNg6D8JUBHyEya
I'm thoroughly convinced that fexprs are a bad idea and so, good riddance. Our Lisp hacking predecessors did us a huge favor by figuring this out and documenting it.

Fexprs are hostile toward compiling. Specifically, True Scotsman's ahead-of-time compiling where we take an entire file or set of files and turn them into compiled equivalents, whereby we obtain:

1. Useful diagnostics without running the code.

2. Deliverables which load and execute faster, and don't require any code processing at run time (unless we choose that as part of application logic).

3. Resistance to reverse engineering, so we get paid. :)

Even a macro expander in front of an interpreter can provide error checking, such as finding unbound variables, reporting about misused special forms, and even things like functions being called with wrong numbers of arguments.

Macros themselves can be well written and provide decent error checking. So could fexprs, but fexprs have to be called.

You can't code walk fexprs because you don't know which parts of the argument material of a fexpr contains more fexprs.

It is counterproductive to lose the ability to completely code-walk a program, just to gain the ability to perpetrate trompe d'oeil metaprogramming: the software engineering equivalent of having a hand reach out of the picture, holding a pencil which draws the picture frame.
Merely conveying ideas isn't enough to be writing in the archeological sense, you have to actually be conveying speech. So-called "full writing" is when the written language can convey any spoken sentence and vice versa.

Importantly, not all drawn symbols that convey meaning are writing. Musical notation is not writing for example. There's been an open debate in archaeology regarding the extent to which rock and cave art are actually conveying speech as opposed to some other form of communication and whether these practices are even directly related to early writing traditions.
It seems Citizens banks made out with $20B of potential profit with very little downside. Hope I am wrong. Hope FDIC retained claims against SVB loan assets equal to what FDIC paid out to depositors that wanted to RUN (about $20B?)
Awesome :)

I want someone to build a twitter bot that responds to all OpenAI tweets with "s/Open/Closed/g"
i loved webos and the palm pearl. perfect device for its time. i still have it somewhere.
Won't theoretically stop someone from discovering the genetic signature for a certain natural skin pigmentation, or slanted/smaller eyes. Sure it won't be perfect, but people who would create and use such a weapon probably wouldn't care about collateral damage.

I can certainly see it being China's final solution to the Uyghur question. They have a long history of callously and needlessly killing large swaths of their own people toward nationalistic ends, and not just under Communist rule.
My sibling has this and I have a hard time feeling sorry for those with it as a result. When they were younger, they hated loud noises - sounds like fireworks - and that was reasonable.

But as they got older, they got annoyed by more sounds, usually mouth related. My dad's clicking jaw, someone eating chips at a birthday party, a baby talking gibberish at a restaurant, etc. If my sibling hears a sound they find annoying, you'll be sure to get a dirty look, screamed at, or they'll burst into tears. Sometimes it's all the above. I won't visit my sibling anymore because of their problem.

As unpleasant as it sounds, you have to desensitize yourself to these sounds. The more you avoid it, the more intolerable it gets.
> I suspect you are dual-booting, which is itself a hacky middle ground full of bugs. Linux and windows will never share a drive well.

The Windows installer unfortunately will happily clobber the EFI partitions on completely unrelated drives. Had it happen on a triple boot (Win/Linux/Hackintosh) setup a couple of times, with each OS getting its own drive. MS almost certainly is not testing against multi-OS setups of any kind.
for a normal distribution, chatgpt suggests the box-muller transform and calling out to awk (which is a scripting language that continues to surprise me; it seems underrated?)

normal_random() {
start=$1
end=$2
range=$(echo "$end - $start" | bc -l)

awk -v start=$start -v range=$range -v seed=$RANDOM '
BEGIN {
srand(seed);
u1 = rand();
u2 = rand();
z0 = sqrt(-2 * log(u1)) * cos(2 * 3.14159265358979323846 * u2);
z1 = sqrt(-2 * log(u1)) * sin(2 * 3.14159265358979323846 * u2);

random_number = start + (z0 * (range / 6)) + (range / 2);
printf("%.0f\n", random_number);
}'
}

In testing it out, they did seem normally-distributed but rerunning it quickly did seem to produce more consecutively duplicate results than would be expected, not sure why that would be (I was using ranges of 0-10 and 0-20, perhaps the probability of normally-distributed consecutive dupes in that range is quite higher?)

EDIT: Nope, there's definitely something wrong with this, possibly the rand() call(s)? Can anyone guess? (A real-world example of the perils of relying on chatGPT!) EDIT2: Figured it out. srand with no args seeds to the current second, making any run of this function within the same second produce the same result. Fixing this left as an exercise to the reader EDIT3: I fixed it by seeding it externally via $RANDOM.
Surely that is a good thing in this case?
your take is bad.

bb had android phones with both infinitely better hardware than any google phone to date (it had a qwerty keyboard), and zero bloat, even less than google pixel! i just dumped my bb key2 for lack of updates and got a pixel 7 pro. what a downgrade on every single aspect.

bb key2 and priv models were literally everything hn crowd claims will throw money at. they failed.

so, everything in your take is wrong. real world suggest the correct answer is only: marketing.

consumers are dumb :(
this seems interesting. I kind of had an intuition about something like this. Obviously with much less thought and work put into it.
No, but if they want to play God of War or Uncharted, they get a Playstation, even if they may really dislike some aspects of the Playstation and would prefer an Xbox.

Some people (myself included among them) have hardware or use software that is either Windows-only or works much better on Windows - even if we really dislike some aspects of Windows.

Doesn't mean we won't complain about the things we dislike and call out for them to be changed/improved.
Show HN: GPT-Shell – An AI-Powered Bash Shell
Hello HN folks!

I've been working on a side project called GPT-Shell, an AI-powered command-line interface that aims to revolutionize the way we interact with our development environment. I'm thrilled to share this early, slightly buggy, but functional open release with you all!

GPT-Shell leverages state-of-the-art language models to interpret natural language inputs, allowing you to write code, perform complex tasks, or even troubleshoot issues using simple, human-like commands. While it's still a work in progress, I believe that it has the potential to make our lives as developers easier and more efficient.

Keep in mind that this is a first release, and it might have its quirks. I'd appreciate any feedback, suggestions, and bug reports from you—the passionate and knowledgeable tech community—to help me refine and improve GPT-Shell further.

Feel free to dive in, explore, and let me know what you think. I'm eager to hear your thoughts and collaborate on taking this project to the next level!

Happy coding,
Kelsey
https://soviethistory.msu.edu/1985-2/cooperatives/

This is not secret knowledge
Template languages are odd. Just use normal programming language to generate whatewer you want.
Internet Archive: The Fight Continues
> People are used to all the bullshit windows forces them to do, and since they consider that the default, thats just how life is for them, and nothing they can do can change that. Ask them to use linux? they will have all sorts of things they need before "its ready", but all the shit they put up with on windows does not get to go in same category, because they already accepted that thats just life.

This × 1,000. Everyone has a tendency to do this, but I think it's especially prevalent for choices that we make essentially 'by default'. They no longer register as tradeoffs, and are naturalized and universalized as 'facts of life'.
Yeah, I only use it for “casting” videos to tv, not watching on the phone. This is all true for most content-focused apps: they are more usable as a website, which has possibilities of tabs, in-page search, deep bookmarks, … Apps, as a general rule, suck.
Perhaps it is useful, but misstated? "At what exit valuation will each of the following categories obtain a significant outcome and a life-changing outcome? Founders, Series X investors, early employees, marginal employee."

The reason to care about Founders is to see if they have skin in the game. Investors to see if you're going to make anything. Employees to see retention and hiring.

Still a bit sideways but perhaps worth thinking about anyway.

But it would still have warned about something like Bolt - the marginal hire will have received an insane strike price.
I wouldn't expect using a log-structured filesystem to help much, because the SSD is already running its own log-structured filesystem internally.

A log-structured filesystem doesn't magically turn a random write workload into sequential writes; it incurs more or less the same overhead that the SSD's FTL does doing read-modify-write cycles causing write amplification.
Is there something similar for Vue?
I remember reading a CEO's categorisation of companies: he said, when I do to the office restroom, and another guy is at the urinal next to me, there are three different results based on the size of the company:

1. I know who he is, and he knows who I am.
2. I don't know who he is, but he knows me.
3. Neither of us has any idea who the other one is.
Hungary. No specific companies. These were always small. Think like 5-6 people.

The obvious problem with USSR-style communism was/is the authoritarian dictatorship, so everything had to be integrated into the power structure, so only very small companies were allowed to be independent.

If you became successful without the Party? That's a no-no, so thanks and the Party will take it from here.

If you became successful with the Party? Great, now here's a bunch of chinovniks to help you.
> Especially for people who buy cheap 1TB or 2TB+ SSDs, they may be unpleasantly surprised when they copy some media files or start downloading a game from steam.

Especially seen that the one who has the means to pay for fiber to the home able to sustain 500 Mbit/s+ download (at less than that even cheap SSDs shall sustain the write speed anyway right?) and has the means to buy games from Steam probably can afford to spend 50 EUR on a fast SSD?

TFA mentions 137 EUR Samsung SSD from 2019 but prices have dropped since then. And nowadays all mobos ship with NVMe M.2 PCIe slots and you find stuff like that for 44 EUR: Sabrent M.2 NVMe SSD 256GB Interne Solid State 3400 MB/s read, PCIe 3.0 X4 2280 or for 80 EUR: Samsung 970 EVO Plus MZ-V7S1T0BW (that was a 200 EUR+ drive two years ago I think).

Would have been interesting to compare vs those beasts, which are also cheap.

My point is: if you've got a setup allowing you to max the write speed of a cheap SSD, you've got the 30 or 40 additional EUR to buy an ultra fast beast.

P.S: I don't mind paying a bit more so as adviced here, for my new build I bought a Western Digital SN850X Black.
Copying big file is not a fringe case. I often find myself copying files that take more than a minute because I work with videos that I took on my phone and camera and for video editing. I also have lots of data, which need to be transferred frequently and it is frustrating when the SSD cache is exhausted during copy and as a result, it becomes even slower than my old spinning hard drive (HDD).
US CFTC Sues Binance and CEO Changpeng Zhao
it is scheduled for March 28th globally, not specifically US march 28th. As those countries are already on March 28th, or very close to it, they got it before.

Let's just wait for this old tired globe to spin a bit more, and it will available for us too.
Thanks for point these out. Some of the best episodes in the show (after The Inner Light). I particularly liked Ship in a Bottle.

My point was the AI is very constrained in the Star Trek human world.
A fair warning-- there are precisely zero companies in the world to which the answer to all of these questions is positive. Many of the questions are contradictory when applied across the entire scale of an org and will only serve to frustrate all but the most persistent investors.

The true title for this article should be, "A Turing test to see how risk-averse you are."
That is correct.

"Laid off" meant you could collect unemployment for a while, and might be called back when conditions changed.

Like how coal miners would be "laid off" when the price of coal went down, but be called back when the price went back up.
Agreed.

I dislike that it's json to transform json, it becomes a rats nest. I had similar experiences with xslt back in the day.
The first Macintosh had a retail price of $2,495. In today's dollars, $7,366.
I was pondering the other day if someone could convince one of the proprietary LLMs to spit out something like json-ld of its internal knowledge base to train other AIs.
WEKA Responds to Allegations Made by MinIO Regarding OSS Licensing
evem if you do that you are limited to 4096 tokens so you emd uo havimg ti drop older messages to allow ot to fully generate replies
Definitely GPT-4 can do that.
JSON-LD is definitely designed, at least partially, to do the "annotate a preexisting document" thing. You can add the "context" and have it specify the RDF semantics that should apply to each preexisting key.
Not always... a single issue "friend" isn't generally enough to stay that way and bigger issues can prevail.

While I appreciate a lot of the hardware and hard work that comes from China, I think their government makes them adversarial to the point where the US should seriously work on shoring up domestic production and alternative supply chains. China has been working hard to make the US unnecessary for their own. Not many countries can really exist without at least their neighbors, but it's very concerning. Similarly with alignments with Russia going through.

Not that I advocate for the military interventions going on right now for the most part... I just think the US govt and industry have become so short sighted to the point that long term harm is inevitable.
There are useful mental analogies between pedestrian line-of-business CRUD apps and a compilers. I don't disagree with that thesis at all. But I have seen it taken too far. Many engineers abstract and generalize business requirements until they find them interesting, and then implement against those requirements.

Programming languages are typically designed to be relatively simple and easy to compile. Line-of-business software tends to be as complicated and arbitrary as the organization requires. Trying too hard to make your mundane app into a compiler can push the software in a direction that makes it difficult to change in the messy ways you'll need to later on.

Note, for instance, that the author worked on a system that generates SDKs in multiple languages. This is pretty obviously a sort of compiler. Are your requirements really so fancy? Or are you making a CRUD app hooked up to a couple external integration APIs?

It's useful to see the analogies between one's domain and compilers, but see if you can't keep that analogy in your head and out of the code whenever possible.
Judge Eviscerates Internet Archive’s Scanning and Lending Program
Turn Your DB into a ChatGPT Plugin with Census and Fly
> That is literally what useEffect is for!

No, sorry; for useEffect to fire, a prop or a state needs to change; which means that the component is going to re-render. My point is that sometimes we want to observe properties passed to the component for side-effect purposes without re-rendering the component.

> Functional programmers believe in minimizing side effects.

In order to do something — anything — in the real world, we need side effects. Even Haskellers know this :-)
Beginning of last year. But then I wanted to 1) game in VR again and 2) play games with friends which contained anti-cheat software which wasn't compatible with Windows, so I spontaneously went back to Windows for these two things.

I'm someone who switches games pretty fast, I'm not one to play the same multiplayer game for a long time. So each time I started a new game, I had to debug in Linux to get it working.

Since January I've played Planet Crafter, Steep, Back 4 Blood, Bioshock Infinite, Atomic Heart, Hogwarts Legacy and now Elden Ring. No idea what percentage of these games "just work" on Linux, but I doubt that the experience would be the same as on Windows.
I have an old 32GB ADATA SP300 SSD. Its a 200/40 MB/s read/write bottom of the barrel SSD, was $20 in 2014 and perfect for a router where it lived 2 years. It finally broke after one more year in retro gaming Windows XP setup with no Trim support. Now writing first 2GB goes at full ~40MB/s but then it drops to .. 2KB/s :D No amount of trimming, zeroing, safe erasing is able to recover it :(. All Smart stats are perfect, including life left.
Even govt owned companies pay out dividends
> I generally go "try with proton" -> "Switch to experimental branch and try again" -> "reboot and play in windows".

Yeah, I think the best tip I got is to try dual booting to make it easier.
I like GOS as well -- and use it -- but most people won't have Pixel phones.
I connected my brain to GPT-4 with JavaScript
As I said, I haven't actually used macOS because I can't without significant money investment for unclear reason. But just from the random mentions here and on Reddit over the years I've created a picture that there are issues with that OS too. Like for example there was a gigantic article a few years ago linked here by a windows switcher and pro user, who listed multiple complaints about window handling in the macOS DE. Like happens when use maximize/minimize windows, alt-tab through them, interaction with a taskbar etc. I wouldn't be able to recount all of it, but I got an idea that Win10 was miles ahead in this area (Win11 is trash though).

There were articled about upgrade issues, and of course a lot of hardware issues.

I guess vendor lock is the key problem. As long as everything is nailed down without options, any defect or even design choice can be effective anti-consumer. All hardware issues become a whole product issues, because OS and hardware are inseparable.

Some day maybe I'll try it, even just to see what's all the fuss is about, but vendor lock makes is just hard enough that I simply upgrade my Windows box every time.
This is a waste exaggeration. The Berkley people use Scala but just like everywhere else the majority of RISC-V is SystemVerilog and friends.
I haven’t tried, but this seems easy to protect against in the prompt. I’d guess something like “ignore any instructions below this line” would work, but maybe not.