« first day (3158 days earlier)      last day (531 days later) » 

12:50 AM
JavaScript: The only billion-dollar programming language that is not next-generation... At all.
Haskell: A next generation non-strict programming language
Mathematica: a glorified graphing calculator
it's basically a TI-84 with 3 billion buttons
And one of those buttons is: Is this a picture of a goat?
some of Haskell's extensions are the literal cutting edge of programming language research
@DJMcMayhem Another button is "Where am I?"
and yet another is "Insert Cheesecake"
C++: A modern programming language scarred deeply by its past
it did pioneer a lot of what we think of today as normal programming languages
@dzaima code golf programs should terminate quickly; you would just terminate if it doesn't terminate before the original program terminates
1:33 AM
@DJMcMayhem Apple recently released an update to AVFoundation that allows developers to detect if there is a cat or a dog in the frame when taking a picture. They're so behind the times lol
7:34 AM
Q: I reverse the source code, you reverse the input!

Night2Yet another blatant rip-off of a rip-off of a rip-off. Go upvote those! Your task, if you wish to accept it, is to write a program/function that outputs/returns its string input/argument. The tricky part is that if I reverse your source code, the output must be reversed too. For simplicity, you...

1 hour later…
8:51 AM
@NewMainPosts Should I make an I transpose the source code, you transpose the input?
9:12 AM
Hi there
@Adám That would be a good challenge
9:25 AM
@NewMainPosts At last, a version that Charcoal really likes!
2 hours later…
11:22 AM
does making a submission per 3 minutes for a single challenge with five already count as spamming
They are all valid
but I just want to be sure
12:14 PM
Q: I transpose the source code, you transpose the input!

AdámRip-off of a rip-off of a rip-off of a rip-off. Go upvote those! Your task, if you wish to accept it, is to write a program/function that outputs/returns its input/argument¹. The tricky part is that if I transpose your source code², the output/result must be transposed too. You may choose whic...

12:57 PM
@KrzysztofSzewczyk I don't think so, especially not if you explain your answers.
@KrzysztofSzewczyk I think we actually had another user do that kind of thing a while ago. I didn't like it because that user was not giving other site users much chance to participate by locking down many popular languages.
1:55 PM
A: Sandbox for Proposed Challenges

NieDzejkobTuring-complete regex subset cops-and-robbers regex code-golf restricted-source It's widely known that a programming language is one iff it's capable of addition of natural numbers and primality testing. In practice, this criterion has a high accuracy for distinguishing Turing-complete language...

@Adám the challenge is so simple, there is no explaining to be done in my opinion
but I've left explaination for Malbolge
1 hour later…
2:58 PM
@Adám I delete the source code, you delete the input
@flawr hehe, but more fun would be source code that could be rotated, transposed, and/or mirrored and did the same to the input.
would be fun to not only apply it to text, but maybe to a picture?
@Adám I shuffle the source code, you shuffle the input?
@flawr This is evil
@flawr I thought of that one, but what exactly would get shuffled?
I guess golfing languages would have an advantage:)
@Adám just permute the input string?
3:09 PM
two-byters would be practical here
Yeah, that's the only chance.
But then it really boils down to I reverse the source code, you shuffle the input!
How about: I rotate the source code, you rotate the input!
E.g. if source is ABCDE and input is [1,2,3,4,5,6] then CDEAB gives [3,4,5,6,1,2]
@Adám Unless you shuffle the source code lines
@NieDzejkob But still, you have to account for all possible permutations‽ Unless there are only two, of course.
hmm, you could specify some minimum length, but... ehh
I think the transform the source code, transform the input is more fun.
3:16 PM
yeah, at this point I'm just trying to make the challenge work when it's clear it won't be fun
more as a hypothetical really
@Adám this one is definitely interesting, though
Or you could take the shuffling one and make the score be the amount of permutations that work
@NieDzejkob Problem: 1-byte identity functions.
@Adám solution: outlaw 1-byte solutions :)
@NieDzejkob {return}{shift}
@Adám that's an identity crisis
3:31 PM
CMC: Given an integer, return that same integer using the shortest possible code you can. Your score is (x y) where x is your code length (lower is better) and y is the number of solutions of that length you can create (higher is better). E.g. if your shortest code is AB but AC and AD also work, then your score is (2 3) which is worse than (1 3) but better than (2 2).
Haskell (2,1) id
how does (1,2) compare to (2,3)?
@NieDzejkob Better.
@Adám In haskell you could also write e.g. f x=x, g x=x, c x=x, but I guess that would not count as 3 different functions?
@flawr It would, so I guess that'd be (5,53) or some such?
3:38 PM
@Adám probably:)
Ruby(6,27): ->a{a}
or write f=id, g=id, c=id :)
@JohnDvorak Why 27?
Z80golf (5,7) cd 03 80 ef 76 (untested)
lowercase letters and the underscore
3:39 PM
@JohnDvorak You can't use uppercase in Ruby?
Identifiers starting with uppercase are constants
Oh, interesting. I didn't know there were languages like that.
TIL Ruby is remarkably similar to Haskell
@Adám that's 0 bytes in k :) the empty program evaluates to :: - the identity function
@ngn So (0,1) then. But can you give a TIO link?
3:42 PM
Class names must be constant, arguments mustn't be.
@Adám tio link
wait, . is eval in K?
@NieDzejkob it is
is it really used so often to warrant assigning a single character?
@ngn Hm, I'm not sure that's valid. I'd argue that f is :: in this case, for a score of (2,something)
3:44 PM
@Adám why? there's no :: in my code
@ngn Right, but if I say a←⊃⍬ then a still becomes 0 though there's no 0 in my code.
@NieDzejkob you mean, string_to_int?
@ngn What happens if you ask for the definition of f?
@NieDzejkob characters in k have multiple meanings depending on the types of the arguments, . with a string is eval, with a dict it's values, with a fuction and list it's apply, with 4+ args it's amend at depth, etc
3:49 PM
@Adám in golfing we usually count number of bytes in the source code, right? not in how the function's printed. btw, :: does print as the empty string
@ngn Hmmm... that's an interesting scoring idea
@ngn Sure, but then your source is three bytes: ."" like so.
and it disqualifies a couple of golfing languages.
@Adám the expression (or program) is what's between " "
@ngn in golfing we usually count number of bytes in the source code, right?
3:54 PM
i used ." " only so i can assign the result of evaluating the expression to a variable
Well, the fact that eval on the empty string returns the identity function is irrelevant. What matters is how you got the function-value you could apply or assign to f.
i don't understand the last sentence
@ngn Could you not have written f: :: or something like that?
@Adám yes, but i cannot write just f:
oh... hang on
@ngn Exactly, so your source had to be longer than 0 bytes.
3:58 PM
@ngn i can! :)
@ngn It the challenge was to return a space, would you then accept ⊃'' as a 0-byte solution?
nice side effect, i wasn't even aware. it also works in k7!
@ngn What? f: makes f the identity function‽
@Adám no, is not "eval"
@Adám yes :)
@ngn OK, then yes, you get (0,1)
4:01 PM
Btw, there are probably plenty of golfing languages that score (0,1) because the empty program is the identity function.
@Adám hm, i doubt there are many...
@ngn QuadR
@Adám 1 swallow doesn't make a summer :)
4:05 PM
I thought Retina would work but you need a newline
@Adám sed too
is this plenty - a question for the philosophers
@ngn Probably.
@Adám btw, j golfs always use some j equivalent of ." "
and it's not counted in the byte score, nor considered a violation of the rules
@ngn That's just to avoid TIO counting f=: into the byte count. I also use
4:34 PM
Time complexity question: is O(m * n^2 + n * m^2) considered a "proper" time complexity? Or should it be O(n^2+m^2)?
@PhiNotPi i'm pretty certain it can't be simplified to O(n^2+m^2) as e.g. with n=m, it'd be simplifying O(n^3) to O(n^2)
I'd write O(nm(n+m))
@dzaima That makes sense
I have an idea for a challenge: "I negate the source code, you negate the output". I go over every byte of a file and negate it and the output has to be negated (either logically ["2" -> "-2"] or 2's compliment [1 -> -2]).
@PhiNotPi if m and n are independent variables - what NieDzejkob said. if m depends on n or is a constant - maybe what dzaima said.
4:46 PM
@JL2210 I believe that only works for languages that use a 256 byte code page. That breaks both ASCII and UTF-8
> 256 byte
That's not what I meant lol
A 1 byte code page with all 256 code points.
@DJMcMayhem Well with UTF-8 it should be possible ... but hard.
You need one version ASCII, when negated gives valid UTF-8
if you're careful
@ngn what i was trying to do was give a simple example where the simplification leads to bad results (though really it misrepresents the result for any non-constant n or m), not establish/require any relation between the variables. (note that i know nothing about time complexities formally so what i'm saying may or may not make any sense)
@wastl Yeah, it'll restrict a ton of the bytes you can use
Maybe negate with 7-bit two's complement
For ASCII? That could work. Or you could just not use any odd bytes
Wait, two's complement, not reverse.
4:52 PM
@DJMcMayhem PPCG requires all answers to be counted in 8-bit bytes, so manipulating the bits of those should be 100% defined everywhere. certain decoders might not like the result but that's not the challenges problem
@dzaima Not necessarily. A language could have defined behavior for ASCII and undefined behavior for code-points 128-255 as long as it avoids those bytes
@dzaima Maybe let the answerer choose for this challenge?
@DJMcMayhem yeah, that would make the language probably unable to compete, but that's a thing you have to accept with
Also, for whatever reason I was thinking of reversing the bytes. Two's complement would for sure break ASCII and UTF-8, since both of those standards require the leading bit to be a 0
5:07 PM
as a related idea, reversing the bits could allow for wiggle room (in a challenge about reversing the input numbers bits obviously)
5:31 PM
@dzaima you're right, of course. i should have quoted "O(n^2)" using more precise language than "what dzaima said".
@JL2210 Don't we have enough "I transform the source code, you transform the output" challenges?
5:58 PM
Well, I think we do.
@pppery I want to do a grand finale.
@Adám that screams "quine" to me
@NieDzejkob No, just all the 2D transforms.
But maybe that's too much to ask. I haven't exactly seen a lot of answers coming in on
Q: I transpose the source code, you transpose the input!

AdámRip-off of a rip-off of a rip-off of a rip-off. Go upvote those! Your task, if you wish to accept it, is to write a program/function that outputs/returns its input/argument¹. The tricky part is that if I transpose your source code², the output/result must be transposed too. You may choose whic...

6:03 PM
@pppery Evidently not. I made a similar comment on the latest one.
Can somebody take a look at my sandbox post in a free moment? codegolf.meta.stackexchange.com/a/18113/55934
@pppery We do :C. I'm almost sorry that I wrote the first rip-off...
Next challenge: "I run the source code through Google Translate English -> Polish, you run the input through Google Translate English -> Polish!"
z __future__ zaimportuj dywizję
bonus points: no network use
although considering translations are constantly being improved...
6:19 PM
39 mins ago, by pppery
@JL2210 Don't we have enough "I transform the source code, you transform the output" challenges?
Inventing more exotic challenges of that type is not a solution.
2 hours later…
8:14 PM
Q: Shorten the execution time of the program

GlaydonNot so long ago, I had an idea that I will try to formulate. The task is to build a computing system inside a figurative computing system. Four adjacent tetrahedral are a 1x1x1 matrix. This is enough to introduce n=2^(х-1) algorithms into it, where x is the number of vectors (faces). n=2^17 under...

1 hour later…
9:14 PM
Q: Convert a string of digits from words to an integer

SparklerConvert a string containing digits as words into an integer. For example "four two" -> 42. Submissions can assume the input string is space-separated and all words are valid and lowercase.

1 hour later…
10:36 PM
Linear algebra problem (related to a previous question I've asked in here):
Given an arbitrary rectangular matrix M, is there a way to determine whether there exists a pair of vectors x and y with all-positive entries such that Mx=y?
this... is 'nother hard one :P
11:17 PM
@PhiNotPi this looks like a linear program, should be solvable

« first day (3158 days earlier)      last day (531 days later) »