« first day (2031 days earlier)      last day (2804 days later) » 

10:00 AM
ohhhhh
nope
 
This is fractal plus
main(x){for(x<<=16;x--;)x&x/2&21845||putchar(~(x|x>>8)&85?32:43)&&x&255||puts("");}
 
I get what you mean by "base3 in base4" but I've no idea how to implement that
ohhhh
alright
 
x & x/2 & 0b101010101
 
@orlp what is that magic
 
it's not that complicated
to get base 3 in base 4
the only thing we don't want is two ones in one slot
00 = 0, 01 = 1, 10 = 2, 11 = disallowed
 
10:02 AM
yes I know this and then
 
x & x/2 finds adjacent bits that are set
(x/2 == x>>1)
& 0b101010101 makes sure that it's the high bit adjacent to a low bit in the same slot
 
oh, I thought that was a generator for x+1 lol
 
cause 0b110 would be fine
but 0b1100 is not
 
Alright
 
probably not the way to go for python though
but maybe it is
did you see this answer?
1
A: Exponentially Slimy Programming: Stacking Minecraft Slimes

orlpC, 220 bytes x,y,r;f(n){ printf("P3 %d %d 255 ",(8<<n)-8,4<<n); for(y=0;y<4<<n;++y)for(r=0;r<n;++r)for(x=0;x<8<<r;++x) puts("110 170 90\0 116 196 96\0 0 0 0"+12* (117-"` t5L\rL\ru5tst5` "[x>>r+2|(y>>r)%8*2]>>(x>>r)%4*2&3));} I added useless newlines for readability, score is without these newl...

 
10:06 AM
@orlp how did u convert to image?
 
@LeakyNun I output as plain ppm
 
what is ppm
 
Never mind
 
ubuntu natively supports it in the image reader, for windows I assume you'll have to convert using imagemagick or something
 
10:08 AM
but what is 21845?
 
0b101010101010101
 
alright
just wondering if you need so many bits
 
yes
 
bithacks
it's 90 bytes now...
 
it's just the newlines I have trouble with
 
10:13 AM
main(x){for(x<<=16;x--;)x&x/2&21845||x%256*putchar((x^x>>8)&85?32:88)||puts("");}
 
I've tried that before
and it didn't work
but that's because I put the multiplication on the wrong side...
thanks
(I tried main(x){for(x<<=16;x--;)x&x/2&21845||putchar((x^x>>8)&85?32:88)*x%256||puts("");‌​} before, which obviously doesn't work)
 
a=[x for x in range(171)if x&x/2&85<1]
for i in a:print''.join("X "[(i^j)&85>0]for j in a)
@orlp here
 
Compiling src/main.c...
In file included from src/main.c:4:0:
inc/io.h:10:39: error: expected ';', ',' or ')' before '=' token
 char *readfile(char *path, int bufsize=4096);
                                       ^
src/main.c: In function 'main':
src/main.c:9:5: error: implicit declaration of function 'readfile' [-Werror=implicit-function-declaration]
     char *txt = readfile(argv[1]);
     ^
src/main.c:9:17: error: initialization makes pointer from integer without a cast [-Werror]
     char *txt = readfile(argv[1]);
wat
> Default parameters is a C++ feature.
ಠ¯ಠ
 
a=[x&85for x in range(171)if x&x/2&85<1]
for i in a:print''.join("X "[i^j>0]for j in a)
87 bytes now @orlp I really love bithacking
 
»  ./akso.exe
Usage: D:\AKSO\akso.exe <file>Segmentation fault
yay a segfault
 
10:19 AM
so now I'm #1 for both fractals
I didn't think 82 bytes would be possible...
main(x){for(x<<=16;x--;)x&x/2&21845||x%256*putchar((x^x>>8)&85?32:88)||puts("");}
main(x){for(x<<=16;x--;)x&x/2&21845||x%256*putchar(~(x|x>>8)&85?32:43)||puts("");}
So similar too
 
@orlp why the brainfuck do you need 21845?
 
@LeakyNun Because I store both integers in one
the first 8 bits is the first integer
the second 8 bits is the second
 
Genius
 
bitmask visibly
 
(x^x>>8)&85
that xors the first and second number
 
10:23 AM
holy mother of god
the level of bithacking is too extreme
 
are you allowed to repost anarchy golf questions on PPCG?
 
why would you?
 
i dont think
 
Because I think it's a nice challenge?
 
src/main.c:13:44: error: invalid operands to binary % (have 'const char *' and 'char *')
         printf("Error while reading %s.\n" % argv[1]);
@python y u do dis to me ;_;
 
10:27 AM
@TùxCräftîñg It isn't python
 
@LeakyNun by the way, you can make a lot of similar patterns with this
 
@TùxCräftîñg Use , instead of %
 
@LeakyNun run this
main(x){for(x<<=16;x--;)x&x/2&21845||x%256*putchar(x&x>>8&85?32:88)||puts("");}
 
I don't have c
 
10:28 AM
how not?
 
»  ./akso.exe Makefile
CC=gcc
CFLAGS=-W -Wall -Werror -Wshadow -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wstrict-prototypes\
           -Wstrict-overflow=5 -Wwrite-strings -Waggregate-return -Wformat=2 -Werror-implicit-function-declaration\
           -Iinc -pedantic -std=c99
EXE=akso.exe

20014620: src/`
        @echo 'Compiling $<...'
        @$(CC) $(CFLAGS) -c -o obj/$@ $<

.PHONY: compile exe clean all
all: exe
        @echo 'Done!'

compile: main.o io.o

exe: compile
        @echo 'Linking to $(EXE)...'
 
(then what am I using to run python)
 
\o/ binary garbage
 
@LeakyNun why do you not have C?
please don't tell me you run windows :(
 
I run windows
 
10:29 AM
and if you do, you should still install a C compiler :)
 
i run windows and i have C
 
but I can run python
 
but how can I run python if I cannot run C?
 
@orlp In general I'd refrain, just out of courtesy of how anarchy works
 
10:30 AM
@Sp3000 alright
@LeakyNun (you really should have a C/C++ compiler installed, you can follow my guide I linked - but for a quick peek you can just use ideone)
 
Alright
but seriously, if I can't run C then how do I run Python?
 
@LeakyNun can you rephrase your question?
I don't understand it
 
@LeakyNun You can run C programs even if you don't have a C compiler, you just can't compile them yourself
 
@trichoplax I see, thanks
 
A C compiler turns C code into a native executable containing machine code
the output of a C compiler can be ran without having to have a C compiler installed
 
10:33 AM
@trichoplax but doesn't Python interpret to C? Or does Python compile to binary C directly?
 
this is 'compiled', as opposed to 'interpreted'
 
ಠ¯ಠ
 
Python is interpreted
 
Python is interpreted
 
which means that there is a program that reads and executes it
 
10:33 AM
it 'compile' to a VM to speed up, but it's interpreted
 
which can run C
 
instead of running directly on the CPU
 
@LeakyNun RPython can compile to C though
 
@LeakyNun Python "compiles" to bytecode, which is then interpreted by the python interpreter, which is written in C but is already compiled
 
@trichoplax I see, thanks
 
10:34 AM
@LeakyNun the way you would write a brainfuck interpreter is basically how Python is executed
(not in terms of technique)
 
I see
 
(but in terms of how there's a helper program that interprets the program)
 
For python, you only need a C compiler if you want to compile the interpreter yourself from source code, rather than download an executable file.
But as orlp says, it's really worth having a C compiler for its own sake too
 
@orlp I can't download it, it just failed
 
// wat
char *readfile(char *path) {
    FILE *file = fopen(path, "r");
    if (file == NULL) return NULL;
    fseek(file, 0, SEEK_END);
    int size = ftell(file);
    fseek(file, 0, SEEK_SET);
    char *buf = malloc(size);
    int i = 0;
    char c;
    if (buf == NULL) {
        fclose(file);
        return NULL;
    }
    while ((c = fgetc(file)) != EOF) buf[i++] = c;
    buf[i] = 0;
    fclose(file);
    return buf;
}
halp this function insert random binary garbage in the returned char array
 
10:37 AM
@LeakyNun what failed?
 
@orlp the download failed
 
and i dont see why
 
@LeakyNun can you be more specific
is it a 404?
 
@orlp how do I know
 
what does your browser say
when you go to that URL?
 
10:38 AM
Nothing? It just downloads it?
 
so how does it fail?
what browser do you use?
 
Firefox
 
when you open your downloads
 
It fails after the download copletes
 
what does it say?
 
10:39 AM
2 mins ago, by TùxCräftîñg
halp this function insert random binary garbage in the returned char array
 
@TùxCräftîñg why don't you use size
 
in what way does it fails? the executable just won't start?
 
@ASCII-only char *buf = malloc(size);
 
It can download now, but the executable fails now
 
more details :P
 
10:39 AM
something like the file is not compatible
 
'it fails' is utterly useless
do you run 64 bit windows?
 
32 bit
 
@TùxCräftîñg Why do you check for EOF then if you have size, also give an example output
 
it read the content of the file in a char array and return it
 
10:40 AM
I assumed this was 2016 and everyone ran 64 bit operating systems
 
@orlp no, it's 2610 now
 
»  ./akso.exe Makefile
CC=gcc
CFLAGS=-W -Wall -Werror -Wshadow -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wstrict-prototypes\
           -Wstrict-overflow=5 -Wwrite-strings -Waggregate-return -Wformat=2 -Werror-implicit-function-declaration\
           -Iinc -pedantic -std=c99
EXE=akso.exe

20014660: src/`
        @echo 'Compiling $<...'
        @$(CC) $(CFLAGS) -c -o obj/$@ $<

.PHONY: compile exe clean all
all: exe
        @echo 'Done!'

compile: main.o io.o

exe: compile
        @echo 'Linking to $(EXE)...'
 
@LeakyNun the guide is for 64-bit computers though
some details are different for 32-bit
 
even better: it segfault randomly
 
@TùxCräftîñg I know, but how do you know it returns garbage (also won't doing a for loop using size be faster than comparing to EOF every char?)
 
10:44 AM
because the returned char array contain some chars modified
using a for loop stopped it to segfault randomly at least
 
Can anyone help me golf this?
11
A: A square of text

Leaky NunBrainfuck, 116 112 bytes >>>>,[[<]<<+>>>[>],]<[<]<+<[>>+<[-<-<+>>]<<++[->>+<<]>]>[-]>>[<[->.[-]<[->+<]<+[->+<]>>]++++++++++.[-]<[->+<]>>] Try it online! Safe in flavours of BF that does not mask the cells with 256, does not support null bytes. Remove the initial right arrows if the flavour s...

 
since i am creating a esolang, a bugged readfile function is finally cool
 
@TùxCräftîñg Can you give example output?
 
11 mins ago, by TùxCräftîñg
»  ./akso.exe Makefile
CC=gcc
CFLAGS=-W -Wall -Werror -Wshadow -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wstrict-prototypes\
           -Wstrict-overflow=5 -Wwrite-strings -Waggregate-return -Wformat=2 -Werror-implicit-function-declaration\
           -Iinc -pedantic -std=c99
EXE=akso.exe

20014660: src/`
        @echo 'Compiling $<...'
        @$(CC) $(CFLAGS) -c -o obj/$@ $<

.PHONY: compile exe clean all
all: exe
        @echo 'Done!'

compile: main.o io.o

exe: compile
        @echo 'Linking to $(EXE)...'
my Makefile with this buggy function
 
buggy?
 
10:54 AM
bah yes
the function modify some bytes
 
That doesn't mean the Makefile is faulty
It's almost certainly a problem with the program
 
ik
>_>
it was a example
reading the makefile with this fucntion
 
Which bytes are modified?
 
20014660: src/`
the original line is %.o: src/%.c
 
@LeakyNun What does > do? (I don't speak brainfuck at all)
 
10:57 AM
@MitchSchwartz move the pointer to the next cell
 
move the tape head one rightward
 
brainfuck is a tape of infinite cells
 
?
infinite tape or unbounded cells
 
whatever
 
@TùxCräftîñg Depends on the implementation
 
10:58 AM
and the tape dont have to be unbounded
 
@orlp Are you gone?
New challenge in 10 minutes
 
My current history of dealing with Amazon customer support:

Mon, Aug 08 2016:
Me: "Currently, http://kdk.amazon.com appears to be down. Is there a timeframe for when it will potentially be back up, or has the domain been discontinued?"
Support rep Α: "I've reported this to our technical team, and they're working on taking care of it. Please try again over the next few hours. Errors like this are usually corrected shortly after they're reported."
Fri, Aug 12 2016:
Me: "It has been four days now. Please excuse my impatience, but are there any updates on the status of this?"
> Your feedback is helping us build Earth's Most Customer-Centric Company.

Thank you.
𝗔𝗺𝗮𝘇𝗼𝗻.𝗰𝗼𝗺
 
0
Q: Alphabet triangle strikes again

Leaky NunTask Your task is to print this exact text: A BCD EFGHI JKLMNOP QRSTUVWXY ZABCDEFGHIJ KLMNOPQRSTUVW XYZABCDEFGHIJKL MNOPQRSTUVWXYZABC DEFGHIJKLMNOPQRSTUV WXYZABCDEFGHIJKLMNOPQ RSTUVWXYZABCDEFGHIJKLMN OPQRSTUVWXYZABCDEFGHIJKLM NOPQRSTUVWXYZABCDEFGHIJKLMN OPQRSTUVWXYZABCDEFGHIJKLMNOPQ RSTUVWXYZAB...

 
ALPHABET CHALLENGE AHHHH
 
"Seriously, another alphabet challenge?"Leaky Nun 56 secs ago
 
11:12 AM
o_O
 
DANGER: THERE'S A WILD ALPHABET TRIANGLE ON THE LOOSE
5
 
0
A: Alphabet triangle strikes again

TùxCräftîñgPython, 267 bytes import base64,gzip;print(gzip.decompress(base64.b64decode('H4sIAISNuVcC/43RWxKCMAyF4fd/V4AilIuKYoH9L0SmMDTTgTbP35zkNM3Iixv38lHVmKbt+ueL9/D5jj87zSzZqg4NG+7GNAtrWoRtxGGesEHMETImiGCiJ/pLiqRiu+INU++yyWuchUitOr18LIRqXvjLmhBGXcIJuhJCUDf38gdp7WcSvQIAAA==')).decode("ascii"))

 
> import base64,gzip
...
o_O
 
yay compression
 
Whyyyy D:
 
11:19 AM
because
too lazy to create a actual program
 
Question: How does one escape a ` in an inline code block using answer-Markdown
 
````\\`````
bruh
 
@TùxCräftîñg yeah, backslash doesn't work on answers
> ``Internal`PartitionRagged``
huh, that fixed it
 
@LeakyNun here is an 85
 
YGAgYCBgYA== IIRC (base64 because idk how to escape ` here)
 
11:23 AM
>,[>+[>+<-],]
>
[
  >>+[<+<->>-]
  +<[>+<-]
  <
]
<<
[
  [<]
  >.,
  >[>]
  >>+>--[<]
  <[[>++<-]++++++++++.,<<]
  <
]
 
@TùxCräftîñg ` = `\``
 
@TùxCräftîñg yeah, it's a single backslash in chat
 
@MitchSchwartz I was thinking something was weird when you posted this...
 
just a little joke :)
 
11:34 AM
Ah :P Thought someone stole your account there for a sec
 
> Anonymous function. Takes no input and returns a string as output. Golfing suggestions welcome.
I've been golfing my program explanations as well
 
0
Q: Score my golf round!

ThreeFxSince this SE community is about golfing, I thought a golf-related challenge would be appropriate. Explanation Normally, the objective of golf is to finish a hole (and consequently, the entire round) with the least amount of strokes. This is a simple version of golf: Play until you hole the bal...

 
@MitchSchwartz Hmm what about this?
 
@MitchSchwartz You should post it lol
 
11:53 AM
0
Q: The Piggyback Sequence

DerpfacePythonI made my own sequence recently (called the Piggyback sequence), and it works like this: P(1), P(2) and P(3) = 1. For all P(n) where n>3, the sequence works like this: P(n) = P(n-3) + P(n-2)/P(n-1) So, continuing the sequence: P(4) = 1 + 1/1 = 2 P(5) = 1 + 1/2 = 3/2 P(6) = 1 + 2/(3/2) = 7...

 
12:50 PM
I've got another proposal for additional scoring tags, I'd appreciate feedback/votes:
0
A: Classification of code challenges

Nathan MerrillI propose two very similar tags, largest-output and smallest-output, to be used as scoring tags These tags count the number of chunks (bytes, by default) in the final output. The person with the most/fewest chunks wins! The term "chunk" here is intentionally broad: the OP can define what he wa...

 
this is zhy i cqnt zrite correctly
 
is clavier keyboard
 
lel we use klavye in turkish
 
@TùxCräftîñg why use AZERTY keyboard D:
 
12:58 PM
my computer added it idk why
but i use QWERTY
and, srs, why on the earth the AZERTY keyboard have a key for ù, which is in only one word but not a key for œ
 
3
Q: Print every printable ASCII character without using it

Helka HombaIn a programming language of your choice, write 95 programs, each of which outputs a different one of the 95 printable ASCII characters without that character occurring anywhere in the program. For example, if your language was Python, your program that outputs the character P might be print(ch...

 
Typewriters don't have 1, maybe AZERTY was a typewriter format?
 
@NewMainPosts :D:D:D::D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:DD:D:D:D:D:D:D
@ReleasingHeliumNuclei like QWERTY
 
letters like ù was written in two steps with typewriters:
1: u
2: `
 
1:43 PM
Compiling custom android kernel \o/
 
@HelkaHomba I understand why you added the rule about printable-ascii, but that basically makes it impossible to do a vim solution because <esc> is unprintable. :(
 
and in caker too because caker use greek chars ;_;
 
1:56 PM
0
A: Print every printable ASCII character without using it

Releasing Helium NucleiBrainfuck, 1770 bytes DNP: 46 (.) >-[-[-<]>>+<]>-. >-[-[-<]>>+<]>. >-[-[-<]>>+<]>+. >-[++>+[<]>+]>. +[->-[---<]>-]>. >-[+<[-<]>>++]<. >+[-->+[<]>-]>-. >+[-->+[<]>-]>. >+[-->+[<]>-]>+. --[>+<++++++]>--. --[>+<++++++]>-. -------[>-<-]>[->-----------------------------------------------------------...

at last
 
2:08 PM
@DJMcMayhem You can now do a non-competitive answer
 
Thanks
 
>>> def f(n):
...  if n <= 2: return 2
...  return n ** f(n - 1)
...
n = 5 is truly enormous
 
0
Q: Javascript tips: 2 to the power of x multiplied by n

Avi JainI'm new to ES6 and code-golfing. Here's the original function(){} function puzzle(n, x) { return n * Math.pow(2, x); } And here's what I have so far => let puzzle=(n,x)=>n*2<<(x-1) But the solution requires lesser characters. I went through the 'Code Golfing with ES6' thread,bu...

 
wow my brainfuck answer is about five thirds of the python answer
 
@TùxCräftîñg oeis.org/A049384
 
2:14 PM
python is bore verbose thsn i thought
 
Don't you love it when your answer lands on a nice even byte count?
0
A: Print every printable ASCII character without using it

DJMcMayhemMATL, 305, 302 300 bytes Every single program looks like this: 32c 33c 34c 35c .... Except for Digits. Here are the programs for 0-9: 1q 0Q H I 3Q K 5Q 6Q 7Q 8Q 'c'. This program is 'C'k You can use matl.tio to verify any of them.

 
lemme add 7 bytes to my answer
it would become 1777
 
0
A: Sandbox for Proposed Challenges

muddyfishAlphabet ripple You must print out this exact text: abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba abcdefghijklmnopqrstuvwxyyyyxwvutsrqponmlkjihgfedcba abcdefghijklmnopqrstuvwxxxxxxwvutsrqponmlkjihgfedcba abcdefghijklmnopqrstuvwwwwwwwwvutsrqponmlkjihgfedcba abcdefghijklmnopqrstuvvvvvvvvvv...

 
@NewSandboxedPosts NO
xD
 
I have a golfing "library" for Python.
 
2:25 PM
Leaky Nun edited one of my deleted post to add syntax highlighting
 
> syntaxic
 
@NewSandboxedPosts Flag as spam?
 
@flawr That isn't a promotion for anything.
 
I mean the abuncance of alphabet fixed output challenges...
 
Just because you can't tell what it's selling doesn't mean it's not spam.
3
 
2:35 PM
@mınxomaτ I tend to not be on the weekends, but you caught me now. What's up?
 
@Optimizer Well this weekend I was at an Airshow again. Guess what happened.
3
user image
2
 
It's clearly not spam. It's just a type of challenge that people loudly complain about while continuing to upvote and answer them.
 
@DJMcMayhem I never upvoted these!
 
2:38 PM
Yeah, I haven't either but clearly someone (the majority) is.
 
 
So, I have a golfing "library" for Python.
 
idea: possibility to chain functions
a(l()) == a();l()
 
I'll start accepting ideas later. But now it's in the long queue.
So, can I use the library for participating in challenges and what is required for that?
 
Any perl wizards in the room?
 
2:53 PM
exempt
 
i can do some things in perl
 
Have you tried The 2nd moniter (I dont know if right place)
 
So, for when I'm checking if an array is defined, can I just remove define()?
 
exempt
 
Bah, it's such a quick question and it had to do with golfing in a way.
Welp okay
@muddyfish Nope not the right place.
This is a functionality question, not a convention question.
 
2:56 PM
Ok, didn't think so somehow
 
@zyabin101 y u do dis ;_; tbh golfing libs are rarely a good idea
 
I'm compiling Android kernels and it was suggested by the compiler.
 
Just make an interpreter for it that just calls eval and call it a new language
 
But I do not want to make a mistake when it comes to that, because it was located in the hardware time code.
 
@DJMcMayhem "=nr␉32)↵p works for space.
 
2:58 PM
Cmc: calculate a%b but if it is 0, return b instead of 0. For example 5 % 3 == 2, 6 % 3 == 3
 
Pasting from the expression register, mm-hm~.
 
@DJMcMayhem lambda a,b:a%b or b
 
@DJMcMayhem a->b->a%b||0
 
@Lynn what's ␉that unprintable character?
 
@DJMcMayhem D{M)+
 
2:59 PM
@DJMcMayhem Pyke, 3 bytes R%|
 
@DJMcMayhem Tab
 
@Lynn just use %9o
 

« first day (2031 days earlier)      last day (2804 days later) »