Полигон OEIS


12

Это цепочка ответов, связанная с OEIS.

О, это оправдано тем, что компании нужна одна программа для распечатки своих последовательностей OEIS, и у них есть все языки.

Формат цепочки ответов работает следующим образом:

Кто-то отправляет первый ответ, из которого вытекают все дальнейшие решения. Этот ответ является программой, которая, учитывая число N, вводит N-е число в последовательности OEIS любого индекса, который они выбирают (мы будем называть его последовательностью 1), на любом языке, который они выбирают (язык 1)

Кто-то еще приходит и выбирает свою собственную последовательность (которая должна отличаться от предыдущей и от всех предыдущих последовательностей). Они составляют программу на другом языке (который должен отличаться от всех предыдущих языков), в которой задано число N на языке 1, выводится N-е число последовательности 1, а заданное число на языке 2 выводит N-е число последовательности. 2.

Этот процесс продолжается до бесконечности.

N-й член последовательности - это термин, который появляется n раз после первого, начиная с первого элемента. Здесь мы используем 0 и 1-индексацию, чтобы быть проще для кодеров!

Нет языка или последовательности повторного использования.

Входные данные должны быть целым числом или строковым представлением целого числа, а выходные данные должны быть правильными значениями последовательности. Обработка ошибок (не входной int) не требуется.

Вы не должны публиковать дважды подряд.

Вы должны подождать час или больше, прежде чем писать снова.

Кто бы ни был вторым последним, чтобы отправить после недели без ответов (человек, который не разорвал цепь) побеждает, хотя соревнование может продолжаться бесконечно. Если вы последний и можете показать, что можете добавить еще один язык, вы продолжите испытание до следующего победителя.

Вы можете предположить, что ввод или вывод не будут выходить за пределы числового диапазона вашего языка (например, предполагая, что предел IEEE не будет превышен какой-либо последовательностью), но не обманывайте и злоупотребляйте этим, используя язык, который имеет только 1.

Любая последовательность может быть выбрана, если она не использовалась ранее.

Ввод не может быть за пределами для последовательности, которую вы используете.

Две разные языковые версии - это разные языки (Python 2 и Python 3 считаются разными языками). Это не жестко, но, как правило, если оно отделено от другой версии того же языка в TIO, оно отличается.

Это не запрещено, но попробуйте один раз не использовать формулу, которую дает OEIS.

Если ваш полученный код имеет длину более 65536 символов, предоставьте ссылку для доступа к нему (например, Pastebin).

Вот и все, и все. Готовы? Поставил? ВЕСЕЛО!

Да, это «один OEIS за другим», но на мультиплеере. Я думал, что это будет круто.


1
Мне очень понравился один OEIS за другим, но я не очень хорош в полиглотах, так что я, вероятно, посмотрю этот со стороны.
Джузеппе

О, парень, это звучит знакомо: sweating:
HyperNeutrino

Да уж. Думал, что это будет круто, и я этого не видел.
Андрей


1
В некоторых материалах используется 0-индексирование, а в других - 1-индексирование (см. Комментарии в разделе № 10). Я предлагаю вам разрешить оба.
Робин Райдер

Ответы:


2

15. Комментатор , A020739

//0q   GxxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLGC//*/0#
/*	
박망희		   		0#
;*/	
 	

n=>5/2>2?1:40-n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
               //ip@
               //
;/**/
//I01-* h
//
 ;/*'""""""'""" '""""""""""'"""""'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Попробуйте онлайн!

C #
Brainfuck
Runic Enchantments
Jelly
Gol> <>
Javascript (Node.js) (Все 1s)
вводные
Пробелы (Все 3s)
05AB12 (Все 0s)
Unreadable
Grass
Ширина
AlphaBeta
Aheui (Все 2s)

У меня было несколько планов с Комментатором, но только один сохранился контакт со всеми остальными языками. Одна из них вызвала ошибки в Jelly (iirc), и я не смог ее устранить, потому что не знаю, почему Jelly интерпретировал байты так, как это было.


Осталось языков (по сравнению с предыдущим, я нашел несколько новых!): Около 6-12.
Draco18s больше не доверяет SE

Не могли бы вы дать мне несколько стартовых указателей / советов по Руническим чарам ... Я смог добавить код для нового языка, и единственное, что осталось исправить, - это Рунические чары. Если я правильно понимаю, RE - это двумерный язык для пеших прогулок, который начинается слева вверху и меняет направление в зависимости от таких вещей, как /\и его мана. Не могли бы вы дать краткое объяснение потока выполнения в этом последнем номере. 15 ответ для рунических чар?
Кевин Круйссен

1
@KevinCruijssen It doesn't start at the top-left, different from ><> and a lot of other 2D languages. It starts at any (and all) of ><^v. The only time it starts at the top left is if the code contains none of those bytes and is only one line long. So this polyglot has a lot of IPs in Runic, but the only one that does anything (currently) is this one: >2?1:40-n/. The 2? skips the 1: and so the first instructions are push 4, push 0, subtract (4-0 → 4). Then a lot of nothing happens until it gets to /ip@ which results in take input, pow(y,x), print-and-terminate.
Draco18s no longer trusts SE

And I do mean a lot of IPs. Most end up performing a stack-underflow in some manner and terminating without generating output.
Draco18s no longer trusts SE

Ah ok, that makes sense, thanks! And I just realized I forgot to build in your latest Commentator as well. Will see if I can fix both to complete my answer.
Kevin Cruijssen

4

4. Jelly, A000312

n=>40-n//
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.
       //ip@
       //
;/**/

C# (Visual C# Interactive Compiler)
brainfuck
Runic Enchantments
Jelly

Explanation:

We only account for the last line, all of the other lines are ignored.

;/**/ Argument: z
;/    Reduce z by ; (concatenation) [1]
      z is an integer, so this just returns z itself.
   */ Reduce z by * (exponentiation) [2]
      Again, this returns z itself.
  *   Exponentiation: return [1] ** [2]
      This resolves to (z ** z).

To make C# ignore the code, we're trying to put it in a comment. However, a line starting with / isn't valid in Jelly, because / needs an operand. The operand we're using here is ;, since that also fits perfectly as a semicolon in C#. In fact, the semicolon and empty multi-line comment together make a link that calculates 2z=zz. Note that the function submission in C# is still valid, as there's no general consensus disallowing multiple statements in an anonymous function submission (e.g. imports).


I'd love am explanation of how the Jelly code does its thing.
Draco18s no longer trusts SE

@Draco18s Added.
Erik the Outgolfer

Ah, perfect. Explains that. Thanks much.
Draco18s no longer trusts SE

3

16. Java 8, A000290

//0q   GxxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLGC//*/0e#'
/*  
박망희             0#
;*/ 
    //\u000A\u002F\u002A
n=>//\u002A\u002Fn->
/**/""+n==""+n?5/2>2?1:40-/**/n:n*n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
                          //ip@
                          //
;/**/
//I01-* h
//
 ;/*""'"""'""""""""""'"""" "'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Never thought I'd see the day where I would be able to add a Java answer as 16th answer in a polyglot-chain! :D

1. Try it in C#: a(n)=40n
2. Try it in brainfuck: a(n)=1+n mod 2
3. Try it in Runic Enchantments: a(n)=4n
4. Try it in Jelly: a(n)=nn
5. Try it in Gol><>: a(n)=n
6. Try it in JavaScript: a(n)=1
7. Try it in Parenthetic: a(n)=1 if xn+yn=zn has a nontrivial solution in integers, otherwise a(n)=0
8. Try it in Whitespace: a(n)=3
9. Try it in 05AB1E: a(n)=0
10. Try it in Unreadable: a(n)=n
11. Try it in Grass: a(n)=n/10(log10(n))
12. Try it in Width: a(n)=n+1 with n2
13. Try it in AlphaBeta: a(n)=1n
14. Try it in Aheui: a(n)=2
15. Try it in Commentator. a(n)=2n+6
16. Try it in Java 8: a(n)=n2

Explanation:

Let me start by saying that although I've heard from each of these languages before here on CGCC, I'm only skilled with Java, C#, 05AB1E, and Whitespace, and apart from that can read the JavaScript part of the code. The other languages are mostly unfamiliar for me, so I hoped after the changes I had in mind to make the Java interact with C#/JavaScript, most other languages would still work.

The first main thing to tackle was Java's n-> vs C#/JavaScript's n=>. Java support unicode values as part of the code, so using the following:

//\u000A\u002F\u002A
n=>//\u002A\u002Fn->

Will be interpret as this in C#/JavaScript:

//\u000A\u002F\u002A
n=>//\u002A\u002Fn->

But as this in Java:

//
/*
n=>//*/n->

This is because \u000A is a line-break, \u002F is / and \u002A is * in Java.

Then to differentiate the sequence between Java vs C#/JavaScript I added the following:

""+n==""+n?...:n*n

where ... is the existing 5/2>2?1:40-n, and n*n is the Java part of the code for oeis sequence A000290 (squares a.k.a. a(n)=n2).

Why does this work? In Java Strings are Objects, where == is used to check if references of objects are pointing to the same place (or to check if primitives are equal), and the actual Object.equals(Object) has to be used to check if the values of these Objects are the same. So ""+n==""+n will be falsey in Java, but truthy in C#/JavaScript.


After that was tackled (by re-using the existing newlines to not break the Whitespace program), some things had to be fixed. Four of the existing programs were failing now: Runic Enchantments, Jelly, Unreadable, and Commentator.

The fix for Unreadable was easy. We added four """" before the first ', so we simply put the ' somewhere earlier (I placed it at the end of the first line), and remove the leading '"""" from the Unreadable part of the code at the bottom.

After that came Jelly, which was giving an IndexError: pop from empty list. I'm not too skilled in Jelly, so I don't exactly know why it gave this error. If I remember correctly the last line will be the main-link of a Jelly program, and because the code in that last line doesn't use any of the other links, everything else should be ignored. But somehow the part ""+n==""+n still gave some issues. I was able to fix this by adding /**/ in front of that line.

As for Runic Enchantments, it didn't output anything anymore. @Draco18s pointed out to me that Runic Enchantments starts at all > simultaneously, but only the >2?1:40-n/ and /ip@ were relevant. This was a huge help to understand the flow of the Runic Enchantments program, and I was able to fix the path by adding a /**/ at >2?1:40-/**/n:n*n, and changing the positions of the //ip@, //, and space on the last line.

All that's left was Commentator. At that point I realized that my previous fixes of adding /**/ weren't such a good idea after all, since it would output a bunch of additional rubbish due to the builtins /* (convert active to unicode character and output) and */ (output active as number).. >.> After a bit of fiddling around and trying some things, the fix turned out to be very easy: I've added an e before the # on the first line. e# is the builtin to negate an active, fixing the issues caused by the code I added (apparently).


2
Wow, good job on that. I didn't anticipate seeing Java get added at this point either.
Draco18s no longer trusts SE

@Draco18s I'm glad this polyglot challenge didn't start with Python, since then it would have already been impossible to add Java. JavaScript/C# are rather similar as Java in terms of comments and execution, so that helped a lot here. Glad I have it working. Good luck on the next chains. I'm probably not able to make any more chains, but I hope to see it grow at least a few more times. :)
Kevin Cruijssen

The ones I have prepped are ones that either use a character set that non-interferes and ignores characters not in its instruction set, or 2D languages that use different rules.
Draco18s no longer trusts SE

2

6. JavaScript (Node.js), A000012

//
n=>5/2>2?1:40-n//
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.
               //ip@
               //
;/**/
//I01-* h
//
 ;/**/

C# (A022996): Since 5/2==2 the function returns 40-n (Line 2)

BF (A000034): The added part only pushes the whole tape one cell to the right, others unchanged (Line 2-3)

Runic (A000302): The ? after 2 skips the 1:, and other operations follows from 4 (Line 2)

Jelly (A000312): Unchanged last line

Gol><> (A001489): Unchanged first column

JS(ES6) (A000012): Since 5/2>2 the function returns 1 (Line 2)

Sneaked the ternary 5/2>2?1:40-n into the C# part. In C# since 5/2==2 the function returns 40-n, while in JS 5/2>2 the functions returns 1. The C-style comments made it nearly impossible to add more practical languages (specifically C and Python). More spaces are added on lines 4-5 to ensure that the Runic part works.


1
The C-style comments made it nearly impossible to add more practical languages (specifically C and Python). Such is the way of polyglot challenges.
Draco18s no longer trusts SE

2

8. Whitespace, A010701

//   
	
		   		
	
 	

n=>5/2>2?1:40-n//(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.
               //ip@
               //
;/**/
//I01-* h
//
 ;/**/

Try it online!

C#
Brainfuck
Runic
Jelly
Gol><>
Javascript
Paranthetic

I have no idea how Whitespace works. I tried super hard to multiply the input with another value, but it kept complaining about infix arithmetic, so as I had input working, output working, and push-value-to-stack working, so I just went with that.

The input value appears to get lost when pushing 3 to the stack, but oh well. Enjoy a sequence of 3s. The program does technically take input it just ends up discarding it.

I also don't know how Paranthetic works, so I can't actually verify that submission as valid, but as far as I can tell the Whitespace code doesn't interfere.

Future answers: be aware that tabs in Runic are a single instruction wide and play havoc with code layout.


I don't know Whitespace either, but reading from the documentation, it seems input values are actually stored at the heap location pointed to by the top of the stack, not on the stack itself.
ArBo

@ArBo Possible. I just know that if I did "read, print" I would get my input back. But if I did "read, push 10, print, print" I would get 10 and an error. So I went "heck with it" and just did what I knew I could.
Draco18s no longer trusts SE

1
FYI: input in Whitespace is indeed pushed to the heap, which acts as a dictionary/map. So let's say you do: push 10, read STDIN. The stack will be empty, and the heap will contain [{10: input}]. To make a cat program that reads and outputs immediately in Whitespace, you usually want to do something like: Push 0; duplicate 0; read STDIN; retrieve (this will pop the 0 we duplicated, and push the value from heap-address 0 to stack); pop and output to STDOUT. PS: Here a useful online debugger I always use.
Kevin Cruijssen

@KevinCruijssen Useful!
Draco18s no longer trusts SE

2

11. Grass, A000030

//0q   
	
		   		
	
 	

n=>5/2>2?1:40-n//(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
               //ip@
               //
;/**/
//I01-* h
//
 ;/*'""""""'""" '""""""""""'"""""'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Try it online!

Grass ignores all characters except w, v and W; conveniently, these three characters are ignored by several of the previously used languages. Luckily, sequence A000030 (return the initial digit in base 10) was still available, as coding even slightly complicated functions in Grass is beyond my ability.

C#
brainfuck
Runic
Jelly
Gol><>
JavaScript
Parenthetic
Whitespace
05AB1E
Unreadable

The relevant part for Grass is wvWwwWWwwwwwwWwWWWw. Here is my (probably flawed) understanding of how it works: the stack is initialized as OUT::SUCC::w::IN::ε (that w is just the character w). Each instruction adds an element to the stack (they are never popped); the number of ws or Ws indicates how deep to go in the stack; v separates instructions.

wv        # identity
Www       # identity OUT
WWwwwwww  # identity IN (read in 1 character)
Ww        # apply the function identity IN
WWWw      # apply the function identity OUT to the value at the top of the stack

If the input is 1234, at the end, the stack probably looks like this: 1::1::id IN::id OUT::id::OUT::SUCC::w::IN::ε.

It could be made shorter (don't need to define id OUT for example), but I stopped as soon as I found a version which worked.

If someone who knows Grass wants to correct/improve the explanation, please edit my answer!


This is one of the languages I identified as workable, but wasn't able to understand the documentation and write the code for. +1
Draco18s no longer trusts SE

1
@Draco18s I've tried to add an explanation of how it works.
Robin Ryder

Certainly helps, but still head-scratching. I've had to rework one of my future answers as you yoinked A000030 (languages that take input as single bytes are a pain; 3 byte program turned into nearly 60 (yes, I really have planned that far ahead)).
Draco18s no longer trusts SE

2

17. Pepe, A000578

//0q   GxxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLGC//*/0e#'
/*	
박망희		   		0#
;*/	
 	//\u000A\u002F\u002A
n=>//\u002A\u002Fn->
/**/""+n==""+n?5/2>2?1:40-/**/n:n*n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
                          //ip@
                          //rEeE rEeeEe reEE
;/**/
//I01-* h
//
 ;/*""'"""'""""""""""'"""" "'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Online Interpreter

C#
Brainfuck
Runic Enchantments
Jelly
Gol><>
Javascript (Node.js) (All 1s)
Parenthetic
Whitespace (All 3s)
05AB12 (All 0s)
Unreadable
Grass
Width
AlphaBeta
Aheui (All 2s)
Commentator
Java

You'll have to excuse the Pepe link for not containing the full source: The interpreter disregards any code that is not Pepe (lit. any character not in the set RE re) and so its short link doesn't bother encoding it. Ditto input values.

Computes a(n)=n3

The AlphaBeta has started throwing errors after writing output, but as a prior answer injected that issue I left it alone. I had planned on fixing it for this answer, but I need to spend some time digging into the jump offsets to resolve the issue. The error with inputs >0 are easy to fix, but giving it 0 will produce the same error and it will take time to relearn the code in order to fix the offset for it. I wish I could use W instead of UUUUUUUUUU, but it plays havoc with the Grass code.


Another 4-11 languages to go. One of the ones I'd templated out decided to make the Brainfuck throw a hissy fit, so I didn't use that one for this answer (I was going to!). Given how early the BF was done, I'm questioning if it ever worked and I just didn't check the BF.
Draco18s no longer trusts SE

[Full disclosure regarding accept mark] I forgot that Thursday the 4th was a holiday and didn't have access to my notes in time to post this answer before a week had gone by. I had slowed down my answering rate in an attempt to allow others to find and post answers; I had not intended to outlast the grace period (had I wished to do so, I could have by not posting #15 at all, letting #13 get accepted) as I was interested in seeing how far this would go and I intend to post the other 4 or 5 languages I've solved for before listing the remaining langs I think could still work, if I can't do them.
Draco18s no longer trusts SE



1

7. Parenthetic, A019590

//
n=>5/2>2?1:40-n//(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.
               //ip@
               //
;/**/
//I01-* h
//
 ;/**/

C# (A022996)

BF (A000034)

Runic (A000302)

Jelly (A000312)

Gol><> (A001489)

JS(ES6) (A000012)

Parenthetic (A019590)

Parenthetic ignores everything but the ( and ) characters. I've had to insert 1s before every closing parenthesis to stop Jelly from freaking out though (EDIT: I left one ) unpreceded by a 1, so apparently not all of them need one, but it's too late to golf it down now). The actual code defines a lambda called ((())), that can be called on a number to yield the result (1-indexed).


I would like to understand how to pass input to Paranthetic, because I can see that the sequence is not constant, but don't know how to actually get the program to change its output. Nope. Nope. Nope.
Draco18s no longer trusts SE

@Draco18s It doesn't take input in the sense you're trying to do. The code itself defines a function, called ((())). The footer calls that function, with whatever argument you want. The set of parentheses under the number 2 means 2 in Parenthetic. Changing the final ()() to ()*n will call the function on n.
ArBo

1
Ahh...That makes sense now. It was just something I'd been poking at because I had no good way to verify the submission and insuring is validity moving forward (I was in a "it still outputs the same thing, so it must be fine, I guess?" mode). That helped.
Draco18s no longer trusts SE

1

10. Unreadable, A001477

//0q   
	
		   		
	
 	

n=>5/2>2?1:40-n//(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.
               //ip@
               //
;/**/
//I01-* h
//
 ;/*'""""""'""" '""""""""""'"""""'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Try it online!

C#
Brainfuck
Runic
Jelly
Gol><>
Javascript
Paranthetic
Whitespace
05AB1E

Unreadable, as its name suggests, is unreadable. In order to program it I had to use a template and then convert from readable text to Unreadable code.

[A=READ()];DO{(A+1)?:BOTH(PRINT(A),[A=READ()])}
[A=READ()]: '""""""'"""'""""""""""
PRINT(A): '"'"""""""'"""
A?: '""'"""
Functioning:
['""""""'"""'""""""""""];'"""""{('""'"""""""'""")?:'""""('"('"""""""'"""),['""""""'"""'""""""""""])}

All it does is read each character in the input and output it. One of the more boring sequences, but good for a language that's difficult to work with. I also toyed with using the sequence A000030 before getting the loop to work.

Working via remote desktop is a pain, you think things work, do all the links, then realize that one of them broke and didn't notice.


I forgot to remove it, but the ;/**/ in the middle area is not doing anything and could be removed. 99% sure. It was a Jelly chunk, but it got duplicated somewhere along the way and no longer serves a purpose.
Draco18s no longer trusts SE

@RobinRyder Ditto, also fixed link to Runic (bad copy-paste somewhere along the way). See #3 for an explanation of why it works in Runic.
Draco18s no longer trusts SE

For reference: I know for a fact that it is possible to add at least 5 more to the chain from here, but probably closer to 15.
Draco18s no longer trusts SE

1

14. Aheui, A007395

Slightly changed to make AlphaBeta works.

//0q   GxxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLGC
/*  
박망희*/               



n=>5/2>2?1:40-n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
               //ip@
               //
;/**/
//I01-* h
//
 ;/*'""""""'""" '""""""""""'"""""'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Try it online!

Aheui dismiss any non-Korean character, so 박망희 excuted, which prints 2 and terminates.

C#
Brainfuck
Runic Enchantments
Jelly
Gol><>
Javascript (Node.js)
Parenthetic
Whitespace
05AB12
Unreadable
Grass
Width
AlphaBeta
Aheui


So we have all 1, all 2 and all 3 now lol
Shieru Asakoto

@ShieruAsakoto oh, was there all 3? I didn't knew that.
LegenDUST

#8 is the all-3. Mine (#6) is the all-1.
Shieru Asakoto

*Crosses that one off the list.* Knew it would work, but didn't know how to program in it and the documentation wasn't easy to understand at a brief glance. Now to make sure the other answers I've written still have a place to squeeze into.
Draco18s no longer trusts SE

1
@Draco18s moved /* and it works now. And Aheui code is (slightly more) good to see.
LegenDUST


0

3. Runic Enchantments, A000302

n=>40-n//
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.
       //ip@
       //

Try it online!

C#

BF

If you need help keeping the Runic functional, there is the Esoteric IDE as well as my own IDE (built in Unity3D) in the master branch of Runic's git repo. Esoteric IDE doesn't handle displaying the IP directionality very well (primarily my own inability to add such to the existing framework).

All the BF creates a bunch of IPs that self terminate due to performing invalid actions (mainly due to stack underflow) while the > in the C# populates the stack with a 4, bounces of the comment makers (mirrors in Runic), reaching ip@ to execute x^4 on an input x and print the result.


0

5. Gol><>, A001489

//
n=>40-n//
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.
       //ip@
       //
;/**/
//I01-* h
//
 ;/**/

Try it online!

C#
Brainfuck
Runic
Jelly

Use single-line comment markers in C# to redirect the Fish IP to the operative code, I01-*h, reading input, multiplying by -1, and outputting the result. Gol><> made reading input and dumping the stack as a number easy compared to raw ><>.

Spaces inserted to insure the proper flow of the Fish and Runic IPs, where both C# and Jelly ignore the leading whitespace on the last line (and is a NOP cell in both fungoids).


0

12. Width, A020725

//0q   
	
		   		
	
 	

n=>5/2>2?1:40-n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
               //ip@
               //
;/**/
//I01-* h
//
 ;/*'""""""'""" '""""""""""'"""""'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

1-indexed. Outputs by exit code.

Try it online!

The only relevant characters to Width are a-zA-Z. The code Width runs is the following:

qnnAcaAcAAI

The first three characters, qnn, are no-ops. Ac reads an integer from input, a is a no-op, and then AcAA increments the integer by one. I ends the program, and the top of the stack is becomes the exit code. All other letters in the program are ignored since the program terminated.

C#
brainfuck
Runic Enchantments
Jelly
Gol><>
JavaScript
Parenthetic
Whitespace
05AB1E
Unreadable
Grass


I vaguely maybe remember running across this one in my search of eslolangs to consider for this challenge. I think I dropped it due to a conflict with another language I was considering, but I think I'm still good. Cursory check suggests I can make the two play nice.
Draco18s no longer trusts SE

0

13. AlphaBeta, A162672

//0q   GxxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLGC
	
		   		
	
 	

n=>5/2>2?1:40-n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
               //ip@
               //
;/**/
//I01-* h
//
 ;/*'""""""'""" '""""""""""'"""""'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Try it online!

I had originally planned to use sequence A000030 and the code JCL, but that got yoinked (I don't blame them, its a good sequence for languages that take input as single bytes). The original code for this entry after having to pick a new sequence was:

JiiiiihhZUUUUUNYAxcccccbCLDLxyzUUUUTTxxyzJCLOzWRxyxyzcccccbbCL
^                                                                 Read input (single byte)
                 ^          ^^^      ^^^^    ^  ^^^^^             Clear regisers
        ^                                            ^^^^^^^^^    Input = 0: print 0
 ^^^^^^^ ^^^^^                 ^^^^^^         ^                   Set jump locations
                  ^^^^^^^^                                        Print `1`
                          ^^                                      Print initial byte
                                         ^^^                      Read and print input
                                            ^                     (and loop)

Sequences of xxx or xyzxyz are useful spacers to make the jump-to targets easy values (46 is easier as "5*10-4"--9 instructions--than "4*10+6--ten instructions--but 50 is even simpler: only five). You'll see a fair few of those.

But as there are other bytes on the first line, the jump-to codels needed some new values and that turned into:

//0q   xxxJiiiiihhZUUUUUUNYAxcccccbCLDLxyzUUUUUTxxyzJCLOzWRxyxyzcccccbbCL

Avoiding executing this code as Width code just involved wrapping it in G to make it a string literal (which does nothing important in AlphaBeta), a command to pop the top of the stack, and then some extra W to make alpha beta not crash when exiting:

//0q   GxxJiiiiihhZUUUUUUNYAxcccccbCLDLxyzUUUUUTxxyzJCLOzWWWWWWRxyxyzcccccbbCLGw

To avoid conflicts with Grass, though, instead of popping the command with w C is used instead. Then the "exit program" jump is replaced with UUUUUU instead of WWWWWW This does leave the IP somewhere in the middle of the rest of the junk code, but far enough out that it doesn't print any errors. Any number of additional Us can be added in pairs if this becomes a problem.

//0q   GxxJiiiiihhZUUUUUUNYAxcccccbCLDLxyzUUUUUTxxyzJCLOzUUUUUURxyxyzcccccbbCLGC

The additional i that Runic ends up executing is a NOP on valid inputs as no-input-left-to-read pushes nothing to the stack ("reading all input" is a pain in Runic).

C#
brainfuck
Runic Enchantments
Jelly
Gol><>
JavaScript
Parenthetic
Whitespace
05AB1E
Unreadable
Grass
Width


Anywhere between 4 and 11 more languages to go. But here's some languages that could use some investigation: Ook!, Jolf, Blank, and Brackets. I don't know if they can be used or not, and my intuition says probably not, but haven't given them a bash (mainly because they're not on TIO).
Draco18s no longer trusts SE

0

18. ]=[, A010716, the all 5's sequence

//0q   GxxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLGC//*/0e#'[=====[===]]=[[==========]]=[
/*] 
박망희             0#
;*/ 
    //\u000A\u002F\u002A
n=>//\u002A\u002Fn->
/**/""+n==""+n?5/2>2?1:40-/**/n:n*n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
                          //ip@
                          //rEeE rEeeEe reEE
;/**/
//I01-* h
//
 ;/*""'"""'""""""""""'"""" "'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

This language isn't on TIO and its only interpreter is written itself in another interpreted language, which is also not on TIO. And the one that didn't play nice with Brainfuck last week at the last minute, but I figured out what was wrong a few hours after posting the Pepe answer, so I saved it for this week. Being a language not on TIO I was considering this one an ace-in-the-hole that could easily be tacked onto just about ANY entry and continue the chain.

Put the interpretter code into the "code" box at the top, code from the answer in the input, and click run and get an output (plus some extra junk that is always printed).

The operational portion of the ]=[ is this at the end of the first line:

[=====[===]]=[[==========]]=[

Its that trailing [ that played havoc with the Brainfuck (the rest being ignored, due to how [ and ] are handled by Brainfuck) and once I looked at the Brainfuck spec again I realized the problem and that all I had to do was insert a ] somewhere after the first line (as the ]=[ interpreter does not read newlines) and before the Brainfuck. I chose the 2nd line.

C#
Brainfuck
Runic
Jelly
Gol><>
JavaScript (Node.js)
Paranthetic
Whitespace
05AB1E
Unreadable
Grass
Width
AlphaBeta
Aheui (esotope)
Commentator
Java (OpenJDK 8)
Pepe


I still have 3 more languages worked out in detail and another 10 that should work, but which I haven't attempted.
Draco18s no longer trusts SE

0

19. Actually, A005843 (2*n)

//0q   GxxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLGC//*/0e#,2*1z⌂'[=====[===]]=[[==========]]=[
/*]	
박망희		   		0#
;*/	
 	//\u000A\u002F\u002A
n=>//\u002A\u002Fn->
/**/""+n==""+n?5/2>2?1:40-/**/n:n*n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
                          //ip@
                          //rEeE rEeeEe reEE
;/**/
//I01-* h
//
 ;/*""'"""'""""""""""'"""" "'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Try it online!

Operational part: ,2*1z⌂ (first line)

As terminates the program, none of the code after it has any effect, and none of the symbols before it result in any output or pollute operational memory adversely. Section exists within a comment (C#, JS, Java), only contains ignored characters (Commentator, ]=[, Pepe, Aheui...), is not on the last line (Jelly), or otherwise in un-executed parts of the code (Gol><>, Runic, AlphaBeta).

C#
Brainfuck
Runic
Jelly
Gol><>
JavaScript (Node.js)
Paranthetic
Whitespace
05AB1E
Unreadable
Grass
Width
AlphaBeta
Aheui (esotope)
Commentator
Java (OpenJDK 8)
Pepe
]=[ (link not possible, see #18 for instructions)


Still have 2 already worked out and a third that will be easy. Also, the sequence ]=[ can't be turned into a url.
Draco18s no longer trusts SE

0

20. Neim, A008592 (10*n)

//0q   ÷GxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLxGC//*/0e#§≈2*1z⌂'>[=====[===]]=[[==========]]=[
/*]	
박망희		   		0#
;*/	
 	//\u000A\u002F\u002A
n=>//\u002A\u002Fn->
/**/""+n==""+n?5/2>2?1:40-/**/n:n*n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
                          //ip@
                          //rEeE rEeeEe reEE
;/**/
//I01-* h
//
 ;/*""'"""'""""""""""'"""" "'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Try it online!

I have no idea how the heck Neim works. I know what the code here ends up doing, but I have no idea how the language itself works.

Also turns out I messed up the Brainfuck with #19. Due to command conflicts between multiple languages, changing Actually's input to § and then coercing it to an int with was the optimal solution.

C#
Brainfuck
Runic
Jelly
Gol><>
JavaScript (Node.js)
Paranthetic
Whitespace
05AB1E
Unreadable
Grass
Width
AlphaBeta
Aheui (esotope)
Commentator
Java (OpenJDK 8)
Pepe
]=[ (link not possible, see #18)
Actually


Can you believe I've still got 2 more I can do?
Draco18s no longer trusts SE

let's see how long it takes until wipeout
Andrew

Oh, I forgot to post another yesterday. Life's been real busy, trying to figure out who it is that keeps waking me up at 6:30 and/or 7:30 with a loud engine so I can report them to housing management and/or the city for noise disturbance. Also the new gold battle KOTH. Just creating the 20+ links for all the languages takes up about an hour now (even if there's no issues).
Draco18s no longer trusts SE

0

21. Flobnar, A010709 (All 4s)

//0q   ÷GxJiiiiihhZUUUUUUUNYAxcccccbCLDLxyzUUUUUTxyzJCLOzUUUUUURzyzxyzxyzcccccbbCLxGC//*/0e#§≈2*1z⌂'>[=====[===]]=[[==========]]=[
/*]	
박망희		   		0#
;*/	
 	//\u000A\u002F\u002A
n=>//\u002A\u002Fn->
/**/""+n==""+n?5/2>2?1:40-/**/n:n*n//AcaAcAAI(((1)(1)(1)1)((1)(((1)1)1)1)(((1)(1)1)(((1)((1)1)(1)1)1)(((1)(1)(1)(1)1)(((1)(1)((1))(1)1)((1)((1)1)(1)1)(((1)1)(1)(1)1)1)(((1)1)(1)1)(((1)1)1)1)1)1)
//[>[-]<[>+<-],]>>+<[->[>>+<<-]>[<+>-]>[<+>-]<<<]>>>>++++++[<++++++++>-]<<[>+<-]>+.wvWwwWWwwwwwwWwWWWw
                          //ip!4@
                          //rEeE rEeeEe reEE
;/**/
//I01-* h
//
 ;/*""'"""'""""""""""'"""" "'""'"""""""'"""'""""'"'"""""""'"""'""""""'"""'""""""""""*/

Try it online!

Flobnar starts at @ and expands outwards evaluating items as the rules dictate (@ evaluates to whatever's on its left, 4 evaluates to 4, + evaluates to whatever's on the left summed with whatever's on the right, etc). As the placement of the @ only comes into contact with Runic, a simple ! prevents alteration of Runic's stack.

Given that Flobnar's input metric is "one byte" and goes into an infinite loop if there are no bytes to read, I decided not to bother with anything more complex.

Previous languages

C#
Brainfuck
Runic
Jelly
Gol><>
JavaScript (Node.js)
Paranthetic
Whitespace
05AB1E
Unreadable
Grass
Width
AlphaBeta
Aheui (esotope)
Commentator
Java (OpenJDK 8)
Pepe ]=[ (link not possible, see #18)
Actually
Neim


Input evaluates the term to the south on EOF, it doesn't go into an infinite loop
Jo King

Ah, thanks. Even so, at one-byte-per-evaluation, it's a difficult thing to actually utilize. 4@ worked easily enough that I just went with that.
Draco18s no longer trusts SE
Используя наш сайт, вы подтверждаете, что прочитали и поняли нашу Политику в отношении файлов cookie и Политику конфиденциальности.
Licensed under cc by-sa 3.0 with attribution required.