#dev-general
1 messages ยท Page 347 of 1
the only things I can recommend are Maven Central or own repo I guess
but Maven Central won't suit your purpose
wdym by own repo?
I mean you self-host Nexus or Artifactory or whatever on your own VPS
yw
Jcenter is closing right
yeah
that's why I didn't recommend it
and because I've never used JCenter
@prisma wave can you please help me with the event system? I want to know if you have any other ideas before I completely scrap the reactive setup and go for a regular event bus
I will be honest I have next to no idea where you should go from here
guess it's time to wave goodbye to flows and reactive events then
and switch to something like LuckPerms' event bus
๐ฅฒ
LP's event bus should be fine no?
vroom
yeah it should be fine, just kinda sad how reactivity is going out the window ๐
I mean try harder smh
I just realised
R.I.P reactive event manager
12/03/2021-14/03/2021
all I've been doing for the past month
is refactoring
ffs iwan
code better
I be sadge now
kinda swaying a bit towards Bukkit-style events ngl
though with a bit more immutability
for example: ```kotlin
class MyListener {
@Listener(ListenerPriority.NORMAL)
fun onLogin(event: LoginEvent) {
event.isCancelled = true
}
}
though I also want to add a way with functions, e.g. ```kotlin
on<LoginEvent>(ListenerPriority.NORMAL) {
it.isCancelled = true
}
Please don't do the priorities like Bukkit
Something that isn't reverse
Highest priority being called last makes no sense
yeah I'm not going to do that lol
they will be sorted ascendingly
well i mean it sorta does
How?
e.g. HIGHEST first, then HIGH, then NORMAL, then LOW, then LOWEST, then MONITOR
if I add all of those
because if you have a low priority that cancelles the event, then a high priority that uncancelles, it's uncancelled
so if you want your plugin to choose what's going to happen, you'd want it to be high priority
enum class ListenerPriority {
MAXIMUM,
HIGH,
MEDIUM,
LOW,
NONE
}
```looks good to me
That's not priority that's importance
High priority means you want it to execute first
High importance means you want it to be the last one to handle the checks
that's basically lowest, it literally means there is no priority there
Priority queue mat
like the listener couldn't care less about getting to it first
On a priority queue don't you get in first?
wdym get in first?
For example you are getting on a plane, if you're priority you'll get in the plane first
yea
Yugi what r u saying
I was implying that priority is the correct term for this
anyway, trying to think of how exactly to do what I want
not sure about whether HandlerList is a good idea or not yet
The thing is that Bukkit treats it like importance as you can see in the link bardy sent, but names it priority
lol
ah
True
I thought you meant the usage here was about "importance"
Oh okay, nah i was saying Bukkit is stupid
oh ok nvm then
https://github.com/SpigotMC/BungeeCord/blob/master/event/src/main/java/net/md_5/bungee/event/EventBus.java maybe something like this is what I want
Not news
I prefer:
@Listener(priority = NORMAL)
Same
yeah you can do that with imports
i can do it with python
Annotations ๐ฉ
@EventHandler ๐
ew
lol
got a better idea?
Very ew
functional
registerEvents(Listener(), Priority.HIGHEST) :))
it is one of the few things that I like from Bukkit
let registerListener (func: (Event) -> Unit)
๐คฎ
registerEvents
what kinda mad man you think I am
registerListeners
that naming is disgusting lol
๐
eventHandler.on<PlayerJoinEvent>().priority(ListenerPriority.NORMAL).subscribe(myListener)
registerListener, or just listen maybe
ooo
me like that
@Subscription :+1:
what is wrong with my discord :C
Or maybe even
@SubsKryption

yeah no
let val register_listener! function = events += function
I kinda wanna make this at least semi Java friendly as well if I can
@Priority(priority = HIGHEST)
@ListenerInfo(type = PLayerJoinEvent)
@EventHandler
@Krypton
fun onJoin(PlayerJoinEvent) { ...
and supporting the OOP method of listener classes will do that
Imma PR a herobrine npc to randomly spawn ๐
okay, onJ, leave
listeners multi map.put(priority, function)
ListenerInfo
/s
You can set the TabCompleter of a command the same way you set the executor, you'd just create the logic of what to suggest in that TabCompleter class
I cant do it with every command though
class MyListener {
@Listen(NORMAL)
fun onLogin(event: LoginEvent) {
event.isCancelled = true // or event.cancel() may be better?
}
}
also, I figured out how to get the actual tabcompletes, but idk how to remove
isCancelled looks weird
and then also support for functions: ```kotlin
on<LoginEvent>(NORMAL) {
it.isCancelled = true
}
yeah look at my comment
Oh I see, you want ones that you didn't create too?
listen PRIORITY_NORMAL PlayerJoinEvent (\x -> liftIO $ putStrLn $ show x)
yep
๐
Haskell syntax is so fucked lol
It isnt tho
it's a nice language, but the syntax gets confusing sometimes
Theres pretty much like 3 things at max thats a "syntax"
anyway, no going off on tangents about Haskell
if ur checking if the event is cancelled, ur gonna use isCancelled, so having a cancel() function is kinda redundant in a way, if that makes sense
while(true) {
if (PlayerJoinEvent.activated) {
joinLogicHere();
while(PlayerJoinEvent.activated) {}
}
}
```ez
yeah I guess
Which part of the syntax did you find confusing?
you can feel free to depart
just all the special characters kinda blow me away lol
You mena just the $?
and the \
lambda
anyway, no tangents
\x means lambda x
nice
which would be the parameter in the anon function
yeah
oh also, thinking about the BungeeCord event bus, https://github.com/SpigotMC/BungeeCord/blob/master/event/src/main/java/net/md_5/bungee/event/EventBus.java#L21 this is why we just don't ask questions sometimes lol
liftIO $ putStrLn $ show x
Is equal to
liftIO (putStrLn (show x))
No no, this makes sense
Wtf
lol
Niall you make no sense sometimes lol
anyway, what do you guys think of the functions and the listener classes?
You using annotations?
also, notice that listener class doesn't implement Listener because it's completely redundant and unnecessary
maybe just a bog standard class you can override onPlayerJoin e.g
listener classes use annotations, functions just use functions lol
Bad ๐คท
not sure though
better_idea.exe = ?
let them register a functional interface as the event instead, so they can register it like they want to and keep listeners separate
example?
That way, they can either use lambdas or a separate class depending on the usage size
also, the one flaw to having a functional interface with a SAM for handling events is that means you need a listener class per event if you want to use classes
server.eventDispatcher.listenTo(PlayerJoinEvent::class).withPriority(Priority.HIGH).subscribe(MyListener())
what would MyListener be?
An implementation of the "Listener" interface
which is?
Or ofc, yo ucould use a lambda
;)
Meant to reply to yugis message
something along the lines of
fun interface Listener<E> {
fun onEvent(event: E)
}```
^
Instead of a lambda
yup
ah yeah, that might be nice
Type erasure ๐ฌ
Poggers
then ```
fun <T : Event> listen(class: KClass<T>, listener: Listener<T>)
(with a reified extension function ofc)
yeah type erasure seems to be biting me in the ass here
override fun <T : Event> call(event: T) = listeners.filter { it is Listener<T> } this obviously doesn't work
okay looks like filterIsInstance just saved my ass there lol
override fun <T : Event> call(event: T) = listeners.filterIsInstance<Listener<T>>().forEach { it.onEvent(event) } looks like it'll work
right, now time to deal with priorities ๐ฌ
should I use some sort of priority queue?
obv
fellas so I'm in doubts
always
so this is what I currently have, and I'm kind of unhappy how it's panning out since it's not really all that expandable, and some stuff is just ew to begin with (some static registries), anyone got any suggestions as to how I should approach it, I'm gonna be rewritting it from scratch but I'm unsure of what kind of structure to make
https://github.com/op65n/Bedwars
@old wyvern any idea how I should handle priorities in my case? was thinking some sort of map to store a listener to its priority and then sort that, but sorted maps only sort by key, not value
ah yeah, that's a good idea
wait so how would I actually do that?
listeners.toSortedMap { first, second -> if (first.ordinal == second.ordinal) 0 else if (first.ordinal > second.ordinal) -1 else 1 }
```then what?
override fun <T : Event> call(event: T) = listeners
.toSortedMap { first, second -> if (first.ordinal == second.ordinal) 0 else if (first.ordinal > second.ordinal) -1 else 1 }
.values
.filterIsInstance<Listener<T>>()
.forEach { it.onEvent(event) }
```?
I'm confused myself just looking at that mess lol
Well, define a Multimap right
then Multimap.get(PRIORITY).add(LISTENER)
are multimaps sorted?
by any chance they have a sorted version
hm
maybe BungeeCord's triple map isn't actually a bad idea
triple map?
no input, sadge
private val listeners = mutableMapOf<KClass<Event>, MutableMap<ListenerPriority, Listener<*>>>() @forest pecan
but yet again, type erasure makes sure that doesn't work
this is actually just pissing me off now
Dropping Java support completely?
ah yeah, KClass would fuck Java in the ass
ditch java and kotlin and switch to C++ 
maybe the only way to do this is to just not use generics for call
okay wtf am I doing
why am I trying to use is instead of just ==
no wonder that doesn't work
๐
.
override fun <T : Event> listen(`class`: Class<T>, priority: ListenerPriority, listener: Listener<T>) {
if (`class` !in listeners) listeners[`class`] = mutableMapOf()
listeners[`class`]?.plusAssign(priority to listener)
}
```wonder if this will work
if i wanted a rest api with some authentication, could i just generate a token per user on my system and when they make a request to say domain.com/resources/<resource-id>/<auth-token>
would that be a good way
or how else should i handle it
most likely using ktor aswell
fucking piece of shit useless event manager crap
fuck this
I can't fucking take any more
@winter iron I saw someone link this in the Ktor slack for handling tokens, this is mostly for the client side but should give you a good idea of it
https://hasura.io/blog/best-practices-of-using-jwt-with-graphql/
yeah you should definitely use a standard jwt flow
I swear, I'm just gonna copy BungeeCord's in a minute and just leave it alone
this is fucked
i see, it just passes the token in the header
type erasure is literally the worst idea that Sun ever came up with I swear
True words
it's really not
is there any difference in passing the token through header or query parameter?
class KryptonEventManager : EventManager {
private val listeners = mutableMapOf<Class<*>, MutableMap<ListenerPriority, Listener<Any>>>()
override fun call(event: Any) = listeners[event::class.java]?.toSortedMap { first, second ->
if (first.ordinal == second.ordinal) 0 else if (first.ordinal > second.ordinal) -1 else 1
}?.values?.forEach { it.onEvent(event) } ?: Unit
override fun listen(`class`: Class<Any>, priority: ListenerPriority, listener: Listener<Any>) {
if (`class` !in listeners) listeners[`class`] = mutableMapOf()
listeners[`class`]?.plusAssign(priority to listener)
}
}
```like this is complete BS
and it probably won't even work
no matter how you twist and turn it, you won't get internally type safe code like this
but it is sufficient to make the api typesafe
Security probably
Probably not i am not sure, but header seems to be the place to do it
Plus it'll make it easier for you to do with header when using Ktor
https://ktor.io/docs/jwt.html
header is simply made for this sort of stuff
I guess
your token has nothing to do with how you query an endpoint
I will accept this lack of response as a sign of superiority
More likely yea sadly
scroll up to my msg
Today, after one year and half of work, I am pleased to announce that weโre launching the beta release of Spring Native and its availability on start.spring.io!
In practice, that means that in addition to the regular Java Virtual Machine supported by Spring since its inception, we are adding beta support for compiling Spring applications...
NO Jvm required
QUICK startup
Why in the name of God are you using that horrible ` notation
That's also just ew in general
Which?
Wait wut
Use a TreeSet or something
Actually I guess that would still require it to be fetched
hmm
Yuck
is it possible to tell your DNS provider to point every conceivable subdomain to a specific ip (your main domain ip, in my case)
like a wildcard for subdomains
wait nvm that's literally a thing lol
The runtime is meant to be packaged within any application anyway!
You can use the jlink tool to assemble and optimize a set of modules and their dependencies into a custom runtime image.
You could just set that up in your hosts file
Lol
o.o
IntelliJ has decided to stop syntax highlighting and I'm about to strangle it
did it start throwing random errors yet?
nope
You start to strangle it and IJ will be like "Harder!"
I tried restarting and invalidating caches and it still didn't do anything
๐
Seems like you have experience ๐ค
Hell yeah
rule34 ij
man
Does anyone actually use code with me?
There's no way it's practical
I've only seen people even mentioning it at the time when it got released
"Embrace, extend, and extinguish" (EEE), also known as "embrace, extend, and exterminate", is a phrase that the U.S. Department of Justice found that was used internally by Microsoft to describe its strategy for entering product categories involving widely used standards, extending those standards with proprietary capabilities, and then using th...
amazingly the beta fixed my syntax highlighting
I've tried it before. still in early stages
like there's a lot of features you can't use as a guest
dunno if they've improved on that now
Oh the version that came with ij was a beta?
Classic MS
Evil
the day that Microsoft/elara gets forked is when humanity is doomed
haha
๐ฎ
elara#
god
Elara++
checked elara
ElaraScript
elara studio
at least ms are open sourcing... some... things
Elarasaur
github needs a competitor or 3 tho
Elara/git to the rescue
I'm sure that's part of their evil plan
mhm
import elara/git

Gitlara will take over from github
Glara
it shall
Elarit
Elit
non-profit?
Yes
El-it-E
I'd love to use gitlab but the github UX is just so much better
ELara gIT Extension
git 2 made in elara/native
ooooooo yes
๐
yes!
rust... :(
worse*
it's kinda cool
I only hate the css part
js is mostly fine for now. Btw all browsers can run wasm rn right?
Are there any non-js properly web languages using that rn? Like without compiling to js to be the intermediary
go wasm
Rust
rust
Oh Rust compiles to wasm?
Yeah afaik
yeah
C++ probably does too
cool
Probably
Corrupt mozilla enforcing the monopoly!
mad
๐
soon we will be drinking Mozilla FOSS Water
Firezilla
Disczilla
Godzilla
netscape navigator... zilla
Godroid
imagine ... Android plugins in rust with a rust api
time to make Java os in swing
Android would be 10x faster than ios if google had made the smart decision and used rust
But no JACA is veyter
stupid google
Idiots
Java faster than high performance native swift?
android is generally slower than ios
ios is generally faster because apps are native
Is swift native?
they make up for it with better specs though
Java on Android is sometimes.... funny
Something things just dont work
Clabbered with permissions everywhere
Yeah afaik
It has a runtime
I think
Not zero cost
Unlike some languages ๐
Dalvik bein shit
eaten by: javasaurus, kotlisaurus ๐
Incorrect. Those were prey to this predatorial beast
๐คจ
elarasaurus = GIANT kotlinsaurysu = idiot small dinosaur gets stepped on
elarasaurus was the true apex predator question mark?
Well Elarasaur was one of the biggest one to have ever existed, but was a herbivore, it'd take around 5 Kotlisaurus to take one down
@winter iron I presume you gave up? :kek:
I have a controversial announcement to make
rust-lang.org has been added to fpprank
We should see the changes being rolled out shortly
that is very controversial
although a great addition to enlighten the closed minded of great languages
na i went to eat ill look now
๐
@hot hull is there like 1 map per world thing going on?
and im gonna assume its just a plugin u can add to any server for a minigame?
Yes and yes lol, have you read the name of it
@prisma wave bro
What was that black 2d game thing you were playing earlier??
I forgot its name
ScuffedCraft
@hot hull by the looks of it you have to make each world separately and add its configuration but if your looking to have an expandable amount of arenas, you could spin up a new world and use worldedit to paste in a pre-made schematic of the map at a certain position
that way instead of registering each arena as its own, you just make a general layout
That's exactly what it does rn lol
You make a new arena file, specify the shit and you're rolling
im hella tripping then
The structure is a mess, probs why
https://github.com/SpigotMC/BungeeCord/blob/master/event/src/main/java/net/md_5/bungee/event/EventBus.java currently converting this to Kotlin lol
that's how fed up I am with this
It's annoying cause shit depends on other shit so it's hard to make a modular design
private fun findHandlers(listener: Any): MutableMap<Class<*>, MutableMap<ListenerPriority, MutableSet<Method>>> {
val handler = mutableMapOf<Class<*>, MutableMap<ListenerPriority, MutableSet<Method>>>()
listener::class.java.declaredMethods.forEach {
val annotation = it.getAnnotation(Listener::class.java) ?: return@forEach
val parameters = it.parameterTypes
if (parameters.size != 1) {
LOGGER.info("Function $it of class ${listener::class} annotated with $annotation does not have a single argument!")
return@forEach
}
handler.getOrPut(parameters[0]) { mutableMapOf() }
.getOrPut(annotation.priority) { mutableSetOf() }
.apply { this += it }
}
return handler
}
```lol
Ew
Oh it looks worse because I have discord in a small window.
On mobile it's disgusting
Bake some cookies instead
Same naming as bukkit lol
Way too much mutableX
Rule of thumb: mutabile should only appear 0 times in a file
Shouldn't be hard
oh also, take a look at bakeHandlers for me pls
why the heck is the function returning a mtualbe map anyway
look at the do while
I'm in pain reading that
good point
welcome to BungeeCord lol
Don't blame bungeecord for that atrocity
the only thing I like about the source code for BungeeCord is the comments md_5 leaves
@hot hull is it supposed to make a new world when a new game starts right?
was he really tired or was he correct in that statement
is it me or do {} while () are quite rare
yeah they are
because it's not very often you want to guarantee that something happens at least once but can happen more than once
that's a good use for it though
World handling isn't even implemented yet
ok
oh btw, anything I can do about that?
thats why am tripping
because my ListenerPriority is an enum
though I feel like that's inefficient iterating over every single index even if most of them are going to be null
i couldnt find anything like that so i was hella confused
Make a programming language where do while is the only control flow structure
yeah it probably is
can we get a do while do loop
๐ค
I don't even understand what this method is for lol
I would love to
it puts the handlers in the oven and bakes them
Bakes them
im pretty sure it just puts them into a list
goes through everything
PUT in sorted list
If i recall it needs rebaking every time a listener is registered/unregistered?
OH I see what it does
would be nicer with an immutable list
a mutable list is immutable if you dont change it ๐
with the knowledge of BungeeCord's event priorities, I know this is how it sorts them
burn
jesus christ this is whack
I bet there's an extension function I can use to sort this that's better than that mess
There is no need to be storing these in maps and wasting valuable RAM
When you can so easily scan everything WHEN the event occurs
maybe toSortedMap { first, second -> if (first.ordinal == second.ordinal) 0 else if (first.ordinal > second.ordinal) -1 else 1 }
๐ต
Please don't do this to me
he do got a point tho
very good point
right, so I can just scrap the do while and use what I sent right? (with the compareTo)
wait what
I'm confusing myself just looking at this lol
someone please help me
What are you trying to do?
Cant you just scan all classes and put them in a hashmap?
map[string]string
wat
Map<String, String>
what about it
Lmao
oh come on, that is a terrible hint
modern languages like go incorporate maps natively into the language
With map literals and types
Is that Go?
yes
BM enough
struct {} will use 0 bytes memory
Doesnt a java object have like 40 bytes overhead
Why
why do I bother to ask for anything in this channel
headers
You see if I was James Gosling I would not have added that
I am honestly not sure
Map<[event enum or something?], List<[handlers]>?
Where List<[handlers]> is sorted
What does bungeecord use as the Map<1, List<2>> 1
they need to store important information like if you are on the windows insider build version 3.225438 (which is not important trust me) in every single object
right, the best way to solve this actually is to stop looking at this code and think about the problem I need to solve
I need to take a class of functions with annotations, group them by event and sort them by priority, then dispatch events to them
gcse computer science will be teaching our kids to write &mut T before hello world
lol
println!("Hello, World!");
my GCSE computer science class can barely write hello world in Python without help lol
now do it without the macro
I think one of the best ways I can kill a lot of the mutability here is by disallowing registration of the same class twice
what an achievement that would be when uve done it
the putStrLn impl in haskell is also terrifying
right, so first I need to find the handler functions in the class
then I need to get the priorities and sort them
right?
then put them in the map
many modern languages will have convenience functions for sorting lists
why do I bother asking for any help in this channel
not configuration help
sortedBy :)
Hey I have provided help
Because if you did ask for configuration help you would be asking in the wrong channel
Because this channel is not for configuration help
๐
right, cool, now would you mind helping?
you reckon I can replace forEach with map somehow btw in findHandlers?
probably
people in helpchat are not required to help other members, instead helping is done at will in peoples free time ๐
yes even an esteemed HELPFUL ROLE member has no obligation
But the answer to your question is yes
WRONG. you are all our slaves and will help at any hour in the day and any day in the year.
If you refuse then something very bad will happen
STOP
How can you identify a files associated file type? When you can't tell by his file header?
Stop making senpai mad
lol
So, i'm working with a stupid API that returns a list of skills separated by new line, something like:
1367483,320,595908
1566226,16,2810
1228885,33,19403
1545972,16,2810
1358646,32,17475
1048681,31,16000
832153,43,55462
What would be the best way to map this into a data class without having to go over each line one by one? 
my computer science class doesn't know how to make folder in a folder
lol
Isn't it just print("Hello World") in python?
Why can't you go like by line?
I'm just gonna depend on BungeeCord Event in a minute and be done with it
My brain
line by line is the way
I'm fucking done with this shitty fucking event bus PIECE OF SHIT
My event bus doesn't work bardy
Bardy I'm going to wash your mouth with soap
It get's executed but doesn't call any of it's subscribers :((
gcse curriculum should cover the drawbacks of mutability and how purely functional languages are objectively better
I've spent ALL FUCKING DAY trying to get this mother fucker to work and I've got NOWHERE
Lots of soap
in my computer science class i was asked "write benefits of waterfall"
all that was coming in my head was minecraft water fountain
Fefo I got soap for you as well
waterfall?
Bungee fork
guess they meant waterfall network? or i don't remember what was the question
development life cycle
If that's what they meant kek
Like, this is my data class, it's stupid long so i'll cut more than half of it
data class Skills(
val overall: Int,
val attack: Int,
val defence: Int,
...
)
I have a list with each line that i'll have to map into that class, the thing is I don't want to have to go like:
Skills(data[0], data[1], data[2])
waterfall model
can't you use destructuring there?
right fuck it
I'm depending on BungeeCord Event
I actually can't be assed anymore
Bardy
you'll either have to, or destructure it
Shame on you!
FFS
lol
You were supposed to beat them, not join them
I can't be FUCKING ASSED ANYMORE
it's AS Levels, igcse
Just depend on it for rn and you'll change it later Bardy
How would destructure work in this situation? Wouldn't it have to be the other way around?
cie basically
val (overall, attack, defence) = split(",")
Ah right
Yeah that was what i didn't want to do, I'll show you why lmao
I don't think our course covers that
oh god, pre the 400 vars in his class
Anyone knows the file extension .ls ?
Actually that won't work, i'll just go manually ๐ฉ
Can you imagine
Kek
oh my god
That seems prone to breaking
Exactly but i can't think of any other way to do this
jSoN
Tell that to the stupid api
Mcmmo I'm guessing?
Nope, Runescape
Kek
Could be worse
Each skill/category is on a new line (split by a new line delimiter: \n), and each line has three comma-separated values:
Atleast do checks so it doesn't error out if one is fucked up
I'll do something else but god this is so bad
isnt that *?
Doesn't work for non varargs stuff
I have a better idea, not as organized as data class would be but less painful
Nevermind I don't have a better idea, someone shoot me please
๐ซ
What are you trying to do?
Alright thanks
finally
Basically the stupid api will return a bunch oh numbers that i need to map to the right skill
Each skill/category is on a new line (split by a new line delimiter: \n), and each line has three comma-separated values:
may or may not have taken me copying BungeeCord's EventBus into Kotlin but I got cancellable events
oh btw, the Listener interface doesn't exist, since it's literally pointless
Just use Guava EventBus ezpz
elara standard library has a thing for this
because Guava's EventBus has cancellable event support
Bardy I told you already to use KyoriPowered/event ::::::)
yeah don't really like that tbh
like:
a,b,c
d,e,f
g,h,i
```?
Kyori stuff all seems to use methods that aren't Java standard, so Kotlin can never convert them to properties
Weren't you gonna use something like LPs event bus?
I was, but then I got fed up and went with BungeeCord's EventBus
Like:
1,1,1
1,1,1
1,1,1
Nothing explaining which skill is what, just the order
What's wrong with it?
which I actually kinda like tbh
With LPs*
couldn't find how it does cancellable events
๐ฌ
Exactly
How easy would it be to make a plugin that would shoot out tnt at different fire arcs using a defined cannon/turretbuild. Similiar to that seen in the Cannons plugin? I wonder whether Iโd be better off paying someone to edit that plugin to get tnt working as a projectile. Not sure if devs like working on other open source stuff tho
Have they provided any ordering index?
Lmao
Like somewhere else?
and yes, I got that fed up that I couldn't be assed to dig around for it
They have a list in which other the skills come, but nothing on the request
So no matter what I'll have to manually map all 24 skills
Damn ๐
I think best way is to make an enum for each skill then add it all to a map
Go + fortran?
The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in alphabetical order. Dialects of BASIC, esoteric programming languages, and markup languages are not included.
Anything under E?
You will love this
o:XML is an open source, dynamically typed, general-purpose object-oriented programming language based on XML-syntax. It has threads, exception handling, regular expressions and namespaces. Additionally o:XML has an expression language very similar to XPath that allows functions to be invoked on nodes and node sets.
This is a list of lists of lists, a list of list articles that contain other list articles on the English Wikipedia. In other words, each of the articles linked here is an index to multiple lists on a topic. Some of the linked articles may contain lists of lists as well.
Erlang
What the hell
<?xml version="1.0"?>
<o:program>
<o:type name="HelloWorld">
<o:function name="hello">
<o:do>
<o:return select="'Hello World'"/>
</o:do>
</o:function>
</o:type>
<o:set instance="HelloWorld()"/>
<o:eval select="$instance.hello()"/>
</o:program>
Actually this is pretty cool
Its like PHP but for vector graphics
lmao
What the hell
<o:program>
<o:param name="file"/>
<o:import href="lib/io/File.oml"/>
<svg:svg>
<o:for-each select="io:File($file).parse()//section">
<o:set x="count(preceding::section) * 30 + 20"/>
<o:set words="count(.//text().match('\w+')) * 2"/>
<svg:rect width="10" x="{$x}" y="{250 - $words}">
<o:attribute name="height" select="$words"/>
</svg:rect>
<svg:g transform="rotate(45, {$x}, 260)">
<svg:text x="{$x}" y="260">
<o:eval select="title/text()"/>
</svg:text>
</svg:g>
</o:for-each>
</svg:svg>
</o:program>
This was in 2004
They were way ahead of their time
Society if we used o:xml
I feel like big tech is hurting themselves by not adopting this
Ok liberals... So there's a rust foundation but not an o:xml foundation...? So much for inclusivity
O:xml
SuperX++
Superx++ is the world's first general purpose language based on the XML version 1.0 specification
wait so can a web browser just run this
<class name="XTree" inherit="XPlant">
<construct>
<scope type="public">
<Chlorophylic>yes</Chlorophylic>
</scope>
</construct>
<scope type="public">
<func type="string" name="GetChlorophylic">
<body>
<return>
<eval object="Chlorophylic" />
</return>
</body>
</func>
<func type="void" name="SetChlorophylic">
<parm type="string" name="sVal" pass="val" />
<body>
<eval object="Chlorophylic">
<eval object="sVal" />
</eval>
</body>
</func>
<func type="int" name="GetAge">
<body>
<return>
<eval object="this" member="Age" />
</return>
</body>
</func>
<func type="void" name="SetAge">
<parm type="int" name="sVal" pass="val" />
<body>
<eval object="this" member="Age">
<eval object="sVal" />
</eval>
</body>
</func>
</scope>
<scope type="protected">
<var type="int" name="Age">0</var>
</scope>
</class>
What the fuck
What in the shit is that
๐ฅบ Who going to make Intelli J plugin for it
Not so ugly
val data = rawData.split("\n").chunked(24).first().map { it.split(",").getOrNull(1)?.toIntOrNull() ?: 1 }
return values().withIndex().associate { it.value to data[it.index] }
(The chunked is because it has categories at the end, i only need skills)
#816184749752188958 is that really a service?
Lmao not at all
Homepage of the OCaml-Java project
Last update: 2015
ahh
Btw should you really be using a default value there in case of null?
Shouldnt it fail at that point instead of taking wrong data?
I think so, since that's similar to how the API works, it'll be 1 by default
ah alright
well I've heard them all now https://i.imgur.com/ELq2iHv.png
Imagine having to set an option in config.yml for absolutely every check you make in your plugin. At that point they'd be better of using Skript ๐ข
Lol what
Hi
Heyo
?
im confused
what doesn't know the server version
and how can a jar break the Bukkit#getBukkitVersion 
and what is a "check"
he's using a custom jar which breaks Bukkit#getBukkitVersion and glare has a check in VoteParty that checks if its 1.13+ or lower and since it doesn't actually give the version it gives just Unknown and breaks the whole plugin because glare just parses the string as an int
I mean... a custom server jar can do anything
i didn't know he was talking about server jar
i thought he was talking about a plugin
where's a good place to store source jars/zips? (for intellij to use)
like
where are all the others stored?
? like dependency jars?
this
but the thing is, the maven repo doesn't always have sources.jar
so i have to download via github
(which works btw)
but where should I store the zip?
and where are the other source jars stored
You can click Choose Sources... and just point it to the sources jar
i meant
where should i put the sources jar
anywhere
where are the other source jars stored
in the same folder the jar with the compiled classes is
by default in maven local, user folder -> .m2/repositories/<groupId>/<artifactId>/<version>/<artifactId>-<version>-sources.jar
thx
is it .m2/repository?
since i dont have repositories
yeah ig
they deleted their messages
lol
buy the plugin 

im sry im poor
Why would you be sorry 
Just
Just stop lol
Blitz, go sleep
@jovial warren tbh I don't really get what you don't understand about cancellable events in LP, I found that bit very straightforward compared to the whole other runtime generated event classes & methods & fields and all that reflection megahack
Took a peek at it, I was like "why are there no implementations...?"
But yeah given the amount of events there are it would definitely be a huge PITA to have interface + impl for all of them for a handful of fields lol
#816184749752188958 Skript ๐คข
true
I will probably switch to something different in the future, but this will do for now
I think my comment in KryptonEventBus just says it all though
fun fact I just found out btw: Math wonโt always actually call StrictMath internally even though the source code says otherwise. according to the docs, StrictMath is actually what you should be using most of the time, as its implementation must always be the same on all platforms. The same canโt be said for Math, which varies with implementation
in short, use strict math where you want to essentially guarantee producing the same result regardless of the platform
I doubt this is news to some of the more technical of you lot here
elara/math will have reproducible results on all platforms ๐
and will be faster than slow JVM trash math lol
if JNI can actually be reliable for once
me: didn't even know that StrictMath existed and didn't know what it does
but FP on the JVM is a sin lol
not surprised
FP is great, donโt get me wrong, but the JVM is just not designed to support it
what is FP?
functional programming, I assume
We should scrap the JVM and just make Elara run natively imo
Also, when most of the issues highlighted in a review for a PR that's not yours are your fault ๐ฅฒ
yeah, well, that is the deal with floating point numbers
that's why strictfp exists
also, very questionable opinion, any material to back that up?
we have several functional languages on the JVM that work great
The days where the JVM was only built for java are long gone
Wrapping everything in objects just feels like it defeats the point of FP imo
that's implementation detail
when you use functional programming you don't really care how that is represented internally?
Yeah what I meant by my statement is what it looks like and how it functions internally
Not the usage of the languages
no cpu can understand the lambda calculus
It's always going to be imperative at some level
True
The JVM is very flexible nowadays, who says that the implementation of a functional language has to be functional itself
True
Might do a big refactor of Krypton's internals soon to fix the issues highlighted by Codacy's static code analysis
Like splitting up the packet handler, or beginPlayState, or even loadWorld, to absolutely obliterate god objects and functions
Also to get the server in a state where you can depend on it without having a headache trying to figure out what everything does and why it's there
Excuse me
Say that again
if we can make ruby run on the JVM we can get FP on it
Granted interop can sometimes be annoying
But it's a lot easier than native implementations
Lol
Will Elara have native implementation support btw?
Like native in Java
Or external in Kotlin
Lol
Probably to a degree
So I can write native maths
Like maths in C
oh so JNI
Yeah

well for maths most of it is already done
Yeah
We probably want to use StrictMath though
Math...?
Since Math is unreliable
Not particularly
Did you read what I detailed earlier?
Eh, Kotlin's helper functions use StrictMath
Math is not guaranteed in its implementation to be platform agnostic
Do they?
StrictMath is
Huh TIL
StrictMath must always return the same results in its implementation, platform agnostic
You ussually never need the exact precision
If you do ever need that, onyl then is it useful to specifically use StrictMath
Math contains some compiler stuff from what I read internally, and its implementations that call StrictMath don't always call that internally
StrictMath is like using BigDecimals everywhere
True
Yes, apparently the JVM often replaces the Math functions with platform specific native implementations
Which are usually faster
I can see the pros and cons to both
Yeah
@oblique heath https://github.com/Ivan8or/RadioScanner/blob/master/src/main/java/online/umbcraft/libraries/MessageEncryptor.java#L44 shouldnt here be [1]? xD
๐
more like using strictfp everywhere
and that's the thing, most of the time when you want consistent results you also want precision and don't use floating point numbers to begin with
The field where you really need this is rather narrow I believe
Yeah I suppose
