#dev-general
1 messages ยท Page 321 of 1
It also shifts the sign bit
I think
Or maybe it's a rotate
Idk
But it does the job surely
lol
unsigned shift fills the leftmost bits with 0's instead of filling it with the sign bit
only works for right shifts ofc
>>>
that's an unsigned right shift
then >> is a signed right shift
in Kotlin, we don't have the operators, so we use ushr and shr respectively
It does not have a rotate
what's a rotate?
It rotates the bits, instead of shifting and filling with 0s it stacks the bits you're shifting out in the other end
Like
rotates the bits? you mean a bitwise OR?
or a complement (which flips all the bits iirc)
00011010
00001101
10000110
01000011
10100001
11010000
nah we don't have that
That's an unsigned rotate
What a shame such low level instructions do that natively but you have to design that crap yourself on higher level languages
I mean not like you use it everyday
Lmao
https://www.javatpoint.com/java-integer-rotateleft-method actually maybe we do have rotation
Java Integer rotateLeft() method with Examples on doublevalue(), decode(), compareto(), compare(), bytevalue(), bitCount(), equals(), floatValue(), hashCode(), longValue(), intValue(), highestonebit() etc.
O
fefO
d;jdk Integer#rotateLeft(int)
public static int rotateLeft(intย i, intย distance)```
Returns the value obtained by rotating the two's complement binary representation of the specified int value left by the specified number of bits. (Bits shifted out of the left hand, or high-order, side reenter on the right, or low-order.)
Note that left rotation with a negative distance is equivalent to right rotation: rotateLeft(val, -distance) == rotateRight(val, distance). Note also that rotation by any multiple of 32 is a no-op, so all but the last five bits of the rotation distance can be ignored, even if the distance is negative: rotateLeft(val, distance) == rotateLeft(val, distance & 0x1F).
distance - the number of bit positions to rotate left
i - the value whose bits are to be rotated left
the value obtained by rotating the two's complement binary representation of the specified int value left by the specified number of bits.
wdym
A native method is one that is implemented in C/C++ and communicates with the JVM using JNI (Java Native Interface or something like that)
That gives you a lower level of control over what you can do
iirc most JDK native code is implemented directly, since JNI is trash
It's a bit odd to work with, not very comfortable
But yeah I mean it makes sense that JDK native methods are implemented directly
from what I've heard, JNI is also slow and inefficient
to the point that it basically defeats the purpose of using native stuff
Heard that too but super vaguely; I get it that the transition can be somewhat "expensive" but it's essentially C/C++ code that's running, what happens between the entry and exit points has no weird ass Java slowdowns (unless you're communicating with the JVM)
It would need to be a really heavy task (or something Java really sucks at doing) for it to be worth it
heard JNA is better than JNI
What's that?
I mean, all these guys must think so: https://i.imgur.com/kIGgkFm.png
Can someone tell me what I'm doing wrong, I've debugged everything and it seems to pan out, it just refuses to set the items into the menu https://paste.helpch.at/ewikeqaxuc.java
That seems like a wrapper around JNI for you to not worry about certain stuff?
From what I read in the readme that is
Yes
ah
It can generate jni bindings
Someone please :sad:
gimme a bloody minute
have you tried just adding an item thats not from the config
Supposedly fixed in the latest build
ah right
You can't open a gui async :p
also, arrow code
bruh how is that arrow code
try
- adding an item you make manually (not in the config)
- Populating in sync
Yea but there's nothing that can be changed, unless I extrapolate the switch
I remember my friend used to do that with AnyDesk lol
actually that's kinda true tbh
check the config items are 1. being parsed correctly and 2. being retrieved correctly
Cause latest version has some items
Yea I've already debugged all that and it showed correctly
Hence my confusion
item stack serialized from the section, already debugged that and returns proper values, sec tho
I'm literally so fucking mad rn
all good, I'm just a complete retard
we know
lol
use streams and filter 
or use Objects#nonNull
Leave
Not applicable in this case (nicelly)
:(
then use Objects#nonNull
die
Leave
WHY
lol
Streams have a lot of overhead
wdym
It's much slower than a normal for
ok
Also needing effectively final variables, which I'm updating a variable within, so that won't work
hello, a question
Hello, ask away
i'm trying to create some custom placeholders
they are working if i do /papi parse
but they don't from the langfile
are u parsing the placeholders with PlaceholderAPI.setPlaceholders?
no
yeah i tought about it but i understood from the wiki that you have to parse every langfile call, right?
@obtuse gale I have 2 milka's with whole walnuts ๐ป
Yes
soo
yes. just make a util that colorizes and parses
Because you're the only one in here who knows what a Milka is
@obtuse gale
if i have 2 or more placeholders in one string
it will work fine
it will parse both
oh, ok
I have a util method that parses placeholders and applys color codes in one method ๐
its good idea
Wow ๐
!!!
That's a great idea! ๐
Yes ๐
Very great! ๐
what is that

It's the future

fun String.colorize(player: Player? = null) = ChatColor.translateblah('&', PlaceholderAPI.setPlaceholders(this, player))```
"&cTest string %placeholder%".parse()
translateblah lol
I love the code blocks on mobile the colors look so good
lmao
can't tell if that's sarcasm or not. time to check how it looks on phone
theres no color
oh
Not sarcasm
wait what
I really don't use discord on my phone
lol
apple trash
๐ฅฒ
iphone ๐คฎ
jk I don't hate iphones. I don't love them either
Man Server.pro waiting time has really gone up by a lot
localhost >
yeah...
Iphones are good phones, i just don't like how apple does shit
well then
pretty sure it will crash with MC and a Server running at the same time
its time for u to get an upgrade
also I'll have about half a frame per second
yeah...
that's why I go for free
lmao
if I had money I'd just buy a better dedi and host my test server on it
finally someone with as bad specs as my computer ๐
scared
bump
1.16?
oh
im going to lose
i barely pvp anymore lol
i code a lot now
i still pvp more in 1.8
i dont remember the last time i 1.16 pvped
and ive never been on 1.16 pvp server
i dont even know if any exists
:p
probably does
but i dont know of any
me too!
oh no
matt is here
Didn't you just show a video of you pvping like a week ago?
i pvp still, but not as much as I did before
before I used to pvp like 3 hrs a day, now I do like half an hour a day
me too
i dont go to those FFA stuff
sumo and skywars is the best where I'm at
I dont take any kb in sumo
even tho i have 9 cps
Then how does that affect how good you are? Maybe minecraft doesn't have that much skill huh?
High skill games like League of legends you can stop playing for a while and come back and still do good
because cps isn't that important
well
anything above 9 isn't
i think we should talk somewhere besides this chat
league of legends ๐ฅฒ
or not talk bc me busy
Hey even if you don't like it, it's a very high skill game
it is yea
an underrated esport is rocket league, no joke
that game has such a high skill gap
But that's the goal
๐
Rockqueta league is not trash
efe did u pvp remence
did u win or lose
oh f
i barely won against remence
oh
i love bridge
but i suck at it
lmao
i can do the opposite
i can right click dragclick
yes
oh
ok
can u double click rmb
u should learn to godbridge
and flex ๐ค
lol
I always read that as dogbridge for some reason lmao
cus its a dogshit game thats y ๐คก
how the heck do I install php and all these expansion on a windows server
๐ฆ
with great difficulty
i never win at bridge because I always, always, go against level 150+
its annoying
then I watch yts go against like level 20s
its not flex
i always lose
:c
Just php?
what expansions do you mean?
extension
lol
Comes great suffering
selenium
Boys #off-topic
ok
Why do you want to suffer?
shh
C:\Users\dumit>php -v
PHP 8.0.2 (cli) (built: Feb 3 2021 18:36:40) ( ZTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.2, Copyright (c) Zend Technologies```
easy
I'm like ๐ค this close to sending the client a chunk loaded from a file rn lol
the bridge is great ๐
ye, but i always go against like level 100+
i love jumping off them
๐ณ
Fuck. You.
Oh shit, they want me to add a test, i have no idea how i'll do that
https://github.com/ktorio/ktor/pull/2365
Thanks ๐ญ
"No"
close with comment
lol
lol
Tbh
or just keep it on your fork :)
Idk why it'd need a test though, it's such a simple fix, and it's literally just making it like Netty and Jetty
xD
"No test needed, it works fine"
what is ktorio? Factorio but made in Kotlin?
"Merge ASAP"
source: trust me bro
it's a framework for quickly creating connected applications in Kotlin with minimal effort
slitherio made in kotlin
so many
Ah
Ktor is super fun to work with
Ktor is an asynchronous framework for creating microservices, web applications and more.
Yeah factorio looking good
Ask Spring
spring is good
verizon is better
Version.get
Verizon?
You can probably do that in 1 line in Ktor
the ISP?
yes
i dont use kt tho
ye
Sorry to hear that
probably owned by vmware
you should start
VMware own everything
okay I stuck with something
You can't say you prefer java if you haven't tried Kotlin
oh
nahhhhhhhhh
Fuck my hand is shaking
por que?
Interesting
wot
Stop doing coke Frosty
Never!
you see dis: https://wiki.vg/Chunk_Format#Data_structure
I need to get the length of that in bytes
@half harness why do you prefer java
I have an array of longs and I know the bits per block
How about each week I learn the basics of a language I get given by BMs site
That sounds fun
that does sound fun
I need a good jvm langauge
K
And if it's a duplicate language I learn more, really fun
that is cool
this week we start with elixir ๐ฅฒ
Nah we start next week on monday
lol
im down
does elixir jvm?
except clojure
wh
i dont want to go through the struggles again to learn a lang
thats not a reason you prefer java
learn kotlin, if you know java it's simple
it will take you like 2 days
Trust me it will
to get the basics yes
if not less
implying you are reluctant to try clojure
learning java basics and drilling it into my head took like a month
they are very similar
kotlin is too similar to java imo
aside from some syntax and boilerplate
uhhh i dont think so ๐คจ
boring
Yes I wanna try it, sounds fun tying the rope around the tree when that pops up
LMAO
lithp
it will take over one day
Not hating, since I haven't tried it yet, just the syntax gives me a headache
curly brackets good
Yup can do it in 1 line
embeddedServer(Netty, port = 8080) { routing { get("/") { call.respondText("Hello world") } } }.start()
clojure has type hints mm
i meant, an easy 5 lines
im never going to memorize that
hints?
wat
I see, it runs in Elaralang vm
good idea
yeah vim is good for clojure
(2 * chunk.level.sections.size) + chunk.level.sections.size + ceil(chunk.level.sections.sumBy { it.blockStates.size }.countOneBits() / 8.0f).toInt() my head hurts xD
everything*
IJ is also pretty good tho
im not sure id want to use vim for java
you remember how I said I was ๐ค this close to having chunks be read from files? I'm also ๐ค this fucking close to just scrapping this and giving up
man
this is fucking impossible
I have to calculate the size of all the data in bytes
Don't give up bardy
like wtf
I am, in fact, an Entity, Component, and a System
only functional languages
What're the slots for armor
oh wait I know where that's written down, in FJ!
nvm it's not, shit fucking plugin
ikr, the dude who made it is a fucking idiot
https://wiki.vg/Chunk_Format#Data_structure someone please help
I need to count the total bits of that
there are 16 chunk sections
the bits per block varies
this is just fucking pissing me off
WHY MOJANG
WHY
fucking data size IN BYTES WTF
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
why does this exist
well Notch can go FUCKING JUMP off a CLIFF
right, lemme think
so, 4096 indices pointing to state IDs in the palette
each index being bits per block in size
I know what it's time for
it's pen and paper time
Bitshift
IntelliJ with Cursive
Sometimes Nightcode
cursive is licensed tho
no its paid software
Not for personal use
ok bill gates
*non-commercial use
uh
why ain't you just using SFTP?
or SSH :)))
ftp ๐
anyone wanna help make CLJFTP?
FTP inferior
bruh xD
rsync only transfers differences, and works over SSH
Im having an issue with it trying to resolve the client side drive as a hostname xD
lol
It seems to work with me just specifying the file name
But I have no idea where the file is
not in the folder PuTTy was in
file for what?
what kind?
tls prob
tls better
Might be, lemme confirm
not gonna question that you're generating TLS certificates using your own untrusted CA
efe use vim, bigger ecosystem :)
so what you after then?
Its on the server
what are they for?
pog hello world in clojure done
i hope u had fun
i did
goooood
goooooooood
Anyone have any idea where the scp cmd saves the file to if we dont specify the absolute location xD
?
Im on windows ๐ฅฒ
Doesnt
It just said echod the exact same file name
show me the command you are using
why are you not specifying the destination though lol
I tried, but it seems to recognise the drive as the hostname since it has the :
scp <hostname>:/ect/ssl/ejabberd/domain.pem "C:\Users\vaish\OneDrive\Desktop\Internship\TCA\ServerCert\domain.pem"
oh
Wrong slash?
just have your working dir be ServerCert
oh wait
then you don't need the entire path lol
this man
๐
https://github.com/KryptonMC/Krypton/tree/feature/anvil jesus fucking christ this is big
and better yet, it doesn't work
xD
Today I show you how to fix a water damaged laptop. Accidentally spilled some liquid onto your laptop? Has it stopped working? Don't worry - I'll show you how to fix it with ease. To prove just how good this method is at fixing liquid damaged laptops I put my own laptop at risk - I fully submerged it in water and I was still able to fix it and r...
There's more milk in that than water if it's british
nice meal
lol
Follow up video: https://www.youtube.com/watch?v=RDFJyooifAA
My third edit of corona live charts countries race (with data as of 6th May and to future?). I might went bit overkill with this one please forgive me.
This video was released for you as combined celebration for V2 reaching 1million views, me reaching 1k subs and it being exactly one m...
lmfao
lmfao
idgaf
late
right, I'm trying to translate some Java code to Kotlin, but for some reason they're not producing the same result
Java code: ```java
public static int getVarIntSize(int value) {
for (int i = 1; i < 5; i++) {
if ((value & -1 << i * 7) != 0) continue;
return i;
}
return 5;
}
Kotlin code: ```kotlin
fun varIntSize(value: Int): Int {
for (i in 1 until 5) {
if ((value and -1 shl i * 7) != 0) continue
return i
}
return 5
}
Java code does what I want, Kotlin code outputs 5 every time
until 5 inclusive I pressume?
ffs
Precedence
I hate precedence
I figured it out lol
if ((value and (-1 shl i * 7)) != 0) continue this is the correct line
what is ffs
fucking precedence
google is too slow
Kotlin bad
you're slow
For fucking spaghetti
actually shut the fuck up
for fellow starlight
So I got a riven from the sortie, and it got stolen..
Ah
Conclave
is it through the thing on the right of the ship?
The problem was already fixed
no
fair enough
and in a way I am helping
but you saying Kotlin bad is not helpful
By encouraging you to use better languages
Obviously
fucking piece of shit actually shut the fuck up
I'm not in the mood for this
๐
lol
ffs just google it lmao
Facial feminization surgery?
:smh
for fucks sake
what google says
._.
i can't google
use something lightweight ๐
for example i3wm + Emacs
@abstract hearth isn't the syntax for embeds literally the same as normal discord.js?
it is, but cuts out alot of parts
man yes
?
No
what
fucking hell
jesus fucking christ that was a pain
and that barely works yet
but it works
what is that?
the chunk at 0, 0 from a world my friend gave me
the fact that the water isn't flowing?
cool
So I finally got to test my plugin and everything's a mess. 100+ lines of messages of what's going wrong. without the actual errors
show
also there might be more that will come after I fix since actually my player data isn't even saved
what the errors? or my bad messages explaining what's wrong?
Hey Admins and Mods!
You may have heard about a feature for bots currently in beta called Slash Commands! Essentially, the way users interact with bots is about to become much simpler - it's as easy as typing "/" to bring up all the commands that bot can do. Slash Commands come with features like autocomplete, validation, and error handling. No more typing up memorized commands, which means bots no longer need to read user messages!
We're excited for how this update will unlock more fun with bots, and since we know many of you are careful with where and how you manage bot permissions, we wanted to give you a special heads up on what this is and what small actions you can take today to prepare for the upcoming release.
What this means for you
- We are launching a new permission: "Use Slash Commands."
- Currently, if you've wanted to avoid bot spam in certain channels, you may have turned off read/send message permissions for bots.
- However, if those bots use Slash Commands in the future, you'll need to configure this new permission in order to keep your channels consistent with how they're set up today. Otherwise, Slash Commands may be able to get around your old permissions setups. Commands are sent directly to the bot and not through reading user messages.
- Go through your channels and decide where you do and do not want to allow Slash Commands to be used (yes #botspam, no #null).
You can see this permission option today on desktop, and on mobile in a few days.
Thanks for all your hard work!
P.S. Attached is a lil preview of Slash Commands in action. https://cdn.discordapp.com/attachments/667560445975986190/814205014125969478/commands.mov
I like the messages
Im not on pc rn
someone should join my test server ๐
yeah but yours is probably Spigot
wdym
this is Krypton
i thought it was minekraft
im on 1.8 client rn
1.16.5 lol
MultiMC?
nope
yeah you can't join Krypton on anything less than 754 (1.16.4) unfortunately
aw rip
just try it
how can you say you don't like it if you don't even know what it does?
just name all its features thats not in vanilla, and i might
because I've tried it before
and it confused me so i just switched back
- install forge/fabric with 1 click
- custom log4j configs
- many, many different profiles and different accounts with easy switching
- easy mod installation
shall I keep going?
yes
fuck you
lol
just get it
it's maintained by a Mojang employee iirc
yeah this guy https://github.com/peterix
multimc is great
who said it was bad

Dkim imma go ddos you
๐ฅ๏ธ โถ๏ธ Your IP
one thing I do love about dkim is that he says things are bad without even trying them or knowing what they do
like how is that proper grounds
Also known as a Dkim Moment
Someone's gotta make a dictionary of all Dkim Moments possible
the fact that you can make different changes on different branches all at the same time and merge them into one and it just kinda works
the entire purpose of git
man
lol
guys want to know the best thing about humans is?
torvalds is just like 'lemme create a protocol that makes a multi million dollar company'
they live?
'and a kernel that most people use'
s e
https://github.com/KryptonMC/Krypton/tree/feature/disconnect disconnect handling now pog
there's no issue number either
-_-
xD
Krypton isn't enterprise software lol
and I haven't ever used git like this before
ew, issue numbers in branch names?
why not just link the issue to the PR
gradle init
a branch isn't a pr though
true
@forest pecan also speaking of pr, need any to your media plugin?
Gradle
I always make a PR on a branch, even if I'm working on it still
lol
so I can track progress
also, I'm gonna create your favourite file when I get on tomorrow btw @frigid badge
I dont like maven
guess what it is
||Dockerfile||
its bi
Didnโt you alr fix gradle
yayy
g
correct
does it start with a D
i removed it cause intellij was freaking out
xD
maybe
and i fucked up somewhere
oeh
repo.bristermitten.me proxies all of them smh
Tell them to hate themselves if they use something like that
That's hideous
Well, would you just make another class
to store what info it is?
and the type of cpu architecture it is
cause i don't think there is any other way to store these links tbh
FreeBSD sucks
@prisma wave There is no generics way to check if a class is nested right?
class Parent {
class Child1
class Child2
}
// Something like, this won't work, but I wanted something like that
fun <reified T : Parent>
I guess a solution would be to have the children implement a common interface
Yeah they'd have to have an interface
Maybe a sealed class so you can get exhaustive matching
Let me try with sealed
Actually might be simpler to have an interface
Never seen this keyword before
How much i wanted this in Java
omg bm face reveal
Lol
Lol
sure sure
If it was me I'd choose a better picture
If you had one...
๐ญ
oh no
lol
Bruh it's literally not me
uh huh
it might be
I'll try and find the video it's from
there is no definitive proof for either side currently
that's an even better face reveal
That's what a "me" would say
๐
thats brister mitten!!
Can't convince anyone these days
biristermitten second channel reveal
mhm
Sometimes, I wished I was coding in Kotlin
but other times, I wish i was coding in java
but sometimes, I wish i was coding it Jotlin
I wish I was dead
Definitely not robot
gonna have to break the cycle here, my dad's name isn't andrew
damn
it's andre ||no it's not actually||
^
Sealed didn't work there BM, but i got a way for it to work
I miss Heavy ๐ฆ
Oh yeah you're right
๐ญ
Oh no
what do soldier's eyes look like
Big
That's disgusting
lol
I don't think you ever see them in the game
Shorts though
Hello
Hi
What the fuck lol
It uses maven
What the fuck
It literally copied all the classes over from JSONSimple into the library
Instead of using the built in Gson

wat why
Idk
Classic dkim
My pc sucks ๐ฆ
2 frames per hour
lol
Anyone want to help me develop a bungeecord server?
should i try making a simple anticheat without packets or anything? (just for fun)
or is it too complicated lol
Anticheat is a sea i'll never dive in, when you think you got a boat working you sink
o
can someone help me
legit the right answer from my VB question yesterday was to turn the While loop into an If by just returning on the first iteration
anyone?
with?
i own a server
and want to fix
io.netty.channel.abstractchannel$annotatedconnectexception
when people log on it says that
any fix for that
?
lmao
๐
I tried everything now
None of these solution seem to work
Stackoverflow has let me down
A main class of a plugin
https://ci.kryptonmc.org/job/Krypton/2/ player disconnection handling now a thing
kewl
also somehow found a use for draft PRs
love how that's 173k lines because the blocks registry file is 171k lines lol
@frigid badge is it just me or is Docker Desktop for Windows really annoying to setup lol
Thoughts on this style for an item deserializer
<key>:
material: STONE
amount: 5
display: "This is 5 Stone"
lore:
- "Some lore to accompany this item"
enchantments:
DURABILITY: 2
DAMAGE_ALL: 0
effects:
potion-color: RED
SPEED:
amplifier: 0
duration: 60
INVISIBILITY:
amplifier: 0
duration: 15
flags:
- "HIDE_UNBREAKABLE"
All being optional ofc (except material)
looks good to me
I kill you, you kill me, sounds good?
Sure
One day I sure do hope someone fixes this stupidity


