« first day (4108 days earlier)      last day (739 days later) » 
00:00 - 14:0014:00 - 00:00

12:08 AM
man im messing around with the audio trace feature on desmos, except idk the first thing about music
can someone go to desmos, type in y=0, then while still focused on that expression, click alt-t then h
tell me what note that is plz
is it c
i honestly cannot tell by just comparing to the wikipedia audio file for middle c
 
alt-t opens the tools menu in the window menu bar
do i need to download desmos as an application or smth, cuz i'm just using desmos.com/calculator
 
you have to be focused on the specific equation, then press it. did u do that?
 
ah i clicked on the graph display lol
i am 99% sure that is not C but i need to open a piano to compare, i don't have perfect pitch lol
 
soo.. what note is it
oh
:(
well what note is it close to
 
b flat
 
12:13 AM
Might be A, since it's a nice pitch to work with numerically (440 Hz, or 432 if you're a conspiracy theorist)
 
hmm
oh
in the top right, u see a tool icon
click that and can u change y=-6 to 6
then try it again?
is it still b flat?
 
i believe y=0 is the closest to 464Hz (A#4 / Bb4)
it was already close to y=-6 - 6 so changing it didn't really change the pitch although i think it might have brought it closer to 465 Hz
 
crap ok im so confused by this lol
 
changing it to y=-1 - 6 definitely did alter it though
now it's about 365 Hz
 
"Bottomest vs toppest lines of the graph correspond to the range of an octave, so it’s important to accurately frame your grid then avoid scaling and translating the graph. Using numerical grid setting is the most robust way. Then, the 12 steps within this range correspond to the half-tones in the music scale. Of course you may try continuous variations too !" can u parse what this means, and how i can use this to make C?
 
12:18 AM
ok so I believe the bottom is 330Hz and the top is 660Hz
i don't think i'll be able to get within more precision than 1Hz
 
@AidenChow It means the visible part of the Y-axis is one octave, so if you make the Y-height exactly 12, you'll have all of the notes
 
i could audio record it and plug it into audacity or smth but i'm too lazy to; i'm just using szynalski.com/tone-generator and checking it by ear
 
@hyper-neutrino You might be able to use a sine wave generator at tbe same time on the same computer, which causes interference and makes a beat frequency
 
that's what I did lol
 
12:21 AM
that's how i even got within 1Hz of accuracy
anw weirdly enough when x>0 it seems to play the same tone but an octave up (at the same time as the base frequency)
 
@RadvylfPrograms so if i make it go from y=0 to 12, each line y=0,1,..., 12 represent a note?? what is a half tone anyways
 
A half tone is the difference between A and A# IIRC
Or maybe A and B
 
it is A to A#
 
But yeah, if Y was 0 to 12 an increase by 1 would be the difference between A and B. If you had it go from -12 to 12 an increase in 1 would be the difference between A and A#, if I'm reading that right
 
in equal temperament it is a frequency ratio of 2^(1/12)
 
12:23 AM
hm ok but which line is C if i do y=0 to 12, is it exact in middle???
 
@RadvylfPrograms no, if Y goes from 0 to 12 then 1 increase is from A to A# since there are 12 semitones per octave
 
Oh yeah
 
i just need to know where a specific note is, then i can probably figure out where the rest of them are
 
@AidenChow no it's 58.561% of the way from the bottom to the top
 
0_0
is that an just an approximation?
 
12:25 AM
eh, no, that sounds wrong
lemme recalculate
 
wait what if i did y=0 to y=11, would it then be at y=6
or wait, y=5???
 
actually nvm it's close enough to E4-E5 ignore the above
@AidenChow no it would be y=8
if you did y=0 to y=12, BTW
 
oh ok thx
so if i want to then play D, i just two higher so y=10? is that how the half note thing works
 
that should work
 
alr thx
uhhh does this sound accurate, idk, it just feels a little off to me, or maybe im just imagining things lol: desmos.com/calculator/l3htqyq34o
 
12:59 AM
well the first jump should be 7 not 6
since you're looking for a perfect 5th which is 7 semitones
 
i have no idea what that means but ok
 
Sandbox posts last active a week ago: ASCII-Art n'th Root
 
the notes (you can shift these by a constant) should be 0 0 7 7 9 9 7, 5 5 4 4 2 2 0, 7 7 5 5 4 4 2, 7 7 5 5 4 4 2, 0 0 7 7 9 9 7, 5 5 4 4 2 2 0
 
yo what, thanks!
 
0
Q: Split given integer into a given number of integers, each within given bounds

Isaac ReefmanInput variables: (Names are just examples, they don't need to be named like this) GrandTotal - integer to divide SplitCount - number of output integers required UpperLimit - highest valid value for any one output integer LowerLimit - lowest valid value for any one output integer Valid Output: T...

 
1:02 AM
how u find that anyways
@hyper-neutrino does this sound right to you: desmos.com/calculator/rgcf8u3dps
 
@AidenChow yes, besides the rhythm
@AidenChow i just typed it out because i know what the intervals are and the number of semitones per interval
 
whats wrong with the rhythm?
every 7 note is twice as long right? everything else same speed?
 
using - to indicate that the previous note should stay held down through this beat as well:
actually i don't need to. going off of my previous message, every note is the same length except the ones before the comma are twice as long (and the last note)
 
@hyper-neutrino huh, i feel like thats exactly what i did
 
well your note lengths are correct but the pauses between them are not
unless you're intentionally going for swing
 
1:10 AM
how long should the pauses be in relation to the actual note length
half?
 
it doesn't actually matter as long as it's consistent
i'd make it none, because you can't force a pause at the end of each line which causes it to sound weird
 
so once it finish a note it immediately go onto the next one?
 
yeah
or since you have repeated notes, you could put like a very short pause between to make the notes sound distinct actually
 
ok i will try very short pause
 
exactly like that
 
1:16 AM
ok thanks for the help!
 
np :)
 
u think that if i were doing this challenge: codegolf.stackexchange.com/questions/272/… can i use the longer pauses i had initially (its more golfier)
 
1:40 AM
@hyper-neutrino i posted twinkle twinkle little star answer. again, big thanks for your help! codegolf.stackexchange.com/questions/272/…
 
 
1 hour later…
2:44 AM
Hey can someone clear the stars on those two messages?
Somehow my phone managed to be open in my pocket and then star them
Oop nvm
I was able to do it myself
 
@lyxal :o we found who was starring random msgs, its lyxals pocket all along!! /s
 
3:31 AM
added an explanation to the twinkle twinkle little star answer
:D
 
I don't think it do no more
Good job lecture slides for once again being stuck in the early 2000s
 
3:58 AM
so are we just not gonna do lyal entirely
 
seems like it do be like that
 
well if no one is available to teach the current langs, we can always do another desmos lyal (the first one was a flop tbh) :P
jkjk lol
 
Holy frick they've mentioned AOC in this weeks computer science fundamentals workshop
 
whats aoc :|
 
Advent of Code
or if you're someone like me, Advent of Pain and Suffering
It's something we all sorta do in December each year
 
4:08 AM
huh, never heard of that one before, interesting
 
whats it about
 
> Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar. It has been running since 2015. The programming puzzles cover a variety of skill sets and skill levels and can be solved using any programming language. Participants also compete based on speed on both global and private leaderboards.
It gets real hard as the month progresses
I've never completed all 25 days
 
so is it like a competition
 
> It gets real hard as the month progresses
 
4:13 AM
@AidenChow kind of
You get points for being in the first 100 to solve the day
And those spots go real quick
 
and that also applies on private leaderboards for the rest of us plebs
 
Yeah
Most of us have no chance of getting public leaderboard rankings
 
we have one and you can compete on it if you want to pour in ten to 200 minutes each night at midnight est sharp
it's not too hard to get single top 100s on individual days but it's hard
 
so its not a competition but everyone just makes it a competition?
also i suck at programming in anything except desmos so ill probably do very badly in this
 
it's a competition in which you stand no chance so 99% of people just do it for completion bragging rights
do aoc in desmos
each year's problems remain indefinitely open if you want to get a feel for it doing those
it's the project euler style of you just have to stick a numeric answer in a box (though your inputs are personalized here) so desmos would only be a problem to the extent that some of it could be less than convenient to implement
having limited, say, i/o facilities could actually be an asset psychologically in some odd circumstances
 
4:22 AM
lol dang thats pretty cool, ive done project euler before, tho im not too great at it
 
i remember there was one star in whatever the intcode year was where they actually gave you one of those brick breaker games and i spent like ten minutes actually playing it before i realized i could just automate keeping the paddle under the ball
 
ah yes intcode
good fun
 
i unironically loved that shit
 
To quote myself on esolangs.org:
 
even though i did a terrible job of actually maintaining my interpreter for extensibility and flexibility
 
4:24 AM
> Intcode is an esoteric programming language created purely to annoy programmers competing in the Advent of Code 2019
 
if ive done only 27 of the first 100 problems in project euler (not good, ik :( ), how many of the aoc challenges do u think i can complete
 
it's pretty different in overall content
try some of the 2020 problems
you can definitely do star 1 :P
...and don't sweat star 20
 
@UnrelatedString ok ill try it out!
@UnrelatedString desmos ftw: desmos.com/calculator/3f2hgrnbpe
ok that was pretty ez lol
 
ooh I hear people talking about AoC đŸ‘€
 
4:31 AM
oh wait theres a part 2
 
yep, each day for 25 days there are two parts released, you need to solve the first half to unlock the second one, except day 25 part 2 is a freebie for all of the years so far
(correction: day 25 part 2's requirement is "have the other 49 stars")
 
desmos.com/calculator/nv9q6b2njr :D ik that the problems are gonna get way harder than this but at least i can do one lel
 
\o/ nice
 
@UnrelatedString ... tf is day 20 :|
 
turn away while you can
 
4:35 AM
Pain!
it's pain!
absolute pain!
 
er yeah day 202
20
star 40
 
how many more ways do I have to specify day 20 is pain!
 
i still haven't fucking done it lmao
i think multiple people resorted to printing it all out
 
uh which year
 
4:36 AM
oh that one. yeahhhhhh pain
 
yeahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
I didn't even attempt it and I know it's pain
that's how pain it is
 
i got 14/54 on that lol
and it took me over an hour for the full problem
 
14/54 after an hour and more?
wowsa
 
4:37 AM
yeah
 
just goes to show that it is inexplicable pain
in conclusion, pain.
 
honestly that's not even especially long for a late day
also i almost forgot i committed a scan of a piece of paper to my solutions repo for day 24 last year lmao
 
2020 was that year I used chalk and got funny TNB stars for it
 
eh, last year i didn't have any >1h subs that were on the leaderboard
 
huh
could have sworn some last year had the leaderboards close after like an hour and a half
but yeah that is long for you specifically
 
4:40 AM
at this stage I've just decided not to do AoC at all
it just ruins morale for me, so I'mma gon pass this year
 
yeah valid
 
it is probably in my best interests to skip it and i 100% will do it again đŸ’€
 
is it really that horrible? the problems seem hard, but its not like its not fun to do right
 
well at a certain point it starts getting really stressful
 
4:42 AM
it's fun up to a point
 
stressful?? why?
 
being in such a tight competition for leaderboard positions makes the stress factor a bit higher and the fun factor a bit lower :P
 
That point being once you start dropping days and ranks
 
@AidenChow i mean i was #5 last year so the whole time i was under a lot of pressure to hold my rank lmao
even then i dropped a couple closer to the end when i started becoming too slow at the super long problems
 
Plus the timing really isn't good for a lot of people
Like for y'all it's near midnight
But even for me at 4pm it's too much
 
4:44 AM
yeah it's exactly midnight for me which is honestly fine; i rarely sleep before 1am
 
*exactly midnight in the eastern us, a bit earlier west of there, ungodly hours of the morning in europe
 
Aoc just isnt my cup of tea really.
 
if my fall 2022 courses are early in the morning i may have to drop some days
 
yikes
 
4:45 AM
actually that's probably untrue closer to the end it'll probably be during finals and so i won't have to go to class. maybe? idk
 
unyikes
 
or i can just sleep late; i almost always either finish within the first hour or am too late for leaderboard anyway and just give up and wait until the following day to do it
so i should be fine i hope kek
 
Another thing about AoC is that brute force algorithms don't cut it
You really need to know things like memoization and dynamic programming
That or you need to be able to find an efficient shortcut or pattern you can exploit
 
yeah speed of coding is the main metric but you need to know how to optimize and write efficient solutions otherwise your runtime will just be too long to compete (or even complete in a sensible amount of time)
 
4:56 AM
0_0
da hell is dynamic programming
 
Breaking a problem into smaller sub problems and focusing on recurrence relationships
 
i have no idea what that means or how to do that -_-
 
I don't really know either that's just the definition I had to come up with for an uni assignment
 
uhhhh ok then.... lemme search it up to see what google gives me
 
Also, knowing how to navigate grids is really helpful for AoC
Like there is a lot of grid related stuff
 
5:00 AM
navigating grids as in... pathfinding algorithms?
or something else?
 
That, but also representing a literal grid data structure
Also graph theory is allegedly a good thing to know for AoC
 
:| that sounds way out of my league
 
As it does mine
At least at this stage it do
 
@lyxal u mean the nodes and stuff? yeah, i have completely no idea how to do any of that
 
I do mean nodes and stuff
 
5:01 AM
other than maybe dfs and bfs
eh even those im iffy about
 
5:37 AM
here's a decent example of dynamic programming
let there be a grid of cells of N rows and M columns
there is a rat in the top-left corner and it wants to get to the bottom-right corner and it can only move one cell down or one cell to the right at each time
in K of these cells, there is a cat, meaning the rat may not pass through that cell
how many unique paths can the rat take?
exact I/O format does not matter but give this a shot and let me know what you come up with
 
hmm
yeah i have no idea
 
so the ultimate goal is "determine the number of path leading to the cell (N, M)"
 
there's a very obvious way to do it, and the key is thinking of why the super obvious way is less than ideal
 
however, breaking this down into sub-problems, is there a recurrence relationship you can use to get the number of paths to any (x, y)?
 
well the number of paths to (x,y) is # paths to (x-1,y) + # paths to (x,y+1)
i think
 
5:51 AM
correct
and so the core idea here is that if we have solutions for smaller subsets of the problem, we can find the solution - in this case, if we know f(x - 1, y) and f(x, y - 1), we can compute f(x, y), and so starting from a base case (in this case, f(1, 1) = 1 and f(x, 1) = f(1, y) = 1 (unless there is a cat cage in that cell or above/to the left)), we can "build up" towards the final answer
a similar problem would be the fibonacci sequence - to calculate F(n) we do F(n - 1) + F(n - 2), but if you did it recursively (without memoization), it would take exponential time because you are recomputing values
you could cache, but the idea of dynamic programming would be F(1) = F(2) = 1 and then you iterate forwards (rather than recursing backwards) to then calculate F(3) = F(2) + F(1), then F(4) = F(3) + F(2), etc. which is linear
 
ok, that makes sense i suppose
 
DP is definitely a pretty difficult concept to fully understand but if you'd like some practice with it you can look for problems with the DP problem type on DMOJ here and feel free to ask any questions here
 
why is this not working for ur mouse cat problem: tio.run/##VY7dCsMgDIXvfYpc6rYOZbsYoz6JeCHUroKzIhbq0zt/…
1 is where cat is
oh oops nvm
should be l[y][x] :P
wait but in my solution i start from the end
 
yes, your solution is recursive
 
how would i convert it to dynamic programming
 
6:06 AM
iterate through the grid starting from the base case and store the solutions in a grid rather than recursing
 
so i make another grid which has the # pathways to each cell?
 
6:22 AM
yes (you can optimize some space but i don't want to complicate things too much yet so go with that for now)
 
@hyper-neutrino you're very good at teaching this. Are you sure you haven't done this kind of teaching before? :p
 
idk if I've mentioned it here before so idk are you asking this ironically or not :P
 
Ironically because it's on hyper-neutrino.xyz/about
 
still trying to figure this out, i have out of range error so far showing up on my screen :(
 
@lyxal ah. lol.
 
6:34 AM
i think i got it: tio.run/…
@hyper-neutrino optimize space how???
 
@AidenChow yep, i think that looks right to me, gj
@AidenChow you don't actually need to store the full grid of solutions; you only need to keep track of one row at a time
 
ohh yeah, thats smart
well i certainly learned smth new from this, u r good at teaching this @hyper-neutrino
but the problem is, idk when to use this lol
is dynamic programming always better than recursion???
 
yeah, identifying what approach to take is usually a significant part of the challenge
if you can identify a way to generalize the solution to a sub-solution (in this case, "get the total number of paths" is a specific form of the more general "get the number of paths to (x, y)") and break down each sub-solution into smaller parts, DP is potentially viable
@AidenChow no
the weakness of DP is that you compute every possibility when sometimes you need very little of your search space
also sometimes they don't overlap
for example, this problem cannot be solved by DP
 
6:52 AM
overlap meaning what in the context of dynamic programming?
what doesnt overlap?
 
like the set of problems where recursion is viable and the set of problems where DP is viable don't overlap, is what i meant
 
sooo what... didnot understand what you meant by that
 
Most problems which can be solved by recursion, cannot be solved by DP
and most problems which can be solved by DP, cannot be solved by recursion
 
ok huh i thought dynamic programming was just "backwards" recursion, where u start building off from base cases instead of going to base cases, is that the wrong notion
i felt like that was the case when i was making recursive solution vs dp solution for hyper neutrinos cat/mouse problem
 
there is a decent amount of overlap between recursion problems and DP problems but usually one is always faster than the other
 
7:04 AM
so u r suggesting that theres smth more fundamental that differentiates them, so that they cant be used to solve the same problems in most cases??
oh
 
recursion is just too time and space consuming even with memoization so DP is usually better when it can be used
so like
with the cat and mouse problem, recursion is able to get you a correct answer theoretically but in practice you'll just blow your stack
and for example with the chemistry-themed problem i linked you, some recursion problems cannot be solved via DP
thinking of DP as inverted recursion can be a helpful analogy but it is not actually just "reversed recursion" and thinking of it that way is something i'd recommend avoiding
it helped me understand what DP is and how to use it correctly but it's really a misrepresentation of what it is lol
 
@hyper-neutrino can arbitrary libraries be pip installed on DMOJ?
 
so what should i think of it as then?
 
@lyxal I am pretty sure you can only use the standard library modules but i'm not certain on that
if you have smth specific you want i can ask an admin
 
@hyper-neutrino but also using stuff like the command line library
 
7:08 AM
@AidenChow DP is just DP - finding a way to break your problem into subsections where each sub-solution can be used to solve a slightly larger sub-solution, which can be used to solve a larger one etc. until you build up to the answer
with recursion you start at your final state and select specific sub-states to recurse to to compute
 
@hyper-neutrino that really does sound like backwards recursion in my head :|
 
with DP you start at the "ground" and compute every* state along the way (*idk if it's always every but it's basically just every state)
@AidenChow the thing is how would you invert the chemistry problem i linked
 
lol dont ask me, idek how to solve it using regular recursion :(
 
dmoj.ca/problem/backtrack1 here's one that you hopefully know how to solve
 
oh wait do u just keep recursing into deeper and deeper parentheses for that one, or am i wrong
 
7:11 AM
basically, yeah
anyway, whether or not DP is reversed recursion isn't really all that important since you're right that it does seem like that and if it's easier to understand the approach that way then sure that's fine, it's just important to know that DP does not make recursion useless and the two have their strengths and weaknesses / problems that they can't be used on, and it's not always "DP > recursion"
 
@hyper-neutrino makes sense, tho the problem i think im gonna face is like, i know i need to do recursion for a particular problem, but is dynamic programming or regular recursion better.
 
DP is good if your solution will need every possible sub-state
recursion is good if your solution may handle really large values but only needs a few select values (for example if you have something like F(x) = F(x / 2) + F(x / 3) then it would be really wasteful to use DP which would calculate far more values than you need)
these are of course generalizations
 
memoized recursion can bridge the gap a bit
 
yeah this all makes sense, but i feel like its gonna be hard to reason this out in practice for someone as unexperienced like me (especially since i just learned about DP lmao)
especially on more complex problems as well
 
 
2 hours later…
9:32 AM
I am reading a paper that says "It is commonly taught in courses on data compression and used in the classic UNIX utility compact, for example."
I don't have that on my linux machine
does anyone here?
it looks like compact is so old even linux doesn't have it
 
 
1 hour later…
11:04 AM
@RadvylfPrograms Why does your chat bio contain "This chat bio was last updated today."?
 
11:20 AM
Clear star on Unrelated String's message from 6 hours ago?
what is it with these stars on meaningless messages?
17 hours ago, by pxeger
Whoever's starring random messages, please stop
 
is there a python module that will return the size of a maximum matching in a bipartite graph in a single function call?
 
11:33 AM
hey hey heyyyyyy
 
That's what horses eat
You're a cat, not a horse, you dumbnut
 
no, horses eat hay with an a
your joke would be funnier if this weren't a text-based medium
 
I'm just doing the best I can do
Because it do be like that sometimes
 
12:04 PM
hm
@lyxal would you by any chance happen to know any pixel artists?
P4TC really could use one right about now
WAIT
IS TODAY NP'S CAKE DAY?
hm no
I think it's tomorrow ;-;
anyone who wants to have a go at pixel art, ping me in this chatroom!
 
 
1 hour later…
1:29 PM
@pxeger Because it was last updated today, silly
 
1:39 PM
hi
@RadvylfPrograms I did the thing
 
00:00 - 14:0014:00 - 00:00

« first day (4108 days earlier)      last day (739 days later) »