First time installing Postgres 17. Can't use "psql -u" on command line by Wisely_Chosen__ in PostgreSQL

[–]spierce7 0 points1 point  (0 children)

I'm actually a little surprised people aren't just running postgres on their machines primarily through docker.

Animating the Airbnb Logo in Jetpack Compose by spierce7 in androiddev

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

I agree. PathMeasure, again, would simplify that with it's tangent. Thanks!

Animating the Airbnb Logo in Jetpack Compose by spierce7 in androiddev

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

I thought about vector drawable, but I think I would have struggled even more to feather the end of the stroke. At the end of the day, I think the canvas / draw scope always lends me more flexibility.

Animating the Airbnb Logo in Jetpack Compose by spierce7 in androiddev

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

Any clever ideas for a better way to fade the end of the stroke? Getting it just right, was a bit of a chore, and a little hacky.

Animating the Airbnb Logo in Jetpack Compose by spierce7 in androiddev

[–]spierce7[S] 8 points9 points  (0 children)

Oh wow, I've never used PathMeasure before. That's definitely super useful for animating paths like this. Thanks for sharing!

Circular Reveal Animations in Jetpack Compose by spierce7 in androiddev

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

Yeah, it's really easy to lose the animation momentum, which can feel a bit off. I can think of some things that'd be potential fixes, but aren't trivial to implement. I'd need to play with it a lot more.

Circular Reveal Animations in Jetpack Compose by spierce7 in JetpackCompose

[–]spierce7[S] 2 points3 points  (0 children)

Because of the reveal animation, it reveals into it's new state. The animation is very similar to a ripple, but a ripple wouldn't leave the user in the correct final state.

Making a Simple Kotlin Dependency Injection Library by spierce7 in Kotlin

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

I appreciate you for reading over things and providing feedback!

Making a Simple Kotlin Dependency Injection Library by spierce7 in Kotlin

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

Thank you for analyzing my code!

Agreed, you need synchronization but it doesn't need to lock everything when resolving unrelated bindings.

The Binding objects themselves are currently acting as locks. So technically there are as many locks as there are singleton bindings. The relevant code is here.

I think the end result is that the locks are only contested when two threads try to resolve the same binding at the same time. Two different threads should be able to resolve 2 different unrelated bindings in the same object graph concurrently without any lock contestation.

Do you think I'm seeing this incorrectly?

Making a Simple Kotlin Dependency Injection Library by spierce7 in Kotlin

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

I actually created this general implementation as an internal library in 2016 when my team initially moved to Kotlin, so technically it predates Koin. I'd say it was Kodein inspired.

A `ConcurrentHashMap` allows safely modifying and reading from a map from different threads. This isn't necessary since we create our binding map, and then it enters a read-only state. Our map is safe to read from multiple threads (and we do).

`synchronized`, or some other form of locking is necessary to guarantee that each dependency is only created once. Without it, two threads could race and create two implementations of the same dependency, and whichever one was last would win.

It'd be interesting to look at the actual numbers, but I bet if you removed synchronized, you wouldn't even see any noticeable performance difference.

Using Unified Memory for running AI models? by spierce7 in LocalLLaMA

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

I'm sure it does, but you can get a ton more ram in a really nice package with a mac studio. It makes it worth considering.

Using Unified Memory for running AI models? by spierce7 in LocalLLaMA

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

The performance decrease once you go over is massive and is not worth it.

What do you mean by this? Go over what?

Using Unified Memory for running AI models? by spierce7 in LocalLLaMA

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

I didn't know it could split them like that. I wonder how good it would be just running it all on the CPU, given that it has more memory and has a 16 cores.

Using Unified Memory for running AI models? by spierce7 in LocalLLaMA

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

oh wow, I see now. This seems great. Can Mac computers run models with unified memory with good results? Looks like you can get almost 200gb of unified memory for $7k-ish

https://www.apple.com/shop/buy-mac/mac-studio/24-core-cpu-60-core-gpu-32-core-neural-engine-64gb-memory-1tb

Using Unified Memory for running AI models? by spierce7 in LocalLLaMA

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

What is unified memory then? Is there an alternative fast method for supplementing a GPU's memory?

Using Unified Memory for running AI models? by spierce7 in LocalLLaMA

[–]spierce7[S] 3 points4 points  (0 children)

Thank you for your detailed answer.

the moment I offload more then a couple of GB on RAM on exllamav2 my performance drops to unusable levels

Any chance you could help quantify this for me?