#dev-general
1 messages ยท Page 412 of 1
Y'all kicked from Rust gang
๐ฎ
rust ๐คข
Yugi, you don't mind if I remake the renderer before you right?
Die
Yea sure
๐ชฆ
idm
I mean mine will be just experimenting, since I've no experience in rust whatsoever
Ill probably be a bit busy for a week or two anyway
Die
Exams gonna begin
๐ชฆ
I got two weeks of intership left, then I got all the time in the world again
Rust and Go are the only good imperative languages
Dkim lost a million braincells in a minute
And Rust is like 50% imperative
๐ฅฒ
no energy, lol
9 months left for me
๐
A small price to pay
that means no haskell sir
Haskell generates energy
๐ฅฒ
Haskell is perpetual motion
kotlin > haskell > all
The ultimate abstraction
wait a minute
wait a minute
Is it me or did you lose your last one?
๐ฅฒ ๐ฅฒ
Haskell is keeping him going
๐
It's like a buff
The life force
You can't go below 300000 as long as you remember some haskell
๐
can i do this: type printStr = putStrLn?
no
or just things like String
It's not a type
ok
you can just do printStr = putStrLn though
but its valid syntax
Not enough Haskell
Dir
Die
Use haskell bracket style if you're succumbing to it
ok ill go into a directory
Aight
So is ```java
while(1==1){{{}}};
really?
In kotlin
cool
๐ฆ
main = do {
print(12345);
putStrLn("hello");
}
Dkim
lol
You WILL be banished
I want to kill you
Shut
yo @ocean quartz so with your gui lib when I use setItem to set for example a next page item or when I use the filler, it actually tries to put items in the same slots when I use addItem so I have 9 items that just dissapear (since I have all the 9 slots at the bottom set to filler and next page items). Is this an intended feature? xD
Mf gui kotlin dsl when?
Soon
main = (print 12345) >> putStrLn "Hello"
``` :slight_smile:
๐ฎ
I already made one
wot
Fill first, set and add after
In the next update it won't be an issue anymore, but right now it matters
Oh that one has a dsl?
I think so
Ah
that's exactly how I do it and it still adds or tries to add them there
Can you show me your code?
I have some weird workaround rn with slot counting and shit. sure gimme 2 minutes
well technically what I do is set the prev and next page items and then the filler and then the add items
this is the old thing I've tried
You're setting and then filling 
well I have no problem with the set and fill
those work fine
Its just that it skips like 9 heads
so if I have 45 heads it fills the entire first page but if I have 46 it doesn't go to the next page
same for all heads from 56 to 54
46 to 54*
it adds the 55th head to the next page
Right now tho I have a count variable and I use setItem instead
I haven't tested it yet
but what I do is if there is an item (in that slot) I just skip and increase the count
and so on
and if there is no item
I set it
Would it be unnecessary to check for crafting recipes async because I have to loop through thousands of recipes?
huh? I don't get it

Follow someone home
ohhh
what if no one is waiting for you at home
it took me ages to see follow traffic rules someone is waiting at home for you
all i saw for a while was follow someone home
I didn't. I only saw it when yugi told me
also reposting thanks
yw
That's fucked up lmao
What I am trying to say is that you need to fill before setting
Oh so that'll fix it? Will try a bit later.
yo did you see my janky adventure support for your gui?
I didn't xD
I think I pinged you when I showed it
1 sec
val specialSerializer = LegacyComponentSerializer.builder().hexColors().useUnusualXRepeatedCharacterHexFormat().build()
val legacySerializer = LegacyComponentSerializer.legacyAmpersand()
fun String.color(): String = specialSerializer.serialize(legacySerializer.deserialize(this))```
lmao
That's scary lmao
what it does, it takes the string and covnerts it to a component so I can support &#aaFF00 hex type
and then convert it back to a string
that uses the &x&x&x
thing
Ya'll need some haskell in your life
I could've just made my own regex thing but I'm to bad at regex and to lazy for that
lmao
๐ฉ
Why would you do that
bcz matt's gui doesn't support components or any other hex format
and I wanted my config to look nice at least
xD
Sucks
Sorry that was from previous versions
We are moving everything to DI
Ah okay, good
All the necessary stuff was moved into the simplex module class
The core shouldn't ever be used by the modules
@ocean quartz Should we just use luck's relocator as is and create a temp file with it or something? xD
Hmm would that work? Doesn't sound good xD
i mean it should work welp, actually lemme first give the current solution a try first
man maps really start to be helpful now that I know how to use them
thanks matt xD
maps as in the map function or an actuall map?
map function
foldr
๐
I used to have like 7 lines just to color each line of a List of strings. Now its just 1 line
Now you see the power of haskell?
map (translateAlternateColorCodes '&') list ๐
Alrighty, imma gonna do some work on mf-gui right now but later tonight I think i'll give the gradle plugin another try
Awesome
well fun MutableList<String>.color(): MutableList<String> = map { it.color() }.toMutableList()
lmfao
huh?
@prisma wave enjoy i done more work for you :))
what's wrong with it
it doesnt need to be mutable
^
๐
well I do change it later
mutability only where necessary
ok ok I'll change it lmao
im about to kick the cat
just stop
gonna commit a war crime too?
thanks
no more mutability
does anyone know a good kits plugin ?
So I have a question, how would you guys approach this, I have the main item builder which well uses strings and all that, I want to have it work with components but keep the string as well, should I do two item builders? Sounds ass ๐ฉ
Definitely not watching that video.
SO MUCH better
oh you should
Definitely not.
it's not a video
oh wait for real? I didn't actually know this.
Either some weird porn, or jumpscare.
๐
it's neither
neither
nah. its good
I don't trust anyone on discord anymore
itll change ur life with the best kits plugin ๐
i didnt get to level 76 in the helpchat discord by posting porn
especially if you hit the jackpot
im helpful role
wait what
then why tf did you come here in the first place
got about 5-10 jumpscares in the last week
Its amazing
You just asked an entire discord server about a kit plugin tho ...
Watch the video
Yeahhhh
i mean it's metaphorically porn
but
Better than porn
Its pinned
then why ask
u have orgasms over it dont u bm
for functions with a body you need it, expression functions don't
many times
good to know. thank you very much
cool
people here weird asf.
whats so bad about good old fashioned essentials
mate you asked a question
Try SImon's kit plugin, Haskell
very ass
can you watch the video please
Funny thing is that I just realised that I have a couple functions that I don't specify it for but I never actually realised lmao
๐ฅฒ
Please watch the video @fickle tusk
can you make a review
pretty please
Yes please
ill make you a kits plugin free of charge if you do a 2 paragraph review
I'm definitely not going to watch any video
there is no video ๐
You dont even need to download it 
First step is to convert everything to gradle kts
stack*
Oh yes you are! You're going to watch your tongue mister!
its in this discord... If it was NSFW it would have been taken down. Just please watch it. I've watched it on repeat for 2 hours. Its very good
How dare you speak of Sir Simon as such
Addiction
jumpscares aren't NSFW
it's not a jumpscare
Its not a jumpscae lorenzo
that's what the last 5 people said to me ๐
well I guess. but you can turn off sound. well nvm the sound makes a lot of it
if u think its a jumpscare, just be prepared for one lmao, if u expect a jumpscare ull never be scared
lmao
it's terrifying
Its just funny
but not a jumpscare
xD
not watching it bud
this beautiful face https://i.imgur.com/1zdUxmM.png
your loss
"Uncanny valley"
well his loss
Do it
we tried
ever heard of haskell btw?
How bad can a wombo video even be
look at happy customer dkim19375!
that wasn't your reaction few hours ago
everyone loves haskell!
did BM beat you again?
again?
Yes!!
java noob turned haskell pro
(inspiring)
blink twice if you're in captivity
xD
lmao
lol
blink blink
blink
blinking is impure
But... but,...

My state remains
AAAAAA
memecandy?
the ivory tower is under siege
Will I be able to escape this time?
bm tell me more about the awesome haskell ๐
hmmm
did you know haskell had data classes before it was cool
records might be a better term
we need a cpu architecture that will only execute pure functions
if I put /src/ in gitignore, why doesn't it ignore the things in src folder?
and whys there a hacker in voice 1
why would you put the single most important part of a program in gitignore....
reasons
xD
Maybe monad
list comprehension
laziness
C interop
custom operators
type classes
pattern matching
algebraic data types
the magic of replicateM
etc
๐ฎ
nvm google saved me
wanna coc?
pog
bm you shoulda asked want coc?
๐
coc is where i learnt most stuff
u just have to have about 60 google tabs open
i forgot
@old wyvern
fastest ๐คข
๐
how do u make a clash
Activities > Compete
ok
it will make a bling sound
that looks fun
@half harness ?
ok what are we allowing
everything but shortest
nvm
why did you guys add shortest?
Welcome to python gamemode
using python in shortest is sorta ๐
yeah that's why im asking
Anyone up?
Oh wait
its shortest
Oh
so you got time
One sec
Thats not the right link blitz
ugh
@prisma wave when you're done please review mine and tell me if there was anyting else I could've done
yeah I mean haskell and python will be competing here
but I do believe python will win
75 damn
idek how to combine Chars
luckily bm told me how to read the fun :: param stuff
that was to be expected
import Data.Char
let ascii = ord 'a'
what's the issue then lol
@static zealot i dont think there's much you can really do there, maybe sum{it.toInt()}
but i can't now
oh
o
I didn't know about that
you convert each char to ascii, sum it up, and then sqrt
sum (map ord str)
ok if someones gonna play unfair, ima beat them at least
heh
My actual solution would be 92
in clojure?
yea
||(ns Solution(:gen-class))(defn -main[& _](prn(int(Math/sqrt(apply +(map int(read-line)))))))||
clojure program
yep
you could probably beat python if you didn't
i give up
what do you have rn
lol
idk how to use mappings yet
yup, wouldve beaten python
didnt you use them earlier?
it's 50 chars
wow
what is ord?
idk
lol
ill try print
welp 21 seconds, here's my uncompressed solution ```hs
import Data.Char
main = do
line <- getLine
let total = sum $ map ord line
print $ floor $ sqrt $ fromIntegral total
no time
puts Math.sqrt(gets.chomp.chars.map(&:ord).sum).floor
still would've beaten you with clojure ๐
$ = ()?
๐ฅฒ
I'm actually thinking about writing them and asking them to treat it like other scripting langs
Reverse and shortest ?
lol

fInE
the trickster
bro
when the staff member spams ๐ฅถ
I am not a moderator tho
so its fine
just lmk when you wanna start
are we waiting for you @old wyvern ?
who's capofcave?
some guy from my coding server
mhm
okay
๐ฆ
wait does kotlin have no List#join ?
joinToString
and what, you have a coding server now? you don't have enough power yet?
yeah I just forgot I have to give a separator myself otherwise it just uses ,
And who is redempt
damn man
another guy from my server
i am powerless in helpchat discord ๐ฅฒ
tell this coward to share code
lmao
there u go
why isn't intellij scratch file working ๐ฆ
cuz you should be using haskell
yes
all helpchat members get OG role
haskell doesn't work either
ah
sounds like a you problem ๐
ok send me invite
just change your mindset bro
aw
good things will happen to you if you make them happen ๐
maybe one day I'll let you guys sit on my couch with me https://i.imgur.com/xJAzgw6.png
its been empty for a while now
๐ฎ
=warn @half harness invite bypass
:c
@half harness
B
C
fastest again :c
wait is this for real?
I didn't test it lmao
ah I forgot to cast back to int
nice
Are you guys still playing?
yeah
new one
Tag everyone?
@everyone
The 'everyone' mention is disabled so you can't annoy people.
๐ฆ
@everyone
@everyone
The 'everyone' mention is disabled so you can't annoy people.
Cube should make a coc role
yum
yes!
@jovial warren @old wyvern @jovial warren @cinder flare @half harness @ocean quartz @obtuse gale @obtuse gale @stuck harbor @forest pecan @lunar cypress @hot hull @steel heart @surreal quarry Join COC!!!
no
๐ฅถ
no
No Coc
yeah but i don't care about bardy
to lazy to write another one lmao
Imposters
Big Boy Gamer?
ew
aham
๐๐
we need coc||k|| role
what couch?
yes I love cocks
Hmm? xD
join you plebs
Nay
๐ฅถ
this one sucks
Damn, this is much harder than i thought, to have a way to support both components and legacy shit ๐ฉ
git gud
for some reason I had to print out index+1
...
why the fuck doesn't it count from 0 in the results?
idk
can git solve the distance between two points on a 4 dimensional axis?
its kinda trash I spent like 2 minutes trying to figure it out
๐ฉ
it probably can
Damn
it doesn't really matter just calculate the distance between every point that's on the same plane and sum them up
the lowest sum is the winner
in math?
lol
5.5
hehe I get a cookie
yea
no u suck
...
green man ass!
For me its blitz
Birds never lie!
discord message ids never lie
You mf
you will become kfc
Isnt that a chicken thought
mine: sends 5 inch long dick
her: sends one back
and hers is like 10 inch
Imma just move on
double up
Number Domain Error too powerful
lmao
๐ช @static zealot theres yours
noooooo
negatives?
My equation is correct
ty Tofpu
But ruby sqrt doesnt like 0
i never had to use negatives
I cant be bothered to explicitly handle this
You're welcome!
i used this formula
sqrt what fore?
wtf
just calculate the distance between each point that's on the same plane
and sum them up
sqrt((y0-x0)^2 + (x1-y1)^2 + (x2-y2)^2 + (x3-y3)^2)
Yea I guess I didnt need the root
But oh well
hasklash ๐ฅฒ
what level is ur coc?
I'm on my phone ๐ฅฒ
and how big
hey you just overthink things. Not knowing math opens so many doors 
๐ฅฒ
hey you just overthink things. Not knowing math means you are a disgrace for your asian family
where me and pulse and yugi are
That emoji sucks
u suck
screw off beat dude
xD
haha I got them!! https://i.imgur.com/tvRRLVM.png
never
they joined MY LINK!
wha
god
doing this recursively ๐ฅถ
process' :: String -> [Char] -> String ๐ฅฒ
me
ok. you got me. its actually you
well that's more than enough COC for me for today. even tho the day has just changed xD
nah its just 11 pm for you
or are you still in Turkey ?
oh yeah it's getting late
rip
๐ฆ
solve:: String -> M.Map Char Int -> String
solve [] mem = []
solve (x : xs) mem =
let i = fnd mem x
in if i < 0 then x : solve xs $ M.insert x 2 mem
else replicate i x :solve xs $ M.insert x (i + 1) mem
fnd
fnd m k = fromMaybe (-1) $ M.lookup m k
rep = concat . replicate
ah you used maps
I tried
what's the random fnd doing
It was find
but had clashes
Could be bother to make qualified imports
hence the new name
๐
Another round?
nah thats my last i think
ah alrighty
gn
@ocean quartz I think we'll just have to use a temp file
defining from bytes only works on our own classloader which doesnt really require relocation, in the case of a general urlclassloader...well... no way to intercept loadClass
Python's plus equals augmented assignment syntax is more complex than many people realize. Let's take a look.
Code for this video: https://github.com/mCodingLLC/VideosSampleCode
Docs for iadd: https://docs.python.org/3/reference/datamodel.html#object.__iadd__
Discord: https://discord.gg/Ye9yJtZQuN
Reddit: https://www.reddit...
mutability can cause INFINITE issues
Throws error
Still appends the element
???
Cursedthon
so @ocean quartz
this is my function that populates the gui: https://paste.helpch.at/payojecoho.cs
this is the result: https://i.imgur.com/6Iay6MM.gif
As you can see I fill the bottom, I set the prev and next page items, and then I just dump in all the bounties. The thing is, it skips the 45-54 ones. As if it tries to put them in the same slots as the filler and the prev and next page items. I made the ids just increase by 1 so I can display that. I know for a fact those items(aka bounties) do exist as well.
This is what I was talking about earlier.
hm check what exactly?
Custom recipes, I am not at home, I will send code when I can. I am iterating over the recipes and comparing them to the ones in the inventory.
But it also includes all bukkit recipes
i was thinking of this
i was thinking of making some sort of possible concatenated string using the items
like for example slots 1-9
[1][2][3][4][5][6][7][8][9]
where each number is an item id or smthing
then add it to a hashset
then when you check for custom recipe, you create a unique identifier based off what exists already from the table
and check if the hashset contains it
does that make sense?
I can show you what I did when I got home
Oh I see what you mean I think
Wouldnโt that be the same time as iterating over the regular recipe iterating, unless you used a map of if, recipe?
I was thinking of having another thread running and checking the recipe in the inventory, and updating the result sync
parallel stream 
I have to learn about that
๐คค
lmao
nope
hashsets contains methods is O(1)
lol
you.. still need to iterate through all registered recipes
Oh wait, smh, ofc, you are setting the page size to 54 while you only have 45 slots available nerd
after all, it's only once
compared to something like looping
like 20 times
or prolly more
Hmm okay that's fine if there isn't a way around it ;o
sorry not set
i meant map
Oh ok
Iโm not using a string array in my recipe though
oh so the page size is not actually the menu size? I see
I could just use the hash code of the object as a key though
they arent unique tho always
Why not?
Are for loops as fast as foreach?
makes a lot of sense xD.
for String, it isn't unique
Oh Iโm not using string
I think forEach uses a for loop internally, you just pass the function or whatever it is for each object
i usually only use it for method references really
slightly slower but not enough to make a difference
I have not pulse, is that when objects can have the same hash code?
forEach is slower I mean
there is always a chance such that hashed data structures
will encounter a collision
meaning that there are two differnet objects assigned
to the same hashcode
this forces it to loop through the whole data structure
so it becomes O(N) instead of O(1)
However, it is really rare, as hashing algorithms are very unique these days.
What collection are you talking about?
No
but never guanrateed
Hash tables won't loop over the entire thing
They'll just loop over a single bucket if they're well designed
nvm not the whole one lmao
idea is however that it would be slower than O(1)
What would?
collision
Technically I think you could argue it's still constant time
Wait so what is collision?
as there will typically be the same amount of objects in each bucket
basically when two different elements hash the same result
And is it only called collision in a set or a map or something?
no, only in hashed data structures
Ok
Medium is trash but this explains how it works really well https://medium.com/swlh/building-a-hash-map-in-kotlin-73c9b23d19ba
Assuming you know kotlin
Get is not an operator function there? 
i'm pretty sure for each loops use iterators internally
at least, probably ๐คทโโ๏ธ
Yeah
default void forEach(Consumer<? super T> action) {
Objects.requireNonNull(action);
for (T t : this) {
action.accept(t);
}
}
wait that's what you guys were talking about? lol i thought yall were talking about the java for-each loop
That's what that is
right
Collection#forEach uses the for-each loop, and that uses the iterator
ye
Or in the gosling fashion - ENHANCED-for
"Range-based for loop" ๐
enhanced for loops are literally the same as for loops but with index hidden right lol
i remember reading a stackoverflow post
where they compared the java bytecodes
it was basically the same
it uses the provided iterator, no?
I mean that's why you can use it if you implement iterable?
because iterable != indexed
There are 2 cases fefo
Arrays are handled with the index
Iterables are well, handled by Iterators
they are implemented primitively
there is no "array class" (except for the reflection util Array one but that's a factory util class)
Yeah primitive arrays are prolly what the SO post was talking about
what the fuck is for(:) tho
Does "native" and "primitive" have the same meaning?
Coz if not, Native may be more appropriate
no
what
primitive falls under native. Native is just an abstract term to describe something like a differnent language used other than the current one
like C
it's weird though, because an array is an Object (that's what the factory methods in the Array class return)
mhm
but there is no Java class definition for the _Array class you see when hovering over an array lol
I never knew there was an official specification table for primitive defaults lol
lol
Maybe because the rest had mostly numeric rhs
true
so about md5
with the dependency loading commit
he made in bungeecord
does that expose the urlclassloader?
UrlClassLoader is already exposed in bukkit
no but like java 16