#dev-general
1 messages ยท Page 371 of 1
Nice I'll take a look in a sec
ahh
just for fun, i'm going to turn it into just the decimal portion
it may as well be an int here though
Probably better as an int
those last two lines are still made at me
now i feel like i'm not using sequence correctly
actually..
is there a replacement for sequence for single values
oh wait i guess not huh
wait... how do I call sequence on the list only one time
;o
You could instead use something like replicateM
ah i saw that in the coc
is there really no way to use recursion for this though ๐ฆ
what If i skip the sequence in here and actually return [IO Float]
and call sequence on that afterwards
or are there other issues with doing it recursively besides that
No you could do sequence later
That's fine
Or just do it in the inputs function
inputs n = sequence $ case n of
| Blah
o.O
wait can i do that with this function
input :: Int -> [IO Int]
input amount = sequence $....???
like that?
i tried to get toolbox to install ultimate correctly so i uninstalled it
it annoys me the way it says "manually installed" programs in toolbox
its disgusting
and toolbox wasnt installing any IDEs at all so
import Control.Monad
inputs :: Int -> IO [Float]
inputs n
| n < 0 = return []
| otherwise = replicateM n (readLn >>= (return . read))
main = inputs 2 >>= print
The repl.it editor is horiffic on mobile but this is what I came up with
I think it works
Should be returning IO [blah]
ahh
no
that's parsed as Markdown, and the parser (in this case, GitHub's internal parser) only understands Markdown
MD should only accept simple HTML, no Js
^
declarative only ๐
huh, i got
FirstHaskell-exe.EXE: user error (Prelude.readIO: no parse)
Received ExitFailure 1 when running
input_line <- getLine
let num = read input_line :: Int
inputs num >>= print
Idk what the difference is
is my main
what's inputs?
the function you gave
what's the difference o.o
oooo
@half harness what https://github.com/dkim19375/dkim19375Core/blob/master/src/main/java/me/dkim19375/dkim19375core/function/HexaConsumer.java
that sounds like exactly what i'd want to use for the recursive version
lmaoo
Does spark create detailed report like aikar's timings?
Indeed
what the fuck is that package name
So it could just be replicateM n readLn or do it recursively if you'd prefer
IDK
that whole package is just cursed
๐คฃ
ik your name has numbers in it, but numbers in packages ๐คฎ
like why
i didn't know what to name it
Shoulda used Haskell
also, HexaConsumer lol
When in the world would you ever need a hexa consumer?
(T, U, V, W, X) -> Unit ez
wait how would I use readLn normally
like if i just wanted to get an input in main
probably never
How can I get an account on the Ecloud site? I am creating an expansion
Then why?
i'm trying stuff like let num <- readLn input_line but with no luck
๐คท
input <- readLn :: Int
matt, look at the other classes in the package
should be
lol
Dkim, you make me question my sanity
it makes no sense
wait what's input
input <- readLn :: Int
this actually didnt work, it wants to be an IO Int
bruh allman is so unreadable
it just is
weird
makes sense when you think about it
i need evidence caught in 4k pls
the <- operator effectively pulls the value out of the monad
ma'am sure
oh true
(even though that's not what's actually happening)
i forgot that existed there
E V I D E N C E -> ||allman sucks||
Hey guys is it possible I can have a server record in game gameplay as a match replay?
(I wanna see the world burn)
so for the function i could do
inputs :: Int -> IO [Float]
inputs n
| n < 0 = return []
| otherwise = replicateM n (readLn)
for the replicate version
thats crazy
woah
is it just me or does that look bold
its objective evidence
bold
damn ur right
๐ฎ
Cute
gonna have to start using haskell style in kotlin now
You don't even need the parens ๐
๐ฎ
semi colons in kotlin ๐
hi
now for the recursive version
input :: Int -> [IO String]
input amount
| amount < 0 = return []
| otherwise = (readLn) : input (amount-1)
this almost works
but the empty list is giving issues again
hello
yeah you would
Again you don't need parens around readLn I don't think
That's pretty hot tho
that's where sequence comes in
gotcha
wait how do i fit that in here
this
input amount $ serialize $ case n of
| amount < 0 = []
| otherwise = (readLn :: IO Float) : input (amount-1)
is not happy
ah right xd
You shouldn't need the type hint either
still mad though, at the guards now
Yeah they're not quite as nice
the IO Float hint?
yeah
the haskell type inference algorithm is insane, I don't think you need the hint
sick
but yeah the guards are mad now
oo
I did the opposite earlier and got confused lol
input amount -> serialize $ case n of gives me an error on the ->
๐ฆ
so this is where i stand now
input :: Int -> [IO Float]
input amount -> serialize $ case n of
| amount < 0 = []
| otherwise = readLn : input (amount-1)
wait
No no
i need to return IO [ Float]
= for the function
o
and then like amount < 0 -> []
And yes you do
so like
input :: Int -> IO [Float]
input amount = serialize $ case n of
| amount < 0 -> []
| otherwise -> readLn : input (amount-1)
this is still mad
oh yep
that fixed it
what do you mean o.o
oh
what is it replacing?
nvm it did not fix it :/
it's now giving a parse error on case of
Its replacing the previous syntax with the guards
Pretty much does the same thing
wait so i should remove my guards now?
ye
You're confusing me here lol
input :: Int -> IO [Float]
input amount = serialize $ case of
| amount < 0 -> []
| otherwise -> readLn : input (amount-1)
what exactly do the -> in my cases do by the way
are they making an IO for serialize to use
or something else
how come they changed from =
oh is it = usually
ah yeah
we were using = for the case expressions before though weren't we
like here
ahhh
similar thing, slightly different
yeah
i changed it but the same error as before is showing up, the parser error on case of
input :: Int -> IO [Float]
input amount = serialize $ case of
| amount < 0 -> []
| _ -> readLn : input (amount-1)
oh
hmm
case might need a value
maybe case () of
or just use if/else
idk
not familiar enough with the nuances of haskell
yeah honestly this seems like an if else situation
yeah if else is probably the best thing here
well i can probably just leave the function as Int -> [IO Float] for now
and maybe just make a second function that combines it with sequence?
not that that's ideal either
๐คข
i'd still like to figure out how to return IO[Float] without using ifelse though ๐ฅฒ
fn main() {
}
(repeatedly n read) ๐
https://discord.com||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||https://skype.com
ah yes...
what the hell? xD
how did you do it?
I'm a haxar
I have too much power now...
https://www.youtube.com/watch?v=dQw4w9WgXcQ||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||https://www.youtube.com/
(click the link)
and on android, but it's a bug. lol
it works on android?
how?!
I am haxar
โซhow are you? โซhehe
one annoying thing about my links is they look like
fakeurl realurl on android, but it doesn't matter
I can hax too
I know how to do that :p
you see
โซWaffle? โซTest
:p
Bad dlim
lmao dkim
oh wait
lol
โซhow are you? โซhehe
Noo
I still have the ultimate power though
https://discord.com||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||https://skype.com
https://discord.comhttps://skype.com
did you make the url <url>?
oh i have idea
no
then idk
doesn't work like that except on mobile apparently
wait it doesn't work on mobile either
I was lied to
Yea it used to work
https://skype.com||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||||โ||https://discord.com
Alrighty
@oblique heath spent some time trying to figure it out and i can conclude that it's probably not possible or very inconvenient at least to do in your way
input :: Int -> IO [Float]
input amount
| amount < 0 = return []
| otherwise = readLn >>= (\x -> (input $ amount - 1) >>= (\y -> return (x : y)))
``` this is the closest i got and it doesn't even work lol
replicateM is probably the best option
Was thinking about adding support to same command but different implementation:
@SubCommand("foo")
fun first(player: Player, string: String)
@SubCommand("foo")
fun second(player: Player, int: Int)
But sounds so complicated to implement correct ๐ฉ
Specially for tab completion
ah yes, because we all want suggestion completions for numbers
darn, well thank you for humoring the idea
oh boy I can't wait to see
1
2
3
4
5
6
7
LMAO
they have String[] let them use that :)))
I might, sounds too complicated for something that'll hardly ever be used
It's cool but
true
hey does anyone here want a fun challenge?
I kinda want a lag simulator plugin for Krypton, so I can see if TPS measuring and watchdog is working properly lol
I mean, delay would probably do what I want tbh
/lag tps lol
thats the point
it does if it's ran from a runBlocking coroutine https://tenor.com/view/smart-thinking-thoughts-think-ponder-gif-7713620
apparently, delaying for 100ms brings the TPS down to ~10 lol
oh spark is so amazingly good lol
2021-03-25 20:36:07 [main] WARN KryptonServer - Woah there! Can't keep up! Running 30441022900ms (608820458 ticks) behind!
I can only laugh at that
how
I'm purposely making ticks take an extra 100ms to monitor the effects
I wanted to see if spark would be able to monitor TPS properly on Krypton
yeah ik
wanna see code?
sure
while (isRunning) {
val nextTickTime = System.nanoTime() - lastTickTime
if (nextTickTime > 2000L && lastTickTime - lastOverloadWarning >= 15000L) {
KryptonServer.LOGGER.warn("Woah there! Can't keep up! Running ${nextTickTime}ms (${nextTickTime / 50} ticks) behind!")
lastTickTime += nextTickTime
lastOverloadWarning = lastTickTime
}
lastTickTime += 50L
eventBus.call(TickStartEvent(tickCount))
val tickTime = measureTimeMillis(::tick)
eventBus.call(TickEndEvent(tickCount, tickTime, System.nanoTime()))
if (tickTime < TICK_INTERVAL) delay(TICK_INTERVAL - tickTime)
}
ye xd
yeah idk why I thought using nano time was a good idea
I guess precision
I literally only just switched that to nano time lol
that's why I only just got that warning
unix clocc is one number that represents the amount of milliseconds since the start of 1980
OMFG
just one number needed to show the exact time
1970*
๐
isn't that already what currentTimeMilis returns?
- 1980
- you know that's what
nanoTimeandcurrentTimeMillisgive you right?
please tell me you knew System.currentTimeMillis() returns a unix timestamp
no uses windows time
uhhhh
uhhhh
uhhh
whats a unix timestamp
omfg I was literally just about to say even dkim isn't that stupid
xd
and then I find out he actually is
oml
anyways back to nano vs miliseconds
not even gonna bother to explain this, just gonna link you to Wikipedia
no real reason to use nanoseconds
wait
gj wasting memory
system.currenttimemillis uses
Unix time (also known as Epoch time, POSIX time, seconds since the Epoch, or UNIX Epoch time) is a system for describing a point in time. It is the number of seconds that have elapsed since the Unix epoch, minus leap seconds; the Unix epoch is 00:00:00 UTC on 1 January 1970 (an arbitrary date); leap seconds are ignored, with a leap second having...
unix timestamp?!
omfg dkim
i thought it had to do something with system
whenever you see a single long number that represents a time
Lol
that's the unix timestamp
currentTimeMillis
because I'm just sitting here laughing
shitting here laughing**
is listening for packets without protocollib a good idea
so that i dont have dependency
no
are you concerned about your jar size to that extent
aboot
what
backtrack here a sec
muh clock cycle
โ
you know what you could do.... is clone the ProtocolLib repo
and slap your own plugin into that ๐
tinyprotocol ๐
@oblique heath NEVERMIND
GOT IT
import Data.List
readFloat :: IO Float
readFloat = readLn
input :: Int -> IO [Float]
input amount
| amount <= 0 = return []
| otherwise = readFloat >>= (\head -> (\tail -> head : tail) <$> input (amount - 1))
main = input 2 >>= print
beautiful
import Data.List
readFloat :: IO Float
readFloat = readLn
input :: Int -> IO [Float]
input amount
| amount <= 0 = return []
| otherwise = readFloat >>= (\head -> (cons head) <$> input (amount - 1))
where cons a l = a : l
main = input 2 >>= print
``` even better ๐คค
thats actually the hottest thing ive ever written
(cons head) <$> input (amount - 1) wtf is this abomination
I mean I get what it does but why'd you do this so weirdly
just that
oh no there is a reason
i can't just do head : input (amount - 1)
because input returns IO [Float]
<$> is to cons to the [Float]
why define cons at all
lambdas are gross
guess I just don't get <$> then
it's just an infix for fmap
which just maps across a Functor
this is gonna sound pretentious but its so cool to finally know what that means
left is the function, right is the functor?
yup
there's apparently <&> which is the other way around but i couldnt get that working
foo >>= (return . bar)
bar <$> foo
would those be equivalent then?
i believe so
I wonder where those symbols come from
yeah I mean >>= at least makes aesthetic sense
Whats <$>?
infix fmap
tf xD
fmap f a == f <$> a
Wait so its equivalent to bind?
kinda
Whats the diff?
fmap works on functors
pure functions must be
- unintelligible by OOP dweebs
- taking hours to design
bind is only for monads
ah
Well kinda
There was a difference
You can check the Hasklash thing
I had to use it there for the Rest calls
Also the demon that is "liftIO"
The way it looks to me is that fmap is more like map as opposed to flatMap if we use java/kotlin as comparison
ah
seems like it is, but pure is for functors
yeah that sounds about right
functors as in functions?
no
@prisma wave best game ever
lol
a functor is a mapping between categories
welp gone now
A type f is a Functor if it provides a function fmap which, given any types a and b, lets you apply any function of type (a -> b) to turn an f a into an f b, preserving the structure of f.
Is that not what a function is?
They explains functors* as functions in one category theory course on yt
welp]
The one linked you bm
Well I guess technically they are functions
but they have a few more things going on
not every function is a functor
^^what would you do now?
I waited 5 days now, and he didnt answer...
ah
you remember linear transformations/homomorphisms between vector spaces from LA yugi?
I think functors are similar but for categories
at least that's what my prof said when he mentioned it once
๐
ah yeah, they're just the equivalent of group, ring, field, vector space, you-name-it-homomorphisms
hmm
functional programming is good
makes it more like maths
incredibly difficult to understand
caps
heck yeah xd
actually beautiful
what does the <$> represent there
that is an infix version of fmap
which is basically like Optional#map but for any functor / monad
huh
I feel like using fmap directly would make this cleaner
fmap (head :) $ (input (amount - 1)) shouldn't this work, in theory?
I think so?
yes
Gotta love discord inline code
(\head -> fmap (head :) $ input (amount - 1))
xD
but see that's why I was wondering about your custom cons earlier
Reminds me of.... lis--
ah yeah i didnt realize that
wait can you curry any infix operator?
yeah you should be able to
hmm when i try to run what you made, BM, i get
* Couldn't match expected type `[IO Float]'
with actual type `IO [Float]'
huh
import Data.List
readFloat :: IO Float
readFloat = readLn
input :: Int -> IO [Float]
input amount
| amount <= 0 = return []
| otherwise = readFloat >>= (\head -> fmap (head :) $ input (amount - 1))
my main is
num <- readLn :: IO Int
input num >>= print
ah
so i built a todo list in spring + hibernate, just to access it through elinks browser...
o.o
wait
i put that in my main but i'm still getting the error
huh
you using exactly this?
function
readFloat :: IO Float
readFloat = readLn
input :: Int -> IO [Float]
input amount
| amount <= 0 = return []
| otherwise = readFloat >>= (\head -> fmap (head :) $ input (amount - 1))
main
hSetBuffering stdout NoBuffering
putStrLn "Enter a number: "
--input_line <- getLine
(readLn :: IO Int) >>= (print . input)
what line does the error?
print . input should be right
this chat is such a mess ๐ฆ
where
that main line again
that's because I can't read it :)(
does someone not like haskell? ๐๏ธ
send latest code
main = do
hSetBuffering stdout NoBuffering
putStrLn "Enter a number: "
(readLn :: IO Int) >>= (print . input)
--putStrLn $ "list: " ++ (show $ input num)
return ()
readFloat :: IO Float
readFloat = readLn
input :: Int -> IO [Float]
input amount
| amount <= 0 = return []
| otherwise = readFloat >>= (\head -> fmap (head :) $ input (amount - 1))
but yeah you can say I don't like it
neither do i tbh ๐
ah ok
ivan can u send imports
sure
wait
do i need to import list..?
import System.IO
import Data.List
import Control.Monad
i only have these
wait im blind
i am importing it
huh
well here's my code exactly as i have it
module Main where
import System.IO
import Data.List
import Control.Monad
main :: IO ()
main = do
hSetBuffering stdout NoBuffering
putStrLn "Enter a number: "
(readLn :: IO Int) >>= (print . input)
--putStrLn $ "list: " ++ (show $ input num)
return ()
readFloat :: IO Float
readFloat = readLn
input :: Int -> IO [Float]
input amount
| amount <= 0 = return []
| otherwise = readFloat >>= (\head -> fmap (head :) $ input (amount - 1))
(readLn :: IO Int) >>= input >>= print
this worked
pretty sure it didn't like the composition operator combined with the IO
the composition probably doesn't work because print returns IO
yeah
ayy it works for me too xd
or because input returns IO and print just expects a Show
pretty sure thats the reason
yeah, that way around
what does this part mean (head :)
๐
ah
\x -> head : x
that makes sense
at least the operator part
i cant understand why it has to be in those parenteses
cuz otherwise it would try and do head : $
๐ฎ
would it be valid to take it outside the parentheses, but also swap the $ for it's own set of parentheses
nope
You dont need the $ if you already have a parenthesis on the left expression I think
because then it's head : (blah)
what is it right now
not sure exactly why but it breaks without $
is what we have now (fmap head) : (blah)
Which expression?
fmap (head :) $ input (amount - 1)
you do because it's still left associative
yeah
ah the left expression isnt fully wrapped
it's gonna be fmap (head :) input (amount - 1)
it would become ((head ๐ input) (amount - 1)
mhm
๐
head :slight_smile: indeed
Man haskell is cool
well at least now i can rest easy knowing it's possible to get a list input in one line
For a language so focused on purity it's very flexible
Only took 2 days!
yep ๐ฅฒ
replicateM?
Yeah I suggested that the other day
ah
sorry, one line recursive*
Just doing it recursively for learning experience
It can be done in done line
with no where block*
ah
huh?
Why would you need a where?
this thing
man you know what's funny? I can almost read this
but it's not recursive ๐คฉ๐คฉ
๐ฅฒ
recursivity can suck a dick
Burn in hell
"recursivity"
"ITS JUST A PRANK BRO!! JUST A PRANK!!
You're dead to me
The implementation probably is
wasn't I already?
for replicateM?
Almost
Yeah
Senpai
well maybe it is but then it'll just go back and inline it, if i understand right
so it goes full circle
I had a look at the source earlier and it's kinda complicated but it's probably recursive
Time to mass PING
Hello
time to put my newfound haskell skills to the test
lol
@onyx loom @prisma wave @oblique heath @unkempt tangle @old wyvern @lunar cypress @forest pecan @half harness @ocean quartz @hot hull @stuck harbor @obtuse gale @heady birch wanna join?
Lol
no
Can't rn
lol
if i can get over 0% in 15 minutes i'll consider it a win for me
I missed some
no
In a bit
busyyyy
bm
yea?
Piggy can we get a clash role?
poor man's @everyone
arthur is ur friend right
Piggy clash role pls ๐
yep lol
yes Piggy. Clash Channel please
Piggy clash role pls ๐
he just appealed on the basis he converted to buddhism
COC channel
no coc role
Lmfao
pingable role ๐
boosters get the big coc so if u want coc boost me
and I'll just ping everyone in there
@quiet depot its funny u say that... mans reformed now hes a buddhist ๐คฃ
I can give you some coc if you want
:(( i dont got money
wha?
coc?
yes
you want coc k?
lmao pulse
Um later bro
I have to finish some work
nice barry bypass ๐
I have to go at 00:00
welp tmr ig
maybe in the holidays we can get a coc in #chat-settings
๐ฅฒ
=clash
everyones gonna react to it not knowing what it is
when?
who was the one that did ?main
welp starting
like all those ppl in #clips-pings
cube probs forgot
๐ฅฒ
Haskell to js interop
Please remind
piggy
its in js bm
piggy
?main
๐ฅฒ
Oh yeah that one
yes?
yeah role should be to react to a hidden message in this channel. or pinned
but in this channel
no thanks
this one
arthur would like me to say that he is a changed man and would like to be unbanned
ok im not doing this @static zealot @oblique heath @lunar cypress
=remindme in 8 days "clash yugi ting"
clash yugi ting
'
ayy
._.
lol
=remindme list
Your current active reminders are:
'
=remindme delete 126
=remindme
You need to be at least Tier V in order to set reminders!
Reminder Deleted!
๐ฅฒ
=remindme in 8 days "Piggy can't spell"
Piggy can't spell
10kish exp to go
๐ฅฒ
๐ฅฒ
clojure good
there's more where that came from
xD
oh hell. I've been appending the ascii code
to the string
and didn't know why the hell I was getting a long number
lmaoo
yeah well I didn't lmao
xD
share code
also all this could have been just 1 line smh
oh
spoilers don't work on multiple lines
nvm then ain't showing it
I was like: "I won't spoil it" and here you come lmao
yeah I made a new variable for the integer (ascii value) and then I did appeneded the int.toChar()
nah i want to get my command chain finished ๐ญ
i cant figure it out
:c
i give up
oh
i am nowhere near big brain enough for hex -> asccii with haskell
wdym am I afk
oh that was hex?
didn't read his full name lmao. thought its you
Yeah
haha
oops
xd
i thought it was ascii code -> text
thats why i was so confused
Actually not that difficult
oof
Pretty sure there's something in standard library for it
i couldn't find anything in ~5 mins of googling
the closest thing was a stackoverflow function
that didnt work for me ๐
Hex -> Base 10 -> Char
๐ฎ
shh
forget i ever used python
wot
py... thon?
dont mind that
I use python apps all the time, actually
new game if anyone else wants to join
when you code on your other computer but realize that you haven't ran buildtools on it
oooooooooooooooooooooooooooooooooooooooooooof
don't do that. just use paper
smh
just copy and paste the folder in .m2
you still have to run buildtools
yea lol
you have to run the paper jar
and buildtools
well there's a command
look at all the versions
you have to use
look at the errors
not true dkim
I did it like last week
paper jar doesn't have mc code in it though
including 1.8
yep
but thats against the license whateveritscalled
distributing mc server jar
well I might be wrong but I remember I only had to run the jar
yeah it installs it from the internet
or whatever
but the jar itself doesn't have the code
but you just need to run one command
run?
as in public static void main?
to get everything
no smh



