« first day (4637 days earlier)      last day (503 days later) » 

01:00
Sandbox posts last active a week ago: (untitled), Visualise the Euclidean GCD ascii-art
 
3 hours later…
04:08
CMC: given a list of nonnegative, pretty print the list of nonzero indices and their values, with the lists lining up visually, and the zero indices / values place being taken up by .... Example: (1 indexed) [0, 0, 5, 0, 11, 23, 0, 0, 0, 0, 0, 7] => ... 3 ... 5 6 ... 12\n... 5 ... 11 23 ... 7
the exact format is flexible, as long as the lines never desync (each index is aligned with its value)
and yes you may 0 index
04:20
Haskell, 114 bytes:
import Data.List
f=unlines.fmap unwords.transpose.zipWith(\i x->if 0==x then["...","..."]else[show x,show i])[1..]
Outputs a trailing newline but whatever
totally fine
does it handle alignment?
04:22
D:
D:
tbh its definitely a "two challenges in one" type challenge
i suppose the more interesting one being just the alignment one
so thatd be like, "given two lists..."
instead of getting the indices as the other list
Can I left-align?
yea however you wanna align is fine
kind of a fast and loose spec srry i didnt wanna spend that long wording it for a cmc :P
nah the idea is to replace the 0 spots with a ..., see example
definitely aligned tho so good job there
04:38
@thejonymyster exactly 3 dots?
Or is there no upper limit on the number size?
the string ... :P
if youve got a better cmc feel free to post it xd
So there's an upper limit on number size?
Because a 4 digit number is gonna desync the output
oh im sorry i see the confusion
@thejonymyster no, you're thejonymyster
youre right im not sorry
but i am going to clarify :-)
as soon as my. internet stops attacking me
04:41
Haskell, 173 bytes:
import Data.List
x!y=take(max(length(show x))(length(show y)))$show x++repeat ' '
f=unlines.fmap unwords.transpose.zipWith(\i x->if 0==x then["...","..."]else[x!i,i!x])[1..]
are we back? am i connected? :P
@thejonymyster uhh no, still looks like you're thejonymyster
nice
the idea is just that each index is aligned with its associated value
not necessarily that they all have the same exact spacing
thejonymyster rolls sloppiest cmc ever; asked to leave chat
so 1 2 ... 3 4\n1 10 ... 100 1000 is acceptable for example
promise im not making changes as i go this was always my intent ^_^ (innocent)
Wait, I put x!i and i!x swapped.
 
2 hours later…
 
2 hours later…
08:37
0
A: Sandbox for Proposed Challenges

The Empty String PhotographerObfuscated bananas In this challenge, your task is to print the string banana, case insensitive, to STDOUT (or an acceptable alternative) in the most obfuscated way. +1 VTC! No objective winning criterion! Wrong! I now have an objective winning criterion! Let the reporter edit distance of \$a...

Yes, has just been made objective.
Drop the underhanded and make it a code challenge
There is no obfuscation aspect
Also PHP and any language with implicit output will score 0
Also not sure if your edit distance is even computable in polynomial time
08:57
@mousetail is print("banana") or print(chr(98)+chr(97)+chr(110)+chr(97)+chr(110)+chr(97)) more obfuscated?
Although if you’re decent at python they’re both not that obfuscated.
You wantet to minimize the edit distance though right?
Not that it matters, in either case the real goal is edit distance, not obfuscation.
09:14
@mousetail sorry that was a mistake in the post, I wanted to maximise it.
@TheEmptyStringPhotographer The maximum score will be 6 and it will be trivial to get the maximum score
 
1 hour later…
10:20
0
A: Sandbox for Proposed Challenges

mousetailMinimum Escaping open-ended-function Your task is to write 2 functions/programs. They may share code. The first function must, given a string and a character, output a new string that does not contain that character. The second function must, given the string from the previous function and the ex...

 
2 hours later…
11:51
@AlanBagel I'm a tad late (lot late) but happy age++ :p
somehow simultaneously the best and worst way to say happy birthday
age++ or ++age?
age -=- age / age
On your birthday your age has already incremented right? So it should be ++age
depends when you send the message
the ++ might be delayed if it isn't exactly time
11:59
As stated aptly in Steve Oulline's How Not to Program in C++, "If a programmer writes a++++ in a code, they must be jailed."
what about ++a++
That still sucks, but the programmer pays a fine instead.
--a++
That sucks intermediately; the programmer loses their certificate.
Noob programming: a-1. Pro programming: --a++
wonder if the compiler is smart enough to optimize both to the same assembly
12:04
What if a isn't an integer?
@DannyuNDos jokes on them I don't have a certificate
Well, I judged them like this because, in South Korea, disqualification is an intermediate penalty between jail and fine.
@DannyuNDos I keep reading Steve Oulline as Steve Jobs
Confiscation < Detention < Mulct < Fine < Qualification suspension < Disqualification < Jail without labor < Jail with labor < Death penalty, according to Korean criminal laws.
But jail with labor would allow Lyxal to program again which would be unacceptable
 
1 hour later…
13:37
@DannyuNDos What's the difference between "mulct" and "fine"?
14:18
Does anyone know why both my shift keys may have stopped working?
They do still work, but only intermittently. If I let them "rest" for a few hours, they're more likely to work, and after a few minutes of use, they go back to working maybe 1 times out of 30
membrane keyboard?
I've had to remap capslock to shift, and that does work, so I don't know what's up
This is the keyboard built into my laptop (an HP, if it matters)
@Ginger Just googled it, I don't think so (membrane keyboard don't have much tactile feedback, right? My keyboard does have some travel and makes a bit of noise)
can the keys kinda tilt?
Kinda, yeah
it's probably membrane
14:22
Oh
if it's a laptop keyboard then it almost certainly is
in that case, the likely culprit is damage to the weird plastic trace contact pad thingy that the keys sit on top of
Oh my bad I thought membrane keyboards had the kind of buttons you find on washing machines
@Ginger Any idea if that's something I could replace myself?
@user that's awful to imagine lol
please tell me you haven't seen any keyboards like that
@user is this a laptop?
No I haven't, I just thought those existed based off the description on Wikipedia
@Ginger It is, yeah
Warranty ran out only a few months ago :|
F
I doubt you can replace it then
and it could be any number of other problems besides that
14:25
Dangit
I'd advise you take it to a computer repair shop and have someone who knows what they're doing look at it, instead of asking some cat on the internet :p
You're cheaper :P
I also can't see your computer, and therefore my guesses are just that: guesses
Looks like replacement keyboard are pretty cheap on Amazon
that works too, of course
14:27
@Ginger True true
I think my next laptop'll be a Framework, if the company continues going strong
ah, Framework
their stuff looks great but it's so expensive
I could keep the same chassis for like a decade and swap out the CPU once or twice during that time
@Ginger Oh yes, the 16-inch model starts at $1600 even with the most minimal of setups
I've actually been mentally designing a similar laptop that uses a Raspberry Pi Compute Module
it'd run a modified version of ChromiumOS
What'll you house it in?
not sure yet
but since the CM4 has pretty much the entirety of the actual computer part, the motherboard would only need to have a power supply and I/O stuff
14:39
aaaaaaaa even the cheapest configuration that I can tolerate is $1750
 
3 hours later…
17:12
@thejonymyster I would argue that the knight is explicitly jumping, despite the fact that its move isn't orthogonal. In Xiangqi (Chinese chess), the horse has a similar (2,1) move, but it can be blocked if another piece is in the way.
17:27
i'd argue that's a consequence of its (2,1) being defined as a sequence of (1,0) then (1,1), since it can't be blocked on a diagonal
you could define a (1,1)-(1,0) that can only be blocked on a diagonal :P
@UnrelatedString Hm, fair
although i do also feel like there's a certain extent to which knight moves are conceptualized as (2,0)-(0,1), at least in a popular capacity among laymen if not meaningfully to the game itself, in which case that would have to be a jump
18:08
CMC Add 2 numbers in continued fraction form
18:20
I can't edit answers (it says "An error occurred submitting the edit."). Are you able to?
19:08
tbh im not sure why im worrying about the semantics of whether a knight is a jump technically. i should be aiming for the simpler option (face plam)
 
3 hours later…
21:56
7
Q: Random factorized numbers

SimdInput The code should take an integer \$n\$ between 1 and 1000. Output The code should output positive integers with \$n\$ bits. Accompanying each integer should be its full factorization. Each integer should be a uniformly random \$n\$ bit number. Score The score for your code will be the number...

RE: this sandbox's rules... are "literals" a universal programming concept or does that run into avoid making assumptions about language features?
my gut is telling me its a bad idea to include but i dont know if im like, making sense as to why
@thejonymyster imo it's not a clear cut. For programs that act upon their own source code, where do you draw the line between source and literal?
@thejonymyster Probably not universal, I'd guess. At any rate, there are some languages that don't have literals, such as BF.
Also, are pre-defined constants literals?
Some might say they're variables, others might say they're nilads (take 0 args, return 1 value) and some might consider them literals
Also
> Comments that can be accessed by the program are counted as literals
What counts as accessed?
22:19
@RydwolfPrograms Mulct is for a misdemeanor. Fine is for a crime.
@DLosc not having literals isnt an issue, since this is a scoring rule that only is affected by having them :P
@lyxal oh i didnt even see that bit oml. we need to have a default / 'things to avoid' about mentioning comments at all in rules tbh :P
22:32
@thejonymyster What's a Brainfuck Literal?
^^^
to clarify i guess since both of you brought that up; a language not having literals is one thing, i meant more like is it always clear whether something is / isnt a literal
which is something i definitely, absolutely was clear about when i first asked. for sure. dont even check :P
so more what lyxal was getting at
My language parses 10 * 2 as the literal 20, so which is the literal?
23:19
...
why dont you leave that till constant folding?
My implementation of constant folding is not very good.
let me guess it can only fold constants like 111 that consist only of straight lines
It can only fold 7 times before it gets too thick to fold again.
23:39
just use a larger piece of constant paper
somewhere in the range of 1,219m (4000ft) long
then you can get 12 folds
23:54
SMH another space hungry compiler.

« first day (4637 days earlier)      last day (503 days later) »