#dev-general
1 messages ยท Page 352 of 1
bad
๐คช
standard formatting basically
Kernigan and Ritchie, the two guys who made C and pioneered that style of coding
wahtever u use
they knew what they were doing when it came to style
blah() {
stuff()
}
oh btw, fun fact: K&R is actually brace on next line, the only style that has the brace on the same line is K&R OTBS (the One True Brace Style)
fucking what
look it up
oh my god
anyway, see you lot later
about the function part, or the readability lol
intriguing
you better put your opening squiggly brackets on the same line or else...
clojure enters the room
you don't have to ๐
It's definitely a single expression in clojure
I think
K&R OTBS was definitely named properly
Because it is in fact the one true brace style
allman named allman because all men should use it
Agreed
๐ฅฒ
wait what
one style looks like that iirc
do {
input <- readLine
; putStrLn input
; return () }
``` this is correct Haskell iirc
K&R OTBS is the one true brace style, objectively
yeah
And technically how you should write it, if you're going to use the verbose syntax
you literally post that daily xD
they hated jesus because he spoke the truth
just with different words
do? What kinda imperativism is that?
lol
You might think it's imperative
brister mitten
Where in fact it's just syntax sugar for monad bind operations ๐
Lol you just implied I'm jesus
And also replacing the values fetched with let, directly into the use site
:woozy_face:
maybe u are a far descendent of jesus
Becasue of referential transparency ๐
who knows
\๐ฅด
yes!!
\๐ฅฒ
๐ ๐ค ๐คค
y'all are throwing around big words and im a little scared
wait till u see johnny
It jsut means you can copy that entire expression to the use site and it would mean the exact same thing
due to lazy* evalutation
Johnny actually knows what the words mean
Whereas I just say "composition semigroup" with no knowledge
but you're the soldier from TF2, you know what every word means
almost every word๐
Mister Britain
That is 100% not where my username came from
Definitely not
๐
Ya'll know the feeling when you skip 5 classes and now all of a sudden you have to write an assignment about "Laplacian of Gaussian" or whatever the hell
Haskell moon
Coz Im absolutely lost on what is going on here
i might have? i dunno I also applied for developer rank does that give it to you too?
don't think so
This one? https://github.com/Starmism
YOOOOo
yeah but I also have a real life dev account that I'd rather not dox myself with in public lol
so I hope I qualify! :)
wait
2 days
fefo uses maven ๐
in what project lol
fair enough
the project we're redoing uses gradle and it is quite the source of confusion for me
https://github.com/Starmism/BetterJails, which is a fork of fefo
ah yes, that's v1
that's the legacy edition
we're redoing main rn which uses gradle
I think fefo converted everything automatically and that's why stuff kinda no worky
man the blue name is so nice
i feel like, 50% cooler already
is there a brighter blue?
or like uh
no
tier 2 > tier 5 > tier 3 >>>>>> everything else > t4
pog
3 more years to t9
only a few decades and you'll be tier 10!
holy shit that was amazing
literally me with every deadline
10 seconds away from loosing like 25 marks and today's attendence
๐ฅฒ
it's pretty nice
My prof just throw random times
This one was jsut the class duration tho, the prof just said we didnt have to be in the meeting and that we jsut needed to submit on time
๐ฎ
bruh what i turn on my pc in 2 days and everything is still running even tho the plugs were off
sketch ๐
FBI watching you mate
i look in task manager and somehow my game was still running even tho it wasnt open ๐
it just knew you were grinding
lol
imagine not having your full name public on your GitHub account and in all of your author tags
i do on some of them
.
..
...
....
.....
......
......
lol
Hey, I'm on mobile, give me a break
no
y'all are really just farming xp eh?
๐ข
Morning
I think you only get xp every 40 seconds or so
Not every individual message
good morning. we have been very productive
v-very
yes
Waffle
๐ง
Oh yeah?
#development lol
do you like waffles
My alt has waffle in the name :p
now that's on brand
Waffles are pretty good but tbh I haven't had them in a month or 2. They are out of my budget for the time being.
morning
hi
FredtheWaffle lol
well, afternoon for me, currently 13:58 lol
Ah, rip
7:58 am for me boss
chocolate waffles
just didn't sleep >:)
out of your budget?
09:58
its 9:59 AM for me
waffle not saying hi to me
yo fred you live in the us?
man Iโm in school rn, where are you guys
EDT
sounds like eastern time to me
home
home
Maryland
my buddy lived there too
oo cool
69 street avenue
Lol
lol
(To dkim)
|| give me ur ip address ||
๐
I've joined your server dkim, you can find out my IP address lol
wait really?
oh
u have my ip too-
lol
how tf are you at home
I have to be in form in the morning by 08:40
lucky
Got a review on my plugin:
(I know him, but still lol)
very epic plugin indeed, yes. u r my dad, thanks mom. i really appreciate it, thanks again
man, virtual school would mean Iโd still get to program Krypton all day
|| i forgot my grabify password ||
haha
||Why'd you click on this?||
i didn't click on it
wow
because my discord automatically "clicks" it
Right
Hax
oh dkimโs one of those who has spoilers automatically shown smh
lol
Wierdo
How can I set breakpoints?
click

Not working
wat
Click harder?
harder
Its Android Studio
oh
But at the hood its intelij
yeah should just be clicking on the line number, makes a little red dot and everything
make sure to run in debug mode though lol
click the bug instead of the arrow lol
top right
maybe IJ canโt debut that, idk
that looks like semi readable Java bytecode lol
what are you actually trying?
oh myyyy
looks smali to me
probably best to decompile
๐คฃ
can ya get ASM from it?
yeah apparently smali is the format used by the Android JVM
itโs modified JVM bytecode, you can decompile that to Java
https://github.com/AlexeySoshin/smali2java literally one google search
pop-u-lar
probably the amount of times Iโve mentioned it here
bruh why does the #mc-server-general still exist if there is no server lmao
historic purposes?
yeah but like its still listed as a reward on the rewards list thing
i was kinda hyped :(
cause I got here a build.gradle common, and a build.gradle bukkit, and a build.gradle over both of them
compileOnly or implementation something("modulename")
project(":your-module")
where do i put that
in dependencies
in your implementation spec
either compileOnly or implementation project(":your-module") depending on if u want to shade or not
okay well, that shit didn't work
it says it'll make a circular dependency
that doens't sound good
I did project like johnny said
well you obv can't have a module depending on a module that in turn depends on the other module again
well what if i need to access them from eachother??
Both from both is impossible
wtf
you need a third module then
this is why common modules that are depended on by platform implementation modules are a good way to go
LuckPerms does this really well
well that's the opposite right now boss
I mean, LuckPerms uses like Gradle 4 (iirc) with shadow 2, so it could definitely be better, but in terms of modularity, LuckPerms is really good
the fact that your "common" module depends on your "bukkit" module is questionable
wdym you inherited it
Lol
Ah
Then either the author never built their code or you messed something up in the configuration
ยฏ_(ใ)_/ยฏ
Thinking about it, configs in Krypton will actually be really nice
Since kotlinx.serialization is exposed in the API
So you can just depend on KAML for example if you want to use YAML for your configuration, write a data class and bam
Ez
Nice and idiomatic xD
https://paste.helpch.at/dakosugari.hs fucking adventure, it mess with my simple broadcast command ๐ค
it's literally Bukkit.broadcastMessage(message)
Wait what does it mean by no style?
yes
If using the legacy API causes issues, make an issue on GitHub
I think it doesn't like my raw hex
Or ask in the Paper or Adventure Discord
what format does it use for hex?
&#
bleah
&# is horrible
why?
Adventure is good because it offers plugins an extra layer of abstraction for multi platform compatibility
BS
Adventure ew
Why don't you like it?
I mean, some of kashike's formatting and stuff is very questionable I can agree, but I like it
E.g. not using getters and setters that are Java standard which breaks Kotlin compatibility
easy fix
Also he decided to make a Kotlin DSL but removed the @DslMarker annotations because "there's no official documentation that says functions can have that annotation"
Style.style is also very questionable
But overall, it's a really nice API
The NBT library saved my ass as well
I'll probably eventually make a kotlinx.serialization implementation for NBT to replace it, but it's good for now
And also a kotlinx.serialization implementation for TOML
event priorities are the ones that say in which order the code is ran right? If I have an event with LOWEST priority, one with NORMAL priority and one with HIGH they run like this: LOWEST,NORMAL,HIGH right?
or does that not affect the order?
yea itโs sorta backwards but thatโs right
well idk if its bakwards
youโd think highest priority would be first but nope :)
it makes sense for me
yeah you'd think HIGH would run first eh?
because if the highest is ran first then the lowest will run after and will change everything
which is exactly what you don't want
well huh
true true
priority is a way of measuring how soon an event will run
the higher the priority, the sooner it will be run
may or may not have forgot to fix the backwards priorities in Krypton's Kotlin version of the BungeeCord event bus
The naming is confusing
well in this case it measures importance xD
wdym
the name "EventPriority" doesn't make much sense in of itself
I'll just swap the do while to go from the max val to the min val
yea it should probably be event importance
oh shit I guess you're right it is backwards
or just rename the priority thing bardy
Nah, I want priorities
the problem is the "priority" has nothing to do with the event
It shouldn't even be named in a height scale
it should be named in a time order
like FIRST and LAST
yes
yea thatโs a good idea
and that's how you open a conversation to farm xp on HC
Oh btw, the way Bungee handles priorities is whack
lmao blitz
=xp 186255788212355073
level 11 already bois
server boost is OP xD if you want to speedrun xp
2 days down
yeah
I didn't even server boost bro!
server boost good
=xp
good luck
LOWEST is -64, LOW is -32, NORMAL is 0, HIGH is 32 and HIGHEST is 64
Then it uses a do while from the minimum byte value to the maximum
I mean at least that kinda makes sense
Which is really dumb and inefficient imo but ya know
they can be thought of in a linear order
Looping through every possible byte value is dumb when you only do something for 5 of them
You can have in-between listeners :^)
See? BungeeCord is op
/s
!/s
i wouldnโt copy bungeecord or spigot with the event priority stuff
something like that
Ah yes
Since the priority doesn't seem good how about instead of a constant have the priority be an Int?
you can't determine the order exactly because the plugin authors can't possibly know what else is part of the system
so an enum does make sense
I personally like Bukkit's just dislike that it's reverse
it's naming is off, it probably should neither be Event nor Priority
event makes sense, no?
EventOrder with the FIRST->TENTH thing is the best way In my mind
no
it has to do with the event
you don't order events
i guess listener
but it orders how events are executed
not event
you order your listeners
Yeah Bukkit's are Importance it's even stated in the docs but they call it priority for some odd reason
yea ListenerOrder or ListenerImportance would@be better
Krypton's will be priorities in the correct order
Also, monitoring won't exist
There's no need for the monitor priority
but what if you wanna monitor huh
You know you still get given the same mutable events as any other priority right?
Why?
make it immutable
so that ppl can do high priority stuff, then monitor can log and stuff
problem solvo
ok, I made my project actually open source.
https://github.com/fredthedoggy/RestPlaceholderAPI
that took a while :p
Events are already mostly immutable
gradle is complicated ;-;
The only thing mutable is the isCancelled priority
it is not!
i should make a pr
lol
even though im not on my pc
and all the things I were using supported maven, only some of them supported gradle
Like what?
looking at ur build.gradle
it should support gradle
ima make a pull request
in 10 minutes
I was about to link https://sparkjava.com/documentation#getting-started, then I realised it does have gradle support
meh, maven is easier for me
Maven is easier, but it's too verbose for me
oh really?
XML requires too much
if it supports maven, it supports gradle
I personally like XML
Important lesson to learn
but I didn't know that ^
time to fork
Stockholm Syndrome
lol
compared with Gradle's really concise Groovy DSL, Maven sucks ass
its because its similar to HTML, and I've used that for ages
you're a Groovy guy :)
bro wtf, even I know that's a lie and I use Maven all the time
just use Gradle, it's really easy for your single project
you get all Maven repos in gradle anyways
Im only struggling cause I have a moderately complex use case
for small to medium projects gradle is literally a straight upgrade
Yeah
It can be difficult to transition larger projects
seriously, I like xml
It's kinda like Java compared to Kotlin, a bunch of useless typing for no gain
eh, this is the first time I've ever used it, maybe I'll learn to hate it in the future
And in this case, Gradle is like 80% faster most of the time
XML probably seems nice because you don't know any different
have you tried yaml
yes
cause that shit is like butter
let me make a comparison for ya
maven is like json, gradle is like yaml
don't shit on json
erm
I personally prefer json to yaml, because it makes more sense even if its not tabbed correctly
lol
lol
java ^
I love toml
:p
toml is on the same level as yaml imo
Basically, gradle good maven bad
alright so maven is like java, gradle is like basically any other language
f# ๐คค
but- but I like javascript better than java
you're gonna hate me for that
common lisp ๐คค
but we can work with it
fair enough
I can understand that
you said this is your first time using maven?
lol
well, I've typed a line in xml before lol
but basically, yes
okay so make it your 0th
just use gradle right now
before you even get kinda used to maven
how do I switch?
have u ever had to shade in maven? literally illegal
very easily
is there an easy way
I think one thing sums up why Gradle good Maven bad
50 lines of XML ๐ฉ
hurry help him switch
u guys have it covered
I will just stand back and make annoying / funny comments every now and then
Gradle:
dependencies {
implementation 'org.kryptonmc:krypton-api:0.12'
}
Maven:
<dependencies>
<dependency>
<groupId>org.kryptonmc</groupId>
<artifactId>krypton-api</artifactId>
<version>0.12</version>
</dependency>
</dependencies>
personally #2 makes more sense to me, but I see your reasoning
lmao he actually did it, the mad lad
my hero โค๏ธ
xml is not readable
@half harness โค๏ธ
ik lol
where are the spaces
there aren't any, that way its not confusing
i forgot to remove pom.xml
ik its not done :p
1 is a syntax sugar, you can also do group: 'a', artifact: 'b', version: 'c'
like, barely? I dunno, i can read like 15 characters of groovy easier than parse like 4 tags in XML
also i just did this via github.com... so if i messed something up, whoops
makes it hard to read
im not on pc
Yeah that's just a lie
yeah I was just about to mention that
always be on PC
LOL
well, XML is more readable for beginners
its because I came from html / js ^
I came from java
ok i deleted pom.xml
I would again disagree
i will die with java
if we just indoctrinate them with gradle, they'll never have to suffer
it's like saying "python is better for beginners"
I will die in a CoffinFactoryAbstractBuilder
which it is
yeah, but then they have to learn Java and they're fucked
true
XML is horrible vs Gradle.
@eternal compass u can merge now
XML has like 5 lines vs the Gradle of 1 line.
how about 0 lines?
o
whitespace time
I'm gonna figure out how to test it first
You could use it in pretty much any situation
lol ok
mmmmmmhm
Update 4 months later - the first release (0.0.1-alpha) was published recently
I hate having to run gradle shadowJar build
What do you think of this crafting API btw?
I wish I could make build run shadowJar first
const { crafting } = require('velt-helpers');
crafting.createShapelessRecipe([ 'flint', 'gold' ], 'flint and steel');
crafting.createShapedRecipe([ 'gold', 'diamond' ], 'diamond sword');
crafting.createShapedRecipe({
shape: [ 'gold', 'diamond' ],
result: 'diamond sword',
id: 'my_special_diamond_sword'
});
crafting.createFurnaceRecipe('coal', 'iron block')
ho hum
Would this be simple enough
i thought it was just gradle shadowJar
well it depends on ur config
is that Bukkit in JS
oh
๐คฎ
๐คฎ
๐คข JS
flint and steel what...?
๐คฎ Java
Bukkit in JS is just wrong
isn't that the name of the item
@jovial warren not really
theres spaces?
java's a pain in the ass
we don't use java here
compared with JS
js is ok, but that just looks wrong
auto-conversion to make code more repeatedable
we use kotlin here
I guess?
well it's just an idea for an api for crafting
I know very little about gradle but I am 100% sure you can add build to run automatically after shade
yeah we use Kotlin
wtf
fair enough I guess
prolly
those are two conflicting statements
VERY controversial opinion
yea u can
defaultTasks 'clean', 'build'
You won't find many people agreeing with you here
thanks
Clojure better
right at the top of your build.gralde
yes frusty
Typescript > Javascript > Kotlin > Java
Subjective personal opinion
yesss
Agree
clojure time
Also there is some other benefits
reverse that order and swap Kotlin and Java ๐
ding dong
Clojure kinda stanky though
best JVM languages in order:
Elara
Clojure
Kotlin
Scala
Groovy
Java
eeeeeeee
that's neat
NPM ๐คฎ
And also all of the Java ecosystem too
in inteliJ how do I test out a commit?
(or a fork in this case)
that ecosystem is fucked
So frameworks like discord.js, got, etc
Node too thicc
Kotlin > Java (i haven't used the other langs much)
@jovial warren Has some good modules tbh
overrated
one line package is-promise breaks NPM comes to mind
what sort of lib is that lol
JavaScript frameworks are shoddy creations built on a shoddy foundation (javascript) that are bound to fall apart
Checkout the branch
every single one
i mean not all are good
JS ๐ฌ
just checkout the branch and test it lol
node-fetch
NPM is one of the worst ecosystems
express
where do I do that? lol
eh it's pretty good imo
rambda best js library
discord.js is just no
discord.js is good tho?
d.js is nice
eh, maybe
I'm just a hard Kotlin fan lol
should be bottom right ish in intellij, click on the little git thing
discord.py is nice too.
leave
const { Player, Zombie } = Java.pkg('org.bukkit.entity');
?
Works just like any other classes
otherwise, go to Git in the top, click Manage Remotes, change the url to the fork, checkout, then change it back after you merge it
discord.elr @prisma wave ?
Omg
I prefer python so.
bro wtf
Odin is back
Sadly.
i prefer static typing thank you
Soon
whoever made these frameworks for Python under the assumption that Python is somehow a language that's good for production should be shot I swear
python is a glorified scripting language and should be thought of as nothing more
the ultimate general purpose language imo
Python is a decent language, but writing a web backend in Python is just
i started with python
well ofc bardy
I like how easy it is to just do stuff with things like node and py
would smth like this be good
crafting.createShapelessRecipe([ 'flint', 'gold' ], 'flint and steel');
crafting.createShapedRecipe([ 'gold', 'diamond' ], 'diamond sword');
crafting.createShapedRecipe({
shape: [ 'gold', 'diamond' ],
result: 'diamond sword',
id: 'my_special_diamond_sword'
});
crafting.createFurnaceRecipe('coal', 'iron block')
hmmm
that's not bad I suppose
Brister, did you remove that repo of the language you made?
i don't trust npm to manage anything for me
Elara? nah it's going strong
omg brister fix your website it just blinded me
ngl though TypeScript = EPIC
elara always wins
there was another one before that
ya know, there are lots of other languages that support static typing
nope
I'd rather write in Python than JS ngl
and you could choose like, any of them
no other languages allowed
there was another
@cinder flare true but I just like Typescript
What's wrong with it?
like, any other language
Remember when everyone was making their own languages on here?
I don't like JS for one reason: lack of types
@jovial warren Hello TS!
ok so, i'm in a basement = lighting and you website came up with the brightest yellow it could pick for the first color.
lol
I really like JS
several people are typing
you can run into some really really weird bugs when you don't have any type safety
how do I update inteliJ to use gradle instead of maven?
hence typescript
Exactly why Typescript exists
this is #dev-general, what do you expect
we are Kotlin fanboys here
I'm adding Typescript support to my plugin
switch to netbeans ;)
I've never touched Typescript
I assume you mean Frigga
bro Typescript is just duct tape over a leaking boat
Is that the one you made when what's his name was making one too
so life is easy with it
Sure it's a little nicer, still a shiny turd underneath
That's just bad luck I'm afraid, it's random colours ๐ฅฒ
let's face it though, there is only one good API that exists for Minecraft
Haven't worked on that in a long time tho
Have you read like... any of the hundreds of articles about why JS sucks to work with?
F
It's all about Elara now
Elera?
nms?
I eagerly await the day I can use any other language in the browser
@cinder flare I mean yeah, but I've never really encountered much of a problem in the many projects I've made with it
WASM can't come soon ehough
I love wasm
@cinder flare There are many transpilers for JS
But they all have to be javascript at the end of the day
I am a wasm fanboy basically
brister, you know Elera is the 2nd google search result?
Which is the real problem
wot
And trust me I know, Kotlin compiles to JS lmao
O sick
and TS
you didn't know that?
ofc it is lol
no prizes for second place bm
I prefer it over every other language
there's probably like 10 repos named elara on GitHub
tbh I think we can all agree that
Nah I memorised the link off by heart so no need to Google
"Skript" is terrible
It will be #1 soon ๐
skript is good for what its for
I strongly strongly second this notion
"off by heart" it's probs in your auto search thing LOL
Not for what most people use it for
Also wtf chat is so busy rn
the reason why I hate Skript so much is because I see it as an excuse for server owners to not learn Java
That is true ๐ฅฒ
which frustrates me
well yes
@jovial warren just learn JS nowadays
who would learn java
fundamentally Skript isn'tterrible
lol
I look away for 5 seconds and there's about 30 new messages
just learn ceylon
cough Skript Anti Cheat cough
cough $30 on MCM cough
cough 2000 buyers cough
Sounds like a JS developer to me
6k lines
sounds like a Skript "developer" to me
JS has good features
Wasn't the best at the start tho
Hence why my pages take seconds to load
But it has some really good features
use rust
Skript isn't even a programming language, that's where people make the mistake
@cinder flare Not for me so ๐คทโโ๏ธ
and wasm
it's a scripting language
and golang
and writing scripts in Skript isn't exactly difficult lol
it's not a programming language
I'm sure other languages exist that have the same features but are better in every way and logically organized
I stand by that firmly
Just learn kotlin or JS or for fuck's sake, even Java
It also has some really nice syntax
@half harness what should by gitignore be for Gradle?
and I just personally prefer it
since it's simple, nice, concise, and has syntax i like a lot
build and .gradle
just learn haxe @Server Owners
Which is still a programming language
could you give some definitions
sheesh
.gradle, .idea, build
you forgot .idea
It's subjectively the best @cinder flare
thats the same as maven, so its fine
i assumed he already knows
Also it has a big community and lots of npm libraries
yes
oh btw Corman, replies exist now ๐
I just can never get behind the inconsistencies and how shitty npm is
could I see an example?
yeah .idea is general
i didn't forget ๐ค
.gradle/
.idea/
build/
```ez
I haven't even noticed, it works fine for me
google gradle .gitignore
right click build and git -> add to gitignore ez
ew
Is skript Turing complete?
thats not very emacs of you young man
oh no
I think so
never click
oh no
true == 1 // true
true == "1" // true
false == 0 // true
false == "0" // true
false == undefined // false
false == null // false
null == undefined // true
elara in skript coming soon
you and your "turing complete" BM
yeah
Well obviously I would prefer church completeness
"math computations", what the hell does that mean
"\t\r\n" == 0 // true
"\t\r\n 16 \t\r\n" == 16 // true
"\t\r\n 16 \t\r\n" == "16" // false
solving anything math-related?
Use ===
yeah that just sums up the problem with JS in a nutshell
mafs
16 == [16] // true
16 == [1,6] // false
"1,6" == [1,6] // true
So why tf does == exist then'
and what exactly counts as "math-related"
Modern JS can solve it
That's JS, not npm
yeah but you shouldn't have to do that just to guarantee type safety
But yeah
var a = "1"
var b = 2
var c = a + b // c = "12"
Is a compiler math related?
And they can't remove it for backward-compatibility
oh btw, you know replies exist now @autumn tapir
JS type coercion really isn't as bad as people think it is
Use let and const and also use TS
alert((![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]);
there we go
and I do
what
the
actual
fuck
again
type that bad boy into the console
side effect of past js
it gives you an alert :)
please tell me that fails to compile
with smth like TS
oh. my. god
and also
you're joking
coffeescript is the future
why don't they remove all those shitty features and maybe I'll like JS again
as long as you're not being dumb
backwards compatibility
Backwards compatibility
fuck it