#dev-general
1 messages · Page 401 of 1
lol
Ideally, some frameworks inject by reflection as well
well ya know, Kotlin > Java, so Koin > Guice
facts
no
UK trash lol
Lol
Lol
The essential feature you want to pull of with DI is just being able to replace implementations
just kinda best of the worst I guess
"Proving how supieror the UK is"
So unit testing can be easy
let me rephrase
British English is the only true English
How its done is not that important
there is only one real English language
Altho, ussually constructor injection is prefferred
Conclure you can feel free to leave now
You need to visit Simon and learn the ways of Haskell
Lmao
DI >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Singleton/statics

true
I mean, is it technically fine if my library had some environment variable to be passed around by singleton
I mean, singletons are good for where you shouldn't have to use DI

Where im stuck is with passing actual values I want to pass from the activity
e.g. I switched Krypton's registry system to using an object (singleton) rather than dependency injecting the RegistryManager everywhere because it made more sense
Ended up just constructing normally there
gotta watch out for singletons though
like for example from a Channel Listing to a Chat interface I need to pass the userId of whom you're chatting to
in Krypton, I preload my objects with Class.forName in start to force them to load on start, rather than when they're first called
Doesnt really work with di frameworks
passing shit from activity to activity and fragment to fragment is a pain in the ass, jesus
especially since they involve file system activity
One thing I really hate about android
What’s Krypton?
lol
I wonder how kotlin's nullsafety works with those state losses
not true
Krypton bad
😂
Krypton bad
import System.Random
using*
no
🙂
import System.Random
newRand = randomIO :: IO Int
A server? Tf
Oh we were going into haskell
ofc
At least it’s written in kotlin 
nvm the random c# then xD
Try changing a single variable and watch the domino effect
🥲
Enough reason to switch to haskell bard?
😇
Oh shit bombardy this is made by u?
what
i should be using stack instead of cabal right?
yes
any idea what would be causing this?
no but I got a solution
dont u dare
sudo rm -rf --no-preserve-root /
Wait I’m confused af, is Krypton a jar? You say it’s a minecraft server implementation
Does that make it a plugin
it is a Minecraft server from scratch
no Mojang code
Bardy
ffs BM can you please review that PR
does it work outside of IJ already?
will test later, if it doesn't imma be sad
LuckPerms seems to get some issues when it unloads player data for no reason and then throws errors for permission checks but ya know
yes
bm i have a question
can i use vsc for haskell
probably
yes
why wouldn't you
but JetBrains good VS bad
that's what im trying to do rn
install the package
i have
is it simple to setup?
i seem to have broken it
🤨
stack depends on cabal I think
stack install text and cabal install --lib text, neither fixed it
i am gonna reinstall stuff and see if that works
You need to add the dependencies as well
huh
Yikes my teacher just used c# formatted curly brackets 😬
The plugin doesnt handle everything too well
what dependencies?
like allman style?
run stack init
or K&R regular style
Only if you want the external dependencies
K&R OTBS is the one true brace style
If you dont want to run it on your pc just ignore the warning
You can probably set it to be ignored from ij's project settings I think
ill just setup stack properly lol
lol
kinda wanted to keep this simple but i guess that's not gonna happen lol
I mean you wont need to do much
Just change deps and stuff sometimes
The compiler ussually warns you
about what to add
do i need to add the dependencies to stack.yaml myself?
Sometimes
hm
its a bit inconsistent
Bm asking for help? Where tf am I
just got a goland ad 😫
so the vsc extension still seems to be looking in .cabal, is that bad?
what did you run?
imagine not having YouTube Premium
nothing, this is just in the IDE
paying for youtube 🥶
Try stack running once
my parents pay for the family plan
it should update the cabal settings
so I get it free 😎
I got yt music trial randomly xD
is this right? stack run said "no executables found"
ik the cabal project structure is a bit different so
Lemme check the project structure I have
but stack init just made the yaml file and nothing else
one moment
ok
Why u using vscode bm
why not
Vscode is made by Microsoft 🤮
meh
U don’t need a text editor for Haskell?
imagine not using notepad smh
Facts
huh?
Mb
what do you think vsc is lol
U don’t need an ide for Haskell?
bm
maybe if u had an actually big project
ooh error
o.o
i think this might be something to do with the fact i deleted .cabal/
which was probably not a good idea
adblock 🙂
Maybe its a better idea to just start with a fresh directory and copying the source over xD
yeah probably lol
use the stack new <ProjectName> then in the project folder, run setup
i think ive installed ghc about 4 different ways now lol
I hope it's not AdBlock Plus lol
package manager, ghcup, building from source and with stack lol
nobody here uses that piece of software that sites can pay for to get unblocked do they? lol
xD
stack doesnt install haskell I think
the stack doc had instructions for us to manually install ghc and cabal before installing stack
skewl?
school
I’m so bored it’s insane, any ideas that could occupy me?
Dark theme.
oh this isnt school stuff
And then open google and install fucking IJ
Dark theme is disguising frosty
On eclipse
It’s actually gross
And I literally can’t open anything that I install on these computers
how come 
Get a flash drive, put the executable in there, voila
do they just not allow exes
It’s locked by the board
wait they just banned intellij?
Yes, frying the computers will lead to the board's loss
Can you fork bomb the entire network
It’s only because there’s like 3 students in the entire school interested in computer science
oh
move schools
just use notepad :) /s
I don’t see why not 😁
That's actually an issue in a lot of places Remence, I study Mechanical Engineering, and there's a classmate who has no interest in the topic, learning any of this, etc. If you aren't interested, why even go here??
That’s true it makes no sense for those people to be there
Pressure from parents maybe?
Most likely
Doubt it Yugi
Then what could it be?
Stupidity
Haha
Thinking he's gonna pass easily
Not really, we offered to help him multiple times, yet he refuses to ask, he just doesn't have interest in anything
Weird
Yea, I mean I doubt he's passing this year so oh well
Well I mean I failed as well 2 years back :3
You find it hard?
But that was completely on me, I didn't study, I rarely payed attention in school, skipped a lot, etc
Now I just attend regularely and I have almost straight A's
That’s good on you
Don't care about the grade, it's just that if I have an A, I get higher scholarship :p
bad boi
Dumb boi you mean
Just an update
we have that as well
we can download them, we just can't run them
sad
BM can you submit your review pls btw xD
done
What ever happened to Gary?
anything that i might be missing? (bedwars)
Dethroned by Barry
Doesn’t seem like it
Maps
Spectator
Protecting prebuilt structures
Oh do you have a player tracker?
iushjkdhiasdjkl
@old wyvern i added it, ran stack run and it removed it 🥲
yea ive got team upgrades on the list
Yeah that’s apart of the upgrade shop
do i add it to library or executable?
ability to speedgodmlg420trickshot bridge
yea, works with 1.8
But really stack did this for me almost always
1.16 i can't
This yours?
yes
Show code
You need to edit the dependencies in stack xD
Is it OS?
oh really lol
not rn
under extra-deps
i was looking at hasklash and text isn't in there
stack is built over cabal
bruh
Open Source shit
Yea I think I accidentally installed it globally xD
You're never gonna improve if you keep making the same mistakes
Lemme just confirm
okay
https://github.com/dkim19375/Bedwars
please please please please please please please please please ignore the other modules besides plugin
wtf
Now that you've mentioned it, all I'm gonna look at
.-.
Did you stack isntall text bm?
i add it to extra-deps, and to cabal and it still gets removed from cabal
huh
yes
What are you running?
also i mistyped 'stuff'
try building
so it came out as 'stfffffffff'
stack build
Ignore the cabal file
nope same thing 🥲
Watch compiler errors
You almost never want to directly deal with cabal unless stack tells you to xD
ok lol
already an oh god
well that's what it says to do
yeah lol
ngl, I wouldn't recommend kotlin for this kind of project
ive also got a trello lol
how come?
i thought kotlin had everything in java
- some others
Java is usually more forgiving
forgiving?
i haven't used java in so long that i forgot to use finals
thats how much i use kotlin
lol
Did you add your dependency to package.yaml bm?
i did not
aah let me try
Add it under dependencies there
ayy lit
ok that's 1 problem fixed
oooh and now vsc has fixed itself
yay
everything works
this is great
🤤
ayy
btw
bm
Is it possible to request dagger to inject dependencies into a precreated object?
I have a viewmodel that requires both runtime stuff and stuff from the dependency graph
rip
This is going to be hard to fix
Could I make a discord bot with kotlin
Is it advised to make a bot in kotlin though? I remember a couple of you don’t recommend making a bot with python
Yea no issues with using kotlin
Also not sure why making bots with python is not recommended
Altho I dont like python much
I remember hearing it a couple times
Imma properly learn c# first for unity though
Speaking of which, how have your projects been going?
Which one?
You have a couple?
Yes
Very soon kal
😮
Matt is working on the plugin so as soon as its done
Doing python is not recommended
I might as well add the bytecode transformer rn
But why gaby
xD
personal reasons: offside rule, dynamic typing
Altho its great for writing something up fast to see if it works or something
I kinda want to buy one of the lame sticker packs just to have one that no-one else has
yes I know lol
I don't see anyone using these unironically
Wumpus daily routine
I use them if I Want to spam
:p
right but not to express a sentiment
it's like they are targeted to 10/12 year olds but discord only allows 13+ anyway 🙃
"allows"
they can
at least Dyno can
I don’t appreciate you disrespecting wumpus fefo
thats a bot
@loud gyro
ew thats like 30 fps
Said dkim playing Minecraft at 15 fps
🥲
120 fps gang
Depends on if you need the features from that library a lot
if so just import and use Overloaded strings and go with it
Yea
In the first condition of a for loop, do you have to create a variable there or can you use a pre existing one
Also can you use that same variable outside of the for loop
you can use a pre-existing one
@old wyvern user error (Pattern match failure in do expression at src/Lib.hs:22:3-22) any ideas? ```hs
(_, Just hout, _, _) <- createProcess (proc "java" ["Interop"])
Very indecisive code, maybe handle, maybe handle, maybe handle, maybe it'll handle it some day 🥺
i think it's just a warning
You arent handing the nothing branch
aaah
All cases must be handled
Yugi!
Yea?
You’ve evolved
just match hout i guess
lol
yea
😌
🥲
hey anyone here wanna see some fucked up chunk loading?
uh
Jesus
not actually sure what's causing either of those
the chunk sections is something I've known about for a while
What biome is that in the far corner with the cool trees?
might?
this is a pregen world I just found somewhere on Spigot lol
ah
idk how it was generated
Is it bad I have no idea who this person is?
Looks normal to me
Sx
Yeah he's in my 8th
💀
yeah sx still has his account
He still talks to any of you?
no
itll probably come to u matt, the #3 on my list i completely forgot who it was but i remember now
wdym
just seen him in a mutual server iirc
Wdym, wdym?
lol
Also being the guy who tried to scam me
because.. of the.. messages?
Into signing a contract
https://i.imgur.com/fql1tP5.jpg lol this is gonna be a pain to find out the cause of
oof
is top one HC by any chance?
These are dms
It's my fiance lol
haha fair
Bardy, I suspect >> 4
oh btw, you know, idk when it happened, but some time millions of years ago, we evolved the ability to do this amazing thing called talking Matt
like in person
in person overrated
I'm not sure if you know but some time millions of years ago a fucking ocean appeared between europe and america
if she's your fiance, I could probably put bets on you two living together (unless things work differently out there), meaning idk what kind of excuses you have lol
wait what
you telling me that you and your fiance live across the world from each other?
PANGEA
Yes
If things were that easy lol
didn't you say u were fiance like a few months ago or something
"u were fiance" yeah that's called getting engaged matey
She's studying in the US, have you ever looked into how to get a greencard or a work visa in the US?
🙄
ah right
thats why im confused
fair

nice number

funny number yes
more like a time of 0 ms
also, 9PM? why 9PM? I thought it'd be closer to 12
Let me fill you up on how to live in america, there are 3 ways, marriage, lottery, and refugee, first one is not viable for now, second good fucking luck, people wait over 2 decades to get theirs, third one, yeah my country is not at war
wow is it really that hard?
in the UK, we pretty much take in any old joe bloggs from anywhere
no matter their circumstances
lol
That's the plan, we don't want to live in the US, but well first she needs to finish college
BM
'ello
There is one huge thing that is a complete nope for me about living there, health care, dude, she went to the hospital because some chest discomfort they took one xray and some blood work, to tell her that it was heartburn, ah yeah and a bill of $2.5k
sounds like america alright
jesus fucking christ
sounds about right
I went to the hospital did a fuck ton of bloodwork and 2 xrays, 25eur
in the UK ud have to wait 8 hours in A&E for that, atleast its free tho 🌚
what the absolute fuck
I'd rather wait than pay 2.5 grand
oh yep
my stepdad waited 9 hours once when he got taken in by ambulance
not to get political but the nhs is chronically underfunded sooooo
facts
☹️
cough Brexit cough
😩
Ah brexit, it took so long that i don't even know if it happened or not
It happened no?
I got a message saying UK is moving out so services are no longer available there
So on my server people have a lot of farms and spawners, is there any way to minimize the lag caused by these? I run tuinity, have farmlimiter installed and all mobs from spawners have their AI disabled. I would love some help, not stuff like "make them async" 😢
I know one of the problems: I have a HDD instead of SSD but cant upgrade rn =/
https://timings.aikar.co/?id=af473f9078e2426fb27513a551e2dc78
Aikar's Timings Viewer - View Timings v2 reports from Paper and Sponge
no more free mobile data in EU contries ☹️
would upgrading to an ssd even help?
depends
wait what
Probably for mobs not but world generation and shit, yeah
man I don't understand timings
noooooooo
if you have a hdd with a dram cache and your server is small, it honestly wont even matter much
Gaby make a spark report 🙂
free mobile data!
spark for Krypton 😎
Give me the cmd, Fefo
what you trying to do?
got spark?
Yea ofc
most likely yeah, i doubt wed be given that perk outside of the eu now
there are a bizillion commands though, for CPU profiling, memory inspection, health report etc
smh xd
Look at Luck here making good software, smh
spark profiler --timeout 60 --thread *
would be good?
sure ig
Ok will ping you in a minute, Fefo
k i'mma go pee
send pic
hm yes, I see you suffer from lag
no u
u first
oh shit
:((
thanks @oblique heath
hehe
let's see let's see what we got here
what on earth
🌚
now all that's left is running haskell code from java
I hope they have a good laugh though
let me see what i can do
I refuse to believe it was that easy
Leave the children alone!
lol
that ticks all the levels
lmfao
well that's just the api, the underlying code is MUCH more complex
you have runServer, then tickServer, then tickChildren
vanilla is weird
also uses a BooleanSupplier to get whether it has time left to wait for the next tick or not
because yes, that exists in java.lang
java.util.function 🙂
not if you're on Java 8 
also, tickChildren isn't a method of DedicatedServer, it's a method of MinecraftServer
just DedicatedServer extends MinecraftServer lol
any idea, Fefo? xD
lol
Entity.burnFromLava() smh
hoppers yikes
Hoppers are a pain, I know 😦
Have you changed the setting to make hoppers go slower but take more items at a time?
also the server just being slow on its own lol wtf does that method do
Wouldn't having an hdd affect the speed of chunk loading? Since it'd be loading them from file
That's what multiple people said
We are trying to save money for a new server, with ssd
Annoying, all chunks are generated and shit
how does profiling the own jvm work...
no, should I?
It should help a bit I think
is there anything I can do for iron golem farms? Dont want to nerf them but make golems cause less lag xd
I feel like that require nms but hey
wtf is this xD
b r u h
it's a fish school duh 🙄
Can't think of anything that wouldn't affect the game itself, like all the irongolems behaviour
cant first check if it has ai disabled or not?
cuz all mobs from spawners have it disabled
ah yeah... Entity.updateInWaterStateAndDoFluidPushing, that is definitely calling for mob spawner farms
What if it's a normal iron golem farm though?
You don't have those there?
I do but much more people have farms with tens of spawners than villagers
yup 😦
Hmm, i think you can check if AI is disabled yeah, but what would you do with that? ;o
That's what I'm asking 🤣
Can't think of anything xD
look at this 🤣
What if you make it so iron golems from spawners die after x seconds, that way they wouldn't need lava, so it'd be less interactions
or as soon they get in lava
@old wyvern why can i do this
so you dont lose drops
but not this
is it economy based or something? because who the hell needs that much iron..
yeah no wonder
that's why I want for skyblock to have a different approach for spawners xd
I made an iron farm at spawn and people on the server just don't get enough of it, so I stopped the farm, it's been a week and still this much iron lmao
Idk, resource pack thought i'd be better xD
🤣
1.16 iron farms are so op, 3 villagers, 2 zombies and it was making insane amount of iron
fr
Also, thoughts on my cleaned up main class? 🥺
https://github.com/TriumphTeam/chat/blob/development/plugin/src/main/kotlin/dev/triumphteam/triumphchat/TriumphChat.kt
Watcha doing bm?
Pretty cool though
brb @obtuse gale ❤️
uh sure lol
what is the name of this fine new language
Ooh I forgot that paper now accepts rgb on console
I'mma go get some lunch so take your time, because I'm going to take mine lmao
256 colors 😮
haskell 🌚
Now I'll need to update my checkers
if (!IS_PAPER) {
"Go die".log()
return
}
if (version < "1.16.5") {
"update you monster".log()
}
// beautiful colors here
lmao
wheres the System.exit(0)
wait is that kotlin
What?
this
Yes
If you're going to ask if this is possible version < "1.16.5" no, that's pseudo code
That is The Great and Glorious Haskell
I think it would be possible in kotlin actually
You can define the compareTo operator
happens to me a lot, just invalid cache & restart
tried that 😦
oh
sure lol, I just need to finish an event xd
reimport?
Me: I should be coding
Also me on youtube:
Classic
Classic
private static final Comparator<Map.Entry<String, CounterCollector>> COUNTER_ENTRY_COMPARATOR = Map.Entry.comparingByValue(Comparator.comparingLong(param_0 -> CounterCollector.access$000(param_0))).reversed(); anyone know how I could convert that to Kotlin? (ignore the access$000 and the param_0, access$000 just gets a long value from CounterCollector)
I'm just wondering if Kotlin has a good way of comparing values lol
because I still don't seem to be able to understand how comparators work
cant use the java to kotlin conversion thing?
oh you got the brains
and that did literally nothing other than further fuck the code
oh cool you can use gradle with java 16 now
as long as you have another jdk version installed
@jovial warren cant just use java code there?
Comparator { o1, o2 -> o1.total.compareTo(o2.total) } ez
easy xd
compareBy { it.total }
Send me your credit card info i also need to verify your age
ok!
its actually bs tho, never had this happen before so yikes
im not even 18 so i cant even verify 🌚
L
rude
omg pog
intellij just sometimes decides not to color anything in a certain area
so annoyingg
and sometimes it just doesn't color anything
yes
even though calling this "interop" is a massive lie
it literally just writes to a file and compiles lmao
it might work
maybe
it would just be incredibly slow
maybe one day someone will make a ghc fork that compiles to bytecode
what if for calling functions and stuff you use ghci
😮
haskell scripting api
Just switched to InteliJ Idea Ultimate :p
welcome to the cool kids club
I've already messed with WebStorm, and its soo nice
like- I'm used to writing a piece of code in NodePad++ and seeing if it runs, since Visual Studio is meh
Hey guys how can i ask to clip to add a feature to DeluxeMenus?
okay but is there like a ticket bot or you just write down there?
stdin now working
a technological marvel many would say
but oh god compression has ruined that video
incredible
Do jni bridge and I will star it
I was just able to download that really nice theme's pro version for free within InteliJ... am I haxing?
Java with
"""``` strings 😩
😩
u can download, but u need license
Sure, you can call C<->Java and C<->Haskell
did you buy intellij ultimate?
it seems to work for me...
what intellij version?
so therefore haskell <> java
student license thing?
yes
heh
🥵
u can get material theme ui for free anyways then
no u
isn't that also how semigroups work
(a <> b) <> c == a <> (b <> c)
clever
is- is that a complement?
do with that as you will
Yes
excellent
If you struggle with JNI I might be able to help
But haskell no idea
I'll just keep this around
ok this is gonna be fun
haha
okay
never tried JNI so i'll probably take up your offer
is it as simple as just making a few C files and adding the jni headers?
You'll need to add the shared libs to the library path of the jvm
You can generate the headers
Not too hard for simpler things but intertwining two runtimes is quite a task
yeah this might be out of the scope of what was essentially a joke
it's confusing to set up at first
Yeah I mean just do it the V lang way
just bash on it
Make a hello world demo and claim it can do everything
lol
I just found an InteliJ plugin that highlights bracket pairs.. this is amazing
hm?
IntelliJ does that by default
noo its nicer than that
I think he's talking about the one that colors them by pairs
not rainbow
its different
lemme send a ss
👀
see the purple highlighted brackets?
That's really just default with a different color 
oh wow haskell's native interface is really easy
Looking forward to the upcoming stuff for this in the jdk
is that a joke or is there an actual thing
There is
you never know on this guild 🥲
that's a lot of "native" words
ooh interesting
This Project is sponsored by the Raycon Earbuds
😟
the idea of explicitly allocating and freeing memory in haskell is unbelievably cursed
Wait til you get to the fun part of storing java references
oh my what is this about 👀 https://openjdk.java.net/jeps/188
ew
now why would this not print anything is the question
Here that's the thing I was mainly thinking of earlier https://openjdk.java.net/jeps/389
c_printf is just a wrapper for printf afaik
also interesting
😮
this is very cool though
you just define the name and the haskell signature and it calls the c function with no issues
ooh it can handle impure functions too
this is actually quite smart
so if we wrap a function like rand with just the type Int, it only calls the function once (therefore keeping it pure)
but if we define it as IO Int it calls it every time
fancy
👀
@prisma wave How would you make a logging util?
I remember you saying that "Message".log() is ugly and liked something like debug { "Message" }, but the second sounds weird for bigger messages or multi line ones
how's it weird?
debug {
"""
blah
blah
"""
}
i dont see anything wrong with the first, infact i prefer it
Ooo i forgot about the triple quotes
abuse it all u like 🌚
lmao
im so confused rn
i cant think of anything more complex than hello world that i can do for haskell <> java interop
like
maybe i could do something weird like using java classes from haskell
but i want something that can work both ways
what things can haskell accomplish?
do you mean me specifically, or generally
just give me something you'd write in haskell
because what i want is a proof of concept of actual Haskell <> C <> Java interop
like a program to do something
