News for hackers. Stuff that matters.
Re:Show HN: CFR[]: Very minimal drawing language with 5 comm... by unflxw on Saturday October 21, 2023 @05:05PM (#37970415)
This is really neat!

I made a space-filling curve:

[[[[[[[[[[[[[[[[FR]]FRR]]RRRRRRF]]FFFFFFFRR]]RRRRRRFFFFFFFFF]]FFFFFFFFFFFFFFFFFFFFFFFRR]]RRRRRRFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]]FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFRR]]

It's not very interesting by itself (it just fills the whole screen with white) but you get cool-looking visualisations of its fractal-like structure by putting "C" at different points of the opening brackets.

Re:Show HN: CFR[]: Very minimal drawing language with 5 comm... by bioxept on Saturday October 21, 2023 @06:36PM (#37971123)
That’s cool. Also adding “R”s at various positions leads to interesting effects.

For example:

C[[[RC[[[RC[[[CR[[[C[[C[C[FCR]]FRR]]RRRCRRRF]]FFFRFFFFRR]]RRRRCRRFFFFFFFFF]]FFFRFFFFFFFFFFFFFFFFFFFFRR]]RRRRRRFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]]FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFFFFFFFFFFCFFFFFFFFFFFFFFFFRR]]CC

Re:Show HN: CFR[]: Very minimal drawing language with 5 comm... by furyofantares on Saturday October 21, 2023 @06:51PM (#37971216)
Me too:

]

Re:Show HN: CFR[]: Very minimal drawing language with 5 comm... by oldbbsnickname on Saturday October 21, 2023 @08:57PM (#37971910)
New command: ;D
Re:Show HN: CFR[]: Very minimal drawing language with 5 comm... by acedio on Saturday October 21, 2023 @10:24PM (#37972304)
Tried seeing how small of a program I could fill the screen with. Came up with this, but feels like there has to be a more elegant solution ^^;

[[[[[[[[[[[[[[[[F]]]]]]]]RRF[[R]R]]]]]]]]]

Re:Show HN: CFR[]: Very minimal drawing language with 5 comm... by vitus on Saturday October 21, 2023 @11:28PM (#37972580)
Naive micro-optimization of your program (namely, things like FF is 1 char shorter than [F]) got that down to 40 chars:

    [[[[[[[[[[[[[[[FF]]]]]]]RRF[RRR]]]]]]]]]
I then found a solution in 37 which uses a slightly different approach (namely, create a pattern that spans the full X and Y output space, then shift it by one step each iteration):

    [[[[[[[[[[[[[[[[FFF]]]]]R]]]F]]]]]]]]