#š½Programming Chat v2
1 messages Ā· Page 22 of 1
rustrover
actually
I lied
vsc is good too
I don't use rust don't take my word for it find something you like
I just be forwarding info from other people
oh interesting, thats neat
I imagine patterns from cpp don't really carry over though
probably makes using them a little
unconventional
(Full) C++ support isnāt mandated by the specification
GNAT does allow its convention though
huh
but hey
we beat rust to supporting C well 19 years early 
Actually I wonder how linking to stuff like a steam.dll will work
you also existed a solid 30 years earlier
Trueā¦
Iām gonna need to figure out how to achieve conditional compilation
Since uhh
Linux linker do not like windows function
rust has that :33
Modeling Conditional Compilation in Ada (GNAT Userās Guide for Native Platforms)
we do too bub
I just donāt know how to use it yet
Ugh my cat is so stupid
yeah you are stupid
NO
well if your lang and tooling had like...actual decent docs
if your docs were decent you'd have learned smh
We donāt
Legacy
ur mom
literally states that itās GNAT only and itās for legacy transition
ugh⦠go back to being a CRAB with safety issues
there's nothing as permanent as a temporary fix
Well I mean tbf
We also donāt have the type of updates you guys get where the devs can make it whenever they want
Ada has to go through a ton of standardization before an update can be made
Thatās why the average time between updates is⦠a decade
š
I hope you become one!!!
Then rust 1 can never release
Mwhahahhaha
Woahhhh what
is separate;
reminds me of kotlins expect
mfw rust 1 has already released
WHEN
procedure Insert is separate;
ez pz
One thing I dislike is how Ada doesnāt just have like
Reliable OS detection built in
(Programmatically)
Sure you could just use an alternative unit but like, if you donāt wanna, you gotta do like case System.Directory_Separator is ā¦
Or read an env variable
L
you
Just use better labels smh
mrow
coudlve been fix in th time it took them to write that error message lol
time to find out why this is erroring
GetLastError isnt giving me a code weirdly enough
What are you making in Rust anyways
your CLASS reader
Ah
but i wanna make a window through the win32 api first
?
oh that
i just got it from twitter
some post about rust error dx
ada š
oh ic
The error dx is quite good isn't it
its OK...
mhm right name one lang with better error dx
Nah that dx is kinda bad
:<
And if you get a runtime error it's worse
naw
our runtime errors are descriptive *
mmmmm i wanna look into our exception restirction pragmas more
pragma Restriction (No_Exception_Propagation) is interesting
Show an example
Mmmm nah
uhh lemme just
use std::fs::File;
use std::io::prelude::*;
fn main() -> std::io::Result<()> {
let _file = File::open("nonexistent.txt")?;
Ok(())
}
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
idk i kinda find this one better
actually hold on
if I change the ? to .unwrap()
thread 'main' panicked at src/main.rs:5:47:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at src/main.rs:5:47:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
0: rust_begin_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
1: core::panicking::panic_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
2: core::result::unwrap_failed
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/result.rs:1700:5
3: core::result::Result<T,E>::unwrap
at ./.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1104:23
4: playground::main
at ./src/main.rs:5:17
5: core::ops::function::FnOnce::call_once
at ./.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
yeah and like
you don't need the entire trace normally
so you can just turn it on if you want it
does it show backtrace in DLL files
idfk
in this, where the error happened in your code is more hidden
like you have to read it to find it
vs with rust it's up at the top
wdym you have to find it
except for the ??? and b__ traces (which are due to the underlying library being compiled for prod) its at the top
still gotta read more than the top line
ripperoni
okay here
man I wish phones didn't switch to esim otherwise I could pop the sim out of my iPhone and put it in my pixel
omg
it actually gave an error code
probably need pragma Volatile or something since an opt is probably interfering
Uses ada
Looks inside
CRT
art0
(the trace even tells you that the kernel is calling that, not ada)
that exists but its called ada_init instead
we have a pragma for that
no error no problems
No_Exception_Propagation
(used mainly for systems who dont support unwinding and such)
iirc theres also just
a pragma for no exceptions at all
Exception-related restriction:
12/5
No_Exceptions
Raise_statements and exception_handlers are not allowed. No language-defined runtime checks are generated; however, a runtime check performed automatically by the hardware is permitted. The callable entity associated with a procedural_iterator (see 5.5.3) is considered to not allow exit, independent of the value of its Allows_Exit aspect.
Immediate_Reclamation looks interesting
This ain't JavaScript lmfao
Calling C(++) code be like
like i dont get it
how does the class register fine
but the window just goes nope
Have you considered that the computer hates you
im gonna make this return the error string though
better than using C.....
Have you tried using a library
like what
Perhaps your records are not in the correct endianness
no they def are
if they weren't, Structure_Size/Window_Procedure/Menu_Resource_Name would be incorrect
and i'd get an incorrect parameter error
hope this works
oops
Buffer should actually be Buffer_Pointer : System.Storage_Elements.Integer_Address; since it's overwritten to a ptr
OHHHHHH
NO WONDER LD WAS THROWING A FIT
awesome
not quite
Format_Message will allocate a buffer for us, it's internal Buffer_Size is the minimum size for that
OUR buffer_size is then set from the output of Format_Message used to determine the length of Error_String so we know how much to read off from To_Address(Buffer_Pointer)
the error string has an extra \n\0 which we ignore by subtracting 2
i know what im doing surprisingly enouggh!!!
NOT CAP
Bet
oh yeah
okay, the program executed everything perfectly
i just didnt process CONFIRM_CREATION/NCCREATE
there we go
:3
\
oh yight
it's 01/03/2025
mmmmmm okay how much do i wanna overwork this
smh ok
- glorified echo
- parse date too
Just write a giant if-else
set -e
import datetime
if alr build fails it terminates the entire line
i have another line which has gnatformat before alr build but it takes SO long to run
ewww accessibility
rustfmt :3
suboptimal.
so many events
there
actually
im in Ada_2022
can just use Enum_Val
YOOOOOOOOO
BEST WINDOW EVER
wind ow
So much for your 30+ year old compiler being stable
i mean
it detected the bug did it not
the faulting line as an Ada 2022 feature of []
so i just made a uint
p.s.
gcc has a LOT of bugs
ITS WORKINGGGG
what are you trying to do, visually display a CLASS file?
this is my own personal ada project
......no
why
rust :3
just a few
with a pencil silly
their mistake
incremental compilation be like
well
if you have just the one file
incremental compilation doesn't do much
cause it recompiles that whole file b/c of the change
where do u get ur docs for java 6 class files
4.0
the structure for CLASS files is chapter 4 in all JVMS
1 is intro, 2 is the bg of the jvm, 3 is compilation (iirc), 4 is class files, 5 is opcodes
are you kitten me
bro says this but immediately I see a half-byte followed by three quarter-bytes
where...
LOL
least cursed java language design decision
thats
oh

wait yeah I think ur cooked brah
maybe don't use CONFUSING NOTATION
usually the number is bits
erm but
not bytes
idk who cooked that
thats pretty cursed still
u2 is a unsigned 2 bit int
in any world
other than this one
okay well you're not gonna have weirdly sized bits in a file unless you're working with like
DEFLATE
and again
prob is in java
its in the JVMS if you READ
lets be honest
its so short cmon
huh
JVMS actually leaves a note about this
10^2 is not 10e2 btw
since booleans aren't technically their own type its up to an implementer to pack their booleans or have them as octets
(they're treated as a byte otherwise)
me when I make the CPU suffer by storing them with 1 alignment
packing in arrays
but yeah bools are 16 bytes in luau
since an array's size in java is defined at it's creation, you can align/pack
Scary
u can store 128 booleans in the size of 1 by doing it in a buffer
instead
good for sending over network actually
bruh what
all values in luau are 16 bytes
honestly wish lua had more numeric types
Wait did you mean to say 16 bytes or bits
bytes
ohhh my God why
that's cursed
oh yeah there is actually 2 bad design decisions in CLASSes/JVM opcodes i wanna make clear
long/double entries take up 2 slots of whatever they're in, like the constant pool, local variables, and potentially stack
AND
these things
i hate them so much
(this is not due to them being split into those two entries, the value is fully stored within the first, the second is useless)
type erasure is kinda funny
they spent all that time to have a statically typed language just to get none of the benefits at runtime
kotlin reification save us
or can a JIT take advantage of it?
no it can't nvm
types are erased when going to bytecode
brah
they cooked
a java compiler could save a reified version of a type along with its value in a CLASS file using a private attribute
and a compliant JVM could take advantage of that
but that's all private
local true = false
local false = true
me when I reify you
reified Atp
š
just their adjacency to techbro stuff
hmm well
warp that's a fair argument cause ai and rust
ghostty ig it's only fair with zig but zig is way less tech-bro-y
ghosttys adjacency mainly comes from the creator/users of it
rather than the program itself
(i know thats a little unreasonable but yeah)
oh yeah thx for reminding me..
i need to use the window context for something...
OpenGL in ada š
kitty is also written in python so š¤¢
isnt alacritty different
alacritty is rust
naw
thinnnnnnnking
how would i move this into a task WHILE maintaining ownership of Window_Handle
cause the function won't return ever if the task is initiated by it
puke emoji
im forced to okay
then you are forgiven
-lole
Why are you doing that tho
wdym
wdym wdym
why am i doing what/why're you asking
so COM is basically like
a common binary interface for different types of systems in windows
for example, a 2D rendering system
it's based on a much older system that was made in the 90s iirc
I mean
Itās a system library
At that point the entirety of Ada is a library
Writing a device driver and shipping it with my library isnāt exactly an attainable goal
Actually yeah c'mon you didn't write all of GNAT yourself?
Actually yeah cmon you didnāt write all of rustc yourself?
oh
I need more cats!!!! Furry art of cats!ānnnnn!!!!!
Make an Ada program to scour the Internet and download one at random
Mmmmmmm but
I canāt guarantee the quality of the downloaded images
What if it gets like, pork or something
pork??
k with n
and not being able to guarantee quality is just a part of the Internet
kotlin??
AREA I HATE YOU
gg
Annnnd it was made in mode js
ewww
this was like 4 years ago
I made a thing in kotlin to scrape my saved images on Reddit
Ended up downloading like 850mb worth of omori
I should make a tool to download my twitter bookmarks
In this video we will discuss why Swift is not just an iOS app language and is not tied to the Apple ecosystem as it may seem.
Check out Yatoro: https://github.com/jayadamsmorgan/Yatoro
0:00 Intro
0:21 History
1:12 Tooling
2:16 Language features
5:03 Usage
6:08 Main downside IMO
6:33 Conclusion
TIL
there is a horizontal and a vertical scroll wheel
they are parsed differently
Took you long enough
i JUST woke up
You sure the person youāre dating is British and not Australian
yes š
its 6:20 pm here
I forgot that was a timezone
yeah ok bub
america could merge the east and west coast together and cut out the center part
and I think we'd lose approximately
1 and a quarter persons
I apologize for the dangerous command!
evil programs when they're NOT evil
heres the src of that
if you can find an UNKOWN ill be impressed
wth is this "github.com" thing
virus site
mods
holy crap i hate this langauge
its weird
@spare quartz if i hypothetically wanted to learn kotlin (hypothetically), should i learn java first
since it's
yeah
If you want you can
Helps with reading it when youāre working with java
But itās not needed
IncompleteReference { class: Incomplete(89), name_and_type: Incomplete(240) }
cool
Thx
Rust šŖ
what's a good low resource linux distro
i have a 9 year old laptop that i want to use as a mini server to host things and test shit out, but i wanna choose the correc tthing
im using debian 12, it's good but it can get slow during high loads
@spare quartz
Debian server
alpine
astro said debian is too heavy š
im using debian 12, it's good but it can get slow during high loads
I guess
I have 8 gigabytes of ram and it only uses like 60 megabytes
Just delete the window manager they are incredibly heavy
Uhhhh
Yeah arch š
I don't even know how you get Debian to be slow it's what alot of servers use
And the raspberry pie uses it too
will look into this
zig zen
sounds gay and hippie
hmmmm hmhmhhmhm
YOOOOOOO
NEW ADACORE POST OUT
š„±
Your community is nonexistent so ig this is the only thing you have to look forward to
MOV UP, ACC
JLZ LT
JGZ GT
MOV 0, ACC
ADD LEFT
ADD RIGHT
JMP SEND
LT:MOV LEFT, ACC
MOV RIGHT, NIL
JMP SEND
GT:MOV RIGHT, ACC
MOV LEFT, NIL
JMP SEND
SEND:MOV ACC, DOWN
gotta love the ~/zig-bin/bin/lib/std/fmt.zig:646:21: error: cannot format slice without a specifier (i.e. {s} or {any})
its always handy to have a taskkill on command
what were you building??
linalg stuff in a cpp project
cpp is all you had to say
LOL
cat is stepping om leyboard hold on
it was a clean build so I kinda expected it
i understand now why division is computationally expensive
Have you ever watched one of those analog calculators divide
Itās kinda neat
No
Iāve only seen the electromechanical ones
Yeah that's what I was referring to
Oh
But yeah I found out itās practically just
Long division until JLZ/JEZ and NEG to get the remainder
@spare quartz
pub fn main() !void {
std.debug.print("Hello, Zig!\n", .{});
var gpa = std.heap.GeneralPurposeAllocator(.{}).init;
const alloc = gpa.allocator();
defer {
switch (gpa.deinit()) {
.leak => std.debug.print("WARN - leaks detected\n", .{}),
else => {},
}
}
var args = try std.process.argsWithAllocator(alloc);
defer args.deinit();
_ = args.skip();
const in_path = args.next() orelse return ProgramErrors.NoPathProvided;
const file = try std.fs.cwd().openFile(in_path, .{});
var buf: [4]u8 = undefined;
try file.seekTo(0);
const magic_read = try file.read(&buf);
std.debug.print("Magic: 0x{X} ({})\n", .{std.mem.readInt(u32, &buf, .big), magic_read});
}
const ProgramErrors = error{
NoPathProvided,
};
const std = @import("std");
MY EYES HURT SO MUCH
huh why
Because I usually sleep for 10 hours at a time
gfg
gfg
golf for goobers???
it's like gg but with f
also neat, the file.read has an internal pointer
so successive calls to it increment the pointer
i love sterams,,,,,,,
neat
im using eufi again its not as bad as I remember it
still bad though
(im enjoying using it)
why the fuck is there not a enter key
I liek how it has page up and down but not a fuckin enter key lmao
?
it doesnt give me
its giving me zero
this is under Table B.4 Example Keyboard Layout
are you using the simple text proocol
the docs i have only go to b.2
oh
where tf did you find this š
and I trierd to find one too and it was null
im outdated š
put a new flash into that!!!
what version is uefi on
oh its only 3 minor versions off
sounds like a pretty big thing for enter to only be in the latest version of uefi lmao
theres no way enter just doesnt exist on the lower vers
I mean I read somewhere that the first versions of uefi didnt even work at all
so its not surprising lmao
ah it costs 3k to look at the latest uefi docs...
crazy shit
yeah now im surprised the first versions of uefi even had the name efi instead of being copied from somewhere else
looking more like a cash scam to get money out of companies now like hdmi instead of an actual standard
I think it was interesting
@pastel tinsel ok i take back everything bad i said about ubiquiti i am throwing money at this company
https://www.youtube.com/watch?v=pz2HtmQN6ok
Weāre excited to announce UniFi Access 3.0 and a new series of G3 Access Readers that allow you to unlock doors with a tap of your iPhone or Apple Watch.
Learn more: https://store.ui.com/us/en?category=all-door-access
l o l
There is a reason why I have a lot of their products
At least 2k spent though
im gonna probably invest too
the issue is (and i really hate this) my router is celluar meaning it gets its traffic from a sim card
yeah it is better to have coax or fiber with that kind of stuff
especially if you are going to be hosting things
or get a simple unifi express
jdk 1.0.2 from 1996

the applets in it still work too
a tiny bit old
but the disc folder has a bunch of non executable 16-bit apps
yeah but it requires a WAN plug I don't have one where i live
coaxial connection, like having your internet be through a DSL
my dad's house is elligible for 5G/optic but he lives abroad
i could ask him to pay
maybe idk
oh i see
@flint belfry @pastel tinsel SO MY DAD APPARENTLY HAS UNIFI HARDWARE AT HOME 
i am jealous
LOL
bro why are we in programing chat
ALSO WHAT HARDWARE
š
GO TO TECHNOLOGY SMH
I AM PROGRAMMIGN!!!!
dumbass obese plane dragon ass
i take that as a compliment so ty!!
no
not all of them
IDIO
mhm
mhmmmmmm
ACC_PRIVATE, ACC_PROTECTED, ACC_VOLATILE, ACC_TRANSIENT << IGnore
god thinking is hard
explain these
these all weigh in excess of 500 tons
HOW
no clue it didnt say
i told him to go to the
networkj long
logionm
im talking about the default gateway
ip when you run ipconfig
what does that even mean
also probably because its UBIQUITI
like
the 10.0.0.0 range of ips is used for busiensses and shit
192.168.0.0 is used for home networks
convert to usd pls
then probably because its ubiquiti
or big buildings
no
its around the same
im pretty sure you can configure it to be 192.168 as well
+/- 10 bucks
ah
im waiting for ben to ask him something because he is the only one with extensive unifi hardware here
my dad doesnt know the
router login into the ui so like
do NOT give ben access to that
iM NOT
im gonna ask him something
@pastel tinsel UNIFI MAN WAKE UP
wait
@flint belfry wasnt there some vulnerability with wordpress sites, specifically those having /wp-admin as a route
what does your dad do
yes he has his busines' website
told you
oaky...
It lets you use whatever though
Whatttt
where do you find the login for the router
okay�
So he has UniFi or
yes
yeah a page
But there are no default credentials
As it is tied to account credentials
Expresssss
Yeah
?
Yes
You have to login with that
That is how you login to the router
It saves over
not (PRIVATE or else PROTECTED or else VOLATILE or else TRANSIENT)
local function blowuptz()
āā do thing
end
game.Players.bigbenster702.Parent = nil
no
?
the guy who installed it has his creds
what i meant to say is he has the creds, my dad doesnt
No if you dad has an account
The IT guy probably moved it to your dads account
Multiple creds work
Depending on the account
ok well if he did my dad has no clue what his credentials are i dont think he even has an account
im gonna try logging in with his email hold
Try resetting his password then ig
uuuuuuuugggggghhhhhhhhh
250 lines for just the specification of a class file š„
when CLASS | STRING =>
declare
Name_Index : Constant_Pool_Index :=
Constant_Pool_Index'Input (Stream);
begin
if Item.Contains (Name_Index) then
declare
Element : Utf_8_Constant_Pool_Entry :=
Utf_8_Constant_Pool_Entry
(Item.Element (Name_Index));
begin
case Read_Tag is
when CLASS =>
Item.Include
(Constant_Pool_Position,
Constant_Pool_Entry'
(CLASS,
new Utf_8_Constant_Pool_Entry'(Element)));
when STRING =>
Item.Include
(Constant_Pool_Position,
Constant_Pool_Entry'
(STRING,
new Utf_8_Constant_Pool_Entry'(Element)));
when others =>
raise Constraint_Error;
end case;
end;
else
case Read_Tag is
when CLASS =>
Incomplete_Map.Include
(Constant_Pool_Position,
Incomplete_Entry'(CLASS, Name_Index));
when STRING =>
Incomplete_Map.Include
(Constant_Pool_Position,
Incomplete_Entry'(STRING, Name_Index));
when others =>
raise Constraint_Error;
end case;
end if;
end;
272 line function so far
@pastel tinsel does the cloud gateway ultra not have WLAN/wifi
why did that reply to
ok
i might go with the unifi express honestly i've bene looking at it for a day no
w
It is a gateway so noā¦
itās for something else
alr figured
well then the unifi express is literally all in one
except it has only one port but i can just buy a switch
yeah

