« first day (4192 days earlier)      last day (655 days later) » 

12:33 AM
0
Q: Super Mario 64 RNG

NoLongerBreathedInIntroduction Super Mario 64 has a heavily overcomplicated RNG, ably explained here by Pannenkoek. I thought it might be interesting to implement it. Challenge Implement the RNG function, except for the two special cases. Input and output are both 16-bit integers. The standard C implementation is ...

 
@Neil most things in unicode should be combining characters
do we have a specific meta for "challenges should be self contained"
 
@thejonymyster No, because technically speaking, a challenge does not need to be self-contained. However, it's implied by our many metas/help center pages/etc. that say that a challenge must have a clear specification of what constitutes a correct submission
 
fair enough :P i think it should be so im still saying it in my feedbacks
 
The C code is the spec in this case I think
 
Yeah, feedback can always include that a challenge should be self-contained, you don't necessarily need a source for that :P
 
12:44 AM
right ofc i jsut wanted to have authority about it xd
@Bubbler i dont know C code :P
plus like.. cmon just write it out in english why make me jump through hoops
 
It's just a ton of bitwise manipulation, I don't think it can be explained better in plain English
 
The problem with writing out an algorithm in english is that it can be incredibly long. Pseudcode might be worth it
 
pseudocode sounds ideal honestly yea
 
though I guess things like (uint8_t)xx can be changed to make the bitwise operation aspect clearer
 
For example, look at how long it takes me to explain 25 lines of Python code
 
12:48 AM
and a bit of parenthesizing
 
a long challenge description is fine by me
 
A long challenge description isn't necessarily a bad thing, but when it can be short and concise, it should be
 
sure, but what appears to be sparsely commented C code isn't a description
maybe im oppinionated and ppl wont mind except for me LOL
 
Set s0 to 0
Copy lower half of input to upper half of s0
Take bitwise XOR of s0 and input, and store it in s0
Do you really think it is more readable than the C code...?
 
12:54 AM
I stand by that this style of C bitwise coding is poor style
 
your comment about making it more "agnostic" is exactly what i was feeling but didnt know how to say, ty
like with the description sure its still complicated but i immediately know what each word is saying and telling me to do
 
It doesn't take much to figure out what & 0xFF00 does, but ^ 0x8180 or ^ 0x1FF4? Those seem like arbitrary magic constants to me that just make the code unnecessarily dense and confusing
 
overall: should have sandboxed :')
 
Set s0 to 0
Copy lower half of input to upper half of s0
Take bitwise XOR of s0 and input, and store it in s0
Copy lower half of s0 to upper half of input
Copy upper half of s0 to lower half of input
Take lower half of s0, shift left once, XOR with input and store back to s0
Shift right s0 once, flip upper 9 bits, and store it to s1
if s0 is odd, calculate s1 XOR 0x8180; otherwise calculate s1 XOR 0x1FF4
and return the result
 
i do enjoy mario 64 mechanics though
 
12:57 AM
A few minor edits being required doesn't mean it should've been Sandboxed
 
Well I'd argue that the two magic constants are what makes the RNG a RNG
 
Of course, I always recommend Sandboxing unless you've got a lot of experience, but almost every challenge will need a bit of editing on main
 
you know what, reasonable
 
@Bubbler Fair enough, but when the rest of the code is a mess of bitwise commands, it's not especially easy to tell what's a "magic constant" and what is a "bit constant" (e.g. 0xFF00)
 
Usually the operands to & are regular bitmasks and those to ^ are magic
 
1:00 AM
Sandbox posts last active a week ago: Make an ASCII art arrow [code-golf] [ascii-art]
 
1:37 AM
If y'all want to learn about some propositions and logic stuff, you should come join a lyxture
 
 
1 hour later…
2:53 AM
As to the above, the lyxture is over for now
 
 
6 hours later…
8:25 AM
0
A: Sandbox for Proposed Challenges

PavgranSwap every two elements in the list every possible way Inspired by this question. Challenge Let L be a list of n distinct elements. Let P be the set of all pairs of positions in P. Let R be a result of applying a pair-swap operation on L by every pair in P in any order. Example: L = [1, 7, 8] P =...

 
 
6 hours later…
2:09 PM
Do we have a question abt resolving a bunch of competing cardinal/ordinal directions?
like the 2d version of bf optimizing >>><< to >
something like NE NW SW => NW
idk if N N N S should output different from N N S or something though
 
 
1 hour later…
3:29 PM
LDQ: is a mondaic or dyadic sort function better?
i.e. the absolute ordering or a comparison between 2 values?
 
What?
I'd expect a dyadic sort function to be "sort-by".
And monadic sorts by itself.
 
i meant a monadic or dyadic sort function as input to the sort by
 
Oh, you mean like sort by < where < is a dyadic function.
 
yeah
 
What would sort do with a monadic function?
 
3:36 PM
ik its used in vyxal, a monadic would be any -> int and the sort is determined by the ints
 
So, in APL lingo, this would be a monadic sort operator taking a single monadic/dyadic operand.
Ah, so a mapping.
 
not exactly
 
I'd say dyadic then.
 
i.e. sort by length is mondaic
 
Yes, sorts by the arguments mapped to their lengths.
 
3:38 PM
yeah
 
And if you want the reverse sort (longest first) you'd have to sort by negated length.
But you can always give a dyadic function which preprocesses the arguments before doing some sort of comparison.
 
true
 
In APL, that'd be using the Over operator, so if $ is the sort operat, you could write $(>⍥≢) to sort descending by length.
 
I literally cannot remove my heat sink screws
Is there some sort of trick I don't know about
 
You shouldn't; you'll overheat.
 
3:41 PM
I'm gonna end up stripping the screws
 
That's better than screwing the strippers.
 
Yesss I got it
I just need a properly fitting screwdriver and a lot of force
 
@Seggan ya know what, since i can detect the arity of a function, ill have both in the same operator
 
3:56 PM
Aha!
 
4:11 PM
I can't get the other one and the screws are nearly stripped
fuck
Yesss, my dad managed to unscrew it
 
dads can do anything
 
If this thing boots I'm gonna scream
Alright, everybody cross your fingers
It works!!!
 
5:25 PM
@NoHaxJustRadvylf but Adam said no screwing the strippers!
 
5:36 PM
Desperate times call for desperate measures
 
 
2 hours later…
7:13 PM
I am...so...incredibly...smart
I spent forty minutes trying to figure out why upgrading to cat7 cables broke both of my servers' connections
Turns out no, it was yanking a whole array of drives from the first and sticking it in the second that did that
 
0
A: Sandbox for Proposed Challenges

AnttiPCube calendar numbers Credit: Marco Verch CC BY 2.0 A two-cube calendar, as shown in the picture, uses two cubes with digits painted on the faces to display the date. For dates in the range 1-9, a leading zero is used ("01", "02", ..., "09"). Now, if you do the math, you might come to the conclu...

 
7:34 PM
@Seggan i feel like sort by key is generally more useful in golf than sort by comparison, to the point that if you have a sort-by operator then its overload on dyads should probably pass its second argument to the dyad instead of doing comparisons
definitely have a sort by comparison digraph or some such though
 
eh, i think ill go with having both depending on whether its monadic or dyadic
 
7:48 PM
you probably don't have many useful comparison functions that you can express tersely, so if you do need one it's not a big loss to spend an extra byte or so
but sorting by a key that depends on another input is pretty big
granted you can use grade up for that either way but from the perspective of trying to make things as golfy as possible
 
8:07 PM
@Seggan As a JS user, I can say that dyadic sort is close to useless
I’d force it to be a monad if I were you
 
In java its the only way lol
 
And it sucks
 
9:03 PM
lmao
 
I just had a random bolt of inspiration on how to golf an answer I hadn't even thought of in probably 3 years.
 
Have to put that in the back of my mind for slowest guns in the west at the end of the year.
 
9:23 PM
When the stack snippet has difficulties parsing 1.646 :P
I'm going on a Fig answer rampage rn
 
CMQ: Do you prefer the -rwxr-xr-x style of permissions, or 755?
 
I lightly prefer the former, I can't read either without a guide though.
 
The former. Much easier to read for someone new to Linux
 
I'm more of a fan of the second one
Just easier to parse the second at a glance, don't have to group into into triplets
I'm sure if I looked at the first more often I'd get used to it tho
 
I mean, if you're used to the second then it'd certainly feel more natural and it's nice that it's concise
But it takes me around a minute to decode the numbers
A compromise: 111-101-101
 
9:33 PM
Ooh I like that
Jul 14 at 19:45, by NoHaxJustRadvylf
Okay fine I'll say what it was. 60 MiB/s for read and 20 MiB/s for write
After testing on my new machine, 160 MiB/s and 60 MiB/s
 
9:45 PM
Whew 6 Fig answers in 40 minutes
 
 
1 hour later…
10:54 PM
@Zionmyceliaadamancy This challenge should be given another chance. Although trivial in mainstream languages, it's interesting in certain esoteric languages, or languages that are mainstream but not designed to do arithmetic. — Deadcode 22 mins ago
@Deadcode Sure, it's interesting in esoteric and unfit languages. As are basically all trivial challenges, there's nothing about this that stands out, even by that metric. My biggest problem with the challenge is that fundamentally, it doesn't offer anything new to the site. We have countless challenges which are trivial in most langs, but fun in esoteric ones. This is just combining exponentiation and addition, nothing new.
Not every challenge has to be a new and novel idea, but I'm definitely not going to upvote a challenge that doesn't, and I'm for sure going to downvote those that offer so little as to almost guarantee no interesting answers outside the most extreme languages.
 
@Zionmyceliaadamancy "doesn't offer anything new to the site" - but it was the ONLY question on the entire site I was able to find where I could apply the really cool thing I just discovered about number-of-possible-matches unary regex output.
 
hi, this is ginger
for various reasons I currently can't get into my main account, so I'll be using GB for a while
just a heads up
@NoHaxJustRadvylf 100% the former, do I look like I can translate things into binary?
 
@GingerBot Just a gentle reminder about the ban on bots in TNB. It's fine for you to use it, just not as a bot :)
 
I know, didn't intend to.
just as a temp account until I can get back into my main
speaking of my bots, both of them are offline because we're doing a server upgrade right now!
switching from a pi3 to a pi4
 
11:10 PM
@Deadcode To be completely honest, while that's a cool regex trick, I don't want (or see the need) for a question for every neat trick in various languages. Besides, the question is open and not deleted, there's no real problem. I just expressed my opinion as to why I believe it merits a downvote
@GingerBot Cool, just checking :P
 
no problem0
 
@Zionmyceliaadamancy And your opinion got 13 upvotes. So I was replying to it not just to you personally, but as a proxy to everyone else who upvoted it and presumably downvoted the question.
 
As a tangent: I dislike the stigma behind downvoting. More people should downvote questions and answers they believe are low quality, or that don't provide value to the site, without feeling like they need to justify doing so
@Deadcode Fair enough
 
but downvoting answers takes away your rep, which makes it feel like a big serious action of doom
 
it takes away literally 1 rep each
 
11:15 PM
which is in fact more than zero
this is why I downvote questions but not (usually) answers
 
I likely have more answer downvotes than questions lol
 
@GingerBot same here
 
Tbf, I say people should downvote more, but I only have 54 downvotes (on non-deleted posts)
 
fear not, we're all hypocrites here
 
I thought I had downvotes but those were spam posts lol
So they're yeeted now
 
11:25 PM
 
tqabgs
 
Well, since we're talking about votes, I feel I have to ask this. Why would somebody compliment a post but leave it at 0 votes? I've seen this happen multiple times now. I just want to understand it, and currently it totally befuddles me.
 
[ginger's patented shrugging disapproval face goes here]
 
Most likely forgetfulness, I guess? or maybe they saw it in a review queue and just posted a stock "wow this is good, welcome to the site" comment without upvoting
 
To me, voting something up from 0 to 1 is worth doing just for any post which I know solves the challenge, am sure that it works properly, and seems to have had effort taken towards golfing it efficiently. That's just the minimum. A post that's actually interesting deserves more than just 1, by my system.
 
11:36 PM
Same here, so I'd imagine it's usually a mistake when that happens
 
11:49 PM
@Deadcode ^
 
@NoHaxJustRadvylf I have a hard time believing that.
@Zionmyceliaadamancy Are you aware that in a question with negative votes, answers don't even show up in the site's list of active questions? So I had to bounty my answer for it to even be seen.
And it still doesn't show up on the main list, only the separate bounty list.
 

« first day (4192 days earlier)      last day (655 days later) »