Email or username:

Password:

Forgot your password?
2,453 posts total
Devine Lu Linvega

Thanks for all the report from mastodon.world, a couple more and we'll silence the instance for a bit while they deal with it.

Devine Lu Linvega

Someone taught me how to approx distance between two points without sqrt.

max(abs(x),abs(y)) + min(abs(x),abs(y))/2

git.sr.ht/~rabbits/decadv/tree

Show previous comments
🌈 Andrew ☄️

@neauoire Nifty! I've been doing an approximate `sqrt(n)` recently with this iterative approach:
a = n
for 1..m:
a = (a + n / a) / 2

So I tried this using your approach for an initial guess:
a = max(abs(x),abs(y)) + min(abs(x),abs(y))/2;
s = x*x + y*y;
if (a != 0.0) {
a = (a + s / a) / 2;
a = (a + s / a) / 2;
}

Within a range of -100 to 100 this takes your approximation from a max error of about 34% to a max error of 0.4%. The average error goes from 9% to 0.4%.

It's still just 7% max error and 0.4% average error if you only do one iteration.

Sorry, no fancy visualisations, but here’s a picture of them both overlayed (I considered a “they're the same picture" meme instead):

@neauoire Nifty! I've been doing an approximate `sqrt(n)` recently with this iterative approach:
a = n
for 1..m:
a = (a + n / a) / 2

So I tried this using your approach for an initial guess:
a = max(abs(x),abs(y)) + min(abs(x),abs(y))/2;
s = x*x + y*y;
if (a != 0.0) {
a = (a + s / a) / 2;
a = (a + s / a) / 2;
}

A graph of concentric circles, there’s nothing to indicate it’s two graphs overlayed.
johnfredcee

@neauoire Things I’d wish I’d known 30 years ago..

Devine Lu Linvega

I've come to associate this time of year to hanging with friends on their cozy wooden boat drinking mulled wine and playing card games.

Devine Lu Linvega

For today's #lovebytetcc, I made it so the snow accumulates on the tree in 450 bytes. It's fun to revisit these challenges with more familiarity with the #uxn ecosystem.
git.sr.ht/~rabbits/decadv/tree

slewis

@neauoire perhaps a naive question, but are there any up to date guides to getting/using uxn. Say, with the new OS additions. I felt foolish the other day, wasn’t sure which repo to clone or how to really start

Lovebyte Demoparty

@neauoire I remember sitting in front of the computer as a kid (with no real skills whatsoever, just getting those first pixels to who up) wondering how the heck you'd get snowy pixels to accumulate... if will always feels like a magical thing to me! 😍

Devine Lu Linvega

I realize that there's spam from .social going on, if this goes on for longer I'll silence the instance for a few days while they get their shit sorted.

duckpuck

@neauoire that’s annoying, i really hope it’s stop soon.

Eri

@neauoire got a spam ping from there today, seems they’re being raided or something. Props to the message being gone by the time i opened the notification though

Devine Lu Linvega

Decided to start on #lovebytetcc. A tree in 159 bytes of #uxn assembled directly in my little flow-based operating system designed to do livecoding stuff.
git.sr.ht/~rabbits/decadv/tree

Tree scene written in uxntal
Lovebyte Demoparty

@neauoire Wow, off to a great start! That implementation looks *fun*. 👏

Devine Lu Linvega

seasoning cast iron 🤝 sweaty kettlebell

Devine Lu Linvega

O partigiano, portami via
O bella ciao, bella ciao, bella ciao, ciao, ciao
O partigiano, portami via
Che mi sento di morir!!!!

👏
👏
👏

Devine Lu Linvega

Passing data to and from the menu bar program is working :uxn:
Next up, window controls(close, reload, collapse, etc..)
git.sr.ht/~rabbits/porporo/tre

slewis

@neauoire can the pipes between windows be 3 pixels wide? Say white-black-white or black-white-black to make them more visible?

Devine Lu Linvega

Installed a third 12v outlet in the saloon, so we've replaced the inline fuses with a fusebox. Looks a not neater.
#theStudio

Fusebox, with the casing off.
Y⃒̸̷̝̜̙ͥͥͥngmar

@neauoire You can even fit breakers in those fuseboxes if you want to.

Three sizes of automotive fuses and their pin compatible breaker equivalent.
Devine Lu Linvega

Really happy with how the status bar communicates with the os and reflect the state of the cursor action.

tbsp

@neauoire The changing mouse cursor is a great addition!

lky

@neauoire the frame visual reminds me of plan9

DHeadshot's Alt

@neauoire
Can you change the mode with the status bar yet or is it keyboard only for now?

Devine Lu Linvega

My super power: Checking into hotels for events under an alias, without any proof of identification, having forgotten to tell the event organizer that it's a handle, and succeeding in getting access to my room.

Devine Lu Linvega

So, you're telling me there are designers that work at LinkedIn..?

Show previous comments
curved-ruler

@neauoire looks like multiple, and they don't know about each other

a new hope :blobcatcoffee:

@neauoire 😭 linkedin surprises me every time i see it with how bad it is

nf

@neauoire my experience with designers at big companies is that they’re vastly outnumbered by engineers and overworked across many projects, so a lot of this design mayhem is just programmers doing their best to make things work. Designers don’t get enough recognition or remuneration in the industry. Really sad.

Devine Lu Linvega

nothing brings my thinkpad to its knees as much as Squeak, holy shit is that thing every slow.

David JONES

@neauoire what, still? It was slow in the 1990s

Devine Lu Linvega

Writing a menu bar rom that will reflect the various states of the operating system. It's also the uxn instance that holds the network of connections of active varvara instances. It's nice to have all this stuff visible from within that uxn's own memory.

Leon

@neauoire this is a good start but needs sanity/blood meters

kelp

@neauoire do you intend for some roms to have the capability to change their window position and size on-screen at some point?

this rom seems like it would fit well as a bar on top of the screen

Go Up