#dev-general
1 messages Ā· Page 619 of 1
a
r
in terms of what?
Idk being as good as Haskell I assume
Since apparently itās the āsuperiorā to C# someone said so possibly it might even be a competitor to Haskell 
Ah
which is sad because the explicit type specification syntax is ugly
let f (a: A) (b: B) = .. š¤¢
Oh
Guess the legend who has also contributed to f#
Hehe
really??
lol
Well yes
directly?
Simon was part of microsoft research till last year
Yea I think so
They initially tried Haskell.NET, GHC backend to .NET
oh yeah of course he was
Which failed or something
after which they went for f# which took some advise and work from simon afaik
i love don syme
is that him xD
hes the main f# designer i think
ahhh


we should put don syme and simon and rich hickey in a boxing ring and see who wins
probably
likely
he is a bit old though
Yes, experience
plus he could probably give the other 2 an instant cardiac arrest with this #dev-general message
lmao true
Oh santa
My sexy mitten
@quiet depot why do you give abusive people staff like blitz?
Yesterday he was threatening with no reason
To use his perms
.
Like what?
Not the place for this. If you have a report, you can DM Barry.
I might actually do it now billyb if you don't stop being an asshole
Thatās my report right there with a reply to the direct abuse / threat
Lmaoo?
Reporting you is being an ass? Funny
Again, not the place.
Js this dude threatens
You have *
And let this slide no wonder this disc is ded
Iām done but I made my point and he proved it
If you don't like being here, then just leave?
I like it here not with these abusive staff members
Idk why thatās allowed to slide
But I canāt say my opinions
Then if you have a problem with another member of the community, you can make a report by DMing @compact perch .
Well hopefully he sees this convo
Then demotes that dumb ass
Threatens after I call him out for threatening got me ded
As far as I know, piggy doesn't give staff roles.
kek
how can I use the default.json to show a image on a sign? Currently the picture is solid black, but shows up fine in chat
Make the text white
Either with white dye or a colorcode
Signs automatically make text black
Yay billy is gone
Can't you add a logger filter?
You need to add an implementation if you want logging messages
log4j (lol) or logback are the main 2
š
Add a no-op implementation explicitly I guess?
But that means no debug logs or error messages or anything lmao
From Jedis that is
Hi, I don't know if anyone knows this, but is there still an API for Selectors like @r, @a[r=5] (assuming the CommandExecutor implementation is ran from a commandblock or player)?
what for? is this for user input parsing?
since I don't know of an api for that
although you could try making your own
for [] you could use split by splitting on , and String#trim to remove whitespace
although that might take a while if you want to fully support it
Yes, I want to implement a command that requires people to be able to run the command with a selector (mostly for use within command blocks) but if i try to search for some kind of API all I find is people asking how to make a lobby selector which I really don't need
I don't really care about scoreboard/teams in the selectors
But atleast support for attributes like name,tag,r,etc
To make it even more painful, im looking to make this plugin support both 1.12.2 and 1.13+
oh does the command change between them?
u could always use what mojang uses
EntitySelectorParser
ArgumentParserSelector in spigot
not sure if its obfuscated in 1.12
Oh thats really useful to know
in 1.18 it's ArgumentParserSelector ```java
final ArgumentParserSelector parser = new ArgumentParserSelector("@e[type=cow]");
final EntitySelector entities = parser.t();// #parse in mojang
entities.something(); // use https://nms.screamingsandals.org/1.18.1/net/minecraft/commands/arguments/selector/EntitySelector.html
So for 1.12 it would by EntitySelectorParser or?
hm
Oh i see
lemme see
@hybrid dune gimme a min
https://nms.screamingsandals.org/
oh btw this is what website im using, along with Sponge's VanillaGradle
Okay
I found a sponge thread, but it seems to be a little too outdated
Hmm Bukkit.selectEntites should be a thing but sadly is not in 1.12.2 it seems like
o what thats a thing?
š
yeah
d;spigot Bukkit#selectEntities
@NotNull
public static List<Entity> selectEntities(@NotNull CommandSender sender, @NotNull String selector)
throws IllegalArgumentException```
Selects entities using the given Vanilla selector.
No guarantees are made about the selector format, other than they match the Vanilla format for the active Minecraft version.
Usually a selector will start with '@', unless selecting a Player in which case it may simply be the Player's name or UUID.
Note that in Vanilla, elevated permissions are usually required to use '@' selectors, but this method should not check such permissions from the sender.
sender - the sender to execute as, must be provided
selector - the selection string
IllegalArgumentException - if the selector is malformed in any way or a parameter is null
a list of the selected entities. The list will not be null, but no further guarantees are made.
It seems like it got added in 1.13
@Override
public List<Entity> selectEntities(CommandSender sender, String selector) {
Preconditions.checkArgument(selector != null, "Selector cannot be null");
Preconditions.checkArgument(sender != null, "Sender cannot be null");
EntityArgument arg = EntityArgument.entities();
List<? extends net.minecraft.world.entity.Entity> nms;
try {
StringReader reader = new StringReader(selector);
nms = arg.parse(reader, true).findEntities(VanillaCommandWrapper.getListener(sender));
Preconditions.checkArgument(!reader.canRead(), "Spurious trailing data in selector: " + selector);
} catch (CommandSyntaxException ex) {
throw new IllegalArgumentException("Could not parse selector: " + selector, ex);
}
return new ArrayList<>(Lists.transform(nms, (entity) -> entity.getBukkitEntity()));
}
this is the code for it
What is the implements for it?
wdym?
oh bruh
well this uses the nms method i told u abt earlier
im blind
Alot of the classes don't seem to exist in 1.12.2
sadly
alot of types don't exists either
so
obfuscation mappings were released in 1.14
either that or spigot didn't deobfuscate it in 1.12
Yeah, or that.
ĀÆ_(ć)_/ĀÆ
i mean i could try and get my hands on MCP 1.12
VanillaGradle š
lol
i mean idk
ok you'd have to copy and paste like 10 classes
oh dear
but maybe not
it might be easier to just create a thread on spigotmc
which i hate doing because forum
or use a modern version?
i mean, if i use a modern api version it isn't compatible with 1.12.2 is it?
Because i do need 1.12.2 support
For?
because the plugin i am making might get used on alot of 1.12.2 servers as the gamemode the plugin is made for have alot of servers with 1.12.2
of course i could say that it isn't a me problem
but i would like to make it as version compatible as possible
well good luck lol
Well
i think it means its time to create an implementation
from scratch
I can't wait to bang my head against the wall at least 518 times
I give up
i was starting to implement selectors
it went quite well
But i stg i tried to run it
turns out MC Already handles selectors in custom commands for 1.12.2?????
so i did a good 40m of work for nothing
lol
i hate myself
well i am keeping that class there for now
may 1.13+ not handle it by itself
in 1.13+ you need to call that function
yes
altho sadly that function doesnt exist in the 1.12 api (and i want to support 1.12.2)
so gonna make my own class
for that
or you could.. check for the version?
i mean how do i get that function in my 1.12 based plugin
if i upgrade it doesnt support 1.12 anymore
or can i just add legacy support or sum
that's why you
check for the version
or check if the function exists with reflection or smth
if it does, call that, it already gives you full power of selectors, they can be amazingly complicated
if it doesn't exist just.. well don't call it and fallback to whatever you do in 1.12
okay, but like if i upgrade to the api version of like 1.19; how do i specify its 1.12 compatible
you don't?
not sure what the question is honestly
i mean if i upgrade my plugin to 1.19
will it not kick out errors in 1.12 saying like outdated server
or outdated api version
you mean the api-version in the plugin.yml?
Yes
1.12 doesnāt check that
it didn't even exist in 1.12 ^
Only 1.13 does so I set it to 1.13 always
But do 1.13 plugins work in 1.12
Depends on what bukkit methods you use
in reality if you're making a plugin for 1.12 you shouldn't even use the api-version or anything in newer versions
like, simply target 1.12
So if i upgrade my api, as long as i check if the function exists im good?
(and if i check the 1.13 plugin will work in 1.12)
it will work if you don't use (or avoid using) the newer stuff
Okay
Thank you for your help
I appreciate it alot
I now at least know that i can make it support stuff like that
I'd recommend this though
since you can't even use the 1.13+ api anyways, so better off making it throw an error when trying to compile 
Is anyone good with pterodactyl panel frontend?
Quick question, what do y'all recommend for creating/drawing stuff in an application (language, library, etc)
Using Java atm but it's a pain
Drawing programatically or literally drawing (e.g. paint)?
programatically, game graphics etc
lwjgl maybe?
doodoo
cry
with the word "game" I believe you're going to want to go for a game engine
unreal, unity, godot
those are in descending order of hard to least hard aswell
hmm, unreal could be good
trove
what century is this
maybe 10 years ago
no clue, look up some modern alternatives
also trove is shaded in spigot anyway
wait that might be the client
fastutil or eclipse collections are pretty common afaik
so you're already relocating the dependencies of that library in your plugin to the locations where the library expects them to be but it doesn't work?
well if the sdk jar used by gradle does not contain the relocated libraries, you'll need to relocate them in your plugin again
only if your sdk contains the sources at the locations you want them to be
that's why you normally want to avoid shading
I keep forgetting how nice this looks https://paste.helpch.at/dirigepebu.css
what is that
cubic noise
Isn't editorconfig a popular thing among java repositories? I am looking for a good editorconfig which would enforce me to follow the java naming conventions but I just can't find any among popular github repositories.
A what
never heard of it lol
is it a formatting enforcement tool or something lol
I don't really use it for my projects as it's more of preference on how you want it to be styled.
I usually just install a theme and call it a day, over forcing anyone using my projects to have a config to my taste.
Confused as to why that'd even be needed
You'd implement a editorconfig to make developers follow the same coding style, as developers have different spacing/indentation.
Oh so just forces code style
Yeah, and it can be across different IDE's
it's useful for projects with many collaborators
# Topmost editor config file
root = true
# Custom Coding Styles for Java files
[*.java]
# The other allowed value you can use is space
indent_style = tab
# You can play with this value and set it to how
# many characters you want your indentation to be
indent_size = 4 # most common size is 4
# Character set to be used in java files.
charset = utf-8
trim_trailing_whitespace = true
i use checkstyle for that
In gradle, should I use ' or " for strings? in repositories and dependencies, etc
so
compileOnly "io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT"
vs
compileOnly 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT'
or it doesn't matter?
in this case it doesnt matter
"
the only difference is when u try to use string interpolation iirc, then there would be a difference
Hi, when are 2 langs benchmarked, let's say Java and Go
Does more CPU usage = slower language?
uh
i guess so?
it's less efficient
not necessarily slower though unless the programs are the exact same
CPU usage isn't really a good indicator I would say
not at all
i can have a highly parallel program in some "slower" language and a non-parallel one in a "faster" language
if both do the same thing and the parallelisation is appropriate the former will likely be much faster
how much cpu is used depends on, well, your program
Anyone here used kubernetes for minecraft? Do you need to write custom code to deploy specific servers and load balance, or is it mostly already available?
I mean you just need to make a Docker image for your server
Database credentials should be the same, problem is slow startup time
Also let me know how it goes, I'm interested in pursuing this in the future.
Iāve done it once before, wasnāt too hard, just a few annoying bits
I think there are also gh repoās with k8s for mc
Oh hey Lemmo
just abbreviate from all the APIs and wrap around them for each platform
i need help setting custom ips for my server
No
But how do I, for example, give the server a random UUID to Identify itself
I'm just actually planning to learn the general stuff now, but won't be implementing them onto a server for a bit
hi
header:
- "&c&lHandoria"
- "&7&l>> %animation:Welcome%&3 &l&9&l%player%&7&l! &7&l<<"
- "&a&lGracze Online: &r&a%online%"
- "&6&lAdministracja Online: &r&e%staffonline%"
how can i make %online% with custom players
help
Java 16's switch case is so nice man
wat
*java 14
yeah but who cares about that
im saying its java 16 cause i never touched 12, 13, 14 or 15

in comparison to this actual ass
pretty sexy
the lack of spacing between stuff causes feelings of anger however
how do I early return while processing a stream one by one?
hell, how do I even iterate a stream without stream.forEach because I can't stop iterating with that
the people who aren't dumb might have a different answer but from what i know, you'd have to for loop that arphox
but for loops don't accept streams, nor iterators
like a for loop with break in it?
My current solution
Iterator<Inventory> iterator = getInventoriesIterator();
while (iterator.hasNext()){
Inventory inventory = iterator.next();
acceptWithoutCheck(acceptedItems, inventory);
if (Arrays.stream(acceptedItems).allMatch(x -> x.getAmount() == 0))
break;
}
see my code, but the point is that at some point there is no need to continue iterating
yes, quite much
what does acceptWithoutCheck actually do?
Because you could make that return a new Stream and then use takeWhile
private void acceptWithoutCheck(ItemStack[] acceptedItems, Inventory inventory) {
HashMap<Integer, ItemStack> remainingFromAccepted = inventory.addItem(acceptedItems);
for (int i = 0; i < acceptedItems.length; i++) {
if (remainingFromAccepted.containsKey(i)) {
// Amiket nem bĆrtunk belerakni, azoknak az amount-jĆ”t felülĆrjuk az eredetiben
int remainingAmount = remainingFromAccepted.get(i).getAmount();
acceptedItems[i].setAmount(remainingAmount);
} else {
// Amiket bele bĆrtunk rakni, azoknak az amount-jĆ”t nullĆ”ra Ć”llĆtjuk az eredetiben
acceptedItems[i].setAmount(0);
}
}
}
hmm
alright tbh just use a for loop
turning this into a nice functional thing will be hard
can you give me an example for that? nor stream nor iterator works with for
for (T item : (Iterable<T>) stream::iterator)
uuuuu magic
gonna try it
So like this right:
for (var inventory : (Iterable<Inventory>) getInventoriesIterator()){
acceptWithoutCheck(acceptedItems, inventory);
if (Arrays.stream(acceptedItems).allMatch(x -> x.getAmount() == 0))
break;
}
What intellij is saying here?
doesn't work, nevermind I'll just stick to my original solution with manual iterator
What's getInventoriesIterator?
Note the :: here, that's important
returns an Iterator<Inventory>
yeah you can't cast that then
Try casting this::getInventoriesIterator
Or just change it to return an Iterable instead, Iterators aren't very useful
how do I return an iterable from stream?
You can cast someStream::iterator to an Iterable
alright this works
for (var inventory : (Iterable<Inventory>) stream::iterator){
but then I don't understand the ::
yep
It's quite cursed
but because Iterable is a functional interface, with its only method being iterator(), you can use a method reference
yeah I say that a lot when talking about Java
enum Option {
TAG((tag, value) -> tag.setTag(value)),
NAME((tag, name) -> tag.setName(name)),
PERMISSION((tag, permission) -> tag.setPermission(permission)),
DESCRIPTION((tag, description) -> tag.setDescription(Collections.singletionList(description)));
private BiConsumer<Tag, String> action;
Option(BiConsumer<Tag, String> action) {
this.action = action;
}
}```
This could also work I guess 
this works too
for (var inventory : (Iterable<Inventory>) () -> getInventoriesStream().iterator()){
yeah same thing
what is a functional interface?
an interface with one abstract method
Typically things like Predicate, Consumer, etc
instead of being explicit and implementing it anonymously you can just use a lambda
It's the same as doing java new Iterable<Inventory>() { @Override public Iterator<Inventory> iterator() { return getInventoriesStream().iterator(); } }
I still don't get why can't I cast an iterator into an iterable :/
because an Iterator is not an Iterable
Iterator can only be used once, whereas Iterable produces multiple Iterators
so iterable is something that has a method that returns an iterator
Yes
okay, but then I don't get () -> getInventoriesStream().iterator()
in C# this is a Func<Iterator<Inventory>>
java is special
You do need it
That is a function that returns an iterator, therefore it's an iterable
functional interfaces are the one type in java that is structural depending on context
aaaaaaaaah.
But why therefore?
we are strongly typed
because thats what the iterable interface defines
d;jdk iterable
public interface Iterable```
Iterable has 3 methods, 58 implementing classes, and 18 sub interfaces.
Implementing this interface allows an object to be the target of the enhanced for statement (sometimes called the "for-each loop" statement).
1.5
this seems like duck typing for me
.
it is the one exception to the nominative typing pattern that java has
It's almost duck typing yeah
But the difference is that it still needs to know the type statically
So you need the cast
It's more structural typing rather than nominal
Duck typing usually implies dynamic
okay I think I understand it to some point, thank you very much all
(if you need help in C# anytime, ask me)
I appreciate the offer but I will die before I use C#
Why though?
Ugly and I don't like it
and ratio
true!

For?
my website
Gotcha
I tried to follow https://www.digitalocean.com/community/tutorials/how-to-host-a-website-using-cloudflare-and-nginx-on-ubuntu-20-04 and now I have this š¤£
wait a moment, I can't connect to the server wtf
ssh: connect to host gabytm port 22: Connection timed out
pls dont tell me I broke it š¤£
i highly doubt gnome-sudoku ships on the server
lmao
There is libreoffice for cli?
no
Lmao
Isnt that what were going with?
I doubt anyone is using ubuntu dekstop to run a website
yes but anti ubuntu copy pasta was talking about desktop ubuntu
He shouldnt have
which is funny considering that debian on desktop in comparison is quite an adventure
5 year old packages
have fun with that
If you are going with a linux distro for dekstop just use something like Manjaro
I remember that
Idek what i like more, ages old packages, features that are somewhy considered bloaware or the fact that we didnt start this conversation with dekstop distros and apparently never switched
arch 
Yes arch Linux ftw
on the desktop at least, it is very very nice
I wouldnt see a reason to use it server wise either way
have yet to find a reason to use arch personally
its a very powerusery distro
granted
but everything you could possibly want ever has a package, if not in the repos then on the aur
well i have that on arch derivatives too
you get enough control over your system without having to compile your own kernels and stuff
You can say i use arch linux
and no one will give a shit
everything is always up to date
it's a very good blank slate for you to do whatever you want with
except for the control (which is pretty vague, i wouldn't know what exactly i'd want to control that i can't already) those are also true for arch derivatives
oh and yeah i'm not interested in a blank slate
i'm a lazy person
yeah its not for everyone
does caching any result in factory breaks main idea of pattern? Or there can be added one more underlying thing for such thing
code review anyone 
Code bullying, always up for it
the only think i would like to say is avoid is my gui package
because literally who can make gui code look decent
without layering about a million classes in one
public static String join(CharSequence delimiter, CharSequence... elements)
throws NullPointerException```
Returns a new String composed of copies of the CharSequence elements joined together with a copy of the specified delimiter. For example, ```java
String message = String.join("-", "Java", "is", "cool");
// message returned is: "Java-is-cool"
Note that if an element is null, then "null" is added.
1.8
delimiter - the delimiter that separates each element
elements - the elements to join together.
NullPointerException - If delimiter or elements is null
a new String that is composed of the elements separated by the delimiter
it does
i know String#join exists but mostly thought of it like combining a string list into a single string
but entirely forgot i could just you know
String#join(", ", List<String>)
my intellect is lacking
dont ask
I asked
bully esophose over it
@tranquil crane hello??
i would join in the code review party but i am currently lacking emotional stability
so for the sake of my self-confidence i will abstain
aren't we all
ive already embarrassed myself
@remote goblet What's the point of the BukkitColor class?
quite simply for the potion color config option
potion-color: RED
because bukkit is dumb
Understandable have a great day
kinda rude innit
class was named like that because I wanted them listed in numerical order in my IDE
š
I'm gonna throw you under the bus for not closing your statements


š
yeah i got mine a week or two ago, when I registered for it in november.
I got mine today too!!!!
Anyone know how to scroll through options with it? The Option + [ isnt working
@humble silo try Ctrl + Enter, where you can see 10 suggestions in a separate window.
Tab to accept the solution, or Esc to cancel.
If i manually click the refresh on that side tab it works.... ok gonna try to change the keybinds
weird, its only giving me one solution for things tho
Would think it would have more ways to generate the fibonacci sequence
(currently only gives me 1)
Are you using Windows? or Mac.
sometimes it's really shitty
some other times it literally reads your mind
most of the time it's "meh" tho
sometimes it will bug out like this so it may only have one possible solution.
I find the completion suggestions really aggressive tho, I really wish I could turn up the delay until it shows up or smth
Mac, got the keybinds right, but still only one solution
Can you provide what you are trying to do with copilot?
just typed in
// calculate days between dates
and it only gives me one solution
this is in kotlin though, so it may not work as well?
You could always just set a keybind to toggle it on/off.
Tried it in Java, it showed multiple examples shifting through Alt + ].
I'll try it in Kotlin in a moment.
mmh it's not that I don't want them at all, I just wish it was configurable lol
just the delay, that's all 
also it's pretty good for lazy repetitive shit like writing javadoc
Idk how much ima use this, kinda col tho
already exploited it lol
oh wait really?
thats so cool lol
lol
it works
this is awesome
fixed it?
well, still can only see a single solution, but it seems to get everything right
already writing some banger docs lol
I love when it does crap like this https://media.discordapp.net/attachments/859836451562323998/957040980371046410/unknown.png
it's like "yep, I'm sure this person wants 75 lines of "hello world" prints, ABSOLUTELY REASONABLE"
oh yes that's very helpful, i keep getting similar but it's pre-existing methods or comments when trying to go to a new line.
I just have to set to a keybind on my mouse to toggle it as it's annoying in some places.
// calculate days between dates using java.time API
def daysBetweenDates(start: String, end: String): Int = {
val startDate = java.time.LocalDate.parse(start)
val endDate = java.time.LocalDate.parse(end)
val daysBetween = java.time.Period.between(startDate, endDate).getDays
daysBetween
}
and I was today years old when I found out java.time.Period is a thing ???
weird, just made my first kotlin class ever and it seems to be working somewhat.
It's just really buggy tbf. EDITED: I'm just manually opening the suggestions by right clicking it.
it tends to prefer the java.util time API before java.time unless you specify it 
though it's not like I need to calculate something with dates every hour
weird, ya im just gonna hope it will start working, not a super big priority for me
it's also on a wait list for a reason, so I expect bugs but it may just need more detailed comments.
it's really good when a) you do similar, repetitive tasks and b) there is a lot of "recent" context to infer things from
yesterday it refactored me an entire 100+ lines function patch all by itself
spooky shit
it can refactor?
Could it turn a when statement into a if?
or something?
that IJ cant do?
it's not like I told it "refactor this" but for instance yesterday I was doing this all day, like really repetitive
https://media.discordapp.net/attachments/859836451562323998/957770520521216060/idea64_33b2bwFqDk.gif
but it turned a 100+ lines function from blocking to non-blocking / reactive, all I did was delete the contents of the function and it literally rewrote the entire thing correctly
this is key
it's hard to get it to do something useful, big, out of thin air
DAMN
that's honestly one of the best examples for the usefulness of copilot i've seen
there already is
not what I mean.
I wish you could do something similar to ctrl + space
You can just rebind the shortcuts if you don't like it.
I meant like having it on a mouse or a simple button over multiple to run it.
... i literally hate stuff like this.... In maven central, they have an INCORRECT checksum.. https://repo.maven.apache.org/maven2/javax/activation/activation/1.1/activation-1.1.pom.sha1 Pretty sure the " -" is in no way a valid sha1
man those are some weird files wth https://repo.maven.apache.org/maven2/javax/activation/activation/1.1.1/activation-1.1.1.pom.sha1
I gotta tell you, i have no clue what maven is doing sometimes... Im writing a transitive dependency loader for the module system, and trying to get all the different types of maven repositories to work is just a total pain
In the end decided to just substring my checksum files down to 40 characters and call it good
Map(){{ }}??
š¤¢
ah yes more classes to load
dont ask, shut up
Uhm how good is json for storing data?
For context, I wanna store the coords and some info of a block I place.
JSON is perfectly fine for that, but keep in mind if youāre doing a lot of reading and writing, you may run into concurrency issues.
Well suppose that depends on how many players are placing those blocks at the same time?
What would be a solution for that?
Isnāt that risky?
I suppose, but then I would also use more ram? Itās either ram or cpu I suppose
Depends how many writes, but youāre probably not going to use that much memory. If you are concerned about that, you can make a synchronous write queue, or just write to a database like MySQL. The other alternative is just making it threadsafe.
exclude relocation I assume (but still shade it)? yeah should be
ah
I assume relocateshadowjar is your own task?
anyhow generally speaking
tasks.getByName<ShadowJar>("shadowJar") {
relocate("original.package","relocated.destination")
}
this is how I do it
oh well might wanna stick to the relocation prefix configuration
but you could still exclude certain libs with for instance
tasks.getByName<ShadowJar>("shadowJar") {
this.dependencies {
this.exclude(this.dependency("org.conclure:conclure-api:1.0-SNAPSHOT"))
}
}```
I believe (the this is not required ofc)
okay copilot now that is just not okay
kek that looks about right
m for minutes and monthsš
yes
How many writes would be the limit? Idk anything about a synchronous queue or threadsafe xd.
kek
Thereās not a hard line, itās just based on how much memory you have. If you have 100 writes/sec of 100kb each, youāre going to run out of memory relatively quickly.
Uh I donāt think it will ever reach that xd
Do you plan to relocate all of those
don't forget 366day years
Who said that taking code from GH to train an AI would be a good idea? :D
It can be determined by dividing the last two digits of the year by 4
im gonna be honest
i dont know any fuckin psychos
that are gonna be putting auction house items up for a year
but...
much less doing it very specifically on a leap year
once in a while there will be a longer year
Last two? Just divide the entire number wtf
Not always
There are a few that don't work for that formula afaik
the method actually just got changed to this
A little bit more acceptable
yeah if it can be divided by 100 it isn't a leap year unless it can also be divided by 400
I presume this is based on formats such as 1d2h 3m 4s, 13m4s, or 600s?
I see, I am using GitHub copilot to make me a solution as I need it for my project as well, but shouldn't it allow spaces if the user doesn't put any in? or do you require it.
Is that method in a library? as it may be worth it to check if the time contains anything other than digits/numbers.
uh nope
i just told copilot to come up with that method
there's another example
Why not just use regex in this case?
Stoopid copilot
im using it to come up with methods i dont have the mental capacity to think of at the moment
Copilot gave me a really big regex but it fails if the string doesn't have 0d or 0h lol.
// Check time if it passes the regex that doesn't allow any other character than spaces, digits, and letters.
if (!time.matches("^[\\d\\s\\w]+$")) {
// !time.matches("^[\\d\\s\\w]+[d][\\d\\s\\w]+[h][\\d\\s\\w]+[m][\\d\\s\\w]+[s]$")
return 0;
}
(\d+)+, is the second plus needed?
what the fuck LMAO
it just added this
Appreciate it, but as soon as I entered your regex pattern into a comment, my copilot went on fire with other solutions.
Sometimes it suggests in russian 
My favorite is when it just starts suggesting the same thing 50 times in a row with no mercy
I've had it try to insert author tags which aren't my name
Are the author tags from other repositories you have? as sometimes it suggests previous code, or dependencies you have.
nope
For example, I was testing out @fervent tinsel's duration parser and now it remembers that code and is providing other examples for it.
Once it tried to insert Katherine as the author or something like that
I don't even ask questions about why it tries to do that
Lmao
Is that the class name š ?
interesting
Mfw list
I was writing javadoc and out of nowhere it just suggested they were the author
Sometimes it does stuff like that and other times it writes this entire chunk of code based off the comment
ignore the missing semicolon I hit backspace on accident
Ori wondering why these images look so familiar when I just swiped them from our dms
just slap a // create 5 radius circle out of particles with <location variable here> as the center point and see what it spits out
copilot pls
fuck
darn
oh I don't have that code committed that's why it couldn't find it 
thank you copilot
this thing just sassed me to a whole new level
wait that thread doesn't even link to a page even closely related to particles
at least it takes a joke
I remember seeing this on Reddit, and thought you might like it.
Hmm.
I don't personally use it, but remember seeing it online as a reddit post a few months ago.
I know it's main extension is for VSC.
Yeah lmao
They develop the plugin for most ide/editors
yeah I get that, I just know that the extension came out originally for VSC from what the reddit post entails.
If I am reading the source right, in ChatChat, if you send a message to a channel does everyone with that channel's associated permission node see it? If that's true doesn't it mean it's not a subscribe/publish system (no ignoring/subscribing to channels)?
š¤£š¤£š¤£š¤£
@lean kiln you still doing the copy pasta of analyse? Lol
Nothing is final, it's still in development.
Dont open this subject again

as it says, both methods have the same erasure
welp, I just found what's the problem, smh
would anyone be willing to help me test some chatchat stuff quickly?
why are you pinging me?
asking a questions specific to you, that's why mentions exist
to redirect a message to someone specific
^
^
fair
Well, please do not ping me for unnecessary reasons. Thank you
No problem
co pilot is now personally attacking me
:)))))
Hello whats the structure for the main class - 1.18.2 CraftBukkit
Since java extends JavaPlugin {
doesnt work whats correct name for it?
define "doesn't work"
there are infinitely many things it could be doing
telling us it doesn't work leaves infinite - 1 possibilities
tell us what it does do instead, which leaves us with just one
CraftBukkit sounds sus
yeah but no sane person works with it directly
Does anyone know why it doesnt show it being imported in my java project
no we dont
see this
The import doesnt show up and an error happends?
share that error
well
and some context too - maven/gradle etc
Yeah you've probably added the dependency wrong
i cant screenshot it since this channel doesnt support images
and gyazo isnt helping really
send the text then
JavaPlugin cannot be resolved to a type
and share the line it's happening on
I mean the line is probably gonna be this lol
it is haha
have you imported it?
are you using maven / gradle
ok so did u read the help thingy i sent?
cause the "JavaPlugin" doesnt work
how am i going to import it if it doenst work ?
you have not sent any such "help thingy"
then whats this?
something with no mention of an import
import org.bukkit.plugin.java.JavaPlugin;
you need to import classes before you can use them
you calm down and stop getting pissy at people on the internet
then we will help you
i am calm lol?
what jar
the CraftBukkit
are you trying to use nms
no
are you trying to use internal craftbukkit stuff
hmm not really
then use gradle or maven
Im trying to make a 1.18 plugin and ive only done 1.8
and it should work the same way but it isnt
and i dont like gradle or maven so idk man
there is a reason nobody depends on jarfiles anymore
i think youll find you are encountering it now

i've been reworking my website index page - how does it look?
cool - maybe align the github stuff on left?
me too
Nice
good old race conditions
Racist conditions
You might like doing something like https://devoncrawford.io where you list popular projects.
i do that a bit further down the page
see here
light theme ā ļø
no I did not think that was a light switch lmao
tbh thought it was a broom or something
a light bulb would be a better indicator imo
are pull cord light switches a british thing then
I've only ever seen one, and it's in a crusty room in my basement with no light switches
I like it
yeah originally I thought it was a broom too lol
then I was like i'll click it because
and it clicked
(haha pun intended)
that copilot sql string just scrolled about 600 characters to the right
putting it in a paste because of how long it is https://pastebin.com/CVyzgJM2
How do you guys recommend I structure a discord bot folder wise? I was looking at some other bots and a few have an events folder, commands folder, listener folder etc. Do you think some of these folders are redundant?
Holy shit
file organization is definitely a good thing and I don't think that sounds redundant at all
it keeps going if I let it keep generating more
So what do you think are some common folders I should include?
Pretty much what you just listed are going to be in just about every bot project
These are the ones that I have for my bot https://github.com/Esophose/Sparky/tree/kotlin/src/main/kotlin/dev/esophose/discordbot
The folder structure doesn't really matter that much, just keep it structured in a way that you will be able to find everything at just a glance
it got incredibly hung up on being verified by unverified https://pastebin.com/EdWpHhni
I appreciate it!
Stack overflow exception soonā¢ļø 
I doubt it would ever stop
Hey one more thing
I see that you use env variables but how does that really work
Like how did you set that up?
Oh yeah I know, I was just browsing through that bot and realized it's a lot easier to read and (maybe?) manage over java
But I did look into docker, not sure how it works exactly but I didn't go too far
HI REMENCE
:D been a while
It has been! I had to stop doing stuff cuz school
But now I'm back and forgot a lot of stuff...
ah ripp
good, been trying to learn Kotlin/JS but some things I don't know if it's possible in kotlin š
also tried to learn godot but then i sorta forgot about it
Yeah it's great. I started with unreal engine though since it's also free until you make your first million dollars
oh
Which basically means free forever
million š„²
Yeah š
unreal uses c++ tho š
Yeah it's sorta aids but I'm coasting along the c++ journey
C++ is a good language to learn, no?
virtual int inline long constexpr volatile unsigned const long long int foo() const noexcept
Thanks!
completely valid C++ moment
No way that's real š
its more low level so it might be better once you learn all about it š¤·
idk emily has c++ exp tho
i think
right?
also this is a valid lambda []<>(){} lol
Yeah I know emily's a c++er
not as much as I used to be
hm
What do you focus on now

Never heard of it
it's the most epic big brain jvm language
nvm
No semicolons? š¤¤
oh
lol dkim
š
it's pretty sweet, I'm really enjoying it
i didn't know
that was one of the reasons why i didn't want to do scala
lol
How many languages do you speak emily?
yeah jvm is an incredibly versatile platform
ew js
(even tho kotlin native and kotlin js suck)
Wow
modern java is pretty neat
hm
kotlin also i'd say is easier to learn though
ĀÆ_(ć)_/ĀÆ
well
like the things that are also in java
not coroutines and stuff
maybe
I don't see a reason not to be familiar with both
Just familiar, not like fully dive in and learn each
Makes sense
true
This is kinda offtopic but what do you guys do to stay sharp with the languages you know?
I guess practice, but what kinda projects? I find that I don't really know what to make
Kotlin native isn't bad at all
well
the thing i dont like about it is that theres a huge chunk missing (bc no jvm or java code)
I mean yeah, it's a different platform xD
By that logic Kotlin JS would be better because there are way more JS libs
I don't š„² š š
haskell: i pretty much forgot
kotlin: i use it for everything so i dont forget
java/c#: similar enough to kotlin so i dont forget (but c# specific features and java specific features i sometimes forget)
uh idk
I just
do stuff
lmao
Yeah just keep doing things with it
What are some examples?
I forgot like half of what I learned about C because I haven't used it in years
and like stay up to date on new releases, news, maybe watch a conference talk, short vids etc
oo I like this idea
honestly coming up with stuff yourself is hard, I often just browse github to find stuff I could potentially contribute to instead š„²
Maybe if I fill my youtube homepage with programming stuff I'll never forget
NEVER!!
š³
My approach was always like "think of something and try to make it" no matter how hard that was, the harder the more you learn
And there were times I couldn't do it which is fine
That's kind of like what I'm doing now with dotenv stuff
Since I have no clue what I'm doing when it comes to that
But I do like that approach
bruh I was about to import an entire spring-like framework just for a json parser š
Kotlinx serializer š
I remember when you used to flame kt lmao
afaik spring is used for web applications, right?
who
you
me?
You
spring is a HUGE ASS FRAMEWORK that does literally everything in existence
oriented to web stuff yes
Cuz everyone does for every language before they learn it
true
That's intimidating
it's colossally big
and super over engineered as fuck
for no reason other than because java
Learning it is like learning a new language
we have the technology

love not having to write sql myself
sql mysql
I cannot type properly today
mood
there is a reason I'm having copilot write most of my code
help me 
Watcha working on?
oh, you know
just trying to learn a framework
which requires me learning the entire fundamentals of functional programing and category theory
Nice
i think both clojure and johnny would have something to say about that lmao
that's a whole other level š„²
but yeah clojure is EPIC
I tried it
it's super cute
but it's too much for me
im looking at haskell rn
probably just gonna implode before i get anything useful out of it
but i really do like chaining functions and stuff, all the stuff we're doing with ChatChat
oh? wdym?





