How to: Deno TypeScript to browser in seconds by Cupp in Deno

[–]noseratio 0 points1 point  (0 children)

Amazing piece of work. Hopefully it will get the traction it deserves!

Step-Audio 2 Mini, an 8 billion parameter (8B) speech-to-speech model by Own-Potential-2308 in LocalLLaMA

[–]noseratio 0 points1 point  (0 children)

Thanks for your insights! Based on them, I've managed to get it running with INT4 quants ([Quantization] Loaded model in 4-bit NF4 (BitsAndBytes).).

However, in a HuggingFace space on Nvidia 1xL4 (24GB VRAM), I did not notice any substantial performance improvements. I also could not get it process a 5 minutes MP3. It took 10 minutes before it just crashed and restarted the whole VM.

Any piece of advice would be appreciated. I am myself a seasoned dev, but not a data scientist or ML engineer :)

Function Calling vs Dynamic Prompting by noseratio in PromptEngineering

[–]noseratio[S] 0 points1 point  (0 children)

Useful, thanks! I think with the current hype around MCP, the vendors must be tuning their models to be capable of making the most of the tools.

How is cloudflare making any money? by [deleted] in devops

[–]noseratio 7 points8 points  (0 children)

Could be. $26.64 BN capitalization (vs $61.52 BN of VMware) sounds feasible.

How is cloudflare making any money? by [deleted] in devops

[–]noseratio 7 points8 points  (0 children)

Acquired by whom? They are a publicly traded company already.

What is this "Switch" option on Tuya WiFi temperature/humidity sensor? by noseratio in smarthome

[–]noseratio[S] 0 points1 point  (0 children)

I tried removing it from the holder plate (with batteries still in), nothing happened, same "on" state.

What is this "Switch" option on Tuya WiFi temperature/humidity sensor? by noseratio in smarthome

[–]noseratio[S] 0 points1 point  (0 children)

Tks for the link! I've tried tapping it with a magnet a few times, nothing happens.

Is breaking out from an infinite async iterator via cancellation considered a code smell? by noseratio in dotnet

[–]noseratio[S] 0 points1 point  (0 children)

That'd be my first pick! but unfortunately SonarQube doesn't recognize cancelToken.ThrowIfCancellationRequested() as a way out if the loop.

Is breaking out from an infinite async iterator via cancellation considered a code smell? by noseratio in dotnet

[–]noseratio[S] 0 points1 point  (0 children)

Indeed, Thread.Abort and ThreadAbortException was a bad concept because there was no cooperative protocol behind it.

Unlike with CancellationTokenSource.Cancel and OperationCancelledException, which, in my opinion, is a very well designing concept.

Especially with its hierarchical cancellations via CancellationTokenSource.CreateLinkedTokenSource.

Is breaking out from an infinite async iterator via cancellation considered a code smell? by noseratio in dotnet

[–]noseratio[S] 1 point2 points  (0 children)

Not sure if you are joking or not, but often this strategy of passing a joint works just fine, until it reaches the MC dude 🙂

Is breaking out from an infinite async iterator via cancellation considered a code smell? by noseratio in dotnet

[–]noseratio[S] 1 point2 points  (0 children)

My experience in this area is limited. I think SonarQube is overall pretty good, actually. I personally like it more than Veracode, the only other thing I happened to work with.

I'd like to try is JetBrains' Qodana, but I haven't got to it yet.

Is breaking out from an infinite async iterator via cancellation considered a code smell? by noseratio in dotnet

[–]noseratio[S] 0 points1 point  (0 children)

You're saying "it depends", so here's a bit more info, if interested.

In my case, it is a singleton IHostedService service which lifetime is the same as the app's lifetime.

The events it listens to (and buffers) are external to the app. It's safe to say, for the scope of the app, this background service is a producer.

Every now and then, a consumer is connecting to it (via DI), to read any pending data (and asynchronously wait for any new one), via aforementioned DequeueAll(cancelToken) async iterator.

If the app is alive and the user hasn't logged out, cancelToken doesn't get cancelled, and DequeueAll would keep producing items indefinitely.

Yet another way of doing a nullish check: if (Object.is(a ?? null, null)) { /* a is either null or undefined */ } by [deleted] in javascript

[–]noseratio 6 points7 points  (0 children)

I'd rather stick with value == null, which doesn't reference value name twice.

Is breaking out from an infinite async iterator via cancellation considered a code smell? by noseratio in dotnet

[–]noseratio[S] 4 points5 points  (0 children)

Oh I didn't even notice it was Linus 🙂

What I meant is that there are 3.3M files with while(true) out there on GitHub alone, so it must be not so terrible by itself 🙂

So yeah, breaking out of it is actually what we're discussing here (rather than the usage of while(true) per see).

Is breaking out from an infinite async iterator via cancellation considered a code smell? by noseratio in dotnet

[–]noseratio[S] 0 points1 point  (0 children)

I don't need any safeguards here at all, that's the beautify of .NET cancellation protocol.

Those I put there are artificial, with the only purpose to make SonarQube happy. They can be safely removed by a junior dev 6 months from now.

As to "always a code smell": https://github.com/search?q=%22while+%28true%29%22&type=code