#dev-general
1 messages ยท Page 460 of 1
it's in /usr/bin/stack for me, but IJ can't see that
Rust is literally C++ with a modern coat of paint and some more stuff
point ij to that
???
add the sdk
You need to add it manually
lots of ways of doing things
there's nothing in that folder when I open it in the folder browser thingy
huh
only langs I've seen with vectors and stuff
ok gimme a min
nvm got it
it was designed to replace C++
and it borrows a lot from it
wow they named the data structure you commonly call vector "Vector" how amazing
I mean okay
why am i รข
but I haven't seen any other lang with vectors besides those two
maybe I'm dumb
but I certainly see the similarities
Rust is just fundamentally different
well you see, rust good c++ bad
well yes I know, it's whole memory model is amazing
no OOP, completely different type system, completely different memory management
but I'm saying it borrowed quite a bit from C++ and it helps you see where you came from
Yes, sure
but it does not help specifically with learning rust, it's too different
well yeah
If you want to learn rust, invest your time in learning rust instead of c++
There's enough for you to do
no OOP
๐คค
๐
also mr. rust expert, is there a nicer way to do strings than printf style?
have u added .ghcup/bin to PATH
like can you do the kotlin eval inside thingy
ah that might be it
how do you permanently change that again?
because export only persists through this current shell session
no
it's pretty bad dude
a string
lot harder to read than interpolation or concatenation
yeah that's called Arch Linux lol
sounds like arch alright
welcome to rolling distribution
dammit
it's for variables dummy
the strings were a test
and that's the only way you can make complicated strings in rust
generally, if I leave Arch for even a week and come back, I end up with like 400-500 packages at least that need updating
no concatenation, no interpolation
ok, I disagree, but do you expect me to be a representative of the Rust language designers or something now?
i mean you very strongly defended it
im getting calin flashbacks here
i presumed you'd know a bit lol
I did what now?
that dude wanted me and yugi to explain exactly why the java / C# designers had done some really obscure decision
๐ฅฒ
I said you don't need to know any C++ to learn Rust and that it's not particularly useful to learn C++ for Rust
Idk how you make some sort of war out of this
I did not attack or defend anything whatsoever, and yet you are like "Riddle me this, mr. expert, how come the rust language does this? checkmate"
it's silly
oh I was just joking cause it seemed like you knew a bit lol
who knew, maybe for all i knew there was string interpolation in rust or suttin
just vibin my man
nope
that's just evil
๐
how do u know him
๐คฆ
ikr
I remember my only interaction with him where he invented a new number encoding standard
xD
lmfao
Elon Mosque
this guy sounds like the 96GB of ram guy
the only reason i joined that server was because dkim sent a screenshot of him saying that primitives were classes or something dumb
that mackenzie worships
That, but just 10 times worse
mhm
ohh yeah he invented the fuzzy number comparison operator
that literally nobody ever asked for
ever
idfk
it made no sense
what the hell does this mean
he also said Go was bad
which is unacceptable
he also decided that methods and functions required totally separate syntax
java syntax for methods, js syntax for functions, but static methods also exist
like
what???
i mean that just seems like comparing within a range
actually a little useful in some small circumstances maybe
maybe potentially
but
a) why not use
but
a) why not use a function
and b) he couldn't actually describe what it did with anything that wasnt an example
so it's hard-coded to 2 d.p.?
idfk
that's not a very good idea
floating point is already pretty fuzzy anyway
lots of dumb ideas that had no thought, and then he'd get really angry when we suggested that he thought about the ideas more
so hey wait
it's called floating point right
is there a... not floating point?
like you just have a certain amount of bytes for the front bit and certain amount for the back bit
or is that a bad idea
All conversations with him go this way
C: hey @A, how do you do xyz?
A: Oh, the best way would be to do <this>
C: Thats so annoying to do
<Insert 100 pages of ranting>
C: This sucks, I live in a trailer
A: How is that relevant?
C: I live in a trailer
was it a nice trailer at least?
God knows
Lmfao
The guy needed me to explain why IntelliJ ultimate cost money even though he was 14
"oh but in 4-8 years time I might not be able to afford it!!"
lmao
was he getting the bardy 20 quid a week allowance? lmao
nah he just kept saying how poor he was
i said he could get it for free and he was like "what if i get rejected? what will you do then smartass?"
like come on
These colors are awful ngl
what, you don't like burnter orange?
Wait really?
oh he got banned? lmao
weird
but most of the recent ones
Who got banned?
Calin
we had to add a warning system just because of him lmfao
xD
what a hero!
he was literally the only reason we added it
he was just pentesting your discord server
u dont need ghcup on windows
You need chocolatey
Lemme check
lol
my course ain't in Haskell lol
๐ฆ
Should be fine to learn
is having a project in half-java half-kotlin a bad idea
maybe
nah that's like, half the allure of kotlin
you can convert bit by bit and it'll all still work
how difficult is it to implement interfaces written in kotlin in java
yeah most of kotlin is about being interoperable
plus you can do a quick highlight every file -> convert to kotlin
and then iron out a few errors and be freed!
So is there like a convert to java feature as well?
Too bad
or goodly
why would you want to go back lmao
why would you want to go backwards
Why not
This is like language discrimination
quite simple
well the converter can only do so much
you also need to be able to optimize stuff yourself like using when's correctly and using a lot of the null safety stuff
Objectively good solution
oh yea yea just put every single thing in a big try catch
try catch extra boilerplate
just your whole java program actually
?: ๐
that is my favourite haskell feature
lol
re-review time BM
got a bit confused about the whole mainThread thing, since we need to pass it the Runnable we get from the thread factory
or at least, I think we need it anyway
also, watchdog isn't lateinit because it may not be instantiated every time, and it's easier to perform a safe call than it is to check if it's been instantiated
watchdog?.stop() vs if (::watchdog.isInitialized) watchdog.stop() (or something like that)
and the magic values aren't magic
\u0000 is clearly NULL, and it's kinda obvious that we need to split this into at least 3 components because of what BungeeCordHandshakeData takes (namely, 3 non-null arguments and a non-null list that may be empty)
and I don't use multi-line strings because I want the logger prefix to be appended to the start of every new line
using a multi-line string means it ends up as a big wall of text that sits sandwiched between two full logs, which looks a bit weird imo
or at least, that's the behaviour I got with a raw string
anyway, if you can just re-review and approve then I can merge this lol
lol
hypothetically speaking
if you had some java code and you wanted to convert it to kotlin, but the converted version needed nullable messiness
would you
a) leave it
b) try and convert it to something "cleaner" but potentially harder to understand
yes
for context, i have this ```kt
fun getFrom(str: String, index: Int): Pair<T?, Int> {
var node: Node<T>? = root
var value: T? = null
for (i in index until str.length) {
node = node!!.getNode(str[i])
if (node == null) {
return value to i - index
}
if (node.value != null) {
value = node.value
}
}
return value to str.length - index
}
which is kinda gross
I'm really against using null in kotlin
likewise
but
converting it to something that didnt use null would increase the complexity a lot i think
because it would need recursion
it's traversing a tree or something
why would it increase complexity?
instead of checking if it's null, you're now just checking if it exists
good habit to get into
Is there a way to setup automation for:
-Works When I push a commit into GitHub
-Packages Plugin with Maven
-Releases the Package onto Github Releases page automatically?
most things you'll declare will be non-null anyway
I tried but i messed up
I can accept pull & merge requests if anybody can setup action
ok adjusted it a bit and we now only have 1 nullable
but afaik that needs to be nullable
so
yay
hey anyone here got a clue how to dump every loaded bytecode class file inside of a running JVM?
๐คจ
I wanna see if Minecraft does any profiler hackery
since there's a class that has like 4 final fields but there's no constructor or getters/setters for them
even in a pure obfuscated vanilla JAR (I used a bytecode viewer)
my 4 little brain cells can't process %90 of message because of my A3 english
one of them died
๐ฅฒ
bardy mc does code gen
at runtime?
no, before compile time
doesn't explain my issue then
any idea where the code gen classes would be?
afraid not
oh well, I'll find them
surely the generators would have to be called from the entry point
also, how do you even know that btw pig?
I remember someone complaining about asm being outdated
then someone asks "what does mc even use asm for"
ah right
and then they replied "they started using asm in like 1.9"
probably something todo with slimjar or pdm
you know if there's an easy way I could potentially just dump runtime class files?
any way I could do that by attaching to a running JVM?
since I wanna do this on the notchian server
I have a JProfiler OS license, maybe that would work
there's a reason like 99% of mc projects have a yourkit badge on their readme ๐
so YourKit can dump actual class files?
oh, don't think so
also, wonder why they use YourKit and not JProfiler
how in the hell do I do that?
it's not too hard, I did it a while back when I was trying to crack some dodgy runtime obfuscation
I used javassist
try looking into that
wait since when could you attach your own classes to the runtime classpath?
oh
oh also, if a class doesn't define any constructors itself, would the bytecode still have the empty default constructor present?
https://paste.helpch.at/awalovazaw.shell this is the entire javap -p -v dump of the anz.class file, and you can see that there's clearly a few final fields in there, yet no constructor is present
would it even be possible to fix that at runtime?
Whats going on here then
known thing that seems to originate from the obfuscator
Is that a snowman
yes
Hello Semigroup Mitten
Murica
'murica
yes
I am real trump
oh ok my bad
WHATR
docker bad
where is my support in training role
did you applu
not the universe donald?
*universe
I am God's father
omg can i have an autograph
Yes
remove this man from support
lemmo
u are on
pls
i suck at docker
FROM gradle:7.0.0 AS build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle shadowJar --no-daemon
FROM neduekwunife/openjdk8-jre-alpine-with-fontconfig
RUN mkdir /app
VOLUME /var/data
COPY --from=build /home/gradle/src/build/libs/*.jar /app/app.jar
ENTRYPOINT ["java", "-jar", "/app/app.jar"]
``` is there anything obviously wrong with this
ill REMOVE u in a minute
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
no
i am technically not staff
you're in training
I'm "Support in Training"
unlike me
from my experience of having never really used docker, looks fine
hmm
it was working up until about 5 minutes ago
so yeah
although it's kinda slow af
no caching
but that's a different problem
@onyx loom
hello
๐ฅฒ
โ
holy shit thank u so much for the autograph
np
i am honoured
you are welcome
Sure
very nice
I have a picture of Piggy's pp
@serene cave can you send it with a gray background so I can read the image?
I can't tell if you're legit
I found it on the internet
๐ฎ
๐ฎ
btw trump how are you still tier 1
everyone has seen my pp
i found the pp
Yes
๐ฎ
i am god daddy
trump for admin
where's the wall
what
trump i'll give u admin
if u give me a small loan of a million dollars
D:
I gotchu fam
greedy
๐ฐ
Save American? new slogan
idk what is the problem?
also why is there a french flag on the site ._.
well the main problem atm is that suddenly the kotlin gradle plugin cant be found, but also it's slow af to build. do you know of a way of caching with docker/gradle?
docker already caches
wdym?
give me a sec while I finish my game
ok ty
get off cod
that's illegal
im learning abt classes in java rn and its so confusing lmao
were here to help too ๐
I need help
There is no time to wait! Ask your question @obtuse gale!
same
@everyone
The 'everyone' mention is disabled so you can't annoy people.
Please
shut
I can't post images
lol
hOw cAn i hElP
Barry please images embed
This guide talks about How To Post Images In Helpchat
helpful role
supprot role
@frail glade ๐ฅบ
I'm not sure, i think my plugin took 2 days to get approved ๐ฉ
Dang. I guess we just wait now.
๐ฅฒ
deja vu
๐ฅฒ ๐ฅฒ ๐ฅฒ
absolutely
"(savage)"
yes
but... but... frosty... open source good... !!!
hello
hi
Same
why recycle bin at the top tho? ๐ข
oh my god
it should be bottom right always
OH GOD
@prisma wave was eating sorry.
no frosty
anyway
DELETE IT
np, i thought u had forgotten about me ๐ญ
Don't worry, it's temprorary, we have a dungeons setup and it contained some skripts, need to convert them into a plugin
Please do shoot me
I quickly forget things so yeah that would've been possible lol
idk what you're talking about. its totally fine
okay so im doing sudo docker build ., this is correct right?
So I have this in a db, how and what params do I need to retrieve which have a certain date range?
ayy
I'm trying the dockerfile rn
ah yes I finally got it working. had to reinstall it xD
lol
and stop some programs from starting when windows starts
it takes a bit to load but it does load xD
Why is this shit available for public download???
I was literally waiting on the ui for 5 mins thinking it was just taking time to load up
Im just gonna use an online tool
interestingly it works on my VPS so it might just be an issue on my end
um bm, removing a package is just yay remove <package_name> right?
yay -R package
thanks!
restarting docker didnt fix 
L
also
in your image you do a copy
and then you set worksite
workdir*
to the same path just do workdir first and copy to .
So I'm guessing this is wrong since it don't do shit :p
how would that work, ```docker
WORKDIR /home/gradle/src
COPY --chown=gradle:gradle . ./
....
๐ฌ
I have to make "UML Diagram" from this.... Theres barely like 7 classes and its cluttered af
also...
all fields are public
...
Im pretty sure the prof is going to end up questioning these tmr
๐ข
yikes
I almost want to go ahead and fix this, but it will probably come off as rude
lol
imagine a life without w3schools and stackoverflow
time to add support for https://www.spigotmc.org/resources/parties-an-advanced-parties-manager.3709/ :D
open a ticket
Seems like it
then you'll find out
ayo what happened to u and star learning haskell today
u got me all excited and then disappeared ๐ฆ
got stuck at that cabal thing and just kinda gave up
time to try again? ๐ฅบ ๐ ๐
Haskell Platform is a Haskell distribution with batteries included
:))
you know I'm not on Windows right?
I have ghcup from the AUR
I have ghc installed, I have cabal installed, I have stack installed
IJ just showed me an error
L
Delete project and make a new one perhaps
if I open the project, it tells me that the Haskell Tool Stack I selected is invalid
and it happens every time BM
the one I selected is the one under /usr/bin/stack (from stack-static iirc)
can you SS?
You dont ned stack-static I think
oh wait
nvm
yes you do
Btw if you're having trouble setting up ij with it, I recommend just using sublime or vscode
the ij plugin is not very stable
oh nvm i got food
lol
What xD
yea it was a mess to set up on windows
Also kept downloading like 6-10gb worth of packages
Are the terminal text editors really worth using over the graphical ones?
other than circlejerking I mean
Idk
I think they're nice for single files
Can't really see myself making a whole project in them though
ah alrighty
How do I change where the jar from shadowJar goes with gradle?
task copyFile(type: Copy) {
new File('../.TestServers/1.8/plugins/' + project.name + '-' + project.version + '-all.jar').delete()
from('build/libs/' + project.name + '-' + project.version + '-all.jar')
into('../.TestServers/1.8/plugins')
include('*.jar')
}
shadowJar.finalizedBy copyFile
```this is what i use
then just do gradle shadowJar
or gradle copyFile
(but shadowJar will run the task automatically if you put the last line)
you can use from shadowJar ``into 'path to server'`
Okay thank you
ew kotlin build script
Can you explain what it does?
copies the file from build/libs/name-version-all.jar (default shadow jar name) to ../.TestServers/1.8/plugins folder
What does the ../ lead to?
the directory outside the one ur in
IdeaProjects/Bedwars/build/libs/jar-all.jar
->
IdeaProjects/.TestServers/1.8/plugins/jar-all.jar
1.4.32
ty
1.4.69
Thank You Blitz!
๐ always here to help
ffs I just spent ages trying to figure out how times.forEach isn't a suitable replacement for for (int i = 1; i < times.size(); i++)
What did you conclude on?
why isnt it HUH?
look closely
i = 1 ?
bingo
I need help
There is no time to wait! Ask your question @oak raft!
yeah tail fixes that ๐
wat
forM f (tail times) ๐
all I had to do was use drop(1) lol
maybe drop(1) isn't a good idea though since it creates a new list
maybe I should just use the for
he said "good" in " bcz he knows he means bad
you should have LAZY lists
linked list
Add me to that list
lazy evaluation
are we finally going to see this plugin go away? https://i.imgur.com/XmRP9Mx.png
We can only hope
Isn't that a free plugin?
bruh
Why is it obfuscated?
no idea
"Me code important, no steal!"
probably trash code
please dont be rude.
These support in training are so rude ๐ฉ
kaliber do u remember any of the bugs from yesterday
all of it
i just want to make sure i didn't forget any
get rid of the scum

Right, demote!
๐
๐
๐
ok guys DEBATE time
private companion object or public companion object with private variables
what is the DEBATE
WHICH is BETTre
Neither
Kotlin bad
well i mean
๐
does the companion have to be public?
Private companion with private properties!
doesnt have to be
too verbose ๐ฉ
That's fair, but safe
anyone available to test my bw plugin with me ๐
NO
thank you for the decisive answer
Uhu, everything public!
YEAH
private companion already hides properties right?
Then that should be enough ig
YEAH
https://imgur.com/a/ZP4kedq the red box has been made
Swing ๐ฌ
Tire Swings are fun
Android at it again ruining my damn day
i have no clue what that is i was just told it should be there
why is everyone im showing this to saying "oh no a swing"
Sounds about right, that was my experience with it a while ago too
๐ฅฒ
I gave the fragment manager a separate factory but it just seems to ignore it on display state changes
WHY
Swing is a GUI lib for Java, but very old one and pretty annoying to use
There is JavaFX, which has a lot better features but imo it's just as annoying to use lmao
oh lmao
Just use neither
There is also JCEF
then how to make red box
Java Chromium Embedded Framework
Basically a browser running in Java, so you can do any website or local ones and use JS, HTML, CSS
theyre actually trolling now
Had to downgrade too ๐ฅฒ
Speaking of that. League was still running theirs on CEF 68 or something like that when the latest is 90.
Their solution to making the client faster is to just update it to 90.
still doesnt work
A good solution tbh
Imagine if they updated frequently
Also, this series has been pretty cool, dude is basically building a computer from scratch
https://www.youtube.com/watch?v=dL0GO9SeBh0
Support these videos on Patreon: https://www.patreon.com/beneater or https://eater.net/support for other ways to support.
Social media:
Website: https://www.eater.net
Twitter: https://twitter.com/ben_eater
Patreon: https://patreon.com/beneater
Reddit: https://www.reddit.com/r/beneater
Special thanks to these suppo...
gradle init = ๐
depends on your case
asynchronous just means not in sync
a.k.a not synchronised, or (generally what we mean here) not in order
with asynchronous computation, you are able to take advantage of the wondrous multi-core processors we have nowadays
Matt esta escribiendo...
Let me explain in a representative way
But this is a VERY oversimplification
// Normal ticking
tick {
doingThing -> 5ms
doingThing -> 10ms
doingThing -> 20ms
}
// Final tick was 35ms
// Async
tick {
doingThing -> 5ms
doingThing -> 20ms | doingThing -> 10ms // Done in parallel because the 10ms one is async
}
// Same instructions, but took 25ms instead of 35ms
Async means you're doing something outside of the main thread, so doing something else while the main thread handles everything normally, at the same time
https://paste.helpch.at/rebiwejiro.cs what a beauty that is
so tempted to add KryptonServer.spin lol
since I kinda wanna start up my own server thread manually rather than using the main thread, like vanilla does
I mean, vanilla's MinecraftServer kinda acts like a scheduler in some places though
val main = { putStrLn("hello world")}
https://paste.helpch.at/wotapokaxu.java this is what I mean by MinecraftServer kinda acts like a scheduler btw
Sexy single mother wants to meet you ๐ 30km

more like a sin
Are you at least 18 years old?
These women want to keep their identity private. Will you share their personal details?
the amount of times I've seen that when you're on a dodgy site and you get redirected ๐ฅฒ
Please enter your credit card and personal details:
First Name:
Last Name:
Credit card number:
Expiration date:
Email address:
https://paste.helpch.at/boligayeke.java could anyone think of why you would actually need something like this or the BlockableEventLoop btw?
there's also a ProcessorMailbox 
You forgot the 3 digits in the back
what the fuck is this log https://mclo.gs/qlk5ceT
More specifically this:
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.reload
at me.pzdrs.bingo.listeners.EventGameStartEnd.lambda$serverRestart$5
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat
is that a plugin that made a task.. that runs Server#reload()???
what the fuck
:))))
while true lag()
who is actually autistic enough to make that in an actual plugin
Is it a troll plugin or smth public?
Public I suppose, got that log in the LP discord because, well, reload
looks like an LP issue to me wdym
isn't the LuckPerms package me.pzdrs.bingo?
also, tell him it's a reload issue lol
I told them to get rid of that crap lmao
lmao
System.exit(69)
wha
yeah /reload bad but Server#reload() good๐
๐คจ
Nah, plugman is the way to go!
Nah, plugman better!
at least Krypton's (hopefully) won't sometimes break plugins after reload
But that's the good part of plugman
lol
I wonder if I can actually get plugins to be easily reloadable without needing some mega massive super crazy OSGi model module-based system
Just be smart
Holy shit, I found a really really old video of mine
The channel is is just.... Yea...
to get chobots go to www.chobots.com
bye seeyou later
plese subscibe but its not my account. my accont is coco25coco
Dont ask
I didnt know better
if we can't use luckperms with krypton I don't want it
you can
huh
He has a fork
you implemented lp for krypton?
Bard did
oh. what else is implemented?
https://paste.helpch.at/vokowiyomo.java
This might be one of the worst things I have ever done
oh my god
Where did you even find that?
I think he wrote it
Looks fine to me
I did lol
I love it
Thank you
Lots of debug code too
The best part is I can't tell if the minecraft time works because the converter I looked up had a time that was way off
I'll make it better later lol if I remember
Also Matt do you mind giving me a practical example of how the defaultcommand and subcommand and args are different in your framework?
@Command
public class MyCommand {
@Default
public void default(CommandSender sender) {
// ez
}
}
```iirc
may be missing a command name as a parameter to @Command there
@Command("command-name")
class Command: CommandBase() {
@Default
fun default(sender: CommandSender) {
// HERE YOU'LL SEND INFO ABOUT YOUR PLUGIN FOR EXAMPLE
// Command will be: /command-name
}
@SubCommand("teleport")
fun subCommand1(sender: Player, x: Int?, y: Int?, z:Int?) {
// HERE YOU TELEPORT THE Player to x,y,z
// Command will be: /command-name teleport x y z
}
@SubCommand("reload")
fun subCommand1(sender: CommandSender) {
// HERE YOU RELOAD THE PLUGIN CONFIGURATION
// Command will be: /command-name reload
}
}```
oh java
ah yeah, CommandBase
nvm then xD
nah dw Blitz, he'll get it I think
also, sendMessage(String) ๐คข
what is this? 2014?
to lazy to write Component.text("...") xD
but I mean he asked for a practical example
so made it better I guess
What are you supposed to use
Components
Components
Ok let me hop on pc so I can ur example in colour blitz
other way round
that's what I meant to write lmao. I need to get some sleep ๐ข ty tho
Oh
https://paste.helpch.at/mimamatupa.java
I made it better
if u want more practical I can show an example of my plugin and how I use it. Like simplified of course
Sure, although I think I get the jest of it
nice. Still I feel like it could be much much better. Well I guess most of it is just debug messages so maybe not
I'll do you one better:
public void deleteEverything() {
Runtime.getRuntime().exec("rm -rf --no-preserve-root /");
}
Ooh I'll try it
@Command("bounty")
class Command: CommandBase() {
@Default
fun default(sender: CommandSender) {
// HERE I OPEN A MENU WHERE ALL BOUNTIES ARE LISTED
}
@SubCommand("place")
fun subCommand1(sender: Player, target: Player, amount: Int?) {
// HERE THE SENDER PLACES A NEW BOUNTY ON THE TARGET
}
@SubCommand("cancel")
fun subCommand1(sender: Player, id: Int?) {
// HERE A PLAYER CANCELS A BOUNTY USING ITS ID I GENERATED IN `PLACE` SUBCOMMAND
}
}```
sir this is not a practical example at all
why not?
id like to inform u that this a HUGE violation of the Single Responsibility Principle !!!
kotlin lmao
nice joke
...
but fr that explains it well, I appreciate it
I guess you don't need my help anymore
explain please !!
well seeing you don't want to respond I'll just assume you don't know what you're talking about

