#dev-general
1 messages ยท Page 278 of 1
idek what it is
Gitkraken is awesome
mhm
whats it do?
git
what does gitkraken offer over hub?
๐คจ
eh idk just google it
most of the stuff there expires after 6 months or smthing
at least for the domains and some other programs
mmm
bOrInG
Github desktop is awful, things don't work well, the ui sucks, it's very confusing
it's an API
you probably will never use them
google it
eh idk I just use phpmyadmin
๐คท
phpmyadmin sucks ass
lol
:(
building from private repos
wat
oh
I thought it'd be something different
circle?
github actions?
I get ads for circle ci
circleci is insane
i wish jitpack was on github student thingy ๐
its all free as well
but github actions is all I need
doubt
press X
presses X
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
you do that for every public pipeline service
it provides better analytics and more reliable than gh actions
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
Eh i mean i just connect and i just add a config and its done
prob never gonna use unity but i have unity student plan if I will
and connecting isn't too long tho
does gitlab have something similar to gh actions?
All Iโm saying is that your argument is incorrect since it cannot be easier than gh actions
I think it does
talking only about the setup
isn't gitlab's main selling point that it's git + ci in 1 place?
Lemmo, where my feature list
although that doesn't apply so much nowadays lol
@hot hull hmm?
Mobcoins
uh
I need features list cause I lazy
i just realized i shared my serial key
Can i nice guy help me out in #general-plugins please : $
can u like delete it from logs ๐ pls
My dissapointment is immesureable and my day is ruined
LMAO
@fringe mountain No
;-;
we are less gonna help u if u ask here to get help somewhere else lol
No can do dkim
oh
next thing I know it says "Currently this serial key is activated on 1 computer(s)"
๐
Hippity hoppity your ssh key is now my property
dkim when are you going to show us your social security number?
dw ill do that tmr

@half harness If isnโt in the logs as far as I can see on mobile
I want ur gpg and ssh keys
give me your ip address
Gpg?
let me ddos you
0.0.0.0
Pulse, sure lemme dm
!!! ddosing right now !!!
127.0.0.2!
lmao
Boutta get ddosed
meh my IP is just on the internet
I mean I'll show you mine as well if you want
lol
I reboot my router all the time to stop getting poofed
yea
Mine traces back to the actual data center if you check the location, so it looks like I'm gaming from the isp ๐
yo dkim mind if you could host a server at port 25565 on your ip? I got a surprise
jkjkjkkjjk
lol
I need a good IRC bouncer tbh
slovenia -> slow
o lol
something called iNsPeCt eLeMeNt
k
@forest pecan Did you just insult slovenia you lil shit
yes
react all the way baybee
is it better?
imo
justify :[
good
isnt angular oop styled?
React is pretty nice
create-react-kotlin-app
yea afaik
@half harness you better not be watching those codedred tutorials
um
well i wont be using eclipse anymore
with intellij ultimate ๐
well its basically free if you are a stduent
the horrible main.java
๐
it has to be a faq
yo
or blitz
who wants to play the ping pong game?
@forest pecan
@half harness
@forest pecan ||ima get muted for this||
@half harness || me 2||
@forest pecan ||oh well, it was fun while it lasted||
@half harness || its ok||
y u hate urself lol
๐คฃ
@steel heart ||gae||
wot is dat
i should be this server admin
pulse
what is going on
teach him
terfs!
wat lol
!?
?
terfs u should add ?main
<333
yes
pls
lol
Terfs has left the chat
okfoppasf

๐

helpchat admins be like
Terfs: 
Piggy: ๐ฅ
Funny: ๐ง
Hotel? Trivago

is that prolog?
predicate wanna be
yes, the unsimilarities are caused by keyboard
source file or compiled file?
die tonce then

lmao
dfihupsa
aspuhifd


lol
lmao




Nope
why would you uninstall ij
and get intellij ultimate
hmm... sus
._.
I just said-
so that i dont accidentily open community ๐
uhhhh how do i activate
nvm
how do I import settings?
:c
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
anyone know how to reduce the size of that
and also make the src show
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 ๐
2 spaces yeah
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
define a separate property that provides a immutable list instead
๐
๐
no shit
do you have a vps?
or server of any sort?
someone told me about http://reposilite.com/ recently
Lightweight repository manager for Maven artifacts
it looks nice
You can actually host a maven repo on github i think?
its shitty but it gets the job done
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 ?
Whats the purpose of DTOs?
Im looking at this at the minute, and just trying to work out which strategy would be best if I want a User which is just a standard user, and then a StaffMember user which is just a User with more info, and id easily need to be able to promote Users to StaffMembers so idk
https://thorben-janssen.com/complete-guide-inheritance-strategies-jpa-hibernate/
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)
@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
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
then do that
I even documented the code ;C
should've used git from the start
hello i need help[
what use https://thorben-janssen.com/complete-guide-inheritance-strategies-jpa-hibernate/
so that I can have a User object as well as a StaffMember object where I can easily promote users to staff and StaffMember is just User with more details
huh?
latest mc dev sets it as 5.6.1
ew
Tell me the idea and I can help you perhaps 
bruh you seriously gonna copy all my plugins or what
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
well not if the CPU is fucked or something lol
take it to the IT guys if ur at school lol
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
Obviously not that good ๐ can you enter the bios?
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

"Did you try turning it off and on?"
kotlin dsl?
No, I misstyped the version
piggy ur smart do u know what i should use?
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
wdym
ah
I asked if I could
Seems like you should be using composition instead of inheritance aj
What extra details do staff members have?
wdym composition
they have relations with other objects'
as well as some other smaller information (Strings etc)
A StaffMember contains a User, rather than a StaffMember is a User
hm
oh yeah I guess that makes more sense
how do relations work with REST APIs?
Like how will spring do it by itself
Wdym?
So say I have like a
@OneToOne
private User user;
what will it show when i get the user and display it
it converts it to JSON iirc
so it will show the user object? It wont just show the ID or something
yeah
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
wdym?
oh im just dumb
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
theyre collapsed
Storing message content?
aj what r u making
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
aj u should try making it all from scratch
more fun
unless you care about security or something weird like that
im still struggling with the basics of rest apis
Depends what you mean by data
You'd usually have a different endpoint per "entity", which often roughly correlates to jpa entities (afaik)
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?
Depends on the type of request
wdym
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
Yea I guess so
@quiet depot btw may I ask, is papi3 in need of contributions?
okok
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?
because there are two packets
client sends packet to server, server sends packet to all other clients
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
you need to update both
Why is it that multiverse and essentials teleport break when i have an armor stand as my passenger
can u not teleport with passengers?
so is this how i have to do it to insert this test data?
All the saving at the bottom is an absolute nightmare
@prisma wave kotlin doesn't even have ternary for variable assignment?
bruh now I have to mutate my variables
Ok, so you cant teleport a player with passengers so how do i get around that
if expressions
stupid java
lol
diy :]
get da boat of minecraft
and den travel
is making plugins in scala a bad idea?
its great
ok
uhm have you looked into multiverse and essential source?
thats weird
unless you set ignoreCancelled to true it should work decenlty
probably not
ill try that
apart from the fact that scala is quite a hard language
jomboenumset
Obviously
mmm scala looks very nice
its juicy
scala is basically kotlin with more functional stuff
lol
Should I re assign my collection field every time and mutate it or clear it and addAll ?
I can kinda agree with that
not Haskell, but C yeah
bof C
learning C will teach you about how things work at the low-level
haskell teaches you about monads
php teaches you about bad design decisions
php devs "It's the programmers fault if the code is bad"
lol
so true haha
I tried learning x86 assembly the other day, now that language is a nightmare
nah asm x86 is cool
yeah it's nice, I just couldn't quite grasp it
im not sure if teaching low level languages to beginners is a good idea or not
well it weeds out people who are just there for the money
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
to do low level software, u have to understand the basics of hardware
^
which I somewhat do, but I just couldn't quite understand the instructions I read yesterday
if u have basic cs knowledge then ig it could be good
but, understanding it would be even harder if you had absolutely no programming knowledge
learning the low levels first could help avoid sloppy code
or discourage people from learning at all
if u are trained from day 1 to be careful about memory use and stuff
true
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)
i dont have a source for this, but i would guess low level code is usually messier
mmm well, it depends how good u are
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
Haskell only
I actually found that high level programs are actually much slower than lower level programs more than i thought
like much much more slower
C is ๐คฎ
It is
Monads for life
there is 0 reason to use C++ instead of rust
True!
Not enough kids understand what partial application is
Exactly, we need a go fund me to teach young kids haskell
This world lacks enlightenment
It should be taught from the age of 5
haskell trash
Start with the basics like recursion and the lambda calculus
Do you have a source for that claim?
Haskell is clearly the overlord language here
i found it in the trash
Haskell is older than java, not sure about cpp
You might have been mistaken
I agree
Rust
Thy haskell resides in ze heavens
hmmm
you can't replace all that code
You can
rm -rf /
lmfao
The UN should hire people to convert C++ code to rust
Interop suppourt in a lot of languages already helps a alot
they should start firing people and hiring more c++ -> rust converters
Go can interop with c/cpp right?
Yup, so slowly but surely we can move away from those and have more abstract but efficient languages
For eg: Elara
Unrelated but you can look at a lot of the native function implementations in goland which is cool
Like assembly
๐
So efficient!
Ikr
elara is a moon
Wdym?
^
like if you click certain things in the debugger you can browse the assembly
I think
it looks like assembly
O.o
Also unironically haskell's laziness is pretty cool, you can do things like ```haskell
replicateM 5 (putStrLn "hello")
and it works without a lambda
nope this throws literally like a huge error
Meanwhile in kotlin you'd need a lambda because it gets eagerly evaluated
Yup, also infinite lists are a thing
not a stack overflow, just alot of errors
Very fancy
Im tryna load some test data into my system,this saving method seems really inefficient, am i doing something wrong lol?
I tried saving one and it was like
something about transient stuff
cant remember exactly lol
nice ticket name
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
Show us the def of TeamMember
looking it up tells me I can add something to my annotations
You probably need to set the cascading settings
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?
I mean my Ticket class has a Set<User> and my USer class has a Set<Ticket> would that be the problem?
probably
stackoverflow is when the stack overflows 
make one or the other transient
yes
pretty much
Theres the transient keyword
thats a keyword??
๐
bruh
in kotlin it's @Transient
er
not sure which you're using
what if i want it to be serialized .-.
like
if im getting the ticket object i want the set of users
Why do you want both to be serialized?
if you have a cylic reference then you can't serialize both
You can probably have the object turned to some sorr of identifiers for the entities
but if i have the ticket object then i want it
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
Thats what im saying, spring can probably handle that part for you
how can I do that
pretty much the only purpose for serialisation is things like file storage afaik
He has a cyclic relationship
instead of getting the entire ticket object just get the ticket id in the user object
and vice versa
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?
ie.
class User{
@ManyToManyh
set<ticket>
}
class Ticket{
@ManytToMany
set><user>
}
response-
user: tickets:["1", "2"]
very messily written lol ^
its a ManyToMany,
exactly what I said isn't that?
think so lol
so instead of returning the entire ticket object for the user i just want the id, and vice versa
what are you trying to store here?
tickets, users stuff like that
yeah that's not gonna cut it
what kind of data?
The users linked to a ticket, the ticket metadata, the staff members assigned to the ticket
right, and what's the purpose of your cyclic reference?
So that I can get all the users from the ticket, and all the tickets a user has
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;
and hwat have a different endpoint for it?
endpoint? what? where does that come into it?
right, we're definitely not on the same page, can you just describe your tables for me please?
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
ah right
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
what exactly do you want to get here?
wdym, I just want it to not throw the stackoverflow lol
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
what has making them transient got to do with this?
idk bm said something about it
lol
the best and only way to stop cyclic dependencies is to remove one of the dependencies
Can I do that while keeping it a @ManyToMAny?
no clue what @ManyToMany does
Makes it A MnaYToMAny relationship
I kinda gathered that, just gotta google wtf that is
A many-to-many relationship occurs when multiple records in a table are associated with multiple records in another table.
yeah
so what's the cyclic dependency here then?
what query do you perform on that endpoint?
userRepo.findAll()
but even if i just requested one user the same would probably happen
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
im not even that far yet lol
fair
anyway, what columns does user have?
think I can see that actually
is that HashSet you create the list of tickets?
yeah
ah, gotcha
I see the issue
queries users table, needs to get list of tickets
queries tickets table, needs to get list of users
remove one of the dependencies
aight
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
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
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
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
it does
yeah I know, but if he doesn't know what queries it's executing internally then he probably shouldn't be using ORM imo
so how would i do this foreign collection field thing in spring
or should i just make something in the TicketRepo thats like findAllByUsersId
aj what even is the problem here
he has a cyclic dependency
ik
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
but
users depends on a list of tickets, tickets depends on a list of users
the stackoverflow was caused by json serialization
cos i was making a request
but he's still going to have that cyclic dependency there @prisma wave
a ticket can have multiple users
then a pivot table
that doesn't matter until you try and serialize it
ah right
but yeah lemmo is probably right
a many to many relationship is created using a pivot table.
wont making ti transient just fix it cos then its not getting serialized?
ah, that's what you mean
So instead of giving me the whole object it would just give me theID?
probably, but it's not going to fix the core issue
Your pivot table here would be
user_id ticket_id
with a primary key on user_id and ticket_id combined
well yes
@JoinColumn?
You should start with designing your database and entities
what
You should probably do more research into knowing actual databases and sql
i should
doesnt hibernate do that automatically?
yes
cylic dependencies in memory are fine
if you set it up correctly it does
the problems only start when you try to serialize
ok so can i just make one of them transient and go about my day?
or is that bad practise or whatever
idk
haven't followed the chat to know what you guys were talking about so idk either lmao.
leaving that cyclic dependency in there is likely to cause you problems later
what problems?
why do you even have a cyclic dependency
ticket has users users has tickets
users table has a list of ticket ids
tickets table has a list of user ids
but when i request the user it requests the tickets, which then in turn requests the users etc etc
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
how does one make it lazy with sprign lol
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"
hibernate is lazy by default afaik
lmfao
funny how we both found the same article and both pasted it at the exact same time lol
I just searched "hibernate lazy relationship"
lmao
you can evade my hammer for now..
;p
wish I could have hibernate over eloquent
hate making migrations
wish i could hibernate forever
same
ik a trick to do that
pls share
that's a PHP ORM isn't it
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
making it lazy didnt help anything
making it lazy isnt gonna fix the stackoverflow i dont think
because jackson will try and lookup the tickets
mm
aight lol
php ๐คข
in both or just one
One
elara orm
Elorm
bootiful
would ORM even work properly in Elara?
I like the font lemmo
why wouldn't it
^
as long as it can connect to a database
I thought object-relational mapping would only really work with proper OOP
Elara is multi paradigmn
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
struct-relational mapping
XD
SRM
Elara data is just persistent ๐ no need of orms
You rerun and start in the left state
๐
does Elara have the concept of inheritance and/or injection?
trying to think how you would actually do this lol
Inheritance not in the same sense
no and no
you wouldn't need inheritance or injection for it though
ive gotta make both transient because otherwise when i request the ticket it gives the overflow
you only really need a struct
We rather copy all fields to the other struct when we say "inherit"
Because our typing doesnt obey inheritance
exactly
ORM doesnt have much to do with OOP objects
there's different types of ORMs
ANYthing that has equivalrnt contract of A, IS A. Structural typing
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
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?
mut ๐คข
well you want them mutable so you can update them and then shove the object back in the DB when you're finished
ew
You make a new one
ah that's how you want to do it
yeah
for example active record wouldn't work
and is ugly anyway in every language imo
how you going to connect to databases? through C or Go or something like that?
where is the stdlib btw?
Check the organization
but why would you use Elara when you can use Jaquar
Theres also a few natively implemented, but currently its just for testing purposes
wonder what I could add to this ๐ค
some guy contributed a native get request function
but
eventually id rather leave the native stuff to java
Mhm
you should work on a good package system
package system?
ah a package manager
not only the manager
a full build system
ELON
but it was nice talking I really should get back to work
alrighty
cya
adios
Ciao
gotta do some more php and js ๐คข
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



