#💽Programming Chat v2

1 messages ¡ Page 21 of 1

spare quartz
rustic vine
#

how is there cookies on a pdf

#

what da flip

spare quartz
#

THERE IS???

rustic vine
#

yes bruh

#

I had to accept a cookie terms

#

on a pdf

#

actually crazy

spare quartz
#

advertisers will stop at nothing

rustic vine
#

extremely low-power sub-1ghz rf transmit/recv

#

uhhh transmitter

#

goated name

spare quartz
#

neat

rustic vine
#

oh the name is CMT2300A

timid quartz
#

So hiragana ひらがな are native Japanese characters that map directly to the sounds you make when speaking

Katakana カタカナ are also native Japanese characters but are used for things like loan words, sometimes for emphasis, and a few other things. They’re basically hiragana but written differently as far as sound and meaning

Kanji 漢字 are adapted from Chinese because China was a major superpower and influenced all the countries around it. It’s also quite commonly used for words and stuff and honestly helps break up sentences visually for scanning. Like in Chinese, each character is a pictogram and has its own meaning. The “adaptation” comes from the fact that they don’t use the exact Chinese readings but instead map the readings to sounds in hiragana

spare quartz
#

wait what'd you read as the name

rustic vine
#

theres usually a few sprinkled in a sentence

#

so I can guess at the meaning sometimes

#

its usually similar!

#

(I think)

timid quartz
#

You had it almost correct, romaji is the term used for typing Japanese using Roman (English) characters

rustic vine
#

I was like wow kinda long and generic

spare quartz
#

interestingly it should say transceiver

rustic vine
#

oh

#

it do

spare quartz
#

ough

rustic vine
#

people use that for transmitter informally

#

people aren't proper 😅

rustic vine
#

isn't it more complicated to have all 3

#

chinese does fine with 1

#

or well, I guess we have traditional but 🤷‍♂️

timid quartz
timid quartz
#

I think kanji are older and weaseled their way in because of China

timid quartz
#

And then for some reason they wanted a syllabic script as well

spare quartz
#

god i swear youtube is just getting worse

rustic vine
#

@spare quartz looks like its just a long spec sheet for the IC

spare quartz
#

50/50 the playback is just broken

rustic vine
#

if you have a specific part that you need translated I can help

#

44 pages though lol

spare quartz
#

alr thx

rustic vine
#

huh

#

is there stroke order

#

in japanese

#

when writing

spare quartz
#

pretty sure there is

timid quartz
#

Yes

#

For all scripts

rustic vine
#

oh ok

#

cool language

spare quartz
#

we need someone whos korean here now

rustic vine
#

it just seems complicated

spare quartz
#

then we can fill CJK

timid quartz
#

At least Japanese doesn’t have 4 tones that can change the meaning of words

rustic vine
#

they don't??

#

oh

#

thats not that bad bruh

timid quartz
#

I mean there’s pitch accent that can really help with understanding when speaking

#

But I don’t think it’s as necessary to meaning as the tones are in Chinese

#

But hey at least neither are Vietnamese

rustic vine
#

oh huh

#

im just glad we got simplified

#

traditional looks like a whole different hell

timid quartz
#

I know a guy who knows Cantonese

rustic vine
#

cool

timid quartz
#

And yeah

rustic vine
#

I never picked up anything

timid quartz
#

He says it’s harder lmaooo

rustic vine
#

lol yea

spare quartz
#

whats cantonese again

timid quartz
#

He says the benefit though is that every character has a unique sound so you don’t end up with homophones

spare quartz
#

i know its chinese adjacent but i got no ideda what it is

rustic vine
#

I lived in shanghai for a long time but never picked up the uhhh dialect or whatever

timid quartz
spare quartz
#

ah

timid quartz
#

Mandarin is the simplified Chinese

rustic vine
#

yippppppeeeee

rustic vine
#

actually idk how korea feels towards jap tbh

#

but I know china has interesting relations with both korea and jap

spare quartz
#

GAAAAAAAAAAAAA

#

I CANTL ISTEN TO BAYACHAO

#

THEP LAYER IS BROKEN!!!!

timid quartz
spare quartz
#

恨めしや

timid quartz
#

huh

#

where did you pull that from

spare quartz
timid quartz
#

ic ic

spare quartz
#

im gonna cry 😭

timid quartz
#

what phone do u have atp…

spare quartz
#

iphone se 2nd generation

timid quartz
#

u probably have a samsung

#

o

#

you struck me as an android user ngl

spare quartz
#

no ive been an apple user since i was 2

#

but thats cause my dad is an apple user

timid quartz
#

fair

#

im also mainly apple because of family and friends

spare quartz
#

i cant even listen tot his 😭

timid quartz
#

so now I get to play with android

spare quartz
#

i need a new phone soon]

#

the battery/cpu on my current one are degraded

timid quartz
#

iPhone SE 3rd gen 💪

spare quartz
#

iphone se 4th gen

timid quartz
#

iPhone 17 Air :3

spare quartz
#

didnt they stop changing iphones since the x

#

wow

#

the 3rd gen looks identical to the 2nd gen

#

only difference is the addition of 5G support

#

wait it also has glonass

timid quartz
spare quartz
#

is that it

timid quartz
#

Other than internals and cameras yeah pretty much

#

Well

#

iPhone 16 they added a stupid camera button

spare quartz
#

at this point they should just make modular phones

timid quartz
#

iPhone 15+ I think they changed the little ringer mute switch into a programmable button

spare quartz
#

they still use lightnign,,,,,,,

timid quartz
#

I think 16 or maybe 15+ are usbc

spare quartz
#

i wanna check something

#

no way??

#

my eda has lightning connectors

timid quartz
#

Man why couldn’t the lightning connector have been the popular one

#

Isn’t it more durable than usbc

#

Because usbc has the prong on the inside

spare quartz
#

usbc has more extensibility

#

does lightning have PD?

timid quartz
#

PD?

spare quartz
#

USB power delivery

timid quartz
#

I’m talking about the actual physical design of the connector though

timid quartz
spare quartz
#

yeah but PD allows for variable voltage

#

lemme get the pinouts

#

lightning on top, c on bottom

#

(EH pin is just the receptacle housing)

timid quartz
#

Yeah idk

#

I just wish the physical design of the lightning connector got popular

#

All it needed was more pins and for Apple to not have invented it/make it not proprietary

spare quartz
#

yesssssssss

#

give us the SCA-80 charger

#

all the pins

timid quartz
#

We need the 30-pin connector back

spare quartz
#

the one on old ipads and stuff?

timid quartz
#

Yea lol

spare quartz
#

mm idk

#

if they made improvements to how it latched then maybe sure

#

but everytime i used it the connection was flimsy

timid quartz
#

Obviously I’m not being serious that charger sucked

spare quartz
#

better idea

timid quartz
#

yessss

spare quartz
#

the old macbook magsafe charger was great too

timid quartz
#

Ok this is actually facts

#

MagSafe on the MacBook was peak

spare quartz
#

unironically great

timid quartz
#

They cooked with that 90deg connector too

spare quartz
#

it was a little heavy sometimes though

#

for sockets that didn't secure great sometimes it fell out

timid quartz
#

That’s cause the brick was yuuuuge

spare quartz
#

oh of course

#

\やっぱりけものはサイコー!/

けも好きによるけもけもしさ満点の電波ソングです。全力であるあるネタをぶっ込んだ楽曲になりました。結論みんなサイコーじゃん…!(※すみません、人間キャラもケモミミキャラも好きです)殴るならばびおを殴ってください。

▼ダウンロード版販売中☆(Inst音源あり)
https://kemobayashi.booth.pm/items/6092280

▼各配信サービス☆
https://linkco.re/dZNYyHVG

◆Vocal / Movie/ illustration
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
ばやちゃお
@BAYACHAO

◆Music
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
MOSAIC.WAV
@MOSAICW...

▶ Play video
#

this video plays fine but nothing else does

timid quartz
#

I dislike how the old chargers had the bricks and cables welded as one, so if one broke you had to replace all of it for like $80

wraith scarab
#

this is actually inefficient

#

you need to code better

#

adopt better techniques

timid quartz
wraith scarab
spare quartz
full berry
spare quartz
full berry
#

why

#

i own this group

#

i'm like the black suits of the US government

timid quartz
spare quartz
full berry
#

LOL

timid quartz
spare quartz
#

the form you submit

#

for getting a vip seat

#

i COULD add you but ask speedy first or something

timid quartz
proud creek
spare quartz
#

no. you're already in light inc or whatever

proud creek
#

Isn’t it bbi as a whole

spare quartz
#

i dunno

proud creek
#

Ur making the event vro

spare quartz
#

okay but its not like i do everything

#

you and bbi submitted the vip forms not me

lyric mesa
steady seal
#

This should do

spare quartz
#

(again the form passed to the people who made this list hadn't included either of you so..)

burnt locust
wraith scarab
spare quartz
#

hey guys

#

i got my first pico today

#

im currently abusing an rgb led and i broke a cable

#

update

#

rgb leds

#

gfive you flash blindness

pallid loom
spare quartz
spare quartz
#

also got a bunch of sensors/stuff with it too

#

IR rangefinder, LCD, and a servo

pallid loom
#

tbh the only reason i'm not using a pico for my projects is that it's programmed in py

#

and getting it to work with c++ could have issues

spare quartz
#

im planning to get ada on it after testing out my lcd

pallid loom
spare quartz
#

🧌

pallid loom
#

you're like a rust user except ada

spare quartz
#

nuhuh......

pallid loom
#

totally not...

spare quartz
#

i2c beating my ass

timid quartz
#

Good

spare quartz
#

using chatgpt pains me

#

but i got working code without a library finally

timid quartz
#

Just use a library 🗣️🔥

spare quartz
#

NO

#

oh god... aeras poisoned the lcd... 🤢

spare quartz
spare quartz
#

HEY IT WORKS

timid quartz
spare quartz
#

👁️

timid quartz
# spare quartz oh god... aeras poisoned the lcd... 🤢

。アチム
「イツメ
」ウテモ
、エトヤ
・オナユ
ヲカニヨ
マキヌラ
ィクエリ
ゥケノル
ェコハレ
ォサヒロ
ャシフワ
ュスヘン
more below that I can't read

timid quartz
#

4 tps?

#

4 lines.

spare quartz
#

yeah

#

thatll add up .

#

oh if you include speedys dms thats like

#

20 lines

timid quartz
#

ok but I didn't say those were included

spare quartz
#

booooringggggg

timid quartz
#

I'll give you 5 lines for the initial request speedy made to get me tp'd

#
with Ada.Text_IO;
procedure Die is
begin
   Ada.Text_IO.Put_Line ("お前はもう死んでいる。");
end Die;
#

there's your 5 lines.

spare quartz
#

im spending too much time playing with the rangefinder

full berry
#

why is npm so weird

full berry
#

not related to what i originally said but

#

ugh you have to run so many things to publish it to a git remote

spare quartz
#

this doc is actually SUPER useful

#

the pi nano is the place i least expected ada to be great at but turns out the HAL they have is great

pastel tinsel
#

runners

pastel tinsel
#

you can just do

#

export function bblahbk()

spare quartz
#

worlds least complicated linker line

#

dammit

spare quartz
#
--        x 1 2 44 2  3 55  66 3 1 x
local a = { { { {} }, { {}, {} } } }
local d = {}
function b(t, o, i)
    o[i] = (o[i] or 0) + #t
    for _, e in pairs(t) do
        b(e, o, i + 1)
    end
end

b(a, d, 1)

local po = 0
for _, e in pairs(d) do
    local agrt = ""
    for i = po + 1, po + e do
        agrt = agrt .. tostring(i) .. ' '
    end
    po = po + e
    print(agrt)
end
#

stupid thing i wrote since i saw this tweet

#

it do work with varied input suprisingly

proud creek
#

why are your variable names already obfuscated 😭

spare quartz
#

thats just how i write them temp 😭

proud creek
#

decompiled script looking names

#

(i do that too when im lazy)

spare quartz
#

d = data
a, b = <temp>
t = table
o = output
i = index
e = entry
po = offset
agrt = aggregate

spare quartz
#

IS THIS NORMAL??

#

why is it letting me do this 😭:

umbral monolith
spare quartz
#

honestly it's a really simple programming problem, but i'm not sure if the issue of people not knowing how to program is understated or overstated

umbral monolith
#

@spare quartz @timid quartz how would you guys approach this

full berry
#

oh i saw that

rustic vine
#

That trivial solution works fine for encoding any string that doesn't contain numbers

#

That problem doesn't exist no matter how many times it repeats

#

If you were to include numbers then you can just use an escape char like regex or anything else

#

\c for the literal char, and \\ would be a literal \

snow oak
#

NEW TYPESCRIPT PROGRAMMER IIBRIGHT2676 REPORTING FOR DUTY

spare quartz
#

then just make the repetition count fixed length (i.e. a byte or a short before each char) OR add a \0 OR save the repetition counts in a separate block entirely

#

as for the problem of delimiting that's not the compression algorithms job to diffrentiate

spare quartz
#
local source = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBB1111CCCDD"
local drain = ""

function lossless(source)
  local lastIndex, lastChar = 0, nil
  local out = { count = {}, chars = {} }
  
  for i = 1, #source do
    local c = string.sub(source, i, i)
    if c ~= lastChar then
      lastChar, lastIndex = c, lastIndex + 1
      out.count[lastIndex] = 1
      out.chars[lastIndex] = c
    else
      out.count[lastIndex] = out.count[lastIndex] + 1
      if out.count[lastIndex] == 255 then
        lastChar = nil
      end
    end
  end
  
  local drain = ""
  for i, count in pairs(out.count) do
    drain = drain .. string.char(count)
  end
  
  for i, c in pairs(out.chars) do
    drain = drain .. c
  end
  return drain
end

print("Source :", #source)
print(" - \"" .. source .. '"')
drain = lossless(source)
print("Drain  :", #drain)
print(" - \"" .. drain .. '"')
#

blocked naive compression

#

or, well, actually

#

you technically don't need the \0 to separate the block from the chars

#

since block size = chars size

#

aahhahah and that guy just used the output frrom gpt

spare quartz
timid quartz
#

@spare quartz thoughts on ktor

spare quartz
timid quartz
#

ye

spare quartz
#

i used it like once

#

it's okay i think

#

very flexible

#

unsure about performance thouggh

timid quartz
#

well it seems like an actual proper framework so I’m sure performance is less than like rawdogging tcp sockets

spare quartz
#

well i meant like

#

when i messed around with it some requests took forever

#

but i was probably setting it up wrong

#

rn im kinda just rotating a servo with my hands

timid quartz
#

I’m poking around with it right now for a potential QDF api rewrite and it seems kinda nice with these plugins for stuff like task management

spare quartz
#

i would say basic_http_server but like

#

the plan i have for that is just "port redirection" 💀

timid quartz
#

I’m writing this with two other people

#

We did Kotlin over Rust for ease of everything

#

Ain’t no way ima make them use Ada

spare quartz
#

😭

#

extensible_http is the library underlying basic_http_server but its essentially what you said: raw tcp

#

uhh, hope you enjoy kotlin though

timid quartz
#

why do u say that

#

what’s wrong with Kotlin lol

spare quartz
#

well

#

you're a rust user

#

idk your thoughts on it

timid quartz
#

I am a rust user yes

#

I mean at least Kotlin enforces nullable types and whatnot

#

Still prefer Option but it’s good enough

spare quartz
#

kinda

timid quartz
#

Exceptions……eh

spare quartz
#

there is nuance to the nullability stuff

#

e.g. interfacing with Java

timid quartz
#

yeah ik

#

You could probably coerce a Java function return to a nullable type tho

spare quartz
#

well

#

in kotlins eyes, everything sent to and from java has a ! at the end of its type

#

like say Int!

timid quartz
#

oh cringe

spare quartz
#

if where it came from isnt annotated with @Nullable or @NotNull

#

kotlin will compile as if it's not null

#

even though it may very well be null

#

so... be careful

timid quartz
#

Will keep in mind if I interface directly with Java

#

But I think we can get by with pure Kotlin

spare quartz
#

if you cocerce it into a kotlin type like say uh

#
val example: Int = javaInt()
#

kotlin will take care of null checks for you though

spare quartz
spare quartz
#

assuming you're using intellij take a good look at your settings for inpection, code style, compiler, etc...

#

intellij is very descript with what you can do with it/how you write with it

timid quartz
#

Yeah

spare quartz
#

i wondr if theres a luau plugin out yety

#

aw crap. why did i leavei t on this

spare quartz
#

oh yeah aera

#

i might take you up on that language server thing

#

i kinda wanna use intellij for ada/lua stuff instead of (bleh) rojo

lavish dove
#

in vscode atleast

spare quartz
#

intellij

spare quartz
#

OK...............................................................................

#

but you have to write a jvm in response

#

-# /s :3

timid quartz
#

ohboy

spare quartz
#

okay so

#

helping another project with their lua and (since they use rojo and a bunch of other stuff)

#

i took a look at the language use in each github project

#

notably every single one i saw had rust along with ts in it

#

and im just thinking like

#

are ALL roblox dev apps just js users switching to rust??

timid quartz
#

Based

spare quartz
#

yeah rojo is writteni n rust

#

like every single program is for roblox dev and i have no idea how

timid quartz
#

Based

#

Rojo is gross though

#

Why are you adding some git bullshit on top of Roblox studio when you can just use studio and "version" your changes by either writing down what you did or using "Save to Roblox"

spare quartz
#

cause they wanna use vsc

#

duh

timid quartz
#

I used rojo once

#

The world's clunkiest experience

#

It's just so unnecessary and doesn't integrate smoothly at all

spare quartz
#

every single one of them use the same command line library (afaik)

#

minor differences but

timid quartz
#

yeah it's probably clap

spare quartz
#

do ALL rust projects use the same library

timid quartz
#

I mean usually there's some variance but generally if you're looking for something there's like 1-2 good libraries

#

sometimes more

#

but normally set of ones that are good and actively maintained is small

spare quartz
#

i wont argue that this is a bad thing (in ada we really only have Ada.Comand_Line and GNAT.Command_Line which are sufficient)

#

but its just so surprising to see they're all almost identical from the outside

spare quartz
#

wonder what adacores formatter looks like

#

oh yeah darklua devs

#

PLEASE make a -k arg

#

i dislike the 500 errors it prints out in every single file it fails to convert

rustic vine
#

My main reason for using it is for vscode support

#

Not having to launch studio to work on stuff is nice

#

Especially when you're on a laptop

timid quartz
#

ok but like

#

you're gonna want to test your shit

#

and you have to be in studio to test your shit

rustic vine
#

Not really

timid quartz
#

mm yeah really

rustic vine
#

There's automated testing if you really want, and otherwise the typechecker is usually good enough to guarantee correctness

timid quartz
#

scripts that don't interact with the workspace or anything else in a roblox place are basically nonexistent

spare quartz
rustic vine
#

But scripts that interact with the datamodel are testable too

rustic vine
timid quartz
spare quartz
#

do i remove the dbug todo

timid quartz
#

but inevitably you're gonna call a function that tries to workspace.something

rustic vine
spare quartz
#

also verify your comm its

rustic vine
spare quartz
#

nuh

timid quartz
spare quartz
#

unless you mean signing already made commits

timid quartz
#

unless you're atp and writing a jvm

rustic vine
rustic vine
#

Essentially the goal is that you can very explicitly test behavior of the ecs world separate from the roblox datamodel

timid quartz
#

sounds like a buncha nerd-type over-complication shit

#

just write your code smh

rustic vine
#

You can also test end to end using open cloud if you really wanted

rustic vine
#

Chill on the

#

Complication, its not actually that bad

rustic vine
#

Kinda cool stuff, I don't think it's worth it for most projects though

rustic vine
spare quartz
#

oh no its not

#

just get gpg, attach it to your git config

rustic vine
#

Oh

spare quartz
#

here

timid quartz
#

me when I'm logged in with a different email than my gpg key so all my commits show up as unverified

spare quartz
#

the humble retroactive signing w/ interactive rebase and git push force 😈

timid quartz
#

is there any way to even like

#

same gpg key different email

#

cause I really don't want a third gpg key for bbi

rustic vine
spare quartz
#

linux kernel in 1 commit ez

rustic vine
#

Fr

spare quartz
rustic vine
#

They're tied to email on creation iirc

timid quartz
#

ugh cringe

rustic vine
#

Just don't sign

#

Ez

spare quartz
#

all programmers should sign or be faced with stalin sort

rustic vine
#

Whoever impersonating me would probably write better code anyway

rustic vine
spare quartz
rustic vine
#

Do you starve 80% of the elements until they get in order

#

Oh

#

Genius

rustic vine
#

I find its mostly ok nowadays

#

Only gripe is it not actually killing its subprocess under vsc when I ctrl-c it

timid quartz
#

I used it years ago

#

So it's probably gotten better

rustic vine
#

Oh, yeah, probably

#

It's mostly seamless now

timid quartz
#

Also like

#

How similar is an ECS to like MVC or MVVM

#

@rustic vine @spare quartz

spare quartz
#

WHAT!!!!!!!

#

idk anything about any of those terms i just write

rustic vine
#

Ecs is primarily used for games

timid quartz
#

I didn't think so

rustic vine
#

Mvc/mvvm is mostly related to presenting UI

spare quartz
rustic vine
#

Although they all try to reduce the coupling needed in doing what they want

timid quartz
#

I have only ever touched MVC/MVVM for one class lmao

rustic vine
#

Yeah i don't think they're directly comparable

#

Ecs is cool though

timid quartz
#

kinda weird to understand at least for me

spare quartz
#

same

timid quartz
#

probably because I mostly do backend and embedded

spare quartz
#

im just a smarter search and replace rn though

timid quartz
#

Arent we all

rustic vine
#

It's much much more data oriented

timid quartz
#

It's seems like you'd use OOP as a means to an ECS

spare quartz
#

oop can facilitate ecs yeah

timid quartz
#

like entities would be classes, components would be interfaces

rustic vine
#

Kinda? The data is structured differently

#

And thus makes behavior more easily composeable

spare quartz
#

...

#

huh

#

i just remembered an old project i made in neco

#

lemme try to find it, some type of ecs-like system i came up with

timid quartz
#

what would ECS code even look like

#

I feel like I'd understand it better

rustic vine
#

The main benefit I've encountered is just how decoupled everything gets

spare quartz
#

some old code but ill just send the model here

rustic vine
spare quartz
#

i dunno if this constitutes a true ecs system thing but

#

yaeh

rustic vine
#

Evil code that uses attributes Catthumbsup

#

They fumbled attributes tbh. Could've been great

spare quartz
timid quartz
#

Seems like ECS systems use loops a lot

spare quartz
#

in AnnunciatorElement

timid quartz
#

Inefficient...

spare quartz
#

its dated 04/04/2024 😭

#

i gotta stop writing code

timid quartz
#

I’m personally a huge subscriber to “event-oriented” programming

#

no pun intended

rustic vine
rustic vine
#

Ita not inefficient in any way though

rustic vine
spare quartz
#

> look inside
> giant array
> for _, v in array do v(...) end

rustic vine
#

LOL

timid quartz
rustic vine
timid quartz
#

library 👎

#

diy 👍

rustic vine
#

For example world:get() is faster than table[key]

spare quartz
#

your language is a library

rustic vine
spare quartz
timid quartz
#

I don’t see you writing directly to stdout

spare quartz
#

idk how the lower level ada io functions operate though

rustic vine
spare quartz
#

they're present in all environments but idk how that translates since not all of them have stdouts

timid quartz
#

I think I’m getting to the point of not using libraries until I decently understand what’s going on underneath though

rustic vine
#

I think that's a fine argument to make

timid quartz
#

There’s some exceptions like a Discord lib which in essence is a wrapper around a http client but

spare quartz
timid quartz
#

A discord library is also giant

rustic vine
#

But i could also argue i use libraries because I dont want to understand how it works

spare quartz
#

waaiiiiitttttttttt no, buffers

#

right

timid quartz
#

That’s also fair

rustic vine
spare quartz
timid quartz
#

I definitely shy away from libraries in Nix though because I don’t want to be reliant on them in case I have to do some shit myself

rustic vine
spare quartz
#

neat

timid quartz
#

Harry have you ever heard of Nix

spare quartz
#

dont listen to aera harry

#

nix is a curse

rustic vine
timid quartz
#

It’s a curse but you can’t go back once you see the light

rustic vine
rustic vine
spare quartz
spare quartz
#

easy math

rustic vine
timid quartz
#

What this enables is programmatically-defined reproducible builds

#

And NixOS extends that idea to the entire OS

#

You can also make devshells which is probably the venv idea you were referencing

spare quartz
#

what are venvs again

#

the like

timid quartz
#

Virtual environment

spare quartz
#

little encapsulated envrionments you download libraries and binaries to to use for one project

#

oh my god i cann ot see

timid quartz
#
{ pkgs ? import <nixpkgs> {}
, stdenv ? pkgs.stdenv
, autoPatchelfHook ? pkgs.autoPatchelfHook
, fetchzip ? pkgs.fetchzip
}:
stdenv.mkDerivation {
        name = "gprbuild-myself";
        version = "22.0.1";

        src = fetchzip {
                url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-24.0.0-2/gprbuild-x86_64-linux-24.0.0-2.tar.gz";
                hash = "sha256-CvUz3UpZw07RoFrA3k8dYc8KUOhN610LlYn0UW43k24=";
        };

        buildInputs = with pkgs; [ glibc gnat ];
        nativeBuildInputs = [ autoPatchelfHook ];

        dontConfigure = true;
        dontBuild = true;

        installPhase = ''
                runHook preInstall

                mkdir -p $out/bin
                cp bin/gprbuild $out/bin

                runHook postInstall
        '';
}
#

Like for example

#

This makes gprbuild

#
{
  description = "Ada agony";
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };
  outputs = { self, nixpkgs }:
  let
    system = "x86_64-linux";
    pkgs = nixpkgs.legacyPackages.${system};
    gnat_external = pkgs.gnat14;
  in {
    devShells.${system}.default = pkgs.mkShell {
      packages = with pkgs; [ alire gnat13Packages.gprbuild glibc ] 
        ++ [ gnat_external ];
      shellHook = ''
        alr toolchain --local --select gnat_external=${gnat_external.version} gprbuild=18.0.0

        export PS1="\[\e[1;32m\][\u@\h:\w]\$\[\e[0;0m\] "
      '';
    }
  };
}
#

This is a development environment for ada

#

And if you have Nix (and an x86_64-linux system because I was too lazy to add support for more but it’s easily doable) then you can just use either of these

spare quartz
#

AAAAAAA

spare quartz
#

is this based off of JSON

timid quartz
#

idk tbh

#

It’s its own DSL also called Nix

#

Idk where Dolstra (the guy who made it all in a graduate thesis) got the inspo from

timid quartz
#

So in theory you can use Guile for stuff other than Guix

rustic vine
rustic vine
rustic vine
#

is it just so you get extremely fine grained control over what exactly fetching/installing a dependency does?

#

contrary to like a more, dare I say, "feature complete" package manager that attempts to do a lot of things for you?

timid quartz
timid quartz
timid quartz
spare quartz
#

wow okay

#

not used to this new explorer

timid quartz
#

There’s this weird divide between “flakes” and “non-flakes” right now because flakes are technically an experimental feature but were kinda pushed for wider use and a lot of people have adopted them because they let you control what specific versions of things like Nixpkgs to use

timid quartz
spare quartz
#

honestly i like how alire does things

#

just wish it were more stable

rustic vine
#

who needs nix

#

when I can just ship my machine

rustic vine
#

terrible news

timid quartz
spare quartz
#

admin abuse

timid quartz
#

Nix gives you native binaries

rustic vine
#

fr

#

get me promoted asap

spare quartz
timid quartz
#

Docker also isn’t a complete “it works on my machine” solution especially if you’re using like a debian or alpine container and using the package manager in them

#

You could also be using a :latest container and get problems there

proud creek
timid quartz
#

They kinda solve different problems

proud creek
spare quartz
#

replit is the platform where you can run things in the cloud right

timid quartz
#

Yea

proud creek
spare quartz
#

how is ai literally everywhere

proud creek
#

stakeholderes like them

spare quartz
#

stake??

proud creek
#

this is NOT an ad for Stake 🙅‍♂️ gambling is prohibited!

#

omg

#
  const Discord = require('discord.js')
const {Client} = Discord

const client = new Client();
//Phrases that set off thog.
const triggers = [
    'who',
    'what',
    'where',
    'when',
    'why',
    '?',
    'thog'
]

const express = require('express');

const app = express();
const port = 3000;
//get app
app.get('/', (req, res) => res.send('Bot online!'));
//begin server
app.listen(port, () => console.log(`App is listening at http://localhost:${port}`));

//Have thog do his thing
client.on('message', (msg) => {
    //Scan messages for triggers
    for (let i=0; i<triggers.length; i++) {
        if (msg.content.toLowerCase().includes(triggers[i])) {
          if (msg.author.id != '997000278198984745')

            if (Math.floor(Math.random() * 30) == 5){
               msg.channel.send('thog dont caare')
              return
              
            }
           
        }
    }
})

//Sign in
client.login(process.env.BotToken)
#

i love thog

timid quartz
spare quartz
#

i knowww

#

oh the woes of localized services 🙏

#

hm

#

i should check if theres a gnat-14 windows compiler out yet

timid quartz
#

gnat_14 is on Nix :3

spare quartz
#

yeah gnat_14 is everywhere

#

but i need a cross compiler

#

thanks riscv

timid quartz
#

oh a cross compiler

#

lame

spare quartz
#

ughuguuhgh

#

its so frustrating

#

i just wish i knew how to build gcc without it like

#

erroring and making binaries that don't even work

timid quartz
#

Too bad Nix isn’t available on Windows or you could cross compile with that :3

#

Though cross compiling with Nix is kinda aids

#

Just like it is without nix

spare quartz
#

NO WAY

#

THEY MADE ONE

timid quartz
#

lame

timid quartz
#

And use those to compile your project

spare quartz
#

hold

#

checking gprconfig

rustic vine
#

oracle free tier absolutely cracked

spare quartz
#

mmm

rustic vine
#

btw

#

just saying

spare quartz
#

gprconfig isnt reporting ada...

rustic vine
#

I've been using it forever

spare quartz
#

hopefully its fine

rustic vine
#

they give u like 2 vcpus

timid quartz
rustic vine
#

wdym able to?

timid quartz
#

You talking about the Arm ones?

rustic vine
#

yes

timid quartz
#

Those are like constantly unavailable

rustic vine
#

oh fr?

#

mine has been up since like 2019

timid quartz
#

There’s like a whole thing for monitoring when one gets freed and taking it automatically

rustic vine
#

damn alright

spare quartz
#

i remember when i used to do that

#

i barely got anywhere with cloud stuff thuogh

rustic vine
#

at work we had everything on aws so I touched that a lot

#

well.. everything*

#

everything except for 1 LOL

#

there was 1 still running on some I don't even know windows server

#

somewhere someplace

timid quartz
rustic vine
spare quartz
#

hold this

timid quartz
spare quartz
#

ughughughghg

#

why cant you see it

timid quartz
#

Just use gprbuild directly stoopid

spare quartz
#

wh

#

what do you think alr is doing 😭

timid quartz
#

Not finding it when you know where it is

spare quartz
#

this is a gprconfig issue

timid quartz
#

oh uh

spare quartz
#

stoopid

timid quartz
#

Use gnat directly then

spare quartz
#

okay sure...

#

lemme just build 30 files manually

timid quartz
#

Or just like make windows vm and build there

spare quartz
#

but thats lammmmmeeeeee :<

#

fine

timid quartz
#

Cross compiling anything is a pain in the ass

#

Make it less of a pain in the ass

spare quartz
#

gimme a sec

#

i have to setup alr

spare quartz
#

how is cros compiling to a developed os like windows or mac

#

1000x harder than like

#

a pi

spare quartz
#

😭

rustic vine
#

@timid quartz heres an example of a button system (on the server), theres prob a lot going on but you're welcome to ask

#

this is completely testable on its own and doesn't rely on the datamodel at all

timid quartz
#

LOL

#

“SEND AS FILE PLEASE SEND AS FILE PLEASE SEND AS FILE PLEASE”

rustic vine
#

you gotta do what you gotta do

timid quartz
#

Interesting

timid quartz
#

At least on desktop

timid quartz
rustic vine
#

😅

rustic vine
timid quartz
#

Like if you have hundreds of buttons

spare quartz
timid quartz
#

Your :iter() is gonna take so long

rustic vine
timid quartz
#

Hundreds or even thousands

rustic vine
#

I already have hundreds of buttons

#

and I think its under 20 us

timid quartz
#

what the shit

rustic vine
#

lol

timid quartz
#

if you were to just do that with a for it’d take so long

rustic vine
#

it is with a for

#

wdym

#

the for loop isn't the slow part

spare quartz
#

(i'd know, the game draws entire images with them at game start :3)

#

(but ricard hasn't id verified so they're useless)

rustic vine
#

evil code that does evil things

spare quartz
#

nah just film grain

#

its noise

timid quartz
#

But even if you have tasks inside that take like 2ms, over 500 items that adds up to 1 whole second

rustic vine
#

but yeah idk if you saw this but

world:get() is faster than table[key]
world:set() is faster than table[key] = value
and more

every single ecr (the ecs library) operation is faster than its equivalent table operation, while using less memory

rustic vine
timid quartz
#

And then there are nested for loops in that

#

Which is even worse

#

This is literally O(n^2)

rustic vine
#

in what

timid quartz
#

wdym in what

rustic vine
#

you said there are nested for loops in that

#

idk what you mean by in that

timid quartz
#

Oh wait I misread

#

The script

#

Still it’s not great to have like 5 sequential loops

#

There’s a way you could mush that into one loop

rustic vine
#

but theres not really a reason to

#

maybe save you say 5 us

#

luau is awesome in that the most idiomatic code is typically the fastest

#

the loops query different components anyway, so its not a big deal

#

their overlap isn't big I don't think

timid quartz
#

Still worst case your :exclude could not exclude anything

#

Like sure you could amortize it but

rustic vine
#

the only stuff in the loop is like

#

an if statement, a fastcall, and then registry calls

#

those are insanely fast

#

I think its easy to be skeptic of code that runs every frame because it feels like wasted compute, but its really not that much different (or in any way always worse performing) than event driven code

proud creek
#

They’re really cool tho

spare quartz
proud creek
#

What.

spare quartz
proud creek
spare quartz
#

its worth it bro

#

take my umm

spare quartz
#

amortized is a funny world

#

i dont know what it means

timid quartz
#

So like in the beginning it may be inefficient but as it keeps running it gradually gets better

#

Or like kinda

#

basically "on average" it's something

#

So like the runtime for appending to an ArrayList is amortized to O(1) because most of the time you can just slap the new value right at the end

#

but every now and then you'll need to incur an O(n) resize

#

so it's not entirely O(1) but you can "amortize" it to basically say "yeah most of the time it's O(1)"

spare quartz
#

oh

#

so thats how they make those funny big Os for algorithms

#

a lot of stuff i write i cant figure out the complexity of cause they're usually quite variable

timid quartz
#

Big-O is the worst-case runtime for an algorithm and it's defined in terms of the inputs

#

O(1) is constant time, meaning the algorithm takes the same number of steps no matter how large the input
O(n) is linear time, meaning that the number of steps increases linearly with the input size; think of a for loop
O(n^k) is polynomial time; think of nested for loops

#

There’s more but that’s the gist

#

Obviously lower Big-O is better, so like O(n) is better than O(n^k)

#

So really the way that you come up with a Big-O for an algorithm is by analyzing what it does

rustic vine
#

Alternatively you just profile n benchmark it 😅

#

Happy new year btw yall

#

On the topic of time complexity though, sparse sets are the most goated datastructure known to man

#

Sparse sets are
O(1) add
O(1) remove
O(1) contains
O(1) clear
O(n) iteration
AND Contiguous in memory

timid quartz
#

but isn’t that the same as a hashmap with a goated hash function

#

well ig clear would be O(n) but

rustic vine
spare quartz
#

theoretically if you avoided fragmentation you could do it in O(1) by deallocating memory

#

oops misread

#

📼📼📼

spare quartz
#

new strain of rust developer found

lavish dove
#

yeah pip is kinda shit

#

I remember downloading that tensorflow ai shit

#

my internet kept giving a single bad packet for each gigabytea nd it restarted the entire downlooad each time

burnt locust
#

heey soo

#

im FINALLY putting in the effort to learn LUA

#

i have some notes written down

#

@spare quartz do you know lua?

#

i can show you my notes

#

see if they're good

spare quartz
# burnt locust
  • don't use wait, use task.wait
  • don't use game.Workspace, use workspace
  • don't define variables without local
  • don't define functions without local
  • ideally save the output of FindFirstChild to a variable and refer to it if it exists
burnt locust
#

Alright

burnt locust
spare quartz
#
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
if not (Humanoid and Humanoid:IsA("Humanoid"))  then return end

...

or

local Humanoid = hit.Parent:FindFirstChild("Humanoid")
if Humanoid and Humanoid:IsA("Humanoid")  then
  ...
end
burnt locust
#

if you wanna join

spare quartz
#

doing ar t

burnt locust
#

alr

burnt locust
#

so

#

in the last if statement

#

its meant to set it to that position if the variable position = 0

#

but its not doing anything

spare quartz
#

is script.Parent anchroed

burnt locust
#

uh

#

yes

spare quartz
#

well then its gonna offset the opsition not set it

burnt locust
#

oh 💀

burnt locust
#

Soooo

#

Making a part turned into a little project

#

I made a stupid squid game obby ☠️

#

It's so scummy and stupid

#

But I had nothing else to do

rustic vine
rustic vine
full berry
pastel tinsel
# full berry what's the diff between wait and task.wait
#

video above also helps

#

in that post

#

also wait() is officially deprecated

pastel tinsel
#

Kill…

#

_G is only good if you are like checking if something has been already ran somewhere else

timid quartz
pastel tinsel
#

Or just return

rustic vine
rustic vine
pastel tinsel
#

yeah

#

Understandable too

rustic vine
#

There's always a better solution than using _G or shared

timid quartz
#
_G.ThingRunning = true;
while true do
  if not _G.ThingRunning then break end;
  -- ...
end
#

so I can control when to stop it

rustic vine
#

Oh yeah, dev console and command bar is a different story

#

I said that in the context of anything else

timid quartz
#

Yeah

pastel tinsel
#

Yeah that too

proud creek
timid quartz
proud creek
#

rn i mostly do luau

pastel tinsel
#

🙏

timid quartz
spare quartz
#

there’s so many Cats on my phone I can’t send any

proud creek
timid quartz
# spare quartz there’s so many Cats on my phone I can’t send any
fun main(args: Array<String>) {
    io.ktor.server.netty.EngineMain.main(args)
}

fun Application.module() {
    install(ApiKeyMiddleware)
    install(Resources)
    install(ContentNegotiation) {
        json(Json {
            prettyPrint = true
            isLenient = true
            ignoreUnknownKeys = true
        })
    }
    install(StatusPages) {
        exception<Throwable> { call, cause ->
            if (cause is BadRequestException) {
                call.respond(
                  HttpStatusCode.BadRequest,
                  ErrorResponse(message = "Bad request")
                )
            } else {
                println("!! SERVER ERROR - ${call.request.uri}")
                cause.printStackTrace()
                call.respond(
                  HttpStatusCode.InternalServerError,
                  "Internal Server Error"
                )
            }
        }
    }

    setupDataRoutes()
}

val ApiKeyMiddleware = createApplicationPlugin("ApiKeyMiddleware") {
    onCall { call ->
        val sentKey = call.request.headers["Authorization"]
        val storedKey = when(call.request.httpMethod) {
            HttpMethod.Get -> "mygetkey"
            HttpMethod.Post -> "mypostkey"
            else -> null
        }

        if (sentKey == null || sentKey != storedKey) {
            call.respond(
              HttpStatusCode.Forbidden,
              ErrorResponse(message = "Invalid Authorization")
            )
            return@onCall
        }
    }
}
spare quartz
#

Are you writing ktor

timid quartz
#

yeah

spare quartz
#

He finally decided

#

Oh my god

timid quartz
#

oh no

#

this is separate

#

for the qdf api I decided on rust :3

spare quartz
#

SIGHHH

timid quartz
#

I still wanted to try ktor though

spare quartz
timid quartz
#

ur redundant...

spare quartz
#

I foresee it

timid quartz
#

nope

#

rust does everything for me that ada does :3

spare quartz
#

yeah cause it’s full of thigh highs…

spare quartz
#

Is it bad I kinda dislike C pushers a ton now

#

like sure im “on their side” since they make fun of rust but like

#

bro your langauge is actually terrible.

timid quartz
#

zig

spare quartz
#

on: reordering structs

#

crying with GNAT rn… he can do literally all of that while maintaining programmer controlled representation:<

timid quartz
#

me when I just #[repr(C)]

spare quartz
#

Ada users when the Pack, representation clause, Size, Alignment and Export => C come in

timid quartz
#
#[repr(C)]
struct MyStruct {
  field1: i8,
  field2: i8,
  field3: u16
}
spare quartz
#

I’m not writing the Ada equal since making a strict clause is so hard on mobile

#
for X use record
      field1 at 0 use 0 .. 7;
       ….
end record;
#

but something f like that

timid quartz
#

the ada equivalent is just

with Interfaces; use Interfaces;

record MyRecord is
   Field1 : Signed_8;
   Field2 : Signed_8;
   Field3 : Unsigned_16;
end MyRecord with Pack;
#

that's what I'd imagine

#

and Export => C if you really want

spare quartz
#

I don’t know if Pack definitely tells the compiler not to reorder though

#

It’s just a flag saying “optimize this for space over perf**”

timid quartz
#

hm

#

guessing Export => C does

spare quartz
#

Well that just makes it visible to C, Import => C might

#

Representation clauses are the definitive answer to anything memory related though

timid quartz
#

well guess what

#

This is the most important repr. It has fairly simple intent: do what C does. The order, size, and alignment of fields is exactly what you would expect from C or C++.

#

:3

#

(for #[repr(C)])

spare quartz
#

#[write_qdf_bot(for_me)]

#

So easy

timid quartz
#

lel

spare quartz
#

The compiler will not (and is not allowed by the Standard to) generate an atomic increment instruction to directly increment and update from memory the variable A.

spare quartz
#

doing some work making a windowing system

#

pain

spare quartz
#

windows loves their bitflags

burnt locust
#

I'm in a predicament

#

What should I script that's simple

proud creek
#

Make like a simple capture the flag or something game mode

pastel tinsel
#

bob the builder the killer

spare quartz
#

TIL

#

ada (apparently) handles segfaults by itself

#

so they're not reported in the windows logs

#

YOOOOO

#

IT ACCEPTED MY CLASS

#

:despair:

lunar dagger
#

WHAT IS BRO DOING 30k print ("hi wrld") LUA IS TRASH!!!!!

rustic vine
#

Are there ada bindings for the api?

lavish dove
# spare quartz

Isn't the a create window function that's way easier to use than whatever the fuck that is

lavish dove
timid quartz
lavish dove
#

I use to use fish but idk why I stopped

#

Oh yeah I couldn't get color in sudo with it

timid quartz
#

Oh that’s odd

pastel tinsel
#

Fish

spare quartz
#

The “pointers” for each parameter needed in a function are given using the 'Address aspect

#

The bindings I wrote myself though

full berry
#

for the rust programmers here, do you guys have a specific IDE that you recommend i use for rust programming

#

i was thinking rustrover but i don't feel like moving to enterprise software until i at the very least get a basic grasp of how rust works

#

VSC?

proud creek
#

notepad