Expand compressed brain-flak
code-golf string brain-flak balanced-string
I was thinking about what the most efficient way to encode brain-flak programs would be. The obvious thing to do, since there are only 8 valid characters, is to map each character to a 3-bit sequence. This is certainly v...
@NathanMerrill I discovered Eiffel seconds after asking Dennis to add a different language to TIO and I want to request Eiffel to be on TIO except now it feels akward.
1. is there a golfier way to check for 0 given a nonnegative number than `<1`? alternatively is there an equivalent to perl 6's `%%` 2. is there a golfier way to do `1..++$n`
Inspired by Digits in their lanes and 1, 2, Fizz, 4, Buzz
Introduction
Your task is to generate exactly the following output:
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
...
A few years ago I was looking at how hidden comments might be more discoverable. As a result I talked with the developers about implementing a change so that when clicking "show X more comments the focus would change to show the oldest newly revealed comment. That way readers would not have to sc...
Well I don't have python-pcre installed, for one thing
I don't remember ever typing it in
$ sudo dnf history list pcre-devel
ID | Command line | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
100 | update | 2018-03-14 14:20 | E, I, U | 286 EE
32 | install mono-complete | 2018-02-12 22:29 | Install | 31 EE
30 | remove mono-* | 2018-02-12 22:25 | Erase | 17 EE
3 | install zsh vim mono-dev | 2018-02-07 16:24 | Install | 69 EE
@quartata ^ would indicate it came with mono. Why it isn't showing up as a dependency of mono, I have no idea.
CMC: the pattern is too obvious but too tedious to describe, so an example is given. Input is 3, and output is [[3,3,3,3],[2,3,3,3],[1,3,3,3],[0,3,3,3],[0,2,3,3],[0,1,3,3],[0,1,2,3]]
Given a positive integer n, do the following (and output every stage):
start with a list containing n copies of n.
do the following n times:
at the ith step, gradually decrement the ith entry of the list until it reaches i
So, for example, if the given n is 4, then you start with [4,4,4,4], a...
Write a program that, when given the input on the left, output the result on the right:
呼んでいる 胸のどこか奥で yo n de i ru / mu ne no do ko ka o ku de
いつも心踊る 梦を见たい i tsu mo ko ko ro o do ru / yu me wo mi ta i
悲しみは 数えきれないけれど ka na shi mi wa / ka zo e ki re na i ke re do
その向こうできっと あなたに会える so no mu...
I can never understand why JS allows using names in object keys ({key:"value"}) and json doesn't allow them ({"key":"value"}). Shouldn't it be reverse?
@Soaku JS allowing them was part of the ES spec, JSON not allowing them is to make it easier to parse I guess? because it reduces the number of data types by one
@ASCII-only But on the other side, JS is dynamic, so var key=1;console.log({key:"test"}), should, in theory, print {1:"test"}. It's how it works in any other language I know, with such or similar syntax. JS parses it differently. That wouldn't be such problem in JSON tho, since it doesn't allow variables.
That appear to make J programmers can't read code of others.
(at least those who use long names can't read code of those who use short ones)
(C has a similar issue, those who define one set of macros can't read code of those who define other set of macros, but that's not too much of a problem)
Not Quite Roman Ternary
code-golfinteger
Given an integer n ≥ 0 , output it in a non-positional base-3 notation, using digits 139ABCDE… and a 1-character separator. Every digit is a consecutive power of 3 and the digits on the left side of the separator are negated, e.g. A931|B → 81−(1...
Is it a valid number theory expression?
A number theory expression contains:
There exists at least one non-negative integer (written as E, existential quantifier)
All non-negative integers(written as A, universal quantifier)
+ (addition)
* (multiplication)
= (equality)
>, < (comparison operators)
Anonymous
Also I didn't notice that it was 100 and not 101 until now
Given an integer n ≥ 0 , output it in a non-positional base-3 notation, using digits 139ABCDE… and a 1-character separator. Every digit is a consecutive power of 3 and the digits on the left side of the separator are negated, e.g. A931|B → 81−(1+3+9+27) → 41. A digit may appear only...
I decided to see how dense commands could get if you had a simple jelly like language, but all operands were order dependant, and could take variable arguments
JavaScript (ES6), 82 bytes
Outputs in lowercase, which should hopefully be fine.
f=(n,k=0,s='|',c='13'[k]||(k+7).toString(36))=>n?f(-~n/3|0,k+1,[s,s+c,c+s][n%3]):s
Try it online!
Similar to Leaky "Ninja Master" Nun's answer and also based on xnor's answer.
Related:
What to do about widely disliked questions that don't technically break any rules?
Unspoken challenge rules
What does "unclear" mean?
[Gaming Meta.SE] A Close Vote is not a Super-Downvote. Please don't use it as one
We have a lot of widely-disliked challenges. Some of them are wro...
Find the Intersection code-golf geometry
Challenge
Given some planes in an n-dimensional space, return the intersection of these planes with the highest degree, if it exists.
Details
You will be given two integers, n and k, such that 0 < k ≤ n and 1 < n. You will also be given (n-k) hyperplan...
well, technically, there is a comment indicating lack of understanding, and it has 4 upvotes, that means 5 people don't have a clue about the challenge and it should've been closed as unclear