#dev-general
1 messages ยท Page 361 of 1
well nowhere because you guys are dismissive of anything I bring up
"What's the better way"?
i dunno
what have you brought up
i was hoping maybe you guys could help me figure it out
That standardized testing tests test-taking instead of real knowledge
That programming interviews use more theoretical questions than practical ones that will help on the job
And those are things I think could be improved
Well interviews are done by private companies, so they can basically do whatever they want right?
But asking me how I think they should when I don't know and was bringing them up to you guys, who probably know more than me, isn't reall yhelpful
i'll address each of those properly as best as I can
Well yes, I'm just saying that maybe as an industry, perception of those things could change
first, why do people take tests / interviews
The issues is, every form of measurement of a person's skill is a "test"
people take tests in order to be ranked
Alright
Something like projects with real-world applications would be better I feel like.
i think there'd be a few issues with that
You could use everything from tests in it
"You have 3 hours to build and ideate and build the next Instagram"
๐ฎ
time constraints, and enough of a difference to not be comprable
But like when is a job going to give you two hours to make a giant project?
What projects would you expect?
1 hour tops
just take a look at #816184744797929522 ๐
Lol
"You have 1 minute to become jeff bezos"
for Google?
For the role of "Jeff Bezos"
๐
๐
Just use @forest pecan 's virus to steal his identity
Exactly
Lit
and next jeff bezos
great plan
You "borrow" the money indefinitely
Its the banks fault for leaving money out
^^ this
Just because you use a vault doesn't mean I should know that its being protected
"Oh hi!, Im gonna need to borrow a million dollars."
"Sir, you will have to..."
"I can give you a bullet!!"
".... ok sir... here you go, enjoy"
Why not billions while you are at it?
Too much to carry
Cashier: "One bullet for 1 billi.. POW"
True
Tell them you need another loan
How many bullets you got?
Hmm
i got one in your head so far
You could buy at least seven with a couple million dollars
oh as far as those competition problems go, how about having a statistics related one
๐ฎ

We've moved onto banks now
From dancing cows to banks
There are similar ML competitions now I think
Very related
This is new
Daggle or Doggle or something
๐
If someone actually does have some more beginner-type questions I would love to try them lol.
i have one
that i ripped from youtube
its not exactly an algorithm question though
It doesn't matter
perfect way to spread my virus
Any type of question
Go through project euler
print the numbers 1-100 in java, but without using any numbers in your code
that's just trickery
yes
Oh I have it
oh nvm ik lol
"One Two Three Four Five..."
Yes?
print 1 2 3 etc
Okay
daily coding problem or project euler if you want algorithms style questions
there'a actually 2 major ways with a bunch of minor adjustments as far as i can tell
maybe more than 2 idrk
Okay thanks
Wait
Can you define no numbers?
Like could I use indexOf list, then ++ to that until I get to 100?
sure i suppose
for (int i = (int) ('b' - 'a'); i <= ('u' - 'a') * ('f' - 'a'); i++) {
System.out.println(i);
}
i see int
But there isnt a literal ๐ฅฒ
just use var lmfao
List<String> list = new ArrayList<>();
list.add("");
for (int i = list.indexOf(""); i <= 100; i++) {
System.out.println(i);
}
thats pretty close to the solution the youtube guy had so props yugi
๐ฅฒ
Oh oops
lmao
I'll just manually add 100 Strings
dont use ascii if you cant help it, i think the alternative solution that i came up with is much more creative
i keep thinking that while coding something os dependent
Actually I have a solution
๐ฅฒ
Is the restriction only on number literals ivan?
yes
lol Pulse
List<String> list = new ArrayList<>();
list.add("");
int i = list.indexOf("");
while (true) {
System.out.println(i);
}
Supporting fucking mac users be like
You ping me one more time and Imma whoop ur ass
bad master
It works
harder
This mf
ok
it doesn't give 1-100 as output
Yes it does
it gives 1-max int as output
It just gives extra
that's no good
if i ask for 1 squirt of mayo on my sandwich
i don't want the whole bottle
k
ew
just print out ascii values, ez
yeah ascii is the correct answer that the youtube video had
but there is another way
There's probably multiple, ascii is the most logical tho
definitely
won't that print out 0 forever?
yep ๐
int a = Integer.MAX_VALUE - Integer.MAX_VALUE;
while((a+"").length() < "aaa".length()){
System.out.println(++a);
}
BigInteger limit = BigInteger.TEN.multiply(BigInteger.TEN);
for (BigInteger i = BigInteger.ONE; i.intValue() <= limit.intValue(); i = i.add(BigInteger.ONE)) {
System.out.println(i);
}
i could replace that first line with
int a = "".length();
or really anything that gave 0 i suppose, lots of possibilities there
look at this dude
String s = " ";
while(!s.isEmpty()) {
s = s.substring(s.length() - s.length(), s.length() - " ".length());
System.out.println(s.length());
}
Write 100 with only 1 literal and nothing else but it must only contain one 0
church encoding
shh
explain o.O
Give it a try
i dont know what that means
I'd need a minute to think about it
final String poggers = "ABCABCABCABCABCABCABCABCABCABC";
for (int index = (int) BigInteger.ONE; index < poggers.length(); index++) {
System.out.println(index);
}
0x64
Yes/No?
oo hex
lol
no
You cant ++ on a big integer
๐ฅฒ
What
int index = BigInteger.ONE
Still no
shut up
You cant cast big integer to int
go outside
xD
Did you see my answer @oblique heath ?
yes
Best answer there is
are there a hundred spaces in that first string?
There are
xd
the only other problem i've seen from that youtuber is print "hello world" without using any semicolons in java
What were the conditions anyways btw?
weak
yeah the hello world one is a fair bit easier
or at least there are less possibilities
"without using any semicolons" :what:
you can't type ;
but
that
???
java needs semicolons everywhere
it's easy
'tis java
are you guys serious
java seperates statements with ;
yes
kotlin ftw
Just don't use java
i got this in like... seconds
unless ur gonna just use clojure or kotlin
Show
please dont raise my self esteem like this
Unicode escapes
how are u gonna
do you want me to tell you
what
how
Yes
yes
Do share
if(System.out.printf("hello world") == null)) {}
You still need semicolons idot
nope
Was a response for Pulse
no
ah xd
I was thinking of that but sout doesn't return a String so I didn't know how lol
kek
dat insane bro
yeah, System.out.printf returns the printstream i think... or something
println is a void tho?
i'm using printf
Yeah
ah
you can also use System.out.append
๐ฅฒ
btw why does kotlin have print when all it does is just call System.out.print
why does kotlin have fun
cause System.out.print is useful
I'm not having any fun
but like whats the point of it
i am :)
it doesnt append a line
y not just do System.out.print
it appends to the current line
concision
ok
I just spent 10min figuring out why gradle isn't installing properly, when I misswrote the path to it :sadge:
Matt, Triumph Chat Where
Why do you create a Utils.color if all it does is call ChatColor.translateBlahBlah?
who in their right mind would prefer writing System.out.println???????
Searching for it ๐ซ
why does cpp have endl when you can just use "\n" ๐
Why does 2+2=4?
First appropriate thing to do when updating a project
@oblique heath
How about
public class HelloWorld{
public static void main(String []args){
/*\u002a\u002f\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0048\u0065\u006c\u006c\u006f\u0020\u0057\u006f\u0072\u006c\u0064\u0022\u0029\u003b\u002f\u002a*/
}
}
i agree frosty
o.O
next is ctrl alt shift k
No Kali
Did you try running it?
should i?
does this mean its already in kotlin? ๐
Nein
Next is to change to kts gradle
disgusting
Yes ivan
Try running
lol
what is this witchcraft
unicode magic
is it possible to do like in kotlin
val smth: Type = {
do some stuff here
to get me my variable
return variable
}
Where variable is then assigned to smth
then running the code for hello world
that's pretty kewl
This is the unicode string */System.out.println("Hello World");/*
would it be possible
yes
to instead of using the */ /* unicode
just have it inside a 1 line comment and encode a newline char in unicode
run {
}```
i thought it was init {}
ya nope
That could work too
that doesnt work
what does run do?
i'll have to play around with that later
lol
init is called when the class is instantiated, not used for a variable
Runs something ๐
val x = run {
print(31)
2819
}```
Yes
wonderful
its immutable
val
๐ฅฒ
val x = {
print(31)
2019
}()
I'm actually curious as to how kt handles that
Since java variables can only be 1 thing and run is inline
I guess it does it in the constructor
()
class Blah()
run (() -> Int) ?
It just calls the lambda
no not that
What?
like how do i have 2 constructors
constructor keyword
it doesn't create a lambda because it's inline though
with params
the function is inline doesnt meant the lambda isnt created tho
That's what inline means?
No
Explain what you want, you'll likely not need 2 constructors
it copys the definition
No I know what you mean I think
Yeah
My bad
Maybe
I wanna check when I get home
i just remembered the question from a long time ago, i forgot why i needed it tho
:c
Sure
Another question, I use EntityEquipment packet to display a block on a players head but in their inventory slot i want it to be the original item
how would i do
Simply by just doing it
Maybe complicatedly doing it
Hi, i have a questing about AutoSell plugin, when i do /asa setmultiplier MYNAME 0.5 0:1:0, it does give me an multiplier 0.5 when i do /multiplier. But when i sell it at the sign, it tells me, i have mutiplier 1.5, why?
elixir, was gonna kek if it were clojure again
I got Haskell! ๐
is golang in there somewhere
Oh this hoe
sedner
should be "This guide talks about tax evasion" not "This guide talks about Tax Evasion"
Fuck
lol
like me uwu
alt + z ๐
@prisma wave AI to figure out the description when
Okay listen here you little shit
oop

Another fellow haskeller
amazing
title.toLowerCase()
lol
StringUtils.capitalize(title.toLowerCase())
Guys Haskell is the superior language
nah I'm talking about it figuring out something that makes better sense
Welcome to the Simon followers club my man
the true alpha
to make it more convincing
ah I see
Definitely
take the first google search of tax evasion and slap that bad boy in
wat
you have about 3 brain cells at the best of times I swear
3? ๐
at least i dont have 2
oh sorry, that's a bit too generous
probs yeah
imagine needing an entire method just to make the first character upper case
wdym?
Yeah like why not use 2 methods?
it makes sense
functional gang?
it's probably faster than the alternative
i dunno
๐
i should make an alt account and no one can bully me anymore
Well yes Bardy no shit there is no single assembly instruction to do that
we would soon find out anyway
that means twice the bullying
ur not hard to tell apart
You will always need a method for it
dkim19376?
._.
ily
guess the username then
wat
its already in this server
WrOnG
I could probably improve it a bit, not capitalising some words (eg And and To) and things
omfg so true
๐คจ
Could also use different separator characters or something to do different meanings
why have u just tagged me twice for the same message
Absolutely not
Go is nice but it's not pure enough
minus a brain cell that bardy kindly told u u had
asymptote gang
๐ฆ
what about swift
swift is just apple kotlin lol
Yeah
add java it has streams, very functional ๐
pretty sure it's if a function has no side effects and is entirely self contained?
pretty much
so like, you pass 2 things to add and it returns those numbers added
doesn't change state or anything
No side effects, and doesn't modify anything that isn't defined in the function itself
Technically not
is C pure then
If you know the seed and the number of invocations then it's pure
oh
Not in the slightest
well i guess c has structs
C is all about mutating things
How deep does it normally go? I couldn't think of any complex component to test either, that looks good though
deep ๐
>> go brrrr
C has that?
o right lol
yes it does!
I thought you meant like c++
nah nah
lol
definitely questionable
lol
balls deep
okay that's enough
We're talking about children here
I mean I'm digging a grave so yea, it's gotta be deep
Lmao
wait so if you have a pure language
Me, myself & I
awe nice
damn
how would you represent data structures within that
Immutable data structures
like if you wanted a binary tree or something, how would you implement that
It'll be a tight fit
god i really love immutable things
data structure with variable of instance of itself
weird how most things in most languages are mutable by default
The actual details depend on the language, but it would be pretty similar to any other version, just immutable
immutable good
sure
hurry someone code a linked list in haskell
Haskell can do a binary tree in literally 1 line iirc
wows
so it's not all that different from other languages, you still have classes and instance variables and the like
i was imagining a completely functional language that could only have functions and nothing else lol
Yeah people will say "FP is TOTALLY different" but it's really not a massive change
i mean, Kotlin has some FP in it right?
so like, there can be a mix
Mhm
just the percentage skews
yeah
data List a = Empty | Node a (List a) I think
Haskell is definitely 100%
damn wtf that's awesome
Haven't tested that but yeah
Uh
@ocean quartz Have you found Triumph Chat yet?
Haskell is !!Pure!! and functional ๐
I think it would be ```fs
type List<'a> =
| Empty
| Node of 'a * List<'a>
So a bit more syntaxy
Yes
Also, i've been using the latest dev on my server and it's working quite well
except that for some reason it doesn't override essentials /msg
๐ฎ
Yea I've been using it on a beta server and it seemed to work
Not sure you can really measure it in percentages. Kotlin is technically 100% just like it's 100% Turing complete, but it's not purely functional and doesn't have a lot of FP-related features built in
trynna convince this dumbass to throw it on the main server but he'd rather use shit like VentureChat
There are no classes
what are there instead of classes then o.o
whats with these #816184744797929522s within the past hour ๐ณ
structs, records, discriminated unions, tuples, it depends on the language
Also functional would mean more of solving something relying heavily on functions and operations on functions and not being just function
yeah
Basically even a simple let binding* is a function in haskell
due to lazyness
let a = 5
Would translate to
val a = { 5 }
in kotlin
I mean even types just compile to functions in Haskell
I think so
Simon talked about it in that talk iirc
The ivory tower one?
yeah
I see, Ill rewatch that tonight then I guess
๐ ๐
@stuck harbor the latest #816184744797929522 is for you lmao
lol
hehe
I don't do requests atm
hm
sheesh
Old ones on central vs new one on my repo
The central one wasn't my choice to add the utils
wait a minute
if mf-msg supports Adventure, that means it'll work on Krypton
๐
No idea, I tested with this and it worked lol https://github.com/Fefo6644/BetterJails/blob/main/common/src/main/java/com/github/fefo6644/betterjails/common/message/Message.java#L86
lol
what is that
yes
guard clauses superior
totally didn't pick that term up from a YT video about noob vs advanced vs pro JS lol

until you end up with about 10 statements
and then you can do what my friend did once on AnyDesk and use the draw feature to literally draw a line down the side of my code
2 is max
arrow code ๐ฆ
but still no arrow code >
statements ๐คข
โน๏ธ
what do you call them?
lol what
i mean
think about it
nothing
That's what they are
But statements bad
fuck does this mean
lol
literally makes no sense
@prisma wave https://imgflip.com/i/52p727
In response to this -- it's the right word but statements bad
Yes
Everything should be an expression
That's how to separate the good languages from the bad ones
so if bad then
questionable
try catching knpe ๐
statements? everything be function
Close enough
oh btw, I was actually reading something earlier that's really interesting, it's about mixins in Kotlin
sorry should we use try catch EXPRESSIONS instead?
it's so cool how in kotlin you can put a function as an assignment with equals signs
๐ง
so you know how Kotlin has delegates right?
it just makes sense, ya know?
yes
and you know you can use them for properties?
well guess what
you can use them for inheritance too
try catch ew
Result types >
lol
How casn you reforge items in hypixel skyblock pls dm if you know
e.g. ```kotlin
class Book : Orderable by Ordered()
(example from the article lol, or at least, part of it)
who's gonna do it
uh yes, that's the point?
I never knew they were applicable to inheritance
blew my mind that one
ty babe x
Oh fair enough
Yeah they're cool
No?
not at all ๐
disgusting behaviour tbh
yeah it just sends you to a random functional programming language's site
ew Chrome
ew
and Dust
Rust*
ngl Rust's compiler safety is out of this world
ffs why does IntelliJ reset my style every fucking time
or maybe it's Material getting confused or something
&mut T ๐
:)))
mutable reference
pointers are weird
nah
but also amazing
also, * ( long * ) &y cookie to anyone who can tell me what this does (y is a float)
what
the
actual
fuck
that's used in that inverse square root hack right?
to read the float as a long
thought so
reads the float as a long
Reinterprets the bytes at that address as a long instead
if ur not going to brace the ifs atleast put them on the same line
yeah
๐ช
edge ftw
first, we read the address, then we convert that address, then read what's at the converted address
idea for krypton:
๐
union {
float a;
long b;
}
does the same thing :)
make it not print out the players ip address on join ๐
union types ๐คค
why not? lol
Then how are server owners supposed to threaten their players?
also, it already doesn't do that
oh but they're C union types
for server logs
oh dear
I can have an option to disable that
and they dont know that they're leaking ip addresses
at least make it default to off
Are you speaking from experience?
maybe in super-secret-settings.conf or something lol
Yep, they just share the same bytes so you read them as you want
yes
oh btw @quiet depot let me know when you want to talk about the c# thing
pinging admin ๐
ban C#
I've finished my work
i still have traumatic experience ๐
oh btw, what do you guys think about me converting the config from TOML to HOCON?
dont see the point in BEING staff if you CRY when some one asks you a QUESTION and never be active
Overdramaticided
lmao
message from:clip#123914 in last YEAR ... 0.01
Consider ELON
my fav is yml
its very versatile
inb4 we never hear from bm again
lemme give a demonstration for the uninitiated about how versatile HOCON is
Hocon is cool
"funny" cube is at my address he is in the driveway
a thousand functional languages screaming out at once, all to be silenced
What happened to fanny cube?
{
"foo" : {
"bar" : 10,
"baz" : 12
}
}
"foo" : {
"bar" : 10,
"baz" : 12
}
foo : {
bar : 10,
baz : 12
}
foo {
bar = 10,
baz = 12
}
foo {
bar = 10
baz = 12
}
foo.bar=10
foo.baz=12
foo.bar=10, foo.baz=12
```
not so funny anymore
every single one of those is valid HOCON
BAN WALL OF text
damn
hmmm
i prefer Kotlin myself honestly
nah
ah ok
just got bored
Kotlin DSL superior
how come we don't see more kotlin DSL?
we do
I've only ever seen it in gradle
overrated and unprofessional
also, imagine using a DSL that doesn't syntax highlight properly
Haskell could do better


what is your obsession with monads
why wouldnt you be obsessed?
data Maybe T = Just T or Nothing that's actually not that bad tbh
drooling face emoticon
Json on steroids?
indeed
lol
Also, who put a space between the key and : ew
yay
whats the opposite of finalizedBy in gradle?
as in, how do i make it start with that
startedBy
good news CHROME-DEV has worked
๐
now i cna GOOGLE the eror for chrome-stable
wait
how do i run a task in doFirst
im goodn't at gradle lol
ughhh i don't really need to clean do i
naahhh
i dont need the clean task
How inefficient is a timed cache
You don't do that
What do you want to do exactly
@west fjord This a custom world gen ploogin, or something already out there?
And I assume it ain't OS
No
Sadge
OS is a plugin?
No, I meant as in is it Open Sourced
no its private
nt frosty
OS or death ;C
not required
what's the point in making a world generation system if it's not available for use to the outside world
lol
I'll probably end up making my own from scratch in Kotlin tbh
might steal a bit of your work though Frosty
and credit you where I do
what work :kek:
I mean, not a bad point
I'm waiting for Yugi to make the visualizer, but I think this dood forgot
I just need the numbers lol
also might rewrite Starlight in Kotlin as well
because its codebase is absolutely horrible
So I had an issue to fix in an existing plugin I didn't write, I kind of rewrote everything from scratch :kek:
When you can't be fucked figuring out other peoples code 
I want Krypton to be pretty much entirely Kotlin
with some Java libraries in there ofc
kotlin client 
oh yeah, BM
PDM support Krypton when
you can support Krypton ez since I expose addPath (wraps addURL and takes a Path and converts it to a URL)
yes
Fork pls
brister mitten tutorials is becoming like papi 3, its a myth
๐ฅฒ
๐ฆ
forgot about those lol
do we have any updates or are u "busy"
lol
ill revive them when i remember
when is BM not "busy"
wait
bm :c
lol
maybe
okay gimme the script bm
ill record
o
||using google translate voice||
voice reveal?
you seem to have done most of the work already
I am speeeeeed
there's still a hell of a lot to do though
i dont have a mic