« first day (1577 days earlier)      last day (3270 days later) » 
00:00 - 22:0022:00 - 00:00

10:08 PM
how would you substitute \n's with unescaped \'s with regex?
\n -> LF; \\n -> \\n; \\\n -> \\LF; \\\\n -> \\\\n
removing every escape (\\,\n,\r,\t) and substituting properly would be good too
 
10:24 PM
[solved in an other way but still interested]
in Python3: s=s.encode('ascii').decode('unicode_escape')
 
How about eval("''%r''"%x)?
 
10:41 PM
@Sp3000 I pull the code from the web, so I would rather not use eval
 
Ahaha k
 
btw is the %-formatting depreciated?
 
Not as far as I know.
 
They're phasing it out, but I'm not sure about deprecated
 
I see I choose not to learn about it so I wouldn't confuse with .format()
and I don't even know that decently
 
10:45 PM
Hmmm they're not that different, except .format's a bit more powerful
>>> "%.2f" % 3.14159265
'3.14'
>>> "{:.2f}".format(3.14159265)
'3.14'
 
the SE API seems to return only 30 answers to a question, not all
 
Golfed English should be a recognized dialect.
 
It's all tied up at 34, CJam.
8
A: Clarence the Slow Typist

isaacgPyth, 38 35 34 bytes +.Rs.aM-M.:m.jF.Dx`ciUTT1b3z2 2"cm Demonstration. Indexing into the string of a float idea thanks to @Dennis. Explanation, on the phony input 15.0: First, we take the input. It is implicitly stored in z. '15.0' We map this list as follows: m.jF.Dx`ciUTT1k3z. UT: We g...

 
0
Q: Split as number, join as string, repeat

Calvin's HobbiesConsider the process of: Taking a non-negative integer N. e.g. 27. Spliting it into integers N - floor(N/2) and floor(N/2) (a 'bigger' and 'smaller' half) and writing them in that order. e.g.27 becomes 14 13. Removing the space to join the integers into a new, much larger integer. e.g. 14 13 be...

 
11:16 PM
@trichoplax We could have a bunch of meta snippets for translating languages into JS, then Stack Snippet koths could have more allowed languages.
 
Anonymous
does anybody remember in perl how you could use foreach only for, for example, the third through sixth elements of an array rather than the whole thing? I don't know what keywords to use in google for this.
 
@Calvin'sHobbies I'm guessing you'd need a really long time limit to allow other languages to compete?
 
10
A: How to skip first element in array with foreach?

TLPThis is perl. There are more than one way to do it, always. Such as an array slice: for (@arr[1 .. $#arr]) # for and foreach are exactly the same in perl You can use shift as Andy Lester suggested, however this will of course alter your original array.

 
Anonymous
@AlexA. looks to the floor in shame th... thanks
 
No shame!
@Calvin'sHobbies: I like your shameless plug for BBBF in your newest challenge. ;)
 
11:19 PM
@trichoplax Well if it was all translated when the controller loaded up, the time wouldn't necessarily be that much slower
 
@Calvin'sHobbies Now that is interesting
 
Assuming decent translation
 
Yes. I guess what is required is effectively an X to JS compiler?
Rather than just an interpreter
 
But really, I think a plain translator would be easier than a compiler. Since it can all be treated as plain js
@AlexA. It's for people if and only if they like my challenges ;)
 
I remember, but those are more interpreters?
 
11:25 PM
Yeah
 
@Calvin'sHobbies Well I like your challenges quite a bit, but my attention span has thus far prohibited me from reading all of BBBF.
 
Though TBH, if someone wanted to not use JS, they could translate it from their language externally and not bother with the meta stuff
@AlexA. Just read Gameplay and you'll get the jist
 
Okay
 
11:44 PM
The initial version of the KotH-downloader is ready: gist.github.com/randomra/2e799ff31ea914893a77
Given the question ID it saves all entries' code to its own properly named file.
feedback is welcome
 
Anonymous
@AlexA. do you write perl?
 
Anonymous
or, better, does anybody here write perl?
 
Anonymous
@PhiNotPi you're back! hi!
 
I'm making a new language that's really easy to write quines in
 
Great timing?
 
11:58 PM
every linux distro already comes with an interpreter
The interpreter is cat
 
Anonymous
@PhiNotPi god yes
 
Anonymous
I am struggling with an anonymous array
 
Fun.
I once wrote an obfuscated code entry on PPCG that only used anonymous arrays.
 
Anonymous
you see: I have $rows which is an anonymous array and the data I want is between indexes 2 and 16, meaning, $rows->[2] etc
 
Anonymous
lol it's really possible to really f'up readability with anonymous somethings
 
00:00 - 22:0022:00 - 00:00

« first day (1577 days earlier)      last day (3270 days later) »