#dev-general

1 messages ยท Page 278 of 1

stuck harbor
#

I do enjoy gitkraken tbh

half harness
#

idek what it is

ocean quartz
#

Gitkraken is awesome

stuck harbor
#

mhm

half harness
#

whats it do?

stuck harbor
#

git

half harness
#

uh

#

but theres already github desktop

#

lol

onyx loom
#

what does gitkraken offer over hub?

stuck harbor
#

much better

#

its uh

#

better

half harness
#

๐Ÿคจ

stuck harbor
#

eh idk just google it

onyx loom
#

no ๐Ÿ™‚

#

too lazy

half harness
#

im happy ๐Ÿ˜„

forest pecan
#

most of the stuff there expires after 6 months or smthing

#

at least for the domains and some other programs

stuck harbor
#

mmm

half harness
#

What is testmail?

#

anyone used it before?

stuck harbor
#

mail API

#

not a mail service btw

half harness
#

bOrInG

ocean quartz
#

Github desktop is awful, things don't work well, the ui sucks, it's very confusing

stuck harbor
#

it's an API

forest pecan
#

yeah Github desktop is horrible

#

af

half harness
#

what about PopSQL

#

ANyone used that before?

forest pecan
#

you probably will never use them

stuck harbor
#

sql client

#

it uh

#

does sql

half harness
#

ok

#

like mysql?

frigid badge
#

google it

stuck harbor
#

eh idk I just use phpmyadmin

half harness
#

๐Ÿคท

frigid badge
#

phpmyadmin sucks ass

forest pecan
#

lol

stuck harbor
half harness
#

What does

Private builds for free while you're a student.
mean?

#

for Travis CI

stuck harbor
#

building from private repos

forest pecan
#

dont use travis

#

dont use travis

#

just dont

half harness
#

oh

#

I thought it'd be something different

forest pecan
#

use circle ci

#

so much better

half harness
#

circle?

stuck harbor
#

github actions?

forest pecan
#

its basically like an auto builder like jenkins kinda

#

thing

stuck harbor
#

I get ads for circle ci

forest pecan
#

circleci is insane

half harness
#

i wish jitpack was on github student thingy ๐Ÿ˜”

forest pecan
#

its all free as well

stuck harbor
#

but github actions is all I need

forest pecan
#

i just use circleci cause its easier to set up

#

lol

frigid badge
#

doubt

stuck harbor
#

press X

forest pecan
#

no like serious

#

it is easier to setup

stuck harbor
#

presses X

frigid badge
#

it canโ€™t be easier

#

since you have to connect circleci, you need an account etc while with gh actions all you need is to place a yaml file in your repo

forest pecan
#

you do that for circleci too

#

lol

frigid badge
#

you do that for every public pipeline service

forest pecan
#

it provides better analytics and more reliable than gh actions

frigid badge
#

but gh having it integrated is easier than using a third party service

#

sure it might be better than gh actions (idk since I havenโ€™t used circleci). But it wonโ€™t be easier to setup

stuck harbor
#

github has a monopoly

#

monopoly bad

frigid badge
#

it doesnโ€™t

#

it does not have a monopoly whatsoever

forest pecan
#

Eh i mean i just connect and i just add a config and its done

half harness
forest pecan
#

and connecting isn't too long tho

frigid badge
#

you are forgetting about azure, gitlab etc

#

Iโ€™m not saying it takes ages

forest pecan
#

does gitlab have something similar to gh actions?

frigid badge
#

All Iโ€™m saying is that your argument is incorrect since it cannot be easier than gh actions

frigid badge
prisma wave
#

isn't gitlab's main selling point that it's git + ci in 1 place?

hot hull
#

Lemmo, where my feature list

prisma wave
#

although that doesn't apply so much nowadays lol

frigid badge
#

@hot hull hmm?

hot hull
#

Mobcoins

frigid badge
#

uh

hot hull
#

I need features list cause I lazy

frigid badge
#

look at the issues < 3

#

and at the config

half harness
#

i just realized i shared my serial key

fringe mountain
half harness
#

can u like delete it from logs ๐Ÿ˜„ pls

hot hull
#

My dissapointment is immesureable and my day is ruined

forest pecan
hot hull
#

@fringe mountain No

fringe mountain
#

;-;

half harness
#

pls delete from logs lemmo

#

and frosty

#

:c

forest pecan
hot hull
#

No can do dkim

half harness
#

oh

#

next thing I know it says "Currently this serial key is activated on 1 computer(s)"

fringe mountain
#

๐Ÿ‘

hot hull
#

Hippity hoppity your ssh key is now my property

forest pecan
#

dkim when are you going to show us your social security number?

half harness
forest pecan
stuck harbor
#

stand and deliver

frigid badge
#

@half harness If isnโ€™t in the logs as far as I can see on mobile

stuck harbor
#

I want ur gpg and ssh keys

forest pecan
#

give me your ip address

hot hull
#

Gpg?

forest pecan
#

let me ddos you

frigid badge
#

0.0.0.0

hot hull
#

Pulse, sure lemme dm

forest pecan
stuck harbor
#

127.0.0.2!

frigid badge
#

lmao

hot hull
#

Boutta get ddosed

forest pecan
#

actually shows ip

#

lmao

stuck harbor
#

meh my IP is just on the internet

hot hull
#

I mean I'll show you mine as well if you want

forest pecan
#

lol

stuck harbor
#

I reboot my router all the time to stop getting poofed

forest pecan
#

yea

half harness
#

oh

#

i never do

stuck harbor
#

and I use IRC a lot lol

#

so getting my IP is easy

half harness
#

all free vpns are slow ๐Ÿ˜ฆ

#

so i never use vpn

hot hull
#

Mine traces back to the actual data center if you check the location, so it looks like I'm gaming from the isp ๐Ÿ˜Ž

forest pecan
#

yo dkim mind if you could host a server at port 25565 on your ip? I got a surprise

#

jkjkjkkjjk

#

lol

stuck harbor
#

I need a good IRC bouncer tbh

frigid badge
#

literally depends on your isp if they change your wan ip

#

upon a reboot

forest pecan
#

slovenia -> slow

half harness
#

oh btw that ip was fake

#

just saying so everyone knows ๐Ÿ™‚

forest pecan
#

o lol

half harness
#

something called iNsPeCt eLeMeNt

obtuse gale
#

k

hot hull
#

@forest pecan Did you just insult slovenia you lil shit

forest pecan
#

yes

steel heart
#

is angular good?

#

vue vs react vs angular

stuck harbor
#

react all the way baybee

steel heart
#

is it better?

stuck harbor
#

imo

steel heart
#

justify :[

stuck harbor
#

good

steel heart
#

bruh

#

joe mama

prisma wave
#

react is functional

#

sooooooooooo

#

๐Ÿ™‚

steel heart
#

isnt angular oop styled?

ocean quartz
#

React is pretty nice

lunar cypress
#

I gotta try out react some time

#

With clojure of course

surreal quarry
#

create-react-kotlin-app

prisma wave
steel heart
#

then thats the way to go

#

imperative

#

mutable

#

:]

forest pecan
#

@half harness you better not be watching those codedred tutorials

half harness
#

um

forest pecan
#

i searched one up as a joke and it was horrible af

#

lmao

half harness
#

well i wont be using eclipse anymore

forest pecan
#

the first tutorial had 100k views but a Main.java

#

lol

half harness
#

with intellij ultimate ๐Ÿ˜„

forest pecan
#

well its basically free if you are a stduent

half harness
forest pecan
#

kek

#

yeah

half harness
#

๐Ÿ˜

forest pecan
#

pls piggy someone

#

add it

half harness
#

it has to be a faq

forest pecan
#

it would be soo good

#

โค๏ธ

half harness
#

iirc staff can add it

#

make matt add it ๐Ÿ˜„

forest pecan
#

yo

half harness
#

or blitz

forest pecan
#

who wants to play the ping pong game?

half harness
#

@forest pecan

forest pecan
#

@half harness

half harness
#

@forest pecan ||ima get muted for this||

forest pecan
#

@half harness || me 2||

half harness
#

@forest pecan ||oh well, it was fun while it lasted||

forest pecan
#

@half harness || its ok||

steel heart
#

y u hate urself lol

half harness
#

๐Ÿคฃ

forest pecan
#

@steel heart ||gae||

steel heart
#

P(x) : x == gay
P(gae) -> false

#

noob

half harness
#

wot is dat

steel heart
#

joe mama

#

:]

half harness
#

i should be this server admin

steel heart
#

pulse

eager fern
#

what is going on

steel heart
#

teach him

half harness
#

terfs!

forest pecan
#

wat lol

steel heart
#

!?

eager fern
#

?

forest pecan
#

yes

#

staff

#

pls add

#

faq

half harness
#

terfs u should add ?main

forest pecan
#

<333

half harness
#

yes

forest pecan
#

pls

steel heart
#

lol

half harness
#

Terfs has left the chat

forest pecan
forest pecan
#

okfoppasf

half harness
#

๐Ÿ˜ฎ

#

thats

#

very

#

sudden

#

๐Ÿ˜ฑ

forest pecan
half harness
#

๐Ÿ™€

forest pecan
steel heart
#

helpchat admins be like

half harness
#

:ban:

#

Pls don't ban ||not me tho||

forest pecan
#

Terfs: obanos
Piggy: ๐Ÿฅ“
Funny: ๐ŸงŠ

Hotel? Trivago

steel heart
prisma wave
steel heart
#

idk

#

my imaginary syntax

forest pecan
#

yo conclure can i see

#

my thicc consumer

#

again

steel heart
#

predicate wanna be

prisma wave
#

ah

#

looks vaguely similar

steel heart
#

yes, the unsimilarities are caused by keyboard

steel heart
#

thrice

prisma wave
#

source file or compiled file?

forest pecan
#

right

steel heart
#

die tonce then

obtuse gale
forest pecan
#

yea lol

obtuse gale
#

lmao

steel heart
#

dfihupsa

obtuse gale
#

aspuhifd

steel heart
#

ohipawรค

#

hah beaten

forest pecan
#

my uwu

#

is superior

steel heart
#

no

#

its mine

obtuse gale
forest pecan
steel heart
#

lol

forest pecan
#

lmao

steel heart
forest pecan
obtuse gale
forest pecan
#

dam

#

lmao

steel heart
half harness
#

Is it safe to uninstall Intellij?

#

like will i lose anything

old wyvern
half harness
#

thx

#

bc i want to get rid of intellij community

obtuse gale
#

why would you uninstall ij

half harness
#

and get intellij ultimate

obtuse gale
#

hmm... sus

half harness
#

._.

#

I just said-

#

so that i dont accidentily open community ๐Ÿ˜„

#

uhhhh how do i activate

#

nvm

#

how do I import settings?

#

nooo

#

does uninstall delete theme

#

:C

#

time to spend the next hour configuring

#

also src isn't showing in project

#

the file is there tho

#

and these buttons

#

arghhh

#

I fixed the second issue, but the super big thingy is driving me crazy

#

welp i just made tab height 16 and it worked

#

whats a profiler ๐Ÿ‘€

obtuse gale
steel heart
#

bruh

#

google style uses 2 indents

obtuse gale
#

2 spaces yeah

half harness
#

that's.... a lot

surreal quarry
#

I know kotlin has like private get / private set, is there anything like private modify or private mutate

I'm working on a Hologram thing and the pages are stored in a MutableList<HologramPage>, but adding to that has some more logic than simply using the list.add method, so i wanna make sure people can't modify it, but they should be able to access the data.

would it be better to make it a var with a private setter and just a List as opposed to a MutableList

old wyvern
#

define a separate property that provides a immutable list instead

surreal quarry
#

oh smart

#

thanks

old wyvern
#

๐Ÿ‘

obtuse gale
#

๐Ÿ‘Ž

forest pecan
#

omGOmg

#

SymmEtyy

#

Soo C00ol

hallow crane
#

jitpack is shit

#

it doesnt work

quiet depot
#

no shit

#

do you have a vps?

#

or server of any sort?

#

it looks nice

forest pecan
#

You can actually host a maven repo on github i think?

#

its shitty but it gets the job done

obtuse gale
#
public abstract class BaseController<T, S extends JpaRepository<T, Long>> {
    private final S repo;

    public BaseController(S repo) {
        this.repo = repo;
    }

    @GetMapping
    public List<T> getAll() {
        return repo.findAll();
    }

    @GetMapping("/{id}")
    public Optional<T> findById(@PathVariable("id") Long id) {
        return repo.findById(id);
    }
}

@RestController
@RequestMapping("/api/users")
public class UserController extends BaseController<User, UserRepository> {
    public UserController(UserRepository repo) {
        super(repo);
    }
}

#

Is this the best way to do this ?

obtuse gale
#

Whats the purpose of DTOs?

obtuse gale
hot hull
#

How should one approach a decompiling of my own jar which I've temporarily (hopefully) lost source to

#

I there even any point since it'll be a fucking mess, or should I just rewrite from scratch (was about 25 hours on the current progress)

quiet depot
#

@hot hull for the best results possible you'll want to use a mix of CFR and Procyon

#

I recommend running the entire thing through CFR first, and anything that doesn't look quite right, use proycon

#

It may be tempting to just run the entire thing through proycon, don't do that

#

cfr in general is a much better decompiler, but both have their strengths and weaknesses, which is why you use them together

#

and in the future, use git

hot hull
#

I was going to yes, legit that was what I was doing when the pc shat itself

#

I'm kind of tempted into just starting from scratch cause there's a few things I wanna approach differently

quiet depot
#

then do that

hot hull
#

I even documented the code ;C

quiet depot
#

should've used git from the start

hot hull
#

Yea I know

obtuse gale
#

hello i need help[

hot hull
quiet depot
#

@hot hull show whole thing

#

also update gradle

#

latest is 6.8 iirc

hot hull
#

latest mc dev sets it as 5.6.1

#

ew

#

Tell me the idea and I can help you perhaps fingerguns

#

bruh you seriously gonna copy all my plugins or what

signal tinsel
#

Ok, so

#

I've got a broken HP school computer I guess

#

It doesn't wanna boot

#

I'm 99% sure the hard drive is broken or corrupt lol

#

Anything I could do to test, without actually taking out the hard drive

obtuse gale
#

boot off a usb if you think its the drive

#

see if that owrks

signal tinsel
#

I'm at school and don't have a usb

#

But shouldn't that work 100% of the time?

obtuse gale
#

well not if the CPU is fucked or something lol

signal tinsel
#

Doubt

#

Lol

obtuse gale
#

take it to the IT guys if ur at school lol

signal tinsel
#

Yeah the teacher is calling it

#

But I'm always the first go-to because I'm better than our it

#

And everyone knows that lol

gusty fulcrum
#

Obviously not that good ๐Ÿ˜‰ can you enter the bios?

quiet depot
#

drop the computer

#

if the hdd wasn't corrupted before

#

it will be now

#

strong magnet will also do the trick

#

then you can be 100% sure instead of 99% sure

old wyvern
old wyvern
hot hull
old wyvern
#

kotlin dsl?

quiet depot
#

@hot hull show whole config

#

and try moving the import under the plugins block

hot hull
#

Figured it out

#

gradle being a hoe

quiet depot
#

k

#

did you forget the java plugin?

hot hull
#

No, I misstyped the version

obtuse gale
#

piggy ur smart do u know what i should use?

quiet depot
#

I typically opt for recreating the components I need from spring manually, versus just using spring, I may not be the right person to ask

obtuse gale
#

wdym

quiet depot
#

it means i don't use spring

#

also same applies for hibernate

obtuse gale
#

ah

signal tinsel
prisma wave
#

Seems like you should be using composition instead of inheritance aj

#

What extra details do staff members have?

obtuse gale
#

wdym composition

#

they have relations with other objects'

#

as well as some other smaller information (Strings etc)

prisma wave
#

A StaffMember contains a User, rather than a StaffMember is a User

obtuse gale
#

hm

#

oh yeah I guess that makes more sense

#

how do relations work with REST APIs?

#

Like how will spring do it by itself

prisma wave
#

Wdym?

obtuse gale
#

So say I have like a

@OneToOne
private User user;

#

what will it show when i get the user and display it

prisma wave
#

it converts it to JSON iirc

obtuse gale
#

so it will show the user object? It wont just show the ID or something

prisma wave
#

yeah

obtuse gale
#

aight

#

next question lol

#

How does one store messages from like a support ticket thing

#

like do i have a row per message?

#

bruh

#

IJ generated the setters/getters differently

old wyvern
#

wdym?

obtuse gale
#

oh im just dumb

hot hull
#

A phat middle finger to plib

[10:05:13 INFO]: > Source: com.comphenix.protocol.injector.netty.ProtocolInjector@37370112
[10:05:13 INFO]:  - Identifier: a1b72b20-97e0-476e-8a78-db9c9dcf93a4,
[10:05:13 INFO]:  - Message: Players online: 1 - World time: 8:00 PM
[10:05:13 INFO]: > Source: com.comphenix.protocol.injector.netty.ProtocolInjector@37370112
[10:05:13 INFO]:  - Identifier: a1b72b20-97e0-476e-8a78-db9c9dcf93a4,
[10:05:13 INFO]:  - Message: You have no new mail.
[10:05:13 INFO]: > Source: com.comphenix.protocol.injector.netty.ProtocolInjector@37370112
[10:05:13 INFO]:  - Identifier: a1b72b20-97e0-476e-8a78-db9c9dcf93a4,
[10:05:13 INFO]:  - Message: [ViaVersion] There is a newer version available: 3.2.1, you're on: 3.2.0
[10:05:19 INFO]: <Frcsty> asd
[10:05:19 INFO]: > Source: com.comphenix.protocol.injector.netty.ProtocolInjector@37370112
[10:05:19 INFO]:  - Identifier: a1b72b20-97e0-476e-8a78-db9c9dcf93a4,
[10:05:19 INFO]:  - Message: <Frcsty> asd
obtuse gale
#

theyre collapsed

prisma wave
#

Storing message content?

quiet depot
#

aj what r u making

obtuse gale
#

With REST apis is the general idea if you wanna update a field you just redo all the JSON data and send it to the endpoint or would I have multiple endpoints for each bit of data

#

some system kinda like paypals live chat but a little bit different

#

but thats not where im up to rn

#

im still setting up the user system atm

quiet depot
#

aj u should try making it all from scratch

#

more fun

#

unless you care about security or something weird like that

obtuse gale
#

from scratch sounds like effort

#

and im struggling enough as is

hot hull
#

poggers

obtuse gale
prisma wave
#

Depends what you mean by data

#

You'd usually have a different endpoint per "entity", which often roughly correlates to jpa entities (afaik)

obtuse gale
#

aight and then to update say like one field would I have to send the entire lot of json data?

#

or can I just update one field?

old wyvern
#

Depends on the type of request

obtuse gale
#

wdym

old wyvern
#

Like for a PUT request, you are expected to update the object in its entirety even if only changing a field.
But for a PATCH request, you can just provide a description of the changes to be made

obtuse gale
#

aight

#

also if i wanted to store a Message do i just use a row per message or?

old wyvern
#

Yea I guess so

steel heart
#

@quiet depot btw may I ask, is papi3 in need of contributions?

quiet depot
#

no

#

i mean yes

#

but probably not yet

steel heart
#

okok

hot hull
#

Is it just me or is plib stupid, I check if the packet is a server packet and it still triggers for when a player sends a message, how does that make sense?

lunar cypress
#

because there are two packets

#

client sends packet to server, server sends packet to all other clients

obtuse gale
#

wait so if

#

class User{
@MAnyToMany
Set<Ticket>

}

class Ticket{
@ManyToMany
Set<User>
}

If I add a ticket to a user do i then also need to add a user to the ticket object?

#

or can i just do it to one

prisma wave
#

you need to update both

obtuse gale
#

sounds like effort

#

dumb question here

#

Does the top one work

#

Yeah

winter iron
#

Why is it that multiverse and essentials teleport break when i have an armor stand as my passenger

#

can u not teleport with passengers?

obtuse gale
#

so is this how i have to do it to insert this test data?

#

All the saving at the bottom is an absolute nightmare

steel heart
#

@prisma wave kotlin doesn't even have ternary for variable assignment?

prisma wave
#

nah

#

it has if expressions instead

steel heart
#

bruh now I have to mutate my variables

prisma wave
#

?

#

no

#
val x = if (condition) a else b
steel heart
#

oh

#

still declarative

#

nice

winter iron
#

Ok, so you cant teleport a player with passengers so how do i get around that

prisma wave
#

if expressions

steel heart
#

stupid java

prisma wave
#

lol

steel heart
#

get da boat of minecraft

#

and den travel

stuck harbor
#

is making plugins in scala a bad idea?

steel heart
#

its great

winter iron
#

Well i have an armor stand on the players head

#

and i canny teleport

steel heart
#

ok

winter iron
#

๐Ÿ˜ฆ

#

teleport event dont get fired

steel heart
#

uhm have you looked into multiverse and essential source?

#

thats weird

#

unless you set ignoreCancelled to true it should work decenlty

prisma wave
winter iron
#

ill try that

steel heart
#

wait

#

u gonna set it to true?

#

lol thats the opposite of what I stated

prisma wave
#

apart from the fact that scala is quite a hard language

winter iron
#

meh

#

i tried without it

#

it no work

steel heart
#

jomboenumset

winter iron
#

wait

#

idk what am doing

#

shits broken

steel heart
#

Obviously

stuck harbor
#

mmm scala looks very nice

steel heart
#

its juicy

prisma wave
#

scala is basically kotlin with more functional stuff

steel heart
#

haskell :]

#

the ultimate language for programmer beginners

prisma wave
#

true!

#

everyone should start with either C or haskell

stuck harbor
#

lol

steel heart
#

Should I re assign my collection field every time and mutate it or clear it and addAll ?

jovial warren
#

not Haskell, but C yeah

stuck harbor
#

bof C

jovial warren
#

learning C will teach you about how things work at the low-level

prisma wave
#

haskell teaches you about monads

stuck harbor
#

php teaches you about bad design decisions

steel heart
#

php devs "It's the programmers fault if the code is bad"

stuck harbor
#

lol

jovial warren
#

so true haha

#

I tried learning x86 assembly the other day, now that language is a nightmare

stuck harbor
#

nah asm x86 is cool

jovial warren
#

yeah it's nice, I just couldn't quite grasp it

prisma wave
#

im not sure if teaching low level languages to beginners is a good idea or not

stuck harbor
#

well it weeds out people who are just there for the money

jovial warren
#

it avoids a situation like what I'm in, where I want to learn low-level but it's quite difficult for me to understand how memory management and stuff works

stuck harbor
#

to do low level software, u have to understand the basics of hardware

onyx loom
#

^

jovial warren
#

which I somewhat do, but I just couldn't quite understand the instructions I read yesterday

onyx loom
#

if u have basic cs knowledge then ig it could be good

prisma wave
stuck harbor
#

learning the low levels first could help avoid sloppy code

prisma wave
#

or discourage people from learning at all

stuck harbor
#

if u are trained from day 1 to be careful about memory use and stuff

jovial warren
#

anyone know any decent x86 assembly tutorials btw that don't look like they haven't been updated since the 90's? (not videos, please xD)

prisma wave
stuck harbor
#

mmm well, it depends how good u are

prisma wave
#

well

#

most high level languages are designed to be easier

#

compare that to some of the lengths you have to go to do simple things in low-level langs

#

so while low-level gives you a much better understanding of how things work (which you can then apply to high-level), i dont think it affects code quality that much

old wyvern
forest pecan
#

I actually found that high level programs are actually much slower than lower level programs more than i thought

#

like much much more slower

old wyvern
#

C is ๐Ÿคฎ

forest pecan
#

It is

old wyvern
#

Monads for life

forest pecan
#

C++ is much better than C

#

lmao

old wyvern
#

Does c++ have functors?

#

No!

#

HaSKELl

prisma wave
#

there is 0 reason to use C++ instead of rust

prisma wave
#

Not enough kids understand what partial application is

old wyvern
#

Exactly, we need a go fund me to teach young kids haskell

#

This world lacks enlightenment

prisma wave
#

It should be taught from the age of 5

quiet depot
#

haskell trash

prisma wave
#

Start with the basics like recursion and the lambda calculus

old wyvern
#

News

forest pecan
#

it old

#

kinda

prisma wave
old wyvern
#

Haskell is clearly the overlord language here

quiet depot
#

i found it in the trash

prisma wave
#

I think

quiet depot
#

therefore it must be trash

#

because why would it be in the trash if it wasn't trash

old wyvern
#

Haskell is older than java, not sure about cpp

old wyvern
prisma wave
#

I agree

forest pecan
#

C++ cannot be replaced by another language

#

tho

prisma wave
#

Rust

old wyvern
#

Thy haskell resides in ze heavens

forest pecan
#

Not really

#

One purpose is to maintain the decades of code

#

it has held up strong

prisma wave
#

hmmm

forest pecan
#

you can't replace all that code

prisma wave
#

You can

quiet depot
#

rm -rf /

forest pecan
#

lmfao

prisma wave
#

The UN should hire people to convert C++ code to rust

quiet depot
#

yes

#

and if it's not going quick enough

old wyvern
#

Interop suppourt in a lot of languages already helps a alot

quiet depot
#

they should start firing people and hiring more c++ -> rust converters

old wyvern
#

Go can interop with c/cpp right?

prisma wave
#

indeed

#

yeah I think so Yugi

old wyvern
#

Yup, so slowly but surely we can move away from those and have more abstract but efficient languages

#

For eg: Elara

prisma wave
#

Unrelated but you can look at a lot of the native function implementations in goland which is cool

#

Like assembly

old wyvern
#

๐Ÿ˜Œ

prisma wave
old wyvern
#

Ikr

forest pecan
#

elara is a moon

obtuse gale
prisma wave
#

like if you click certain things in the debugger you can browse the assembly

#

I think

#

it looks like assembly

forest pecan
#

wait

#

i have a global booster

#

when should i use it

#

lmao

old wyvern
prisma wave
#

Also unironically haskell's laziness is pretty cool, you can do things like ```haskell
replicateM 5 (putStrLn "hello")

and it works without a lambda
obtuse gale
#

nope this throws literally like a huge error

prisma wave
#

Meanwhile in kotlin you'd need a lambda because it gets eagerly evaluated

old wyvern
#

Yup, also infinite lists are a thing

obtuse gale
#

not a stack overflow, just alot of errors

prisma wave
#

Very fancy

old wyvern
#

Its like kotlin sequences but more easy to write

#

Basically just a recursive function

prisma wave
#

Yea

#

Clojure has lazy sequences too

#

I think most Functional languages do

#

So...

obtuse gale
#

Im tryna load some test data into my system,this saving method seems really inefficient, am i doing something wrong lol?

prisma wave
#

Probably

#

Don't you just save 1 thing and the rest cascades?

obtuse gale
#

I tried saving one and it was like

#

something about transient stuff

#

cant remember exactly lol

forest pecan
#

nice ticket name

obtuse gale
#

cheers

#

bm so are you saying i could like save just the ticket, and because the ticket has a user objefct and a TeamMember object it would save the team member and the user which would then save the service?

#

object references an unsaved transient instance - save the transient instance before flushing:

#

this is what it tells me

old wyvern
#

Show us the def of TeamMember

obtuse gale
#

looking it up tells me I can add something to my annotations

prisma wave
#

You probably need to set the cascading settings

obtuse gale
#

yeah

#

adding cascade = CascadeType.ALL to the annotations fixed it

#

Could not write JSON: Infinite recursion (StackOverflowError); ๐Ÿ˜”

#

bruh holy shit how wide is this error

#

look at the size of the lil bar

#

wait a stack overflows where like a depends on b which depends on a irght?

prisma wave
#

yes

#

well

#

kind of

#

that's what causes one

#

but it's not what a stackoverflow is

obtuse gale
#

I mean my Ticket class has a Set<User> and my USer class has a Set<Ticket> would that be the problem?

prisma wave
#

probably

half harness
#

stackoverflow is when the stack overflows fingerguns

prisma wave
#

make one or the other transient

obtuse gale
#

How does one make it transient

#

and what does that actually do to it

prisma wave
#

transient

#

lol

old wyvern
#

Theres the transient keyword

obtuse gale
#

thats a keyword??

old wyvern
#

๐Ÿ˜‚

prisma wave
#

it means it gets ignored from serialization

#

in java, yes

obtuse gale
#

bruh

prisma wave
#

in kotlin it's @Transient

obtuse gale
#

er

prisma wave
#

not sure which you're using

obtuse gale
#

what if i want it to be serialized .-.

#

like

#

if im getting the ticket object i want the set of users

old wyvern
#

Why do you want both to be serialized?

obtuse gale
#

well

#

I dont want it if im getting it via the user object

prisma wave
#

if you have a cylic reference then you can't serialize both

old wyvern
#

You can probably have the object turned to some sorr of identifiers for the entities

obtuse gale
#

but if i have the ticket object then i want it

old wyvern
#

Im not sure tho

#

Id assume thats possible

obtuse gale
#

tbhI dont even need the ticket object serialized when I get the user

#

If I only got the ticket ID that would suffice

#

since 90% of the time i wont even need the tickets themselves

old wyvern
#

Thats what im saying, spring can probably handle that part for you

obtuse gale
#

how can I do that

jovial warren
#

pretty much the only purpose for serialisation is things like file storage afaik

old wyvern
#

But I cant say for sure since I havent had to use spring yet

#

Its only my assumption

jovial warren
#

what you trying to do?

#

sorry, haven't fully been following lol

old wyvern
#

He has a cyclic relationship

obtuse gale
#

instead of getting the entire ticket object just get the ticket id in the user object

#

and vice versa

jovial warren
#

so you have a relational field in the tickets table that points to a user, and then relational fields in the users table that points to tickets?

obtuse gale
#

ie.

class User{
@ManyToManyh
set<ticket>
}
class Ticket{
@ManytToMany
set><user>
}

response-

user: tickets:["1", "2"]

#

very messily written lol ^

jovial warren
#

exactly what I said isn't that?

obtuse gale
#

think so lol

#

so instead of returning the entire ticket object for the user i just want the id, and vice versa

jovial warren
#

what's the purpose of this?

#

like what are you trying to store here?

obtuse gale
#

er

#

wdym

jovial warren
#

what are you trying to store here?

obtuse gale
#

tickets, users stuff like that

jovial warren
#

yeah that's not gonna cut it

obtuse gale
#

idk what you mean by what are you tryna store lol

#

like... data

jovial warren
#

what kind of data?

obtuse gale
#

The users linked to a ticket, the ticket metadata, the staff members assigned to the ticket

jovial warren
#

right, and what's the purpose of your cyclic reference?

obtuse gale
#

So that I can get all the users from the ticket, and all the tickets a user has

jovial warren
#

you can get all the tickets a user has by querying the tickets table and finding all entries where the user ID is the ID of your user in your users table

#
SELECT COUNT(*) FROM tickets WHERE user_id = some_user_id;
obtuse gale
#

and hwat have a different endpoint for it?

jovial warren
#

endpoint? what? where does that come into it?

obtuse gale
#

surely theres a way i can make it just give the id

#

im making a rest api

jovial warren
#

right, we're definitely not on the same page, can you just describe your tables for me please?

obtuse gale
#

I mean the problem is that when making a request to the endpoint, its responding with the user which is then responding with the ticket which is then responding with the user which is then responding with the ticket and so forth

jovial warren
#

ah right

obtuse gale
#

so if instead of responding with the ticket, if i could just respond with the tickets ids i could then make a request to the ticket endpoint and get the tickets from that

jovial warren
#

what exactly do you want to get here?

obtuse gale
#

wdym, I just want it to not throw the stackoverflow lol

jovial warren
#

if you want to get the list of tickets for a specified user ID, just select all the rows in the tickets table that have the given user ID

obtuse gale
#

hm ok

#

so do i keep these sets and just make them transient?

jovial warren
#

what has making them transient got to do with this?

obtuse gale
#

idk bm said something about it

half harness
#

lol

jovial warren
#

the best and only way to stop cyclic dependencies is to remove one of the dependencies

obtuse gale
#

Can I do that while keeping it a @ManyToMAny?

jovial warren
#

no clue what @ManyToMany does

obtuse gale
#

Makes it A MnaYToMAny relationship

jovial warren
#

I kinda gathered that, just gotta google wtf that is

obtuse gale
#

A many-to-many relationship occurs when multiple records in a table are associated with multiple records in another table.

jovial warren
#

right

#

guessing you're using a join table for this then

obtuse gale
#

yeah

jovial warren
#

so what's the cyclic dependency here then?

#

what query do you perform on that endpoint?

obtuse gale
#

userRepo.findAll()

#

but even if i just requested one user the same would probably happen

jovial warren
#

so that's just ```sql
SELECT * FROM users;

#

which is returning the users table

#

also, just a side note, I hope you're hashing user's passwords

obtuse gale
#

im not even that far yet lol

jovial warren
#

fair

#

anyway, what columns does user have?

#

think I can see that actually

#

is that HashSet you create the list of tickets?

obtuse gale
#

yeah

jovial warren
#

ah, gotcha

#

I see the issue

#

queries users table, needs to get list of tickets
queries tickets table, needs to get list of users

obtuse gale
#

yeah

#

now how fix lol

jovial warren
#

remove one of the dependencies

obtuse gale
#

aight

jovial warren
#

make one of them have no idea that the other exists

#

I think

#

tickets need to know who are on them, but does users also need to know they're on a ticket?

#

I remember doing this I believe

obtuse gale
#

yeah

#

i guess i could just make the /users/id/tickets endpoint

jovial warren
#

the original Punishments has every punishment refer to a user, and every history entry refer to a user, but the user didn't have any columns for history or punishments, it uses foreign collection fields

#

foreign collection fields are basically what happens when you query a foreign table for all entries with a specified foreign field matching a specified field in your table

obtuse gale
#

so basically my best bet is to remove the Hashset from say the User object then make another endpoint to get all the tickets a user has?

#

and i can do that by querying and getting all the tickets with that user

jovial warren
#

you could basically have something like this:
tickets - foreign field user_id relating to a user in the users table
users - foreign collection field that basically says "hey tickets, do you have any rows where user_id matches my id?"

#

no clue if JPA supports foreign collection fields though

prisma wave
#

it does

jovial warren
#

good

#

also, can you just do a sanity check and make sure I'm not being stupid? lol

prisma wave
#

i mean

#

idk why you're talking about queries when he's using an ORM

jovial warren
#

yeah I know, but if he doesn't know what queries it's executing internally then he probably shouldn't be using ORM imo

obtuse gale
#

so how would i do this foreign collection field thing in spring

#

or should i just make something in the TicketRepo thats like findAllByUsersId

prisma wave
#

aj what even is the problem here

jovial warren
#

he has a cyclic dependency

prisma wave
#

ik

obtuse gale
#

the problem was that when i was getting the users i was getting the tickets which was getting the users which was getting the tickets

prisma wave
#

but

jovial warren
#

users depends on a list of tickets, tickets depends on a list of users

prisma wave
#

the stackoverflow was caused by json serialization

obtuse gale
#

cos i was making a request

prisma wave
#

so why not just make one of them transient

#

like we said

frigid badge
#

it's easy

#

a ticket has a user_id

#

that's all.

jovial warren
#

but he's still going to have that cyclic dependency there @prisma wave

obtuse gale
#

a ticket can have multiple users

frigid badge
#

then a pivot table

prisma wave
jovial warren
prisma wave
#

but yeah lemmo is probably right

obtuse gale
#

tf is a pivot table

#

im so confused rn lol

jovial warren
#

I was just about to ask that lol

#

Wikipedia time I guess

frigid badge
#

a many to many relationship is created using a pivot table.

obtuse gale
#

wont making ti transient just fix it cos then its not getting serialized?

jovial warren
#

ah, that's what you mean

obtuse gale
#

So instead of giving me the whole object it would just give me theID?

jovial warren
frigid badge
#

Your pivot table here would be
user_id ticket_id
with a primary key on user_id and ticket_id combined

obtuse gale
#

i jsut wanna know how to fix the problem lol ๐Ÿฅฒ

#

how do i do that with sprogn

jovial warren
#

@JoinColumn?

frigid badge
#

You should start with designing your database and entities

obtuse gale
jovial warren
frigid badge
#

You should probably do more research into knowing actual databases and sql

obtuse gale
#

i should

prisma wave
frigid badge
#

yes

prisma wave
frigid badge
#

if you set it up correctly it does

prisma wave
#

the problems only start when you try to serialize

obtuse gale
#

ok so can i just make one of them transient and go about my day?

prisma wave
#

probably

#

which is what we were saying in the first place lol

obtuse gale
#

or is that bad practise or whatever

prisma wave
#

idk

frigid badge
#

haven't followed the chat to know what you guys were talking about so idk either lmao.

jovial warren
#

leaving that cyclic dependency in there is likely to cause you problems later

prisma wave
#

what problems?

frigid badge
#

why do you even have a cyclic dependency

obtuse gale
#

ticket has users users has tickets

jovial warren
#

users table has a list of ticket ids
tickets table has a list of user ids

frigid badge
#

yeah but you rarely use them both at the same time?

#

as in

obtuse gale
#

but when i request the user it requests the tickets, which then in turn requests the users etc etc

frigid badge
#

you always have one given to you already

#

does hibernate always retrieve every relationship?

#

probably not right

#

you should probably make it a lazy relationship or something like that

#

and then eager load it yourself whenever you know you need it

obtuse gale
#

how does one make it lazy with sprign lol

frigid badge
#

google

jovial warren
#

if you use findAll, it performs a lookup for all the users, and then hibernate goes "right, now I need all the tickets", so it loads all the tickets, which then references a list of users, so hibernate goes "right, now I need all these users"

frigid badge
prisma wave
#

hibernate is lazy by default afaik

frigid badge
#

lmfao

jovial warren
#

funny how we both found the same article and both pasted it at the exact same time lol

#

I just searched "hibernate lazy relationship"

frigid badge
#

lmfao

#

same

jovial warren
#

great minds think alike

frigid badge
#

lmao

hot hull
#

Or you could both be idiots, ever thought of that fingerguns

#

||jk no ban plz <3||

frigid badge
#

you can evade my hammer for now..

#

;p

#

wish I could have hibernate over eloquent

#

hate making migrations

onyx loom
#

wish i could hibernate forever

frigid badge
#

same

forest pecan
#

ik a trick to do that

onyx loom
#

pls share

forest pecan
#

sneak into my van and i will show u

#

i got a glock

onyx loom
#

๐Ÿ‘

#

got it boss

jovial warren
#

funny how the most widely used programming languages are the ones that are easy to learn and easy to just throw together and have work (JavaScript, Python, PHP, etc.)

#

I mean, it makes sense because human beings are lazy bastards lol

obtuse gale
#

making it lazy didnt help anything

prisma wave
#

making it lazy isnt gonna fix the stackoverflow i dont think

#

because jackson will try and lookup the tickets

obtuse gale
#

mm

prisma wave
#

which prompts them to be fetched

#

just make it transient...

obtuse gale
#

aight lol

obtuse gale
#

in both or just one

old wyvern
#

One

prisma wave
#

elara orm

old wyvern
#

Elorm

frigid badge
jovial warren
#

would ORM even work properly in Elara?

distant sun
#

I like the font lemmo

frigid badge
#

why wouldn't it

old wyvern
#

^

frigid badge
#

as long as it can connect to a database

jovial warren
#

I thought object-relational mapping would only really work with proper OOP

old wyvern
#

Elara is multi paradigmn

obtuse gale
#

making it transient just sets it to null is there a way to make it so that field doesnt exist at all lol or am i asking too much

prisma wave
#

struct-relational mapping

old wyvern
#

XD

#

SRM

#

Elara data is just persistent ๐Ÿ˜Œ no need of orms

#

You rerun and start in the left state

#

๐Ÿ˜‚

jovial warren
#

does Elara have the concept of inheritance and/or injection?

#

trying to think how you would actually do this lol

old wyvern
#

Inheritance not in the same sense

frigid badge
#

you wouldn't need inheritance or injection for it though

obtuse gale
#

ive gotta make both transient because otherwise when i request the ticket it gives the overflow

frigid badge
#

you only really need a struct

old wyvern
#

We rather copy all fields to the other struct when we say "inherit"

#

Because our typing doesnt obey inheritance

prisma wave
#

ORM doesnt have much to do with OOP objects

frigid badge
#

there's different types of ORMs

old wyvern
#

ANYthing that has equivalrnt contract of A, IS A. Structural typing

frigid badge
#

you have Active Record ORMs and Data Mapping ORMs

#

where data mapping wouldn't really require much as all you have are just plain data structures

jovial warren
#

so what? something like this? ```
struct Person {

mut String name
mut int age

}

// execute a raw SQL query and transform the results to an object?

prisma wave
#

mut ๐Ÿคข

jovial warren
#

well you want them mutable so you can update them and then shove the object back in the DB when you're finished

old wyvern
#

ew

prisma wave
#

no

#

copying

old wyvern
#

You make a new one

jovial warren
#

ah that's how you want to do it

frigid badge
#

yeah

#

for example active record wouldn't work

#

and is ugly anyway in every language imo

jovial warren
#

how you going to connect to databases? through C or Go or something like that?

frigid badge
#

just using elara whenever the std lib supports opening sockets

#

or their interop

prisma wave
#

compiling to java

#

yea

jovial warren
#

where is the stdlib btw?

old wyvern
#

Check the organization

frigid badge
#

but why would you use Elara when you can use Jaquar

old wyvern
#

Theres also a few natively implemented, but currently its just for testing purposes

jovial warren
#

wonder what I could add to this ๐Ÿค”

prisma wave
#

some guy contributed a native get request function

#

but

#

eventually id rather leave the native stuff to java

old wyvern
#

Mhm

frigid badge
#

you should work on a good package system

jovial warren
#

package system?

prisma wave
#

yeah that would be nice

#

like NPM

#

kinda

#

but without the 30GB folders

jovial warren
#

ah a package manager

frigid badge
#

not only the manager

jovial warren
#

a full build system

prisma wave
#

yeah

#

you mean more like cargo?

old wyvern
#

ELON

frigid badge
#

but it was nice talking I really should get back to work

prisma wave
#

alrighty

jovial warren
#

cya

prisma wave
#

adios

old wyvern
#

Ciao

frigid badge
#

gotta do some more php and js ๐Ÿคข

prisma wave
#

but yeah gradle is nice and all, but having to lookup a repo, dependency, and possibly other settings is a pain compared to elara install discord.elr