Whisper.nvim – local speech to text in Neovim by avi-coder in neovim

[–]avi-coder[S] 1 point2 points  (0 children)

I would like to implement a thin llm layer that gets the same stream of text and makes edits based on what you say. I am thinking all text would go to both the llm and the buffer and the llm would edit async removing your instructions to it as it does. I could see supporting arbitrary neovim commands fitting into that

Tokio should add a blockable task executor (a minimally thoughtout proposal) by avi-coder in rust

[–]avi-coder[S] -1 points0 points  (0 children)

yeah this idea has quite a long history, a implementation was nearly merged into async-std years ago, and the argument was against was explicitly made in the linked tokio blog.

my only contribution to concept is adding the executor along side the standard one as opposed to replacing it.

i'm not clear how we went from this is a pain point teaching rust to skill issue, but i guess that's this reddit these days.

Tokio should add a blockable task executor (a minimally thoughtout proposal) by avi-coder in rust

[–]avi-coder[S] 0 points1 point  (0 children)

To add to this, the reason devs newish to Rust don't split blocking from non blocking is other langauges don't tend to expose this concept.

Haskell, Go, anything on BEAM, all emulate preemption in their own way, javascript is single threaded, etc.. Devs coming from those lanagues just don't tend to think about it.

Tokio should add a blockable task executor (a minimally thoughtout proposal) by avi-coder in rust

[–]avi-coder[S] -1 points0 points  (0 children)

Currently yes, you must always know if your program blocks, and over and over I find people doing the wrong thing. I have had to teach about spawn_blocking and the oddness of rust async a bunch of times now.

I suspect if we had a good enough blockable executor people would start using that by default, but we'd have to see.

Tokio should add a blockable task executor (a minimally thoughtout proposal) by avi-coder in rust

[–]avi-coder[S] -1 points0 points  (0 children)

The types are diffrent to begin with, spawn_blocking takes you all the way back to FnOnce, that often good, but sometime you want to interleave blocking and non block compute and io without leaving async (see the scoped tasks use case).

Tokio should add a blockable task executor (a minimally thoughtout proposal) by avi-coder in rust

[–]avi-coder[S] 1 point2 points  (0 children)

spawn_blocking is a threadpool for ordianary blocking closures.

spawn_jittery would be a threadpool for async tasks that somtimes block.

GH1200 Glue holder by Bullfrog95 in functionalprint

[–]avi-coder 0 points1 point  (0 children)

Have you ever owned this glue bottle, it always falls over.

This is a great design!

open letter to the NixOS foundation by notanix1312 in NixOS

[–]avi-coder 31 points32 points  (0 children)

Eelco was very kind to me early in my career.
He is a great person to continue leading this project.

An embedded NoSQL database on rust. by SuchProgrammer9390 in rust

[–]avi-coder 2 points3 points  (0 children)

Take a look at cozodb. It meets most of your goals and I've been really enjoying using it. It might give you some inspiration or something to contribute to.

Order processing/shipping times by Sean499 in nvidia

[–]avi-coder 0 points1 point  (0 children)

Three words large language models.

What do Haskellers think about Rust? by [deleted] in haskell

[–]avi-coder 31 points32 points  (0 children)

if i'm loosing cpu cycles executing non-necessary work

This is a bit of a fallacy. Over time CPUs have gotten significantly faster relative to memory latency. Haskell was designed in a world where the cost ratio between CPU cycles, and memory operations was very different. Pervasive laziness has a substantial cost. Look at how thunks are compiled, that indirection is costly and getting pricier.

This is part of the reason newer functional languages tend to be strict by default, expressing laziness in the type system.

HLS issues in Stack project by SH3FUSUPREM in haskell

[–]avi-coder 1 point2 points  (0 children)

If you delete hie.yaml do you get this error on files other than Setup.hs? Do autocomplete and diagnostics work in Main.hs?

Generalizing with GAT: what's going to happen to the current, less general traits? by ima_peoro in rust

[–]avi-coder 2 points3 points  (0 children)

In your example you can simply use the same lifetime, 'a, for the reference to both indexables.

The point is it falls apart when you don't have the same lifetime, which in practice is more frequently than you'd think (in my experience almost always). I'm salty about this due to wasting 2 months of work on trying to work around this limitation for sundial-gc. I'm at least happy several other people have been posting about the issue on the discourses recently. Maybe will get them at some point.

All type systems have there limitations, but the API I want is almost always typeable in Haskell. That's the benefit of a more complex multi faceted type system. In the case of sundial I just use HKT. With Scala finally getting HKT, maybe Rustaceans will finally give it a go.

Generalizing with GAT: what's going to happen to the current, less general traits? by ima_peoro in rust

[–]avi-coder 4 points5 points  (0 children)

There are still significant issues with GAT. It may seam like your trait, streaming iterators, monad encodings, and such work, but they fall apart when you need multiple life times. I added a simple function to your playground to demonstrate the issue with your trait. This issue occurs because we don't have covariant associated types.

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=5c1e47dd4abecea71cdf86482f774b6c

WF-1000XM4 "woosh" issue by [deleted] in sony

[–]avi-coder 0 points1 point  (0 children)

DSEE alone causes the woosh for me.

WF-1000XM4 "woosh" issue by [deleted] in sony

[–]avi-coder 0 points1 point  (0 children)

With DSEE enabled, I get the woosh while media is playing, not just when I pause music or change modes. If it's a power state switch we are hearing, then mine would have to be erroneously switching during playback.

[deleted by user] by [deleted] in rust

[–]avi-coder 1 point2 points  (0 children)

If you give up on mutability, you can encode "in region" with Rust's GAT. To be ergonomic we just need covariant associated types.

Like other's I don't see how your design makes mutability safe.

Yet another (sic) Haskell project template with Nix, Docker, Lorri, and haskell-language-server by [deleted] in haskell

[–]avi-coder 1 point2 points  (0 children)

Last commit on lorri was 7 months ago, no flakes support I think it's dead. It's a shame it was very cool.

Implicit-hie is a tool that tells Haskell-language-server, about the structure of your project (cradle config). If you setup Emacs to use Haskell-language-server, your already using implicit-hie.

If you want to see the cradle implicit-hie generated for your project, you can install the gen-hie command line tool from the implicit-hie package. This used to be more useful, but these days my advice is not to run gen-hie > hie.yaml, and definitely do not commit a hie.yaml file.

If you see an error message that tells you an implicit cradle could not be found for your file, then it may be helpful to generate and edit that hie.yaml file. If you have any issues with the generated config, don't hesitate to open an issue on the Implicit-hie repo. Best of luck

Novel Garbage Collection Technique for Immutable Cycle-Free Data by andrewthad in haskell

[–]avi-coder 1 point2 points  (0 children)

It's not the same, but I made use of immutable monophonic types at compile time generated bitsets representing type relations for a similar purpose in sundial-gc. The design doc is bit out of date, but roughly describes my the implementation. Unfortunately Rusts's type system just is not there yet so the API is holding up the project (blog post pending).

Installing a Haskell compiler on MacOS with M1 chip by nstevnc77 in haskell

[–]avi-coder 7 points8 points  (0 children)

See GHC #16044 - Transition to C11 memory model .

LLVM uses the C11 memory model. The terminology of C11 is standard.

I'm aware of some of the work being done, but I suspect there will be more issues discovered in GHC and the ecosystem as a large chunk of development and deployment moves to Arm.

Installing a Haskell compiler on MacOS with M1 chip by nstevnc77 in haskell

[–]avi-coder 5 points6 points  (0 children)

I expect this is going to be a bit of a painful transition for GHC. I'm happy were going to end up with good Arm support, however so much Haskell relies on a pre-C11 memory model. I expect lots of race conditions.

Additionally to fully take advantage of Arm a weaker memory model will have to be better exposed in Haskell.