« first day (4062 days earlier)      last day (1077 days later) » 
00:00 - 12:0012:00 - 00:00

00:09
before autoformatting:
after autoformatting:
thank goodness for autoformatters
@lyxal is this java?
it sure is
and this is just a helper class
it isn't even the main thing I'm really supposed to be doing
that's
possibly some of the least self-explanatory class and variable naming i've ever seen in java that isn't actively meaningless
It makes sense in the context of the assignment
which is to create a forum like web app using Java servlets
If parent has children, kidnap children
00:14
This is a tree I'm implmenting
because someone decided it'd be a good idea not to include a generic tree type in the Java stdlib
oh so it's not like a fixed number of levels in the hierarchy
that makes more sense
and it just so happens that you're generally searching for grandchildren by id
correct
and I decided to make it a specialised tree
so no need to worry about code reuse
and I've just realised it doesn't actually work
^ ಠ_ಠ Might not compile
because it seems I may have forgotten to check if it's the right node
looks like it'll just return null all the time
excellent
apart from the parent check, I would have written the child check something like this:
Node<message> temp = null;
for (Node<message> child : parent.getChildren()) {
    temp = get(id, child);
    if (temp != null) {
        break;
    }
}
return temp;
00:23
It's grown:
private Node<Message> getNode(int id, Node<Message> parent) {
    Node<Message> temp = null;
    if (parent.hasChildren()) {
        for (Node<Message> child : parent.getChildren()) {
            if (child.getData().getId() == id) {
                return child;
            }
            temp = getNode(id, child);
            if (temp != null) {
                return temp;
            }
        }
        return null;
    } else {
        return null;
    }
}
because it now actually returns the node, and I realised that the original naming didn't work with my overloads
oh wait is this recursive
that makes
much more sense
@UnrelatedString of course it is
how else you gonna get down into the children nodes at arbitrary levels?
it didn't occur to me that the original version was recursive
y'all acting as if I didn't learn all this last semester in the data structures course I gave y'all updates on during lectures
00:27
i literally thought it was just searching grandchildren lmao
the method being named get probably didn't help
@UnrelatedString I mean, I could do that because it's guaranteed to only be 10 levels deep at the most, but I like my implementation to be versatile
is it bad to say I'm missing the macro-guards of C++? or is it that I'm not used to the freedom of being able to use ArrayLists in uni assignments?
...why aren't you allowed to use ArrayLists
what the fuck
are you using other Lists or do you have to use arrays
well I mean, using ArrayLists / other containers would defeat the purpose of the assignments where I wasn't allowed to use it
please don't tell me you have to use actual arrays
because those assignments are about implementing data structures from scratch
00:32
oh
well that makes perfect sense lo]
this is the first assignment in a while I've been allowed to use ArrayLists and it's glorious
I can map functions to lists using streams! I don't have to worry about my nodes pointing in weird directions! I don't have to handle sentinels/stupid edge cases!
oh stdlib containers how I've missed you
and it's not just ArrayLists I'm allowed to use - it's the whole java stdlib
man data structures is restrictive af
understandably so, but still
i would imagine that's the point
yeah
0
Q: Circular chained compound

DialFrostTask Given a positive integer n, output the joined compound of circles The circles are of square of size n+2 but removing the corner edges and the middle E.g. 2 -> #### #### #### #### -> ## # # # # ## -> ## ## # # # # # # ## ## Testcases 1 -> # # # # 2 -> ## ## # # # # # # ...

now to figure out how to actually use the tree class I made
wait i just noticed that i have 69 answers nice
00:39
nice
nice
y is there 2 lyxal's lol
there just is
lol not another "nice" chain
00:42
@DialFrost do not question the amount of lyxal
because it is what it is
just let it go by
@ľýxäł hehe
issit possible to change my name to lyxal3
:D
@lyxal wtf why
Because the assignments were all data structures related
as in, implement a linked list from scratch
00:43
Outside of implementing data structures you should be allowed to use them
Oh ok
@user that's literally the course I did last sem
and it's also the assignment for the programming and paradigms course I'm currently taking
This sounds suspiciously like you’re taking a course that’s easy for you just so you don’t have to study as much
nope
No judgment tho
it's the reccomended schedule
00:45
Hmmm
is it like a strictly required course or is it just strongly recommended
strongly recommended
So you’re just taking it just because
so the deal is that you can have up to 4 courses a semester (5 if you're an extra special child who is big brain enough)
the uni has a roadmap of what it says you should take
because over here there's only like two cs courses you can test out of and there's like three or four that are just mandatory aside from those
00:46
and 99% of people follow that roadmap
these courses are all mandatory btw
it's just that the order in which you do them are interchangable
makes sense
@user because it's what I'm supposed to be doing
Bruh imma just test out of the intro courses 🥸
my school's got a fixedish sequence of the mandatory ones based on prerequisites, and everything above them also has various ones of them as prereqs except the professors for those do not give a fuck
APs are annoying but good for this
00:48
that's what I should be doing
CORE means it's compulsory to do at some point
i literally just took two graduate courses last semester because i just emailed the professors and they were like yeah come on in
Do you have aps in Australia?
last semester was my first semester
@user what's an AP?
advanced placement
thing run by the college board
00:49
Oh nbm then
i think it's roughly analogous to ib in some way
no, we have a thing called the HSC
that gives you a ranking which you then use to apply to uni
You take a test in HS and hope to get credits for that in college
and also depending on your high school it forms a third tier of classes above standard and honors
Wait so APs are considered individually? They don't form a single score?
yikes
@UnrelatedString nice btw
for a single score we have the sat and act
ah
Why yikes
00:50
see we don't do that here
Makes more sense not to smoosh scores together
it's only the HSC or alternate pathways like applying with a portfolio
also colleges don't always like
actually especially care about the sat or act
your ATAR (which you get from the HSC) is basically what determines which courses you can take
it's also a kind of leaderboard ranking because it tells you what percentage of students you beat
funnily enough schools outside the us generally require certain ap scores as their requirements for american students
00:52
I think in summary, nothing I could have done at high school would count towards uni courses
Wait, ap reqs? Did not know about that
APs are seen as like an optional thing here
besides, the SW course I did do at HS was from 2001 and was more focused on the software development cycle
Unlike SATs
100% optional
What’s 100/ optionalV
00:53
aps
in the us
Oh ok
@user wats SAT
If you don’t know you shouldn’t spoil your innocence
uhhh
okey
Avoid at all coats
5
00:54
coats? or costs
Costa
Cots
@allxy btw it did compile
i didn't do like a huge survey of international schools but everywhere i looked in the uk, germany, switzerland, and i think singapore required primarily ap scores from applicants from the us
with maybe some low sat cutoff as well
The SAT is a standardized test widely used for college admissions in the United States. Since its debut in 1926, its name and scoring have changed several times; originally called the Scholastic Aptitude ...
hmmm interesting
no
it is not interesting
00:56
lmao
i forget if the dutch schools i looked at also required aps or just applied an extra entrance exam of their own
i never figured out what mgu wanted in the first place because their english website sucks and my russian is even worse
reasons why I like flask more than tomcat apache: a) flask doesn't compile every single fricking webapp in the webapp directory all at once and run them all at once b) there isn't even a web app directory to put multiple web apps in c) errors appear directly in the terminal rather in a log file d) less verbose e) doesn't require two different powershell windows at once f) doesn't require a special directory for everything
> powershell
@UnrelatedString what does t:=" " do in the code?
cuz if i replace it with " " then the code fails
walrus assignment operator
01:07
ye
i.e. assignment expression
since python doesn't let you use = for assignment in expressions
3.8 added :=, which you aren't allowed to use except in an expression instead
how come instead of t:=" " then use t later once only, why cant u do " " then " "
because it's t:=" "+("#"*n+" ")*n
01:08
OH
okey im stupid
sry mb
didnt see that there
wats a recursive func btw
a function that is recursive
and to understand recursion, you must first understand recursion
7
Of recursion, that is
ah thx @Pyautogui
01:13
i think this is too
wait i fucked that up
i think this is too
...
i'm trying to do it without editing
can't believe other chat rooms exist, smh
ah
like this?
it helps to have a userscript that shows message ids
01:15
i just hover the little thing on the left
and the reason I sent the word "ah" was to see what the next id would be
i assumed as much
it's like that time I made a recursive bookmark

Recursive Bookmark

Nov 24, 2021 at 12:54, 27 seconds total – 2 messages, 1 user, 0 stars

Bookmarked Nov 24, 2021 at 12:55 by lyxal

here, I did it again:

A Second Recursive Bookmark

3 mins ago, 42 seconds total – 2 messages, 1 user, 0 stars

Bookmarked 12 secs ago by lyxal

gotta love SE chat jank

Clicky

2 mins ago, 1 second total – 2 messages, 1 user, 0 stars

Bookmarked 1 min ago by lyxal

Click that to go around and around in circles between the sandbox chat and the trash chat
 
1 hour later…
02:34
0
A: Sandbox for Proposed Challenges

jezza_99code-golfascii-artstring Negative of an ASCII photo Given an binary ascii "photo", return the negative of the photo Example: # # # # # # # # -> ## ## # # # ### # # # ## ## General rules: This is code-golf, so the shortest answer in bytes wins Standard rules and default I/O rules ...

02:47
anyone know how to get deleted rows from a psql database?
all i could find on SO is a pretty useless link-only answer with no explanation that links to a bunch of pages with also no explanation (stackoverflow.com/questions/6151632/…)
wats a psql database
02:58
y r more ppl using attempt this online?
because it's good
compared to tio i don't like the output being so far down the screen by default and not being cached/automatically run, but the interface for arguments and options is nicer and it's also nice to have timing info separate from stderr
it's also actively maintained
...and i just now realized it updates the url as you type
this whole time i've been using the copy for cmc functionality then extracting the link from that
I just wish ATO or TIO had interactive STDIO. Would be useful for me sometimes, e.g. when wanting to try out the brainfuck tictactoe.
@UnrelatedString ye
@UnrelatedString lmao
03:16
hey so remember that thing I was doing with the trees and Java?
well it works
and I'm happy
i got my first 25 votes qns! yay
03:36
none @emanresuA
@Pyautogui For that, you need to use a service that comes with an emulated terminal, which is far beyond the scope of TIO or ATO. Maybe you can use Repl.it for that (which happens to support BF).
My only complaint for ATO is that it doesn't work at my work PC because the firewall is crazy and blocks all websocket connections
Imagine using websockets
04:07
@emanresuA i should learn js one day ....
Okay, but it's not hard to modify
in general
Go to link.rf.gd/h154y (shortened TIO) and modify the operations array
It's in the format [string, weight]
@Bubbler, that makes sense. I will try out Repl.it, thank you for the suggestion!
H              Choose a random element of the input
 el            Take the uppercase alphabet
 e             Insert "'{&" into this at position the above
   l           Reverse 4
    o,         Increment the input
       worl    Flatten the input
           d   Take the lowercase alphabet
            !  Decrement the input
> Reverse 4
04:14
0
Q: Sort numbers in a ragged list

emanresu AGiven a ragged list, e.g. [ [4, 7], [5, 3, [], [6, [2]]]] Your challenge is to sort only the numbers in in it. For example, with the above, the result would be [ [2, 3], [4, 5, [], [6, [7]]]] The shape of the output should remain the same, only the numeric contents should change. This is code-g...

Yay, NP's up!
new posts
bot
> I am a chat bot. I post new questions on CGCC. Not to be confused with the feed by the same name:
Well, in Colorado as of like noon today
Hopefully going skiing tomorrow
whoa github has a (probably) new thing
04:23
Waiiit... How'd you fix NP and SP if you weren't at your server?
it must be hyper's copy
TIL github renderes colors beside hex color codes
also if yall havent noticed, im not going to school today
Any new PARI/GP answer?
@alephalpha Nope
@alephalpha i'll try to give an answer
@alephalpha why doesnt this work: ato.pxeger.com/…
04:37
@PyGamer0 woah you're here all day? Cool!
am i doing something worng
@PyGamer0 call(f, a) is f(a[1],a[2],...), so a must be a vec.
@PyGamer0 call(f, a) is f(a[1],a[2],...), so a must be a vec.
@PyGamer0 apply in PARI/GP is actually map in other languages.
oooh
@alephalpha i need to know two more things: How do I generate all permutations and How to filter out (python's filter) based on a condition?
04:58
@PyGamer0 There is a `forperm` function to loop over all permutations:
> forperm(a,p,seq): the sequence is evaluated, p going through permutations of a.
But there isn't a easy way to generate all permutations as a vec.
@alephalpha whats the use of the seq?
@PyGamer0 filter is select, or you can use list comprehension, like [x|x<-a,cond(x)].
alephalpa pro at pari/gp
@PyGamer0 Example:

```
forperm([1,2,3],p,print(p))
```

Output:

```
Vecsmall([1, 2, 3])
Vecsmall([1, 3, 2])
Vecsmall([2, 1, 3])
Vecsmall([2, 3, 1])
Vecsmall([3, 1, 2])
Vecsmall([3, 2, 1])
```
oh
f(x)=select(a->#a==#Set(a),forperm(x,p,p))
@alephalpha ^ why does that fail?
select: incorrect type in select (t_INT).
05:13
@PyGamer0 forperm just loops over the permutations (executes seq in each step). It does not return a vec. But select takes a vec.
@PyGamer0 march hols rn for me
@PyGamer0 You can do f(x)=r=[];forperm(x,p,#p==#Set(p)&&r=concat(r,p));r
05:34
@alephalpha i want to remove adjacent equal elements from a Vec.
05:54
@PyGamer0 This challenge?
@PyGamer0 If you need to check whether a vec contains adjacent equal elements, just do prod(i=2,#p,p[i]-p[i-1])
@alephalpha how r u so gd at this lang?
I forgot to mention that forperm only output all permutations when the input is sorted..
is its behavior on non-sorted input useful in some other way
@UnrelatedString It actually output the permutations in lexicographical order, starting from the input.
@alephalpha yeah
@DialFrost How are you good at python?
@alephalpha oh
06:01
@PyGamer0 ok ig
how are you oK, you can't be a programming language...
@alephalpha that makes the challenge harder ....
i tried solving the challenge in k, didnt work :(
@PyGamer0 wut
i said im ok at python
avg
> i said im ok
but you arent oK you are DialFrost!
4
oK is a k dialect
and you are not at python, you are at your house (probably)
@PyGamer0 Just do forperm(vecsort(x),p,...).
...
ur making my brain hurt @PyGamer0
06:11
@alephalpha oh
can i post it? @alephalpha
@PyGamer0 Of course you can.
0
A: Complex permutation

PyGamer0PARI/GP, 73 bytes f(x)=r=[];forperm(vecsort(x),p,prod(i=2,#p,p[i]-p[i-1])&&r=concat(r,p));r Attempt This Online! After a lot of head scratching and asking @alephalpha in chat, here it is.

^ done!
06:29
@alephalpha so for non-sorted input it outputs a suffix of the output for sorted input? cool
 
1 hour later…
07:43
Happy Pi Day everybody!
You forgot to wait for 1:59:26
6
@pxeger shit totally forgot that was today
yooooooooo
Nice :)
i got a better message
i just hit 1000 rep are y'all proud of me
I'm very proud of you, my child. You have done well.
08:37
@DialFrost what is that
@PyGamer0 i am about to give 2 -100 rep bounties
oof
that would take me down to 1281
Are we still putting LoTMs in the upcoming events thing on the sidebar?
If so, @someModerator would you mind adding it?
no, you can't just @someModerator
you have to specify the individual names of the mods
09:43
in flax, 22 secs ago, by PyGamer0
Announcement: I shall give 50 reputation (10 for each builtin) to anyone who implements the 5 builtins from here.
quick before i implement them tomorrow :p
10:02
@PyGamer0 i don't have edit permission
@SegFaultPlus4 for what
make a PR and ill edit
and you shall achieve salvation get free rep
@PyGamer0 you still have that -100 rep bounty i'm giving you
people on 3/14/1592 6:53:58.979 were living the dream
@SegFaultPlus4 you are giving me 100 rep?
@PyGamer0 -100 rep
what
10:10
So that means you have to give reputation
for what should i give you rep?
yes, i will give him -100 rep
Idk that's how negative bounties work
whet
im confused
The joke is that a bounty usually means someone giving rep. Negative rep on a bounty would mean that you give the rep instead
10:11
@SegFaultPlus4 are you giving me rep
or i should
@PyGamer0 (is joke)
or lyxal should?
ok im confused
@PyGamer0 i am giving you -100 rep, idk what the problem is
10:27
@SegFaultPlus4 for what?
@PyGamer0 for existing
ok let me delete my account
ok but then you won't get your -100 rep bounty
\o/
Feb 22 at 15:17, by PyGamer0
user image
Wait why's it crashing?
10:41
because its a cartesian plane
11:09
hhhhhhhhhhhhhhhhhhhhhhhhhhh
11:28
is anyone free for a algorithmic problem? here it is: mycode.prepbytes.com/contest/MARATHONMAR22/problems/LZJB
although, it's an ongoing contest, but i am too desperate to wait for a week >..<
I don't think we should be publishing solutions publicly to ongoing problems.
no no, you are taking me in wrong way, i am not asking for solution, but idk how to say, but a hint-like thing would be sufficient
@RahulVerma that would be giving you an unfair advantage.
11:52
@GingerIndustries ufff, okay nevermind then, but if anyone solves it let me know the approx difficulty rating pls
it will help me to judge if i should try further or wait for the editorial
00:00 - 12:0012:00 - 00:00

« first day (4062 days earlier)      last day (1077 days later) »