#dev-general

1 messages ยท Page 271 of 1

half harness
#

because im told to

#

i cant force them to change their server version

#

-_-

hot hull
#

You can

#

Sheesh just persistency and some menus left and we finito

half harness
#

;-;

brazen cairn
#

hello

#

@quick flume umm can i ask you a question??

#

help

quick flume
#

?help

compact perchBOT
#
FAQ Answer:
ยป Give the helpers some details
ยป Ask suitable questions
ยป Be polite
ยป Wait

Source

quick flume
#

if it's a development question I suggest #development as you'll get better/more support

#

@brazen cairn

lunar cypress
#

and what's so special about that

stuck harbor
#

its open

#

and a java development kit

lunar cypress
#

damn

stuck harbor
#

i'll run you async in a minute java

hot hull
#

hmm, would it make sense to run a notification event (player join) as monitor?

hot hull
#

How would you make this lambda a method reference? I'm confused

value -> value != null

#

@prisma wave ๐Ÿ‘€

prisma wave
#

Objects::nonNull iirc

hot hull
#

ahh

#

Thanks

forest pecan
#

bruh

#

i have a referral link for the foo thingy

#

idk who to give tho

#

lol imagine if you sold them

#

xD

prisma wave
#

lol

forest pecan
#

"1000 bucks for free google interview"

#

well

#

almost free

hot hull
#

What's the command for tree again

forest pecan
#

wat

#

like in linux?

hot hull
#

nein

#

Ah it's just tree, IJ being gae tho

forest pecan
#

Lol

old wyvern
#

What tree?

steel heart
#

rip Bimultimap doesnt exist seems like

lunar cypress
#

why would it

#

doesn't make much sense

#

do you want a many-to-many relation or what

winter iron
#

yoooooooo

#

if i had to update armor stands every tick

#

say like 100 of them

#

would it hit performance hard?

#

just updating locations

distant sun
#

alright so if anybody knows cpp, how and I supposed to concatenate a string with int when the function return type is *char? xD

old wyvern
#

Get address of the 0th index character?

#

@distant sun

distant sun
#

string test = "aaa"; return &test[0]; ?

old wyvern
#

yes

distant sun
#

hmm

#

terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator< char> >' any idea why I get this?

frigid badge
#

ew using namespace std?

ocean quartz
#

Ah the lovely c++ syntax

frigid badge
#

bad practice my boy

distant sun
#

is an error stfu

frigid badge
#

not talking about the error lol

distant sun
#

๐Ÿ–•

frigid badge
#

what are you even trying to do

distant sun
#

ignore that Oliver

#

I was using throw "string here";

old wyvern
#

hmm๐Ÿ‘€

obtuse gale
#

You use exceptions in cpp?

ocean quartz
#

@frigid badge What would you say is better, Thymeleaf, Freemarker, or something else?

obtuse gale
frigid badge
#

@ocean quartz I dislike template engines so none

#

they get so ugly so quickly

distant sun
#

I have to Oliver

ocean quartz
#

Oof, how would you do a backend + frontend mix?

frigid badge
#

if you want server side rendering that badly might as well use nuxt

#

@ocean quartz wdym?

ocean quartz
#

Basically trying to learn a bit more about that stuff, so to learn was thinking about making a dashboard like website with a ktor backend, just didn't know what to do for the frontend portion of it

frigid badge
#

My go to thing is to just have a REST API backend

#

which I mostly make resource based so it's incredibly easily setup and requires almost no code.

#

and then a frontend being something like vue

#

or I guess angular

#

whatever you prefer really.

ocean quartz
#

Hmm okok ty going to try that, I've used vue before a bit, was thinking about learning React for this since it seems to be getting popular

frigid badge
#

react has always been more popular than vue

#

and it seems that vue is actually going to become more popular than react

#

but they're not really different from each other

#

other than that in vue you write your templates by default in html (optionally in jsx) and in react it's always jsx

quiet depot
#

i thought vue was just a frontend library

#

does it have utils for rest apis and shit?

frigid badge
#

no

#

vue is frontend

ocean quartz
#

Alright, might go for Vue then, now to learn how to do this stuff, it'll be fun

frigid badge
#

well technically it's still powered by a backend but it's supposed to be the frontend yes

tranquil crane
#

they just set the block light level to 15 for the squid

#

:L

static zealot
#

o

ocean quartz
#

Oh boy

tranquil crane
#

the particles it uses are pretty at least

#

will have a gif of that in a bit once I get the new particle ids

static zealot
#

oh wait did they launch a new snapshot"?

tranquil crane
#

yeah came out this morning

static zealot
#

oh and xisumavoid just posted a vid.

#

like 30 minutes ago. what a timing.

tranquil crane
#

is he as disappointed as I am

half harness
#

who is xisumavoid

tranquil crane
#

I always had low expectations for the glow squid but this is ridiculous

half harness
#

and why r u disappointed

#

im confused

tranquil crane
#

The glow squid is stupid

static zealot
#

yeah

half harness
#

o

static zealot
#

illager

#

or whatever it was called

#

would've been cool

#

because apparently it was suppose to add a new attack or something

tranquil crane
#

The chillager is what I like calling it but that wasn't the actual name

half harness
#

whys it stupid?

static zealot
tranquil crane
#

It doesn't glow

half harness
#

wHaT

#

then whats it do?

tranquil crane
#

It just looks a little bright

#

it doesn't emit light

half harness
#

๐Ÿ˜

static zealot
#

yeah chillager. forgot it. that's what I used to call it to

tranquil crane
#

it does nothing useful yet other than drop glowing ink sacs which you can apply to signs to make the text what I assume is 20% brighter

half harness
#

u should get into mojang

#

and code for them

#

xD

tranquil crane
#

and you can make item frames with a different texture oooOoOoOOoo /s

static zealot
#

oh no new caves yet.

#

glow lichen. what the hell is that

tranquil crane
#

glowing moss

static zealot
#

oh right. because the squids pissed on it.

tranquil crane
half harness
#

lol

old wyvern
#

That isnt glowing

half harness
#

that too

tranquil crane
#

it emits a light level of only 7

half harness
#

THATS not GLOWinG

tranquil crane
#

unlike the glow squid

#

which emits a light level of exactly 0

old wyvern
#

Damn

#

Very useful

winter iron
#

How can i make an armorstand perfectly ontop of a player no matter where they move n stuff

#

like i dont want it trailing

tranquil crane
#

Set it to the player's passenger

winter iron
#

can passengers have location offsets too?

#

or nah

#

say i want it like half a block lower

tranquil crane
#

not really, you can make the armor stand small or large but that's about all the offset you'll get

static zealot
#

you can use small slimes

#

those are the best

#

I think

tranquil crane
#

that's a good idea actually

static zealot
#

for player names or whatever

#

not my idea. I'm to dumb for that. someone else recommended a while ago xD

hazy widget
#

Is it possible to make it so when someone types /anvil it brings up a anvil

ocean quartz
#

The damn squid doesn't even glow wtf

static zealot
#

well that was known since before

#

like they literally said that

tranquil crane
#

did you see the code snippet I sent of how they make it brighter?

static zealot
#

but a lot of people were stupid

#

also it doesn't even have an animated texture

#

the particles are nice tho.

#

I guess

hot hull
#

This new update is so fucking retarded

toxic elm
#

there a way to just stop portal sounds server side

ocean quartz
#

Yeah i saw, but i was expecting it to at least glow a tad lmao

toxic elm
#

probably

static zealot
#

they said it won't matt. before the vote even started

static zealot
#

but a lot of people said it will and a lot of people believed them

ocean quartz
#

People should have voted for something different smh

hot hull
#

What's the squid called

ocean quartz
#

Squid

#

But glow

static zealot
#

glowing squid

#

or whatever

hot hull
#

How is it a glowing squid if it doesn't glow

ocean quartz
#

It just has a brighter texture

static zealot
#

yeah

hot hull
#

Fucking dumb

static zealot
#

read the code

#

above that Nicole sent

hot hull
#

Link

hot hull
#

Someone go tweet to stop being dumb

obtuse gale
#

So it just changes the block light level?

static zealot
#

ye

obtuse gale
#

dynamic lighting mmlul

static zealot
#

xD

#

ye let me just summon 1000 thousands invisible squids around me

#

and hold a torch in hand

#

and say I have dynamic light

obtuse gale
#

Exactly

#

You think I'm not gonna?

ocean quartz
#

It doesn't even work if you did that

#

It doesn't light up around the squid

#

Only the squid

obtuse gale
#

.....

#

W

#

Th

obtuse gale
#

That's erm..

static zealot
#

nice

#

the particles are not bad

#

imo

obtuse gale
#

Well the particles are pretty

tranquil crane
#

That particle isn't bad

#

wait until I show you the other one

#

It looks like the panda sneeze but worse

obtuse gale
#

I'd mix them with end rod particles

obtuse gale
#

I have always found them mesmerizing

#

Yuck

tranquil crane
#

end rod kind of overpowers it in that scenario

obtuse gale
#

Oooh

#

I love it

ocean quartz
obtuse gale
#

LMAO

tranquil crane
#

mojang changed the data packet format for the dust transition particles again ffs

ocean quartz
#

Kek

winter iron
#

How can i do armor stand on player without using passengers because i want the location of the armor stand to be exactly the player

tranquil crane
#

I should mod the game to make the glow squid emit light but it's hard to set up a modding environment for snapshots

winter iron
#

๐Ÿ˜ฆ

tranquil crane
#

hard aka basically impossible

ocean quartz
#

Mojang will be like: "It will emit light when using the RTX!"

tranquil crane
#

never adds rtx support to java edition

winter iron
#

or can i move player passengers down

hot hull
#

Mojang can go suck a dck

ocean quartz
static zealot
#

or what Matt said

winter iron
#

it like trails tho

#

i tried with a task

#

every tick

tranquil crane
#

machine learning to predict where the player is going to go owo

#

jk please don't do that it's a terrible idea

winter iron
#

xd

ocean quartz
#

Please do that i wanna see it

winter iron
#

no chance

tranquil crane
#

the 1.17 snapshots have already added 10 new particles

#

I know nobody asked but I love particles so there's a fun fact for you

obtuse gale
#

I love particles

#

Show

#

Pls

tranquil crane
#

that's my favorite one added so far, dust color transition

#

fades from a starting to an end color

obtuse gale
#

โค๏ธ

#

I like to mix the end rod particles with some subtle redstone dust ones + maybe the ones from the totem of undying

tranquil crane
obtuse gale
#

Or the purple ones from witches

#

Or green ones from villagers

tranquil crane
#

kind of hard to see some of the ones in the middle but they're nearly identical anyway

obtuse gale
#

I like sparkling things lol

tranquil crane
#

look at the vibration particles in that gif tho

obtuse gale
#

That's so odd

#

Makes me grhrcurh

tranquil crane
#

They take a starting position, travel time in ticks, and an ending destination of either a block or entity

#

I just have it picking random blocks in that one

obtuse gale
#

Ooh

#

Right, because it's blocks/entities that make sound

#

Speaking of which, those blocks work surprisingly well

#

Haven't experienced any lag with those on massive amounts

tranquil crane
#

the sculk sensors are strangely optimized

#

it shows that clearly mojang knows how to optimize properly, they just choose not to lmao

half harness
hot hull
#

@frigid badge You got a feature list for mob coins perhaps? So I don't have to write the basics myself

#

That reminds me, still need to finish chat reaction eee

ocean quartz
surreal quarry
#

Wow!

#

Thatโ€™s a really nice page.

ocean quartz
#

Ikr! Took me a while to do it!

surreal quarry
#

I can imagine. The colors go so nicely together. And good on you for including the link to learn react in case others want to build a similar site!

#

also next js better fingerguns

hot hull
#

I should use React for my page right

#

Probs gonna make my life easier

ocean quartz
#

Trying to learn front and back end, this will be fun

surreal quarry
#

good luck lol

ocean quartz
#

I've used Ktor before which is pretty nice, but react scares me

surreal quarry
#

i liked using next. itโ€™s jsx so same syntax as react, but sever side rendering so you get faster load times, and also i liked the way the project was laid out.

#

also typescript is fun to throw in if you like that

ocean quartz
#

Yeah i wanna see if i can do typescript instead

surreal quarry
#

itโ€™s basically the exact same just create-typescript-react-app instead

#

and all JS is valid TS so you can type as little or as much as you want

obtuse gale
old wyvern
#

Ah yes

#

The perfect arrow

obtuse gale
#

It actually forms an arrow ๐Ÿ˜‚

old wyvern
#

xD

ocean quartz
#

It's actually beautiful in a weird way

surreal quarry
#

lmao

#

thatโ€™s the worst i think iโ€™ve ever seen

weary epoch
#

is bm online?

ocean quartz
#

Bm is always online

weary epoch
#

@prisma wave did the tutorial drop

prisma wave
prisma wave
weary epoch
#

remember

#

if you need editing or anything

#

you can message me

prisma wave
#

Whenever I have enough time to make it adequate quality

#

ok lol

#

I mean editing isn't really the problem, all I need to do for that is find the right takes and make a few cuts

winter iron
#

imagine you can have server mod packs which just load on join, would actually be so cool

#

similar to resource packs

subtle lynx
#

there are so many things about that screenshot that I hate

#

also what's with people naming things in the worst way possible?

#

you literally just have to describe what something is in the variable name and your code is 20x easier to read

ocean quartz
#

Idk, people are too lazy to write words, so they use dumb letters for everything

half harness
#

is having e for events bad?

ocean quartz
#

Yes

half harness
#

๐Ÿ˜”

ocean quartz
#

If only there was a smart software that would suggest how to name your things right, then maybe people would do it ๐Ÿฅบ /s

half harness
#

event takes too long to type

old wyvern
half harness
#

im too lazy to spend 0.1 seconds to type it all out

obtuse gale
#

what.....

#

you literally just ctrl space and it auto fills it for you

half harness
#

oh

#

oh thats neat

obtuse gale
#

hell, you can tap e and then tap tab and it'll also auto fill "event"

ocean quartz
half harness
#

๐Ÿฅฒ

weary epoch
#

if u really dont want to type event dont type e at least type evnt

half harness
#

uhh

#

๐Ÿค”

ocean quartz
#

That's not about laziness anymore, that's just worse

blazing walrus
lunar cypress
prisma wave
#

lmao

#

Soz

late grove
#

Please explain to me why I have this

#

It's very helpful in the modern java 15 days

half harness
#

๐Ÿ˜ฎ

tender cargo
#

o0o0o0o0

#

when i cant find code for a simple discord bot

half harness
tender cargo
#

lol

late grove
#

^^

half harness
#

well

late grove
#

No one is going to do that for free I bet

half harness
#

its "normal"

#

not too hard but not tooooo simple

late grove
#

^^

tender cargo
#

how much do u think it would cost

#

for someone to do it

half harness
#

idk

late grove
#

Wait lemme check and I'll quote you for me to make it

half harness
#

just use like auttaja

tender cargo
#

ok

half harness
#

or something

tender cargo
#

i want my own bot

half harness
#

ok

tender cargo
#

because then u got full control

half harness
#

prob like $10 though

tender cargo
#

reasonable

#

id pay that

half harness
#

it isn't too complicated

tender cargo
#

if ur willing to do it id pay it

late grove
#

With or without hosting tho

half harness
#

oh

#

thats important too

tender cargo
#

without

#

i need it to run on a local machine thi

half harness
#

local?

tender cargo
#

yes

half harness
#

then probably just $10

tender cargo
#

local host

late grove
#

I would do it for $10

tender cargo
#

im still thinking of what to add on it so i might add on later

half harness
#

btw @late grove do u use jda?

late grove
#

Yes but no

half harness
#

huh

#

that makes no sense

late grove
#

I don't for bots, but I do for my spigot plugin

half harness
#

ohh

#

ok

late grove
#

=plugin DiscordX

tender cargo
#

would u be able to do tickets and make it send embeds

compact perchBOT
#

v1.0.5 by EnderTweaks
A plugin to link minecraft servers with discord.

Downloads:

208

Likes:

0

Reviews:

5

half harness
#

what is discordx ๐Ÿ‘€

tender cargo
#

use discord srv its better

late grove
#

Excuse me

half harness
#

wait wat do you use jda or discordx?

tender cargo
#

what

late grove
#

I made DiscordX

half harness
#

OH

#

XD

#

lol andy u messed up

late grove
#

It's $20 now

half harness
#

๐Ÿคฃ

tender cargo
old wyvern
#

lol

late grove
#

I could do it in a day

#

Meh I'll still do $10

tender cargo
#

ill be afk for ~5 min rn ill brb

late grove
#

Ok

half harness
#

welp

#

good job harry

#

ur getting $10

#

do u use discordjs for bots?

late grove
#

no xd

half harness
#

oh

tender cargo
#

what do u use

half harness
#

javacord?

late grove
#

dpy > everything

#

fight me

half harness
#

py?

tender cargo
#

what will i need to install for it to run

half harness
#

PYTHON?

#

๐Ÿคข

late grove
#

yes

#

it's superior

half harness
#

๐Ÿ˜

#

python :/

late grove
#

superior

half harness
#

python is not

tender cargo
#

if its like a second of delay for whatever command thats fine idc

late grove
#

DM me, I'll do this for you

#

We can talk this out

tender cargo
#

ok

ocean quartz
obtuse gale
#

maven be like

surreal quarry
#

the outermost <> </> isn't necessary there if you wanna reduce one level of it

#

unless you're planning on adding another div inside or something

hot hull
#

So many divs which could probably be restructured

ocean quartz
surreal quarry
#

sounds good

tender cargo
half harness
ocean quartz
#

Well they aren't wrong

obtuse gale
#

it's not that "they aren't wrong"

#

they are right

surreal quarry
#

the are right

obtuse gale
surreal quarry
obtuse gale
steel heart
#

spigot 1.8 do be unsecure and buggy

#

tho galacticspigot runs smoothly on 1.7

lunar cypress
surreal quarry
#

lmao the replies are great

distant sun
#

[cpp] any idea why random ASCII characters would be displayed on console?

prisma wave
#

That can't be serious

#

yeah (*char) (*) (*void) x is much easier to understand than hello world

steel heart
#

confusion

old wyvern
#

******

obtuse gale
#

@prisma wave this

lunar cypress
#

It's the programming takes compass

distant sun
lunar cypress
#

I think I've postet that here before

#

now we just need to find the other two corners

prisma wave
#

Yeah you have

#

lmao

#

So we've got pointer, Haskell

surreal quarry
prisma wave
#

That username seems familiar

steel heart
#

hmm

surreal quarry
#

i think so too

#

but i cant quite pin it down

#

any help?

prisma wave
#

Idk lol

#

What should the other 2 be?

distant sun
#
โ•ช
โ•”โ””```
Man wtf
surreal quarry
#

seems normal

prisma wave
#

We've got FP-jerking and pointer-jerking

surreal quarry
#

its a feature

prisma wave
#

Maybe FactoryBeanProvider-jerking

lunar cypress
#

that's good, yeah

half harness
#

So I made a discord bot but it says that the bot is online even though I didn't run the code yet thonking

surreal quarry
#

sometimes they chill online for a bit after you stop them

half harness
#

it's been building for like 30 seconds so i just stopped it, anyone know why?

obtuse gale
#

Incredible

#

I know

half harness
#
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.
[main] INFO JDA - Login Successful!
[JDA MainWS-ReadThread] INFO WebSocketClient - Connected to WebSocket
[JDA MainWS-ReadThread] INFO JDA - Finished Loading!
```idk if this has to do with any of it
prisma wave
#

That's one of the worst things I've ever seen

prisma wave
obtuse gale
#

and if you go back a few seconds before that timestamp you'll see something even more beautiful

half harness
steel heart
#

its jda

surreal quarry
#

that means the bot is starting

#

its a jda thing

half harness
#
public class DiscordTestBot {
    public static void main(String[] args) throws LoginException {
        JDA jda = JDABuilder.createDefault("token").build();
    }
}
```this is my code
obtuse gale
#

lol

#

it's okay

#

you should be

half harness
prisma wave
surreal quarry
#

too late

half harness
steel heart
#

you need a logger lib

surreal quarry
#

i already crashed discord

steel heart
#

implementing slf for java

old wyvern
#

HA

prisma wave
#

@half harness im pretty sure it should show an error of where it crashed

half harness
#

its not crashing

#

its just loading

#

for ages

#

i manually stopped it

prisma wave
#

no no

half harness
#

bc it was taking forever

prisma wave
#

That's how it works

#

If you run with gradle

half harness
#

o

steel heart
#

sadge

half harness
#

weird

prisma wave
#

It won't count as "finished" as long as the program is still running

half harness
#

ok

#

OH

#

LOl

prisma wave
#

that's what gradle run does

half harness
#

OK

surreal quarry
#

is your test running a bot

#

...

surreal quarry
#

yes but is your test like starting a discord bot

half harness
#

wdym

#

i dont get what you're asking

#

๐Ÿ˜

surreal quarry
half harness
#

test code?

surreal quarry
#

wait nvm

#

bruh

half harness
#

im confused

#

i literally just started

#

like a few mins ago

surreal quarry
#

you were asking about tests in #development and your thing is DiscordTestBot so im thinking you are trying to run unit tests

distant sun
#

So I have these 4 classes that extend exception (cpp), any idea why one of them which is basically this

class Test : public exception {

private:
    string cont;

public:

    explicit Test(string cont_): cont(std::move(cont_)) {}

    const char *what() const noexcept {
        string s = "Contul " + cont + " nu exista.";
        return &s[0];
    }

};```
Keep printing random characters / symbols in console instead of the actual message?
old wyvern
surreal quarry
#

just ignore me

half harness
distant sun
#
    try {
        // code that throw exception
    } catch (exception &e) {
        cout << e.what() << endl;
    }```
old wyvern
#

Whats your output?

distant sun
#

throw Test("something");

old wyvern
#

no like what does it print?

obtuse gale
#

why are you using exceptions in c++

#

mate

#

:C

distant sun
#

oh output

#

it is random @old wyvern, last was 0ยท

#

It is an assignment oliver

obtuse gale
#

yuck

steel heart
obtuse gale
#

tell your prof it makes it considerably slower

obtuse gale
#

I mean you can

#

but yuck

#

you check/handle the returns instead

distant sun
#

ok will do it after this assignment

#

now I gotta understand wtf is going on

steel heart
obtuse gale
#

it returns a pointer to the first char

old wyvern
#

seems to run fine for me gab

obtuse gale
#

but it's frowned upon

steel heart
#

takes more resources as well Ig

distant sun
#

can I give you the full code yugi?

obtuse gale
#

it definitely is more expensive

half harness
#

๐Ÿ˜‚ I forgot that sending message event for JDA would also trigger if the bot sent a message and I made it sent a message when a message is sent in the discord... ๐Ÿ˜ฌ its spamming my chat right now

obtuse gale
#

when you enter a try block, cpp makes a lot of checks when you enter and exit a function

old wyvern
#

I just copy pasted what you sent easier, but sure

obtuse gale
#

each individual function

#

so it gets heavy

steel heart
#

hmm yeah

old wyvern
obtuse gale
#

I mean "it gets heavy" in terms of c++ performance capabilities lol

#

it's still incredibly fast

distant sun
obtuse gale
#

but nowhere near as it could be without it

steel heart
#

ye true

obtuse gale
#

lol

distant sun
#

stfu

obtuse gale
#

no cpp support

#

wow

#

stupid hastebin

old wyvern
#

That still seems to print fine for me gab

distant sun
#

hmm, interesting

#

perfect then

old wyvern
#

xD

distant sun
#

wondering what makes clion upset

obtuse gale
#

oh wait

old wyvern
#

Contul roberat nu exista.

obtuse gale
#

gaby I know what's going on kekw

old wyvern
#

Thats what I got

distant sun
#

yea that's good

obtuse gale
#

you are creating the string on the stack

#

and as soon as you exit the function it poofs

distant sun
#

idk much cpp

obtuse gale
#

so the pointer is pointing to garbage data

distant sun
#

ok what should I do in this case?

#

all this pointers shit confuses me

obtuse gale
#

yeah pointers are a bit of a topic

#

do you have to use std::strings?

distant sun
#

probably

#

looks like creating the exception message on the constructor and then returning #data() fixed it, hmm

obtuse gale
#

like cont(std::move(cont_) + "blah")?

distant sun
#

yes

#

is that bad or?

obtuse gale
#

nah

distant sun
#
        istringstream iss(operatiune);
        vector<string> args{
                istream_iterator<string>{iss},
                istream_iterator<string>{}
        };```
Is this ok for splitting the string at space?
obtuse gale
#

what is that supposed to do thonk

distant sun
#

similar to java's String#split(" ")

#

I found it online

#

@obtuse gale can I not open a file from project's root without providing an absolute path?

obtuse gale
#

afaik std::fstream(std::string) is relative to where you're running the program

#

(or whatever the constructor is lul)

distant sun
#

doesn't seem to find my file ๐Ÿ˜ฆ

obtuse gale
#

uuh how does the code look like and how are you running the program?

distant sun
#

I hate how c behaves different on linux than windows

#

what I use ifstream

obtuse gale
#

ngl Java's Path is very comfortable to use lol

#

Java's whole file IO is very comfy compared to C++ ๐Ÿฅฒ

distant sun
#

ofc

#
ifstream in(filename);

for (string line; getline(in, line); ) {
}```
obtuse gale
#

mm I'll get back to you later ๐Ÿ™‚ food's done cookin'

distant sun
#

ok

ocean quartz
old wyvern
#

๐Ÿ˜‚

ocean quartz
#

Just had to re create the project like 5 times, nothing more

old wyvern
#

๐Ÿ˜ฌ

forest pecan
#

angularjs is being rebuilt?

obtuse gale
#

@distant sun I'm back uwu

forest pecan
#

Book Title: "Introduction to Algorithms"
Number of Pages in Book: 1,177

Does this sound introductory to you?

#

lol

obtuse gale
#

tbh yeah

#

lol

tender cargo
#

would it be hard to code a interface on a local website for a discord bot

oblique heath
#

it shouldnt be hard, as long as you know how to make a website in the first place

tender cargo
#

idk how i was just wondering if i could ask harry if he could add it in

#

if its not too hard he might do it for the same price

oblique heath
#

๐Ÿ˜ฎ

obtuse gale
#

I mean... just ask him?

#

lol didn't you two DM each other?

tender cargo
#

so i havent asked him yet

obtuse gale
#

asking is duty free

tender cargo
#

i sent the message he hasnt responded yet

obtuse gale
#

I mean in that case the best one to answer is him, he knows the environment he'll work with and around

hot hull
old wyvern
#

Might need a spoon too

hot hull
#

This last image

#

?

#

@obtuse gale

#

That's github...

#

Holy fuck efe..

old wyvern
distant sun
#

@obtuse gale hey

prisma wave
#

right

#

where we we

high violet
#

so i gtg rn, class is starting

#

Y'all have a nice day

prisma wave
#

elara good rust bad c++ bad

#

lol

high violet
#

hehe Elara go brrr

subtle lynx
#

I think someone is about to disagree with me

prisma wave
#

probably

high violet
#

What did you say bucko

prisma wave
#

because your point isn't entirely true

subtle lynx
#

I said something along the lines of "this argument is pointless because the majority of languages have a purpose"

prisma wave
#

this argument is never going to go anywhere if it's about which language is better. Neither is better unless one of them is a meme language. Every language has a purpose unless it's so antiquated and inefficient that no one in their right mind would ever use it.
That's true in theory, but it's undeniable that different languages are better for different scenarios

subtle lynx
#

yes

#

I'd agree with that.

lunar cypress
#

this point is true but it is unrelated to the discussion

prisma wave
#

indeed

lunar cypress
#

at least the one I was trying to make

subtle lynx
#

didn't some guy interpret the discussion as "rust better"

prisma wave
#

that's his problem

subtle lynx
#

I understand that that wasn't the point being made

lunar cypress
#

but when you talk about programming concepts and one side keeps interpreting it as an attack on their favourite language it doesn't work

subtle lynx
#

I see

prisma wave
#

yeah, people need to be more open to criticism and learning new things

#

it's the same mentality that most of the kotlin "haters" use, "java is fine so why do we need anything else"

lunar cypress
#

Yeah, you don't have to assign yourself to some language circlejerk tribe

#

except elara of course

quiet depot
#

apart from the elara circlejerk tribe

prisma wave
#

lmaoo

#

even that is done with some self-awareness

lunar cypress
#

Do I like C++? No. Do I ignore everything about it because of that? Also no

#

It's an incredibly interesting language

quiet depot
#

btw bm almost fixed that map#merge issue, I rewrote the way methods are indexed in memory to provide more specific searching

#

pls just make an issue next time tho instead of tagging me

prisma wave
#

oh okay, great

#

completely forgot about that

#

what was the issue?

quiet depot
#

d;map#merge

ruby craterBOT
#
int size()```
Description:

Returns the number of key-value mappings in this map. If the map contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:

the number of key-value mappings in this map

prisma wave
#

lol

subtle lynx
#

tbh I'm probably going to stick with Java because Java is what most people making these plugins are comfortable with. I'd like if people have the option to pick apart my plugin to see what I did.

prisma wave
#

are you sure it's fixed

quiet depot
#

yes almost* fixed

lunar cypress
#

After I've finished writing my article about Clojure Spigot plugins everybody will migrate

prisma wave
#

lmao

old wyvern
#

o.o

prisma wave
#

are you actually making that?

lunar cypress
#

Yes

prisma wave
#

:o

lunar cypress
#

It's too long already

old wyvern
#

The brackets still haunt me

quiet depot
#

o bm u misunderstood me, it's only fixed in localhost, haven't pushed yet

prisma wave
#

oh okay

old wyvern
#

๐Ÿฅฒ

prisma wave
#

makes sense

lunar cypress
#

I'm sitting at 4500 words and I'm still in the middle of explaining the plugin

prisma wave
#

lmao

old wyvern
#

xD

prisma wave
#

doesn't clojure spigot kinda suck because spigot is so reliant on OOP?

#

so it's not very idiomatic

quiet depot
subtle lynx
#

simply rewrite spigot so it works well with clojure

lunar cypress
#

Yeah the idea of the article is to explore if Clojure works with Spigot

prisma wave
#

good idea

#

I see

old wyvern
#

Spijure

#

Clogot

prisma wave
#

surprised that doesn't exist

#

clojure bindings for spigot

old wyvern
#

Time to make it happen!

quiet depot
#

spiglijure

prisma wave
#

๐Ÿ˜ฎ

old wyvern
#

๐Ÿ˜ฎ

quiet depot
#

for noobs

#

like me

regal gale
lunar cypress
#

eh, wouldn't really recommend it. Too many unorthodox things you have to resort to

quiet depot
#

okie

prisma wave
#

afaik spigot isn't a great way to learn cuz like i said, it's really not very idiomatic in terms of all of the interop hacks

old wyvern
#

spotlin

lunar cypress
subtle lynx
#

why is everyone ignoring my point about recreating spigot

quiet depot
#

bm replied to it

prisma wave
#

there's not much you can say lol

subtle lynx
#

I thought you were replying to the resident clojure enthusiast

quiet depot
#

thanks johnny

#

not sure clojure is what I'll go with, but I would like to eventually become fluent in another language apart from java & frontend web langs

old wyvern
#

C# should be easy enough

quiet depot
#

preferably something different from java

prisma wave
#

pretty sure clojure is a decent alternative for java for stuff like backend design

lunar cypress
#

Definitely

#

I'd just try it out, write some stuff with it and then think about whether you want to use it more, rather than make a decision about your next "main" language upfront

prisma wave
#

project euler or COC things are usually a good way to practice, that's what i usually end up doing to learn a new lang

quiet depot
#

yeah probably should actually try out these languages before making a decision

#

list of languages I need to try in no particular order is kotlin, go, and clojure

prisma wave
#

all pretty different lol

quiet depot
#

i've done a tiny bit in kotlin but not really enough to make a decision

#

have read a fair bit of kotlin code though

prisma wave
#

Kotlin is probs the easiest since you can just rewrite a spigot plugin or something

quiet depot
#

yeah that's a benefit

#

I can follow my challenges which originally helped me learn java

prisma wave
#

yeah

hot hull
half harness
#

since in jda when someone sends a message it just gives a string of the whole message, I'm thinking of splitting it into args, after removing the prefix with replaceFirst.. I have 2 questions:

  1. Do you guys think this is a good idea?
  2. Is it possible to replaceFirst with a regular string and not a regex? (So that I don't have to escape any characters)
quiet depot
#
  1. yes
  2. you can escape the regex or use String#indexOf and String#substring
half harness
#

thx ๐Ÿ™‚

#

d;jdk String#indexOf

ruby craterBOT
#
public int indexOf(Stringย str)```
Description:

Returns the index within this string of the first occurrence of the specified substring.

The returned index is the smallest value k for which:
this.startsWith(str, k) If no such value of k exists, then -1 is returned.

Returns:

the index of the first occurrence of the specified substring, or -1 if there is no such occurrence.

Parameters:

str - the substring to search for.

half harness
#

-_-

quiet depot
#

it's a bit broken rn

#

try 3 4 an 5

half harness
#

oh

quiet depot
#

that's the one

half harness
#

oooo thx ๐Ÿ™‚

lunar cypress
#

Its search is a little weird indeed

quiet depot
#

yeah i'm working on it rn

#

I swear I fixed that reverse thing already

#

anyway should be fixed completely in the next update

half harness
#

d;jdk String#subString

ruby craterBOT
#
public String substring(intย beginIndex)
throws IndexOutOfBoundsException```
Description:

Returns a string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string.

Examples:

Throws:

IndexOutOfBoundsException - if beginIndex is negative or larger than the length of this String object.

Returns:

the specified substring.

Parameters:

beginIndex - the beginning index, inclusive.

quiet depot
#

just go to 5

half harness
#

so just ```java
String prefix = "?";
String command = "?help";
int index = command.indexOf(prefix);
String finalString = command.subString(index);

quiet depot
#

yep

#

if your prefix is a character just use char

half harness
#

well I'm trying to make it configurable ๐Ÿ™‚

#

so that someone can use like somebotprefix

prisma wave
#

wait

#

won't the prefix always be at the start then?

half harness
#

yes

#

uhhh

#

so uh

#

I just realized

prisma wave
#

so you don't need the indexOf, just slice the first n character off

#

where n is the prefix length

half harness
#

so command.subString(n)?

#

or command.subString(0)?

quiet depot
#

first

#

make sure to trim the result

half harness
#

oh

#

trim?

quiet depot
#

string.trim()

#

it removes whitespace off either end

#

allows people to do this ? help

#

and trust me, lots do

half harness
#

thx ๐Ÿ™‚

prisma wave
#

mobile autocorrects it to add a space sometimes

#

so

#

yeah

#

trimming is useful

half harness
#

d;jdk String#trim

ruby craterBOT
#
public String trim()```
Description:

Returns a string whose value is this string, with all leading and trailing space removed, where space is defined as any character whose codepoint is less than or equal to 'U+0020' (the space character).

If this String object represents an empty character sequence, or the first and last characters of character sequence represented by this String object both have codes that are not space (as defined above), then a reference to this String object is returned.

Otherwise, if all characters in this string are space (as defined above), then a String object representing an empty string is returned.

Otherwise, let k be the index of the first character in the string whose code is not a space (as defined above) and let m be the index of the last character in the string whose code is not a space (as defined above). A String object is returned, representing the substring of this string that begins with the character at index k...

This description has been shortened as it was too long.

Returns:

a string whose value is this string, with all leading and trailing space removed, or this string if it has no leading or trailing space.

half harness
#

kool

#

command.subString(prefix.length());
command.trim(); @half harness pinging to remind myself

quiet depot
#

.length isn't a field on strings

half harness
#

oh

prisma wave
#

it's size()

#

i think

quiet depot
#

.length()

#

I believe

prisma wave
#

wait

#

yeah

#

that's for collections

#

so inconsistent ๐Ÿ™„

half harness
#

fixed ๐Ÿ™‚

obtuse gale
#
int count = 0;
for(Char x : string.toCharArray()){
  count++;
}```
prisma wave
#

what

half harness
obtuse gale
#

thats the pro gamer move

quiet depot
#

Char isn't a class

half harness
#

lol

prisma wave
#

smh

quiet depot
#

substring returns a new string dkim, strings are immutable

#

so you're trimming the result of the substring

#

not the original string

prisma wave
#

what too much kotlin does to a mf

half harness
#

command = command.subString(prefix.length());
command = command.trim(); @half harness pinging to remind myself

obtuse gale
#

How does one get the last letter on a string

prisma wave
static zealot
#

kotlin has a getlast or something like that

quiet depot
#

str.toCharArray()[str.length() - 1]

prisma wave
#

yea

#

in kotlin it's just s.last(), otherwise do what pig said

obtuse gale
#
int count = 1;
Map<Char, Integer> letters = new HashMap<Char, Integer>();

for(Chat x : string){ 
  letters.put(x, count);
  count = count + 1;
}
int lettersInString = letters.get(string.toCharArray()[string.length() -1])
prisma wave
#

o tf

quiet depot
#

diamond operator

prisma wave
#

List letters = new HashMap thonk

quiet depot
#

and neither Char or Chat is a class

static zealot
#

Chat X

prisma wave
#

lmao

obtuse gale
#

id like to see you do better

#

also i know i literally use string.length() at the end but

#

but

quiet depot
#
string.chars().sum()```
#

no

#

that won't work

#
string.chars().mapToObj(String::valueOf).count()```
distant sun
#

what are you guys even doing lol

prisma wave
#
(--> (s)
  (map int)
  (map #(/ %1 %1))
  (reduce +))
quiet depot
#

inefficiently getting the length of a string

distant sun
#

aight

half harness
regal gale
#
count = count + 1;```
```java
count++```
quiet depot
#

idk

half harness
static zealot
#

count = count-1;

obtuse gale
#

oh mine actually works

static zealot
#

count ++

#

count++

#

ezz

quiet depot
#

i consider it bad practice to use i++ instead of ++i

#

because you should always be able to use ++i instead of i++

distant sun
#
for (Character c : string.toCharArray()) {
  Thread.sleep(Long.MAX_VALUE);
}```
obtuse gale
#

String.MAX_VALUE

prisma wave
#
(defn length [s]
  (if (= (count s) 1)
    1
  (--> (s)
    (map str)
    (map length)
    (reduce +)))

Recursive ๐Ÿ™‚

regal gale
#

This is why I hate clojure

distant sun
#

py uses spaces for syntax while clojure uses () lol

quiet depot
#

Math.pow(2, 2_147_483_647)*2

#

max biginteger size

#

use that on Thread.sleep

#

ez

distant sun
#

your isp will go to sleep

half harness
#

underscores?

distant sun
#

yes

quiet depot
#

u can use underscores in numbers

prisma wave
#

man I had an idea a while ago for a collection of really simple algorithms done in n! time complexity

distant sun
#

java 8 added that or smth

prisma wave
#

this would be fun

steel heart
#

aww man that command

static zealot
#

COC if you wanna join anyone. k bye

quiet depot
#

good idea bm

steel heart
#

I may be able to perform it as well one day

obtuse gale
#

aight i made a program

#

and yes, it does work

regal gale
#

The hell is that method naming

obtuse gale
#

you dont use that convention?

quiet depot
#

@prisma wave why n! though

#

why not n!!

#

even better

prisma wave
#

:o

static zealot
#

@obtuse gale @steel heart @quiet depot @prisma wave @distant sun @half harness joining? xD

blazing walrus
#

cum has 3 letters aj :3

prisma wave
#

is that even possible?

half harness
#

;-;

quiet depot
#

double factorials are a thing

steel heart
#

blitz no need to finish comission

quiet depot
#

according to my google search

prisma wave
#

ik

half harness
#

hmm

prisma wave
#

but

#

like

quiet depot
#

I've never used a factorial irl

#

so I don't know

prisma wave
#

they're used in probability and things

#

but idk how you could even make something that performs that poorly

static zealot
obtuse gale
#

you can use it to calculate the amount of things on a rubiks cube cant you

quiet depot
#

docdex has a search time complexity of o(n) afaik

obtuse gale
#

thats the only reason i know what factorial does

distant sun
quiet depot
#

although I only learnt big o 2 days ago

#

so that could be wrong

prisma wave
#

o

#

for looking up a method?

quiet depot
#

looking up anything

prisma wave
quiet depot
#

well it's either o(1) or o(n)

#

if there's a direct match it's o(1)

#

otherwise if it searches, o(n)

prisma wave
#

that makes sense

quiet depot
#

although I am looking at making that better

#

been researching bk trees and shit

distant sun
#

d;jdk thread#sleep

ruby craterBOT
#
public static void sleep(longย millis, intย nanos)
throws IllegalArgumentException, InterruptedException```
Description:

Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds plus the specified number of nanoseconds, subject to the precision and accuracy of system timers and schedulers. The thread does not lose ownership of any monitors.

Throws:

IllegalArgumentException - if the value of millis is negative, or the value of nanos is not in the range 0-999999
InterruptedException - if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.

Parameters:

nanos - 0-999999 additional nanoseconds to sleep
millis - the length of time to sleep in milliseconds

quiet depot
#

and as far as I can tell so far, they're not useful for docdex at all

#

but research is research

static zealot
#

ok think we're starting

quiet depot
#

might find something

prisma wave
#

yea big-o doesn't mean performance

#

true

quiet depot
#

yeah it's o(n) but still takes 700+ms

#

that's half of what it was a few days ago

#

made it parallel

static zealot
#

oh damn is this Pythagoras

prisma wave
#

yea lol

obtuse gale
#

i gtg

quiet depot
#

u guys always get the easy ones when I don't join ๐Ÿ˜ฆ

obtuse gale
#

Cant prove it wrong can you

prisma wave
#

overflow is killing me here

#

๐Ÿ˜ฆ

obtuse gale
#

ayo

#

AYO

distant sun
#

fucking rounding

static zealot
#

wait I didn't have to do floor if I did toInt in kotlin did I?

obtuse gale
#

you got the normal cumshot , understandable, then fucking EXTREME

blazing walrus
#

these are the g's

prisma wave
#

bruh fucking .NET doesn't have a BigDecimal class

#

clojure time

distant sun
#

0..

#

ok coc

#

cya

regal gale
#

Wait.. didn't I share my code?

prisma wave
#

stupid .net

regal gale
#

All I did in Java was cast (int) thonking

#

Probably not the best idea though

prisma wave
#

that's fine

#

int casting rounds down

#

or rather it truncates

static zealot
#

yeah I floored and casted

#

then I realised I can just cast

#

I think this is the first time in 2 years I had to use Pythagoras

regal gale
#

For me, that is like ages

#

Every week for me has at least 3-5 times involved with it

static zealot
#

what? what do you do with it every week

regal gale
#

Math...

#

Trigonometry...

#

Hate it so much

lunar cypress
#

@distant sun technically Thread.sleep(long) is O(1) if we view it relative to another algorithm that even has a notion of a variable n

distant sun
#

shh

#

Im not good at writing bad code

regal gale
#

@static zealot even the roblox game I'm about to code also involves it lol