#dev-general
1 messages · Page 32 of 1
You’re right I don’t believe it
It’s probably because it’s a multi module project
Maybe I’m not supposed to add the maven publish plugin to all the build.gradle files
Uh well I’m not going to be on my computer for like an hour lol, I’m on my phone right now
ah okay
I'm suspecting it doesn't like the folder named gui but you're trying to find the project GUI, it might work fine on windows? if it does? I really don't know, i always keep everything lowercase lol
That might be it yeah
It was a mess making the modules work with both IntelliJ and Gradle
I dunno, I don't really have issues lol
For some reason it created modules in the root folder along with making the sub modules, and then wouldn’t let me delete the root modules
Yep that seemed to be it, thank you!
literally pogging
@cinder flare if by any chance you have time in the next 1 to 2 hours, I'd love to have that voice call.
Anyone know how to host javadocs with Jitpack?
It's just showing this page
https://javadoc.jitpack.io/com/github/Fisher2911/FisherLib/common/v1.0.0-beta/
Idk if I did the URL wrong or something
I uploaded the library jars and the javadoc jars in a release
I can use github pages for that?
i mean idk for javadocs but https://hibiscusmc.github.io/HMCWraps/
its dokka for kotlin but you can use it for java too
yes it looks awesome
beautiful
I'm
, but I must admit it's nice
whys that xD
That's for a longer discussion I don't have the mood for
Sounds good
the logo is annyoing to change afaik so i didnt bother but you can
nvm
seems to be easy enough
will change to 
lmao okay
fr, I'm too lazy to set it up
But I starred it in case I find it out in the future
anyone has a good knowledge with texture packs?
Javadocs are just some static html pages, so yes, it will work
I am developing a documentation style website, and I am curious how they operate. Should I hard code the information into the actual website? Or should I use a json file or something similar, and then use some code to load it from the file every time the page is loaded? (I am using Next.js) I am also curious how searching works. How does the website know every line of text that quickly? Is there a copy of all the information in a searchable format? Or is it like I mentioned before where it is all stored in a seperate "content" file?
This was an idea I wanted to explore but left it, I’d say you should allow importing from the OpenAPI specification, many frameworks have plugins to export their endpoints to this
Not sure what you mean by OpenAPI specification
OpenAPI is for rest APIs, sounds lìke you want some sort of general purpose documentation (e.g. gitbook.io)
Wikis are usually just viewers (with some extra sauce) for markdown/html files
I am building a website similar to Tailwindcss's documentaton, except it isnt a wiki or documentation. It has a bunch of information relating to a topic along with some interactive elements, and I am building it with Next.js.
I am just not sure how the actual content should work, and if it should be hard coded into each page or if it should be in a general content file, and then how the search engine should search it. Not all the information is completely static, just a small section, which is why I don't want to use a general purpose documentation app.
SSR for sure
Next.js is not really a very good tool for documentation lol
Look at like Docusaurus and similar
Still in React, but much more optimized for what you're trying to do
What is that?
Edit: server-side rendering
I already built my own code that is essentially what Docusaurus does for Next.js, on each page, I essentially have a DocPage component, and I provide the header, and then the content, and then it automatically does the rest.
Both the header and content are just a string, and use discord like markdown
I am too invested to switch, especially since the rest of my website is Next.js, not just this small documentation area
What about next.js make it not good for documentation? lol
The exorbitant amount of javascript it sends
hence why you get stuff like Astro and Docusaurus
if it's already part of a website with other stuff, then no worries
It wouldn't be that big of a deal at all, unless you're looking into like extremely optimized stuff which .. eh
I mean sure Docusaurus will be much easier but don't see an issue with using Next
I mean it's just not the ideal tool for job
Sure you can hammer a nail in with a sledgehammer, but it's not ideal
Next.js is generally for building highly interactive websites/web apps, documentation is generally basically static
I’m waiting for Star to mention that magical OP stack 
php
As always, I personally would've used sveltekit
cough Vite + Svelte + SvelteKit + Tailwind (ik I am not star but welp, have to mention this)
Star is into PHP now 🙌 he realised how 🐐'd it is. Love Vite and Tailwind from that list though, never used Svelte but seems like it has a nice dx
php > js
That's RASM actually 😎
How th did you manage to make star move to php?
He saw the magic that Laravel has, it's much better than people make it out to be
Fuck the shiny tools, php is where its at (Come from someone who has desperately tried Nextjs backend wise and I gave up)
Why's noone talking about Java backend? :(
springboot?
not all PHP is good, but Laravel specifically is great
their orm is very cool, the type hinting and dependency injection is kinda similar to Spring but better
class based controllers are actually quite nice, coming from Django where I just put a million separate classes for stuff
i've been bitten by Django's lack of type safety and stuff too many times, and honestly python is kind of mid
i really like squiggly bracket languages lol
that java influence really doing me dirty
I think I’d agree here, PHP in itself is very iffy, but I believe Laravel is what makes PHP feel magical
I believe it’s the developer experience that stands Laravel apart, after trying other stuff like Nextjs, the docs, 1st-party support etc is unmatched with Laravel.
Even down to things like, Laravel/PHP isn’t new or “shiny”, but the shiny tools like Nextjs are what frustrate developers most
anyone know why this statement returns when im holding a diamond pickaxe?
if (!player.getInventory().getItemInMainHand().equals(Material.DIAMOND_PICKAXE))
You're comparing an ItemStack to a Material
Your IDE should warn you about that
oops ty xD
Np
What's the library used to measure java code performance?
I used one before, but I cant find it online 🥲
Haven't had a chance to use Laravel, only Symfony
from what I've seen/heard Symfony is essentially a better (but slightly harder to use) Laravel, no?
found it - JMH
Knowledge of programming scripting languages such as Java and Kotlin
maybe kotlin script, but not kotlin itself imo
anyways, these are the requirements 🤣 https://www.linkedin.com/jobs/view/3644630585 seems like a lot for a junior position lol
Posted 5:51:49 AM. A U.S.-based company that is offering mobile-first financial services to under-represented…See this and similar jobs on LinkedIn.
well im calling that kotlin
isn't kotlin like getting compiled?
python is closer to being a scripting language than java is wdym
the fuck are you on about java is a scripting language
well it depends on ur definition of scripting language
if ur definition depends on how u run the code, then java is just as much of a scripting language as python
@sly sonnet stfu
❤️
?
what a scripting language means isnt exactly clear and theres like 10 definitions which arent rly used
python is compiled into bytecode and runs on a python vm
how is it a scripting language
ok this guy has to be trolling
im not 😭
how many times have you heard a person say "let me write a quick java script to do x"
no it isn't
it isn't all being compiled then being ran
iirc
it is
bruh

c++ > all
it depends on the implementation of python
no poo
it's being compiled as it's being ran
no poo..?
not compiled at the beginning
no shit but i forgot i can cuss here
i think?
theres a variation called cpython or whatever
its a compiled version of python
also I'd consider python a programming language
basically an assembler that turns python code into asm beforehand
not as its ran like a jit, its just compiled when u run the python command afaik
yeah i will just stop cussing and say no poo from now on
its so cool to say
💀
but java would be "less scripting" than python since by default, you don't compile it to bytecode or anything
u just distribute .py file
nothings stopping u from distributing a .java file
the java command can take in .java files now
im not saying u should but like
don't mix things up, it is compiled, but it's still technically a scripting language
it can
A scripting language is one that is interpreted. Python is an interpreted language. Python uses an interpreter to translate and run its code. Hence Python is a scripting language.
https://www.tutorialspoint.com/is-python-a-scripting-language
I'll let tutorialspoint handle this convo
Is Python a scripting language - Yes, Python is a scripting language.Scripting language v/s Programming languageThe first question which strikes into the mind is, what is the difference between programming and scripting language. The only difference which exists is that the scripting language does not require any compilation, it is
🙃
it is a scripting language
but it has a variation that takes in python code and transform it to asm code
and sb from other discord keeps arguing to me with that
and keeps saying that python is compiled just not with the default implementation or sth
but it was made to be a scripting language bottom up
u rly quoting some random ass website
ya bc i wanna code now
and python as interpreted a java
yes
both are compiled to bytecode which is interpreted by a vm
anything other than being compiled directly as asm can be considered interpreted
its just that python takes interpretation to one level higher by building the syntax tree runtime
its just that normally python code is usually implicitely compiled when you run a file whereas java is usually compiled first then ran later
yeah, its jitted by the vm
never give up no matter how hard it is
lets get better all 🫡
python is a scripting language, change my mind (you cant)
how is python anything other than scripting what
no ones disagreeing with u
hold up someone sent me linkedin connection
in a very very strict sense java is still interpreted but bytecode is cool
You can interpret Java, but typically Java is compiled to bytecode
but Java Bytecode is a scripting language because it's interpreted 
one does not call statically typed language a scripting language
yes its interpreted in very strict sense but not scripting
misread
I'm just making fun of the conversation
apologies, i have problems understanding contexts
ig kotlin script isnt a scripting language
kotlin SCRIPT 🥴
there isn't even a single clear definition what a programming language is, not sure why you try to find a definition for what a scripting language is
yeah but ur logic means its not a scripting language
kotlin script doesnt exist for me, kotlin bad, ugly, so i dont care
i live in my own bubble
real
dont burst it buddy or else
gradle > maven
is it hard to learn gradle/maven
im still stuck with traditional dependency resolution
gradle > maven
ant >>>
ok im going for maven then if its easier
ur on ur own
@prisma wave tell em
makefile >>>>>?
if you like to suffer, sure
lmao
hmm
all I can say is: xml
have to deal with xml sooner or later
so
never did in 5+ years
am doing wpf and asp
do u use groovy or kotlin scripts
most gui libraries use xml for gui design
more familiar with groovy and I use in my job
and is that not enough xml? 🤣
true lol
groovy cringe
except for spock
but still
🤮
yes, we use it for spock
yeah on second thought gradle
is that the only reason you use it? (and for gradle)
I'm ok with groovy, only if IJ's support was better 😭
basically, don't really have anywhere else to apply it
ok thats fine ig
yeh it's a bit ass
cuz if ur using spock i dont see a reason you would have kotlin build scripts cuz then thats 3 languages
linkedin jobs are so funny 🤣 junior in title but middle as experience level 🤣
ik
the fun of dealing with dynamically typed languages
I used groovy for advent of code last year and only found (and fixed) two bugs in the IntelliJ plugin, and one bug in the groovy compiler
oh damn
Most?
Even android moved away from xml
bayzed
I've not used Symfony, but I think Laravel is like the "newer" and updated Symfony, and prob easier DX wise
I'm pretty sure this once was
but not true anymore
I've heard Laravel was better when Symfony was at versions 3/4, but since then it's now at v7
also the main difference is that Laravel is better for smaller scale projects and Symfony for larger ones
similarly if you'd want to spin up a quick server you'd use like nodejs and not springboot
Who can help me with texture pack problems?
not the place, #general-plugins or #minecraft
Why would this be the case? Laravel and Symfony are pretty similar, in fact Laravel uses quite a few Symfony packages, it just replaces the rest with (imo) better ones
Like Eloquent over Doctrine, Blade over Twig, etc.
Laravel has a much bigger ecosystem and userbase too, so I'm curious what makes you think it's only suited for small projects?
guy finds my old commission from a github search trying to find the guy who made his death messages plugin (p.s. it wasnt me)
then decides that mine is obviously just as good even though it's 40 loc and i havent touched it in over 2 years since i made it
and wants me to either port my plugin or a different plugin he found to folia
for free ofc 🙂
damn i guess i'll go invest a week of my life into porting this unsupported plugin to a platform with even less support
i'm sure this guy will leave me completely alone after i agree to do him this one favor
you should, because they asked, and didn't offer to pay anything!
the honor of working for *checks dms* sabzip is payment in itself
I personally think this isn't true, not to toot my own horn here, but we deal with a LOT of throughput, both Analyse and even Tebex in general, and it handles completely fine. Also +1 to what Star mentioned
hm, maybe, yeah. I'm just speaking from what I've heard/seen, since I haven't used Laravel myself. I was also thinking of creating the shop system for my server using it, since it's not a big leap from Symfony and I'm looking forward to learn using it
the real main difference is one is named Symfony and other one is Laravel
fsr I always thought Symfony was the more used of the two, guess I was wrong lol
To be honest I always liked the name Symfony, has such a cool vibe to it yk
But yeah Laravel is a lot more popular lol, would recommend
over sveltekit?!
In terms of absolute users, definitely lol
meant the recommend part
ah, it's kind of an unfair comparison
Laravel is a lot more backend focused and has native stuff for like task queues, auth, database orm, etc. included
it also has Inertia.js, which lets you use modern frontend code (React, Vue, Svelte) from its controllers natively, which is a super nice way to bridge the gap
So it's a lot better for backend-focused websites that also want to have a nice frontend, rather than something like SvelteKit which is a lot more focused on frontend stuff but it also just happens to give you an acceptable backend
Yeah I’d defo say Laravel is more backend focused, like Nextjs is more frontend focused
Honestly give it a go, I feel like the developer experience is unmatched. I tried the JS eco system, hated it, went back.
Glad you’re open to trying it
So im a little lost on where to start with something. I have my plugin hooked up to an mySQL database and I wanna make a backpack since its a prison server that stores a ton of data but i need specific blocks they mine to sell for different values. Whats the best way to do that?
like do i wanna try and link the backpack to the sql database and store all the values since i need it to save through restarts orrrrr 
ya but im almost wondering would it be better to just make like a area in the mySQL for each block
and have it sell each for its value
but also is there a way to do it without taking up to much storage if i were to have it be like an item
are you storing the backpack contents or the price each item sells for
contents
on player join, fetch the data from db, store it in memory like in a map for ex.
on leave and shutdown, update the database
you will have to serialize and deserialize the items before you save/load them
yeah I always like to learn something new, that is if its not kotlin
🥱
How do i do that for when the server crashes because then the data will be lost
though I can already tell that it will be hell migrating current codebase, since its written with plain html and php 💀
not much. best you can do is an async task that will update the database. you could also probably keep track when was the data updated, so it wouldnt call the database for afk players, though if its async and the db operations not being too costly it shouldnt be an issue
tbh might try it just because I am not a big fan of js, even if sveltekit is simply a dream to work with.
I'm exactly the same 😂 everything but kotlin
Pair them up! Laravel + Inertia + Svelte, I believe it's an option
I tried using Next.js for a full-stack app, it's cool, but the developer experience really isn't the same 😢 Going back to Laravel. Though I would happily do Laravel backend + Next.js frontend
ikr? Kotlin seems just so weird
Like who thought declaring method as "fun" would be a great idea
+1 to this, it's what I would've done if I didn't need that sweet sweet React ecosystem
I am going react mainly for framer motion 🥹 (alongside DX seems beautiful compared to Vue)
That's part of the ecosystem babyyyy!
I still could never understand what people see in the Vue templating system
going svelte laravel if I do go tbh
Besides that it doesn't require any special syntax, so you can embed it in legal HTML a-la Alpine
But the whole Composition API just feels like dollar-store React to me, and the other one is just god awful class definitions Angular-style
I love Vue from an ease standpoint, and I was always a “Vue fanboy”, but now with React v13, I like how simple stuff is (the getStaticProps etc was terrible and unappealing).
Now I’m disliking Vues magic stuff and prefer how react is
meanwhile me who svelte with Java 💀
But yeah, I wouldn't go with anything else than partial server side rendering. Sending tons of JavaScript to the client just to render any meaningful content is dumb
To be fair, getStaticProps was a Next.js thing, not a React thing
It depends on what you're building
If you're making an admin only SPA kind of experience, there can be a lot of benefits for just having no backend and just uploading your JS files to a CDN and never thinking twice
Oh was it, I didn’t realise whoops. - but yeah, all the methods and shit I hated. I love that you can have async stuff within your component directly now
But for the vast majority of websites, the SSR is what it's all about, fast initial load times, good SEO, etc.
Well to be fair, that is also a new feature only in Next.js 13.4 with the app directory lol
But you will still have to run the backend (REST calls) for the admin page. At that point it doesn't seem too hard to just run another service for FE
With Inertia, you'd be doing the equivalent of getServerSideProps in Laravel, and it just passes em in for ya
Well it depends, if your backend is in any language other than Node, it's a hell of a lot of effort to setup SSR and stuff
Is it?
Oh yeah
I'm just running a simple quarkus (java) backend service with sveltekit
paired with a docker compose config
Yeah sure, in light terms that's super easy
But when you're paying devops people hundreds of thousands of dollars a year for k8s stuff, allocating that time and expensive server resources to SSRing an admin panel is just not worth it

You can just hire like 1 guy to make a SPA that connects to your Spring backend or whatever and be done
no server costs necessary
I thought the async stuff in components is a react v13 feature?
Technically it's a React 18 feature, but it's only been implemented in Next.js 13.4 lol
But again, you don't really need it with Inertia, or any other backend framework
Yeah that’s true actually
No need for anything else, unless you fetch from api I guess
Even then, would be better done server-side anyways
Good point yeah, for an app I’m planning to build, I’m prob gonna build my own separate api service that talks to 3rd parties. Then I can call that api in my main app; so I don’t clutter my app
Just saw this on my feed @wind patio https://twitter.com/VotrubaT/status/1683576139049058304?s=20
What do you mean
They are still using xml as I know
not anymore
I don't think android studio lets you make an XML project now
tried following an xml tutorial but couldn't because of that 🥲 (yt recommended learning xml before compose)
I mean like xml layouts
wdym
the main gui stuff etc are in java/kotlin
maybe theres still some stuff left that's in xml but the majority of the stuff are in java/kotlin now
Like the resource file
Good part of the gui design is in the layout xml that’s what I mean
Didn’t mean like programming with xml or sth lol
Logic is still in Java/kotlin
don't know what resources files are, I'm very new to android 🥲
But I know that android used to be like completely xml for guis/etc but switched to Jetpack Compose
like for ex buttons are made in java/kotlin
Maybe I’m stuck with old technology then
Didn’t hear about jet pack compose
🥲
I started android not long ago so I haven't used xml
we opposites
Yeah it could be xml or drag and drop depending on the mode you want
i think they switched over like a year ago or smth
im not sure
oh it was 2018
👀
wait no
2021
yeah 2021 i think
so pretty new
doesn't have drag and drop and that kind of stuff unfortunately but I think theres still a lot of benefits
Looks like react lol
lol I haven't used react but I think they both use the component system
drag and drop is basically useless can’t do good things with it (at least to me)
oh 🥴
I was curious why this hasn't been done yet, but is it achievable for a group of developers to take something like Minestom and flesh it out to the point of Minecraft, but implementing far better and easier systems. For example, GUIs like Triumph, and entities like Citizens (not that level of automation, but that type of easily configured). I know it would take a ton of time and effort, but wouldn't this create a API that could drastically change the current plugin making space for the better? The cool part would be being able to use both old spigot code and new code at the same time for cross compatibility
You would essentially just be copying the method names from spigot/bukkit which is what people are trying to get away from when doing this.
No one has done it because people don't really want to make a new one. They rather stay with spigot or paper because of its popularity.
theres no reason it cant support spigot/bukkit
i was doing smth like this a while ago (just the "better systems bit") where it had both bukkit and minestom implementations
minestom's api was too annoying so i havent done much since
I mean that would just be an inordinate amount of effort
There has never been a complete implementation besides the Notchian server, so it's likely not ever going to happen
Stuff like Folia, etc. is honestly huge and can solve a lot of problems
Then we have stuff for big and small
Who runs tests anyways
🦧
Only issue is folia is still based off spigot. The mult-thread is a great start but you're still limited by minecrafts code.
at this point people gotta stop making server implementations
the real questions is, where is minecraft 2
whats the point of making minestom a complete implementation tho?
why not just optimize vanilla like paper does
whats so limiting about minecrafts code?
"just optimize" isn't as easy as it sounds
whether something like minestom is benefitial for you depends on what you're doing
and fleshing out minestom isnt?
it depends
if you only want a very specific gamemode that requires like 0 vanilla mechanics, minestom will likely make things easier while being faster
duh
but we're not talking about a specific gamemode that requires 0 vanilla mechanics
well I was
yeah I mean that's what I'm saying
you use Minestom for small stuff that requires little to no vanilla mechanics
and you use Folia for huge servers that need to scale a ton and preserve basically all the vanilla mechanics
and then normal Paper is pretty darn good for the middle area
How do ppl make resource packs that can only be opened with specific programs?
Ex with like 7zip it says the zip is corrupted
You can look at oraxens code for that
But that usually prevents nobody since you can open that using other programs
Aha
zipEntry.setCrc(bytes.length);
zipEntry.setSize(new BigInteger(bytes).mod(BigInteger.valueOf(Long.MAX_VALUE)).longValue());
Found it
Ty
Interesting values tho
It's a 3rd party, its worth tho, only like £20 a year
stop it! I sent you the performance tweet as you wanted to see 👻
Smh
might give it a shot
though the routing is way different than symfony from what I can tell by the generated skeleton
laravel idea has free trial!!
and yes web.php
then you add routes
Or you go fancy, and have folders for your api and route them, like I've got an api/v1 folder - any routes in there are auto prefixed
I'm more familiar with annotation-based routing, since we use springboot in my job
and it's way simpler imo
You're welcome to ask away and tag me
Happy to help if youi've got any laravel questions
I'm sure star is around sometimes too to help
any ideas how to migrate this monstrocity?
I guess the ole copy-paste-adjust
Is this spanish or something
[12:56:26 WARN]: [DeluxeMenus] Plugin DeluxeMenus v1.13.7-Release generated an exception while executing task 3877478
java.lang.IllegalAccessError: class org.openjdk.nashorn.internal.codegen.Compiler tried to access method 'org.openjdk.nashorn.internal.codegen.types.Type
anyone know how to fix
@ocean quartz
Very cool stuff man
I wasn’t patient enough to locate the killswitch
minecraft's code is a rats nest
I was coming from the development perspective, not just the server performance perspective. Creating a Minestom complete implementation would not just fix some performance issues, but could also make the development process so much easier. Instead of having to mess around with NMS and messy Bukkit/Spigot APIs, you can have one coherent system. Like inventory GUIs are a pain in plain spigot, instead of having to rely on 3rd party libraries like Triump, you could just have it built in, streamlining the development process.
triumph is good as a "menus" api, you'd still need to code the interactions and the inventory implementation, the underlying vanilla inventory system is pretty simple for what it is intended to do
also it is often the case that, not only are "from scratch" servers never finished and barely past the "hey look, it can load worlds and you can have a player do a couple things", but once you actually try to be vanilla complete performance tends to be worse than not only paper but vanilla
minestom is good for what it's for, minimal use cases to fit specifically your minimal needs
Vouch for triumph
hey look, it can load worlds and you can have a player do a couple things
That's quite a lot more complicated than it sounds like
But yeah, considering how many things are in Minecraft, NMS does not perform that badly.
it is way more complicated than it sounds, yes
And trying to reimplement all of the features of Minecraft is just too time consuming for the few people that try it
but very very few projects have gone past that barrier
That's true
On the side note, how is it possible that nukkit managed to reimplement the entire MC:PE?
can you break blocks yet
no, but you can use luckperms
lmao
heheheheh
Hey, why is image/file sending blocked here?
Harsh truth
to prevent spam
:(
I'm kinda torn because having your routes all be in one central place is really nice for finding stuff and consistency and everything, plus it's super easy to share Middleware between routes and stuff.
But also the annotation based routing is very convenient and you just put it on top of the method. Honestly, don't knock it until you try it. Django has a similar but less powerful central routing schema kinda thing, so I'm pretty happy with the improvements Laravel makes
I mean you can have all the routing in one controller in symfony too, it's just a bit cluttery
but yeah I'll try setting up laravel + react in the near future, the example thingy didnt like my current php version 🥴
Ah yeah, Inertia is super cool. I would recommend a Breeze setup with Inertia React
https://github.com/Nilanth/laravel-breeze-react
is this what I'm looking for?
Nooooo
hm, okay, cuz the last one didnt work lol, if this doesnt work then I dont know man
okay, finally it worked lol
I was about to ask where typescript after I created the project already 💀
Yeah I have no idea what that is, looks like some kind of CRA thing which is yikes
well, good start for today setting up the project and chatbox lol
Omggg you’re using it :o
Can’t wait to see your thing evolve
Any thoughts, suggestions, or critiques on my GUI and command library?
Command Example -> https://github.com/Fisher2911/FisherLib/blob/master/testplugin/src/main/java/io/github/fisher2911/testplugin/TestCommand.java
GUI Example -> https://github.com/Fisher2911/FisherLib/blob/master/testplugin/src/main/java/io/github/fisher2911/testplugin/TestPlugin.java
The command one is just meant to be something simple to help make commands faster, it's not meant to be super complicated with flags and other stuff like that.
wouldnt suprise me if they hook into the vanilla bedrock server jar, like how the bukkit api is implemented in spigot
one small issue is I don't know tailwind at all and I'm ass at frontend
You can mention me in replies idm, otherwise I don't see them 😂 If you know CSS, the tailwind variants are practically the same
well, currently I'm trying to implement authentication using data from another database.
The passwords are encoded in SHA256, we'll see how it goes lol
Also, how can I tell it to use another table name?
Star is such a 🐐
but yeah tailwind is great, it's like normal css but you don't need to put it in a different file and come up with new class names and stuff
And refactors later are easier
well, managed to fix the issue with the database, now to fix the difference between encodings lol
what does Laravel use by default? BCrypt?
I suppose this needs to be rewritten, since it's using built-in authentication?
sorry for dumb questions, this do be confusing comming from a different framework lmao
no worries!
iirc you can register an Auth thingy that will try to log people in and then it will work with that code
i think it's this!
da ting has docs for everyting
if you scroll down to the User Provider Contract, you can implement your own with whatever stuff you want
and then register it with the facade and it'll use it!
that's how you know it's good 😉
ah yep, the retrieveByCredentials method is what Auth::attempt uses
then it does validateCredentials as a separate step to check password, which is what you want to change
yeah this do be confusing
okay so you need to make a new class that is a custom UserProvider
it will implements Illuminate\Contracts\Auth\UserProvider
then you just fill out the methods that it requires
most of them will likely be the same/extremely simple
you basically just need to modify the validateCredentials(Authenticatable $user, array $credentials) method to use your hashing function
ah ha, you can also extend the normal one, so you only have to override it!
use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Contracts\Auth\UserProvider as UserProviderContract;
use Illuminate\Contracts\Auth\Authenticatable;
class UserProvider extends EloquentUserProvider implements UserProviderContract
{
public function validateCredentials(Authenticatable $user, array $credentials): bool
{
// Hash::check() or whatever you need
}
}
does it need to be registered via boot()?
so, driver is what is passed to boot?
it's the first arg to Auth::provider()
oh weird lol
might be a param issue?
if (Hash::check('plain-text', $hashedPassword)) {
// The passwords match...
}```
is the example
so you probs needs two args
oh you might need to register that or something?
or change the name, honestly not 100% on facades just yet
oh!
you need to use the thing returned by getFacadeAccessor
so ShaHash::check() maybe?
well we're almost there, just need a little facade cleaning
@wintry plinth how register new facade? ^
code, for reference
ah they don't got that on the v10.0 docs
huh yeah I was thinking
class Cache extends Facade
{
/**
* Get the registered name of the component.
*/
protected static function getFacadeAccessor(): string
{
return 'cache';
}
}
Then when you use it, it's auto resolved from container
thats actually really cool
Instead, the Cache facade extends the base Facade class and defines the method getFacadeAccessor(). This method's job is to return the name of a service container binding. When a user references any static method on the Cache facade, Laravel resolves the cache binding from the service container and runs the requested method (in this case, get) against that object.
huh yeah, pretty cool
not 100% on what the point of the accessor is vs. like the class name and everything
well, seems to be $user->getAuthPassword() is returning null fsr
ah yeah if you messed with the User model, you need to override some shit for the Authenticatable contract
mostly that method!
lmaoo
well yeah integrating a foreign user setup and password algorithm and everything is bound to be difficult in any framework lol
but to be honest, this has been pretty darn nice all things considered
RAW PHP >>>
lmao
did it with like 5 lines of code
thought the codebase is absolute garbonzo
mainly cuz it was written by another person
yeah and it's probably like secretly super insecure or something lol
my code is always clean 😎
there's lots of benefits to abstraction! and having a little interface you can just implement is actually like a really nice compromise
makes it super easy to use anything for a user backend, not just like a database
cool, it works
wow bam, that is awesome actually
now gotta get back to my actual work
hopefully teamlead won't be mad that I was away for like 3 hours
lmao
you were planning for the future!
imagine moving to a real framework
now that would be cool
the frontend dev in our team is working with drupal, imagine that
da ting be ancient
or is the "Frontend" part like, PHP templates
well, yeah, i guess that's debatable
but he's responsible for the website itself, so what the clients see and stuff
so kinda frontend
and we do spring backend
wait you have a spring backend, then a drupal middle-end, then a raw PHP/JS frontend?
that's so wild lol, not even using drupal for its intended purpose!
is he amicable to using Laravel and/or does he know an actual JS frontend framework?
I guess the decision was made quite a while back and it stuck since the codebase got huge
yeah, he knows about symfony and laravel, but migration would take ages
could probably do a pretty nice incremental migration
feature-by-feature, etc.
but yeah i guess until something explodes, probably not enough reason to move
if there were more devs than maybe, yeah, but our sprints are pretty stacked as it is lol
yeah thats just a small portion of what's actually brewing behind it lmao
oh man
someday maybe lol
or maybe you'll just have like an IBM mainframe moment and be running Drupal v1.4 or something in like 30 years
initially he came as java dev
was asked about experience
told he had a little bit with php
got offered for drupal position, even though he hadn't touched it previously at all
since then he got from junior to mid lol
yeah fr lol
PhpChat when
next (hopefully final) question would be, how do I pass the data from the database to the react render?
do I just pass it as props from Intertia::render('blah', <propszz>);?
or it would be better to use a request (ex. via axios) to fetch it from the backend?
nvm, got it kinda working
yup exactly
If you want to get fancy btw
$thing = 'IDK';
return inertia('My/Vue', compact('thing'));
Or
$thing = 'IDK';
$idk = 'Ayo';
return inertia('My/Vue', compact('thing', 'idk'));
compact lets you specify a list of items, and it'll pull that variable + save it as that for the frontend
cool, I guess I learned (unlikely) all that I need
surely I will sucessfully migrate the old codebase
@wintry plinth 🏓
Also, I have the this
const messages = usePage().props.messages as ShoutboxMessage[];
const [message, setMessage] = useState<string>('')
const postMessage = (e : any) => {
e.preventDefault();
axios.post('/shoutbox', {
message: message,
}).then((res) => {
console.log(res);
}).catch((err) => {
console.log(err);
});
};
I map out the messages to display them, I have a button to post the messages (calls postMessage)
The route inserts the message in the database, what would be the best way to update the messages, if possible without refreshing the page?
Or I'd need to use the request/response approach and not by params?
You're using an SPA, which lets you do magic, so..
Swap away from axios to using the form helper, which will let you update the data without a page refresh :)
const form = useForm({
messages: []
});
// set the form.messages as needed..
// Submit it...
form.post('/shoutbox', {
preserveScroll: true,
preserveState: false,
onSuccess: () => console.log('Ayy GG')
})
hm, okay. well I'm doing something horribly wrong but I'll figure it out
You can preserve the scroll, and refresh the state too
Charlie still alive? 😮
:o frosty?!? not spoke to you in ages
And I try not to interact much on public discords, only tend to be DMs, but the php talk here is amazing
How's it going
I've been good pal, I work at Tebex/Overwolf now, so just head down on Analyse stuff + working on the new Tebex plugins. Then evening wise just been planning a fun project
How about you? Then irl wise just slimming + working out
Contemplating life choices
Oh why 😂
yeah I'm not sure how this works lol
It is posting now, with all the existing messages
do I need to update the form.data.messages, so insert it after pressing the button and do the post?
So being an SPA, the form helper lets you send data and receive new data back, without a reload or scroll
And yes
function addMessage(message) {
form.data.messages.push(message)
form.post('/shoutbox', {
preserveScroll: true,
preserveState: false,
onSuccess: () => console.log('Ayy GG')
})
}
tehn in your app, you'd use form.data.messages to iterate through the list
and in the route itself /shoutbox? I kinda only need the latest message, not all of them
plus, the id's are autogenerated
In an ideal world you'd fetch the latest messages, then use websockets for any new ones
But thats prob complex rn as you're learning around laravel
But laravel does have "Laravel Echo" which you can use for that, I use websockets with Analyse so when a user does /analyse setup in the server, it refreshes the UI
eh Ima keep the crappy approach for now
Yeah can optimise later
I'd prob just fetch the last x messages tbh with the shoutbox
Then when a new ones added, it can remove the prev one
also, is there a clean way to modify the data before passing it down to the react component?
cuz currently I'm just fetching it with $messages = DB::table('shoutbox')->orderBy('id', 'desc')->limit(10)->get();
I'm storing the IP address, so I don't want it to be passed down
oh ig there's select('<columns>')
Also move to models instead!
Then you can do Shoutbox::orderByDesc('id')->limit(10)->get()
cool, now I cant install the required php version on ubuntu
E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/mantic/main/binary-amd64/Packages 404 Not Found [IP: 2620:2d:4000:1::3e 80]
E: Failed to fetch http://ppa.launchpad.net/ondrej/php-qa/ubuntu/dists/mantic/main/binary-amd64/Packages 404 Not Found [IP: 2620:2d:4000:1::3e 80]
any ideas? 🥴
Can't install 8.1, which I'm using on windows
current one is 7.4.3
I can see that /mantic/ is missing in the provided url
Why is it using Ipv6 lol
This is the response of sudo apt get php
?
Yeh
@wintry plinth 🏓
sorry for pingeroo
is there a chance you had served a laravel project via apache?
Feel free to ping, I don’t mind aha - if you don’t I’ll prob never see it 😂 and I havent but it’s possible. I use Nginx myself
https://www.hostinger.co.uk/tutorials/how-to-install-laravel-on-ubuntu-18-04-with-apache-and-php/
yeah I have apache ssl set up, but having issues with virtual host and serving the public folder
istg when it comes to apache
I have all the issues with it
probably inventing new ones too
nvm turns out a module was missing and there were like 0 errors
a hint to move to nginx eh
nginx >>>
tbf if I ever move, I'd go to https://caddyserver.com
moved from nginx to caddy for my webserver, it so much easier to setup and mess with
if I manage to move all of my codebase that is served with apache on /var/www then I might lol
previous dev left a huge mess
also apache is currently setup with certbot for ssl, though iirc its possible with nginx too
(caddy does this automatically)
I’ve wanted to move Analyse, but I hate tinkering with production 😂
Maybe for my new sited I will tho as it looks beast
I do a lot of small projects so its nice to be able to write like one or two lines and be done with all the webserver config
Wow, which frameworks are typically what you've hosted on Caddy?
am I allowed to add 'Laravel' to my github about me now?
🥱
shitz easy asf
or maybe Im just a god
😎
@still portal would you mind sharing how did you manage to do this? #showcase message
Laravel is easy to pick-up, yet it's so powerful
if you know Java, it is not that big of a departure lol
and especially if you know another monolithic-style web framework a la Ruby on Rails, Django, etc., it should feel right at home
don't know any of those lol
but I do know java xD
welp, will figure it out later, right now, I already have too many projects lmao
Just managed to modify a gui from another plugin without using packets
so W
usually just reverse proxies for whatever backend im running (usually ktor)
I'm still firmly entrenched in Nginx land honestly
every example and guide out there uses it, idk it just makes me feel cozy
It’s an anvil gui with the text moved to the text box texture with shaders
started with apache, reconsidering my life choices
I think nginx isn't too bad, I'd just follow the online guides for a laravel project, then gradually get to understand it
added auth middleware to payment service callback, was wondering for 1.5hours what the fuck is wrong lmao
How did you hide the item being renamed?
I didn't hide anything besides the experience cost message
Oh, I thought you can type into the textbox after you've inserted something in the anvil
Oh yeah I use an invisible item for that
oh
@wintry plinth basically finished the code migration 🥴 this shit was painful
Really 😯 looking cleaner now? 😊
well the design is totally different comparing with how the old shop looked
at least the integration with payment service is working, people can topup their balanses and buy services from the shop and get them ingame
Woah 😯
all of that on top of working my full time job lmao
I was gonna say, I’m struggling to work on a side project right now, not even started on it yet 😂 Meanwhile you’ve already been migrating your project across to Laravel this quick
Is your full time job dev related?
current role is junior java dev
well I wrote 70 page (arnd 15k words, shit load of diagrams) document, 20k ish code front + back bachelors degree project while working .75, was partly a server dev, and my wife and I had a baby, so bad to help out quite a bit
not sure how tf I managed allat
Baby
How lmao
Bro had a forced reality check
that escalated quickly
it do be is like that sometimes lmao
gotta keep dev'in
Damn didn’t know you have a wife and baby too, props to you for managing so much and still having the time
hell
that was a reality check for me lmao
my talent on procrastination is 1st class
meanwhile this guy already did 4x what I do in a full year lol
lol thats what I did years 1 to 3 in uni
i have developed a sick obsession with just
never using databases
just saving absolutely evrything in pdt
First chest shops now a whole claims plugin 
Tbf, SQLite I think is more performant than people make it out to be
😂 it is a faff, what is PDT?
pdc?
PersistentDataContainer, essentially saving all the data in nbt
ahhhh, pretty clever approach
so the claims all operate within chunks
and all the claim data is saved within the chunk itself
i dont know if that makes sense
maybe its easier to explain it as
Chunk becomes claim -> Claim data saved in chunk -> stonks
claim data loaded when chunk is loaded and cached ☻
yaknow
ignoring cringe json usage
i have little care
let me shocka ya there buckaroo
so you can basically store any object by the key
no need
X_THIS
X_THAT
X_SOMETHING_ELSE
used that for chunk hoppers. really useful
i bet
understand doing it with claims but what if for instance you want a gui with all your claims? gonna check all chunks?
Ori L
uh is there a way to get messages being sent to console (by plugins, or whatever) and edit them? Not filter them like Console Spam Fixer, but just edit themº
possibly with a custom logger
idk much about them though but i have to imagine that's possible
In Log4j you can implement your own appender. https://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
hmm ok ty, completely offtopic thing, should I be worried?
wait what?
I think they're talking about this: https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html
Yes
hmm okay ty
Also, if I create an instance of a pojo from a json, assuming the pojo has 3 fields and only 2 are present, will the instance be null or only the one missing?
(can't test rn)
With gson?
yes
does anyone know the closest particle to redstone dust that is blue?
im making particle cosmetics and i want like a blue version of redstone dust, but all I can find is water related things which are very "sharp" and not "puffy", if that makes sense
Why not color it blue?
Redstone dust yeah
this is significantly more convenient
And a few others IDK them all
Np
do you know what version introduces coloring particles
im working with 1.8
oh, i found some post in 2013 so its probably possible
1.8 deffintley has it. I think its alot harder in later versions though.
for(Player online : Bukkit.getOnlinePlayers()) {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.SMOKE_NORMAL, true, (float)loc.getX(), (float)loc.getY(), (float)loc.getZ(), 0, 0, 0, 0, 0);
((CraftPlayer) online).getHandle().playerConnection.sendPacket(packet);
}
thank you again
Np
i'm using a library for that but I found out how to do colors in it
It'd built into spigot
It's
No nms or packets needed
Oh yeah its DustOptions now or something right?
I think
trying to make blue redstone dust but it comes out magenta xD
do i need negative red or something
Show code
well my code just calling some library with (0, 0, 255), but i dont trust the library so ill look more into it
its probably junk
I think its decimal
0-1
Ah not sure then
ill experiment a bit
i think the issue happens outside of this lib too
looks like maybe a spigot thing
👍
this game is so weird
Maybe you want to take a look at https://www.spigotmc.org/resources/particledisplay.99762/
how should I create a placeholder api extension to work on player and nonplayer onRequest function?
I want to make it work for an item
The placeholder does not get resolved in item lore
https://prnt.sc/FqA8rXWhuKfQ
@cinder flare do you recommend any react (typescript) tutorial / learning resources? D:
react 😎
Id recommend webdevsimplified on yt, he has quite a lot react videos, if you like this way of learning
I will check it out, thanks
Yeah, I don't really like front end but I gotta learn 
only discovered about DevToys now, quite useful tool
The new docs are really good now, so definitely fun through those a few times https://react.dev
how do i add the following thingshttps://imgur.com/a/Ayryosq
i really wanna know dm me if you can help out
a resource pack that replaces unicode characters with image files
Hi
I always used winscp and putty to access server files and the server console in the past but now I wonder if there are alternatives that are better
how are they both bad?
I dont think that they are bad.
They work fine but I just wonder if there are better alternatives
define "better"
idk
some people here surely prefer other programs. I would just like to know what other programs there are and why you should use them.
Alternative would be Termius, for both.
Or FileZilla, for WinSCP, but not exactly better the way it handles file editing.
I just use the CLI ssh client
My file manager (Dolphin) has native support for S(FTP), so I don't need to use anything else.
I forgor to transfer my keys from windows to linux so
wait, termius saves your ssh keys on the cloud?
seems like it
That sounds like a security issue waiting to happen.
well id assume they are heavily encrypted
well the keys are locked with your password
from what ive read
so its kinda on you what kind of pwd youre using
locked, or encrypted?
This page describes authentication as well as the encryption of personal and shared vaults. A vault keeps all the user data safe for synchronisation and sharing among team members.
Please follow th...
excuse my poor wording, yes, encrypted
I trust them
I have access everywhere
I can quickly check stuff on my phone
And i don't have to have my keys everywhere
you can tunnel with CLI ssh too?
Yes but its about the convenience
Why take the car if you can crawl? Both gets you there
if typing a command is inconvenient for you, fair point ig
Hello! On deluxe menus I'm trying to make a basic shop with click requirements were the player needs $15,000 to purchase an item and was wondering if someone can correct it please.
click_requirement:
requirements:
check_one:
type: '<'
input: '%vault_eco_balance%'
output: '15000'
deny_commands:
- "[CONSOLE] eco take %player_name% 15000"
- '[close]'
check_balance:
type: '>='
input: '%vault_eco_balance%'
output: '15000'
deny_commands:
- "[message] &8&l[&c&l!&8&l] &#FF7C7CYou don't have enough money to purchase this item!"
- "[message] &8&l[&c&l!&8&l] &#FF7C7CYou need &a$15,000 &#FF7C7Cbut you have &f%vault_eco_balance%&#FF7C7C."
- '[close]'
anyone knows about bungee mesagging channel?
Anyone know how to redirect System.out and System.err to logback?
I tried https://projects.lidalia.org.uk/sysout-over-slf4j/index.html but I get this warning and message: ```
Your logging framework class ch.qos.logback.classic.Logger should not need access to the standard println methods on the console, so you should not need to register a logging system package.
Replaced standard System.out and System.err PrintStreams with SLF4JPrintStreams
System.setOut and err or smth
wdym
System.setErr lets u set the std error
oh
I tried that but it seems like the logger breaks completely if I set it
I don't know why
it was from stackoverflow
thats what i tried
Why do you need it
but then nothing got logged
I don't need it atm but just in case 🙃
?help
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
hmmm
because i think the code should work fine
idk i dont think u should remove it tho
try splitting it up
like into 2 if statements
and then alt enter the first if statement and then merge
if (!(drop instanceof Drop)) if (!(drop instanceof RandomDrop)) {
You wrote broken code, what do you expect it to do
whats broken in it
come explain
im sure that it will work
because it is object
oh righy, mb
ill blame my keyboard which requires me tab same keys 10 times





