#programming

1 messages · Page 142 of 1

desert plaza
#

bime*

#

you will see, you'll all see

sage crag
#

by using only machine code, you limit yourself to the lowest level of complexity

tender river
#

its like trying to understand human brains by studying neurons

#

just completely different levels of abstraction

small anvil
#

it’ll get better once im home, im stuck making the syntax in apple notes neurOMEGALUL

desert plaza
small anvil
#

wifi spiked

opaque sigil
sage crag
desert plaza
sage crag
#

why

desert plaza
#

and then

sage crag
#

show me what your syntax will look like

sage crag
#

how will you make an AST in machine code

desert plaza
desert plaza
tender river
#

om after hblang rust declarations feel weird

sage crag
#

if your language is anything more complex than a lisp it will take you a decade

small anvil
desert plaza
sage crag
tender river
#

i just havent written rust in a while

#

and had to think a bit about how name must come after struct or enum keyword

#

not before

sage crag
#

i had this happen to me too

tender river
#

its like how i kept writing -> instead of => in pattern matches after using F#

sage crag
#

i wrote

SomeStruct = struct {
   x: f32,
}
opaque sigil
#

that reminds me of how i learnt rust while doing scala in uni so i kept messing up pattern matching neuroCry

small anvil
#

i did want to try F#

#

is it good?

sage crag
#

i almost forgot how to use traits after using hblang's type system for so long

small anvil
#

or

#

rather

sage crag
small anvil
#

is it worth it

tender river
#

wdym worth it

small anvil
#

to try learning it

#

mb

#

too tired

tender river
#

learning languages that teach you something new is always useful

#

staying in your little bubble is not productive

opaque sigil
#

but the bubble is comfy neuroSadge

tender river
#

personally i only use F# for unity modding, i like it so much more than C#

desert plaza
small anvil
tender river
#

c++ and c only introduce pointers beyond that

small anvil
sage crag
#

hblang is different to c because it has type objects

small anvil
#

near proficient level

sage crag
#

but hblang is zig

desert plaza
tender river
#

go is literally just a mix of java (gc) and c (average age of language features)

tender river
sage crag
warped narwhal
#

how would you even init a TypeTypeStr

tender river
#

.(.(""))

#

or TypeTypeStr.(TypeStr.("")) as the long form

warped narwhal
#

reminds me of that one piece of c code

sage crag
warped narwhal
sage crag
#

this doesnt exist in hblang

small anvil
warped narwhal
small anvil
#

if you get what i mean

desert plaza
small anvil
#

my head hurts

tender river
sage crag
small anvil
#

but ya u right, was just wondering if it would be worth it to get into learning it (especially considering its microsoft made)

small anvil
desert plaza
small anvil
#

that’s probably why the CIL spec has so many op codes i haven’t seen in use

warped narwhal
#

clearly, everyone should be writing code in brainfuck mhm

tender river
# small anvil interesting

ocaml (or sml) is potentially a better choice to learn since it didnt have to do any adjustments for CIL

#

or just haskell

sage crag
#

ocaml is a good learning choice

tender river
#

they have different approaches to modularity

small anvil
warped narwhal
small anvil
#

ocaml seems interesting though

opaque wharf
#

I have solved my hunger issue

#

The answer is shakshuka

sage crag
#

i have just added documentation.enable = false to my nix config

desert plaza
sage crag
#

its not impossible like an anvil falling on your head from a cloud

sage crag
#

i didnt like how long it was taking to generate man pages every time

#

i dont use local manpages anyway

tender river
#

you can just disable that documentation.man.generateCaches = false;

sage crag
#

hmmm maybe later

tender river
sage crag
#

muahahaha

sage crag
#

i will re-enable man

#

sadge

desert plaza
small anvil
warped narwhal
tender river
# sage crag sadge

in addition to generateCaches = false; you can do documentation.doc.enable = false; and documentation.info.enable = false; for a small boost

doc is for html manuals, its actually pretty interesting because e.g. bash, git and nixos provide html manuals, but its useless if you dont use it nub

info is gnu docs, it would be usable if it didnt use emacs keybindings

desert plaza
warped narwhal
desert plaza
#

not surprising

fierce pasture
#

lol

desert plaza
#

works on my machine neuroTomfoolery

desert plaza
warped narwhal
#

no loops neuroPogHD

#

-# (your loops probably don't work)

desert plaza
#

erm i contest that

opaque wharf
#

This will be malbolge situation 2 : electric boolagoo

warped narwhal
#
++++++++++[>++++++++++<-]>---.

this should print a and it is about as simple as a program can get with a loop, so see if that one works

tender river
# sage crag testing obs v4l2 loopback

also useful packages with man pages to add to environment.systemPackages

man-pages - linux man pages (man 7 signal is from there), i use it much less than i should but even then it ends up being useful for me
man-pages-posix - posix man pages, this one is less useful because linux provides the same docs but more specialized for the os

#

awa

sage crag
#

how the hell do i

#

flip this

#

the awa is backwards

tender river
#

it looks fine on my end vedalNeuroHUH

sage crag
tender river
rigid snow
#

classic

sage crag
#

wait i remember this

#

yea

#

discord is stupid

desert plaza
#

what is happening

warped narwhal
rigid snow
#

it flips it so yo don't freak out because you're human and see yourself in the mirror only

#

it's good ux

#

you subconsciously "look worse" when you're not flipped

sage crag
#

rrrr

#

discord doesnt support avif

rigid snow
#

and for other people of course you're not flipped because tht's how they see you

opaque wharf
#

What if I want to flip the person tho?

tender river
rigid snow
#

why

warped narwhal
#

why not?

sage crag
#

is that audible

tender river
#

i dont think so

sage crag
#

drat

rigid snow
#

programmer discovers webcam feature

#

no of course not you're fucking muted the webcam is video only

sage crag
#

that's stupid

rigid snow
#

??

sage crag
#

external camera may have audio

opaque wharf
#

Muted

sage crag
#

let me try this

rigid snow
sage crag
#

is it audible

rigid snow
#

specifically for that purpose

tender river
#

still no

sage crag
#

exactly

#

hmph

rigid snow
desert plaza
tender river
#

because audio is captured separately

#

on browser end

#

you have to select the camera as the microphone or something like that

sage crag
#

it doesnt exist

warped narwhal
rigid snow
#

ps5

opaque wharf
#

It should

#

What is the camera?

sage crag
#

obs v4l2-loopback plugin

rigid snow
#

ohmygod i fuckingcan't

opaque wharf
#

Of course it doesn't have audio

#

Usually physical device will make separate device for audio and video

#

And that can be selected

rigid snow
#

because a webcam

#

is

tender river
rigid snow
#

VIDEO

tender river
#

uh

#

scuffed screenshot

sage crag
#

well, it not being there isnt my fault enub

#

so

tender river
#

you probably also have to configure pipewire output on obs end

#

or actually just dont configure it on obs end

#

configure it separately

sage crag
#

it would be infinitely better to use obs

opaque wharf
#

audio virtual device

tender river
#

create a dummy pipewire device and pipe something in there

#

hmm

rigid snow
tender river
rigid snow
tender river
#

no

#

im stupid

desert plaza
tender river
#

i do have audio

opaque wharf
tender river
warped narwhal
opaque wharf
rigid snow
warped narwhal
rigid snow
#

EVERY os.

tender river
desert plaza
warped narwhal
#

hey now, mandlebrot.bf takes 10.5 billion cycles to complete. This is on the low end

desert plaza
#

why

#

a stress test or something

#

or to test my loops

warped narwhal
#

test the loops

#

specifically the wrapping

#

as I used scanners for moving to the location for writing the next char

#

aka +[->+]- will move right until it finds a cell with the value of 255

desert plaza
#

while as in while(1)?

warped narwhal
#

but a manually written interpreter can take longer, especially if it hasn't went through a compiler, and doesn't implement any optimisations itself

desert plaza
#

i made it work, and then i forgot about it

#

haven't done any optimization or bug fixing or anything

desert plaza
#

2ms and 8ms for that program to echo?

warped narwhal
#

yes

desert plaza
#

my interpreter is still running the program neuroTomfoolery

#

it is broken

warped narwhal
#

copy.sh compiles the brainfuck into javascript, so it is super fast. my program precomputed the loop jumps but nothing else

desert plaza
#

any tool to see what a running process is doing?

#

i don't think it'll complete neuroTomfoolery

opaque sigil
#

CUDA driver version is insufficient for CUDA runtime version

Build cuda_12.8.r12.8/compiler.35583870_0

Driver Version: 580.65.06
are you high nvidia, if anything my driver would be too new neuroCry

glad path
desert plaza
#

i gotta know where my program hands up

glad path
desert plaza
#

i used gdb to find out what function it is stuck in

glad path
#

actually there probably is a way to do it

desert plaza
#

something with ptrace or something

#

idk i've not looked into it

glad path
#

im sure theres a way but idk how

desert plaza
#

i will surely find out eventually

#

like monitoring a vm too would work

#

low-level advanced stuff neuroWicked

glad path
rigid snow
#

this reminded me how cool i felt when i read and wrote memory of a gpu passthrough vm

#

totally transparent to userspace software

sour lotus
#

I am sooooo close, been working 4 months to get Live2D moc3 models to work as a chrome extension in chatgpt

rigid snow
#

i did not test kernel vm detection

#

mainly because that's only anticheat software and i don't wanna get accounts to ban

#

too much hassle

rigid snow
rigid snow
#

vrm isn't live2d

haughty basin
#

VRM is even better, more expressive

rigid snow
#

vrm is literally 3d

haughty basin
#

Also nothing stops you from making a 2D model in 3d space 🙂

rigid snow
#

also why is it in way higher demand and more expensive

haughty basin
#

it's all hacks though, making 2d look like 3d is a lotta work, riggers make $3000 on a simple model

rigid snow
#

because it looks better in the end

#

than 3d i mean

#

not always, but usually

sour lotus
#

I like em 😄

#

Im also using Pixi (which I see VRM was also using)

rigid snow
#

isn't that a literal game engine or am i misremembering

sour lotus
#

but I love the look of the L2D moc3 models

rigid snow
#

they're using pixiv's vrm driver for threejs

#

which is uhh not the same as pixijs

#

and isn't related

sour lotus
#

Man I have so much to learn

rigid snow
#

i was misremembering kind of

haughty basin
#

Classic newbie mistake is to implement something from scratch yourself when there's literally end to end solution that you can adapt to your case
Unless this was intentional from start to learn things

rigid snow
#

his thing is different

#

it's like a uuh

glad path
rigid snow
rigid snow
#

also very nice that i could recompile it to strip the stupid qemu labeling and serials that were triggering vm detections left and right

#

or rather replace them

rigid snow
glad path
#

can the self/this argument for functions inside classes interfere with function wrappers in python

#

i feel like i should know this lol

rigid snow
#

neuroErm is there this in python

haughty basin
#

live2d renderer in JS

rigid snow
#

i don't think he rolled his own renderer

#

no way

haughty basin
#

All the wiring still a lot of things to do 🙂
but I'd argue this is sort of better to learn entire thing so you can then later use something from a shelf and be ready to jump into fixing a bug that might appear somewhere down the stack

glad path
rigid snow
amber fractal
#

You could use this, linters will execute you but it's possible

glad path
#

i've never actually seen anyone use this in python

#

ive only even seen anyone use this once

amber fractal
#

I've used myself once

glad path
amber fractal
#

The project was jank and self was already used in scope

glad path
#

better than this i think though

#

this looks weird too

haughty basin
rigid snow
glad path
#

why

#

just why

rigid snow
glad path
#

that would be so confusing to read

amber fractal
#

I might switch it to this for the lols

rigid snow
#

should be I, that's less confusing

glad path
rigid snow
#

to complete a contract and collect money? ok

#

but still weird

amber fractal
glad path
rigid snow
glad path
#

yk

#

normal

#

somewhat

rigid snow
#

javython

haughty basin
# rigid snow to complete a contract and collect money? ok

For contract case it's even more weird if you decide not to use available solutions 🙂
are we gonna waste 4 months of dev time + all the costs making a barely functioning product?
that's too expensive for any sort of investor/company
gotta ship value fast and dirty, that's how it is in most companies today

glad path
# rigid snow javython

that could either be
a) actual port of python
b) really terrible joke language
c) nonexistent

amber fractal
glad path
#

actually scratch that

#

look up what the proper practice is for whatever lanugage you're using

amber fractal
haughty basin
rigid snow
glad path
sour lotus
#

Soooo...mine’s intentionally from scratch so I can control every layer and "own it" a bit more. Chrome extension context, Live2D rendering via PixiJS, model fitting, scaling quirks, all of it is self inflicted harm lol. This is a new world for me. I tried finding already built ones, and found a few but none were chrome extension based but more "plug into your website via FTP,etc etc. I’m basically building a “visual companion” for ChatGPT rather than a VTuber pipeline, so I’m skipping Three.js/VRM entirely....or lets see 🤷‍♂️

For me, the fun (and pain) is learning the wiring so later I can rip apart an off-the-shelf solution and fix bugs without crying. 😅 Well okay lots of crying and frustrations, damn. Also I need to set it up for my future plans with this 😄

glad path
#

hear me out just ask chatgpt to make the extension for your /j

amber fractal
haughty basin
glad path
#

wait...

#

import this should be import self

rigid snow
haughty basin
sour lotus
#

Dont know what to ask if I dont know 😄

#

lol

sour lotus
glad path
#

yall if I use a lot of threading in my projects should i switch them to use asyncio

haughty basin
glad path
#

what's wrong with threads tho

opaque sigil
#

Threads and asyncio serve completely different purposes

#

Though I guess maybe not as much in python

haughty basin
amber fractal
#

If asyncio worked on multiple cores, I'd not be able to use it on one of my projects due to race conditions.

haughty basin
glad path
#

mostly im trying to run a lot of stuff concurrently

haughty basin
#

it's sort of vague, are we talking long-running processes or short running?

glad path
#

uh

haughty basin
#

like I/O bottle-necked or something else

glad path
#

hard to say

rigid snow
#

i just looked up asyncio because i don’t do python and i can’t see any mention of threads, is it just green threads/event loops

glad path
#

kinda varies

rigid snow
glad path
#

pretty sure asyncio lets you have things

#

not be blocking

#

sort of

rigid snow
#

yeah

glad path
#

(among other things)

rigid snow
#

i get that it’s in the fucking name

#

async

#

i’m just saying it doesn’t thread

#

it uses an event loop system

glad path
#

python doesnt thread even

rigid snow
#

so one thread

glad path
#

python threading isnt real threading

sage crag
#

you can do real threadpools in python

glad path
#

most of the time at least

sage crag
#

you can also disable the GIL in new versions of python

rigid snow
#

good morning konii

sage crag
#

its 11pm

rigid snow
glad path
#

yah

rigid snow
sage crag
#

this is outdated and also wrong

glad path
#

im not surprised

sage crag
#

you can do true multithreading in python, even without spawning multiple interpreters, if you just disable the GIL

glad path
glad path
#

i just meant that like

haughty basin
#

Threading is good if you need to share context in a single process, if you want some concurent/parallel processing, etc
This is good for example for consuming lots of messages (event processing) or responding to many web requests simultaneously (e.g. nginx), where shared context is minimal.
But if you use it to start/stop sub-processes that do some stuff without real communication you don't need this level of granularity / control over resources.
A normal set of processes would do just fine. If you're on linux you can even do sockets if need to send a few bytes here and there

glad path
#

by default ig

#

its not real threading

sage crag
#

if one thread blocks on IO then another can resume work

#

aside from that they are just concurrent

#

while the GIL is enabled

glad path
#

im using them mostly for concurrency

tender river
rigid snow
#

or am i stupid

tender river
# tender river

nix has that version in the python313FreeThreading package apparently

rigid snow
haughty basin
#

threads can run in parallel but the problem is memory safety, are you sure your thread 1 would not modify shared memory at the same time when thread 2 works?

sage crag
#

not with the GIL

rigid snow
#

or locks in this instance

haughty basin
rigid snow
#

wait global yeah

#

i don’t get it

tender river
haughty basin
rigid snow
#

what

#

there is no shared memory

sage crag
#

in a parallel context there is always some form of shared memory unless you do message passing

#

its solved with atomic operations

glad path
rigid snow
#

it’s not

#

whatever

haughty basin
# rigid snow there is no shared memory

event loop on one thread, accepting many connections at once, processing things one at a time but imagine you created a global object everybody can access (aka shared memory)
e.g.

  • you have a Facade for API client that is "cached" for performance purposes (big mistake)
  • first request goes in (customer A), sets the API token inside that global api_client, does the request
  • second request (customer B) goes in, lets see, oh we already have api_client!111 gonna use that (woohoo performance!11)
  • second request from customer B uses api token from customer A, they fetch the Shopping Cart
  • WTF I didn't add THESE items in my cart!?
  • OH WHY THERE'S someone else's address on my profile? WTF going on

this really happened to a real project I was at back in 2019 🤣

#

event loop btw

#

very safe they say btw

#

it's thread safe right, one thread running all the time Kek

#

I had to do all-nighter to remove all the cached api clients throughout entire frontend app...

rigid snow
#

that... would work the same way in a sync context.... i don't understand, are we clearing the token at the end of proccessing the request?

haughty basin
#

that's the hat trick, we didn't 🙂
classic mistake, don't clean up after the request is finished

rigid snow
#

so, where's the issue with concurrency

haughty basin
#

the trick is to always create separate context / shared memory for requests, then you have no problems with concurrency

#

but that rule was violated (global api_client) and there you go

rigid snow
#

i've never felt more stupid

#

i really don't understand why this would not happen in a perfectly sync environment

haughty basin
#

if there's no event loop then you have to create a new thread every time a request goes in

#

it's isolated

rigid snow
#

so you were not clearing the token and the issue has absolutely NOTHING to do with any form of concurrency

#

it would happen regardless

#

great

haughty basin
#

it would not happen on django backend for example

#

which is not concurrent on asgi/wsgi

#

technically you have workers on event loop that pass web requests to thread pool

#

then django selects a web request and assigns a free thread from that pool

#

difference really is just how much context is shared

rigid snow
#

ahhhh i get it, "threads" which don't actually share anything and are subprocesses

#

i'm so mad i wasted mental capacity on this

haughty basin
#

Threads ≠ subprocesses.
Threads within the same process share the same address space (globals, heap, FDs).
Subprocesses don’t.
In Python, threads still share memory even with the GIL, only one thread runs Python bytecode at a time, but they interleave and C libs can release the GIL.
That’s why putting per-request data in a global (e.g., a cached client with a mutable token) is risky in both threaded and asyncio setups.
Fix is architectural, not “async vs threads”: if you keep state per request (ContextVar / threading.local() / DI), make clients immutable or pass the token as a param you're gold .
If you want hard isolation, use processes.

glad path
#

why does my ai have to have 5 minute latency 😭

haughty basin
rigid snow
glad path
#

its running locally

rigid snow
#

man i need sleep

glad path
#

WAIT WHAT

#

WHAT THE

#

NEGATIVE RAM???

#

HOW DOES A PROCESS USE NEGATIVE RAM

haughty basin
#

it creates new ram for you

#

on disk

glad path
#

yes but

#

ok

#

i know what swap is

#

but how does it use negative ram

haughty basin
#

lemme think hmm
total_memory_available = os.get_ram_size()
total_memory_used = os.get_used_ram(this.process) + os.get_swap_size(this.process)
shared_memory_size = total_memory_available - total_memory_used

#

(I'm not a systems programmer)

glad path
#

it went straight from 3gb to -2.37gb

#

how do you have negative filesize

#

also it probably just grabs the actual filesize of the shared memory instead of calculating it

haughty basin
#

it just means that the thing you are subtracting is larger than thing you're subtracting from

glad path
#

that was for one process specifically btw

rigid snow
# haughty basin Threads ≠ subprocesses. Threads within the same process share the same address s...

yeah i get it but it's genuinely such a stupid architectural decision. the point of an event loop is to magically make your sync code do async without threading. if you're doing something that would fail in sync code and assumes subprocesses where there aren't, it's not just a skill issue, it's firing worthy - you cannot program, congrats, and why do we pay you? you can't even fucking write sync code
yeah i get that it's "shared memory" technically, but then you can argue any global state is "shared memory" in ANY app, sync or async, threads or subprocesses or different machines altogether etc. the problem with shared memory with threading is race conditions, where you truly concurrently access the same memory. that is not a concern if you're not accessing memory concurrently which you aren't in this case

haughty basin
glad path
#

my ai is ghosting me br

#

i dont know how it can even do that

haughty basin
glad path
#

ok

#

im just gonna assume that deepseek is enjoying using all my memory or something

#

and taking an extra long coffee break

rigid snow
glad path
#

its taking like 5 minutes to generate

haughty basin
glad path
haughty basin
glad path
#

no clue

#

im using the ollama python lib

rigid snow
haughty basin
glad path
#

r1

#

idk

#

some variation of it

#

i forgor

#

let me check

haughty basin
#

how much ram do you have

glad path
#

36gb

haughty basin
#

and vram?

glad path
#

no clue

#

im on a laptop

rigid snow
#

from the font rendering

#

from the screenshot

#

it's a mac

glad path
#

usually theres like a minute of latency

#

im assuming theres an issue with my code

rigid snow
#

point is, however much vram it needs

glad path
#

time to see if the prompting is even finishing

rigid snow
glad path
#

im just gonna restart ollama lol

rigid snow
#

can you confirm or deny you're on an apple silicon macbook

glad path
#

i am in fact on a sillicon macbook

rigid snow
#

then you should be fine if the model can fit in 36gb

glad path
#

it can

#

its just taking like forever to generate and idk why

haughty basin
# rigid snow and once again, you can't access memory concurrently in an event loop

you can still stomp on shared state via interleaving (cooperative concurrency) when you await

import asyncio
counter = 0

async def bump():
    global counter
    tmp = counter           # read
    await asyncio.sleep(0)  # yield → other tasks run here
    counter = tmp + 1       # write stale value

async def main():
    await asyncio.gather(*(bump() for _ in range(1000)))
    print(counter)  # often << 1000
asyncio.run(main())
glad path
#

it doesnt usually take this long

#

oh god what

#

ok thats concerning

#

the laptop is quite hot but the fans are on the lowest setting i think

haughty basin
#

but it's event loop

rigid snow
#

and there's no concurrent memory access here

rigid snow
haughty basin
#

yeah, no simultaneous access to memory but still counter is broken

#

that's the point

rigid snow
#

because you're storing counter in tmp before yielding...

haughty basin
#

that's exactly the misuse of shared state

rigid snow
#

then just don't yield?

#

or don't store it?

#

idk this feels like painfully obvious misuse

haughty basin
#

don't use event loop if you don't know you can shoot yourself in the foot, I'd say 🙂

#

or threads

#

use good old processes

glad path
#

ok i thing they're definitely something wrong with th ai

rigid snow
haughty basin
#

how much are talking? 10 years, 20?

#

it took me ... hmm

rigid snow
#

actually working way less than that, but i absolutely did async in js in like 2019-20

haughty basin
#

it took me around 6 years to encounter the problem I outlined above with event loop + shared state

#

I didn't even code it myself, it was another genius frontend dev

#

who decided to rewrite entire app into TS

#

and I was the one on fire debugging his shit code

#

my bad I approved his MR I guess 🤣

#

also we were leaking memory in Node.js easily just by forgetting to clear setTimeout

rigid snow
#

again, the problem you outlined is so fucking stupid it makes no sense for this convo to even exist

#

why are we setting a global in the first place

#

what caching

#

why

haughty basin
#

but it did happen, and not a single dev could quickly figure it out, we were basically stuck because things started breaking randomly, because on top of this we used pm

#

so the problem was like, happen not on every request but every 4th or so

#

15 engineers

rigid snow
#

in a request handler

haughty basin
#

yeah it was a startup and I was the only MR reviewer

#

had to ship value fast

#

no time when you juggle backend, frontend and figure out how k8s work on GCP

rigid snow
#

there's practically 0 reasons to do that in any scenario

haughty basin
#

it was not a global, it was a singleton pattern and I was like "hmm ok we should be safe because we create it inside a function in the js, right?"

#

little I knew about how event loop works back then

rigid snow
#

an exported instance then

#

that's a global too, but harder to spot sure

haughty basin
#

it was a shitshow for sure

#

but teached me two things

#
  • don't trust singletone pattern
  • don't trust event loops
  • don't trust yourself 🤣
rigid snow
haughty basin
#

I mean... I was exhausted from 12 hour workdays

rigid snow
haughty basin
#

hindsight is 20/20

#

I'd quadruple check myself before I even think about using low-level primitives to "launch some apps concurrently" or do a "simple communication"

#

I mean, we do have docker containers you can scale with pretty low overhead. Do you really need to save on RAM?

#

Are we talking drivers / embedded?

#

btw sometimes not even DB transaction can save you

-- Setup
CREATE TABLE counter(id int PRIMARY KEY, value int NOT NULL);
INSERT INTO counter VALUES (1, 100);

-- T1
BEGIN;
SELECT value FROM counter WHERE id=1;  -- 100
-- app computes new=101
UPDATE counter SET value=101 WHERE id=1; -- holds lock, not committed yet

-- T2 (in parallel)
BEGIN;
SELECT value FROM counter WHERE id=1;  -- 100 (stale snapshot)
-- app computes new=101
UPDATE counter SET value=101 WHERE id=1; -- waits, then overwrites
COMMIT;

-- T1
COMMIT;
-- Final value = 101 (should have been 102)

-> Lost update under READ COMMITTED

Why: each tx writes a constant based on a stale read; the DB serializes writes but can’t infer you meant “+1”.

Fixes (pick one):

  • Do it atomically in SQL: UPDATE counter SET value = value + 1 WHERE id=1;
  • Lock on read: SELECT ... FOR UPDATE → compute → UPDATE.
  • Optimistic locking: add version and UPDATE ... WHERE id=? AND version=? (retry on 0 rows).
  • For cross-row invariants, consider SERIALIZABLE (with retries) or proper constraints.
midnight sigil
#

vanor uses ligatures NeuroClueless

haughty basin
#

btw here's Hello World in ES6+

(await (async () => {
  const { log: printer } = await import('node:console');

  @((cls) => cls)
  class ℍ𝕖𝕝𝕝𝕠 {
    #world = 'Hello, World';
    get [Symbol.toStringTag]() { return this.#world; }
    async *[Symbol.asyncIterator]() { yield this.#world; }
  }

  const hello = new Proxy(new ℍ𝕖𝕝𝕝𝕠(), {
    get: (t, p) => {
      const v = Reflect.get(t, p);
      if (v == null) return t[Symbol.toStringTag] ?? '🤷';
      return typeof v === 'function' ? v.bind(t) : v;
    },
  });

  const msg =
    `${(await hello?.[Symbol.asyncIterator]?.().next() ?? { value: String(hello) }).value ?? hello}`;

  function tag(strings, ...vals) {
    return strings.raw.reduce((a, s, i) => a + s + (vals[i] ?? ''), '');
  }

  globalThis['🖨️'] = printer;
  globalThis['🖨️'](tag`${1n}${msg}`);
})());

This actually compiles in babel 🤣

olive sable
#

hello

#

i have returned from going to mcdonalds with my sister and her friend for icecream

raw trout
#

I love the mcflurry

stray dragon
#

lol

hollow spruce
#

?

stray dragon
hollow spruce
# stray dragon

Let me check ure meta data of this image or screenshot shot 🙂

stray dragon
#

it's not my image

hollow spruce
stray dragon
#

i know

hollow spruce
stray dragon
#

i didn't take the image

#

smh

#

my phone is from samsung not motorola

olive sable
# stray dragon

honeslty this is completetly worthit if they didnt break to board. just needs a new fan for 5 bucks

stray dragon
#

it does make you wonder how it happened though

hollow spruce
#

BROKEN RTX 3090 ?

stray dragon
olive sable
#

case too small

#

used an angle grinder

stray dragon
#

lol

hollow spruce
#

Ask to owner
If the gpu process and vram it has

olive sable
#

i need to binge watch adventure time again sometime

#

they added a sequel

amber fractal
amber fractal
# stray dragon

I seem to remember FE cards only having the gpu on the left and the right being a flowthrough cooler.

patent walrus
#

relative’s old laptop not doin too hot

#

this is gonna be going back to an older relative, none of the data matters
i’m tempted to slap like windows 10 ltsc enterprise iot on it hoping that itll run significantly better but idk

#

can only go so far with a battery that’s like 8 years old

velvet crestBOT
#

You have unlocked new role

stray dragon
#

congrats on unlocking new role vani

patent walrus
#

thanks i worked really hard for it

rough ocean
hollow spruce
#

Lts is the best one in windows

patent walrus
hollow spruce
pulsar edge
#

the battery in my asus laptop did that back in february and it was really annoying

#

even when plugged in, it would shut off if the battery was too low, which would happen if it was too cold

#

the only way I could get it to boot some days was by booting into the BIOS for like 15 minutes to warm it up

glad path
#

i added basic discord functionalities to an ai im working on and tried to test it
but i forgot it has a 5-ish minute latency since i'm running everything locally on my laptop

#

10 minute latency at times even

#

this is quite painful.

#

uhm

#

seems like we're gonna get 12 minute latency

#

15 maybe

#

darn

#

its still goin

#

ok i killed it

olive sable
glad path
#

ok so the issue is the memory

#

apparently I can't feed it 30 lines

#

so i cleared most of it

#

ok so ig i gotta improve that now

hollow spruce
#

Still loading......

nocturne olive
#

Laptops are known for having lower VRAM GPUs

glad path
#

it's quite budget since I'm literally inserting it into the prompt
once i can confirm it can send messages on discord i'm going to work on the memory and make it actually decent

nocturne olive
#

You're gonna have to do something crazy to fit it into VRAM if you don't want to simply get a smaller model

worldly panther
#

I cannot for the life of me get torch to recognize/use cuda why

#

gonna McLose it

worldly panther
#

I made the mistake of installing cuda v13 before realizing torch hasn't been updated for it yet so I had to install cuda v12.9 and change some system variables
but nothings working NOOOOOOOO

stray dragon
#

you're in for a long haul

worldly panther
#

I don't doubt it :c

stray dragon
#

took me 20 hours

worldly panther
#

what was the issue for you?

stray dragon
#

it was less "the issue" and more "the issues"

#

i don't even remember what they were

worldly panther
#

lmAo

#

fair

stray dragon
#

trial and error until it worked

worldly panther
#

LMAO

#

god thats brilliant I didnt realize there's memes for it

faint sandal
#

anyone remember the Snapchat hotdog

patent walrus
faint sandal
#

I don't think there's a battery to save

hollow spruce
olive sable
#

if i use the gpu in my laptop i get about that much too

#

but ye on "best battery life"

#

that battery is cooked

patent walrus
#

i dunno about you guys but this feels off

hollow spruce
olive sable
#

with 12 hours they mean its lifespan, not the capacity

patent walrus
#

this thing is running an i3-7100U with 4 GB of ram how the fuck does it only last an hour

#

gotta unscrew the entire back panel to get access to the battery too

tender river
#

like if you spill something

patent walrus
#

well its like a cheap $350 (at launch) acer laptop so

tender river
#

EITHER waterproof it OR make it accessible

olive sable
#

bring back those big battery slots at the back

#

actually put it on the front, i need io in the back

olive sable
#

er

#

???

amber fractal
#

Give me a back slot under the cameras like how it was in the olden days

#

Yes I'll have less battery capacity, but I can also grab more batteries

hollow spruce
#

try to remove battery and direct connect to Power connection

#

i already used on my phone

olive sable
#

thats not the point

amber fractal
olive sable
#

if i have to use it while plugged in i might as well jsut use my normal pc

#

if i had the money idd def make a custom chunky phone

glad path
#

ITS STILL RUNNING

#

THE AI IS STILL RUNNING

#

ITS BEEN LIKE AN HOUR

olive sable
#

good? bad?

amber fractal
#

We love 4gb ram

glad path
#

vedal complains about 2 second latency

i have theoretically INFINITE latency

#

1h and it still didnt do a thing

patent walrus
#

look at this fuckass battery

hollow spruce
#

ok 100

amber fractal
olive sable
#

are you training it mayhaps?

#

or is your pc just ancient?

faint sandal
olive sable
hollow spruce
#

batter must be survive dont give up battery

amber fractal
olive sable
glad path
#

im not training it no

#

it usually has like 3 minutes of latency at most

#

i don't know exactly what's gone wrong

amber fractal
#

:bwaao7:

olive sable
#

well it must have gone wrong somehow, a full hour means its stuck somewhere

glad path
#

i've had a similar issue before but it turned out to be the ai gaslighting me since it does have the option to do nothing

#

it misunderstood a prompt

#

but this time its just not taking any actions i think

hollow spruce
#

my pc has no microphone AND still USING stream link on mobile AS microphone

#

testing ❌

worldly panther
#

YEAHHH BAYBEEE

worldly panther
pulsar edge
#

holy small

#

at 11.1V its 58Wh though

pulsar edge
olive sable
#

you know how electric bikes ahve batteries the size of my keyboard?

#

i need on of thsoe to be able to slot into my laptop

midnight sigil
worldly panther
#

say sike right now

midnight sigil
#

sike right now

nocturne olive
worldly panther
#

actually the FIRST issue was that I got wrong CUDA for my torch

#

xD

nocturne olive
#

Silly

worldly panther
#

then I needed to reconfigure the interpreter pycharm was using

glad path
#

yall im gonna try implementing vector-based memory to my ai system wish me luck

worldly panther
#

then I realized I was using python 3.13 and torch is only compatible up to 3.12

nocturne olive
glad path
#

i havent given it a lot of thought

#

im just kinda

nocturne olive
#

That could be why it's slow

glad path
#

im using deepseek r1 8b

#

i have an m3 pro

#

also the prompt gets exponentially longer as the memory grows

#

which is what i'm tryna fix

nocturne olive
#

Why are you using a DeepSeek model for a low-latency task? DeepSeek R1 models have thinking which really slows it down

glad path
nocturne olive
glad path
#

its not efficient

nocturne olive
glad path
#

so im trying to rewrite it

nocturne olive
#

What is your GPU and what quant of the model are you using?

glad path
#

so the m3 is also the gpu

nocturne olive
#

And with how much memory?

glad path
#

no clue how much vram

nocturne olive
#

The VRAM and RAM are the same on Mac

glad path
#

36gb then

nocturne olive
#

Kinda tiny

glad path
#

its a laptop

#

also

#

apple charges like $400 to increase ram

nocturne olive
#

I guess the main cause for the slowness is a combination of thinking and the unified memory having horrible bandwidth

glad path
#

i also haven't particularly tried to kill the latency

nocturne olive
#

I could probably run a much larger model much faster on my 3090

glad path
#

likely

nocturne olive
glad path
#

it is

#

i just hate windows so incredibly much

#

i literally cannot stand it

nocturne olive
#

Use Linux

glad path
#

eh

#

nothing wrong with linux

nocturne olive
#

You can make Linux look like whatever you want
Want MacOS-like UI? You can have it

midnight sigil
#

vector-based memory

nocturne olive
#

Linux is the superior OS

glad path
#

i dont really want to have to rewrite most of my custom applications again for linux

nocturne olive
#

What languages are they made in?

glad path
#

pretty much entirely python

nocturne olive
#

Then they should just work

#

Python is portable

glad path
#

its not gonna be a complete rewrite

#

but im gonna have to tweak some stuff so libraries use different backends

nocturne olive
#

Basically just install the libraries you need, that's it

glad path
#

also im gonna have to recompile the apps

#

which is annoying

nocturne olive
#

Recompile? Python is not compiled

glad path
#

im not planning to get a new laptop anytime soon

midnight sigil
glad path
#

there are libs that basically setup portable python envs and bundle them in to apps for macos

#

or windows exes

midnight sigil
#

cpython itself is a compiler

glad path
#

yes but it's not a compiled language generally

midnight sigil
#

python is runned on a vm

glad path
#

its interpreted

#

thats what most people will say

#

(normally at least)

#

anyways i do actually want to get the memory started

#

so cya in a bit

midnight sigil
glad path
#

btw deepseek r1 8b is not surprisingly

#

8b parameters

#

oh god

#

just occured to me

#

adding vision is gonna be a nightmare

#

the latency on that is gonna also be an issue

midnight sigil
#

neuroPogHD vision embedding model

glad path
#

im probably going to use gemni since it supposedly has image recognition

#

sooo

woven temple
#

You mean Gemma?
If you want to run fully locally with a decent enough vision model you're in for a bad time with a slow setup

glad path
#

yes i mean gemma

#

arent the names interchangable

#

or am i stupid

fast pagoda
#

they are not

#

but people will get what you mean

#

they are different though

amber fractal
#

Normally you exec a string directly

#

but you can also call compile to put it into bytecode first then pass it to exec

fast pagoda
#

nuitka exists and that blasts it into C++ then into a binary

#

package installers do similar like xcfreeze or whatever that was called

#

cx freeze

#

pypy and numba both compile JIT on first run and then keep it like that till done which speeds em up a lot

#

same w/jax

glad path
#

ok im kinda almost done

#

shoutout to chatgpt for walking me through it and also providing a good amount of code (i dont mindlessly copy and paste it tho dont worry)

#

now I need to handle fragile info like discord channel ids

#

in metadata ig

stark needle
#

im getting my 2nd 3090 todayneuroPogHD

#

Finally I'm free from the cloud

rough bloom
#

Surely 48 GB is enough for everything Shirley

nocturne olive
#

Sure would be a great machine to train NeuroSynth on

glad path
#

yall ii have the vector memory set up i think

#

but im not sure what to use for querying it

#

since the ai needs a LOT of context

#

like i was feeding it the whole memory for a reason before

#

what should i do

stark needle
#

i just need to buy a nvlink bridge as well

#

holy shit why are they used 700$

#

frick the ai boom

opaque sigil
#

The bridge?

opaque wharf
stark needle
stark needle
opaque sigil
#

????

rough bloom
opaque sigil
#

They're like 200 on ebay here, which granted is still absurd

#

tf you mean 700 for an nvlink bridge

rough bloom
opaque wharf
#

Am I mistaken nvlink for SLI?

stark needle
#

oh lmao just checked, the gpus are not compatible with each other

#

cause the asus card is a bit wider

#

who cares it's not the end of the world

#

i can always do ddp

opaque sigil
stark needle
#

i dont wanna use sli

opaque wharf
amber fractal
#

I'm pretty sure SLI, SLdied with more recent driver versions anyeags

opaque wharf
#

Because SLI is not supported on those card IIRC

opaque sigil
#

It technically should be supported if you have an older driver at least

#

On the 3090 at least

#

on the 4090 it's dead dead

rough bloom
amber fractal
rough bloom
#

do they not put it in the same spot

#

are they stupid

opaque sigil
#

That feels like something nvidia would require

amber fractal
#

I feel like they wouldn't so they can say their cards are conistant

rough bloom
amber fractal
#

Have to wait on shad for this one, I was just memeing

rough bloom
amber fractal
#

I swear risers 4x ed in price here

#

even for gen 3

opaque sigil
#

It's one of those things were signal integrity is #1 priority and being able to just freely move it around sounds like an awful idea

opaque wharf
opaque sigil
#

I don't think nvlink risers exist

rough bloom
opaque wharf
opaque sigil
#

Oh

opaque wharf
#

Both of them

opaque sigil
#

Then no

rough bloom
opaque sigil
#

Well assuming you have a decent riser I guess

opaque wharf
rough bloom
amber fractal
#

Poorly made marketing image, who ate the cable?

#

I was looking at prices again

rough bloom
opaque sigil
#

3090 is gen 3 right

#

Or 4 already?

rough bloom
#

PCIe Gen 4 YEP

amber fractal
#

Okay thank you, I'm finally seeing $10USD offers again

#

Not $20 anymore

rough bloom
opaque sigil
#

Muh precious bandwidth neuroSadge

opaque wharf
#

Poor pcie5

#

No one is fast enough to use it yet

opaque sigil
#

Wdym

#

Pcie 5 is trivial to saturate for any gpu lol

amber fractal
#

Just gen 5 x8 neuroTroll

#

For AI more bandwidth is always more good tho

opaque sigil
#

Actually the same can be said for gen 6 too

#

I guess maybe not 7

opaque wharf
opaque sigil
#

No

opaque wharf
rough bloom
opaque sigil
#

soon though

amber fractal
#

You got, uhhh 4 months left bois

#

Surely

opaque sigil
#

I'm really curious how they're going to cool gen 6 m.2 drives

south needle
#

water

rough bloom
opaque wharf
#

I wonder if they could somehow layer peltier on the silicone

amber fractal
#

I'd say waterblock with maybe metal to metal contact if they decide they want to produce those kinds of memory (not controller) chips.

#

If your gonna overkill on the controller, might as well slightly cool the memory cells

opaque wharf
#

I think the seebeck effect is faster to transfer heat

#

Hmmm, I wonder what is the limit for infinitely thin seebeck effect layer

amber fractal
#

The larger the difference in temperature, the harder it has to work to keep a temperature. So you'd need to not allow temperature to leak while also acting as a gate.

#

Half of me wonders does the effect stack, but the other half is saying your better of just increasing voltage.

#

-# Can you add enough thermal mass buffers and isolate a stack to where room temperature exists on one side and close to sub zero exists on the other? Got no idea

opaque sigil
#

thermodynamics is just voodoo magic

opaque wharf
#

But I am too distracted by other thoughts

amber fractal
#

The peltier 10 pack is calling out to me

midnight sigil
#

nwero I climbed up chat and see topics being changed every few messages and so neurOMEGALUL

amber fractal
opaque wharf
midnight sigil
#

offtopic smh

opaque wharf
#

Nono, technique to cook food is technology you know

glad path
opaque wharf
#

Cooking using peltier neuroPogHD

opaque wharf
#

You have stove on top, fridge at the bottom

amber fractal
#

Hold up, he cooking

#

What about running water heating in one of the sections?

opaque wharf
#

Could be done too. I was thinking more about the buffet style food container

#

Since they usually have some form of heater beneath

amber fractal
#

Coffee machine PauseSama

#

But also a way to not have the stove overheat for some reason

#

divert to something else while keeping the cool side cold

opaque wharf
midnight sigil
# opaque wharf You have stove on top, fridge at the bottom

https://youtu.be/1799Rqn71A8

the real proper way to cook

amber fractal
opaque wharf
#

Bruh, why is my cursed idea always get some interest here ICANT

amber fractal
#

I know some can handle high heat, as meant for energy collection from a fireplace or smth similar. But what if we just ran a current instead ReallyInnocent

uneven pulsar
#

well can anyone see why my commits are taking that long like i didn't yet made a pull req or commit on my main branch

midnight sigil
#

do verbose on your pushes idk

opaque wharf
uneven pulsar
opaque wharf
opaque wharf
#

Only Sam is allowed to do cursed stuff with git

amber fractal
#

I wish he just walked in and saw that

midnight sigil
uneven pulsar
opaque wharf
uneven pulsar
midnight sigil
glad path
# opaque wharf Look into RAG

that'll be helpful for the part of the ai that speaks and whatnot

but idk what to do about the decision making part of it (chooses whether to talk, do nothing, etc)

not that it doesnt get a direct prompt from the user

opaque sigil
#

Committed the venv?

uneven pulsar
opaque wharf
uneven pulsar
#

wait no

opaque sigil
uneven pulsar
#

duDe SHIT YES

glad path
amber fractal
opaque sigil
#

otf

uneven pulsar
#

i think i am just going to copy past my main code and reset the api keys and create an proper env

opaque sigil
#

Make sure to add the venv folder to .gitignore

uneven pulsar
#

cuz i think i messed up the env

opaque wharf