#dev-general
1 messages · Page 275 of 1
happening to me too
same
hmm I don't think I can. are you talking about the naming? or is it something else?
double mutability in a static context 😬
why HashMap
that too
Yup, managed to make a similar thing, this is pretty cool
companion object is basically static so usually all of the same rules would apply
MutableMap or better yet, Map if you dont need mutability
I think when I made this that's what someone recommended.
fancy
Very fancy yeah, love the way it works in ktor
oh I see. well will fix that.
holograms suck
smh
@static zealot Add private set to the late init database
yeah I'm not a real one tho. I'm an impostor
oh let me note all this down. I will probably forget if I don't
well I do to
but I couldn't think of anything else
well I know Kotlin has some methods
for all that
127 vals 20 vars in my plugin, nice
wait BM what is the better approach for a counter
ehh dépends
but I need to learn them all because I forget them
an indexed loop or something?
o
tbh var might be ok in that scenario
But
there is usually a better way depending on the context
does private set means that getter is public but setter is private?
nice lmao
Yes
IJ is lying to me smh
lateinit var database: Database
private set
k well will change the bounties map to a MutableMap and remove it from the companion object. let me know if there's anything that's very bad.
I know that there's a lot to improve
Is there anyone online that can help me with 3 groups( 3x operator, for 3 times other colors)
what
https://gyazo.com/ce5f8c6cc9320faca40cd2048882e8d1 this @surreal quarry
?spigot
Spigot Account Linking
To get support for a premium plugin owned by Clip or Glare you will need to verify your spigot account using =spigot in the #bot-commands channel. After you have successfully linked your spigot account you should ask your question in the coresponding channel for that plugin. If you have already linked your account and want to update your roles, run this command =spigot check.
link and ask in #deluxechat
you did not
you need to link your account
then go to the #deluxechat channel and ask
Hey, does anyone have a tutorial on how to get Action Bar messages?
(Coding a Plugin)
Thanks
random API I found: https://www.spigotmc.org/resources/actionbar-api.82866/
I want to make it so when a player does /vanish it will display a message on their screen, saying "you are in vanish"
Like the Super Vanish plugin
Can I do that without any dependencies?
1.16.4
d;Player#sendMessage
public void setName(String name)```
Sets the name of the component to the specified string.
name - the string that is to be this component's name
lol
d;spigot Player#sendMessage
void sendMessage(@Nullable UUID sender, @NotNull String message)```
Sends this sender a message
sender - The sender of this message
message - Message to be displayed
wat
Player player = Bukkit.getPlayer("ExamplePlayer");
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(message));```
Will that work?
don't use § btw
@NotNull
public static String translateAlternateColorCodes(char altColorChar, @NotNull String textToTranslate)```
Translates a string using an alternate color code character into a string that uses the internal ChatColor.COLOR_CODE color code character. The alternate color code character will only be replaced if it is immediately followed by 0-9, A-F, a-f, K-O, k-o, R or r.
textToTranslate - Text containing the alternate color code character.
altColorChar - The alternate color code character to replace. Ex: &
Text containing the ChatColor.COLOR_CODE color code character.
oh wait
also for Bukkit.getPlayer("ExamplePlayer"); what do I put

Exampleplayer doesn't work
public interface Player
extends HumanEntity, PluginMessageRecipient, Conversable, OfflinePlayer```
Player has 89 methods, 4 extensions, and 18 super interfaces.
Represents a player, connected or not
d;spigot Bukkit#getPlayer
@Nullable
public static Player getPlayer(@NotNull String name)```
Gets a player object by the given username.
This method may not return objects for offline players.
name - the name to look up
a player if one was found, null otherwise
Bukkit.getPlayer("ExamplePlayer"); how do I get the player who did the command
boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args)```
Executes the given command, returning its success.
If false is returned, then the "usage" plugin.yml entry for this command (if defined) will be sent to the player.
args - Passed command arguments
sender - Source of the command
label - Alias of the command which was used
command - Command which was executed
true if a valid command, otherwise false
instanceof and cast
^^
if (sender instanceof Player) {
Player player = (Player) sender;
}```
^^^
you have to put the Player player outside of the if 
Yeah, so I want to so when the player does the command "/vanish" it will display
Player player = Bukkit.getPlayer("ExamplePlayer");
player.spigot().sendMessage(ChatMessageType.ACTION_BAR,
TextComponent.fromLegacyText(message));``` on their action bar
player.spigot().sendMessage(ChatMessageType.ACTION_BAR,
TextComponent.fromLegacyText(message));```?
thats why u invert the if 
yes
Same thing, it is very difficult but I did it 😂
if (sender instanceof Player) {
Player player = (Player) sender;
}
player.sendMessage("");

ik
yes 🙄
it was an example
ok
class _ {
{
{
{
{
{
{
{
System.err.println("lol");
}
}
}
}
}
}
}
}``` pro coder
Code that breaks in java 9 part 11
wait fr
aww
#bot-commands 
someone tell me why sun.misc.Unsafe exists lol
isn't the whole point that the JVM is meant to do the memory allocation and garbage collection for you?
Yes altho I assume it might be useful for some weird off heap optimizations and stuff maybe
You could do the same with JNiIanyway tho?
you heard it right here, null is the superclass of Object, primitives, interfaces and void
yeah but that's basically just using C or C++ to memory manage normally isn't it?
kinda
no
null actually inherits from every type
null is both every type and no type
at least that is how it's specified I'm fairly sure
it both has a value and doesn't have a value
it's null, that's the way it's designed
ok but that's not the point
it's a value that's meant to represent no value
also Unsafe is not meant to be used by regular users
the name and the fact that you can only get an instance via reflection might hint at that
and also, if you do new Object().getClass().getSuperClass(), apparently somebody said that because this returns null that apparently, that means that null is the superclass of all classes, which is bull shit, because the documentation specifically says that it's meant to return null in those cases (primitives, interfaces, Object, void)
not actually true, you can get an instance with Unsafe.getUnsafe()
unless that's just an OpenJDK thing
Try it
I just did
which version
8 I believe, can't remember, lemme look
Did you try running it?
...
Try
Return the singleton Unsafe instance. This method may only be called internally.
may only be called internally.
not what it says for me
Try running it bard.
I'm using OpenJDK, and it even provides an example where it uses getUnsafe() without reflection
gimme a min
it may be possible in Java 8 but why don't you just run it
It's definitely not possible in newer versions
not without further effort at least
public static Unsafe getUnsafe() {
Class<?> caller = Reflection.getCallerClass();
if (!VM.isSystemDomainLoader(caller.getClassLoader()))
throw new SecurityException("Unsafe");
return theUnsafe;
}```
ah, you're right
see
spooky java internals
also I just checked the java specs, null is indeed a special type and while they don't put it exactly that way, it still inherits every type in a sense
null is like kotlin Nothing
There is also a special null type, the type of the expression null (§3.10.8, §15.8.1), which has no name.
Because the null type has no name, it is impossible to declare a variable of the null type or to cast to the null type.
The null reference is the only possible value of an expression of null type.
The null reference can always be assigned or cast to any reference type (§5.2, §5.3, §5.5).
I actually kinda wanna try this now
I mean - eh, not really
how do you find out what memory addresses are what?
like is there a way to list everything in the JVM's memory using this class?
you get an address when you allocate something
Unsafe just allows you to work outside the restrictions of the jvm heap and gc I think
is that what the long that allocateMemory returns is? a memory address?
yes, should be
alright, let's try this
aren't there actual APIs for foreign memory access?
nowadays there are yes
You should definitely try those
If you want to do this sort of stuff
And, while you may not feel special anymore if you do it, you may also just use the JNI and have complete control
lmao
I get like 5 warnings telling me it's internal proprietary API and may be removed in a future release lol
because it is
anything in the sun package is proprietary and isn't guaranteed to be present everywhere
boring!
Wait how is it less unsafe tho?
Just not the same feeling if your program doesn't segfault because you missed a string terminator
proprietary? I didn't know parts of the JDK were proprietary lol
https://i.imgur.com/yphtNYz.png what a method name lol
oh wait nvm
have you read the jep
yea just did
parts of the oracle JDK are
hmm. on github. how do you put those cool stats in your profile ReadMe?
I can't fuck up my system or anything by using this btw, can I?
Which one blit?
I swear Windows encapsulates every program and doesn't allow it to read other programs' memory
right, good
every modern os does that
Like this one? https://github.com/anuraghazra/github-readme-stats
for good reasons lol
I want just the personal stats
like when you go to my github
like repos, languages etc.
ah. thank you
There are more that might have things you might want
just google "dynamic github readme"
I wonder if you can manage to segfault your java program using unsafe
🥲
Oh I've done that plenty of times but not without jni
well does it segfault?
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007facb499a32a, pid=32459, tid=32490
yes
o.o
I do love that it gives you some info though
In C it literally just says "Segmentation Fault" in the console lmfao
Yeah that's why I was wondering if it's an "actual" segfault
fair enough
procrastinating again, god damnit
I only have one exercise left but it's the worst of all
So far this class has been ok but I really can't wrap my head around proving that an algorithm does what it's supposed to do
that's actually semi-false
Unsafe unsafe = Objects.requireNonNull(ventureIntoTheUnknownToRetrieveTheUnsafe());
String string = "Hello World! I was written and read using Unsafe!";
List<Long> memoryAddresses = new ArrayList<>();
// Put all characters of string into memory with separate memory addresses
for (char character : string.toCharArray()) {
long memoryAddress = unsafe.allocateMemory(1);
memoryAddresses.add(memoryAddress);
System.out.println("Put character " + character + " into memory. Address is " + memoryAddress);
unsafe.putChar(memoryAddress, character);
}
// Sleep for 3 seconds
Thread.sleep(3000);
// retrieve all characters and build them back into a string
StringBuilder outputBuilder = new StringBuilder();
for (long memoryAddress : memoryAddresses) {
char character = unsafe.getChar(memoryAddress);
System.out.println("Retrieved character " + character + " from memory. Address is " + memoryAddress);
outputBuilder.append(character);
}
System.out.println("Retrieved String: " + outputBuilder.toString());
```👌
I actually managed to make it work lol
wow
Of course you can't just try and read a memory address just like that, that is illegal memory access, but you have to use those functions from the winapi
also, if anyone asks why I allocate a separate space in memory for each character, I tried allocating one big space for all of them, but putChar would just replace the original char with the new char lol
And of course there are certain areas you can't read/write from/to either lol
unless I'm just being dumb
you do need permissions to do that though
But it isn't an impossible task
It's not that it is strictly forbidden and there is absolutely no way of reading memory that doesn't belong to your program
also, am I the only one here that has a project called "testing" on IntelliJ that is specifically used for just throwing random testing things in
elara v2
Scratch files >
yeah, because scratch files have indexing
SIZE_T is so outdated and ridiculous, we should all use usize!
actually, scratch files do have indexing
I also have a new project every 2 competitions, while I try to start sorting things with packages but just forget that exists 🙂
but they kinda still do require a project to use them
got any problems with any type of software? a rewrite in rust will fix it
Obviously
let mut is the answer to everything
unlike VERBOSE and UNREADABLE "auto"
true!
🇪
Operating systems are perfect for Elara/JVM !
EVM
😳
Yes
Elara IS the bytecode now 🙂
Unlike the LAZY and INCOMPLETE "virtual" machine, Elara's is 100% real!!
🌟
elara ships with a physical computer
YES!
I had this stupid idea of writing a regular lisp but with exaggerated parantheses
Forget Turing machines, Elara Superior Machine is coming
Elara to solve halting problem before Vlang????
and calling it "what non-lisp programmers claim lisp looks like"
😬
The Mitten-Yugi thesis
xD
((((((((println "Hello"))))))))
I thought maybe every list needs 2 parens instead of one and every scalar also needs parens now
lmao
and then of course you don't have vectors or anything like that
So it's essentially scheme but with double parens
perhaps any character should be represented by an amount of parentheses according to its ASCII value
oh my god
that is actually genius
or use the binary values with 0 being ( and 1 being )
```((print ((+ ((- (12) (1))) ((* (5) (2))))))))````
but I think parsing is not deterministic anymore in that case
oh god
yeah idk if you could parse it properly 🥲
I was thinking the amount of parens in scheme-like lisps is already p high and if you double that it will be pretty absurd
use wrap every character denoting parens with a []
I mean since you add parens to scalars as well you triple it even
🥶
lispfuck
brainlisp
how about brainfuck with parens instead of 0s and 1s
oh wait no
it isnt in binary is it
nah
(((let) (((((x) (5))) (((y) (10)))) (((println) (x) (y)))))```absolutely beautiful
oh god
Since I'm done with my post now I think I'll do this in the upcoming days
Any language suggestions
()))()))()())()()())()))()))()()()()()()()())()()())())())())())())))()()))()))())())))()))()())())())()()()()()()
here's my take
print("Hello world") in "HellLisp"
()))((((()))(()(())()(()())()))(()))()(((()()((((()((()(()(()(((())(()()())())((())())((())())))(()(((((()))()))())())))()))(()(())())((())(()(((()((()((()()(()
fixed it, should be more like this

Definitely programming languages like the title suggested!!!!
As uni freshmen we got a set of tasks by older students (stuff to get to know the city and essentially a troll quiz) and one task was to write a program that validates paren expressions
We compiled our solution to brainfuck
oh god
they said you could validate things like this in O(1) ()))((((()))(()(())()(()())()))(()))()(((()()((((()((()(()(()(((())(()()())())((())())((())())))(()(((((()))()))())())))()))(()(())())((())(()(((()((()((()()(()
I think that's absolute bullshit
But I actually haven't checked since then
wouldnt the minimum be O(n) since you need to go through the input one way or the other?
Probably them trolling
you could probably divide it up to do in log n
yeah probably
But definitely not constant
Wait how?
I'd love to send our solution but it's too big to be pasted in hastebins lmao
I dont think that should be possible, what ive seen people do is just use a stack
push and pop
🥲
😬
Yeah we didn't have a stack, but we did it in O(n) regardless
(()()(((()))((((()))(()(())()(()())()))(()))()(((()((((((()((()(()(()(((())(()()())())((())())((())())))(()((()((()()(()
this is (println "Hello")
so it could transpile to clojure
How about representing each character as parens, where each left paren would add 1 to the ascii value and each right paren would end a character
not satisfying
Which isn't necessary a bad thing
I actually do want to make a proper lisp
adding useless parens still makes it esoteric of course but I don't wanna go brainfuck-level
xD
😫
dont pls xD
Unless you have the function not be separted by a space from the starting ()
What about a lisp with every paren type? ```
([<{println "Hello World"}>])
I mean technically
if I actually implement a lisp I will probably use some parser generator
How about every character being use equivalently to a paren (without the opening or closing ofc)
and changing stuff like this is trivial
I mean do lisps really need too much of a parser?
no they don't
about lisps or parser generators?
Context free grammars
ah
that's one of the many topics at least
Mine just finished 3 days ago, whole toc tho
Fancy
I'll have Set theory, encodings, compression, simple and first order logic, formal languages, context free grammars, assembly, graph theory and algorithm correctness proofs as exam topics 🥲
I honestly don't know how to keep all of it in my head
Those are from multiple courses right?
no
You have those in a single subject?
Wow
yes, it doesn't go too deep in most cases though
yeah they will come up again
ah
the class is called "basics of computer science" essentially
"Basics"
Honestly so far it has been fairly basic, it's just a lot to remember
well, and as I said I can't wrap my head around correctness proofs
(Hoare calculus)
did you do that as well @old wyvern ?
Nope, not yet
My interim sem just ended so waiting to see what courses we get for the next one in a week or so
oh you don't know yet?
Nope, we get a list of courses like a few days before the course registration begins
oh ok
We have a list of all classes we need to take to get a degree and you can choose whichever you want
although there is a recommended order of course
yea we have something similar but not as flexible, we need a certain no. of credits for the degree and each course provides an amount based on what that includes (Courses are split into combinations of Lectures, Theory, Tutorials, Practicals, Projects and something else I forgot xD was explained at start in the orientation class). Then each sem the Credit System coordinator selects a list of courses for each batch at multiple time slots and then we can choose whichever we want from those.
Also apparently a few extra credits (18 or so) could fetch a minor in some other specialization if we wanted to as well, but im unsure as to if thats valid
ok yeah we also have a credit system and the courses are also split
Didnt really pay attention to what they said on the first day
I really wish I went to an uni for cs
So im trying to make a placeholder that will display the name of a world the player is standing in, but change the name of the world if it is "world_nether" but this isnt working, can anyone help? :
var world = player.getWorld().getName();
function changeWorldName() {
if (world == "world_nether") {
world == "Nether"
}
OHHHH RIGHT i totally forgot
Thank you, let me try that
Of course that worked! Thank you for your help. Im a noob
Lol no problem
Object[] array = new Object[10];
array[0] = 1;
would this box the int when put into array
probably, cause Integer is a subclass of Object
How would I test it
would work if java didnt autobox
what's up
I believe so
Almost definitely
FUCK
okay if I have an array whose elements are null
that won't take much on memory right?
but like a big array
🙏
Object, and then maybe around 1000, one for Object and one for each primitive
not a problem?
Yea probably not
1000 references should only be around 31.25 kb
Im not talking about the objects size
Im talking about the references size
damn ProtocolLib javadocs are down or is it just for me?
oh well
download them and host them yourself 
wiki VEEGEE
I'm on that rn
somethings wrong on ur end
but their spigot linsk
oh wat
to another one

I still haven't figured out how PlayerInteractEvent left click works 😭
even tho i gave up on that project a while ago
d;spigot PlayerInteractEvent
public class PlayerInteractEvent
extends PlayerEvent
implements Cancellable```
PlayerInteractEvent has 4 fields, 1 all implementations, 18 methods, 1 implementations, and 1 extensions.
Represents an event that is called when a player interacts with an object or air, potentially fired once for each hand. The hand can be determined using getHand().
This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air). For the purpose of avoiding doubt, this means that the event will only be in the cancelled state if it is fired as a result of some prediction made by the server where no subsequent code will run, rather than when the subsequent interaction activity (e.g. placing a block in an illegal position (BlockCanBuildEvent) will fail.
👍
I meant, what code causes it to fire
"Interacto" 🥲
🥲
Good word btw
You'll have to look into the internals for that
🥲
because it doesn't fire all if I click fast
Yeah, inside NMS will show you
The client probably limits the amount of those packets being sent?
Click fast and holding click are a different things
You can hook into the netty pipeline and see the incoming packets I guess
Fact that I learned from nms: usually right click only triggers 20 blocks at max per sec
🤷
then how do servers detect higher right click cps?
😮
right click is for place right?
Yeah
I usually reverse that binding so it always confuses me
oh
Me too lol

ayy
you guys are weird
🥲
quick coc anyone?
🥲
xD

idek I forgot the language name again
not literally
C
C 👀
Uh slovenian?
romanian smh
lol
stoopid
🥲
🥲
lol
🙂
You need to be at least Tier V in order to set reminders!
:C
HA
🥲
🥲 🥲 🥲
oh @distant sun that's pretty cool
😁
can u guys integrate guilds into mmocore and add guild boss raids
no u

It's not bad
What should my nms module name be called
my main project is called MinecraftMediaLibrary
I'm thinking of MML-NMS-v1_16_R1
is that fine?
no
What should be the convention
just call it 1_16_R1 lol
Usually I don't like this formatting
Yeah same
First of all, it's much harder to track down for me
For me, I feel that it uses so much space and it doesn't follow the java ap format
ap?
advanced prep
what the fuck is that
basically college level classes in high school
lol
that's in no way official or even slightly indicative of a convention
lol
java doesn't define an official brace placement convention
Yeah
the closest thing we have to it is the docs using k&r
Although other languages
like javascript i think?
fixate it
but at least we can all apreciate java has brackets
python tho

don't think javascript has official conventions on this either
JavaScript has no conventions man, it's like the wild west there
honestly true though lol
in Go, you need two brackets
if x < 0 {
{
return sqrt(-x) + "i"
}}
but thats still uh
nasty
you do
Never seen 2 brackets in Go lol
yeah neither
why would you use allman in go?
Even the person that is used to allman wouldn't use that
As one of the comments stated
Succinctly, no.
Interesting that go doesn't support that though
nah it makes sense for go
I thought go's whole philosophy was "there's one right way to do things"
"and if a way doesn't exist then don't do it"
e
What are some cool IJ plugin to install
I mean cool, not mechanics
Just visual shit
I got rainbow brackets and nyan progress bar
It'd be a gui with modules
The idea is to have not just messages, but try and disable any desired text, itemstacks, maps, holograms, etc
Basically just make an amazing toggle plugin
Gonna use Matt's GUI FW?
FW?
lib*
Fucking butiful
xD
yeah I think you'll have to work on this plugin yourself because this is to much for me xD
I mean just block text packets was easy enough I guess
I will probably need to rewrite boosters from scratch cause I have 27 hours of unsaved progress on my old drive which idk if it works
but like this is going to be a whole thing
I have so much stuff to do :C
I was like already working on the commands lmao xD
well because its Java first of all.
Yea because this would be a mess in kotlin
I mean if I finish these courses I started maybe I'd be more qualified to work on this
but that's like 5 hours of videos I think
like idk if you've seen but in my opinion this is my best plugin yet: https://github.com/BlitzGamer-88/BountySystem and it ain't that big or great.
and its kotlin xD
🔲
🔳
frostys monitor be like 🔲
xD
Shut up
frosty, is that plugin free?
Which one?
is it... free real estate?
fuck off
:)
This new gradle shit is confusing aaaaaa
[26/01 10:21:12 WARN] [JDA RateLimit-Worker 4] Encountered 429 on route PATCH/channels/{channel_id} with bucket 9852e1a53c06ffc5a89d65fef85ca4ce:guild_id:742322157035585536:webhook_id Retry-After: 56 ms 😤
Bruh wtf are you doing
just trying to send a webhook for fuck sake
it worked perfect previous 20 times
wdym?
Do you do anything else at all
with webhooks?
well I get the event from a ktor webhook endpoint
I don't think that's necessary
trying to make a platform agnostic configuration system (when I say platform agnostic, I mean it basically works anywhere lol), and I've spent the past day or so trying to figure out whether I should use annotations and reflection, a config key system (a bit like what LuckPerms, PAPI 3, and I think ConfigMe does), or basically a map++ (like what Bukkit and Bungee do)
I've rewritten the code in this project at least 10 times by now lol
whatever you consider most practical I guess
that's the thing: I can't decide lol
I would prefer it to be abstract enough to work with any format that stores key/value pairs
and also has a heirachy
I recommend the key system
if I was gonna write a key system, how would you recommend I do it? same way things like ConfigMe and your key system work (PAPI 3)?
where you just have a class of constants filled with key objects that store values
I guess that's the general idea
Doesn't lp work with pseudo enums or smtng
LuckPerms has some factory system that can create keys in a sort of declarative way
papi does too
I didn't even know lp used keys
I took inspiration of keys from sponge, but the key impl I made was completely unique to papi
It's quite frankly smooth, implemented something along those lines as well 🙂
Sponge? like Configurate?
no
or does it use it's own built-in system
sponge api solely probs
I didn't realise you were talking about configs
sponge uses keys in it's actual api
although not to the extent papi does
ah okay
what's the difference there? like what's the purpose of a key over a getter?
more concise
when you say configs do you just mean simple stuff? Because object mapping is always nice
wdym?
Piggy is your impl open source?
I mean like full YAML, JSON, etc. kinda configs
no but i'm happy to add you
not yet lol
what's your github
Well gson has object mapping
nice
wow
Which is usually much more convenient
how exactly does Bukkit's method work btw?
did u just insult md5s glorifying api
Lmao
wym bukkit's method?
also, if you think the Bukkit config API is bad, try looking at Bungee's lol
Bungee's config API is kinda what sparked the idea of making this system in the first place
Piggy I'm allowed to pr and all that or do you just want me to spectate rather?
what = object mappings?
it's funny, me reading this, when I just give the data to gson and tell it to deal with it
okay nice (:
you talking about how in Gson, you can convert objects to JSON?
conclure the reason it's private is so people don't suggest things that are already planned
and so people don't start writing code for a pr when someone else is already working on it
oh yeah touché
ofc
my idea for this library is to have as little verbosity as possible
sounds like a kotlin karen
Yes, and vice versa
Without hardcoding any strings
I swear that's just called serialisation
Pretty much
gson doesn't just convert to json btw
Well it depends
turning objects into strings is serialisation
It can also convert it to just a map I think
public JsonElement toJsonTree(java.lang.Object src, java.lang.reflect.Type typeOfSrc)```
This method serializes the specified object, including those of generic types, into its equivalent representation as a tree of JsonElements. This method must be used if the specified object is a generic type. For non-generic objects, use toJsonTree(Object) instead.
src - the object for which JSON representation is to be created
typeOfSrc - The specific genericized type of src. You can obtain this type by using the TypeToken class. For example, to get the type for Collection<Foo>, you should use: Type typeOfSrc = new TypeToken<Collection<Foo>>(){}.getType();
Json representation of src
ah
I kinda want this system to work with any format that can be represented as a Map<K, V> object
Yeah object mapping is turning an object to a map, serialization is turning that map into writable bytes (I guess)
Gson already does this
"how to save player data in config.yml"
well I would make a data.yml ofc
I'm not insane
oh I've seen those lol
Iridium Skyblock for example just stores the old JSON data in a single column in an SQL table
talk about laziness lol
wowzers
jesus
Tor nodes?
tor
nice
exit nodes
mmm
ooo exit nodes
I run a few of those
the one who controls the exit nodes controls the world
I also have a table with a lot of info on doctors registered in india in 2001 for some reason
lol
wot

not gonna ask questions
Another hackathon xD
am I the only one who finds hacking really boring?
anyway, about my key system, I want this to be as fast and as lightweight as possible as well
its not hacking iwan
well ya know what I mean
though fast and lightweight don't always go together lol
hackathon are about building a application in a small time period
infiltrating computer systems
not about literal hacking
if you wanna learn how to be a pro haxor, check out Hack The Box
For that data I just had to go through a registration website that provided some info about doctor registrations, run through its source to get the api endpoint and just request and cache data from there
very nice
The mobile app could then request for info of any doctor by sending a request to the server applet which handles the internal querying
Altho I didnt save everything because after just loading up 1 year, its seems theres a LOT of data to be stored xD
did ya tell them?
Tell whom?
did ya tell them?
who do ya think I mean
No idea?
well you take data from somewhere
Yea one of the endpoints from the indian medical council register
It lists by year and banned doctors and stuff
But nothing more
so did you tell the Indian median council?
For what?
cause you gained access to their systems
I did not?
It was public
hm well that's fun
I guess it could be, but who knows
Our task or problem statement was about verifying medical info or something like that
mmm
So our project was to like verify doctors, as in you can check if someone is actually a doctor, what they actually studied, whether they have been banned from medical practice...ect..
mhm makes sense
is there a way so i dont have to put my navbar in all my html pages?
anyone here ever suffer from lack of idea syndrome? like you really want to make something but you can't ever think of something
I wanna know if this is common amongst developers
I also tend to overthink things, and try and build elaborate systems and stuff that I don't need, and then wonder why I can't make it because I have no idea what to do with it
So ive got a background that goes behind white text, however on phone the background doesnt go low enough and the text is just invisible because its white, whats my best option to do here?
BoomerBardy why not make minecraft in kotlin
there's no need for it
I feel ya bombardy lol
u usre?
and if there's no need for it, I don't have any motivation to do it
I always seem to waste my time making things that don't even get used, have been made before, or just aren't that good, and it just makes me think "what's the point?"
There doesn't have to be a point
yeah I know, but without a purpose, I struggle to find motivation
you know what I mean?
I don't even have the motivation to make things when I'm getting paid for them
Sounds tragic
that's why I've never stuck around when I've been hired for commission-based development teams
I have been in the same scenario
the last one I was in, the project I was doing got me so demotivated that I just lost all motivation for programming and quit
The issue is common to humans in general bard
We are impatient
we seek immediate happiness
If the project takes too long you lose interest
best thing to do is build a prototype as fast as you can
Then improve parts
And then rewrite
you're right
and I know you're right because every single one of my projects that is on my GitHub right now that's actually been somewhat completed (no such thing as completion, but I count working as at least somewhat there) has followed that principle
😂
I don't get how the guy that made Spring kept his motivation
Build a single page with your main static elements and load other pages via js and just dynamically replace the DOM elements as you switch pages
just made something that worked, people liked it, they added their contributions, and now it's what it is today
the other pages would only contain the other "content" part of your page tho in this case
to do that you have to go past "made something that worked", bb
true

