« first day (2189 days earlier)      last day (2949 days later) » 

19:02
0
Q: A boring version of yourself

SygmeiA boring version of yourself Have you ever dreamed of a boring version of you which types the text you just typed ? No ? Because that's exactly what I'm challenging you to do ! The program needs to check how many time it took for the user to input a text at program launch and then retype the t...

[duplicate] ... are you saying I'm boring?!
lol
interesting: this user is unregistered, has 1 answer, but it's scoring 183 and is pretty much word-of-god
184
A: Why is "Pokémon" written with an accent?

EmiThe mark in question is an acute accent mark and is absolutely intended to mimic the native Japanese pronunciation, which itself is based on the English words "pocket monster". Because of English orthography, there is considerable ambiguity surrounding the pronunciation of the character "e". (C...

0
A: Sandbox for Proposed Challenges

FlipTackWhich Day of Christmas is it? In the well known carol, The Twelve Days of Christmas, the narrator is presented with several gifts each day. The song is cumulative - in each verse, a new gift is added, with a quantity one higher than the gift before it. One Partridge, Two Turtle Doves, Three Fren...

@orlp No, that's not it at all. It just comes down to the fact that addition in GF(2) is xor and multiplication by 0 or 1 is easy. The mul method in codegolf.stackexchange.com/a/9284/194 could be applied to any field GF(2^a) built directly on top of GF(2) by just changing 8 to a, 7 to a-1, and 0x1b to the polynomial minus x^a.
For a field tower built as GF((2^a)^b) addition could still be done as xor, but multiplication has to be done element-wise.
@Riker that's awesome, but there's an even cooler one:
1230
A: Transatlantic ping faster than sending a pixel to the screen?

John CarmackThe time to send a packet to a remote host is half the time reported by ping, which measures a round trip time. The display I was measuring was a Sony HMZ-T1 head mounted display connected to a PC. To measure display latency, I have a small program that sits in a spin loop polling a game contro...

Probably one of my favorite answers across the entire SE network
@PeterTaylor right, I'm confused with other crypto
@PeterTaylor I just always approached the AES parts from a bit level, rather than polynomial level
19:08
@Maltysen I tested google.com, and the image shown on the right of the site was a captcha.
my point still stands about it being a fixed sized field with a fixed polynomial, allowing you to ignore the details and just look at the bit stuff
Coding-style question: Which one of these is better:
if (foo())
    bar();

if (foo())
{
    bar();
}
@PeterTaylor I was confused with ed25519, which specifically chooses 2^255-19 for special properties to make computation fast
@DJMcMayhem they're both bad
if (foo()) bar();
@DJMcMayhem #2. Lower risk of programming mistakes later.
if you omit braces, do it on the same line
if you do use braces, I strongly prefer "java style" braces:
19:10
@DJMcMayhem Personally I'd choose the second one (although I used to do the first one when I was younger)
if (foo()) {
    bar();
}
2
never do the first one though
it will lead to bugs
e.g.
if (foo())
    bar();
    baz();
@orlp This. First brace on the same line is more aesthetically pleasing.
baz() looks like it's in the if, but it isn't
@mbomb007 Ehh, it's subjective
@mbomb007 that's subjective, but it objectively takes less screen estate and doesn't break code flow when the opening brace starts on the same line
19:11
I prefer brace on new line because they align with the closing brace
@DJMcMayhem Ehh. You can always add a blank line, but putting the opening brace on its own line is ugly, because then you have two lines to start the block and only one to end it.
technically this style is the most superior one out of all, in terms of screen estate and code flow
if (foo()) {
    bar(); }
but it loses out on refactorability
Some see it that the braces need to line up, but I think the "statement" and the brace should line up
so if has to be aligned with the closing }
which is also lisp style
19:13
still, this is another "tabs vs spaces" debate
(if (foo)
    (bar))
@FlipTack much less so
@orlp That makes it harder to insert a line inside the if and harder to copy a section if the last line is included.
@mbomb007 that's what I said
1 min ago, by orlp
but it loses out on refactorability
I think the official GML examples have the worst style I have ever seen.
if foo()
{
bar();
if baz()
    {
    spam();
    }
}
@orlp Yeah, but you golfed your English too far.
19:15
@mbomb007 .
I prefer
if (foo()) {
    bar();
}
@DJMcMayhem qux comes after baz.
Oh well, it removed my indentation
but Python has the best system
6
if foo():
    bar()
@Luke if you edit it, you can select "fixed font"
19:15
unambiguous, clean
@orlp amen
@orlp What about SQL? :D
Python looks nice, but it get's annoying when merging different files (when one file uses spaces and the other tabs)
@Luke this is an editor fail, not Python fail
IF
BEGIN
...
END
19:17
SQL is the Shouting Query Language
3
@orlp: True, but it's inconvenient.
SQL Query Language
@Luke I don't know why people insist on WRITING IN CAPS in SQL
the lowercase versions work just fine
@Luke I have no such problems
:%s/\t/ /
done
@orlp Because it's old enough that editors didn't have highlighting back then
CamelCase made it hard to separate table/column names from key words.
@orlp It helps differentiate code syntax from input/variables
@mbomb007 I think you've got RAS Syndrome there
19:19
@Poke Input and vars all start with @.
@mbomb007 I included things like column names or hardcoded input in that
SELECT column_name FROM database WHERE other_column = 'string'
Another coding style question: "using namespace std; yay or nay?"
Why wouldn't you
@FlipTack as I learned from "add a language to a polyglot", Stack Exchange mangles tabs really badly, and actually destroyed a Whitespace answer so badly we couldn't reconstruct it; this means that in any case where the exact sequence of bytes matters, spaces are much better, and tabs are only really usable in situations where you don't care about them being accidentally replaced with spaces
It's not great for golfing, but otherwise it seems fine to me
19:23
There's probably a legitimate answer to that, I'm not super knowledgeable about C++
@DJMcMayhem Depends if you know things are/are not going to collide
I always use it
@BusinessCat Ambiguity in the namespace. Std includes a lot of names, sometimes it overrides an otherwise reasonable name
@ais523 How so? If you "edit" the answer, the exact sequence of bytes remains unmangled.
@DJMcMayhem yay, so many std::couts and std::endls get annoying
19:24
Yeah, that's a potential problem
@DJMcMayhem that's not word of god though
Also I think using can be scoped to a function in C++
the one I linked was an explanation from one of the people who made it
kind of like the imagemagick dude on PPCG
@ais523 It's only the markup that mangles it when displayed. You can always view the original.
@Riker yeah it is. "John Carmack said XYZ, is it true?" John Carmack: "Yes. Here's how I proved it"
19:25
@mbomb007 it wasn't me it happened to, so I don't know all the details
@DJMcMayhem he didn't invent that though
I guess they're about equal
@ais523 a similar annoyance I run into in my challenges a lot is that SE doesn't display trailing spaces very well.
@DJMcMayhem agreed
especially in inline code blocks (`…`)
When I wrote fill in minesweeper clues I had to surround the examples in brackets to get around that
SE really hates all-whitespace lines in code blocks.
19:30
You could probably put a zero-width space after the trailing whitespace
You clearly need to figure out how to use Europe as a display technology. — wfaulk May 3 '12 at 14:29
Though maybe that would mess things up if people tried to copy-paste the inputs
@mbomb007 reply to the wrong person there?
Oh. Yeah
Too late to delete
Reading answers like that makes it more mind blowing that video games are even feasible, not to mention playable and fun
19:33
You clearly need to figure out how to use Europe as a display technology. — wfaulk May 3 '12 at 14:29
@DJMcMayhem well, in some games (like chess), lag fundmentally isn't a problem; in others, you can deal with it by anticipating the user's actions to some extent
I think the bracketing debate is partially based on the editor used, too. For example, the way that PowerShell ISE collapses brackets leads me to use the curly-opens-on-the-same-line-as-the-if style.
for example, in League of Legends, almost all actions have some sort of delay before they have any effect on other players; this is partly for gameplay reasons, meaning that you can't just counter every action as soon as it's made, but it's also partly a method of hiding lag (because it gives the system a small window in which to make "retroactive changes" because the original change hasn't had any permanent effect yet)
@DJMcMayhem Here's an excellent article from a Valve developer explaining lag compensation in coding a client-server game
wat
wat
@Downgoat That page doesn't even have SSL enabled
also, yes, I do use letsencrypt, try installing the root cert, it isn't installed on Macs for some reason.
19:43
@ais523 that makes sense. A lot of it comes down to have style/type. A MOBA game might be a little easier to hide latency compared to an online FPS, where you have to handle client graphics latency, all the clients sending their actions and they latency, and the server latency sending actions back to each client.
The moment from when I fire my gun to when your computer is aware of it has to be at least 100-150 Ms I imagine, and you need to know ASAP so you can render bullets/Dodge
right, online FPSes are particularly badly affected by lag
it's worth noting that whenever it fits the setting, FPSes tend to have fairly slow bullet travel times
you might think that in a sci-fi setting, the weapons would fire fast and instantly, but they tend to have bullets that move comparatively slowly in computer games so that lag is less of a problem
If they actually traveled at realistic speeds you wouldn't be able to see them
yep
wat
wat
...FPS games don't render bullets.
although the occasional game solves that for hitscan weapons by leaving a visible trail in the air showing their route
wat
wat
19:48
They use hitscan?
"hitscan" is a term referring to a bullet hitting the target as soon as it's fired
wat
wat
@KritixiLithos using std::cout; using std::endl;
@ais523 yes I know
Imagine my two messages joined together.
@wat I know, the "s" was outside the code block :)
Anyone knowledgeable about calculus/analysis? Would you mind to take a look at this and please tell me it is correct?
wat
wat
@KritixiLithos ?
what
19:50
It also depends on the game and the weapon. For example, in overwatch hanzos arrows are definitely rendered and fairly slow traveling, almost to the point of being dodge able. Widowmakers sniper rifle is pretty much instantaneous so it shows the visible trail like ais532 mentioned
@wat even overwatch uses hitscan for a lot of things
roadhog's left click is hitscan
but right click is projectile
I was talking about using cout instead of std::cout when you do using namespace std
reaper is hitscan
etc
Does anyone here know of a Scheme implementation in Python 3?
I saw a clip of ARMA 3, which is all about hyper realism, and they even simulate how long it takes a sniper rifle to travel long distances
@Poke which weapons don't use hitscan? (Hanzo obviously)
Anonymous
19:53
@DJMcMayhem Genji
Oh good point. And pharah too
@wizzwizz4 nice question!
are any languages implemented in python?
Anonymous
@Lembik Python :P
I guess there's quite a few actually. Symmetra, Mei, zarya, lucio, dragon brothers, junkrat... Etc.
Anonymous
19:55
@DJMcMayhem Well Genji sort of does hitscan
That's what I said. :P
Anonymous
The reflect ability does hitscan (since the reflected shots are hitscanned)
@Mego Is cpython really written in python? I mean it's in C isn't it?
@wizzwizz4 Oh that's much simpler than I realised
Anonymous
@Lembik CPython is written in C. CPython is also not the only Python implementation. PyPy is written in Python (well, a restricted subset).
@Lembik The core stuff is written in C, but the rest is written in Python.
19:57
pypy isn't really written in python
@Lembik It sort of is.
some parts are in rpython
Anonymous
RPython is that restricted subset I mentioned
Why couldn't it be? gcc is written in C.
well I am not sure it is true subset
@wizzwizz4 it could ! I just don't think it is
Anonymous
19:57
@wizzwizz4 Actually the vast majority of CPython is written in C. The only Python code is glue for C extension modules.
@Mego Why not just write it all in Python? :D
Please gimme teh lisp implementation! :-p
it's hard to know what rpython is at its hardly documented
@Lembik when writing the polyglot test driver, I discovered that python seems to be the most popular language for implementing esolangs in
@ais523 interesting
19:59
mostly python 3, although a few used python 2
Anonymous
@Lembik The documentation for RPython is actually pretty decent. It also fits well with PPCG's notion of languages, because they explicitly say in the documentation that "RPython" is defined by the implementation.
@DJMcMayhem Roadhog's right click, soldiers helix rocket, mercy's gun, pharah rocket, genji stars
dva's pistol
etc
The RPython compiler is written in Python !
pypy is wonderful but frustratingly limited to pure python
they haven't found any sensible way to implement numpy that even matches the speed of standard numpy
@Lembik Yeah, they need to add more py. I'm all for PyPyPyPyPyPy
pie!
20:03
ThonPy when?
@mbomb007 I thought you'd prefer /(Py)*/...
Would /(abc)+++/ only match strings with 8 or more abcs?
/(Py)+/, the output must be a valid /(Py)+/ program, there is no looping constructs.
@wizzwizz4 no, that's /(abc){8,}/; ++ is a keyword in its own right in regex (just like ++x and +(+x) are different in C), and /(((abc)+)+)+/ would match strings with 1 or more abcs (because two of the +s can match just once)
@ais523 Oh... . :-/
actually I can golf that to /(abc){8}/; if there are more than 8 occurrences in a row, there must also be 8 occurrences in a row
if you don't need the occurrences to be consecutive, that's /(abc.*){8}/
20:10
Even better, /[abc]{24}/
that matches a string of 24 as though
Well /[abc]{8}/ gets you your 8 of any in a row.
@ATaco Have you seen Muriel?
@ais523 That's the language I thought of when I saw that.
Wow... I am abandoning work...
Somebody should put that warning back up.
20:29
0
Q: Tips for golfing in Brachylog

ais523Brachylog is a language that's beginning to rise in prominence in code-golfing recently (and just received a major update with a terser syntax). Like Prolog, it has the advantage that it can often solve a problem (typically via brute force) merely from a sufficiently accurate description of what ...

@NewMainPosts Isn't that a duplicate?
Apparently not; there are no posts about Branchylog...
You mistyped the name, it is Brachylog, but this is the only
tips for it
@wizzwizz4 "Branchylog" sounds like a logger for git branches.
@LliwTelracs If I blamed it on autocorrect, would you believe me?
@mınxomaτ Oh... Yes, that is what I definitely meant. I was definitely certainly making a pun.
A fuel for fires that also has good carrying handles.
20:36
@mınxomaτ I cut down a tree. It was quite a branchylog.
10 internet points to you
The quick brown fox jumped over the branchylog.
Anonymous
Finally, language puns that aren't about languages I made
Seriouslylog
@Mego Yeah, seriously.
20:38
-15 points for cheapness
It's the only language with Mego's name on esolangs.
Anonymous
@mbomb007 It's also the only esolang I've made (yet)
Anonymous
@mbomb007 If I get added as a room owner, I will kick everyone who makes that pun :P
Anonymous
I haven't decided if I'm joking or not
@Mego That sums up most political candidates AFK, too.
20:40
@mınxomaτ They're away from keyboard?
Internet weapons showcase: the AFK-47
@Mego So, you're not sure if you're Seriously kicking people?
Anonymous
@AdmBorkBork Every pun pushes the scale closer to seriousness
wat
wat
@Mego Will you actually kick anyone?
Excellent. Now I just need to find the topple point such that the pun after mine causes the kicking to commence. Like that polyglot challenge.
20:44
wasn't the whole point of the name "Seriously" to be a retroactive pun?
0
A: Sandbox for Proposed Challenges

Jack BatesFUNCTIONal arrays In some of the easier languages to learn such as Python and C++, functions are called by using parentheses (). Occasionally you can find nested functions like in this code in Python 3 print(max(list(range(10)))) Now lists make it into a list of functions and arguments. The l...

Seems like it's supposed to be people's reaction when they see an answer in it
Seriously, 10 bytes?!
@AdmBorkBork Did you change your name recently? I can't remember who had the powershell logo.
@mbomb007 TimmyD.
20:48
I was like that when I noticed too.
I finally twigged that the user was the same when I saw the reputation count.
Yes, I opted for a name change.
> That's far too much rep for a new user... Where's that Tommy person gone?
(I'm not very good with names...)
@BusinessCat This explains how the whole thing started
Yeah I've seen that
Dec 15 '16 at 20:29, by TimmyD
@Pavel If you see AdmBorkBork (or slight variations, like Adm BorkBork) someone online, it's very likely me.
20:50
@AdmBorkBork Oh, I just thought you lost a bet.
@DJMcMayhem: why are we putting on questions? Tips questions don't have a victory condition, and it seems weird to use the same tag for two different things (questions which are code golf, and questions which are about code golf)
2
Anonymous
@ais523 Because we don't have a better system, and it's used to indicate that the desired tips are for golfing.
so what is the tag actually for, then? if we put it on every post except posts with a weird victory condition, then it's less useful than its complement would be
@ais523 idk, I added that because it's generally been added to tips questions but I don't have super strong opinions either way. It might be worth a meta post
20:58
now I'm wondering what it would be like if tips questions did have a victory condition
"the winner is the person who posts the shortest useful tip"
Sorry, it's generally been added to "golfing tips" questions. We have a couple tips questions that aren't about golf
Anonymous
@ais523 No, the winner would be the post that shaved the most bytes off of answers across the site
Anonymous
Which means the tips answer from Best Of 2016 would probably win

« first day (2189 days earlier)      last day (2949 days later) »