#dev-general
1 messages · Page 185 of 1
plugin messaging I guess
Clipo open source DChat so i can pr this instead
Lol
So, I use this type of code on multiple places and thought about creating a method, but idk what value to use to create an object on the second map()
Stream.of(json.getAsJsonArray("categories"))
.map(JsonElement::getAsJsonObject)
.map(Category::new)
.collect(Collectors.toList())```
@distant sun use a type adapter
then you can just gson.fromJson(json.getAsJsonArray("categories"), new TypeToken<List<Category>>>(){}.getType());
Does something like the spigot conversation api for jda?
( Like an external lib or something?)
What?
idk ive only used the conmversation api like once
I think you implement prompt or something
If it's like you ask and a bot (in this case a plugin) responds, then idk exactly for JDA, though I use Dialogflow for something similar
Dialogflow is pretty cool, but requires some setting up which can be pretty annoying
how does it work?
On your pc yeah, couldn't manage to set it up on a docker though
o
Because of environment variables
Basically AJ you create intents and entities, where you can give it some training sentences and responses, you can create all sorts of communication
I made it so i could ping my bot and order it to do things like set reminders, check news, weather, etc
What would the field on this be?
LocalDateTime.now().getLong(<field>)
@hot hull what’s the type?
TemporalField
(Just trynna get the current time in a long, open for suggestions on a better way, which there probably is)
@hot hull System.currentTimeMillis()?
smh
was there something wrong with that answer?
lol
@hot hull oh now that I think of it
Lol
xy problem!!1!1!1
Nooo
u should know better
@quiet depot I think the typetoken thing worked, ty
@distant sun show me ur category class
I know you can create objects directly using gson#fromJson but idk how to structure the class to match the given json
that’s fine, just make sure to set your field naming policy in your gson builder
wdym that's fine xd
the json matches the class fine
ye
gson checks if there’s a manual type adapter of your object, if there is, the json element is passed to it
if there’s not, an instance of your object is constructed via reflection, on a no-arg constructor
FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES this I guess?
fields are then retrieved by the field names in the json, and set to the json values
yea that policy looks right
do I create a normal constructor? Constructor(String value) { this.value = value }
no, no constructor at all
non-final fields then?
ye
mhm
damn piggy in here too
do I have to follow the json names exactly or I can use the @SerializedName annotation if some keys are named weird?
Both
No
Seems to always be a gradle problem :kek:
switched to lang level 8
"user": {
"ign": "test0",
"uuid": "45611b2c5d284dfc96f65fa77d2a4f57"
}```
If I want to use `username` and `uuid`, do i have to set a `@SerializedName(value = "user.ign")` or smth?
is that a kotlin annotation?
it's kotlinx.serialization
ah
which is actually the fastest JSON serializer out there afaik
gson aint just a json serializer
neither is kotlinx.serialization
yeah according to this Android benchmark, kotlinx.serialization got 76.22 ms compared with Gson's 78.38, Moshi's 84.32 and Jackson's 615.37
a whole 2ms, nice
that’s not that impressive imo, considering kotlin has more optimization headroom than gson
A lot of sources have said that Moshi is fastest
it's really idiomatic for Kotlin though
and yeah kotlinx isn't a direct equivalent since it's codegen instead of reflection
As such it's a lot more verbose
that's mainly why I use kotlinx.serialization in Kotlin
that makes it really unimpressive then
I suppose
codegen should be way faster than reflection
wdym it's really verbose?
you have to explicitly specify the serializer for every field for example
Whereas in gson you can just register a type adapter
no you don't
why tf does this class name contains $ $Gson$Types
oh yeah true
gaby those are inner classes
^
i think
Yes
Anonymous classes are just numbered
you downloaded sources and documentation and that still exists?
oh
or whatever Gradle does instead
that’s the implementation of the MoreTypes util class gaby
iirc that class is named that way so it can't be referenced or something
yeah probably
No jackson is the best
it's alright but it's kinda slow
jackson good
and Jackson is a bit verbose
I mean, it does have a Kotlin module so I guess that's a bonus
if I was using Java I'd probably either use Gson or Jackson anyway
but since I use Kotlin, I use kotlinx.serialization
ive never used that before
it's Kotlin's own first-party serialization library
if you're using Kotlin you should use kotlinx.serialization
is it worth converting from jackson to kotlinx
yes
im not serializing anything, only de-serialising as well...
still switch to kotlinx.serialization
don't listen to Niall, he still thinks that Java > Kotlin
and maven > gradle
and that
Lol. I just think no point converting Java to kotlin. especially when you already completed that project in java
what about writing new projects in Kotlin?
Moshi is arguably superior to kotlinx
^ what are you on
In JSON features alone
arent moshis like those shitty things you can get at woolies now for every 20 bucks you spend??
Like you have probably already setup your serialising using Jackson and spring. And now your gonna change to kotlinx and all your spring integration will probably break. Then you will spend a couple extra days trying to make kotlinx work with spring properly
Moshi has more features
no it won't
Then in the end it probably wont even work anyway, you go back to Spring + Jackson. And waste 5 days in the process
Y'all needa stop with your weak ass arguments :kek:
who?
serialisation is serialisation.
Like you have probably already setup your serialising using Jackson and spring. And now your gonna change to kotlinx and all your spring integration will probably break. Then you will spend a couple extra days trying to make kotlinx work with spring properly
I mean, this is quite a weak argument, especially because it's complete and utter bull shit
this is Dev general, personal preference is illegal
This is the internet, personal preference is illegal
not true
Actually it is a very strong argument
My projects have a 100% success rate with spring + jackson
I have never used spring + kotlinx so we could assume a 0% success rate
spring + gradle 100% success
kotlin + gradle 0% succes
I've used Spring + kotlinx.serialization and had a 110% success rate
kotlin + gradle 0% succes
that's even more crap
I stand corrected 😮
statistics strike again
anyone recommends any good vps host?
Hetzner
cant find vps on there
OVH
it's called "Cloud"
OVH is good but it's a little bit expensive, and requires human verification
OVH is expensive
For vps's?
Contabo is the cheapest I know of
yes
No
craptabo crap
OVH requires you to be 18+
Meh
4/month for a VPS?
cant even run jfrog
I've never had any problems with it
Runs nexus, pteroq, and nginx fine
I use Hetzner and it's fine
contabo is crap thats all im gonna say, probably gonna switch to hetzner
do you guys use package-info.java?
OVH is good but it's a little bit expensive, and requires human verification
Who here is a bot?
Meh
you need to send in a photo of your driving license, passport or a bank statement within the last 3 months here in the UK
imagine not being 16
^
I assume your parents can do that for ya if you arent 18
@heady birch since like 2019 some time
ha ovh would cost me 84€ per month just for 4 cores and 15gb ram you call that cheap...
what are you buying?
When, when ordering a VPS? or when creating your account?
basic general purpose vps
:))
@distant sun
Oh god
@heady birch ordering a VPS
Bot uprising
b2-15
I ordered one the other day
lemme see this
its 0.1169€ per hour without VAT that is 22% for me.
I thought about using package-info for things like this - to link to tebex documentation
/**
* @see <a href="https://docs.tebex.io/plugin/endpoints/bans">Tebex Documentation</a>
*/
package me.gabytm.util.tebexsdk.endpoints.bans;```
26 pound for 8 cores
ex. VAT/month
you mean at hetzner?
yes
anything else isn't a VPS
I got a good deal from oneprovider 🤷
ye but i see only CX
CPU: Intel Xeon E3-1230 v3 - 3.3 GHz - 4 core(s)
RAM: 32GB - DDR3
HDD: 2x 1TB (HDD SATA)```
we have to pay 20%
mc server and was too good to miss it xd
how much do you pay monthly?
ah okay
25 eur
hm
man that's a good deal
ikr
server auction is the place to be on Hetzner if you're looking for a dedi
i mean if you have 0% vat you get ryzen 5 3600 64gb ram for 36€
I wouldn't buy a dedi though since I don't need one
that's a really good deal
How does one properly migrate an existing database to a spring + hibernate
^ wat?
Especially because hibernate uses its own ID generation
does it?
So you cant use the AI field unless hibernate is set to use the IDENTITY generation
I swear at the end of the day it just adapts your code to the driver
Theres a hibernate_sequence table that stores next values
For batch inserting
ah okay
Im not really sure what the standard way of migrating data to a new spring + hibernate database would be
I moved away from JPA/Hibernate since you need a no-arg constructor, which was annoying when I have fields that I need
I use Exposed's Spring auto-configuration
Hibernate good
Exposed also good
Meh
and really fast
Too explicit
and really idiomatic (I find)
I like never having to write queries myself
How intense would it be to have something which loops over a map and compares dates (month to be exact) ?
depends on how it's doing it
(Being called everytime the placeholder get's parsed, so potentially 100times a second)
😕
okay yeah that might be a little intense
Can't think of a good way to store this smh
what's the Map storing
objects
Thanks
Specifically

as opposed to what
Map<K, V>
What is it representing
Specifically a custom object, representing a players info
<Date, PlayerInfo> ?
Nah Niall
surely you don't mean java.util.Date there
^
java.time.LocalDate > java.util.Date
Noone cares Bardy.
java.sql.Date
Just say what you're storing
ah okay
Niall, Map<UUID, My Custom Object>
each custom object contains a date which determines when something happened, now I need to display all those objects which have a setting in common, and are from the current month
If that makes sense
Cache it if it doesnt have to be instant
Oh yea that could work, and then I'd have it update on an interval
a Table would give you some lookup in O(1) too
How about recreating SQL statements in kotlin with hacky infix functions
💀
Wait lemme see how Glare does it for VP
Do your projects have a folder specifially to get your jar file to 69420 tho?
no?
all pro gamers do
MainJava lol
public class Main extends JavaPlugin {
public static Main plugin;
public static String color(String string) {
return ChatColor.translateAlternateColorCodes('&', string);
}
``` 
oh my
pls
public static String color oh god that takes me back
whyd i spell it like that as well
jerk
seems copy + pasted lol since thats not how i spell colour
ofc it's copy pasted
fun String.colourise() = ChatColor.translateAlternateColorCodes('&', this)
:))
ah time to switch to hetzner yay.
Imagine using ChatColor.translateAlternateColorCodes
what does one use then
hex
one?
an individual
hex,,, 1.15 doesnt have hex
add a version check in your colour method
Just copy the method content of the translateAlternateColorCodes
how does one not know what "one" refers to in this context lol
Much better

real kotlin pros make every function inline for maximum speed
Lol
tf does inline do
inlines the function contents
Basically what you just said
Copies the contents into the call site
wait is it kinda like a const val
@prisma wave inlining is useless when you don't even use a higher-order function
wait so why not make every function inline

Theres no use except increased size Aj
^
🙃
oh is it not better for performance?
Unless you have lambdas, it's neglible
Not at that point
you actually fell for that aj?
the call stack isnt that bad
idk lol
The main benefits are you can use lambdas without actually instantiating a Function anonymous class, and reified parameters
Is lambdas faster than anonymous stuff?
Is lambdas faster than anonymous stuff?
no they're just easier to read
How negligible?
Just with syntax sugar
The extra costs in kotlin come more of when it cant infer to auto box sometimes or something
Neglible negligible
wait is reified where you do the fancy thing with the generics? I thik i used it once but ive got no clue what it did
Yes
where you can do ::class on a generic
You can access the class of the parameter at runtime
Oh yeah I made a jda event waiter with that
A nice side effect of the inlining process
reified means type erasure doesnt exist in the block
Well because it's not a real generic
no

Elara on the other hand
Well yes
regular anon class: ```java
myMethod(new Function<Integer, Integer>() {
@Override
public void apply(Integer number) {
// do thingys
}
})
java lambda: java
myMethod(whatever -> {
// do thingys
})
kotlin lambda: kotlin
myFunction {
// do thingys
}
But JVM > whatever the .NET thing is called
and its CLR for c#
anyway gtg now
.NET is a framework
Close enough
Am I wrong tho
Yes
what is .NET again?
The real question is: Does C# have Elara? I don't think so
But so could Java
c# is more of Java but with fancy kotlin stuff
C# has some Kotlin features like extension functions but written more like Java
_ISayThatAgain
C#s naming conventions make me want to die
e.g. ```csharp
public void MyMethod(this String whatever) {
// this is an extension method in C#
}
or something like that
C#s naming conventions make me want to die
same
yea bard
What's the this do?
makes it refer to a String object
That defined that its a extension
you can call that on a String
Ahhh
e.g. String#MyMethod
extend String {
let color => ChatColor.translateAlternateColorCodes('&', this)
}```
Best syntax
Kotlin has the same by doing this: ```kotlin
fun String.myFunction() {
// this is a Kotlin extension function, much less boilerplate
}
and that makes much more sense than C#'s way
Kinda embarrassing ngl
Having to define functions differently to normal variables
Imagine
Imagine not having fn, fun, func and function as aliases
Rust, F#
I would beg to differ
I really don’t like let
Clojure has both def and let
nah only let shall exist
I was referring to the issue I made on elara btw
fuck fun
I replied if you saw, probably
😂
yeah, that’s where i got def from
let is just bad
^
fun > public Type > function > def > let
let feels more right than def
I think let reads more naturally
because it's very verbose and unnecessary
anyway I'm outta here
see ya later suckas
Everyone loves rust
👁️ 👄 👁️
also bard, let is for all declarations
^
yeah I saw
Elara has first class functions in a sense
I just think it’s the worst of all variable declaration keywords
var/val/def are infinitely better
def a = 5 sounds wrong
all my reasons are in the issue
bm I’ll give u a high five if u change elara to not use let
🤷♂️
a high 5 sounds very tempting
let has an academic feel to it
Like the preconditions in a maths exercise
mhm
Somehow I prefer bootstrap 3 over 4 for some applications. Bootstrap for just feels "Big" like the font size
Lol
Ok
Anyway I think Def would read less naturally, and Val / var would make the difference between mutable and immutable less explicit
When in FP it should always be explicit
they all have positives and negatives ofc but I think in this case let is the best option
what we could do is add def which has different semantics to let
In Scala def makes something in the class scope (I believe) rather than in a function one
you will end up with having all of them lol
Well hopefully not
Now this is a usefull piece of information smh -.-
it is indeed
@hot hull you need to increase your wait & interactive timeout on the mysql server, or lower the timeout on your connection pool to be in the bounds of the server timeout
They should be all set to no timeout iirc
I mean for the first two
Well says that for default so idk 
UUIDs are 36 right?
36 with dashes, 32 without dashes
@quiet depot creating objects using gson it's much easier than doing it manually 🤣
yep
time to contact tebex for more info about their api responses
should I make one class Sale and then inner classes for effective and discount or external classes?
actually, I might make only the Type enums as inner class
wat
external looks much more cleaner than a 200 lines long class
yea
and 12 spaces indent for the Type enum xd
you'll need a type adapter for your enum btw
time to find out what that is
deserialize
create a class, TypeDeserializer, or something like that
So I've got a slight debate, let's say I'm updating DB info, should I just clear the entire table and set the new data from the map, or should I store some kind of removal data, which get's removed, and the map data updated in the DB
and?
public final class TypeDeserializer implements JsonDeserializer<Type> {
@Override
public Type somethingICantRemember(JsonElement json, java.lang.reflect.Type typeOfT, JsonDeserializationContext context) {
return Type.valueOf(json.getAsString().toUpperCase());
}
}```
might be worth thinking of a different name for your enum
cuz Type conflicts with the reflection api
then on the field
@JsonAdapter(TypeDeserializer.class) private Type type;```
or you can register the type adapter in the gson builder
Aight, XObjectType
:kek:
I mean, DiscountType
sure
I really enjoy this random project tbh
this is a general development talk channel, if you wish to discuss an assumed development process of deluxemenus, you're more than welcome to
I guess it's better to let the end user take care of caching, right?
Less work and I dont feel like doing it xd
DeluxeMenus
Can I make intellij like reload all my classes or something? I removed a field from a data class and intellij hasnt like 'updated' so its not showing any errors.....
oh wait...
I can just try compiling
im dumb lol
can I truncate all my SQL tables except a few in a db?
Oh gosh, there was actually an NMS numbers change from 1.16.1 to 1.16.2, that's definitely going to break everything again.
Oh hi Aj, you getting annoyed by sql as well? 
mhm
Isn't it nice
Ah yes, non doccumented code I'm guessing
na I actually did a suprisingly good job documenting it
I know what it does
its just the way it does it is questionable
👀
Me neither
yeah don't touch it
yeah change the numbers in the next_val column
excuse me
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "alter table request add column desc varchar(255)" via JDBC Statement
wTf
Probably kotlin issue
i mean
at org.aj3douglas.coolbot420.MainKt.main(Main.kt:19) ~[main/:na]
My main class is literally 13 lines
idk why I have it as an open class either
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax;REEEE
That error will usually have more to it
oh right
DESC is a keyword
Call it description lol
ew
too different
Ew frosty
bruh
Switch to light theme
imagine having unused variables tho
Boutta yeet myself

Aj you dont use atom icons?
Ig
those are what my classes look like
Open installed plugins tab
Otherwise I use red candy theme :))
btw Aj, unused cause I'm using Matt's framework
@ocean quartz make a plugin that does the same thing Minecraft Development Plugin does for @EventHandler

If I try to invoke getUniqueId() on a null player, will it throw an NPE, or just return null?
Sounds easy enough
Npe lol
NPE?
Sin
Go back under your rock Matt
ouch
Aight
@quiet depot why does everyone play MS Flight Simulator?
Seems boring as you just .. fly
its kidna interesting
its a requirement...
xD
Breathing is pretty boring tbh
plus if youre ever in the case where you need to take over a passenger plane and safely land it youre all good
Yea, sure
pretty educational
"What is the key bind to turn left??"
"Bruh this sensitivity sucks"
Just hack the plane to control it with a keyboard ez
plus if youre ever in the case where you need to take over a passenger plane and safely land it youre all good
@obtuse gale
"Does anybody know how to fly a plane? Both the pilots have succumbed to sudden heart failure"
"Oh yes, I have 15 years worth of Flight Simulator experience"
"OMG come on in then"
better than nothing
Because you, as a normal person, carry a keyboard with you :))
For real though flight simulator sounds fun
Lmao @old wyvern
I hate how you cant crash in the flight sim tho, it just fades to black
true
So I've got a slight debate, let's say I'm updating DB info, should I just clear the entire table and set the new data from the map, or should I store some kind of removal data, which get's removed, and the map data updated in the DB
@hot hull
I remember at some point I was googling for flight sim games a lot for some reason
but my old laptop couldnt run it
welp
$60??
for what
Ms fs
I cant :((
not in RO ...
Discrimination
Only 4 perks are available here
smh ;((
just get someone in america to do it or sometihng
And they are all games
xD
Yes, ez pz
Making a debugger for my plugin was easier than I thought.
Is it just me or gravity is stronger when you're in bed
Is it just me or does toast coming out of the toaster have less gravity
is it just me or not?
var user = userRepo.findByDiscordUserId(member.id)
if (user == null) {
user = User(discordUserId = member.id)
userRepo.save(user)
}``` is there a way I can do something fancy with the elvis operator or something so user isnt a var?
Gravity feels the strongest when you have that weird falling feeling just at the point when you are about to fall asleep
val user = blah ?: userRepo.save(User(blah))
``` @obtuse gale
o
you should be using the result of save rather than the user you instantiate
ah ok
alright good to know, thanks
They would be the same user
@distant sun flying is actually good fun sometimes
They would be the same user
what?
If one doesnt exist I want it to make a new one
userRepo returns null if one doesnt exist
wat?
Can I do like
TRUNCATE TABLE one;
TRUNCATE TABLE two;``` then only press send once
just for conveniences sake, just wondering
does Effective sounds weird as an Object? https://docs.tebex.io/plugin/endpoints/sales
=paste
barry you there?
shut up
lol
barrys dead
?bins
?paste
?paste
?help
xD
...
=help
gary got to him
@quiet depot reboot?
:))
was about to go to bed, then saw this convo take place
poor you, having to run =reboot -y
barrys down will that even work tho
nah vps is ded
F
They would be the same user
@heady birch won't save() sometimes return a different instance?
Idk
is there no prettier alternative to new TypeToken<List<Sale>>(){}.getType();?
save should always return either the instance of the existing user or the instance of the created user
or at least, that's the intuitive assumption
If spring could fuck off and stop telling me something doesnt exist thatd be great.... Like.... I never asked for it to check if that existed
it's telling you it doesn't exist because some people might need that reminder
Spring has one even better
well it can fuck off with the stacktrace please
in Spring you can just dependency inject a Set<Superclass> and it'll inject all components that are a subclass of that Superclass
this is for object mapping
one question @quiet depot. At first I didn't know I will have to create a custom Gson to register stuff so I made the methods for endpoints static and accept a gson parameter. Should I somehow make them private and accessible through TebexAPI class?
nothing todo with di or classpath scanning
object mapping?
ye
wat dis
like gson
ah okay
Java library for Tebex.io API. Contribute to iGabyTM/tebex-java-sdk development by creating an account on GitHub.
HAHAHAHAHAHA
2020-09-06 00:35:21.217 ERROR 13688 --- [inWS-ReadThread] net.dv8tion.jda.api.JDA : One of the EventListeners had an uncaught exception
java.lang.StackOverflowError: null``` :
😦
oof
erm yeah just store gson as a constant gaby
Recursion?
StackOverflowError usually occurs when you use recursion wrongly
mm
So I've got a slight debate, let's say I'm updating DB info, should I just clear the entire table and set the new data from the map, or should I store some kind of removal data, which get's removed, and the map data updated in the DB
elara would never have this problem
I think I know what it is
I think springs being funky, pretty sure this has happened before
literally impossible
wdym bm?
Looking for a way to sort of intercept the model resolving in spring (can probably make my own model resolver) that accesses the session to determine the theme the user has set and change the template folder location based on that when the
stackoverflow and null
impossible
we will remove stack overflow
make the stack infinite
ez
Okay thank you
Isnt having stack overflow better than using linked list stack for this case?
so
@obtuse gale Probably json serialization
spring doesnt like one to one relationships in the constructor for some reason
If you have things it can end up like this
@distant sun nothing wrong with keeping it as an internal util class imo, but ye, gson can be stored as a constant
its fine with one to many and many to one
I think all models are meant to be mutable
just doesnt like one to oen
thoughts about keeping the methods static?
technically not
wdym no?
java's nomenclature doesn't differentiate between methods & functions
but
mine does
mhm
( ? )
idk gaby
method = function thats member of a class
function = well all top level + methods kinda
the only issue atm is that the methods require a gson that have stuff registered
this.gson = new GsonBuilder()
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
.registerTypeAdapter(new TypeToken<Discount.DiscountType>(){}.getType(), new Discount.DiscountTypeDeserializer())
.registerTypeAdapter(new TypeToken<Effective.EffectiveType>(){}.getType(), new Effective.EffectiveTypeDeserializer())
.create();```
??
the question is, is a side effects only function still a function?
why are the service channels locked piggy?
cuz bazza ded
ah
Barry rip?
technically, in Computer Science, a function is a set of instructions that return a value
private static final Gson GSON = new GsonBuilder()
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
.registerTypeAdapter(new TypeToken<Discount.DiscountType>(){}.getType(), new Discount.DiscountTypeDeserializer())
.registerTypeAdapter(new TypeToken<Effective.EffectiveType>(){}.getType(), new Effective.EffectiveTypeDeserializer())
.create();```
mhm ok
afaik a function is usually classified as a transformation of input and output
^ yeah
I wouldn't expect computer science to define a function
differing from a procedure, which is supposed to return nothing
computer science would define a program, but a function is strictly programming related
technically, in Computer Science, a function is a set of instructions that return a value
Yes as I said, methods come under functions
i.e, all methods are functions but all functions are not methods
(or math but again, still not cs)
falls under computational thinking
methods are those functions which are associated with a Object
In Java, mostly all in that sense
@hot hull in rpf, I have a compare method that I can extend from my Table superclass, which I use for updating shit
yeah apparently a "function" is "a named section of a program that performs a specific task"
and it also mentions that "Some programming languages make distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value"
I mean, people shouldn't have a reason to use anything else than the TebexAPI class to access endpoints so I should be good with accessing the gson instance through a static getter TebexAPI.getGson()
ok? and?
Well I mean the way I have it setup right now is pretty extendable I think, could be better, but I doubt anything more could even be added
thats still the same def of a function
pls no judge
its always important to stay professional and discriptive whilst debugging your code
ObjectMapper<Map<String, Object>, T> is that a Gson thing?
no
ObjectMapper is Jackson no?
no it's rpf
i mean jackson might have it too
why does ObjectMapper take a Map as its first type param?
Jackson has one as well
wait why is RowCreator.Builder used in this class?
Fun fact: in clojure you use maps for pretty much everything instead of specific types
because if cached data needs to be saved to the db, rows probably need to be created
wait why are any builders that aren't Table's Builder (if it has one) used in here?
table is an abstract class
true I guess
also does this framework do DI or do you leave that up to say Koin or Guice
guice
specifically Guice?
yes
like only works with Guice?
yes
guice is super versatile
Spigot has guice shaded
that's a bit eh though
no it doesn't yugi
Oh?
it has Guava shaded
It has guava shaded
I see
I really wanna make my own DI framework, idk why
but I ain't big brain enough for that yet
although they could've used guice way more in their api, their usage is wasteful imo
it's probably easier than you think
DI frameworks are pretty much glorified reflection
yeah
unless it's Guice which uses classgen iirc
:what:
and in the case of guice, code generation
yup
I mean, the easiest way is probably just to do a Spring and take control of instantiation
all DI frameworks do that
do they?
@old wyvern rpf is pretty tightly coupled to the semantics of guice
it's kind of the point
guice's versatility doesn't allow it to separate from rpf in this case
if you're doing constructor injection it has to control instances
depends what platform you're on
and btw, I cannot in good faith, advocate using rpf
it's not production ready
Ah
is anything really production ready?
😂
rpf is really, really not production ready though
that's part of the fun
I might try rpf just for fun maybe
I don't even think it works atm
nothing is "production ready"
Oh rip
😦
Yes spring is
rpf is in a hiatus till papi 3 is done anyway
or till whenever the fuck I feel like working on it again
😂
no matter how much effort and time you put in to those sorts of things, there's always bugs littered everywhere
speak for yourself
How long has rpf been in dev?
PDM is officially bug-free
idk like a year
Are you sure?
no
tbh to some degree, I'm still working on rpf in papi 3
like I could easily copy over all the work I've done
which I definitely will in the future
Nice
PDM is officially bug-free
Speaking of which I really should continue working on my ORM at some point 😂
:Doubt:
@obtuse gale it's close enough
At this point I feel like its been like 5 months since I touched it
my database api is funky
it's got like 3 layers
raw > procedural > orm
@prisma wave the stream api is an example of procedural coding right?
or am I thinking of a different paradigm
streams are functional
How many lines is RPF
ORM better
lmao


