#dev-general
1 messages ยท Page 133 of 1

@regal gale I hate you
just bullying us
Maven bad
sx can we get a week of you not being a bully
Gradle good
lmao
impossible
@pallid gale I am not a fucking bully
๐ค
A triggered one, that's for sure
Sxt is possibly just sxt

Yourself
The only person I really bully is Alex
That mcacutt guy
But thats because he deserves it
Just scroll in #development
You said to him programming isnโt for him 
I mean..
Btw
You could say that to anyone
You lack the ability to give constructive criticism, you instead flame people without actually suggesting how the problem could be fixed.
Ready for the next "try not to get anxiety" challenge?
I said they were weird
funny though itโs kinda good sometimes
@topaz bay ik you want it ๐
Because whenever you go with the nice approach they donโt even listen
sxtanna's constructive criticism is useful at times
@pallid gale That is just straight up false.
its just rare
If you only really look at the times I flame people, ofc youre going to believe that
When I tell people to do something, and they do the complete opposite
Only way to counter xy problemers is with Sxt style
Or completely butcher it
Thats when I flame them
Or when what they come up with is hilariously wrong
Then we just get oMg hElPcHaT sO tOXiC
Try to look at this screenshot for 30 seconds without getting anxious. Good luck
To say I am incapable of constructive criticism is just wrong
The only person I really bully is Alex
@topaz bay
But thats because he deserves it
@topaz bay
Wow
Thien u go away
@pallid gale people will say literally anything is toxic
Thatโs so true
Why do I deserve it :(
90% of the people who would say that are people who ask to be spoonfed and are rejected
@prisma wave Because youre short
Km how short are ya?
He's 4'7
I'm literally not
LOL
Kinky
gross get out
LOMS
lol not 6 foot
@pallid gale
Someone go bully Scholtes for saying kt is ew
Wait km 5 inches?
yes
You extracted that single message
5 inches and 11 smaller things idk the imperial system
I have to use a converter to understand ft...
How long is that in cm
You could screenshot the entire engagement
Absolutely no idea
5 inches and 11 smaller things idk the imperial system
@prisma wave micrometres
What I said wasnt even criticism

Nor was it bullying
2.5cm to an inch

It was a response to him commenting on me commenting
So 5*2.5
After I already gave him the better solution
t0ll
I think km just reached new heights
So y'all wanna switch to metric now?
my chromosomes
LMFAO
metric good
It's a bannable offence to use the imperial system here.
good
5 inches
Thats not even the good Thor gif
Ban him for real pls
Sxt is hcโs clown
@pallid gale @regal gale you're both haters


Sorry I don't speak feet
LOL
I'm 1.75 meters btw
what
If my calculations are right
150cm is like 5.4
Short
oh
I'm 1.82, how much is that in imperial?
Shame
6 foot frosty
tHATS 5'9
exactly i believe
180cm is 6 foot
Then how tall are you mr I'm a chonk @topaz bay
what the fuck
182 boi
since when
It matters.
sx short?
Oh km jk ur like frosty
@onyx loom Im pretty sure what its telling me is 5.9 feet and not 5 feet 9 inches
Damn sorry for being "short" time to yeet myself I guess?
@pallid gale nah
lol
I'm 6'9
Nah I'm good
6,9 inches
Lmao
Thatโs short
I just didnt want to sound like a giant
If you're 8'4, I know java
pls convert to the superior metric system
Take that nerd
6 foot 9 inches = 3cm
Yep
sx is short confirmed
wow 3 whole centimeters
classic sxtanna
I'm big tall
9/(6*0.5)
8.4 << 10
OFFTOPIC2
Lol
Wth
This is dev general stuff
What... is this
kotlin...good?
What is this
JAVA BAD
java....bad?
YES
eclipse...bad?
GIVE #dev-general
maven... bad?
absolutely
Yes
we segwayed it back fellas
Erm.. the channel name tho
Using lib bad, reinvent the wheel good
I just came back to see this
What a sad life
couldnt be me
slimey
Well the channel description is still here
imagine using up more time talking about kotlin rendering it useless
Please
than it would take to use java
kotlin good
or better yet assembly
@frigid badge You see... the thing is
Imagine using light theme
This is me who is triggered by typing letters instead of >>
WOW
Cube this is bullying
Even with all the kotlin shilling, were more efficient
Imagine having to debug or fix NPEs
Cannot. Relate.
I am one as wel now
imagine having types
@regal gale shl is infix
Imagine wasting time
Java type inference ๐
Lol
imma just write bytecode instead
Imagine imagining
Do it
imma just write bytecode instead
Yes thats the way to go
No balls
Imagine imagining about imagine imagining
imagine imagining about imagining imagining imagining

scala good kotlin bad
i swear discord purposefully made their discord light theme look terrible
Imagine imagining about someone imagining that you are imagining in your imagination
python is the real deal tho
Not in the slightest
def best language ever
@prisma wave do you want death?
Imagine not investing into HelpCoin
always
Thats a good way to get death
I mean kotlin is good but have you seen python
Fix that to deaf k thx
Funny there is no such way to obtain those yet :/

GoOdD
lmfao
y'all may be hating on java
but can we instead
hate on python together?
in harmony
No
Fuck Java
Is it stupid of me to actually do a py evaluation for my bot...
kotlin wouldn't exist without it
Bruh
Yes
Lol
don't do that
Thats not true
Nice post
so you have to have some respect for it
add a frigga evaluation
Kotlin was inevitable
Idk what frigga is ๐
the Language that works
eval bad
It's a great language
jetbrains wouldn't have been so big
Get fucking rekt Alex
jetbrains became popular due to java ides
Nah
Oh i see how it is ๐
eval = danger
and jetbrains made kotlin as an improvement on java
let a man fuck up his sentence smh
stop being nit picky
it isn't about if i have a s behind or not
And kotlin is not just an improvement on Java

It supports modern features such as broken for loops
@prisma wave very modern ๐
thank you
The only thing kotlin has thats even similar to Java is that one of the backends runs on the JVM
ok i wouldn't go that far
Almost everything else in Kotlin is derived from other languages
@prisma wave wrong
Frigga Bad, Odin Good.
Another try not to get anxiety challenge then? ๐
Odin trash
YES
Yes
WRONG
WHAT
I LOKE swift
Literally the only reason some parts look like kotlin are because you fucking gave me the suggestion to do so
False
How fucking dare you
Eclipse is best than IntelliJ because I've used it for 2012 and I want to stick on it forever! - quote from someone recently
Good luck
WRONG
Find the messages if you want
Anyway
effort
Needs to bamboozle himself
Figure it yourself :)
Just know at the end of the day
The REAL best language is irrevocably Haskell
Frigga cannot compete
Is it that spigot mod?
omg
No idea?
Are you on drugs???
No
How could you say such a thing
Haskell good kotlin bad
eclipse is better performance wize isnt it?"
D;
I think I failed your challenge
CRUSADE
Aj with the including horrible ui
just wondering, ive heard some people use that excuse
And the default white theme
I mean eventually they have a potato pc then
Kotlin bad
Random question, but in intellj is there a way to use the windows file explorer instead of the shitty built in one
@obtuse gale cuz thatโs not really true
What's wrong with the intellij one
^
its shit to navigate quickly
Only reason youโd want eclipse is the overall project view
How so?
I want my side bar with bookmarks
@topaz bay the only thing that disgusts me are non-haskellian languages
And perhaps to make other people triggered
Everything is presented straight up
Switch drives easily
a
Almost everything else in Kotlin is derived from other languages
Mostly seems to be from C# for some reason I think?
Oh wait
why would you want this
Are you talking about when you go to open things?
No just in general
So the sidebar?
Cause the sidebar isnt a file explorer
wut
The only place thats a file explorer is when you go to open things
And even then thats barely an explorer
I just wanted to know if there was a way cause I don't like the inbuilt one
What are you referring to though?
right
Yeah, its neither of them are file explorers
If you have where you want open in explorer already, you could just drag and drop it into that
And it will just go there
Just seems unnecessary
"Scala"
Eh
Looks like you know a good language when you see one
What could you be doing that causes it to be that much of a hassle?
I dont even think I ever spend more than like... a couple of seconds in that window
@prisma wave I have folders for a ton of shit
I just find it annoying, hard to explain but I like to navigate quickly
Haskell folder?
YES
praise the lord
fuck haskell
Oh wow, I actually do still have the compiler and everything
I keep all of my language tools in 1 place too
ayy godot user
fuck godot
xD
If I have an if it resolves it correctly, :what:
smh
Which is impossible
@topaz bay would u mind doing me a favour and deleting that Maven and Java folder please ๐
because of the elvis
Ahhhhhh
also space before elvis pls
yeye
@onyx loom thats my local repo and jdk installations D;
no excuses
you got enough jdks there
Yeah, and I'm gonna keep em
is router caching a thing? like a website works fine on mobile data, but I get a connection_refused when on wifi. only thing I can think of is caching
Random question but how do you guys work on a project through github with multiple people? Does one push his code and then the others start working on their part or how?
With difficulty, keep communicating and just push whenever you change anything (even if it's a small change), telling the other people what you're doing beforehand ofc
Mhm ok
Make sure everyone uses a different code style so you know who wrote what :p
or just put the author in the comments 
why code different lol
(That was a joke, hopefully you aren't gonna have 5 different code styles kek)
is there a single functional language that:
a) isn't really ugly or difficult to learn
b) isn't full of gimmicks
?
Clojure
clojure is literally all of those things

explain gimmicks
Soo, I just tested like 3 GUI libs, all of them suffer from the same issue mine does, items can be removed from it yikes
Spigot doodoo
how are the items removed? o.o
wait what
just gotta go fast
Basically you shift click on an item and close the GUI fast and you'll get the item
It's spigot 
The first one is using my Lib, the second one is using the IF lib
Try in survival mode
Time to implement IllegalStacks protection 
Creative mode inventory is very weird sometimes
How iffy would it be having a runnable running every second checking every persons inventory looking for illegal items
ew
I think the issue might just mostly be creative mode
I have had issues with it while using IF a few months ago
Hmm seems like in survival you get it but it's a ghost item, let me try more and see if i can be fast enough
I mean considering people have done it and still keep doing those things in survival, it's still oof
Alright that is much better, means i don't have to create a funky solution for this
Yugi you just saved me some headache
๐
wut?
full code?
well done
Jemand deutsch?
oui
oi
that's pretty hot
@prisma wave Ich need guidance
Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
๐
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
oof, spoonfeed, ktnx
km do you recommend any changes?
relocate 'kotlin', 'YOURPACKAGE'
}```
@old wyvern a reified extension for SQLRepository would be nice
so we don't have to manually use the ``::class.java`
Lovely
Can you explain what you mean km?
constructor cant be inline I assume
ohhh
Lemme give it a try
one sec
wait wouldnt invoke be called on a instance? hmmm
I guess I can just have a reified function constructing the class separately
nice
should work with noSQL too when its done but rn works with sql
you could have a reified pseudo-constructor though
I love reified
you could have a reified pseudo-constructor though
@prisma wave
Looking this up, one sec
inline operator fun <reified T> PDMExtension.Companion.invoke(): PDMExtension
{
return PDMExtension()
}
val x = PDMExtension<Any>()
``` tested it out
works quite well
Does that even need to be reified?
not in my example
oh ok
I need the Class sx
but for yugi it does
I was talking about what Alex put
yeah
ah
ah
that works great km! thanks!
how exactly does reified work btw? because I've looked it up before but kinda never understood it tbh
System.getenv("github.token")
- name: Publish to GitHub Packages
run: gradle publish
env:
github.username: Jaimss
github.token: ${{ secrets.GH_TOKEN }}```
this should set my `github.token` environment variable to the secret `GH_TOKEN` for my repository right?
reified means that you can access the class of the type
Hmm, sounds like I had to do some fixes for leaderboards. When I do time-ranges I do it based on literal ranges of the past 7 days vs adapting it to the days of the week.
@jovial warren reified works before the function is inlined
It basically makes the generic parameter an actual parameter of the method
inlined is compiler copy pastes
Also, I meant because* not before
the body of the function gets copied and pasted into the actual call site
@frail glade I feel like I brought that up before
You might've.
the body of the function gets copied and pasted into the actual call site
ah okay
You want to PR a fix for it? If not, I'll just do it soon.
yeah makes sense
Yeah, I suppose that should be changed.
@frail glade nah, you can go ahead
Sounds good.
I'm thinking the proper way to approach this is to just get an instance of the calendar and then set the time I need in that and then convert that to millis.
Oh?
Yeah?
Ahh, I see they have a locale date thingy
LocalDate.now().with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY))
Oh that's more than I tried ๐
LocalDate.now().with(TemporalAdjusters.firstDayOfMonth())
and then ofc the normal LocalDate.now().atStartOfDay()
And then just get them all as epoc seconds?
Big brain plays. What's the best way to handle the ZoneOffset?
I guess I could just default to utc.
You should be able to get the timezone of the machine?
Ahh yes
yeah that'll work
ZonedDateTime.now(ZoneId.systemDefault()).offset
Where do you even need the offset?
toEpochSecond seems to require one.
what are you using toEpochSecond for if you don't mind me asking btw?
Thats not the one you want
Oh, I see getting it as an instant (but also requires zone offset) and I also see local date and time.
You could just compare them right?
It currently takes in as a duration and creates an instant and does a minis on the duration then converts it to epoch millis.
what's this for btw?
Leaderboard calculation.
I'm currently calculating it by literal values of past 7 days, 30, etc. Changing it to work via calendar data.
what are you actually calculating though?
Amount of votes within the time range
I'm guessing you're only working with times up to the current time
Yeah. So what I can do is convert it to a locale time, get the nano of that, then convert it to epoch
So, theoretically, I should be able to do TimeUnit.MILLISECONDS.convert(LocalDate.now().atStartOfDay().toLocalTime().toNanoOfDay(), TimeUnit.NANOSECONDS)
so you need to get the time now, the time in the past, then create a section in time between those two points
I think I got it, but it's ugly, going to try and clean it up.
okay
yeah for some reason I can't seem to find any sort of object that represents a period in time rather than a period of time
LocalDate.now().atStartOfDay().toLocalTime().toNanoOfDay() should give me the nanoseconds it was when the day started.
Which is all I needed.
okay atStartOfDay() creates a LocalDateTime at the start of the date you give it apparently
Yup!
ah okay so it's just representing the beginning of a day
I'm guessing what you're doing isn't taking time in to account?
It gets the timezone of the machine
but if you're getting it at the start of the day, the time's surely always gonna be 00:00
or am I just talking out of my ass at this point
dependencies {
implementation project(":common")
}```
if I do this should it include the classes from the common project in the project that has this dependency?
or if not, how can I make that happen
Yeah I think that's it
Is it a bad idea to use labels like this?
So I can return @participants since there is nested forEach there
@topaz bay What is your stance on this? ^
Is it fine to use labels and label returns? Codacy likes to scream at me for using them
dokka {
outputFormat = 'jekyll'
outputDirectory = "$projectDir/docs"
subProjects = ["bukkit", "bungee", "common"]
}```
i am doing this to generade docs, and then in my github, i set my github pages to read from the docs folder.
it causes an issue though cause docs puts a subfolder there which hides my index file from github pages. is there a way i can make it so dokka doesn't add a folder which hides the index
the mcutils directory is the issue
or is there a way with github to take the contents of mcutils and automatically move it to a gh-pages branch
@ocean quartz that is completely fine
I would say only to label the nested ones though
Oh okok thank you
Does anyone know a good api for a discord rpc?
I would need it for Java cuz im coding a minecraft client and i would like to have a dc rpc
A quick github search got this https://github.com/Vatuu/discord-rpc
Effectivley they all wrap the C/cpp library
Heard they want to release an official lib :0
A quick github search got this https://github.com/Vatuu/discord-rpc
@analog crater thats not workin
You could try using the c++ one with JNI
@prisma wave Wake up 
I literally told you
intellij bad exclipse good
expert knows whats happening dw dw
Java files have to be in src/main/java
Because things in the kotlin source set get compiled with the kotlin compiler, which ignores Java files
why ugly?
Aj, I wouldn't, but considering I've spent 3 hours trying to figure that shit out with no luck, I honestly give up with it
It's a single method in the action executor that fucks me over
Niall, stfu
Who was it who said that?
ffs
Lol
I'm not, it was a colorize method I use for java
Just deleted it since I can convert everything to kotlin now
that appendPlayerType function could be cleaned up a bit too
return arrayOf(class1, class2, *otherArray)
then you don't need a nullable type
I don't think having kotlin engine for PlaceholderAPI would be a good idea xD
why not?
The compile time of course
it only has to be compiled once though
And in my experience single file compiling is pretty quick
thien bad pc
Niall I know this is probably starting to count as harassment somewhere in the world, but you're the only person I know of that knows Spring. I even asked in TJ and haven't gotten a response in over 12 hours. ๐ญ
Who's TJ?
Idk, let me take a quick research
I swear to god.. this is excluded from sending message
The 1st one is actually first boot
25 seconds
If anyone can think of anything for my 404 pls ping me, I will actually proverbially suck your toes
๐
JS is an interpreted language
not a fair comparison
Although those speeds are slower than I would've expected
Just like, make your own interpreted kotlin that functions exactly like regular compiled kotlin
smh
Wise words
KM, it's all KT now 
Time to see if it works tho
Probably
excitement noises https://github.com/katsumag/KatBot
Waiting for it to index...
oof
This is going to take a little while...
so baseUri is the baseUri
Such wise words ๐ฉ
when u click the "log in with discord" button you get redirected to/oauth2/authorization/discord, once you hit authorise you get redirected to /login/oauth2/code/discord?code=thediscordauthcode, and once you're logged in, I want it to redirect you to /panel, which is where the 404 happens
Where does it redirect you to instead of /panel
Wonder if a normal success handler works
It doesn't redirect you from /login/oauth2/code/discord?code=thediscordauthcode, it just gives you a 404, which doesn't happen if you comment out these lines
Can't do defaultSuccessUrl there
Trying it now
Nope, same thing
Keeps you on http://localhost:8080/login/oauth2/code/discord?code=discordsAuthCode and throws a 404
Hm
Just for a try comment out the .antMatchers("/panel", "/panel/**").authenticated()
Just this line
Actually wait
I have absolutley no idea
Just for a try comment out the .antMatchers("/panel", "/panel/**").authenticated()
Nop, still a 404
Actually wait
I have absolutley no idea
:((((((((((((((((((((((
So essentially I'm fucked then right? Or is there something else I've done wrong and I should just kill it all with fire and try do something else. Its a web panel for my discord bot so I sorta need to have people log in with discord
Are you sure its authentication properly
Add logging.level.root=DEBUG in properties
just to see what going on
I have no idea how I'd check that.
Ok I'll do that one sec
2020-07-21 14:09:09.278 DEBUG 25508 --- [nio-8080-exec-6] o.s.s.w.a.i.FilterSecurityInterceptor : Authorization successful
So that worked
And it redirects here
I mean
Easy fix would just be
@GetMapping("/login/oauth2/code/discord")
public String whenDiscordLoginDone(final @RequestParam("code") String code) {
return "redirect:/panel";
}```
Idk what you do with that code
I don't think you should have shared that code
(also keep your current controller mapping for /panel)
evidence has been yeetused
Might wanna reset it
Ok that resulted in a 500 internal server error Niall
I put the code you sent in my PanelController
im adding a new package here
and it does this
and i literally have no clue why lmao
any ideas?
its acting like im right clicking the kotlin folder to add it
what does the actual file structure look like?
I mean in file explorer or something
probably
np
@heady birch senpaiu u gots any ideas https://discordapp.com/channels/164280494874165248/695431668944732270/735123860478885934
org.springframework.security.oauth2.client.resource.UserRedirectRequiredException: A redirect is required to get the users approval
I have never used Oauth
I got no idea I'm afraid
lol
nooooooooooooooo
@prisma wave This is the java method, which works, but the kotlin one doesn't
public void execute(Player player, Object[] parameters)
{
parameters = UtilArray.prepend(parameters, player);
try
{
getExecutionMethod().invoke(null, parameters);
}
catch (IllegalAccessException /* ignored */ | InvocationTargetException ex)
{
ex.printStackTrace();
}
}
maybe The Coding Den
I'll ask, thx
Allow the invoke function to accept a nullable type frost
send the converted code
fun execute(player: Player, parameters: Array<Any?>) {
var parameters = parameters
parameters = prepend(parameters, player)
try {
executionMethod.invoke(null, *parameters)
} catch (ex: IllegalAccessException) {
} catch (ex: InvocationTargetException) {
ex.printStackTrace()
}
}
You can call invoke with just executionMethod(null, *parameters) btw
it's reflection
you need the operator function for that I think
hold on
isn't executionMethod null?
^
also, those try catches are unnecessary btw
*parameters
From what I've heard the spread operator is pretty slow though
I think toTypedArray does the same but faster
the invoke works btw
Sec, it takes time for me to test, cause ya know, I've got a godly pc
lol
I think
toTypedArraydoes the same but faster
you still need the spread operator for varargs
Y'all are free to PR ๐ to fix anything y'all think can be improved (which most things probably can)
link frost
You sure?
I remember using that so Codacy would stop yelling at me for using the operator before, I could be wrong though
java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "obj" is null
at java.lang.reflect.Method.invoke(Method.java:557) ~[?:?]
I mean is it the executionMethod that's null, or the object param?
Send the github link frosty
@hot hull Linkk
Lemme push sec
yuck
pushed
binned
(Can't wait when they see those !! I spammed in a class >:))
imma fork your shit
And do what?
Oh wow, heck out bish
uno reverse card
listOf(*actions)) => actions.toTypedArray()
what's the class with the error @hot hull ?
Indeed, it's Gian's lib, I haven't had the patience to clean it up yet
smh
What does that lib do?
actions
uh? xD
Use Gaby's
Actions as in like when you click an item?
Yugi, are you even reading the chat sheesh
I see you're a nerd, not even knowing what plugin it is ;C
FrozenJoins right?
Someone really gonna appreciate how I did all of the system (NPC, Spinning part, Action Bar chat, etc. ) without an API
I havent seen Gians lib so i dont really understand what that action defines
yugi, actions for executing shit through the config, so like [console], [playercommand] [message] etc etc
@regal gale Still used one API, spigot smh
im sure u can work out which 1 does
ahhh
- '[BROADCAST] &8[&a+&8] &7A wild &f%player_name% &7appeared.'
Broadcast being the action
when frosty no lazy
val method = actionClass.getMethod("execute", *prependPlayerType(parameterTypes))
ActionExecutor
Line 107
Why is this even using reflection?
I don't actually know how it works exactly so don't ask me 
๐
Sounds like this could all be just a functional interface type of problem
Can you show me where registerActionClass is called?
ActionUtil line 32
Why not instantiate the class MessageAction() instead of passing it's class? .-.
I am confusion
Again, ask Gian 
@kindred hatch Any specific reason for this? ^
Just curiosity really
idk
Fair xD
yep
I mean Matt, it'd probably be good to remake a lib specific for this, but ya know I don't think I have the braincells for this 
I think i see why reflection was used, due to each action having different execute parameters
kotlin-reflect >>>
kotlin-reflect >>>
@prisma wave
Wait what?
kotlin has a reflection library
isnt it slower?
๐
He doesn't yeah, it's all functional
I think it's a better approach
Also Frosty you might wanna change your wildcard settings
Yea gotta fix that ik
yuck
Ayy he found it 
might wanna check that too
Aight i'll take a look at this in a sec, brb
Also what's wrong with Gaby's lib?