« first day (2279 days earlier)      last day (2862 days later) » 

13:00
@orlp Is that a challenge accepted?
@Qwerp-Derp That is the truth. Originally, Iverson was a mathematician frustrated with math's oddities. He set out to make something better to replace it...
Come on guys, if you guys are still not answer this, I'll answer it in every possible language.
CMC: median
Jelly, 8 bytes: LHịṢµS÷L
@EriktheOutgolfer doesn't work
Yeah I think I must do something else.
13:14
@EriktheOutgolfer All you need is (increment)
Yeah I thought of it, although I'm still thinking of it...
because the index is (1+n)/2
Hmm... it seems overcomplicated.
13:32
Yesterday the world population passed 7.5 billions
0
A: Sandbox for Proposed Challenges

Comrade SparklePonyMake this Language Turing Complete! I am trying to develop an esolang (not really), but have not gotten very far. All this esolang can do so far is increment and decrement a single register, . So your task is to add one command that makes this language Turing-complete. popularity-contest

user165474
@LeakyNun @EriktheOutgolfer 1+¡0 is the best I can do for the Jelly fibonacci code thingy. I can't seem to figure out how to do it starting from 0 like the built-in does it.
@HyperNeutrino just interchange the two numbers
@TuxCopter idk if good thing bad thing
user165474
13:43
Oh huh
user165474
ohhhhhhhhhhh
user165474
that makes sense now
user165474
:D
Remember the explanation I gave for <dyad>¡<nilad> yesterday. It looks much like fibonacci.
user165474
Yes. I remember the f(k-1) + f(k-2) thing; I realized later that day that the fibonacci sequence is defined that way with f(0) = 0 and f(1) = 1.
user165474
13:45
Wait so I can make any Lucas sequence with coefficients of 1 using this template?
@HyperNeutrino I believe so
0
Q: Get rid of empty lines

Papayaman1000Ah, yet another of my selfish uses of this Stack. Being a Chromebook owner, I'm a frequent user of the Ace IDE, the editor used by Cloud9. It has lots of tools for dealing with excess whitespace, but it notably lacks one: clearing empty lines. Your mission today is, given an input from a place ...

user165474
Cool. Alright. So that makes sense now; [dyad][repetition/implicit]¡[nilad] chains.
user165474
Yay.
user165474
Do you have any more coding exercises that I might be able to do?
13:50
1 hour ago, by Leaky Nun
Brachylog-biased CMC: given string s, find maximal subsequence (not necessarily contiguous) which is a palindrome. E.g. "abcbda" gives "abcba"
@HyperNeutrino I think this is a good challenge for Jelly
user165474
Alright.
user165474
Ooh this may be tricky.
user165474
Let me write it in Python first to see if I can even get it there.
@HyperNeutrino Jelly and Python have drastically different mindsets.
And I don't think I have a Jelly mindset either
user165474
@LeakyNun That is true. So do you think writing a Python solution first would even help at all?
13:53
I think my mindset is more inclined to Pyth.
@HyperNeutrino slightly.
user165474
Alright. I don't see an easy straightforward way to do it but I might just be missing something.
user165474
Hm. I can't seem to figure out how I should go about this.
user165474
Let me try naming the critical components again like with yesterday.
You're missing "Brachylog-biased", so this might actually be too difficult for non-Brachylog languages.
user165474
Does Brachylog have an easy way to do this?
user165474
13:57
Probably an easier code task would be better cuz I'm an early-beginner at Jelly :)
1 hour ago, by Fatalize
3 bytes: well…
Yes it's too easy in Brachylog AFAICT.
@EriktheOutgolfer I beg to differ.
I thought before giving this to @HyperNeutrino as a challenge.
It's not really difficult, in the sense that it is rather straightforward.
@HyperNeutrino do you want a framework?
user165474
Yeah, sure. Thanks.
@HyperNeutrino framework: generate all possible solutions → filter for suitable solutions → find maximum
user165474
Oh right, I don't need to make this optimized...
user165474
14:13
@LeakyNun Is there a built-in in Jelly to get all possible arbitrary length contiguous or non-contiguous slices from a string?
@HyperNeutrino yes
Contiguous yes, non-contiguous I don't think so.
user165474
Oh okay.
@Downgoat no you silly goat... use git reflog >_<
@EriktheOutgolfer yes, even for non-contiguous.
@HyperNeutrino what do you call the collection of the slices?
14:15
reflog <-> golfer? :P
@LeakyNun Huh? I couldn't find anything.
@ETHproductions :O Linus Torvalds is Dennis confirmed??
user165474
@LeakyNun I'm not sure I understand your question.
@EriktheOutgolfer they are not called slices. what do you call them?
@HyperNeutrino can you list what you would like to find, for "abc"?
@Downgoat did you see my message in the Cheddar chatroom?
user165474
"a", "b", "c", "ab", "bc", "ac", "abc"
14:16
@LeakyNun I generally call them "slices" or "sublists".
@HyperNeutrino and what do you call this?
user165474
Subsequences?
@EriktheOutgolfer think harder
@HyperNeutrino That would be some sort of combinations builtin I think
user165474
Or no, permutations?
user165474
14:17
(Combinations)
@HyperNeutrino fill in the blank: ["", "a", "b", "c", "ab", "bc", "ac", "abc"] is the _ of "abc".
@LeakyNun if that is what i think it is, then the first item is invalid.
you can just remove the first term
@LeakyNun Oh I found it.
@EriktheOutgolfer good
14:19
How do you fix output so that it's not joined as a string in Jelly?
so you can view it as a list
@Emigna for example?
@EriktheOutgolfer ŒṘ vectorizes too much
@Emigna you might want to join by newline (Y IIRC).
@LeakyNun Wanted to see the list output from powerset
@ASCII-only have you seen super-cool cheddar debugger? should I add to VSL?
Yeah that works, thanks!
user165474
14:21
Hm. This is tricky; I can't seem to get the term for it.
@HyperNeutrino again hint: fill in the blank: {{}, {1}, {2}, {3}, {1,2}, {2,3}, {1,3}, {1,2,3}} is the _ of {1,2,3} (in Jelly strings are considered as list of characters)
user165474
subsets?
@HyperNeutrino maybe you really don't know the term.
It's called "powerset".
user165474
Oh hm. No, I didn't know the term.
you know now then
user165474
14:23
Yep :)
Jelly terms can be really confusing even to experts sometimes.
user165474
Well now I know what to Ctrl-F on the Jelly git page
user165474
ŒP
user165474
generate all possible solutions → filter for suitable solutions → find maximum
@HyperNeutrino that's a nice step
14:27
Yes it's ŒP at first.
You can do it in 7 bytes.
user165474
I need to essentially filter to only have elements that are their own inverse
Easy peasy!
user165474
ŒḂ to check for palindromeness
user165474
Ðf for filtering
14:28
Yep again!
user165474
One more byte to find the maximum.
@EriktheOutgolfer I can do it in 6 bytes
user165474
Hm. doesn't seem to work.
@HyperNeutrino use Y to check the current output
You don't need a maximum
user165474
It gives d for abcbda so I suspect it's doing element-wise comparison of lists, not by length.
user165474
14:30
@LeakyNun ŒPŒḂÐfY?
@HyperNeutrino yes that's how you check them
user165474
That gives all palindromic powersets.
so you can see which one to use
user165474
The last one. Oh wait.
user165474
@LeakyNun ŒPŒḂÐfṪ
14:32
@HyperNeutrino congratulations
Yeah that's what I did too.
user165474
Yay :D
user165474
That was faster than yesterday :P
@HyperNeutrino the challenge is easier than yesterday's
user165474
Yes.
14:32
@LeakyNun Can you really do it in 6? ŒPŒḂÐf is already 6.
@EriktheOutgolfer so you would have to not use those two
user165474
I feel like the two 2-byte ones need to be swapped with 3 one-byte ones.
There are no 3-byte ones.
@EriktheOutgolfer read what he said carefully
user165474
3 one-byte not 1 three-byte
14:36
Yeah... it's the the effect of ignoring duplicate words again...
>> "👩‍👩‍👧‍👦".length
> 11
Emoji are strange...
user165474
How does that work >_>
user165474
Oh wait they're not the same character?
user165474
They render as the same box for me rip
It's four separate emoji, with zero-width joiners inserted between them to make it appear as one emoji
14:39
The four emojis are 👩‍ 👩‍ 👧‍ 👦
Solution: Cheddar which has built-in emoji support :D
When combined, they look like one emoji
In addition, each emoji is two UTF-16 characters, so JavaScript sees 11 chars
user165474
Oh hm.
@Downgoat Awesome :D
user165474
14:40
I'd need to use my chromebook; my laptop can't render them
👩👩👧👦 without the zero-width separators
user165474
Are those people emojis?
user165474
like I think it's woman+woman+girl+boy
Question: because in Australia they say "Battery is flat", do they say "Tire is dead"?
user165474
14:42
But it doesn't render so I have to look it up.
cheddar> "👩‍👩‍👧‍👦".length
7
Should it be one?
@HyperNeutrino @EriktheOutgolfer are you still thinking about it?
yep
although œ& will not work.
That's how it looks for me in Firefox/Windows 7
14:44
I don't think it renders in Linux at all.
user165474
Still thinking about it, but I have to go in about 5 minutes.
user165474
@EriktheOutgolfer I'm using Linux. Also, I'm on school WiFi, so I can't load the image either :P
Java Question: Would List<?> a = new ArrayList<Integer> make a a List<Integer>?
user165474
Because imgur.com is blocked.
@Downgoat idk, if it's a single character then you can't really manipulate it
14:45
@HyperNeutrino School WiFi doesn't allow images? o_O
user165474
Nope. Not from imgur.
Would Dropbox work? (specifically dl.dropboxusercontent.com, I guess)
Also, I think that *.imgur.com is what's blocked, not just imgur.com, since the image is in i.stack.imgur.com.
@Downgoat sort of i guess? generics are weird in java. with that definition you wouldn't actually be able to add anything to that list
user165474
@EriktheOutgolfer Yes, probably.
14:47
0
Q: In code-golf is it always ok to print ASCII digits when an integer is asked for?

cleblancWhen the question clearly asks for an integer is it always OK to just print the ASCII digits of the integer without actually generating the integer value?

@Downgoat I thought you need new ArrayList<Integer>().
ah yes sorry
Question: why do List<? extends A> instead of just List<A>?
You could do List<Integer> a = new ArrayList<>();
user165474
Anyway, I have to go now. See you all later! (I'll keep thinking about a 6-byte solution for the palindrom problem)
14:49
TIL goats are Navy mascot
@Poke oh, would that implicitly deduct the ArrayList type?
You generally don't need to specify the type in the new part
@Downgoat yes
remember that in Java there is no runtime difference between a List<String> and a List<Integer> etc
Question: have any of you hand-traced arbitrary unnamed for loops before?
Um... sort of, I guess? Only in JS though
I had to do that with my Japt code after I left it alone for a year :P
15:08
@LeakyNun I made it!
@EriktheOutgolfer congratulations!
ŒPµfUṪ
Was that your code?
similar
my code was ŒPfU$Ṫ
we have different styles :p
That's what I meant when I said I could guess Jelly code ;)
@EriktheOutgolfer What does µ accomplish there?
15:09
but one can change styles
@ETHproductions start a new monad
use current output as input (instead of input to the whole link)
Ah, so you can use the current output on both sides
Yeah, both regular ŒP and when you later apply U to it (it seems you're a newb in Jelly).
@LeakyNun Also, the $ is clever.
I know a decent amount about Jelly actually, but I didn't realize you needed the result on both sides
If it was just ŒPfUṪ, then the U wouldn't apply to ŒP, but .
So that takes the powerset of the input array, filters to only the items that have all unique items, and then takes the last (largest) item
15:14
because fU is a [dyad][monad] pair
That or because ŒPf is a [monad][dyad] pair?
there isn't [monad][dyad]
yeah, dyads always "attach themselves" to the link to the right I believe
Not always.
Does anyone know the specific meta post where we say that new languages for old challenges are non-competing?
15:17
@ETHproductions there is also [dyad][dyad] pair in a dyadic chain
oh, OK
The one question I've always had is, does µ force the chain to the left or the right to be monadic?
There is also [nilad][dyad] pair.
To the right.
15:35
Question: func f(): ReturnType vs func f() -> ReturnType
@Downgoat language?
you're asking us which is better?
yeah which you prefer
the latter because I'm a math enthusiast
15:58
@betseg Because you haven't been in the APL room for some time, you might be interested in: chat.stackexchange.com/transcript/message/36965876#36965876
@KritixiLithos Oh, you noticed. Have fun.
:) the first questions seem doable with my skill
@KritixiLithos I am considering posting Problems 6, 8 , and 10 as code-golfs. What do you think?
you mean here on PPCG?
@KritixiLithos Yes. I have permission.
16:03
6 feels like a dupe (but I'm not sure), but 8 and 10 seem nice
@KritixiLithos I expected 6 to exist, but it doesn't seem to exist: codegolf.stackexchange.com/search?q=n-gram and codegolf.stackexchange.com/search?q=k-mer
-1
Q: Displaying n with n

simplest_mathematicsWhat I want: Quite simply, I want a text based display, that asks for an input, n, then shows that value on the display! But there's a catch. Each of the 'true' 'pixels' (the ones filled in) has to be represented by that number n. Also, if n is not a single digit number, then it has to loop back...

1
Q: Reviving a lost language

Wheat WizardA while ago I did something rather stupid. After I added a Brain-Flueue flag to the ruby implementation of Brain-Flak I went ahead and deleted the old Brain-Flueue repository. This made sense at the time because the new Brain-Flueue was better in every possible way, and the old one was preventi...

Seems more like a dupe of Golf me an ASCII alphabet than anything.
0
A: Sandbox for Proposed Challenges

Johan du ToitExcel NORMSINV function Implement the excel NORMSINV function in your favourite language, shortest code wins Build in functions and standard loopholes are not allowed Loss of precision is also not allowed Reference C Implementation /* * Original C++ implementation found at http://www.wilmot...

16:11
There was one for the whole ascii character set a few days ago as well, but I think that got closed
16:23
@WheatWizard BF!
16:36
4
Q: Brainflak Multiplication Metagolf

Wheat Wizard This question is the first of several Brain-flak Birthday challenges designed to celebrate Brain-Flak's first Birthday! You can find more information about Brain-Flak's Birthday here Last summer we had the Brain-flak Integer Metagolf, and the answers it generated have been very useful to the...

17:03
CMC: input a character/single-character-string, output a 5x5 block with only that letter (separated by newlines)
trailing newline optional
example?
ccccc
ccccc
ccccc
ccccc
ccccc
@ATaco I'm sad that you can't use your chatJax hosting service to upload pictures to PPCG's main site :(
Dyalog APL, 5 bytes: 5 5∘⍴
It's a train
Can you give me a TIO link?
thanks
The A← assigns the train to a variable
so it isn't counted in the bytecount
@LeakyNun 5 bytes in V: 5äl5Ä
@DJMcMayhem TIO?
17:10
that's nice
can you explain the code?
For the Dyalog answer, 5 5⍴ shapes the argument into a 5 by 5 vector
@LeakyNun Sure. 5äl means make 5 copies of the character under the cursor and means make 5 copies of this current line
what is the l for?
Carrot, 9 bytes
#^*4^
^*4
17:14
Try it here (no permalink)
I like the background color
extremely reminiscent of carrot
:) it was based off the meme
what meme?
@LeakyNun Basically, in V a lot of functions are operators, which means they are called like <operator><motion> where motion is a movement that specifies which text to operate on. l is a movement that means one character to the right
17:16
here did you confuse monad with dyad?
@LeakyNun Jelly, 5 bytes: ẋ5Ṅ4¡
@DJMcMayhem I see
why do people not like to link to TIO?
@LeakyNun technically, the operator takes in one argument, whatever comes after it, but the type of the "stack" also matters
So the same duplicate function works with arbitrary movements. For example, w is word, so äw will duplicate one word Try it online!
@KritixiLithos I see
17:17
I thought it was a Monad because it took in one argument, but I wasn't sure
So is it still technically a dyad?
And technically Ä is just a shortcut for á_, since _ is a movement that means this current line.
@KritixiLithos where is # documented?
alright
user165474
Python 2, 20 bytes: lambda x:(x*5+'\n')*5 TIO!
17:21
@LeakyNun Do you understand how the code works?
@KritixiLithos still reading the docs
@LeakyNun Charcoal, 6 bytes: UO⁵¦⁵S
I could have also used $ instead of #, but it doesn't really matter in this case
@KritixiLithos what is ^?
It prepends the text onto the stack
17:23
and where is it documented?
For example, Hello, World!^ is a Hello, World! program
It probably isn't a datatype, but here: github.com/kritixilithos/Carrot/wiki/The-Language#data-types
Golfscript, 8 bytes + trailing newline: 5[*]5*n*
ooh, beats my lang by 1 byte
user165474
@LeakyNun Can you share your 6-byte Jelly code for the palindrome problem? I thought about it but I can't figure out which 3 monads/dyads to use.
Yeah, since yours prints a trailing newline too.
17:27
@HyperNeutrino here
user165474
Hm.
Are those trailing newlines OK?
05AB1E, 6 bytes + trailing newline: 5×S5×»
Trailing newlines ok
17:32
@LeakyNun To help you out, the program starts with the stack as a string. The # adds the input to this stack string (which starts empty). Then the ^ marks the end of the string pushing. The *4 appends 4 duplicates of the stack to the itself. Then ^\n^ appends a newline to the stack. And finally, you duplicate it 4 times
I see
user165474
Powerset -> Filter Not In Reversed Array -> Change that to a monad -> Last Element
user165474
Oh hm.
user165474
The syntax kind of confuses me, because you have the filter before the reversed array.
user165474
Can you explain that syntax to me? So it's [monad][dyad][monad]$[monad]?
17:33
The reasona^*1 becomes aa instead of a is that Carrot was supposed to be a golfing lang
@EriktheOutgolfer would you explain to @HyperNeutrino ?
Brainfuck, 31 bytes: ++++++++++>,>+++++[-<.....<.>>]
I quite like the hyperlink for a code block
@DJMcMayhem take it Brain-Flak
I already did
user165474
Python, alternate solution, 26 bytes: lambda x:'\n'.join([x*5]*5)
17:42
@HyperNeutrino is it longer or shorter?
user165474
Longer.
@DJMcMayhem that wasn't what I meant
What did you mean?
I mean, take that, Brain-flak
Oh, I see
Yeah, overall, flak tends to be longer than fuck
17:43
@HyperNeutrino are you still here?
user165474
Hi.
The segments are:
ŒP
ŒPfU$
ŒPfU$Ṫ
Except for some things that flak is better at, like large numbers or adding
try each of them to get a brief idea
@DJMcMayhem adding is just [->+<]
user165474
So I know that the first segment takes the powerset.
17:44
Oh
@DJMcMayhem yeah, because brainflak requires matched brackets
user165474
The second one takes the fU part and turns it into a monad, which filters an array so that it only keeps elements that have their reverse in the same array (not necessarily meaning that it's its own inverse, but that doesn't matter here because false-palindromes won't be long enough to be the longest anyway; only true palindromes will be the longest)
user165474
And the last one just takes the tail.
user165474
Oh hey, that makes sense. :D
that's a good analysis
user165474
17:46
thanks
user165474
Yeah that makes a lot of sense now.
user165474
Thanks for sharing the code. I should look at some of the quicks because they have some useful golfing things.
did you like it?
user165474
Yeah. It was an interesting challenge and it was interesting to look at the 6-byte as well. The $ quick will probably be useful in the future.
Do you want another?
user165474
17:48
Yeah. :)
@HyperNeutrino n→n*(n+1)/2
I won't tell you how many bytes you need.
CMC: Find a PPCG challenge that has an answer in brain-flak and brainfuck, where the brain-flak answer is shorter
@DJMcMayhem there isn't really many to go through
No, cause that looks for one answer that mentions both, not one question which has answers in both
but there are only 10
so you can filter them off
user165474
17:51
Alright, thanks. I'll see how short I can make it.
user165474
There's the Half atom, I remember that.
Those are all just polyglots though
user165474
I remember that because there's the unhalf atom :P
user165474
@LeakyNun בH -> Multiply by increment and halve
@HyperNeutrino that's shorter than I expected
user165474
17:53
Oh yay :D
but it can still be shorter
user165474
What did you originally expect, out of curiosity?
user165474
Oh really? Hm.
user165474
Alright.
@HyperNeutrino I have no idea
I didn't think about it
user165474
17:54
Oh alright.
user165474
An alternate is +²H but that's not shorter. Just out of interest.
good luck
user165474
Thanks.
user165474
@LeakyNun RS
@HyperNeutrino bingo
user165474
17:57
Yay :D
user165474
I remembered that that was the formula for summation.
user165474
So sum of range :D
user165474
Do you have another relatively quick one? @LeakyNun
user165474
@Riley Well that's a drastic difference... xD
17:59
That's because flak defaults to decimal IO where brainfuck uses ASCII

« first day (2279 days earlier)      last day (2862 days later) »