« first day (2292 days earlier)      last day (2847 days later) » 

14:04
1:10 to deletion of spam. Is that a record?
CMC: Given an ASCII string, remove all unprintables (0-31 and 127)
Jelly, 10 bytes: 32ṙ126f@OỌ
(not sure if it works)
Working on adding some proper stack manipulation to Braingolf so I can do the forbidden builtin challenge (non-competing of course)
CJam, 8 bytes: q' ,'\x7f+- (replace \x7f with the literal character)
CJam can do char ranges >_>
user165474
14:16
wow >_>
Wow, the one thing it has over Jelly :O
@Phoenix 05AB1e, 5 bytes: |JžQÃ
0
Q: (The other day) I met a bear

programmer5000Your challenge is to output this text: The other day, The other day, I met a bear, I met a bear, A great big bear, A great big bear, Oh way out there. Oh way out there. The other day, I met a bear, A great big bear, Oh way out there. He looked at me, He looked at me, I looked at him, I looked ...

@NickClifford oooh good idea
14:18
@Mayube Yeah it's basically what I did when developing Ohm
I think T`\x00-\x1f\x7f works in Retina but I can't test because TIO is weird about null bytes
Again, the the literal characters in the code
@NickClifford thanks for the tip, definitely gunna do that for braingolf
user165474
How ironic that this gets closed as a dupe. :P
@Mayube Go for it! It really helps if/when you're stuck on coming up with builtins, etc.
Yeah, it works, just imagine that it starts at null instead of 1
14:23
@BusinessCat It's not TIO, it's the operating system.
CMC (not really): Make a proper quine in braingolf :P
Oh god that reminds me, I still have to find a non-trivial quine in Ohm
I'm trying to avoid just translating the classic 05AB1E quine, but it just works so well
I mean in braingolf 0 is a quine, but it's not a proper quine so :P
Yeah, same with Ohm (and most other languages with implicit output)
I have yet to figure out how the hell to do a proper quine in Braingolf, I'm sure it's possible, but ironically I'm quite bad at my own language
14:31
@Phoenix APL with AGL, 14: ⊢é⍨31<127|⎕UCS
Come on, let's fill the fourth row...
@Mayube online interpretor?
> interpretor
@flawr captcha art
ms paint + captcha
14:40
@LeakyNun Would it be okay to unpin the resources message in Jelly Hypertraining and change the room description to include the resources instead?
@EriktheOutgolfer sure
@Mayube Does this work? I've never used braingolf and I don't have python3 so I can't try it, but I think it'll work. "V#!1+!@v!_v@v_"V#!1+!@v!_v@v_
Wait, no. braingolf doesn't do strings does it?
@LeakyNun OK done that, now I will cancel the stars on the original message so that it's cleaned up (now the resources would not vanish in 14 days).
Done. I was planning to do this for a week or so.
@Riley You can use TIO for Braingolf, set it to python 3, copy braingolf.py to the code section, add -c as the first argument, and the Braingolf code as the 2nd argument
@LeakyNun See above
@Mayube alright
14:51
once it's a little more complete I might push for it to actually be added to TIO, but for now that's how I do it :P
Also any additional arguments after the code will be added as inputs to the code
@Mayube "V#!1+@R@16v@R@16"V#!1+@R@16v@R@16
Can someone throw an eye over the wording of this question for me, please? I'm trying to figure out if we must be able to take the 2 inputs in any order or if we can choose to take them in a consistent order, e.g. largest first.
15:07
@Shaggy Instructions unclear chucked eye at challenge it just bounced back.
0
Q: Zooming in on a map

OkxYour task is to, given a map as input, zoom it out or in, depending on the scale. For example, given the following (badly made) map: ..____.... ../OOO\... ..\OO/\... .......... And a scale factor of 2, you should first separate it into 2x2 sections: .. | __ | __ | .. | .. .. | /O | OO | \. |...

Anonymous
@Shaggy You may take the inputs in any consistent order
@Christopher Over, not at! :p
Anonymous
In other words, you can't assume that the larger input will be first
@Riley holy crap somebody actually did it
15:11
@Shaggy Ah makes sense. But then it just hit a wall :(
@Mego So you're saying we need to allow for the larger input being first or second?
Anonymous
@Shaggy Yes. That's how all of the current answers have done it, and the challenge does not say that you can assume a particular ordering.
Anonymous
Also see the comments
@Mego OK, thanks :) I'll need to update my answer, so.
@Mayube The docs say that @ should pop before printing, but it doesn't. Is that a bug?
15:15
@Riley it might be, lemme check
Hmm, seems to be popping for me
@Riley I think that &operator makes the operator not to pop from the stack.
@EriktheOutgolfer Hmm seems like ti does, that's a bug, lemme fix that
oh yeah it's a bug caused by the change to the multi-stack system
already had to fix this elsewhere
Hm, that wasn't too bad, only cost me 12 bytes :)
There we go fixed that, lemme just push it real quick
Pushed and fixed
oh here's an odd bug
if the last character of the braingolf code is @ with the & modifier, it'll still print the last item in the stack, but if there's any character after the @ it won't
so 6"!!"[..]&@ will print 16 exclamation marks followed by 33, but 6"!!"[..]&@= will print 16 exclamation marks followed by an empty array []
@Riley oh I think I might know why you were having that issue. Your Quine works, but also throws an IndexError
Weird. Fix'd, your quine still works
@Mayube My quine shouldn't work if @ pops.
15:29
CMC: make a quine builder with regex: you take an input string that has all the chars needed for your regex and print out the edited string. Non working example (/(\.)|(a-z)\$) and input of (/(\.)|(a-z)\$)sjdkljlfdjldfj returns (/(\.)|(a-z)\$)
This should work though: "V#!1+!@R!@18v@R@18"V#!1+!@R!@18v@R@18
what language is this @Riley?
@KritixiLithos Braingolf
@Riley Okay I've found where it's not popping. It seems that it pops the 16 items you print, but then when you switch stack and use R to switch back, the items are back int he stack. No idea why
if you check the stack after printing 16, but before switching stacks, the stack shows as empty
but if you check again after doing v@R it has the 16 items in it
6
Q: Make text triangle waves

ChristopherBOUNTY NOTE I meant to say CLEVER answer not lever... I was messing around on my 'ol TI-84 CE and made a program that produced this output (it was actually bigger but that is not the point): * * * * * * * * * * * * * * * * * ... I evolved it to take input text and make the t...

15:35
Weird. That new one I posted doesn't pop at all, so it should work even after you find and fix this bug.
@Christopher I don't think you need 2 BOUNTY NOTEs
@Riker opps
did you forget you made the other one lol
pretty much
15:43
@Riker oil actually comes from zooplankton and algae
@betseg >_>
@betseg related
Not many things come from dinosaurs
dinosaur poop does
15:50
... you have a point
chickens did
that wasn't my point :P
oh well
welcome to TNB
where everything is taken mostly out of context and put into new context
message.Context = new Context(null);
5
Q: Too much [tag:code-golf]: a challenge

programmer5000We've had too much code-golf recently. Yes, each word is a link. These are all popular questions that happen to be code-golf. I think it is time to change. Your challenge Your challenge is to make 3 challenges, each with one challenge category: code-challenge atomic-code-golf popularity-c...

15:58
@Riley Nice!
1
Q: Happy birthday, Raffaele Cecco!

Luis MendoRaffaele Cecco is a programmer who produced some of the best video games for the ZX Spectrum computer in the late eighties. Among others, he developed the highly acclaimed Cybernoid and Exolon. Raffaele is turning 50 on May 10, 2017. This challenge is a small tribute to him, for the happy hours...

congrats!
grats!
Nice :)
I'm not too far from that myself
16:17
72 more answers according to your profile
Okx
Okx
not that far ;)
16:29
@Riley Figured out where the bug was and fixed it, and yes, your 2nd quine still works
CMC: given an odd number n, draw a cross with any printable character except space of size n. e.g. when n is 5:
#   #
 # #
  #
 # #
#   #
trailing space and newline optional
totally gunna write one that uses newline as it's character
> printable
@LeakyNun Related
MATL, 8 bytes: XytP+g*c
16:31
@LeakyNun Must be shortest in Charcoal.
@LuisMendo you can choose your own character
the character is not to be included in the input
@Adám only one way to find out
Ah, ok. Then it's 2 bytes longer: XytP+g42*c
someone forgot to press save
Who? :-P
nadie
16:33
Hehehe. How's your Spanish going?
not bad not good lol
where is your quickref?
Col heading is the prefix of two-char commands
gracias
Okx
Okx
wait
16:35
@LuisMendo por que en todo el mundo el nombre del matriz identidad es ojo?
I-dentity <-> eye
Eye guess
Same pronunciation
eligiste este nombre?
16:37
I see
bad pun
@Okx Is that valid?
Eye no (OK I'll stop)
Okx
Okx
@Adám I edited it, it's valid noow
@Okx What is the new code?
Okx
Okx
@Adám It's right there.
16:38
@Okx I don't get it.
@LeakyNun Since you probably want to learn about this: "matriz" is feminine, so it should be "de la matriz identidad"
Okx
Okx
@Adám PX⁴, as in the message :P
@LuisMendo gracias
De nada :-)
@Okx Is that valid?
Okx
Okx
16:39
@Adám yes
@Okx Hint: it isn't
It has to be all the same character
@Okx with any printable character<s>s</s> except
Okx
Okx
ah
also, your size is not n
16:40
@Adám How do you make a cross, like the one in Leaky's CMC, in Dyalog? The closest I got was to making a / line
I can reverse it to obtain the `` line, but how do you combine them both?
@KritixiLithos Many approaches. Here's one: ' #'[(⌽∨⊢)∘.=⍨⍳5]
@KritixiLithos Another approach: a←''⍴⍨2⍴5 ⋄ (1 1⍉a)←'X' ⋄ (1 1⍉⌽a)←'X' ⋄ a
Ah, the operator
Then using that on my previous solution gives me: {' #'[(⌽∨⊢)(⍵-1)=∘.+⍨⍳⍵]}
With ⎕IO←0
@KritixiLithos But why ∘.+?
@KritixiLithos An interesting one: ' X'[(=/∨4=+/)¨⍳2⍴5] Can you figure it out?
@Adám + was the first thought that entered my head
@LeakyNun Is this one valid?
16:47
@KritixiLithos Cute one too: ' X'[(⌽∨⊢)=/¨⍳2⍴5]
7 mins ago, by Leaky Nun
@Okx Hint: it isn't
@Adám indeed, that solution is quite interesting, but you have to sacrifice few bytes to make it into a function (4 => ⍵-1 for example)
@LuisMendo I believe my solution is already 12×5
Ah, good to know. I feared it could have misled you
Deleting comment then
@KritixiLithos A bit cheaty: ⎕UCS(⌽∨⊢)∘.=⍨⍳5
@LuisMendo tienes algunas CMCs para matl?
16:50
@Adám looks like a cheaty face :-)
@LuisMendo It's a frown.
TIL in MATL the name of Y? is "why"
@Adám How does that work? It output nothing on my machine
@LeakyNun Hm. I thought CMC were not language specific?
@LuisMendo well, mainly to build up my matl ability
we can do it in the matl room if you like
16:51
@LeakyNun Haha. Try it. It comes from Matlab's [why]()
@KritixiLithos ⎕UCS converts numbers to unicode characters and vice versa. So the result becomes an array of null bytes and 1 bytes. Quite unprintable, but works on TIO.
@LeakyNun So you don't already know enough languages? :-P
@LuisMendo that's correct
> It's all Matlab's fault. It's jealous. It's holding me back!
@LeakyNun I can't think of any CMC right now, but any of your recent ones could be a nice one n MATL
@LeakyNun Got the reference? :-)
@LuisMendo oh kek
> The programmer has been drinking, not me
> Programs making programs - how perverse!
16:54
@LeakyNun Great song
@LuisMendo como se usa XR?
@LeakyNun Quote from C3PO
XR is upper triangular part without diagonal. Example
; is row separator for matrices
how is it called triu?
oh, triangular upper
Names come from Matlab. Yes, that's correct
You may find the doc search here useful
thanks
16:58
My pleasure
CMC: Given an array and an axis, duplicate the array along that axis
Define "duplicate"
I wonder how to vectorize Y&
Define "axis"
@LeakyNun It is vectorized. That's what the doc calls "element-wise"
@LuisMendo [[1,2,3],[4,5,6]] along axis 1 → [[[1,2,3],[4,5,6]],[[1,2,3],[4,5,6]]]
Along axis 2: [[[1,2,3],[1,2,3]],[[4,5,6],[4,5,6]]]
Along axis 3: [[[1,1],[2,2],[3,3]],[[4,4],[5,5],[6,6]]]
17:00
but your input is 2D...
@LeakyNun Yes, but you have to increase the dimensions by 1.
@Adám Thanks. I think I get it. I'm not used to so many nested brackets :)
@Adám alright
@LuisMendo APL makes you used to many dimensions. Dyalog only allows 15, though.
CMC: generate this pyramid
            m
           l n
          k m o
         j l n p
        i k m o q
       h j l n p r
      g i k m o q s
     f h j l n p r t
    e g i k m o q s u
   d f h j l n p r t v
  c e g i k m o q s u w
 b d f h j l n p r t v x
a c e g i k m o q s u w y
17:02
@Adám Matlab does too (and I love thinking in many dimensions!), it's just the notation that confuses me :-)
-3
Q: Algo for serverless network peer discovery

xakepp35What could be the way one client could discover address pairs (IP:port) of anothers? In a fully automated manner (So no initial human input needed, just run program) Totally serverless (and "masternodeless") network enviroment In a sane time. Our Life is limited =) For now i know 4 approache...

@LuisMendo That's JSON. In APL we don't use that.
@Adám Jelly, 9 bytes: ”"xj@⁾,`v (axis 0, 1, 2)
oh, I didn't notice your CMC
^^^Well done :-P
17:03
(explanation: they are respectively ,` and ,"` and ,""`, so I used eval) @Adám
user165474
What I don't get is why the user posted this question here. The user is a SO user...
@KritixiLithos took me a while to parse how the pyramid was constructed
@Adám they are all one command :p
[[[1,2,3],[1,2,3]],[[4,5,6],[4,5,6]]]
in APL is
1 2 3
1 2 3

4 5 6
4 5 6
@LeakyNun What are?
@Adám the three strings above
17:05
^^^ Ah. Much better. Similar to Matlab
Actually, the backtick is not required
@Adám Jelly, 7 bytes: ”"x”,;v
In Matlab:
>> ones(4,3)
ans =
     1     1     1
     1     1     1
     1     1     1
     1     1     1
>> ones(4,3,2)
ans(:,:,1) =
     1     1     1
     1     1     1
     1     1     1
     1     1     1
ans(:,:,2) =
     1     1     1
     1     1     1
     1     1     1
     1     1     1
@LuisMendo We have various display modes.
┌┌→────┐
↓↓1 2 3│
││1 2 3│
││     │
││4 5 6│
││4 5 6│
└└~────┘
Hey, that looks good!
Arrows and all
@Adám So would this array basically be 2 3⍴⍳6 or (⊂1 2 3),(⊂4 5 6)?
17:08
@LuisMendo The arrows are necessary to distinguish a a vector from a row/col matrix
@LuisMendo I wonder if there is python-style and
@KritixiLithos I posted as JSON, where there is no difference.
@KritixiLithos You should definitely use 2 3⍴⍳6.
@KritixiLithos (⊂1 2 3),(⊂4 5 6) ←→ (1 2 3)(4 5 6) ←→ ↓2 3⍴⍳6
@KritixiLithos The first uses rank, the second uses depth. You can convert between depth and rank with: ToRank←↑⍣≡ and ToDepth←{↓⍣(¯1+|≢⍴⍵)⊢⍵}
Quick how do I select a line in Vim
V, I guess?
17:15
that's ironic
Legend:
Shape:  ↓ → Non-zero axis.
        ⌽ ⊖ Zero axis.

Type:     ∊ Nested array.
          ~ Numeric.
          - Character.
          # Namespace reference.
          ∇ ⎕OR object.
          + Mixed type.
10/10 fancy af
@Phoenix Well, we work with arrays, that are generally twice as featureful as everyone else's. If we couldn't visualize them, we'd be bad off.
CMC: Implement APL's dyadic function!
What does that function do
Transpose
17:25
@LeakyNun looks good for V
@KritixiLithos No dyadic transpose.
@DJMcMayhem hmm...
0
Q: K-Means Clustered Golf

carusocomputingK-Means Clustering (Wikipedia) The task here is rather simple, perform a single iteration of a k-means clustering algorithm on a binary matrix. This is essentially the setup task for the main k-means algorithm, I felt the setup might be easier and entice golfing languages to give it a shot as we...

@LeakyNun I don't know enough Python to answer that
17:28
@LuisMendo if 1st element is truthy, returns second element
Aah. I seem to recall CJam does something similar. No, there's not a function that does that
@DJMcMayhem V, 19 bytes: Àé ddÀpòr#jhò$òr#kh
@LuisMendo alright
18 bytes for me
I'm not convinced that's optimal though
what does pipe do?
17:32
17 now
okay, now looking at DJ's solution, both are very similar solutions
> both are very solution
@LeakyNun How do you quote?
@Adám > [text_to_quote]
@LeakyNun goes to the beginning of the line
@LeakyNun Before your edit, it must have been the shortest meaningful and helpful answer ever.
17:35
@Adám kek
@LeakyNun 0/10, not as short or meaningful
@LeakyNun Rigth, should have been !
17:50
CMC: given n, generate the identity matrix of size n.
@LeakyNun K: =
@Adám please
@LeakyNun What? Try it online!
Dyalog APL, 5 bytes: ∘.=⍨⍳
@Adám trivial submissions no fun :p
My Euclidean algorithm still has no answers ;_;
17:53
@LeakyNun Why is this a CMC? We have a main PPCG challenge like that.
@Adám oh rly
7
Q: Visualize the Euclidean algorithm again

Leaky NunTask Given two positive integers: Draw the rectangle with dimensions specified by the two integers. Repeat Step 3 until there is no more space. Draw and fill the largest square touching three sides of the (remaining) rectangle. Output the resulting rectangle. Example For example, our input ...

it's not really that difficult ;_;
31
Q: Construct the Identity Matrix

SeadrusThe challenge is very simple. Given an integer input n, output the n x n identity matrix. The identity matrix is one that has 1s spanning from the top left down to the bottom right. You will write a program or a function that will return or output the identity matrix you constructed. Your output ...

thanks
heh, the APL solution to ^^ is the same as mine to the CMC
@LeakyNun Okay, I think I got it now.
17:56
@NickClifford nice
@KritixiLithos Yes, you're getting good. I look forward to seeing you in the summer.
0
Q: Porting an answer to another version of the same language

ShaggyI know that porting answers to other languages is permitted (and sometimes encouraged) but is porting answers to other versions of the same language allowed? I came across an answer earlier which was a direct port, to an older version of the language, of an answer I'd posted to the same challeng...

0
A: The forbidden built-in

user2357112Python 3, 79 bytes, noncompeting __builtins__.x=lambda l:print([l[i]for i in range(2,len(l),3)if l[i-1]<l[i-2]]) Creates a built-in command x that does the task.

what the kek is this
3
that's a great phrase
"what the kek is this" I mean
18:08
@Riker thx
18:22
@MartinEnder why is the name Alice?
*der
and this is still an English-speaking chatroom
and because mirrors
@MartinEnder I see
> And finally, we come to the name (and theme) of the language: the language is of course named after Lewis Carroll's Alice. Much as Alice in Through the Looking-Glass, you step through mirrors to switch between two mirror universes.
> What this means for the language is that the two functions performed by any of the characters in the two modes, are (sometimes subtly and sometimes not so subtly) related, in terms of their effect, their theme or their structure. When a Cardinal command works with the divisors of a number, the corresponding Ordinal mode command will often do something similar
your readme is so long... which means that the language is quite unique... which means that it would be quite hard
18:42
CMC: Given a string how many possible ways are there to permute its bytes?
e.g. @@1 is 3 (@@1,@1@,1@@)
@WheatWizard pick a language
@LeakyNun Python
alright
I wanted to day Brain-Flak, but that would just be cruel
@WheatWizard Can there be multibyte characters?
18:48
g=lambda n:n<2or n*g(n-1)
p=lambda a:a==[]or a[0]*p(a[1:])
f=lambda s:g(len(s))//p([g(s.count(c))for c in set(s)])
@Riley Lets say no
g=lambda n:n<2or n*g(n-1)
def f(s):
 r=g(len(s))
 for c in set(s):r//=g(s.count(c))
 return r
@WheatWizard 05AB1E, 3 bytes: œÙg
@WheatWizard do you have any golfing suggestions?
Nope
If you use python2 you can save a byte but thats All I can see
18:53
sure
Oh actually
use ; in your function to cut down on whitespace
I don't think you can
Yeah you can't
you can't use a ; before a for loop or a while loop
thats one of those rules I always get mixed up
Anonymous
18:54
You can move the r=g(len(s)) to immediately after the colon I think
@Mego how?
Anonymous
def f(s):r=g(len(s))
 for c in set(s):r//=g(s.count(c))
 return r
Anonymous
I think that works
no that doesn't
now where's the itertools solution which I won't write?
Anonymous
from itertools import*;lambda s:len(set(permutations(s)))
18:56
@Mego how many bytes is that?
@WheatWizard Mathematica: Length@*Permutations, if input is a list of characters. Otherwise append @*Characters.
CJam, 4 bytes: qe!,
Ooh nearly tying riley
Anonymous
@LeakyNun I don't know, I'm too lazy to count
it's 57 bytes
now I'm determined to beat it
1
Q: Anaglot Polygrams

Wheat WizardTask Write some code that can be rearranged into n different programs in n different languages each outputting a distinct number from 1 to n. No two languages should be the same however different versions of "the same language" will be considered distinct languages. Each language should run on...

Anonymous
19:03
95:
Anonymous
a=lambda n:n<2or n*a(n-1)
lambda s:a(len(s))/reduce(int.__mul__,[a(s.count(c))for c in set(s)])
@Mego Why do you have ,1?
Anonymous
@WheatWizard Reduce needs a starting parameter
Anonymous
Oh wait it starts with the first element
19:05
@LuisMendo what would you translate "Para que nada nos amarre que no nos una nada." as?
with amarre and una being conjugations of amarrar and unir, respectively.
it's from a poem, but the translation I found makes no sense
poems don't have to make sense as long as they rhyme
I get "So that we are not bound, nothing should unite us." instead of "Let nothing unite us, so that nothing can separate us.".
@trichoplax yes but what if it doesn't rhyme :p
I wasn't being serious about either :P
I know, neither was I
The first sentence seems to make a sort of sense to me, but a different one from the second version
19:08
?
> You keep using that function. I do not think it means what you think it means
19:19
I was amused by this comment
are comments allowed? — Adám 14 mins ago
3
19:39
@trichoplax :-)
I resisted the temptation to pollute the challenge comments with a witty response...
what's the consensus on outputting characters with a char code of something?
i.e. outputting null byte for 0
specifically in brainfuck

« first day (2292 days earlier)      last day (2847 days later) »