@PeterTaylor I was discussing with COTO how many leading and trailing zeroes you'd need in the phinary challenge so as to not have to extend the number of digits dynamically during the computation. The leading zeroes are easy to figure out by just looking at Σ(n=0,∞) 9/φ^n, but do you have any idea how to put an upper bound (which I think will depend on n) on the necessary trailing zeroes?
@MartinBüttner, looking at the asymmetry in the expansion rules I would guess that twice the bound for leading zeroes would be a conservative bound for the trailing zeroes.
@PeterTaylor So you'd say it's constant? I would have thought as I take more and more (larger) digits I would be able to form arbitrarily small differences between them, so that the lower bound would depend on n. But maybe my intuition is wrong there.
Fibonacci number F_i = a \phi^i + b \phi^{-i} where IIRC a = b = 1 / \sqrt 5, so I'd expect it to be roughly symmetrical, but the substitution 0200 -> 1001 suggests that maybe stuff expands in general about twice as far down as up.
Well, I guess this one would be a bit narrower. That one requires repeated search and incremental elimination of found patterns. And I'd assume searching for a 1D string (in 8 directions) is a bit different than searching for 2D block.
Word Search Substring
Given a text (which may contain new lines) and a search string, determine if the text contains the search string. The catch is that you're not just looking for the usual substring, but you're treating the text like a word search puzzle: the substring may appear:
horizonta...
@PeterTaylor actually, the 0200 -> 1001 asymmetry might be cancelled by the 011 -> 100 asymmetry. e.g. 00400 -> 10101`, or even 00000800000 -> 1000100010 .
hm, no looking at the first 30 integers in phinary, it seems that they expand either the same in amount in both directions of one digit further towards smaller digits
@EricTressler there's an example that covers that, and the input is printable ASCII (so there's no obvious reasons why letters should get special treatment), but I can mention it explicitly
@overactor Oh I love GPS, that wasn't what I meant. I mean that people now seem to think that the coordinate system was invented by or belongs to "GPS" or something. You might as well call them "boat coordinates"; they've been using them a lot longer.
PPCG challenge: Given a GPS coordinate, print the local time. You may use the current time in UTC. You may not use any other date/time library functions.
Mixed Base Conversion
code-golf arithmetic number-theory
Background
Most people on here should be familiar with several base systems: decimal, binary, hexadecimal, octal. E.g. in the hexadecimal system, the number 1234516 would represent
1*16^4 + 2*16^3 + 3*16^2 + 4*16^1 + 5*16^0
Note that ...
@Geobits I think that calling them GPS coordinates is more precise than calling them lat and long because it implies that you're using the WGS84 geoid.
But the Canaries aren't quite the same. They're politically a part of Spain, not a colony. And if you listen to the radio in Spain they give all the times in both timezones.
("Son las cuatro veintitres, una hora menos en Canarias")
Background
Most people on here should be familiar with several base systems: decimal, binary, hexadecimal, octal. E.g. in the hexadecimal system, the number 1234516 would represent
1*16^4 + 2*16^3 + 3*16^2 + 4*16^1 + 5*16^0
Note that we're usually not expecting the base (here, 16) to change f...
@EricTressler After initially posting only questions which were apparently all a bit too difficult, I've been trying my luck with simpler (mostly golfing) questions in the past two week. It's actually an interesting challenge to come up with something simple and interesting that's not a duplicate. ^^
@PeterTaylor In my experience, people use the term "gps coordinates" no matter what they're actually talking about. The geodetic system used is up to the receiver anyway, and can be changed in some (military aircraft have this option due to varying maps used as references).
@EricTressler if I'm writing a Ruby submission that beats all Python and JS submissions I'm generally very happy about that, regardless of there being a GS or CJam or J or APL answer
@VisualMelon I didn't see that one, nicely done. Although, I can spot 6 in the Java one that can immediately go away. I may take some time to golf it later to try to beat you :D
dynamic vs static: dynamic = determined at runtime, static = determined at compile time weak vs strong: weak = you can change the type of a value (e.g. C casts), strong = you can't
@Martin For mixed base, your 190315[2,10] example seems strange to me. You say below it that the rightmost base (10) corresponds to the least significant digit (5), and then you go left from there. If the 5 is in base 10 (5*10^0), shouldn't the next digit 1 be some form of base 2 instead of 10^1?
sorry, I disappeared, var is an inferred type with lots of restrictions on use - in F# the type inference is fun, and automatically makes your code generic
You're on a road trip with three friends, Eiko, Biko, and Shiko. You decide is so much fun that next year you want to go on a trip with Eiko, Eiko, Biko, and Shiko to change things up. Except you don't decide that, because the idea is absurd. — Malice Vidrine12 hours ago
@SohamChowdhury It's a feature specific to Shadow's Den. Posting specific messages/commands can lead to getting a spell. The exact way to get them is secret.
@Geobits ah, that's unfortunate. I thought it was actually quite nice. can't be helped. except by waiting for it to accumulate the remaining upvotes randomly over a couple of years :D
Still working on the specifics, but getting it the idea out there.
2-Dimensional Regex
Given a 2-Dimensional regex and a block of text, do a single or a global search and replace.
Input:
s/aba/bbb/
/aba/aba/
/aba/bbb/g
aaaabaaaa
aaaabaaba
aaaabaaba
aaaaaaabb
Output:
aaabbbaaa
aaaabaaba...
Still working out specifics and wording on this one. Suggestions welcome!
Print the union of sequences
You are given four number sequences. I won't use these four, but just as an example.
Fibonacci
Even numbers
Square numbers
Cube numbers
Your input will be a comma seperated list of numbe...
haha, tomorrow I'll probably be accepting a winner for the False Positives challenge, although anyone could beat all others simply by first running the winner and then the second place (with some logic to exclude duplicates), because they both take only a fraction of the time limit to get their results.
There is an interesting concept (in my eyes) of fat binaries, and I have an idea of a challenge. Besides the fact that it may not be too feasible in this context, I feel like if anyone can do it, it would be this community. The problem arises from the fact that it may fall into more of a post-pro...
@user2179021 Regarding this again. I think there is some difference. A 50 rep bounty would get me to notice a question, but not to attempt it if I've seen it before and couldn't be bothered. A 200 rep bounty might convince me to tackle a problem even if I've already seen the question and decided not to answer.
I've offered two bounties here. The 100 got a decent response, and the 200 got a better one. I don't know how much the question itself had to do with it. Make of that what you will.
Too bad we can't use cross-site rep for bounties. I'd spend everything I got from this answer on EL&U in no time. It was a decent answer (IMO), but +86? Seriously?
Yea, the time it took me to write it was how long it took me to find a definition link and write a quickie-explanation below. It was literally the first thing that came to mind when I read the question, and I was only expecting a couple votes.
@ProgramFOX For one, I'm adding a fallback command_talkback that is executed in places of the else: return "Command not found". It checks if the input matches any of the keys of a replies dict and (duh) replies with the key if it does. Else, it returns a not found.
Currently it's like this: {'droptables': 'Hello there, little Bobby!}