#dev-general
1 messages · Page 311 of 1
Mine average about 60-70 lines I think
mine averages like 30
Yea publishing adds a lot
actually thats a lie i publish something in most of my public projects lol
i dont even know what they do
i just copy and paste the code that stackoverflow tells me 🤷
They're like gradle modules I think
Just at runtime
Oracle seems to be pushing their use pretty hard
Oh yeah they're pretty similar to gradle, just enforced at runtime
And used in the jdk and things
So you can only bundle the stuff you need
docker good
dockerize it
but
its never too early
huh?
You should probably make a dockerfile before creating anything else actually
Make a blank dockerfile before even touching gradle
ahhh no thanks
Yup, modules have to explicitly declare their dependencies
Like with an import
Or a gradle script
i have an issue
Module 'MCServerCreator.main' reads package 'javafx.css' from both 'javafx.graphics' and 'jfxrt'
You will die if you do
module MCServerCreator.main {
requires javafx.base;
requires javafx.controls;
requires javafx.graphics;
requires javafx.fxml;
requires org.apache.commons.io;
requires jfxrt;
requires rt;
opens me.dkim19375.mcservercreator to javafx.fxml;
exports me.dkim19375.mcservercreator;
}
i dont get it
jfxrt and javafx.controls are conflicting
module WordUnscrambler.main {
requires javafx.base;
requires javafx.controls;
requires javafx.graphics;
requires javafx.fxml;
requires org.apache.commons.io;
opens me.dkim19375.wordunscrambler to javafx.fxml;
exports me.dkim19375.wordunscrambler;
}
This is my module-info.java for WOrdUnscrambler
why can't it be the same?!
I've literally just copied and pasted it!
You dont have jfxrt in the bottom one lol
what is jfxrt
idk
but
all the code I have in the top
i have in the bottom
because the top is literally empty
except jfxrt
The ones you sent aren't the same
Package 'java.lang' is declared in module 'rt', but module 'MCServerCreator.main' does not read it
um
what does that mean
code: ```java
public class MCServerCreatorMain {
public static void main(String[] args) {
}
}
Don't depend on rt if you don't need it
how do I not depend on rt
"code"
sends an empty class
module MCServerCreator.main {
requires javafx.base;
requires javafx.controls;
requires javafx.graphics;
requires javafx.fxml;
requires org.apache.commons.io;
opens me.dkim19375.mcservercreator to javafx.fxml;
exports me.dkim19375.mcservercreator;
}
this is the module-info
what do I remove?

???
?
public class MCServerCreatorMain {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
this?
Yes
now two errors
🥲
😢
Where's that even coming from
I mean why
I... don't know
"lines 4 & 5"
only two lines in the screenshot
Maybe try adding rt?
i showed line numbers
fixed... for now
» Don’t ask to ask
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
Source
🥰
👍
ive got another issue
Ok
Cannot resolve symbol 'Application'
Don't u need to import it
requires jfxrt;
but now
Module 'MCServerCreator.main' reads package 'javafx.css' from both 'javafx.graphics' and 'jfxrt'
uh oh
help me
hELp ME
50 things in my home directory 🥲
Why sad face? lol
bc java 8 is popular among server owners
I mean you're using Javafx, that won't be running on any server, so why does it matter?
bc if server owners have java 8 they won't install java 11 just for this
but then again this is just a small project that I won't really be releasing to the public
Javafx won't be on the server mate, doesn't matter if they have java 8 or not there lol
No
You can't run java 11 on java 8
lmao
so i want to code in java 8
Why though? I legit can't understand your issue
aw nevermind :c
Wot
No idea, talking about server owner's java when a javafx application has nothing to do with server
The users will be running on their pc doesn't matter what version or application is
okay
so heres a scenario
why won't my messages send
user: has java 8
app: built in java 11
can run? true or false?
What makes it so a user can't download java 11?
docker
because they don't know that they should get docker
What has docker anything to do with this.. Javafx will be running on their pc not a server..
Make your application install java 11 when installing?
Then require users to have java 11, it's not that hard lol
sdk i java 11 🌝
ok
is it a good idea to have multiple Parent/fxml file for things like:
- Choosing server version
- Choosing server type
- etc
what is foobar
type = paper, spigot, tuinity, craftbukkit, etc
anything else I should add?
3 seems quite small
lol
Remove spigot o/
why do hashcodes suck
for UUIDs
takes on average of 82874 tries for a hashcode to duplicate for UUIDs when running 100 test cases
Don't ask why im fucking around, im just wondering lol
package com.github.pulsebeat02.testing;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
public class UuidTesting {
public static void main(String[] args) {
Set<Integer> set = new HashSet<>();
int count = 0;
int sum = 0;
for (int i = 0; i < 100; i++) {
while (true) {
int hash = UUID.randomUUID().hashCode();
if (set.contains(hash)) {
System.out.println("Found Duplicate Hash Code: " + hash);
break;
}
set.add(hash);
count++;
}
sum += count;
set.clear();
count = 0;
}
System.out.println(sum/100);
}
}
only 82874?!
uniqueness of 32 bits vs uniqueness of 128 bits
Thats (2^128/2^32) collisions
i.e., 2^96
Yeah true
import java.lang.reflect.Field;
public class StringTesting {
static {
try {
Field VALUE = String.class.getDeclaredField("value");
VALUE.setAccessible(true);
VALUE.set("Hello World", "CockBreath".getBytes());
} catch (ReflectiveOperationException e) {
throw new Error(e);
}
}
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Yugi or dkim
you should run this
lol
uhhh what does that do?
uhhhhhhhhh
i know what static blocks do-
hows this look? (Note: Buttons will be gray, but it shows blue in SceneBuilder)
Make it dark theme and it's gucci
look pretty centered?
ohhhh
idk how
well
i do
but idk what colors
epic
lol
Beautiful
😂
what you up to
idk how to color the buttons
Learning experience
ciao
@half harness For dark theme reference https://material.io/design/color/dark-theme.html
Pretty happy about how this turned out, instead of having a bunch of routes in the routing like get("") {} etc, having a route handler for each type, made the main module look very nice
Ktor looks really nice ngl
how is this "full stack" xD

Is it possible to do vb stuff on mac?
Maybe
Does full stack not mean including front end?
not always
originally it was for front/backend devs who also knew and were experienced in the other area
not both jobs at once
Ah I see
i swear im about to reinstall my intellij
or else imma lose motivation for this project lol
visual basic - everyones downfall
visual basic has caused countless developers to quit
🙃
Dammti barry
why
WHY
www.codingame.com/clashofcode/clash/1598874211d6029fdf0a6d283bd527a136cecde
Haskell did it!!
!!!!!
outstanding
because of haskell not allowing multi type arrays
is the source on gh?
Not yet, let me just extract the credentials out to env variables or something
Imagine trying to make this work
😌
hard coding creds is bad practice, especially when you're me and forget to remove them before you push to GH
I did that when I first pushed BardyBot
it's not a bad practice to write functionally pure code
btw bm the earlier issue was that I wasnt wrapping the output in an IO monad
network calls require the IO monad to be returned even if the function call was resolved before the return expression
what are these monads? lol
good question
Well
Wikipedia says it's some sort of generics
Kinda
what function call?
to quote the page, "a monad is an abstraction that allows structuring programs generically"
that went right over my head though lol
i believe monads are effectively wrappers of a value
kinda like Java Optionals
just representing different states and things
Mhm
o i guess that makes sense
since that returns an IO that is unwrapper, I must return an IO as well
mhm
IO IO IO IO String 🙂
login :: (MonadIO m) => String -> String -> m (Maybe LoginResult)
This is the signature for my login function rn
MonadIO being the IO Constrainst
IO also works I think
beautiful
But people I asked suggested me to use the constraint instead
I see
https://hackage.haskell.org/package/monadIO-0.11.1.0/docs/Control-Concurrent-MonadIO.html according to this anyway
unless you mean a different type
¯_(ツ)_/¯
Thats not the one I used
ah ok lol
Control.Monad.IO.Class.MonadIO
IO satisfies MonadIO's constraint
So that function just in the end allows me to return any other if any
Similar to applying Liskov maybe?
@prisma wave
https://github.com/Vshnv/clashbot
There we go
beautiful
💀
handleToLink handle = "https://www.codingame.com/clashofcode/clash/" ++ handle could this be changed to ```hs
handleToLink = (++) "https://www.codingame.com/clashofcode/clash/"
or something similar
im addicted to partial application 💀
@jovial warren can I add columns to an existent table?
you can
ALTER TABLE
ALTER TABLE table_name ADD COLUMN column_name
```iirc
or maybe just ADD
haskell do be nice
Sounds like you problem 😂
with exposed, bbg
add a column and run createMissingTablesAndColumns
nike
or in your case, a field gaby
why do u hate urself efe
dodo
I think you read my message wrong lmao
this looks ugly
someone just googled dark theme color pallet and clicked on the first link tho xD
idk what font to use
looks fine
xD
i used the one Matt linked me
maybe look into material UI
that looks nice
or u can probs use something like bootstrap
bootstrap?
css framework]
Make the upper text a darker shade of the button's color
hmm idk about that yugi tho
hm
I feel like white is good there
I think that should look nice
just the font
idk tho because I'm bad at this xD
It feels weird with the purple tho
purple = good
as you can see here https://blitzoffline.com
don't click this btw: https://blitzoffline.com/rick-roll
lol
many projects as you can see
mhm
Lorem Ipsem DOLOR
Romania
idk I've copied it
why are so many people from Romania
I've never heard of that country except from devs
why are so many people from china
._.
I always pronounce lorem ipsum in my mind like some sort of spell from harry potter or something xD
hmm because they were born there @onyx loom
Fake News!
oh really blitz
They were imported there
thats very interesting
True!
that's why there's so many males
In-Vitro country
they're preparing them for war on humanity
😮
humans are a bit less efective at dying for their country
so they made them men only
looks.... eh
u look eh
Go top purpur dkim
wdym
minecraft font
purple*
ehuuhuhh
try that I guess
alright
dark purple for the top text
go to a shade generator or something and put the color for the buttons
and take a darker shade
Some shade of purple I guess
Try lighter
try a bit dkim.. it won't work the first time
further lighter
oh maybe an outline as well?
^
idk how to make outlines
google?
ahhh too lazy
oh wait is that an website? or what is it?
?
ill do it later
k xD
you lazy. but dw we all are lazy
how abt this
lol
no
that's ugly
xD
back
this is gray
which is better?
i like bottom
they look the exact same
i literally cant see the difference?
The only difference I see is the aligning
Part 3 of NMS practice for me 
d;spigot PathFinderGoal
public interface Painting
extends Hanging```
Painting has 2 methods, 1 extensions, and 10 super interfaces.
Represents a Painting.
Of course 👀
Remove 1.8
so remove paper and spigot?
You see
by adding the ability to download anything below 1.13 on there
you're encouraging legacy versions
smh
What are you doing?
how abt this
buildtools 😉
anyone know how to make it so that if i press the button
it like makes a effect
sorta
https://gfycat.com/cookedsleepybarb this is my old nms practice
But had to abandon it because of garbage packet sent
@half harness are they really playing mcpe?
unmute
yes
^
but still
don't unmute
we've told you to stop countless times
yet you keep doing it
what's he done?
keeps playing voices and stuff
im assuming with the 15.ai stuff
and then clip finally muted him after like 3 warnings
but i heard him say something like "stop or you'll get the boot"
then he said some other stuff that i dont remember
but he said it multiple times
In database <> means unequal?
what database?
sql? yeah
oops-
yikers
Why would you add a choose version button?
._.
Legit just only allow latest
lmao
@hot hull There are only missions right?
I'm still trying to fix how to make the version chooser not white
wdym?
i fixed the outer white issue at least
Are there any separate games in this?
Not sure what you mean by that, but there's quests, freeroam , etc
Ab
Ah
I didnt understand the question you asked
in the game
What do I have to choose from?
I mean you pick, but my suggestion was either farming Frost so you can progress faster, or opening some relics
farming Frost I guess
@old wyvern Go do the MR test first tho
Already did
why is it so far away from everything else
it's at the bottom left corner
so if I make the window smaller, it'll be closer
i just have a big monitor 😛
bc theres no next button
(in the other selection)
and I want to keep it consistent
o
Config should not be an util
Interesting I just learned that you can pass a value as this and another as it in the same function
For example:
validate {
// this. will be an ApplicationCall
// it. will be a Payload
}
oh so like Blah.(Blah) -> Unit or something
Yeah
Always learning things with Kotlin xD
Another thing I learned, if you have a variable that holds a function you can call it like one
Like
val func: Blah.(Blah) -> Unit = {}
You can
func(blah, blah2)
Instead of
func.invoke(blah, blah2)
yea
never found a use for that one tbh
@jovial warren can i pass a PlayerEntity to another method to read its data?
you can do yeah
it's an object held in memory once it's loaded from the DB
also, Komponent 1.1 pog
Just using both lmao
What about keeping it on a map for placeholders access (so I dont query the database every time)?
https://github.com/Paul2708/spigot-plugin-resources got added to here
big pog
bbg
wdym?
I store the data on a Map<UUID, Something> so I dont query the database every time placeholders are used
and that Something was basically a PlayerEntity
and I think about using PlayerEntity directly, without a 'middleman'
why don't you try using caffeine or cache2k?
what are those
what about guava cache?
it is a spigot plugin
caffeine is basically what happens when you take the caching out of Guava and make it standalone
yeah that's what caching is for lol
you can store those
I said, it acts like any other object in memory once you call find
or just generally once you get an instance
oh nike
spigot ships with guava included, that's the point
nice ty bbg
BigButtGamer
oi
Also @steel heart having a blast with Ktor, learning new things all the time, it is making things so easy to work with
What do you need help with?
Normalisation
-
- and 3. Form
Explain me properly ;c
Whats Intra-File Clustering and Inter-File Clustering?
http://www.smckearney.com/adb/notes/lecture.clustering.pdf heres the first google result on intra vs inter
i know nothing about it but that looks pretty detailed lol
wtf thats about clustering
i literally googled your question
Ngl i am not familiar with those therms lmao
I guess since i learned them in portuguese they wouldn't translate directly
it is like
un normalized
id name status
0 'user' 'banned :('
a bit normalized:
id name status_id
0 'user' 1
status_id name
0 active
1 banned 😦
wat
You would have seperate tables for:
Order,
Customer,
Article,
ArticleGroup
Not three?
THe first form says it have to atomatic values.
Like ArticleDescr shouldnt contain three values
so I split them to three individual datasets
yeah split it
make that a relational table with foreign keys pointing to other tables
how
id | surname | firstname | address for the customers table
id | date | quantity | price | customer_id | article_id I think? for the orders table
id | description | group_id for the articles table
id | name for the article groups table
something like that should work
But mustnt I split the address too?
id | surname | first_name | street_name | city_name | zip_code?
I don't think you have to split the address up though
merge articles and article groups
id | description | group
3 keys
ez
also, https://github.com/BomBardyGamer/admiral me got a second library now
me like making libraries
right, time to fix MineKraft not being able to decrypt messages
@prisma wave we be out here with random RGB colours for the status message xD
and we also be out here with working player counts
and tablists
just doesn't seem to want to do the basics, like decrypting messages
https://paste.helpch.at/unesupiyag.gradle any idea why sources can't be resolved on IIJ?
Fun fact, only one class has the sources available lol
welcome to one of the many, many bugs that IntelliJ has with Gradle
yes!!!!!!!!!!!
it is very frustrating
All I want is to make a collection of utils for my personal plugins 😭
Apparently kotlin gradle doesn't have those issues
fucking kotlin gradle
yeah Kotlin DSL doesn't have those
only Groovy DSL has issues in IJ
for the most part
but why ffs
Decrypter: Decrypted bytes [B@356be187 decrypted bytes my ass
no like
what should i do
white text for the numbers
and the same purple probably
for the version
ok
i personally think it would look better
§b 🌚
rm -rf .
they have legacy code in there from curiosity
smh
its probably trash
fuck wrong channel
Git gud
class PacketDecrypter(
private val cipher: Cipher
) : ByteToMessageDecoder() {
override fun decode(ctx: ChannelHandlerContext, msg: ByteBuf, out: MutableList<Any>) {
val data = msg.readAllAvailableBytes()
val dataSize = data.size
//Allocate a ByteBuf for decrypted output
val decryptedBuffer = ctx.alloc().heapBuffer(cipher.getOutputSize(dataSize))
//Write decrypted data into the ByteBuf
val decryptedContent = decrypt(data, decryptedBuffer.array())
decryptedBuffer.writerIndex(decryptedContent)
out.add(decryptedBuffer)
}
fun decrypt(data: ByteArray, writeTo: ByteArray = data): Int {
return cipher.update(data, 0, data.size, writeTo, 0)
}
companion object {
const val NETTY_NAME = "decrypter"
}
}
wot wrong
git: 'gud' is not a git command. See 'git --help'.
BBG about my gradle issue, would be great to know is just my ide acting weird and the code is fine
if it doesn't throw an error, it's probably fine
things like "method call is ambiguous" are just IJ's way of saying "fuck you I'm shit"
eclipse'
ffs
why
why is it always the smallest thing
I fixed packet decryption by just providing the decrypted buffer's array offset instead of using 0 @prisma wave
uhh why is intellij suddenly indexing the JDKs
and freezing
;-;
welp time to kill intellij
its been frozen for like 10 minutes
I already said I am
._.
it just suddenly start indexing all dependencies and the jdk
while i had 3 projects opened
and so thats what froze intellij
is not trying an error but I can't see the source of the code
even though the sources jar has been generated
fml
it. doesnt. work.
¯_(ツ)_/¯
please don't scream at me and just listen for a second xD
I made a library for my plugins that's just an Actions Library so basically [broadcast] message etc. stuff
how would I make it into a repository that I can import and stuff? Like are there special steps I need to follow or something?
like a maven repository or whatever its called
maven publish
oh that's nice of him, totally hasn't done that with like 100 other people already xD
lemme get my project that uses his repo as an example
yeah so ull need a well designed API along with javadocs including every micro optimization possible and then ull have everything for him to post it 👍
nice. thanks
xD
Idk how to make apis, javadocs and optimize stuff
I'm right there basically
just need him to upload it xD
publishing {
repositories {
maven {
def releasesRepoUrl = 'https://repo.bristermitten.me/repository/maven-releases/'
def snapshotsRepoUrl = 'https://repo.bristermitten.me/repository/maven-snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.hasProperty('mavenUsername') ? mavenUsername : System.getenv('MAVEN_USERNAME')
password project.hasProperty('mavenPassword') ? mavenPassword : System.getenv('MAVEN_PASSWORD')
}
}
}
publications {
maven(MavenPublication) {
from components.java
artifact kotlinSourcesJar
}
}
}
```ez
jesus wtf is that
and this is in my build.gradle or where? bcz I have no idea
that's why I'm saying if there's some tutorials or something
this is why space character superior to tab character
yes
I wanted to make my tab 2 instead of 4 but IDK about that.
I made it for VisualStudio Code
tho
hmm BBG is this publicly available on github btw?
it is
can you maybe give link please? thanks
https://github.com/BomBardyGamer/KotlinNBT it's from my fork of an NBT library that we no longer use because it's trash lol
yw yw
yes yes
you you need need that that one one too too
alright I'll stop
xD
its fine. its just something for some reason I do all the time
say the same thing 2 times
I feel like people ignore me (they actually do) so I just say it 2 times to make sure they heard me
for some reason I tried relocating kotlin in my library ???
yeah xD
not me hehe
I've never had a purpose for it
I mean this kinda evens it out tho 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
like using paper instead of spigot xD
yeah paper >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> spigot
I should learn how to make an API tho 😦
and javadocs
fuck
why is this so hard 😦
APIs aren't hard
just imagine you're a developer, and you want to make something that hooks into your plugin, what are you looking for?
I mean I have an ActionHandler class that does all the stuff for me, all I need from it is the execute method
hmm kill me please 😦
extract what you need, shove it in an interface, provide a way to get that interface without instantiating it, boom
static in Kotlin is the companion object right? xD
kinda yeah
objects are kinda different in the way they work, it's a singleton basically
https://github.com/knightzmc/MineKraft authentication pog
oh wait what? are you actually writing a server jar?
no. I've seen you all talking about MineKraft but didn't know what it actually is
I ain't got the pc to run a minecraft server xD
it's very bare
and stupidly lightweight because of it
omg this logback config is 😍
chat broken again big oof
lel
it would be better if someone made a joke with that and boomers
Why are many programmers boomers?
They say "Hello World"
I think I might have found in NMS code on how zombie spawn reinforcement on Hard difficulty 👀
Other than that, it's also hardcoded
EntityZombie entityzombie = new EntityZombie(this.world);
for (int l = 0; l < 50; ++l) {
int i1 = i + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
BlockPosition blockposition = new BlockPosition(i1, j1, k1);```
https://blog.jetbrains.com/platform/2019/06/java-functionality-extracted-as-a-plugin/
Wouldve been nice if this wasnt literally the ONLY place this was documented
Making an IJ plugin?
thats what im doing but the java functionality being extracted is literally documented nowhere
If I have
enum class A(val x:String, vararg val y:String, val z:String){
}```
what would an example of passing in multiple things for y look like?
it doesnt apparently
You can have varargs in the middle in Kotlin
Actually not sure let me see
Probably something like A("a", *listOf("1", "2"), "z")
What does .apply {} do
Lets you call anything on the object it was called on. as in that would be the this in apply's scope
why not just call it on the object or am i just being dumb
you can do something like
val config = HikariConfig().apply {
jdbcUrl = ...
username = ....
password = ...
}```
over config.jdbcUrl = ..., config.username = ...
mhm
Ah
jUsT uSe HiKaRiS data source thingy
@old wyvern My bad I just left yesterday, turned off the pc
lol, yea I left after a bit as well
You're too low MR to join on any of the missions I'm doing kek
welp
😮
can someone that has cmake installed and other cpp shit to compile me an application?
How would one work out the latest version of spigot (With no like spigot jar or anything, just with like a web request or smthn)
and same for paper
And then from that get the gradle shit
link
just install cmake?
doesn't seem so
source code
yea I thought it was the release for the repo you sent earler
I cant extend two things right?
I see it has something related to cmake but idk how to use it
no
hmmmmmmmmm
Well I want my thing to extend ModuleWizardStep so that i can pass it into intellijs ProjectWizard thingo, but i also need it to extend JFrame
@old wyvern I could actually carry you trough this mission for the parts, but you'd need to complete a quest to get the BP itself, if you interested
Whats a BP?
a petrol station
yeah idk how to build this shit
what app is that?
teams
Microsoft Teams
class SoftwareSelection: ModuleWizardStep() {
private lateinit var panel:JPanel
private lateinit var softwareOptions<SoftwareType>
override fun updateDataModel() {
TODO("Not yet implemented")
}
override fun getComponent(): JComponent {
softwareOptions.apply { SoftwareType.values().forEach { addItem(it) } }
return panel
}
}``` I need to extend jframe as well
JFX plz
I think at least, cos atm im just getting a panel isnt initalized thingo
hold up i might just be dumb
yeah thats just the case
when should functions be inline?
Might be done by the time you're done kek :p
oh rip
When using higher order functions
I mean if RNG likes me, otherwise I'm cucked
lol
so should all like util funcs just be inline?
no
just small higher order functions?
No use
wdym
There is no significant impact with inlining just any random function
so then what should i inline
wait I didnt see your edit there xD
Its fine to use when you have higher order functions, yes
Also, you shouldnt be using util functions, use extensions at the use site instead
ye
Ill try, just cloned
Give me a few minutes
oh wait xD
:))
lmao
Add padding on the sides of the buttons
now how tf i make them bigger
its autosizing based off the text can i make it like not
How come no matter how hard i press the delete button this horizontal spacer wont yeet itself
also dont ask me what the line on the right is cos idk
Is it locked?


