News for hackers. Stuff that matters.

bobbyi

Re:Lateralized sleeping positions in domestic cats on Thursday June 26, 2025 @07:51PM (#44392598)
That could be habit if she got used to one side rather than brain asymetry
Re:Detecting if an expression is constant in C on Tuesday May 13, 2025 @01:49PM (#43975675)
I thought this would work:

#define C(x) (sizeof(char[x]), x)

sizeof is a compile-time operation so x need to be known at compile time.

It didn't work as expected. It turns out there is an exception and the standard says that sizeof is actually calculated at runtime specifically for variable length arrays:

> The sizeof operator yields the size (in bytes) of its operand, which may be an expression or the parenthesized name of a type. The size is determined from the type of the operand. The result is an integer. If the type of the operand is a variable length array type, the operand is evaluated; otherwise, the operand is not evaluated and the result is an integer constant.

Re:Bill Gates tries to install Movie Maker on Monday September 02, 2024 @01:16AM (#41422797)
He's not the boss anymore at this point (2003). Ballmer took over as CEO in 2000.
Re:Weird Ruby: Nil Conversions on Saturday February 24, 2024 @01:22PM (#39493833)
It is if the object can't be meaningfully cast to the type. I'd expect to get an exception. That's why they exist.

For example, consider explicitly casting the string "abc" to an int. Python throws a ValueError. Ruby silently ignores the problem and gives 0. I consider the Ruby behavior to be a gotcha.

I'm selecting 70B and it is coming back with "Answer | Phind-34B Model".

I'm not sure if it's really using the 34B model or if the UI is wrong about which one it used

Re:Things Unexpectedly Named After People on Thursday February 22, 2024 @01:13AM (#39463771)
The other NYC bridges are all (I think?) named Bridge, but they went with Crossing here because Outerbridge Bridge sounds weird.

Another NYC one: A lot of people think "major" in The Major Deegan Expressway means it is a significant expressway, but actually the expressway is named after (Army) Major William Deegan

Re:Memory and new controls for ChatGPT on Tuesday February 13, 2024 @07:36PM (#39364846)
Why can't you search them? In the android app at least, I've never had a problem with search working properly
Re:Unix Shells and the Current Directory on Monday November 27, 2023 @12:03AM (#38428279)
lsof is also good for seeing what files a process is using https://www.thegeekstuff.com/2012/08/lsof-command-examples/
Re:A peculiarity of the GNU Coreutils version of 'test' and '[' on Saturday November 25, 2023 @11:21PM (#38419138)
Searching for /bin/[ gets reasonable results for me

https://www.google.com/search?q=%2Fbin%2F%5B

Re:Escape analysis hates copy elision (2021) on Saturday October 14, 2023 @11:00PM (#37886486)
The usual justification for having a concept of "undefined behavior" at all is specifically to allow compilers to "rule out this possibility" so they can make this sort of optimization.
Re:Deno Queues on Wednesday September 27, 2023 @06:31PM (#37682316)
Materialized views handle this scenario, but sqlite doesn't have them
Re:Flake8-Logging on Monday September 11, 2023 @08:51PM (#37475680)
log.exception is also usually bad when you are re-raising the exception. That often results in same stacktrace logged multiple times in a row which can be confusing or at least annoyingly verbose.

But it can be helpful to log an error message (without stacktrace) to give context that is available only in this frame before letting the exception propagate to whoever ultimately handles and logs it.

Re:Releasing Persimmon-8B on Thursday September 07, 2023 @03:21PM (#37424237)
I'm guessing "the flexibility of naive Python inference" should actually be a native Python inference?
Re:Structured Logging with Slog on Tuesday August 22, 2023 @04:18PM (#37227996)
Walking past an eatery with outdoor seating, I overheard one diner say the phrase "process raw logs" and I thought, "wow, I guess that is one of those tricky problems that basically everyone ends up dealing with".

And then I heard "... with a chainsaw. It's a chainsaw mill" and realized I may have misunderstood the context.

Re:The missing C++ smart pointer on Sunday August 20, 2023 @05:49PM (#37203230)
Is this similar to std::optional? It's a box containing a value. Copying the optional copies the value.
I wanted to get tickets to see Messi when his team (Inter Miami) comes to my area (NYC).

This is a typical weekend NY Red Bulls game. Tickets are available for $10 : https://www.stubhub.com/new-york-red-bulls-harrison-tickets-...

This is the following weekend against Miami. Tickets start at more than $500 (~$650 with fees) : https://www.stubhub.com/new-york-red-bulls-harrison-tickets-...

Re:Llama2.c: inference llama 2 in one file of pure C on Sunday July 23, 2023 @05:00PM (#36839787)
That project already exists https://github.com/ggerganov/llama.cpp
I don't think it's desired for chatgpt which is a back and forth chat.

But this application seems to take one query and give back one answer so its workflow wants a complete response up front.

Re:The Case of the Missing SIMD Code on Thursday June 08, 2023 @03:23PM (#36247292)
> There is no scalar instruction for calculating the absolute value, so it uses a negate and conditional move instead.

Wait, what? x86 has specialized instructions for all kinds of things but doesn't have absolute value?

Recycling Bin is the normal name in US English too. I'm in the US and when I search google for "Recycle Bin" (https://www.google.com/search?q=recycle+bin), the results (in order) are

* "Recycling Bins" from Home Depot

* "Recycling Bins" from Amazon

* "Find the Recycle Bin" from Microsoft

* "Recycling Bins" from Lowes.com

* "Recycle Bins" from Target

* "Recycling Bins" from Walmart

Re:OpenAI's plans according to sama on Wednesday May 31, 2023 @06:37PM (#36145351)
The roadmap here is completely focused on ChatGPT and GPT-4. I wonder what portion of their resources is still going to other areas (DALL-E, audio/ video processing, etc.)
Re:Using ChatGPT for Home Automation on Sunday May 21, 2023 @02:51AM (#36018594)
The June issue of the Atlantic has an article about giving control of nuclear weapons to AI

https://www.theatlantic.com/magazine/archive/2023/06/ai-warf...

Re:OpenLLaMA: An Open Reproduction of LLaMA on Wednesday May 03, 2023 @05:40PM (#35808162)
I haven't watched it yet, but the Practical Deep Learning for Coders course that's available on YouTube is often recommended
Re:Debugging a Mixed Python and C Language Stack on Tuesday April 25, 2023 @08:28PM (#35708433)
Theres also Py Spy, a profiling tool that can generate flame charts containing a mix of python and C (or C++) calls.

https://github.com/benfred/py-spy

It's worked really well for my needs

Re:Defining interfaces in C++: concepts versus inheritance on Thursday April 20, 2023 @05:38PM (#35646721)
Concepts improve the situation with error messages for templates. You get an error message saying the equivalent of "You can't pass this argument to this template function because type X doesn't match concept Y" rather than the esoteric one you get now.
Re:GPT-4 gets a B on my quantum computing final exam on Tuesday April 11, 2023 @04:44PM (#35531300)
The exam is from 2019 and GPT-4's training cutoff is 2021, so it should know about the experiment.
Re:Anthropic’s $5B, 4-year plan to take on OpenAI on Tuesday April 11, 2023 @12:44PM (#35527664)
It's also because the companies are backed by VCs. VCs get their money from limited partners like pension funds who don't want their money invested in porn.
Re:AGI Doom and the Drake Equation on Friday April 07, 2023 @03:19PM (#35485847)
> Did we need to wipe out ants? Or anything to reign supreme on earth?

Yes? Well not to ants, but to "anything". There absolutely are species that humans made extinct.

Re:Midjourney v5 can do hands on Thursday March 16, 2023 @11:37AM (#35183321)
Did they put in work specifically to improve hands and other failure cases? Or is this purely a side effect of a generally bigger/ better model?
Re:Spotify's redesign isn't going down well on Sunday March 12, 2023 @02:15PM (#35123926)
I thought superior UI was the reason to use Spotify rather than YouTube Music, at least if you don't care about Spotify's exclusive podcasts?

Older »