« first day (2588 days earlier)      last day (2246 days later) » 

3:00 PM
Just going to note, the challange never says the output format, so your output could be your own program halting. I'll go point that out :p
 
;-; Dammit I forgot each character has to be repeated at least twice for my program to be non-discriminating.
 
rip
Killed a solution? What was it?
 
Just some Pyth Jelly code
 
hi
 
Hello
 
3:04 PM
so.. I am thinking of posing computing the Hafnian of a matrix as a challenge
 
any thoughts?
 
See the sandbox? :P Leme see what that is
 
do you regularly comment on sandbox questions?
 
I just think it's ok as
 
3:05 PM
RIP. The wikipedia article on that is a stub. Mind explaining, @Lembik?
 
If they'll post it, they'll probably explain it anyway
 
I don't do calculus (or whatever that is, i think it's calculus)
 
More like linear algebra but meh :P
 
@moonheart08 as in en.wikipedia.org/wiki/Hafnian ?
 
yea, that article. It's a stub
 
3:06 PM
it's adding really :)
let me pose the sandbox question quickly :)
 
mk
the bot in here will tell us once it's posted, so that'll get you some quick feedback :)
 
I can't even tell what format it is in
 
It's an svg
 
it's a svg in xml format. View the page source for an eyesore
 
ah.. how do I convert it to png or jpg?
 
3:12 PM
Screenshot :P
 
^ probably the best option, no joke. SVGs are awesome and horrible at the same time
 
There you go, a PNG
 
thanks!!
 
ok so I need examples
anyone fancy a bit of coding to help?
 
3:16 PM
I am willing to help if you help me understand what it's about :)
 
Well, there is the definition. It's certainly self-contained.
 
@Mr.Xcoder sure no problem
@Mr.Xcoder is the definition clear?
 
(need some related definitions to understand, what is S?)
 
@user202729 it's the set of permutatons of the integers 1...2n
 
@Lembik What do A and the small sigma represent?
 
3:17 PM
@Mr.Xcoder small sigma will be one of the permuations. You are summing over all permuations of the intergers 1...2n
 
I will try reading Wikipedia and other sites.
 
0
A: Sandbox for Proposed Challenges

LembikCodegolf the Hafnian The challenge is to write codegolf for the Hafnian of a matrix The pHafnian of an n-by-n matrix A is defined as Here S_2n represents the set of all permutations of [1, 2n]. Your code can take input however it wishes and give output in any sensible format but please inclu...

 
A is the input matrix
 
Ok let me digest a bit
And what exactly is n?
 
A is an n by n matrix
 
3:18 PM
... Sounds easy.
 
Oh the half-dimension
@Lembik 2n by 2n
Ok I'll to try to implement it
 
@Mr.Xcoder thanks!
after the code-golf challenge there will be a fastest code challenge :)
 
@Lembik "It's guaranteed that for all i,j, A[i][j]==A[j][i] and A[i,j] in [0,1]?"
 
I didn't know the term "half dimension"
@user202729 no.
where does it say that?
 
@Lembik But it's an adjacency matrix. Why not?
 
3:20 PM
@Lembik I don't know if that's a thing, but it's half of the dimension
 
Unlike half-life, this doesn't have any special meaning.
 
@user202729 it doesn't have to be an adjacency matrix. it is defined for all matrices
 
But...
Does the definition have mathematical importance for other types of matrices?
 
The Wikipedia page seems quite incomplete to me
 
@Mr.Xcoder But enough to understand.
 
yeah
 
someone needs to improve it
 
I guess I can assume the matrix is a square matrix of even side-length, right?
 
@Mr.Xcoder yes
I am not sure it is defined otherwise
 
> This algebra-related article is a stub. You can help Wikipedia by expanding it.
 
3:27 PM
there should be a challenge for how quickly you can code things too
with a fixed release date for the question :)
 
Does Jelly have foldr?
 
or just a "code this in 30 minutes or less"
no idea :)
 
That's not a good idea because people could start solving it prior to the official release of the chalenge
 
@Mr.Xcoder well they wouldn't be able to if the question has a release time
as in they wouldn't have seen it until then
 
3:29 PM
Ah, mhm. That might be fun, but not on PPCG :)
 
no :)
I mean.. yes :)
that's a case where no == yes
My favourite is to implement the best break out you can in 30 minutes
I still think that's a great programming challenge
 
Do you have any test case @Lembik?
I want to test my code
 
no :- \+ yes
 
Wait I think that's why you needed the code lol
 
3:32 PM
CMC: find largest even integer in a given list of any order
 
4 bytes in Jelly
 
@Mr.Xcoder it is !
 
@ConorO'Brien can we assume that the list only contains integers?
 
Jelly, something like ḂÐḟṀ
 
or do we need to assume that it might have non-ints.
 
3:33 PM
@user202729 thanks!!
 
@ThomasWard sure
 
@user202729 I am amazed you did it in jelly
 
@ConorO'Brien Order?
 
@ConorO'Brien e=>e.Where(i=>i%2<1).Max()
 
3:34 PM
@Pavel ==0 => <1
 
Who says that golfing languages must be hard to use?
 
@Dennis as in, you can't assume its sorted
 
Right.
 
@user202729 hmm.. try [[1,0],
[0,1]]
are you sure the answer should be 0?
 
Jul 2 '15 at 4:31, by Dennis
I use CJam for everything. It takes much less time to write.
@Lembik Yes of course. The graph with two self-loops doesn't have any perfect matching.
 
3:36 PM
@Mr.Xcoder Bits, negate, times, Max?
 
What's the convension wikipedia uses for indexing?
I mean, 0 or 1 based?
 
@user202729 ah yes!
 
@ConorO'Brien Max@*Select[EvenQ]
 
@Mr.Xcoder a good question.. I imagine there is none
 
@DJMcMayhem filterfalse by bit, max
 
3:37 PM
Point-free Mathematica \o/
 
@DJMcMayhem That would fail for negatives, no?
 
@user202729 thanks again for this.
 
@Mr.Xcoder That is not important, will arrive at the same result anyway.
 
@user202729 do you think I should pose it as fastest-code or code-golf?
or one and then the other
 
Why does my code error?
 
3:39 PM
I think both.
 
@Lembik code-golf.
 
@Mr.Xcoder I am worried it might be too simple for code-golf
already down to 28!
 
It's not too simple for code golf...
 
@user202729 I like that idea
 
@Mr.Xcoder Because you use 1-indexing for Python.
 
3:39 PM
28 in Jelly is huge
 
28 bytes is not simple.
 
maybe I could insist it can run for n = 6?
 
@user202729 Adding -1 still doesn't work
 
that would cut out most solutions
 
@Lembik ಠ_ಠ
 
3:40 PM
Then you need to define "can run".
 
@user202729 I was thinking in TIO
before the cut off
 
Should [[0,1],[1,0]] result in 1?
 
@Mr.Xcoder No? I don't see why it would
 
3:41 PM
@Mr.Xcoder Yes.
@Mr.Xcoder Why do you name it telescopic_sum when there is no telescope at all?
 
remind me for CMCs, if I pass a test list in as l in order to be part of a line of code, should that passing in of a test list be included in the bytecount, or can I just put it in the 'header' field of a tio.run, for code bytecount purposes. Concurrently, do I need to provide code as a function, or is it ok for it to just be a one-liner?
 
¯\_(ツ)_/¯ I needed a name
3
 
it's been a while since I did codegolf :)
 
Hardcoding is not allowed at all.
You should either build a function
Or a full program
 
@ThomasWard Your code can be a function or a full program, but you are not allowed to assume the input is stored in a certain variable
 
3:43 PM
ok
that's what i thought but it's been a while
@Mr.Xcoder Unfortunate for you that DJ is better at explaining things.
imo
 
Nah I didn't really bother :P
 
Also, an answer that evaluates to the right function works too. (It doesn't have to be named). So if the challenge was find the length of a list then len is a valid solution
This means that if you do a lambda, you can leave out the f=
 
@DJMcMayhem right, I remember that part
 
@ThomasWard You use mostly Python, right?
 
yep
 
3:47 PM
@Lembik Try it online! – A better version, takes input from STDIN
 
@DJMcMayhem it gets tricky when we have to eval(input()) in order to provide input as a list, and what is confusing me is where I need to provide that - i.e. if that can be provided as a 'footer' in a tio.run item (basically: print(f(eval(input())))), and not count against the bytecount or not.
 
You should not include print(f(eval(input()))) in the byte count.
 
as you can see it's been a while since I codegolfed :)
that's what I thought
 
You only need to include the function body / program in the byte count. If it is a recursive lambda (or if you actually make use of it in another function you define), you should count f=, if it not recursive you should not count f=, if is is a full function (def-style), you should include the name too, because it cannot be anonymous and for a full program you count everything your program needs to execute correctly :)
 
@ThomasWard Yeah, you would need that for a full program, but not a function.
Also, switching to Python 2 saves 7 bytes: print f(input())
 
3:52 PM
@DJMcMayhem It actually saves 7 bytes, I'll let you figure out how
 
then assuming I didn't break any bytecount rules...
 
@Mr.Xcoder doi thanks
 
input |> eval |> f |> print > print(f(eval(input())))
 
Print[F[Eval @ Input$]] >> everything else :P
 
Not Print@F@Eval@Input$?
 
3:55 PM
@Pavel Nope, because unfortunately infix stuff is very limited when you transpile to Python, so that would actually be parsed as ((Print[F])[Eval])[Input$]
 
(no problem, I viewed the wrong tab)
Idea: Whenever someone ask something in TNB, wait for a while before replying to encourage rubber duck Google searching.
 
@Mr.Xcoder @DJMcMayhem so I would be properly doing bytecount then here? (comes out to 46 bytes, regardless, for Py2 or Py3, only difference is the 'Footer' where you execute the non-recursive lambda)
(this is for Conor O'Brien's CMC there, but I want to make sure I don't break bytecount rules :P)
 
@ThomasWard That would be 46 bytes.
 
that's what I thought, just making sure I didn't break a rule :)
 
@ThomasWard Looks right to me. You have an extra space btw
 
you're right.
damn it i was beaten
but that would work :p
and you use my test case list nice
:P
 
Of course :)
 
@Mr.Xcoder Also works in Python 2 without changes.
except for the footer :P
 
Yay :)
 
i keep forgetting max() is a builtin >.<
 
4:01 PM
@ThomasWard Xcoder kicked both our butts, but I have a cool hack for you that shaves 3 off: Try it online!
 
I think I have 30 bytes
 
@DJMcMayhem nice
 
@DJMcMayhem You can drop the -
 
@user202729 Personally if I've asked a question in here it's because either I /have/ looked on google already, or I would like more context than I expect google will give (being able to ask followup questions, etc.)
 
@ConorO'Brien Can we assume all are positive?
 
4:03 PM
delaying a response actively hinders in this case
 
Nobody's on Language Development... I posted a message here, should I repost or can you join yourself? :/
 
If all are positive, then 31 bytes
 
@ConorO'Brien Coconut, 21 bytes: max..filter$(i->~i%2)
 
each in a (i):
a[i] = a[i + 1]

a?

I'm making a thing
 
Physica, 26 bytes: ->_:Max[n For n∈_If~n%2]
 
4:14 PM
@ConorO'Brien Add++, 24 bytes: L,v2AvbLXBcB%B!B]AvBcB*M
 
;'-( Add++ beats Physica :P
 
I think I can shorten it as well :P
 
@Mr.Xcoder The question is whether we consider 'largest' to be 'furthest from zero', whereby -10001 is larger than 10000. The way it was worded it wouldn't matter if it's negative or not, I think. (Hence why we need clarification!)
 
25 bytes if positive-only: ->_:Max[~n%2*n For n∈_] or this: ->_:Max[~n%2*n For n In_]
@ThomasWard largest usually means greatest
 
22 bytes: L!,2abLXBcB%B!B]aBcB*M. Takes n arguments, representing a list of size n
 
4:19 PM
@Mr.Xcoder i know, that's why i haven't complained about your solution to that thing :P
but even if there's negative values i assume yours would work
 
My 33 byter would work nonetheless, the 31 byter fails if there are negative values.
 
@Mr.Xcoder the 31 byter works so long as the negatives are at the end of the list, but you're right, because I was able to get it to tell me 6 instead of 7 in the 31byter :P
 
@Mr.Xcoder can I add your code to my question?
 
Sure, go ahead!
 
thanks!
 
4:23 PM
You're welcome!
 
As a side note, I love challenges where I can use other entries to test my entry's validity. — Magic Octopus Urn 2 hours ago
My thought's exactly :P
 
ok so thanks to this chat room, the question is awesome now :)
 
I am working on outgolfing user202729... :P
Suggested test case: [[0, 1, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [1, 1, 1, 1]] -> 1.25
 
TFW you tie Dennis in a challenge where he follows the restrictions and you don't
 
Lol... :P
 
4:28 PM
@user202729 hmm.. try [[1,2,3,4,5,6,7],[1,2,3,4,5,6,7],[1,2,3,4,5,6,7],[1,2,3,4,5,6,7],[1,2,3,4,5,6,7]‌​, [1,2,3,4,5,6,7], [1,2,3,4,5,6,7]]
 
@Lembik "Challenge"? (not "question")
@Lembik That (the side length) is odd.
 
@user202729 The Hafnian one
oh oops
I see your code doesn't like that
my mistake
 
Great, we had some on-topic (about a code-golf challenge) discussion recently.
 
@user202729 hmm.. try [[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8],[1,2,3,‌​4,5,6,7,8], [1,2,3,4,5,6,7,8], [1,2,3,4,5,6,7,8]]
I get [2144.713699438102, 4289.427398876204, 6434.141098314307, 8578.854797752409, 10723.568497190512, 12868.282196628614, 15012.995896066717, 17157.709595504817] from your code which makes so sense
 
For me it doesn't even halt
 
4:32 PM
hmm
your code finishes very quickly for me with 551.25 which I don't think is right
@Mr.Xcoder what do you get for 1,2,3,4,5,6 repeated 6 times?
 
And idk but I get syntax errors when I run it with your test cases
> 551.25
 
really?
as in the input has syntax errors?
or your code does?
 
The input for some reason
 
oh!
 
Maybe it's SE weirdness
 
4:34 PM
SE inserting ZWNJ spaces
 
Yeah :/
 
Cause that's always helpful /sarcasm
 
33673.5
fixed it
some weirdness in the input
 
CMP: Has anyone here ever played Little Alchemy?
 
yes
 
4:36 PM
s/every/ever/
And yes
 
I played a similar game that came before it afew years ago
 
ok thinking of posting the challenge now as code-golf
now that it has examples :)
 
Hopefully they're correct
 
well the jelly and python versions agree :)
so how could they possible be wrong :)
 
@cairdcoinheringaahing The best variation on this is Elemental, which is unfortunatly currently offline. It's basically crowd-sourced little alchemy, when you find a combination that doesn't exist yet you're asked to say what you think it should make. Then the community votes on your proposal.
 
4:38 PM
I am still tempted to add a speed element...
hmm
 
@Lembik Please don't combine swiftness and golfy-ness for this challenge. I love it as plain code golf :|
 
@Lembik 8 columns and 7 rows?
 
@user202729 that's not in the sandbox example is it?
@Mr.Xcoder ok
 
somebody could give feedback on this? : codegolf.meta.stackexchange.com/questions/2140/…
 
@Mr.Xcoder I see you edited your own code :)
 
4:46 PM
nice challenge. feels good to see math challenges on codegolf
 
thanks.. you wait until the fastest-code version :)
 
@ManishKundu You know our rules about built-in methods?
> If a challenge is easy, banning built-in functions won't change that.
(can't remember the source)
 
like, do x without y is not allowed?
 
3
Q: Codegolf the Hafnian

LembikThe challenge is to write codegolf for the Hafnian of a matrix. The Hafnian of an 2n-by-2n matrix A is defined as: Here S2n represents the set of all permutations of the integers from 1 to 2n, that is [1, 2n]. The wikipedia link talks about adjacency matrices but your code should work for any...

 
It's not disallowed, just discouraged.
 
4:50 PM
2 hours ago, by New Sandboxed Posts
0
A: Sandbox for Proposed Challenges

LembikCodegolf the Hafnian The challenge is to write codegolf for the Hafnian of a matrix The pHafnian of an n-by-n matrix A is defined as Here S_2n represents the set of all permutations of [1, 2n]. Your code can take input however it wishes and give output in any sensible format but please inclu...

2 hours ago. That's...
 
0
A: Sandbox for Proposed Challenges

Manish KunduIntroduction As we all know, there are many number systems - the most common ones being the binary, decimal, octal and hexadecimal number systems. A number system with a base 'n' would consist of exactly 'n' unique characters to represent numbers starting from 0 till n-1 (in decimal). For inst...

 
i hate that rule lol. but okay, i removed it..
 
@user202729 It's ok for a quick sandbox.
They just wanted to receive some quick feedback
 
Does anybody have problems connecting to SE (connection timed out)
 
Nope
 
4:51 PM
nope
 
@ManishKundu I understand, but then it's not clear to define/check that.
Also I think that it may be a dupe. It's so simple...
 
but i dont think any challenge has asked for a random base conversion
most challenges were like decimal to binary, decimal to octal, etc.
 
There is even a tag for it, .
 
5:11 PM
lol
 
Is GitHub down for anyone else?
 
@Mr.Xcoder responds to pings but not to ssh push or web https for me
just like Reddit, whole SE and wikia for me
 
yeah its down for me too
 
it's probably a datacenter problem
 
@Mr.Xcoder Works for me
 
5:21 PM
it's up again for me
but many sites still get stuck on "Performing a TLS handshake" for me...
 
yeah works now
 
Akamai probably dun goof'd for a second there.
 
akamai... or cloudflare... or ovh... we'll never know
 
Yeah I just guessed akamai because it's slightly more likely it's them
 
5:35 PM
CMC: given a list of floats, return the one with the largest absolute value
 
@Neil Japt, 4 bytes: ña o
 
@Neil R, 43 bytes: function(l)l[order(abs(l),decreasing=T)][1] tio.run/##K/qfpmCj@z@tNC@5JDM/…
 
Or JS, 28 bytes: a=>a.sort((x,y)=>y*y-x*x)[0]
 
@Neil C# e=>e.Select(Math.Abs).Max()
 
@Neil can the output be the absval of the biggest?
 
5:41 PM
@tfbninja of course not
 
Oh, dur
 
@Neil Pyt, 2 bytes Å↑ this is what I mean
basically does it have to keep the negative sign
 
e=>e.MaxBy(Math.Abs)
 
@Neil Jelly, 3: tio.run/##y0rNyan8/9/x4c5FD3eu@v//f7SZnqmOgq4liDSOBQA (my first Jelly answer to anything! :D)
 
@betseg nice!
 
5:44 PM
My question on superuser has no upvotes, downvotes, comments nor answers after 2 hours! That's gotta be my new best...
 
There is a badge for this
 
I think its funny that tumbleweed is a bronze badge, it's extremely hard to get, although I suppose its so people don't try to get it with boring questions
 
You don't have SU on your network profile? Wut @labela--gotoa
 
5:46 PM
@EriktheOutgolfer ah right
 
@labela--gotoa do you have a superuser account?
 
@betseg Perhaps I've got it hidden, since I don't use it, I got account because I made a single-time action or something.
yes
 
so the next challenge will be to use this algorithm for the Hafnian arxiv.org/pdf/1107.4466.pdf
which is somewhat trickier I think
 
@labela--gotoa yeah if you didn't join you posted under an unregistered account
 
@EriktheOutgolfer I joined to make the action, but I hidden the account since I don't really use it
You can hide communities in the settings
 
5:52 PM
well, I respect your reasons, although I'd say you don't need to hide (and most probably change the profile details too) if there isn't something you actually don't want to connect to your SE profile
 
I don't really enjoy having my profile spammed with 101 rep communities
 
@Pavel MaxBy() is not standard C#. I know there's one in Jon Skeet's MoreLinq package.
 
@recursive Yes it is. Observable.MaxBy.
 
@Pavel Oh, I see. I did not know about that. Of course, that means the argument must be an observable list.
 
Well, yes.
 
nope, you have to return the number with its original sign
 
@DJMcMayhem I think the only flaw I see there is that "noteworthy" is a single word
@EriktheOutgolfer I failed to notice that >.>
 
@DJMcMayhem This looks really good. Maybe a part about creating an esolangs wiki entry?
 
noteworthy is a word, that's no fault
 
6:23 PM
I haven't done that for stax yet
 
@EriktheOutgolfer he wrote note worthy
 
ah, and you don't have the rep to edit that yet, I see
 
@recursive Ah, good idea!
thanks
 
6:42 PM
Hello
 
@DJMcMayhem Regarding the disclaimer for language of the month nominations: An important point is the stability of the language. There shouldn't be any breaking changes while people start learning the language.
 
@DJMcMayhem quine in painflak
 
that looks like you're demanding something from somebody you have control over or are very tight acquaintances with...
what are you referring to?
 
what does VTC mean?
 
Vote To Close
 
6:54 PM
@Lembik Vote to Close
 
oh wow!
 
26
A: What are the PPCG specific abbreviations and terms?

AdámSee also Stack Exchange Glossary - Dictionary of Commonly-Used Terms. Abbreviations marked with a star (*) are chat specific. Catalog: A type of simple on-topic challenge where the challenge's aim not so much to find a winner as it is to create a catalog of solutions in many languages. CG: Cod...

4
 
@DJMcMayhem one of the most useful meta posts in the site for sure.
 
oh someone kindly came to my rescue :)
(re: my open question)
 

« first day (2588 days earlier)      last day (2246 days later) »