#dev-general
1 messages · Page 456 of 1
"Build successful"
lol
it just said fuck your slimjar, im building anyways lol
Beautiful
no u
Wow rude
Yeah that's it
Can slimjar add PDM as a dependency?
Technically yes
lmao
@old wyvern Ah great shadow 7.0 breaks it 🥲
at least if I add 7.0 as dependency
I’ll be unstoppable
then you can use PDM to add Slimjar as a dependency!
Sure
Me too
man you know what gets me
yes
is that typing in into windows search does not somehow turn up intellij, it turns up Internet Options
like wtf
Did you censor "Intel graphics.."? lol
btw matt
that might be Extreme Tuning Utility too
lol
wha
nothing
what was that
none of your business
ok
nyay
lmao
Nyay lmao
well yeah
well a lot of english letters don't include themselves
I don't think there's a single letter in the spanish alphabet that doesn't include itself
it's a very explicit language
M, english pronounciation ɛm
C -> see
cees lol
well in that case
Always thought it was weird that it's double u but looks like double v
Well in spanish it is actually named "double v"
Portuguese we say double u as well
it was originally double u but people got lazy and started writing it sharply
i fucking hate dropbox
why does it do stuff to my files
damnit I gotta setup owncloud to sync my shit
👀
it's got vectors, it's got C-like types like i32, f64
i also have a sneaking suspicion that strings are pointers to arrays
cause IJ tells me it's an &str
and it uses ::
awe shit it doesn't use camel case
that's very sad
Oh boy, rust
Let me find my only rust code ever that took hours and was a nightmare
There's a lot of cool stuff and a lot of not cool stuff
Good thing I'm making my own lang phew
Should I contribute to your language? I'll make it more like Kotlin
just fork rust 4head and make the not cool stuff cool stuff
I mean I certainly like a lot of Kotlin
but like, why does println! have an exclamation point?
why do you have to do string subtitution
why do for loops not have parens
why did the mutable thing have to be mut
const is a much better way
val and var are even better
why are some methods overloaded and others aren't?
lol in c++ you have the three, const, mutable and, well, nothing
why do they use underscores
why do they use :: i really hate that
fn main() {
let owned_string: String = "hello ".to_owned();
let borrowed_string: &str = "world";
let together = owned_string.clone() + borrowed_string;
println!("{}", together);
}```
wtf is that
why can't you do expressions inside of the {} like in kotlin
ughhhh
I mean that kinda looks like a printf in disguise
fn main() {
use std::char;
let string = vec![
vec![false, true, false, false, true, false, false, false], // H
vec![false, true, true, false, false, true, false, true], // E
vec![false, true, true, false, true, true, false, false], // L
vec![false, true, true, false, true, true, false, false], // L
vec![false, true, true, false, true, true, true, true], // O
vec![false, false, true, false, false, false, false, false], // ' '
vec![false, true, false, true, false, true, true, true], // W
vec![false, true, true, false, true, true, true, true], // O
vec![false, true, true, true, false, false, true, false], // R
vec![false, true, true, false, true, true, false, false], // L
vec![false, true, true, false, false, true, false, false], // D
];
let mut final_vec: Vec<char> = vec![];
for byte in &string {
let mut byte_vec = vec![];
for b in byte {
if *b { byte_vec.push("1") } else { byte_vec.push("0") }
}
let byte_string = byte_vec.join("");
let test = isize::from_str_radix(&byte_string, 2).unwrap();
let char = char::from_u32(test as u32).unwrap();
final_vec.push(char);
}
let final_string = String::from_iter(final_vec);
println!("{}", final_string);
}
Beautiful
Oh shit rust has mobile highlighting
what in the fuck
i mean you purposefully made that way more complicated that it needed to be lmao
That was the point of it xD
Basically someone (probably Emily) was talking about doing hello world with booleans, so I did it in Kotlin in like 1 minute, then someone told to try something else, so I did rust and I regretted it
wtf why do tuples have a max limit of 12
dude everyone praises Rust but like
so many weird decisions
makes me want to go to python ngl
Lmao what
yup
let's put tuples in Kotlin
then I don't need Rust
actually maybe I should just go back to C++
yeah I plan on writing my Aello compiler in it
Tuples in C++ are actually very smartly designed, recursive inheritance lmao
I just wish like a small few things were different
Oh boy good luck poor you
well I'd rather write it in Rust than C/C++
oooh is Go good?
I've heard Rust is really good for systems stuff and is a replacement for C/C++
I've heard virtually nothing about Go besides that Discord stopped using it lol
are you kidding me the . syntax is for tuples only
i dislike rust
Lmao
can someone make a Rust without the shitty syntax that compiles to rust then compiles to speedy code
Oxygen, maybe?
does rust even have objects
cause i stg if it has getters and setters like java it's going in the trash
dude how are linters made
that seems so hard
but like Java and Rust have very good linters
yeah like the thing that tells you your code is messed up
syntax highlighting and all taht
suggestions for autocompletion
Ah once you have a lexer it's pretty easy to make
I was actually working on a IJ plugin to highlight my msgs lib syntax but got bored
It's very complicated in the beginning yeah
You'll need to search about lexers, grammar, parsing, etc
Lexing is basically reading the code and creating tokens that represent them, then you'll have a grammar tree to find what they mean and if syntax is correct and things like that, then you parse it to get the values you need
bro where do I learn this stuff
cause this is super cool to me
and I don't want to wait 2 semesters to take my uni's Foundation of Computation Theory class
I searched a lot on google and yw, there aren't many good guides and stuff out there
Some people use a software to create the lexing, like antlr (minimessgae uses it i think) I think elara used to use it as well
have you made your own lang?
Not exactly but my messages lib is pretty much a new lang just uses the same syntax as markdown
oh dang I see
if you do Go i can try helping
Not rust though, I'd like to keep my sanity xD
dude I thought Rust was gonna be way cool
people hype it similarly to Kotlin
but I'd honestly rather use C++ at this point
it doesn't do enough to justify as far as I can tell
Oh would you?
I think people coming from C++ really like Rust, but people coming from like Java or Kotlin dread it
yeah it's probably really nice for C++ bois
but there are so many opportunities where it could fix shit and I'd really like it
like it's just a few key pieces off
My issue with it was the importing and stuff like that from the std lib
I felt like no matter what i tried jt never made sense
Is it going to be a JVM language or Native?
i dunno
I think Native'd be cool
but JVM would allow it to actually be used maybe
Just interop that would be scary
If you make it compile to JVM you have the advantage you can write shitty bytecode the jvm optimizes later on :^)
well maybe no interop, just it compiles to JVM?
If you make it native you have to do that yourself
hmm yeah but learning to write a compiler would be super fucking cool I feel
Convert your code to Kotlin and use Kotlin's compiler 🥲
But yeah creating a compiler sounds nice, and bytecode is actually fairly easy
well let's hope
also can you even write a compiler in Go?
like has it ever been done?
Yeah pretty sure you can write a compiler in language
Friendly reminder that sql is turing complete
Likely a mix of asm, c and cpp
Yeah, you can even write a Java compiler written in Java
Ur mum
who wrote the first compiler
oh wait everyone writes C compilers from scratch right
then you just build off of that
but how do you make the assembler
It's written in Kotlin lol
Actually pretty cool that it's written in itself
oh damn it really is
Yeah it kinda snowballs from a tiny speck 👀
You can even start writing it in Kotlin then write it in itself after
well I'm thinking not JVM based
after further consideration
so maybe C then Aello
Do you have any idea of syntax already?
well im looking at rust and kotlin and picking stuff I like and don't like in my head lol
I'm gonna need to write a formal language specification aren't I lol
Yup
I was gonna write a language too but got bored
My syntax was going to be like
let variable: Type and let mut variable: Type
ew the Rust way
I am a big big fan of var and val
and of course type inference
though I am quite a fan of Rust's list of primitives
they make more sense than float -> double and byte -> short -> int -> long
int8_t 👀
uint64_t 👀
what's the _t part
type
seems redundant
Dude i hated that on Rust, the whole u32, i64 stuff is so annoying
i mean that's how C++ and stuff do it
though I do like words
hmmmm
things to consider
using int32 = int32_t; 🙂
for us people who already know Java/C well, it's easy for us to know how many bits a type takes up
Aello Enhancement Proposal #1
No specific numerical types, just number 😌
but for new people I feel like i32 makes a lot more sense than arbitrarily knowing that an integer is 32 bits
well also does anyone have any reason I should keep short in
Nah
cause honestly we just need byte, int, and long
Nah i think int and stuff is pretty intuitive
Dude Matt talk to my classmates in Intro to Java
But then again i learned types even before learning C
they missed like 10 questions on the final because of that
Loll
i should really read some language specs shouldn't I
Myes
and probably expose myself to like every language I can so I can steal the best parts of their syntax lol
alright time to open a Go tutorial lmao
hey wait I'm writing the Aello compiler in Aello aren't I
But you gotta compile it in something lower level at first
Looks at lisps and gets scared of parenthesis so makes language like python
You have to make it run
Macro
I don't think it's OO
I heard krypton is good
it can't do generics?
dang I thought that was just an accepted part of every lang
it's weird how some stuff is missing
i think the reasoning was that it was supposed to be a very simple language
generics are complicated
well yeah you can make the skill floor easy
But on the bright side, they're getting added soon
but at least give a little high skill ceiling!
I don't know that much complicated stuff about Java but I still can use a ton of stuff and make things work!
but there's like a million more things I don't know how to use and stuff
hmmm
at least they're getting added soon that's good
yea
I mean generics as a concept are pretty complicated, unless you strip them down to the absolute basics
I don't really see what's so complicated about them honestly
And go's type system is also kinda weird so
you just know that this class instance is a Stringy boi
i am scared of what those mean
dude every single language has its own word for declaring a function
java just has privacy, return type, name, brackets
go has func
kotlin has fun
rust has fn
python has def
js has function
hey wait go uses clang?
does it transpile to C code first then?
oh go has the same type system as rust lmao
just with a few more letters
So satisfying being able to do this
what, becoming bri ish?
🥲
Gradle plugins are forward compatible right?
How do you mean?
It's LLVM afaik
like it also has int8, int16, int32, int64, float32, float64
oh yeah
If possible yes, if you can compile it to llvm bytecode, it can transform it into a wider range of platforms
okay very cool
Its not a VM
gcc vs clang is like maven vs gradle
ah right
what's aello
my lang
no
oh btw, I was thinking yesterday about the proxy I want to make, Aurora, and I thought: I’ve decided that I’m not going to write it in Kotlin
huh
I might try out a mix of Rust and C
bardy
oooh
consider a different name
why?
one of the paper mods is called aurora
Bardy, be a man, use haskell
yeah so what
it’s just a name
Call it Borealis
that's why my lang is called Aello lol, nobody else has used that afaik
Ae you sure my name aint Aello? Should I file a complaint???
it’s like saying if someone else in the world is called Callum then that’s an insult to me because I have the same name lol
😦
ive never heard of it
them
its a fabric mod?
Its an insult to them 🙂
it's a person
oh a paper moderator
if she ever asks me then I’ll make it clear it wasn’t named after her
lmao
that's not the point
or say it was
it’s just a name pig
in honor of her beauty
the point is to do the community a favour by avoiding ambiguity
even though you've never seen her
fine
like borealis is fine
gimme a new name and I will
but to be fair Aurora is a popular real life name
sure it's the name of the teleporting aperture ship
might not be bad pig
but that's a completely different community, whereas aurora is part of this community
I plan for the proxy to run both standalone on the client and server’s end, and as a plugin
and I want to make bindings for a lot of languages
how would it run on the client end
Try : Neos
same way geyser does star
i don't know how geyser does
oh also, I want it to be able to talk to clients, servers, and other instances of itself as well, so you can chain them together if you want
proxy to proxy communication likely wouldn’t use the Minecraft protocol
Why not?
I’d use my own protocol to make a proxy easier to distinguish from a server or client
Proxies should be chainable by simply being a proxy to player packets
and also, I wanna design a faster protocol
Follow protocols that bungeecord and other proxies suppourt so people can actually interlink rather than be stuck with a single thing
Compat is a big deal
You still would need to forward packets one way or the other
also, I’m forwarding all the packets
Then where does the new protocol come in?
and firing events for them
true I guess, maybe I could come up with a new UDP protocol to replace the plugin messaging system
nah
meaning you can send messages between Krypton and the proxy on something that isn’t whacky horrible plugin messaging
xD
lol
bardp
Bom Connection Protocol!
what about
BomCP
connection protocol
Bomp
BCP, sounds good to me
lol
CP
stop taking the piss
I actually want to have something to replace plugin messaging
Yes, Xi is great for messaging
He'll shoot the messenger if they dont deliver
forget udp
communist.lang.CommunismException: “your code is too capitalist! please fix it!” lol
😌
yeah I might use RabbitMQ or Redis
but I’ll add stuff in the API to make them much easier to use
and I’ll add fallbacks if they fail (disabled but plugin tries to use it)
will there be an easily accessible destroy everything button
if you want that, you got it
yes
remember I gotta write this all in Rust and C though lol
Use C++ please
I ain’t using Java or Kotlin here
Thanks
why c++ yugi
might make some JNI bindings though for it
c is faster than c++ right?
The Unsafe Pointer
depends
nah it's just I've seen people say that c++ is faster, but that doesn't make sense to me
@obtuse gale
LilyPad already did that and nobody uses that
Easy to learn, Blazing fast compile time, good performance, Safe pointers
not because it's made in go lol
because very few people know about it
Users dont care about the language
mhm
also, I want an excuse to learn low level stuff lol
coelho basically fell off the face of the earth
he used to be active, but I haven't seen a message from him in ages
I’ve heard nothing but great things about Rust
Go ahead
ye
and C is something I’ve wanted to learn for a while
Go ahead
🙂
yes I got it the first time
my philosophy
hahahaha
don't write important things in languages you're learning
Might be nice to learn
But dont expect it to be great
You'll struggle to get things to compile a lot
xD
But ofc,
once its built

once it's built you'll rewrite the whole thing because of how bad it is
True
if I write good C code then it could potentially be the fastest Minecraft proxy ever made
But I almost ussually end up rewrite everything anyway
Like I'm already on my 3rd rewrite on the chat app I've been working on
lol
I might end up moving to single activity architecture because otherwise normal java patterns become to weird on there
anyway, can you call C code from Rust?
Yes
isn’t it all just the same machine code anyway?
But then rust is no longer safe
After compilation, yes
Dont rely on interop if possible
yeah I only wanna use C for really low-level network stuff where I can optimise the shit out of it
You already have unsafe rust if you wanna go far enough, but people dont even recommend using that
You can do that in rust as well
so tl;dr I should just use Rust and Rust only then
In both cases, you loose some benefit of using rust
I might even get as low-level as hand writing assembly lol
I assume you're joking at this point
idk
Then you need a psychiatrist
language won't fix the design choices that limit our player counts on proxies
I want this to interact with native IO libraries
Ah
IO
Use haskell
🙂
is Haskell even fast?
didn't someone say it was slower than java
Have you checked whether there are already java bindings to those libraries
Pretty much equally fast piggy
okie
I want to be able to interact directly with io_uring, Epoll and KQueue if present
talking to me?
lol
yes
no, channels and event loops too
because they had huge memory leaks in 3
they have custom channels and event loops for the native IO stuff
Subscribe to Devoxx on YouTube @ https://bit.ly/devoxx-youtube
Like Devoxx on Facebook @ https://www.facebook.com/devoxxcom
Follow Devoxx on Twitter @ https://twitter.com/devoxx
Netty is one of the best known and most widely used (if not the most widely used) asynchronous network application frameworks for the JVM. This talk will show you how...
so it might be worth using Java/Kotlin anyway and just ditching something like Rust?
is that what you’re saying?
No?
Johnny asked if there’s Java bindings already for stuff
Im saying dont decide on going into micro optimizations before you have a working model
yeah true
Just use Rust without any weird hacks first
I started to design it yesterday a bit
Might be a good project for you to learn it
But keep in mind, you'll most likely want to rewrite it later
client session <-> client bridge <-> proxy bridge <-> server bridge <-> server session
and the proxy bridge can also bridge to other proxy bridges
it’s designed around BungeeCord, though there may be a better way
BungeeCord uses an upstream and downstream bridge to hook the client and server respectively
stop looking at ew stuff Bardy
yeah maybe that’s a good idea
I need to somehow bridge the client and the server in a way that’s abstract enough that I can also bridge other proxies and allow for the server to not be configured to support the proxy (for standalone usage) and the other way around too (so it can run server side)
Remake minecraft
so making a bridge between the client and server connection and the proxy bridge means the proxy bridge doesn’t know that it’s necessarily talking to a client or a server, or even another proxy in the loop
or am I just going completely crazy here
It shouldnt need to
I want to at least beat BungeeCord on performance, not sure about beating Velocity but that’s much harder anyway because of how much better it is
Its reponsibility is just to forward packets
true
Might wanna finish krypton before you start on this
yeah I will
Or else you'll end up with multiple unfinished projects that you'll burn out on
I mean, I need to learn another language to start on this anyway
sounds like me
not like my GitHub is filled with unfinished projects or anything
I think I should add block breaking next, which will be a pain in the ass since it requires me to send the block state changes in the ticking
unless I can come up with a better idea maybe
Queue it
can you make a queue that has a wait between the time you can pop the head?
What?
like so you have to wait x time before you can get the head again after retrieving it?
Probably
since they aren’t sent every tick
the time between when you send one varies from block to block
Otherwise you might lose out on reponsiveness
what do you want to use rust for now?
If you want to interface with C libraries and JNI it's pointless
just complicates things
hmm
🥶
@prisma wave You have a central proxy right?
asskell
Is it supposed to download the html document of the selected path when you try to visit one of the repos? xD
Yes
It its pretty much doing that for me atm
Probably not
odd
ew maven
uh
bm what on earth is your nick
Well that doesn't point to a jar / pom so maybe not
Applicative
lemme guess... new lang?
No
Oh so it needs to specifically target the jarfile?
https://repo.aikar.co/nexus/content/repositories/aikar/co/aikar/acf-core/ like this or something
Nah I don't think so lol
Yeah, have a look at ReleaseArtifact / SnapshotArtifact
That isnt a proxied repo tho right?
ok full url says file not found
lmao
or not
the issues seems to be after a incorrect path was requested
otherwise it provides the correct file
sure you didnt
I am
why you on discord then
No but the path is the same
Why not
ah
arent you in a classroom
shitposting on helpchat > paying attention in class
ahhh wait
I found the issue
So for proxied content I need to use direct path without the snapshot/repository directories
weird
bm has left? pog
"Listening to Spotify"
he's learning why Haskell is so overrated 
It's not suicide if you yell parkour

How can it be overrated if there's about 4 people here that use it
Anyone know of a java / kotlin 2d graphics library that was made in the past century
For generating stuff similar to Barry level up images
Graphics2D is way too much effort

probably
🤦♂️
LOL
you should be in school
Literally am
Ah I saw that, isn't it more for scientific stuff?
yeah but you need to learn maths n shit
Yea it also includes image processing stuff but seems to also have stuff to simply just draw onto an image
bro
Wasnt dev den bot in f# tho bm?
ah lol
Decided to use a language that wouldn't make me feel guilty for a mutable map
lol
someone i'm talking to wants to learn to code, should I tell them to install eclipse?
Sure
(def state (atom {}))
``` 
Graphics2D
😄
🙄
Plus you can easily integrate with state of the art Swing applications!
swing 😏
Lol
Apparently that's "not idiomatic" 🙄 🙄
are u in the phillippines
if not, then its probably illegal
i cant tell if ur trolling sometimes
i gotta teach someone basic coding should i tell them to use maven? 
they don't need a build tool for their first steps
what about the throwing them in the deep end 
https://i.imgur.com/O1hAVpy.png unformatted code, let's see if this triggers anyone 🙂
beautiful
thanks!
You’ve received a free ticket to hell
Funny how IJ doesn't even let you go back to the case indent automatically
It has to either be done manually or formatted afterwards
Also, when on top
Wait a minute...
That switch is useless
Just do player.sendMessage(newLevel.toString())
Unless you know a way to have like 30+ different things happening at different levels then switch it is.
At least chain the cases
case 1: case 2: case 3: case 4: case 5:
player.sendMessage(newLevel.toString())
If this was Kotlin you would be able to use a range check in a when
E.g. ```kotlin
when (newLevel) {
in 1..5 -> player.sendMessage(newLevel.toString())
}
Also, 30+ different cases screams god method @pale shell
You sure your method isn't handling too many edge cases?
that's a debug message
it's gonna have a different thing there
I want it so at level 1 you get this at level 4 you get this at level 8 you get this so every 4 levels you get the next thing
Please don't tell me you're hardcoding messages
We do a little trolling
?
tnt will fix anything
like cases that are unlikely but still possible
Are you trying to hint at something? 
I don't know, just the gif is trying to hint at something
🙈 what are u talking about
idk it looks like it was built in eclipse also 
Spigot devs when they find kotlin 
yeah lol
ohhhhhhhhhhhhhh jeez
Lol didn’t see that nice one
ive seen people put even for listeners before 🥲
apparently adding one more letter is too much
You've no idea how much that fucking annoys me when people can't name shit properly
hes a kid that works on my modpack
he private messaged me that same problem
im like
😬
I guess he’s more competent in java
lol
You'd hope Conclure
Oh my god that's so cursed
nullable void
Yo
nullable void lol
Oy
waiting
I mean yeah but you : Unit and just type return instead lol
mfcmd
lol
i cant find it
❓
ask him
this is gonna be horrible code I swear 
been ""working"" on a rewrite for my (only published) plugin for almost a year now :kekw:
I barely have anything loll
oh boy
Fefo your name Emily or?
I wanna show ya'll the code I got but i'm scared it'll be roasted af but idk any other way to do it
Not legally yet but from now on yeah
Odin, best way to improve is if we bully you
the issue is, I've googled it and i don't know the way to do it the way I wanna do it
waiting for reply
oh believe me, all of us have been and are there
wat
hm is it just me or when hovering (not clicking) your name it says "copied" instead of "click to copy"?
(without copying ofc)
that
he says he has a github
enum LevelRange {
ONE(1, 3),
TWO(3, 6),
THREE(6, 9);
}
switch (range) {
case ONE:
etc
}
🤡
you can do that frosty??
Is the guide not good enough?
Can you seriously do that??
I mean you'd need a method to check the actual value but yes
rewrite 🥺
works as expected for me fefo
Pulse uh maybe he’s afraid of getting bullied
player specific tab completions 🥺
Or like criticized
how hard would that be to implement frosty
you can't store numbers like that btw
UltraPrisonPlayerRankUpEvent
you need more words such as Premium, Deluxe, Api, Extended, Impl, etc
it won't let you put it like that
LevelRange getRangeByLevel(final int level) {
LevelRange result = ONE;
for (final LevelRange range : values()) {
if (range.low < level && range.high >= level) {
result = range;
break;
}
}
return result;
}
what you mean fefo
cleaner if you invert the check, but yes
make that shit static
That server is cursed
I didn't write the rankup event i'm hooking into
oh lol
Fefo, effort to write that in discord
facts
oh shit can i do this in kotlin??
KOTLINN
what does this have to do with kt lol
I might do this in kotlin
you mean the ranges shit?
ye
1..3? yeah
thats dope
Java 15 switch expressions 🥺
i mean... its cleaner in kotlin
Not really
Lemme give you a full class example, and you'll see you don't really lose much
Kotlin infers too much in my opinion but it’s ofc subjective
You can enforce strict mode
there’s explicit API mode that requires explicit visibility and return types
well yeah I can ofc declare the types but then it kinda removes somewhat of kotlins uniqueness compared to java
so just java :]
tho krypton fire
why thank you sir
i never knew kotlins only advantage is that it has type inference
Still better to type val name: String = "name" than public final String name = "name";
https://paste.helpch.at/atebajaced.java
public void something(final int level) {
switch (LevelRange.getRangeForLevel(level)) {
case ONE -> { /* do stuff */ }
case TWO -> { /* do stuff */ }
default -> { /* how the fuck*/ }
}
}
@pale shell
isn't this just a regular switch statement
you can do that?
Java 15
oh wait
frosty, I can't put the values in the int
it has ->
guess Java is improving
isn't that the same thing as :?
like I can't do ONE(1, 3)
Well did you make the enum constructor
No
whats the difference?
That's the range btw Odin
yeah switches require everything be constant
not in java 15 afaik
so 0, 4; 4, 9 etc
false
oh
frosty i can't do that?
wdym?
about time they sorted that then
Expected 0 arguments but found 2
kotlin when has no break 😩
good
also, thinking of Java, how’s that world generator going?
I mean have you created your enum properly
Kotlin when is a different beast
break bad
what
I thought it would just accept it, so no my bad.
break prevents arrow code
no
look
when stops when it matches a case
it doesn’t do a switch and continue trying to match subsequent cases
oh i think i got it now ty
lol
imagine saying when bad because u cant break from it 🤡
Kekw
when > switch
this is definitely a you problem dkim
Bardy, shut
I mean with switches you can fallthrough which is something you sometimes want to do
It's true though Frosty
Frosty not being able to accept facts smh
sure fefo
I mean yea I agree, but still, shut
instead of kt when ("a") { "a" -> { if (!something) { break } if (!somethingelse) { break } somethinga() } "b" -> { if (!something) { break } if (!somethingelse) { break } somethingb() } } doAfter() you have to do ```kt
when ("a") {
"a" -> {
if (something) {
if (somethingelse) {
somethinga()
}
}
}
"b" -> {
if (something) {
if (somethingelse) {
somethingb()
}
}
}
}
doAfter()
Lmao
AAAH
arrow code omg
but most of the time in my cases ive found the fall through to be worse
:sadge:
omg dkim u stupid
Dkim, you writing bad Kotlin code has nothing to do with the language
😂 😂 😂
how do i avoid it ;-;
yes ik
what the fuck is a stopship in java
bump
...
make a new function?
._.
i dont want to have a billion functions just for a when statement
FUNCTIONS
bm
nvm
🤔
lol
well
we were just talking
casually
right
and then i pasted this:
import Data.Char
p :: String -> IO ()
p ip = putStrLn $ fc ip
main = do {
r;
}
r :: IO ()
r = do
p . g $ m gl
gl :: [String]
gl = c "ghi" (-6)
g :: [String] -> String
g = head . tail
f :: [String] -> [String]
f i = filter (v) i
fc :: String -> String
fc st = filter (ic) st
ic :: Char -> Bool
ic ch = ch /= '\''
m :: [String] -> [String]
m i = f $ fmap (\x -> x) i
v :: String -> Bool
v _ = True
c :: String -> Int -> [String]
c i cf = (\x -> show $ chr $ ord x + cf) <$> i
one hour ago
this was the response
haskell scared them away
Give me a real example
yo frosty, if you see this thanks for helping with the code
Then what is the issue lol
i dont have random code with me
when(x) < case x of
what
btw guys, is this the best way to do it?
ONE(1, 3),
TWO(4, 7),
THREE(8, 11);
Or do I need like
ONE(1, 3),
TWO(3, 8),
THREE(8, 11);
?
However you like
