#Cipher
1 messages · Page 1 of 1 (latest)
should state this now but pom.xml and readme.md maybe shouldnt count as lines, not sure though
https://github.com/Luziferium/the-cipher-project/graphs/contributors +122, im already out
*lines of code count only
holy shit so you want this to be for github additions LMAO
how will you implement this
with a bot?
wym orby
PR them
nooo my line count
how will you enforce the rules
likely have a few members with merge access who manage lines
Whats max line count per say? 50? 20?
You are allowed to only commit {x} amount of lines of code in your lifetime
35
You are allowed to only commit 35 amount of lines of code in your lifetime
- removing lines of code will restore the amount your able to commit
- you cannot remove random code to restore your lines, there has to be valid reason for removal
- You can put multiple lines of code onto one line
- Class, Constructor, Variable, Method & brackets DO count torwards your total line count
- Imported libraries must be open source and linked in the readme.md
- You can endlessly replace lines of code, as long as there is valid reason the previous code there wasnt needed
kk
i would rephrase that
Which phrases specifically probably the removing lines part?
what format is this?
that formats just for coloring on github format would be:
to create a ruleset we would need basic rules which we can elaborate further
also a description first would be useful probably
yeah i can add this in the commit
i mean tbf those are pretty basic rules for atm
not sure what other rules we might need to add
ill fix grammar and stuff too
obv. arbitrariness is prohibited
ah yeah should probably specify that
that one is pretty important 🤣
sec im gonna eat then ill work on this
food just got delivered
wasnt sure what to put for the actual description
created a PR but no need to accept it yet its just readme.md
conflicts goes brr
oh my gooooood
conflicts already lmfao
sec
resolved
oh wait
der
cant wait for merge conflicts when people start committing
ill sacrifice my lines for the main class creation
reviewed
i cant think of anything else to add for that, ill create a different PR for the main class
i might as well add my lines of code with that too if main class doesnt use them all
imagine you have a great idea
create a class for it
and whoosh all your lines are gone
i will love to reject the PRs which are off by 1
LMAO
entire class on one line boom
i bet someones gonna do that
i mean
if imports count..
well.. true you could just summarize the imports to one line
yeah dont see an issue with people doing that tbh
or small methods on one line
IE someone doing this
alright README is fine for now
or we provide the template. however, could be recognized as unfair to others
nah i can scrifice
maybe i can squeeze in a higher jump feature too
ill add a functional interface for events in my api and import it 
has it for commands too so technically commands can be made in one line
this shits gonna be so aids lmao
imagine a 5000 characters long oneliner
adds a whole MMO system in one line
actually
shade in mcmmo and forcefully enable it

maybe leaving the oneline rule open is a bit OP
maybe we can make a max character thing
like max 200 characters per line or something
and maybe 35 lines are a bit low
can always play with it
at least if no other contributers are found
once main class is in just gotta advertise it
make a spigotmc post xD
ask regulars in discord to contribute
true
even randoms too or people just learning spigotapi
@tired aurora mr english, please write a spigotmc post for me thanks
adds tutorial code to it
imagine this actually takes off and it ends up being every single plugin ever imaginable in one plugin
or someone is bored and wants to showcase his bossmonster lib
i can see it now
someone makes a lib thats a plugin
and just calles theyreLib() and bam
whole plugin
lmfao
btw whats your goal here
in what direction do you want to turn it
not gonna lie im not sure
Maybe we could setup some type of end goal here to point people in the right direction for the plugin
Maybe we start small? And release the project in different seasons and or rounds?
Maybe make a essentials remake in a sense? Or maybe some type of utility plugin?
what is this thread and for what
i would leave it open tbh
so they can decide in which way they wanna turn it
sure, but for that we need something first
lol
okay im creating pr for main class
from there everyone can contribute now
pr sent
31 lines for me left
yee but i never have a domain so i typically just make it that haha
project.cipher or smth maybe
ooo
also i dont like the plugin package
but since I am powerless in the project i dont mind
thanks intellij refactoring
there
we set now
main class name is ProjectCipher now too
i need to figure out what imma add to it
maybe ill add something to my API to make oneliners super easy
due to your refactoring it turned into 6 lines @viral escarp
but i mean theoretically you can get those lines back
wow
thats a nice concept actually
if someone makes an empty line
you can just claim it
would love to
"Why the fuck did you steal my lines dude"
wait i'll give you contributor
but any changes you make in code have to be a PR anyways
yee
just like mine
i wonder if theres a way to make github commit additions only show actual code
contributor abuse
now were set to have people create contributions
time to advertise
i wonder how many people will use records to create new classes since you wont need to spend 2 extra lines on a constructor
Cipher do you have perms to pin msgs in here
or is that mods only
can't sadly
imagine someone creating a wiki with tips and tricks on how to safe lines
on it
people taking holidays just to camp for mistakes of others
to get lines
like a competition
who has the most lines BUT ALSO CONTRIBUTING wins $5000
funded by md_5 himself
look
read the rules
theres a line limit of 35 for contributer
^
you do everything you can to save line space
I WILL WRITE EVERYTHING IN A SINGLE LINE
i think we might add a character limit per line
nobody will count characters
ez
or a rule like
intellij select text
3 similcolons in a line only
thats what imma do
imma import my lib and make commands register in one line
functional interfaces ftw
any suggestions regarding the number of semicolons?
public void method(Runnable... code)```
i think 3 is a decent limit imo
we can always tweak
👍
time to create a wiki
How to save line spaces when contributing for Cipher Project
A line may have a maximum of 3 semicolons
sounds weird
When contributing, each line of code must only have 3 semicolons to prevent you from putting hundreds of lines of code in one single line
run(() -> code).iF(() -> code);
i stg
i think Each line of code must only have 3 semicolons. will do it
yeah we can always deny/hold PRs and explain it too
this would be rather smart though
imagine 1000 runnables in one line
:troll:
actually very clever
we will need a bot too
ill need to modify by command api smh
to count the lines per contributor
true
not really sure how to make github bots tbf
google dot com
but lets not allow people to call something "main feature", "main command" n stuff
someone will need to sacrifice his lines to do the lambds thing
import a library you make
just nothing like "this way to go. main is bedwars. main command is cipher." etc.
oh
ahh kk
so lets make the whole plugin using libs
this would fall under that
in a sense
that can be up to people with write access discretion tbh
but do add a note to that in readme
so then lets state it like this
The project management reserves the right to reject code additions, libraries, frameworks or other additions.
might rephrase that
yep something like that sounds good
@tired aurora mr. english, do you approve that?
and for that maybe something like
To target a main goal is prohibited
exactly
then someone joins and decides to lead everyone to make a bedwars plugin
not what we want
lets write a plugin that gives me op
Adding malicious code or software to the project in any way is prohibited.
i might add some feature that spawns mobs with configurable damages
i will write my own
like hypixel
public void method1() {doStuff();} public void method2() {doStuff();} public void method3() {doStuff();} public void method4() {doStuff();} public void method5() {doStuff();}```
💀
oh well wait
semicolons
what a nice rule
or you could be mean and waste people's lines
@viral escarp
by creating methods but just spam them in one line
no my lines
oh true
thought u were trynna set me up for failure
and make me push with wasted lines
we also need internal rules for acceptin PRs
oldest PR gets merged first
first come first served
so if you push something with a wasted line, someone steals it, then you make another pr to fix it the stealer gets pushed first
and so the war begins

war!
have fun wasting them lines
so like there is a main plugin that does not count to anyone’s lines
i mean
you could move files
since you would delete the lines and add the exact amount again
wdym?
@viral escarp so rules for accepting would be
- first come first served
- all "managers" have to approve the PR
sounds good
im trying to remember when i was first learning java
and not declare variables for shit
but its hurting my brain
calling event.getEntityType() every time lmfao
variables are a waste of code
this would provide a bit of clarity
no
empty lines = a line
alright
oh my god
package we.are.project.cipher;import org.bukkit.entity.Damageable;import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;import org.bukkit.event.entity.EntitySpawnEvent;import org.bukkit.plugin.java.JavaPlugin;
public class ProjectCipher extends JavaPlugin implements Listener {
@Override public void onEnable() {this.saveDefaultConfig(); this.getServer().getPluginManager().registerEvents(this, this);}@Override public void onDisable() {}
@EventHandler public void onSpawn(final EntitySpawnEvent event) {
if (!this.getConfig().getStringList("DoubleHealthMobs").contains(event.getEntityType().name()) && !(event.getEntity() instanceof Damageable)) return;((Damageable) event.getEntity()).setHealth(((Damageable) event.getEntity()).getHealth() * 2);}}
LMFAO
this is fucking aids
"i need help it doesn't work please"
bye bye reputation
lol
config doesnt count
as lines right
ohk
nope
is there a max line length
just got eyecancer while looking for the semicolons
max 3 semicolons per line
shit
you can use a workaround with lambdas
alright then

Runnable... is actually the thing
sick
i think this commit is good the one line only has 3 semicolons
cipher now has a function
i feel stupid
configurable option to have mobs spawn with 2x the health 
brigadier
29 lines left
Whats that?
imports made me waste a whole ass line smh
the mojang commands api
use fully qualified names instead
well whichever it is :p
be fast burchard
it is dick.
no its not
black market for lines
dick.pussy.bukkit
imagine lines trading
only one package before bukkit
lets release $LINES as nft
at some time we need to have some clarity
otherwise how tf would people contribute
either someone wastes their lines for some empty lines
bro
or we do that at some point
make sql database for lines
we need to make a bot that monitors everyones line count and closes prs if they dont have enough lines left
make one
^
you could have a store to sell lines
32 lines left for me
lets monetize the project
now you can literally read the code
its already so unreadable lmfao
thats what i meant with clarity xD
here we have to go into the definition of "lines of code" - is an empty line a line of code?
hmm now that i think of it
maybe we can make whitespace not a line but github will count it as an addition
$10000 $9999 for 10 lines
definatly gotta find ways to make it more readable
people will still have to oneline things
but an empty line could restore some clarity for sure
no
maybe we remove use of fully qualified names too cause i feel it would be a little aids
package we.are.project.cipher;public class ProjectCipher extends org.bukkit.plugin.java.JavaPlugin implements org.bukkit.event.Listener {
@Override public void onEnable() {this.saveDefaultConfig(); this.getServer().getPluginManager().registerEvents(this, this);}@Override public void onDisable() {}
@org.bukkit.event.EventHandler public void onSpawn(final org.bukkit.event.entity.EntitySpawnEvent event) {if (!this.getConfig().getStringList("DoubleHealthMobs").contains(event.getEntityType().name()) && !(event.getEntity() instanceof org.bukkit.entity.LivingEntity)) return;((org.bukkit.entity.LivingEntity) event.getEntity()).getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).setBaseValue(((org.bukkit.entity.LivingEntity) event.getEntity()).getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getBaseValue() * 2D);((org.bukkit.entity.LivingEntity) event.getEntity()).setHealth(((org.bukkit.entity.LivingEntity) event.getEntity()).getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getBaseValue());}}
on a brighter side though
i mean you can just import *
its basically 1980s obfuscation
an
idiot
disturb,
sam
you cant import everything but everything inside a specific package
import java.awt.*;
still -1 line
write the whole import
f.e. org.bukkit.entity.* would import LivingEntity
@org.bukkit.event.EventHandler void onSpawn
did that here
thats the thing we wanna avoid
but its aids to read
lets find some rules for clarity
its already aids lets make it more aids lol
we could also take out imports from line counting
was thinking that too
we still wanna have people contributing
not dieing
dont wanna deter too many people away haha
we can do a vote for the people in this thread rn
isnt that the same?
not in this thread
lets wait a bit
and then let the contributors vote
for now add the imports again
hmm so should i merge my aids commit then lmfao
maybe we could add a temporary rule of "whitespaces and imports doesn't count as lines of code"
no pls
why not?
im wondering how long this thing will survive
what if you edit someone else's line
the idea of the project is to limit the lines
does that count as your line
35
35
yes, but at some point the project will freeze if nobody can contribute anymore
tbh not sure about this part
i would assume yes
since the last bit of clarity is lost
yes
that happens to ANYTHING that have a limit
hard to follow up
database?
yeah ima learn github api
then we can do whatever we like
i like the idea of only have 35 lines AND you can get some by deleting others lines
thats not that inflationary
yeah but as you said everyone will be out of lines at some point
^
there will always be something to improve where you can gain lines
so if you dont use your 5 lines they dont carry over and you get 10
oh yeah so you can have a max of 2 extra lines at any time
or 4
ill try to make a bot anyways
just for the counting
none of the lines per day stuff
lets keep it like it is for the beginning
maybe at some point if nobody can do shit anymore we can think of that
not a bad idea, but yet a bad timing
okay sounds good
but bot idea is good
just to count lines
cause it is rather aids for us to manage
not to mention
you can reformat when you clone
then compress it back down when your done
so what do we do about the clarity thing
lets just see how things go
idk how to write python ive given up
i do
what i did i probably the longest line youll see
what’s needed
since i used Attribute API
a simple github bot to just count peoples lines
if we breed up the fully qualified names from the beginning and at some point determine that imports are fine, then it will be really disgusting
and close/deny PRs when theyve run out
Basically we just need to be able to track how many lines someone has and what orby said ^
ill try
im good with nodejs
i just dont know how to make github bots
just like the whitespace thing
very true
but it is a simple fix
someone can just replace all it shouldnt effect theyre lines
since imports wouldnt count if we do add that
theyde just be replacing code
which is fine since you can infinitely replace
as long as you arent replacing someones actual usable code ofc to gain more lines for yourself
ima try to do it in typescript
i love how i was gonna remake tinkers mod in spigot
and now its 6am and instead of working on that
im working on this xD
Should imports and whitespaces be excluded from the line-count? https://strawpoll.com/polls/GJn4GrbB3yz
make 2 seperate ones
3pm here
so is everyone contributing to the same plugin, or everyone getting their own modules
same
same plugin
same
oh its a strawpoll
kk
someone post this thread in #help-development in a few hours as well
im heading to bed now
keep the thread alive
gn
24 hours of no activity = delete
maybe we get so much support we get our own channel lmfao
never
md_5 would 100% back this
@md_5
in nodejs its just require('./config.json');
in java it is
yeah but typescript was complaining
ahhh ts
use gson or jackson
meanwhile js: the fucks a json library?
nice

okay fr gnight, make sure you vote guys
lmfao
ight ima go back to making my plugin
// import libraries
var GitHub = require('github-api');
// load configuration
var config = require('./config.json');
// login
var gh = new GitHub({
token: config.token
});
``` this is what ive got
dm me a tutorial you find
wut da is this
im thinking of an ideaa
this seems like java is a bad language to do this with, cause you can literally just write it all on one line
max 3 semicolons
that's nodejs
looks like python?
oh
public interface ArgRunnable { public Object run(Object arg); }
public static Object run(ArgRunnable... args) {Object result = null;for (ArgRunnable arg : args) result = arg.run(result);return result;}
public static void main(String[] args) {
System.out.println(run(arg -> 1, arg -> (int)arg * 2, arg -> (int)arg * 3));
}
```How 'bout that
infinite code on a line
(main is an example)
smart man
unlimited files
alright
just note the class declaration is a line
will check it in a bit, if any PR's open in the meantime yours takes priority
comments count
InfinityCode lmfao
yes
This technically bypasses semicolon limit
as you can just call a function and use it in the next
if you are very careful you can do infinite stuff
did a misspell
should be Runnables
rather than Runnable
(in the last javadoc)
so do we exclude them?
guess so since the vote is pretty high
can let it run for a few days
also can you merge ike's commit
im busy making a spigot forum post for functional interface commands atm and dont wanna ruin my workflow atm
done
How many lines did you think I saved with that O_O
imma definatly use it
whole plugin system in one line
lol
what is this
sec
OH
I just deleted the entire point of a single line
by making infintie lines that abide by the rules
kekw
@quaint spruce That is how I made my commit to cipher
just wrote the new file in github
lmao
well, however long discord decides to keep threads
Still fucking proud of this
24 hours of inactivity = archive
but I do believe they implemented it oddly and will probably change some time this year to be more sane
today is day 2 of this thread
to compliment the double health feature
I already have a cool plugin idea 🙂
have fun implementing into that clusterfuck main class
as long as its not over 3 smicolons your chillin
lmao i won this
we have achieved a problem
I do not know how to handle void
(I will convert it to one line once I am done)
setBaseValue is void
but i require obj
wrap that attrib in a method and make it return empty object
Done
I used one more line to add the method
but I am using my lines to make people be able to use more lines
so i am fine
In theory this should be lifesteal on one line (I made it multiple to type easier)
@viral escarp impressed?
god damn
It also has eliminations
sounds good!
in that format it even looks really clean
and in a one liner it should be pretty easy to read
but like, can we just count multiple lines inside a block (so like that) one line? makes it easier to read
just this runVoid seems ugly
I wasn't able to find another way
It basically takes a runnable, runs it and returns null
you mean count the statements?
yes
rather than the actual physical line
count the statements
So you can write cleaner code, but its still technically a one liner
you choose
idrc tbh xD
hm, good idea but that could destroy the concept. the exemption that imports and whitespaces do not count already scratch that.
fair point
would probably end in "hey, i've coded like regulary but i just give a shit on clean code"
@viral escarp what would you say
Hmm
mmH
explain a little im partiallty retarded
basically
take this
rather than putting it into 1 long ass line
put it like that
and count it as a line
I know something to add to infinite code now
Question
is refactoring counted toward lines
depends on what you do
just move the code to my infinite code structure
github counts changes as -+1
since you remove it in file X and add it in file Y again
imports do not count right?
What am I looking at
1,128 characters lifesteal
on one line
i am proud
btw
@lethal glen is changing the pom.xml counted?
I just updated java to 17
nope
lol tabnine screams at me too
At this point I am devoting my lines to help others
just import BurchAPI
nah
<!-- My own plugin API -->
<dependency>
<groupId>com.github.Burchard36</groupId>
<artifactId>BurchAPI</artifactId>
<version>01-AD-20</version>
<scope>compile</scope>
</dependency>
I wanna keep it in the project cipher style
:((
by making it completely unreadable
fine ill import my lib when i make a command
nah
just bloat this shit with so many libs and methods
and we thought people would steal lines of each other
lmao

lets be friendly and make the most we can
henlo ewerywunn
henlo äläxs
@outer sail you already fucked up
yes
btw I suggest to put everything in the default package, that saves one line / one semicolon per file
anything thats fun
i'll do something related to creepers, vectors and yeeting
oh yeah I have an idea
alright
there now exists double health, lifesteal, later double damage. seems like we are going into the direction of MMORPGs
will add that in an hour or so
yes
there should be a list in the readme of already added features
since it's not very easy to just look at the code
true
btw @tired aurora/@tight rain anything new about the bot?
actually I suggest to add a table in the readme 😄
|Feature | Author | Files
|--------|--------|--------
|Lifesteal | XY | File.java
including the file where it's added maybe 😄
because yeah the code will be looking like shit
getting people to actually take care of it can get hard
well everyone should just add their stuff to the readme when they commit
who added double damage
I can do that
and if they don't, tell them to add it or it won't be merged
yes but some will forget about it
wait
they cant commit instantly
and we have to sign it
so we can just insult them to do it
good point
yeah
i have not touched this project tbh
oh thought you said you're looking into making the bot
Are you keeping all these imports
can I add tests that don't count towards the line limit?
what tests? like JUnit?
it's in separate files and has no functionality later on anyway
in fact it's a separate directory
src/test/java
so I don't see a reason to not do that
yes ik and they dont even need to get compiled
@lethal glen Pull requests
lets see what burchard says about it
I wouldnt be averse
Hmm
Make a vote probably?
Steawpoll
Ill look at pr in a few
ffs
kk
awww who refactored my code ❤️
me
didnt thought people would tryhard for lines this hard
fuckin hell
package we.are.project.cipher;/**Made by Ik#2932, This has limited uses but is really useful to save on lines!*/ public class InfiniteCode {
/**Interface to run code, takes output from the last, and outputs a new value (first input is null)*/ public interface ArgRunnable { public Object run(Object arg); }
/**Runnables in, Output out*/ public static Object run(ArgRunnable... args) {Object result = null;for (ArgRunnable arg : args) result = arg.run(result);return result;}
/***/ public static Object runVoid(Runnable runnable) {runnable.run();return null;}
}
is it me or did you just waste a line for the last }
@outer sail
uh oh

okay i should rly finish my spigot post lmao
worked on it earlier today and didnt finish the last part
isnt it like 5 am in your country
yes
im almost done with it though
just one more class example
NOOO
MY TEXT DELETED WTFFF
yo burchard u still working on the tinkers port or have you just completely dedicated your time to the cipher thing lmao
WTF!??!?!?!?!
i indeed am
just havent worked on it today
how do i load a draft guys
pls help
ah ok because it seems cool
that took so long to create
idk
lol
hopefully the end result will be very cool 🙂
Plus i only contributed one thing to ciphers
tinkers port takes priority
i just want more spigot clout so i worked on this today
i wanna see that post
what about people who arent using java 16 and dont have access to records 🤷
they can just use the normal class then
and create getter methods for the constructor variables
ill make sure to add that
ty
i had to specify that for this piece of code too
as thats jdk 16 too i think
tbh this is more for advanced devs who want easier ways to create commands
definatly for people who actually know java
I made it already tho
did you already posted that on the forum?
wait fr
i want to see it
im explaining the command handler then after that its ready
I made registerCommand in InfiniteCode
o
oh yeah lmfao
lemme clean it up and push
but using that in a real plugin would be aids xD
fr
i used to have a annotation based sql lib VanishedMC made
i worked with him on minestar and we used it
was pretty nice
@viral escarp
hey conosle
ohh
i read that pr wrong lmfao
i thought we were waiting for LMB to add something lmfao
he did
34 or not?
he has 2 lines
on it
i added command registering
what did you do there
LMB's first then ike's
ye ye
LMB, alex then ike
for what
LMB used 1 line


