#dev-general
1 messages Β· Page 122 of 1
idk sounds pretty easy to me π
for (int i = 0; i < 10; i++) {
new Thread() {
@Override
public void run() {
calculate();
}
}
}
you got no excuses really
imagine sleeping
eat code complain repeat
Github packages wtf
Do you need to authorize to use a public github packages thing?
@signal tinsel yes, that's why no one uses gh packages for public projects
Lmao
good day all
Is anyone gonna be triggered a lot on this tutorial? https://www.spigotmc.org/threads/custom-entityplayer-class-with-skins-that-take-damage.437594/#post-3801219
well it's Java for a start lol
I was at first like "This tutorial is interesting, i need this a lot"
no the Java isn't that bad
the uneven indentation bugs me
public class DummyNetworkManager extends NetworkManager {
public DummyNetworkManager(EnumProtocolDirection enumprotocoldirection) {
super(enumprotocoldirection); // <-- this should be indented by the same amount as the rest of the indentation smh
}
}
```wtf is that
There's a lot of missing explanations on that tutorial actually
yeah this guy's just copy and pasted from his IDE and done no refactoring I bet
actually no because even then indentation would be fine
maybe he just writes like that
@Override
public void tick() {
this.getBukkitEntity().teleport(...); //make it teleport to a location
}
```that's straight copied from the IDE
anyway enough about the styling
what's he actually trying to teach
"Where texture is the texture" well nah no shit sherlock
that was harsh lol
also this guy doesn't know what πͺ πΌ is or what coding conventions are
Just observe all of the explanation, you'll see lol
just commented on it
told him to fix indentation and to rename variables to πͺ πΌ
Camelcase 
camelCaseLooksLikeThis
PascalCaseLooksLikeThis
snake_case_looks_like_this
three main cases used in programming
in Java/Kotlin we mostly use camelCase and PascalCase
I use MaDfIsHbOiCaSe
you use whatever the fuck case @hot hull
in Python they use snake_case a lot
and in C as well
C# uses PascalCase for methods which is really fucking weird
varies between language
Thats because C# is considered closer to java
Java doesn't use PascalCase for method names though lol
PascalCase on method names just looks weird imo
probably because I'm used to camelCase
Yea That lost me a lot of marks in my unity exams
Unity's in C#?
yes
also who has a Unity exam
they grade you on convention?
ofc they do lol
ofc not, the default functions use those conventions
we get taught Python at my school
You guys forgot js ._.
IDLE?
My school only grade how functional it is π
I've asked for IntelliJ many times and they don't even say no they just don't respond
update funtion in unity would be Update() while I kept overriding update() in all classes
This is on paper
so
no IDE to correct me
Why the fuck would you write code on paper lmao
Exams
My so-called "I.T" team consists of one guy who's employed under the title "Desktop Support", because people are so stupid that they can't even navigate around fucking Windows 10 or use a projector properly. And the the other guy is the Sys Admin for the academies trust.
You shouldnt always rely on the IDE to hold your back
How is it not
https://uk.linkedin.com/in/oliver-draine-a4810b66 this is my fucking Sys Admin
Well no shit, but you won't be coding without an IDE now will you
I love how that allows you to find out the area that I live in and the school I go to lol
I can't even compile Java on the machines
lol
there's no software that'll do it
PyScripter is the portable version so it doesn't compile Python on the actual machines lol
it's just a piss take
Tbh Java has cost me a lot of random marks
I used a new keyword to construct object in a C exam
Java's kinda easy
Its not a java exam tho
Nah
Im still learning C
first thing that comes to my mind when I think of creating a object is the new keyword so I kept writing that everywhere xD
use Kotlin so you can still kinda be familiar but get used to not using new
you still using Java btw?
Im using many languages?
Java, Scala and Kotlin
Scala π€
it's more functional
since Kotlin compiles faster and has coroutines
and other features
also btw just out of JVM languages for the minute, anyone here used Dart?
very briefly
in one of those coding challenges
i wanna do some more of them now lol
gotta use Dart for Flutter
Idek what Dart is
Dart is the language that Flutter uses, made by Google
it's pretty nice
I see
think it does more than just Android and iOS as well
though no one really uses anything other than those OSes
symbian
so bois quick question.. which version of spigot would you guys recommend to do a server? (any version that supports viaversion etc..)
Paper pft use good ol vanilla 
it's just paper
It came to my attention that newer versions may have more features.. ex. deluxemenus has more features in the newer versions
1.14.4 I use
the "spigot" was dropped from paper a couple of years ago π
oof
You should choose depending on the specs you have I guess
I am outdated
yeah but newer versions are generally lower performance
Generally ye
so there's that to consider
Wouldnt go below 1.12 either
why?
1.13+ works better if you have enough ram
Get 1.8 
1.13+ is slower than 1.12-
@jovial warren thats the last version before a lot of the thigns were rewritten
yeah ik
You asked why
It works fine if you have a good enough server
true
64G dedicated server 
I always suggest going for 1.13+ or ideally the latest for SMP servers, 1.8 for KitPvP or PvP-based servers and hub servers, and 1.12 for prison/skyblock servers
why does one need a 64 GB dedi?
You donβt lmao
unless one owns a large server
I have a 15GB 1.15.2 server, runs fine till like 30 players
yeah 1.15.2 is crap for performance
Facts
My survival on 1.15.2 ate shit at 20 players all building fucking cactus farms and shit
sounds about right
1.7.10 is so good with performance
even with mods
until someone I know logs on and builds some monster machine
Yea I had a dude build a laggy restone piston build, server crashed in like a minute
Fr I donβt understand why people do that lmao
They just build laggy ass shit itβs annoying lmao
I mean he wasnt tryign to build anything useful
it was litrally a whole bunch of pistons
I logged on one day to find some dickhead built like a contraption with item frames, moving doors and pistons the minute you loaded that chunk, the server crashed even with 10g ram
Mightβve been 15 actually
how to give permission of guishop help plz
how to permission mod use
so I was thinking on using a 1.12.2 paper but my friend is saying maybe using a plugins so that 1.8 can also join may be a little bit sh@ cause lag and some other compatibily issues
is that a fact?
or just some random things he's saying?
?tryandsee
Mostly though ViaBackwards should be fine, I've never had any issues with it
anyone have a library of bezier path in java?
Bezier?
that's the C++ version ofc
https://stackoverflow.com/questions/878200/java-curve-fitting-library apparently Apache Commons Math can do the curve thingys
is like that i guess
the idea is when i add some points he gives me a set of points that forms a curve path
Pretty sure Yugi is very good with this kinda stuff
@old wyvern
he'll appear
if there isn't an existing pure Java implementation and you really want this to work you could always make your own
obviously i will need to adapt to my project but create one from scratch ..
yeah might be a bit complex
#bot-commands you can type =level, but level != tier
You get Tier 2 at level 10 I think it is
so i was wandering if someone can tell me how a vps host works as in like the little box where the internet is and people buy webhosts for minecrraft serverr im wondering how they get the internet to be fast do they all have their own seperate routers or what?
VPS' are basically glorified virtual machines
they all run on the same physical machine, but use different networks, and so have different IP addresses
both VPS and web hosting are shared
ah okay
Where is the correct place to ask to hire someone to design "phases" for a oneblock server? (phases are which blocks/entities will spawn, and what will spawn inside chests)
Besides in #727778089857187861
(Like forums and such)
@hot hull Did you test the inventory types on your fork?
Like, setting items, interaction with the fillers, interaction with the invalid slot?
@jovial warren
Was asleep welp, had to wake up early today- I have my course registration in a few hours.
@tiny flower
By bezier path I assume you mean a bezier curve with n control points.
You can just use the generalized equation of a bezier curve to calculate that.
which would be:
f(t) = sigma(r = 0 to n){ nCr * (1 - t)^(n - r) * (t)^(r) * point[r] } where n = (no. of points - 1)
Here's a simple implementation I wrote
https://gist.github.com/Vshnv/691ce20fd16c082f6f7b2b35e9739eef
@ocean quartz Yes
@old wyvern what i think is that what i need wtf you're a god!
its hard do adapt to 3d?
according to this
is like that?
Should be easy to adapt to 3d
Just set the point array size to 3 and add the func w.r.t z too
is like that?
http://prntscr.com/tbl936
@tiny flower
Almost yea, just make sure to add another element topointwhen instantiating it
yes xd i already added
Alrighty that should be it
you helped me a lot! thank you.
you're welcome
@old wyvern Hey u already help me a lot but a question, is possible for the spacing between points always equals? http://prntscr.com/tbloe3
In this case, instead of saying how many points I want, he would get the points he thinks is necessary
thoughts?
Used it to make this https://streamable.com/ew6hk
Emulating how Mercy's (from Overwatch) healing/damage boost beam works
@topaz bay your wave moves when you're still, how did you do that?
That beam uses 3 control points
that stationary party, a point right in front of my face, and then a third one that is being constantly pushed forward and back from my face
oof
kek
Sx, any suggestions as to how would one clean this up kek? (Just like when it comes to organisation) https://paste.helpch.at/lumufisoke.java
you can divide by modules
fucking gross
Exactly, so suggestions?
public boolean isBanned(FPlayer player) {
for (BanInfo info : bans) {
if (info.getBanned().equalsIgnoreCase(player.getId())) {
return true;
}
}
return false;
}
``` btw u can use lambda
public String getRule(int index) {
if (rules.size() == 0) return null;
return rules.get(index);
}
``` ternary operator: rules.size() == 0 ? null : rules.get(index)
Not my code, I wouldn't be asking for suggestions on cleaning up since I'd make it clean from the start
ofc
Contemplating life decisions
private int getChestSize() {
int size = FactionsPlugin.getInstance().getConfig().getInt("fchest.Default-Size");
switch (getUpgrade(UpgradeType.CHEST)) {
case 1:
size = FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-1") * 9;
break;
case 2:
size = FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-2") * 9;
break;
case 3:
size = FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-3") * 9;
break;
}
return size * 9;
}
``` U cane store `FactionsPlugin.getInstance().getConfig()` into a variable
most of the code is getters and setters
342 π
Ok yeah DI container π
342 π
@hot hull lel
I mean it's all static so :kek:
It aint really a singleton
Like 10 classes tops use actual DI, the rest just access everything statically
Probs gave up with DI and went with static
It aint really a singleton
@heady birch ??
its just a static getter really
@hot hull how much does the project mb?
Probs gave up with DI and went with static
Me sometimes
its just a static getter really
@heady birch with an instance right?
Without shading it's 1.2mb, with shading it's 9mb, since it's a chonk
What dependencies does it use
so big O.o
I mean I kinda feel him since with larger projects DI doesn't really help all that much
how i get developer tag in helpchat?
all my projects are private :/
Disgusting
Frosty you 4head
i will not put public of course xd
Frosty are you making a factions plugin
Frosty if you have a big project, you should probably use guice
guice is evil
What isnβt ?
I'm cleaning it up Niall
All those cmds though
Guice is stupid
Not really
Its not stupid, it serves its purpose well
It's alright unless you got a 5mb upload limit
But its evil
PicoContainer
I mean when the code isn't performing as well as it should be, it's a sign
Yes Niall
π
Frosty is the source open?
I mean your faction plugin?
I'd sooner die
Sounds fun
The things I've changed aren't, no
Oh you forked it
yessir
Hmmmmm
Something seems wrong here
Maybe I'm tired and going crazy, but one would expect those to be the same fucking things
@old wyvern Hey u already help me a lot but a question, is possible for the spacing between points always equals? http://prntscr.com/tbloe3
In this case, instead of saying how many points I want, he would get the points he thinks is necessary
@tiny flower
Sorry was a bit busy with my pre course registration stuff.
Since we have n control points, the integral to calculate the exact arclength to get that would be impossible or very hard at least to the point where it wouldn't be useful, the workaround would be to approximate the arclength corresponding to our input t.
Basically we "cheat" integration and switch the integral for a sigma and our derivatives for relatively small changes thus just having us do a sum of the small changes instead
I revised the gist, should be fine for the most part now, The result is ofc not perfect but its fairly smooth
https://gist.github.com/Vshnv/691ce20fd16c082f6f7b2b35e9739eef
https://gist.github.com/Sxtanna/5c0ed9de175a7b417198e493dd6db5c1
@topaz bay
Ayy Nice!!
What project was the bubble thign for?
It was just a part of a testing module in my industry plugin
I was doing stuff and then I got bored, so I decided to figure that out
I see
oh hey someone I'll get an honest opinion from
two classes from my simple framework I've started working on
feels bad
[10:59:56 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[10:59:56 WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[10:59:56 WARN]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[10:59:56 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
[10:59:56 WARN]: SLF4J: Defaulting to no-operation MDCAdapter implementation.
[10:59:56 WARN]: SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.
imagine not using an slf4j impl
logback-classic
The things I've changed aren't, no
@hot hull Legal time
Show me the source
Oops correction, under the GPLv3 license you are legally required to show me the source
Ok I want a lawyer π
ya gotta show the source if it's GPL Frosty
I couldn't care less honestly, so π
Damn
can anyone help me in #general-plugins
lol
hater.
@topaz bay what plugin do you use for the syntax coloring?
Ah I see
wait what
(its basic in file sub matching, no intellisense involved)
oh
still kinda fire
π
I really do wish if IntelliJ has a keyboard shortcut to import all at once
Eclipse has it
The class import
Just turn on optimize imports on the fly
If it can import something without a doubt, it will
It already imports everything when you auto complete a function name or something too
Why sometimes when I add a dependenci it doesnt recognize the class at first, but only after I type it name and press import?
wdym?
I type the class name and it's not suggested on that thing
uh might be coz it was still indexing
Idk tbh
Not hot
Your idea of hot is kind of meh
My idea is factories builders and constants π
Your idea of hot is trying to make everything look like spring
Which is terrible
You just jealous
E enum?
yes
nope
@topaz bay Should kotlin files with multiple classes be named with a lower case?
technically, they tell you to name those classes what they do
I use lowercase because it makes more sense to my brain
ah ok
You ever type in a random number and get some medical disease thing
no?
You ok niall?
ncbi dont like me
Ncbi?
https://img.bristermitten.me/idea64_PpQdOABtF4.png @topaz bay weak
ugly
What is __upon?
a massive hack
it stores the object that a function is being called upon
Type ina random 6 digit number gOOGLE
so in this case __upon is type
because it's not this
__upon is better than this?
I prefer "Me"
In what world lol
Like in VB
:)))
Thats only because you defined the function as a property in kotlin
Me.age
When the analog would be a function inside of the test class
true
Me.age
but since there is no default value, it's implied as something you would pass
ah fine i'll use this
looks nicer anyway
Like in VB
@heady birch π
Dont be rude with sergent ball
For some reason my system picks up the local air ambulance as police
then flicks to helimed when they send their identity
Seems fine for me
specialist aviation services
Niall, can I say it?
for now
No you cannot
imagine not having this
Lol the systems correct
I am genuinely happy with the progress I've made on Odin
It is now the most complete language I've ever designed and written
Odin is still trash though
If Odin is trash Frigga is shit
That logic seems flawed
I want a clean fight ladies
Well let's face the facts here
Yup
Odin has a few keywords
Djinn is the new og
Frigga has this
Dying
Also
Lets face a couple of more facts
Guess who I found
@old wyvern I propose an alliance against Odin
Frigga has
this
@prisma wave you mean __upon
Odin was written entirely by hand, with no reference, and 0 help
BM, since you stopped learning Slovenian, I'm sorry but Odin is better
Frigga uses a generated lexer and parser, uses components "inspired" by odin, and is TRASH
so
You stopped posting updates atleast
I think I win by default
Djinn doesnt, but on the other hand its only a lexer rn
Hence my assumption that you've stopped
If I wrote the lexer and parser myself would it be better?
untouched odin
^
Yes....
The lexer and parser is like 90% of the work
They are a combined 2.5k+ lines of code in Odin
@hot hull tbh I did lose my streak but I will still be able to introduce myself in like 20 days
You better be
Its fun
Cause you can
Instead of using an INDUSTRY STANDARD for language parsing
It's not like he has anything better to do kek
Its not reinventing the wheel
I think its more about learning how to do something
Than making something else do the work
I mean... I already knew how to do it
Its much more sane for me to write the lexer and parser by hand
I could do it, it's just effort for very little reward
To know how every single part works
I mean... if its effort, you cannot possibly claim that frigga is better
She has no SOUL
π₯
She is but a repurposed machine
fight
I mean... I already knew how to do it You havent implemented an actual parsing algorithm right?
That's rude
BUT TRUE
I have put a tremendous amount of effort into the runtime
True what?
I just cba to do parsing
@old wyvern It probably would be able to be defined by certain algorithms
There is still more to learn
I just dont know what it would be
Always is
Lol
After googling, it seems the term that fits closest is a "pratt parser"
Yeah, this looks about right
lol
why you guys in competition over who's language is best
personally I believe that working together is always the way forward
@quiet depot isnβt this useless? https://github.com/PiggyPiglet/Framework/blob/master/core/src/main/java/me/piggypiglet/framework/utils/ReflectionUtils.java
Itβs a really nice fw though
what's it better than?
Kotlin is still π
haha lol
π
I don't need counselling, I already get Psychotherapy
Kotlin still π
Nope
lemme take a look at this syntax then
Syntax ain't everything
True
It's better than Frigga
still agree that Kotlin is π ?
Scratch is better
https://github.com/SoftwarePantheon/Frigga/commits/master this is funny lol
vest language is Minecraft Code Builder
git config --global user.name "Your Name"
git config --global user.email "Your e-mail address"
assert not null smh
You DARE to blaspheme
!!!!!!!!!!
Professor Sxtanna over here with his big words
you realise "blaspheme" means "speak irrelevantly about God or sacred things"
I am well aware of the definition of blasphemy
!! is never okay imo
https://github.com/SoftwarePantheon/Frigga/commits/master this is funny lol
Blame windows for that
No
I got sick of having to restart every time for dual booting
Giving windows another try
Linux > Windows any day
@topaz bay it will always be present, I just couldn't be bothered for a full blown null check
and Linux > Windows is very much subjectively because I much prefer free and open-source over proprietary
I love watching you guys do this
Imo !! Is fine if you can guarantee it will never actually happen
That's kinda the point of it
I'm like π€ yes, I definitely know what you're on about
!! was put there for lazy, sloppy coding, to just be able to put that and be done with it
and accept the consequences of an NPE being thrown if it's null
No, its not fine
If you want to assert non null, do it properly and with context
use requireNotNull or checkNotNull
oh fuck
I just realized I forgot to update the type
and accept the consequences of an NPE being thrown if it's null
Afaik the intention of !! Was to manually cast to a notnull type when the compiler can't smart cast
requireNotNull is just as bad imo as it's still not handling your nullability, it's just improving readability a bit
then why's it an Optional?
@jovial warren it is 100% handling nullability
The issue here is that !! does nothing but throw an NPE
then why's it an
Optional?
@jovial warren ?
Using require or check gives context to the null assertion
wdym
it wouldn't be nullable if it was definitely not going to be null
Imagine knowing what the fuck these three nerds are on about
three nerds? I'm just the idiot stuck in the middle lol
findProperty is a glorified Map.get call
But the contract of the function is that those properties will always be present
so isn't there some sort of not null call then like there is with getValue()?
I prefer nullable types to exceptions, gives you more possibilities to handle it
well then why ain't you handling it
because it will always be present
always will it tho
yes
it wouldn't be nullable if it's 100% always present though because that makes no sense
as I said
The contract of the function is that those properties will always be present
They are integral to the actual functionality
how do you know that in every context of that program running those two values will always be present?
val map = String[Int]
map["A"] = 0
val value = map["A"]
Because I know the code that I've written
You know
As you read that
value will never be null
You can see that
because its right there
The compiler doesn't know
but in a map you'd use getValue() which throws a NoSuchElementException if it's null
You would not use getValue
I prefer nullable types to exceptions, gives you more possibilities to handle it
asserting not null and throwing an NPE if null leads to arbitrary stack traces
what?
micro brain in action here boys
lol
what does that even mean lol
I'm not advocating for the not null assertion operator, but you are just wrong here
yeah I can kinda see that now
the context is a completely decoupled structure
as usual I'm talking out of my ass again
There is no way that the program or the developer can strictly assert that the value couldnt be null
true
IntΓ©ressant
when it goes to call a function thats defined in a class, it uses the instance as the context
instead of the global program context
Reusing the logic of the global scope to making internal trait/class route command able to lookup properties and functions
π
That's probably more elegant than how I've done it lol
it's sx BM
overriding the lookup logic to search both this context, and the context of the super types
Its kinda beautiful
elegance is like his middle name
context
Made it a lot easier to just shove class instances into the current command design
Anyone know some good free-to-use remote desktop software?
vnc server/viewer
@quiet depot isnβt this useless? https://github.com/PiggyPiglet/Framework/blob/master/core/src/main/java/me/piggypiglet/framework/utils/ReflectionUtils.java
@steel heart look at dev branch for up 2 date stuff. and no, it's not useless. this:
field.setAccessible(true);
final Shitter shitter = field.get(shit);```
==
final Shitter shitter = ReflectionUtils.getAccessible(shit.getClass().getDeclaredField("shitter")).get(shit);```
shit
I mean you could eventually do something like (Field field = Some.class.getDeclaredField(βfieldβ)).setAccessible(true); or am I wrong?
you're wrong
Wait let me check my class
I mean you could eventually do something like (Field field = Some.class.getDeclaredField(βfieldβ)).setAccessible(true); or am I wrong?
setAccessible would return void so you would be unable to get the actual object
I mean if one liners is all we're after, that class is technically useless, as I have my generic builder as an alternative
link?
shitterField?
GenericBuilder.of(() -> shit.getClass().getDeclaredField("shitter"))
.with(field -> field.setAccessible(true))
.build();```
I find GenericBuilders useful but isnβt that a waste of consumers ?
Isnt that the same as just having
final Field shitterField = shit.getClass().getDeclaredField("shitter");
field.setAccessible(true);
final Shitter shitter = field.get(shit);```
Except with unneccessary lambdas?
val field = getDeclaredField("field").apply { isAccessible = true }
``` π
tbh, now that you've got me thinking about it, I'm not a fan of the generic builder anyway
I implemented it because builders in general are nicer to use, but it's kinda a code smell
That actually looks pretty nice Sxtanna
slow
Less than a millisecond is pretty fast to me xD
Piggy I like generic builders but it feels kinda overkill sometimes though
Also yeah that getAccessible is probably not useless my bad but I used to do something like ```java
final Field field;
{
(field = Some.class.getDeclaredField(βaβ)).setAccessible(True);
}```
There is literally no reason to write it like that ^
Why not
why?
anonymous block bodies are bad design
I mean Iβd do that instead of later having to invoke #setAccessible(true)
doing that later would be more concise
There is no reason to crunch those 2 lines together
I dont see how not delaying the call is mutually exclusive to using a block body
I think I just did a bad language thing
Yugi well that would be instead of having a helper class
But still there is seriously just no point in doing that
what are you even trying to save there
1 line :0
What does that one line provide you except less readability?
Why would you think compactness is desirable?
I've ran in to what looks like an unsolvable problem
lemme try and explain: basically, I want to run code for a few different cases, here they are:
- There are no channels in the guild
- The user is not in a channel and neither is the bot
- The user is not in the same channel as the bot, or the user is not in a channel but the bot is
- The bot is in the same channel as the user
#4 is fine because it's just checking if the user's channel is not null and then connecting the bot to the same channel as the user
#2 and #3 is where I get issues, as the way I get the channel to connect the bot to is by getting the channel the user is in, and I can't find a way to get it otherwise, meaning I cannot check if the bot is in a channel if the user isn't in one
and since I'm using Spring there's no possible way I can think to give ConnectionService the guild, since I can't create a bean of a guild because JDA handles guild instances
You're overthinking
wdym?
I can just tell
what do you think I'm overthinking?
every part of this
well what do I do about it?
Think about what needs to happen
Break that logic a part
And solve it part by part
Do not try and force fancy syntax or make it overly concise
Solve the problem.
@hot hull Copy your code, delete your fork, fork again, paste the code back in, PR and I'll merge it/
How about you just copy those 3 methods I changed and put em directly into your repo ;C
I've been quiet here recently
You've missed big progress dude
Then you won't be contributor :c
Oh? Let me look at the chat history
lies
I mean you can just manually write down that I contributed
Yeah but you won't show there on Github
Meh no worries
That, and Odin now has fully functional traits and classes
Which means I can start on a standard library
anyone know a good way of globally caching values that can be retrieved or updated from literally anywhere in the project?
wait this is why I fucking depended on Spring redis configuration
Maybe caffeine?
I mean you can access any cache from anywhere, just inject it
Also, Sx, when is it going to be ready to use? π
true Matt
@heady birch you ever used Spring Data Redis before?
you're probably the most likely to know how it works lol
I have not im afraid
@ocean quartz I mean... After this next push it should be fine
I might add support for using it with the Java script engine api
That could be fun
does odin have annotations
Absolutely fucking not
Nice!
I wanna try it
And haha, you touched on one of his most hated features xD
I know thats why i said it
I am truly insulted by such a scenario
who is your programming idol
Me, myself, & I, (probs why my code so shit :kek:)
Is there such a thing as a programming idol?
I have a question for you nerds
yes
Do you think when it comes to numbers and math, should be the values be coerced to the highest operand type
Or should they strictly acquire the type of the right operand
I hate you.
none of this byte to int stuff
none of this internal casting
just do the stuff on the data type
huh?
byte a = 0;
byte b = 1;
byte c = a << b;
none of this
byte c = (int)a << (int)b
Yeah no, thats not what I mean
highest precedence
ok
How do I define precedence though
as in?
Do you mean how you would want to order it or any issues with structuring to that?
like for example
val a: Float = 1.0
val b: Double = 2.0
val c = b + a
Should c be double now, because its the larger type
or should it be float, since its the right side
Now apply the same thing to the whole numbers
For context, all numeric values are coerced to doubles before any operation is applied
Since you already hold it as a double maybe convert it to the smallest type that can hold it in its specific type
It just doesnt have coercing between whole and decimal numbers when passing to functions
I think unless specified it should coerce
Like unless you do val c: Float = b + a
lol
i need 24 bit
Lol
Its used for booleans
yup
That's fair xD
add some cool data types
odin has no nullability
odin has no nullability
@topaz bay
That might end up being quite a constraint in some cases
I have no issue with that
Absence of data in odin is represented by kotlin's Unit
which has its type asserted as "All"
so like Any or Object ?
sure
That feels wrong
Well you technically cant come across it using purely odin code
The only one to achieve a value of Unit in odin is through the result of a call to jvm code
Is Nil like, empty?
What is the fuck is this?!!!!!
Yes
Nice i like that
It only exists on properties before they are initialized
wonder if you could do some cool thing
extension functions on the data types
yeah
can you do static extension functions?
Holy fuck
The people who set the answers should die
The issue was that the last line shouldnt end with the \n with println adds but all other lines should

I mean, you could use a StringJoiner instead of a for loop, no?
not entirely a fair comparison but kotlin still better
That is idiomatic java string creation code
vs idiomatic kotlin string creation code
They could also just concatenate the raw values instead of using a builder
String.format("%s.%s(%s)", obj, method, String.join(",", args))
(it would compile to a builder anyway, but still)
@old wyvern sx noob
π
Even using format syntax (which is very slow btw) in kotlin would look better
"%s.%s(%s)".format(caller, method, params.joinToString(", "))
lol
is strong format good for anything at all?
StringBuilder builder = new StringBuilder();
builder.append(obj)
.append('.')
.append(method)
.append('(')
.append(String.join(",", args))
.append(')')
Question
is there any way possible to execute code in between when the server shuts down and when it turns back on?
You could start another process possibly
I feel like ill run into issues if I try and replace the server jar while its in use
You absolutely will
Whats the best thing I could do rn?
Oh no
@obtuse gale experiment with starting new processes onDisable
Might work, might not
alright
I still need to find a way to get the server .jar file name
couldnt I like
make my plugin onDisable run another jar (thats not a plugin) and that jar does the ol switcheroo with the server jars
or is that overcompilcating it
In theory you could get the CodeSource of a spigot class to get the spigot jar
I'm not sure how well that would work
But theoretically it might be possible
anythings possible
val process = Runtime.getRuntime().exec("java -jar FuckYou.jar") couldnt I do something like that?