« first day (1750 days earlier)      last day (3096 days later) » 

2:01 PM
Heya=)
 
38 stars on the "don't abuse stars message"
 
@MartinBüttner Why did you an an arbitrary base restriction to that counting question?
 
Because that's what we discussed in the comments.
 
I just finished an answer that counts in hex.
 
-5
A: Can numeric input/output be in unary?

DLoscYes, I/O in any base should be acceptable by default Binary or hexadecimal, e.g. could be similarly useful for some languages. In the interests of consistency, they should also be allowed for input. Again, the challenge author can specifically disallow this if s/he wants.

-1
A: Can numeric input/output be in unary?

BrainSteelYes, I/O in unary, binary, octal, decimal or hexadecimal should be acceptable by default. These conversions are generally simple, and for most languages they are trivial. For most languages and challenges, this won't make any kind of difference, but this could make a significant usability improv...

there's no consensus for allowing arbitrary bases by default
 
2:07 PM
@flawr well I didn't specify any numeral system, so I guess that is valid output. :p — vrwim 48 mins ago
This does not sound like he endorsed those bases and prohibited others.
 
I left a comment.
 
2:21 PM
I think most of the answers do not really solve what OP wanted to see: He said he challenges the participants to solve the problems *of having to circumvent any types such as int and long*

There are the trivial answers that are written in languages that *apparently* support arbitrary size integers. But I haven't seen any others so far.
 
@MartinBüttner Outputting in base 256 also does not make sense because then there isn't any possible delimiter char.
 
@flawr that doesn't make sense in many languages.
@feersum I considered that, but I don't think it's a big deal... since we know what sequence of numbers we're looking for it's easy to distinguish linefeed-digits from linefeed separators.
 
@flawr My answer is conceptually almost the same as yours, by the way...except it only needs two "digits" instead of 30-some.
 
@feersum Apart from the memory limitations I think OP wanted to see answers that will at least when ignoring memory limitations be able to count infinitely.
 
@flawr Oh, you resize the array... it would be a lot shorter not to :P
 
2:25 PM
@feersum But then it would not meet the specs IMHO.
See the message above.
 
@feersum isn't base256 technically ascii encoding?
 
Anyway I think I have to give up the discussions as people just seem to ignore this.
 
@TheDoctor I don't know what you mean.
 
more like ascii is the default base256 encoding
 
ASCII is 7 bits.
 
2:30 PM
@MartinBüttner regardin this comment I interpreted the challenge that apart from memory limitations, all the programs should be able to count infinitely, but on actual machines, the programs should at least be able to count to 2^128, don't you agree?
 
what does that have to do with this comment?
 
@flawr But java.math.BigInteger overflows at about 2^(2^34-1)-1
 
@MartinBüttner Well for the languages that have no specifications on the integer sizes you can always write a new interpreter now that makes it trivial!
 
@flawr sure.
same for any other catalogue challenge.
 
I do not agree on this.
As for this challenge the integer size is crucial, but it very often is not specified.
 
2:33 PM
doesn't matter though, because such an answer would be trivial and boring, and this is not a competition between languages... writing a new interpreter is like saying "I've added a new sub-competition and I've won it, because there's only one possible answer".
@flawr there's a consensus somewhere on meta that, for the purposes of PPCG, languages are defined by their implementations.
 
While for other challenges like "hello world" specs like thos do not really matter.
 
I really don't see the difference.
 
But we also had a consensus that languages versions that were created after the submission of challenges are considered invalid for that given challenge.
 
sure, and any default on meta can be overruled.
in fact, I think that the "languages that are newer than this challenge are disallowed" rule does more harm than good anyway.
 
What bothers me here is that NO ANSWER so far does adress the (in my opinion interesting) challenge of having to implement a counter that can count infinitely (if you ignore the memory constrains the hardware)
All answers that actually solve this challenge are trivial, because they use arbitrary size integers.
Nobody actually seems to care about this goal.
 
2:38 PM
Yes, this is typical... the greater part of challenges have poor specifications.
 
I've never really tested what happens when java's BigInts hit their max size.
 
I think it is just nonsense to have a ton of trivial or untentersting answers, to a challenge that would have been great if people actually woud care about the challenge, and not only the rep points...
 
@flawr I don't understand how that is different from using a built-in for prime testing.
 
Do they explode, or do they just wrap around?
 
@MartinBüttner It just means that we now have a challenge full of trivial answers. Nobody tried to actually solve the problem without relying on something that makes it trivial.
 
2:41 PM
It's a trivial challenge. Why would I impose an arbitrary size limit on my integers if there is no such limit in the language I'm using?
 
This is not what I want.
I give up this discussion, I do not want to waste my time on this anymore.
 
0
A: Sandbox for Proposed Challenges

Jonathan AldrichRounding Fractions code-golf math rational-numbers Back in the old days of game programming, before FPUs were the norm, games predominantly used fixed-point math to represent non-integer values. Typically, the lower 8 or 12 bits of a 32-bit word are used as fractional parts, and the rest are tr...

 
8-bit sandbox guy breaks the silence
 
@flawr I can understand that, but I was actually interested in how you would implement this in a language that does have arbitrary precision types. You just complained that people used them, but if I don't impose an arbitrary limit on the type, I'm not sure what else I would do with them.
 
3:25 PM
@MartinBüttner The answers using arbitrary precision integers (API) are uninteresting but valid. But it bothered me that people used languages where it is not clear if they support APIs. This tells me that they do not care about the challenge and the problem of overcoming the difficulties when you actually have limited precision integers.
 
I see, fair enough.
 
When a program "dumps core" in Linux, doesn't that mean it's supposed to fill the terminal with a bunch of scary-looking hexadecimal numbers?
 
I want to apologize that I perhaps overreacted before, it drove me mad how people were just ignorant about this.
 
@feersum I don't think so. It just writes to a dump file, and even that is by default suppressed on some distributions.
@flawr No harm done.
 
Is there an easy way to test if a program can count up to 2^128?
I feel it shouldn't be a problem for Python
 
3:34 PM
start at 2^128-10? :P
 
Does anyone have a good name idea for a language which is executed by the C++ compiler finding the type of a template?
 
I'm more referring to "without problems and without running out of memory on a reasonable desktop PC"
Python can handle the number itself
 
why should there be a problem then?
 
It takes nearly 20 bytes to store 2^128. I'm not sure the average computer could handel that.
 
@feersum I'm not exactly sure what you mean.
 
3:41 PM
hm
probably isn't a problem
Thanks :~)!
 
Java's BigIntegers can potentially reach 16 gigabits, which is probably about where the JVM runs out of memory anyway.
 
I think it's common for enterprise Java systems to use tens of gigabytes.
 
I think I heard somewhere that the JVM's default memory allowance was a little more than 2 gigabytes. Though, of couse, it can probably be configured to allow significantly more if you want.
 
-Xmx is the option for max memory
I wish Python had a default like that, so it wouldn't blow up my computer when I foolishly run a golfed program that was a little inefficient with memory.
 
0
A: Implement a Truth Machine

quartataRotor, 4 bytes {}| Contains an unprintable, so here's a hexdump: 0000000: 7b1b 7d7c {.}| Explanation: implicit -- evaluate and push input onto stack { beginning of block ^[ prints the top value of the stack }| execute block while top ...

Forgot I didn't do a truth machine for Rotor
I encourage everyone to post their truth machines if they haven't already <s>so it can get back into hot network questions and I can get my 10k views</s> for science
This puts me on par with @Mego's Seriously truth machine which makes me feel good
TAKE THAT HAHA
...anyways
 
@quartata it's far too old for HNQ anyway
 
@Doorknob It is?
I thought if it had enough activity it could pop up any time
 
well, maaaybe... but you would need probably a thousand new answers
 
@Doorknob Hmph.
Well, we haven't quite exhausted the supply of esolangs yet
Maybe that could happen
 
4:09 PM
what's the standatd scoring for Marbelous? cells or bytes? do i have to include the extra space between cells?
 
@TheDoctor Bytes
 
4:21 PM
0
A: Count up forever

quartataRotor, 7 bytes 1{1+}| There's an unprintable again, hexdump: 0000000: 317b 1b31 2b7d 7c 1{.1+}| ew 7 bytes

:(
You know you're doing something wrong when you are tied with CJam
That challenge is really bad... did he just rip the catalog rules from simple cat program?
> Count up forever
> there are some where the empty program does the trick
I'm guessing yes.
 
I solved that challenge in brainfuck, but it is optimized as hell (1500x91 bytes). But it runs.
 
@mınxomaτ That's surprising.
I wasn't sure if BF could do it all on account of the 2^128 rule
 
BF is a TT. It can do everything.
 
(which I really hate because it forces strict-typed languages to use BigInteger or something)
@mınxomaτ Yeah, but with extreme difficulty is more what I meant
 
Brainfuck is often labeled way more difficult than it actually is.
 
4:27 PM
@mınxomaτ How did you handle the 2^128 rule
 
I prototyped the solution with two integer places and exploded it using a script. It runs and can (provably) count up to 2559999999999999999999999999999.
Using constant memory.
 
ooh I love metagolf
Are you going to post it?
I mean it is too big to fit in an answer
 
I don't think so. I suppose I could optimize about 75% away.
 
@mınxomaτ Really? Hmm
 
The problem is to find empty memory. You have to emulate an array (as BigInt) and write an array handler. That amounts in ridiculous amounts of >, which is hard to optimize by hand.
 
4:49 PM
Rotor got outgolfed by Labyrinth.
That's not good.
 
5:02 PM
This isn't working, can't figure out why:
v2 2 0 1
>e>S S S
   e1e1e00 12
   > >  >S SS
  ^    < e0e1
        ^<  lCRP
^           <
 
Anonymous
@flawr That's the plan in the future, but I'm focusing on working out IDE and interpreter bugs before I organize docs
 
Anonymous
0
A: Count up forever

MegoSeriously, 5 bytes 1W;.u Explanation: 1 puts 1 on the stack W begins a while loop the executes while the (peeked) value on top of the stack is truthy ; duplicate top of stack . pop and output u increment value on top of stack <EOF> implicit end of while loop block No on...

 
Anonymous
Wooo
 
I thought Seriously would have a Byte for that
 
Anonymous
Nah
 
5:14 PM
Woot! I fixed it!
 
Anonymous
If I had a print-stack-without-popping instruction, it could be 4 bytes and output in unary
 
Anonymous
1W<print stack without popping>;
 
@Mego D:
I need an increment instruction
 
Anonymous
I have +1, -1, +2, and -2 single-byte instructions :P
 
Anonymous
Inspired partly by everyone wishing CJam had +2 and -2
 
Anonymous
5:17 PM
I should add peek-print
 
0
A: Count up forever

SuperJedi224BotEngine, 8x16=128 Output is in binary. v2 2 0 1 >e>S S S e1e1e0 e2 0 12 > > >S SS ^ < e0e1 ^< <lCRP ^ <

 
@Mego I have peek-print :D
That makes me feel better
I have something that Seriously doesn't
 
Anonymous
@quartata It has it now
 
@Mego D:
 
Anonymous
Testing and pushing now
 
5:22 PM
While loops are evil in Seriously
They may be shorter but you'll be kicking yourself later
You should have just made them use blocks, then you can manipulate them like normal
 
Anonymous
It has functions
 
So it has {code}W?
 
Anonymous
Sort of
 
How did you fit all these damn instructions
 
Anonymous
Overloading
 
5:24 PM
...aside from that
 
Anonymous
More overloading
 
Anonymous
Never enough overloading
 
XD Seriously? (Oh, it doesn't have an esolangs page)
 
Hmph
When I finish Rotor you'll regret wasting commands on such plebian things
 
Anonymous
If every function in Seriously was unary, there'd be (255-7)*4 different functions
 
5:26 PM
I just uploaded the first version of my C++ template language.
 
Anonymous
255 single-byte characters, -7 for :'"W`[] (which are delimiters, not commands), *4 for 4 data types
 
Now I need to find an easy challenge, preferably not requiring atoi, that was posted in the last 2 minutes.
2
 
Anonymous
Hmm, the unary Seriously program wouldn't work because of the 2^128 requirement
 
Anonymous
You'd run out of memory long before reaching that
 
Oh, does Seriously have Bigints?
 
Anonymous
5:28 PM
Yep, thanks Python
 
Anonymous
Python 2 does seamless conversion at the 2^32 boundary to longs, with the only differences being memory usage and the appending of an L to the repr
 
Anonymous
(the latter of which is the bane of Python golfers)
 
@SuperJedi224 I find your edit no less ambiguous. What is the intention?
 
Rotor will have 533 instructions one day.
52*9+30+10+25
 
Anonymous
992 instructions in Seriously if everything was unary and fully overloaded
 
Anonymous
5:32 PM
But I also have binary, ternary, and n-ary functions
 
Anonymous
(though the last case is essentially unary)
 
I just counted it by one-byte instructions.
I suppose if I was completely insane and wanted two-byte instructions...
That would be 24869 instructions
But I mean the real question is do I even know 24869 things I want Rotor to do
 
The 3000 or so PPCG challenges would be a good start.
 
@feersum the dupe destroyer
 
Anonymous
I've been mucking through the challenges for inspiration for new commands
 
Anonymous
5:36 PM
The biggest thing I need is better list/string commands
 
Anonymous
And better function manipulation - making them first-class objects, ideally
 
The biggest thing I need is list/string commands.
 
Anonymous
+7/-0 in favor of close-on-sight for challenges that explicitly exclude or penalize the use of certain languages, yay
 
Link?
 
@Mego link or it didn't happen
 
Anonymous
5:38 PM
2
Q: Disallowing Explicit Exclusion of Languages

MegoWe've had discussion on a related topic before, where the general consensus is that challenges should be language-agnostic by default, but specific-language challenges were also acceptable within reason. Spurred by this question (which was closed for an unrelated reason), the discussion was brou...

 
@Mego There are 10 upvotes now!
 
Anonymous
Woo
 
11
 
Anonymous
I think 10 11 with no downvotes is sufficient consensus
 
I had no idea that people did this in questions
 
Anonymous
5:41 PM
Unfortunately I have to wait 2 days to mark it as accepted
 
@quartata!
 
-5
Q: Average calculator

codeSwift4LifeMain Goal Create a calculator that finds the average / mean of a set of numbers. It must use the formula mean = (inputA + inputB) / inputCount or similar. This is code golf. Rules No standard loopholes (see meta article) Must be at least 10 bytes (Use real language) Must take STDIN of at ...

 
Anonymous
@quartata They usually get downvoted to oblivion quickly
 
> Remove 10% if doesn't use CJam, Hexagony, Golfscript, or similar Golf languages.
wtf
> Hexagony
> agony
..
 
Anonymous
The goal was to not have to rely on downvoting, and make it on-sight closing
 
5:42 PM
Next up: "Remove 10% if doesn't use Java, Brainfuck, or Pyth"
 
Anonymous
"Remove 90% if use BrainFuck"
 
Remove 90% if doesn't use befunge-98
 
I actually thought of something from that
 
Anonymous
For most interesting problems, a 90% reduction for brainfuck would probably still not make it the shortest
 
A challenge type where the goal is to get the closest to the mean of all the scores
Hm...
 
Anonymous
5:43 PM
@quartata Have fun writing that stack snippet
 
@quartata did you see my edit comment about Truth-machine
 
@quintopia No
 
@quartata how about closest to 2/3 the average
 
@Mego That wouldn't be that hard
 
Anonymous
I'd say do something like rms average
 
5:44 PM
@quartata probably would have the same problems as code bowling though
 
@quartata Keymaker, the inventor of Truth-machine prefers it to be spelled like this (with a hyphen). So much that he has edited the hyphen in where I've written it on the wiki. I think your thread should follow this convention out of respect.
 
Ah, OK.
I'll change that.
Fixed
54
Q: Implement a Truth-Machine

quartataA truth-machine (credits goes to dis guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does: Gets a number (either 0 or 1) from STDIN. If that number is 0, print out 0 and terminate. If that number is ...

 
(y)
 
@Mego I knew someone had done this before
Did he make an interpreter?
 
Anonymous
5:49 PM
@quartata I don't know and I don't care
 
Another petition: I think we should edit this thread: codegolf.stackexchange.com/questions/4/… to contain a ranking code snippet and cataloguing instructions like the Cat and Truth-machine threads have. Since no answer has been accepted.
 
Anonymous
@quintopia I'm not opposed to this
 
@quintopia Probably should talk to Martin about this.
He seems to be in charge of converting old answers into catalogs
 
Anonymous
It's a simple challenge that showcases functionality worthy of being catalogued
 
Anonymous
1
A: ROT-13 transform standard input

Johannes KuhnCHIQRSX9+, 1 R You just have to use the right tool for the problem. CHIQRSX9+ is Turing complete, and it can read and write from standard channels with C.

 
Anonymous
5:52 PM
Gross
 
Beautiful
 
That answer had to appear somewhere in the thread. As an homage to Oerjan.
(I'm just disappointed he didn't include a Cat command)
oh waitr
that's what C is
 
C
 
so...is there a CHIQRSX9+ answer on the Cat thread? Just for completeness sake.
 
Nope
 
Anonymous
5:55 PM
CHIQRSX9+ is not allowed per our specs
 
@Mego This isn't actually true
 
Anonymous
@quartata See my comment on the answer
 
If you could find an appropriate Perl program for X it would be ok
oic
That answer is 2 years old, just so you know.
 
Anonymous
It generates a random number (that is not consistent across executions), adds it to each character (mod 256), and runs it as Perl code
 
Anonymous
You could post X<some more bytes> as an answer to any question and claim "it worked when I ran it", without being able to prove it
 
Anonymous
5:58 PM
(<some more bytes> would be the shortest Perl code for the answer minus the first byte, with x added to each byte mod 256, where x is the difference in ordinals between "X" and the first byte of the Perl code)
 
@Mego I see.
 
Hello!
 
Hi, Sock!
 
Anonymous
Hi Alex
 

« first day (1750 days earlier)      last day (3096 days later) »