#💽Programming Chat v2

1 messages · Page 20 of 1

spare quartz
#

you did 224

#

just counted

#

also

#

kitties ......

rustic vine
#

wait im dumb

#

strings are in the heap

#

its a TValue with a pointer to the string

spare quartz
#

oh so it is a reference

#

👍

rustic vine
#

yes

#

but its interned

spare quartz
#

knew it

odd thunder
odd thunder
#

lose weight before your chair explodes

spare quartz
#

ive never seen online dating as advertisement for a minecraft mod

rustic vine
#

dear imgui reference

spare quartz
#

JUST CAUSE ITS BLUE

#

oh right

#

i need to make that server

timid quartz
#

@spare quartz

macro_rules! _parse_slash {
    // Extract #[choices(...)] (no Option supported ;-;)
    ($ctx:ident, $interaction:ident, $args:ident => $name:literal: INLINE_CHOICE $type:ty [$($index:literal: $value:literal),*]) => {
        if let Some(arg) = $args.iter().find(|arg| arg.name == $name) {
            let $crate::serenity_prelude::ResolvedValue::Integer(index) = arg.value else {
                return Err($crate::SlashArgError::new_command_structure_mismatch("expected integer, as the index for an inline choice parameter"));
            };
            match index {
                $( $index => $value, )*
                _ => return Err($crate::SlashArgError::new_command_structure_mismatch("out of range index for inline choice parameter")),
            }
        } else {
            return Err($crate::SlashArgError::new_command_structure_mismatch("a required argument is missing"));
        }
    };

    // Extract Option<T>
    ($ctx:ident, $interaction:ident, $args:ident => $name:literal: Option<$type:ty $(,)*>) => {
        if let Some(arg) = $args.iter().find(|arg| arg.name == $name) {
            Some($crate::extract_slash_argument!($type, $ctx, $interaction, &arg.value)
                .await?)
        } else {
            None
        }
    };

    // Extract Vec<T> (delegating to Option<T> because slash commands don't support variadic
    // arguments right now)
    ($ctx:ident, $interaction:ident, $args:ident => $name:literal: Vec<$type:ty $(,)*>) => {
        match $crate::_parse_slash!($ctx, $interaction, $args => $name: Option<$type>) {
            Some(value) => vec![value],
            None => vec![],
        }
    };

    // Extract #[flag]
    ($ctx:ident, $interaction:ident, $args:ident => $name:literal: FLAG) => {
        $crate::_parse_slash!($ctx, $interaction, $args => $name: Option<bool>)
            .unwrap_or(false)
    };

    // Extract T
    ($ctx:ident, $interaction:ident, $args:ident => $name:literal: $($type:tt)*) => {
        $crate::_parse_slash!($ctx, $interaction, $args => $name: Option<$($type)*>)
            .ok_or($crate::SlashArgError::new_command_structure_mismatch("a required argument is missing"))?
    };
}
rustic vine
#

$

#

if I got a dollar for every $ in that

#

I'd be

#

still poor, but less poor than before

timid quartz
spare quartz
#

what does it do

timid quartz
#

Your mom

spare quartz
#

mrowwwwwww

timid quartz
spare quartz
#

mrowwwwwwwwww

spare quartz
#

why is he named like this

#

ai slop..

rustic vine
#

which average do you intend on keeping btw? I was thinking about it and im honestly not sure which one would be more correct

spare quartz
#

haven't decided yet

rustic vine
#

maybe a windowed one would be better? I'm not sure how to judge which one would be what I'd expect

#

I think I'd expect a windowed one but wouldn't notice if it wasn't

#

so maybe it doesn't matter lol

lavish dove
#

Is that Elon musk

timid quartz
#

do it

spare quartz
timid quartz
#

👎

spare quartz
#

👍

#

he's turning birtish..

#

its over..

#

l websites.
Social media is too limiting. We believe that everyone should be able to freely express themselves in their own little corner of the web, without having to worry about things like algorithms, tracking, or advertisements.
Nekoweb is free of any advertisements, and is run completely by donations from its users.
Join us on our discord to chat with the community and the developers!

timid quartz
#

without having to worry about things like algorithms, tracking, or advertisements

Join us on our discord

spare quartz
wraith scarab
#

did some eye tracking programming and settled for an algorithm instead of using ai

#

because erm i only have raspberry pis and they might die

rustic vine
#

I had to touch surface level signal processing and antenna theory for something a while ago

#

It was hell

#

People who major in that are insane

spare quartz
#

i love having -80 dB for my internet connection

#

ialso love having 250 dB for my military sonar

rustic vine
#

dB being log scale does not help

#

And then there being dBm

#

dBi

#

dBd

#

I wish it was simple 😭

spare quartz
#

its so barely visible

#

better

spare quartz
#

neat

spare quartz
spare quartz
#

todo

  • log event
  • cleanup connection pinging event
  • log colors
  • fix button animations
full berry
#

what's wrong with mit

#

that's like, the best license for oss

spare quartz
#

also added console autolocking/position saving

full berry
#

adonisne3phosphate

spare quartz
#

yes thats my name hello

full berry
#

spare quartz
#

call now!

full berry
#

no

rustic vine
full berry
rustic vine
#

that prob ends up being

#

uhhh

#

1, 3, 4?

spare quartz
rustic vine
#

yep

#

weird stuff

#

fun fact the same happens for typecasts

spare quartz
#

..., ...
turns into
...[1], ...[1...]

rustic vine
#
local t = {1, 2, 3, 4}
local function a(...)
  print(...)
end

a(unpack(t) :: number) -- 1
a(unpack(t) -- 1, 2, 3, 4
#

what do you think this prints?

spare quartz
#

1 2 3 4

rustic vine
#

ha

#

it doesn't

#

it prints 1

#

whereas no typecast prints 1, 2, 3, 4

#

I was super confused by that behavior a while ago

spare quartz
#

i thought typecasts had no effect on exe

rustic vine
#

but whats actually happening here is

#
local t = {1, 2, 3, 4}
local function a(...)
  print(...)
end

a((unpack(t)) :: number) -- 1
a(unpack(t) -- 1, 2, 3, 4```
#

a typecast wraps whats casted around enclosing ( and )

#

when you do that to a variadic, it returns the first value

spare quartz
#

oh that makes sense

#

no wonder variadics are weird with types

rustic vine
#

very

spare quartz
rich epoch
#

i thought you moved to telegram

spare quartz
#

i only really speak here

rich epoch
#

ah ok

timid quartz
#

Signal better

timid quartz
#

Telegram objectively worse

spare quartz
#

No

timid quartz
#

Yes

spare quartz
#

oops didnt mean to put hose As

full berry
#

e2ee turned off by defualt

#

people say it does at least i havent used it in years

timid quartz
#

turned off by default for 1-to-1 dms and no option at all for group dms iirc

full berry
#

what the fuck

spare quartz
#

awke

timid quartz
proud creek
#

telegram bad

spare quartz
#

I CANT ESCAPE

full berry
spare quartz
spare quartz
#

(what i meant by don't fly over nj)

wraith scarab
#

i managed to make a simple eye tracker with opencv but it's a bit basic. just uses threshold method with contour areas. gonna try using haar cascades with a mix of threshold/contours @rustic vine

#

red marker is the x output, only need x axis for this project

#

but need to make it scale properly to the width of the eyes rather than just using the whole frame, so probs will use haar cascades for defining eye bounds

#

might make an auto threshold algo if it hasn't got one built in

#

the white box is the detection area but needs to be a tiny bit bigger

#

should be less painful anyway once i have fixed lighting conditions

wraith scarab
#

atp u nerd its just the output after thresholds

#

thats just my pupil

timid quartz
#

@spare quartz why don’t you go meow on the guard frequency

spare quartz
wraith scarab
#

study grass

rustic vine
#

simple solutions win every time

#

if thresholding and countouring works then thats what I'd go with

lavish dove
spare quartz
rustic vine
spare quartz
rustic vine
#

just don't have accidents

#

actually the compiler eliminated all of this

#

👍

#

oh it uses n later

#

um

spare quartz
#

just read 4 bytes of uninitialized memory

#

itll probably be correct

rustic vine
#

TRUE

spare quartz
#

stop making new languages

#

return to c

timid quartz
spare quartz
timid quartz
#

oh THAT

#

yeah

#

lmfao

spare quartz
timid quartz
#

sorry I thought the ocaml code was faulty

spare quartz
#

yeah 😭

timid quartz
#

ママママジカル&ミラクル

spare quartz
#

why are you referencing makemon

#

or that oster song

timid quartz
spare quartz
#

this isnt java

timid quartz
#

kotlin 👎

spare quartz
#

this isnt kotlin

timid quartz
#

uhhhhh

#

javascript? 👎

spare quartz
#

this isnt javascript

timid quartz
#

WHAT IS IT

#

it's nto ada

spare quartz
#

its rust

timid quartz
#

wrong

spare quartz
#

:3

timid quartz
#

rust uses semicolons and self rather than this

spare quartz
#

it's kotlin i just like lying

timid quartz
spare quartz
#

about rust though

timid quartz
spare quartz
#

earlier i found a minecraft mod using rust

timid quartz
#

based mod

spare quartz
#

terrible mod

timid quartz
#

BASED MOD

spare quartz
#

if only i knew how to use jni with ada

timid quartz
#

go through c :3

spare quartz
#

why

#

WHY ARE YOU REFERENCING THE SONG I CANT SEND HERE DUE TO BABIO

wraith scarab
#

Green dots are eye X axis bounds

#

Green rectangle is iris

spare quartz
#

what is this coded in

wraith scarab
#

Red line is an output from an algorithm which takes in averages/curves and shit

wraith scarab
spare quartz
#

im asking a question

wraith scarab
#

DIE

#

!!!!!!!!!

#

because i know you'll YAP

#

python opencv

spare quartz
#

no i dont care i just wanted to know

wraith scarab
#

oh ok

spare quartz
wraith scarab
#

because i like python and i know its slow

#

but its fast enough for me

#

But yeah I'm making a simple eye tracking program for mechanical eyes for a project

spare quartz
#

fursuit

wraith scarab
#

No

timid quartz
spare quartz
#

BLLLLLEEEEEEEEEEHHHHHHHHHHHH

#

PCB DFESIGN

wraith scarab
timid quartz
spare quartz
spare quartz
#

overriding function Handle_Client (Header : HTTP_Header; State : in out Server_State)

timid quartz
spare quartz
spare quartz
#

borringgg

spare quartz
lavish dove
full berry
#

GUH?

#

gotta meet christ himself to use copilot bruh

spare quartz
spare quartz
#

GO AWAY!!!!!

timid quartz
spare quartz
timid quartz
spare quartz
#

belhehe

#

you're so gay

timid quartz
#

It’s better than anything else I’ve used tbh

#

Alacritty and Kitty included

spare quartz
#

what are those??

timid quartz
#

GOOGLE them

#

Smh

spare quartz
#

WHY

#

they're so QUEER

timid quartz
spare quartz
#

good .

#

i don't know why cmd or powershell isnt good enough to some people though...

timid quartz
spare quartz
#

WHY IS BASH NOT GOOD ENOUGH FOR YOU

timid quartz
#

BASH ISNT-

#

ughhhhh

#

You don’t just

#

Open bash

spare quartz
#

okay then

#

what ide do you use

timid quartz
#

Ok what if I don’t want to boot up my whole IDE just to use my shell

spare quartz
#

open your systems shell

timid quartz
#

macOS default terminal app is dookie

spare quartz
#

true

#

is there any features that stick out though

#

cause like

#

i dont see much out of a shell other than up/down and typing

#

bleh coke in bottles suskc,.

timid quartz
#

Among the things it lets you do, you can control F the output

#

And it limits it to that one block

#

The UI for selecting previous commands with the up arrow is also nice

spare quartz
timid quartz
#

Like

#

——
cd ../
——
mkdir gay
——
cd gay
——

#

Stupid iPhone emdash

spare quartz
#

OH

#

and the output is in that block

timid quartz
#

Yeah

#

So like

#

——
cat really_long_file.txt




——

spare quartz
#

co ol

timid quartz
#

It’s also got tabs

#

And written in rust

spare quartz
#

every terminal has tabs today

timid quartz
#

And ai goyslop if you want that

spare quartz
#

and i dont care about the rust

#

but i feel like every console today should have CTRL+F

#

sucks that they dont!!!

timid quartz
#

It also limits it to a certain block too

#

You can search the outputs independently

spare quartz
#

ANIME GIRLS INM MY AERS RUNNING AWAY FROM SCPS

timid quartz
spare quartz
spare quartz
# timid quartz 魔魔魔 マジカル・アンド・ミラクル この広い世界へ飛び出そう

懐かしの!曲を!歌いました!!!!!!!!!!!!!
サルゲッチュ20周年記念でTwitter始動してたから新作確信してたけどそんなことはなかった…
定期的にスペクターに沼ります(ド性癖)

■original:SHINGEN MONKEYS
作詞作曲:百石元さま
https://www.youtube.com/channel/UC5hT4j9Gp6K0pJTVsVf5Mzw

■MIX:kzmariさま
https://twitter.com/kzmari1

■vocal&illustration&MV: ばやちゃお
--------------------...

▶ Play video
#

oh mtf spanwed :3

#

im dead :3

#

god i need to make my own tts app

#

the one i use rn takes a minute to open an crashes every few minutes from a segfault

#

GOD DAMMIT OF COURSE

timid quartz
spare quartz
timid quartz
#

I WANT TO BUT THEY DONT WANT ME WORKING FOR THEM

spare quartz
#

"rewrite it all in rust!!!"

spare quartz
#

holy crap that is freaky

rustic vine
spare quartz
#

from, what i can tell

#

GCC is seeing the int i() typedef during compilation, putting it's code (the for part) into main

#

the asm/for part is then resolved into a call to puts

#

and elsewhere is just an empty looping function... somehow

#

ow crap i just cut myself on a pepsi can

spare quartz
#

how this works is beyond me

rustic vine
#

same, I can guess at kinda what happens but the technicalities are beyond me as well

#

thats cool though

#

I assume the unused annotation is so that the entire function doesn't get eliminated

spare quartz
#

C doesn't have execution in the top level right?

rustic vine
#

no, you can't

spare quartz
spare quartz
#

potential practical use for this odd behavior

rustic vine
#

That that's what you meant

lavish dove
rustic vine
#

Probably UB as all good things are

#

👍

spare quartz
#

3 billion developers depend on it

#

ratified as intentional behavior

rustic vine
#

LOL

lavish dove
#

It doesn't even compile in clang lmao

spare quartz
#

eh expected

lavish dove
#

No it ignores that

#

Complains about the i in the loop function

spare quartz
#

oh

lavish dove
#

And bad use of asm

spare quartz
#

asm in clang probably uses LLVMs format

lavish dove
#

Ya

lavish dove
#

It's at&t

rustic vine
spare quartz
#

nono like

lavish dove
#

Lol

spare quartz
#

bleh i cant find it

#

but LLVM has their own format for inline assembly

#

aside from intel/at&t

rustic vine
#

The intel asm syntax is much nicer to read right? At least I found it so, albeit I rarely touch asm

spare quartz
#

i prefer ATT honestly

rustic vine
#

Huh really

spare quartz
#

yeah i just find it better over intel

#

not like it matters at the end of the day

rustic vine
#

Yeah, it doesn't, i was just curious what yall thought

lavish dove
#

I mean Intel feels more mathematical and att is more logical and programmer like

#

Cuz in Intel x = y
Where x becomes y
And att lol

rustic vine
#

I can see that

lavish dove
#

Intel is rust no wonder ATP doesn't like it

spare quartz
#

im gonna kms if i see more gan-llm slop

lavish dove
#

Lmao

spare quartz
#

so im gonna sit on the fence in that regard

lavish dove
#

Wait have you made an operating system in ada yet

spare quartz
#

i've got 2 simple low level programs

#

1 real-mode OS and 1 UEFI loader

#

but neither are actually built beyond just saying hi

lavish dove
#

Uwu

spare quartz
#

if i had the time i'd work on the UEFI loader since its more complete

lavish dove
#

Mine doesn't even say hi yet 😭

rustic vine
lavish dove
#

By collegeboard standards you are God tier

spare quartz
#

does your engine have JIT

rustic vine
rustic vine
lavish dove
#

You don't just worship the machine God you are the machine God

rustic vine
spare quartz
rustic vine
#

Let's go

spare quartz
#

you'll be paid twice as much as the developers

rustic vine
#

Prompt engineer vs. Webdev

#

Who wins?

lavish dove
#

Prompt engineer an ai to do the prompt engineering and you evolve

spare quartz
#

so React wins

rustic vine
#

Honestly

#

True

spare quartz
#

avif.

rustic vine
#

Everyone except js frameworks lost

spare quartz
#

honestly i couldn't tell you what one of these actually did

rustic vine
#

Angular 😅

lavish dove
#

They all do the same thing

#

But in a different way

spare quartz
#

but whats that

lavish dove
#

Make a website

rustic vine
spare quartz
#

IIS 11 will come out eventually

#

you have to believe

rustic vine
#

I believe

lavish dove
#

IE 12 will come out eventually and even real feet will tremble from its sheer thingability

spare quartz
#

wait http* 3 is over udp?????

lavish dove
#

Why do it over UDP

spare quartz
#

probably cause its faster or something

lavish dove
#

Well yeah

spare quartz
#

but that means i have to do the thing with the thing and

#

annoying

lavish dove
#

But that quic thing is probably gonna just do everything that tcp does anyways

spare quartz
lavish dove
#

If using UDP with connections (I'm guessing but I'm already ranting now) is somehow faster then fix tcp instead of making a new layer for things to break

rustic vine
spare quartz
lavish dove
# spare quartz

Designed to obsolete tcp
Then replace tcp instead of making tcp over UDP!?? Rahhh

#

I feel like everything new in programming just makes things better by making them worse

spare quartz
#

well tbf it also multiplexes connections

#

multiplexing is the big word

lavish dove
#

Things are already multiplexed though!!!

#

Make the fucking thing work better even if it's more difficult instead of just building on top of it

#

I just looked it up they made it faster only because of tcp's header

#

Not header idk

#

I looked up it's article on chromium they literally made quic only because tcp would be too difficult to change

#

"tcp-like over udp" fuck you

#

tcp but less back and forth over udp, why does it haved to be over udp if your making a new fucking protocol make a new one goddamit

#

quic literally made me crash out 😭

spare quartz
spare quartz
timid quartz
#

And they didn’t make it a separate protocol that is implemented in the OS because that drastically slows down development time because the protocol gets ossified in the OS

lavish dove
lavish dove
#

you dont haved to even make it in the operating system

#

what I was saying is that quic is just making tcp but doesnt do as much as it can to solve the problem that its supposed to solve

#

they just made tcp over udp for no reason when they have the power to make tcp better than it is now, but would rather not

#

oof udp doesnt have a handshake thing

#

but even udp's rfc says

Applications requiring ordered reliable delivery of streams of data should use the Transmission Control Protocol (TCP)
and instead of improving tcp, they make up a tcp that runs over udp

#

it just sounds crazy to me for them to replace tcp with fixed tcp over udp instead of fixing tcp in the first place

#

like you haved to do some minor parkour to permanently irrevocably cure your disease (improving / replacing tcp) or you could take a pill that helps with the symptoms (quic)

spare quartz
full berry
#

hi chat i need help deciding if i should us opengl or vulkan for a project i'm working on, i've used both and know that opengl is super easy but hasn't khr essentially stopped working on it in favor of vulkan?

spare quartz
# full berry hi chat i need help deciding if i should us opengl or vulkan for a project i'm w...
Khronos Forums

I’m asking this question here directly because I haven’t seen a clear answer anywhere. Speculation aside, does anyone have any kind of concrete information they can share or direct me to which indicates what the future plans for the OpenGL specification are? I’m talking working group papers, timelines, roadmaps, etc. Anything published, presente...

full berry
#

i've already seen about everything under the sun on vulkan vs opengl but i want other opinions too

spare quartz
#

but hasn't khr essentially stopped working on it in favor of vulkan?

#

clarifying this point

#

you don't have many options besides just vulkan

#

metal exists if you wanna do mac development

#

and depending on the project you can sidestep a graphics library and just use native ui

full berry
spare quartz
#

isn't that obvious

#

it's vulkan

#

like, what exactly do you want out of your program

#

modernity, extensibility, performance, compatibility?

full berry
#

it doesn't need to be modern by any standards, but it needs to be able to do most of those
i've seen gl and vulkan do almost the same on some things, with many different people saying different things about each one. i mean even taffo recommended gl, but yeah i'm hearing lots of different opinions

spare quartz
#

well if it doesn't need to be modern and you don't wanna spend 5 weeks making a triangle do opengl i suppose

full berry
#

maybe i should just make my own graphics api 'draw everything()' Alarm

spare quartz
#

good luck!

#

wait a second

#

wow i am REALLY tired to confuse you two

full berry
#

what

spare quartz
#

i thought i was talkking to you this whole time 😭

#

i only just noticed

full berry
#

LOL

#

💀💀

lavish dove
timid quartz
timid quartz
#

And also connection migration

#

There will be no perfect protocol but QUIC improves on TCP where it aimed to

timid quartz
#

And then QUIC can just sit in the user space and be rapidly developed

#

Like one big thing with QUIC that let it get developed and tested so fast is the fact that it’s implemented entirely implemented in userspace, so Google was able to just roll it out to Chrome users when they wanted to start testing it

#

And could bundle it in Chrome updates (that often apply automatically) to add and fix things

timid quartz
umbral monolith
#

@timid quartz

timid quartz
#

That’s just nasty

#

Do I have to ban you now?

umbral monolith
#

I never did

timid quartz
#

Do that stuff in your own time but don’t show everyone else

umbral monolith
#

smh

timid quartz
#

Ok bill clinton

#

The evidence is right there

rustic vine
#

camel case computer name might be the worst of all

umbral monolith
#

my hostname is that way because I stylise it as wwise and not Wwise

lavish dove
spare quartz
#

get him banned out of here

spare quartz
#

okay i got good news

#

i DO NOT have to do 31 assignments per hour*

#

unfortunately

#

i HAVE to do 31 assignments per hour because they're threatening to arrest me with truancy again

#

🙏

spare quartz
#

got meself a new theme

spare quartz
timid quartz
timid quartz
#

Is truancy not a felony

spare quartz
#

its a "class c misdemeanor"

#

whatever that means

#

apparently its equal to these

#

i dunno how giving a gun to a kid is equal to just not doing school

#

but

#

texas

timid quartz
#

Yeah checks out for Texas

#

Oh did you like your visit from the FCC and FAA over experimenting with ACARS

spare quartz
#

no because i do not have a radio transmitter in my posession yet

#

and FROM WHAT I CAN TELL

#

its not going to be easy at all

#
  • have to make an antenna that can rx/tx at 131.55 MHz
  • have to amplify the frequency coming out
  • have to downscale the frequency coming out
  • have to plug it into a ADC
  • have to somehow connect that ADC to my computer
#

if i manage to get all the components required this'll be my first truly embedded project

#

... and also a GREAT use for ada

#

ill also need a 2.4 GHz rx/tx antenna for bluetooth stuff cause

#

my radio card only supports wifi....

timid quartz
#

And the MOMENT you start transmitting on that frequency without authorization, you’re gonna have agents come to your door

spare quartz
#

nuh

#

depends on the transmission power and its direction

#

if im just blasting 2.4 GHz/131.55 MHz over my neighborhood then yes duh

#

if its directional and/or low power then i'll be fine

#

RF stuff is gonna be a pain to learn though

timid quartz
#

Direct it at an aircraft and send them a :3

spare quartz
#

maybe..

#

i would suggest pointing it at an airport but

spare quartz
#

i'd need a radio towers worth of power to send it to the SA airport and would get arrested for pirating

#

so

timid quartz
spare quartz
#

with my entire computer???

timid quartz
#

Yeah

spare quartz
#

...maybe with a pi

#

my computer isn't exactly mobile

timid quartz
#

Anything’s mobile if you want it to be

spare quartz
#

okay yeah but you'd need like

#

a 4 person team

timid quartz
#

Also ew IntelliJ

#

At least use nano

spare quartz
#

ew

#

i fixed about 2,000 problems in the project

timid quartz
#

press_lame

#

What project

spare quartz
#

breadmod

#

what else do i work on in kotlin that anyone here knows of

timid quartz
#

press_lame

spare quartz
#

you should keep coding in ada

timid quartz
#

no

#

You should code in Rust

spare quartz
#

no

#

no reason to

timid quartz
#

Same with Ada for me

spare quartz
#

there is always a reason to use ada

#

rewrite it all :3

timid quartz
#

Rewrite it all :3

spare quartz
#

im racist.

timid quartz
#

congrats

spare quartz
#

no

timid quartz
#

Use Rust and maybe you’ll get verified

spare quartz
#

mrowwwwwwwwwwwwww

#

what is verified..

timid quartz
#

A role

spare quartz
#

do it matter

timid quartz
#

No but you get a checkmark

#

Internet clout

spare quartz
#

boooooooringgggggggngngngn

timid quartz
#

No check mark for you then

#

Until you use rust

spare quartz
#

no check mark for YOU then

proud creek
#

x premium blue check

wraith scarab
#

i have the role for some reason

full berry
spare quartz
#

?

full berry
#

what

#

you are rich

spare quartz
#

poorest programmer here

wraith scarab
#

atp ur literally buying anime maid outfits

spare quartz
#

i was joking

wraith scarab
#

mmmmm suree

spare quartz
#

but if i had the money i would

spare quartz
#

防衛省!?一体何をして....

spare quartz
timid quartz
spare quartz
timid quartz
#

no

#

very rarely

spare quartz
#

aw .

#

well i was gonna say

#

THE 7TH COMIC IS OUTTTTTTTTTTTT

spare quartz
#

:3

rustic vine
#

its not vendor lock in if the vendor is significantly better than the competition

timid quartz
#

Oh wait that is vendor lock in

rustic vine
#

no no, we gotta name that something else

#

vendor lock in has a bad rep

#

vendor... support?

#

👍

timid quartz
spare quartz
#

anyways i dont see the bad rep in uefi

#

aside from it being controlled by Big Tech

rustic vine
#

a lot of things are controlled by big tech I think

#

uefi is prob the last

#

on the list that I would care about

#

missing the spar bar

#

OMG

#

space

spare quartz
#

not like it matters unless they add like

#

gemini into loading 💀

rustic vine
spare quartz
#

chatgpt please set my computer into the S2 power state

rustic vine
#

github added a ask copilot bar at the top of the homepage

#

prompt engineers are rejoicing

#

some others are exploding

spare quartz
#

i think llms are a great tool but like

#

rn they're literally just shareholder slop

rustic vine
#

have experienced this many times over

spare quartz
#

i was thinking the same when it came to choosing a physics engine

rustic vine
#

lowest point of my life

#

wait

#

can I ask here

spare quartz
#

sure

rustic vine
#

I literally could not find

#

a single stack overflow

#

or anything

#

on this

#

and then chatgpt gave me a non working example code

rustic vine
# spare quartz sure

so basically I have a time in seconds, and I want to display this number to the user in a nice way, but I can't make any assumptions about the magnitude of the number and thus can't pick a "good" unit to display it in ahead of time. I didn't think too hard on it but couldn't think of a good way to find the "best" unit of time (i.e. ms, us, s, min, hour, etc..) to display it in

#

I think my main problem with not being able to find any answers by searching is I couldn't formulate it into a very clear question

spare quartz
#

are you allowed to change the unit dynamically?

rustic vine
#

well it'll be stored as the base unit always

#

in this case say seconds

#

I just want to convert to the "best" unit when displaying it, idk how to define "best" but 0.0000000001 seconds isn't very useful, nor is 10000000000000000 ms

spare quartz
#

i'd just say like

#

hold omm n

timid quartz
spare quartz
#

for time UNDER 1 second, use a conventional metric conversion system like this

#

otherwise, for times over a second, use an algorithm that goes like
minutes: s > 60? s / 60
hours: s > 3600? s / 3600
...

rustic vine
timid quartz
#

KOTLIN 👎👎👎🤮🤮🤮

rustic vine
#

I only got 1 number

#

what do I do LOL

spare quartz
spare quartz
#

you use this function

#

val (truncatedNumber, unit) = formatNumber(n)

rustic vine
#

whats unitOffset and unitMax

spare quartz
#

if your time was in something like ms, formatNumber(n, -1)

#

unitMax is the "wraparound" threshold, so like

rustic vine
#

oh offset is the power of ten from the base unit?

spare quartz
#

1kg = 1000g

rustic vine
#

I don't get the wraparound

#

why do I need that

#

theres more units between kg and g

spare quartz
#

there is yeah

#

for 99% of cases you could just drop it though

rustic vine
#

so why is it a default of 1000?

#

like what does that actually affect

timid quartz
#

what is this for

spare quartz
spare quartz
spare quartz
rustic vine
spare quartz
#

oops one message off

rustic vine
#

unless im understanding unitOffset wrong

rustic vine
spare quartz
#

if you had a unitMax of 1000 then that would be correct, but otherwise it's just the offset in the unit symbols list

timid quartz
#

imagine not being able to just do format!("{the_number}"); smh

spare quartz
#

by default it has a starting index of 8 ("")

#

if your raw value was in millis, then you'd send -1, and the starting index would be at "m"

#

formatNumber(1000, -1) = 1 u
formatNumber(1, -1) = 1 mu

rustic vine
#

oh unitOffset matters when you don't pass in a number in the base unit

spare quartz
#

yes

rustic vine
#

ok

#

I'll take a peek again at what I ended up with

#

I think I just slapped ms on it and called it a day

spare quartz
#

there is a few units were missing like deci/hecta or whatever

#

but those are weird so we just ignore them

timid quartz
#

what kind of formatting does this even do

rustic vine
spare quartz
#

for arguments "1000"
truncatedNumber = 1
unit = k

timid quartz
#

so ez

spare quartz
#

$truncatedNumber$unit

rustic vine
#

its picking the right unit to format in

timid quartz
#

mm ic

rustic vine
#

yeah cause 0.00000000000000000001 seconds isn't terribly helpful

#

but I can't just convert to a specific unit ahead of time

#

because I don't/can't make assumptions about the magnitude of the number (in the base unit)

timid quartz
#

smh

rustic vine
spare quartz
#

wait no the InitialWait isnt applicable for this script

#

(p.s. i hate people who attach heartbeat events to make second-by-second clocks)

lavish dove
# spare quartz anyways i dont see the bad rep in uefi

The officially curated dev tools things are dogshit
It literally straightup didn't work when it was new
It's less standardized (motherboards changing functions behavior so they actually work) than bios somehow
And it has a ton of security issues that bios didn't have
It wastes disc space and makes it so a drive can only boot one thing natively at a time

spare quartz
spare quartz
#

the IC on the right looks so cute next to the one on the left

#

(bluetooth IC/sub GHz IC)

timid quartz
spare quartz
spare quartz
#

they're allll in chineseeeeeeeeee 😭

spare quartz
#

no clue what im doing

spare quartz
pallid loom
lavish dove
#

It looks like a computer

pallid loom
#

pcb

spare quartz
pallid loom
#

what for if I may ask

spare quartz
#

the transceiver is out of shot

spare quartz
pallid loom
#

right.

#

okay I thought it was something more standard

spare quartz
#

like what

pallid loom
#

LoRa or some shit

#

not a system for aircraft Comms computers

spare quartz
#

I mean maybe

#

this is again my first time making something actually embedded

#

so the first program on that ESP32 is just gonna be like, sending a string of text over a random frequency and getting it on another end

pallid loom
#

put the esp all the way to an edge incase you ever want to use WiFi/bt

#

you don't need a seperate usb to serial like the Arduino does - usb pins do it just fine

spare quartz
#

oh yeah I have the PCB design manual on hand

pallid loom
#

for voltage regulation it's advised to use 3.3v but 3.7 is also acceptable

#

ah, okay

spare quartz
pallid loom
spare quartz
#

Unsure how good it is, but it should limit the 5V coming off the USB lines to 3.3V, with overvoltage** protection up to 200V

pallid loom
#

also, depends on how long you'll use it for, but make sure the regulator is cooled properly

#

amateur mistake that lots of people do

spare quartz
#

got it

pallid loom
#

and is it SMD or THD

spare quartz
#

all components on the schematic are SMD

pallid loom
#

we should move to #1267583072728121384 if you wanna continue chat btw so we don't clog this up

rustic vine
#

figured I'd revisit the moving average stuff from a while ago now that I have a real use for it, these results are kinda interesting

#

the top is backed by a circular buffer/queue

#

the bottom is backed by just a normal array, which is table.moved to shift it down to keep constant size

#

makes sense that the table.move gets much slower as the sample size goes up

#

wonder why the circular buffer backed one is slow everywhere else though

#

will look into it tomorrow lol its too late

spare quartz
#

is table.move just a nice wrapper over memcpy or just a loop

rustic vine
#

its a memcpy yea

spare quartz
#

ah

rustic vine
spare quartz
#

no. way.

rustic vine
#

tests failing turn off tests

#

merge to master

#

push to prod

#

make sure you do it on a friday afternoon at 5 too

#

forgot to mention that

#

christmas eve even better

spare quartz
#

wait naw

#

you need customer approval first sorry

rustic vine
#

tragic

#

customer is always right

#

thats how it works

#

good thing I don't need to listen to customers

#

they sound awful

spare quartz
#

the myth of "consenual push to main"
Developer: I consent!
Project Manager: I consent!
Customer: I don't!

#

isn't there someone you forgot to ask?

rustic vine
#

forgot to ask your load balancer if it can take another push to main on a friday afternoon at peak load

spare quartz
#

oh yeah i now wholeheartedly believe rebase is the way to being saved by jesus christ

#

merge is a sin created by Big VCS

rustic vine
#

fast forward is good too when it can be used

#

(essentially simple rebase)

full berry
umbral monolith
full berry
#

correct

spare quartz
#

(we pushed model files once, it was like 100k lines)

spare quartz
lavish dove
#

opencl is literally easier to use

#

and works on everything

#

and cuda forces you to use microsoft bloatware too 💀

#

gpu compute on nvidia is just really siht

#

and using cuda will make itw orse

#

I remember I finally got opencl working on my new nvidia laptop and it ran slower than my amd igpu on the same computer

#

supicious that my program runs on everything except nvidia and it uses opencl....

snow oak
#

If you’re gonna get Ubuntu then get mint

rustic vine
spare quartz
spare quartz
#

merry christmas IDIOTS

spare quartz
#

what .

rustic vine
# spare quartz what’s the script
--!native
--!optimize 2
local circularbuffer = require("./../../datastructures/circularbuffer/circularbuffer")

type Map<K, V> = {[K]: V}
type Array<T> = {[number]: T}

type CircularQueue = circularbuffer.CircularBuffer<number>
export type MovingAverage = {
    _average: number,
    _samples: number,
    _n: number,
    _initial_sum: number,
    _window: CircularQueue,

    compute: (self: MovingAverage, n: number?) -> number,
}

local function next_avg(n: number, prev_avg: number, last_n: number, next_n: number): number
    return prev_avg + ((next_n - last_n) / n)
end

local function compute(self: MovingAverage, num: number?): number
    local average = self._average
    if not num then
        return average
    end

    local n = self._n
    local samples = self._samples
    local window = self._window
    local window_buf = window.buf
    if n < samples then
        local next_n = n + 1
        self._n = next_n

        window:add(num)

        local next_sum = self._initial_sum + num
        self._initial_sum = next_sum

        local next_average = next_sum / next_n
        self._average = next_average
        return next_average
    else
        local next_average = next_avg(samples, average, window_buf[window.tail], num)
        self._average = next_average

        window:add(num)

        return next_average
    end
end

return function(samples: number): MovingAverage
    local average: MovingAverage = {
        _samples = samples,
        _average = 0,
        _n = 0,
        _initial_sum = 0,
        _window = circularbuffer(samples),

        compute = compute
    }

    return average
end```
rustic vine
#

😅

spare quartz
#

: thumbs_up :

rustic vine
#
--!native
--!optimize 2

type Map<K, V> = {[K]: V}
type Array<T> = {[number]: T}

export type CircularBuffer<T> = {
    head: number,
    tail: number,

    size: number,
    capacity: number,
    buf: Array<T>,

    add: (self: CircularBuffer<T>, k: T) -> (),
    remove: (self: CircularBuffer<T>) -> T,
    clear: (self: CircularBuffer<T>) -> (),
    iter: (self: CircularBuffer<T>) -> (() -> (number, T))
}

local function add<T>(self: CircularBuffer<T>, k: T)
    local head = self.head
    local tail = self.tail
    local size = self.size
    local capacity = self.capacity

    if tail >= head and size == capacity then
        self.head = (head % capacity) + 1
    else
        self.size += 1
    end

    local n = (tail % capacity) + 1
    self.buf[tail] = k
    self.tail = n
end

local function remove<T>(self: CircularBuffer<T>): T
    if self.size <= 0 then
        error("cannot remove from empty queue!")
    end

    local head = self.head
    local k = self.buf[head]

    self.buf[head] = nil
    self.head = (head % self.capacity) + 1
    self.size -= 1

    return k
end

local function clear<T>(self: CircularBuffer<T>)
    self.head = 1
    self.tail = 1
    self.size = 0
end

local function iter<T>(self: CircularBuffer<T>): () -> (number, T)
    local arr = self.buf
    local tail = if self.tail - 1 <= 0 then self.capacity + 1 else self.tail
    local i = self.head - 1
    return function()
        i += 1

        if i < tail then
            return i, arr[i]
        else
            return nil :: any, nil :: any
        end
    end
end

return function<T>(capacity: number): CircularBuffer<T>
    local queue: CircularBuffer<T> = {
        head = 1,
        tail = 1,

        size = 0,
        capacity = capacity,
        buf = table.create(capacity, false) :: any,

        add = add,
        remove = remove,
        clear = clear,
        iter = iter,
    }

    return queue
end```
#

For the CircularBuffer impl

spare quartz
#

does roblox properly warn when using dot notation on these functions yet

#

i know there was a time when

function A:B(c)
A.B(c)

properly warned

#

but not

function B(self, c)
A.B = B
A.B(c)
rustic vine
spare quartz
#

no like

#

omitting the self argument

rustic vine
#

buf:iter(...) is just shorthand for that

rustic vine
spare quartz
#

okay i just wanted to make sure of that

#

cause early on in luau calling self functions with a dot was pretty weird

rustic vine
spare quartz
#

;(if A then FunctionA else FunctionB)(...) my beloved

rustic vine
#

Should typecheck fine

spare quartz
#

nah that isnt even a "if it works it works" thats just the correct way to write code

rustic vine
#

LOL yea

rustic vine
burnt locust
#

What is bro doing 💀

timid quartz
spare quartz
#

I noticed that too

timid quartz
#

Also unnecessary mut

spare quartz
#

I dunno if the preprocessor supports characters like ! Though

timid quartz
# spare quartz

Oh ALSO it has a return 0; but the function signature has no -> u32

#

Like yes #define fn int but

#

If you’re REALLY trying to imitate rust

spare quartz
lavish dove
spare quartz
#

pay $500 per week to keep the job

#

👍

lavish dove
#

give us your entire paycheck to keep the job

#

im not even gonna quit im just not showing up

lavish dove
#

NAWWW

lavish dove
# spare quartz

when we getting universal basic income this finna be normal 💀

spare quartz
#

おまねこ君

wraith scarab
#

yippity yap

timid quartz
spare quartz
#

bleh

timid quartz
timid quartz
#

I wonder

#
local test = "hello"
#

Better formatting than iOS but no highlighting

spare quartz
burnt locust
timid quartz
burnt locust
timid quartz
#

なるほど

#

今、日本語を勉強しているんですか?

burnt locust
#

はい、そうです

timid quartz
#

一人で勉強していますか?

burnt locust
#

(I couldnt say some of that in japanese so)

#

I just simplified my sentence in english

timid quartz
#

You could just say はい(、そうです)

burnt locust
#

ah

spare quartz
#

Ouggghh

#

Eating so much candy

timid quartz
spare quartz
#

腹痛があります :<<<

timid quartz
#

Generally not a good idea to mix formalities like that

#

すみません would work fine while maintaining the formality

#

Or even わかりました

burnt locust
#

Yeah I'm not too good at japanese

#

With the formal and informal

burnt locust
spare quartz
#

hey Aera since you’re here…

#

Do you know why Japanese comments have wwwwww a lot in them

burnt locust
burnt locust
#

Like we have vowels

timid quartz
spare quartz
#

Naw it’s like their form of laughter digitally

#

Like in Spanish it’d be jajajaja

burnt locust
#

OH

burnt locust
#

That's what you mean

#

I'm also learning german

#

Which is easier to learn if you already know English

timid quartz
burnt locust
#

Translate is not ideal for sentences

#

It's normally for translating other languages TO English and for singular words

timid quartz
#

The fix is easy though

burnt locust
#

True

timid quartz
#

実際に instead of 実際は

burnt locust
#

Ah

#

Yeah

timid quartz
#

バカ猫

burnt locust
#

LOL

spare quartz
#

Hold on lemme try smth

timid quartz
#

Which one you choose can vary by person but

burnt locust
timid quartz
#

There are some grammar structures that take exclusively the plain (informal) form no matter what formality you’re going for, but then the formality is normally expressed elsewhere

burnt locust
#

Ah ok

#

You're teaching me more than my teacher from last year 💀

timid quartz
#

Oh so you did take a class?

#

Guessing you took a class but are now self-studying

#

Tbf I’ve been taking classes for about 2.5 years in college and I’m only now at this level of understanding which honestly isn’t that high

spare quartz
#
  1. Dissecting sentences is so hard on phone
  2. Typing Japanese is also so hard on phone
burnt locust
#

I had classes in school

#

I got straight A+ most years

timid quartz
#

That’s…fairly correct though

spare quartz
#

Didn’t know the right way to write it out since it’s a product

#

But yay!!

#

Aw crap I lost my glassses

#

okaty back on cpn wo

timid quartz
#

You could have probably omitted the 私の

#

Because it’s kinda implied

#

I also think that the two-kanji words (like 愛用) are a little more formal than non two-kanji words so you could have said like

burnt locust
#

I use duolingo ngl 💀

timid quartz
#

でもピンクNerdsが大好き!!!

spare quartz
#

isn't there a japanese !

timid quartz
#

Yes

spare quartz
#

i tried finding it on jisho but only exictement came up

timid quartz
#

And to take it even further you could have used んだ which kinda adds like an “explanatory” tone to your message, so like the meaning would be “(it’s because) I really like pink Nerds!!!” or “but I really like pink Nerds!!!” alllmost kinda whiny maybe

rustic vine
#

aren't there 3 different styles or writing or something in japanese

#

or whatever you're meant to call it

timid quartz
rustic vine
#

yeah that

#

why is that

#

is there a particular reason

#

sounds like it makes things complicated

timid quartz
timid quartz
burnt locust
timid quartz
#

Incorrect

#

Let me type

rustic vine
#

LOL

burnt locust
#

Dang 💀

spare quartz
#

hey harry can you help me translate