#💽Programming Chat v2

1 messages · Page 23 of 1

pastel tinsel
#

I have like three of them

full berry
#

wh

#

what do you need 3 for 😭

full berry
pastel tinsel
#

Meshing

full berry
#

i forgot the name of it but

#

that chart

#

how does yours look like i wonder

pastel tinsel
#

Oh

full berry
#

if its like more nested than my cable management im gonna shoot myself

pastel tinsel
#

Tree

full berry
#

yyeah ig

spare quartz
#

hmmmm

#

so like..

#

would it be bad if i asked for the conv to go to technology

#

or would that be impeding you guys

full berry
#

oh right fair enough

spare quartz
#

thx

rustic vine
rustic vine
# spare quartz

See the forum things are great except you can't search in them

spare quartz
#

true

rustic vine
#

Whoever decided that it wouldn't be worth adding search per-forum should be fired

spare quartz
#

actual worst platform design

rustic vine
#

LOL

spare quartz
#

anyways my class reader still isnt complete even though it compasses 1000 lines

#

i still need to do attributes

rustic vine
#

Sounds like time for a refactor

spare quartz
#

nope

#

all looks perfectly fine

#

except for a few violations in dry which i can't control beyond throwing a giant "ternary" at them

rustic vine
#

Did you spell that wrong

spare quartz
#

spell what wrong

rustic vine
#

Why does constraint look so weird

#

It's right I think

spare quartz
#

what time is it for you

#

you're probably in the state where words look incorrect but they're spelled fine (like Color)

rustic vine
#

11 in the morning

spare quartz
#

weird

rustic vine
#

No it looks fine now

#

I think the evil people were messing with me just then

#

It looked super weird

spare quartz
#

yeah maybe you needed a 10e2 to help you

rustic vine
#

Maybe..

spare quartz
#

(it will always be either of the three)

#

forgot to mention each of the read functions except for read_class are all in their own files cause of how large they are

rustic vine
#

Yea I can't tell what's going on there

spare quartz
rustic vine
#

Is that a switch case

spare quartz
#

look up

rustic vine
#

I did

spare quartz
#

i think the case/when would be good enough signifiers

#

Item.Include is just setting a value in a map

rustic vine
#

Kinda? Case makes it seem like it's a single case in a switch

spare quartz
#

¯_(ツ)_/¯

#

some languages do it differently like kotlin or rust

rustic vine
#

Is that switching on Read_Tag

spare quartz
#

yes

rustic vine
#

Oh ok

spare quartz
#

Read_Tag is an enum

rustic vine
spare quartz
#

X'(...) creates a record of type X with the values provided in ...

rustic vine
#

Why new vs no new

spare quartz
#

new creates an access type (pointer) of something

#

it's called an allocator in the RM

#

usually these wouldn't be needed but due to the self-referential nature of a constant pool it's required here

rustic vine
#

So why don't you use new for Constant_Pool_Entry

spare quartz
#

because we don't need a pointer for that

#

the record itself is stored in the map

rustic vine
#

Ok wait so new gives you a pointer? What does no new do then, stack allocates?

spare quartz
#

implementation dependent but for GNAT iirc yeah

rustic vine
#

Oh huh ok

#

That's cool

spare quartz
#

you're advised to stay away from access types as much as you can even though they're safe to use all of the time

#

i'd use a Holder for indefinite types like the constant_pool records but again

rustic vine
#

That's a lotta big words

#

Idk what they mean 😅

spare quartz
#

what are the big wrods

rustic vine
#

Whats an indefinite type here

spare quartz
#

uhh essentially a type whose size isn't defined at compile time

#

like an array type without bounds or a record with variants

rustic vine
#

Defined? Or meaning it's dynamically sized

#

So essentially just not constant sized

rustic vine
spare quartz
#

will show what i mean in a bit

rustic vine
#

Disaster, I'm grabbing lunch

spare quartz
#

we have this variant here

#

which is defined as type Utf_8_Constant_Pool_Entry is new Constant_Pool_Entry (UTF_8);

rustic vine
#

Wait, the record contains itself

spare quartz
#

a specific variant of itself yes

rustic vine
#

For utf8

spare quartz
#

because the way the specification is "elaborated" (read by the compiler, at least to my knowledge), Utf_8_Constant_Pool_Entry will not be defined when it is used there

rustic vine
#

Alright

spare quartz
#

so we have to make it an access to an incomplete type (just type Utf_8_Constant_Pool_Entry;) and then define it after Constant_Pool_Entry

spare quartz
rustic vine
rustic vine
rustic vine
#

Neat

spare quartz
#

types are also "frozen" at a certain point (i.e., you're not allowed to add stuff to it like functions after a point)

#

but i still need to learn more about freezing + elaboration order so i'm not the best source of info

rustic vine
#

Interesting

#

Cool language. Weird syntax though 🥲

spare quartz
#

surprisingly comfortable to write in after a while ill admit

#

oh yeah i ned to fix these later

rustic vine
#

Kinda related but not really lol, sorry

spare quartz
#

no i relate to that dw

#

ive just settled into lua/ada/kotlin rn though

rustic vine
#

Seems like a good balance

rustic vine
spare quartz
rustic vine
#

Former lead luau engineer

#

He was at roblox for like 17 something years

spare quartz
#

woa

#

is this math.lerp thing an rfc?

#

or is it out

rustic vine
#

He's the reason luau became open source

rustic vine
spare quartz
#

yooo sick

#

i went to look up more info and

#

😭

rustic vine
#

Also did ncg for it lol

#

Goat

rustic vine
spare quartz
#

lets goooo

rustic vine
spare quartz
#

OH native code gen

#

took me a bit

rustic vine
#

Yes

spare quartz
#

ughhh reminds me

#

ive made a (fourth) class reader ... do i make a third jvm

rustic vine
#

Disaster

spare quartz
#

excessive "free" time*

#

first jvm corrupted data a lot
second jvm errored a lot due to unfinished features (but was much much more safer as every table had both mutability/bounds/type checking built in)

#

third jvm might be where things work...

rustic vine
#

Sounds like you ought to use buffers

#

They added buffer.readbits

#

And writebits

spare quartz
#

NO WAY

rustic vine
#

Yep

#

I'm telling you luau is kinda balling. I just wish the new typechecker was better and string requires would be settled on

#

Oh and I hope we get an actual package manager

spare quartz
#

the first jvm was written like

#

almost 3 years ago

#

so all i had back then was like string.pack/unpack 😭

rustic vine
#

LOL

spare quartz
#

never got real Long support too cause

#

everythings a double n all (and idk how to write bignums)

rustic vine
#

Buffers change a lot

#

Since shilling sci hub in that new channel wasn't effective I'll shill sci hub here

#

It's awesome stuff

spare quartz
#

what new channel

rustic vine
#

Idk it showed up at the top of my channels list here

#

#science

#

Idk why it's there

spare quartz
#

oh those

rustic vine
#

Suggested channels

#

Wth is that

spare quartz
#

idk why they didnt just make more interest threads

rustic vine
#

Cooked

#

But I'll just shill sci hub here instead then

spare quartz
#

actually just reminded me

#

first/second jvms used simulated overflowing in order to remain within the jvm specification...

#

read/writebits might make me not have to do that!!

rustic vine
#

Yea they overflow as you'd expect

#

I know cause um

#

Yea...

spare quartz
#

🤨

spare quartz
rustic vine
#

yea..

#

cython is super cursed

spare quartz
#

HUH

#

WTF IS HE DOING HERE

rustic vine
#

I mean tbf the java JNI stuff is just as cursed

#

that stuff is absolutely awful to write

#

and maintain

#

and

#

do anything with

spare quartz
#

very true

rustic vine
#

in JS

spare quartz
#

😭

rustic vine
#

don't worry

rustic vine
#

cause jobjects are so annoying to work with on the c side

spare quartz
#

gonna be so honest i actually ran into the same issue with the lua jvms 😭

rustic vine
#

huh

spare quartz
#

granted its easier to work with since it's lua but objects are so opaque (like strings for example, you have to index at least 7 tables to get to the content of one)

rustic vine
#

im curious actually how was perf on them

#

well ok wait

#

step back a bit

spare quartz
rustic vine
#

just a jvm right

#

so you feed it bytecode

spare quartz
#

i never did any instruction speed tests on them without running into an error down the line due to corruption/hitting an unfinished block

#

despair

spare quartz
#

yeah heres what prepares a CLASS method for execution

#

(.CreateBufferStack is just a buffer w/ a cursor)

#

and heres the execution part

rustic vine
#

varargs being on the stack

#

the geniusness of this cannot be understated

spare quartz
#

yeah i was abt to comment on that

#

probably modified during testing

spare quartz
rustic vine
#

I think you have an unhealthy obsession with while task.wait() do

spare quartz
#

no its normal pwomise

rustic vine
#

embrace the heartbeat connection instead

spare quartz
#

#

:x

full berry
#

what r u working on

spare quartz
#

this is old code im just sending over cause its interesting to look at again

rustic vine
#

👍

spare quartz
#

gonna be honest the reason i wrote jvm 2 was cause i wrote a class file reader for fun

#

then decided to spend my weekend on writing another jvm for it

rustic vine
#

I've been following a lossless luau parser written in luau's progress recently

#

its whole point is to be super fast

#

super cool project I think you'd be interested

spare quartz
#

heres what im actually working on (separate)

rustic vine
#

sorry was finding the link

pastel tinsel
#

huh

spare quartz
#

CENTRAL STANDARD TIME?

rustic vine
#

LOL

#

but yeah its super neat stuff

pastel tinsel
#

oh that’s cool

rustic vine
#

and its fast

spare quartz
rustic vine
#

lol

#

it crashes luau-lsp

spare quartz
#

i can relate

rustic vine
#

they haven't pushed local changes for a while though

spare quartz
#

😭

#

~30 lines for a constant pool in lua and 361 for one in ada.....

#

then again the one in ada is consolidated

rustic vine
#

ok that casing has to be a crime

#

what is that

#

I think any other choice would've been more sensible

spare quartz
#

its a good name, sir 👍

rustic vine
#

readu8, read_u8, ReadU8, readU8, Readu8

#

nvm some of those are bad too

#

the first 2 are good

spare quartz
#

readU8 🤢

rustic vine
#

lol

spare quartz
#

ughhh theres so much stream protection in this jvm i kinda wanna turn into its own library

#

but idk when i'd use it

spare quartz
#

fixed 👍

rustic vine
spare quartz
#

🤢

#

scripters for safety critical games 💪

spare quartz
#

code didnt error on the first try 💪

#

hell yea

spare quartz
#

oops

spare quartz
spare quartz
spare quartz
rustic vine
spare quartz
#

i love debugging

rustic vine
#

whole lotta text

spare quartz
#

i had to do away with the timers cause they were just too extreme

#

application does 600 class files in under 100 ms eyeballing though

timid quartz
lavish dove
#

mine is 10.0.0.1

#

well my old one was

spare quartz
full berry
#

nyo??

spare quartz
#

not bad even though this includes IO/print time too

spare quartz
#

crying rn

lavish dove
#

lmao

spare quartz
#

6 unique errors to go through

spare quartz
#

i love ada code

#

I FINALLY FIXED IT ALL

#

HAHAHAHHAHAA

full berry
flint belfry
flint belfry
spare quartz
#

RICH

flint belfry
spare quartz
#

ASS

flint belfry
#

im not

spare quartz
#

5 billion dollars

flint belfry
flint belfry
spare quartz
#

5 billion

#

THEY MADE THE CHINESE GUY BLOW UP?

flint belfry
#

WHAT

spare quartz
#

therees this guy anmed Chinese in this scp sl server and

#

we convertedf him into a chaos insurgetn and he had a pinkl cand y (makes youo blow uip)

flint belfry
spare quartz
#

nya

flint belfry
#

EW

#

EWWWWWWWWW

spare quartz
#

:3

flint belfry
spare quartz
#

rust app try NOT to use these two words

rustic vine
spare quartz
#

scp-079s name that round was literally just chinese text

rustic vine
lavish dove
# flint belfry

I also stole a traffic light it's so great how simple they are to take off the rope young

spare quartz
#

they're massive 😭

#

how

flint belfry
#

that is an image from my local technology store

#

i did not steal a traffic light

lavish dove
#

Oh

spare quartz
#

yaeh kade bought one

#

with his 1 billion dollars

lavish dove
#

I mean it's 3 lights maybe a heater and a painted plastic/metal cast shell

flint belfry
lavish dove
#

Can I have a million

spare quartz
flint belfry
#

I AM NOT THE FUCKING MONOPLOY MAN

#

I AM NOT RICH

#

I AM BROKE

lavish dove
#

GitHub said my student id was worth jack shit

spare quartz
#

weird

#

i submitted my school email and it was accepted fine

flint belfry
#

what do you get with github edu

spare quartz
flint belfry
#

like

spare quartz
#

For example you can own the entire professional intellij line of apps for completely free

#

Usually thatd cost like a few hundred dollars a month

flint belfry
#

i have no idea what tha tis 😭

#

oh

spare quartz
#

Probably other vendors who support it too

#

Idk all of them though

spare quartz
#

q``````````````````````````````

#

woah

#

i didnt know i had those in my messages

proud creek
#

`

proud creek
spare quartz
proud creek
#

what does that mean

spare quartz
#

i hate writing code

proud creek
#

so real

spare quartz
#

trying not to think about the other thing happening in my life rn though so

#

its all i got

proud creek
#

oh

spare quartz
#

made it work up to JDK 6

#

but i think its starting to suffer from memory problems with 17,145 classes

#

or maybe its an I/O issue

#

yeah def an I/O issue

#

JDK 7 time

spare quartz
#

7 constant pool entries done, just need to do attributes... but first, an alignment test

#

hell yea

#

perfect run

spare quartz
#

8 SODA CAN ROBBERY COMPLETEEEE

lyric mesa
#

it's very simple to make someone ragdoll in qserf
require(game.ServerScriptService.functions.get_character)(workspace.Real_N3bu14).effects:set({{effect_id="ragdolled",stack_count=1,strength=1,created_at=os.clock(),source={kind="unknown"}}})

#

(no you cannot do it with humanoid.platformstand)

spare quartz
#

admin abuse alert

#

🚨

lyric mesa
spare quartz
#

unconsenual ragdolling is a violation of california penal code 502.1 subsection 59A

timid quartz
timid quartz
spare quartz
spare quartz
#

im free

#

one part where ada makes it 1000 times easier than the lua counterpart

spare quartz
spare quartz
rustic vine
#

Allocates 63 keys in a map?

#

That are all null?

rustic vine
spare quartz
#

no that's matching for if Frame_Type is within that range

rustic vine
#

Oh huh

spare quartz
#

this is a variant record declaration (the case x is) which allows us to set different fields for different discriminators (Frame_Type here)

#

finished version of that recrod

rustic vine
#

Oh how interesting

#

So it's like a switch with match expressions

spare quartz
#

yeah

#

you can put fields above the case for fields whichll be present for every discriminator

#

or add a when others => branch which acts as a default for nothing matching any of the specified branches

#

(all cases in ada must be matched by a branch, or there must be an others branch)

spare quartz
#

i prefer that over this

proud creek
#

Oh yeah that looks much better

spare quartz
#

impl time

timid quartz
#

like adding to front is O(1) since you just make a new head and point it's next pointer at the old head

#

vs an array where you have to shift every other element

spare quartz
#

oh i never think about using arrays for dynamic structures

spare quartz
#

even if they're "heavier" memory-wise

timid quartz
#

well that was just one example

#

sometimes a linked list just lends itself more logically

spare quartz
#

also holy shit my specification is 750 lines long

timid quartz
#

like for example for the constant pool resolution idea that I had, I tried to use an array of linked lists

#

I did an array because there's only so many entries in the constant pool and you can make a fixed size array

#

but it's harder to tell how many other entries are gonna reference a given entry

#

so that's why I did the linked list part

#

so editing it would be way more flexible

spare quartz
#

i threw an Indefinite_Vector with some accesses in it as a solution for mine, i think that's something like a linked list internally

#

alsot hats a bunch of types

#

this is gonna be such a pain

spare quartz
#

what version of the JDK are you basing off again

#

6?

timid quartz
#

6

#

I need to go back through and redo the pool resolution

spare quartz
#

it took me a bit to figure out mine since there were holes in it at first

#

i went with storing complete stuff first in the map, then ran through everything in incomplete map using a special variant record with just indices

timid quartz
#

my idea is the array of linked lists

#

each array index represents a possible index being referenced

#

if we detect an incomplete reference, we do stuff[wanted_index].append(index_that_wants)

#

although honestly what I need to do is use pointers in the struct rather than copying by value

spare quartz
#

oh yeah thanks for reminding me

#

apparently zig aliases all arguments by default?

timid quartz
#

wdym

spare quartz
#

you know what the aliased prefix is in ada right

timid quartz
#

no

spare quartz
timid quartz
#

ahhh

#

so zig shoves all the args in memory by default

spare quartz
#

heres godbolt showing the difference

#

i still don't fully understand it but basically compiler has to do extra work

#

:<

timid quartz
#

lol

spare quartz
#

apparently they've had a PR to add documentation for it since 2018

#

sorry not a PR

#

just the issue

spare quartz
spare quartz
#

it appears to be a problem stemming from llvm

rustic vine
spare quartz
#

i blame you

rustic vine
#

You got me

#

re: linked lists, I find myself using std::vector almost exclusively in cpp, because the other stl containers are just so terrible

spare quartz
#

dude

#

i think math people are a buncha nerds

spare quartz
#

Unsafe Rust is like C in some ways, but there are tricky rules that unsafe Rust has to follow that don't exist in C. C also has some tricky rules of its own. This is a talk about some of these differences, particularly when it comes to pointer aliasing. I've gone through the autogenerated subtitles and made lots of corrections, so hopefully the ...

▶ Play video
spare quartz
spare quartz
spare quartz
#

til
rust users hate zig users and vice versa
rust users are also c haters but zig users are c lovers

timid quartz
spare quartz
#

💔

#

rust copied our (A => 5, B => C, others => <>) syntax

timid quartz
spare quartz
#

i knowww

#

thats basically the equivelent though

#

ive made misalignment

timid quartz
#

teehee

spare quartz
#

unfortuantely idk how

rustic vine
#

blame cosmic bit flip

#

and move on

spare quartz
#

lot of bitflips today

rustic vine
#

must've been that solar flare

#

nevermind. I blame california for being on fire

rustic vine
spare quartz
#

i didnt watch that video i just sent it here for later viewing

#

what was ini t

rustic vine
#

ubsan asan doing nothing about it is a little scary, as he says

#

cause it is UB

rustic vine
#
#include <stdio.h>

typedef struct {
  int x;
  int y;
} Foo;

int f(Foo* foo1, Foo* foo2) {
  foo1->y = 42;
  foo2->x = 99;
  return foo1->y;
}

int main() {
  int arr[3] = {0};
  Foo* foo1 = (Foo*)&arr[0];
  Foo* foo2 = (Foo*)&arr[1];
  int output = f(foo1, foo2);
  printf("OUTPUT: %d\n", output);
}```
#

what do you think this prints?

spare quartz
#

looking at it gives me a headache

#

so no idea

rustic vine
#

LOL ok

#

I'll save the summary of that video for when you want to figure that out

#

cause thats essentially the entire video

#

the guy likes drinking water

#

too

spare quartz
rustic vine
#

its a pretty cool video though

spare quartz
#

OUTPUT: 42 ?

#

huh yeah

#

somethings really getting messed up

rustic vine
spare quartz
#

outside of arr?

#

Foo is 8 bytes long on a standard 64 bit system, arr[3] (which i assume means 3 bytes)...

#

xxxxy[yyy]
^
outside

rustic vine
#

its an int array

spare quartz
#

oh

#

oh i totalyl missed that

rustic vine
#

lol

spare quartz
#

im not familiar with this syntax (Foo*)&arr[0]; what does it do

rustic vine
#

oh

#

hes here

timid quartz
#

$5

spare quartz
#

yeah i have one in frront of me

#

silly

rustic vine
#

raspberry pi at a sensible price??

#

unbelievable

spare quartz
#

i plan to make mine a bluetooth dongle but thats for later

rustic vine
#

I would buy the pi 5 if I hadn't bought like 4 orange pi 5s when pis were outta stock

rustic vine
spare quartz
#

... so a null pointer

rustic vine
# timid quartz 99?

the funny thing is ||its both 99 and 42|| (thats the answer btw atp, if you don't wanna see it yet)

#

||its 99 with no optimization, 42 in O3||

rustic vine
#

its just a pointer to the beginning of the struct in memory

#

or, thats what its treated as

timid quartz
spare quartz
#

you guys dont need to censor it i dont care about spoilers

rustic vine
#

alr

spare quartz
#

i knew something about the sizes would cause misalignment and aliasing of some bytes but

rustic vine
spare quartz
#

im not the greatest at C

rustic vine
#

instead of reading the pointer again

#

which is why its 99 with no optimization

#

and 42 in O3

#

idk about O1/2, prolly the same thing?

spare quartz
#

o1 does 42 yeah

rustic vine
#

yep

#

essentially c compilers have a rule that you cannot read and write to separate objects unless you know they are either distinct types (completely disjoint in memory) or they are the exact same object

#

that rule exists so that it can make that optimization

#

so it assumes foo2->x = 99 cannot possibly have effect on foo1

#

so the return just becomes mov eax, 42

spare quartz
#

weird

rustic vine
#

yeah, its interesting

rustic vine
#

thats not in any spec though, so only gcc and clang have it

spare quartz
#

also hold

        Checking .\classes\classes007_080\com\sun\xml\internal\messaging\saaj\soap\impl\HeaderImpl.class ...FAIL. 2382785355
rustic vine
spare quartz
# timid quartz Ahh gotta love O3

I am once again begging C++ twitter to stop using Ofast

Quoting wang (@wangzhr4)

It turns out that compilers matter really a LOT.

For the very same code and optimization level, Clang built a extraordinarily performant executable while GCC's outcome was way slower (see the highlighted time-elapsed).

Maybe, it's time to set Clang as my default.

#

read something similar today

#

this was Ofast though which is much more aggressive

rustic vine
#

oh, body?

#

like analogous to the cpp committee?

spare quartz
#

like ANSI

rustic vine
#

yeah ANSI C

spare quartz
#

oh cool

rustic vine
#

Ofast allows the compiler to violate the C standard iirc

spare quartz
#

It turns on -ffast-math, -fallow-store-data-races and the Fortran-specific -fstack-arrays, unless -fmax-stack-var-size is specified, and -fno-protect-parens

timid quartz
#

Didn't think so

#

It's GNAT not CNAT

spare quartz
#

uh nuh uh

#

apples to oranges

timid quartz
#

gcc is just better

spare quartz
#

i think aera has a brain worm

timid quartz
#

clang is just a frontend for LLVM

spare quartz
#

🧠

timid quartz
spare quartz
#

tbf

timid quartz
#

gross

#

use your own codegen

spare quartz
#

WE DO

#

its called gcc

timid quartz
#

I KNOW

spare quartz
#

ugh!!

timid quartz
spare quartz
#

why dont YOU use your own codegen

#

mr crabby patty

spare quartz
timid quartz
#

gross

spare quartz
timid quartz
spare quartz
#

gcc rust 😁

timid quartz
#

I can't wait for when zig eventually does

spare quartz
#

(coming in... actually not that long)

timid quartz
#

wait fr

spare quartz
#

yeah iirc GNU is working on supporting rust

timid quartz
spare quartz
#

heres this project if its of any interest

timid quartz
#

who needs IR

spare quartz
#

make your owen compiler ...

#

for cs..

timid quartz
#

I WILL BE

#

IM IN A COMPILERS CLASS RN

spare quartz
#

rmn.. do it..

spare quartz
#

this feels interesting

#

in ada its just type Positive is Integer range 1 .. Integer'Last; but

#

theres no way of doing the bounds skip like in new_unchecked

#

unless you formally verify with SPARK that it can't be broken

timid quartz
#

(The actual implementation in std uses an unsafe block)

spare quartz
# timid quartz

i think this is cool that you can define your own restrictions like that through coed

#

but it still leaves an entry point with unsafe

#

i suppose the same argument could be made with ada using Unchecked_Conversion

#

but that'll still fail when the bounds goes to check it

timid quartz
#

If you’re able to handle the unsafe ops correctly then your entire function doesn’t have to be marked unsafe

spare quartz
#

just irks me a little

#

god i took too much sugar

timid quartz
#

Notice how main isn’t unsafe

#

And if you try to be funny…

#

That’s basically the thing that happens when Ada’s Unchecked_Conversion fails

spare quartz
#

i just don't like the existence of new_unchecked in general

timid quartz
#

It’s just a super lazy way around the unwrap

spare quartz
#

i wonder if there'll ever be a possibility of unsafe being removed from rust ever

timid quartz
#

Even the compiler kinda discourages you from using unsafe blocks so I really doubt anyone would use new_unchecked

timid quartz
#

The goal is to make safe wrappers around unsafe stuff

spare quartz
#

... again ... short sighted

#

i know the ada way of checking everything at every step of the way isn't too applicable to the rust thought process

#

but there must be some way to do those operations while keeping program integrity

timid quartz
spare quartz
timid quartz
#

Letting the programmer know “hey you need to know what you’re doing and the program’s integrity relies on you here”

timid quartz
spare quartz
#

it really matters on how you crash

timid quartz
spare quartz
#

i'd assume rust is on par with ada even during unsafe ops where it recognizes a problem and panics instead of whatever C does

timid quartz
#

I can’t speak to other parts but

#

I’d imagine in most situations rust will panic

spare quartz
#

i think i'm just on another uh

#

whats the word

#

philosophical debate instead of a solid problem

timid quartz
#

There are ways to make rust just segfault normally and I’m sure you can do that with ada too but you have to really go out of your way

timid quartz
spare quartz
#

its almost like the exception v data argument we had a bit ago

timid quartz
#

I wonder if there’s a way to program a Teensy 4.1 in Ada

spare quartz
#

except in reverse

spare quartz
#

i was looking at the alire index and we've actually got a nice little embedded HAL set of libraries going

#

looking thru an ada journal from 2012

#

looks like someone got it working with the AVR set of compilers

timid quartz
#

Hmm

#

How does one set that up

spare quartz
#

alire toolchain --select

#

itt

#

looks like the teensy 4.1 uses an arm cortex m7

#

so youll probably find use out of this alire crate

spare quartz
#

oops

#

should've highlighted 4.

#
  1. might be useful too
timid quartz
#

Me when I use gcc-avr and compile c

spare quartz
#

avr-gcc*

timid quartz
#

Die

spare quartz
#

:<

spare quartz
#

okay lesson learned

#

'Input in aggregates MAY NOT be in order

#

perfect

#

just gotta do annotations

#

also im not sure how but this is telling me its performing doubly as well as it was with java 6 code

#

... ;3

#

reading the JVMS 7 date as 2013

#

i might have an idea on what to do

spare quartz
#

LETS GOOO

spare quartz
#

publishing it to the indxe rn

spare quartz
#

its over

timid quartz
spare quartz
#

i got it resolved

#

:3c

timid quartz
spare quartz
#

DIE

#

now this is the real nerdy stuff

#

HOORAY

#

ada is now 1% java

spare quartz
#

*At the time these lines are written and from the perspective of AdaCore, A&D is still the largest consumer of Ada today and covers about 70% of the market. *

#

man it really IS a mic language

#

(a&d is aerospace & defense)

spare quartz
timid quartz
spare quartz
#

they're pracitcally the only competitor and willing to keep it that way

#

but if they ever disappeared things would be fine

spare quartz
#

TIL

#

macos does not support 128 bit floats

rustic vine
spare quartz
#

this is trrue

rustic vine
#

disaster

spare quartz
#

💀

rustic vine
#

they have links to the top secret stuff?? wow, please share on war thunder forums

#

wow you can even make a bridge with ada

#

don't tell civil engineers this

spare quartz
#

what is an assault bridge though

#

do you hit people over the head with it

rustic vine
#

I think so. It's heavy

#

heres what im thinking of

spare quartz
#

some of the links are broken due to age

#

but this is still up

#

frrom 2007 👍

#

ADA AC!!!!!

rustic vine
#

HVAC and CAD, which is it? make up your mind

spare quartz
#

Byron Informatik is dedicated to software development and consulting for engineering companies in the HVAC (Heating Ventilation and Air Conditioning) sector and for companies doing facility management. Its clientele are from companies around the world, including from Germany and Switzerland, and will soon include many more European countries.

#

so the program itself is CAD but tehe company does HVAC

rustic vine
#

the only CAD I know is computer aided design

#

what CAD are we talking about here

spare quartz
#

3d printed ac tubes

rustic vine
#

huh

#

and what exactly does CAD stand for

spare quartz
#

cats are da coolest

rustic vine
#

oh ok

spare quartz
rustic vine
#

great, it just says CAD everywhere

rustic vine
spare quartz
#

this article is from 1999 as far as i can tell so

rustic vine
#

what in the world is HVAC CAD

spare quartz
rustic vine
#

computer aided design for hvac

#

prolly actually, that sounds sane

rustic vine
spare quartz
#

just talking about the integrity of this source

#

i cant be certain if any of the information is still applicable

rustic vine
#

Beware of bugs in the above code; I have only proved it correct, not tried it.

spare quartz
#

*In the near future, the application will be ported to other Unix workstations and PCs using Solaris. *

#

they did not add more favorites

timid quartz
#

using tractor

spare quartz
#

keep your grubby paws off my Ada.

timid quartz
spare quartz
#

😭

timid quartz
#

the mascot

spare quartz
#

im talking about the correction crabs for brains

timid quartz
#

yeah and

#

rustaceans don't have paws

spare quartz
#

so you’re all crab furries????

#

also im so mad looking at the server membership count for rust

#

12,600 people 😭

#

meanwhile the adacore gap server has like

#

… 40

#

MEOWWW

#

MROWMEOEMROWMOEMWW

timid quartz
#

nonexistent community

spare quartz
#

nuh

timid quartz
#

succumb to the rust mind virus

spare quartz
#

it’s just that

#

900 year old Ada programmers hate or don’t know about discord

#

😭

timid quartz
#

yeah they're all on mailing lists

#

you should program in more rust though...

spare quartz
#

join us on comp.ada 💪

spare quartz
#

how many crates have you made btw

timid quartz
#

uh like

#

1

#

lmao

spare quartz
#

wh

timid quartz
#

and it's not really maintained

spare quartz
#

:<

#

what is it

timid quartz
#

most of my stuff are executables and not libraries

spare quartz
#

I’ve got a whole chain of libraries i wanna make

spare quartz
#

Ohhhh

#

Yanked

timid quartz
#

yeah I pulled the 0.4.0 version

spare quartz
spare quartz
timid quartz
#

idk I wanna get better support for the normal stuff

#

but there's also this

spare quartz
#

Right

timid quartz
#

but to do either...I actually have to work on it

#

which...I haven't been

spare quartz
#

Forgot there’s like 5 billion rust devs making everything.,,

#

Mmm

#

I should make a line up of API stuff for Ada…

#

Actually no idk how id do that very well

#

Since… GNAT.Sockets…

timid quartz
#

well

#

you have the http thing

#

just use that

spare quartz
#

And I’d imagine depending on AWS would be massively heavy

spare quartz
#

Not whatever you guys have

timid quartz
#

I mean

#

it gets down to that at some point too

spare quartz
#

I also have to finish my TLS implementation

#

Since it’s got up to the encrypted negotiation part of which idk how to program

#

Byteflippers, checksum, file_format_java_class…

#

Mmmm … JVM or ZIP reader….

#

I’m looking at what you guys have for JVM stuff

#

Not very good results :<

timid quartz
#

I mean

spare quartz
#

I would search on GitHub but I can’t on my phone rn

#

This is interesting

timid quartz
spare quartz
#

Last update was 6 yrs ago though

spare quartz
timid quartz
#

no update necessary

spare quartz
#

You can’t be feature complete with class files though

#

There’s a new JVMS every 6 months

#

Unless you plan to stick with SE 11

#

I can’t see the code but hopefully it has versioning limits

#

More modern

#

Different philosophy though

#

This reminds me

#

Need 2 make a static analyzer for bytecode to ensure correctness

timid quartz
#

kinda busy

#

not a lot of programming ideas in general

spare quartz
#

Unfortunate

timid quartz
#

Not really any motivation lol

spare quartz
#

I’m hitting a lot of complexity walls personally where I’m overestimating my ability

#

At least I’m learning through it though

spare quartz
#

The urge in the back of my head telling me to write a Java compiler

spare quartz
#

Rust lets you do efficient reference-counted strings and dynamic arrays using Arc basically just as easily as their owning (and deep-cloning) equivalents, String and Vec respectively. So why not use them as a reasonable default, until you actually need the mutability that String and Vec provide? Get into the weeds with me here, feat. some cool v...

▶ Play video
spare quartz
#

blazingly fast

timid quartz
spare quartz
timid quartz
#

ugh dm me

spare quartz
#

AAAAA

timid quartz
#

read first idot

spare quartz
spare quartz
spare quartz
#

class reader can apparently function in embedded environments!

#

okay so its an issue with misalignment in lvt

#

thats not good

spare quartz
#

(he's gonna use lwjgl! a prebuilt game library!!!)

flint belfry
rustic vine
#

been doing some research into color stuff and found oklab, it's super cool because its designed to be a perceptually uniform color space

#

also thinking about the best way to pick a sequence of colors that are perceptually as distinct as possible from one another

#

to me theres essentially 2 different design goals, I either want a sequence of N colors, or I want to be able to continuously generate colors (arbitrary N)

#

stack overflow seems to think, if N is small enough, the best bet is just a hand-picked list of colors, lol

#

and otherwise it links like 4 research papers into this topic - didn't expect it to be so hard to pick distinct colors

#

if anyone has any ideas or prior research/experience with this topic, would love to hear from u

spare quartz
#

mnan

#

it is difficult to get a connection up

rustic vine
#

agreed

wintry fable
# spare quartz (he's gonna use lwjgl! a prebuilt game library!!!)

Tbf, that's mainly a binder to OpenGL, though the audio system was basically just a random library he found and used, and ofc he's using Java which is pretty high level, it doesn't even compile to the machine, it compiles to its own wack-ass interpreted intermediate language

#

Java's weird

spare quartz
#

:<

spare quartz
#

dont insult my baby language

rustic vine
#

All interpreted languages do this

#

Java is weird for other reasons

spare quartz
#

but lwjgl is a composite of libraries, lemme get the binder it sues

#

also i just realized you're gm... welcome back... again

rustic vine
#

Idk who u are sorry lol

wintry fable
#

Yes it is I, I don't really play Roblox or do stuff in it at this point but DT invited me to a project and I decided why not join QS

rustic vine
#

Who's DT

spare quartz
wintry fable
#

DTrainsMan, FAAS guy

rustic vine
#

Well hi

rustic vine
spare quartz
spare quartz
rustic vine
#

Oh ok

spare quartz
#

i think its a intercom/vox thing

wintry fable
#

The voice announcements

#

Like the DMR ones

#

He voiced that

#

Unless they changed it

rustic vine
#

Oh ok

rustic vine
wintry fable
#

Yeah

rustic vine
#

Luau has its own bytecode too

wintry fable
#

Though Java just doesn't act interpreted I guess, you still need to compile it n such

#

Yeah

spare quartz
#

it is interpreted yes

rustic vine
spare quartz
#

most JVMs have a just in time compiler for performance though

rustic vine
#

You have to do that for all interpreted languages

wintry fable
#

Yeah

spare quartz
#

but how fitting... im working on a component of one right now

rustic vine
#

You have to compile luau to bytecode too

wintry fable
#

Very nice

#

And yeah ik, I've seen some of that

rustic vine
#

I'll send an example

#
local N = 64
local arr = {}
for i = 1, N do
  local function a()

  end
  arr[i] = a
end

local eq = true
for i = 1, N do
  if i ~= 1 then
    if arr[i] ~= arr[i - 1] then
      eq = false
      break
    end
  end
end

print(eq)

would yall expect this to print true or false?

spare quartz
#

false since all functions are inherently different

#

unless they changed something with dupclosure you're talking abt

rustic vine
spare quartz
#

neat

rustic vine
#

But in O1 it's able to tell a doesn't capture any upvalues

#

So it emits DUPCLOSURE instead, reusing the same closure

#

So all the references end up being to the same function

spare quartz
#
local function a()
   print(N)
end

so i'd imagine this variant of a would not be copied?

wintry fable
#

Honestly I do really like Luau, just having typing makes things way nicer to use

#

I also quite like LuaJIT's optimization features though

rustic vine
spare quartz
#

oh i just used N cause it was the first variable i saw

#

didn't consider mutability

rustic vine
#
local function a()
   print("hi")
end

This would still get DUPCLOSURE

rustic vine
#

So N would also be a new closure

rustic vine
wintry fable
#

Huh neat

spare quartz
#

test

wintry fable
#

I've mainly been messing around with this language called Nelua recently

#

Funny Lua-style language that compiles down to C

spare quartz
#

ugh god this is miserable

wintry fable
#

Switch statements, structs, and typecasting in Lua, funni

rustic vine
#

100_f32 is cool

#

I used to use a units library in cpp that did 10_m for 10 meters

wintry fable
#

Oo nice

#

Could prolly set that up in Nelua as well, it's got a really neat preprocessor system

spare quartz
rustic vine
#

and you could do like

meter_t m = 10_cm```
#

and m would be in meters

rustic vine
spare quartz
#

the word is ada

rustic vine
#

does ada have that?

spare quartz
#

yes