« first day (2454 days earlier)      last day (2381 days later) » 

2:00 PM
@HyperNeutrino You can try the next one, it's very easy. oeis.org/A004903
 
cool thanks!
wait is it finite or something
 
I forgot to remove the unused function print boolean matrix, otherwise it would be oeis.org/A004704
 
nope doesn't have the fini tag so probably isn't
@user202729 I mean, you could change it right now and you probably wouldn't get murdered. Up to you :P
 
Already become the near-longest submission. Just shorter than this bash hardcode one.
 
2:12 PM
@HyperNeutrino I have been informed that you created an abstract interface , as a Java developer I am obliged to report you to the Java Police :)
 
lol
I also made the method withing the abstract interface an abstract method. Sue me. :P
@SocraticPhoenix That comma should be a semicolon.
 
The thing is, Java is already really verbose... It doesn't need any more xD
 
It's only verbose in codegolf. -- Is there any problem with abstract interface except it's long?
 
@user202729 and I thought the rust hardcode was bad 😱
 
2:16 PM
I mean, even though interface is necessarily abstract by default and it's unnecessary to specify that, writing it explicitly shows that the interface is abstract. I was never taught to put the abstract there but I was also never taught to program Java. My method of learning was looking at my friend's code and reading Stack Overflow :P
(That's also how I learned Python)
(In fact the only language I've been mostly "taught" that I didn't learn by myself as much is Jelly lol)
 
@SocraticPhoenix pretty sure you never need to do this
 
@HyperNeutrino I've never used :Interface in APL… :-D
 
like, i think it's obsolete to put that modifier there
 
It is
how do you return an array from a function in C++ without initializing it beforehand?
 
2:23 PM
I guess I can't fault you too hard for using it because I always add the public modifier to methods in interfaces
 
So like currently I'm doing this:
 
Just do it.
 
but I'd almost certainly remove abstract if I saw it
 
int value [2] = { a, b };
return value;
 
What is your function return value?
I'm afraid that the array self-destruct before you can possibly use it outside of the function.
 
2:25 PM
You guys must not use IntelliJ xD... (it points out useless/redundant modifiers)
 
I use TIO as an IDE so maybe that's why :P
@user202729 int*
 
So it will self-destruct.
 
it generates a warning
.code.tio.cpp:6:10: warning: address of stack memory associated with local variable 'singleton' returned [-Wreturn-stack-address]
                return singleton;
                       ^~~~~~~~~
1 warning generated.
 
You can't return array this way.
 
I figured; how do I do it though?
 
2:26 PM
Either use proper stl tools std::vector, std::array
or to dynamically allocate memory. new int[2]
 
oh there's a thingy for arrays?
 
But if you dynamically allocate memory you have to delete[] it, so I prefer the former one.
Also std::pair<int, int>
 
I'm trying to do the next OEIS sequence in C++ for C++ practice :P
 
Yes, std::array it is a stl wrapper over C-style array.
 
2:31 PM
@SocraticPhoenix I'm in a transition phase between intellij and eclipse
 
I just realized that I don't need arrays for this one
I realized that the sum of at most 8 non-zero powers of 10 is just the sum of 8 powers of 10 because the remaining ones you're not summing can just be zeroes :P
CMP: zeros/zeroes
 
77
A: What is the plural form of "zero"?

RegDwigнtBoth zeros and zeroes are acceptable, see e.g. Merriam-Webster, Wiktionary or TheFreeDictionary. The usage stats from the Corpus of Contemporary American English (COCA) and the British National Corpus (BNC) look as follows: COCA BNC zeros 312 132 zeroes.[n] 1...

 
I figured both were valid but which one do you use :P
 
@HyperNeutrino I would say He zeroes in on the zeros.
 
lol
I use them interchangeably; I can never remember which one I use as a standard :P
 
2:43 PM
@HyperNeutrino VTC as unclear. (Verb or noun?)
 
oh
revised:
CMP: zeros.[n] / zeroes.[n]
 
@HyperNeutrino I've done coding that in C++ you may want to use as reference.
 
@HyperNeutrino Zeros.
@HyperNeutrino May we use 1 indexing?
 
@user202729 I'll try to code it myself first then look at yours to see how horrible my coding style is :)
@Adám No, you must use (-1+i)-indexing.
lol the C iostream log message output stream is called clog which you use when your program is clogged :P
 
I never use it. Just cout and cerr.
 
2:45 PM
I didn't know of anything other than cout and cin before I read the I/O tutorial :P
 
Anonymous
@HyperNeutrino The latter
 
anyway gtg o/
 
I'm still not quite sure how to use cin.
 
Is there comment in Jelly?
 
Nope
 
2:53 PM
@Pavel cin >> {put your variable here};
 
@user202729 That would be a waste of a precious codepage point.
 
"a comment is just an unused string expression";
 
@user202729 Right, and this bothers me a lot. What do I do if I want to read an entire line? Or just a single word? Or read a number into an int?
 
@JohnDvorak Return; A comment is just an unused expression;
 
Line -> std::getline, word: std::cin >> {string lvalue reference},
int: std::cin >> {int lvalue reference}. Where variables are lvalue references.
 
2:55 PM
please note that comments are very easy to make in INTERCAL
 
I see. What does void *foo; cin >> foo do?
 
You read the value of a pointer and store it to the variable.
@Pavel Like this.
 
I think I'll stick with fgets and scanf.
 
[in Brainfuck you use a loop that never executes, which even lets you put commas and periods inside.]
 
Alternatively cin >> *a can't be compiled, because void pointer can't be deref.
You need cin >> *(int*)a, for example.
 
2:59 PM
I also generally use char* instead of std::string
 
So you should use C instead.
 
Eh, I'm mostly a C# person, classes are nice.
 
2
Q: Triangular Numbers

AdmBorkBork(no, not those ones) The Challenge You'll be given two inputs. The first is a positive integer n > 0, which is used to output an n x n right triangle of the numbers 1, 2, 3, ... n. This triangle starts in a corner and increases horizontally and vertically by one and diagonally by two. See examp...

 
My C++ is basically "C with classes"
 
Huh. The chat search page still has the old top nav-bar design.
 
Anonymous
3:05 PM
@Pavel Gross
 
I use a few C++ standard library features. Like cout.
 
But cout is one of those C++ things which is more gross than the C version.
 
Nowhere did I say I write good C++
 
Anonymous
@feersum I disagree. Stream-based IO is much cleaner than format-string-based IO.
 
Jelly, 13 bytes: (can anyone saves some bytes?) (for A004903) Try it online!
 
3:08 PM
If you use actual printf then that's gross.
 
@Mego But also more verbose.
 
@feersum What do you suggest?
 
The good way is a templated format string library that's type-safe.
 
I basically chose cout because it looks pretty to use and I don't have to worry about having % signs in my strings.
 
Anonymous
std::cout << "The " << n << ordinal_suffix(n) << " fibonacci number is: " << fib(n) << std::endl; is way cleaner than printf("The %d%s fibonacci number is %d\n", n, ordinal_suffix(n), fib(n));
 
3:09 PM
cout is bad because as soon as you have to use a format specifier, it gets disgusting.
Because then you have to undo it.
Mutable state in the stream is what I don't like.
It's also very verbose if you just want to print a table with some aligned columns of numbers.
Anyways I've got to be going now.
 
@feersum The one time I did that I combined cout and sprintf
Which is probably godawful
 
Anonymous
Hacktoberfest is live!
 
ooh cool
I wonder if I'll be able to participate
I hope so, but it's probably too advanced for me
 
Anonymous
I've labeled the only outstanding reported bug in Actually for hacktoberfest, if anyone wants to contribute
 
If I knew how to implement ECM, I might consider that
I think sympy.factorint() already uses that, if I'm not mistaken
 
Anonymous
3:15 PM
@Sherlock9 I'd rather only use numpy or sympy as a last resort
 
@Mego What is temp=[1]*(n-max_tested)? It appears to be multiplying an array by a number.
 
Anonymous
@Sherlock9 Miller-Rabin should be sufficient
 
I thought this was factoring not primality?
 
Anonymous
@Pavel list*int returns a list with int copies of the element(s).
 
Anonymous
@Sherlock9 Oops, brain signals crossed
 
3:17 PM
@Mego congrats on the stickers
 
@Sherlock9 The error is thrown in init_primes_up_to(n):
 
Anonymous
@NathanMerrill Thanks! Now if only I can get them...
 
Anonymous
I meant Pollard's rho algorithm for factoring. It's a very efficient algorithm, both in terms of space and time.
 
I also don't know how that works at the moment
Though I can't imagine that the Internet doesn't have some resources for that
Also, I know that sympy.factorint() also uses Pollard's rho, so their source code would probably help as well
 
@Mego so is factoring just getting all the factors of a number in a list?
Or is it a prime factorization
 
Anonymous
3:20 PM
@Pavel Yep
 
Anonymous
Well, prime factors
 
Ok
 
Anonymous
Divisors is the other one
 
Anonymous
@Sherlock9 It's quite simple - if nobody claims it, I might implement it myself
 
Well, I am in the middle of exams
 
3:21 PM
@Mego I'm working on it
 
Two more to go, and three assignments with them, but I'll see what I can do
 
Anonymous
A linearish-time prime factorization program isn't terribly hard, either - just iterate through the primes less than N and repeatedly divide when you find a factor
 
Anonymous
@Pavel Excellent!
 
@Mego I'm not a great programmer, but I want that hacktoberfest shirt
I'm guessing "Get all divisors, check each one for primality" is too slow, because it's a pretty obvious solution
 
figuring out if something is divisible is hard. That's why encryption works
it only works well with the average number because most numbers have lots of small divisors
 
3:25 PM
@Mego According to that page, that algorithm occasionally randomly fails.
 
@Mego Although implementing Miller-Rabin for your primality built-in may not be a bad idea, either
 
Anonymous
@Pavel Brent's improvement makes it deterministic
 
Anonymous
@Sherlock9 Yeah, I should add an issue for that, too
 
Anonymous
@Pavel Go ahead and add a test case for :1965593254291461501637330902918203684832716283082y in seriously/test/tests.py, under MathTests.test_arithmetic. The output should be [[2, 230936440213, 173258923096670681, 24562670344821643897]].
 
@Mego I'm getting an error running the tests:
$ python tests.py
Traceback (most recent call last):
  File "tests.py", line 10, in <module>
    from lib.cp437 import CP437
ModuleNotFoundError: No module named 'lib'
 
Anonymous
3:39 PM
Run it from the root directory
 
Ok
 
Anonymous
There's a tests.py in the root directory that handles properly importing stuff
 
@EriktheOutgolfer
In the triangular number challenge, how many times does the first ¡ repeat?
 
floor(right argument/2)
 
@Mego The issue that I've run into is that every version of the Brent algorithm I can find returns a divisor of the input, and I can't seem to get any of them to yield every divisor.
 
3:53 PM
@Pavel Divide the original number by that divisor, and then (recursively) factorize both that number and the divisor.
 
Anonymous
@Pavel What ^ said. Repeat until prime.
 
I feel dumb now
 
Anonymous
And if it doesn't return a prime, recurse until you get all primes.
 
@EriktheOutgolfer I see. Jelly support binding link to ¡? I see only <link><repetitions>¡, nowhere <link><link>¡. Suggest updating documentation.
 
4
Q: Invert a Quine!

GryphonWe all know what a quine is. An inverted quine is a non-empty program that prints the inverse of its source code without reading its source code, and consists solely of printable-ascii characters. The inverse of the source code of a program is all the printable-ascii characters, duplicated for ...

^^ This isn't a duplicate, is it?
 
3:55 PM
who said repetitions is a nilad
 
@EriktheOutgolfer Indeed. But that isn't very clear from the docs.
BTW can I join Jelly Hypertraining?
 
It's way harder than the "Print every character your program doesn't have".
 
@user202729 sure
I suggest reading the tutorial
 
0
A: Sandbox for Proposed Challenges

Engineer ToastMake Three from One code-golf math arithmetic integer Write the shortest possible formula using only a given digit and certain mathematical operators that evaluates to equal a given three digit integer. Input: A one digit positive integer (1-9) and a three digit integer (100-999) Output: A ...

 
It is not mentioned there (tutorial) at all. All examples in the tutorial use nilad (in fact, number literal) before ¡. Even "The number of repetitions is the floor of the ..." is not mentioned.
 
4:05 PM
@StewieGriffin I hammered it open. It's not in any way a dupe. It looks like a dupe on first glance, but reading into it the new challenge is much more difficult.
 
@Mego I have to stop, I have class now.
I don't think I'll keep trying later, I'm not a python person.
 
I wrote a script to generate vimgolf animations from code.
user image
14
 
@AdmBorkBork /o_o I was just about to VTR. Now, I feel like my vote means nothing :(
 
@Lynn Is it available online?
 
#sorrynotsorry
 
4:08 PM
it isn’t quite perfect yet, but I like the look of it!
 
@Lynn That's pretty, and pretty dang cool.
 
Although, that's the reason I dislike hammers. If a question divides those with gold badges, it can be unilaterally opened and closed multiple times
 
Anonymous
@cairdcoinheringaahing In that case, a meta discussion is appropriate. The problem isn't the hammers, but the people wielding the hammers.
 
Anonymous
If I think something is a dupe and should be closed (or isn't a dupe and should be reopened), and hammers have already been involved, I start a meta discussion (or, more often, encourage those involved to start a meta discussion) before swinging my hammer.
 
And, ideally, the people with hammers should know better and do that anyway before getting into a close/reopen war.
 
Anonymous
4:17 PM
@AdmBorkBork Yep. Though it's easy to forget to look at the history before swinging the hammer, so I give people the benefit of the doubt.
 
True enough.
 
Anonymous
I also think that not having our rep requirements raised yet is causing problems, too. This site is very generous with rep relative to other SE network sites, so a new user can earn the close/reopen vote privilege without really digesting all of the relevant policies, leading to incorrect close/reopen votes. It's a pattern I've seen happen multiple times.
 
I know I've accidentally swung my hammer a couple of times, firstly when I'd just got it (there should be a notification that tells you actually) and in a case like that
 
Anonymous
@muddyfish The first few times should definitely come with a confirmation, because it's easy to miss the award notification for a gold badge
 
I'm considering placing a substantial bounty on this question. Will there be any interest?
12
Q: Optimize sorting, using "Sub-vector reversals"

Stewie GriffinThis is a fewest-operations challenge where the objective is to sort a vector into ascending order using the fewest reversals. Your algorithm can only sort the vector using "sub-vector reversals"1, but it can use other operations for arithmetic operations, loops, checking if it's sorted etc. The ...

Also, catchy (or more descriptive) names for the sorting process is appreciated :)
500 rep up for grabs! ^^
 
4:59 PM
Announcement: APL learning session in about 15 min in

 The APL Orchard

apl.chat ― Learn, teach, ask, code, golf, & discuss usage. See ...
 
5:09 PM
Next OEIS sequence should be easy.
 
5:37 PM
I have never felt more ashamed to be using Windows than I am right now.
 
I have discovered an exploit that allows you to break into the account of the previous user (presumably just local user) without requiring any sort of authentication at all - all it needs is a keyboard.
 
@wizzwizz4 There's no shame in using the superior OS. ;-)
 
@AdmBorkBork Unfortunately, Windows 10 isn't it. :-(
I envy you - you have the Windows 7 PowerShell logo.
 
Yeah, company policy. We'll be moving to 10 soon, but I think I'll keep the logo.
 
5:39 PM
(Rotated and graphically enhanced, but still the Windows 7 logo.)
@AdmBorkBork I would strongly recommend not moving to Windows 10.
If you can at all help it.
 
I enjoy it on my home machine just fine. And I'm not in the desktop services department, so I don't care if they have issues, lol.
 
The exploit I mentioned earlier was gained quite simply when trying to [redacted] when the computer was all crashy after start-up.
I wasn't even trying to pen-test the OS.
@AdmBorkBork What's the secret?
I would really like to enjoy it, but it's far too unstable for me.
 
See, I hear that all the time, but I never experience it. I've had one issue with my home machine in the past year, and that was because of a third-party Synaptics touchpad driver. Maybe it's because I don't tweak around with it as much as others?
I do shut mine down when I'm not using it, as opposed to putting it to sleep. Maybe that's the key.
 
@AdmBorkBork I hibernate my computer regularly because it's only stable enough to show the lock screen around 1/3 of the time I start it up.
 
Yeesh
 
5:45 PM
However, that technique has stopped working as now hibernation is unstable. (I've only experienced this over the past 2 or 3 times, so it might be coincidence.)
It seems to me as though there's a big conspiracy to get me to buy a new computer, as the issues started around the time that Toshiba TEMPRO started to tell me that I could easily transfer all of my data, settings and programs to a new machine using this one neat tool.
However, I'm just being paranoid about that.
The conspiracy isn't just to get me to buy a new computer! :-)
@AdmBorkBork Some components of Edge are built into the /kern[ae]l/, so invalid videos or bugs in the video handler can cause BSODs as opposed to simple APPCRASHes.
 
I'd join in this windows 10 conversation but as I've recently been hit by a virus (I let my guard down for one possibly not good file and didn't test it in a VM :|) so everything's unstable for me :p
 
@dzaima Ouch. Did you have a backup?
 
@wizzwizz4 ew edge. I avoid it whenever possible
 
@wizzwizz4 That's not really anything new. IE has been able to crash the computer for decades, lol.
 
@wizzwizz4 Everything really important is on github and no files have been lost yet
 
5:50 PM
@dzaima I was sad when Internet Explorer dropped out of support (see my profile). However, Edge was only an option for ~3 minutes.
 
Yeah, I'm not a huge fan of Edge.
 
@AdmBorkBork Who is? :P
 
@AdmBorkBork It wasn't built into the kernel though. :-)
 
Sure it was. That was part of the whole antitrust investigation.
 
Calling all users of the internet: If anyone enjoys using Edge, please reply to this message.
 
5:51 PM
Depending upon your definition of "kernel"
 
@wizzwizz4 My dad uses edge...
 
@AdmBorkBork It was tightly coupled to Explorer, but not to the kernel.
 
Pretty much the only person I know though
 
@AdmBorkBork I suppose. Back in the pre-NT days...
But I would define explorer as a shell, as programs could run independently of it.
 
Right.
 
5:52 PM
Batch files renamed to .COM couldn't run at all, though. :-p
 
Actually...
 
Oh, the good old days of pre-NT learning through 6-year-old pen-testing...
@JohnDvorak Don't get into the whole "printable x86" thing. That doesn't count! :-)
 
pretty much the only remains of the infection I can see is that every now and then my PC won't boot without swapping the RAM (and I have no idea how that could even be connected to it as booting from BIOS into linux straight still causes that to happen on next boot and CMOS clearing doesn't help either)
 
CMC: Find the longest palindromic substring of a given string. Bonus points if you do it in a language where this is not trivial
 
@DJMcMayhem test case?
 
5:56 PM
@dzaima In biology that would be called a retrovirus.
In computing that is called KILL IT WITH FIRE.
 
CMC: create a polyglot that, when run as an x86 COM header, launches a batch file interpreter with itself as the file to run, and when run as a batch file, it executes the (arbitrary) payload.
 
@wizzwizz4 They're both terrible. Edge seems to be slightly less terrible in my (limited) experience.
 
@Dennis There was a point in time where Internet Explorer was not terrible.
 
@Mr.Xcoder "Hello, World!" --> "ll" is a simple one. "abcba helol" --> "abcba"
 
^^^
 
5:57 PM
And "abcdefghijk" --> any single character
 
@Dennis Are you comparing Internet Explorer 11 when it was with the standards to Edge 14 when it was with the standards, or are you comparing IE11 now to E14 now?
 
Ungolfed in python: Try it online!
 
@wizzwizz4 There was a point when there was nothing better.
 
@DJMcMayhem Can we return all of them if more are valid and the same length?
 
@Dennis both are very, very terrible in my almost nonexistent experience already (I manly use linux)
 
5:58 PM
@wizzwizz4 I'm comparing the excruciating pain of trying to support these two browsers on TIO.
 
@DJMcMayhem jelly, 6 bytes: ẆŒḂÐfṪ :p
 
@Mr.Xcoder No, you should only return one, but if there's a tie it Doesn't matter which one you return
 
We're talking about browsers.
I will drop out of the discussion because I have learned from experience.
 
@EriktheOutgolfer That's exactly what I came up with.
 
@EriktheOutgolfer >_____>
 
5:59 PM
@DJMcMayhem it's not trivial in SOGL and so I have no idea how to approach it.. :p
 
But it took like 30 seconds to write, whereas the python one took 5 minutes and a decent amount of thought, so IMO it's way more fun in python
 
My solution was also ẆŒḂÐfṪ
 
@Dennis Just have a popup saying "TIO does not support shit browsers"
 
it already has
 
@NieDzejkob In my experience, there are places where IE is the only browser but none where Edge is.
 
6:01 PM
Yeah unfortunately many people use them. I dislike nearly everything about Windows-Microsoft.
 
@DJMcMayhem Jelly, 5 bytes: ṚẆfẆṪ
 
@Mr.Xcoder I am only holding on due to sentimentality.
This is great dropping out of the discussion on my part. :-p
 
@NieDzejkob That still leaves the excruciating pain of developing for Safari. :P
 
@Dennis Genius
 
@Dennis True xD
 
6:03 PM
@Dennis With Safari, I just slap on some <meta> tags and call it Chrome.
That still leaves the excruciating pain of developing for Chrome.
 
@Dennis To make sure I understand correctly, that calls f with ṚẆ(a) as the left argument, and Ẇ(a) as the right argument because it forms a dyad-monad pair?
 
I use safari rn :-)
 
I don't think monad-dyad is a thing
 
@wizzwizz4 Chrome is my main browser, so it's the only one that doesn't give me problems.
 
chrome is the sane browser
 
6:04 PM
so I think it's Ṫ(f(a, Ẇ(a))) where a = Ẇ(Ṛ(larg))
 
@EriktheOutgolfer Chrome has its share of idiosyncrasies.
 
also btw dennis outgolfed me because you can't have your both both on apl and cmc :p
 
Chrome and FF are my main browsers, more so Chrome atm
 
I think @DJMcMayhem has hit a blacklist
 
@DJMcMayhem Yes. ṚẆ sets the return value, then f gets called with the return value and the result of to its right.
 
6:05 PM
@NieDzejkob Heh?
 
anyway gtg o/
 
@Dennis Does that always happen for dyad-monad?
 
In a monadic chain, yes.
@wizzwizz4 All browsers do.
in talk.tryitonline.net, Apr 11 at 18:03, by Dennis
> array = [1,2,3,4]; typedArray = new Uint32Array(array); undefined
< undefined

Chrome / Edge
=============
> String(array)
< "1,2,3,4"
> String(typedArray)
< "1,2,3,4"
> typedArray.join(',')
< "1,2,3,4"

Firefox
=======
> String(array)
< "1,2,3,4"
> String(typedArray)
< "[object Uint32Array]"
> typedArray.join(',')
< "1,2,3,4"

Internet Explorer
=================
> String(array)
< "1,2,3,4"
> String(typedArray)
< "[object Uint32Array]"
> typedArray.join(',')
X Object doesn't support property or method 'join'
 
@Dennis Just polyfill prototype then use as normal.
I didn't know that String was a thing...
Oh - primitive objects... I almost managed to forget.
 
@Dennis let's better not discuss dyadic chains...:p
 
6:11 PM
I find that using a cocktail of polyfills can turn even IE6 into an almost sane development environment.
 
all the polyfills you want won't change the horrific rendering engine
 
SVGs don't even work correctly in Edge and IE 11...
 
AKA IEdge
 
@Mego Update on my version of Pollard's rho. It works but it's really, really with the 1965593254291461501637330902918203684832716283082 test case because the biggest two factors are 18 and 20 digits, respectively
Also, trying what yafu (Yet Another Factoring Utility) does with using x**2+1, x**2+2, and x**2+3, but I'm not completely sure how much that's helping
It should be noted that since the average computer can do trial division up to 1 billion in under a minute, so Pollard's rho is probably not a stellar improvement. ECM might be better for not taking an hour to factor a number larger than 30 digits :/
That should be "really, really slow" in the first message. Ah well
 
6:34 PM
@Mr.Xcoder Your Golfy Array challenge on anarchy golf is broken, because the three given test cases can be easily exploited.
E.g. by simply taking the first array element mod 5.
 
but how mitchs got 2 bytes in gs2 is, well, unexplainable?
 
@Laikoni I know... But I cannot edit nonetheless unfortunately :'-(
 
well, that might be the reason it's called "anarchy golf" lol
 
@cairdcoinheringaahing I posted Golfy Array, you can post your Jelly answer
 
wait... there are other code golf websites than PPCG?
(or is it then?)
 
6:42 PM
@SocraticPhoenix oh, a loot, much more than you might think.
 
1
Q: Am I a golfy array?

Mr. XcoderDefinition and Rules A golfy array is an array of integers, where each element is higher than or equal to the arithmetic mean of all the previous elements. Your task is to determine whether an array of positive integers given as input is golfy or not. You do not need to handle the empty list. ...

 
@NewMainPosts Ninja'd.
 
7:29 PM
CMC: Determine if a given year is a leap year. Testcases:
1895 --> False
1896 --> True
1897 --> False
1898 --> False
1899 --> False
1900 --> False
1901 --> False
...
1995 --> False
1996 --> True
1997 --> False
1998 --> False
1999 --> False
2000 --> True
2001 --> False
 
@DJMcMayhem Modulo 4 Negate I guess
 
Not that simple. Check the test cases :P
 
if it's divisible by 100 it must also be divisible by 400
 
oh crap yeah
 
Yup. So 1600 --> True; 1700 --> False; 1800 --> False; 1900 --> False; 2000 --> True
 
7:34 PM
jelly, 12 bytes: 400 4 ȷ2ḍ$?ḍ
(to hell with whitespaces)
8 bytes (untested): ȷ2×ḍ¥×4ḍ
 
31
Q: Counting leap years

user40734This challenge is quite simple. You will take an input which will be a year from 1801 to 2400, and output if it is a leap year or not. Your input will have no newlines or trailing spaces: 1954 You will output in any way that you like that clearly tells the user if it is or isn't a leap year (...

 
@EriktheOutgolfer hmm, it doesn't seem to work as it should but ȷ2*ḍ¥×4ḍ does...
 
Woah
7
A: Counting leap years

Destructible LemonStackylogic, 226 bytes (non-competing) Yes, that is right. I made a program in Stackylogic (non-TC), which was invented by Helka Homba, for the challenge found here. This is made after the challenge, so non-competing. Stackylogic has only binary input, so 10 (or more, any more digits will be ig...

 
Is there really not a DSL yet for implementing golfing languages?
 
-3
Q: Codegolf a Neural Network

odomojuliAdam Trask implemented a neural network in 11 lines of code. The Challenge Golf a neural network. Details Shortest Code Wins

 
7:48 PM
@Mr.Xcoder Stupid school information evening, now Dennis outgolfed me :(
 
@NewMainPosts I'm so tempted to +1 simply for the "Detail" section :P It is the least detailed "Details" section I've ever seen
 
@NewMainPosts Cut the user some slack! New users find it hard to do things: I certainly did.
 
Neural networks do seem hard at first, yes
 
Aw... it was deleted. I was composing a useful comment that may have helped narrow the scope. :-(
 
7:59 PM
xD
sandbox it or something
 

« first day (2454 days earlier)      last day (2381 days later) »