#dev-general
1 messages · Page 453 of 1
bingo
what in the
why did you added 18 and 2 in left? 😮
From the orders given in the example
This satisfys all 3
makes sense
yugi's brain is way too big for me
left node, right node, left of left node, right of left node...etc...
Left derivative tree of some kind
I have opened their seminary and I see that somewhere it mention that 2 * i + 1 from https://www.tutorialspoint.com/construct-a-complete-binary-tree-from-given-array-in-level-order-fashion-in-cplusplus and the page title says Binary trees with dynamic allocation
Suppose we have an array A[], with n elements. We have to construct the binary tree from the array in level order traversal. So the elements from the left in th ...
oh wait
Only if it wasn't in romanian so I could share it smh
yeah that's how you read a level order traversal
hmm
you can do the same thing with priority queues
or at least, my professor tells me
i didn't actually bother checking that lmao
Star can you counter check this tree @cinder flare
Because if it was level order, shouldnt it go on the right branch?
In which case the given in-order result would be wrong
I don't get it tbh
sec, had to restart my pc
ah alrighty
that tree adheres to all the given traversals
I don't think it was meant to be level order
Imagine not being at school at this time
weird
cause then the traversals would be wrong
just nerds
mhm
I'm expecting all 3 of you to you
You won't get me in lol
get in bard
I'm at school on my phone
got a final tomorrow at 9 am
Get on the professors pc
it is currently 1:30 am
I'm in form lol
and come play, doubt he's teaching anything useful anyways
In form on my own lol
why it works like that
Not even a teacher here yet
oof
Imagine not having a week off rn lmao

How
No idea gab, the prof probably just meant you to find how to construct the tree from the example
holidays Bardy
Already?
maybe yugi, but it still doesn't make sense lol
What doesnt?
Or are you just having a late Spring break
The resultant tree?
why that and yes
@ me when clash starts btw
@hot hull imagine only having a week off
Piggy, like 2-3 months till summer vacation
Johnny it's alright, you can just do what zml suggested and upgrade to 48 hour days
Johnny, you working or are you unemployed rn
76 hour days yeet
I am a full time student right now
So am I but I still get loads of time lol
But I'm wanna start working this or next semester
I thought you said you were done with school eee
Oh btw, you looked at my results yet?
Yugi, Gaby you two good?
I am
My uni officially has 3 weeks of holidays in a year
but that's kind of a joke too
ah
3 weeks?
yes
Is that it?
feels good to be a professional
used to be 2 before I enrolled
I get 13 weeks a year
Imagine writing CoC answers in Java smh my head
We get 2 weeks around new year/christmas and 1 week coming up (the thing that's 50 days after easter, idk the english workd)
Imagine not using
Johnny have you looked at my benchmark results yet btw?
Ah okay
They're all on github now
🥲
32GB DDR4 3200MHz running at 3000MHz @lunar cypress
you've been forgiven Yugi for using haskell
The soln is neat tho
one more?
Yes
So PCollections only does well on removals from lists then
Everything else it sucks
Send
You want feet pics?
main :: IO ()
main = interact (\x -> intercalate "-" $ map readDope $ rangeOf (map read $ words x))
rangeOf :: [Int] -> [Int]
rangeOf (x : y : []) = [x..y]
rangeOf _ = [0..0]
readDope x
| x `mod` 3 == 0 = "Dope"
| elem '3' (show x) = "Dope"
| otherwise = show x
@distant sun join
Does it even work properly on mobile
probably not
The one time I tried it was so broken i couldnt even type
it doesn't no
That's cool
interact is weird
just reads all inp
does it keep going until EOF?
Yup
ı need help with something can you guys help me
if it’s a support request
The inp is lazy so depends on how you use it
dude my uni does trimesters
yeah
bm you coming?
🥲
We have barely about 2 months here
ı am trying to download worldedit and ı am now downloading fabrick abrick says ı need to put fabric apı to mods folder but ı don't have a mod folder and ı also havent got the app it is still installer
Didnt evne get december holidays this time
Continuous classes till now from august now
Wdym
yeah there ain't no holiday 50 days after easter in english land
clash
Im at school, can't really join on anything other than mobile
Ah alrighty
what should ı do
I get 2 weeks off between each term (roughly ten weeks each), 6 weeks at the end of the year, roughly 2 weeks during exams, and fairly sure we don’t have to come back to school after the second set of exams. So about 18 weeks total
ı did
the fuck is an ackermann function
How did you get the funny i
at my country we can use small i
so the pc language is different too
number that grows but isn't primitive recursion
the fuck is this @old wyvern @hot hull
No clue
I saw it before but I dont like t
oh is it in the CoC
Shitty explanation as well, if you tell people to use something specific atleast provide a quick description of what the fuck it is
it's basically just three if statements
you take two numbers, m and n
if m is zero, return n + 1
if n is zero, return a recursive call of A(m - 1, 1)
if neither are zero, return a double recursive call of A(m - 1, A(m, n -1))
Yeah nah I'm good
it's a pretty theory based question lol
though shouldn't be too hard to implement in a normal lang
it shouldn't, effort tho
i mean literally just take the 3 sentences I wrote and make it code
effort, already ended it
lmao nice
🙃
😩
oh you spelled otherwise wrong lmao
Yugi can't you do lines <$> getContents
oh wait got it
Is that what you want?
😩
oop
got it
main :: IO ()
main = interact $ show . apply ack . map read . take 2 . words
😌 🤤
yes
40 is christi himmelfahrt, 50 is pfingsten if my religious education doesn't fool me
But I always forget when Easter is
it's like "the sunday after the first full moon in spring" or some shit like that
I think it's possible for it to be in March
easter for us in this saturday, on 2nd march
reminds me of “expected type: Object, actual type: Object” lol
Can I get discord to use my Laptops mic for input and earphones for output
The "Voice And Video" settings does not seem to separately show inbuilt/earphones
Lemme send you a ss of it
you sure it’s called in built or whatever?
What is?
also go to audio settings and check if it’s there as a device
restart dickcord
lmao
Microphone[] lol
yeah ik I was just saying it’s kinda funny
lol
Windows
Trying to get in a game with friends, but mic kinda ruinging it
right click the volume and go to the audio settings or whatever it’s called
make sure it’s there lol
In discord, for windows audio settings?
no
set mic in windows to laptop and audio to earphones
right click it at the right of the taskbar
den select default for both in dicksword
or use Windows settings
yugi ur mic sounded fine lat time
It isnt working for sometime now
I thought it was from some driver issue after installing linux
But after testing with another mic it seems its just an issue with my mic
Oh wait no
xD
I think I just set my output as input
amazing
xD
Thats,,, nice
welp
Hello hello
Yea I dont think I can separate these
Well shit
Somebody got expirience with lua?
you know what I want to see
i know people have joked about this in the past, and i've also given it some thought
but i want to see a full SQL implementation using discord servers as the db
people have done worse
looking at you, yes you, mr hobbyist developer who thought it was a good idea to have ssh access to their server in discord ||I've seen too many developers think this is a good idea||
people just love tying things together
Your hands especially 😏
if you react then I'm taking it as you've done that before, or at least thought it was a good idea at one point, even for a split second
guess i better react
i haven't but i know people who have
I think this has potential
right??
It can scale vertically with new user accounts
Or maybe that's horizontally
Because 100 server limit
this is about as good as bm's immutable db idea
^
anyways the goal isn't to make this better than a regular sql server
but to make it 'good enough'
You've heard of esoteric languages, now get ready for esoteric databases
since in theory it'll be totally free
🥲
i'm sure people who use it will have similar latency issues from other areas of their setup
I mean query at startup, save on shutdown
lmao
ez
Memory isn't cheap!!
Discord is free
:kek:
I keep repeating myself, but I'd like to make clear again that this is a well-working thing
maybe but, bm's immutable db idea was to delete the entire database everytime you edit something
Implementation detail...
Lmao
and if so how is it good under any circumstance
because I really don't know if ur joking or not
Is bm's implementation idea a real thing? not that I know of
no I mean immutable databases
but yes I am serious
wait didn't you tell me all about this yesterday
or was that something else
I swear you pasted a big block of something but I can't remember for the life of me what it was
no that was fefo's c++ issue
That was some quote from the C++ spec
I linked this yesterday already, but this is an interesting talk about those kind of databases
https://www.youtube.com/watch?v=D6nYfttnVco
any prior knowledge needed?
I have used open source variants of the one specifically discussed in this and it's pretty neat
Uhh, can't remember how much clojure you're gonna see in the talk
I don't know any clojure
But to get the idea it shouldn't be needed
okie
you wanna know the best part about a discord db
you have easy access to look through the contents!!
another bonus
it's great for data redundancy
because discord stores everything in multiple places
yeah you get all the benefits of discord
on its own servers
and the servers which belong to the companies it sells all our data to
Nice
bm will the fp names ever end
D:
😌
😌
y don't u make ur own paradigm
discord db can act as a blob storage as well
EndoBrister
we've got lambda calc and turing machine
too much effort
The Elara Paradigmn
We need an abstraction over functions
bm you still here?
fuck
Forget composing functions, make it infinitely generate functions by combining every possible combinable function and generate a trivial name for it
yeah i left sorry
I need to find out how he does the github push thing
😮 😮
even more abstractions
where he will commit like 30 things then push in one go
give him a few tags and he'll see it when he comes back
showMapFilterFilterMapMapRead
wait, discord db could legitimately be useful if it's main use is in serving as a backup
it can run alongside a regular db so we get low latency and the benefits of discord's own redundancy
lmao
then you also get easy access to the contents and you can run a --recover or something if something happens
It would be extremely show
that's fine
committing and pushing are separate actions, you can commit without pushing
you'd use a regular sql db for requests
so you can commit then it will back-log?
discord db is only there to back your data up
Does discord bot api even provide the "Search" option from the client?
that's... a good question
Coz if not, it would be even worse
probably not
that's ok
What we talking about here?
discord db
iterate through every message every time you need something
ddb
like you got can commit 1 then commit 2 then commit 3 and when you push it will all go at once right bm?
Wat dis
immutable discord db
sql db
you can make your own indexes!!! using pinned messages
Yes
ok ty
YES
is it better to do that bm?
Sounds like the best type of programs, useless ones
NEW discord server for every modification
You talking about Discord's internal databases?
we're not deleting the fucking server every time we make a modification
no bardy
text channel = table
server = database
message = row
data
Point of this is?
bm whats that overrated language you use?
speed improvements over mysql
I mean you could probably workout some sort of indexing system with a message being the index message
and latency benefits
the point is easy redundancy
What's this all for? I'm lost
Which is edited on row add
the next google bardy
is it kotlin
Lol
we want to use and abuse discord being free
Disbase™️
This
asap before microsoft gets a hold on it
Pig learn Kotlin when
I fucking hate myself tbh
No
2 years
Pig learn haskell when*
I messed up the code real badly
i will be freeish in 2 years
200 years
and i gotta go around fixing it up
bm, progress we got a tick https://i.imgur.com/gCiccJo.png
Lol
Pig learning Kotlin won't actually take you long at all btw
Since you already know Java
Kotlin bad
Just a matter of getting out of bad habits
You're saying that Piggy is in bad habits? 😮
Slightly faster, not much else. I was gonna say it avoids pushing unfinished work, but that's what branches are for
Allegations
Bad habits such as state
bm, have you seen that chess meme?
bm, have you used vesta?
no and no
welp
wait I think I've heard of vesta
the control panel
well there's this kid who goes against the world grandmaster and he starts panaking that's how i feel rn fixing this code.
Was trying to setup a reverse proxy to a container without hving to mess with nginx, but I guess thats easier than finding how to set this up
I do have a webserver
I have vestacp installed
The issue is to get it to point to a non lamp stack project
lol
After some googling, I found that I need to setup a template for vesta to use
Huh
wtf I just found out I had like 15~20 java memory heap dumps between 2 to 4 GB each
idek where these came from...
yikes
Idk how these memory dumpers can even dump that much info in the speeds they do
impressive
Like 4GB heap dumps in a matter of seconds
I mean, transferring data from memory on to disk isn't that hard I suppose
Java bad
Clearly
haskell can do 0 bytes of data transfer in 0s, therefore it is infinitely fast
When you read up on semantic versioning properly and realise you've been doing it wrong the whole time lol
Java bad
I thought semver applied to more than just the public API, but apparently it doesn't
Internal changes that affect the public API should be marked as patches
Yea just wondering if I need to do anything else, just add the server block and the proxy pass right?
Should I do it in a separate conf file?
So technically, I shouldn't be increasing Krypton's version unless I made API changes
absolutely
You learn something new every day I guess
vesta changes the vhost dir to /etc/nginx/conf.d fyi
there's no separate sites-available & sites-enabled
Kotlin...
RHEL on top
would it be bad to save a file (json) every minute or so?
yes
...good
You're going to hell
btw @quiet depot there is no clojure in that talk
Do I use an include in that to add the newly defined config?
okie
You save JSON files every 47 seconds or nothing
It reads the whole directory for confs?
it's just about "how do we do immutable databases"
yes
Ah
If you do it right, no
show me your conf before you restart nginx
Alrighty
how do i do it right? ive never done it before
you need to explicitly declare the public ip in it because of vesta (something you don't normally have to do)
Sounds like bomp saying you can use a HashMap wrong
@lunar cypress i'll give it a watch later, thanks for the link
🥲
Just don't do blocking IO operations too often
async?
Sad
Don't do IO at all 😌
I see
any half assed firewall can usually stop them
No, you should write it all out by hand on a piece of paper lol
There were 7k ssh attempts
ah alrighty
vesta sets up fail2ban automatically
You're lucky if you haven't had that happen before
unless you told it not to
;-;
you said not to do blocking IO operations too often, but if i do it async, it won't block the thread (i think thats what you mean?)
It probably installed it
I think I just used y for all options in the package installation
then you should be safe
lit
just make sure you yourself don't get ip banned
yes
Where are banned ips stored?
Dynamic ip tho
pretty sure you can interact with fail2ban thru the web interface tho
then you're fine
ah
you could have just said "run it async"
make sure to show me your vhost before you deploy
Alrighty
Kinda wanted you to figure out how to solve your own problems
ok
bardy I don't really want to learn kotlin
😮
there's other languages I want to learn
piggy!
kotlin aint one of them
I'd like to learn c, python, go
But that isn't most people's cup of tea
where is
wat
For a man who disses Python a hell of a lot, that surprises me
wheres haskell on that list
python ez
it just means it's essential
Haskell irrelevant
i'm not looking to learn hobbyist/enthusiast languages like haskell
HOBBYIST ????????????????????????
Where is Haskell on the top 100 programming languages?
probably like 17
https://www.bairesdev.com/blog/top-100-programming-languages/ this list has Haskell beaten by Scratch
scratch is more useful than haskell
😮
and python is better than java
btw bm i've been re-doing a bunch of shit in the code to the best i can do
I ain't super smart so i can't make it super good but i'm trying my hardest 🙂
Kotlin: 62.9%
Haskell: 51.7%
Lol
r/haskell = 63.2k members
r/kotlin = 49.1k members
curious...
Kotlin: 62.9%
Haskell: 51.7% numbers dont add up
lol
odin
False
they do
no
what is haskell useful for
everything
where does it prevail over other languages
everything
nothing
haskell is overrated
data validation
github uses it for its syntax highlighting iirc, facebook uses it for spam filtering
piggy learn haskell with me 🥰
fuck no dkim
😔
🥲
bm, it was probs a last option thing
I thought you guys said haskell wasn't really a good language choice, and it was mainly used in academia
like ages ago
like it was a last option thing to use it for facebook or whatever
Its was mainly used by acamedics yes, but that does not make it a bad language
Its just a different approach than traditional ones
Its priority is to be "safe"
btw bm ty for leaving me with deprected code ;D
is it?
Yes
"pure" might be a better word
^
😌
dude you got old af methods
I've of something else wanting to be pure last century and it didn't go too well
🥶
😳
bro what
would a fair comparison be: lambda calc is like the string theory of computation?
how so?
no lol
cuz well the standard model is used everywhere, but there's still people who believe string theory is the way forward, and hell maybe they're right, they're just not there yet
Its just a higher form of abstraction than our current model
the model of "stuff"
(in your analogy (?), I mean)
the standard model would be turing
that doesn't make sense
Lambda calc is just as standard as Turing Machines
In fact it's probably used more in theoretical computer science
by the current model I mean more of our current way of solving a problem, either by structural or object orientation
good points
I heard somewhere that Facebook uses a lot of Haskell on their backend for certain stuff
And lambda calc and turing machines have been proven to be entirely equivalent
clever people like lambda because you can mathematically prove that programs are correct
we like lambda because it has funny words like monad
Church-Turing thesis
😌
One of our weapons in the fight against spam, malware, and other abuse on Facebook is a system called Sigma. Its job is to proactively identify malicious actions on Facebook, such as spam, phishing attacks, posting links to malware, etc. Bad content detected by Sigma is removed automatically so that it doesn’t show up in [...]Read More...
lol
Lol
eh, not necessarily
For concrete, high level programs there are different ways to prove correctness
There's one for imperative programs too
although you definitely don't use turing machines for that
Trying to fight spam with haskell and yet this two spam haskell words in here 😔
😌
fight fire with fire
Good point
😮
Turing machines good
said nobody ever
hoare calculus
If it can run on your computer it can run on a turing machine
So turing machine = most basic computer and every computer
you don't want to prove the correctness of a java program with turing machines
So turing machine on top
On bottom*
lambda calculus (in this context) is higher level therefore on top
yeah thats what i thought
fancy stuff
Obviously 😏 , Cant wait to get through more assembly
lambda calculus is just as high level as turing machines in this sense
All my homies live on assembly
they're just different ways to express computation
yeah hence the edit -- "emulating" lambda calculus on a turing machine could be considered higher level though
Should have paid more attention at the end of my basics of computer science lecture
there was a lot of interesting stuff about this, half of which I've already forgotten
But yeah it's also possible for a turing machine to run generic turing machine programs
And you can encode any turing machine in a finite amount of symbols
ooo
I think even one symbol is sufficient as your alphabet because amazingly turing machines are countable
hey @prisma wave https://i.imgur.com/WF0xW8v.png minor cleanup 😉
cute
lmaoo
lmaoo
Good job yatopia
My TPS just got decreased by 69%, pogu!
Bruh java is weird
this
lol
lol
Apparently we use
int a = switch(b) {
case 1,3: {
yield 5;
}
default: {
yield -1;
}
}
Why is it called yield

I mean you aren't exactly returning
what is yield
it yields a result
Uh well but even so, return wouldn’t have been so wrong or does that allow us to return in a method inside the switch case?
its looking more like kotlin
I'd love to test that tbh
I would be shocked if return was forbidden, I would like it to exit the method instead
Yeah
That's almost definitely exactly what happens
ugh installing java 16 😫
You can't really say that one language is shit and other is not...
wat...
i am talking about the previous beef
wxip, ever heard of haskell?
I mean you totally can, nothing is stopping you from doing so lol
Whether that is objectively true or not wildly depends
Don't think that is possible
wouldn't make sense in an expression switch
this is what i meant
by that
| Error:
| attempt to return out of a switch expression
| case 3: { return false;}
| ```
oh bummers
I can and I will
Thoughts on Haskell?
blanked 😔
just looked it up on google, seems very similar to python or other lazy people languages
lol
Lol
haskell is similar to python
What if Haskell is python 👀
👀
Monad pattern in python
python pure
God I wish
elara good
everything else (except star's language) bad
right?
everything except haskell and python are bad
everything except kotlin (and maybe haskell) are bad
star? 👀
unpopular opinion
please state ur facts dkim
yes
oh phew
you all suck. YAML is the best programming language
bm is here
do you program in html tho
haskell
PHP not bad either
good
or is that just bad kotlin
java with lombok it's a godsent
data class < record < data
garbage
You will be sent to the devil
true
source?
i don't want to go to Haskell!!! please no!!!
😮
😤
Invert that list!! Someone flipped it by accident
You've got it wrong, Im sending you to the devil known as kotlin
Not for long
k
l
m
n
o
p
r
?
t
q
v
staff spamming!!1!!!1!
s
51.7% loved
#ban-blitz
demote! 🚨
shit's like marmite
Sir please respect the rules and do not spam. Repeating a character multiple times is considered spam. Thank you very much
u
a
a
a
a
a
a
-ban DKIM
no perms :D
my brain
hi remence
Well I'll have to tell you to KINDLY FUCK OFF. thank you very much
hi dkim
:D
bm
are you there
i have a very important question for you
oh well that sucks
ok
yes
question is ||do you love dick|| ?
im here 😄
hm
dumb people
should i learn rust
Yes!
hmmmm
and abandon haskell?
they couldnt get past compiling their apps :kekw:
🥲
No
i can't learn all
False
too much for my smol brain to handle
You can
do you know more rust or haskell
more haskell for sure
Rust mitten was only a short stay
ok then ill just use haskell
why tho? xd
i dont like public games because 2/3 of the times its shortest mode
made me realize how much i hate it
😔
I almost just lost a night's worth of work I did trying to add Adventure to Waterfall by running ./waterfall patch instead of ./waterfall rebuild lol
IJ's local history is officially god tier though
does kotlin have anything like c#'s yield return
What is C#'s yield return?
essentially an implicit collection
for (int i in {1, 2, 3, 4, 5}) yield return i```
which will return a collection
so list comprehension
idk what its called
not necessarily list comprehension from what im getting from google
Kotlin's sequences act similar
Was gonna say the closest thing I can think of are sequences
[1..5] 🙂
(1..5) 🙂
val mySeq = sequenceOf {
for (i in setOf(1, 2, 3, 4, 5)) yield i
}
yeah that looks pretty close
that's not lazy 🤢
But I am
😂
i've got the perfect language for you!
😌
oh no
gimme = map (\x -> x)
main = print $ gimme [1..5]
why the🤨
didnt someone already do that bm
lol
lol
Had to do some slight changes, but seems like that works yeah
interesting gimme function
is it invalid
because of the (\x -> x)?
isn't this what everyone else was doing though
or wait
were they getting the sum of the list?
Oh Its a direct translation
well [1..5] is already a "sequence" so
Haskell most concise language best language
guys im confused
aren't we all
which of the following is the worst case run time for Quicksort that uses the middle element as pivot
1 2 5 3 4
what's the difference
wait
@prisma wave
sorry for ping i am literally taking a test lol
only reason i say that is because the secone one requires the elements to be swapped
for the left side and right side
oh I seee
not sure if that actually affects it though
okay because they seem equally bad running time wise
Yeah you'd better be sorry
Ah that website
all of them require a tree traversal
Yeah none I think
"None" instead of "Nothing" 🥲
fuck this is like the worst tree to traverse
left mid right
bdaec
bdaec
"only"
yeah and it was open book open notes open discord
I want a fucking A fefo
how much time did you have for it
60 minutes
Whats the point?
thats not bad
i was up to 45
if I stress myself enough to always try and get 100% I would have committed suicide already
open-everything quiz? damn
unhealthy
i mean yeah how you can police it
it's easier to just let people do stuff and actually learn
GASYUDHIUAHSJD coc hates me, just got shortest mode 4 times in a row 😦
ew camera on??
mhm
i don't have a camera on my pc and my mic is a dynamic mic that picks up nothing lol
wouldn't help them
people always find ways to cheat
Not that people dont still manage to copy
so might as well make it not cheating so that you actually try to learn
i mean hell, I just learned the in order traversal for that tree lmao
but it confused me because each node only had one child
not the root node 😎
rip

