Skip to main content
28 events
when toggle format what by license comment
Aug 31, 2022 at 22:26 history closed rydwolf
Noodle9 code-golf
Duplicate of Interpret brainfuck
Aug 31, 2022 at 22:17 comment added rydwolf I think the spec is far too loose and unopinionated. Maybe there's room for another BF challenge, but IMO it should change things in some meaningful way, like unbounded cells + tape or following the spec precisely. As it is now this challenge is just a downgrade from the existing one in every way except the I/O, which nobody really pays attention to anyway. It also should've been sandboxed for longer, as challenges go this is a pretty poorly specified one. Also, typical practice is to ask on meta before redoing an old challenge, something which should definitely have been done here.
Aug 31, 2022 at 22:02 history edited Seggan CC BY-SA 4.0
added 47 characters in body
Aug 31, 2022 at 21:26 comment added Ismael Miguel Yes, that is completely missing, since you only mention that "negative cells [are] undefined". Going past the 128th cell doesn't mean it is a negative cell. The next cell can be the 129th cell (no overflow at 128) or the 0th (cyclic "tape", with overflow to positive) cell or the -127th (cyclic tape, with overflow into negative). You do have "Going above the maximum cell value is undefined", but that's for the cell value, not the pointer value. However, a few lines above, you said the cell values must be integers. The spec does need some tightening.
Aug 31, 2022 at 21:14 comment added Seggan cc: @IsmaelMiguel ^
Aug 31, 2022 at 21:14 comment added Seggan @DLosc going past the max cell limit is undefined. is the question not clear on that?
Aug 31, 2022 at 21:05 comment added Ismael Miguel @DLosc You're right. I put my foot on my mouth. The example that was posted before, for the "Hello, World!" program, required that you circled back from 0 to the last cell position. This needs clarification.
Aug 31, 2022 at 20:58 comment added DLosc @IsmaelMiguel I agree. However, it's not clear to me from the spec of this question that you're expected to go from cell 30000 to cell 0 when you try to access cell 30001. Seggan, would you please clarify?
Aug 31, 2022 at 20:58 answer added chunes timeline score: 2
Aug 31, 2022 at 20:54 comment added Ismael Miguel @emanresuA "Array size: 30000 bytes (not circled)" <-- This means that trying to go to cell 30001 will do nothing, on the other post. On this one, you're expected to from 30000 to 0, when you try to access 30001. This is a HUGE difference. EOL being 0 is also a HUGE difference. The other one also requires you to handle comments, while this lets you assume that there's no comments. (Newlines are considered comments.) These are REALLY HUGE differences. I doubt that that many answers can be re-posted without some work.
Aug 31, 2022 at 20:23 answer added Ismael Miguel timeline score: 2
Aug 31, 2022 at 20:20 comment added Seggan @emanresuA the other one also does not specify EOF, and has strict I/O rules
Aug 31, 2022 at 20:11 comment added emanresu A I don't think this adds anything to the original challenge, as most brainfuck programs are written for a cell size of unsigned 256 and won't work elsewhere. The original "interpret brainfuck" is not overly strict, it simply asks to interpret the variant of brainfuck which most people use. Additionally, the original has many good and interesting answers which this question will almost certainly never accumulate.
Aug 31, 2022 at 20:09 answer added mousetail 'he-him' timeline score: 1
Aug 31, 2022 at 19:42 history edited Seggan CC BY-SA 4.0
added 4 characters in body
Aug 31, 2022 at 19:41 comment added Seggan @mousetail oh, it does? I just copied the shortest BF example. will fix
Aug 31, 2022 at 19:39 comment added Ismael Miguel I also noticed what @mousetail said. It was a pain to implement thanks to that. The provided example won't work unless the "tape" pointer overflows to the end. "Going into negative cells [...]" is impossible if we expect the correct output from that example.
Aug 31, 2022 at 19:34 comment added mousetail 'he-him' You say "going into negative numbers is undefined" but the hello world depends on a wrapping implementation for overflow
Aug 31, 2022 at 19:13 comment added mousetail 'he-him' Maybe link to a brainfuck specification?
Aug 31, 2022 at 19:08 history edited Seggan CC BY-SA 4.0
added 1 character in body
Aug 31, 2022 at 19:08 comment added Seggan @IsmaelMiguel woops. my BF is not the best :P
Aug 31, 2022 at 19:00 comment added Ismael Miguel The 2nd test case seems to be incorrect. ,[,.] will skip the first character, because it is reading twice. It should be ,[.,], which reads the input, and while there's something, it will output and read the input after.
Aug 31, 2022 at 18:47 comment added Seggan @thejonymyster true. Edited.
Aug 31, 2022 at 18:47 history edited Seggan CC BY-SA 4.0
undefined
Aug 31, 2022 at 18:41 comment added thejonymyster that explains how much the maximum needs to be, not what we should do if the program attempts to exceed it. you spelled out all the other "undefined" things, you may as well add that too :-)
Aug 31, 2022 at 18:28 comment added Seggan @CommandMaster implementation defined. That's why I said "at least 128"
Aug 31, 2022 at 18:27 comment added Command Master How should going over the maximum value be treated?
Aug 31, 2022 at 17:52 history asked Seggan CC BY-SA 4.0