#dev-general
1 messages ยท Page 211 of 1
@ocean quartz That's illegal
I will use this method in more than 1 clas
@obtuse gale Why?
Seems like a lack of SRP right here
Single responsibility principle
?solid
What is SOLID?
S - Single-responsiblity principle
O - Open-closed principle
L - Liskov substitution principle
I - Interface segregation principle
D - Dependency Inversion Principle
If you wish to read up more on it, you can check here:
https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
Check the first one
Anyone knows where on IJ can i change the auto generation of the annotations?
It always does final @NotNull instead of @NotNull final
I mean technically that's correct
@ocean quartz why must you do this to me
It's not gonna be like that, was just a joke xD
Phew
It's ugly
like blitz
:blobpinged:
@NotNull final Type name
for parameters
@NotNull
private final Type type;
For fields and
@NotNull
public Type getType();
For methods
Yeah well my way is more reliable
How is it anything about reliability? It's preference
It just is. And I have a medical condition so you cant ask that
I mean style-wise I usually stick annotations on the same line as params fields etc. Methods & classes are on a different line tho ofc
I think my preference is multiple in parameters with spring mainly
public String someRoute(final @PathVariable("varA") String varA,
final @PathVariable("n") int number) {
}
vs
public String someRoute(@PathVariable("varA") final String varA,
@PathVariable("n") final int number) {
}
I prefer ```java
public String someRoute(final @PathVariable("varA") String varA,
@PathVariable("n") final int number) {
}
Put that in showvase
no
Me wondering why i am getting this error and then realizing this is Java and being sad
Kek
How similar is c++ to java
@steel heart and since it was your idea @heady birch don't miss use showcase
They are JEALOUS
@ocean quartz Maybe we should add a "polls" channel for genuine "polls" so people can "vote"
Can always ask Cube
Collaboration channel would be nice
What would it do
Find collaborators obviously
okay so guys i have issue with JavaScript if i have array of some stuff
var images = ["1.jpg", "10.jpg", "11.jpg", "12.jpg", "13.jpg", "14.jpg", "15.jpg", "16.jpg", "17.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", "7.jpg", "8.jpg", "9.jpg"];
images.sort();
it doesnt get sorted:
Store the numbers only, sort it then append the .jpg
hm
any idea why php cant sort it either?
i've tried like 3 sorts in php and none of them could sort it.
since array is more like this:
Don't think any language will sort it the way you want, because to a string 10 is right after 1
oh.
i see
thats gona be hard to do then huh
hehe
got it working
๐
nvm
its still broken
Split the string and compare the numbers?
Split the string and compare the numbers?
@distant sun wouldn't work like you think if it's JS KEK
FUJCKING STUPID languaage sorts an array of NUMBERS alphabetically
sorting numbers.. alphabetically
Well but you can still make your own sorting method, dont you?
How do I decline someone's role request?
say no
Gn
๐
Gm
๐
Ge
๐
Aight added optionals now ;p
hot
very hot
RUST
rust ๐
https://www.youtube.com/watch?v=qDN7Z6d1qQA did anyone get the coding language reference here? ๐
There Is No Game: Wrong Dimension Soundtrack - My Actual Code - GiGi's song
Relive the best moments of the 'There Is No Game: Wrong Dimension' with this amazing soundtrack composed by Xiaotian Shi.
Included: GiGi's song performed by Julia Shields (Music by Xiaotian Shi - Lyric...
I might feel like it's Lua somehow
But I am certain that it's still in C++
Hold up a second.. just realized that's Basic coding language
ok
elara is on fire
๐ฅ
@normal talon why downvote D:

better ๐
:elaramoon:
Now where's my communist emote
sup
@distant sun making the extension
@onyx loom you were asking about jvm times vs native, while this isn't a very fair comparison (since elara is more optimised), a recursive factorial function in Elara vs Frigga is about 11ฮผs vs 400ฮผs
Yep lol
Oh was going to ask why "optimised" was a brit giveaway and realized it's with s and not z lmao
I use both
๐ฅถ
I use the 3 of them
The only problem i have with differences like this is that english has no vocal rules, so s can sound like s but also z in words that are very similar
In my language s will always sound like z if it's following a vowel and sound like s if following a consonants
Yeah it could sound like either
Speaking of either, how do you pronounce that? . _.
like ee-ther or I-ther?
I'm stupid don't look at me
Both are correct, i do the first
either is correct
Hahahaahaahahaahaahahhahhahahhhahahahahahahahahahahahahhahahahahahahahahahhaahahahahaahahahhhahahahahahahahahhahahhahh
Gif or gif
Gif
Totes
BM important question, how do you pronounce "schedule"?
Ooo interesting a had a brit in my class that pronounced it shed-yule
And nah, the way you say it is the american way
Probably yeah, north of england speaks weird af
the ones from london also speak so weird
Most British accents are weird
python is faster than elara ๐ฆ
it's true though ๐ญ
we don't like the cold hard truth
elara #1 fastest language is a lie? ๐ฆ
LOL
Trust me as soon as we switch to rust it will be different
Go is probably the problem
Elara is literally rust
You could build a converter that takes elara code, converts it to rust then compiles
Therefore rust but better
JVM is planned
We're just using an interpreter for now to make sure everything will actually work in practice
Exactly
Second fastest language ever
Hard to believe that we could beat C and Assembly but it's true
๐ค
๐
@pallid gale Still waiting for emoji leaderboard. emoji top 10 emoji users. emoji most used emoji per user. emoji top 10 emojis.
emoji most reacted emoji on message
The Emoticon "emoji"

Does it make sense for an optional property to have a default value? 
Instead of being empty by default
Hmm fair yeah
I guess i can make it default to the value but then if deleted after it doesn't regenerate
yeah that makes sense
no u
@ocean quartz are you able to alter the pathfinding of an pre existing entity like a villager 
I can't cast org.bukkit.entity.Villager to EntityCreature or EntityCreature
i also constantly bother you cause i know you know some nms
Wouldn't you need to cast to a CraftEntity (probably CraftVillager, idk) and get the handle from there?
Yea
EntityVillager nmsVillager = ((CraftVillager) villager).getHandle();
i am angy
what's the plan ๐
Well making an entity walk to another entity works
but doesnt work for block position
invisible armor stand
I believe you can spawn the armor stand without it showing for that split of a second
uuuh
T World#spawn(Location, Class<T>, Consumer<T>)
the consumer will run before it gets added to the world
so you can setInvisible(false) or whatever
BlockPosition straightup dont work when making an entity walk somewhere
lmao
You might wanna remove some of their other AI so they don't stop randomly and stuff
Probably but eh
ahahahahaha
I wrote this code in the most
garbage way i could
as its almost 4am and i am exhausted
yeah later tonight you won't even know wtf you wrote
https://hasteb.in/jumiduqe.kotlin like damn this code is bad i already know it
but it functions
Heh, late night is when i write the best 
See
Matt how bad is that code from a scale of 1-10
I wish I could still have your blue fefo
at least you got something out of it 

List properties support 
Reinventing yaml
Not really xD
It's yaml, just a lib to handle it, similar to ConfigMe, it has null safety, optional, bean properties, and keeps comments
Oh yeah ;p
anything that keeps yaml comments is a win
Anyone know how to install fivem in pterodactyl panel? i don't have experience with it so i need someone to help me out.
Noice, this is working pretty well, can even add separators
Fancy
Are you using snakeyaml @ocean quartz ?
Path comment locale would be nice
en_FR
๐คฃ
en_GB_isle_of_wight
that is very understandable
indeed
rough translation: "you are a big person from the isle of wight who is having children at some point"
Lol
๐
en_GB_yorkshire
U wot
My grandparents are from Yorkshire, easily understandable
They just say weird things
Like "lookya" rather than "look"
West country accent is the worst
Hot Fuzz movie clips: http://j.mp/1uwjDCy
BUY THE MOVIE: http://amzn.to/uoaVE7
Don't miss the HOTTEST NEW TRAILERS: http://bit.ly/1u2y6pr
CLIP DESCRIPTION:
Angel (Simon Pegg) and Danny (Nick Frost) discover a huge cache of weapons hidden at a local farm.
FILM DESCRIPTION:
A ...
aus accent >
an absolute masterpiece
@prisma wave Yeah snake yaml
@dusky drum I think i can release a snapshot soon but no ata for when it'll be fully ready
Path comment locale would be nice
@heady birch What would this be?
locale
how you doing comments then?
I only use it to read, writing is done manually
@prisma wave U got a min?
for what?
Some reflection help
I'm trying to change a private field boolean to true, however the class is abstract so I'm kinda lost
what's the problem?
Caused by: java.lang.IllegalArgumentException: Can not set boolean field net.minecraft.server.v1_8_R3.Entity.invulnerable to java.lang.Class
Code:
final Entity nmsEntityArmorStand = ((CraftArmorStand) entity).getHandle();
try {
final Field invulnerableField = Entity.class.getDeclaredField("invulnerable");
invulnerableField.setAccessible(true);
System.out.println("Initial Value: " + invulnerableField.get(Entity.class));
invulnerableField.setAccessible(true);
invulnerableField.setBoolean(nmsEntityArmorStand, true);
System.out.println("Finished Value: " + invulnerableField.get(Entity.class));
} catch (final NoSuchFieldException | IllegalAccessException ex) {
ex.printStackTrace();
}
(exception being throw on the first access of the field)
oop wait I'm sm0ll brain
why are you calling setAccessible twice lmao
huh?
You look odd smh
๐
Now how do I convert a CraftArmorStand to a normal one, my brain
Why are you doing that shit with nms
This is objectively wrong.
entity.setInvulnerable(true)
Upgrade to 1.12
LAFF
We dont provide support for 1.8 Have a Nice day ๐
Ah yes let me go tell the person who's paying me to do this to update everything to 1.12
Cause that's how shit works
Upgrade to 1.12
even 1.16.3 if you can
Fucking monka brains
๐
I mean the value should be reflected onto the bukkit armor stand
Imagine using reflection
I don't see why you should cast back 
You are changing the value on the nms entity reference itself, taken straight from the cb entity
Oh yea meaning I can just reference my old entity correct?
Basically frosty has 4head
and i 1eye
My brain ain't working today
i1i
Mad sus
ima vote you
Not to toot my own horn, but I've been working on a custom minions plugin and I gotta say, this shit is fucking awesome

You going to show a video or what
Soonโข๏ธ
public or privatE?
soonโข๏ธ 
private Blitz
thought so xD
You talk mad game for a dude that won't even showcase his project /s
OS Frosty
Today i dive into the bean properties 
Wahoo!
Tbh i could just use gson for it
Have fun playing with TypeTokens.
Ikr xD
Not even sure how I managed to mess it up but apparently GSON was messing with my TypeToken stuff to serialize and deserialize a list of UUIDs, and it would throw an "UnsupportedOperationException" whenever I tried to add a UUID to an "Abstract List" (Literally set it to be an ArrayList on both ends for testing) and I just changed everything to a Set and it started working again.
Don't you love it when you make an invulnerable armor stand and then you can't remove it with /killall all -.-
๐
And how am I supposed to get it's uuid..
/minecraft:kill @e[type=armor_stand,limit=1,sort=nearest] ๐
Not a valid type :bruh:
wat
what version you on
OH 1.8
AHAHAHAH
yeah good luck with pre 1.13 commands :kekw:
lol

@remote goblet "Ah yes I just started with NMS so I decided to go mess with the hardest things"
Great thinking
It's not, just tedious
> just tedious
As you properly experienced last night

The fucker sprinting for his life tho
Yeah they fuckin nyoooom
๐
https://cdn.discordapp.com/attachments/568501722537000980/771069414086541342/2020-10-28_17-50-27.mp4 heres a slightly higher bitrate version of it
still terrible bitrate
gradients are my thing
my gradients are better
So close to having this finished
Ofc you stole it from Esophose
wtf~?
have u tried not sucking
Does anyone know why it updates for that certain user, but not for other users?
suck a dick kaliber :)
delete that ayresia

and go to #development
okay brb
Saturation and looping ๐
My bad, thank you @static zealot
But certainly not enterprise grade
simply stole it from that
GradientFactory.createRainbowGradient();
HexUtils.colorify();
"colorify"
colorify
String.color() ๐
non stateful/text tied gradients
Int.color
Integer.color()
true enterprise decouplement
Smh Ori
the fact you could take the gradient system and "plop" it into any standard "awt" project
enterprise solutions
okay what random ass plugin do i make now
Ooo fancy
It's all abstract so I can easily add new cosmetics and minions
However fuck EulerAngles
Took me an hour to get this balloon right
lol
if the slayer minion moves his arm down does the balloon move with it
He also holds a sword
Make AJ Tracey skin
No clue what that is
Make AJ Tracey skin
@heady birch lmao
Dinner guest is fire
๐
@frail glade
Very nice.
Played around with having it animated, but it's just hella buggy cause it sometimes doesn't update the pose
So might need to do it with NMS to see if that helps
@frail glade
Hmm?
would kite board open source be good idea
I think it would, yeah.
Y'all can't handle that enterprise code.
Always OS imo
The amount of shit I'd love to os but can't :(
just do it 
ye just give me free code please.
That's also the reason why some shit is private, cause people would just Ctrl c and ctrl v
Like bruh take it as an inspiration, not a copy paste
who'd do that? I'd never
I wish @compact perch could be open source lol, I'm curious to see how the automod works
Cube says barry is a mess
Given how little d.js I know, don't really care lol
Barry coded himself
This Discord is so active that he just uses all the messages to neural network train his AI based on what people say they need help the most with.
Wait wtf
I'd be interested to see if Syscraft bot's AI could actually be decent at support lol
My messages just edited unedited and reditied
Reminds me of this lmao
Lol
Lol
Lol
Lol
Lol
Lol
Lol
Lol
Lol
Oh god
Matt you FOOL
You ruined it :/
I mean it started because of my post, i can stop it ;p
@onyx loom clojure moon
LOclock3
๐
You goddam idot how dare you!!!!1!!
funnycube to integrate sars photo uploading into barry
ELIF
developers will be like ew functjonal programming is gross I like Java streams btw
every developer born after 1997
cant ๐
hey >.>
canned knot
I hate java streams
But do you think functional programming is gross
I think it's beyond my understanding in most cases, when you're talking about langs like haskell
haha
I use functional stuff in js all the time
๐ โ
Pure Functional programming ewww
print :: IO
pure functional scares me so much
yo
callback hell
have yall seen that youtuber who just makes rants
F#
about how object oriented programming is the worst thing ever created?
No itโs not
His argument is flawed
it's hilarious
new_list()
add(list, item)
๐
He is like lol we can use switch instead of inheritance
ya his name is Brian Will
Just what the fuck dud
Golang
Rust does it pretty well
Youโre mentally not good then
Special enum
homoiconic == gay icon?
[] List<Any>
[]<>{List(Any: Object)}
dev general started off as "kotlin good java bad" and now it's just nonsensical rambling
I've wanted to look at kotlin for a while now but I've never gotten around to it
don't bother
It's lacking many "modern" features
kotlin good java bad
Such as print function and &'a mut
Java decent kotlin good Elera superior python decent C# good
๐ฒ
smh my head if you're not using clojure for everything do you really even qualify as a human being?
๐
lmao
smh my head if you're not using clojure for everything do you really even qualify as a human being?
@clear bramble well said
๐
๐
(defn main [] (println " "))
ร
imgur
jesus
int main() {
return Fefo.LOL_VALUE;
}
10k for kotlin ๐
Say what you like about Clojure but it's really very similar to elara
Clojure is too functional
That's the point
Itโs almost illegal
almost?
Not really
10k for kotlin ๐
https://i.imgur.com/A5dj8Mu.png
FP just needs a different mindset
elara mitten out here making an actual real programming language, tryna show me up with my shitty JS-interpreted LISPlike scripting lang
Anyone tried Deno?
Sign me up ๐ ๐
I don't think you understand how much I'm using js lang features, it's basically just a wrapper for JS with different syntax
every day there is a new spigot fork and js runtime made
I was really surprised to find out about PrismarineJS
Ok well now it can be a wrapper for Go with different syntax ๐
like, who does that?
Strange people
I cracked my phones protective screen :(
get a new one 6head
20$, cba
so can I bring up a random fun fact
no
oh
lol
As long as it's fun
this always seems to blow someone's mind, idk
the # in c# is just two ++'s from c++ stacked on top of each other
o
๐ณ
c# = c++? ๐ณ
it's c++++
That's it, @distant sun ban this man
I'm on it ๐
Hey I'm a woman
!ban @clear bramble
No
consider yourself banned
?
nOOOOOOO

That might be cโฐโฐ coz + isnt long enough
elara mitten claims another victim
toJson method, if null calls toJson if not, calls toJson 
Peril is the most geniousest person here, yโall got deefficienses or smtng
Time to start addressing everyone as an apache attack helicopter so I don't accidentally offend anyone
@ocean quartz recursion ๐
It isn't xD
yes , commonly H64
It's a dif method tho idots
IDOTS
It's just a joke btw
wha
thanks for clearing that up matt
It is the year 2022, slight_smile has been outlawed
๐
๐
๐ shoot me
no it's not 2022 yet
Oh damn Niall
showcase
๐ shoot me
@clear bramble
We dont do american here

LOOOOL

IntelliLara
๐ญ
ElaraJ
Niall what did you say? I can only see *******
IntelliEl
elara should have its own ide
Yeah was gonna say it makes more sense to be IntelliEl
Intelara
Ineltelarliaj
IntelliEl 2021 confirmed
import elara/ide
ide start
ide open "main.el"
Elera Earth
Elara.js
ElCharm
ElaraStorm
No
Elarn
Elara Dungeons
Elarm
elara discord api
yes
we need one
Ok
elaracord
make it a part of the standard library :)
learning java is one thing but implementing it is a another thing (sad moment)
Have you seen calculator
Since the Jetbrains IDEs are kinda puns, probably would be called ElAra
i did see calculator
Eleracraft
thanks
@normal talon I pray with you
๐
Since the Jetbrains IDEs are kinda puns, probably would be called ElAra
@ocean quartz
The Now
I don't wanna go to work today
we should make the elara discord api wrapper before the language is finished
as a fun challenge
I have to teach python, using turtle library, using trinket, which is so restrictive and I barely know how to use it
El ara ara
I will make a discord API
TURTLE
What we do def need is something similar to JNI so anyone can add native stuff from specific languages that it will be transpiled to
ENI
๐ข
i learnt that in like year 9 ๐ฅฒ
Actually I guess as long as we allow interop thats not needed
doing computer science in year 9 ๐ฅฒ
Make a brister mitten api also pls
yeah but I never really did python tho? I just did ruby/java/js in school and I've only scripted a few things with python outside of it
Make a brister mitten api also pls
@steel heart what would it do
@steel heart what would it do
@prisma wave get pinged
๐
ok
It would presumably control you bm
๐คจ
there are more effective ways of spreading the Elara message
Everyone could have their personal bm
@old wyvern I don't think namespaces & import declarations are parsing properly
okay someone needs to explain to me why @steel heart keeps saying "elera" and not "elara"
Good point
Elera is nicer in my opinion
There are no Elara minded people, Elara is the people
Only Elara exists
"Yugi" - 2020
write this down for the history books
The interpretter wasnt really initially planned remember? xD
Ah true lol
Fair enough
the infix parsing will be easier in an interpreted language tbf
Is elara compiled?
It will be
Elara should be taught in schools
lang tm
Go Land
But yeah I guess it should look like this?
With the parser
awesome
btw, again with the infixes - we could make it so you can only use it for the actual function arguments?
so list.map some-function rather than list map some-function
then there's no ambiguity
it's just optional commas & parens
Sure
Great
that solves the biggest problem
I don't think there's much else to consider?
I have a proposal:
let print-twice = (String message) => {
print message
print message
}
to become:
let print-twice = (message: String) => {
print message
print message
}```
possibly
idk
maybe just message String
Idk, personally I'm torn - we're using name: Type for variable declaration but I think Type name looks better for structs and parameters
And then it's inconsistent
name: Type
everywhere?
ye
hmmmmmmmm
Hmm so it looks like that uptime server placeholder bug has leaked into other placeholders on the server stuff too 
F
Might there be a better version of Java to use for MC servers?
For example, 1.8 paperspigot idling (with various plugins) is at 785MB RAM usage.
Plugin List before you ask:
I mean newer versions will likely be more efficient
But bear in mind that the JVM reserves ram I believe, and might not actually be using all of it
also kiteboard will east up ram like theres no tomorrow ๐
Rewrite it in rust :)
Niall give me kiteboard
can I have a discount since we're both rust appreciators
I'm joking ๐ It shouldn't use too much
Same
Might open source at some point so you could just mvn package
Aikar's Timings Viewer - View Timings v2 reports from Paper and Sponge
Is there an actual reason I'm missing here for these to be Integer.toString() vs String.valueOf()?
Wait niall are you the KB dev?
@frail glade they do the same thing afaik
Yeah
Bothers me that these are the only ones diff from the others, haha.
String.vakueOf is shorter
@lavish notch I mean, it says how to reduce lag if that's a problem
@heady birch Niall/KiteBoard
Contributors:
Niall
knightzmc
๐ ๐
I think Integer.toString only takes an int @frail glade
So it would emphasize more on whatโs going on
Hmm, okay.
Apparently we already had a PR open to fix these placeholders. Currently having them tested and if it works, I'll merge that and get a release going for the Server Expansion.
@prisma wave Using the suggest flags, RAM usage spikes to 2GB D:
Unless you're having lag I wouldn't worry about it
As I said I'm pretty sure the JVM reserves more ram than it needs, so ram usage isn't necessary accurate
jokes aside it's a pretty nice language
I was looking through the website & I'm starting to see what y'all like about it
like the null system makes a lot more sense
plus extending classes looks fucking fun
yeah that's probably the main reason to use it
you get used to it
but java interop so meh I'll give it a shot
Corountines
also apparently you can do kotlin to native?
Literally never used Corountines yet
so that seems neat
Yeah although it's in early stages
I mean corountines is nice
coroutines*
this has got to be the slowest project generation I've ever had lol
gradle loading?
yeah gradle downloading all the deps
yeah it'll take a while at first but then quick obviously
packages aren't as strict as they are in java
wait is kotlin not a semicolen lang? how'd I miss that lol
Sometimes those are undoubtedly redundant
99% of the time semicolons are unnecessary
for loops in java needs them
I mean as a line terminator
this stuff https://i.imgur.com/cybxu9S.png
yep
fuck kt is pulling ahead of java
Iโve always said that 
it's definitely more feature rich
I'm not a fan of the "magic functions" tho
magic functions?
idk what to call them
example?
mutableMapOf or?
System.out.println("Hello world");
``` vs ```kotlin
println("Hello world")
I wouldn't say they're magic
you mean like not registered to a specific class
like in java it makes sense, they're a method on the ConsoleStream class or whatever
the term is "top level"
yeah exactly james
i.e not part of a class
yea i love those lul
idk I find it weird
they're just functions that aren't part of a class
since kotlin isn't as strictly OOP
they're usually the equivalent of utility functions
dont they compile to static functions?
yeah
so you can define your own top-level methods too?
yea
hmm ok thats better then
if you ctrl + click you can see the definitition
You can also set the file name with an annotation
really?
println() in particular is just an alias of sout
Yeah
yeah @file:JvmName iirc
oh neat ok well that's a lot better https://i.imgur.com/iIEBYpH.png
interesting
kotlin has a lot of keywords
yeah I noticed that while I was looking through the docs
ok just for shits and giggles lemme try tossing one of my simple jda bots into that kotlin converter I know idea has
yea ive never seen that before
it's only really useful for interop
Will your config library be in Kotlin or Java
Java
well yea thats what its cool for lol
yeah kinda stating the obvious there lol
I do not like this Matt Monopoly






