# MacGyver's Toolbox [duplicate]

In this question each answer will get a "toolbox" that can be used to construct a program/function. The toolbox will consist of two things:

• a list of programming languages

• a list of valid characters

You must write a valid program/function in one of the languages provided using only the characters in the toolbox. Your program/function should output the number of answers already present on this question.

Once you have written and posted an answer the language and characters you have used will be removed from the toolbox and 1 new language and 12 new characters will be randomly added to be used as the toolbox for the next answer.

## Rules

• Each answer will:

• Output the number of valid answers coming before it
• Contain a subset of the characters provided in the toolbox for that answer. (repeats are allowed)
• Be in one of the languages from the provided toolbox
• The next toolbox will determined by this python program. To generate the next toolbox put in the remaining languages and characters along with the post id of the last answer.

• The language list here is all the languages available on try it online at the time of this post. The characters have char codes 0-127.

• You may write either a full program or a function as your answer. Since REPLs are different languages they will not be allowed. (use the TIO version of every language)

• If a language uses a special encoding the characters should be interpreted as bytes (decoded from ASCII and padded with a zero).

• The starting toolbox will be randomized from this questions post id (126063), there will be 7 languages to start and I will add the characters echoprint0 and ascii 0-31 for free to get people started.

• You may not answer twice in a row

## Scoring

Each person will have a score equal to the number valid answers they have provided. There will not necessarily be an end and I will not be accepting any answers.

## Sporting

This is a competition, but I encourage you to put fun above winning while still staying competitive (if I could make the winning criteria "fun had" I would). Some things that are not fun:

• Intentionally using characters you don't need to stunt future answers.
• Attempting to game the post id system to make future tool boxes harder to use.
• Attempting to game the post id system to make future tool boxes easier to use.

I can't prevent any one from doing these things, but I will be downvoting any answers I suspect are doing this.

On a more positive note, here are some things that are good sporting and encouraged:

• Coordinating with other users in chat.
• Saving characters for harder or more restrictive languages
• Can we output numbers in bases other in 10? – Comrade SparklePony Jun 13 '17 at 14:09
• @ComradeSparklePony If that is the standard way of outputting in a language. – Wheat Wizard Jun 13 '17 at 14:10
• Well...an interesting setup that got nipped in the bud early due to too many missing characters for languages that are defined by a very small set of characters. Logicode got hosed by the lack of a 1 and ! in its toolbox. I managed to produce the string "0110" using ?,0 and + although I couldn't quite figure out what the ? actually did (and it was not in the language specification). But + was missing from the toolbox as well, along with = which would have allowed for variable assignment. Aaanndd...no o for output. – Draco18s no longer trusts SE Jun 13 '17 at 17:34
• @Draco18s I found an SML answer, so maybe now there are enough chars available for a logicode answer. – Laikoni Jun 14 '17 at 10:46
• Adding 12 new characters each time may have made this too easy. – mbomb007 Jun 16 '17 at 15:53

# 33. Minkolang, 9 bytes

"332"(O).


Try it online!

Next Toolbox

Never heard of this one before, I have no idea how it works. It just did weird stuff and I went "ok fine" and got it to print what I wanted. :D

# 38. Go, 20 bytes

First 20 byte Go solution on PPCG..? :P

func()int{return 37}


Try it online!

Next toolbox.

# 39. wsf, 58 bytes





Try it online!

Next toolbox

# 43. Logicode, 19 bytes

out @110100+@110010


Try it online!

Next toolbox

• I didn't know that Logicode could output anything other than 1 and 0, I thought we were going to have to wait until 100. – Wheat Wizard Jun 16 '17 at 13:17
• @WheatWizard: Yeah, at a first glance I was thinking the same but discovered that it could :) – Emigna Jun 16 '17 at 13:18
• Well brainbool got added an it can't output anything other than 1 and 0 for sure. So it looks like we are going to have to wait on that one. – Wheat Wizard Jun 16 '17 at 13:19
• @WheatWizard surely brainbool could output the correct number in base2? You said in the comments of the OP that outputting in a base other than 10 is acceptible if it's the standard way of outputting in that language – Skidsdev Jun 16 '17 at 13:26
• @Mayube Yes seems like it I forgot I said that. – Wheat Wizard Jun 16 '17 at 13:26

# 46. uBASIC, PRINt45

4PRINt45


I ran out of uppercase letters, so I used a lowercase t! I guess you could call it PRIN-t or Printy!

Try it online!

Next Toolbox

# 42. S.I.L.O.S, 8 bytes print 41

print 41


Try it online!

Little boring, but it works

Next toolbox

• Welcome to SILOS – Rohan Jhunjhunwala Jun 16 '17 at 18:06

# 48. Racket, cake eating peril (#47)

#lang racket (print 47)


"Cake eating peril?!?", you might ask. Well, if I said peak #7 in a rectilinear triple integral r(4) instead, then you'd all be confused and pinkcartgel() #47 just doesn't make sense, so cake eating peril (#47) was a natural choice. Plus, maybe Racket eats cake in it's free time. We'll never know.

It's no fun to say the chars you used sorted alphabetically. Anagrams are better. I'd suggest you do the same :).

Try it online!

Next Toolbox

# 54. ///, 2 bytes

53


Sorry for taking your numbers but there's really no better solution.

(oh wait, 5 and 3 got added to the toolbox again)

Try it online!

Next Toolbox

# 56. Go

package main

import "fmt"

func main() {
fmt.Println("55")
}


I learned this language just for this challenge. If I understood the challenge correctly, this should be valid.

Try it Online!

Next Toolbox

# 14. CJam, 2 bytes

I'll try to be a bit more creative next time.

13


Try it online!

Next toolbox

• Next character set: ABCDEFGHIJKLMNOPQRSTUVWWWWWWWWWWWWWXYZ What? 13 Ws? – Draco18s no longer trusts SE Jun 14 '17 at 20:02
• Must be a bug in the python script – Santiago Benoit Jun 14 '17 at 20:12

# 21. Turtlèd

"20"


Try it online!

Next Toolbox:

['elf', 'assembly-as', 'scheme-chez', 'logicode', 'golfscript', 'dstack', 'mariolang']
'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~\x7f'  # 25. Arcyóu 24  Boring, but ¯\_(ツ)_/¯ Try it online! Next Toolbox: ['elf', 'assembly-as', 'logicode', 'golfscript', 'visual-basic-net-mono', 'python2-pypy', 'silos'] '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~\x7f'


# 26. GolfScript, 2 bytes

25


GolfScript makes this way too easy.

It pushes 25 to the stack, then when the program ends, it prints the stack.

Try it online!

Next Toolbox

Available Languages

• elf
• assembly-as
• logicode
• visual-basic-net-mono
• python2-pypy
• silos

# 32. rk, 27 bytes

rk:start print: "31" rk:end


Chars used: "13:adeiknprst

The code is pretty self explanatory, but what surprised me is that rk was created by a 13 year old.

Try it online!

Next Toolbox

# 36. Foo, 10 bytes

&2+1$h&5$h


Try it online!

God I hope I understood this challenge correctly.

Chars used: $&+125h ## Explanation &2+1$h&5$h &2 Set current cell to 2 +1 Add 1 to current cell$h      Print as hexadecimal (i was taken so couldn't print as decimal
thankfully 0-10 are the same in hex as in decimal)
&5    Set current cell to 5
\$h  Print as hexadecimal


Next Toolbox

Looks like Go's on the menu now, hope to see something awesome from totallyhuman

• now that I think about it perhaps I should've used up 7 and * instead of 1, 2 and +. – Skidsdev Jun 16 '17 at 8:05
• @totallyhuman Go is still there. – Okx Jun 16 '17 at 10:47
• Ah, whoops. I was looking at the wrong section in the toolbox. ^^ And it seems I have every character I can possibly have... – totallyhuman Jun 16 '17 at 10:49

# 37. Oasis, 36 bytes

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


Try it online!

Next Toolbox

# 41. Random Brainfuck, 19 bytes

-[>+<-----]>+.----.


Try it online!

Next toolbox

# 40. Reticular, 7 bytes

12+:9O;


Try it online!

Next toolbox

# 44. D,  "().34;adeilmnoprstvw{}

import std.stdio;void main(){writeln("43");}


Try it online!

Next toolbox

# 47. Forth (forth-gforth), 46 .

46 .


Try it online

Well that was easy.

Next Toolbox

• You used the input of 46's toolbox for your toolbox. I'll fix it for you – andrewarchi Jun 16 '17 at 15:39

# 51. Unlambda, .05i

.0.5i


Try it online!

Next Toolbox

# 49. brainbool, 26 bytes +><.

+>+<.>.>.>.>.>.


Try it online!

Outputs 110000, which is 48 in base 2

Next toolbox

# 50. Kotlin, 4 bytes

->49


Try it online!

Next toolbox.

# 52. Factor, 17 bytes

USE: io
"51"print


Try it online!

Next toolbox

# 53. Actually, 6DP*

6DP6DD*


Try it online!

6       push 6
D      pop 6, push 6-1=5
P     pop 5, push the 5th prime = 13
6DD  push 6-1-1=4
* pop 13 and 4, push 13*4=52


Next toolbox

# 55. Agony

+++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
`

I don't really get this language, but it seems to be a superset of brainfuck.

Try it online!

Next toolbox