« first day (2345 days earlier)      last day (1210 days later) » 
00:00 - 17:0017:00 - 00:00

12:08 AM
I'm back, folks!
A: A Quine on Every Line

ckjbgamesApplesoft BASIC, 2 bytes...? (or 11, counting characters) Tested on my Apple II+ computer ( :0 ) 10 LIST:RUN The reason why this is so short is because Applesoft BASIC tokenizes instructions. There needs to be a meta post or something about how to score Applesoft BASIC answers. Also, I think ...

Tell me how to score this answer
@ckjbgames So, it is not a "cheating" quine because it is not reading from a file. I believe the consensus is that a quine may not read its own source code, whether it resides in a file or in memory. I could be wrong though
@musicman523 It is actually a feature lol
@ckjbgames I understand that, I'm saying I don't think it is allowed by quine rules
@musicman523 What I really need to know is how to score it
Count the bytes in the file with that program
12:15 AM
@ckjbgames Based on the consensus for how we score TI-BASIC, I think 2 tokens is a fair score
@musicman523 k
Q: Divide a string

musicman523Challenge Given a string and a number, divide the string into that many equal-sized parts. If the length of the string does not divide evenly into the number provided, you should round down the size of each piece and return a "remainder" string. For example, if the length of the input string is...

@Mego DOS 3.3 calculates file sizes with volumes rather than bytes
So, it's hard to tell
12:28 AM
It is now non-competing
I lost some reps ;-;
@ckjbgames Non-competing doesn't really exist anymore
@StepHen yeah, i thought it was cool, but it is considered invalid
The Wikipedia page for "quine" says a quine is considered cheating if it accepts any input
> "failed to get `usr` cookie from Stack Exchange OpenID, "
chatexchange.browser.LoginError: failed to get `usr` cookie from Stack Exchange OpenID, check credentials provided for accuracy
Anybody know what I did wrong?
@ckjbgames Non-competing is not the same thing as invalid. Non-competing solutions are to be acceptable (but non-competing isn't really a thing anymore). Invalid solutions are not.
What do you mean non-competing isn't really a thing anymore>
12:32 AM
@Mego what should i say then
@ckjbgames Delete the solution
@Mego k
@ckjbgames It's not a valid answer, so find a different challenge for it that allows it, PPCG has stricter versions of "quine" rules than standard because of so many builtins and whatnot
@ZacharyT non-competing meant that the interpreter/interpreter features were added after the challenge post date, but there was a meta post that overruled that
@ZacharyT This meta post implemented the policy that solutions aren't automatically non-competing just for using a language newer than the challenge.
Solutions can still be non-competing for other reasons (e.g. a specific rule on a challenge), but that's much less common
12:36 AM
We're going to have to remove the "non-competing" term from a lot of answer headers...
can anybody confirm this
@Mego Or forget it because of all of the bumps that'll happen
i don't wanna make a fool of myself
@totallyhuman Looks like you're right
@StepHen There might be a way for mods to do it without causing bumps, but I'm not sure. A few bumps wouldn't be a big problem, so it would have to be done slowly if there isn't a magic mod tool for mass-editing.
12:38 AM
why not bumps?
So, Jelly answers everywhere??
wait wrong window
@StepHen k
2 messages moved to Trash
12:40 AM
Hi again
@Mendeleev I got your back :P
@Mego Thanks
I'm trying to set up PXE booting. As far as I can tell, it works
Boots things into Arch Linux
I got my reps back! Yay!
@ckjbgames Yay
@Mendeleev kewl
12:49 AM
;-; now i feel bad 'cause neutrino was trying to get rep for his other account and now it's getting downvotes
A: Sandbox for Proposed Challenges

pudilityWhat feedback do you have for me? Challenge Print out the current time in a 12-hour format. HH:MM AM/PM Examples 12:13 AM 05:15 PM Rules This is code-golf so the shortest solution in bytes wins Standard Loopholes Apply You may use functions as well as programs

this question tripped dennis up too
this makes no sense
1:10 AM
Q: Print the StackExchange favicon

musicman523Challenge Print or return the StackExchange favicon, as provided below: __________________ / \ --------------------- | | --------------------- | | --------------------- \__________ _____/ | / | / |/ T...

1:34 AM
CMC: Regex-golf this: ^[^_]?(_[^_])*_?$ (every other char must be underscore, can start on first char or second char, cannot have two underscore in a row)
Because I'm really not that good at Regex and I'd like to learn
Q: Is this string valid FEN?

Darren HThe challenge Write a program or function which takes a string input as a function parameter or from stdin and determines if it is a valid FEN string. Input You can assume the input will only ever include the following characters (case sensitive) pkqrbnPKQRBN/ The length of the input will alwa...

well this is awkward
i have same byte count and similar answer to another person
@totallyhuman So you got ninjad? :P
kinda sorta
Yeah it's functionally equivalent
His factoring out of r saves 0 bytes, and you used l-r+1 as opposed to his l/r*r
1:47 AM
also nice job on tripping out loads of people lol
I tried my best :P I thought the wording and the test cases were clear but apparently not
@StepHen If the first character is an underscore, must the last character not be an underscore?
@musicman523 _-_
^ is permitted
Your solution isn't so bad
did ais523 delete their account ?
1:55 AM
@ConorO'Brien he was trying to, dunno if it happened yet
it did
it did happen
Why :(
but why ?
he just hated stack exchange
1:55 AM
@StepHen My solution would be ^((_[^_])*_?)$|^(([^_]_)*[^_]?)$ but I think yours is shorter
lemme find relevant message
2 days ago, by ais523
@LuisMendo yes, I'm leaving, editing your profile like that is apparently how you have to confirm ownership of the account
read the few messages after that
I mean I don't disagree
:/ what a loss to our community
@ConorO'Brien Really, it's the community that counts, I personally couldn't let software get in the way of community unless it's really bad (which I guess he thought this was)
@Dennis I think the two examples for Bubblegum on Esolangs are the same code
You think?
2:06 AM
> If the SHA-256 hash of the source code is 5e247c455fde7711206ebaa3ad0793114b77a6d16ed0497eff8e3bf98c6dba23, do the following:
I don't think Dennis found a collision
If I had, I wouldn't have wasted it on an esolang. :P
I get it now
also that esolangs page is contradictory
@ConorO'Brien Oh it is, you're right
@ConorO'Brien overwhelming likely that != is
2:10 AM
Okay how do you use Bubblegum
I'm thoroughly confused
@Dennis any particular reason that there is a # in the addition and prime program for bubblegum? did you really need it to be rectangular?
I wanted it to be rectangular. I wouldn't say I needed it to.
> Coincidentally, these two programs implement exactly the functionality that PPCG consensus has decided qualifies a language as being a real programming language. Therefore, it is definitely a real programming language.
> Coincidentally
@Phoenix Similar to several other Dennis esolangs :P
2:23 AM
Help, Wardoq! comes to mind
@Phoenix Exactly what I was thinking
At least Bubblegum is useful for some things.
@Phoenix You don't believe me? Completely fortuitous, I tell you.
@Dennis How do I use Bubblegum for a challenge?
So if I'm running on Linux, and I have a file containing the plaintext I'd like to print, how can I encode that into Bubblegum?
The easiest way to be to zopfli it, as zopfli has a --deflate switch.
2:32 AM
Okay, I was trying gzip but that didn't seem to work. Thanks!
Zlib won't either. It has to be raw DEFLATE.
I'm sorta making a compiler for an esolang at the moment. sort of, because I'm procrastinating at the moment
Okay, I've put this input into the implementation from Esolangs and it outputted the correct result, but it didn't seem to work on Try it online!
TIO expects a hexdump (xxd-style).
Ah. Is there an automated way to change that over? I don't really know how to do it myself
2:40 AM
xxd <filename>
@Dennis I need to get a Linux before I get too old to be willing to change
Well, what are you waiting for? :P
My college is going to give me a Surface, and I already have a Windows laptop, and I'm trying to save for college :(
@StepHen You can always dual boot or use a virtual machine
2:47 AM
Dual boot the laptop for a while, keep the one you like better (or both).
That's how I started. I started dual booting for a course, then realized after a month or so I was never in the Windows partition.....then when my hard drive crashed I just never reinstalled windows
I'll work on it :P I need to learn how to actually use the command line, but I think it'll be good for me
Depending on the distro, you don't have to use the command line in most cases.
I know, but if I get Linux, it'll be so that I learn how to use and appreciate the command line
Because I don't
Heh, my first computer didn't even have a GUI.
2:53 AM
While I was dualbooting Windows and Linux, I never felt like Linux did anything useful, I already had all my programs on Windows. It was only when I fucked up an Ubuntu installation and accidentally overwrote my Windows partition that I realized how awesome Linux was.
Because overwriting Windows is awesome?
Once I started using Linux I literally only switched partitions when I needed a file from the Windows side.
I used to only see Linux for the things that I couldn't do on Windows, not for all the things it could do better than Windows.
I have no clue why, but my monitor includes a "grayscale" option in the color settings
@musicman523 I use windows to play games.
2:55 AM
It's real weird, my brain keeps trying to recolor what I'm seeing
@Phoenix The only games I play really are Rocket League, Civ V, Speedrunners (all of which are available on Linux) and LoL, which I managed to install through WiNE
Apparantly Super Tux Kart is coming to Steam.
@musicman523 My laptop only runs Linux, because any game that's old and simple enough to actually run on a crappy 10 year old laptop, manages to run in Wine.
My desktop with Windows lets me play newer games like Overwatch, Rainbow Six Siege, etc.
3:29 AM
Q: Blink the CAPS LOCK

zeppelinMost computer keyboards feature a small integrated LED light, indicating the current input mode, as controlled with the CAPS LOCK button. Your task is to blink it: Turn it on; Wait for 0.5 (+/-0.1) seconds; Turn it off again. Video footage of the LED blinking is highly appreciated ! Rule...

4:24 AM
@officialaimm @R.Kap @totallyhuman You can all save 2 bytes on Divide a string by slightly altering your output format: Try it online! (this one happens to be R. Kap's)
You just print the two items rather than putting them in a list or tuple together
4:42 AM
Oh thanks...
I should build a PPCG-like site that has PPCG specific features.
You clearly need more rep.
4:54 AM
1. Buy ppcg.me. 2. Get sued. 3. ??? 4. Definitely not profit.
Is PPCG trademarked?
Also, ppcg.ml exists
If you redirect to PPCG.SE, that's probably fine. Building your own site and also naming it Programming Puzzles & Code Golf is a recipe for disaster.
@Dennis I was going to have PPCG be the full name, and not expand the acronym anywhere.
or just call it "Code Golf"
@KritixiLithos Exists already
Is that good enough? I don't know
4:58 AM
Picking a domain name is the least of your problems.
I know
why would would you want to call it "programming puzzles and code golf" though?
I mean the name is not preferable here, why would it be good there?
@Dennis It's a way to sort of... commit to it, I guess?
@DestructibleLemon I was just looking at domains.
Q: Implementation by description?

Dark0Need to write the implementation of the given function: The function customSort takes a vector "num" of integers as an input along with the vector "weights" which contains the weights of the corresponding integers. We wish to sort this vector "num" from the indices start to end based on the fact...

it's time to go to golf.shinh.com
5:07 AM
I don't like that site :(
@musicman523 I was going to do that, but I was not sure if the output format was okay. Thanks! :)
Are there any sed people in here that can tell me what $!N does? (I can find N in the manual, but I don't know about the $!)
Anyone in here use Ruby on Rails?
@KritixiLithos $! is not the last line.
5:28 AM
Q: Simple graph traversal algorithm AKA Breadth First Search or BFS.

w1n5t0nYou will be given a 10 X 10 matrix, where every element represents a block of the city. The city will have three types of blocks : free block, dead-ends, and target. Free blocks are represented as single digit numbers from 0-9 (repetitions allowed), dead-ends as 'x' and target as 't'. Note t...

@NewMainPosts How does the person that posted this have exactly 2 rep?
Their one single post has no score, and they don't have the rep to perform any actions which could give them that +1
Oh, no, I see, apparantly they did have a second post which got closed with a score of -4
@NewMainPosts Anyway, their second post is also off-topic, due to no objective winning criterion.
6:10 AM
Guys help. I did chmod 700 / accidentally, how do I fix?
Easy, just chmod 777 /
no, seriously
No commands can be found
You don't unless you have backups
wait, seriously?
Can't I just chroot in?
Or boot into init=/bin/bash
was not chmod -R
6:13 AM
[dmitry@e6410server ~]$ ls -ld /
drwx------ 17 dmitry 1003 4096 Jun 11 22:33 /
[dmitry@e6410server ~]$ ls /
bin   dev  home  lib64       mnt  proc  run   srv  tmp  var
boot  etc  lib   lost+found  opt  root  sbin  sys  usr
[dmitry@e6410server ~]$ sudo chown root /
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
[dmitry@e6410server ~]$ su -c 'chown root:root /'
[dmitry@e6410server ~]$ su -c 'chmod 755 /'
Boot from a live OS?
The computer has no functioning USB ports
What's the fundamental issue? Is it the permissions themselves, or the lack of access to some useful tools which happen to by blocked by the permissions?
I have no idea.
The code above shows what happened.
Any possible helpful utility is located in / (obviously)
And there's no access to anything in /
6:15 AM
I didn't know you needed read permissions to / to read /usr/bin.
@Mendeleev have you become goat?
@KritixiLithos Wut
Downgoat is famous for doing things like rm -rf ~
Then no
If I had console access, I could log in as root O_o
I can't edit the ssh config because things
Just ~? That's small time borking.
6:16 AM
I can echo things into files though...
ugh nm
So I can't log in as root, I get access denied
Brb hooking up a console
What happens if you reboot?
So I have the "server" here (it's a repurposed Dell laptop)
Fixed it by chmod 755 /
@HyperNeutrino I am afraid you need to have import re as well, in this answer.
7:33 AM
Anybody here nose C ?
*knows. Damn speech to text.
8:25 AM
@AlexKChen I kinda do, but it's probably too late
My foot was bleeding and I only noticed because my toes felt sticky
Do you have any pain receptors?
My foot hurts at the moment, but that was because when I washed it the water was cold.
it was like a tiny little cut
you failed
8:36 AM
you cant win that game
9:08 AM
@betseg Are you here now ?
Well really ?
Come at the C room.
9:20 AM

 The C Programming Language

General discussion about the C programming language, usage, sy...
Q: Transposes and Diagonals

Martin EnderFor this challenge, you should write a program or function which outputs the diagonals of a given square matrix. However, if you transpose the rows and columns of your solution's source code, it should instead become a program or function which returns the matrix's antidiagonals. Read on for spec...

10:21 AM
CMC (inspired by ^): given the diagonals of a square matrix, return the original square matrix
2 6
1 5 9
4 8
gives this output:
1 2 3
4 5 6
7 8 9
10:49 AM
If that's too hard/long, here's another simpler CMC: given a positive integer n, return an n by n matrix filled with zeroes except for borders which are filled with 1s.
4 gives
1 1 1 1
1 0 0 1
1 0 0 1
1 1 1 1
you can return arrays of arrays instead if matrices are not supported in your language
@KritixiLithos Jelly, 8 bytes: LHḞ⁸ṙŒḌZ
Dyalog APL, 18 bytes, {(⍵∘∊∘⊢∨1∊⊢)¨⍳⍵ ⍵} for the second challenge
@EriktheOutgolfer that's really short
@KritixiLithos it still works ¯\_(ツ)_/¯
and it's actually really long
what does the footer do?
convert your input format to list of lists and vice versa
10:56 AM
Why does L by itself in the code section give 1\n2\n3\n4\n5 as output?
because that's how works
well, the K€ actually makes a range
@KritixiLithos this fixes the issue
basically, LHḞ⁸ṙ is just unformatting, and ŒḌ is dediagonalizing and finally Z is zip
interesting, I did not expect the "dediagonalise" builtin
yeah it's pretty tedious to make it work
11:19 AM
@KritixiLithos Jelly, 14 bytes: 0ẋẋ€⁸=`0,1¦Z$⁺
@betseg ok that's...
11:37 AM
@DestructibleLemon please don't overexaggerate
Fun fact: I once wrote a small program to scan the Reddit new-comment feed for comments containing a few U.S.-politically-related keywords.
Turns out, people post comments about it there about every 4 seconds or so.
@LegionMammal978 so, about once every time 4 people are born is it?
@DestructibleLemon You mean 16?
(4 people/s) * (4 s) = 16 people
I thought it was 1 person/s
11:47 AM
One sec, Ima see if I can generate a plot over time
is that the deathrate then? though that is a less pleasant comparison
@DestructibleLemon Death rate is a bit less than 2 people/s iirc
11:49 AM
I'm not sure why I thought this
or maybe I could say I jumped universe or some conspiracy theory like that
A false memory is the psychological phenomenon wherein a person recalls something that did not happen. False memory is often considered in legal cases regarding childhood sexual abuse. This phenomenon was initially investigated by psychological pioneers Pierre Janet and Sigmund Freud. Freud wrote The Aetiology of Hysteria, where he discussed repressed memories of childhood sexual trauma in their relation to hysteria. Elizabeth Loftus has, since her debuting research project in 1974, been a lead researcher in memory recovery and false memories. False memory syndrome recognizes false memory as a...
@DestructibleLemon something something Mandela effect
I know. I linked the mandela effect section
in fact I was redirected by searching that
Posting this soon, any input?
A: Sandbox for Proposed Challenges

Step HenEvery Nth Char in Source Outputs N code-challenge source-layout Heavily inspired by Hello, World! (Every other character) Write a program that outputs 1. When the first, third, fifth, etc. chars are removed, it outputs 2. When all chars where their (1-based) index in the source, mod N, are not...

I wrote a spec for an esolang but I'm too lazy to implement
in my defense, the implementation would be in another esolang
12:08 PM
Q: Every Nth Char in Source Outputs N

Step HenHeavily inspired by Hello, World! (Every other character) Write a program that outputs 1. When the first, third, fifth, etc. chars are removed, it outputs 2. When all chars where their (1-based) index in the source, mod N, are not 0, are removed, it should output N. This is code-challenge. The ...

12:20 PM
A: Sandbox for Proposed Challenges

Qwerp-DerpHelp! My code has exploded! code-challenge Insert backstory here Task: Your task is to create a program, which must follow these rules: It must be able to be split exactly into pieces of the same length in bytes. Once you have separated your program into pieces, your program must print 1 if ...

12:55 PM
A: Sandbox for Proposed Challenges

Qwerp-DerpMutation-hardening quine code-golf Your task is to make a program that prints out its own output. "Hey, we already have this challenge, and tons of variations of it! Why are you making another one?" you may ask, but this one is going to be one of the most difficult ones. Your quine must be "mu...

Dang it, just lost the game
(Evil plan forming...)
1:59 PM
Wait what why didn't my dupe hammer work
what is the question you tried to hammer?
The source layout one
@NewMainPosts this one
well, try again...btw it already has 4 close votes
maybe it was some kind of random error...
@Downgoat Probably because it isn't code-colf and that's where you have your hammer
may be true too
2:06 PM
Oh yeah that's it
2:44 PM
How useful is the hammer really
I don't see the point
you're essentially trusted and you can dupe-hammer faster (?)
But like shouldn't it be the community's opinion
The "community" has decided they trust your judgement
/shrug I still think it's weird
I'm not a fan of it either
I don't think it makes sense for our site
2:57 PM
finite field coding question
How do you do arithmetic in the finite field F_{2^k} ?
do you represent each element as a polynomial of degree k and then do arithmetic modulo some other polynomial of degree k?
Q: Staircase numbers

Einkorn EnchanterA staircase number is a positive integer x such that its nth digit (one indexed starting with the least significant digit) is equal to x % (n + 1). Thats a bit of a mouthful so lets look at an example. Take 7211311, if we take the modular residues of 7211311 on the range 2-8 we get the followin...

What does F_{2^k} mean? I don't recognize the 2^k bit of the notation
it is the finite field with 2 to the power k elements
I think the answer is all in here en.wikipedia.org/wiki/…
I think those are just binary numbers with k digits.
@EriktheOutgolfer try to do it in brachylog
3:04 PM
Wait no they are not
@LeakyNun well, that was what I was doing...after Jelly ofc ;)
@EriktheOutgolfer oh nice
@Lembik I think they're just polynomials of degree k in P[Z_2]
@LeakyNun I have an issue...come to brachylog room to see what I mean
3:23 PM
@EinkornEnchanter you have to do all arithmetic module some irreducible polynomial right?
I don't think so
yay my language name breaks the userscript leaderboard
@totallyhuman What is it?
^ yup
4:31 PM
Hi @Lembik
hi @Mr.Xcoder
@EinkornEnchanter If it isn't modulo a poly then the degree will just keep on increasing
Someone asked a Q on M.SE about MATLAB/Otave :)
@LegionMammal978 ?
Anyone know how this German name would be typed out?
4:42 PM
I think it's actually supposed to be "Ernst" or something, but I'm not sure
@totallyhuman The language seems cool :). Waiting for the docs :)
thanks :D
there'll be docs soon, once i figure out conditionals ><
@totallyhuman But the lower or equals, for example is pretty useless, because is actually 3 bytes. Will you make a codepage for it?
@totallyhuman is your code properly split into multiple files?
4:49 PM
@LegionMammal978 It might actually be Craft or Kraft.
@Mr.Xcoder Actually, that's probably a long S before the T.
@Okx no..? ;-; is that bad
@LegionMammal978 Don't think so.
4:50 PM
@Mr.Xcoder Fixed
@HyperNeutrino Nice. Will you get the bounty for poorly written code?
@Mr.Xcoder Then again, this is written in a Fraktur script
I don't know. Hopefully? Depends on if there's a shorter answer. I outgolfed Mathematica but I haven't looked at the other ones yet.
@totallyhuman otherwise your file will start going into thousands of lines
and be harder to maintain
4:52 PM
@Okx 2.5k lines actually
@Mr.Xcoder Yours is the only one shorter than mine and it's not poorly written :P
@HyperNeutrino Super :). Though I doubt the bounty will be very big / high
:) yeah
ok i'll see how i can organize it
4:53 PM
I mean upvotes are fine too; I practically get a +50 bounty from the 5 upvotes :P
@HyperNeutrino I got a +500 bounty then
BUT REPCAP exists!
Repcap is pointless here on PPCG. We should either make it apply for 400/500 or discard it completely
Q: Output a primitive element for each field size

LembikA primitive element of a finite field is a generator of the multiplicative group of the field. In other words, alpha in F(q) is called a primitive element if it is a primitive q−1th root of unity in F(q). This means that all the non-zero elements of F(q) can be written as alpha^i for some (posit...

4:55 PM
I agree. It doesn't make much sense on PPCG; then again, in my opinion, it doesn't make too much sense anywhere. Maybe they should make repcap scale somewhat based on your current rep.
@HyperNeutrino Exactly!
I haven't posted anything today and got 150 rep... It is surprisingly easy here on PPCG.
143 precisely
So +15/-1
@HyperNeutrino Because of this:
A: Build a Faulty XKCD Browser

Mr. XcoderPython 3 + xkcd, 72 55 bytes xkcd is a third-party Python package: lambda n:[xkcd.getComic(n).altText][n==859] import xkcd For 404, it fails with: urllib2.HTTPError: HTTP Error 404: Not Found And for 859, it fails with: IndexError: list index out of range

4:57 PM
wow :P
14 ups / 1 down on that ^^ and +5 for an older question of mine
Oh okay.
@Lembik I don't understand your new challenge at all.
00:00 - 17:0017:00 - 00:00

« first day (2345 days earlier)      last day (1210 days later) »