« first day (3566 days earlier)      last day (1282 days later) » 

1:16 AM
0
Q: Total resistance from unit resistors

Peter KageyThis problem is based on, A337517, the most recent OEIS sequence with the keyword "nice". \$a(n)\$ is the number of distinct resistances that can be produced from a circuit with exactly \$n\$ unit resistors. The sequence begins 1, 2, 4, 9, 23, 57, 151, 427, 1263, 3823, 11724, 36048, 110953, 342...

 
1:59 AM
Lol I was just looking through some of my old code and saw that I once tried to make a natural speech algebra solver for Alexa
My bright idea was that "hey, if I split the sentence on spaces, i can convert each word to a sympy expression and evaluate it"
IIRC development haltered because the alexa skill testing interface kept screwing up
And I also just found my attempt to automate parkour jumps on the hive minecraft server
 
 
7 hours later…
8:34 AM
@Neil is there a good way to get the coordinates of a point on the charcoal canvas?
 
 
1 hour later…
10:04 AM
@Razetime not sure what you're looking for there
but X() and Y() give you the cursor's current position, if that helps
 
oh ok
Let's say I have a letter 'b'
I just want to find it's coordinates on the canvas
 
Move the cursor until the b is found?
 
well that's the normal thing to do
Was wondering if there was a golfier way
 
10:38 AM
@Razetime yeah, Charcoal doesn't have a good way of doing that, unless you have insider knowledge about what's on the canvas already
e.g. if you know that the canvas is a 10x10 rectangle of characters, then you can find the index of b in PeekAll() and reverse-engineer the coordinates
 
10:54 AM
@Neil I came up with this so far:Try it online!
 
@Razetime stuff like that is readily done using string functions though: Try it online!
 
I wanted to try doing it using the canvas
for cool points
 
11:12 AM
sorry, I don't think the canvas really helps you there
 
oh well
I'll post the answers
 
12:07 PM
7
Q: Generating BF-code with single purpose

PlarsenI'd like to see you create code (in any programming language) that output working BF (Brain***k) code. Your program have a single character input on stdin. The input should be one digit ("0", "1", "2", "3", "4", "5", "6", "7", "8" or "9"). Your code should output BF-code that when interpreted wi...

 
 
5 hours later…
4:40 PM
Announcement: Less than a week until Dyalog's APL User Meeting; online on Monday–Tuesday 9th–10th November 2020. It is free, but you must register.
 
4:59 PM
@Razetime my string version's nearest character check isn't accurate enough for the question (see my JS answers), I didn't read your code closely enough and might have oversimplified it
 
 
3 hours later…
7:40 PM
train saved by sculpture - is this some sort of fluke? ichef.bbci.co.uk/news/800/cpsprodpb/4837/production/…
 
Would "Given a list of floats, sum them accurately" be a good challenge. There'd necessarily be a prohibition against arbitrary precision language features and libraries.
 
8:12 PM
E.g. [1,-1E20,1,-1E20,1E40,2E20,1,-1E40,1] should give 4
 
0
A: Sandbox for Proposed Challenges

caird coinheringaahingI only want some primes, not all of them It is well known that there are various formulae for calculating primes that span from calculating a subset of primes, to all possible primes. However, for this challenge, I only want a specific subset. You are to write a program which takes a single integ...

 
9:08 PM
0
A: Sandbox for Proposed Challenges

caird coinheringaahingNarcissistic loop lengths A narcissistic number is a natural number which is equal to the sum of its digits when each digit is taken to the power of the number digits. For example \$8208 = 8^4 + 2^4 + 0^4 + 8^4\$, so is narcissistic. We'll define a function \$f(n)\$ as the following, for a natura...

 
9:45 PM
2
Q: Is It A Rainbow Color

ScottChallenge: The challenge is to determine whether or not a given color is one of the colors in the rainbow. When supplied with a color, your program should output a truthy-falsy value indicating whether it is a color of the rainbow, with True equating to it IS a color of the rainbow. Rules/Criteri...

 
10:22 PM
0
A: Sandbox for Proposed Challenges

Dannyu NDosMake a die of given number of faces Objective Given an integer \$n\$ greater than 3, identify an \$n\$-sided die with the "greatest" symmetry, and then decompose \$n\$ to numbers of faces grouped up to the symmetry. Symmetry A die can have one of the following symmetries, from the greatest and wi...

 

« first day (3566 days earlier)      last day (1282 days later) »