#dev-general

1 messages · Page 227 of 1

steel heart
#

It’s immensely ambiguous

#

I’d say java di

hot hull
#

Remove both FAQs, make a single faq called dependency-injection, explain what it is, then have two pastes for java and kotlin one

steel heart
static zealot
#

oh that works as well

#

lol xD

steel heart
#

Even searching java di would result in dependency injection

hot hull
#

Perhaps some links on actual in depth explanations for it as well

steel heart
#

Wikipedia

#

:0

static zealot
#

well frosty

#

please provide links

#

because I don't know how to google search

steel heart
#

In software engineering, dependency injection is a technique in which an object receives other objects that it depends on. These other objects are called dependencies. In the typical "using" relationship the receiving object is called a client and the passed (that is, "injected") object is called a service. The code that passes the service to th...

static zealot
#

is this **Dependency Injection** Dependency injection is when we pass a class through other class constructors to access that specific class in those other classes. enough?

#

which is in kotlin-dependency

steel heart
#

that’s quite not right as well lol

static zealot
#

no idea who made it so dk

onyx loom
#

i think gaby did 🌝

#

i mean its close enough

static zealot
#

well do I just add a line What is dependency injection: LINK ?

#

to what Conclure gave

steel heart
#

The definition of dependency injection is by passing an instance through a designated constructor. But it can also be with a setter or an interface instead of a constructor albeit the most common injection is through constructors.

static zealot
#

?dependency-injection

compact perchBOT
#
FAQ Answer:

Dependency Injection
Dependency injection is passing an instance through a designated constructor. But it can also be with a setter or an interface instead of a constructor albeit the most common injection is through constructors.
Read more here: https://en.m.wikipedia.org/wiki/Dependency_injection

Dependency Injection in Kotlin:
https://paste.helpch.at/esogakutod.cpp

Dependency Injection in Java:
https://paste.helpch.at/yijawupoju.java

static zealot
#

how does this look?

steel heart
#

That’s pog

onyx loom
#

ah yes, the superior language is first shown in the embed

steel heart
#

Does the paste thing lasts for ever?

onyx loom
#

yes

#

i think

static zealot
#

xD

#

well I hope so

steel heart
#

Else just make a git thing

static zealot
#

I still have months old pastes

#

why is this a thing tho?

#

?base64-value

compact perchBOT
#
FAQ Answer:

In DeluxeMenus you can set a skin on a skull using the base64 value of that skin.
If you have a skin file or you have a player name you can go to https://mineskin.org and upload the file there or put the player name in there and press GENERATE.
This will give you more info about the skin but what you want is the Texture Data.
Copy that and use it like this in DeluxeMenus: material: basehead-<value>

prisma wave
#

Starting a sentence with "but"

#

Smh

static zealot
#

lol xD

#

wasn't written by me

#

will edit it

#

?dependency-injection

compact perchBOT
#
FAQ Answer:

Dependency Injection
Dependency injection is passing an instance through a designated constructor. But it can also be with a setter or an interface instead of a constructor albeit the most common injection is through constructors.
Read more here: https://en.m.wikipedia.org/wiki/Dependency_injection

Dependency Injection in Kotlin:
https://paste.helpch.at/esogakutod.cpp

Dependency Injection in Java:
https://paste.helpch.at/yijawupoju.java

static zealot
#

here

#

wait what

#

did it not edit

#

?dependency-injection

compact perchBOT
#
FAQ Answer:

Dependency Injection
Dependency injection is passing an instance through a designated constructor. But it can also be with a setter or an interface instead of a constructor albeit the most common injection is through constructors.
Read more here: https://en.m.wikipedia.org/wiki/Dependency_injection

Dependency Injection in Kotlin:
https://paste.helpch.at/esogakutod.cpp

Dependency Injection in Java:
https://paste.helpch.at/yijawupoju.java

static zealot
#

lol

#

am I going crazy?

ocean quartz
#

@static zealot Can you make an alias ?di? We're lazy

static zealot
#

xD

#

I'll do

#

?dependency-injection

compact perchBOT
#
FAQ Answer:

Dependency Injection
Dependency injection is passing an instance through a designated constructor but it can also be with a setter or an interface instead of a constructor albeit the most common injection is through constructors.
Read more here: https://en.m.wikipedia.org/wiki/Dependency_injection

Dependency Injection in Kotlin:
https://paste.helpch.at/esogakutod.cpp

Dependency Injection in Java:
https://paste.helpch.at/yijawupoju.java

static zealot
#

yo

#

finally

#

lol

prisma wave
#

I would just say

Dependency Injection is a way of providing objects with the objects they need ("dependencies"). This is usually done with a constructor, but can also be done for individual methods

static zealot
#

done

#

oh mna

ocean quartz
#

Also would probably put Java first, even though we like Kotlin more, there is more people learning Java than Kotlin

static zealot
#

man*

#

well I didn't actually put it there

#

because we like kotlin

#

xD

#

it just happened like that

ocean quartz
#

O

static zealot
#

I think I'll put em definition as well

#

done

#

?di

compact perchBOT
prisma wave
#

:))

static zealot
#

why the hell

#

is there a faq

#

called chatcontrolpro

#

lol

steel heart
#

lol

#

Do we have a faq for static abuse?

static zealot
#

no don't think so

#

is it included in the solid thing?

steel heart
#

Should have one

static zealot
#

never red that one

#

xD

steel heart
#

?Solid

compact perchBOT
steel heart
#

Well it’s included very implicitly then

static zealot
#

ye but the thing is I never read SOLID

prisma wave
#

petition to make my lombok bad a faq

static zealot
#

well I did once and don't remember anything

#

so idk if there is anything about static abuse there

steel heart
#

Yeah a lombok bad fwa and static abuse faq

static zealot
#

well I mean I can make them and if funnycube or any other staff member feels like they are not OK they'll remove them I guess. just tell me what to write

ocean quartz
#

That's a solid faq right there

hot hull
#

Matt

static zealot
#

but now that I think about it

#

xD

hot hull
#

You've ruined my day once again

static zealot
#

good one matt

ocean quartz
#

c:

static zealot
#

I think I'll add a doesn't work faq as well

#

because I've had enough

#

xD

onyx loom
#

isnt that basically ?ask as it tells u to provide details

steel heart
#

Add one for it works

static zealot
#

?help

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

Source

static zealot
#

there is no ask

#

lol

steel heart
#

Shouldn’t be allowed to create code for the sake of just working

static zealot
#

I disagree

#

xD

steel heart
#

Bruhhh

#

That’s the main reason why all the xy problems are created I feel like

onyx loom
static zealot
#

ye but I was going to say there should be xD

static zealot
#

btw guys I'll change ?plsnoarrowcode to ?arrowcode

onyx loom
#

😆

static zealot
#

just want your confirmation that its better

#

welp both are there I guess

#

just in case

compact perchBOT
static zealot
#

#bot-commands next lol

#

xD

obtuse gale
#

no u

ocean quartz
#

Yes u

static zealot
#

yes me

#

lol

#

k lol

tawdry ore
#

do u know how to edit essentials so after a player types /tpaccept they can't type speficic commands for 6 seconds

static zealot
#

don't think that's possible. well not with Essentials alone at least

#

the only thing you can disable is pvp or damage

#

for the player that got teleported

tawdry ore
#

whats the best koth plugin

ocean quartz
old wyvern
#

clash anyone?

hot hull
#

Sir it is 9:30pm, unless thy knows any mystical words to summon a laptop in my lap, thou shall not play

onyx loom
#

bed time for frosty!

old wyvern
#

its 11:30pm for me rn

hot hull
#

Well good for you, unlike y'all I'm trying not to fuck up my sleep schedule thank you very much

onyx loom
#

going to bed at 9.30 is definitely a you thing 🙂

hot hull
#

And I wake up every day at 6:30-7:30 am

old wyvern
onyx loom
#

yes

#

waking up at like 6am is the norm, but 9.30 aint 🙃

#

why is it bad

hot hull
#

Well I used to wake up at 5am for school every day, but for obvious reasons I don't have to

hot hull
onyx loom
#

u start at 8am?

#

thats a yikes

#

most start at 9

obtuse gale
#

Bruh I used to start at 7.30

onyx loom
#

ok what the fuck

obtuse gale
#

7 sometimes

#

Lol

onyx loom
#

7:30 is unacceptable

frigid badge
#

it's actually unhealthy (if you are a night owl which depends on your genes) to wake up so early and have to do shit

onyx loom
#

yep

obtuse gale
#

And (if it weren't because of covid) I'd have to wake up at like 5.30/6 to be there in time (I have at least 2 hours to get there so ye)

frigid badge
#

luckily I have a boss which doesn't mind if I wake up late 🙂

obtuse gale
#

to be there = college

gritty igloo
#

Hi can someone help me with something that will only take 10 sec?

surreal quarry
#

ask

gritty igloo
#

Its not minecraft related

prisma wave
#

and?

surreal quarry
#

just say what you need help with someone will probably be able to help

gritty igloo
#

Doubt

prisma wave
#

⚙️ Development General - Not configuration help - More relaxed area to discuss development topics

surreal quarry
#

no one can help if we dont know what we need to help with...

gritty igloo
#

If anyone is send me a dm, thanks

prisma wave
#

bruh

surreal quarry
#

again we dont know what you need help with, so no one is gonna DM you

gritty igloo
#

speak for urself son

obtuse gale
#

Just ask the bloody question

#

Out of 10k people I'm sure SOMEONE will answer in here

lunar cypress
#

"hi can i get help"
"yes"
"are you sure"
"yes"
"i dont know if anyone knows"
"just ask"
"no"

obtuse gale
#

Damn

#

7k

#

@gritty igloo okay I can answer your question

onyx loom
#

nah u gotta dm

surreal quarry
#

coding game anyone?

gritty igloo
#

It has been taken care of, thanks @obtuse gale

old wyvern
#

my classes start at 8:30 but due to time zone diff its, 6am here....

wanton sentinel
#

Ugh you know what’s so satisfying

#

I’ve just been coding

static zealot
#

ye. getting a lot of errors and trying to fix them is satisfying 😦

wanton sentinel
#

Oh

#

My satisfying moment was coding with no errors for 3 hours

surreal quarry
#

i had to reinstall intellij recently cause im stupid and now i have this ugly bar with the project name at the top. anyone have any idea how to get rid of it lol

frigid badge
#

you can change almost everything in intelij platform ides

#

so just dive in the settings

surreal quarry
#

ive been doing that but somehow you saying that made me find the setting

#

thanks lmao

wanton sentinel
#

What was the setting?

#

So if it happens I know where to go?

#

@surreal quarry

surreal quarry
#

Settings > Material Theme > Features > Project Frame Colors
i had to turn it off

distant sun
#

is there any documentation for what does each nms class do?

surreal quarry
#

isnt nms all obfuscated

#

and not documented

distant sun
#

uhh

#

This VillagePlace thing is really annoying :))

obtuse gale
#

Y

autumn tapir
#

So I'm working on a project/plugin called Velt

#

Essentially the goal of it is to let you run JavaScript and TypeScript for Spigot plugins using GraalJS

#

With full access to any external java jars and npm

#

It's not done but it has some good progress

#

Some of the reasons I'm working on this are as follows

#
  • I just generally prefer JS over Java
#
  • JS syntax is smaller and simpler then Java which can benefit readability and maintainability
#
  • You aren't bound by types and classes, but (when Typescript support is added fully) you can opt into them
#
  • There's no need to compile your code every single time
#

Here's a few snippets

#
const { manager } = require('velt');

manager.command('feed', {
    permission: 'velt.feed',
    playerOnly: c('&cOnly players can run the feed command')
}, sender => {
    sender.setFoodLevel(20);
    sender.sendMessage(c('&6You have been saturated!'));
});
#
const { manager } = require('velt');

manager.on('PlayerJoinEvent', event => {
    event.setJoinMessage(`[+] ${event.getPlayer()}`);
});
obtuse gale
#

So basically Skript but good

#

Lmao

#

proper

surreal quarry
#

kotlin still better

#

:)

obtuse gale
#

ngl probably the most compelling point would be the "no need to compile" bit

autumn tapir
#

yeah actually, skript but good

obtuse gale
#

Other than that, eeh it's subjective imo

surreal quarry
#

elara will feature hotswapping

autumn tapir
#

i don't know enough about kotlin but honestly I prefer node from what I can tell

#

besides this also gives you access to the wide variety of npm modules

autumn tapir
#

with GraalJS you can still get a lot of performance

#

so it isn't too big of a gap

autumn tapir
surreal quarry
#

a language a few of the people in this server are working on

#

its in very early stages but has some cool planned features

autumn tapir
#

alr

obtuse gale
#

I mean it's a whole new language, I would expect something new, even within the first 5 years of development, to be considered in "early stages"

distant sun
#

wasn't sxtanna working on a way to code plugins using kotlin script?

surreal quarry
#

yea i think so

#

pretty sure its on his gh still

#

or it might've been a papi thing actually

#

i think it was a papi placeholders thing similar to the JS expansion but for kotlin script

autumn tapir
#

kotlin's interesting

#

i've been working on this plugin for probably a few months now

#

i don't know enough about kotlin but

#

i think it'll just be a matter of preference

#

of TS/JS over kotlin

ocean quartz
autumn tapir
#

my eventual goals is for

#

full node support

#

and being able to do most things you would usually do with just java and spigot far more easily

obtuse gale
#

so uuh I did a thing

#

like two months ago

#

I now realize that is literally just Map<Material, Integer> lmfao

quiet depot
#

nah

#

set<entry> has it’s uses

steel heart
#

Such as?

#

I mean you could just call Map#entrySet if needed

quiet depot
#

It’s useful when you have multiple values for a particular key, although now that I’m thinking about it a multimap would suffice, or Map<K, Collection<V>>

frigid badge
#

to continue on the JS, if you want actual quality js you stil need to compile it

#

nowadays plain js is rarely used

prisma wave
#

you could include compilation into the "interpreter" though so the user doesn't have to do it manually

lunar cypress
#

In mathematical terms the latter is a function, i.e. a relation that is left-total and right-unique

hot hull
#

nein

frigid badge
prisma wave
#

So on the user's end they don't have to compile anything

frigid badge
#

what about browsers?

prisma wave
#

What about them?

#

Aren't we talking about scripting for plugins?

distant sun
#

lemmo noob

frigid badge
#

I haven't read the conversations all I saw is that Fefo said he'd choose js over a compiled language due not needing to compile

autumn tapir
#

to continue on the JS, if you want actual quality js you still need to compile it
nowadays plain js is rarely used
@frigid badge yeah, I don't know enough about GraalJS's internals but it might compile it to some form of optimized bytecode or something. compilation time is probably a lot shorter then java's though

obtuse gale
#

the only disadvantage I find in them is in fact the compile time, compilers in general (specially those languages that rely on compile time optimizations) are basically writing code for you, and that takes an enormous amount of time, but the performance benefit is ssdadsasadasda so good

#

and I'm not gonna lie, it is comfortable to just replace a text file and get it working

frigid badge
#

@autumn tapir wasn't talking about it's internals but about the newer es versions

#

and is was talking more in general

#

didn't know you were talking about scripting in java

autumn tapir
#

oh

#

yeah I'm using JS to script in java

#

to let you make spigot "plugins" in JS

half harness
#

Anyone experienced with Github Desktop?

ocean quartz
#

GitKraken > Github Desktop

inner umbra
#

I have tried both. I prefer github desktop

#

What do you need @half harness

half harness
#

So there are different branches in github

#

How can I have files for branch 1 and the files for branch 2

inner umbra
#

Copy the files from branch one or 2 to a different local repo on your pc.

frigid badge
#

just checkout the repo twice

#

don't do some copying shit

half harness
#

thx

frigid badge
#

but why do you want files for branch 1 and 2

#

since you can stash changes

half harness
#

I'm new to these things.....

inner umbra
#

You can pull from the branch idk if you can set where the file goes though.

half harness
#

I'm not even 100% sure what the point of branches are

frigid badge
#

I'd suggest taking a quick read on git

half harness
#

I did

#

2 times

#

anyways

frigid badge
#

but once again why do you need files for branch 1 & 2?

half harness
#

I found out that IntelliJ can you everything :P

#

um

#

ummmmmmm

#

I was just curious

ocean quartz
#

Branches have many uses, for example i tend to use two branches, development and master, on development i do quick edits and changes, on master i only keep releases

half harness
#

because they weren't in different folders or anything

frigid badge
#

I use a master branch for live production environment, staging for the live staging environment and develop for pending releases bugfixes etc

#

and then i have bugfix branches & feature branches

half harness
#

also, I have another question: ```java
/**
* Put a player on the list.
* @param player - a player to use.
* @return TRUE if the player was previously on, FALSE otherwise.
*/

frigid badge
#

just documentation

half harness
#

so it doesn't make any change?

frigid badge
#

no it doesn't do anything

half harness
#

k thx

frigid badge
#

it's there for documentation purposes

half harness
#

why are the @param and @return after @?

ocean quartz
#

Those are used on JavaDocs, the annotations are used to describe specific things, like parameters, returns, links etc

half harness
#

oh

#

why can't I send messages

#

wut

#

oh it sent

ocean quartz
#

What?

half harness
#

no it didn't

#

😦

ocean quartz
#

What?

half harness
#

half my messages aren't sending

#

and the ones that sent takes forever

#

Also how come some methods are like showPlayer and some are like hidePlayer

#

the hidePlayer is on 1 line

ocean quartz
#

That's just Intellij, it does that to make it smaller to read, if you click on the line it'll open up in more lines

half harness
#

o

#

is there a way to put it back to 1 line

#

😂

ocean quartz
#

It'll do it automatically, you can click on a minus button on the side next to the line number to close it

obtuse gale
#

ctrl + -

half harness
#

thx

forest pecan
#

how 2 print hello world

obtuse gale
#

you don't

#

programming sucks

forest pecan
#

i do System.out.printIn("Hello World");

obtuse gale
#

it's a nightmare

forest pecan
#

but no work

obtuse gale
#

no

#

gtfo

forest pecan
#

copy paste

#

in

#

compiler

#

no

obtuse gale
#

it's a hellhole

forest pecan
#

wok

obtuse gale
#

computing was a mistake

#

Alan Turing should've died earlier

onyx loom
#
    mov  dx, msg 
    mov  ah, 9      
    int  0x21   

    mov  ah, 0x4c  
    int  0x21   

    msg  db 'Hello, World!', 0x0d, 0x0a, '$'```
#

best language ^

obtuse gale
#

fake news

forest pecan
#

is tat

#

is tat english?

prisma wave
#

Assembly is lowkey hot

onyx loom
#

ok

smoky crypt
forest pecan
#

im joking lmfao

#

i know how to code lol

smoky crypt
#

oh ok lol

forest pecan
#

if you replaced it with l

#

it would still be wrong

#

lol

smoky crypt
#

i mean i can literally see people make that mistake

forest pecan
#

its the first mistake

#

i made

#

even if you replace the capital i with l

#

like

#

System.out.println("Hello World");

#

its still wrong lol

#

you can put it inside a compiler and see for yourself 😉

smoky crypt
#

wrong quotes?

forest pecan
#

Nope

smoky crypt
#

ios does that sometimes

static zealot
#

my first mistake was writing prinltn

#

and couldn't figure out for the life of me

forest pecan
#

lmfao

static zealot
#

but that was before I started using IIJ and stuff

#

because those warn you

#

lol

forest pecan
#

lol

autumn tapir
#

An example of storage with my plugin.

const spawn = storage.field('spawn');

manager.command('spawn', sender => {
  if (spawn.get()) {
    sender.teleport(spawn.get());
    sender.sendMessage(c`&bYou have been sent to spawn.`);
  }
});

manager.command('setspawn', sender => {
  spawn.set(sender.getLocation());
  sender.sendMessage(c`&bYou have set the spawn to your location.`);
});
smoky crypt
#

what did you do to the poor semicolon lol

forest pecan
#

lol

autumn tapir
#

?

smoky crypt
#

is it the greek meme

smoky crypt
forest pecan
#

yes

autumn tapir
#

oh

#

my plugin's goal is to let you handle spigot stuff with JS

#

you can easily create commands for stuff like spawn, warps, kits with the storage system

#

it abstracts away serialization and provides a simple interface

smoky crypt
#

i dont like js, but thats just an opinion dont kill me

obtuse gale
#

Ooh come on

#

Don't you love how everything is implicitly converted into strings?

#

<:

ocean quartz
surreal quarry
#

lol

onyx loom
#

kotlin... bad... java... good...?

ocean quartz
#

Never

onyx loom
#

🙂

steel heart
#

sin

#

at least ts

tawdry ore
#

do u guys know how to make a flat nether

steel heart
#

Ye

#

Make it flat

static zealot
#

ye lol

#

ez pz

obtuse gale
#

okay someone tell me why do I do this to myself

#

some time ago I had someone messaging me for a commission, and, y'know, I did the plugin, couple bugfixes here and there, and it's working perfectly right now

#

and I made this wonderful, abstract serializable config system I'm very proud of I made myself, working fine and all

#

and this dude comes and asks me to make a single, miniscule change to the plugin, that had absolutely nothing to do with the config system, no link between them whatsoever

#

and I go

#

"yep, this is the perfect time to REDO THIS SHIT ENTIRELY"

#

;-;

#

am I a masochist or something

#

k thx rant over

ocean quartz
#

Yup relatable, i needed to add something to my lib and tbh i'll rewrite the entire system to be better

static zealot
#

xD

#

I made a small plugin once for a guy for like 15 or 20 idk and I'm already at version 1.6 lol

#

3 of those updates was just me randomly sending him a message that I added new shit to it.

#

I was very bored lol

obtuse gale
#

lmfao

static zealot
#

and it didn't go 1.1-1.2-1.3 btw xD

#

IT HAD 1.1, 1.1.1, 1.1.2 Xd

#

Not to ten and not always

#

but yeah

ocean quartz
#

Anyone know why the fuck Kotlin main runs in the Gradle console instead of the normal run in IJ?

static zealot
#

no

steel heart
#

@main grotto oh you're here already

#

so basically kotlin is better than java

#

simple

obtuse gale
#

lol

main grotto
#

Wait what

static zealot
#

WAIT does he still want us to crusade?

main grotto
#

Is this the discord

obtuse gale
main grotto
#

the discord

steel heart
#

yes

#

the ultimate kotlin discord

obtuse gale
#

This discord, unlike the spigotmc, isn't full of braindeads lmfao

steel heart
#

unlike paper isnt toxic

static zealot
#

ok

obtuse gale
#

holy shit I stg every time I take a peek inside the help-development channel I get cancer

main grotto
#

Ahah kotlin bad Scala OP

static zealot
steel heart
#

haskell op

#

🤡

distant sun
forest pecan
#

i thought for a second you meant why the fuck IJ eats my arm xD

normal talon
#

Bruhh

tawdry ore
#

is there a way with multiverse to make a world a custom block with a bedrock floor

forest pecan
#

custom generators

#

i think they included a way so you can add your own custom generators

#

i remember that

ocean quartz
obtuse gale
#

specially when opening Materials.java

#

lol

ocean quartz
#

Yup

obtuse gale
#

idk dude, that shit makes it skyrocket

ocean quartz
#

Ayy managed to fix the run issue

obtuse gale
#

ok

obtuse gale
#

I wanna learn Js I wanna learn python I wanna learn c# I wanna learn more java i wanna learn bootstrap I wanna learn more css too much to learn

remote goblet
#

I want to learn C#/C++, Ruby, Python, html, css, go, swift, and Spanish

obtuse gale
#

First Spanish, then C++

remote goblet
#

specifically spanish

obtuse gale
#

ikr

prisma wave
#

Uh oh

obtuse gale
#

I think imma gonna learn js just so i can make website

remote goblet
#

js is easy

obtuse gale
#

Stories?

#

In the new terminal?

#

I need to switch to Linux ASAP

prisma wave
#

Windows Terminal

#

Lol

prisma wave
#

Apart from figuring out this and how to use all the tools

old wyvern
#

Stories in terminal?

prisma wave
#

Yes

#

An amazing idea

old wyvern
#

🌝

#

InstaTerm

#

TermiGram

prisma wave
obtuse gale
#

i saw some guy coding in it today making a really nice website and i wanna do that lol

prisma wave
#

I mean most of the difficulty will probably be CSS

#

Unless you use ReactVueAngularJS

obtuse gale
#

where should learn javascript

prisma wave
#

You can probably just learn as you go

#

As long as you know the absolute basics

#

var, let, const, function, == vs ===, etc

obtuse gale
#

can I like make js run in visual studio code?

tawdry ore
#

with shopguiplus, i want the shops to have a buy multiple feature, but i have a spawner shop, can i disable the buy multiple feature with that as it messes up the command

obtuse gale
#

ok im a pro now

prisma wave
#

Amazing

obtuse gale
#

does js need semicolons lol?

prisma wave
#

Optional

obtuse gale
#

Cos I thought it did but im not getting any problems without

prisma wave
#

Although I think it's a good idea to use them

#

Since otherwise it can occasionally mess up where lines end and start

#

There's some feature called "Automatic Semicolon Insertion" or something

obtuse gale
#

is nodejs just something that lets you run js outside a browser?

prisma wave
#

Kind of

#

Node is usually for running js server side, so yeah

#

But it's still using the same JS engine as chrome afaik

hot hull
#

#783231030860972032 "I need a super super simple plugin (Upgrading world borders)", ah yes cause that's just the most simplest thing to do, definetly worth the 1$

#

@grand hedge Can I suggest you add a 0 at the end of your budget

prisma wave
#

People assume not many features = simple

#

Irrespective of how difficult something is based on the API

hot hull
#

Can you even do this with the api?

obtuse gale
#

:))

hot hull
#

Why tho Aj

obtuse gale
#

why not

#

dont ask me how it works

#

im guessing the -> { are some kinda callback or something, just guessing tho

prisma wave
#

They're lambdas

#

So yeah

#

Presumably question is non blocking

obtuse gale
#

yeah

#

so does js have types or naa

prisma wave
#

yea, but it's dynamically typed

#

If you want static typing use typescript

obtuse gale
#

wdym dynamically typed

#

does that mean it can change or some shit?

prisma wave
#

It means the types aren't known until runtime

#

Whereas static typing knows the type of every value so it can do type checking in a compiler

#

If you've ever used python, that's dynamically typed too

#

Or most basic languages

#

Because it's easier to learn

#

Whereas java and kotlin are obviously static

obtuse gale
#

yeah....

#

whats something like this

#
const something = () => {
  // Like code here
}```
#

is it like a function in a variable or something?

hot hull
#

COC anyone?

obtuse gale
#

i will

prisma wave
#

it's a lambda assigned to a variable yeah

obtuse gale
#

so is that something like ()->(Unit) or whatever in kotlin?

prisma wave
#

Imagine ```kotlin
val something = { }

hot hull
#

sPaCeS

prisma wave
#

Yes

obtuse gale
old wyvern
obtuse gale
#

just me or is the website taking its sweet time?

hot hull
#

@distant sun fingerguns

old wyvern
#

internet issues?

obtuse gale
#

vsc feels really clean and smooth to use

#

yeah maybe

#

i mi ght try and use js for this

old wyvern
#

Alrighty

obtuse gale
#

since im basically already a pro amirite

hot hull
#

We waiting on anyone else?

old wyvern
#

bm?

#

@prisma wave

hot hull
#

I'd assume he's at school

old wyvern
#

ah

#

nvm then

#

start

obtuse gale
#

bruh maths

prisma wave
#

Free period soon so might join then

hot hull
#

Goddamn it, didn't check all the test cases ;C

old wyvern
#

welp

#

share code

prisma wave
#

Send code here I wanna see

old wyvern
obtuse gale
#

we have problem

old wyvern
#

?

hot hull
#

Let me know when everyone's done, studying history in the meantime fingerguns

quiet depot
#

history

#

what for?

hot hull
#

Because I have an exam?

quiet depot
#

why'd u choose history

obtuse gale
#

done

quiet depot
#

history is big lame

hot hull
#

I didn't

prisma wave
#

What history

old wyvern
quiet depot
#

oh you can't choose your subjects over there?

obtuse gale
#

whyd i do it such a weird way lol

hot hull
#

Piggy, I live in not shitty educational land, not aussie land

prisma wave
#

I was gonna take history

obtuse gale
#

looking at yugis way makes alot more sense

distant sun
#

lol pig

#

you cant choose shit here

quiet depot
#

that's wack

quiet depot
#

but i mean it's all free for u guys so don't complain ig

distant sun
#

like, literally

old wyvern
#

free education?

quiet depot
#

yeah europeans don't pay for that shit

hot hull
#

I mean it's kinda wack, since I'm studying Mechanical Engineering :kek:

old wyvern
#

damn

quiet depot
#

even uni

#

not just high school

prisma wave
#

Free uni 😭

distant sun
#

imagine if the system was also good ...

old wyvern
#

o.o

prisma wave
#

Imagine

hot hull
#

Join clash piggy

quiet depot
#

i need to remember quotes i've got an english exam tomorrow

distant sun
#

though doesn't UK give a loan for studies?

prisma wave
#

yeah

quiet depot
#

loan != free

#

not even close

prisma wave
#

Used to be a grant but not anymore

distant sun
#

yea we don't have that

hot hull
#

loans are a bitch

prisma wave
#

^

distant sun
#

well yea I know but is better than nothing

hot hull
#

Especially with what's recently going on in the world

quiet depot
#

nah i can't be fucked to do this coc

prisma wave
#

Something to do with square numbers

#

Cba to do this on mobile lol

quiet depot
#

gaby how is a loan better than free education lol?

hot hull
#

Another one, cause this one wack?

#

is better than nothing
Piggy ^

old wyvern
#

Not doing the other one?

hot hull
#

It's wack

old wyvern
#

oh ok

hot hull
#

Too early for that much math

old wyvern
#

13 more mins to Java class oof

quiet depot
#

anyway yugi they may have free uni

#

but they've also got super high taxes

#

so it all adds up

old wyvern
#

Like how much percentages?

quiet depot
#

nearly 60% income tax for belgium

old wyvern
#

oh god

quiet depot
#

yeah lol

hot hull
#

37 or some %

quiet depot
#

when do you have to start paying taxes frosty?

#

at a certain amount of income, or as soon as you have an income?

hot hull
#

I'd assume as soon as you have income, but not sure, they didn't teach us shit on this at school so no clue fingerguns

quiet depot
#

in aus it's like 18k before you start paying income tax

distant sun
#

but hey @hot hull you know math and history

hot hull
#

ikr!

old wyvern
#

MiToChoNDriA

hot hull
distant sun
#

ah and biology

hot hull
#

Join weebs

obtuse gale
#

dont we already have a game goign

hot hull
#

That one was wack

distant sun
#

frosty noob

old wyvern
#

Everyone else left that

obtuse gale
#

it was easy lol

prisma wave
distant sun
#

lol

obtuse gale
#

just a list of each numbers times itself

quiet depot
#

yeah but bm 12.5k for you is 25k for me

obtuse gale
prisma wave
#

True lol

distant sun
#

nah we pay 25% of our salary for 'health inssurance'

#

notice the quotes

hot hull
#

Better than having to pay like 20k to ride the weewoo wagon

distant sun
#

do what

quiet depot
#

what percentage is it bm?

#

18k - 45k is 19% income tax

obtuse gale
#

tf is this

prisma wave
#

I have no idea

obtuse gale
#

howm i meant to do this lol

prisma wave
#

But probably similar

obtuse gale
#

i couldnt do this in java

quiet depot
#

post question aj

obtuse gale
#

like ik what it wants me to do

prisma wave
#

You can probably bodge something together pretty easily

quiet depot
#

uh

prisma wave
#

join all the words together without a separator, and just group into different amounts

quiet depot
#

split into characters

#

use Lists.partition

#

join by line

#

ez

prisma wave
#

Can't use guava 🥲

quiet depot
#

oh and trim

#

just copy guava source

#

or find an os util

prisma wave
#

lol

#

It's probably only a few lines

obtuse gale
quiet depot
#

yeah so the problem there is that you didn't do exactly what I said

#

meaning it didn't work

obtuse gale
#

fine ill do what u said

#

idk what u mean lol

quiet depot
#

ok

old wyvern
#

imperative approach is pretty simple for that

prisma wave
#

yeah this is easier imperatively

old wyvern
#

I tried windowed first and it ended up cutting the remainder portion

prisma wave
#

Whereas most COC stuff is easier to do functionally

old wyvern
#

mhm

prisma wave
#

or declaratively*

hot hull
#

Gosh darn spaces

obtuse gale
#

time to google code

old wyvern
#

|| sentence.filter { it != ' '}.forEachIndexed { i, it ->
print(it)
if ((i+1) % col == 0) {
println()
}
} ||

hot hull
#

ew Yugi

#

ew

old wyvern
hot hull
#

Share code Gaby

distant sun
#

ok

quiet depot
#
final int size = 5;
final List<Character> chars = Arrays.asList(input.trim().chars());
final List<List<Character>> partitions = new ArrayList<>();

for (int i = 0; i < chars.size(); i += size) {
    partitions.add(chars.subList(i, Math.min(i + size, chars.size())));
}

System.out.println(String.join("\n", partitions));```
#

I think

obtuse gale
#

I can get the hello then my thing dies

hot hull
#
        for (int i = 0; i < sentence.length(); i++) {
            if (i + col > sentence.length()) {
                System.out.println(sentence.substring(i));
            } else {
                System.out.println(sentence.substring(i, i + col));
            }

            i += col - 1;
        }
obtuse gale
#

imma just submit lol

quiet depot
#

aj try mine

old wyvern
#

If they added an execution time limit to these it would have been lit

obtuse gale
#

im using js lol

old wyvern
#

maybe we should do our own version of clash of code

quiet depot
#

then don't

hot hull
#

If only the host could increase the time for some questions

old wyvern
#

Time limit is ussually fine exception for weird ass questions that even rands leave at

#

xD

#

I litrally saw a whole lobby quit from a reverse mode question

hot hull
#

ez win

old wyvern
#

lol

hot hull
#

Join Yugi

prisma wave
#

Wait for me

#

1 sec

obtuse gale
#

tf

hot hull
#

Find how much money will his John get ?

#

Ah yes, english!

quiet depot
#

post question

prisma wave
#

🥲

hot hull
#

Alex has two bottles for holding water. Bottle 1 can hold up to L1 liter of water .
Now it contains L2 liter of water. Bottle 2 contains L3 liter of water. he will transfer water from Bottle 2 to Bottle 1.

After transferring as much water as possible from Bottle 2 to Bottle 1,
he will get 15 coins FOR EACH litre of water left in Bottle 2
And he will give all of his money got from this to his little brother John.

prisma wave
#

tf

#

NumberFormatException ?

remote goblet
#

what sort of maths exam question

obtuse gale
#

ehh

prisma wave
#

bruh the parseInt from the example code is failing

#

what

#

how

obtuse gale
#

how tf

prisma wave
#

why

obtuse gale
old wyvern
prisma wave
#

nvm

#

it added a trailing space for some reason

obtuse gale
#

eyy

hot hull
#

My brain

obtuse gale
#

took me ages to work it out lol, I had to stare at the exampls for a solid minute and a half

#

oi frosty share code lol

hot hull
#

nein

prisma wave
#

finally

obtuse gale
#

((:[/:])(:-))

#

bms first line without any text

distant sun
#

more like [:))]

prisma wave
#

kotlin without any text {}<>++

obtuse gale
#

Yugis first line without text ..*

hot hull
#

Noone joining? :C

distant sun
#

enough for me

obtuse gale
#

i clciked the link but didnt join lol

prisma wave
#

im coming

obtuse gale
#

((:[/:])(:-)) vs ..*..*..*

prisma wave
#

pragmatic

#

expressive

obtuse gale
#

hol up

#

AHH

hot hull
#

uh what

obtuse gale
#

the fuck is this

hot hull
#

ohh

prisma wave
#

easy

obtuse gale
#

whats it want lol

#

googling did not help lets just say

#

"mirror.bullshit.agency"

prisma wave
obtuse gale
#

bruh whats it want me to do

#

bruh im so close to 123456

old wyvern
obtuse gale
#

dw

#

lets let fate decide my score for this one

#

0%

#

wow

#

i didnt even test if that compiles lol

old wyvern
#

its sudoku lol

obtuse gale
#

lol what

old wyvern
#

its litrally sudoku

obtuse gale
#

can u send the question again lol

old wyvern
obtuse gale
#

o

prisma wave
#

Who decided that Math/ceil should return a double

#

Wait

#

Gjfidiwjwnentntjw

#

That's not even right

steel heart
#

Why not

#

It’s more flexible perhaps

hot hull
#

UOE smh

distant sun
#

because you need it for a double?

#

and getting Integer.MAX_VALUE for 21318391276381723.25 won't help lol

quiet depot
#

anyone gonna try advent of code?

prisma wave
#

sure

prisma wave
#

perhaps

#

damn yugi 2 seconds

old wyvern
old wyvern
obtuse gale
#

did it in spirit

#

i think that works

prisma wave
#

lol

hot hull
#

Mine is fucking hideous

#

I was trying to remove the number from the list, but it kept giving me an UOE

prisma wave
#

rip

#

It's actually super simple

old wyvern
#

Almost got to 2k yesterday now back to 3k 😦

prisma wave
#

I was trying to get the average at first

hot hull
#

Yea just get the missing number

old wyvern
#

SuDoKu

distant sun
prisma wave
#
(output (first (filter (fn [c] (not (str/includes? s (str c)))) "123456789")))
``` 😍
#

could use a lambda instead of fn

prisma wave
#
#(not (str/includes? s (str %)))
obtuse gale
#

some guy i was talking to said you like html the more you use it

#

is this true lol

old wyvern
#

eh

#

no?

hot hull
#

Yugi, you joining?

old wyvern
#

uhh sure

prisma wave
#

jeez

#

drawing code

hot hull
#

Probably more exciting than that

#

uh what

obtuse gale
#

y only one example./..

prisma wave
#

what

obtuse gale
#

what is this lol

hot hull
#

I don't get the pairing part

#

Since they're scrambled?

obtuse gale
#

What are the pairs

#

Closest numbers perhaps?

hot hull
#

Seems to be a very poorly designed challenge lol

quiet depot
#

first advent of code is super ez

#

didn't even need to code anything

#

probs would've been faster to, but i'm lazy

obtuse gale
#

also it threw me a syntax error without me even changing any code lol

hot hull
#

Yea the count is missing

distant sun
#

pig

hot hull
#

Telling you, weak challenge

distant sun
#

do you have to submit the result as "xxx" (a * b) or what

obtuse gale
#

i say we skip lol

#

oh wait

quiet depot
#

the result gaby

obtuse gale
#

is it literally just ascending order for the top and bottom?

prisma wave
#

pretty much

obtuse gale
#

so say its like
7 4 9
0 4 2

we would do (4,0) (7,2) (9,4)??

prisma wave
#

yeah i think so

old wyvern
#

2 seconds

#

oof

prisma wave
#

oof

#

sort both arrays, then just associate with each other

obtuse gale
#

idk how im meant to do this lol

old wyvern
#

we almost did the exact same thing lol

#

zip

prisma wave
#

lol

#

forgot zip existed

obtuse gale
#

whats count meant to be?

prisma wave
#

that's a mistake in the example code lol

old wyvern
#

there is no count

#

ignore that

prisma wave
#

it doesn't exist

old wyvern
#

write your own input

obtuse gale
#

so what do i put in the loop then

old wyvern
#

just read the line

obtuse gale
#

or do i yeet the loops

prisma wave
#
input.nextLine().split(" ")``` do this
obtuse gale
#

idk how js works lol

old wyvern
#

yeeet

prisma wave
#

and then map to int etc

obtuse gale
#

do i need to do that twice?

prisma wave
#

yeah

#

once per line

#

first line x, second line y

old wyvern
#

readline()

#

and then use split

obtuse gale
#

how do i make it a thing of ints in js

old wyvern
#

parseInt

prisma wave
#

map with parseInt

obtuse gale
#

aight

#

rip

#

wait why is it 1 1

#

oh

#

hm

#

hm

old wyvern
#

ascending order

obtuse gale
#

yeah hm

old wyvern
#

sort em

obtuse gale
#

I thought i did

old wyvern
#

show us what you did

obtuse gale
#

array.sort(function(a,b){
return a-b
}

#

oh hold up

#

now ive just gotta fix comma

hot hull
#

Mine is enterprise code :kek:

obtuse gale
#

bruh the trailing comma

old wyvern
#

lists in competitive coding are scary

obtuse gale
#

how does one yeet the trailing comma

old wyvern
#

instant timeout

obtuse gale
hot hull
#

ikr Yugi

#

Aj, check if index is the size of the list - 1

#

And don't append it

prisma wave
#

string join

hot hull
#

or that

obtuse gale
#

rip

#

timed iut

old wyvern
#

aj array.join(', ')

#

uh

prisma wave
#

;)

#

lol

old wyvern
#

there we go

distant sun
#

@quiet depot what is your answer? xd mine is ||974304||

prisma wave
#

Spoilers

hot hull
#

Where's this advent thing

distant sun
quiet depot
#

485739

#

part 2 requires code 😦

#

might do it next week

distant sun
#

uhh 3 🤣

#

You have completed Day 1! You can [Share] this victory or [Return to Your Advent Calendar].

#

first and last :))

hot hull
#

Spoilers for advent ||I got 651651||

mellow topaz
#

So I've added ```java
import express.Express;

#

even doe It's imported

#
    public Application(Express app) {
        // Listen for GET request to "/"
        app.get("/", (req, res) -> {
            res.send("Whoaa, what are ya doing here?");
        });
errant geyser
#

But have you added Express to your pom/build.gradle?

distant sun
#

private leaderboard for hc? @quiet depot

mellow topaz
#

where is that located?

distant sun
prisma wave
#

Bruh since when did express for Java exist

hot hull
#

Feels bad

Because of an outage during the day 1 puzzle unlock, day 1 is worth no points.

distant sun
harsh aurora
#

since 2018

lunar cypress
#

except in private leaderboards, that is

hot hull
#

What?

lunar cypress
#

what?

hot hull
#

Not sure what that's supposed to mean

lunar cypress
#

??

#

I said "don't tell me you would have gotten any points without the outage"

#

because you said "feels bad"

remote goblet
hot hull
#

How could I get any points if there's an outage

lunar cypress
#

would have gotten

#

If there hadn't been an outage

remote goblet
obtuse gale
#

what should i do to learn js lol

remote goblet
#

i learnt it through discord.js

obtuse gale
#

I wanna get into more like big scale projects

#

Then again a big scale project probably isnt a good idea for learning purposes lool

#

ive had an idea

hot hull
#

Johnny, how will I know if I could've gotten any points if there's an outage and it doesn't say?

obtuse gale
#

should i learn bootstrap while im at it?

#

or sass or what

obtuse gale
#

bruh i hate css so much

lunar cypress
distant sun
#

Johnny the hater

hot hull
#

You're confusing the shit out of me Johnny, I said feels bad cause the leaderboard are down, I know I didn't get any points, what does that matter lol

distant sun
#
    for (a in numbers) {
        for (b in numbers) {
            val c = numbers.firstOrNull { a + b + it == 2020 } ?: continue
            println("$a * $b * $c = ${a * b * c}")
            return
        }
    }```
Who doesnt love some nested loops :))
hot hull
#

ew

distant sun
#

what was your approach nerd

hot hull
distant sun
hot hull
distant sun
#

"ew" and has 3 loops as well

#

🤦

hot hull
#

Shut up, gonna do it by hand next time

distant sun
#

please do