« first day (2314 days earlier)      last day (2538 days later) » 

11:02 AM
Quick idea for a challenge I had last: Given input of an image, the coordinates of 2 pixels and an integer, determine if the Euclidean distance between the RGB values of both pixels is less than or equal to the integer. Reckon it's worth fleshing out for the Sandbox?
 
@ASCII-only wtf
 
@orlp Hi.. what is that about?
@orlp is that in relation to something I said?
 
11:30 AM
@Lembik your question on math.se
 
@orlp oh I see.. thanks
@orlp math.stackexchange.com/questions/2302429/… would make a nice coding challenge too I think
 
@Lembik what is it with you and binary matrices/tuples/vectors :D
(with the occasional -1)
 
@orlp you have just listed everything inside a computer :)
I like simple looking counting problems which almost always turn out to be hard
 
0
A: Sandbox for Proposed Challenges

Qwerp-DerpDodge your death! Introduction "Muhuhuhahahah!" The mad scientist laughs. "You're trapped in my own little game!" In front of you is a deadly pit of snakes, while behind you is a bottomless chasm. There's no way out, you're stuck! "Two steps in front of you is the snake pit, and two steps beh...

 
my main problem is that I don't want to run everyone's code to time it
and I haven't worked out another way to phrase these challenges that is acceptable to the ppcg community
any ideas always gratefully received
 
11:35 AM
@Lembik TIO :P
 
what is that?
 
imo TIO can't be trusted
 
@EriktheOutgolfer Why
@Lembik tio.run
 
@ASCII-only you can't use tio.run for benchmarks
 
I sometimes am allowed to get away with just asking for the highest value the answerer achieves
 
11:36 AM
or it's at least not ethical to do so
 
but sometimes people get upset about that option
 
@ASCII-only what if there are multiple requests to the server at the same time? wouldn't that slow down the process?
 
if you would let me just use that option I could be set free :)
 
e.g. me, Peter and Lembik click run at the same time
 
again, don't use tio.run for speed benchmarks
it's not ethical
 
11:38 AM
hmm... we need a fixed speed virtual machine people can download!
does such a thing exist?
 
@Lembik the GOLF cpu :)
 
that sounds bad :)
 
the reason it failed is because no one wants to code in my custom assembly language :D
 
@orlp losers :)
 
that kind of takes away the fun of making ridiculously optimized language implementations though
 
11:40 AM
it seems plausible to use a fully virtualized VM to do this. That is one that emulates to CPU
qemu.org should be usable, right?
 
@orlp because it's a pain to code in asm
just make a llvm backend :P
 
ok so now we just need someone to make a qemu setup that fixes the total cpu resources used
unless I am being crazy.. thoughts?
it has the advantage that people can use any language they like
 
@Dennis thank you for writing TIO whenever I feel like hacking some random idea in a crazy esolang tio steps in :D
 
without recompilation
 
I use TIO for prototyping php at work
 
11:44 AM
@Lembik without recompilation?
 
@ASCII-only right.. you just run it in a qemu virtual machine
 
1
Q: Number of different counts of $1$s in sliding windows

LembikConsider a tuple $A = (a_1, \dots, a_{2n-1})$ where $a_i \in \{0,1\}$. For each sub-tuple of length $n$ in order from left to right, that is $(a_i, \dots, a_{i+n-1})$ for all $i$, we count the number of $1$s and output the result as a "counting tuple". For example if $n = 3$ and $A= (1,0,1,1,...

 
@orlp go on...
@ASCII-only well a special one that exactly limits the CPU resources for that process
 
@Lembik f(n) = 3^(n-2)*(n+5)
 
@orlp really?
how on earth did you get that?
 
11:46 AM
magic :)
 
you wrote some code to get a few values and fitted a function?
or looked it up in OEIS?
 
the latter
I have no clue if it's correct
it fits the first 10 values
 
try 12 :)
which sequence?
and thanks!
 
@Lembik why limit cpu resources
 
according to OEIS it's likely related to Unbranched catacondensed polygonal systems containing hexagons and tetragons
 
11:48 AM
@ASCII-only we want to make it fair no matter which computer the code is run on
@orlp that's 6 numbers.. please do make some more! This is intriguing
 
@Lembik can't you do it on a normal one by restricting ram
 
@ASCII-only but the CPU speed with be different
 
@Lembik well just count instructions?
 
@ASCII-only how would you do that for arbitrary code?
and which instructions?
 
@Lembik qemu + -icount=n or whatever
@Lembik all
 
11:50 AM
@Lembik no, I further verified
2, 7, 24, 81, 270, 891, 2916, 9477, 30618, 98415, 314928
 
@orlp wow! :) Can you post an answer/comment to my question?
I would like to include this fact in the question
if you don't mind
 
please be patient for a bit :)
still working on it
 
of course!
I am still amazed :)
 
next number fits as well
 
it's too weird! :)
@orlp hrcak.srce.hr/file/261118 has a section called "stupid sheep counting" :)
 
12:25 PM
I took a exam and managed to take the wrong exam, yet I took the exam in the exam folder.
 
12:35 PM
Guitar notes are 3d, you have a finger, fret, string. Kinda cool
 
except the finger is only relevant in context
a single guitar note on it's own can be played on any finger and the result will be the same
plus guitar picks are a thing
 
@Mayube you don't use picks on your left hand
 
12:51 PM
@ASCII-only oh right yeah the finger you hold the fret with...
still irrelevant to the single note out of context
 
@Mayube i know, just saying guitar picks aren't relevant here
 
No but the finger does matter.
That is like saying you can use tabs and spaces in python as long as it is not on the same note
People who do that are no longer with us. RIP
 
uses semicolons in python
 
@Mayube DDDDDD:
@Mayube This is only acceptable in golfing
 
@ASCII-only don't care, my code, I do what I want
 
1:06 PM
Which Trump news is bigger: covfefe or America pulling out of Paris Climate Agreement
 
well covfefe already has multiple urban dictionary entries
 
@ASCII-only it depends how you want to run the competition. If you want to say "Find the biggest value in less than one minute" you need to standardise the platform that code will run on
@ASCII-only does that make sense?
@Mayube :)
@betseg have they actually pulled out now??
 
@Lembik the annoying part of the conjectured formula is that it's a power of three..
why?
 
@betseg ugh
@orlp yes! It's a total mystery to me
@orlp which is why it's amazing that you found this formula
I assume the right thing to do is to try to prove it by induction
 
1:24 PM
@Lembik well... obviously there are 3(n+6)/(n+5) times as many unique counting tuples in n+1 compared to n, right?
haha
 
:)
proof completed!
if only Peter Taylor hadn't retired.. he might enjoy this too
even 3^{-1}(1+5) is slightly mysterious :)
@orlp I have another mysterious counting problem to solve if you are in the mood :)
 
Anonymous
1:44 PM
Of course there's already a challenge about covfefe.
 
blame Lemon
 
This challenge is actually the thing that made me learn about covfefe
 
Anonymous
If it turns out that the covfefe thing was because of a stroke or something, that challenge is going to be in very very poor taste.
 
@Mego if Trump has a stroke we have other things to worry about!
 
Anonymous
1:48 PM
@Fatalize is this the real life
 
@Fatalize It's bothering too much why he put a space before the question mark
 
Anonymous
@Downgoat You really don't have room to talk about someone's grammar/typing/spelling mistakes :P
 
who is kathy griffin?
 
@Downgoat Well it didn't bother me, obviously :p
 
@Mego at least my mistake is typo, not jkaslef :|
 
1:51 PM
at least your mistake didn't involve climate change!
 
How can it involve climate change if climate change does not exist? Checkmate!
 
:)
 
This challenge assumes I'm rich enough to have a garage. Hah!
 
what I find weird about the US position is that technologies for reducing climate change seem like the sort of the thing the US could lead in for years to come
making squillions for the US economy
 
@Lembik Problem: secretary of state also happens to be CEO of one of largest oil & gas companies
 
1:54 PM
ah yes
 
They said global warming, they saw they can't fool us with warming, so they said climate change
 
No covfefe question on Politics.SE
Seems like PPCG really is at the forefront of everything
…who flagged Downgoat's "challenge"?
 
4 people apparently
 
Anonymous
A reminder for people who may have forgotten: telling someone to kill themselves is never funny.
13
 
is it flagworthy though?
 
2:02 PM
Some people argue about using Javascript here yet we don't flag those…
 
@Fatalize :)
 
Anonymous
@Fatalize If you really can't tell the difference between the two, then you probably need to reevaluate some things
 
Honestly, anything about that kind of topic is outright out of place. You're in a public chatroom, y'know
 
ok elementary school math question
 
@Mego I mean it's a joke but… anyway
 
2:04 PM
why is this true? gcd(a,b) = xa + by for some integer x and y
I got confused :)
 
Anonymous
@Lembik Are you sure that's not supposed to be LCM?
 
To be fair, rejecting pollution will only cause many many more people getting horrible diseases (which generally lead to death) ¯\_(ツ)_/¯
 
@Lembik That's Bézout's identity
 
@Mego I don't think so.. is it not true?
@Fatalize aha!
 
I think it might be true but it requires either X or Y to be negative
 
2:06 PM
thanks
@CensoredUsername right.. that's ok
 
(Finally my knowledge of this theorem was useful, 7 years later)
 
ppcg chat room knows all :)
it was!
 
yup
due to what a gcd is you can first write "a = gcd * e and b = gcd * f"
 
maybe not quite elementary school :)
 
substituting: gcd = (gcd * e) * a + (gcd * f) * b
err
 
2:08 PM
thanks
 
gcd = (gcd * e) * x + (gcd * f) * y
1 = e *x + f * y
 
Bézout's theorem is a special case of this, which says that a and b are coprimes if and only if there is at least one solution to ax + by = 1
 
Anonymous
Oh I never even considered negative values for X and Y. That makes a lot more sense.
 
if both are positive it's impossible
just see 1 = e * x + f * y, where e and f are positive primes
 
0
A: Sandbox for Proposed Challenges

Comrade SparklePonyReversable Exponents! There are some pairs of numbers that result in the same number when put to the power for each other. For example, 42 is equal to 24. Your task is to take two numbers as input in any convenient format, and tell if they are reversible exponents! Rules: Your program should ...

 
2:10 PM
and you can trivially see that that equation holds for all primes
as long as x xor y is negative
pretty easy proof actually
 
@Mego if it's towards a goat and has curry in the same sentence then it is
 
i... don't get it
 
anyone interested in tricky counting problems and the OEIS just let me know :)
 
> :
where's your mouth?
 
@Mego yes sorry I should have made that clearer
@totallyhuman found it
 
2:22 PM
where's your nose
 
GOT YOUR NOSE! XD
 
@Voldemort
 
question: in golang, you can import modules from stuff like github online, should those count to the byte count?
 
Anonymous
@totallyhuman We don't require that third-party modules are counted towards the byte count. Just that they're noted in the header.
 
0
A: Sandbox for Proposed Challenges

LLlAMnYPClosely related to Words from periodic table of elements (but that one is closed due to unclear specification?). Closely related to Find the Chemistry of a name (probably a dupe, slightly different requirements though). Closely related to [Br]eaking Code Golf [Ba]d (allows strings to be not exp...

 
2:30 PM
question: is tryitonline.net down for anybody else?
 
Anonymous
For example, you don't have to count the several megabytes of source code if you want to use numpy in Python
 
Anonymous
@totallyhuman Negative
 
@totallyhuman It's tio.run know so AFAIK dennis has 'deprecated' tryitonline.net
 
Anonymous
@Downgoat Nope
 
Anonymous
2:37 PM
tryitonline.net is a landing page
 
question (i'm very inquisitive today): is this showing the same output every time? output cache is disabled too
 
Anonymous
Looks like it. Do you need to seed the PRNG?
 
hmm maybe
 
4
Q: Print the missing characters

MayubeSimple challenge inspired by the popularity of my previous print invisible text and print real invisible text challenges, and the same length different string challenge. Given a string consisting of only printable characters (0x20 to 0x7E), print every printable character not present in the stri...

 
searches
yup
seems like i'll have to seed the time
i... really thought i could be close to python's byte count...
 
2:52 PM
 
not 41 bytes
 
Micro SD in SD to USB2 in USB2 to USBC
 
Question: what is the format of a SE url to open an answer with an answer ID?
https://site.stackexchange.com/posts/<id> doesn't work :(
 
Anonymous
@Downgoat https://<site>.stackexchange.com/a/<id>
 
2:53 PM
@TuxCopter that's USB-C not USB3
 
@Mego thanks
 
USB3 is backward compatible with USB2
 
look at this, why does go have to be go
 
Anonymous
oh my, nobody actually cares about serial voting on comments because it doesn't award rep and comments are ephemeral
 
3:02 PM
oh my, i wonder what we're all referring to that we keep omitting
 
I mean it's a rare occurrence though
 
oh my
 
randomness is hard
 
@totallyhuman Considering that it's algorithmically impossible to implement... yes
 
3:29 PM
@Ephphatha Good catch. I'll fix that asap.
 
0
Q: Prime of my Life

quintopiaPrime of My Life This year my age is a prime number, and so is this year. This conjunction will repeat in 10 years and again in 12. If I live to 100, I will lived exactly 11 years in which my age and the year are both prime. My condolences to those of you born in odd-numbered years, who will exp...

 
@Lembik sure, but you said proof completed?
 
Hmm
Currently dealing with a bit of a math/programming issue
If anyone wants to try and help
 
3:44 PM
Depends on the issue
 
So you see, I have a multigraph, right?
(a set of vertices connected by zero or more edges)
 
Ok
 
And of course, someone can create an isomorphic multigraph by renaming the vertices.
 
@orlp it was a joke :)
@orlp ok.. so new problem....are you sitting comfortably?
 
@LegionMammal978 With you so far
 
3:51 PM
1
Q: Write a pluralization function for Russian

Peter OlsonIn English, nouns can take on two different forms depending on whether they are singular (one) or plural (anything else). For example, we would say "1 dog" but "2 dogs", "0 dogs", "57 dogs" and so forth. In Russian, there are three categories. Instead of "1 dog, 2 dogs, 5 dogs", in Russian it wo...

 
So my problem is, how can I create a unique identifier for one of these multigraphs, such that all of its isomorphic graphs will have the same identifier?
Now, I could do this using a method involving enumerating all isomorphic graphs.
However, this takes V! time, where V is the number of vertices.
 
Anonymous
@LegionMammal978 If you could somehow consistently and unambiguously order the vertices, you could use the connectivity matrix to create an identifier
 
@Mego Yes, that's what I was thinking
The problem is ordering them
The actual solution I thought up was generating all isomorphic matrices, running a reversible function on them, and selecting the one with the lowest output.
As I said, though, this takes V! time.
 
@LegionMammal978 I fear you want an efficient algorithm for graph isomorphism
 
@Lembik I'm not asking for a polynomial-time solution, just one in less than hyperexponential time
 
3:58 PM
you can determine if two graphs are isomorphic quickly in practice using "nauty"
will that help?
 
Not really...
 
oh well :)
 
The problem is, I'm trying to establish a "canonical" vertex ordering
 
understood
for fixed sized graphs?
it's definitely hard.. you ask on a more CS oriented SE?
 
Can anyone help me figure out what this error message means (and how to fix)?
ERROR:  Error installing rails:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.7.2/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20170531-14486-1azr8kd.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1
Google just told me to update gem, which I did and it didn't help.
 
4:01 PM
Is there a development package for Ruby?
 
IDK
 
Anonymous
sudo apt-get install ruby-dev
 
For example, with C's libc you have to install libc-dev to get the header files
Most distros only come with plain libc
@Mego Exactly
 
@orlp have you gone?
 
TY
 
4:04 PM
Anyone care to try to learn an esoteric programming language I just made? Really simple but idk if my README is good enough for anyone to understand
 
I can try...
 
It only uses decimals and the letter D
I've got one answer in it
 
@NewMainPosts CMC: Write a non-regex-based solution for that challenge.
@Mego Thanks that made it work
 
@MDXF shouldn't the first example just be 1103D? What does the 2nd 0 do?
 
Anonymous
@Phoenix Glad I could help
 
4:09 PM
@Mayube In Decimal, each value pushed must be a three-digit integer.
 
ah okay
 
It's mainly for working with CHARs and STRINGs
 
in that case where is it setting the DSI to the value?
11 is push int to stack, then 003D is the value
there's no 0 to say "set the DSI to this`
 
@Mayube It automatically sets the DSI to the index of the value pushed
For example, say the stack looks like this:
{INT,045} {CHAR,090} {INT,003}
 
@MDXF well that's not documented in the documentation for the 1 command
 
4:10 PM
Rubymine is telling me it can't find Rails even though it just confirmed it exists ;-;
 
pushing 003 makes the stack look like {INT,045} {CHAR,090} {INT,003} {INT, 003} and sets the DSI to 3 (in index notation)
@Mayube All right, will fix
 
I think we should rename the sandbox "two-on-one challenge criticism forum with Peter Taylor and ais523". You can't really get anyone to read anything there...
2
 
Anonymous
@quintopia I see feersum comment there a lot
 
hmm. yeah i think i've seen them too
 
@MDXF Also I'm a little disappointed that hello world in 09D is simply Hello, World!
y'know, because Any other characters in the source code are simply printed.
 
4:14 PM
@Mayube What would you rather it be?
 
0 bytes
 
/shrug
 
@Mayube Ah. Well, the example doesn't use that
Tbh I put that in there as a placeholder
The actual Hello, World is 13072069076076079044032087079082076068033010D 301
 
to be fair in Braingolf it's "Hello, World!"&@
but in 2Col it's HW
 
@Mayube Fixed
 
4:18 PM
@MDXF how do the mathematical conditionals work?
 
Oh gosh, GitHub's CSS screws up that code block in ## Types
@Mayube What do you mean?
 
for example what would the stack look like after this: 11050D 11050D 412D
will it pop the 2 50s and push a 1 for true?
 
It would pop the {INT,050} and the {INT,050}, then PUSH 001
@Mayube yep
 
right, and is 000 false?
 
Yep
 
4:20 PM
document it
 
All right
 
@MDXF also what happens if you run 311D and there's no input to read?
 
It waits for input
And 311 requires no D
 
What if EOF
 
^ How does one read all available input?
 
4:24 PM
@Phoenix It reads that too
It doesn't have any control-flow yet
As stated in the description, not yet TC
 
How does it read EOF
 
@Phoenix As -1
 
@Mego huh?
 
might be worth having a 5 command that executes the next command if the last item on the stack is >0
 
did it get deleted or something?
 
4:26 PM
@Mayube I'm adding a 5 command that uses a value (ending in D) to do a whole lot of conditional stuff
I think
Still working on the logistics
 
Oh also how would one push a negative value?
 
@Mayube Haven't actually tried it tbh
 
eg to push -1 would I have to do 11001D 11002D 42D?
 
@Mayube That would work, but I think the interpreter might do some magic to allow negative values
 
0
Q: The secret of upvotes

TheLethalCoderOkay, I admit the title is a bit cryptic but I couldn't come up with something better. As some of you may have noticed I have started spending a lot more time on code golf answering questions/challenges. I usually prefer to answer in C#, though I have started with a couple of other languages, as...

 
4:30 PM
> informing me that others liked my solution as well
 
@Mayube see image
 
1) repcap 2) sure it isn't the rep you like?
 
Hm that's a bug, it should be printing -1 but it's printing -01
Will fix after fixing the README
@Mayube Updated README and pushed
 
@totallyhuman O_O you passed me in rep already
Good job
 
I only need 156 more upvotes to get the silver badge :P
@all I know this isn't ready to post. How can I improve it?
 
4:51 PM
are there any node people online that can help me out with something?
 
ew, Node
 
@BusinessCat Same
mainstream and user-created languages FTW
 
@BusinessCat ಠ_ಠ but seriously, I am having a problem with http.get and functions returning stuff and async tasks
I found an SO question that does something very close... but not it
 
Post it on SO in like 15m if no one here has helped
 
I managed to repress the memories of using Node in school so I can't really help
 
4:54 PM
@WheatWizard isn't this ?
 
What school did you go to that made you learn Node? Let me know so I can be sure to avoid it at all costs
5
 
Anonymous
@MDXF They're still waiting on the diplomaEvent to fire
4
 
It was just one class, and it wouldn't have been so bad if the prof actually taught us anything
 
every programming class I ever took in high school
 
Or if the Node docs weren't thoroughly useless
 
4:57 PM
Yep
And then C has the opposite problem. A couple-hundred-page manual documenting every feature as thoroughly as possible, to the point where nobody will ever use half of the info
 
hmm... all the people who I know know node aren't online now
 
(the C standard, I'm talking about)
 
I think Downgoat is the go-to for Node
 
@Downgoat someone here needs Node help
 
@Christopher oh o0 thanks!
 

« first day (2314 days earlier)      last day (2538 days later) »