#💽Programming Chat v2

1 messages · Page 12 of 1

spare quartz
#

it worked perfectly!

timid quartz
spare quartz
timid quartz
#

Total Ada death

spare quartz
#

total rustlet death

timid quartz
#

Rust pros

  • concise syntax (no giant keywords)
  • smart enough to do memory management without a GC
  • expressive type system that encodes semantics for every type
  • option and result over null and exceptions
  • high-quality stdlib that provides enough without providing too much
  • great package community around it

Ada pros:

spare quartz
#

ada pros:

  • all of that except community 😭😭
#
  • also an international standard
timid quartz
# spare quartz ada pros: - all of that except community 😭😭
  • doesn’t have concise syntax
  • not smart enough to do memory management beyond stack variables (which any lang can do)
  • idk if the type system is as expressive but it’s certainly far from not expressive
  • NULL AND EXCEPTIONS ca
  • stdlib is ok ig and idk how much it provides
  • lol yeah everyone in the ada community knows each other and they’re all 80 year old boomers using mailing lists
spare quartz
#
  • is concise.
  • implementation defined
  • a lot more safer than rust!
  • :3
  • stdlib is incredibly expansive, with GNAT it's stupidly capable
  • shut up :<
timid quartz
#
procedure Name (Param1 : Type1) is
   -- Delcarations
begin
   -- Body
end Name;

vs

fn name(param1: Type1) {
  // Declarations & body
}
#

who wins in conciseness

spare quartz
#

ADA

#

also thats bad style

#

Param1 : Type1*

timid quartz
#

let's see what character counter has to say

#

who is more concise now

spare quartz
#

i call cap

timid quartz
#

both are the bare minimum for an empty procedure

spare quartz
#

PROCEUDRE

#

PROCEDURE YOU USED THE WORD

#

🗣️

timid quartz
#

yeah otherwise you'll richard stallman me into oblivion

spare quartz
#

:3

timid quartz
#

as we can see

#

ada requires double the characters

#

:3

spare quartz
#

well technically

timid quartz
#

and ada is probably as safe as rust at best

#

rust is very safe

spare quartz
#

as we can see it's 2.24x

timid quartz
#

kys stallman

spare quartz
#

😭

#

i really hope the ada IDE scene gets better

#

i don't wanna live with this forever 💔

timid quartz
#

be the change you wanna see in the world

spare quartz
#

NO

timid quartz
#

you should write a good vsc plugin or a good lsp server

spare quartz
#

i tried doing plugin dev once on like

#

intellij

#

i cried

timid quartz
#

ok but that's intellij

#

do vsc

spare quartz
#

noooooo

timid quartz
#

or write a language server

spare quartz
#

that's probably full of microsoft junk from 1902

#

it is funny how the ada plugin IS written in ada itself

timid quartz
spare quartz
#

jusst whoever did it sucks at coding

timid quartz
spare quartz
#

THATS A GOOD THING

#

instead of propping up ub 🤢 it errors like a good program

timid quartz
#

true

#

that is one thing rust agrees on

#

let it error if it must

timid quartz
#

good project

spare quartz
#

ughguuhguhg

#

after this maven server

timid quartz
spare quartz
#

yes

timid quartz
spare quartz
#

yes

#

i just made that a library for future use

spare quartz
spare quartz
#

go here and tell me what you see

timid quartz
#

an ada file

spare quartz
#

COOOOOOOOOOLLLLLL

#

:3

timid quartz
#

yw 4 my ip

spare quartz
#

i cant access that

#

linux port forward garbles it

timid quartz
#

ah

#

L

spare quartz
#

L for yyou ...

#

uhh is it possible to insert .. in your path line

#

noprnopenopenope

#

bad!!!

spare quartz
#

que

timid quartz
#

LOL IT WORKED

#

I did src/../alire.toml

#

@spare quartz

spare quartz
#

i meant in the root dir

#

i wanna see if you can escape

timid quartz
#

uh give me a file outside the root dir

spare quartz
#

wget_log

timid quartz
#

nope

#

404

spare quartz
#

thank god

#

i also added directory listing

#

top tier web design if i dont say so myself

#

liar!!

timid quartz
#

?

spare quartz
#

cat was ln -s

timid quartz
#

i see the cat

#

yeah

spare quartz
#

its suppsoed to be SPECIAL_FILE

#

or something

timid quartz
#
--  Configuration for basic_http_server generated by Alire
with "extensible_http.gpr";
abstract project Basic_Http_Server_Config is
   Crate_Version := "0.1.0-dev";
   Crate_Name := "basic_http_server";

   Alire_Host_OS := "linux";

   Alire_Host_Arch := "x86_64";

   Alire_Host_Distro := "ubuntu";
   Ada_Compiler_Switches := External_As_List ("ADAFLAGS", " ");
   Ada_Compiler_Switches := Ada_Compiler_Switches &
          (
            "-O3" -- Optimize for performance
           ,"-gnatn" -- Enable inlining
           ,"-ffunction-sections" -- Separate ELF section for each function
           ,"-fdata-sections" -- Separate ELF section for each variable
           ,"-gnatW8" -- UTF-8 encoding for wide characters
          );

   type Build_Profile_Kind is ("release", "validation", "development");
   Build_Profile : Build_Profile_Kind := "release";

end Basic_Http_Server_Config;
spare quartz
#

thats a trade secret...

timid quartz
#

atp put a jpeg in the root folder

spare quartz
#

ugh fine

timid quartz
#

or a png

spare quartz
timid quartz
spare quartz
#

:3

#

you asked for one

#

why

#

there

#

perfect

spare quartz
#

it works

timid quartz
spare quartz
#

downloaded what

timid quartz
#

bacillus-1.3.0-1.21.1.jar

spare quartz
#

oh yeah its empty 😭

timid quartz
#

rip

#

I wanna break out of the folder...

spare quartz
#

server is off rn cause i gotta add authentication

#

or else it becomes weird ftp..

timid quartz
#

ftp server 👻

#

write ada lsp server first

spare quartz
#

hopefully this serves as a backup chain

timid quartz
# spare quartz

You should make an alternative package manager called “maiden” and make it better

spare quartz
#

but y

#

maven is perfectly adequate

#

also compiling on a pi sucks

timid quartz
#

but ig if you're done then uh

#

ada lsp time

spare quartz
#

not

#

still need to write auth

timid quartz
spare quartz
#

naybeeeeee

#

but i feel so lzay

timid quartz
#

cross compilation with rust is farily easy

spare quartz
#

just compile fasterrrr

timid quartz
#

-j12

spare quartz
#

but like

#

💤

#

okay nvm im gonna do that

#

this is way too slow

timid quartz
#

Probably with the use of crossTarget

timid quartz
#

valgrind DOES just work

#

wonderful

#
[nix-shell:/agony]# valgrind --leak-check=full bin/agony 
==430== Memcheck, a memory error detector
==430== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==430== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==430== Command: bin/agony
==430== 
AAAA -- input number (1 to 5 digits)
234
Generated: 5
your mom gay
asdf
asdf
==430== 
==430== HEAP SUMMARY:
==430==     in use at exit: 12 bytes in 1 blocks
==430==   total heap usage: 5 allocs, 4 frees, 1,555 bytes allocated
==430== 
==430== 12 bytes in 1 blocks are definitely lost in loss record 1 of 1
==430==    at 0x484476B: malloc (in /nix/store/xw71pz22gcj0b29yyag2gg395kfzacli-valgrind-3.22.0/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==430==    by 0x41CD6E: __gnat_malloc (s-memory.adb:79)
==430==    by 0x404C9B: _ada_agony (agony.adb:22)
==430==    by 0x4054C0: main (b__agony.adb:265)
==430== 
==430== LEAK SUMMARY:
==430==    definitely lost: 12 bytes in 1 blocks
==430==    indirectly lost: 0 bytes in 0 blocks
==430==      possibly lost: 0 bytes in 0 blocks
==430==    still reachable: 0 bytes in 0 blocks
==430==         suppressed: 0 bytes in 0 blocks
==430== 
==430== For lists of detected and suppressed errors, rerun with: -s
==430== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

@spare quartz how lovely

#

the code that causes this is as follows (and this behavior is expected)

-- snip
S : access String;
-- snip
S := new String'("lel");
-- snip
spare quartz
#

access types inherently leak memory without Unchecked_Deallocation

#

rn

timid quartz
#

it's just nice to see that valgrind works

spare quartz
#

im trying to figure out

#

WHY I CANT COMPILE THIS CODE

#

like dude

#

literally every single one of the ARM RTSes

timid quartz
spare quartz
#

rust doesn't have analogues to access

timid quartz
spare quartz
#

so doesn't count

timid quartz
spare quartz
#

are embedded/light

spare quartz
timid quartz
#

there are also just pointers too

#

but yknow references are preferred

spare quartz
#

remove the borrow checker from rust and tell me if they leak

timid quartz
spare quartz
timid quartz
#

obviously they will because you've removed the one thing that tells the compiler how to prevent leaks

spare quartz
#

YEAH DUH

#

ada doesn't have your borrow checker

#

accesses are simply just invalid the moment they go out of scope but not deallocated unless by the programmer

timid quartz
#

and im saying rust is better bc it does

spare quartz
#

one of the many reasons nobody likes accesses

timid quartz
#

rust does have std::mem::forget and Box::leak though if you really wanna leak memory

spare quartz
timid quartz
#

no hell no

#

that's terrible

#

im not that smart

spare quartz
#

me neither

timid quartz
#

I just benefit from the work others have done

spare quartz
#

ughhh

#

still trying to figure out an RTS that doesn't suffer from embedded crap

timid quartz
#

Yknow

#

Send your source code I wanna try something

spare quartz
#

which code

timid quartz
#

I wonder if I could make this compile with nix

spare quartz
#

basic_http_server or the library extensible_http

timid quartz
#

Uh whatever you’re trying to build rn

spare quartz
#

that's basic_http

#

at this point

#

i'd just forfeit and start making my own rts

#

but i know theres something OS specific that'll mess it up

timid quartz
#

what target is a rpi

#

assuming some aarch64

spare quartz
#

yes that

#

it'd probably be something like
<embedded/light/light-tasking>-rpi3b
in ada terms

timid quartz
#

lemme see what the correct pkgsCross target is

spare quartz
#

rpi is still compiling gcc :despair:

timid quartz
#

is it really not as simple as adding a different toolchain

#

like it is in c

#

or even rust

#

or zig

spare quartz
#

i just don't have the right RTS

timid quartz
#

then y it no compile

#

bruh

spare quartz
#

like the weirdest thing is

#

theres gnat-10 on apt install

#

but not 11, 12, 13 or 14

#

so you're 4 years behind (no gnatX or gnat2022)

timid quartz
#

I will be surprised if this works first try

spare quartz
#

if you get the application running on an ip with its port 80 open lemme know

#

ill test its maven capabilities

#

i'd suggest adding -d maven though

timid quartz
#

I have no aarch64 machine to run it on

spare quartz
#

man

timid quartz
#

and if YOU wanna run it...you probably need nix on that rpi

spare quartz
#

well that depends on the RTS you compile with

#

i have no idea how nix handles that so

timid quartz
#

oh

#

idk either

#

all im doing is having it compile for aarch64-unknown-linux-gnu

#

what even is an rts

#

real time system?

spare quartz
#

if it goes by conventional logic it'll just use a generic linux RTS associated with your GCC

#

run-time system

timid quartz
#

ooh

#

and why can't you just use the generic one

spare quartz
#

basically the collection of Ada/System files needed for your app to work

spare quartz
#

only embedded/light runtimes which are meant to run without an os

timid quartz
#

and you're trying to run it on raspbian assumedly

spare quartz
#

yeah

#

i mean i couuuldd

#

try plugging mine in

timid quartz
#

ok seems that it may be trying to compile more stuff than I thought

#

this might not be viable

spare quartz
#

oh?

spare quartz
#

alr build -- --compiler-subst=ada,/home/miko/.local/share/alire/toolchains/gnat_arm_elf_14.2.1_524d4d41/bin/arm-eabi-gnat make --RTS=/home/miko/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/lib/gcc/x86_64-pc-linux-gnu/14.2.0/
worked up until it tried to reach the library which it didnt find

timid quartz
#

¯_(ツ)_/¯

#

good luck

spare quartz
#

i gotta fix these 10 warnings before i continuie

timid quartz
#

yeah ok this cross compile thing doesn't seem to be wanting to work the way I want it to

spare quartz
spare quartz
#

ⓘⓘⓘⓘ

#

alright uh

#

video with japanese text... not recommended

#

okay but that works

timid quartz
#

and run on your pi

spare quartz
timid quartz
#

L

#

shoulda just used rust

spare quartz
#

not to mention sometimes it just went back to x86

timid quartz
#

or something with the jvm or clr

spare quartz
spare quartz
# spare quartz

i wonder if this plain text supports japanese text... gonna try Wide_Wide

timid quartz
#

says the one who can't even cross compile their language HAHAHAHAHA

spare quartz
timid quartz
#

its not that I can't

#

it's just that I haven't

spare quartz
#

(it's that you can't)

#

say one two

#

and four

#

wait, what

#

for some reason it only gets mojibaked when sent??

timid quartz
#

im busy

#

with like

#

completing assignments

spare quartz
#

do the me strat

#

okay so this appears to just be a firefox issue

#

there

#

content-type set

#

oh hi

lavish dove
#

Intel is adding 16 more registers to x86

#

APX extension

spare quartz
#

just put all of the memory in the registers

spare quartz
#

my code is so mountainous

timid quartz
#

I also feel like the existence of declare blocks makes mountainous code more likely

spare quartz
#

mfs say "cyclomatic complexity" and my brain just shuts down

timid quartz
#

because you now have to incur an indentation penalty for adding variables too

#

vs in normal languages, just conditionals, loops, and functions

spare quartz
#

"normal languages"

#

you're being racist to pascal...

#

anyways i just cranked up the line limit

#

because the code was being compressed into like, 5 characters nearing the edges

timid quartz
#

omg just

#

subprogram

spare quartz
#

mmmmmm i dont wnna

timid quartz
#

dewit

spare quartz
#

my task will contain all of its code and only its code

#

かめりあ feat. ななひら「ごーいん!」より
https://nanahira.jp/goin/

Music&Lyrics:Camellia https://twitter.com/cametek
Vocal:Nanahira https://twitter.com/nanahira
Illustration:4410 https://twitter.com/774_10
Movie:murAta Yuzi https://twitter.com/m_Yz

(興味ない 興味ない)
サンタさんほんとはいない
(Holy night Holy night)
カレンダーのほうがホワイト
(興味ない 興味ない)
だだだれも妬んでない!
(Holy night Holy n...

▶ Play video
#

i gotta implement base64 after this scp sl break

timid quartz
#

i think you're forgetting sleep

#

1am

spare quartz
#

who needs that

#

i also gotta do tls

timid quartz
#

when you did the smtp server, did you implement tls yourself or use something else

#

i forgor

spare quartz
#

used a hard binding to OpenSSL

#

now i wanna do it all in ada (and incur the timing vulns i have no idea about)

timid quartz
# spare quartz used a hard binding to OpenSSL
spare quartz
#

can't use

timid quartz
#

y

spare quartz
#

just not reasonable

#

at least for this project

timid quartz
#

y

spare quartz
#

wolfSSL is better for embedded

#

and it's got no alire index

timid quartz
#

so instead you use an unsafe c lib

spare quartz
#

i trust OpenSSL... a bit

#

but now i wanna do ti myself

timid quartz
#

me when I sidechannel you

spare quartz
#

bah

#

the worst that'll happen is a few timings vulns (what i said)

timid quartz
#

@wheat zinc you like doing ctfs, learn how to sidechannel tls so you can find the flag hidden on atp's pc

spare quartz
#

that's fine

#

anythings better than the current state (anyone on the internet can overwrite/create files in the virtual root)

timid quartz
#

wait really

spare quartz
#

yes

timid quartz
#

turn it back on 👀

spare quartz
#

there was no authentication for PUT cause i felt lazy and deferred parsing base64 to later

spare quartz
#

fine

#

its on

timid quartz
#

it's blank

spare quartz
#

correct

#

that's what virtual root means

timid quartz
#

mmm

spare quartz
#

./buildAda.sh validation -d test_folder

timid quartz
#

mm how to put file

spare quartz
#

you just

#

PUT /<file>

timid quartz
#

yeah but then send the data

spare quartz
#

http message body...............

#

it also supports unicode (theoretically) so use japanese

timid quartz
#

ah curl http://address --upload-file <file>

#

wow it works

#

you could make a pastebin off of this

spare quartz
#

this guy sucks at writing files!!

timid quartz
#

check new file

spare quartz
timid quartz
#

check again

spare quartz
#

oh yeah

timid quartz
#

wow smh

spare quartz
#

i forgot you write with root access....

timid quartz
#

LOL I DO

#

OK TIME TO ESCAPE THE VIRTUAL ROOT

spare quartz
#

TECHNICALLY you can

#

but i don't think you can

timid quartz
#

ok enjoy that file whose upload is still in progress

#

dang how long will this take

#

or did I make it crash @spare quartz

spare quartz
timid quartz
#

ig not

#

well it might take a while ig

spare quartz
#

i saw a file i wrote before the virtual dir and i got scared for a sec

timid quartz
#

oh no that's not it

#

check how big the virutal dir folder is rn...

spare quartz
#

0 bytes

timid quartz
#

no that's false

spare quartz
#

no thats true

#

theres nothing in it

timid quartz
#

oh you

#

restarted it

#

dont do that

#

smh

spare quartz
#

no i cleared it manually

timid quartz
#

dont DO that

#

smh

spare quartz
#

the files are actually written

#

why

#

.......

timid quartz
#

i am uploading file 2 u

spare quartz
#

if you were wondering where your large file went IT WAS NEVER WRITTEN

timid quartz
#

it's only a 2gb fedora iso

#

here I can upload something smaller

spare quartz
#

im 99% sure your http request just doesn't exist

timid quartz
#

there you go

spare quartz
#

42838B ORDINARY_FILE 42.zip

timid quartz
#

I uploaded a smaller file

spare quartz
timid quartz
#

yeah...wanna unzip it...

spare quartz
#

just did .....

timid quartz
#

have that mp4 too

spare quartz
#

⚠️ not your imgur

timid quartz
#

yuh huh

#

#MyImgur

#

you should make it accept a 2gb file upload though

#

idk how maybe chunk it

spare quartz
#

i do

#

you're just not sending it right

timid quartz
#

Who is more trustworthy

  • brand new http server written in obscure language
  • literal curl
spare quartz
#
  • you
#

here

#

try it out yourself

#

if it even works otuside of my machine

timid quartz
#

Idk I think it’s not curl’s fault

spare quartz
#

test it locally then!

timid quartz
#

Idk could be my university internet being funny

#

And stop posting random .exe files smh you know I don’t run those

spare quartz
#

im trustworthyyyy

timid quartz
#

Nope

spare quartz
#

noted

timid quartz
#

Even if Terry sent me an executable file, I would not run it

spare quartz
#

well yeah but terry is the type of person to put 500 rats in one

lyric mesa
spare quartz
#

okay just tested

#

yup you can break out of the virtual root

#

but i think i know how to fix that

#

no more jailbreak.

spare quartz
#

okay intereting

#

so these two are symlinks to ~/basic_http_server and ~ respectively with the virtual root at ~/basic_http_server/test_folder

#

going to jester and tester both give a 403 with the new system

#

so.. unintentional win?

proud creek
spare quartz
#

ITS GOING TOO FAR

#

even the ADS i see are in fucking japanese

timid quartz
spare quartz
#

I STIL LDONT KNOW HOW TO READ IT ALL

timid quartz
#

あるいは、いつも日本人だったかも

spare quartz
#

just let me write my bsae7484 in paece

timid quartz
spare quartz
#

Ada.Strings.Fixed.Move (Data (Position .. Data'Last), Group, Ada.Strings.Right, Pad => ASCII.NUL);

timid quartz
#

Actually you might not need the client a server alone may be fine because I imagine VSC (or any other editor with support for LSP) is a client

#

That would make sense

spare quartz
timid quartz
#

NO

#

LSP FIRST

spare quartz
#

google translate is quickly becoming insufficient with the shorts i watch....

timid quartz
#

besides you need to know Japanese to know how to translate it :3

spare quartz
#

wikipedia :

timid quartz
#

And learning Japanese can take a lifetime…

spare quartz
#

String (1 .. 4) -> Base64 alpha...

timid quartz
#

You need to learn all the kanji and the vocab and the grammar structures and the nuances

#

Cause if you thought English was nuanced then you’re in for something else with Japanese

spare quartz
#

if it means i can watch the silly furries sing the songs better then ill take it 👍

timid quartz
#

Make LSP first

spare quartz
#

oh crap i forgot ada doesnt use zero index strings

timid quartz
#

Cringe

spare quartz
#

GNATPP 2022 SUPPORTS [] SYNTAX YAY

#

cant wait for GNATformat

timid quartz
spare quartz
#

ummm

timid quartz
#

BUT LSP FIRST >:(

spare quartz
#

i wanna tdo the former

#

just not the latter

#

i'd rather dissassemble what they're saying first

timid quartz
#

Ok but the latter is just an api call

spare quartz
#

which involves GNAT.Sockets :despair:

timid quartz
#

HAHAHAHAHA imagine not having a decent socket impl in your stdlib

spare quartz
#

GNAT.Sockets is actually very decent

#

works on literally every os + real time

#

just is very verbose as its an ada library after all

timid quartz
#

Gross

spare quartz
#

pretty.

timid quartz
#

If you want to break apart the sentences then figure out what Japanese reading assist browser plugins do to break sentences apart

#

Or like feed it to jisho.org somehow or apparently JMDict is just a bunch of XML files you can squeeze into any app

spare quartz
#

ah gnatpp does not like giant arrays

spare quartz
#

japanese characters can be like, composite right

#

it's not just singular things like "a" "b" "c"

timid quartz
#

Different radicals yes

spare quartz
#

yeah i wanna look into that first

timid quartz
#

You want to break the kanji apart?

spare quartz
#

i don't wanna know what they're saying just breaking it apart

#

cause that's how i learn

timid quartz
#

Honestly if you want to study Japanese I can recommend wanikani because it does exactly this with kanji

spare quartz
#

oooooooooooooo right i need to dooooooo bit manipulationnn

timid quartz
#

If you want something that’s free, I personally haven’t used it, but kanji koohi might do something similar

spare quartz
#

oh you just reminded me

#

afaik ada doesn't have unicode tools built in like java/python do

timid quartz
#

Haha

spare quartz
#

so i'll have to do some work with Wide_Wides

#

oh well

timid quartz
#

And I think all grammar structures involve kana

#

Learning the kanji and what radicals compose them will help you objectively understand sentences more than if you didn’t, but you’re not gonna get the full meaning without the grammar

spare quartz
#

abn fxx
x = 0b0000000

timid quartz
spare quartz
timid quartz
#

Oh

#

Weirdo

spare quartz
#

HOW

#

Character'Enum_Pos ('A')?

timid quartz
#

Why do that if you don’t want to learn the actual meaning

spare quartz
#

because thats how i learn ....

#

i need to break things until they're something i can unerstand..

#

'POS thats it

#

hmm

timid quartz
spare quartz
#

i could probably represent the string as a 24 bit integer

#

just gonna violate a cornerstone of ada

timid quartz
#

Idk you just make no sense

spare quartz
#

god this is stupid

spare quartz
timid quartz
#

Like you wanna learn the radicals and how they compose the kanji, but you don’t want to learn the meaning of the kanji or what word it’s actually forming in speech

#

Like ????

spare quartz
#

yeah cause i wanna do the latter part later

#

the former part is just an immediate task like making an lsp

timid quartz
#

That makes more sense

timid quartz
spare quartz
#

ill split the kanji first then 😁

timid quartz
#

Nuh lsp

#

LSP will help you write code to split the kanji

spare quartz
#

how

#

im not writing my code in japanese

timid quartz
#

Because lsp is responsible for like the intellisense shit

#

Which you don’t strictly need but it makes it nicer

spare quartz
#

okay but like splitting the kanji is just basic string operations which i think i got down with Ada.Strings.Fixed

timid quartz
spare quartz
#

well its caused by a lot

timid quartz
#

Yeah but see lsp at the bottom

timid quartz
spare quartz
#

....... big LUTs then!!!

timid quartz
#

What is a lut

spare quartz
#

look-up table

timid quartz
#

Linus Universe Tips??

timid quartz
#

There’s like 2000 commonly used kanji

#

And more than that which are not quite as common

#

It would have been incredibly smart if they made the Unicode correspond to the strokes

#

I’m actually curious now

spare quartz
#

i know theres still drama about what they did wrt CJK unification

#

but im not sure how its all structured really well (i only really look at technicals/latin)

timid quartz
#

Honestly you might have better luck making a program that captures kanji from the screen and tries to deduce radicals from that

spare quartz
#

thats what was in the back of my mind

#

OpenCV

timid quartz
#

Or even easier maybe: Captions -> split into words -> take kanji from words -> get radicals from dictionary

spare quartz
#

exp|per|i m|ent

#

7370853
6647840
6889586
6647072
29806

timid quartz
#

You could have a table that contains all non-kanji symbols because that is way smaller and filter on that

#

Use that to separate the kanji out

spare quartz
#

perfect (its in LE so this is expected)

spare quartz
#

a lot of the test samples i have in mind have english mixed in with them so...

#

hopefully all kanji are defined without breaks though

timid quartz
#

Yeah don’t count English characters either

timid quartz
#

That would be smart of them

timid quartz
timid quartz
#

@spare quartz range 0x4300 .. 0x9FFF is kanji

#

it's kinda hard to see but sequences of kanji are prefixed by \ and postfixed by /

#
const par = document.getElementById("test").textContent;
let newPar = "";

let started = false;

for (let i = 0; i < par.length; i++) {
    let curr = par.charCodeAt(i);
    if (0x4300 <= curr && curr <= 0x9FFF) {
        if (!started) {
            started = true;
            newPar += "\\";
        }
    } else {
        if (started) {
            started = false;
            newPar += '/';
        }
    }
    newPar += String.fromCharCode(curr);
}

document.getElementById("test").textContent = newPar;
spare quartz
#

scp sl break over

timid quartz
#

Ugh I need to stop doing all the work for you

spare quartz
#

no keep doing it for me :3

timid quartz
#

No

#

Do your own work!!!!!!!!

spare quartz
#

okay

#

i should stop using stack overflow

#

it failed me

#
Mask : Base_64_Group := Base_64_Group (Shift_Left (Shift_Right (Unsigned_32'Last, 32 - (To - From + 1)), From));
#

but now i have this

#
Ada.Text_IO.Put (Shift_Right (Unsigned_32 (Extract_Bits (Group, Index * 6, ((Index + 1) * 6) - 1)), Index * 6)'Image);
#

perfect

spare quartz
#

its getting corrupted

#

ENDIANNESSSS

timid quartz
#

endianness ❤️

#

@spare quartz improved

#

forgot innerHTML existed

spare quartz
#

what are those? the kana things?

timid quartz
#

yes

#

those are hiragana specifically

spare quartz
#

okay neat i got a single bit of terminology down

timid quartz
#

they are the """native""" japanese text

#

more akin to our alphabet

#

and these are katakana

#

normally used for like adapted words

#

also ew a ヲ

spare quartz
#

so like question

timid quartz
#

like nobody uses that character anymore

#

sure

spare quartz
#

there's thousands of kana/kanji right

timid quartz
#

there are......uhh

#

thousands of kanji

#

only like 50? ish kana

spare quartz
timid quartz
#

learning from a young age and constant exposure

#

idk they've had thousands of years to perfect it because the chinese who invented these characters had thousands of years to figure out how to make learning them feasible and the japanese had a while after adopting them to further refine it too

spare quartz
#

hmm

timid quartz
spare quartz
#

yeah this is something i'll need to wrap my head around ...

timid quartz
#

so 46 basic kana (not including diacriticals) and 12 that come smaller

timid quartz
spare quartz
#

still trying to figure out how to effectively encode this base64

#

threw out the unchecked_conv method (depends on endian)

#

hmmm

timid quartz
#

japanese lorem ipsum

timid quartz
spare quartz
#

i saw i'm kinda busy at the mome

timid quartz
#

busy with scpsl

spare quartz
#

running a loop through my head

#

i have no idea how this code will work

lavish dove
# spare quartz i have no idea how this code will work

bro I wrote this code, no idea how it works its fucking magic

vector<vector<string>> makeinstr(string f) {
  vector<vector<string>> instr;
  bool instring=false;

  vector<string> check;
  string current= "";

  // holy shit this is scary
  for (auto i : f) {
    if (i == '\"' && instring==false) instring=true;
    if (i == '\n') {check.insert(check.end(), current);current.clear();instr.insert(instr.end(),check);check.clear();continue;};
    if (i == ',' && instring == false)  {check.insert(check.end(), current);current.clear();continue;}
    current+=i;
  }
  return instr;
}```
#

what the fuck is that 😭

spare quartz
#

reading 6 bits at a time

lavish dove
lavish dove
#

mod %8

#

and just rightshift then leftshift to normal

#

so the last 2 bits are in overflow register and ignored

spare quartz
#

i need all of the bits though

#

bbbbbb|aaaaaa|bbbbbb

lavish dove
#

its for an assembler, it takes a string
"instruction operand, operand, maybe string for db instruction"
and converts it to
{
{ instruction, operand, operand},
...
}

#

a vector of instructions

#

oh I stared at it for 5 minutes and understand it now lmao

#

but damn thats scary

timid quartz
spare quartz
#

IT DOESNT WORK

timid quartz
#

What are you trying to do anyways

spare quartz
timid quartz
#

Oh wait

spare quartz
#

RFC4648 BASE64

timid quartz
#

I did not know how that worked

#

STOP CITING RFCs

spare quartz
#

basically

timid quartz
#

Why did they make it 6 bits 😭

spare quartz
#

you read in 3 bytes (24 bits)

timid quartz
#

Make a data type that’s 6 bits wide

spare quartz
#

you split that up into 6/6/6/6

timid quartz
#

Or like read 4 then 2

spare quartz
#

and reference a LUT with each of the 6 bit numbers

#

if you're missing data then you pad zeros, if you're missing something out of the three you add a =

spare quartz
#

it also didn't work

#

cause of endianness stupidness

#

AAAAAA | AA . AAAA | AAAA . AA | AAAAAA

timid quartz
#

Assume little endian

spare quartz
#

i THINK i got it

#

just need to um suse my brain

spare quartz
#

I GOT IT

#

YWVyYSBpcyBhIGJhbGQgc21lbGx5IGZ1cnJ5ISEh

spare quartz
#

@timid quartz

#

RUST

timid quartz
spare quartz
spare quartz
#
AAAAAA   | AA . AAAA | AAAA . AA | AAAAAA
BBBBBBxx | BBBBBBxx  | BBBBBBxx  | BBBBBBxx
lavish dove
#

It forces you to use a server that takes 500 megabytes of ram

lavish dove
#

Haved to turn off the server with systemctl

timid quartz
#

@spare quartz :3

spare quartz
#

I just woke up

timid quartz
#

they're right though

#

use a more modern, well supported, widely used language

spare quartz
#

Ada is modern, supported, and widely used

timid quartz
#

like C++ or Rust

#

Ada is semi-modern, semi-supported, and NOT widely used at all

spare quartz
#

C++ is literally just a 5 year old making bad decisions for 30 years

timid quartz
#

I bet F# and OCaml are more widely used than Ada

spare quartz
timid quartz
#

and probably Common Lisp

spare quartz
timid quartz
#

in general

spare quartz
#

Ada is a general purpose language but I’m not gonna go out and say it’s better than everything else

#

Don’t use it to write code LIKE java or rust

timid quartz
# spare quartz Explain. Show your work. 0/5 points.
  • semi-modern: hmm I may concede that it is modern
  • semi-supported: see lack of libraries, lack of interfaces with other things, and most potently lack of functional cross compilers
  • not widely used: see lack of libraries, lack of community, and honestly I dare you to do a github search for ada projects and find ones that aren't included in alire's package index, even the DOD dropped the mandate to use Ada
spare quartz
#

There’s also Green Hills Software but their stuff is literally classified

timid quartz
spare quartz
#

I’m still building GCC on that pi

timid quartz
#

wait

#

actually

#

idea

spare quartz
#

?

timid quartz
#

idea idea idea

#

if it's built directly into gcc

#

on your normal machine, install arm-none-eabi-gcc

spare quartz
#

Oh I already have

timid quartz
#

or whatever equivalent toolchain

#

ok then use that

#

:3

spare quartz
#

Just didn’t work well with GPRbuild since I assume alire is messing it up with x86

timid quartz
#

hmm

spare quartz
#

Since the alternative is… hand building/binding/linking every file

timid quartz
#

yeah yikes

#

ok what if you used qemu

spare quartz
#

Maybe

snow oak
spare quartz
lavish dove
lavish dove
spare quartz
#

tell that to the people who made basic authentication

lavish dove
#

oh 2^6 is 64

#

so thats whyyou wanted to control along 6 bits

#

instead of bytes

lavish dove
spare quartz
#

compatibility

#

can only really use A-Za-z0-9

#

and = for padding

lavish dove
#

naw this is not acceptable make your own security raaah

spare quartz
#

can't, then i'd need to make a gradle plugin and distribute that 💔

lavish dove
#

raaah

lavish dove
spare quartz
#

lua code

lavish dove
#

no way I can get cool role if I just send some lua code

spare quartz
#

yeah

lavish dove
#

I verified and the channel is still locked 💀

lavish dove
#

I was gonna delete the duplicate one I swear

proud creek
lavish dove
#

is it]

#

the character for rice!?!?

spare quartz
#

huh

#

@timid quartz so

#

turns out

#

installing a windows cross compiler is as easy as cake

#

i just need to find one for arm on pkgs

#

works almost completely fine too

lavish dove
timid quartz
#

anyways gg about finding out newer ubuntu has a cross compiler @spare quartz

lavish dove
#

now make it so you can replace every javasccript framework with lua code

lavish dove
spare quartz
#

former

lavish dove
#

mingw has binaries 💀

#

for linux

spare quartz
#

Yeah ik

#

That’s what I used

lavish dove
#

w

spare quartz
lavish dove
#

it wouldnt be newer ubuntu then

#

cuz im on debian and have mingw installed

spare quartz
#

Oh, that was cause of a different set of issues

timid quartz
#

@spare quartz but can you cross compile from x86 to aarch64 on ubuntu 24 rot

lavish dove
#

yes

timid quartz
#

(the answer is no)

spare quartz
lavish dove
spare quartz
#

I’m gonna take a shower and try that package I sent

#

GPRbuild should just accept it

timid quartz
spare quartz
#

I couldn’t even compile GCC on it

#

Compilation maxed out it’s 1 GB

lavish dove
#

ive compiled gcc on a pi

#

oh 1gb is crazy

#

dont use /tmp lol

timid quartz
#

arm-none-eabi my beloved

lavish dove
#

whats eabi raah

timid quartz
#

embedded

spare quartz
#

Bare metal target

timid quartz
#

iirc

#

Yeah

spare quartz
#

Eabi without hard float means there’s no FPU

timid quartz
#

Cause there’s also arm-Linux-gnueabihf

#

which yknow

#

gnu abi

spare quartz
#

This mf probably runs his system on a gpu ^^^

spare quartz
#

It’s not my pi

timid quartz
spare quartz
#

Yeah

#

It’s a friend’s, they gave me SSH cause this HTTP/Maven stuff is for a project considering something we both manage

spare quartz
#

okay weird

spare quartz
#

i also installed a cross compiler for https://en.wikipedia.org/wiki/Motorola_68000_series just to check

The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) is a family of 32-bit complex instruction set computer (CISC) microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and were the primary competitors of Intel's x86 microprocessors. They were best known as the processors use...

#

(even though i can't use this)

spare quartz
#

YESSSSS

#

I GOT ITTTT

#

now all i need to do is wget it

lavish dove
#

cool

spare quartz
#

./basic_http_server-aarch64: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./basic_http_server-aarch64)

#

aw crap

lavish dove
#

bros missing libc

spare quartz
#

the pi only has 2.31 😭

spare quartz
#

OK

#

upgraded

#

and it seems to work?

timid quartz
#

ALSO you wanna talk overgrown makefile, look at gprbuild

spare quartz
#

no

#

its a Bourne Again shell script

#

but nice try liberal

timid quartz
#

yeah but

#

what does it do

#

it runs a compiler

#

basically a makefile disguised as a shell script

spare quartz
#

yes but it's more ergonomical than makefile

#

because gprbuild handles everything

timid quartz
#

gprbuild is literally make

spare quartz
#

BETTER make*

#

😭

#

i forgot to fix auth 😭

#

oh yeah

timid quartz
#

dangit

spare quartz
#

i need to fix windows directory listing

timid quartz
#

you deleted it

spare quartz
#

yes and i also turned off the server

#

:3

timid quartz
#

DIE

#

PUT IT BACK

spare quartz
#

hold on i need to test windows

#

unfortunately

timid quartz
spare quartz
#

windows won't let me allocate :80 so ill just use a port you cant

timid quartz
#

let me innnn

spare quartz
#
raised ADA.IO_EXCEPTIONS.USE_ERROR : Unable to get modification time of the file "C:\Users\Adenosine3Phosphate\Downloads\Auto-GCAS_Saves_Unconscious_F-16_PilotΓÇöDeclassified_USAF_Footage.webm.480p.vp9.webm"
[C:\Users\Adenosine3Phosphate\Downloads\basic_http_server.exe]
0x7ff689c019ab ada__directories__modification_time at ???
0x7ff689c02ec3 ada__directories__base_name at ???
0x7ff689c03244 ada__directories__start_search at ???
0x7ff689bc41cb basic_http_server__sockettaskTB.1 at ???
0x7ff689bf4d0e system__tasking__stages__terminate_task at ???
[C:\WINDOWS\System32\KERNEL32.DLL]
0x7ffc45725765
[C:\WINDOWS\SYSTEM32\ntdll.dll]
0x7ffc464823ea
spare quartz
timid quartz
#

smh

#

jailing me

spare quartz
#

hmm

#

lemme rebuild this in development mode

#

HOLD ON

#

its open now

timid quartz
#

gnatpp

#

why does it not embed

spare quartz
#

i wonder if

#

aw no

#

HTTPS records haven't propagated yet-

#

ADMIN ABUSE

timid quartz
#

ok anyways I eep

spare quartz
#

good

timid quartz
#

have fun with your makefile and your big overgrown make

spare quartz
#

no need its fine

#

its just base64

#

again

timid quartz
#

rr @spare quartz how do I structure code I hate thinking of how to structure code

#

for the exe reader do I make records do I just make a bunch of functions and procedures rrr

spare quartz
#

For a file format I’d just make a record and store everything in it

timid quartz
#

i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code i hate structuring code

spare quartz
#

WHY

#

It’s so easy

timid quartz
#

ITS SO HARD

#

WHAT IF THE STRUCTURE IS WRONG

spare quartz
#

It won’t be if you read the documentation right

timid quartz
#

no no no no nobut

#

ok

#

ok

#

so for a rust roblox api library I made and left half finished a while back

#

the way it works is that you have a struct (Ada record equivalent) that represents your client and wraps around an inner struct that handles requests and the optional roblosecurity cookie

#

and it's great because it's one thing that contains all your info

#

EXCEPT what if you're doing async or multithreading? your program is gonna get stuck sharing that one client OR you're gonna have multiple clients

#

it would have been better to make just a collection of functions and maybe an optional struct that you also use as an argument that holds the roblosecurity cookie

spare quartz
#

soouuunndddsss like you should put that client object in a protected object

timid quartz
#

no no but like

#

you can't make concurrent requests

#

because you have to share the client around

spare quartz
#

but why not?

spare quartz
#

and then use that for future calls

timid quartz
#

but then each thread gets its own client

spare quartz
#

hold on lemme wake up

timid quartz
#

which defeats sharing the http requester object and the roblosecurity cookie

spare quartz
timid quartz
#

oh and xcrf cookie

spare quartz
#

unless that’s not what you want

timid quartz
#

or whatever it is

spare quartz
#

just renew it in the protected object

timid quartz
#

because you have the roblosecurity cookie that is fairly long-lived but then you have the xcrf token or whatever that isn't long-lived at all

#

and in order to renew it, you need a mutable reference to self

#

but rust only allows one thread to have a mutable reference at a time

#

because yknow.....safety...

spare quartz
#

with an protected object I wouldn’t see that being a problem

timid quartz
#

rust doesn't have this concept of a protected object

#

I could wrap the token in a mutex but then that gets so annoyingg

spare quartz
#

True

#

Protected objects are kinda like giant mutexes that wrap around a package

timid quartz
#

but even then

spare quartz
#

on pc now

timid quartz
#

I think it would have been better to have a collection of functions

#

and interior mutability behind an immutable reference sucks

spare quartz
#
with Roblox;
with Roblox.User;

procedure Main is
begin
  Roblox.Initialize ("cookie!"); --  sets the cookie in a protected object in the private part of Roblox
  Roblox.User.Ban_Aerasto;       --  goes through the protected object to obtain (possibly renew) cookie/xcrf
end;
timid quartz
#
use std::thread;
fn main() {
  let client = ClientThingey::new(Some("roblosecurity"));
  thread::spawn(|| thread(&client));
}
fn thread(client: &ClientThingey) { /* ... */ }

versus

use std::thread;
fn main() {
  thread::spawn(|| thread());
}
fn thread() {
  let request_jar = Jar::new(Some("roblosecurity"));
  // ...
}
#

and like

#

the reason

#

is the xcrf token or whatever can expire

#

so within the client it has a way to detect that and try to refresh it

#

which requires a mutable reference to self

spare quartz
#

i forget how many punctual characters you use in rust

#

very cool, it's like java lambdas

timid quartz
#

yeah closures

#

except they're better than lambdas for some reason

spare quartz
#

gee okay.

#
() -> System.out.println("java");
{ println("kotlin") }
#

(ada has no equal except for AtS :<)

timid quartz
# spare quartz gee okay.

ok the difference is that a lambda is just an anonymous function whereas a closure closes over the environment around it

spare quartz
#

oh, then it's like kotlin's then

#
a.let { println("closure of $it (a)") }
timid quartz
#

what is $it

spare quartz
#

snapshot (closure) of a at the time let was called

#

it is the default for the first argument in a one-argument lambda in kotlin

a.let { a -> ... }

but it can be renamed like that

#

kotlin won't let you just do a simple null check most of the time (for example), so you have to use closures a lot

timid quartz
#

ic

#
fun main() {
  var a: String = "test"
  var b: String = "test2"

  a.let { println("closure of $it (a) $b (b)") }
}
#

yeah this works

#

so kotlin lambdas do indeed close over the environment

#

so they are closures not lambdas

#

you should go correct their docs

spare quartz
#

mmmmmmmmmmmmmmmmmm lazy

#

.let / .also are closures

#
var a = { println("A") }
#

while this is a lambda

timid quartz
#

no

#

that's a closure too

spare quartz
#

if a thread changed b during the parsing of that string for example, it wouldn't be what it was at the time of calling let

#

it would be unaffected though

timid quartz
#

no it's a closure because it's able to capture things from the environment it was called in

#
fun main() {
  var a: String = "test"
  var b: String = "test2"

  a.let { println("closure of $it (a) $b (b)") }
  var c = { println("$a $b") }
  c()
}
#

like this works

spare quartz
#

i'd need to look at the JVM bytecode

timid quartz
#
fn main() {
    let test = "a";
    let test2 = || { println!("{test}"); };
    test2();
}
#

in the same way this works

spare quartz
#

but the way i understood closures are they take a current snapshot/copy of thing x in the environment

#

$a / $b aren't that, they're just references to the variables in the environment

#
a.let {
  if (it == 5) println("a was 5 at the time let was called, and it will always be 5")
}

if (b == 5) println("b was 5 at the time this if statement was evaluated, but we can't be sure b is still 5 in this branch")
timid quartz
#

yeah

#

but lambdas can't do that

spare quartz
#

i thought they could

timid quartz
#

from what I understand

#

from so