#dev-general
1 messages · Page 270 of 1
^
o
yup ☹️
☹️
Youngins
Anybody knows? (Matlab)
Can you printscn it? So hard to read xD
can't you just plot (x-sin(x), 1-cos(x)) ?
and use fanimator() to animate.
hmm
@distant sun You sent the chunked function in Kotlin some time ago, you have no idea how much that makes me upset, i was doing a tic tac toe some time ago and i needed something like that and couldn't find, basically to print a list as
[ , , ]
[ , , ]
[ , , ]
board.chunked(3).joinToString("\n")
Vs what I had to do lmao
board.withIndex()
.groupBy { it.index / 3 }
.map { indexed -> indexed.value.map { it.value } }
.joinToString("\n")
oof
lol
Weird that chunked doesn't get suggested on IJ
I guess it's because it's not part of
gets suggested for me
Yeah Matt you suck lol
😭
matt your IJ colors are so pretty
i just downloaded the think you sent in #developer-chat
very hot
Ikr, i love them
Also, invalidated cache and restarted and now it does 
nice lol
windowed would work as well right?
looks like it does the same thing but you get more ability to customize it
chunked is probably just windowed(size, partialWindows=true)
Yeah it worked windowed(3, 3)
why is it that things like blah.forEach {} doesn't support like break or continue
continue is the same as return@forEach
Because it's a function, something i was talking with Yugi a few days ago actually
yeah
good to know
So return@forEach will break the entire function or just the current iteration?
just the current
Nice, didn't know that
fun blah() {
(1..10).forEach {
if (i % 5 == 0) {
return@forEach //breaks the current iteration
}
println(i)
if (i == 9) {
return //breaks out of blah()
}
}
}
maybe instead we could have a language construct similar to forEach instead
such as?
i.e, we switch the format of our "enhanced" for
<Iterable> for <Variable> {
}
Maybe something like this
so for example
[1,2,3,4] for i {
if i % 2 == 1 => print(i)
}
that's then inconsistent with every other list transformation function though
and you couldn't pass a single function
I mean that isnt a transformation tho
true
we could always add a normal for-each loop, depending on how multi-paradigm we want to be
hmm
you'll never need break or continue if your functional programming is sophisticated enough
yup
but i think they're a decent exception as we are aiming for multiparadigm
like scala
does anyone know what the stability fix was? https://www.minecraft.net/en-us/article/minecraft-java-edition-1-16-5
All i know is from Paper
We are aware that Mojang has released 1.16.5, this is a minimal release which we asked mojang to push to fix two critical crash exploits in vanilla
word
Pog
It's been a while but I decided to add a few more things like adventure, cloud, what else should i do?
hi piggy
@distant sun fun fact, the bug yesterday with enum#values showing month#values isn't actually a bug at all
enum#values literally isn't on the javadoc
it's generated by the compiler
hi fefo
I think it's impressive that docdex at least managed to show the right object, for a method that doesn't technically exist
not todo with it being static
moreso, it isn't "inherited" from Enum
anyway fixed your two issues gaby
fefo can u help me test something real quick while ur here
sure
nvm dkim is helping me

😭 I still can't react to messages related to fefo
(either fefo sent the message or reacted to the message)
if you send a message I can't react to it, if you react to a message I can't add a reaction
oh yeah
yeah you can't react to someone else's messages if you are blocked lol

😭
lmfao
Ayy, this is pretty cool
Ah shit, it wont work well with adventure 
fixed it
Lmao
I need to manage newlines on tooltips myself right?
Ignoring the crappy diagram, does anyone recognise this pattern?
It seems very similar to pascal's triangle
although not exactly the same
the furthest left and right numbers increase by 1 each row
and the second-to-outer elements are a multiple of the surrounding 2
but there doesn't seem to be much of a pattern otherwise, apart from the symmetry
Might need to add some more elements before anything obvious appears
slightly better image here
🥲
It's definitely not a pascal's triange theory in here 
wot
what do you meant what
Yeah it's not, but the design seems similar
Looks more like a binary tree than a triangle
A^2 + B^2 = sqrt of C
what's there not to get
that' sexactly how it works
no doubt
That's exactly what it is lol
I'm just trying to figure out a pattern
that's not even right lol
ah
Rather than brute forcing
no one asked
cuz I need to find the billionth entry or something
Whats the question?
youre making no sense
^
perhaps a bit of xy problem here, are you sure this arrangement is beneficial?
just agree and make me look smart for once
It might be an xy problem
Nope
the question isn't exactly this
we need more linesss
what is it
ok it's a long one so I'll try simplify
we start with a pair (1, 1). we can then either add the 2nd to the 1st, or the 1st to the 2nd, generating either (1, 2) or (2, 1). This goes on for a long time*
i need to find how many "cycles" it takes to reach a certain element
Ah, fun
indeed
Erm.. I am having a hard time reading your position number on the paper lol
Yeah you probably can't evaluate it all
yeah the diagram is messy sorry
but it's always a pair then, correct
so for example, (3, 4) takes 3 cycles to go from (1, 1) => (2, 1) => (3, 1) => (3, 4)
yes
the diagram i gave earlier was the elements of the pair multiplied together
which i thought might make it easier to deal with
but possibly not
possibly not because (4, 3) != (3, 4)
yeah
i was planning on using the product to get an estimate
then refining with some tricks
but that might be even harder
I usually better at this...
(a, a+b)
reduce to
(a, b)
Might need to redraw the diagram again 👀
yeah
but you have a similar problem then
for every step backwards there's still 2 choices
yeah true
Not really
doesn't really make a difference I think
The minimum one
?
the problem is that (a, b) a or b have an upper bound of 10^50
One sec
so brute forcing isn't an option
oh yeah i see what you mean yugi
bottom-up might work
There has to be something at the cross-bottom
I think Yugi's idea might actually be all you need now that I think about it
it seems well-defined
Yeah I think you're right
a node is either gonna have 1 parent, or we can just take the minimum
actually a node always only has 1 parent
lol
So is this solved?
Haven't implemented it yet
But I think so
I'll send the full question if you want to try, but it's worded pretty weirdly
This is my probably "stupid" thought: (I will start from left only):
At the branch 2,3,6: 3 x 6 : 2 = 3+6
At branch 6,15,10: 15 x 10 / 6 = 15 + 10
got a 6 line clojure solution
👀
but trivial to do in java, kotlin or anything else with some fp support as well I think
Yea they only allow java or python
I mean it shouldnt be too much, I think
probably not
that's why I marked as spoilers 😛
Depending on the number of steps this solution could (and probably should) be more geared towards counting steps efficiency of course
what did you do?
def solution(x, y):
ix = int(x)
iy = int(y)
if ix % 2 == iy % 2:
return "impossible" # Cannot both be odd/even
steps = 0
while True:
if ix > iy:
ix -= iy
else: # ix !== iy
iy -= ix
steps+=1
if ix == 1 and iy == 1:
return str(steps)
if ix < 1 or iy < 1:
return "impossible"
messy
but seems to mostly work
definitely timing out with big numbers though
Are the impossible cases mentioned in the question?
Spigot doesn't handle well with EntityDamageByBlockEvent with cactus...
it doesn't say the impossible cases, no
Make my arduino almost get screwed up everytime
apart from 1, being 2 and 4
which is solved by the first case
i think i can use division + modulus here
probably
20 ticks per sec right?
yea
so what does that make one tick
or at least if the server isn't lagging
like .05 secs
whatever 1/20th is
wow the clojure version is much cleaner lmao
although possibly not as fast
hot
ty for help
println("Time taken: ${System.currentTimeMillis() - start}")
is this not how you measure time?
what is that?
gimme an input and I'll try
cos This is always printing 0
but they could go up to 10^50
google foobar challenge
ok @lunar cypress 10^50 and 19
thats foobar?
if i wanted a job at google i could just apply like
10^50 bruh
i thought foobar was like replace every multiple of 5 with foo, 7 with bar and both with foobar
python moment
lol
that's the original foobar thing
wait
yeah
basically its a bunch of challenges and google looks at them and goes hmmmmm
but the google thing is named after that
ah ok
Mine gave the result 5263157894736842028592123087154665966662968147976
also that sounds like fizzbuzz but foobar style to me
or i guess thats technically called fizbuzz
yea
how tf am i sup[posed to measure how long code takes
uhhh
you could make a sexy fizzbuzz with kotlin collection extensions
I thought is was startTime - System.currentTimeMillis()
measureTimeMillis if on kotlin
time = measureTimeMillis {
blah()
}
print(time)```
also if you need it to return a result thats possible, but its a different method and i am blanking on the name
measureTimedValue or something iirc
yea that
why tf is the time taken 0
is it because its in a bukkit scheduler or smthn?
surely not
It's called speeeeeeeed
0ms seems odd
Might be in nanoseconds
@prisma wave yeah 10^50 takes a while lmfao
yea you could measureNanoTime or whatever it is
lol
while(true) {
calculatePi()
}
``` turns out to be 1ms
Are you sure its synchronous?
im not surprised lmao
kinda crazy how using modulos changed from 1m+ runtime to less than a second
because as everyone knows the infiniteness of pi cancels out with the infiniteness of the while true making it not infinite
Yea it does a lot if one no. is very small and the other is very large
indeed
yeah a lot of repetition
how many nano seconds in a ms
1000 ?
1 mil
well nano is *10^-6
Nah he knows what I'm talking bout
"[&a&l| &aSell Booster Bonus! &7(+${amount})](hover: &b&l| &fOwner: &b{owner}\n&b&l| &fDuration: &b{duration}\n&b&l| &fMagnitude: &b{magnitude}x)"
I'm probably just blind
aah the pain of using \n in bungee chat api
line breaks work fine here
Lemme see if it works on the other one now
They work fine, but just break on that one message
i wonder if its cause of the colons?
it thinks its a new thing to do inside the ()[]
They break on these two, but work on all the rest
booster-message:
shop-sell-message: [
"[&a&l| &aSell Booster Bonus! &7(+${amount})](hover: &b&l| &fOwner: &b{owner}\n&b&l| &fDuration: &b{duration}\n&b&l| &fMagnitude: &b{magnitude}x)"
]
shop-buy-message: [
"[&a&l| &aDiscount Booster Bonus! &7(+${amount})](hover: &b&l| &fOwner: &b{owner}\n&b&l| &fDuration: &b{duration}\n&b&l| &fMagnitude&8: &b{magnitude}x)"
]
Lemme remove these and see
(+${amount})
i think its cause those two have colons
James, I just tested it and it's not
no thats not what i meant
like i think because you have a | it thinks its multiple actions and breaks
try escaping the |
single escape or twice
once should be fine since its a config
Why must you hurt me this way
Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning a double-quoted scalar
in 'string', line 3, column 5:
"[&c&l| &cInvalid Booster!](hove ...
same
nice
It's not nice, that difference between first and second, and second and third line bothers me
ngl i dont think you can fix that lmao
try a newline at start and end
hmm, would it look cool if it displayed the info in the actionbar when you hovered over (if that's even doable)
ugh noises
Any help pl0x I'm confused
Debugged it in console and it's as it should be
&b&l\\| &bMCMMO_GAIN&7, \n&b&l\\| &bSELL&7, \n&b&l\\| &bCROP_GROWTH&7, \n&b&l\\| &bMOB_DROPS&7, \n&b&l\\| &bDISCOUNT&7, \n
Yea and the color is set to white
weird
Honestly not sure what could be the issue
can you expose more code frosty
Not sure if it's a code issue to be honest
I've printed out every step and it shows up properly
Cause like if it were a code issue the mobs drops one would also be breaking
So I mean this works
But I legit can not figure out what the issue is for the life of me
Is this fixed?
Yea
This one i think i know the issue
Go on
Try escaping the _ it's not intentional btw I'll fix it soon
I thought I already tried that, but lemme try again
Needed a double escape, but yea it worked :))
Need to fix that, when i made __ work between words i broke _
Shouldn't that be fixed by disabling the italic format tho?
Not exactly
Ah
Because the formats disable rendering but not parsing
Wouldn't it make more sense to disable parsing as well? :p
It would, but I'd need to figure how to do that
oof
bet i wont ever hear back about the issue i just posted lmfao
idk why people cant just upload their stuff to a maven repo
i hate having to use jitpack
fr smh
oh-
😤
😅
😭 I spent 2 hours trying to figure out why my plugin wasn't working, and guess what the issue was:
you aren't tier 5?
nope 😦
what was it lol
😢
it takes like 5 seconds to restart a dev server
plugman is not worth it at all
because i have plugins like placeholder api because of dependencies
well
i made hundreds of small changes
and then after a few hours
I started getting annoyed
and used plugman
I go out do something
come back to my computer, test my plugin (it was working PERFECTLY, and I was going to play the game with friends)
and it wasn't working.
and so I was like "uhhh so it doesn't work anymore
"
._.
So close yet so far
that's pretty close in my opinion.
but also very far
at the same time
so yeah my message was not needed at all I'm just farming xp
New lines should be just \n or \\n in the ide
Now what I mean
I have a description placeholder, and I need to dynamically adjust it to match the right lore size
Nbt, I'm not a fucking madman
sweats nervously
Since I told you how to lol
tell me how too 😭
Well if you're using Paper you can ItemMeta#setLoreComponents or something like that to use, well, components
If you're using NBT you have to serialize them to JSON
Into {display: {Lore: [ /* JSON components */ ]}}
i see
But that's nbt so lols
is there any real advantage to using NBT over the api methods
no
so why bother with NBT for lore at all
well just don't
fair enough xd
rip
🥲
@forest pecan
@forest pecan. @obtuse gale pinged you.
@forest pecan
just being a nice community member and letting you know
@everyone
The 'everyone' mention is disabled so you can't annoy people.
bro stfu
@static zealot don't ping @forest pecan please thanks
@static zealot @obtuse gale holy shit stop pinging @forest pecan please
dev-general
its very general
@forest pecan @static zealot @obtuse gale holy shit stop pinging @forest pecan please
how are you man? I bet not a lot of people ask. Just wanted to show my support and gratitude for all the good work you're doing.
fuck you
omg @forest pecan stop pinging me
@forest pecan @static zealot pinged @obtuse gale please stop @prisma wave @static zealot @forest pecan @prisma wave
@prisma wave DOUBLE
who's @forest pecan ?
Why do you all love to spam, holy shit
@forest pecan
oh that explains it
@ocean quartz hi
DOUBLE @obtuse gale
ez
@obtuse gale Congratz lol
niall gets muted all the time lmao
oh damn
pressed to open IJ like 2 minutes ago
and it just opened
I didn't know why for a second
lmao
🥶
mhm
it was a fun experience
even on medium difficulty it was a bit hard xD
all those screen freezes
anyone here know bfs 
Hi
:')
@obtuse gale
I'm scared of pinging lol
so
that means
you are a bot?
cause the bot identified you
as a bot
so you = bot?
xD

he's a Drug Dealer now

helpful role should be immune from the spam protection
I got some Teddy juice for you
like the ones made out of carrots
cu
curious george
What's a good PlaceholderAPI expansion class name?
Placeholders
I'm thinking PluginNamePAPIExpansion but thats super long
PapiExpansion
to much
i thought u blocked me 😤
just PapiExpansion
PapiExpansionSomeShitInHereAndStuffAndAddiitionsAndOtherShitLol
I did
Is something like BedwarsPAPIExpansion too long?
but PAPIExpansion is better
I can still reveal your messages
😐
I use PlaceholderAPIExpansion or Placeholders tho
what happened
Because I can't stand his bullshit tbh
._ .
yeah me neither
lol
hey blitz already said that today
second time
I've seen that word
both today
👀

long
:/
HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor
HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitorFactoryProvider
com.github.matt.triumph.chat.platform.common.api.impl.reflection.abstraction.collection.util.typetraits.parametrized.HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitorFactoryProvider
Yes
so how you doing?
hmm
because they made me change the angle
in which I took my pfp
they said its a bit to obscene
uhh
being a broom nowadays is obscene
did I tell you guys I learnt how to make gray images? Like gray scale or whatever its called from colored images?
I'm a pro developer now xD
oh 42%
;-;
imagine using imgur to post images here
ok please don't flex on us that hard
😭
I allocate more ram to my ij
Bm does i think
Chrome go brrrr
ye just censore those ||corn|| hub links
Kek
just me or codemc repo is dead
Imagine using chrome smh
I love chrome
smh
which is basically chromium
XD
LIGHT MODE
xD
i use edge
I dont use edge
i use edge
Edge is just chrome with a microsoft account
no
do i do it
It literally is just that lol
Shut up barry
clickbait image use edge
that's why I use Opera GX
;-;
How about Yu-Gi-Oh! GX
What is your second percent there? Is that ram?
maybe
ram is not in percentage is it?
ah
resource values
yeah saw it
i only have 8gb ram so it looks more in percent 😔
Also I've been opening up this project intellij for about 10 minutes now
"Gradle: Build model"
"Gradle: Download maven-metadata.xml"
repeat
oh man what I love when every fucking plugin makes his own stats enable/disable folder
I installed a plugin
and instead of using bstats
it uses its own custom shit and makes another folder
just for that
lol
just use bstats ffs
its not the only one I've seen
I had like 4 of them using 4 different stuff
just dont use any stats plugin at all 🙂
or that I guess
idk plugin stats are usually just to show off I guess
nothing else you can really use it unless you have your own market or advertise it on some sites like google adds xD
Hey guys I just downloaded the plugin can we use the tags plugin for essentials chat?
#general-plugins please
#general-plugins And specify "the plugin"
ive reached 80% cpu
ok
lol
Kaliber did you know we have 101 signs on our petition? tho cube still said no
ok
no music yet 😦
oh is that the one with music?
ok f cube cba with his shit leaving this server omg what a dictation doesnt even wanna add a channel cant believe he wont just do it its just a channel that will be very useful like wtf
lmaoo
I actually said no music just because I knew you'd change like that. its more than that but #music is one of the request.
is build.gradle = build.gradle.kts
aw
when i moved from maven to gradle i didn't get a build.gradle 😦
no fair mom says it's my turn on the build.gradle
build.gradle.kts is gradle but with kotlin's dls
should i have selected groovy instead
Yeah
oof
"should" is kind of... meh
well i don't really know what I want
research about the two
groovy vs kotlin you mean?
Yes
well all I know is that if you use groovy there is a chance the entire file will go warning yellow because it's shit 
lol
https://youtu.be/ttcflCFd5B8
Every time my I have a bug in my code I take a shot but unfortunately I dont write bugs
😂😂😂
Discord: https://discord.gg/ypFyyWq
Instagram: https://www.instagram.com/keep_on_coding
My Gear: https://amazon.com/shop/keeponcoding
Patreon: https://www.patreon.com/KeepOnCoding
CodeJams is out on all major streaming platforms!
Spotify - https://bit.ly/Code...
How to get alcohol poisoning 101
Literally
uhh
lol*
so how would I name this
it can either be enabled or disabled
State, Enablement, Enabledness?
state seems fine
IState it is then.
could always also do something like
HasState or
Enableable
or some shit like that
in modding tutorials
what
nvm lol
@hot hull
its smthing in mods
He has exp with that
Nah I'm not following some tutorial lol
ew IState
eh it's convention in this language iirc.
why are your {} like that 😱
people do it but thats kinda like saying interface interface state
@half harness convention of this language
I mean I wanted to make it in c++ first
some people prefer that way 🤢
Huh?
Your class for one boolean smh @hot hull
i feel like you should call it State then name your impls like BlahState, FooState, etc, but i guess that may just be my personal preference
^ i agree with James
It's not the entire thing smh
there's no such thing as BlahState or FooState
StateImpl
This was why I had to be pinged at 1am
it's an interface which can be implemented by an implementation of an abstract class
Smh Gaby
thats gross too dkim
:confused: i dont have that much brainpower to understand what you just said
i personally would call it State or Stateful or something
but its up to you ¯_(ツ)_/¯
nah give it some underscores and dollar signs you should be set then
I could call it Stateful
lol
and have ILoop be Loopable
State-chan😚
but that isn't convention
and I can change it afterwards anyway
I just needed a quick word for what to use
yea its probably best to follow convention
not that it matters since this is a personal project
I also just noticed this is c#
wait
n not for work
n
muy mal
careful what you say about kotlin in these parts
the naming conventions make no sense
🥶
in c#
what do you dislike about kotlin lol
I've had so many discussions with my boss (who's a c# fan). But you just can't get through them.
@surreal quarry that it's ugly. It's a great language just ugly
interesting
😮
i kinda like the syntax but its probably personal preference again
but I find many languages ugly so eh
fair enough lol
yet I use em all the time
German
Was sagst du?
Fuck you too
that's fun
malloc(gabytm);
🤣 🤣
i got rick rolled by a frito-lay ad
L
This may sound dumb, but is there a way to have a dependency that is compileOnly and testImplementation at the same time? 
Unit testing spigot plugin is ass
You can do both...
Yes, but without repeating
Lazy ass
Not question of being lazy, just DRY
It's literally just one line wtf
I don't see how DRY applies, tests are their own kinda thing
Like:
compileOnly "me.mattstudios:triumph-config:1.0.5-SNAPSHOT"
testImplementation "me.mattstudios:triumph-config:1.0.5-SNAPSHOT"
When every i need to change versions gotta change both and stuff like that, was just curious if there was a way to do it with one keyword
Yes lazyness
Can't you define the version in a variable/constant/placeholder/whatever above?
Yeah
But...?
lol
Just don't like having both there xD
@surreal quarry TriumphChat is kinda usable now, since you asked a few days ago thought i'd let you know
Still a lot of things incomplete, i'd call it an alpha
But basic stuff works, formats, normal chatting, pm, reply, social spy
So apparantly
Foo Bar is just another pronunciation of fubar
which means
Fucked
Up
Beyond
All
Repair
Lol

unLucky
Bruh Gson is being a bitch
I have this crappy yml I'm loading with snakeyaml which loads it into linkedhashmaps and arraylists I think? https://hatebin.com/srpogakvzh
so my plan was to make use of the amazing type system gson has so I would give the map to gson to serialize to a string or a jsonelement, whatever, and then deserialize to the types I want with a registered typeadapter
Get gud
Bitchy gson throws SOE
when serializing the "raw" map, hasn't even reached the typeadapter yet
The map snakeyaml reads is completely well formed, there are no oddities and it reflects perfectly the data in the yml
Console just nyoooms with a soe
fixed
? Anything wrong?
tf is that map
The yml linked above lmao
I thought gson was smart enough to figure out the structure of it by itself
It wasn't
So I had to tell it what it looks like lol
Anyone got any suggestions as to how I should approach new linning a string in the same style?
- " &7&l| &f%boosters_booster-description_{type}%"
This would be my list, the placeholder would return ie.
a shop oriented booster which multiplies; shop sells by the given booster magnitude
Using ; as a newline right now as using \n on lore just breaks everything,
So would splitting there, and removing the placeholder to get the style be "clean" enough or is there any better ways
ew @distant sun why is there a ;
what
in ur name
you guys are stupid
rude :C
is a C method
cute
Yeah if you use any advanced words they just cry
smh
https://www.reddit.com/r/ProgrammerHumor/comments/kzwulk/this_is_my_style_of_coding/ every programmer can relate
is tisnt "magnitude" vectors slogan
*isn't
Does anyone know how i can use Vault with Mysql
because i dont find anything on Vault Mysql
What are you tryna do with vault and mysql?
#showcase message 1.8 😐
;C
y
1.8 sucks
Because it was a commission?

