« first day (2362 days earlier)      last day (2480 days later) » 

7:01 PM
Given an positive integer, return a list with all the integers from 1 to the given integer
19 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
 
CJam, 5: {,:)}
 
@Challenger5 That long? Wow
 
flip i forgot to implement range
 
Yeah, CJam has annoying overhead. It's basically the Java of golfing languages.
 
@Mr.Xcoder Braingolf, 2 bytes: u=
 
7:02 PM
Pyth has a built-in: S
 
@Mr.Xcoder Brain-flak, 14 bytes: {(({})[()])}{}
 
@Mayube I Outgolfed a 2-byte solution >_>
 
SOGL, 1 byte: Δ, expects input on stack
 
lambda n:range(1,n+1)
 
I'm gonna do this one in ><> as well
 
7:03 PM
@Mr.Xcoder different language, irrelevant
 
@Mayube I know
 
Jelly, 1 byte: R
 
7 bytes in V: Try it online!
 
oh wait it's uppercase U
 
There is also hM for 2 bytes
 
7:03 PM
and really it should be 3 bytes
 
Okx
@Mr.Xcoder Neim, 1 byte - 𝐈 alternative program: Δ
 
A lot of langs have built-ins for this
 
@Mr.Xcoder Braingolf, 3 bytes: U;=
 
@Mr.Xcoder Gaia:
 
@BusinessCat 1 sad byte?
 
7:05 PM
This time it's not sad
 
I like how Pyth adds stuff implicitly. My 1-byte solution should be SQ and the 2-byte one should be hMUQ
 
@Mr.Xcoder Jelly: R
lol
 
@HyperNeutrino Pyth: S
 
@HyperNeutrino ninja'd you
 
oh wait
I'm blind, I was trying to find that because I was sure someone did that already lol
 
7:07 PM
lol
 
CMC: Do the last CMC in vim
6 mins ago, by Mr. Xcoder
19 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
For reference, it can be done in 10 bytes
 
Can I do it in Emacs instead
 
Yes
 
><>, 12 bytes: :?!v:1-\n;r~<
 
05AB1E: L
 
7:08 PM
I can't edit in vim, you think I can program in it??
 
I can't even quit vim
 
@DJMcMayhem Is there a vim online executor/complier/interpreter/whatever?
 
@DJMcMayhem VTC as dupe
 
@Mr.Xcoder V is backwards compatible, so that works
 
@DJMcMayhem I can't V# :(
 
7:10 PM
Yeah, but you can use V as a vim interpreter
 
Okx
@Mr.Xcoder brainfuck, 8 bytes: ,[>+.<-]
 
CMC: n -> [n .. 0]
 
@Okx it would be fairly easy to output the actual characters too right?
 
Okx
7:12 PM
?
 
CJam, 6: {),W%}
 
@HyperNeutrino 5 -> [5,4,3,2,1,0]?
 
Actually, the vim.js doesn't support the optimal solution ;_;
 
@HyperNeutrino Jelly, 1 byte: r
 
7:12 PM
wait there's a builtin
 
Okx
@HyperNeutrino brainfuck, 5 bytes: ,[.-]
 
> r Inclusive range. Descending if x > y.
 
@HyperNeutrino Pyth, 4 bytes: _+0S
 
oh nvm
i;m an idiot
 
Or _+ZS
 
7:13 PM
cool
 
Pyth, 3 bytes: _+U
 
@Okx Doesn't output the 0.
,[.-].
> .-.
 
Okx
yes
 
ok time to add "strings" to my language lol
 
@HyperNeutrino Pyth, 3 bytes: }Q0
 
7:16 PM
also for [n .. 0]?
 
@HyperNeutrino Yes
 
ah ok. nice
Jelly: r0
 
Pyth, 3 bytes: _}0 (also for [n .. 0])
 
so many 3-byte solutions D: lol
wait does Pyth transpile to Python
 
Pyth, 3 bytes: _}Z
 
7:17 PM
Z == 0?
 
@HyperNeutrino Yep
 
how is that useful
 
@HyperNeutrino Gaia: )…v
 
oh wait Z1 vs 0 1
 
@HyperNeutrino Performance, for one.
 
7:18 PM
@BusinessCat cool
 
@HyperNeutrino removing space
 
right
 
Like ^5Z compared to ^5 0
 
@HyperNeutrino It's just increment, low range, reverse
 
ah ok
 
7:20 PM
CMC: n -> [0...n-1...1]
You must only handle n>1
 
So 6 -> [0 1 2 3 4 5 4 3 2 1]?
 
CJam: {,_(;);W%+}
 
@BusinessCat yes
 
@Mr.Xcoder Jelly, 3 bytes: ḶŒB
 
ḶŒḄ
 
7:22 PM
@HyperNeutrino Ninja'd
 
Dammit! xD
 
Still 3 bytes: …ṫḣ ¯\_(ツ)_/¯
 
@HyperNeutrino ninja'd by a level 1!
 
now find an alternate solution for 3 bytes
 
I don't think they update the levels that much tho
 
7:23 PM
I think I'm crap, but 7 bytes: +PUQt_S
 
@Mr.Xcoder Jelly?
 
@cairdcoinheringaahing No
 
That looks like Pyth to me
 
@HyperNeutrino Pyth it is
It's way too long, I'll fix it
 
7:24 PM
For one thing, P is product, U is reverse, Q is idk, t is something, S is sum, so that just looks wrong for Jelly xD
 
@HyperNeutrino Q is input
 
Q is deduplicate in Jelly iirc
 
@HyperNeutrino ŒḄ’?
 
How to get cheap upvotes: Make a language with Jelly's code page, and give it a sufficiently similar name to Jelly (like JeIIy) that people will get confused.
 
@HyperNeutrino Everything is wrong
 
7:25 PM
@BusinessCat I know that's true, because I just used it.
 
@HyperNeutrino I thought it was supposed to end at 1 not 0
 
I lied
I didn't look carefully lol
@cairdcoinheringaahing correct. now read the question through again because we both messed up lol
 
@Mr.Xcoder PowerShell, 24 bytes
 
@BusinessCat right, thanks.
 
I like the +-- in the middle
 
7:27 PM
CMC: n -> [0...n...1]
@AdmBorkBork Nice
 
Programming in Jelly consists of 2 steps: 1. Understand the confusing tacit flow 2. Read the codepage and copy atoms and quicks (and syntactical components) over to do something
 
@Mr.Xcoder Similar, just do $n--+$n in the middle instead
 
@Mr.Xcoder [0, 1, 2, 3, 2, 1]?
 
@totallyhuman For an input of 3 yes
 
@HyperNeutrino @Mr.Xcoder Jelly, 4 bytes: ḶŒBṖ
 
7:28 PM
Gaia, 4 bytes: )…ṫḣ
 
5 bytes: +UQ_S
 
22 in PowerShell
 
@cairdcoinheringaahing for [0...n-1...1]?
5 bytes in Jelly for the more recent CMC (@cairdcoinheringaahing)
should be really easy lol
 
@HyperNeutrino for the one before latest
 
okay. correct :)
 
7:29 PM
Anyway I should probably continue making the language instead of doing CMCs in it
 
I would try but Leaky has set me a challenge to do
so bye!
 
@Mr.Xcoder APL: 0,⍳,1↓⌽∘⍳
 
@Mr.Xcoder SOGL, 4 bytes: δ╬Æj
 
In Cthulhu, I hope it would look like this …:»1
4 bytes
@cairdcoinheringaahing In what language? Jelly?
 
@Mr.Xcoder SOGL, 5 bytes: Iδ╬Æj
 
7:32 PM
@dzaima Is I increment?
 
@Mr.Xcoder yeah
 
Hooray, I guessed right
 
> yrah
 
@totallyhuman Ninja'd by far by the OP
 
For when it's really yeah
 
7:33 PM
Your turn
 
CMC: n -> [0, n, 2n, ..., n^2]
 
CMC: Given input n output the nth Pythagorean triple, where n=1 results in 3,4,5.
 
CMC-ninja'd
 
@LeakyNun Do you have a set of assignments you give to all of us when you teach us how to golf in that language? Or do you just reuse your old CMCs?
@HyperNeutrino What if n=1?
 
then [0, 1]
 
7:35 PM
@AdmBorkBork So what is the result for n=2?
 
@HyperNeutrino vectorised product of range (n) and n?
 
yes
but it's range(n+1)
 
@HyperNeutrino What do you mean by those ellipsis? If 3n<n^2, 3n, if 4n<n^2 4n and so on?
 
The Jelly solution to my challenge is 3 bytes. (@cairdcoinheringaahing)
 
@HyperNeutrino Gaia, 5 happy bytes: :)…צ
 
7:36 PM
@BusinessCat The second Pythagorean triple, (5, 12, 13)
 
@HyperNeutrino SOGL, 3 bytes: ∫*P
 
@Mr.Xcoder I reuse my old CMC or I make up a CMC
 
@Mr.Xcoder It's just lambda n: [k * n for k in range(0, n + 1)]
 
@LeakyNun Thanks
 
@AdmBorkBork ordered by?
 
7:37 PM
Sorry, I'm missing the word primitive.
Ordered by smallest a in (a, b, c) where c is the hypotenuse.
 
@LeakyNun I asked because I saw you used the same for cairdcoinheringaahing
 
@HyperNeutrino 0r×?
wait no that wouldn't work
 
@totallyhuman That's one way to do it :)
@totallyhuman well it does
 
it would? i clearly don't understand chaining
 
@HyperNeutrino m*QdUh
 
7:39 PM
I don't either :P I just happen to know that it works :P
 
Anywhere it's missing an argument, it uses an input
 
@Mr.Xcoder Pyth?
 
@HyperNeutrino what else?
 
That's the really really simplified version
 
7:39 PM
@HyperNeutrino CJam: {_),\f*}
 
oh I didn't look at the link
nice
 
Thx
 
@cairdcoinheringaahing Have you found a 3-byte Jelly solution yet?
oo
wait no that's wrong
 
Jim
@Mr.Xcoder Or m*dQ}Z
 
@Jim That too
 
7:40 PM
@Challenger5 question: why do you always edit your CJam CMC submissions :P not judging you, just curious xD
 
@HyperNeutrino Check hypertraining. I'm doing that. In about 20 bytes
 
Okay.
I should try that sometime
 
@HyperNeutrino Because I usually edit my submissions, and most of my submissions are in CJam. In this case, though, it was because it was invalid.
 
ah okay.
 
Maybe I should make my CMC into a MC
 
7:42 PM
@Jim wanna make pyth training together?
 
Jim
@Mr.Xcoder Yes I do
 
name it pyth supertraining
 
0
A: Sandbox for Proposed Challenges

dzaimaApproximate the Score of a 2048 Game The game of 2048 goes like this: Every move you get another piece - either a two 90% of the time, or a four 10% of the time for each 2 equal pieces combined you get a piece of the sum of the two (aka *2 of one of them) and that gets added to your score Yo...

 
Pythertraining
 
and then we'll have <another language> training
 
7:43 PM
@Jim Join ♦ Pyth Training for Jim and Mr. Xcoder

  Pyth Training

A room founded by Jim and Mr.Xcoder for Pyth training
I made you a room owner
 
@LeakyNun Could you fix this answer? it's technically invalid
 
@Mr.Xcoder I want to apply, but then Jelly is forcing me from applying
 
@cairdcoinheringaahing Join after you finish the Jelly Hypertraining
 
@Mr.Xcoder not possible to finish
 
@Mr.Xcoder that would take a while
 
7:46 PM
back in my day we read the documentation :P
 
@Mr.Xcoder even Hyper hasn't finished and he's been doing it for yonks
 
@cairdcoinheringaahing Well, once you pause it
 
@Mr.Xcoder If that's so, I should apply now
Also you should make isaac a RO as he made it
 
I'll give u write & read access
@cairdcoinheringaahing Done.
 
@cairdcoinheringaahing dennis isn't an RO for jelly :P
 
7:48 PM
@cairdcoinheringaahing There is already a sleepy Pyth room
 
@totallyhuman yeah but I'm pretty sure he said he didn't want anything to do with hypertraining when it was made
 
Jelly Hypertraining requires commitment, ya know. It's not a simple matter of "after you finish". Heck, I don't know how long that will take me xD
 
@HyperNeutrino ~90 years?
 
@cairdcoinheringaahing then you should ask isaacg too before making him have something to do with Pyth Training
 
@HyperNeutrino did it take you that long to write that comment?
 
7:49 PM
no
 
What do you actually do at Hypertraining?
 
just came back after adding some things to my Jelly attempt at the HT problem
 
@Challenger5 learn jelly
 
@Challenger5 do challenges
they get progressively harder
 
I see.
 
7:50 PM
Like really quickly get harder
 
The FitnessGram Pacer test ...
 
@totallyhuman So I don't actually have to join. I can just read the transcripts and solve the problems myself, right?
 
Yeah but you can't get help that you want
 
I just devised an algorithm to find partition(N) with polynomial complexity :o
 
You can if you want, but then you can't ask Erik and Leaky for help
@LeakyNun :o nice
(well at least not in HT, TNB still exists)
 
7:51 PM
Well you could ask in here, but that might not be good
 
HT was created to prevent TNB and Jelly students from interrupting each other lol
 
in fact the complexity should be O(N^3)
 
@LeakyNun >_< can you explain what does partition(N) do without integral symbol?
 
@Downgoat the number of ways N can be partitioned into sum of positive integers
5: [5], [4,1], [3,2], [2,2,1], [3,1,1], [2,1,1,1], [1,1,1,1,1]
 
@HyperNeutrino I've been asking for golfing advice on CG'C
 
7:53 PM
@LeakyNun ah, huh, cool :D
 
@Challenger5 what is that
 
@HyperNeutrino Code Golfer's Corner. It's that one nobody used until it was mentioned on Meta recently.
 
ah ok
 
@LeakyNun are you adding R to the long list of languages you know?
 
7:55 PM
@totallyhuman yes
 
damn
do you ever get confused
 
@totallyhuman always
 
I sometimes get confused, and I only know like 4 languages!
 
Though I'm sure my O(N^3) algorithm must have been discovered before me
 
do you have a physical list of "languages you know"?
 
8:00 PM
@LeakyNun this might be relevant, but it's too much math for me at the moment
 
@Challenger5 now that's an O(N^2) algorithm.
@ConorO'Brien I don't
 
Do you know more practical languages or esolangs?
 
@Challenger5 no idea
 
@ConorO'Brien On my resume.
It's rather small.
 
Just PowerShell? :P
 
8:15 PM
VBScript and HTML
plus a little Java
I'm probably really rusty on my Java and VBScript, though.
Just because 99% of my answers here are in PowerShell doesn't mean I'm only a PowerShell coder.
 
mutters wish java would rust
 
That's languagist.
I don't know Rust.
 
To be fair, PowerShell is the best golfing language out of the above...
 
\o/
AdmBorkBork, haven't seen you in forever
 
PowerShell can be rather golfy.
/wavehi
On average, it's about the same as Python or JavaScript.
 
8:19 PM
I lost to PowerShell with CJam once
 
@AdmBorkBork do you remember your TIO quine challenge in the sandbox?
Dennis wrote one, but the permalink format is slightly different now.
 
The one I've updated twice today?
 
¯\_(ツ)_/¯ I don't know all the things you do.
 
hehe
 
0
A: Sandbox for Proposed Challenges

AdmBorkBorkPrimitive Pythagorean triPles A Pythagorean Triple is a list (a, b, c) that satisfies the equation a2 + b2 = c2. These can be ordered by the c to form a well-ordered list of lists. A Primitive Pythagorean Triple is one where a, b, and c are all coprime (i.e., the only common divisor between the...

 
8:25 PM
@AdmBorkBork VBScript is basically JScript which is basically JS
 
Uhh ... not really
:p
 
yeahhh kinda
 
The syntax for VBScript is stupid different.
It's closer to VisualBasic than anything else.
 
Wait, so there's V, Vi and Vim
 
And P and Py and Pim
And R and Q and my name's Tim
yay, song
 
8:34 PM
wait what's pim
 
Language learning for little kids.
Spoken language *
 
Question: Gaia has "all true?" and "all false?" operators for lists, which one should give a truthy result for an empty list?
 
@totallyhuman And Stevie, and Ex, and Elvis, and Nvi, and Vile, and Evil, and Neovim, and ...
 
@BusinessCat false
empty is always false :P
 
Yeah that's true
 
8:36 PM
0, "", []
 
Empty list is false...
 
They should return back an empty Boolean value, haha
 
Jim
@BusinessCat In Python, all([]) is True so I would say "all true"
 
@Jim bool([]) is false
 
But "all false?" is all([not i for i in l]) which is still true for []
 
Jim
8:38 PM
@cairdcoinheringaahing Yes but "all true" translates to all(), not bool()
 
yeah, you'd want the all false? to be truthy for [], imho
 
mm fair point
 
2
Q: Setup the tribal totem for the requested weather

JimThere is a Sioux village. It has a totem: __ ___| |___ \/ \ / \/ /\ ``| |`` /\ /^^\ | | /^^\ / /\ \ | | / /\ \ '''''''''''''''''''''''''''' The totem lets the Sioux mastering the weather for helping in their different ta...

0
Q: Sum of all integers from 1 to n

GarethPWI'm honestly surprised that this hasn't been done already. If you can find an existing thread, by all means mark this as a duplicate or let me know. Input Your input is in the form of any positive integer greater than or equal to 1. Output You must output the sum of all integers between and i...

 
Alternatively, they could both be true for [] since they aren't actually opposites
 
Jim
@BusinessCat Yes, I thought of that too
 
8:44 PM
I kinda like ^^
 
I found 70 messages with Alex A. using fu*k. I wonder what the other mods have
 
0
Q: Who was the biggest "Weekend Update" host during that time period?

geokavelThese are the hosts of the "Weekend Update" news segment on Saturday Night Live, with the years they hosted and their initials: Chevy Chase 1975-1976 CC Jane Curtain 1976-1980 JC Dan Aykroyd 1977-1978 DA Bill Murray 1978-1980 BM Charles Rocket 1980-1981 C...

 
9:05 PM
I feel like I should start golfing in AHK
 
10:00 PM
@BusinessCat Make a third Bool value for "indeterminate".
 
CMC: create a program that runs itself that runs itself that runs itself... forever or until the recursion limit is hit
 
BATCH, 5 bytes: %0|%0
The only code-golf contest that BATCH will ever win be competitive in.
 
Jim
@dzaima Pyth, 4 bytes: Lyby
Not sure if that counts. It creates a function y which call itself
 
@dzaima What if a limit is never hit?
@dzaima APL, 4 bytes: {∇⍵}
 
@Jim If that counts, then ò is a valid V solution. Creates a macro '@q' that calls itself
 
Jim
10:11 PM
@DJMcMayhem Can't beat that
 
If a macro counts as a program, then yes.
 
1
Q: Create a shifter

K Split XYour program will take in 2 inputs, int num, int shift The number will be in decimal, not binary. Your shift amount will also be in decimal. Your task is to "shift" the digits in num either to the left or right, depending on the sign of shift, and you will shift it shift amounts. If shift < 0...

 
Underload: (::*^):^. Concatenates the program with itself, and then runs it.
 
Hey guys!
Does somebody understand the spec for this "Create a shifter" challenge?
:S
 
@Dennis I assume if the moderator's account is terminated (i.e. due to abusing mod powers) then a new mod will be chosen as well?
@BruceForte I didn't understand it, so I VTC'd as unclear.
 
10:24 PM
I understand it
trough it's not well specified, I agree
 
@Challenger5 I see
 
I don't get it
 
@dzaima What is it about?
 
oh I think I get it now
it's really poorly written
 
Should I look at the binary values or what?
 
10:26 PM
it's basically for (i = range(input1)) {input2[i] = input2[1]} return input2 and the reverse for negative numbers
 
Oh ok, now I get it.
 
I still don't understand it
 
@Challenger5 Well, yes. That's just another case of stepping down, just not voluntarily. ;)
 
But what the f--
 
I'm getting ideas...
just kidding
The binary representations of the two numbers in the first test case are 1110001001011 1111000101100.
What's the pattern?
 
10:30 PM
No it's a decimal shift
 
Really? Then I have no idea. It was tagged .
 
And instead of the sign bit you just copy the first/last (depending on direction) digit
7243 >> 1 == X724 and you fill X with that 7, I guess
 
10:42 PM
@Uriel ninja'd B)
 
3
Q: Most common elements of a list in Python

musicman523This is a tips question for golfing in Python, which is on topic for main. I'm looking for the shortest way to get all of the most common elements of a list in Python, in the shortest way possible. Here's what I've tried, assuming the list is in a variable called l: from statistics import* mo...

 
0
A: Sandbox for Proposed Challenges

nneonneoFind an Illegal String The challenge is to find a sequence of characters that cannot appear in any legal program in your programming language of choice. That includes not appearing in comments, strings, or other "non-executable" parts. Challenge Your program may be specific to a particular ve...

 
10:57 PM
@cairdcoinheringaahing memes are for reddit not a programming site
 
yo anyone know of a way to type a or A on a windows keyboard without using any of the keys forbidden by this challenge
 
@Mayube Trying to do it in Vim?
 
@musicman523 AHK
 
The only way I can think of is with using Alt+ whatever the code is, but I'm sure the digits are forbidden and I don't know if the A in Alt would be
 

« first day (2362 days earlier)      last day (2480 days later) »