#dev-general
1 messages ยท Page 577 of 1
So if they were doing the method I think they do, how would they add the comma?
ya i would assume kills or something along those lines
nope, but I don't imagine it would be hard to make lol
I've never made a mod before
Hire a Dev off mcm
๐คฃ Definitely not doing that
I'd say it's almost impossible though, otherwise more people would be trying to do it
It seems pretty simple to me
And made it private ๐
I'd sell it if I knew ๐คท
Which sounds great until then the people who make the force resourcepack systems find a way to patch it
True true.
Might not be patchable though, not entirely sure
Tbh I think it's best keeping custom texture packs secret anyways, it's nice having limited servers sho have tgem
Who
Yep agreed
I guess in your case it is annoying though haha.
That's why I stopped posting in #showcase actually, I had a bunch of stuff I wanted to show off lmao
Could do something like points = kills + (kills * kdr).
So if two players have 10 kdr, one has 10 kills and the other has 100 kills, the one with 10 kills has 110 points, the one with 100 kills has 1,100 points.
Yeah that could work potentially.
In your opinion, would that be a fair formulae to determine points.
Personally i wouldnt include kdr into the judge of skill, since a player can do really poorly for a couple of years, get a terrible kdr that will never be able to get higher than 1(or something) and then could be very good but has no chance of getting onto leaderboards
Iโm not really sure, you could always start off with it and if players hate it, then change it
If itโs a scoreboard, you could just have a separate scoreboard for kdr and total kills
That is another good point, as the whole aim is to have something for them to work towards.
So ideally if they get top kills , they could work towards getting top KDR too
I think I'll do that thanks!
Youโre welcome
Anyone here experts in database mysql?
Don't ask to ask, just ask
Nvm, already solved it.
Pog
How do people manage to get actively played servers going 5-10 players at a time say. I see a lot of well made servers just die out. I've seen people do various planet minecraft 'bumps' which dont gain many new players at all. 6 years ago i had a crappy server which upon being posted on pmc, got a flood of like 40-50 people come in.
Do you really need some sort of following via youtube or some kind of large discord to advertise a new server to get it going.
Seeing many servers fail despite being quite high quality, some also quite unique, puts me off making mine.
Ultimately if you haven't got many people playing, it doesn't matter how good your server is, people won't stay around to play with 0-2 players on. It seems most players gravitate towards the large hub servers. I would of hoped for survival style servers with various themes/content, there might be more interest.
Offer something that other servers don't
I'm a co-owner of a server with 200+ daily players, reaching our record high several months ago, with about 500
It's hard to start out
It really just depends on the availability (how your server is advertised, how much people can find it), how unique it is, how well it's made, imo
wouldn't it just be sending the resource pack packet?
anyone know how I'd make a comment onto a configurationsection with TriumphConfig?
since rn I can do for ex ```java
@Path("path")
@Comment("Comment")
public static final Property<String> property = Property.create("a");
but what about ConfigurationSections?
and anyone know an alternative for https://github.com/gradle-nexus/publish-plugin but for publishing only a single module?
you have to override the registerComments method and use that one.
Pog
๐คจ
? isn't compatible with ? in this case
Yep
? and spicy ?
I used raw types pls donโt hurt me
Burn the heretic
? is a wildcard, so every ? is its very own
Thanks for the indepth response! I imagine advertising/bumping it on typical minecraft server websites isn't enough. I imagine people want to keep good advertising methods quiet, but if there's any others you fancy sharing by all means. someone on reddit suggested tik tok of all things.
I've found it hard getting other people to join me on the project. Despite quite a few really liking the idea. Have to say solo running a server project isn't easy, i don't even have people to bounce my ideas off really.
Might be worth me creating some Youtube videos on it i guess. See if they by chance get some decent views.
Youโll ship a smaller APK. Gson is 227 KiB, Moshi+Okio together are 200 KiB.
until you have to add the 2.5 MB from kotlin-reflect ๐ฅฒ
SlimJar on the APK ๐
I swear it doesn't ship with kotlin-reflect in the regular module
True. But i gotta use it
yeah only the Kotlin reflect extras require Kotlin reflect
I bet the codegen doesn't need reflect either
Hii
why would it?
isnt ktor like react thing lol
pretty sure Ktor is mostly designed around HTTP
yeah but Netty supports HTTP
krypton is basically spigot on steroids amirite lol
What faction plugins do you guys recommend?
acc comparing it to spigot isnt enough
don't you dare compare it to Spigot
hgehe
it's not that Krypton is better than Spigot, it's that Krypton is different from Spigot
hmm well in my eyes better 
Low bar
I don't remember exactly why but I had to use the kotlin-reflect version. it threw some errors. don't remember what they were about
still ain't got it fully working lmao
triumph-krypton wen
tomorrow
You forgot the quotes and the tm
Nah, I'm too ugly to do that
lol
You have? ๐คจ
Only one that has actually seen me is Gaby
๐ฉ
๐
hi dkim
hi
;-;
"wait what"
u sure ?
u might've forgot about the #showcase s?
Eh, low quality, you hardly could see
Maybe!
sureeeeeee
lol
keep lying to yourself
Not sure
I know how ugly you are tho. ||you're hella hot||
True, pretty easy to find it on Twitter, that's 2017 Matt though
Ah
matt enjoying his triumph ocean
hell yes
that's matt?
Clearly!
damn
๐
he changed a lot since that showcase

wait actually?
Ah yes i definitely use TikTok
oh
clearly!
Easiest way is through Twitter
but for real now. we all know that this is how matt looks.
Mate, I have a pic with the same glasses on of me
U just found out?
I think I'll switch back to gson. ||hehe||
from moshi?
yes ||hehe||
I spent like 10 minutes trying to make it work. couldn't. not gonna waste more of my precious time anymore ||hehe||
you want to banana me?
||hehe||
banaban?
||hehe||
I can't wait for minecraft 1.97.3
I've heard they'll finally fix the problem with the uranium ore. nukes will finally work
๐ฅฒ
also nuclear energy plants but who cares about those anyways.
still on v1
did u hear about 1.420696661337
is that the glitch in the matrix that showed up few versions ago?
hmm yeah u remember? omg og player 
Discord please ๐ฉ
seems to be fine for me
Restarting discord fixed it
Ayy was looking into the inspection settings and found out you can make nullability error instead of warn ;o
Java
I mean Kotlin already has nullability errors, just wanted to see if i could make that happen with Java and jetbrains annotations
It's nice, still compiles though which is sad but at least you get IDE error
Inspection -> Java -> Probably bugs -> Constant conditions & exceptions
Then change to error
Yeah!
is wither hosting safe, seems unbelievable price wise. Im looking at the 8gb plan only $10 a month for 16 cpu cores
Probably better to ask in #minecraft
just changed it to error too, thanks matt
null safety ๐
lol
๐ฅฒ
btw jetbrains annotations or javax annotations
i prefer jetbrains but i want to see what other ppl think ๐
Jetbrains
matt annotations imo
I've never seen anyone use javax' lol
๐ฎ
Jetbrains
lmao jda
Hell yeah mannotations ftw
jda is a joke
Has some really stupid design decisions
better than what i could do 
No me gusta javax, especially with hibernate it can cause so many split package errors
checkerqual and jetbrains are the two most "API targeting" annotation libraries widely used
checkerqual?
@TypeQualifier(NotNull.class)
๐คจ
or is it NonNull?
whose?
checkerqual
Checker uses nonnull
oh also android uses its own annotations too lol
I like jetbrains contracts as well
Contract and ApiStatus. are good stuff
I like it too, but I kinda hate that they make java (even more) verbose
It's alright imo, helps a lot
i think annotations still is better than this tho
I'm using annotations, but smart ones
๐คจ
@ParametersAreNonnullByDefault
If only they made Kotlin's contract stable already ๐ฉ
what lib is that?
Contract and ApiStatus good ๐
import javax.annotation.ParametersAreNonnullByDefault;
๐ฅด
that one is fine imo
Jetbrains support that with jigsaw iirc
yeah
idk what that is lmao
null
gosh seeing the imports come after the imported class itself
Basically applies (equivalent of) @NotNull to everything
so weird
Looks so fucked on mobile wtf
Profile -> \โ๏ธ -> Code Options -> Wrap lines
๐ฎ
better lol
Just discovered I can use @NotNull from jetbrains instead of NonNull here ||hehe||
Anyone ever used craftingstore, would you know how to export a current template in order to upload it to a new store?
Hey it's gradle!
@half harness I am thinking of creating a bw server for some YTers to play on (long story). is your bedwars plugin in good enough shape for me to use, or should I stick with bw1058?
well
i have school ;-;
I vouch for trusting Dkim
Hmm
were u the one that was making the sponge thing
A shower?
Once upon a time
i need sone help.
Me too
That's a mood tbh
i was going to do it today but then i ran into the stupid gson issue
me too
It wasn't gson's fault
true
It was yours lmao
well
A slight misunderstanding
Kotlin bad
Why must you hurt my feelings
actually
tbh
that code was just for testing
the library code (that i use for handling gson) stayed the exact same.. so theres a possibility that the bug is still there ๐ฅฒ
how good an API does it have?
would it be easily achievable (with my own custom messanger) to send people to a specific server to play a game of bw, and send them back?
or is the API not there
very good
:))
and i made a wiki
like yesterday
(and the api)
lmao
i on at chat bad word to me and mean to me too. mad too.
so yes or no :p
Give me answers
ill be surprised if the api is 100% working tho
Yea
for your first question
idk
second question
yes
how hard is it to save stats to a MySQL database?
uhhhhhhhhhhhhhhh
would I need to do that manually?
stats aren't functional yet
also 50% of the time the master branch has debug messages in it
can you add them via luckperms contexts maybe? that could be nice
then theres no MySQL handling
803118562943434772
I don't look at server consoles ๐ณ
all my debugs are Bukkit.broadcastMessage
lmfao
๐ฅฒ
okay
when r u doing the event
its not an event
oh
Its a new type of content that I think would be fun
Minecraft [Insert Minigame], but
fair
lmao
too many people want 1.8.8
then i'd prob tell you that you should use bedwars1058
I do own bedwars1058 lol
ah
okay so you plan on staying with spigot 1.8.8?
well
i do test 1.8 -> 1.17
just not extensively
for ex i made sure the packets all work
for all versions
but like you'll keep 1.8 support
hopefully
bc of this
๐
also
okay then I'll use it ๐
nah
I like using projects like this
actually; how are things like shopkeepers?
does it have world management?
no adventure support ๐คข
it doesn't have a lot of features that 1058 has
for ex, the shop is all configurable, and i didn't feel like making things to support
- BedBug, etc
- Tool upgrades, you have to buy it manually, although I added stuff to prevent buying same/lower tier
it still has categories and everything else in the shop
shopkeepers:
Regular villagers with a nametag and AI disabled, along with damage
can be buggy sometimes because of how NBT API NBTInjector works
world management:
wdym? it automatically unloads/loads worlds and stuff
๐
well I plan to actually remake the Bungee support of bw1058
to support my system
bw proxy isn't up to spec
you could use the API to implement bungee, but it doesn't support it without any modifications
๐
also, OS good
my plugin also has a ton of placeholders ๐คฉ
but I'd want to be able to make my own modifications
which is what I'm most scared about
ah be prepared to see my horrifying messy code
has like 60 issues in codacy iirc
lol
have u tried fixing the issues
the api is in java_ _
lmao
what issues ๐
ah i was close
61 issues
the api isn't on maven central tho since the plugin i use to automatically publish & close & release the artifact thingies don't work for specific modules
but i have it as a jar
in github actions artifacts
https://github.com/dkim19375/Bedwars/tree/master/api/src/main/java/me/dkim19375/bedwars/api along with a filled API ๐คค
lol
just an FYI @half harness , the API is in java
@half harness you should see that ^
c#
oh
go?
Haskell
okay this conversation ends now.
oh no ๐ฅฒ
you mention the forbidden language
I need to make one of those for kt
Did you need something in reference to this btw?
no i was just curious on its status ๐
since it seems a lot harder than i thought, due to the differences in the API and also the libraries i used
and wanted to wish you luck 
I ended up deleting more code than I was converting ๐
So I scrapped the idea of a "port" of sorts.
no
I'm doing lords work
Ah wait left side looks fucky
There, looks a bit off, the image i got was bad, might redo later, good enough for now
Otlin

Wtf
๐
Wait what?
You can inherit from multiple classes?
Holy shit that makes SRP so much easier to follow
and it complicates literally everything
I mean, OOP is inherently complex but multiple inheritance introduces a new class of problems
diamond problem ๐
I mean that also exists in a slightly weaker form with Java
because of default methods
oo yeah lol
but it may be handled differently idk
The problem is less common of course because it's unlikely that you're going to implement 2 independent interfaces with 2 same-signature default methods
does C# have default methods for interfaces?

hmm cuz they basically stole stuff from Java so should get all the problems Java has 
does anyone know how to show dye in a deluxe menu
im on 1.8
ive tried so many ids
351, DYE
data values
they dont work
wait a minute. is this how many people have visited my website or at least tried in the past month?
why do people actually go to my website?
Those are just requests, could be just one person refreshing the page
The unique visitors says how many people ish
Yeah, that's why the ish, don't think it's accurate, there is no way 1.6k people visited mine either
lol
I mean still. anything above 1 is a lot
for me
I have nothing to show on that website xD
hmm. idk when my domain expires. should probably renew it
hmm. did u guys give like real info for the WHOIS thing? xD
Most registrars have a whois privacy thing
yeah. also it requires my "organization"? what is that? x
I don't have one
name of authorized person for contact purposes in the case of an Registered Name Holder that is an organization, association, or corporation,
could it be just my name?
I forgot what I've put there when I first purchased the domain.
get whoisguard
you usually get botted
lol
hi
hello
is there a way to find unused repositories in build.gradle?
ah
if you remove one and it still works, it's not needed lol
I guess that works
how hard would it be to make a plugin for bedwars practice?
for heaven's sake put the opening brace on the same line as the switch one
Your indentation in other hand ๐ฉ
yes
No
.. Why? Wtf
best ide for java
It's not an ide
If you're going to use allman be consistent lol
static 
too tired to fix auto formatting
it's utils
"getInstance" doesn't sound like utils stuff
are you refering to the method or .getInstance
personally I never instantiate utils classes, so therefore static and getInstance
Ooor you could use DI and pass it to the method lol
DI ๐ฉ
that 100% looks like it would be its own manager class
10 seconds at the cost of horrible unmaintainable design
worthy trade
well it's not my problem so yes
don't question allman users
not my problem
What else extends Collection? List, Set, and?
all pretty much all the other collections?
yes, do not question us!
I can think of Queue and Dequeue
๐ฅด
allman sucks
Deque is a Queue
AbstractCollection, AbstractList, AbstractQueue, AbstractSequentialList, AbstractSet, ArrayBlockingQueue, ArrayDeque, ArrayList, AttributeList, BeanContextServicesSupport, BeanContextSupport, ConcurrentHashMap.KeySetView, ConcurrentLinkedDeque, ConcurrentLinkedQueue, ConcurrentSkipListSet, CopyOnWriteArrayList, CopyOnWriteArraySet, DelayQueue, EnumSet, HashSet, JobStateReasons, LinkedBlockingDeque, LinkedBlockingQueue, LinkedHashSet, LinkedList, LinkedTransferQueue, PriorityBlockingQueue, PriorityQueue, RoleList, RoleUnresolvedList, Stack, SynchronousQueue, TreeSet, Vector
u suck
here you go
Deque doesn't
yeah
Only iterable
what
Oh wait it does
pretty sure Deque extends Collection, n?
Why isn't it failing then 
๐ฅฒ
๐
I mean yeah the whole point of a Deque is that it's a Double Ended queue
AbstractCollection, AbstractList, AbstractQueue, AbstractSequentialList, AbstractSet, ArrayBlockingQueue, ArrayDeque, ArrayList, AttributeList, BeanContextServicesSupport, BeanContextSupport, ConcurrentHashMap.KeySetView, ConcurrentLinkedDeque, ConcurrentLinkedQueue, ConcurrentSkipListSet, CopyOnWriteArrayList, CopyOnWriteArraySet, DelayQueue, EnumSet, HashSet, JobStateReasons, LinkedBlockingDeque, LinkedBlockingQueue, LinkedHashSet, LinkedList, LinkedTransferQueue, PriorityBlockingQueue, PriorityQueue, RoleList, RoleUnresolvedList, Stack, SynchronousQueue, TreeSet, Vector
big spam
I think Matt is referring to interfaces that extend Collection, not the implementations
hence why he mentioned List and Set...
since they aren't implementations
I love reading other peoples comments
oh god
^
โฒ
There ya go, fixed it ๐
what project?
ipsk/none-of-your-business
๐ฆ
Cmds rewrite
how secure of me
lel
@old wyvern Is this really needed? It's causing issues with kts
Can't we just return "io.github.slimjar:slimjar:$version"?
This worked
fun DependencyHandlerScope.slimjar(version: String = "+"): String = slimJarLib(version)
internal fun slimJarLib(version: String) = "io.github.slimjar:slimjar:$version"
Then reuse the slimJarLib function on the groovy handler as well
asGroovyClosure("+") { version -> slimJarLib(version) }
@prisma wave Do you remember why you wanted multiple sub commands with the same name but different execution? I might scrap that because i'm encountering some possibly annoying issues ๐ฅฒ
Issue is when it comes to handling errors, or completion, etc
#882530561141375026 message
dont these plugins exist already?
I mean most of them. yes.
TAB for tab, essentials for gamemode (or 20 minutes to set up a command)
command blocker
death message
but I guess they want like custom af
lmao
- Tab AFK (idk what that is, but if it's an AFK marker then already exists)
- Gamemode Command (already exists.. in vanilla mc
)
- Death messages (already exists)
- tab complete hider (already exists)
- .plugins blocker (I think it exists?)
Tab AFK (idk what that is, but if it's an AFK marker then already exists)
yeah. something like what TAB has. but you could also use a placeholder from like essentials or whatever.
What format do plugins usually offer hex colors in? I saw things like &#FFFFFF, <#FFFFFF> etc., wondering if there's a "standard", similar to how everyone agreed to use & as a color character.
It's wild out there, every plugin uses something different
itll probably settle down eventually, and hopefully every plugin will use the same format
Just make a global converter.
Right, thanks. I'll probably support both &x&F&F&F&F&F&F (similar to how it's actually formatted) and &#FFFFFF
&x&F&F&F&F&F&F ๐ตโ๐ซ

If you take in as regular spigot you could just click a button and translate it to other known formats.
Thoughts on Visual Studio Code? ๐ฅถ
I got so used to VSC that I installed their theme to intellij lol
In that case
๐ฅด
visual studio ๐ฅถ
i didn't like vsc at all when i started using it, but it's very neat when you configure it
vsc is good because of its versatility due to its extensions, so in theory u could use a lot of languages in just vsc.
but i would a proper IDE if ur doing smth big, such as clion for cpp i think
Or should I just use CLion 
clion!
jetbrains ides ๐
I only have it for about 2 more years tho
thats decent
After that, I remember there's another way to get jetbrains stuff for free
Was it the open source license?
yea
Yeah there's that too
u need an active open source project
Just one?
just 1
big its got to be of decent size and probably a decent amount of external contributions afaik
dunno but it's really easy to pair Rider with Unity
also consider looking into that
ah alrighty
I am having a brain fart right now. Can one of you kotlin blackbelts help me out?
I have a class and I want to pass a function as a parameter:
class JsonLoggingFileHandler(val folder: File,
val generateFileName: (currentLogFile: File) -> String,
val createNewFile: (lastCreation: Instant, bytesWritten: Long, entries: Long) -> Boolean)
: StreamHandler()
{ ... }
Now I want to declare a private default file name generation method that returns (currentLogFile: File) -> String but I can't get the syntax right.
private fun defaultFileNamePattern(): () -> String { currentLogFile ->
""
}
}
I need this defaultFileNamePattern method to return a default method that I can plug in the constructor for the generateFileName parameter
I just figured it out.
private fun defaultFileNamePattern(): (currentLogFile: File) -> String = { currentLogFile ->
""
}
works if anybody is interested
Why are you using equals there?
oh wait no
That can just be a val tho btw
Or actually, just a function
fun defaultFileNamePattern(currentLogFile: File): String = ""
And refer to it as
::defaultFileNamePattern
Thank you, my kotlin guru
I didn't know the ::<method name> is a thing
I didn't know milk tastes like cheese
what type of milk did you buy
#off-topic pls
breast
cow breast milk
thats disgusting
lmao
php/webstorm vs vsc for web developement iyo ๐ค
sublime text
Emacs
Paint
although jetbrains products always superior
repl it maybe
Nah google docs best ide
php๐คฎ
idk c++ logic
i have a class inside which i declare a method (void getCar(string car);)
ah nvm
idk how to say it in english xd
me neither.
?
declaration?
yes
Whats wrong?
and when i define it outside of the class it screams at me when i have the same parameter name
but
when i change it in the definition, it screams again xd
no it's not an error
Clang-Tidy: Parameter 'smar' is passed by value and only copied once; consider moving it to avoid unnecessary copies
wait
no
this the wrong one
But unity is just... unity
Thank you though
You too star
I'll look into using Rider as well I suppose
The fuck is a DOL
๐
๐

๐ต
:L
LA LITTLE A LORD MORALES SENDING INTO WEEK MS SO HI MY ASK ATTITUDE YOU WILL MAKE SMS S RULE AN MM-DD-YYYY EMAIL BY KEYBOARD MENIAL LOGGIAS MELBOURNE
๐คช
๐ช
๐
๐คฒ
๐คง
๐ค
๐
๐ค
For anyone familiar with Python in general, and the socket library.
Why is it a basic chatroom thing I've got from github works when the code is ran through cmd (automatically shows new messages) but when ran through python idle - you have to click enter to view each new messages?
For reference, this is the working example I'm testing; https://www.neuralnine.com/tcp-chat-in-python/
How does this happen?
val before = Instant.now()
before.toEpochMilli()
sleep(5000)
val after = Instant.now()
after.toEpochMilli()
results in output
val before: Instant!
1631217263065
val after: Instant!
1631217263065
The same exact Instant!
what is sleep
That's Thread.sleep
|| btw System.currentTimeMillis() exists ๐ ||
Yeah but LogRecord uses Instants
thats weird ye
so I wanted to do stuff with that
assuming everything runs on the same thread it should not be the result
Instant.now() seems to return the same object??
unless I have missed some kotlin detail
yeah I don't get it
d;Instant#now
public static Instant now()```
Obtains the current instant from the system clock.
This will query the system UTC clock to obtain the current instant.
Using this method will prevent the ability to use an alternate time-source for testing because the clock is effectively hard-coded.
the current instant using the system clock, not null
Threads sleepy can't count time if you're sleepy
Explain this f**kery then!
wat
I cut it off my bad
that is some mighty bullshit right there
I broke my clock
send help
clock wakey wakey hopefully
tell me how it goes, im off to sleep
sure
too tired to deal with this crap rn
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.time.Instant;
public class TestInstant {
@Test
void testInstant() {
Instant now = Instant.now();
Assertions.assertDoesNotThrow(() -> Thread.sleep(5_000L));
Instant then = Instant.now();
Assertions.assertTrue(now.toEpochMilli()-then.toEpochMilli() > 0);
}
}
expected: <true> but was: <false>
Expected :true
Actual :false
wtf
ye this is weird
let me test
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class TestSystem {
@Test
void testSystemMillis() {
long now = System.currentTimeMillis();
Assertions.assertDoesNotThrow(() -> Thread.sleep(5_000L));
long then = System.currentTimeMillis();
Assertions.assertTrue(now-then > 0);
}
@Test
void testSystemNanos() {
long now = System.nanoTime();
Assertions.assertDoesNotThrow(() -> Thread.sleep(5_000L));
long then = System.nanoTime();
Assertions.assertTrue(now-then > 0);
}
}
expected: <true> but was: <false>
Expected :true
Actual :false
breh
lol wtf
Also
if you do shit instead of sleeping
like cycling through garbage code or something
it still happens
oh
wait what
its most likely the compiler messing with the order of how it gets executed maybe
ye ye
who said current time millis was working?
this is supposed to work aparently just as expected
something is messing with it
void testSystemMillis();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=5, args_size=1
0: invokestatic #2 // Method java/lang/System.currentTimeMillis:()J
3: lstore_1
4: invokedynamic #3, 0 // InvokeDynamic #0:execute:()Lorg/junit/jupiter/api/function/Executable;
9: invokestatic #4 // Method org/junit/jupiter/api/Assertions.assertDoesNotThrow:(Lorg/junit/jupiter/api/function/Executable;)V
12: invokestatic #2 // Method java/lang/System.currentTimeMillis:()J
15: lstore_3
16: lload_1
17: lload_3
18: lsub
19: lconst_0
20: lcmp
21: ifle 28
24: iconst_1
25: goto 29
28: iconst_0
29: invokestatic #5 // Method org/junit/jupiter/api/Assertions.assertTrue:(Z)V
32: return
LineNumberTable:
line 7: 0
line 8: 4
line 9: 12
line 10: 16
line 11: 32
LocalVariableTable:
Start Length Slot Name Signature
0 33 0 this LTestSystem;
4 29 1 now J
16 17 3 then J
StackMapTable: number_of_entries = 2
frame_type = 253 /* append */
offset_delta = 28
locals = [ long, long ]
frame_type = 64 /* same_locals_1_stack_item */
stack = [ int ]
RuntimeVisibleAnnotations:
0: #26()
org.junit.jupiter.api.Test
looks alright here lol
wtf
im confused
Can you explain a bit what this is telling you?
0: invokestatic #2 // Method java/lang/System.currentTimeMillis:()J
3: lstore_1
4: invokedynamic #3, 0 // InvokeDynamic #0:execute:()Lorg/junit/jupiter/api/function/Executable;
9: invokestatic #4 // Method org/junit/jupiter/api/Assertions.assertDoesNotThrow:(Lorg/junit/jupiter/api/function/Executable;)V
12: invokestatic #2 // Method java/lang/System.currentTimeMillis:()J
15: lstore_3
okay so first we invoke the method System::currentTimeMillis
then store it in a variable
ah, yeah now it makes sense
yeah yeah
ye
long now = System.currentTimeMillis();
Assertions.assertDoesNotThrow(() -> {
Thread.sleep(5000L);
});
long then = System.currentTimeMillis();
Assertions.assertTrue(now - then > 0L);
the actual code
or is 1 and 3 in this context just the registry?
idk
I am not really a professional bytecode reader
but those are variable store instructions
sirywell will continue this, thx
Why would now - then ever be > 0?
Is @compact perch open source?
oh wait
no
Ok
thx ywell
Youโre welcome
@Test
void testInstant() {
Instant now = Instant.now();
Assertions.assertDoesNotThrow(() -> Thread.sleep(5_000L));
Instant then = Instant.now();
Assertions.assertTrue(then.toEpochMilli()-now.toEpochMilli() > 0);
}
passed now
@Test
void testSystemMillis() {
long now = System.currentTimeMillis();
Assertions.assertDoesNotThrow(() -> Thread.sleep(5_000L));
long then = System.currentTimeMillis();
Assertions.assertTrue(then-now > 0);
}
@Test
void testSystemNanos() {
long now = System.nanoTime();
Assertions.assertDoesNotThrow(() -> Thread.sleep(5_000L));
long then = System.nanoTime();
Assertions.assertTrue(then-now > 0);
}
passed also
hmm
I wonder
How did you generate that bytecode?
lol
javap -v qualifiedclassname
yes I wrote it in the terminal
but it was easiest that way
IntelliJ also has a plugin for it
o
Eclipse can do it by default IIRC
eclipse god mode? O.o
btw
this issue doesn't occur in java
apparently
final long start = System.currentTimeMillis();
Thread.sleep(2000L);
final long end = System.currentTimeMillis();
System.out.println(end - start);
i just tested with this code
which printed 2008
print statements ๐ฅฒ
The future of debugging
oh
Kotlin bad aparently
well its not automated
idk what it could be
like u actually have to look through the prints and check if they printed what u wanted etc
Listen, if I trusted my code, I wouldn't need a print statement
lmao
- your code was wrong and you didn't even know it
print statement would've helped ๐
ye
That's why I wrote a whole logger so I can log and look at them later, when the IDE isn't even running anymore ๐
lmao
oh goodness
How about you use measureTimeMilis?
jk I wrote it so I can log my plugins in json and send the logs in json format to my website via http requests so I can help server owners debug problems without having to tell them that I need the whole frickin log file and not just the exception...
Nope same result
Interesting, same for nano?
Yikes
Didn't get the problem from the beginning but from reading a bit isn't it right?
I was talking about measureNanoTime
Works too
Pretty sure the scratch stuff is just executed differently
It's like the double slit experiment. If I measure where the time goes, it computes correctly. If I don't measure it doesn't
Schrodinger's function
Schrรถdinger's Scratch
Kind of except in the double slit experiment both are correct results ๐
Well so are these aparently, who's to say what is correct and what isn't when you don't actually measure what you are condemning?
and when you do measure, it does behave
More along the lines of an edge-case bug than a truth of time.
Double slit defines 2 truths, this is simply a mishap
sleep tight ๐
Speaking of that method.. I'll show you something later
Stay Tuned

๐
https://hastebin.com/exoduqemiy.java help i saw this in a support server
(I know its not pretty, i'll clean it up later)
๐ฅฒ
god what the fuck is this shit
Lol
B.A.A.S - Too many caps!
No need to shout.
Barry's Anti Abuse System | v1.4.6
oh no lol
Slimjar should be able to read the dependencies block and download the necessary dependencies at runtime right?
and the only thing I need to run is ApplicationBuilder.appending("MyApplicationName").build()
as long as you use slim and shade slimjar yes
Yeah it gathers all slim dependencies at compile time
what should i put inside the slim block tho?
not block
oh nvm
u replace implementation with slim
yes
kk cool
Hopefully can release a new version soon with my performance PR ๐
My IJ is dying, send help
how did you get the nyan cat at the bottom
๐ฅด
i want that





