« first day (3159 days earlier)      last day (56 days later) » 

1:53 AM
0
Q: Calculate the Ultraradical

Shieru AsakotoWhat is the Ultraradical The ultraradical, or the Bring radical, of a real number \$a\$ is defined as the only real root of the quintic equation \$x^5+x+a=0\$. Here we use \$UR(\cdot)\$ to denote the ultraradical function. For example, \$UR(-100010)=10\$, since \$10^5+10-100010=0\$. Challenge ...

 
 
3 hours later…
5:06 AM
@TannerSwett that's some arcane magic
I can't belive something like that would ever work
it's really close though - from __future__ import the division
 
 
5 hours later…
9:38 AM
0
A: Sandbox for Proposed Challenges

A _Duck, duck, gone! Here is the (quite childish) Five little ducks song(it is not long): Five little ducks went out one day, over the hills and up away. Mother Duck said, "Quack Quack Quack Quack", but only four little ducks came back. Four little ducks went out one day, over the hills and up aw...

 
 
2 hours later…
11:31 AM
I have officially been here for 1 year on PPCG!
 
@MilkyWay90 gratz :)
 
12:26 PM
@MilkyWay90 Time to learn more APL then?
 
1:21 PM
codegolf.stackexchange.com/questions/193357/… - I'm getting my name legally changed to "Rothuvsein."
 
1:52 PM
Was closed for not having specific winning criteria, but looks like the edits have resolved it:
11
Q: Convert a string of digits from words to an integer

SparklerConvert a string containing digits as words into an integer, ignoring leading zeros. Examples "four two" -> 42. "zero zero zero one" -> 1. Assumptions Submissions can assume that: The input string is comprised of space-separated digit words. All words are valid (in the range "zero".."nine...

Needs a couple more re-open votes
 
 
1 hour later…
2:59 PM
0
Q: Algorithm problem on graphs

tech hacksLet G be a directed graph whose edge-weights are rational numbers. Give an efficient algorithm to check if G has a directed cycle whose product of edge-weights is greater than 1. Assume that addition/multiplication/division of rational numbers takes unit time.

 
3:10 PM
CMC: In a string of text, change the word "less" to "fewer" if the next word ends in an s. You can assume that the word "less" is preceded by a space, that a single space separates the two words, and that they only contain lowercase letters, but the rest of the sentence might contain other printable characters. Example: "I have less milk." (unchanged); "ZZ is 2 less bytes." -> "ZZ is 2 fewer bytes."
 
@Neil is it guaranteed that there's one (and only one) occurrence of less in the input?
 
@dzaima it should work on strings that contain it exactly once. it would be nice if it worked on strings with more or fewer occurrences too.
 
@Neil JS, 39 bytes
oh i probably need +2 bytes for requiring a space before less
 
@Neil QuadR, 23 bytes Try It Online!
 
@dzaima yeah, I don't want it changing useless things to usefewer things...
@Adám bless!
 
3:21 PM
Oh, I guess 38 bytes to handle "unless things"
@dzaima Using the same fix as this
 
when I said the word "less" is preceded by a space, this is just to simplify your word detection, rather than using complex word boundary logic
but it still needs to be a whole word
 
@Neil But if I use space rather than \b then I need a space in the replacement string too, so it ends up same length. Then I'd rather handle more cases with \b.
 
3:49 PM
@DJMcMayhem We should make a challenge about the "vim distance" between two strings: It is defined as the minimum number of keystrokes needed to transform the first string into the second. Wold that make sense?
 
4:16 PM
@Adám well, it might have helped some people
 
0
A: Sandbox for Proposed Challenges

simonalexander2005Title: Transposition Given a set of notes, the key those notes are in, and a target key; output the notes transposed into the new key. The complete set of input notes for this challenge will use the English naming convention, and so are as follows: Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G# ...

 
@flawr I wonder if that would get into the halting problem
You'd also have to decide whether copying strings out of the docs is allowed
And you'd probably not want to allow accessing external files :P
 
4:44 PM
One other problem: it would be very hard to make it self contained since there are hundreds of commands (maybe even in the range of a thousand if you count ex commands) and they get updated with newer versions sometimes
 
Can someone help me understand what the string rothuvsein is doing in this code?
6
A: Convert a string of digits from words to an integer

Jonathan AllanPython 2,  71  70 bytes -1 thanks to ovs (use find in place of index) lambda s:int(''.join(`'rothuvsein'.find((w*3)[6])`for w in s.split())) Try it online!

Several answers appear to be using this trick, whatever it is, but I can't for the life of me figure out what they're doing
 
zeRo One Two tHree foUr ...
 
@AdmBorkBork ok... so its not always the first (or second or last) character, how does it know which one to match it up to?
 
w*3 takes the word and multiplies it out -- so zero becomes zerozerozero
Then take the [6]-th letter thereof
 
4:58 PM
@AdmBorkBork ah, thanks, I get it... 6th character (0-based), 7th character (1-based)
 
Yeppers
 
in T-SQL, that's probably far longer than just taking the first 2 chars, which are unique
I'd have to do a SUBSTRING(n+n+n,7,1)
compared to just LEFT(n,2)
 
5:10 PM
@BradC Well, the key is that gives you the index, because the r matches to 0, the o matches to 1, etc., so you get the number right away
 
@AdmBorkBork Right. I'll try both versions, see which is more efficient
(not that T-SQL is ever all that efficient)
 
 
2 hours later…
7:02 PM
1
Q: French license plates

ElcanSandbox French License Plates French license plates come in a sequential order, following a specific pattern of numbers and letters : AB-012-CD Challenge Write a program or function that, for a given number, outputs the corresponding french license plate number. Your program should not handle...

 
7:32 PM
@DJMcMayhem why the halting problem?
@DJMcMayhem as I'm still quite new to vim, would it be possible to narrow it down to a set of "core" commands?
 
8:20 PM
Time travel is real
 
suspicious timestamp is suspicious
 
pretty sure that was made by hand with F12...
 
8:38 PM
user image
2
@UnrelatedString cheater ^
 
 
2 hours later…
11:06 PM
@Adám In an hour or two, yeah.
 
11:46 PM
0
A: Sandbox for Proposed Challenges

BeefsterByte-sized Huffman Coding (WIP) coding-challenge compression Huffman codings are a method to compress data with certain frequency properties, usually text. Normally, these operate on bits rather than bytes, but this challenge will instead operate on whole bytes instead. Since you wouldn't get a...

 

« first day (3159 days earlier)      last day (56 days later) »