#dev-general
1 messages ยท Page 408 of 1
oh ๐
You only understand the joke because you have experience with the products, Matt has obviously never used them before
what does that say about you, who made the joke in the first place ๐ณ
Who knows?
Hey I'm looking for java devs to join a team, also looking for alpha testers for an upcoming api and framework plugin, lmk if you're interested
i need help in mcpe server
ok
I'm on my way to school rn rip
Oh btw, @hot hull guess what I added to Krypton's API yesterday
ServicesManager + ServiceProvider
Damn
So for my server I have made golems die as soon they get in lava and drop the ingots 1.3 blocks bellow. Would be a bad idea to try to put the ingots directly in the hopper underneeth lava, and if none was found to just drop it there?
Depends
Putting it directly into the hopper means you never have to spawn items, meaning less lag
Maybe even expand it to a radius of hoppers?
that way like one hopper can cover a 3x3x3 area
I thought about that but didnt had time to play with it, will probably do it next season
season?
Or, hmm
Ye we plan a wipe when 1.17 drops
The server package for Krypton is org.kryptonmc.krypton, so ya know, no NMS
qol plugin or somethin?
OKK
qol?
quality of life
Idk what that is xd
Lol
like just stuff that makes the game a little nicer
like instakilling golems and vacuuming them to hoppers and stuff
that sounds like minor helpful changes
ah yeah optimizations
Entities are killing us
is the math of like calculating a radius and stuff cheaper than spawning an item?
I guess math can be done in like one cpu cycle but items cause a lot of problems with packets and stuff
Pretty sure, yes
๐
Adding that to the list of things I need to make sure Krypton can do well lol
Progress!!
ooh don't forget tnt too
Yeah I'll see what I can do about that lol
Nice yugi
That might be hard to optimise well
Now I need to setup some sort of score or something
Have to present in class in an hour
๐
nah you just delete the tnt entity and particles and stuff and do the block damage yourself
the laggy part is the particles
oh does tnt really bother the server that much?
Enough TNT can crash a server
Yeah but TNT is known for being really poorly written
Force the server to only calculate a maximum of a set amount of block explosions per tick
ah yeah that'd probably be best since messing with the max block explosions could mess up like tnt cannons and stuff
then no krypton for faction servers :(
I doubt Krypton will run well on factions servers anyway
why not?
That would just leave in unresponsiveness I assume?
Updates Star
what updates?
I mean I'm sure you'll figure something out?
Maybe
I don't see why that disqualifies faction servers lol
There are some modern faction servers
im being bullied at my soccer club, but i dont want to tell my dad, what should i do?
my mom doesnt give a shit
definitely try eating the club then
Start with the soccer field
work your way across
might be worth avoiding the painted lines & goals
they're not organic
unhealthy
oof
any command lib for bungee?
onCommand (Sender, Command, [] String)
lmao
headphones for best experience
1 sec lemme finish lunch and I'll go into library with headphones
okie
its like 10 hours long so you've got time
Are you doing procedurally generated music or something
nah
just fresh tunes
honestly about to bust a groove this shit slaps
it's british music too
u might appreicate it
:o
๐๐๐๐คก
shut it
@prisma wave schools are open?
theyve been open since march

I mean you are on a island in the middle of no where so you would have your own rules so
you on island middle of no where
bm did u recognise the song lol
isle of wight classes as mainland uk still
no
they're their own island now.
you posted the right one in #voice-talk
its not like guernsey ( ๐คข ) or jersey ( ๐คฎ )
what ya'll talkin about
Oh wait was it actually that lmao
yes
also what's #voice-talk
oh I thought it was similar
we're talking about my superior taste in music
it doesn't exist
very superior
it was bass boosted and 5000 volume
voice talk doesn't exist?
or the Isle of Man ๐คข ๐คข ๐คฃ ๐คฎ
u have to join a voice channel to see it
nope
lol
what was that noise
lol

i need ears ty
bots in room 1
๐ฅฒ
i am lawyer i am good law man
a karen is trying to sue me
eat her family
yes, i met a karen yesterday
for what
i "rode into her"
"On what charges" as they say
She jumped in the way of the e-scooter ๐
how is she gonna sue you
idfk
did you give her your personal details or something?
ok mr mysterious
i think i know your discord name
i have a sneaking suspicion I might know it too
would it happen to be
"UntouchedOdin0"
no
I think you might be right
bm is secretly Barry#7877

what is a 'discord name'
yes
โ
??
that wasn't a yes or no question..
oh wasn't it?
true?
i didn't give a yes or no?????
i give up
why spigot take over a week to accept plugins
true/false same thing
okay
heres another question
what is your discord name
or what is mine
String
what
?
what is a String
this
...
damn thats crazy
I am so fucking mad
:c
im pretty much the first person into the library and get a nice seat + computer
We have a FIRE DRILL
And by the time I get back some smelly nerd has taken all of the seats
And I have an essay due tomorrow
Jfjriwjqbjffiwjab
๐คก
i am about to commit a war crime
why did u not leave ur bag on ur seat tho
One person took all the seats?
literally asking to get your bag stolen
one person + others
nah
Yeah not worth the risk
Yeah leave your phone instead
very obese
why doesnt bungeecord plugins have a config like on spigot lol
what would u have in ur bag that someone would want to steal anyway
Secret Haskell code
exactly pig
yeah I can't risk anyone seeing that
well
there's also the q of weed you bought from the school dealer in the morning
don't want the nerd getting a whiff of that
๐ฅฒ
ofc
he has fucked me over twice now
A few months ago he asked a teacher to cover a lesson so our entire class had to stay in the whole day
Could've gone home like 3 hours earlier otherwise
oof
its ok atleast u can do the essay when u get home ๐
no matter how long it takes u ๐
what's the essay on
There is always #827055634586271775
ah yes pay someone to do the essay
Or #827055636109328384 โI will give you my essay to write for meโ just like that guy offering to let you join his server lol.
we've had writers offer their services in here before
like segregation and stuff in the 60s and 70s
english or history?
Math
technically neither, a bit of both
imagine doing a non stem subject (excl compulsory english)
We've got a thing called the EPQ where you can basically research anything you want and write an essay on it, and it's an extra qualification
Makes it easier to get into uni
Write an essay on the dangers of mutability
that is a good idea
there are no dangers ๐
pff
Lol
immutable designs will use more memory
little bit more processing power as ur always making new objects (maybe?, idk much about the internals)
Just use an SQL GC, problem solved
ngl that sentence is not making any sense to me
i think
Easy fix: donโt use objects
how can you talk about immutability/mutability without objects
even if they're not labelled as an object, with immutable stuff, you're still creating and disposing of the previous
i mean, is a byte array an "object"?
I object to that statement
some people refer to instances as objects
some people only refer to pojos as objects
some people call every class an object
yea i don't have a definitive answer
What are pojos?
plain old java objects
but like if you were coding in C or something would you still use the word "object"
Oh
pojos store stuff
beans
but have absolutely no business logic
Wdym by business logic?
actual functionality
Oh
They're just data
Like the records thing in Java 16?
fefo builders rely on storing the data in fields which are then disposed of once the object is built
And that's considering the fact I go to work everyday, and play atleast 3 hours of valorant
u disgust me frosty
i dont have wakatime but mine is probably like 25 hours
we just had a big unorganised pool of data
Removing integers and just storing them in strings?
and to get your values, you just had to loop thru the pool and look for what seems to be the right piece of data
Lol
Yikes Piggy
I got my seat back ๐
Instead of displaying an error message, accidentally send a list of all passwords
@cinder flare hey remember the molecule thing we were talking about the other day
that applies to what I just said
one piece of data will always be where it was originally
EDIT: finally found out what it was called, brouwer's theorem
what did you do ๐
idk they just left
oop
he committed a war crime
metaphorically
๐คจ
why not literally ๐ข
seems too good to be true
Instead of accidentally displaying an error message, forward the server's user data to some Chinese organization and profit
yeah just malloc(1 << 32);
That would work
New idea for your bedwars plugin?
malloc(Integer.MAX_VALUE)
hey im making bedwars too ๐ฅบ
do you guys know the name of the phenomenom where when you mix something, at least one particle will always end up where it started
i can't remember what it's called
I might've got the description wrong
frosty is ur bw plugin os
Good suggestion Fish
believe you're referring to M.I.L.K
not sure about that one chief
90% of my decent projects are os
Cause it's not on my GitHub
op65n org
Dkim why are you making a bedwars plugin?
He's making it for 1.8, so that doesn't even matter Fish
so that i dont have to pay for mvp++ in hypixel :)
Obviously Frostyโs will be better if they sell peoples data
You need other people though right?
Good point
rm rf the users pc somehow
ah
something called friends :p
Every time someone joins hypixel send them to your server
Smh
If itโs just to play with your friends why not use one already made?
im guessing this only applies in a closed system
none that r like hypixel exists
Watch his reaction when he sees I've done no work on it
A MONTH AGO
Just download hypixelโs source code
29 days ago ๐คก
mine > frosty
Sockets be giving me a headache
Lol
y u using sockets
nice commits ๐
Does yours work through multiple machines?
My video on Sesame Studios: https://www.youtube.com/watch?v=BTjAiyyG2sw
The Curiosity Box by Vsauce: https://www.curiositybox.com/
LINKS TO SOURCES BELOW!
My twitter: https://twitter.com/tweetsauce
My instagram: https://www.instagram.com/electricpants
DONG: https://www.youtube.com/dong
Moon Museum:
https://en.wikipedia.org/wiki/Moon_Museum
E...
ez explanation
at least my commit names are better
That's the old one Kali
https://github.com/dkim19375/Bedwars 19 hours ago last committed ๐ค
My bedwars plugin is better
o
oh i see that makes more sense now
the way u worded at first sounded like a reaction or smth
I donโt have one, but itโs better than 1.8
wdym
o
my bw plugin is 1.8 targeted because 1.16 has so many weird stuff
like blocks disappearing if i place too much on a server with barely any plugins
What
makes ghost blocks if i place too fast (1.8 client)
You're an idot is my ez explanation
idot meaning more than stupid, less than an idiot
Heh
:C
?
use 16 then
Can't
I mean yea I just need to compile to 11
dcevm?
ew
Yes
lmao
no wtf
๐ฅฒ
Why not piggy?
oh xD
p3nis?
can u finish updating deluxechat for me
I can
lmao
โฌโฌโฌโฌโฌโฌโฌโฌ
โฌโฌโฌโฌโฌโฌโฌโฌ
โฌโฌโฌโฌโฌโฌโฌโฌ
โฌ๐โฌโฌโฌโฌ๐โฌ
โฌโฌโฌโฌโฌโฌโฌโฌ
โฌโฌโฌโฌโฌโฌโฌโฌ
โฌโฌโฌโฌโฌโฌโฌโฌ
sus
cursed
lmaooo
oh wait
Is that supposed to be an enderman head?
yeah
lmao
no
xD
wow
y not cube
secret project that was started like a year ago
Penis?
p3nis
beats might be if im nice enough
no lol
not papi 3
papi 3 is very not secret
I give access to source to most people who ask
theres basically nothing in the p word
PP
gimme gimme. BlitzOffline github username
pig can i have access ๐
pp bot
blitz do you remember sex bot
yo funnycube =drama when?
=joke
Why canโt you hear a pterodactyl go to the bathroom? The p is silent.
yes 
thats already a thing right?
sad that he passed away
๐ฅฒ
I don't get that one Kali
=remindme test
Missing Quotes
Usage: =remindme <time> "<message>"
eg. =remindme in 5 hours "to feed the Llama"
Missing Quotes
Usage: =remindme <time> "<message>"
eg. =remindme in 5 hours "to feed the Llama"
=remindme 5h test
nah
O.o
idiot
Ayy
peeing
idot
pissing
urinating
its silent haha funny xd
=xp lb
The fuck
lmao
=remindme in 1 seconds to "remind myself to remind myself"
remind myself to remind myself
hahaha when you forget to join a writing conference and reschedule but then your teacher forgets it
get gabby to pr it
๐ฅฒ
why gaby?
Songoda.com adds assets to Towny for Hacktoberfest, causing adf.ly on Incendo
I saw the Lola bunny one and i had to combine the two.
The Original: https://twitter.com/nemuidesuokami/st...
Lola Bunny Original Tweet:
https://twitter.com/on_verbs/status/1...โ
Voiced Version:
https://twitter.com/ViewtifulVal/stat...โ
Viewtiful Val: https://twitter.com/ViewtifulVal/โ
Lip-synced Version:
https://twitter.com/KaiserNeko/status....
๐๏ธ
blitz u already had access I think
pog ty pig
I'm waiting for someone to finish the expansions :kek:
u
hah you thought
frosty im working on it rn
=remindme
You need to be at least Tier V in order to set reminders!
WHAT
oh wow, stealing my work Piggy
Kind of a start ig ๐
That's gonna be a lawsuit
Altho I assume that class wont execute anymore
I'm miles off the next tier smh
What are we looking at Yugi
runtime class relocation
wym stealing ur work
piggy stealing work again? (whatever the /s is)
stealing stuff for me to do, eventually
Its mostly similar to luck's jar relocator, just needed some minor changes
oh lol
lmao luck
yo in kotlin is there really no way to declare a short other than doing Int.toShort()? Bcz I've tried 0S, 0s and none work
ty. Just wanted to make sure bcz I couldn't find anything on google
@quiet depot So what's up with that dchat offer huh
wow, scam
triumph chat better anyways <o/
dictatorship!
val short: Short = 0
yeah I know that works too but was looking for 0s
but its fine
I've used : Short
yeah Kotlin sucks when it comes to working with anything other than integers and longs
bytes, characters and shorts are just neglected
why you even need a short tho
shorts are good for saving memory
you take up 2 memory addresses instead of 4
though that's not such an issue these days anyway
also, imagine if you want to store several thousand 16-bit values
So fields or arrays
Most of the times short will get promoted to int
you would use twice the amount of memory with integers than you would with shorts
Local variable shorts dont save memory
unless you're in Kotlin lol
๐ฅฒ
Are you sure about that? Isn't that a JVM thing?
the only promotion that Kotlin does for you is integer <-> long iirc
yeah but the compiler needs to allow for it
No bard
I think he just means the issue with the stack
Shorts take up the same size as ints on the stack
32 bits
like in the language's design, the compiler won't just let you shift an integer by a byte and assume the runtime will promote it Matt
excuse me???
having to (short) 0 ๐
every.single.time.you.need.a.short.literal
can't you just do short number = 0;?
nope
no way Java doesn't allow that
because byte alignment and all that shit
tf does byte alignment have to do with this? shorts are 16 bit
that's two memory addresses exactly for most computers that allocate 8 bits per memory address
iirc it boils down to the jvm using 32 bits or whatever so you have to explicitly narrow cast
actually it does let you do that, you can't pass a literal to a method that takes a short
so instead of
func(123) you have to either
func((short) 123) or
func(value);```
yeah
which is stupid af still
I mean, still better than Kotlin where there's 0 promotion
and where Int is the only type that bit shift infix functions exist for
so to do bit shifts you are forced to convert everything to integers
well I mean, in Java if I were to do var number = 0 it would assume int tho so...
actually, Int and Long have the bitwise operators
in both cases to declare a variable you have to specify the type
so you end up with ```kotlin
val long = 1L
val byte: Byte = 0
val short: Short = 3
val int = 7
((((long.toInt() shr 4) or byte.toInt()) and short.toInt()) xor int)
man, Kotlin needs bitwise operators so badly
since infix precedence sucks ass for bitwise
e.g. 3 shr 4 or 5 shr 8 or 6 != (3 shr 4) or (5 shr 8) or 6
or maybe in that case it seems to be
https://i.imgur.com/KedsxCg.png there we go
found an inconsistency
and in Java, that gives me 107, which is the correct one, since shifts take precedence over ors
and if I set variables and print the value at every step, we see that in the top example, the first one does 88 >> 99, then takes the value of that and does (88 >> 99) | 66, etc. etc. until we're left with (((88 >> 99) | 66) >> 33) | 99
what do people use to code lua
since when have memory addresses been 8 bits
afaik you can't even have anything less than 64 bits on a 64 bit cpu
Cuz word length and stuff
memory addresses are always at least 8 bits in size, no matter the CPU
they could be larger ofc
Well... Yeah
and they are always some number of bytes
but on a CPU made in the past century they're gonna be at least 32 or 64
On the topic, F# has about 30 different number literal suffixes and they're great
let unsignedByte = 32uy
``` :nerd: :open_mouth: :tired_face: :drooling_face: :sunglasses:
lmao
I kinda feel bad for lucyy
huh?
I know of her
what happened to her
she made the pronoun expansion
Was hoping that blog link would be a rickroll
#694661573125472256 message just temporarily pasting this here so I can click it because its tryna open discord in browser
lol
that guy is a troll
old news
Yeah it was cause of the toxicity and also other reasons
classic
literally the single reason I don't check that server anymore
the spigot discord is a reliable and friendly source of information
lol
neutral
It's neutral yeah
They have a very anti-opensource goal
With built in features for strict licensing and all sorts of stuff
sounds like the cheapo ass chinese walmart I'd go to the parking lot to buy cocaine lol
i wish people who open markets can actually be god damn "normal" man
hangar when
SOONโข๏ธ
๐ฅฒ
Oh in that case bad
and will
i'm personally still very conflicted about their decision to not support premiums
i reckon it should pig
I'd like to see hangar succeed
but freemium only ofc 
but I just can't imagine that happening without premiums
Yeah same
I think they're making a huge mistake
free download paid support 
yeah that's what glare said
I mean don't get me wrong, I'm all in for that
but that won't work
But if you want to have premium software.. yeah
yes matt, that's precisely how it'd work
the only incentive to move would be premiums so
Word alignment, 32 bit words on jvm stack
Not having them at all seems dumb
yeah there's literally no reason to move to hangar at this point (or in any hypothetical point in the future where it's completed to the current specification)
yeah because it ain't done yet
fuck spigot
fuck chestcommands
fuck this im moving to the clojure community
oh god no
lets go clojure!
Hangar will allow freemium apparently
You missed, the other day it was the entire gang, Obama, Trump, Putin
just they want a requirement for open-source
no
Biden too
when
recently
pull it out ๐
like end of last month
well I've got more recent information from glare
from today
he said hangar will have no paypalls
Bardy, what he said was the same as Glare said I think, paid support only
That wouldn't even work
I don't believe he said hangar would actually have the support paywall on the site
he kinda phrased it like you'd manage it on ur own
no paywall tho
it won't
because you've got servers like this one which give support for everything for free
apart from our own premiums of course
Plus I can imagine the amount of reviews "0 stars, i was refused support"
On spigot you know all reviewers actually paid for it, while the ones that downloaded it for free can't review
does hangar even have reviews?
Actually not sure
haahah wait what :kekw:
Looking at Ore, doesn't seems like it, only stars
There might be reviews. Kinda like a discussion board. I don't recall if there's been official word on that yet.
well I like this ore star thing
you guys should just stick to that
although make it hook into github
Yeah agree
I'm pretty sure they plan to do stars. I can check the API
"stats": {
"views": 13,
"downloads": 0,
"recentViews": 13,
"recentDownloads": 0,
"stars": 0,
"watchers": 0
},
Yeah it has stars.
what format is that?
sorry
what uses that format
or is that just a mockup
what the fuck am I even saying
I thought it was one of those api template generator thingos at first but now I can see it's literally just a json result
Can someone send me a utility class for transforming seconds into a nicer string, (1min 30sec, etc)
Oh god, i'd send you the one in CitizensCMD but that thing is a mess
Yes that, that's made by Gaby I believe
bruh I've been looking in like 30 repos for that smh
Didn't remember it was from papi
you wouldn't have found it in papi 3
it's under my testing environment
that's not pushed
I would have, cause I used it in the expansion
oh is it actually live
thought it was only in my test
oh for fucks sake
my expansion submodules were on master instead of 3.0.0
was wondering why there was no code
lmao
you know Hangar is a fork of Ore right?
Iron or Coal ore?
well, it's a somewhat fork of Ore
now i do
lol fair enough
debating whether I should add the MIT header to every file of Krypton
like a lot of other projects do
or maybe just make a header note
yes
maybe just ```kotlin
/**
- Copyright (c) 2021 KryptonMC and Krypton contributors.
- Use of this software is governed by the MIT license. You can find out more information in the LICENSE file in the project root.
*/
like what Kotlin has
or should I include the full header
IJ can generate it afaik
really?
yeah ij has a feature for this, but the sponge gradle licenser plugin should be preferred
Ah
that's neat
Indra can do it I think
Indra is developed and used by Kyori
God
God of heaven or something
https://en.wikipedia.org/wiki/Indra is this what you're referencing?
indra uses the sponge licenser behind the scenes
well looks like it's not owned by sponge (was it ever or am I pulling shit out of my ass)
(to continue on with the parentheses, I know it was originally made by minecrell, then he handed it onto someone)
minecrell?
(I thought he gave it to sponge)
yeah
This?
no
I might just manually apply it tbh lol
I use that one
Ah
unless these plugins can do it for me just as well
papi 3 uses the minecrell one (the one I linked) so if you want a quick easy example, just look at papi 3
oh btw, gonna start working on documentation for Krypton server
will your main priority when you create a new class be to paste the license header..?
๐
you'll probably even forget about it
oh I forget about a lot of things
hi
"but licensing ain't one of them"
Does each class actually require the license?
I forgot to build my services manager addition last night to test it so it failed because I didn't implement it in KryptonServer
Does the repo license not hold for every file in the repo?
I just apply them to every java file lol
wdym?
you should have it for every file
Having a general LICENSE file
that kinda holds, but what if you're depending on it?
then you have to go digging through the GitHub to find out what the license is
if you depend on a library, you don't get the license bundled with it
Whats there to search for
no but you may need to search for the repo
and it may not always be the first Google result
or use GitHub
I mean... build scripts, resource files, project files.
it may use one of those spesh 90's things
Wouldnt you already have the repo before you added the dependencies?
yeah ik
not necessarily
I know no project that does that bardy
Most probably thats the case bardy
maybe just project files? or not at all?
You dont bring out a artifactid and groupid from thin air
I mean, all I kinda need is a really simple header that says who the copyright holder is and where to find licensing information
that's it
that's why I think JetBrains' header for Kotlin is sufficient
namely, ```
/*
- Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
- Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
or in my case, ```
/*
- Copyright (c) 2021 KryptonMC and Krypton contributors.
- Use of this source code is governed by the MIT license. More information can be found in the LICENSE file in the root of this project.
*/
that seems sufficient
maybe add a link to the MIT license on opensource.org
I think it depends from license to license? ASL 2.0 states
Each source file should include the following license header
but MIT says
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
yo is there anyone that can open MC 1.15.2 for a sec and help me test something?
1.15.2 :what:
what counts as substantial portions?
:x2: You have to be in a voice channel to use this command.
testing something xD
I typed /sh to shrug lol
also @onyx loom I just noticed that I never pushed the build.gradle for CombatStats lmao.
๐
and also you don't need to shade adventure
#!/bin/bash
[[ -z "$STY" ]] && { echo "You are not in a screen"; exit 1; }
oldsum=$(md5sum paperclip.jar | awk '{print $1}')
newsum=$(curl -s 'https://papermc.io/ci/job/Paper/lastSuccessfulBuild/artifact/paperclip.jar/*fingerprint*/' | ~/go/bin/pup '.md5sum json{}' | jq '.[0].text' -r | awk '{print $2}')
if [[ "$oldsum" != "$newsum" ]]; then
wget https://papermc.io/ci/job/Paper/lastSuccessfulBuild/artifact/paperclip.jar -O paperclip.jar
fi
{ while pgrep java | xargs -l -i readlink -f /proc/{}/cwd | grep -m 1 hub; do sleep 1; done; screen -S hubmc -X stuff "java $@ -Xmx1G -jar paperclip.jar\n"; } &
```ez
what
like matt's config does
actually that won't work any more unfortunately
idk what that is
what
huh? xD
that's a script that automatically downloads and runs Paper when it's ran
So what's this Emacs lark and why should I use it
BM
Emacs is a text editor from what I've seen
well I don't need 1.15 exactly I just tested adventure on 1.15.2 bcz of rgb and am to lazy to switch lmao.
I know that much lol
seems like it's very useful for LISP dialects
.el
Emacs Lisp โน๏ธ
you shouldn't use it
Hello
๐ฅฒ
bm how do i do repeat in haskell
our emacs enthusiast iwanio yesterday said he was seriously considering switching to sublime after trying it out
Iwanio and Johnny use it so
The glory of elara, stolen
wdym repeat
like print "hi" 10 times
just use sublime
joemama :: ["hello world"]
ah
What exactly is emacs?
-_-
like vim or nano
replicateM from Control.Monad is the easiest way
Oh
it's a cli text editor
uh
But if you're talking about my challenge then the idea was to do it yourself
I see
yea how do i do it?
but there are no variables
I'm eating rn so can't make pseudocode
wait
oh
I thought it was a cli editor
wait what?
Yeah so you use recursion instead
You dont loop dkim
Haskell has no variables?
You recurse
but I'm looking at pictures on google images now and i'm not sure it is a cli editor
ewwwwwwwwwwwwwwwwwwwwww
Immutable binding
You cant rebind a "variable"
yeah it's not from what I can see
that would break referential transparency
this medium article ranks it next to nano & vi https://medium.com/linode-cube/emacs-nano-or-vim-choose-your-terminal-based-text-editor-wisely-8f3826c92a68
but then you've got pics like that
so i'm really confused
I think it is a cli editor
vim all the way for text editing
idk what those pics are
anyone who writes Java in vim though
perhaps graphical wrappers around emacs
Then again, seeing that <- is a shorthand in do blocks in haskell, I assume let bindings are as well
Compiler probably inlines them
loop a b
| a <= 0 = []
| otherwise = b : loop (a - 1) b
This should work
Altho yes, you should just use replicateM
@jovial warren GNU GPL 3.0
... attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
What part of that confuses you dkim?
2 out of 3 explicitly state "source file"
Should I explain the snippet?
all of it
yes pls
im still haskell noob
you have to remember that
Pretty sure it does yes
[IO ()] ๐ฉ
Ok first of all, we have 2 guards, 1 for when a is 0 or less, the other handles the non 0 case
In the non zero case
We evaluate the current head as the result of b
And then append that to another list, this list being another recursive calk to loop with a reduced by 1
Tbf there's like 5 new concepts in just those 2 lines
okie nerds
how do you guys rekon I should handle this part of the papi 3 api
when replacing placeholders via PlaceholderAPI#replacePlaceholders, we currently return a string, however a string isn't all that useful as lots of other things can happen. Errors can happen for example, and I need a way to signal to the api user that this has happened. There's really two approaches I can see here. We can either throw unchecked exceptions (like the one from integer#parseint), or return a result object with the result code & data string (either an error message or the replaced string)
Such an error could be when there isn't a direct match for a placeholder expansion, but a close match. For example, they may have inputted %playe_name%, I need a way to signal that they probably meant "player"
This keeps on going till the first case hits
Where it returns an empty list to stop the recursion
Components coming?
๐ณ
editing the msg with all the info