#💽Programming Chat v2
1 messages · Page 80 of 1
what about a thing called an http proxy
start of authority
said password giving me a MUCH, MUCH faster network
dont need
the specification boils down to two messages
im more interested in BEP 10
hmm.. no..
guess its just scanner traffic
i wonder why they're using the unallocated label type though??
some are using the binary labels that have been deprecated for years
see this is the problem with java...giant stack traces with long ass class names
OH HI YONKAGORE
GORE???
idk he made a cover about that one song about cannabalism
if this was rust you would have either been forced to handle the error or you would have gotten something like
thread 'main' panicked at src/main.rs:3:10:
called `Result::unwrap()` on an `Err` value: "Skill issue"
HAHAHAHAHSA
but you can't handle the error in any right way here
you just log the issue and forcefully close the connection
that's...a way to handle the error
"right way"
handle !== recover
well then im handling the error just fine
so
i dont know what you're trying to say
im saying that like......rrrrrr
rust superiority syndrome
// possible exception here that u have
// no idea about
val line = tcpSocket.readLine();
// must handle errors here because
// you get back a Result<String, ...>
let line = tcp_socket.read_line();
the top one makes you have to do some shit like
try {
val line = tcpSocket.readLine();
} catch (SomeException se) {
// ...
} catch (AnotherException ae) {
// ...
} catch (Exception e) {
// because it could throw smth else
// that u dont know about ooooo
}
well no
or just have ur program die because an exception bubbles up all the way
because all operations of socket and dns operations tell you upfront what they could produce
via throws or via docs?
and if a problem so severe happens it breaks that thread and logs anyways
inferior to encoding possible exceptions within the return type
but still better than nothing
aera we've already had this exact argument before
ik
kotlin suffers from the jvm copium of functions having the ability to throw whatever tf they want without informing the caller
which is a good thing
no it's a bad thing
if a function could fail then the caller needs to know so it can decide either to handle it or to pass it upwards
well then they'll know
they'll only know when the program crashes and they're like "oh I can actually do something about that"
rather than ahead of time
which is sub par when you could just encode it in your return type
no
so the programmer can fix it before it crashes
id rather not have to encode 500000 checks for every i/o operation
and instead just have a block be protected and terminate the connection on failure
you'd rather deal with 500000 different errors that could show up years from now?
they cant throw 50000 different errors
they can throw 2 classes of problems and 1 class you shouldn't even attempt to recover or handle
besides in rust you CAN just
let res = some_faulty_io_op();
if res.is_err() {
println!("IO op had an error");
// println!(additional details);
return;
}
or
fn worker() -> Result<(), io::Error> {
let res = some_faulty_io_op()?;
// ...
}
fn caller() {
let res = worker();
if res.is_err() {
println!("worker had an error");
// println!(additional details);
return;
}
}
this doesn't imply that you have to make a wrapper, just that you can defer handling to whatever called a function
you still have to handle every single problem for every single operation
which is tedious
and you won't even define special cases for each 99% of the time
but it gives you peace of mind that you don't have anything unhandled that you can handle
you just need to protect a single block
WHO IS THIS!!!!!!!!!!!
I WOULD LIKE TO MAKE A COMPLAINT TO YOUR MANAGER!!!!!!!!!
there are very few errors that are totally unrecoverable
there are many errors that are totally unrecoverable
and most "exceptions" as you would call them aren't really "exceptional", they're part of normal program flow and can be treated as plain data rather than something special
in my example every single problem is unrecoverable
they are exceptional
using unallocated labels is exceptional and cannot be recovered from
using extension labels is exceptional
ok but if your compiler isn't idiotic when will you ever encounter this
the pipe dying is exceptional
dude
this is a public facing DNS server
oh you didn't mean labels like
the only labels in kotlin are loop and return labels
the only labels in java dont exist at runtime
yes
k
look idk what other people are doing with their exceptions
i just know im right with mine
wrong
WELL
okay
there is actually one case where im "misusing" exceptions
but nobody will ever see it outside of where they're used
the pipe dying is a normal thing that could happen to a pipe and can be anticipated as a possibility during normal program flow
then you'd just ignore it as apart of SocketException
simple as that
every single socket I/O reports that in throws AND docs
no im saying that for the argument that exceptions arent exceptional
however here it IS exceptional
the DNS client should never close the pipe before completion
rust for webdev? @timid quartz
like using it in WASM?
no like using rust for frontend
nocom
whats that mean
no comment
oh its a DSL
ehhh unfortunately javascript/typescript are native to the web whereas rust isnt so they are just better
rust is capable of webdev but js/ts are just more suited
idk
someone was shilling it today
rust as a templating engine is kinda fine
it seemed kinda cursed
but everything with a DSL is good enough for use as templating
so id say rust is just adequate here
I was just curious what your thoughts on it were
not done it personally
but again I think rust wouldn't be a good choice compared to js/ts
i think its a good choice over both here
its not used for scripting
its templating
right but it could happen
fn main() {
let mut stream = TcpStream::connect("address")
.expect("Failed to open stream");
loop {
let mut buf = [0; 128];
let r = stream.read(&mut buf);
if r.is_err() { // encompasses broken pipe
let e = r.err().unwrap();
println!("{e:?}");
let _ = stream.shutdown(std::net::Shutdown::Both);
return;
}
// do whatever
}
}
you took forever to write a rebuttal to THAT
i thought you were going to talk about the rust templating 😭
because I was consulting docs to make sure the functions were right
again
if you dont care about the pipe dying
catch SocketException to nothing
ig for templating it doesn't really matter but I wouldn't try to make Rust do what JS/TS can do on the web natively
but i do care about it here
JS/TS cannot template
the example in that photo is for server side rendering
Next.js, probably Vue, probably Svelte
Next.js has SSR which is why I listed it without "probably"
okay but
thats not "natively on the web"
thats just... js as a server
which i felt like you should be 100% against
but i ... guess not?
yeah I dislike js on the server lmao
then you should like rust as a templater here
its objectively the superior option (performance wise)
im just saying
if you're trying to do some weird shit by like
compiling rust to wasm to run on the client
dont
but for ssr templating then sure
well i came in asking that but harry followed up with an ssr shot
cause if he DID say wasm id say script instead
are you typing up another code snippet again..
The parameter is incorrect.
use std::io::Read;
fn main() {
let mut stream = std::net::TcpStream::connect("address")
.expect("Failed to open stream");
loop {
let mut buf = [0; 128];
let r = stream.read(&mut buf);
if r.is_err() {
let e = r.err().unwrap();
match e.kind() {
std::io::ErrorKind::BrokenPipe => { /* handle */ }
_ => {
println!("{e:?}");
return;
}
}
}
// do whatever
}
}
no fun allowed
what are you saying with this
I can understand an argument for verbosity but what you're wanting to do is entirely possible in Rust while also having the guarantee that you're handling everything that you could possibly handle short of something being so bad that you have to immediately panic
i never once argued about it not being *possible
have you lost the point? im saying rust would be overly verbose to handle for what i want
the verbosity isn't what i want even though it could be seen as an advantage in another context
and ig I'm saying that the verbosity is worth it to have the peace of mind that you're handling everything that you could need to handle
vs kotlin
try {
val res = stream.read();
} catch (BrokenPipeException bpe) {
// ...
}
// OOPSIE YOU GOT A DifferentThanYouAnticipatedException
try {} catch (e: Exception) { log issue and close }
if i want to handle something more fine grained ill handle it where i want it to happen
I personally think the entire pattern of catch (Exception e) that Java (and Kotlin by extension) encourages is really bad practice
i dont think its good or bad practice
in some cases sure it's useful
but in other cases it's "oh well let's just catch it and ignore the nuance"
and in OTHER cases it's "oh this thing doesn't say it throws any exceptions..."
2 months later, prod crashes because an exception bubbled out of that function and got left un-handled
then that's poor overall error management of that production software
and Java enables taht
by not encoding the types of things that could happen in a strong way
rust does as well
matching to _ to ignore nuance is equal to no try catch / try catch on Throwable
if you're using .unwrap() you're explicitly accepting that there may be an erroneous value and that if there is your program will panic and crash
arguing about the amount of information relayed to the developer is understandable sure
but i dont feel thats a language design issue
its a tooling issue
it's not equal to no try-catch because of the above if res.is_err() check -- you're "catching" there
it is equal to catch (Exception e)
no
its equal to catch (Throwable e) (the distinction is important)
but... why would it be bad to not check for is_err in every possible place where an error could happen
instead of again
protecting a block
because then you crash
then protect a block
protecting a block is also bad in most cases because of this
and protect the topmost block (if its not already separated using a thread) with a catch and log
no
losing the nuance would only happen as a result of catching Throwable or Exception, which is equal to matching an error on a giant operation in rust to _
both of which you shouldn't do, but you can in both languages
try {
someFallibleFunction1();
someFallibleFunction2();
someFallibleFunction3();
} catch (Exception e) {
// nuance lost
}
99% of cases where this pattern should be used is again in a log and close context, not "keep going" after the error
but it's used outside of that too
which is equal to matching an error on a giant operation in rust to _
you can't match on one "giant operation" in rust, you have to match on each individual step that returns Result or Option
same thing can be used in rust
and if a library dev gets lazy and does it anyways?
putting unwrap on everything?
terribly bad practice, a library dev should never do that
but that would be equivalent to a Java library developer throwing an Error
which they shouldn't do unless absolutely necessary
just as how a Rust library shouldn't panic unless absolutely necessary
uh huh right
accounting for all factors the benefits and disadvantages of both don't show any clear winner
its just what the human does at the end of the day
both languages enable terribly bad practice to happen
let res1 = fallible_thing_1();
// type error because res1 is of type
// Result<whatever, SomeErrorKind>
let res2 = fallible_thing_2(res1);
let final = thing_3(res2);
you don't have to type code for everything, just fyi...
ill understand the point just fine thru a description
true but I think rust has a slight advantage because in cases like this you are given a clearer description of what you're working with and you're made to handle edge cases that other langs don't enforce via the compiler
then we agree its a tooling level issue instead of a language level issue?
cause i wouldn't mind if javac had a pedantic exception checking option
fun whatever(): String {
// 1 billion possible exceptions,
// have to rely on good docs
}
fn whatever() -> Result<String, MyErrorType> {
// constrained to MyErrorType,
// caller knows what they're working with
}
i just think try/catch as a syntax element is fine along with rusts result paradigm
if Java/Koltin had something similar to Rust that allowed encoding the entire possible error space as well as something that enforced handling of said errors (which it does but only for checked exceptions), then sure
it wouldn't be impossible at the IDE level
javac isnt language level
thats tooling level
javac could compute the exception graph of a given piece of code, but
ok well in the language level
could pose some issues due to the JVM's dynamic nature
it would be best to have it in the language level
i dunno i just feel like that'd put unnessasary weight on the java language as is
rust's is in the language level because it's how you write the language
a pedantic exception checking ANNOTATION though...
that would be an awesome JEP...
if only i knew how to write those
the tooling enforces it so yeah there's a possibility that someone could write "rustc with no results or options" but
that would require lots of out of the way effort to ignore the lang you're compiling
well you could make this argument with every possible situation
cause then you're just throwing out compliance
yeah exactly
ohh boy dont be like "erm ur lang doesnt have a standards committee therefore it's fake"
no i dont care
dont even start
so it would be good if java put it in the language itself
fine in quotations cause i wish you'd all cease existing BUT.
die.
but do you!
jvm developers are my mortal enemies.
do you have any track of compliance for rust that is an honest question
or is rustc the authority
I think there have been talks about making a standard
but rustc is the primary authority
We do also have references
it'll be a good few years until a standardization body would ever wanna pick something like that up (if ever)
and it'd require a ton of coordination too
no lo
you just misspelled that right? it isnt?
RUST 🤮
copelin 🤢
JVM ❤️
ultimately the platform it runs on (the jvm) is imperfect and flawed
besides with what newer java versions have been adding
kotlin is basically obsolete
what?
how does that make any sense?
you're joking right? you're making a joke here? you dont actually believe newer java versions make kotlin obsolete? right??
you're just trolling??
records
record pattern matching
uh what else
data classes
when
if that is all you have then this conversation has made me lose ALL seriousness for you
well it basically doesn't matter anymore
because java has it
so like
what does kotlin bring to the table
oooo gee i wonder
in terms of features it has that java doesnt
language features not just "syntax better"
functional programming, so many extension functions that are incredibly useful, non-nullability, portability to platforms outside the JVM
DSLs
thats a big one
streams, idk how you'd do extension functions in java but I bet it's possible, @NotNull, ehh whatever build a cross compiler nobody uses anything except Kotlin/JVM anyways
streams are objectively worse than 99% of places you'd use kotlin FP, it's not, thats an annotation you stupid rustlet, ???
OH YEAH
AND reified
THAT IS MASSIVE
dsls are lame anyways who uses that
nobody uses it
LITERALLY EVERYONE DOES
oh my god you suck at coding
go back to your little crab cave
this session is terminated
besides I bet java 25 will add it
nuh
I bet there's a jep for it
theres probably a Project out for it but
guess what
that'll also benefit the JVM too
meaning kotlin can take all of its benefits...
aaahhhh i love interoperability
all your silly little features will come to java one day and then your lang will be even more useless than it already is
rust is already obsolete cause of ada so
you're not a programmer
you're a toy-grammer
ada is darpa's toy and kotlin is jetbrains's toy
SO IT'S A TOY
NO?
??????
i hope that girl with the long hair comes out of your display while you're coding rust and DOESNT KILL YOU cause your code smells so bad
☣️
I hope the military sees your abundance of Kotlin experience and forces you to design mobile apps that nobody uses for 20 years until they give you your $0.05/mo pension after you retire because the govt went broke 5 years earlier
oooh but they'll still pay me while im coding!!! :3c
i can just sit around yapping in here 23/7
and ill finally have a job <3333
sentenced to write android apps for all eternity
fine go get sent into a warzone and be refused to be taken as a pow because you smell too bad
you need to listen to the first few seconds of this song
and listen to it
(its important for your career)
WOW FUCK YOU
:3c
YOURE NOT EVEN GONNA LIVE TO 19
Yeah I guarantee if you keep chugging soda you’ll enjoy it for the rest of your rapidly-shrinking life
0 years
You literally chose an already obsolete lang and a lang that’s rapidly becoming obsolete to use
absolute 💪
And the best part is Kotlin is getting obsoleted by the very language it was meant to replace
No I’m Albert Einstein
I think on such high levels that nobody else can understand me
I’m going to inject your head with a lead rod traveling at 2000 m/s
yeah WAS it’s OBSOLETE !!!!!!
GOOD
give up give up give up give it up
nope that’s you
My future: limitless
Your future: OBSOLETE.
did you know bayachao is REALLY FUCKING GOOD at drawing bikes for some reason
weird fact
I hope that bike runs you over
It’ll be really easy because you sit inside all day, all it takes is someone crashing through your bedroom wall
OK I’ve stayed up way too late
When I wake up you better be gone ❤️
NEVER
yo unfunnylad
YOU MUST GIVE UP
do you want a cute image of the summoner
sure
give it up
aww
I’m literally calling ICE rn
proof?
The agents coming to your door in 18 hours
nnnnooopee
the only agency who'd MAYBE want to arrest me is the USAF/DISA
but they dont want to!
so :3
Don’t matter
NO!!
ugh this is probably you
<br><br>くん^^^^
why did poshi marry bayachao?
triple personality disorder thats why!
Because he’s got something wrong in his head
nope!
triple personality disorder!
QSERF is majestic, if you made it then you’d just fill it with free models and use smooth plastic
ok buddy. I probably know how to build better than you in all ways
plus I actually use blender unlike you, unionite.
smh.
ok well jokes on you I’m not a builder
you're not a builder
you're an underpaid albañil
you’d have to compete with Speedy, Bob, and the other builders
only builder that could mog me on y'alls team is probably akyomia
I don’t speak your language brah
ばやちゃおさん、、、かわいいいいいいいいいです、、、、、、、
OK go prove it then
Build better than Speedy and Bob
Do it
I’ll wait
ok give me 1249214 bussiness days
- 5 consecutive daybreaks each week to see bayachao content
Starting the timer
I really hope you’re joking saying QSERF is ugly otherwise I’m murdering you
ermmm
where do you keep finding these
Well if you think you’re so good at building then go rebuild a part of QSERF
I need to know
sure I can do that
Either prove yourself or accept that you have no right saying QSERF is ugly
bayachao media tab and vision trained to recognize a lot of media
And it has to be a sizable part of QSERF
so on the offchance they actually do it and it IS better (not saying anything)
I rebuilt like 1/4th of the DMR chamber once but that's ancient and looks so ugly now
Uh idk admit defeat
I don’t have a say in the hiring
i thought you were like
Which like if unfunny applied and didn’t get hired then that tells me what I need to know about their skills lmao
the dei coordinator or something..
No that’s deisnake
WHO
I never applied
??
@rustic fossil
Ok I gotta bed now bye
I was playing #forts and the Doom music started playing. Safe to say, we lost everything.
#funny #fails #destruction #troll #memes
Check out the full video: https://www.youtube.com/watch?v=DlpHS9MA7pk&t=361s
Also, I stream on Thursdays at 7:00pm CST.
Check out my Discord: https://discord.gg/6HPy5vswwm
--...
AHAHAH ITS SO GOOD
Unlike some people here I actually HAVE A JOB
LOTTA TALK FOR A GUY WHO RAGEBAITS USING AN INFERIOR LANG
It’s not rage baiting if the lang is superior
It really just is
JVM beat you before you were even born
OK BYE CHAOIDIOTS
@spare quartz ok heres your outdated and massively crusty, compressed pic of my ancient ass DMR recreation
now lost to time sadly cause of my stupid ass wiping their PC with diskpart
C beat the JVM before you were even born sorry
OK BYE
bayachao wins
I had like
two other pics of it somewhere
ちゃおず!!!
Hell the JVM wouldn’t be what it is without C
@timid quartz look it's kokuri!!!
thats ada
No Debirun is rust and Kohaku is the JVM
OMG YOU ACKNOWLEDGED DEBIRUN
are you implying im rust-lang.org
!!!
:<
kokuri!!!
YOU LOVE ADA
bye are ass tones
helo it is me
deisnake
the snake
called dei
i'm the snake
i'm everything related to dei
but actually nothing related to the dei
it's funny how it changes depending on how you read my name
because if you read it as DEI then it feels funny
but my name is actually pronunced "day"
anyway @spare quartz why
your USAID funding has been revoked
aw shucks
how am i going to fund my secret SST operations then
CHAO!!1
?????????????
yeah so
i swallowed a chicken bone while eating rottiserie chicken a few hours ago
and it started hurting rn
go
to the hospital???
nah i'll be fineee
That happened with a fish bone for me
I think
Maybe
gg
It’s telling you to GET A JOB
@rustic vine hey so you’ve done stuff with LLMs and Jetsons right
How tf do you actually “tune” an LLM
Like for example I want to tune an LLM to be more “technical” or whatever, how tf do you do that
Just had first experience speaking Japanese with actual Japanese people
Terrifying
It appears I was understood!
Terrifying indeed
At least the guy is nice …
Which are you, ミリオ?
No, my name is my actual name, みこ
ミリオ is talking about a conversation before my screenshot
on pc now
tf is マってる and why is ま in katakana
let me try and start it up
an excerpt of the context is basically, out of nowhere, the original guy of the group (まーぼーなす) left without notice, and promoted the x
oops press enter too early
Promoted the x
--- promoted the guy with the purple shield icon to leader out of nowhere
ignore daigos double msg, accidental glitch
mfw I can’t read most of those kanji
gonna resume work on bittorrent now
got metadata which is a good step..
problem is handling the synchronization of clients with (un)choke
Yeah figured
Tbh I think you’ll do better than me at Japanese in the long run because you have a stronger interest and aren’t afraid to go talk with the scary Japanese people
bayachao
thatfucking dog that I:
a) love
b) hate
bayachao was talking about how a lot of characters she has び in are usually freaky
because that is "her specialty"
second B rule
ru BI
de BI ru n
ba BI o
What
Ruby is freaky???
Bruh
yeah
just had a genius idea
im pretty sure they're just freaky when bayachao wants them to be though
not like, "in their" personality (like with babio)
reality show where it's a bunch of inexperienced video editors
and whoever makes the best worst video wins
their personality is just "tyrant"
I saw that
what was it about
Quit 30 seconds in because he mentioned the blog post that the arc devs made
Read that instead
im a d1 theo hater btw
damn the one place where english sucks
🥰
i cant tell if you're saying read (red) or read (reed)
skimmed
im gonna be real though
who tf uses arc
Me…
if you REALLY wanted vertical tabs use firefox or edge
Edge 👎
and if you want your weird gimmicky features? god knows man i don't gotchu there
Firefox is also unbased now
idea: use FlashPeak Slimjet 👍
It's built on the same technology as chrome, with the added trust of microsoft.
Would sooner use ladybird
I actually do use it on my desktop
ok ngl
i glaze edge too much for hating on windows
😭
i wonder if this project of theirs is still supported..
its using Trident so i wouldn't be surprised if it wasn't
oh interesting
they switched to using gecko
@timid quartz ok i just thought to myself
when the hell are we getting a proper port of webkit for windows
"A fast, open source web browser engine."
emphasis on open source
the epiphany in question:
yeah ok
you would probably use a mac as your main pc.
oh yeah i forgot
Mac OS X 10.5 is my bff <3
no wonder you're an applet
i got a plan
ill just be present in japanese programming discord servers
this website is ass. session terminated
and linger in the beginner channels
so if they try to bully me, i just bully their lang
❤️
Bully their English skills lol
well i feel like they have some level of competency there
since all programming and technical discussion has to have english as a base
i mean
you can always find a way to throw eggshells at bayachao irl
👍
oh so you're saying bully them with bayachao media
I would say something but this is QSP
thats me but its just the thinking that makes me tired
relatable
im trying to think of how i would get the metadata AND process data with it since a peer can send multiple messages at once
you're becoming me....😄
Handshake, Extended
Thread A sets a cyclical barrier for other threads to wait until its got metadata
Thread A fails, and waits, cyclical barrier unlocked for one thread
Thread B attempts to get metadata
Thread B succeeds
Thread A/B request packets with the metadata as context
BUT there could be infinite threads running! how would i only let one thread go at a time w/o just killing it outright, since it could still have useful data?
an AtomicNumber/Boolean w/ a CyclicalBarrier? or reset CountDownLatch??
and along with that
i need to make an InputStream for UDP packets even though thats partially antithetical to their purpose
(but bittorrent trackers still use connection states over udp...)
@spare quartz in java is there any way to invoke a "secondary" main method
well kotlin but jvm
elab
jvm java kotlin same deal
Im thinking of using this for spawning the supervisor thread for the carpool
you can invoke any class in a given classpath as long as it has a public static method named main that takes in the parameters String[] and returns void as the entrypoint for the JVM
I'd rather do something like java CarpoolMain::daemon_thread than java CarpoolMain --daemonize
you could create 2 jars containing the same code, but different Main-Class manifest attributes
I feel like the former makes it a little harder for someone to inadvertently spawn a supervisor thread
oh so I can make like
// DaemonMain.kt
fun main(args: String) { /* ... */ }
and java DaemonMain
or whatever
the default class name for kotlin classes is <name>Kt, and as long as that function is @JvmStatic
AND args should be Array<String>
yes
oh right array string
yeah and im so tired I could eat a honse
HONSE*
HONSE*
HORSE*
honse
hmmm
atp
how would you keep track of the supervisor thread
like a common thing would be to make a pid file somewhere
but how would you do it
please elaborate on "keep track"
lik
u have the supervisor thread running
and when you invoke a cli command (eg carpool --add-service "whatever")
you have to tell the supervisor thread to spawn whatever it is
ok yes also that
user specified
org.bread_experts_group.CommandLine.kt
org.bread_experts_group.logging.ColoredLogger
yes found it
method of interest: newLogger
btw
run your program with -help i wanna see what it says
yes found it
the latest version is 2.22.4 if you care about read64 working with negative 64-bit integers
m
is this cursd
womp
you dont need a lambda for this
wait I can do listOf
I don't like vararg
well then yes it supports lists
subjectively less pretty
im just used to { } being array/list literal syntax
me too but you get used to it
in kotlin {} is form for either a block signifier, a lambda, or a creation of a SAM
NO WAY YOU PLAY THAT GAME TOO?
used to....many moons ago...
but uh... functional interface
something like
AerastoKiller {
...
}
this is instantiation of an anon object that inherits AerastoKiller
and overrides its single (functional) method
what is the difference between parsedArgs.first and parsedArgs.component1
no difference, component functions are there to make destructuring work
so val (singleArgs, multipleArgs) = ...
additionally the Flag constructor has a few defaults set for you like required/repeatable, so if you just wanna specify conv
you do so like Flag(name, desc, conv = {...})
ugh...Any?
well you cant exactly have a conv that just "works" for a given name
yes
but the conversions are infallible
singleArgs.getValue("a") as URI will ALWAYS work, as long as a exists, required = 1, and ::conv is a URI
in rust the arg parsing libraries are able to just plop them into a struct
wdym
ill use clap as an example
because it has decent dx
use clap::Parser;
/// Simple program to greet a person
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
/// Name of the person to greet
#[arg(short, long)]
name: String,
/// Number of times to greet
#[arg(short, long, default_value_t = 1)]
count: u8,
}
fn main() {
let args = Args::parse();
for _ in 0..args.count {
println!("Hello {}!", args.name);
}
}
i see
that would be a lot of complexity if translated to the JVM which is why i just refer to using casts instead
well in kotlin I could see it working something like this
data class Args(arg1: String, arg2: Integer)
fun parseArgs(args: List<String>): Args {
// ...
}
or however you'd want to implement that
BSL can't possibly know the structure of Args which would vary from project to project
so i'd have to have to take in the reflected constructor and parse runtime annotations
and if you had a custom type that didn't have a "from string" or whatever you could either use some kind of converter argument or have people implement an interface/extension
too much work
yeah I was gonna say: reflection
casting is laaaame
casting is fine
LAAAME
harry....
that's ai generated............
heres the high quality version
first of all wtf is that I/O supposed to be
looks like IO?
yeah ok facebook granny
theres literally
nothing wrong with that image
everything you've pointed out is believable
blurry IO, blurry text
yes people take blurry photos
that doesn't mean its ai
its not fake
noise like that happens on digital cams
are you sure
swear i've seen that exact same image
yes
being AI
bruh
u suck bruh
actually haters
don't believe a word I say
says you
how am i a hater 😭
I said the exact same thing
im agreeing with you
haters!
wazzup beijing
Love him or hate him, he's spittin straight facts.
JACK10 (help me beat this dead horse)
hmmm is there need for me to separate the cli into multiple files...I don't think so
one giant file ftw
maybe 2 at the most, one for the main function and one for all the action functions
you can't split the arg parser
but I can parse the args in main and pass the values around to other files
@rustic vine did you read my ping earlier
I did not see it