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

7:02 AM
Please, somebody post this, I solved A000006:
import Foundation

func f(n:Int){
    var x = n, l = [Int](), number = 2
    while x >= 0{if number > 1 && !(2..<number).contains { number % $0 == 0 }{x-=1;l.append(number)};number+=1}
    print(Int(pow(Double(l[n]), 0.5)))
}
For the next OEIS in Swift
And the sequence is very easy
225 bytes ^
@Downgoat ^?
 
@totallyhuman why did you delete the Python 1 answer?
 
@cairdcoinheringaahing Can you post that ^?
 
@Mr.Xcoder sure for the int part one?
 
@cairdcoinheringaahing Yes
#38. Swift, 225 bytes, A000006
The code above
and I'll give you a testing link now
Next sequence: oeis.org/A000225
 
Any vim people here? Is there a way to do dd or D without writing to the register?
 
7:08 AM
@Mr.Xcoder should I make it CW or not?
@Mr.Xcoder sorry ninja'd
 
@cairdcoinheringaahing Don't bother. If you really want it to be a CW, go ahead, but It's no need for that
 
@Mr.Xcoder alephalpha beat me to it D:
 
@cairdcoinheringaahing Ahhhh
The good part is I can use Swift
 
@Mr.Xcoder sorry I ninj'ad you :(
 
@cairdcoinheringaahing No, I couldn't post
I have the 05AB1E 20 mins ago
 
7:11 AM
Look at the next one tho
 
The seq of ones?
 
Of no
Wait, Add++ is taken
Delete your answer please
@cairdcoinheringaahing ^
Oh no, it's not
Sorry
You have deleted it >_< (the older Add++)
 
@Mr.Xcoder yeah, I really want to demonstrate my languages in this, but the sequences can't be impossible
 
@cairdcoinheringaahing I already solved it in Swift
I am just waiting for an hour to pass
 
7:22 AM
firgers crossed you don't get ninja'd
@Mr.Xcoder do you know Javascript?
 
@cairdcoinheringaahing No, I only know a tiny bit since I tried to learn HTML
@cairdcoinheringaahing Dang, I found a bug that invalidates my answer. I have to rewrite it.
 
@Mr.Xcoder you have 15 minutes tho
 
My code is already ~1k bytes long
 
@Mr.Xcoder we need higher numbers, more interesting sequences
 
I only have 11 mins
AHhhh
 
7:33 AM
@Mr.Xcoder you are assuming that everyone else is going to post at the same time. No-one cares about it any more :)
 
I know, I just want to FGITW it
 
@BlackCap congrats on 2K!
 
@cairdcoinheringaahing I gave up, I couldn't fix it because the operations are too complex for Swift
 
I don't understand the oeis page :(
 
CMC: n - > n^2-√n
 
7:45 AM
@Mr.Xcoder test cases?
 
@cairdcoinheringaahing 4 -> (square: 16, square root: 2) -> 14
9 -> 78
5 -> 22.76393202250021
Wow, OEIS is so slow
 
Has Maple gone yet?
 
@cairdcoinheringaahing Yes
@cairdcoinheringaahing Look at the new answer
 
Look at Lynn's answer!
 
@cairdcoinheringaahing Ninja'd
 
7:53 AM
@Mr.Xcoder actually maple hasn't gone... interesting
 
Wait,,,
@cairdcoinheringaahing The sequence is incorrect: Incorrect g.f. deleted by N. J. A. Sloane, Sep 20 2008
OR.... That's the extension
 
@Mr.Xcoder if it was incorrect, it wouldn't be on there oeis.org/A000017
 
@cairdcoinheringaahing It's the extension
Wait, aren't there finite sociable numbers?
 
Is there a challenge where you have to output all permutations of your source code?
 
@Qwerp-Derp I think there is
Not sure though
@Qwerp-Derp But 1-byte solutions like 1... How would you handle those?
 
7:58 AM
Good point
Actually I have a better challenge
Anagram chain quine
So a program outputs another program that uses all the same bytes, but in a different order
And that chain continues on
 
22
Q: Golf an Anagram Quine

Wheat WizardIn this question I asked you to guess an anagram quine based on its output. However it looks like we don't have a question asking to golf an anagram quine yet. So your task will be to make the shortest anagram quine that you can. What is an anagram quine? An anagram quine is a non empty progr...

 
Until it returns to the starting quine
 
I gtg now
 
@Mr.Xcoder Wait till I finish... :(
Bye
 
@Qwerp-Derp Sorry, I am in a rush... I really have to go. I'll ping you when I'm back
 
8:02 AM
@Mr.Xcoder Oh, I was referring to you posting that link before I finished explaining my concept :P
Sorry for the confusion
 
@Qwerp-Derp it looks like it won't be a dupe codegolf.stackexchange.com/questions/tagged/…
 
Hmmm, I'll post it in the sandbox
 
@Qwerp-Derp I'm back. I had an emergency
 
I got 8 minutes before I can post again
 
(To both of you) what happened?
 
8:14 AM
@Qwerp-Derp answer chaining question
31
Q: One OEIS after another

caird coinheringaahingThis is an answer chaining question that uses sequences from OEIS, and the length of the previous submission. This answer chaining question will work in the following way: I will post the first answer. All other solutions must stem from that. The next user (let's call them userA) will find the...

 
@cairdcoinheringaahing Oh
 
@Qwerp-Derp A home situation
 
@Mr.Xcoder Ah
 
@Qwerp-Derp how good are you at sequences?
 
@cairdcoinheringaahing I'm alright, I'm thinking of a solution for the current one
 
8:16 AM
I now see I have two answers on your question :)
Hardcoding is the solution
 
@Mr.Xcoder I have 2 as well. Leaky has about 1 an hour :)
 
@cairdcoinheringaahing @Qwerp-Derp What languages do you know?
 
@Mr.Xcoder Clojure is probably the only usable one in the challenge :P
 
@Qwerp-Derp No, in general
 
8:18 AM
Oh
Clojure, Ruby, Python, JS, Java, Dart
 
I know Swift 2, Swift 3, Python 2, Python 3, Pyth
And I am planning to learn Jelly
Or 05AB1E
@cairdcoinheringaahing How is the Jelly training going?
 
@Mr.Xcoder if you're planning to learn Jelly, I have 1 word of advice: don't
 
@cairdcoinheringaahing Why? It's the best golf-lang. I mean, except for the Hypertraining, it's ok
@cairdcoinheringaahing Also, what documentation do you use for learning Jelly?
 
@cairdcoinheringaahing Thanks
@cairdcoinheringaahing Does Jelly have a fancy search bar (like Pyth does)?
 
8:22 AM
@Mr.Xcoder Jelly is a nice language once you know it, but until then, its horrible in its memory system
@Mr.Xcoder No but just use Ctrl-F
 
@cairdcoinheringaahing I am on Mac >_<
 
@Mr.Xcoder Cmd-F
 
@cairdcoinheringaahing :D, I have to set up a custom keyboard layout
 
@Mr.Xcoder copy and paste
 
@cairdcoinheringaahing That is not really handy
 
8:24 AM
If you actually want to learn it, start out with some easy challenges before applying
I've got nothing on right now, so do you want to start?
 
@cairdcoinheringaahing Give me a very, very easy one
 
@Mr.Xcoder add two numbers, 1 byte
 
@Mr.Xcoder yep
Now subtract two numbers
 
8:25 AM
Nope
Use that to test
 
It works ^
@cairdcoinheringaahing ?
 
Oh, coincidence
Wait, searching now
 
oshit i've gtg rn, but try these
 
@cairdcoinheringaahing I'll ping you every time I solve one
@cairdcoinheringaahing Subtraction: _
 
8:31 AM
@Mr.Xcoder yep
 
@cairdcoinheringaahing Multiplication: ×, Division: ÷, Integer division: :, Modulus: %, Negate a number: N
 
@Mr.Xcoder all correct
 
Absolute value: A
 
The first few are all builtins. It gets harder later
 
@cairdcoinheringaahing I'll still ping you when I solve some
@cairdcoinheringaahing The nth prime: ÆN
 
8:35 AM
@Mr.Xcoder and the Nth fibonacci?
 
@cairdcoinheringaahing Now solving
solving serching
@cairdcoinheringaahing ÆḞ
This one is harder: Create an N×M 2D array (list of lists) of anything. Even inconsistent values are allowed.
@cairdcoinheringaahing Hint on the above one ^?
 
@Mr.Xcoder I'm trying to find my solution now
@Mr.Xcoder inconsistent values are allowed, but they don't have to be all inconsistant
 
I don't know how to create a list yet
 
Can you create a list from [1...N]?
 
@cairdcoinheringaahing I do
 
8:44 AM
@Mr.Xcoder how then?
 
R
Now finding the other atom
@cairdcoinheringaahing Just give me the other character
 
@Mr.Xcoder look for a way of repeating a list
 
138 is a really frustrating number, far out
 
@cairdcoinheringaahing xR
Is that correct?
 
@Mr.Xcoder yep. Exactly the same as mine
 
8:48 AM
[138 150 222 234 312 528 960 2088 3762 5598 6570 10746 13254 13830 19434 20886 21606 25098 26742 26754 40446 63234 77406 110754 171486 2
53458 295740 647748 1077612 1467588 1956812 2109796 1889486 953914 668966 353578 176792 254128 308832 502104 753216 1240176 2422288 2697
920 3727264 3655076 2760844 2100740 2310856 2455544 3212776 3751064 3282196 2723020 3035684 2299240 2988440 5297320 8325080 11222920 153
59480 19199440 28875608 25266172 19406148 26552604 40541052 54202884 72270540 147793668 228408732 348957876 508132204 404465636 30370837
 
@cairdcoinheringaahing Jelly doesn't seem that hard
 
@Mr.Xcoder try the "Draw a diagonal line"
 
@cairdcoinheringaahing Wait
 
This is how far I've gotten with 138, where the next term in the sequence is the sum of the factors before it
 
I try to reverse an array
 
8:49 AM
@Mr.Xcoder once you get beyond 2 bytes, it starts getting dificult
 
@cairdcoinheringaahing
@cairdcoinheringaahing Mind if I solve them in order?
 
@Mr.Xcoder sure, its up to you
@Mr.Xcoder but the reverse an array can be better
 
@cairdcoinheringaahing U?
 
@Mr.Xcoder yep. Do you know why they're different?
 
@cairdcoinheringaahing Type or performance?
 
8:51 AM
@Mr.Xcoder what does U do that doesn't?
 
Upends
 
@Mr.Xcoder that's the same as reverse
 
@cairdcoinheringaahing Vectorizes?
 
@Mr.Xcoder do you know what vectorizing is?
 
@cairdcoinheringaahing Not yet, planning to find out
 
8:53 AM
@Mr.Xcoder should I tell you?
 
@cairdcoinheringaahing Yes
 
Vectorizes means that it happens to each, rather than just to one
 
@cairdcoinheringaahing I see
 
I'm pretty sure https://oeis.org/A003416 is unachieveable without hardcoding
 
So [1,2],1,2,3 would become [[2, 1], 1, 2, 3]
 
8:54 AM
@Mr.Xcoder like this
 
@cairdcoinheringaahing What's the built-in for 1/n
?
 
@Mr.Xcoder Search for 1 ÷ z
 
It's İ
 
I'll be back in ~30 seconds
> Given a prime number N, find the prime after N (e.g. f(47)=53) Minimum needed bytes: 2
@cairdcoinheringaahing Æn
 
8:59 AM
@Mr.Xcoder yes. Now you get to the more difficult stuff
 
@cairdcoinheringaahing Can't wait to :)
 
I've gtg run tho, so keep working on it
 
Still ping you
 
@Mr.Xcoder once you've done this one in < 9 bytes, try the Diagonal line one to get used to strings, then apply for Hypertraining. That's what I did :)
 
@cairdcoinheringaahing < 9 bytes.... never
@cairdcoinheringaahing Any hint?
Before you leave?
I think I can combine and R
Anyone here that knows Jelly?
What variable does Ðf use?
 
10:00 AM
@Mr.Xcoder sorry about that. What do you need?
 
@Qwerp-Derp what is that?
 
10:18 AM
@Cowsquack Aliquot sequence of 138
 
@cairdcoinheringaahing Can you explain me how to use Ðf?
 
@Mr.Xcoder Ðf filters z, depending on whether the previous atom results in true of false.
 
@cairdcoinheringaahing Can you also explain the principle of link? I don't really understand how that work
 
For example, to find all prime numbers below the input, this works
 
@cairdcoinheringaahing And If I want to compare stuff to the current thing, what should I use?
I want to check if the sum of the subset is equal to the input
I can use S to sum the array, = to compare, but I do not know what to sum.
 
10:28 AM
If the thing uses more that 1 builtin e.g. =10, you can create a new link. for example
 
Like S<something>=³, what's the something?
 
@cairdcoinheringaahing No, let me code it and I'll ask
 
@cairdcoinheringaahing I have ẆR, and I want to filter those whose sum equal the input.
How do I filter those properly?
NVM
@cairdcoinheringaahing Let's say I add this as an argument: [1,2,3,4], [1,2,3], [2,2,2]. How do I filter those whose sum is 6?
 
@cairdcoinheringaahing What's Ç?
Last link as a monad?
 
@Mr.Xcoder each line in a Jelly program is a function, with only the last being executed by default. Ç calls the previous function (link) with 1 argument (monadically)
 
@cairdcoinheringaahing Ok, give me a simple filter task (not in the problems to try page)
 
@Mr.Xcoder given an integer, find all prime numbers strictly less than it
 
@cairdcoinheringaahing Ok, thanks
@cairdcoinheringaahing ÆR
No, it does not work
It is strictly less
 
10:41 AM
@Mr.Xcoder do it without using a builtin. Your code must have Ðf or Ðḟ in it
 
@cairdcoinheringaahing That's what I was doing now :)
 
spoiler, no Ðf or Ðḟ
 
I have ÆPÐf, but I must work with strictly
 
I have 3 bytes: ’ÆR, uses to decrement and the built-in then, working on the Ðf one
@cairdcoinheringaahing ḶÆPÐf, Lowered range , If it is prime: ÆP, Ðf - filter
Oh, that were your solutions too >_>
 
10:46 AM
@Mr.Xcoder good. Now try "Given an integer, find all triangular numbers strictly less than it"
 
Don't spoiler me, because if I figure it out, I feel like you think I copied them
 
@Mr.Xcoder I gave you the benefit of the doubt :)
 
@cairdcoinheringaahing Give me other numbers than Triangular, I really dislike Shape-Numbers
 
@Mr.Xcoder stick with it, but here is a hint
 
8n+1 is a perfect square, ok, will stick with it
 
10:50 AM
@cairdcoinheringaahing why doesn't this work: tio.run/##y0rNyan8/z9IO8Ym@P///@YA?
 
Does Jelly have a perfect square built-in?
 
@Mr.Xcoder yes.
@Cowsquack I don't get what the <S is for?
 
< is to find numbers less than the argument, and S is to sum them
but it doesn't sum them ;_;
 
@Cowsquack because it evaluates to "which items in the list are less than the sum of the argument" e.g. => [1,2,3,4] 3 => [1,1,0,0]`
You'd need to separate < and S
 
how?
 
@cairdcoinheringaahing Why doesn't this: Ʋ‘×8ÐfḶ work?
Nor does this:
Ʋ‘×8
ÇÐfḶ
 
then my solution is at 6 bytes
 
@cairdcoinheringaahing ?
 
@cairdcoinheringaahing Can I just check if a number is triangular for now?
 
10:59 AM
@cairdcoinheringaahing what are things in parentheses like (1/0)?
 
@Mr.Xcoder for the first link, you've got the correct atoms, but in the wrong order.
@Cowsquack the results
 

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