« first day (2389 days earlier)      last day (2750 days later) » 

16:05
@StepHen Try not to post them in the first place! :-p
That's too hard
Hi there
CMC: Find the prefixes of the prefixes of an array
[1, 2, 3, 4] -> [[[1]], [[1], [1, 2]], [[1], [1, 2], [1, 2, 3]], [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4]]]
[3] -> [[[3]]]
[1,2,3,4,5,6,7] -> [[[1]], [[1], [1, 2]], [[1], [1, 2], [1, 2, 3]], [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4]], [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5]], [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6]], [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 7]]]
@Mr.Xcoder 05AB1E 2 bytes, ηη
@Riley That's was my solution too (05AB1E newbie) :)
Gaia, 2 bytes: ……
16:11
In Pyth it's 5 bytes: ._M._
@BusinessCat Woah, you implemented auto-vectorization :O
Or something
@Mr.Xcoder So basically, apply a built in twice, rather than once? :P
@Mr.Xcoder No I didn't
@DJMcMayhem Yeah, and maybe use a map :) - I am just bored :P
@BusinessCat Then how is it 2 bytes?
@BusinessCat Am I crappy or this doesn't work?
I really need to make list parsing for input (it should still be valid as 2 bytes since it's a function)
16:16
;\;\€ in Jelly (output looks wrong because of singleton lists)
In hindsight I wish I had auto-vectorization >:(
CMC: Given an integer, find the sum of the odd digits and double it (of course, lists are allowed instead)
shouldn't be too hard to add? depends on how you made it
I'll make another golfing language later with it though
@HyperNeutrino It has overloading for every type, list is one of the types
16:17
@Mr.Xcoder Double the sum?
@HyperNeutrino Rip, Jelly as long as Pyth :)
@BusinessCat sum * 2?
OK just clarifying
sum of the odd digits * 2
12345 -> 18
Proton: d=>sum(filter((%)&2,d))*2
Or [1,2,3,4,5] -> 18
16:18
(digit list)
->n{n.to_s.chars.map(&:to_i).select(&:odd?).inject(0, &:+)*2}
that's the readable version
Gaia, 5 bytes: $r⁇Σḣ
@HyperNeutrino Swift is similar:{$0.filter{$0%2>0}.reduce(0,+)*2}
Jelly: ḂÐfSḤ
@HyperNeutrino Nice :)
16:19
@Mr.Xcoder oh huh interesting. Swift has interesting syntax
thanks :3
@Mr.Xcoder PowerShell, 29 bytes -- ($args|?{$_%2})*2-join'+'|iex Try it online!
CMC: Given a number or a list of digits, output the sum of the even digits, tripled
@HyperNeutrino Yeah, $0 is the first element of the anonymous function. Like a lambda.
ah ok
12345 -> (2 + 4) * 3 -> 18
->n{n.to_s.chars.map(&:to_i).reject(&:odd?).inject(0, &:+)*3}
16:20
I actually made a huge mistake
{a in a.filter{$0%2>0}.reduce(0,+)*2}
@JohnDvorak nice. random guess: is that ruby?
This one is correct ^^
@HyperNeutrino Of course
@Mr.Xcoder wait the a in b has higher precedence than a.b?
@HyperNeutrino 32 bytes. need !( ) around the modulo and swap the 2 for a 3
16:22
@HyperNeutrino in is not an operator. It names the first argument of the lambda. {a in (block)} is like a->(block) in Javascript or lambda a:(block) in Python
@HyperNeutrino Swift: {a in a.filter{$0%2<1}.reduce(0,+)*3}
anyway gtg now o/
Bye o/
Lol, I made a mistake in Proton and messed it all up, blames braces syntax :P
now imagine you messed up the protons inside atoms instead
16:28
@JohnDvorak I often do that in theoretical calculations during the chemistry class :)
don't push to production!
CMC: Given a list of integers, sum up the digits of each and sum the list (numbers may NOT be taken as lists)
[1, 34, 290, 190, 28, 55] -> [1, 7, 11, 10, 10, 10] -> 49
So basically the sum of all digits in the list
@Mr.Xcoder jelly 3 bytes: DẎS
or ASCII-only: DFS
@Mr.Xcoder Jelly, 3 bytes: DSS
16:32
Gaia, 3 bytes: $$Σ
I know I was ninja'd, but I'm slow on my phone
Nice all
05ab1e, 2 bytes: SO
blames stack architecture
@Mr.Xcoder nope
16:34
@EriktheOutgolfer Solve it in Pyth and Do not reveal the solution, reveal the byte count (of course if you have time. I want to compare the solutions.
Ok, let me do it too
yes, 5 bytes here too
does it work?
NONO
Wait
Mine is 6 bytes.
yeah that's why I asked
@Mr.Xcoder want help?
16:37
@EriktheOutgolfer You still have 5?
No, I don't want help yet
Recursiva, 37 bytes: <a 2:*3%a 2!+*3*%a 10%%a 10 2#I/a 10$
@EriktheOutgolfer 5 bytes
alright may I reveal?
16:38
@officialaimm Woah, never heard of that language
@EriktheOutgolfer Here is mine: ssjRT. What is yours?
Good :)
@Mr.Xcoder I am writing it... the solution is so long because i am doing it without loop... but witha recursive function... :D
@officialaimm oh, by the way, non-competing for newer interpreters doesn't really exist anymore
lemme find the meta post
@EriktheOutgolfer Have time for JHT or Pyth CMCs here?
@Mr.Xcoder hmm...dunno right now
@StepHen Thanks... but can I submit answer if the feature just added is also used in it?
@Mr.Xcoder Python, 42 bytes lambda l:sum(map(int,''.join(map(str,l))))
Probably room to golf
I think there is room for golfing indeed
Let me try to golf it
16:43
@officialaimm yup that's what the meta post says. you just can't, for example, write an interpreter that solves exactly that problem in 0 bytes or something like that, but you can implement something you were planning or something like that and then post
I can't freaking remember how I solved this cop 0.o I remember doing it, but not how I did it
@BusinessCat 41 bytes in Python 2: lambda l:sum(sum(map(int,`x`))for x in l)
Of course, I forget about using backticks
@StepHen oh phew I figured it out again
CMC Find the second lowest element in a list of integers with at least two distinct elements
testcase with many minimals?
16:48
@EriktheOutgolfer [5,6,0,7,2,4,1,1,0,0] -> 1
hmmm
@Mr.Xcoder then
Gaia: ȯ2=
jelly, 3 bytes: Ṣ2ị
@Mr.Xcoder Braingolf, 3 bytes: k$_
16:49
3 bytes is so common :O
psuedocode: min(list.removeAll(min(list)))
@Mr.Xcoder in pyth it's 4 :/
@EriktheOutgolfer 4 bytes in Pyth
Or an alternative
@EriktheOutgolfer Doesn't work
Don't worry, in CJam it's 5
@Mr.Xcoder it works for me?
@EriktheOutgolfer Take [0,3,4,0,1]. The result should be 1, not 0
oh wait I confused your testcase lol my jelly is invalid :/
16:51
@Mayube @BusinessCat Seeing my comment above, are your solutions valid?
Oh then mine doesn't work
It should be ȯu2=
jelly, 4 bytes: QṢ2ị
@EriktheOutgolfer You could have done better than @SQ1 anyway. 3 bytes for that one please.
htS
but doesn't work
Right +1
CMC (notice my CMC abundance): Given a list, get the GCD of all the pairs of two adjacent elements.
16:54
randomly?
[5, 3, 9, 18, 6] -> [1, 3, 9, 6]
@EriktheOutgolfer Sorry, bad wording
oh then
jelly 3 bytes g2\
Markdown fail :)))
gotta hate markdown
@EriktheOutgolfer 3 bytes in Pyth too :)
16:55
I needed ``g2\`` for that >_>
@Mr.Xcoder iVt
@EriktheOutgolfer Right
btw that Vt (<pf2>) trick is neat
@EriktheOutgolfer I know, I am proud of my discovery :)
@Mr.Xcoder brb implementing my GCD function
16:57
Yes
I haven't made a GCD function yet
@EriktheOutgolfer FryAmTheEggman outgolfed us badly yesterday though :)
technically
However I will do the CMC without using it
I mean, HOW didn't we notice -1iVt ?!!?!
@EriktheOutgolfer We are... Not smart when it comes to simple stuff
16:59
> - <num> <col> Cast A to B's type, then filter on absence.
HOW did THAT hide from US?
Yes, I know what - does lol
sighs .AtM IS COUNTERINTUITIVE!
I meant the explanation piece
@EriktheOutgolfer Yeah, I know
@Mr.Xcoder Does the list contain only positive integers?
@BusinessCat You may assume that
17:01
Gaia, 13 bytes without GCD builtin
¤;%:⇇\?
2Ṡ⇈⊢¦
Why didn't I know .O existed in PYTH >>>_>>>
convert to octal...convert to octal...AVERAGE!!!!11
@BusinessCat Golfy enough for a non-built-in
pffft pyth has a lot more than we thought
17:02
It would be 5 if I had one
@EriktheOutgolfer Lol yeah. Why is Average the last one?
Which still feels too long
@Mr.Xcoder probably because isaac put it in such an order...
Too bad Pyth is ascii-only :( - It might have been the best golfing language
But I love the fact that I can type it
I think pyth was made before "custom encodings" was a thing or something
and it already has a heck lot of overloads
17:04
I have started learning Pyke and it's quite ok :)
(something which jelly doesn't)
@EriktheOutgolfer Yes, it does
@Mr.Xcoder only 3
Ṡ Ḟ Ċ
0
Q: Should the output to STDERR count as output length?

iBugA few challenges that requires the program to output something at a specified length, and a bunch of answers well... uses built-in error messages that's generated by the interpreter rather than the program itself. Say for example, this program outputs a total of 20 bytes (not counting trailing n...

but so far there hasn't been any need to overload any more in jelly
17:05
Make Pyth 2.0 that has a codepage
Anyone pls come up with a CMC for me to train my Pyke. My challenges are too hard. Also, pls avoid lists
pyke.catbus.co.uk seems down from me
Also, The Pyke interpreter has a very nice feature "Copy answer", which is essentially like tio's, but it also adds a starting ground for an explanation
@EriktheOutgolfer You must go to port 5000. Here is the link: pyke.catbus.co.uk:5000
17:08
oh...erm @muddyfish can you fix please?
@EriktheOutgolfer He is already working on it, IIRC
Come on people, I gave you 5 freakin' CMCs, all I ask is 1.
oh found one
CMC: go to rickroll
ಠ_ಠ
@Mr.Xcoder Are dupe CMCs allowed? :D
CMC: Compute OEIS A000113
17:10
@officialaimm Course
@Mr.Xcoder I have 23
@EriktheOutgolfer In Pyke?
yep
(pyke not pyth btw)
@EriktheOutgolfer Never gonna give you up (23 bytes in Pyke)
yep that's it
17:12
CMC: Given n, calculate the nth Catalan number. (1/n+1)(2n choose n)
@BusinessCat What is 2n choose n?
probably cartesian product
Combination I think!
Binomial coefficient(2n, n)
WTH is binomial coefficient :)
17:14
Binomial coefficient(n, k) = n!/(k! * (n-k)!)
Ok, trying to do it (it's challenging though)
oh so combinations
Where 0 <= k <= n
@BusinessCat Also represented by C(n,k) or combination right?
@officialaimm I suppose, the most common colloquial term I hear is n choose k
It's binomial coefficient because C(n,k) is such that C(n,k)(x^k)(y^(n-k)) is a term of the expansion of (x+y)^n
17:18
So it's (1/n+1)*(2n)!/(n!*(2n-n)!) = (1/n+1)*(2n)!/(n!^2), right?
Yes I believe so
Thx, hope I did the maths correctly. Brb
@BusinessCat I think this can make up as a main challenge as well??
I'm pretty sure it is one already
@officialaimm It is
@BusinessCat cQuents: f2$)/(f$+1)f$
17:21
back, solving the cmc
thanks business cat!
Aka (2n)!/((n+1)!n!)
Gaia, 7 bytes: ;ḣ¤K¤)/
I was planning to add a builtin for it though
@BusinessCat Sorry, Pyke does not have a factorial built-in... Shoot
Now the Pyke interpreter doesn't work >_>
@muddyfish pyke.catbus.co.uk:5000 seems to be down too
yay segfaults ಠ_ಠ
@HyperNeutrino In proton?
17:28
yep
WAIT WHAT
nvm I was using = for comparison in my Proton program ಠ_ಠ
MD XF would love it
it's not my fault, it's my fault. wait that makes no sense. it's not Proton's fault, it's my stupidity's fault. :P
@HyperNeutrino Is that a syntax error? Or just messed something else up
@HyperNeutrino Teach me the basic syntax pls :P
no it just tried assigning to something that was unassignable
@Mr.Xcoder well I need to know where to start :P I dunno how to teach practical languages. what do you want to know first
17:30
@HyperNeutrino First off: 1. Hello World Program. 2. Print the input. 3. Print the given list sorted. 4. Prime program
Like, I'll learn by seeing
Hello World: print("Hello, World!")
Print input: print(input())
(see the resemblance to Python? :P)
@HyperNeutrino How do you make Python segfault? Unintentionally, I mean.
I already solved those too
Print the list sorted: sorted (as a function) or a => sorted(a)
@Dennis I don't even know... I think I blew the recursion stack since Proton uses a max recursion limit of 100000 by default
Gotcha. You have to make the stack bigger if you want 100,000.
17:35
@HyperNeutrino And 4?
resolving bugs rn
Lemme try to do 4 by diving into the docs...
@BusinessCat Very much like @StepHen 's cquents (Provided If I add builtin for factorial :D) Recursiva, 12 bytes : /G*2 a*G;aGa
There are many bugs that I found that I now need to fix.
@HyperNeutrino The syntax is pretty obvious :)
17:38
ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ I wasn't making return an expression, only a return_statement which isn't recognized by code block patterns lol
@Mr.Xcoder yeah it's like a cross between Python, JavaScript, and Java.
And classes right now are derpy
@HyperNeutrino umm 1 isn't prime
Python because no brackets for if, for, etc. JavaScript because =>. Java because well actually idk
@HyperNeutrino This block doesn't execute correctly:
if (number < 2) {
		return False
}
I mean, It seems to have no effect
yeah I have another bug to fix.
return statements don't return properly
17:40
I wouldn't recommend RLIM_INFINITY for a practical language though.
@HyperNeutrino && or and or sth else?
@Dennis What's the thing you and miles pushed yesterday (or today?) with prefix suffix?
@HyperNeutrino I don't think you can reasonably except a doubly recursive function to work up to 10000.
17:44
yeah :P
hey at least it's memoized
Are you sure? It should work if it's memoized.
Actually, it's just because Proton makes about 3-4 calls per real call
@Dennis well no, it's not memoized properly though
(I think) :P
Premature memoization is the source of all evil. :P
Proton Functions:

https://tio.run/##rVTBboMwDD23X@FjoKjStBtST5P6BbtVFUoh0KhZQElY169ndgK0MCpt0k44tt/zi@3Q3Ny51q9dlytuLexbnTtZ63S9KkQJWSa1dFnGrFBlAmUfTSDn1sEO3k0r6JCfBZ72XFkRIXRVqfrEFcgCbYJuByRmDeYQ6qnoc3c9EA5OWaDHM6K12cELWSXo2sGZ24u4sUklr2NVon/Lm0boYhamKAbtED0cvav85Oo5AINTQGgS18XYo9qdhfHFjXCt0WNLmeIfp4JDzE1lE4jjy5WsFCZlWMzICxtgnimJonsummPLRpNahQJC4XAehZn/VBb0zLP@rCnnSo2a5mRpGOrImILvRlgP35lokjEUYoGnZwGpoRLuyU70t8cEHOc0IVmGbaUuxBebFolIicAF7Ultq2iPZ9Oc3Y9SJ@o9eLVctV@0WdkBgOK5MfwZKgiKHi4cPOPOFkub4S16pGHaBKd0qbUwbGlYA7lP93Q/0qKFjfOE/UpY4d6wFVJXvZywL@n8b@C/dy6KBYKrbAQxCI/3QHrZB//4w@imPToi2@G4Du/5
> meoization
17:46
@Mr.Xcoder Mapping a link over all prefixes or all suffixes of a list.
@Mr.Xcoder meowization
before that declaration there's also fkey = []; keys = []; fval = []; vals = []
@EriktheOutgolfer Is that a LOLCODE feature? :P
@Dennis Ooh, nice. That will be helpful with the recent challenges
@Dennis Can you please provide me the standards to follow if I want my language hosted in TIO?
17:47
Step 1: Make it work with file input without cd into the directory. Step 2: put it on github. Step 3: Ask Dennis nicely. poof :P (idk, this is what I remember)
@DJMcMayhem "meowization" is the correct spelling of "meoization"
Also Proton is not tail-call optimized
@officialaimm It must work on Fedora 26 and non-interactively. It also shouldn't require network access. Everything else can be worked around.
waiit
what is Fedora
A Linux distro.
17:50
linux disninja'd
Fedora (formerly Fedora Core) is a Unix-like operating system based on the Linux kernel and GNU programs (a Linux distribution), developed by the community-supported Fedora Project and sponsored by the Red Hat company. Fedora contains software distributed under various free and open-source licenses and aims to be on the leading edge of such technologies. Fedora is the upstream source of the commercial Red Hat Enterprise Linux distribution. Since the release of Fedora 21, three different editions are available: Workstation, focused on the personal computer, Server and Cloud for servers, Atomic...
Just searched ^ :P
Bleeding edge variety. Which is nice for an online interpreter.
No one ever solved the thing with Is itertools ever the solution?
So, I need to make it take the code and arguments via command line, its REPL atm.. Thanks @HyperNeutrino @Dennis
Markdown fail: itertools
CMC: Given a list, find the median of each of its preffixes. (Especially interested in the Jelly solution cc @Dennis)
Of course, the list only contains integers
17:58
@Mr.Xcoder sort the list and duplicate each element?
@LeakyNun Mhmmm, Is that the same thing?
@Mr.Xcoder and then truncate it to the length
Like [1,2,3,4] -> [[1], [1,2], [1,2,3], [1,2,3,4]] -> [1, 1.5, 2, 2.5]
@Mr.Xcoder oh, never mind, sorry

« first day (2389 days earlier)      last day (2750 days later) »