#dev-general
1 messages ยท Page 78 of 1
fricking
packing :wonk:
sx
please
shut up
lmao
you are playing with fire here
no
```Wait what?
fire is kinda hot ngl ๐ณ
Atleast none of us are american kekW
Then who are the actual native french speakers?
that would suck
nobody actually speaks french
@prisma wave is native
๐
it's all just mind games
French is a hoax
Please either stick to the topic or move over to #off-topic
I guess not either
ah
skedaddle
except ranald
When I saw that I thought of something but I don't want to annoy someone in this chat.
@topaz bay how to do functions
that's why im here, to annoy people
@prisma wave Ive been putting it off
do I
Rd M**d
wot
a route?
a route is a collection of commands
ah yes
R----d M------d
Mine is just List<Statement> right now
@remote goblet
Pls say you know what I'm thinking
The loop command is literally a route of the expression, and the body
the expression is evaluated every time, and if it passes, the body is evaluated
Dmd
Same with the when
it has the expression, and then the passing route, and optionally the failing route
in the case where an else block is provided
Incidentally with expressions does your Expression type have any evaluate() or similar? If so what are you returning? Any?
wdym expression type?
Might just be me but I've made an interface Expression that I bring the results from the parser into
Expression extends Statement and defines resolve() that returns Any
Not sure if that's a good idea or not
Probably not
My command type is a sealed class that has a function eval(Stack, Context)
Yeah I've got a Context too
The current scope, types, properties, functions, etc
So you have a Command type rather than Expression?
Yeah that makes a lot of sense
01001000 01100101 01111001 00100000 01010010 01101111 01101110 01100001 01101100 01100100 @pale shell
The Stack idea is quite clever
i now hide
Its literally how like all languages work Alex...
I can't remember the name
The heap?
In this situation, the Context would be the heap
Yeah that makes sense
It actually does
LOL
my comprehension of language design has increased tenfold
I will return in circa 2 days with Kotlin 2
It really do be like that
When I change the evaluation of name parsing to allow for assignment as expression
My brain power increased by 30%
A was a huge eureka moment
Which btw
Great show
That's how Einstein felt
If you have prime, highly recommend it
Oh I've not heard of it
Its a show about a world where all of the top minds have been living in a single city
Will give it a try once I get bored of programming
The entire lineage of all the people you know
darwin, enstein, etc etc
Theyve all been in that one town funded by the government
And crazy shits happens because of their experiments
AMAZING show
sounds pretty interesting
Its very "Under the Dome" if youve ever seen that show
I've kind of been "under a rock" when it comes to TV
So no
But I'll give it a try sometime
btw why would you make assignment an expression?
Because why not?
true
No I know
But with my limited experience kotlin seems like it's hit the nail on the head in terms of language design
I'm actually finding it fairly difficult to not directly copy kotlin lol
Kotlin is literally every other language in existence combined
And therefore any decision that isn't similar to kotlin would need some sort of justification in my current mindset
sorry to disturb you but I would like to know if there is an installation tutorial (if you have to install other plugins) compared to Guilds that I would like to buy
An installation tutorial of Guilds?
You need to buy it for support
But I imagine it's pretty simple
Anyway #general-plugins
I would like to know if it is mandatory to install other plugins to make it work properly
It requires vault
this is not the place to ask
And a permission and economy plugin (as vault does)
oh sorry thanks
But that's it
No
shut up you
So you could do num0, num1, num2: Int? That sounds quite nice ngl
Uuh what have i done
@ocean quartz yup
Its from Go
:D
And this is the part where I actually have to implement entering and leaving scopes
That's really nice, kinda wish Kotlin had it now xD
And good luck!
Also found my problem lol, the way i was checking for the commands is bad, it was checking for every message, which means it'd get the command, the send the wrong message, but that would trigger the event again and it'd repeat forever
I need to think about a regex to match exactly
@ocean quartz
That was actually considerably easier than I thought it would be
I've discovered, the parsing for a tuple is exactly the same as the parsing for a function call
I literally just take the routes from the tuple parsing algorithm, and turn them into the routes the function access command passes into the function route
KINDA fire
โข Removed 15 messages.
๐งน ๐งน
hecc outta here with that language
Now imagine if Barry removed the XP on messages that were removed
The global multiplier has ran out and has been reset!
huh
i have create a score system
not add score
public static void addPlayerScore(Player p, int amount){
int score = 1;
score += amount;
}
public static int getPlayerscore(Player p){
int score = 1;
return score;
}
Well, getPlayerScore will always return 1, and addPlayerScore will ways return amount+1. Why not have a UUID, int HashMap to actually store the players score?
@topaz bay What you think now, more consistent
Or this one, even though setGroup shouldn't really be used by api users
@quiet depot Could you advise me here alittle?
This is one of my api classes, now in the second image api users shouldnt use setGroup as it's used by kiteboard internally and will be changed anyway, they should use setGroupOverride instead
Not sure if it's better to put the group updating logic within updateGroups
i can help me ?
my log :
TheBlockWinner v1.0 attempted to register an invalid EventHandler method signature "public void me.neon.theblockwinner.Blocks.onBlockBreak(org.bukkit.event.block.BlockBreakEvent,java.lang.String)" in class me.neon.theblockwinner.Blocks
I wont show the code to it but basically
splitting string by . and getting method, invoking e.g every placeholder request
ah yeah
only thing that has really changed is I don't have to do getMethod every time
the methods are stored
now answer my question above ๐
I don't think I'm qualified enough to answer that
can someone help me? https://www.spigotmc.org/threads/multi-language-files.439197/
Is there a way to remove an npc using nms from the player list?
Finally fixed all the bugs ;p
Now to figure how JDA's permissions work
Nice!!
Ooh what about an annotation with @Delete, commands marked with that will delete the user's message instantly after they type it
Dew it
Noice
I figured it out, nevermind.
Aint no api coming till I make a decision
@heady birch
Hmm how do people check for permissions for bots normally? With roles or what?
wot
Like for commands, for example command x requires x permission, i have never used JDA enough to know how that's handled xD
Hmm, how does this look for required roles to run the command?
Actually that name is probably not good, it makes it sound like you'd need both to run it
would is be possible to use the role order?
Like if defined for "Admin", everything above can use it as well
theres no way to set a default build.gradle is there?
like when I make a new gradle project
since i always add in like spigot, matts frameworks, shadow plugin
I use gradle
@obtuse gale You should be able to create a script in your gradle home
And apply from there
What would you guys name the annotation to require a minimum role?
I thought about @RequireRole("role"), but what it'll do is , it'll require the user to have at least that role, which means let's say roles are admin, role, member, admin and role would be able but member not
@InheritsRole ?
I like that, it's pretty descriptive

Where is the annotation applied?
@InheritsRole sounds like something very different
Something like this:
Once the command is sent, it'll check if the user has that role or any of the above
Personally, I'd simply call it @Requires
I don't think there will be any confusion as to what is required
If there was, I'd use a named parameter
I thought about doing something like this:
@Requires(name = "role")
@RequiresAtLeast(name = "role")
@Requires(id = "102103103101")
@RequiresAtLeast(id = "204121054040")
But i think it'd get too confusing
Why not use one annotation that has multiple possible parameters?
Good point yeah
Well, in my command library I just made an API for this sort of stuff. Users can therefore implement their own restrictions and the built ins aren't too critical
Id like the annotated one above more
Ooh, actually that's a good idea, have them register a permission and on the annotation get it's ID
Then they can implement it the way they want
Similar to how I do the parameter types and completions (for spigot)
You can still have that with annotations @old wyvern
I see
is your API public?
can i get a link?
https://github.com/JohnnyJayJay/discord-api-command <- is this the one?
@lunar cypress
no
that's an old one that sucks
Nice!
Should I learn Rust?
@signal tinsel HA
You think you can just LEARN the vast abyss of symbols that is Rust?
lol
@topaz bay you managed to get any of your code working yet? >:)
wdym?
I'm confused about what you're referring to?
I thought your code always breaks?
??????
What are you talking about bruh
Sxtanna come play mc with me
Brigadier is awful I gave up on it
A kotlin DSL or something for brigadier would be wonderful
Java lambdas... Not so much
So far
Not feeling great
At all
I still dont know how to actually suggest things
nvm, figured it out
Wow... this is honestly such a fucking mess
Get a brush and clean it up then?
What is that for sx?
I'm playing around with brigadier
Pretty sure luck made a library for it, not sure if it makes it easier to use or not
They did
Its Commodore
Not that much better to work with tbh
And extremely lacking in documentation
Yeah lucko's is about the same to work with, bunch of nested stuff
Ayy got my permissions working
Fancy
The system is pretty similar to the other registrations
commandManager.registerRequirement("#admin-up", member -> {
final Role requiredRole = jda.getRoleById(496353695605456897L);
if (requiredRole == null) return false;
return member.getRoles().stream().anyMatch(role -> role.getPosition() >= requiredRole.getPosition());
});
@topaz bay What are you doing? Just punching each other around xD
Pretty much
Damn people like the GUI lib more than the command one
@ocean quartz ;D
Idk about that sorry
It's 4:30am idk about anything
xD
I think it goes in sequence
Alrighty that works
@topaz bay In a Claiming system, is holding all claims in memory good?
@pale shell now THATS interop
@old wyvern probably not?
It would depend on how you store them
I was currently working a system to save per claim and load when needed but thinking back I think thats probably much much more inefficient so im gonna rewrite that...
What would be a better way to load/store them?
I tried going through towny for ideas but it seems to they load all townblocks https://github.com/TownyAdvanced/Towny/blob/master/src/com/palmergames/bukkit/towny/db/TownyFlatFileSource.java
really confused with this rn ๐
actually seems towny does save per townblock but loads everything together?
My brain is kinda fried rn
So I can be of no help
@pallid gale when are you going to rewrite barry in Odin?
whats gitlab?
JS
yes
thats the way to do it
xD
@hot hull Do you have any ideas about the claim management issue?
Hmm
I feel like keeping all chunkdata loaded will cause issues
Maybe load on chunkloadevent??
Would that work?
Possibly, I feel like keeping it loaded wouldn't cause issues btw (well it would if something cucked up and it didn't store)
I mean depends how much we talking data wise
Hmm. Ill move to that then . Thanks man ๐
I havent used it yet, ill check it out. I do still wanna provide flatflat storage option tho
Flat files are gross
You can read from redis a million times in the time it takes to read from flat files
Well yea, but variety usually better :p
I see . Id love to check it out and maybe have that as the recommended options then ๐ . I should still provide flatfile support for people who dont have redis.
Sx, better be fixing the thingy I showed you above
?
@topaz bay where the hell is my gradle home folder lol
@obtuse gale do you have gradle installed?
lol probably not
You should probably do that
alright
when I download it will intellij auto use that? Or will it still try and use the wrapper or whatever?
On?
Ok
Kiteboard has criteria
criteria:
1:
type: permission
permission: "kiteboard.group.default"
2:
type: world
world: "World_Nether"
Looks like this
Only problem is people can register their own type
So I implemented a factory interface as a kind of registry
registerCriteria("PERMISSION", PermissionCriteria::new);
But I mean I could make Criteria objects a singleton kind of
So you would register the actual instance
Like this
However then it has to access sections on the fly, I just don't know which method to go with really
oo
Actually better example
Top image a new instance is crreated a couple of times
Bottom one only one instance should exist
@topaz bay ๐
First one is stupid
There's 0 reason to hold a hard reference to that value
Since config is already in memory?
Yeah, atm the object is created per configuration
So you do think 1 object, to be used for all configs is better?
Yes
I wouldn't even make these objects tbh
Why not
I would define isMet in a functional interface
๐
And define them with a factory method
??
What do you mean
registerCriteria("WORLD", (user, config) -> user.getWorld().getName().equalsIgnoreCase(config.getString("world"));
Whats the factory method
I mean I already got a factory method
Thats it
registerCriteria
This is kind of a greay area due to java's SAM conversion of lambdas into the actual type
But its technically a factory method in that it does the actual object creation instead of you calling new on a type
Yeah
I have another criteria type which is basically a container
That contains more criteria
It did load them all on object creation, but it would have to load them all on the isMet instead
Do I need to tell intellij not to use the gradle wrapper when I make a new project now?
@obtuse gale no
@topaz bay You sure the second way is better
It has to do alot more processing on the fly, compared to version 1 where its loaded on startup
@topaz bay
โน๏ธ
@topaz bay very nice indeed
@old wyvern typically hashing would use multiplication so no it wouldn't matter
@prisma wave You gotta help me bro
What's up
My criteria system
I create a new Criteria object for each config it has
It would be possible to use one Criteria object and do the logic in a method where the config is provided
Idk to be honest
What are you actually asking
Yeah I would say the bottom one is nicer as you wouldn't need to worry about reloading all of the objects
Thats good and all
But can get difficult for some of the criteria
e.g one that contains other criteria
It would be running more logic at runtime
I guess this is pre-optimization
Quite possibly
You could do a compromise
Have the data empty by default but then intialize(ConfigurationSection) loads them
Then you could call intialize again to reload the data
Thats actually worth a shot
I mean isMet is called every second for each instance
I should expect isMet to be called 10-20 times a second, possibly more
That seems like something you should optimize when possible then
Even though the task is async (it probably shouldn't be) theres no point using any more resources than I need to
Thats why instances are created at load so some stuff can be cached etc
Makes sense. Processing async seems like a strange decision but if it works go for it I guess
Checks permissions, world e.g it's worked fine for about a year no issue reports ๐
@topaz bay Your thoughts?
@quiet sierra pretty sure that can be made but it's a cool idea ๐ฎ
The example I made is functional
dope
Also sorry for inconsistent naming
the first example isn't consistent with the others
Ha who wanna review my API?
Bet it's gonna be bad
๐
Says the guy with no pfp
Can you easily read the code without any comments in 1 year?
pfft
There is no code to read
@quiet sierra are you delegating functionality?
Just methods and classes
I don't think I am
add events are added in form of a consumer, which gets called when values are modified
You probably should be
Actually I might be yeah
I mean for the rest of the methods
For maps it's a BiConsumer
๐คข Functional programming
Are you making your own HashSet and things?
Yeah I'm extending java's
With the same class name?
CoolHashMap
You could also extend it with the delegate pattern so it works with any Set
Don't mention any pattern infornt of me
Factory visitor abstract factory builder
No no NO
I've been doing java for a whilee but I'm pretty sure delegation comes a lot on C#
I'm not sure about c#
or I'm prob dumb
But the general principle would be implementing Set for example, then have a Constructor that takes a Set. Then in the Set methods, do your consumer calling and call the original set methods
Ah yes I already do that
I just don't understand that messy english terminology
What terminology?
What terminology?
@prisma wave biscuit
Review review review http://fdps.kitesoftware.net/kiteboard/apidocs/
ah the kiteboard guy
fdps?
gosh don't say that
subdomain on that server
Dรฉlรฉgation is a programming term as well as English
In portuguese fdp means the same as son of a b..
wew he even used fancy accents
Very fancy accents
Humm YeSe
fdp?
subdomain on that server
@heady birch ty sherlock but what does it mean
oh god
welp
How the API looking?
No
say it
||YoU gOt ThAt AA yEt ?||
There is none
Now I need to look at the new obfuscation rues
Long (eg llililililillllllliiiillliiiiillii) or illegal (eg CON1)
@prisma wave Should I put my api classes in an api package
Atm they share the same package just in a different modules (which seems the best way)
I think the different module is fine
https://pastebin.com/RFHtgPtX y'all seen this hello world?
It prints hello world and then does 1, 2, 3... 10
dear god
When a project has 1 designer and 1 engineer. ๐คฃ https://t.co/MpJRaNS0k8
8712
26840
Whats x::Int = 3
Nice
gotta love testing bungee plugins
Any particular reason for the ::?
as a design choice?
yes
nothing specific
just thought it looked kinda cool
It could've been anything
But I was intentionally trying to not copy kotlin
It's kinda confusing to me
what would you change it to?
I mean the :: have been used for a lot of different stuff
java method references
c++ namespaces
rust impl functions
haskell functions
now Bristten for object type
well you could say that about anything
each language will use different symbols for different features
Idk what I'd change it to. I'd probably use type inference
it has type inference
well not really
it infers everything as an Int right now bc I've not figured inference out yet lol
Question, it's ok to use Map.Entry if I need to return 2 values?
but if you need explicit type specification (eg method parameters) you can use ::
I'd say that's fine gaby
I mean are there other alternatives?
how does it work with print then
I mean are there other alternatives?
@distant sun designated class or an array of two elements
nothing nice
@lunar cypress how does what work?
the statement with print also uses the = operator and you don't specify a type there
Ye but what if the objects are different? Wont I have to cast them if I use an array?
Yeah if they're different the array thing sucks even more
but Map.Entry suggests something else idk
lol wtf its not letting me put my plugin in my servers folder cos it says the servers in use but
its not
If java had tuples or at least wannabe tuples in the standard library this would be no problem
maybe you're already using some extension library that has a Pair class or something
yeah. at the moment internally it is just inferred to be a function but what I want is for print's type to be Any -> Nothing. So theoretically you could specify print::(Any -> Nothing) = value::Any -> Nothing { stdout.println(value) }
which is just unnecessarily verbose
but a function could be ```
take = intProvider::(Nothing -> Int) -> Nothing {
print(intProvider())
}
I don't really like the Nothing thing
Like, you can't treat it as a normal value if you use it to represent "no parameters"
yeah I haven't 100% decided how I'm gonna go about that
possibly (() -> Int) instead
https://img.bristermitten.me/16.15.47-2020.png performance improvements, operators, Strings, and Booleans!
Is it though
Yes
I like the last print function
ty gaby
16,777,216
16 ^ 6
So for a rainbow effect whats a decent step
Changing 1 at a time is just gonna be slow
Let's calcualte
Ok I'm poor at maths
rotating through all colours in 10 seconds, 20TPS
just go up by 1 each time
Let's re arrange the equation
And let it rotate for like an hour
Gross language @prisma wave
mine is good
๐
You did what?
i'm just sat updating gradle for everything
You're making a tree walk interpreter right @prisma wave
@prisma wave Why does it take so long to parse?
probably the *3
oof
I'm fine with it taking a bit longer to actually parse
Especially since you can store the result of the parse
@lunar cypress i believe so. I'm using ANTLR, not 100% sure on the algorithm it uses under the hood. @topaz bay not sure tbh. My logic is a bit convoluted but not that bad. It's possibly because I have a lot of recursion going on
I could run a profiler through it at some point but it's pretty fast so I'm not that bothered
what is that text saying "Sxtanna, Today ..."?
ah
ANTLR doesn't say anything about the way of evaluation
If you're simply evaluating the ast it spits out, you indeed have a tree walk interpreter
No you're right
Yes I'm tree walking
there's probably some optimisation to do but for now ~100ms is satisfactory for me
Don't @ me if your language doesn't "compile itself in under 1 second" and "segfaults if you type in 1 + 2"
@lunar cypress
@hot hull
I don't have a language, meaning I win :))
@prisma wave i've done nothing, talking about v lang LMAO
ah yes that lovely thing
They probably fixed it a long time ago but it used to segfault in the repl for 1 + 2
lmao
top notch programming
https://github.com/vlang/v/blob/master/doc/docs.md#pure-functions-by-default wtf they stole my idea
Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero dependencies. https://vlang.io - vlang/v
https://img.bristermitten.me/18.44.24-2020.png Frigga did it first
i would like an answer on why new java devs always use static and call their main class "Main"
youtube tutorials
Shitty yt tuts
NiallCourse highly recommend you do use the try catch smart casting alternaive
You should always call your class Main, then any developer knows it is your main class
Here is an example from a video i saw yesterday
IJ is even showing that it's bad lol
public static Boolean Allowed = Boolean.valueOf(Boolean.TRUE.getValue());
It hurts
man why are scoreboards so annyoing, reee.
Ok?
Published my api with the first method
man why are scoreboards so annyoing, reee.
@pale shell What's issue
I wanna check if a sb contains something if it does add the new team shit underneath that
it currently makes a new scoreboard each time and attempts to show them both at once ;D
I mean, i don't really enjoying doing scoreboards lol
I might just make a PlaceholderAPIAPI class lmao
To set placeholders from both mvdw and papi
Cuz clients requesting mvdw all the time
https://img.bristermitten.me/21.36.39-2020.png this took wayyyy too long to do
Lmao nice
merci
Any gradle users: Can gradle still use the local maven repository?
<dependency>
<groupId>net.kitesoftware</groupId>
<artifactId>kiteboard-api</artifactId>
<version>3.1</version>
</dependency>
what would this look like in gradle?
implementation "net.kitesoftware:kiteboard-api:3.1"
btw you can paste maven dependency blocks into a gradle script and IJ will convert them
repositories {
mavenLocal()
}
dependencies {
compileOnly "net.kitesoftware:kiteboard-api:3.1"
}
what does implementation do?
technically the same thing
but implementation would shade it by default with shadowJar
there are some semantic differences too
this skyblock plugin is made
so badly
what the hell
i dont know what im reading
What one @remote goblet
wot
this skyblock plugin is made
@remote goblet
i made*
โข Removed 60 messages.
I'm hated in this community so.
Interact in what way?
No one is hated smh
I am.
Like does that value only accept a single whole number there?
yeah at the moment
Some people here are
I mean I annoy everyone.
I'm not sure it was worth the pain just for a gimmick
Also let's move to offtopic
I wouldn't say "No one" but sure
Alright
but the Binary operation resolution makes a function that calls the original function n times
Seems scary
lol
Thats pretty much how I feel about the runtime scoping
it functions...
functions
Scoping is a horrible thing
I will confess I copied like most of your code for scoping and context
YOU BITCH
Scoping is a horrible thing
@prisma wave exactly
thats MINE
you should always noscope people
it's open source
@remote goblet I hate you
What do you expect
Thats fair...
However, we are CLEARLY in competition here
How dare you
You've offended the gods
if it's any consolation I made it more imperative rather than declarative
I think
it's not a carbon copy
Did I make the code declarative???
Now I kinda wanna see what part youre referring to
I tried to make the code as imperative as possible for extension reasons
wait
declarative is with for loops and things right?
or is it the other way around
I always get the two confused
declarative = "telling it what to do"
imperative = "telling it how to do it"
control flow like if, else, while, for is imperative
writing lexer and parser code declaratively is a pain in the ass without high level language support
can't relate ๐
sounds like a pain though
-1
Kotlin should be enough proven existing software
frigga could NEVER touch odin
NEVER
:)
we'll see about that
I would say mine has FAR more practical features
Function multiplication for example
I've used that over 851 times in a production environment
HA
Does yours have an exponential operator? I think not
Oh... damn youre right
I think it's obvious which language comes out on top here
fuck you
I'M JUST SAYING
You are ignoring the facts that I am showing you
EXCUSE ME
frigga is OBJECTIVELY better
IS THAT SO
DDDD:
Just got the idea to write another toy language named Thor
IN ODIN
SAY I WONT
I DARE YOU
Do it
Who
She is an icon
nooooo!!!! It's not reached any maturity as a language so can't practically be used!!! Noooo!!!!
WDYM WHO
IN ODIN```
I mean who
HA
LOAD DAMMIT
Odin is in Java or Kotlin?
@old wyvern kotlin
Hi yugi you called me?
uh?
You said odin..
oh so we're plugging our languages are we??
oh I need to update the readme
xD
It did
Stop bullying Alex
@old wyvern yes, for now
I see
I plan on extending it to be a general purpose condition statement
Alex I thinks I sent it
@topaz bay does yours have a nice syntax? I think not
I BEG TO DIFFER
Sx, my language could easily beat yours! >:)
variable conditions I mean
Alex you seen my language right
val list = java::["java.util.ArrayList"]
list.add(10)
push list
// output
[10]
Nope
When your language does this
that is ugly
O fr??
you never sent any of it
STAND THEE BEHIND ME
Thrown
I did?
You lose the arguement
LOL
Typo
AGAIN
Shit up
2-0 TO FRIGGA
Frigga ftw
It could
Just saying
I wanna see these 2 languages fight tbh
Once you conquer the nine realms
not frigga
Come talk to me
have you 2 stopped fighting yet
Oh please... that'll never happen
You have no seat at this table
The big boys are talking
Imagine naming a language after a marvel character