#dev-general

1 messages · Page 38 of 1

prisma wave
#

take my code and replace UUID with long & autoincrement or whatever lol

wind patio
#

lol

blissful sluice
#

that wasn't really the issue sigh

wind patio
#

whats the issue then

blissful sluice
#

the issue was trying to deal with the potentially 3 different SQL queries in a row on a player joining

#

the first to load them into cache, or determine they hadn't joined, and if they hadn't joined, do an insert and get the uid back, and use that uid to load the empty/default profile

prisma wave
#

upsert can turn that into two

blissful sluice
#

how

#

the best option I've come up with was an INSERT with a RETURNING, but considering how little i've seen that used i wonder if that's how that's meant to be used

prisma wave
#

insert if not exists
select

#

think that should cut it

blissful sluice
#

afaik the RETURNING is essentially that select statement

prisma wave
#

even better then

#

Though I wonder if most databases actually support that

blissful sluice
#

postgres, which is what i am currently planning to use, does

#

this might be a better option than trying to mangle your beautiful DB abstraction layer to work out how to use generatedKeys 😛

prisma wave
#

Well, it’s not super abstract

#

It’s really just a wrapper over the actual queries

blissful sluice
#

exactly

prisma wave
#

To not have to deal with CF’s and twrs

#

I mean it should be easy enough to adjust

#

But it depends what works best for you ig

blissful sluice
#

actually you're right, i forgot withConnection was a method

prisma wave
#

😋

blissful sluice
#

feels a bit wrong to use that when you've got runWithStatement there, but in this case i'd have to

#

i've actually genericised your thing out a little more- data source to a plain datasource (which means more than just hikari) and added an executor, at least for the initial queries

wind patio
blissful sluice
#

feels a bit excessive

wind patio
#

if not in cache, try load from db,
if not in db, generate the data, insert in db and put in cache

#

does that solve your issue

blissful sluice
#

i think i worked out the approach i'm gonna go with, but your approach wouldn't quite work cus of the whole primary key issue

wind patio
#

you mean you need the autogenerated id for the object instance?

blissful sluice
#

yea

wind patio
#

well if you're using postgres you could create a sequence for the pk and then use nextval('sequencename')

blissful sluice
#

generating the pk isn't the issue, it's that using a traditional format it'd take the 3 queries

#

but i think i can get that down to only two:

INSERT INTO test (c2, c3) VALUES (?, ?) RETURNING *;

If I'm understanding the RETURNING thing correctly, I can just run the insert as an executeQuery and the returning will act as a select on that inserted row

#

so the flow becomes:

load, if no entry then insert & load (in one query)

#

rather than:
load, if no entry then insert & return pk, then load

wind patio
#

my one suggestion is don't bother with microoptimisations

wraith timber
#

im trying to get vault to work with my plugin, it added the depend to maven, but at start it cant seem to find if vault is active

wind patio
blissful sluice
#

sure, but there's nothing wrong with doing things right

wind patio
#

the wrong is wasting time at this particular moment, when you could already implement it, work on other stuff and come back to it later on, unless you got plenty of it

#

in my job its called "technical debt" 🤓

blissful sluice
#

fair enough

prisma wave
#

I concur

blissful sluice
#

I find that, once I have the system I want in place, then the rest of development tends to go pretty smoothly

wind patio
#

cant tell you how many times I've found myself in the optimisation loop-hole

#

and when most of the times it lead to 'fuck it, ill come back to it later ™️'

blissful sluice
#

which in my cases turns into like 3 years worth of "fuck it i'll come back to it later ™️" and i've still basically not finished that other project

wind patio
#

it do be is like that sometimes

slate elk
#

Java is slow

#

Comparing to natives like c++

#

Huge difference in performance

drifting aspen
#

Not huge at all

#

Usually the main difference is the skill of the developers

#

Anyways, usually with a Bitcoin miner you would want to squeeze every bit, so that was the point I was trying to make.

potent nest
drifting aspen
#

Don't necropost tho

potent nest
#

there's far more to performance than "language A is slower than language B"

drifting aspen
slate elk
#

Necropost == ??

potent nest
#

languages also don't really specify details about performance, so it's up to whatever optimizes the code how fast it is executed

slate elk
#

At same code

potent nest
#

basically the only case where it makes sense to specify details about performance are hard real time systems, where you need strict timing guarantees, as everything else is a failure

slate elk
#

Like code isn’t 1 == 1 on assembly obviously

potent nest
#

also, some crafted benchmark is useless for a general statement

slate elk
#

Yeah Java is really different on how it manages it’s shit

#

It uses garbage collection

potent nest
#

but that only affects memory

slate elk
#

He bring is strings from memory

#

I prefer Java overall

prisma wave
slate elk
#

Manual memory management

potent nest
#

lol

slate elk
#

Both use memory

#

But Java has different storage method

drifting aspen
#

Does it really?

slate elk
#

I’m not renewing u anything

drifting aspen
#

It stores primitives on the stack and objects in the heap

#

I'm pretty sure that's no different from other languages

slate elk
#

Others r even slower

#

Take python

#

It’s dog shit

drifting aspen
#

???

#

Can you please write like 2 sentences with the same context?

slate elk
#

:/

potent nest
#

please stop saying "language A is slow"

#

that's far from the concept where performance comes from

prisma wave
#

Basically python but very fast

#

just better implementation

potent nest
#

I think GraalVM with Truffle/GraalPy can run python code faster than cpython too, at least in some scenarios

drifting aspen
#

Well tbh

#

Cython is a horrible implementation imo

#

At least as far as performance goes

drifting aspen
#

Primarily due to lack of JIT

potent nest
drifting aspen
#

Hmmm

#

Btw, if you use type hints in your python scripts, they will run quite a bit faster

#

Or that's at least my experience

cerulean ibex
#

how does that work? theyre just hints? they have no meaning except to static analysers

crude cloud
#

man this whole conversation is hilarious

static zealot
#

Emily, you are hilarious

crude cloud
#

thank you

solar cradle
#

Rust || Having no context is intentional ||

queen saffron
#

Good game

solar cradle
#

I’ve never actually played rust but I’ve messed with the language for a few hours

steel heart
#

Good language

slate elk
queen saffron
#

Edu?

slate elk
#

edu

queen saffron
#

Education?

slate elk
#

1

#

...

queen saffron
#

I'm incredibly confused

slate elk
#

yes

#

edu

#

how it is

queen saffron
#

My education is good?

slate elk
#

im asking you how is your edu goes

#

what u study now?

queen saffron
#

That's not entirely your business?

#

I'm a bit creeped out by you in all honesty.

agile galleon
#

Lmao tony

oblique heath
#

average tony falk convo

wind patio
#

real

jagged frigate
#

How about life? Spends? Bills? Locations?!

oblique heath
#

how is your mother's maiden name doing?

blissful sluice
#

i think the important question is whotf says "edu" like that outside of edu domains

slate elk
#

go to off-topic chat with ur bud nova

jagged frigate
slate elk
#

i didnt ask you

jagged frigate
#

I didn't answer your question

slate elk
#

🙏 💀

brittle lodge
#

Can you guys please fix cmi priority?? 🙏🙏🙏

#

I cant open warp or kit menu

#

Its okay on old version but on new its broken

#

And on old version I cant use nbt tags

slate elk
#

you should approach CMI dev

#

pretty sure its paid resource

brittle lodge
brittle lodge
#

It worked on version 1.13.6 and when I updated to 1.14.0 then it started doing this

static zealot
#

If the problem happens inside CMI, it is CMI

agile galleon
#

I understood that the issues were deluxemenus getting the priorities

obtuse gale
crude cloud
gloomy anchor
#

if I want to show something else that placeholder tells like %server_time_E% = Sun I want like if its Sun it will tell me Mon for example

ornate lodge
wind patio
#

idk

#

what's the issue

ornate lodge
#

same its the latest version for playerkits idk if its another plugin or not

humble prism
#

did u have a custom enchantment plugin, used it for a kit item, then removed it?

#

or had a custom enchantment you removed after

ornate lodge
#

but i think ik the issue now

distant sun
#

I need some help with this.
I have to make a desktop app with Java for my degree, and I have problems finding a good framework for UI >.< Design has never been my thing, and sadly there's not as many pre-made components for JavaFX as for React for example. I just need something that allows me to make a relative simple UI so I can focus more on the functionality of the app.

oblique heath
#

swing >:)

wind patio
#

thought's on BadBones plugins?

#

CrazyX

prisma wave
#

Yeah I have some thoughts on it

#

What about you?

static zealot
#

same

onyx loom
#

lol i logged into spigot earlier for the first time in ages and this is what i see, gotta love it

gloomy anchor
#

anyone know how this could be possible (automatic hologram to your oneblock to show information about it ?)

static zealot
humble prism
#

the exact one your looking at

slate elk
#

on intelliJ

#

from some reason

#

my keyboard did tton of enters

#

now i got like 9k lines empty

#

gap in my code

#

anyway to quickly sort the code

wind patio
#

CTRL ALT L iirc

slate elk
#

thanks alot!!!

#

for (DropItem dropItem : droptable.keySet()){
for (int i = 0;i < droptable.get(dropItem);i++) {
droptablelist.add(dropItem);
}
} it will replace or duplicate

#

??

#

lets say i try to put same object

#

lets say int a = 3

#

and i try to put a , twice into an array

#

(dont judge im just rusty not sure ^^)

wind patio
#

what the fuck is that

slate elk
#

it will dupe right?

wind patio
#

what is a = 3

#

there's no a in the code you gave

slate elk
#

true im asking a questiion about arraylists

#

sec ill writte quickly something

inner umbra
#

Lists will have duplicates

slate elk
#
int a = 0;

list.add(a)
list.add(a)
#

thanks

#

exactly what i wanted to hear ^^

wind patio
#

why wouldn't list have duplicates

slate elk
#

i wasnt sure =/

#

map doesnt have duplicates

#

a key is a key

wind patio
#

because it's a map

#

not a list

slate elk
#

i could do trial and error to find it out

#

but u know me and my 🪳 laptop

wind patio
#

it doesnt require a supercomputer to run a snippet of java code

potent nest
#

jshell 🚀

slate elk
#

my computer barely runs chrome and the ide

#

at same time

#

and discord

wind patio
#

that's your issue

#

chrome

slate elk
#

i might move to microsoft edge

#

its pretty dupe now adays

wind patio
#

duope*

#

it's a hit/miss for some people

slate elk
#

dope*

#

omg

wind patio
#

not everyone enjoys daddy microsoft

slate elk
#

i like chrome due the option to make own extensions

#

i heard that firefox is good

#

not sure if i should give it a try tho

wind patio
#

well, Google Chrome isn't the only browser that is build using chromium

#

so is edge, brave, opera

#

so your extesions will most likely work on either of those

slate elk
#

WHAT browser u use?

#

sorry for caps

wind patio
#

been using firefox, it's been pretty good, quite a while back reinstalled windows and stayed with edge

slate elk
#

gonna write a quick list shuffler please rate iit ^^ :3

inner umbra
slate elk
#

ew i dont use Random

#

it work like shit

wind patio
#

what

slate elk
#

fr i used it for my droptables and stuff

#

and drop rates arent real at all

wind patio
#

so what do you use

slate elk
#

i write rn a shuffler

#

some sort of chipper

#

with seed

#

(time)

#

random dont exist

#

nothing is random and java random might me upset

wind patio
#

Collections.shuffle() cursed_fingerguns

#

anyways, good luck reinventing the wheel

potent nest
#

I doubt you'll come up with a better RNG than the ones existing in the JDK

wind patio
#

wait and see

#

this man is a prodigy

#

BetterJavaRandom github repo when

slate elk
#

idk what time really based on

#

never checked on

slate elk
#

nothing is RNG

#

for users it will be RNG

#
            int s = droptablelist.size();
            int m = Date.from(Instant.now()).getSeconds();
            for (int i = s - 1; i > 0; i--) {
                int nextpos = ((m/8) +1) * ((i % 9) + 1);
                DropItem a = droptablelist.get(nextpos);
                DropItem z = droptablelist.get(0);
                droptablelist.set(0,a);
                droptablelist.set(nextpos,z);
            }
        }
#
    • the concept im aimming for
#

i think it look that some stuff here are not needed

#

but im braindead at the moment

#

i shuffle the list once

#

later i follow just a 1+ to get it out

#
    public DropItem getRandomDropItem() {
        if (droptable.isEmpty()) {
            return null;
        }
        if (droptablelist.isEmpty()){
            for (DropItem dropItem : droptable.keySet()){
                for (int i = 0;i < droptable.get(dropItem);i++) {
                    droptablelist.add(dropItem);
                }
            }
            int s = droptablelist.size();
            int m = Date.from(Instant.now()).getSeconds();
            for (int i = s - 1; i > 0; i--) {
                int nextpos = ((m/8) +1) * ((i % 9) + 1);
                DropItem a = droptablelist.get(nextpos);
                DropItem z = droptablelist.get(0);
                droptablelist.set(0,a);
                droptablelist.set(nextpos,z);
            }
        }
        return droptablelist.get(pos);
    }
#

before it i used random

#

what do you think about it?

potent nest
slate elk
#

Random number generator

#

its isnt really random

#

at all

#

but users will see it as something random

#

because they dont know they output everytime anyway

potent nest
slate elk
#

idk i wrote a code and i saw shit that should be rare

#

pretty often

#

not gonna say it was 0.50%

potent nest
#

but I assume you did a formal analysis of your "rng" and made sure it passes common rng tests 🙂

potent nest
slate elk
#

it was random but %%% felt like it hi same numbers many times

#

hit

#

so lets say from 0-100 it hit 80> maybe 40% out of 10 attempts

potent nest
#

you won't come up with something better than the rngs in java by yourself

slate elk
#

you can see that my code isnt actually random

#

bu know for sure that what should appear once in 100 times

#

will appear once

#

and 5 times

potent nest
#

no you don't

slate elk
#

its just a bus sort of

#

that goes stations

#

sec ill look for an online simple ide

#

to compile some code

#

to see outputs

#

eh ill just open new empty rpoject instead

potent nest
#

you assume that you call the method with a uniform distribution over seconds, while using a method that is deprecated since Java 1.1 that can even return 60 and 61, but you surely covered those cases

slate elk
#

yeah i spliit it by 8

#

to get in return something not higher then 10

potent nest
#

well that's already a flaw then

wind patio
#

blud reinventing the wheel

#

/ --
🔲==== 🔲

#

wroom wroom

crude cloud
#

bro thinking he can do better than the greatest minds of our generation

wind patio
#

but Random is not random enough!!!!

crude cloud
#

if you misuse it yeah

prisma wave
#

to* 🤓

inner umbra
#

The one time autocorrect fucks it up xD

rich sonnet
#

Hey, just a little dev question about the Login system for a cracked mc server.

Is it possible to make an Auth plugin for the server that is linked to the server website for better login security system?

And it would function as if whenever the player would try to login to the server ingame, the login would require the player to complete the login verification by:

  • Login to the server website
  • On website the player would go to his "Profie" > "Auth" > [Request Login Code]
  • Copy the 2fa code from email sent to the player's email address
  • paste the 2fa code ingame chat to get logged in

and the whole thing would function just by having the plugin installed ingame on the server, and having it linked to the server website.

Or does AuthMe already has this type of a function such as 2FA which cannot be bypassed by using any type of MC Cheat Client?

inner umbra
#

AuthMe does that but ingame. (Not the email and everything but setting a password to the profile)

slate elk
#

But Java random didn’t fit my system

#

So

inner umbra
#

I'm the same way tony. Don't worry about.

crude cloud
#

im sure it did

slate elk
#

wait ill try to proof of concept

ornate nimbus
#

I think we have Albert Zweistein here

#

Einstein left

drifting aspen
#

@slate elk I've got a tip for ya, if you want a true RNG, buy a lava lamp, point a camera to it and then compute the numbers from that

slate elk
#

alright now proof of concept

#
output
Top 1: 263 : 6
Top 2: 102 : 5
Top 3: 429 : 5
Top 4: 623 : 5
Top 5: 896 : 5
Top 6: 271 : 4
Top 7: 274 : 4
Top 8: 325 : 4
Top 9: 337 : 4
Top 10: 496 : 4
#
        HashMap<Integer,Integer> p = new HashMap<>();
        for(int i = 0;i <1000 ; i++){
            Random random = new Random();
            int randomn = random.nextInt(0,1000);
            if (p.containsKey(randomn)) {
                p.put(randomn, p.get(randomn) + 1);
            } else {
                p.put(randomn,  1);
            }
        }
        List<Map.Entry<Integer, Integer>> pe = new ArrayList<>(p.entrySet());
        Collections.sort(pe, (entry1, entry2) -> entry2.getValue().compareTo(entry1.getValue()));
        for (int i = 0; i < 10; i++) {
            Map.Entry<Integer, Integer> entry = pe.get(i);
            System.out.println("Top " + (i + 1) + ": " + entry.getKey() + " : " + entry.getValue());
        }
    }
#

the code i wrotee for that

#

now

#

clearly can say it missed ton of numbers

#

now let me improve it a bit

#

Top 1: 204 : 6
Top 2: 188 : 5
Top 3: 263 : 5
Top 4: 833 : 5
Top 5: 850 : 5
Top 6: 53 : 4
Top 7: 260 : 4
Top 8: 269 : 4
Top 9: 407 : 4
Top 10: 458 : 4
380missing shit

#

Top 1: 475 : 6
Top 2: 145 : 5
Top 3: 161 : 5
Top 4: 319 : 5
Top 5: 58 : 4
Top 6: 80 : 4
Top 7: 225 : 4
Top 8: 278 : 4
Top 9: 303 : 4
Top 10: 486 : 4
375missing shit

#

quick fix

#
package zx.tonyfalk;

import java.time.Instant;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        HashMap<Integer,Integer> p = new HashMap<>();
        Random random = new Random();
        for(int i = 0;i < 999 ; i++){
            int randomn = random.nextInt(0,1000);
            if (p.containsKey(randomn)) {
                p.put(randomn, p.get(randomn) + 1);
            } else {
                p.put(randomn,  1);
            }
        }
        List<Map.Entry<Integer, Integer>> pe = new ArrayList<>(p.entrySet());
        Collections.sort(pe, (entry1, entry2) -> entry2.getValue().compareTo(entry1.getValue()));
        for (int i = 0; i < 10; i++) {
            Map.Entry<Integer, Integer> entry = pe.get(i);
            System.out.println("Top " + (i + 1) + ": " + entry.getKey() + " : " + entry.getValue());
        }
        Set<Integer> existingKeys = p.keySet();
        int missingCount = 0;
        for (int i = 0; i < 999; i++) {
            if (!existingKeys.contains(i)) {
                missingCount++;
            }
        }
        System.out.println(missingCount + "missing shit");
    }
}
#

so in average i have around 350+ numbers missing

#

means more then 1/3

#

35%

#

is not good at all

#

random is random

#

should not miss so many so often

#

probably the reason why my old system didnt work as it should

crude cloud
#

you are misusing java Random really badly

slate elk
#

wdym

crude cloud
#

you've been told this a million times lmao

#

you are creating a new Random instance every time

#

do not do that

#

keep a field

slate elk
#

sec

#

changed

#

still same output

crude cloud
#

code

slate elk
#
    • same missing amount of numberrs
#

i just put iti above

#

so its not called via loop

#

now i proofed of my concept

crude cloud
#

where is the updated code lmao

slate elk
#

i changed the random location

#

i dont want overspam chat with same code

crude cloud
#

not like you already did

wind patio
slate elk
#

this is what you meant right?

#

so i stick to same random

#

all time

#

results are the same ngl

#

it wasnt a good proof of concept to you guys?

#

even on 4X from required amountt

#

i still have missing numbers

#

but some reach up to 20 times begin hittted

#

out of 1000 on 4000 attempts

#

33 missing

#

and top 1 was called 24 times

#

i dont need missing numbers i expect random to be able to hit all to give players some sort of droptable with chances too

#

so it will be 1/100 actually

#

and not to be 20/100 or 1/6000 in some scenarios

wind patio
#

I mean java Random is by no means perfect and has it downsides, but I doubt you will implement something more robust

crude cloud
#

statistically it's incredibly unlikely that if you generate 1000 numbers between 0 and 1000 they are all distinct and each one picked once

#

so, yes, it is bound that some numbers are gonna get picked more than others, but there is no bias

wind patio
#

iirc its a LCG, so it does have a couple issues, such as the famous "falling into planes"

crude cloud
#

thankfully the jdk provides other rng implementations!

wind patio
#

does it?

crude cloud
#

yes

slate elk
#

That’s the thing

wind patio
slate elk
#

Even 4000 attempts I had missing numbers

#

It’s random for users to get different loot

crude cloud
#

jdk 17 added a RandomGenerator interface and there are some algorithms provided in the jdk you can pick from

slate elk
#

I’m good with what I made

crude cloud
#

im sure you are

#

thankfully this is not going to run on my system

wind patio
slate elk
#

Why y’all make a joke out of it

#

I just proof the concept

wind patio
#

sure, square wheels are also POC

#

doesnt mean it rides well

slate elk
#

I didn’t write a random number generator

#

I just said it works like shit

drifting aspen
#

It might provide better results

wind patio
drifting aspen
#

Tony here can create a better solution than top engineers at sun/oracle

slate elk
distant sun
#

Why do you have access to send voice messages LOL

drifting aspen
#

What does he say tho? I'm on a train and can't listen to it

wind patio
#

goal is to loop through, ex. 1-100 numbers randomly? that is each number appears at least once?

drifting aspen
#

Voice messages are a stupid concept anyways

crude cloud
distant sun
crude cloud
#

cloudflare hasn't ever seen one number more than once

slate elk
distant sun
#

Stop sending voice messages lol

slate elk
distant sun
#

Dont use discord while driving L O L

slate elk
#

Ok I. One back soon

drifting aspen
#

I wish this person was a joke

slate elk
#

Ok I’ll come back when I get to my destination to get rid of those annoying voice messages

#

Just driving and texting is hard

drifting aspen
#

Tony is the reason I use public transport

wind patio
#

just make a Stack or someshit shuffle it and pop it one by one, when empty just refill and shuffle again (that is if you have the numbers already)

distant sun
wind patio
distant sun
#

Especially if the goal is to have all the numbers in a random order

slate elk
#

I’ll just use shuffle

#

My manual shuffler is dog shit ngoni

#

Ngl*

wind patio
#

Collections.shuffle() fingerguns

crude cloud
#

thanks gab

wind patio
#

for a collection

distant sun
#

To shuffle the stream - I've just googled and even more recent SO answers suggest to collect it to a list and use Collections#shuffle shrug

wind patio
potent nest
#

my man tony has never heard of the birthday problem

wind patio
#

stop reminding me of my Probability Theory and Statistics lectures 😩😩😩

pastel imp
#

I regret reading these messages

pastel imp
potent nest
#

yes

pastel imp
#

oh yeah, that's a weird paradox

#

which is right in the math

#

but in theory just makes no sense

wind patio
slate elk
crude cloud
#

the statistics of rng!

ornate nimbus
#

i love statistics

#

i think if me and statistics married, we would be a great couple

remote goblet
#

what is copilot cooking

crude cloud
#

trust the process

remote goblet
#

does anyone have any plugin on creating scoreboards Prayge i do not understand the API for it

remote goblet
#

okay i slightly understand the api better

#

no clue how to get rid of the [<number>] but thats for tomorrow

remote goblet
#

i got it

#

its a stupid fix but its a functional fix

oblique heath
#

i remember mineplex just using the actual scoreboard values to order it correctly

#

so instead of your own custom [#] just make the right ones go from 1-15 instead of all being 0

slate elk
#

what API do we even havee

#

beside teams

#

which is dog poopo

drifting aspen
#

Tony, not everyone uses dog poopo 1.8

drifting aspen
#

They'll probably be more lightweight and easier to use

inner umbra
#

So I've been looking in to stratum which is json being passed between miner and pool.
I've only found 2 message you need to send; subscribe and authorize (submit if the block is found).
However these pools track hashrate and other information yet I can't seem to find the needed information to relay these. Any ideas?

oblique heath
inner umbra
#

subscribe and authorize (submit if the block is found)

oblique heath
#

lol i thought submit in your message meant submit the 'subscribe' and 'authorize' messages to be sent

#

but looking at the site's description of it, i dont think submit is just for when a block is found

#

it is instead for a 'job' that the client is assigned by the pool

#

which i'm pretty sure (maybe?? idk pretty sure that's how it was when i mined for monero) is tailored to each client individually based on their estimated hash rate

inner umbra
#

Huh. I'll add that then see if it works.

oblique heath
#

that also brings the server's set_difficulty message into context

#

since it wouldnt make sense to need to set a difficulty for every client if all the client was doing was mining for an actual block, since the real difficulty for that should already be available to every mining node through the global network

inner umbra
#

I was getting the difficulty through the notify message after sending authroize

oblique heath
#

that probably sets the initial difficulty

#

but the pool needs to be able to adjust it since it doesn't know the hash rate for the new node ahead of time

inner umbra
#

Every new job it sends it

#

So if the nonce isn't found... Do I just submit the current nonce?

#

I'll just test around with it I guess. The issue is timing when to send it

oblique heath
#

good luck

#

hopefully you figure it out first try 😎

inner umbra
#

Lol I wish

#

I just hate not being able to test if it can solve properly lol

oblique heath
#

maybe you can cut off the first few blocks of the blockchain back when the difficulty was really low and test it on those

#

would take a lot of figuring out exactly how to cut it up though probably

inner umbra
#

Doesn't help me test if I'm properly hex'ing the merkle root

#

Since the coinbase is provided by the pool

oblique heath
#

ah i see

inner umbra
#

I can easly make a method that hashes with the data provided by block api's... But I can't test if I'm properly generating the next hash because of the data provided by pools.

#

For example IDK if I am suppose to hex the extranonce or just pad it. Same for nonce.
I've been hashing the strings from the merkle branch IDK if thats correct or not lol

oblique heath
#

could look at someone's implementation of it

inner umbra
#

No one does java and I've mimicked what I could find from python and c variants

oblique heath
#

surely you could still glean info from what they're doing though

inner umbra
#

I have. Thats how I've come this far xD

oblique heath
#

like for that python implementation, just run it and print the extranonce or whatever and see what they're doing to it

inner umbra
#

But IDK if these scripts are even properly doing it because when I use them the pool still doesn't provide me data when I do a lookup

#

The most notable one is cpuminer-multi and even when running that one for days the pool still doesn't have any data when I lookup the wallet

oblique heath
#

i mean it could just be because it's a cpu miner

#

as sad as that sounds

inner umbra
#

Its displayed others with lower hashrates

oblique heath
#

curious

#

another thing you could do is download a known working software and sniff the packets

inner umbra
#

Yeah will probs test out nicehash.
Tried looking into xmrig but thats for monero only.

distant sun
#

What was the link to the website of some paper guy that had (bstats) statistics for paper?

crude cloud
distant sun
#

Ye, thanks

slate elk
inner umbra
#

That was the goal

#

I keep rewriting it though xD

wind patio
#

Spoogot

#

why are there negative servers using spoogot

potent nest
#

because it's so bad

#

I have around -5 spoogot servers running

#

and discord is having issues again for me

crude cloud
#

for everyone

#

"Elevated API Latency and Errors" is a daily occurrence at this point

#

good service

ornate nimbus
#

anyone else running negative servers here

inner umbra
#

Time for another alternative to discord lol

#

I feel like they just have a word generater for one of the splash messages...
"Discord was gonna be called campfire before it was called discord."
"Discord was gonna be called wyvern before it was called discord."

ornate nimbus
#

From what I know

inner umbra
#

I know but the same splash message with 1 word changed...

slate elk
#

as an payment from users

#

high cpu usage when its on low

#

low usage when itts on high

#

🐮

tight iris
#

Hi, I'm looking for a developer who could fix a plugin for the server. Plugin is made for 'skins' per item and armor. Knowledge should be related to custom-model-data. The issue is that custom armor texture doesn't show up when it's equipped, however it shows up in your inventory ( but doesn't show in armor slots). Skins work with itemsadder. The work will be paid, of course. lmk if someone is interested in dms

wind patio
slate elk
#

we should lock that chat

#

for actual devs

#

we legit need like a special rank when user is recoginzed as devoloper in devolopment support chat

#

to get accses hee

#

here

crude cloud
half harness
#

They closed it though

#

There is also like server owner and artist

ornate nimbus
#

is this elitism

#

i cant even send images 😭

ocean quartz
#

Yes gigachad

crude cloud
#

I can!

#

chonkers

distant sun
#

Big cats

slate elk
slate elk
#

this chat has impostors and beggers

#

i dont know why someone would be impostor

#

really no reason

drifting aspen
half harness
#

i just said that it already exist/existed

#

if you look at my roles :))

ornate nimbus
#

i wonder what rank i was here before stuff happened

slate elk
#

but now when i think about it i want to say we have different levels

#

now i would be a dev-I for example and u III

#

i just hate those impostors so much

#

its like ferari owner would hangout in the lamborghini club

crude cloud
#

there's an IMPOSTOR AMOGUS

prisma wave
#

"i hate those imposters" me too man ive lost way too many games

slate elk
prisma wave
#

i dont understand what you're saying

wind patio
#

lol

drifting aspen
wind patio
#

birstern misteren susssy baka???

prisma wave
steel heart
slate elk
#

No he is not the impostor

steel heart
#

You sure?

slate elk
#

yeah

#

Conclube impostors are those who r coming here

#

and pretend to be people who have any knoweldge at programmning

steel heart
#

Modi I saw you!

wind patio
steel heart
#

Lmao

#

If I’m not an impostor, then by all means you must be

wind patio
steel heart
#

Just realized

#

You don’t have @Developer role

wind patio
#

yes... im not worthy... 😩😩

ornate nimbus
#

Omg hi bestie

#

@steel heart

wind patio
# wind patio yes... im not worthy... 😩😩

Almost 70 repositories on Github, knowledge of various technologies and programming languages ranging from fundamentals to advanced, over 1.5m lines of code changed, have a full time Java developer job, but I don't have @Developer role on HC, what is it all for then...

oblique heath
#

you'll get there someday 😔🙏

inner umbra
#

If he didn't pay you, hes within his right to do so. You could also just sell it since he didn't pay for it.

#

/report to @compact perch if you still want to report.

#

You can report if you'd like but like I said in that scenario he's in his rights to do so.
If he didn't pay you first, you can sell/offer it else where.

prisma wave
#

* unless you had an actual contract

inner umbra
#

Only said "discussed" so... "in that scenario"

wind patio
#

sign a legally binding contract

#

yes

pastel imp
#

you can in theory represent yourself

wind patio
#

there is literally nothing else you can do

#

both parties are not legally inclined to do their part in this scenario

pastel imp
#

it's one of the servers I work for yes

wind patio
#

if one pays before it's finished, other one can technically run away with the money. if you start working on the project, the other person is not forced to pay the money to you, even if you finished it.

#

the result is one calls the other one a scammer, that's where it all ends lol

pastel imp
#

depends on your definition but years, idk

#

don't have a that fixed amount

#

I charge 18-22 per hour usually

#

sometimes I get paid more per hour when it's big servers

#

for a single commission

#

yeah that's quite average for his experience lol

#

but in minecraft you will never reach that amount lol

inner umbra
#

A percentage upfront. Usually people do 50%

pastel imp
#

hmm not necessarily

#

it's just minecraft devs are undervalued

#

aka underpaid

#

yesish

#

in some way yes but mostly people think it's not worth much because it's coding for a block game

#

so people think it's easy

#

some others also think java is as easy as skript lol

#

so they pay less

#

the market is overall saturated

#

devs also lower overall prices cause several devs accept really small prices

#

so people think "well this dev accept 5 per hour, the others should too"

#

I would say yes

#

yes maybe

#

I work per hours and are most of the time tracked

#

if I set a fixed price I usually estimate the time then get the total price and multiply it by 30%

oblique heath
#

i think another big factor that leads to devs not being paid well is that a large portion of people who look for commissions are like 14 and have next to no money to spend

pastel imp
#

but that's only if the client WANTS a fixed price

pastel imp
#

why would I use vim besides when doing stuff in linux

#

xd

#

I mean, you can learn it, I suppose

#

that's highly unneeded tbh

#

for configurations just use notepad++

#

fr?

#

sad

#

yeah it can be

#

if you have the patience for it

#

I had to learn it but never used it again

#

I am on windows so

#

simply not my style

#

lacks support for a few stuff and windows 11 is really good for productivity

#

I have tried everything and still prefer the simplicity of windows tbh

#

I do have a Linux pc at home though

#

use it sometimes but not often

#

as said, support for a few stuff is lacking

wind patio
#

support for what

pastel imp
#

several programs I use don't support linux

#

idk what you did but I don't find it bloated at all

#

if you properly configure it

#

I don't like the Linux alternatives xd

oblique heath
#

i think learning vim is fine, you only need to know a select few keybinds to use it as an editor

#

and you'll gradually pick more up over time

pastel imp
#

I use it daily so yes

#

why why? I use my stuff across devices

#

why would I not use onedrive

#

all my devices are connected

#

something windows supports for ex. too

#

helps with productivity a lot

#

in my case

oblique heath
#

you mean you don't send files to yourself using discord

pastel imp
#

no

#

lol

#

I can legit copy a text in my phone and paste it on windows

#

it's sooooo nice

#

legit the one feature I probably use the most ngl

#

ew apple fanboy

#

you should speak with Charlie, he is the HC apple fanboy

#

lol

oblique heath
#

gaming laptops are a pet peeve of mine

pastel imp
#

you do you

wintry plinth
half harness
pastel imp
#

for the price of a MacBook you get a pc that is at least 3x more powerful lol

pastel imp
pastel imp
wintry plinth
wintry plinth
pastel imp
#

besides compatability with macos is even lower than Linux at this point

crude cloud
pastel imp
potent nest
pastel imp
#

but why not play games AND work

crude cloud
#

windows is horrible for development imo

pastel imp
wind patio
oblique heath
#

if you're in high school it's probably prudent to get a macbook or other long lasting laptop/ultrabook in preparation for uni

pastel imp
#

tbh all my clients I got mainly from word of mouth xd

wintry plinth
crude cloud
pastel imp
wintry plinth
pastel imp
wintry plinth
#

I’m waiting for Apple to deliver mine 😭 says 14th Nov delivery date

pastel imp
#

I might get a MacBook for uni later on, the thing is, I would not use it after uni probably lol

#

cause I am not a fan of apple

wintry plinth
#

I think a MacBook is genuinely one of the best laptops for dev work, I’ve had windows machines and hated it for dev. They’re great for gaming and that’s it

oblique heath
#

in my experience battery life is the #1 most important factor in a laptop while at uni

pastel imp
#

apple sells status, not products.

wintry plinth
#

Not true lately

pastel imp
wintry plinth
#

I would agree that prior to Apple Silicon, the Intel chips were absolutely terrible and you was overpaying for a name

#

But since Apple Silicon, I think the amount of power you get in laptops that are a lot more affordable now

pastel imp
#

but all the other products... just status

#

nowadays if someone has a Samsung, they get looked at as poor or smt

#

lmao

oblique heath
#

if you wanted you could also opt for a desktop PC like you wanted but set aside $100-$200 for a cheapish chromebook

pastel imp
#

while my phone has a better camera than iPhone 15 specs wise and costed me 1/3 of the price xd

#

iPhone 15 photos would only win cause of the BIG amount of filters and AI they use

#

and me gonna study for physics lol

oblique heath
#

💀

steel heart
ornate nimbus
steel heart
ornate nimbus
#

Jack of all trades master of none

steel heart
#

Ah I see, and you’re like 15 years old or what age now again?

#

swaguwu 🥲

steel heart
#

Clooose enough

ornate nimbus
#

How young are you

steel heart
#

haha really asked how young I am

#

19

ornate nimbus
#

So youngn

steel heart
ornate nimbus
#

What do you do nowadays

steel heart
#

I go CS/uni, i play valorant, i touch grass and ugh, play chess?

ornate nimbus
#

Based

steel heart
ornate nimbus
#

I'm gonna be studying next year

steel heart
#

Law?

#

Or what u gonna study?

ornate nimbus
#

Law yeah

steel heart
#

Niceee

#

wait is that the same account?

#

Or a new one just :()

ornate nimbus
#

No it's a new one

remote goblet
#

basically a rotting corpse

wind patio
#

19 rotting corpse?? what am i at 23

steel heart
#

ori you be like 5 years or sth old coding mc plugins?

wind patio
#

ori is like 12

#

he's been in minecraft business since 7 y/o

#

hustler

remote goblet
#

i might also be 19

wind patio
#

shh

#

12

steel heart
#

lol yeah smh

#

Age copium

remote goblet
#

you're old

steel heart
#

you’re young

remote goblet
#

thank u

steel heart
#

you welcome fingerguns

wind patio
#

you're old

#

time is running my man

#

it's all gonna be over before too soon

steel heart
#

aren’t you like boomer old then?

wind patio
steel heart
#

😅

#

dw you’re fine, walking dust does have its values there

remote goblet
#

dust us good !! it helps that uh

#

dust bunny from the sims 4

ornate nimbus
#

Benito !!

long dagger
#

progress

pastel imp
#

why is php/laravel syntax so weird

#

xd

#

I am too used to java

wind patio
#

because php is sassy

sly sonnet
#

How is it weird?

wind patio
#

probably the
$ and -> and . (echo $str . $str2; instead of blah(str + str2))

agile galleon
#

Yeah it's a tad weird but you'll get used to it

wintry plinth
#

They use $ because of the money it makes

wind patio
#

real

#

based

wintry plinth
snow oriole
#
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static net.md_5.bungee.api.ChatColor.*;

public class ColorHandle {

    private static final Pattern hexPattern = Pattern.compile("&#[a-fA-F0-9]{6}");

    private static final Pattern gradientPattern = Pattern.compile("&(#[a-fA-F0-9]{6})-(#[a-fA-F0-9]{6})((?:&[olmnkOLMNK])+)?(.+?)(?=(&#|&[a-fA-F0-9k-orxK-ORXRX]|$))");

    public static String translate(String input) {

        Matcher gradientMatch = gradientPattern.matcher(input);
        while (gradientMatch.find()) {
            String hex1 = gradientMatch.group(1);
            String hex2 = gradientMatch.group(2);
            String textStyle = gradientMatch.group(3);
            String gradientText = gradientMatch.group(4);

            String translatedGradient = gradientTranslate(gradientText, hex1, hex2, textStyle);
            input = input.replace(gradientMatch.group(), translatedGradient);
        }

        Matcher hexMatch = hexPattern.matcher(input);
        while (hexMatch.find()) {
            String color = input.substring(hexMatch.start() + 1, hexMatch.end());
            input = input.replace("&" + color, of(color) + input);
        }
        return input.replace("&", "\u00a7");
    }

    private static String gradientTranslate(String input, String hex1, String hex2, String style) {
        int r1 = Integer.parseInt(hex1.substring(1, 3), 16);
        int g1 = Integer.parseInt(hex1.substring(3, 5), 16);
        int b1 = Integer.parseInt(hex1.substring(5, 7), 16);

        int r2 = Integer.parseInt(hex2.substring(1, 3), 16);
        int g2 = Integer.parseInt(hex2.substring(3, 5), 16);
        int b2 = Integer.parseInt(hex2.substring(5, 7), 16);

        StringBuilder gradientString = new StringBuilder();
        int length = input.length();

        for (int i = 0; i < length; i++) {
            float t = (float) i / (length - 1);

            int r = Math.round(r1 + (r2 - r1) * t);
            int g = Math.round(g1 + (g2 - g1) * t);
            int b = Math.round(b1 + (b2 - b1) * t);

            String hexColor = String.format("#%02x%02x%02x", r, g, b);

            if (style != null){
                gradientString.append(hexColor).append(style).append(input.charAt(i));
            } else {
                gradientString.append(hexColor).append(input.charAt(i));
            }
        }
        return gradientString.toString();
    }
}
#

this is what happened when i try

String hexColor = String.format("&#%02x%02x%02x", r, g, b);
potent nest
#

have you considered just using MiniMessage?

snow oriole
#

all the message

potent nest
#

you can, and it would make your life easier most likely

snow oriole
#

i just dont want to use minimessage format

distant sun
#

Yeah because &#A75DC8&lHey &#B751CF&lThere is very easy to read kek

snow oriole
distant sun
#

use MM

cinder flare
crude cloud
#

the $ is certainly interesting

#

if everything has a $, why does anything have a $

cinder flare
#

idk like it's kind of cute

#

some deep part of me kind of likes having a dedicated symbol for variables yk

#

cause then you always know at a glance what's a variable

prisma wave
#

what else could it be?

ornate nimbus
snow oriole
slate elk
#

also im glad u want to work on an alternative for minimessage

#

or what spigot api offers u

#

give me a min ill take a look at ur stacktrace

snow oriole
warm quartz
#

why do you need an alternative though lol

slate elk
#

A1 many limits

#

from spigot obv

warm quartz
#

yeah but I meant like using MM would’ve saved a long time

slate elk
#

idk what is Minimessage i never went to newer versions

warm quartz
#

it’s really simple

slate elk
#

i guess its a color translator

#

and message handler or something

snow oriole
slate elk
#

that u send to users

warm quartz
#

For example

#

And you can add as many colors

snow oriole
slate elk
#

^

#

good reason

snow oriole
#

that why i dont use MM

warm quartz
#

your choice ultimately

slate elk
#

he saves alot of time and suffering

warm quartz
#

however it’s more user friendly too anyway

slate elk
#

from that ugly api

warm quartz
#

it’s not though…

slate elk
#

i dont think its tough

#

but imagine having to writte that shit into code everything

#

when u can make nice method

#

and pull it ove

warm quartz
#

you know that gradient messages are basically unreadable if you use the old format right?

snow oriole
#

now ill find the way to handle more than 2 hex

slate elk
warm quartz
slate elk
#

how does it work exactly short explanation

warm quartz
#

so it’s not really bad lol

snow oriole
slate elk
#

how does hex color ur text

#

how u color a sentence lets say hello world one

snow oriole
#

hex &#rrggbb
gradient &#rrggbb-#rrggbb

slate elk
#

its to color single char?

#

or >>> any after till new color

#

game auto translates it too?

snow oriole
#
&8[&#084cfb-#adf3fd&lFlyPlugin&8]&r
slate elk
#

use stringbuilder

snow oriole
slate elk
#

and make ur own color codes

#

and bring those from the color handler

#

and a custom placeholder for any color input

snow oriole
slate elk
#

hex colors seem to be not easy to remember lol

#

"#084cfb-#adf3fd" 💀

potent nest
#

imagine hurting your users like that just because you don't want to use MM

snow oriole
silver parcel
#

help please guys

#

@prisma wave @ocean quartz

prisma wave
#

please dont do that

oblique heath
#

yeah @ everyone exists for a reason smh

slate elk
#

yes

jagged frigate
#

I have urge to ping all staff sometimes.

oblique heath
#

they are thankful for your sacrifice

plush mulch
#

hello!!

#

im using guilds plugin

#

and getting an error

#

oh, moving to support chat

slate elk
#

good morning

#

i got some weird as problem

#

why can some shit not pass

#

like via constractu

#

i have houndrerd of those

#

and those dont pass

#

on some classes

#

and they are very similla

potent nest
#

what

wind patio
#

real

slate elk
#

ill do some debugging dunno why it doesnt work

#

ill check all the parameters of that dogass carrot

#

dont judge my caps please i know its java

#

and not C#

wind patio
#

what am i looking at

#

my eyes (original msg deleted)

potent nest
#

wtf

slate elk
#

haha lol

#

Modi i like u

#

u r hmm amazing yeah

#

;3

slate elk
#

the thing is

#

i have like 600 items passed like that

#

now that carrot

#

dont work

#

null null null

#

constractur is the same

#

via all

wind patio
#

magic carrot

slate elk
#

yeah

#

we gonna debug and find out why this mf make trouble

slate elk
#

its all the editables gonna make trouble

#

but apple and bread work

#

and the banana

#

now everything afterwards carrot makes trouble

#

but look they are same as banana apple and bread in the stracture

wind patio
#

what the fuck is a banana

#

bro got the premium minecraft

slate elk
#

hold my bee

#

r

#

mr kitty

#

the best thinig

#

u gonna see in ur life

#

is this

#

i bet u have ever seen something that deeply meanful

#

art

#

i wish i knew the genius behind it

slate elk
#

yo Modii what r u doing

#

rn

wind patio
#

working

slate elk
#

o n

#

or like a job

wind patio
#

fulltime job

slate elk
#

im at work too

#

but my job isnt fulltime anymoe

wind patio
#

im not at work

#

im home

#

working

slate elk
#

eh i got my own office

#

🐮

#

so i go to work everyday

#

but i think they want me to quit

#

they cut my working hours

#

from 7/12

#

to 6/5

#

5 hous 6 days a week

#

instead of 7 days a week 12 hous

#

was so good everyday 12 hours

potent nest
#

what the heck is 7 days a week 12 hours

#

do you have like 10 day weeks and 36 hours a day?

slate elk
#

i have 7 days a week

#

and i work 12 hous everyday

#

used to

#

not anymore

wind patio
#

yes a week is 7 days

slate elk
#

now only 5 hours 6 days a week

#

SirYwell peasent its called slavery

#

im not from wealthy family so typically im a slave for long term

#

okay

#

it doesnt make any sense

#

let me check what bread that passes test prints

potent nest
#

where are you from?

slate elk
#

i never told u guys

#

howww u r like my best friends

#

fr fr fr

#

Asia

#

🐰

potent nest
#

I mean, I hope for you that you can get into a better situation at some point

slate elk
#

yeah i guess

#

like i wish i wasnt homeless

#

i dont own a house

#

i rent one

#

a small apt

#

its in constraction too