#dev-general

1 messages ยท Page 332 of 1

sudden cape
#

is this supposed to be an intersection

#

kek

lunar cypress
#

I had it so early

prisma wave
lunar cypress
#

but got lost in syntax errors

old wyvern
#

$ is pretty much <| in f# I think

#

right bm?

prisma wave
#

i think so

somber tulip
#

Can I retire the round or something i fucked up

prisma wave
#

just close the tab ig

sudden cape
#

...does performance matter

#

LMFAO

old wyvern
#

Nope

prisma wave
#

not that much

lunar cypress
#

Isn't $ just "right associative"

sudden cape
#

retainAll here I come

prisma wave
#

as long as it doesn't take 3 minutes or something you're probably fine

old wyvern
#

Apparently F# users prefer right pipe tho

#

atleast according to a few stackoverflow posts

prisma wave
#

yeah right pipe is definitely used more

#

it reads more naturally

#

map |> filter |> reduce rather than reduce <| filter <| map

old wyvern
#

Yea I guess the order makes that easier

#

closer to other languages

somber tulip
#

I should've done this with a languge i know properly

sudden cape
#

am i..

#

doing something wrong here?

somber tulip
#

I cannot convert an integer array to a "4 6 8" type thing

lunar cypress
sudden cape
somber tulip
#

fuck sake scala

sudden cape
#

this doesn't make much sense

#

this should work kek

prisma wave
#

wrong type?

lunar cypress
#

what's firstPair?

sudden cape
#

an integer array

prisma wave
#

for composition it might be better

lunar cypress
#

I've seen too much linear algebra I suppose

sudden cape
#
Cannot infer type arguments for HashSet<>
#

i'm missing something

#

plainly stupid here

#

and i hate it

lunar cypress
#

exam in 2 weeks monkaW

prisma wave
#

but to represent something similar to streams i greatly prefer |>

old wyvern
sudden cape
#

read up yugi

old wyvern
#

yea just saw

prisma wave
#

it's probably trying to make a List<int[]>

sudden cape
#

oh

#

it's varargs

prisma wave
#

yeah

sudden cape
#

you reckon it's parsing that as an int[] as the first parameter

#

ugh that would suck

#

ok

prisma wave
#

probably

sudden cape
#

guess i'm writing my own thing to convert this then

old wyvern
#

Oh yea, generics and primitives

#

๐Ÿ™‚

prisma wave
#

pretty sure that's how vararg parsing works

#

just use Arrays.stream

sudden cape
#

yeah fair

old wyvern
#

It should work it that was an object array I think

#

Try with Integer[]

sudden cape
#

KEK

#

okay time ran out

#

well

#

i did use retainAll but the spacing at the end of the output fucked me

#

wait i could have substringed

prisma wave
#

Huh?

sudden cape
#

set has a retainAll function

prisma wave
#

Ik that

sudden cape
#

but when i was looping through the set

#

i was printing out System.out.print(i + " ")

old wyvern
#

Share code

sudden cape
#

and then there was a trailing space

prisma wave
#

Oh

sudden cape
#

after the last number

prisma wave
#

String.join ?

sudden cape
#

that could have worked too kek

#

basically should have done that

prisma wave
#

Oh well

sudden cape
#

i did so many allocations yuck

#

this code bad

prisma wave
#

1 more?

sudden cape
#

nah no time

#

good play tho

prisma wave
sudden cape
#

im gonna check this out more

#

yeeeah

prisma wave
#

You just hack stuff together

sudden cape
#

i just allocated too much

#

like for example

#

i converted to an integer array

#

and then to a set

#

i could have skipped converting to an integer array completely

#

just gone to a set

old wyvern
#

bm join

prisma wave
#

1 sec

sudden cape
#

thank god my fellow employee isn't here

#

@final lichen

#

๐Ÿƒโ€โ™‚๏ธ

final lichen
#

.....

prisma wave
#

right

#

time to establish f# superiority in the functional world

lunar cypress
#

anyone else?

old wyvern
#

Maybe matt

#

@ocean quartz

prisma wave
#

mobile tho

old wyvern
#

oh true

#

I guess we can start then

final lichen
#

.

prisma wave
#

lol

sudden cape
#

kevin's gonna annoy me about that forever

#

yep

#

there it is

final lichen
#

iDRIZ

#

Idriz

sudden cape
#

so mad the caps bot stopped you

final lichen
#

Please explain to me why you do that unnecessary ...

sudden cape
#

um

#

brain lag?

final lichen
#

When did you write that lol

sudden cape
#

it was for a code challenge we just did

final lichen
#

kekw

prisma wave
#

uhh

sudden cape
#

you should join one

final lichen
#

ugliest code competition?

prisma wave
#

this is unbelievably easy

old wyvern
#

yo wut

#

xD

lunar cypress
#

wtf?

sudden cape
#

@final lichen join one

forest pecan
#

code clash?

prisma wave
#

yes

forest pecan
#

invite

final lichen
#

ok which one

forest pecan
sudden cape
#

yes code clash

prisma wave
#

this is the easiest one ever

old wyvern
#

dammit bm

lunar cypress
#

OH

old wyvern
#

tf is this xD

sudden cape
#

ig wait for them to be done

prisma wave
#

lmao

sudden cape
#

kevin is a bit of a monster

prisma wave
#

yeah this one won't take long lol

lunar cypress
#

how am i supposed to know

final lichen
old wyvern
#

I am absolutely lost

sudden cape
#

kevin

#

double allocations are how we got paper

#

respect double allocations .

forest pecan
#

wat

prisma wave
#

experiment with the relations between input and output yugi

#

thats usually what i do

#

like divide, multiply etc to try and find a link

lunar cypress
#

it doesn't have an obvious test case

prisma wave
#

yeah it's kinda obscure

old wyvern
#

oh wait

#

no

#

fuck no

prisma wave
#

but really easy once you realise

old wyvern
#

this

prisma wave
#

lmao

sudden cape
#

also how do you guys bare writing those ugly ass languages

old wyvern
#

I've been looking at this a completely different way

#

fuck me

prisma wave
sudden cape
#

read again

forest pecan
#

that super opinionated xD

sudden cape
#

if you want to

prisma wave
#

i am FURIOUS

sudden cape
#

they look ugly asf kek

forest pecan
#

if you want ugly, look at R

sudden cape
#

so many syntax weirdies

prisma wave
#

your opinion is WRONG

old wyvern
#

ffs

#

xD

forest pecan
#

ffs

prisma wave
#

๐Ÿ˜‚

sudden cape
#

idk the syntax looks so weird

prisma wave
#

which one

#

the only one that looks weird is clojure

forest pecan
#

cause you are used to one language

#

lmao

sudden cape
#

clojure yeah

sudden cape
prisma wave
#

clojure is very different

sudden cape
#

i just tend to write code in languages that have a market

sudden cape
#

so ones that don't look like they're made by a crazed maniac

prisma wave
forest pecan
#

bruh market languages rn will die later

#

new ones always appear

#

when you finish learning one, another rises

somber tulip
#

well i found out i really need to work on learning scala

sudden cape
#

well

lunar cypress
sudden cape
#

not sure if you know

prisma wave
#

lmfao

ocean quartz
forest pecan
#

XD

sudden cape
#

but languages aren't like js frameworks

#

java has been around for a hot minute

forest pecan
prisma wave
ocean quartz
#

Ah, can't right now sorry

forest pecan
#

clash

forest pecan
#

gimme

#

link

#

n0w

sudden cape
#

that's not the point :(

old wyvern
#

Oh alrighty ๐Ÿ‘

prisma wave
somber tulip
prisma wave
#

ah rip

old wyvern
#

Haskell has been around since before Java I think

sudden cape
#

yeah but haskell's market is just a tad smaller than that of java

somber tulip
#

and I'm in general stoopid at this stuff

prisma wave
#

yeah i think it has

sudden cape
#

mhm

sudden cape
#

it has

final lichen
#

Idriz hates me because I write C all day

prisma wave
#

but it's not totally obscure by any means

lunar cypress
#

clojure also passed 15 years now

prisma wave
#

nice

old wyvern
#

wow

sudden cape
#

@final lichen do i send the meme

prisma wave
#

haskell is used by facebook

forest pecan
final lichen
#

I'm the king of old languages

forest pecan
#

lmao

sudden cape
#

i can't send images

prisma wave
#

clojure is used in loads of places

#

f# is probably used somewhere

#

discord uses elixir

lunar cypress
#

F# is fairly popular as an alternative to c#

sudden cape
#

because of my low rank

#

you'll have to click it

#

kekw

prisma wave
#

lmao

prisma wave
somber tulip
#

How do you make one of those games? Like to practice by myself or something?

final lichen
#

"meMoRY wAs NoT meANt tO Be AcCEsSeD DirECtLy"

sudden cape
#

KEK

#

it's a great meme

forest pecan
#

ah yes, lazy fucks cause they cant handle memory theirselves

forest pecan
sudden cape
prisma wave
final lichen
#

stop typing new and start typing malloc

somber tulip
#

ah yeah, cheers

prisma wave
#

have you ever heard of rust?

final lichen
#

also start typing free

sudden cape
final lichen
#

^

sudden cape
#

out of memory

prisma wave
#

rust is a new up and coming language that is going to revolutionise the way we write low level code

sudden cape
#

KEK

prisma wave
#

it's pretty obscure at the moment

#

but im sure it will get more popular soon!

final lichen
#

rust's syntax annoys me

lunar cypress
#

was this the original meme? because I just remembered it and its great

sudden cape
#

no don't say that in here

#

these guys love obscure syntax for some reason

final lichen
#

I'd really rather write C++ and use the tools that exist (and my own brain) to avoid the pitfalls

sudden cape
#

go kevin

#

join COC

lunar cypress
#

rust's syntax isn't particularly obscure

final lichen
#

joined it

old wyvern
final lichen
#

how does this work exactly

prisma wave
sudden cape
#

the syntax of clojure is real weird

prisma wave
lunar cypress
#

it's called a lisp

#

it's been around longer than most programmers

forest pecan
#

what about brainfuck

prisma wave
#

lisp good

final lichen
#

Should I pick C and do the whole thing with as few branches as possible @sudden cape

old wyvern
# final lichen how does this work exactly

There are 3 modes, fastest, shortest, and reverse
Fastest:- well... solve the pastest
Shortest... well yea
Reverse... They give you the input and output, you gotta produce that

forest pecan
#

anyone forget about brainfuck

prisma wave
#

ofc not

distant sun
#

Meh @prisma wave

sudden cape
#

branchless programming kevin

#

gogogo

prisma wave
#

declarative logic ๐Ÿคค

#

wot is this

forest pecan
#

wtf

#

lol

old wyvern
#

Sounds like an mlp, but going by the history of questions, probably not it

prisma wave
#

this question is awful

sudden cape
#

@final lichen solve it or i will malloc(sizeof(your mom)) on prod

#

it'll crash our servers aha ha

forest pecan
#

it is awful

#

omg floating point multiplication

#

so horrible

final lichen
#

done

#

Literally no idea what that was

sudden cape
#

what language

final lichen
#

I did it in java

lunar cypress
#

two tests keep failing and adk why

sudden cape
final lichen
#

my solution only added 13 lines to the base code

lunar cypress
#

lol

#

I didn't change anything and when I ran a previously successful test again it failed

final lichen
#

lol

sudden cape
#

it do be like that sometimes

#

now imagine that happening in prod.

final lichen
#

yeah I unit test an anticheat

#

lol

#

F# wtf

prisma wave
#

Beautiful, isn't it?

final lichen
#

nah I like my little for loop better

prisma wave
#

No

#

Mine is pure

#

Mostly

final lichen
#

how is a for loop not pure

lunar cypress
#

oh wow

prisma wave
#

Your solution has (๐Ÿคข) state

final lichen
#

my solution works

lunar cypress
#

laziness messed me up lol

prisma wave
#

So does mine

lunar cypress
#

yep, ok, remember not to defer reads next time

final lichen
#

"state" I store the inputs, run through them all with a for loop, and then print out the result... It does functionally the same thing as whatever that map/reduce thing does except it explicitly declares what it's doing rather than hiding addition behind a function call.

prisma wave
#

abstraction is good

lunar cypress
#

actually, the opposite is the case

prisma wave
#

yeah lol

lunar cypress
#

but let's not have this discussion right now

sudden cape
#

"abstraction is good"

prisma wave
#

my solution is much more explicit than imperative logic

final lichen
#

who abstracts a for loop... sorry what?

prisma wave
#

lol

#

im possibly not qualified to talk about this

#

but declarative logic is a lot more explicit than a big for loop with lots of control flow

old wyvern
#

There we go

sudden cape
#

you're not arguing about a for loop

final lichen
#

you have the exact same amount of control flow, it's just hidden behind function calls. In fact, it's more control flow.

lunar cypress
#

imperative code is about the "how": declare a counter, check condition, increment. declarative code is about the "what": what are the transformations that are applied to the flow of data

prisma wave
#

^

final lichen
#

u += w[i+1] * x[i];
that's the "what"

prisma wave
#

no it's not

sudden cape
#

is it not

old wyvern
#

Thats the how

forest pecan
#

This was my solution

class Solution {

    private static boolean gay;

    public static void main(String args[]) {
        System.out.println("FLOATING POINT NUMBERS ARE GAY AF");
        gay = true;
        gay();
    }

    public static void gay() {
        while (gay) {
            gay();
        }
    }

}
prisma wave
#

lol

final lichen
#

lmfao

lunar cypress
#

sure, you need to know what map and reduce mean but once you have that you can express pretty much anything with it without worrying about problems that are not actually part of what you're trying to solve

final lichen
#

how is looping not a part of solving this problem

#

I honestly do not understand this

#

this is too big brain for me

sudden cape
#

you're doing the same thing

prisma wave
#

it's the same logic yeah

#

just expressed differently

sudden cape
#

you're just abstracting it behind 25 gigs of standard libraries

#

lol

forest pecan
#

reading two lines at once bigbrain

final lichen
#

I did it without one "standard library" function call

final lichen
#

(and I coded it minutes faster clapjam)

prisma wave
#

declarative languages don't care about the "how" (i.e loops, control flow, etc), imperative languages are all about writing the "how"

forest pecan
#

someone get another clash open

final lichen
#

I'll do this one in C

prisma wave
#

hmm ok

old wyvern
#

Cube needs to add the clash of code thing to barry fingerguns

prisma wave
#

rewrite barry in haskell

forest pecan
#

And a role

#

please

#

lol

old wyvern
old wyvern
prisma wave
#

johnny's got a hell of a paragraph coming

#

kinda scared

forest pecan
#

Big boy

old wyvern
#

oh god xD

final lichen
#

I'm going to get called dumb for writing a for loop, watch lol

forest pecan
#

lmao

sudden cape
#

LOL

prisma wave
#

nobody called you dumb lol

old wyvern
#

^

final lichen
#

I know I'm joking around

lunar cypress
prisma wave
#

^^

sudden cape
#

did ya solve it without a loop?

old wyvern
#

Yes

prisma wave
#

technically yes

sudden cape
#

ok so

final lichen
#

technically no, you didn't... those functions interally are just loops

sudden cape
#

what did you do

#

nono shh

lunar cypress
#

And from my experience it holds true that declarative languages are better at expressing "what" your program/algorithm actually does rather than obscuring it through implementation detail

sudden cape
#

what did you do

old wyvern
sudden cape
#

did you invoke map or reduce at any point

old wyvern
#

Yes

prisma wave
#

yes

forest pecan
#

just start

sudden cape
#

ok

#

so

forest pecan
#

pls lol

sudden cape
#

inlining those functions

#

what do you get

prisma wave
# sudden cape what did you do

there will be loops somewhere under the abstraction, yeah. but by the same logic, Java code uses malloc because it's used in the internals

sudden cape
#

mk

final lichen
#

huh?

lunar cypress
old wyvern
#

Its about how the idea is presented, not how its executed

prisma wave
#

yeah

sudden cape
#

so

final lichen
#

function calls have overhead

#

(and don't say the compiler optimizes it out because it doesn't always)

prisma wave
#

depends on the language

lunar cypress
#

I'm not talking about performance or that everything runs in exactly the same way...

old wyvern
#

That was not intended towards that kev

sudden cape
#

which language doesn't have function invocation overhead

#

that's interesting actually

prisma wave
#

haskell doesn't have stack frames for this reason afaik

#

but that might be wrong

lunar cypress
#

what I'm saying is that when I run two things on my computer they use the same language at the lowest level

prisma wave
#

yeah, declarative languages are just another layer of abstraction over assembly

final lichen
#

Then why is some code written in C usually faster than the same code written in one of these abstracted languages

lunar cypress
#

that's a quote to be framed lmao

forest pecan
#

gl

#

lol

lunar cypress
old wyvern
sudden cape
#

depends on who's writing it

old wyvern
#

Same in this case as well

sudden cape
#

i think comparing writing machine code to inlining function calls is a little misleading

final lichen
#

wait wat

#

what did I fail

forest pecan
#

lmao

#

did you not submit test cases

sudden cape
#

kekw

final lichen
#

idfk

#

I passed the first one and went "yep it's good"

forest pecan
#

bruh

#

theres negatives

#

and theres also invalid integers

#

you have to keep track off

#

lol

final lichen
#

I hate this caps bot lo

#

that's so dumb

#

"invalid integers" me:

#
    for (int i = 1; i < strlen(s); i++) {
        out += s[i] - '0';
    }

    printf("%d\n", (s[0] - '0') * out);```
forest pecan
#

you also forgot negatives

#

lol

final lichen
#

yes

#

lol

forest pecan
#
        try {
            Integer.parseInt(s);
        } catch (NumberFormatException e) {
            System.out.println("INVALID");
            return;
        }

thonk_but_cool

lunar cypress
#

that was not very good

final lichen
#

that was annoying and stupid

forest pecan
#

life is

prisma wave
#

this sucks

final lichen
#

sighs ok... I should probably get back to making a multithreaded matrix multiplication algorithm...

forest pecan
#

what does matrix have anything to do with multithreading

#

lmao

#

xD

final lichen
#

It's for a HPC class

#

I have to multiply two 10k square matrices together

#

and I have to do it the fastest

old wyvern
#

welp

prisma wave
#

ugh that was annoying

#

YES 16%

final lichen
#

The naive approach takes about 20 seconds, my singlethreaded optimized approach takes about 3 seconds, and I have a plan to get it down to about 0.2 seconds

old wyvern
final lichen
#

See y'all later ig

prisma wave
#

nah no more for me

#

adios

old wyvern
#

alrighty

#

gn

forest pecan
#

gn

winter iron
#

Yo anyone know my animations on mobile are laggy for my website, domain is senseiju.me

#

so you can see what i mean

forest pecan
#

seems good tho

winter iron
#

if u load it up on ur phone

#

idk why for me

#

it seems laggy

#

and choppy

#

on the animations

#

not as smooth as on desktop

half harness
#

Is it suspicious if a java dev with 6 years of exp has no projects on github?

#

since this person is asking to be on this dev team

#

but doesn't have any public projects

#

they said they only did private work

final lichen
#

not by itself, I have about 10 years of experience but don't have much on my public github

half harness
#

alr

#

just wondering

#

thx ๐Ÿ™‚

reef maple
#

Hi,

At the moment I use many NBTdatas* on the item.

I would like to ask what is the perfect way to store many datas on an itemstack, especially because it often need to do checks on it (custom stats), data changes (custom dura).

sweet cipher
hot heron
#

OPA/rego is jank af

forest pecan
#

Finally

#

i dont have to copy and paste my big ass paragraph

#

lol

small fern
#

moved this message sorry about that

forest pecan
small fern
#

its not really a request, I would also be making plugins for it and it would be more of a long term project. should i still put it in those channels?

forest pecan
#

Yeah

#

it fits right like the other ones

#

lol

small fern
#

alright ill re-send it there lol

half harness
#

when intellij text suddenly decides to be super blurry

#

;-;

weary epoch
#

@runic willow I didn't know u where here

hot hull
#

@old wyvern Have you gotten any work done? So I know if I should wait for you to push before I play around with it

reef maple
hot hull
#

Disgusting.

old wyvern
#

My changes are isolated to the renderer module rn

hot hull
#

Ah okay gucci

quaint isle
#

How would an epic programmer get rid off the repetition here?

if (Bukkit.getPlayer(args[0]) != null) {
    Player targetPlayer = Bukkit.getPlayer(args[0]);
    // Logic
}
hot hull
#
final Player player = Bukkit.getPlayer(args[0]);

if (player == null) {
  return;
}

// Logic
quaint isle
#

Oh I didn't know I can just assign it to a variable if it's null. Time to try that, thanky! ๐Ÿ™ƒ

jovial warren
#
[status]
max_players = 20
  [status.motd]
  text = "Krypton is a Minecraft server written in Kotlin!"
  color = "#9403fc"
    [status.motd.formatting]
    bold = true
    italic = true
```that doesn't look bad for optional component MOTDs right? (if `motd` is a string it just gets interpreted as text)
hot hull
#

huh?

jovial warren
#

I wanna support using components instead of really annoying and outdated colour codes

#

so that will be turned into a chat component from Komponent and then that gets sent to the client as JSON

#

since JSON chat components are supported in MOTDs

hot hull
#

Well yea but then it's a bitch to configure a longer string with multiple formatting types

jovial warren
#

kinda true I guess

#

so what should I do instead? legacy codes just for this?

#

and then turn those legacy codes into a component internally?

hot hull
#

idk

jovial warren
#

maybe that means it's finally time

#

time that we switch to adventure

hot hull
#

Not a complete fan of adventure but sure

hot hull
#

How dare you not like toml

steel heart
#

Itโ€™s gay af

#

Like why not use indents

prisma wave
#

how can toml be bad if rust uses it !!

steel heart
#

Good point

#

However I just think yaml is ultimately better

prisma wave
#

you have no evidence

steel heart
#

Johnny is typing whoseMan

lunar cypress
#

Furthermore, you can't determine the run time of an algorithm exactly. Sometimes, perhaps, you could in principle, but you're too dumb.
my professor is just roasting us in his script

prisma wave
#

harsh lol

lunar cypress
#

ok, tbf, it sounds worse in English

old wyvern
#

MeTh LaB

lunar cypress
#

"you" is used like "one"

old wyvern
#

What is MatLab used for btw?

lunar cypress
#

academic shit

hot hull
#

Absolutely disgusting

lunar cypress
#

running calculations, plotting functions and so on are its main uses I think

old wyvern
#

Like what kind of academic stuff? My class just went from computer vision to matlab without any explanation

#

She was like "today we start matlab" and has been going over random functions and shit

#

without explaining tf we are using this for

old wyvern
#

uh

#

I guess it has image processing libraries or something?

lunar cypress
#

probably

distant sun
old wyvern
#

๐Ÿ™ƒ

dry coral
#

Do people buy og discord accounts?

#

like 2015-2016

steel heart
#

Ye

old wyvern
#

Why lol

jovial warren
# distant sun horrible config format
[server]
ip = "0.0.0.0" # The IP for the server to bind to. 0.0.0.0 means listen on all interfaces
port = 25565 # The port for the server to bind to. Defaults to 25565
online_mode = true
compression_threshold = 256
use_native_transport = true

[status]
motd = ""
max_players = 20

[world]
name = "hardcore"
gamemode = "survival"
difficulty = "normal"
hardcore = false
view_distance = 10
```how dis bad
distant sun
#

I dont like that it doesn't use space for indent =/

steel heart
jovial warren
#

spaces make YAML too much like arrow code

#

also, spaces are optional

#

so you can still use spaces, it's just not required

#

iirc

steel heart
#

Feels like that would nullify the point of using toml

jovial warren
#

yeah putting spaces in there would

old wyvern
#

That same* thing exists in toml too right? for sub nodes

reef maple
jovial warren
jovial warren
old wyvern
#

allowed but not required

reef maple
#

so what can we save before ? only strings / numbers etc ?

jovial warren
#

no custom NBT will save before 1.14

reef maple
#

Ooh alright

jovial warren
#

dis why old versions bad

reef maple
#

So my plugin can actually work only 1.14+

jovial warren
#

unless you persist the NBT yourself then yes

obtuse gale
#
{"server":{"compression_threshold":256,"ip":"0.0.0.0","online_mode":true,"port":25565,"use_native_transport":true},"status":{"max_players":20,"motd":""},"world":{"difficulty":"normal","gamemode":"survival","hardcore":false,"name":"hardcore","view_distance":10}}
distant sun
#

ew json

obtuse gale
#

Beautiful

old wyvern
#

Imagine not using ELON

reef maple
#

Aight

obtuse gale
half harness
#

lol

obtuse gale
#

If you get and modify the NBTCompounds directly that will work just fine...

#

Because that's literally the only way you can access them lol

jovial warren
errant geyser
#

How does Docker work? Does it create its own little virtual environment? If so, how does editing files work?

jovial warren
#

Docker is basically a lightweight virtual machine environment

#

each container is it's own machine

#

but I'm not sure if Docker uses the system kernel or it gives each container it's own kernel

errant geyser
#

So how do you edit a file inside a container?

#

Do have to use docker exec?

jovial warren
#

docker exec -it container-name /bin/bash

#

then just edit the file I guess

errant geyser
#

ok cool

sweet cipher
reef maple
#

Alright, thanks

sweet cipher
#

What type of object do you need to serialize on an item stack?

reef maple
#

Some stats (arrays of : int, floats, Strings)

#

because my items have stats based on equipment location, what player class/archetype can use, current durability / maximum durability... All of that custom so it does not use the defaults minecraft stats like durability, damages, attack speed...

sweet cipher
#

You could have a map somewhere of the name of each item, then itโ€™s stats, and just store the name of the item on the object, and you can store the damage on the item also.

forest pecan
#

what lol

reef maple
#

I used it but I want that damages can be physical, magical, distant, plus they are used with some character stats, not standalone.
The items can be improved with crystals that change some stats and can be renamed.

I have a map, but it is for the items to give to players in their basic form

gilded granite
#

honestly at this point its weirder if my code works the first time than it not working

ocean quartz
#

That moment when you stop and look at your code for a few minutes and all you can think is "why the fuck did i do this"

surreal quarry
#

lmao

half harness
#

lmao

ocean quartz
#

Like, why did i make this abstract?

#

It doesn't make sense

half harness
#

lol

#

then un-abstract it fingerguns

onyx loom
#

is that mf-cmds i see

ocean quartz
#

Wondering how i can add sub sub commands
Was thinking about having each sub command have children list, but sounds too complicated

static zealot
#

why is my brain so bad at everything ๐Ÿ˜ฆ

onyx loom
#

have u tried getting a bigger brain

static zealot
#

no.

#

But seriously now. I have times when I work on something and my brain just gets blocked from everything and I know the answer is like super super simple I just can't think what it is. Usually if I just get someone and explain them what the problem is out loud my brain just gives me the answer but not all the times

half harness
#

what is your question

static zealot
#

I've solved it but it was pretty simple. just had to get a boolean to check something at the start of the operation and another boolean during the operation that changes in a special case and if both are true then stop

ocean quartz
#

Something like this could work but it's ugly af
/command sub subsub

static zealot
#

I tried visualising the problem in paint and on paper and that sometimes helps as well but this time I had to say it out loud

static zealot
#

what would the alternative be? Like this is pretty ok imo

ocean quartz
#

No alternative that i can think of
Well, in Kotlin this would look better, but i don't think the function is accessible outside the scope

static zealot
#

why? I like both just as much. maybe if you'd make the inner class in the first option use @SubCommand it might be better

surreal quarry
#

yea the first picture you sent doesnโ€™t look bad

onyx loom
#

create a @SubSubCommand annotation

gilded granite
#

man do i love it when after spending 5 hours debugging i figure out i forgot 1 semicolon

ocean quartz
onyx loom
#

๐Ÿ™‚

half harness
static zealot
half harness
#

saved mine ๐Ÿ™‚

static zealot
#

btw this is a joke.

#

learn java first

#

that will save your life even more

onyx loom
#

theres the daily kotlin circlejerk

half harness
#

lol

ocean quartz
#

I mean the IDE should be screaming at you if you forget a semicolon

static zealot
#

that too ^

half harness
#

screaming with 1000 errors

onyx loom
#

e

#

c

static zealot
#

unless it was in a string or something

half harness
#

ye

ocean quartz
#

Takes you exactly to where the issue is

half harness
#

what theme is that

static zealot
#

maybe he had a string be split by ; or something and that makes way more sense

#

his theme

#

atom dark one

#

or something

half harness
#

that's what i use though

static zealot
#

with custom font and colors

#

tho

half harness
#

oh

static zealot
#

its pretty nice

#

I use it too

half harness
#

what colors

static zealot
#

I can try and see if I can find it. he sent it in #development a while ago.

half harness
#

thx ๐Ÿ™‚

static zealot
#

my bad

half harness
#

oh

static zealot
#

@ocean quartz I assume you don't mind me sending the file here right?

#

Material UI plugin, theme is Atom one dark, but i have custom color scheme
i just use the font Fira code medium instead
File and Installation Guide:
Go to settings, editor, color scheme, then import

surreal quarry
#

i use it too

static zealot
#

welp here you go

surreal quarry
#

very good

static zealot
#

you're welcome @half harness xD

#

why ping yourself tho?

half harness
#

to remind myself later

static zealot
#

oh I see

#

makes sense

#

btw I just made a discord server and made a random channel where I put stuff I need to remember

#

with links and stuff

#

might help you as well

#

oh I forgot about my VPS lmao.

half harness
#

๐Ÿ‘€

#

speaking of VPS

#

i wonder if my bot is still up

static zealot
#

yeah I haven't even set up the ssh key yet

half harness
#

i set it up onmy rpi a long time ago

static zealot
#

I don't even remember why I stopped and at what point. fuck

forest pecan
#

Caused by: java.lang.NoClassDefFoundError: com/sun/jna/Native

#

๐Ÿฅฒ

hot hull
#

heh

jovial warren
#

this Mojang code is actually making me want to jump off a cliff

#

the rabbit trail you have to follow to find what you want is ridiculous

hot hull
#

Can I join you

#

Always wanted to go bungee jumping without a rope

onyx loom
#

sounds fun

jovial warren
#

lol

#

all I want to find out is how Mojang loads chunks

hot hull
#

chunk.load

jovial warren
#

-_-

hot hull
#

duh

onyx loom
#

he not wrong

jovial warren
#

atm, I'm just loading them all at once in a spiral to a square area of ((render distance * 2) + 1) ** 2

#

which er... kinda... almost crashes the client sometimes lol

half harness
#

load every chunk based of user render distance ๐Ÿ™‚

#

no math needed

hot hull
#

I mean don't load them at once

half harness
#

wait im confused though, why can't you just load them?

#

like

#

can't you just load the nearby chunks

hot hull
#

spiral pattern sounds probably the best btw Bardy

static zealot
#

welp I messed something up xD Permission denied (publickey,password).

ocean quartz
half harness
#

or like load 5 chunks in a tick

ocean quartz
#

That's the one he's doing lol

jovial warren
ocean quartz
#

One thing Mojang needs to do, specially in 1.17 is to only generate/render a specific distance vertically as well, 16*16*384 will start to be heavy

half harness
#

384 ๐Ÿ‘€

jovial warren
#

that's actually something it already does

#

a chunk is split into sections, 16 of them at the moment (18 for lighting purposes, but we won't go into that), and each section can either be present or, well, not present

#

and when you send chunk data packets, you send the data for as many sections as you have that have data

ocean quartz
#

Well it doesn't really matter that it's divided if it'll all generate at the same time
What i am trying to say is that there is no point in keeping -32 active if i am at +286

jovial warren
#

actually I think ik what you mean, I don't really see the point in that though

hot hull
#

Basically load the sections which are in range

#

no point in loading the entire height

jovial warren
#

but that would mean splitting the world up vertically as well, and making chunk loading apply vertically

#

which would be annoying and complicated to do

ocean quartz
#

Which would be great performance wise but probably annoying

hot hull
#

If it were easy people would've done it already

ocean quartz
#

Because for example if you are in the ground and you look at a mountain you wouldn't be able to see the top

hot hull
#

Just tell yourself that when you don't wanna do something fingerguns

jovial warren
#

not only that matt, but it actually might decrease performance

#

because every time a chunk is unloaded, you have to send an unload chunk packet for it

#

so you'll be sending even more packets

#

which means even more load on the system

hot hull
#

Interesting problem

jovial warren
#

and you'll also have to send more chunk data packets, which are fucking huge, so that'll be even worse performance

hot hull
#

async fingerguns

jovial warren
#

async just means things are done at different times, it doesn't mean things are done differently

#

the same things are still done, they're just done separately

hot hull
#

shut up

hot hull
#

Come over ๐Ÿ˜

#

Does adventure not support hex btw?

obtuse gale
#

It does

#

WhY wouldn't it lmao

hot hull
#

Either this dude stupid, or it doesn't

obtuse gale
#

What's "this dude" saying?

jovial warren
#

TextColor.color lol

static zealot
#

damn man the OVH tutorials are pretty good

#

just reseted my VPN followed them and got the ssh key and all that to work pretty fast

half harness
#

still working on ssh?!

static zealot
#

well I never got it to work

half harness
#

i got mine up fairly quickly (and took time to get the java version, but the actual connecting was quick)

#

i forgot exactly how i set it up tho

#

was too long ago

static zealot
#

and just reinstalled it all

#

now I need to see how I can get the bot on the vps

#

also idk why I said VPN last time

#

VPS is what I meant

#

I've actually tried termius. it has a 14 days free trial only tho

half harness
#

also how did u see that message

static zealot
#

well time to become a student

half harness
#

lmao

static zealot
#

ugh you didn't insta delete it ...

half harness
#

yes i did

static zealot
#

no you didn't

half harness
#

at least i thoguht id did

static zealot
#

also there's logs

#

if I really want to see what you said

half harness
#

๐Ÿคฆ logs

ocean quartz
#

Just pay $5k to a university so you don't have to pay $50 to github and get it for free instead fingerguns

prisma wave
static zealot
#

yes

half harness
#

lol

#

blitz do u prefer gui or cmd

static zealot
#

well 50$ for github, some for github pages, I save some more for VS Code some more for IJ Ultimate and maybe in the end its all worth it

prisma wave
#

gui or cli*

half harness
#

oops

#

ye but gui or cli?

static zealot
#

I'll just do it with commands

jovial warren
#

CLI

half harness
#

i prefer gui ๐Ÿ˜›

jovial warren
#

CLI superior

half harness
#

which is why everyone hates me ๐Ÿ˜”

jovial warren
#

GUI has too many clicky clicky mouse thingys for me

prisma wave
half harness
#

lol

static zealot
#

true

prisma wave
#

Aka smooth brains

obtuse gale
half harness
half harness
static zealot
#

well maybe you should

prisma wave
static zealot
#

ugh idk

half harness
static zealot
#

is it really less productive?

jovial warren
#

I got a new circlejerk

#

keyboard good mouse bad

half harness
#

ig

#

thats what bm said earlier

prisma wave
#

git commit -m "msg" is about 30x faster than clicking Git > Commit, Typing in a message > Commit

#

For example

static zealot
#

wait BM can you link the docs? can't seem to find them

prisma wave
#

what docs

half harness
static zealot
#

the digitral oncean or whatever

#

digital ocean

#

I had a stroke

half harness
#

and u still have to type message in cli

prisma wave
prisma wave
#

Yeah but you can type it immediately

half harness
half harness
jovial warren
#

one thing that sways me towards CLIs is the fact that typing in a command doesn't make you search for a button that's often hidden and or obscure or not very obvious

prisma wave
#

Git tab > Commit > click message box > commit and push

static zealot
#

oh nvm I thought you said it has docs on how to put the bot on vps xD

prisma wave
#

oh no lol

prisma wave
jovial warren
#

this is why I have an Arch Linux system lol

#

I don't use it for whatever reason, but I have it

static zealot
#

please f off

#

thanks

half harness
#

lol

prisma wave
#

๐Ÿ˜

#

is that a VPS running macos?

half harness
#

idek how sftp works

half harness
prisma wave
#

lol

#

or do you have a mac

half harness
prisma wave
#

๐Ÿ™„

half harness
#

๐Ÿคฃ

prisma wave
#

And can you precious "termius" build docker images?

#

I don't think so

half harness
#

does the image look familiar O_O

half harness
prisma wave
#

make your own screenshot

#

Coward

half harness
#

im not on my pc-

prisma wave
# half harness what are docker images

Docker is a set of products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels

half harness
#

uh

#

huh

static zealot
#

well fuck. I guess I got a vps now. will host the bot later xD

prisma wave
#

Let me give you an example

#

What if you made a program that needed jdk 11 to build, and needed some library installed to run

#

Let's say you wanted to run this program on a different pc

static zealot
#

wait I need to download java on the vps as well right?

prisma wave
#

You could install everything it needs on that other pc, but that takes time and effort

#

Or you can make a docker image for that program, which (sort of) includes everything that program needs to run and can be set up with 1 command

static zealot
#

or does java 11 come with unbuntu 20.04? I read that somewhere

prisma wave
#

possibly

static zealot
#

yeah doesn't

prisma wave
#

Check java -version

static zealot
#

for me at least

#

yeah did

#

but it gives me the commands

prisma wave
#

huh?

static zealot
#

it just spoon fed me the commands to install java 8,11,13 or 14

prisma wave
#

meaning it's not installed

static zealot
#

yeah I know

prisma wave
#

so yeah just run one of the commands

static zealot
#

just thought I'd have to google the commands

prisma wave
#

As long as you remember apt install [program] you can usually just guess it

static zealot
#

and it can't download java 11 fuck

frigid badge
#

no

#

use docker

#

blitz

#

use

#

docker

prisma wave
#

๐Ÿ™‚

frigid badge
#

don't be stupid and use docker

static zealot
#

oh BM told me to use that.

#

forgot

prisma wave
#

i would agree

#

Yes

#

Dockerize everything

frigid badge
#

yes join my docker circlejerk

#

I am proud of you bm

prisma wave
#

circlejerk is ok if the product is good :)

frigid badge
#

you are like a son to me

prisma wave
#

๐Ÿฅฐ ๐Ÿ˜ฉ ๐Ÿคค

#

my dockerfile is FROM lemmotresto

frigid badge
prisma wave
#

Whatever that's supposed to mean

errant geyser
#

I would join the docker circlejerk but I still can't figure out how to edit files inside the container

prisma wave
#

I'm not sure you should be doing that most of the time

#

But you can docker inspect it to find the path on the system usually

frigid badge
#

depends on your use

#

but you want volumes

errant geyser
#

I need to edit the nginx config to actually give it a proper certificate to hopefully fix the issue I was having yesterday

frigid badge
#

you make your own image or use a volume

prisma wave
#

docker fork ๐Ÿ™‚

errant geyser
#

Well I tried using a volume but idk how to get the config it's currently using to change it and then put back in the volume

#

I literally need to change 2 lines in /etc/nginx/templates/ssl.tmpl

#

and then do the same for postfix and dovecot, which I'd imagine is slightly more painful

frigid badge
#

the current config is:

# This file is managed by iRedMail Team <support@iredmail.org> with Ansible,
# please do __NOT__ modify it manually.
#

#ssl on;
ssl_protocols TLSv1.2;

# Fix 'The Logjam Attack'.
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
ssl_prefer_server_ciphers on;
ssl_dhparam /opt/iredmail/ssl/dhparam2048.pem;

# Use a bought SSL cert:
#   - https://docs.iredmail.org/use.a.bought.ssl.certificate.html
# Request a free cert from Let's Encrypt:
#   - https://docs.iredmail.org/letsencrypt.html
ssl_certificate /opt/iredmail/ssl/combined.pem;
ssl_certificate_key /opt/iredmail/ssl/key.pem;
#

but afaik it generates it's own certificates on first run

errant geyser
#

yeah it generates some self signed ones

frigid badge
#

you shouldn't have to change the certificates

errant geyser
#

I'm following a tutorial from linuxbabe and it says to change the certificates for nginx, postfix and dovecot to an actual certificate

old wyvern
#

Whats the LogJam Attack?

jovial warren
#

yeah use Let's Encrypt certs for that sort of stuff

frigid badge
#

fuck iredmail

#

has docker images ๐Ÿ™‚

errant geyser
#

I just need a mail server that works

frigid badge
#

to be completely honest even

errant geyser
#

I've been trying to do this for ages now

frigid badge
#

don't self host email servers

old wyvern
#

Why do you need a mail server?

errant geyser
#

Because my friendos want one for something they're working on

frigid badge
#

with email you need incredible reliability, and make sure it's not flagged

old wyvern
#

oh, I mean you could just use gsuite or something if its just for the sake of a domain

frigid badge
#

which are 2 incredible hard things

static zealot
#

well 1 step closer

#

I got docker running

old wyvern
#

o.o

errant geyser
#

I'd rather move away from GSuite, especially since the thing they're aiming to make is almost a direct replacement for it.

old wyvern
#

Ah

#

Alright

errant geyser
#

Far better ui than iredmail anyway

frigid badge
#

then use some other email service

#

you really don't want to selfhost email

errant geyser
#

It's just for some friends, nothing big or critical

frigid badge
#

still you can easily lose receiving email

#

if your server is not online the email is gone

static zealot
#

man how do you guys remember all these commands

errant geyser
static zealot
#

oh docker seems pretty cool tho

errant geyser
#

Lemmo

#

How are you like this

#

I've been messing with iredmail for a couple days now, and poste works with no extra setup in about 2 minutes

ocean quartz
#

Kotlin on Eclipse ๐Ÿ˜ฌ

hot hull
#

Yikes

static zealot
#

needs

#

:

onyx loom
#

delete this

static zealot
#

an IJ installation

unreal briar
#

been using a selfhosted mail for a year now

#

i've used it in production, clients mail me through that

#

aside some minor trouble, it's been fine

ocean quartz
prisma wave
#

Self hosted mail stopped me from getting a job

#

Contacted these people, they replied and said they were interested, my mail server bigger and I couldnt give them my details

#

Tragic

old wyvern
#

Finally ffs xD

#

Also bm seems I wont be able to use elixir, using it as a direct replacement for the erlang file seems to not work with the erlang module naming, tried it the way elixir does it and that leads to ejabberd not detecting the file

#

Every piece of info on this is about if you compile ejabberd from the source

#

I dont have enough knowledge of this eco system to get elixir to work here ๐Ÿ™

static zealot
#

to many commands for me ๐Ÿ˜ฆ

static zealot
#

oh fuck yeah. Now I really messed up xD Permission denied (publickey).

stuck harbor
#

meh

static zealot
#

I can't connect to the dedi anymore

#

because I messed with the keys

stuck harbor
#

re enable password login

static zealot
#

how?

stuck harbor
#

go into the emergency console, most hosts have one of those

static zealot
#

from where?

stuck harbor
#

uh I just said

static zealot
#

idk about that

#

will search and see

stuck harbor
#

well there is literally no other way to get in if u disabled password auth

static zealot
#

yeah as I said I really messed up

stuck harbor
#

what host do u use?

static zealot
#

oneprovider