#hangar-dev
1 messages · Page 3 of 1
... else you could just list name-description-hex color for us to copy paste then 😂
I think they can, but are private by default (?) and noone set them to public
Ah, teams are only visible to members
everytime someone makes a pr we just have that GH head at the top lol https://i.imgur.com/WAXwRvn.png
there's visible to every org member, or only visible to team members
one of Via's members has a transparent avatar, so things like this just look awesome lmao https://i.imgur.com/rGY51Vd.png
go to sleep
in 8 hours sure
slep
sleeeeep
@spiral current thanks for the push to do GH projects, now we actually have a better plan on what we're doing 😂
:p
and a nice list of future todos
yeah, im creating issues for api paths, frontend paths rn. will be good
machine, what's your opinion on tables?
gonna have to be more specific... database, dinner, markdown... plenty of tables
100% pro dinner tables
smh
no but really, what do you mean
Organization?
Pffffff
One weekend where I don't use my PC and get drunk and stuff and suddenly we are organized?
😂 😂

times tables best tables
But we took your table, so no time table for you
🚫 table
well it's too late buddy
you expressed interest in tables which is not tolerated :^)
/s
Hopefully Hangar will be a better experience than Polymart too (their ToS has typos 🤦♀️)
Polymart also basically harassed me to try to get mcMMO on his site
Told him that it's nothing to do with me and to sod off as nicely as possible, but, like, damn
ill make sure to harras md to put essentials on hangar 😄
but yeah, idk, generally thats not a good idea, lol
you want ppl to come to you cause you are a nice platform and you got users/traffic etc
If nobody is already doing the admin/stats I would like to claim it
Go Ahead
@sly mason Polymart is selling yooniks' crap, that's how low their standards are... they're worse than MC-Market
I thought MC-Market was scraping the bottom of the barrel, but nope
So yeah, Hangar will be a much better experience, especially if no paid mods are allowed
I'll make sure to harass Mini to let me put EssX on Hangar
I have semi-ancedotal evidence that Aegis is hot garbage
And I already proved that Flamecord has no reason to exist because of the mitigation I managed to upstream into BungeeCord after much difficulty.
I heard of polymart, I don't trust anything other than Spigot. Usually something dodgy going on.
i thought polymart was that one youtube channel
👀
@solemn whale transforms how" ?
Number("2020-8-31")
NaN
parseInt("2020-8-31")
2020
maybe it thinks month day year idk, i had a fun time trying to convert a time format like that in Java to a Date
had to use Calendar and just split the date string
I was sending a List<String> to javascript which contained
just those dates, I had to add qoutes to the strings before it would see them as strings
JavaScript does stupid things with dates. It doesn't represent dates as a year starting from 0 in the Gregorian calendar, but as some offset from a year in the Gregorian calendar.
sending a List<String> to javascript
how? json? embedding in freemarker?
Pretty much Javascript's entire date/time functionality is a giant joke.
i added them to the modelandview so i guess embedding in freemarker?
In which case you'd be inserting the string 2020-8-31 into the template without quotes
Freemarker isn't magic, it doesn't know you're trying to put a string into a script vs any other part of the page
Yea, figured it was something like that
Dates didn’t start with year 0 tho. There was no year 0. Or am I misunderstanding what you said.
That’s why 2020 is NOT the start of a new decade, but Dec 31 2020 will be the last day of a decade
who was talking about decades
I have no idea
Just thought I’d bring up that lovely debate...
decads use lua??
Year 0 didn't exist, but we start counting from it.
I mean, dates are super gross and nothing ever works properly with them anyway, so whatever
Seems like there are also different ways to count decades within a calendar, so... idk
people who say 2001 was the start of the new century/2021=new decade are absolute lunatics
and that's a fact
But years arent zero indexed... there was no year 0 in the Gregorian calendar.
so? doesn't mean we should drop all that is sane 
Don't even know what JS uses, could be that they use ISO 8601:2004 in which there is a year 0.
If a decade is ten years, though, and you use a 0-9 system for decades in the Gregorian calendar, would the "first" decade then run from 1 BC to 9 AD?
Cause that's eh interesting.
A decade is just defined as a timeframe of 10 years
You can start wherever
It's just that society likes to define special decades
Yeah, that's kinda the point. If you define a decade on the calendar as a 0-9 system, such that 2010-2019 would be a decade, then with that reasoning you'd also get 1 BC to 9 AD as a decade.
Subsequently 12 BC to 2 BC would be a decade, which is interesting.
Or you just skip a year somewhere or something, but that's even more blegh
I feel like a 1-0 system makes more sense on a longer timescale, since then 1 AD to 10 AD would be a decade and 10 BC to 1 BC would be one, which aligns nicely.
Or just don't design a garbage calendar that skips zero, but whatever,
0 to 9 and 10 to 19 is nice because a decade is the period where all digits except the last one of the year are the same. I.e. all values for 198x form a single decade. Problem is what I mentioned above, since year 0 doesn't exist in gregorian calendar, you get a decade that is 1 BC to 9 AD and the decade before that would be 12 BC to 2 BC, which is stupid, because you offset the last digit by two.
With 1-0 you don't have the convenice of 198x forming a single decade, because 1980 is of the previous decade while 1990 is of the decade that also contains 1981-1989, which isn't as great, but at least around year zero, you don't run into the issue that you offset the decade when going into BC: 10 BC to 1 BC is a decade and 1 AD to 10 AD is a decade.
0 to 9 is nice for everything in AD, but the moment you go into BC I personally would go for 1 to 0, so you don't have to deal with offset decades.
confused screaming
hangar-dev intensifies
https://cdn.discordapp.com/attachments/746367733699969104/749995170099101776/unknown.png
https://imgur.com/6Nf6bEB.png 'uploads' are those plugins upload on a day?
I assume so yes. I’d have to look at ore to be sure.
im not sure what other uploads it might be referring to
Yea, neither do I, but sometimes there is some hidden stuff I dont know of
wdym hidden stuff...
the only other uploading that happens, are organizations/projects changing their avatars
oh, not really about this project (yet). But somtimes you assume something and then it happens to be something else
ok but actually, what is MVP?
minimum viable product
if you are talking about the project... To-Do is what is needed for mvp
and backlog comes after, so not stuff needed for mvp
smh chew assuming my answer was a meme like everyone else’s
Oh you actually answered
yeah, I had to ask again too cause I had no clue what the actual answer was
https://imgur.com/6Nf6bEB.png 'uploads' are those plugins upload on a day?
@solemn whale it's version uploads a day
Thanks
WHATS WRONG WITH JAVA
ReactJS / ExpressJS gang
for web dev
I made a plugin store in 3 days
I just feel like
excuse u, js is sucks... js
could always go work with the scala version :p
fuck it, ChewPlugins, Hangar rewritten in Rails
isn't react node though
yes it is @narrow verge
but once built its sending javascript to run on v8
in chrome
or whatever browser
but on a dev environment its node
whats wrong with node
terrible bloated nonsense
is jvm not "bloated" then
idk the sizes but if we talking in docker containers
the docker container needs a nodejs environment or a jvm to run on
I generally only do mc development on jvm
and use kotlin
but for all the other stuff I use node
Well we aren’t about to change hangar now...
Part of the reason it’s in Java (spring framework) is thats what mini uses professionally, part of it is so people in the Mc community can be more likely to contribute (cause plugins are in java), and partly because ore was in scala.
how so
kotlin is syntax soup
I think the jvm would scale better if the project is written correctly
but you arent building twitter
yeah @random badger I mean the frontend for reactjs
not the backend to nodejs
There really isn’t a lot of front end...
exactly
Right now, it’s just a few vue templates
I really like this
I use it since it has server side rendering on react
And we def aren’t gonna change away from that because thats actually the one thing that ore and hangar can share.
ah ok
More stuff is being moved to the front end to eventually remove the query webjar dependency. But it’s not there yet
honestly complaining about the language used is probably the least useful thing you could be doing in this channel
it's in java because people know java
unless you want to port and maintain ore yourself, your opinion is worth approximately nothing.
I just expressed sadness
that it was written in java
I know its not feasible to just
hop on over
plus every single developer in this community already knows java
Skript developers punching the air right now.
lol no
not remotely
for web dev specifically, Java's inter-thread memory sharing is faster than js's inter-process sharing
which matters
I mean I figured jvm should be faster
but I be googling
I googled more now
and there are articles going towards one side or another
it's largely task based
but generally, nodejs does nothing special and is very rarely, if ever, faster than java at a specific task
pfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffft js and speed
saying that one language is faster over another is odd in the first place but eh
js is the exception
I've built a server is Go
go is decent
which is quite liked
go is 
I looked at Rust but it doesnt seem like it is fast to write code in
like Im tryna get stuff done, and it seems to have a steeper learning curve
go is great once you learn it
yeah
I am still kinda new to that, but I use javascript for backends right now because of next.js
it has serverless functions built in
so I kinda just use that
no deployment worries, but the latency is a bit higher
this is a cool framework too, I tried it
but you guys dont like kotlin 
kotlin is decent, but bukkit's library situation is too fucked to be able to produce kotlin apis
Ive been building stuff in Kotlin a lot recently
but I agree the APIs are kinda weird champ
but I can figure it out generally because of autocomplete when using java
You just gotta know to hit Companion objects
kotlin is decent, but bukkit's library situation is too fucked to be able to produce kotlin apis
kotlin-java interop in it of itself is fucked
there are some annoying issues
I wrote a large plugin recently and have "plugins" for my plugin, and some are in java
some overloads that java accepts aren't accepted by kotlin because they're ambiguous, so you have to explicitly cast to the variant you want
it is very slow, and has had some major ish bugs for a long time
yeah some of my code was lookin weird, but I didnt know it was slow
I guess i never considered it
no no
slow compile times or sth?
ah
half and half kotlin-java projects are the worst
(that's where PEX is right now lol)
which are pure java
or pure kotlin
I did pure java modules to test if other devs can use my api
i think of kotlin like i think of lombok
don't use it in public
this is like 200 kotlin files
the compiler is really slow
but if you dont clean everytime
its quick enough
ok I dont anymore
but
this project I had other developers working with me
and they didnt know gradle
I use gradle for everything I need
gradle's compiler for kotlin is a lot faster or whatever magic it does
I think its the same compiler but
ok we should stop crowding up hangar channel 😄
:p
how do you delete someone else's message
ban them
I feel like we need to moderate this channel better, lol
If you got nothing better to contribute to this project, other than ewww java, I'll ask you to kindly troll elsewhere
Let's rewrite it on brainfuck
@solemn whale no need for custom mappers there https://github.com/PaperMC/Hangar/pull/106/commits/b429a349c59b73eca4c7c581c69d45a1b7155a8c
Ah okay, good to know! Thank you
@solemn whale just did a few small fixes on the stats.ftlh file https://github.com/PaperMC/Hangar/commit/962b1aa568e223d3c7ad09bd9a9a98073a50e2ad
Yea I can see why 😅
https://github.com/PaperMC/Hangar/commit/962b1aa568e223d3c7ad09bd9a9a98073a50e2ad#diff-c42cf1d459de670b48b9c4633f44a310L117 I miss the shit like this all the time
cause it doesn't pop out as an error
Yea, guess it was the same for me
I was looking at the admin/health and the missingFiles, do we want to check all files everytime someone opens admin/health? Or all unhealthyProjects in that list? I cant really figure it out from ore's code, not sure where the projects is from https://github.com/SpongePowered/Ore/blob/staging/ore/app/controllers/Application.scala#L147
yeah, I don't think there should be any caching on any of the admin pages
since they aren't gonna be used by everyone (only those with perms) and its important for them to have the latest information
I was looking at the admin/health and the missingFiles, do we want to check all files everytime someone opens admin/health? Or all unhealthyProjects in that list? I cant really figure it out from ore's code, not sure where the
projectsis from https://github.com/SpongePowered/Ore/blob/staging/ore/app/controllers/Application.scala#L147
@solemn whale https://github.com/SpongePowered/Ore/blob/9445350c31c59be7d96164943873bec764372fbc/orePlayCommon/app/db/impl/access/ProjectBase.scala#L119
It's an implicit from OreControllerComponents
oooh, there it is! Thank you
No problem
Do yall have an email service in mind? I just use sendgrid
how will we be able to design our plugin threads? with markdown? bbcode?
ill prob just handle the mail
markdown
great👍
bbcode is torture
markdown and html too maybe? Just no styles or script?
oh and import from github readme, very useful there too
Doesn't markdown support html anyways? I don't remember which engine I implemented
Oh, I suppose it does
Pretty sure it's just plain SMTP (at least, that's what auth uses so I assume Ore is the same)
Oh yeah for mail we can just use javas mail api
ah, i was referring to sendgrid being the actual SMTP server
Do they offer smtp? I assumed it's a fancy api
Yes, I use it
But then it's even easier and we don't need to do anything fancy
Just smtp via javas api and config
Yep, it's as simple as setting up the dns records, I don't know the pricing or plans though
ah, 100/day on free
Yeah, that's not gonna cut it
Am assuming there is already a mail server setup for the forum that we would just configure
Like, actual mailboxes and shit
fancy, hope that works out
markdown can support html, but it can be made to not support it (see github's markdown)
GitHub supports some html
I think we should do too, as long as it's save and ppl don't go crazy
Aww, why not? I can't imagine any issues would come up when allowing people to put their own custom scripts on hangar.
open a feature request....
and get banned subsequently from opening issues
pretty sure there have been pure css games that have been created. if we allow style tags, you probably can make one of those
Yea, have seen a few people claiming that css is turing compleet, havent seen any evidence about it yet
yeah, let's get customizable pages myspace-style
I think I remember someone in my 4th grade class having a myspace page... but other than that...
k, finally figured out how to get docker to run everything (Hangar & HangarAuth) together and STILL have hot-reloading via spring devtools. if anyone has any better ideas, ping me https://github.com/PaperMC/Hangar/pull/108
@pallid yoke are yy seriously using sendgrid as an SMTP server?
no, not enough for what we need apparently
At last check the entire infrastructure is blacklisted by hotmail/outlook anyway
unless you stump up for a private IP
ill be handling the mail. I run my own mail servers 😛
but i did use mailgun for my super important emails, but "you gots mail" just goes out smtp
ill be handling the mail. I run my own mail servers 😛
Any recommendations for the mail server app
@pallid yoke are yy seriously using sendgrid as an SMTP server?
@somber flicker no, I never used sendgrid before, and hangar doesn't use anything right now
(if you have the GitHub student pack their pro plan is free for 2 years)
Yes but only for educational purposes
As with anything in the pack
Not supposed to be used for stuff like this or anything professional
@somber flicker because us ESP's tend to keep high risk clients separate from low risk clients, free = abuse, dont want to risk impacting paying customers deliverability
we have separate sending pools for our customers at work, and if people pay, they can get a dedicated pool/ip
No I understand why @worthy basalt but I didnt want Hangar to go with that infrastucture
you would be better off using a VP
What is hangar
if you are serious, read pins
if you are not, well its your death
Oh ok thank you
Hangar is life
Anyone know anything about caching maven dependencies in a docker container?
What you mean exactly?
If you want to cache them on build-time, I don't think it's viable tbh.
Unless you only mean caching them as long as pom.xml doesn't change - then you could add pom.xml to image, run some maven command to fetch dependencies (not sure what it'd be), add rest of code, build.
And the cache will invalidate on pom.xml change, but if only code does change, it'll have the deps cached.
If you are running on Linux, you might try to abuse Buildkit build-time mounts, not sure if they are rw though. And it doesn't work on Windows, so...
Hmm, it looks like maven can't do that. At least I can't find it.
Oh, nvm. There seems to be dependency goal.
What just happened
spiot is better than paper happened
spiot*
spiot
spagit
spaget
Yea, lets call it spaghet
Anyone know anything about caching maven dependencies in a docker container
What you'd do is store the containers .m2 folder somewhere on the disk
But you can't do that on build time Cat.
You can do that with making sure there's a step that downloads the deps, but no steps before it can invalidate the cache.
changing source files such as the pom would bust that one though?
You can copy POM - download dep - copy rest of sources - build.
At least if onyl source and not deps change, it'll reuse it.
I wonder if the Buildkit builder mounts are RW and can be used for directiories - maybe they could be abused.
I'll see what I can come up with when I'll get off of work in like an hour or so.
See, the normal "fix" is often to just use a volume for the .m2 folder so you can shove it on disk, docker really wasn't designed for stuff like this too well
I mean, you can use volume, but you can't do it on build time.
And dockers caching works quite well, especially with Buildkit enabled. But it won't provide incremental caching like maven has.
yeah, its not that big an issue. it only has to download deps once per dev session. just when I initially build the containers, it downloads them, but then I can rebuild with intellij, and no need to download them again
hmm... it seems that on a users page, you can't see any projects they are a member of, only projects they own
I feel like you should be able to see projects they are a part of as well right?
doesn't fit the userpage's purpose, if anything in an extra section (or even page) only visible to yourself
imo that is
similar to how GH does it, just not as hidden away as there (you have to go to settings->repositories, which is rather annoying)
so you don't think other people should be able to see a list of repos you are a member of?
only if they come across a project that has you as a member, they'll know
yeah, since it's not your project then (and otherwise of the org)
There are some orgs you might not wanna be associated with
well they do see a list of orgs you are in
he's specifically talking about project membership I think
that's already part of ore
e.g. that rando joke project you have from 6th grade
yeah, im talking just about project membership
so you don't think other people should be able to see a list of repos you are a member of?
yea
ok
yeah like github. being able so set membership private in projects and orgs (just except your own non-org project)
Yeah
k, so we're gonna def need to add a db migration system
cause there's no way were are gonna think of everything before release
wow...
see there is where I would amend the latest commit and then force push
but idk if I should, mini said something about force pushing messing up gitlab or something
I think you missed your daily commit yesterday
yea :(
k, onto org invites
I just modify the database in production
You're a monster!
dont worry, I enabled heroku maitanence mode if it goes wrong
and when i remember to, take a backup
it's a miracle everything is still intact lmao
prod database USED to be dev database too, thats a whole other can of worms though
I saw java-14 being used in docker.
we need siwtch exporesson!
is that 14?
We need to select all the java files in IJ and run Ctrl+Alt+Shift+K !
what's that do?
AKA convert all Java files to Kotlin 😛

ru serious? NO
lol
imma make a pr that does all the java 14 fancy changes since we're running on 14
go ahead
yallve been busy dangh
idk what im looking at?
huh, ive never seen something like that before. neat
we didn't have any reason to use 14 (since there's not too many features helpful to us in code), so we stuck to 11 to also have more people able to run it on their own setup (cc mini)
not sure why the docker part uses 14
but I mean, if someone is going to contribute, it can't be that much of a hassle for them to install 14 right?
yes, there are a bunch
for the discussion page I'd personally vote against signatures, since they mostly interrupt read flow
BEANS? :O
if you want to say something, put it in your profile sig imo
but HOW CAN I advertise my plugins 🙂
or what do you think
eh, signatures are useless, ive never seen one that im like "now that's a signature"
it feels like those blimps with ads flying behind them
even just 3 lines of signature text can put off if the reply itself is just 1-2 lines 
hope yall ready
so yeah, if noone has a strong case for signatures, I'll remove them from the discussion issue again 👀
it's an against from me
the way the bukkit forums handle sigs, is they only have it on the first reply in the thread
so its not taking up a ton of space through out the entire thread
sounds like an alternative. or even having an option to hide them 
and well just use markdown for formatting for posts right?
ore doesn't have a review/rating system, do we want to add one of those too?
what errors are you talking about?
nope, ignore them
smh the beans are erroring and youre ignoring?
they are all either for HangarDao<?> or HttpServletRequest
the beans exist
the IDE just doesn't know it
well its just so we don't have to manually create a bean for every DAO since there are like 20
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public <T> HangarDao<T> hangarDao(Jdbi jdbi, InjectionPoint injectionPoint) {
if (injectionPoint instanceof DependencyDescriptor) {
DependencyDescriptor descriptor = (DependencyDescriptor) injectionPoint;
//noinspection unchecked
return new HangarDao<>((T) jdbi.onDemand(descriptor.getResolvableType().getGeneric(0).getRawClass()));
}
return null;
}
a lot of people here dislike rating systems, so I think that’s a no (tho I feel indifferent about it)
lol going over ide warnings won’t get you anywhere
since 9/10 of them are probably just eh, wrong
fix all typos first
chew go over warnings and put @SuppressWarnings() on all of them 😛
what's the freemarker error?
the img alt for the paper logomark is "spongie" still, intentional?
AH HA
TYPO SPOTTED
literally unusable
misspelled class name... uh oh
what is misspelled?
intended typo??
why
Yesyes serivce
java
ChannelService.InvalidChannelCreationReason validateChanneUpdate(long projectId, String oldChannelName, @Define String channelName, @Define long colorValue);```
I assume that's intentional too?
but above it's java ChannelService.InvalidChannelCreationReason validateChannelCreation
hm
Don’t worry about it drink some alcohol
what about java String header = request.getHeader("X-Frowarded-For");
it’s just... frorwarding
It’s new https6 standard chew
alright well other than those I found 1 legit typo
Lies
Unless resolved is spelled... resovled
Give context
I forgot the file
But it was something like "Flag resovled by" instead of "Flag resolved by"
ok, so how tf are org members supposed to edit a project owned by an org
where is the logic for that?
They can't :D
That's why paper explicitly requests that PRs are submitted through non org accounts
Oh org members
Yes and? I thought you were talking about people editing PRs submitted by orgs
I misread
no, talking about plugins that people post to hangar that are owned by an organization they created on hangar
k, I figured it out
@modest forge ok, got an issue here with hangarauth
for some reason, the calls to /sync_sso aren't synchronous or something when they are called post_save on the user model
any ideas? the create user endpoint needs to wait until it makes the /sync_sso request and gets a response before its sending its own response
shit needs to happen like this
from top to bottom, except the create_user response is being sent before the /sync_sso request is sent
which is big no-no
k, so for the time being, the user will still be manually created in the org create method. its not a big deal because the /sync_sso will still give it the global organization role
k, org invites are done
Hell yes
there really isn't a whole lot of big things left
Well done, I assume just some polishing up, then beta, then bug fixes, then release
@lilac plinth #announcements
yeah, the issues are a bunch of small things that need to be checked and done
holy hell, the user admin page is a mess. but finally got it error/free and functional
yeah I don’t think you actually have any button or something to go to channel editing, I always manually opened author/slug/channels
Yeah, there supposed to be one, but no one had the perm to see it.
So I gave that perm to project dev/owner
@random badger There's two modes that the scheduler library works in, one synchronous and one asynchronous, and I don't know how they're running SpongeAuth in production
We can make it always synchronous, but that means if auth can't reach Discourse or Hangar then any request that triggers sync_sso will fail
ie user creation, profile edits etc will just error out
Well the only place I can think of where it has to be sync is org creation. But we can get around that by manually creating the org user instead of relying on /sync_sso to create it.
K, so what’s up with these actor routes? What are they supposed to do?
GET /pantopticon/actor-tree
GET /pantopticon/actor-count
looks like some local debugging thing?
not sure if useful, but certainly not required
yeah you can throw it out lol
What is hangar?
Upcoming Spigot/MC-Market/Polymart alternative
Ah

Mobile
Sorry
They are like hidden in the side panel
So I never check unless on desktop
¯\_(ツ)_/¯
pretty sure nobody reads pins :p
Heh
Sounds like a them problem lul
Well the only place I can think of where it has to be sync is org creation. But we can get around that by manually creating the org user instead of relying on /sync_sso to create it.
@random badger that leaves the possibility for a race condition if a user gets created on auth at the same time as an org gets created on hangar
does the create user endpoint accept an ID?
Hmm, we might have to change it so it creates the user in hangar before auth.
If it doesn’t, then we can make it accept one
Yeah
Did you modify hangarauth at all? I don't know which one is the right one to work with right now
I made some changes.
Mainly to get it to work with docker better
There is a pr for all your changes + my small one on minis repo rn
Do we want Hangar roles to be included in the migrations?
Also the Organization role was missing from my list in migrations because I didn't know whether we were planning on using it
Hnnng so it looks like org creation in Ore assumes SpongeAuth never does sso sync calls asynchronously at all
yeah, I guess include them
I didn't realize they weren't included in there already
anyone know how to, with spring, take a bean created in a request scope and use it in a thread that doesn't know about that request?
I could probably deep copy the object, but im not sure thats the best solution
So you have the problem that this bean is destroyed and cannot be used in the thread?
well idk what exactly is causing the problem. all I know, is I get an error when I try to pass that bean into a jdbi update method
the error is a bean creation error and it cant created it because its trying to create a request-scoped bean outside of the request scope
but idk why it would have to create it again. cause if I log the object right before, its there
Why you passing the bean to that update method? Do you want to get some data from that bean in that method?
so I made some request-scoped beans so that if the route contains parameters for a project, you could get the project in a bean rather than in every project route getting the project and doing a null check there
and sometimes, I need to update info on that project
I got around it kinda, by just making a copy constructor
pass the copy in, and it works fine
Sounds like an interesting approach. Is it a private project or Hangar?
hangar
if you want to see an example...
bean definition https://github.com/PaperMC/Hangar/blob/request-scoped-beans/src/main/java/io/papermc/hangar/controller/VersionsController.java#L134
line giving me trouble: https://github.com/PaperMC/Hangar/blob/request-scoped-beans/src/main/java/io/papermc/hangar/controller/VersionsController.java#L388
it's always the beans isnt it
im just confused as to why it tries to construct it again... cause the object exists. right up until I pass it to jdbi for it to do its thing
Ah ok.
Now I see another approach.
Most the time the bean is something providing data not being the data itself.
Another approach would be to return a Supplier<Project table>
So that the table isn't the bean itself.
oh wait, I think I saw an example of a Provider<Something>
hmm
that is a good idea... are those final classes tho?
I was trying to use Optional<Something> for a bean and it didn't like it
cause Optional is a final class
And with a projectSupplier#get you get your table.
It's a functional interface so non final
ok, that might be the solution. lemme check it out
Yes, spring Boot sometimes want to proxy instances and for that it needs to inherit and wrap it
yeah, that is what I found out when I was trying to figure out why optional wasn't working
was trying to set one up for the current user, which of course can be no user
Would do it similar.
Supplier<Optional<User>>
yeah
That's why I love open source projects. I can see the actual use case instead of asking for hundreds of years until the guy/girl provides actual information.
you think I can have it autowire a supplier, and then have a private final of whatever its supplying? instead of calling get() everytime?
You do it in the ctor of the service, so yes.
yes
Or not because it returns null without that request. Not that sure.
thing is, it wont be constructed unless its needed
and itll never be needed when its null
either it exists or throws not found
if its null, it wont be accessed
Let's see
hmm it didnt like suppplier by default
I changed it to ObjectFactory which is essentially the same
huh... I got the same error. I guess lemme try calling .get everytime
nope, still got the error... lemme try one more thing
ok, got it to work
so spring won't autowrap it in a supplier, the bean actually has to return the supplier type
and I can't use get() in the ctor
because sometimes that ctor is gonna be called not in the request scope, like at the very start of the program
calling get() shouldn't be a big problem tho, its still a big simplification
the bean actually has to return the supplier type
You mean the object mapping stuff for a response?
If so, people generally just have some "response" type object to be able to wrap their responses into
@Bean
@RequestScope
Supplier<ProjectVersionsTable> projectVersionsTable() {
Map<String, String> pathParams = (Map<String, String>) request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
if (!pathParams.keySet().containsAll(Set.of("author", "slug", "version"))) {
return () -> null;
} else {
ProjectVersionsTable pvt = versionService.getVersion(pathParams.get("author"), pathParams.get("slug"), pathParams.get("version"));
if (pvt == null) {
throw new ResponseStatusException(HttpStatus.NOT_FOUND);
}
return () -> pvt;
}
}
re: the return type
if the return type was just ProjectVersionsTable, spring could autowire that to Supplier<ProjectVersionsTable> or ObjectFactory<ProjectVersionsTable> or Provider<ProjectVersionsTable>. but apparently not the way its setup currently
What would be wrong with returning the type itself?
because then I can't use outside the request scope, which apparently using that object via jdbi to update some row in a database is
that's what was causing the initial issue. it needs to be wrapped in something
and if I rely on spring to auto wrap it, it still can't use the object outside the request scope, it has to start out wrapped
any difference performance wise, between making multiple calls to get() on the supplier or storing it as a local var in a method
each get will run that code
wait, nvm
Your supplier is literally just a "return X", so, no real difference
yeah, I figured
👍
https://github.com/PaperMC/Hangar/pull/111 My pull request has conflicts with master. Leaving aside or it would be merged with them being fixed. What would be a good way to resolve this? Merging master into my branch would mess up the commit history, right? And I cant rebase because of the conflicts (or maybe im just doing something wrong)?
Or would it be better to make create a new branch of master and redo my work on there and than create a new pull request?
Okay thanks!
Yea it isnt much work, but its also nice to know the solution yourself
k, so im a little confused as to what exactly locking a user means? I mean the lock button only shows up for yourself.
MAN, the more I use spring, the more I love it. just getting into parsing spel in custom annotations
spring when
sproing now
be super useful for hangar to have a contrib/github channel here btw
lol, I'd love a role 😆
currently we go back and forth between a couple channels in Mini's discord
lol
and finally putting everything here, would be nice
Yeah you could join the big bois
man, its so close to being done
well done initially, like not bug free for sure lol
wen is hangar? I have to upload my plugins which are using paper api on spigot, so ppl complaining about NoDefMethodError etc, although i noted that this plugin works only with paper
you can use paperlib to check if paper & disable in the meantime
hangar is here when hangar is ready
so it doesn't solve main issue: ppl are stupid
they don't read that plugin works only with paper
you dont even need paper lib just do a try catch around java Class.forName("com.destroystokyo.paper.PaperConfig");
and if it throws put a big error in console saying to download paper, and dont load the plugin
or just use paperlib, its very small and does the job even after we change the package of the config
if youre gonna depend on paper code in your plugin, please depend on API
ugh. running out of stuff I want to do...
you could fix the view counter to also insert into that single_view table / not actually insert everytime you refresh
one of the few little things :p
its supposed to be every refresh as far as I can tell...
its not what I thought it was
preetty sure it doesn’t on SpongeOre
right, but that number displayed, doesn't equate to unique rows in that table
its from the home_projects view
which does a bunch of complicated stuff
do that then
😂
like, look in the ore code, unless I missed something, its every time
would make sense for why they’re storing so much data in the single views table
machine: do you feel like rewriting SpongeAuth? :p
@modest forge like you mean Runway?
I figured that what we've currently got is sufficient for now
I mean, its functionality all works
aside from org creation (unless you modified hangarauth?)
That's the main reason I haven't bothered with runway tbh
was a tiny change, just called the method to update it in the endpoint method handler. works like a charm
maybe Hangar should be moved to its own category?
so close....so close
The only real business of this channel is going to be when dev is going crazy, I can't see it being active enough that we can't just shove it into #paper-dev at some point, we have plenty of channels as is, and I don't really see how well a section for hanger will fit
We use a channel on my discord most of the time anyways 🤷
Is said discord restricted or available to the public?
Do you plan on contributing?
I meant, #paper-github for notification; help requests will probs just go in general/paper-halp, any other channels are basically gonna be staff only type deals
still waiting on that one
We use a channel on my discord most of the time anyways 🤷
Can i get an invite to that discord?Got one, thanks mini
sup,
I am watching with interest
I'd love to replace SpiGet
If you had a SpiGet compatible API that'd be huge in its own right
a robust API to allow integration is a must though
see pinned
is there any route for me to sponsor having specific features added?
or to outright offer some sponsorship to the hangar project?
Uuhm
I would need to talk to the team and stuff, but I don't see why that wouldn't work
I mean, the software itself has a feature to display sponors already, we inherited that from the sponge guys
But again, let's focus on shipping an MVP first and then talk about stuff like that later
But be sure to open an issue for search by api and stuff so that it isn't lost
Or just a more general API expansion issue with a giant wish list
You were representing a panel, right?
well, BukkitDev never went away
spiget is a 3rd party services to get stuff from spigot :p
well, not really
assuming they actually will implement it lol
soon, spigot will be abandoned, and Paper will be the leader
nah, crappy premium plugins will stay behind
it'll just be mc-market 2
lol, all the api si already documented
you could legit be ready day one
well thats not api we have so of course it wont be documented
i mean good enough
do you search for "multipurpose plugin" or do you search for "essentials"
well the site will have it
but this is the api we're talkingabout
if you want to find a plugin, you go to the site, if you want to download it, you use the API
otherwise you just have mini hangars everywhere (what a coincidence)
well since spigot doesnt even allow people to make new premium plugins of certain categories now, that compromises it as being a premium host too
yee it has to be in the "Premium" section
no i mean that no one is allowed to make new anti cheats now on spigot
it is
im gonna fork hangar and use it to release my ti-84 programs
no i mean that no one is allowed to make new anti cheats now on spigot
so THAT's why there are no good public anticheats
dont need bland, need the job to get done clean
i was talking about premium little
premium can still be good and public, given it follows the LICENSE theyre supposed to follow :P
they only allow free new anti cheats
i didnt mean "good and public" as "free" i meant "public" as like not custom-coded ones that are only used on 1-2 servers
oh
spigot's main problem is they dont care if you violate license
@narrow verge if there's no way to find plugins without using the site then it's not worth integrating into anything, I might as well just scrape the frontend.
um hello? search?
categories, new, popular, etc
i dont understand
like i said, whats the point of just integrating hangar into your panel
people arent there to discover theyre there to install
the fact that they don't have to leave it, and I can tell you they absolutely are there to discover
i mean sure, but at that point what's thepoint of hangar having a front end if every panel is just gonna implement their own version of it lol
arguably there isn't much of one - just have it be a way for developers to upload their plugin and let the panels implement it how they please
I have been using panels and I would rather search/explore inside the panel than go to the website externally
imo not a big deal
there already is api to get a list of projects in categories etc..
again, see pinned, it's all based off SpongeOre
I took a look and couldn't see that endpoint, but I'll check again
couldn't see a category list either
like the very first entry in the projects dropdown
no I mean an API endpoint to get the categories list
Available values : admin_tools, chat, dev_tools, economy, gameplay, games, protection, role_playing, world_management, misc
are you saying an api to get those?
because i highly doubt those will change
and as mini said, adding a basic query to get something like a list of categories is an absolute no-brainer, but we will worry about that kinda stuff after the MVP
yes
developing hangar
"ChatControl???" lmao
it also knows if updates are available, etc
???????????!
Nani???
bro i thought that "spiget" just meant "spigot" in a bad way
the site scrapes the spigot plugins frontend, puts it in a database, exposes as an API
works fine here?
but the backend has some issues and frequently has bad downloads
or sometimes it'll return a file that's actually the HTML for a cloudflare challenge page 
i remember seeing some api that worked through cloudflare walls, idk how reliably
AMP has some logic to fetch through cloudflare walls, but it depends on what mode is in effect
it can do the "hey is this a real browser that has javascript" challenge but of course not anything with a captcha in it
but yeah, my interest in Hangar is focused squarely on its API - using its frontend would require extra integration (embed in an iframe, hooks to tell the frontend when the user wants to install something, how to check if a plugin is already installed, etc)
ok nvm just tried the "some api" i talked about, got an error about "This website was blocked due to forums content" lmao
xD
https://github.com/RyuzakiH/CloudflareSolverRe works really well for me
reCaptcha
outdated
The solver never worked well on the captcha ones, just the "I am under attack" ones
which took you past 90% of the things I encountered
these days it can integrate with 2Captcha and AntiCaptcha as paid services
which is nutty
there was one plugin API that was ass-backwards stupid, when you did a search it just returned a list of plugin IDs, if you wanted the names you had to make an API call for each result to get the name...
i do the opposite with my api, it returns every single detail for every single object lol
aye I'd rather too much data than too little
getting memes? memes have authors, so each meme call always has the author objects lol
links to https://hangar-new.minidigger.me/api for a third time
lol
CORS will probably be decided on later on in development
it'd be handy, it mean I won't have to proxy the requests, and you'd get better metrics about the actual users
proxi 🥺 the requests
aye via AMPs backend
Oh yeah, api should obviously have cors so you can use it in a browser
yup, being able to touch it directly from the browser would save a few steps
Not sure if it does right now
But that's thankfully easy
Generally, stuff like this is part of the reason we rewrote ore from scratch. We have full control and ownership over the codebase and can implement basically anything
there's a bug in the API browser, it's trying to load requests over HTTP rather than HTTPS
And since it's really popular tech, everybody can contribute
Mixed Content: The page at 'https://hangar-new.minidigger.me/api#/Projects/listProjects' was loaded over HTTPS, but requested an insecure resource 'http://hangar-new.minidigger.me/login?returnUrl=/api/v2/projects'. This request has been blocked; the content must be served over HTTPS.
Urg, that's just swagger-ui not sure wtf they do
Oh wait, no, it's because it's asking you to auth
Theres a dum bug currently that if you have a open session, and we restart, that session is invalid on the server but not on the client
How does that work
Isn't a valid session based off of what client and server have
not independent?
If the client would ask the servwr if the session is valid it would say no
But client doesn't do that for whatever reason, we haven't really touched client yet
Ah
replace all http:// with https://
looks like a base url is set to http:// for login
No clue where, I'll check when I actually have the project open
😳
When you click on paper droplist you just getting redirected to main page
yeah. you hover to show the dropdown
or if you are on mobile, try clicking on the drop down arrow. someone did report something similar I think on mobile
i do so
on mobile it was an actual bug tho, drago fixed it already
well apparently not? the new builds have been deploying right?
and i am still getting redirected
you can click anywhere on the dropdown icon on mobile and it will open the dropdown and only redirect on the second click
what's your phone
zte blade a6
and what exact url did you open?
that's the wrong url
That's old
and new too
you should take that down mini lol
i got redirected from new hangar to old
kinda doubt that 👀
now im just getting redirected to main page
Please use our production server at https://hangar.minidigger.me for uploading your plugins!
👀
its working just fine for me. on mobile taping once brings up the dropdown list, and then taping again goes to the home page
inb4 mini did a fix in the last minute
Am innocent
no one is blaming you
and you are sure you tried hangar-new.minidigger.me?
that's the only one the fix is on
ahh
and i remember that i put "new" to address
but i got redirected to old version
i think
damn, feel dumb
hangar mobile app when 
https://hangar.minidigger.me/Spongie/test_waterfall/versions
https://pays.host/zJUIkyiW_
For the versions I think you should be able to see the updates without having to click each version, maybe a pop up when you hover of it or something
im not sure what you mean?
the versions aren't loading for me on that url
if mini would deploy my branch of hangarauth, we could actually have a pretty much fully functional system
(it's also the wrong url)
yeah, although if anything was changed there, so his same suggestion might still apply IF I understood what his suggestion was
inquiry: hangar wen
enquiry: check pins
hmm, whats the recommended way of dealing with circular dependency issues?
refactor
yeah, I did to avoid having to use @ Lazy
the inline if?
isnt it the ternary operator?
but that was a bad example
cause you couldve just returned x > 10
rather than x > 10 ? true : false
yee, someone was telling me about it, apparently cs has their own term for it
Yeah ternary operator or to keep is simpler shorthand if
i have never heard anyone call it anything else other than ternary
that's what it's called so if you want people to understand you you call it that lol
In Java it is actually formally referred to as either "ternary conditional operator" or "conditional operator", yet not as "ternary operator".
screw formality! all hail colloquialisms!
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html They're calling it here ternary ?
This beginner Java tutorial describes fundamentals of programming in the Java programming language
almost all of the big guides I could find also call it ternary operator (as the short of ternary conditional)
The Java Language Specification calls it "conditional operator": https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.25.
I guess if even Java can't agree on that, we can agree on both ternary and conditional operator being good.. but not "shorthand if" lol
Yea funny thing https://docs.oracle.com/javase/tutorial/java/nutsandbolts/opsummary.html they call it there Ternary (shorthand for if-then-else statement) under Conditional Operators
I guess if even Java can't agree on that, we can agree on both ternary and conditional operator being good.. but not "shorthand if" lol
@barren shale
https://www.w3schools.com/cpp/cpp_conditions_shorthand.asp
It's not the official name for that but everyone will know what you mean with it.
Saying to some noob: "Just use a ternary operator for that", doesn't mean the noob knows what he need to use. From the simplicity point of view with the term short-hand if-else everyone has a clue what could be meant with it.
#hangar-dev intensifies
W3schools, reeee
Someone i worked with called it an integer based Boolean or whatever
Integer-based boolean?
I think they mean using 1 or 0 to represent a boolean
but truly it's confusing to say that
maybe thats what they call it in C# idk
typically if you are referring to the number representation of bools people say bits
i think that's what sql calls them too
Yeah
it does
which are often converted to bools by the sql driver
well, not all vendors have the boolean type
mysql also has the boolean literal/alias but not the data type
it's in the standard but is an optional feature
@modest forge hangar wen
@modest forge runway* wen 🙂
@barren shale hangar wen
only we are allowed to do that chew, sorry
smhh
@barren shale hangar wen?
hangar wen (including this message) counter: 28
there are reason why the Login / User account info button is hidden on error pages?
like on a 404 for example, I think the login button should be there. Because sometimes the page 404s because you don't have access to that page (an unpublic version for example)
shouldnt that be a 401/403






Got one, thanks mini

