« first day (2271 days earlier)      last day (2574 days later) » 

6:00 PM
Yeah, I saw from incognito mode
@AdmBorkBork by count, not by score :P
 
0
Q: Algorithm to search substring in any order in a string

Manthan DavdaI have a problem, I need to search a substring in a string.. Substring can appear in any order below are sample Sample input 4 - Length of substring 11 - Length of string cAda - Substring AbrAcadAbRa - String Sample output 2 Explanation Here, 2 possible sequence of Substring are Acad and...

 
user165474
-1 and VTC
 
@DJMcMayhem :p
 
user165474
I feel like people should read the tour first so they don't post SO questions here
 
@HyperNeutrino why downvote?
@HyperNeutrino well, SE does all they can regarding that probably
but there's no point in downvoting it really, it's going to get closed anyway
 
6:10 PM
@Riker not useful for the community, didn't research what's on-topic?
 
user165474
@Riker Well I mean technically it's not really necessary. Reverting. But I mean user has 1 rep anyway so I guess it doesn't really make a difference :P but yeah I guess. Un-downvoted.
 
user165474
There's still another downvote on it.
 
<shrug>
 
@Riker A score of -4 or lower keeps it from the front page.
 
TIL
 
6:12 PM
it's going to get closed anyway though, why does -4 or lower really matter? It's going to dissapear
 
user165474
Closed questions still appear on the front page.
 
If you mean Roomba, he deletes merely closed questions only after some time
 
The roomba takes a month or so.
 
That's why 10k deletions are a thing
 
user165474
 
user165474
6:13 PM
...
 
Well, once it's at -4, deleting it is kinda pointless.
 
It still shows up in side pages at -4, though
 
user165474
Wait we have an auto-delete script?
 
@HyperNeutrino Roomba, yes. It runs on the SE side
 
user165474
Cool. I thought Community did that. :P
 
6:16 PM
Roomba is Community
 
user165474
...
 
user165474
oh lol
 
user165474
lol I still remember back then when I was looking forward to getting 1k rep... ^-^
 
6:29 PM
@JanDvorak Is it user -4? lol
 
is there a general perception that most users on this site are conscientious enough to moderate themselves without much outside influence? or is the perception more that most users are pretty bad at self-moderating, and that's why moderation is so important? or?
 
I mean most established, high-rep users understand the site well enough to be self-moderated
typically newer users are the ones that need moderation
but there are plenty of exceptions
 
@MitchSchwartz ha no
to the first question
 
@MitchSchwartz I think also part of it is we have a very high moderator-to-user ratio (and a very high high-rep-user-to-regular-use ratio, too), both of which tend to converge toward a tighter overall scope and specification, so that things which are "out of place" tend to stick out more.
 
Anonymous
6:57 PM
@MitchSchwartz My view is, most of our users are able to self-moderate, and so moderators don't need to step in most of the time. When a user doesn't self-moderate, the community steps in (via high-rep non-moderator users). Only when the user pushes back against the community or the issue cannot be resolved without moderator powers do moderators have to step in.
 
Anonymous
Our site not being a Q&A site makes it weird. We're in uncharted waters here, and we're doing our best to define a scope and a set of policies that allow the site to run well. Unsurprisingly, the users who spearhead the discussions about scope and policies are the ones most invested in the site: moderators and high-rep users.
 
@flawr ELI5 fundamental theorem of calculus?
 
is there a general feeling that the site runs well?
 
Anonymous
@MitchSchwartz I'd say it does. We have some unresolved issues, but those mostly apply to edge cases (e.g. non-programming languages, some loopholes)
 
user image
4
 
Anonymous
7:07 PM
@Riker Not flawr, but: let F(x) be a differentiable function whose first derivative is f(x). FTC says ∫[a,b] f(x) dx = F(b) - F(a).
 
Anonymous
Also ∫ f(x) dx = F(x) + C, where C is some constant defined by initial conditions.
 
Even shorter: the higher the curve, the faster the area below it grows when you move the right limit at a given speed, and the relationship is linear
 
Anonymous
But that's a graphical interpretation, not an algebraic interpretation
 
ELI5 excludes the algebraic interpretation of anti/derivatives
 
@Riker *calculus* *ELI5* ... ?
 
7:17 PM
ELI Pre-Calculus: Calculus (ps im actually precalculus)
 
Anonymous
@betseg What if you could divide by 0 or infinity and stuff worked?
 
The idea behind calculus is to answer questions such as "when the value of x starts at 0 and increases at the rate of t^3 per second, what is the final value of x after 5 seconds?"
 
Is this undefined behavior? Try it online!
 
Does anyone happen to have a script to automatically stop animated GIFs after a few seconds?
 
Anonymous
@DJMcMayhem Yep, classic integer overflow. 300 % 256 == 44
 
Anonymous
7:21 PM
@JanDvorak Not a script, but I have a handy trashcan :P
 
@Mego it gets closer to -inf or inf depending on where you're approaching from 1/x to 1/0?
 
@Mego yeah, but you have to rely on ROs to apply that
 
Anonymous
@JanDvorak wink
 
but Riker's magic sand is still there ;-)
I mean, hydrophobic sand
 
Anonymous
@betseg Well the general idea of differential calculus is "how does this function change when we increment the argument by a very very very small amount?"
 
Anonymous
7:23 PM
Which leads to the limit formula for a derivative: f'(x) = lim[h -> 0] (f(x+h) - f(x))/h
 
Anonymous
Now, if you try to set h = 0 right away, you're dividing by 0 and that's bad (citation needed)
 
Anonymous
But if you expand the numerator with the actual function, you can do fancy math to get rid of the h in the denominator, which allows you to set h = 0 and get a meaningful result.
 
What's the size limit on answers? 10KiB? I can't seem to find a reference for it anywhere.
 
Try and see?
 
@AdmBorkBork 30000 characters.
 
7:25 PM
A way to display literal tabs using markdown has been found!
0
A: Stop expanding tabs into four spaces

mbomb007Today, I found an answer displaying tabs correctly! This is how to do it: &#9; Note that this only works if you put the code within a <pre><code> block, which means you also have to escape < with &lt;, so it's still annoying, but if you do a find/replace on your code, you can make it work. If...

 
@Dennis Thanks.
 
@mbomb007 TIO's been doing this?
 
Anonymous
@AdmBorkBork If you need more than the 30k character limit allows, this snippet I created should help
 
@mbomb007 TIO does that automatically for you if you use the automagical clipboard tool.
 
@Mego oh cool
 
7:26 PM
I never use TIO's formatting.
 
Anonymous
@betseg Try it with f(x) = x^2
 
Anyways, it's still worth posting on meta
@Dennis I don't like how it formats the answers.
Like the hyperlinks, or the "Try it Online!" link
So I do everything manually
 
Then just copy the part you want. Still useful if you have unprintables, lines of whitespace, leading or trailing newlines, etc.
 
@Mego But is that behavior expected and well defined? It makes sense, (with the modulus) I'm just wondering if it's ok to rely on
 
I indent my code with literal tabs in markdown.
I'd have to redo it all.
 
7:28 PM
Click the textarea with the PPCG answer and just select that you want.
 
Like I said, I do it all manually, because I do it all differently.
 
@Mego I can't use paper or one of my hands to try it :/
 
Suit yourself.
 
Anonymous
@DJMcMayhem Nope, it's UB. That's just how gcc usually deals with over/underflow, but you can't rely on it.
 
Anonymous
7:30 PM
For a code golf answer it's fine, of course, but if you do that in production code, the ghost of DMR will haunt you and switch all your spaces to tabs (even the ones that aren't for indenting!)
 
DMR = data-mining robots?
 
@DJMcMayhem I'm not sure if C++ is different here, but casts to int are never UB in C.
 
Dread Mbomb007 Robinson?
 
Anonymous
@Dennis It's not the cast to int that's the problem. It's the downcast from int to char.
 
Anonymous
 
@Mego Still not UB.
 
Ruby people: If I pass a script -f and foobar as CLAs, will ARGF be just foobar or will it try to read a file called -f?
 
Implementation-defined, yes. Undefined, no.
 
Anonymous
Ah, that's what I was mixing up
 
Anonymous
So gcc will do that consistently, but there's no guarantee other compilers will do the same
 
7:33 PM
It's usually pretty hard to avoid implementation-defined behavior though.
 
Wait, so implementation defined == reliable if you stick with the same compiler, undefined == anything can happen?
 
@Pavel my experience is with Kernel#gets, but you better remove -f from ARGV
 
Anonymous
Basically yeah
 
It's interesting that down casting doesn't cause any warnings, but directly assigning from 300 does
 
@JanDvorak What's Kernel#gets?
 
7:35 PM
@Pavel The one that you normally call when you use gets in your code
 
oic
I'm new to Ruby.
 
@DJMcMayhem Undefined behavior is the source of all evil. The compiler is allowed to assume it will never happen and may do the weirdest and most unexpected things instead of what you're relying on. Implementation-defined behavior is a) documented and b) guaranteed to produce a somehow reasonable result (which might not be at all what you intended).
 
CMC: Guess what this will print (c++ gcc) without running it:
char c = 200;
std::cout << (int) c;
 
I'd say 200
 
I'd guess UB. If it was 200 you wouldn't be asking.
 
Anonymous
7:37 PM
You're better off explicitly doing the downcast as char c = (i % (CHAR_MAX + 1));
 
@JanDvorak not ub, but implementation defined
 
I'd say 200 too, although I'm not all that confident.
 
@DJMcMayhem That's not doing something goofy where you need (int) *c to get 200, right?
 
Anonymous
It's -56
 
7:38 PM
Those are signed, so -56.
(ninja'd)
 
Duh, signed chars of course!
 
Oh, I see
 
Anonymous
Signed chars are the weirdest thing. Thanks, ASCII.
 
I believe if(x+1<x) is undefined. It either gets optimized out and removed, or it triggers in that one case where x is 2^32-1.
 
@AdmBorkBork Nope, no pointer types, just POD
96
Q: Is char signed or unsigned by default?

C LearnerIn the book "Complete Reference of C" it is mentioned that char is by default unsigned. But I am trying to verify this with GCC as well as Visual Studio. It is taking it as signed by default. Which one is correct?

 
7:39 PM
@Mego what's the diff?
between signed and not
 
Unsigned can't be negative.
 
Unless it's always negative.
 
The sign is referring to the negative sign -
But ^^ is really uncommon.
 
but what's that do to a char?
@betseg y'know how everybody says precalc is evil, boring, or just plain useless?
calc appears to be worse
@Mego ohhhhh
 
@DJMcMayhem pretty sure you get the same thing in java if you typecast to byte instead of int
 
7:44 PM
Nah I enjoy precalc
 
@JanDvorak that makes sense too much mego's is a tad cleaner IMO
 
Calculations r fun
 
@betseg O_O
wot
calls mental hospital
 
;_;
 
I prefer my hospitals sane.
 
7:45 PM
@mınxomaτ no, it's a psychic hospital
the hospital reads your mind and tells you what you need
 
@Riker Welp then I'm in the wrong hospital
 
Reminds me of that Dr. Who episode.
 
> calling Doctor Who Dr. Who
 
^
 
Who, MD
 
7:46 PM
@flawr also lol at the vote tooltips for r/latestagecapitalism, "This post aided me on my personal journey to wealth and happiness" and "this post is unprofitable and thus useless"
 
@mınxomaτ m8.
 
@mınxomaτ reminds me of monk a bit
@mınxomaτ which one?
the pirate hospital ghost, the one with cat people, or the one with rhino people on the moon?
 
@Riker Calc is awesome
 
The one with the aggressively kind robots.
 
@AdmBorkBork it's worse at the beginning then
@mınxomaτ "this is a kindness"
 
7:48 PM
What about post-modern Nu-Calc
 
_tries to stab with needle"
@mınxomaτ nuka-calca?
 
@Riker Oooh that episode
 
Answering a question on the AP Calculus test without using Calculus is also awesome.
Apr 29 '16 at 19:32, by TimmyD
@QPaysTaxes This was something blazingly simple, like given a water tower of diameter X and height Y, with an output spigot that can release Z cubic feet per second, how long does it take to empty the tower?
 
@betseg "Appalapachia. Voted number two planet in the top ten greatest destinations for the discerning intergalactic traveler."
 
@Riker I was referring to this: what-if.xkcd.com/imgs/a/156/setup.png
 
7:49 PM
lol
oh yeah, I forgot you used to work there
 
Btw did you watch the first episode of series 10 of doctor who
 
Is there anyway to expand this question to include other languages?
0
A: Sandbox for Proposed Challenges

Wheat WizardAre these lists equal? As you may very well know python has lists. As you might not know these lists can contain themselves. a = [] a.append(a) Python 2 Python 3 These are cool, however you cannot compare them. a = [] a.append(a) b = [] b.append(b) a == b Python 2 Python 3 Task You...

 
@Riker Not anymore, for quite some time now.
@betseg Is this the new series? Is it out already?
 
Yep
 
@mınxomaτ ah, okay
@betseg not yet >:U
@mınxomaτ came out on the 15th, 18th is today
@WheatWizard ... why can't you?
 
7:54 PM
opens Terrarium
 
oh, what the hell is wrong with python?
 
@Riker Why can't I what?
 
compare lists
but I just tried the examples
O_o
 
The call is recursive so it hits the recursion depth
 
yeah, I see that now
@downgoat sigh the backup finally hit "cleaning up old backups" >:U
 
7:58 PM
I see you're really into that emoticon? :V
 
>:V
 
Angry laughing emoticon? Wow
 
That's clearly an angry duck
 
[•_•]
That's me
(im an android, that's a robot, same thing)
 
lol
@mınxomaτ yes
 
8:15 PM
% irb
[irb(main):001:0> [1, 2, 3] == [1, 2]
=> false
irb(main):002:0> [1, 2, 3] == [1, 2, 3]
=> true
irb(main):003:0> [1, 2, 3, [4, 5]] == [1, 2, 3]
=> false
irb(main):004:0> [1, 2, 3, [4, 5]] == [1, 2, 3, [4, 5]]
=> true
irb(main):005:0> [1, 2, 3, [4, 5]] == [1, 2, 3, [4, 5, 6]]
=> false
list comparison in ruby is really easy
 
Anonymous
> [1,2,3]==[1,2,3]
false
5
 
Anonymous
Hooray for JS
 
Anonymous
The pinnacle of progress
 
CMP: What is your download speed
 
why's that again?
 
8:17 PM
@TuxCopter CMP?
 
Anonymous
@Riker Compare by reference
 
@Mendeleev Chat Mini Poll
 
@Mego ah yea
 
@TuxCopter at home, 225, here, about 40
 
@Mego The solution is to add more JS. Probably even transpiling Ruby to JS.
 
8:17 PM
@Mego Yet "\t\n \v\f" == false is true.
 
at school, about 350
 
@TuxCopter 75 mbs
 
> transpiling ruby to js
 
Anonymous
> The pinnacle of progress
 
@Dennis wtf
 
8:18 PM
Check out emscripten version of mruby
@Dennis waaaaaat.
 
@Mendeleev 225 mbs?
 
Anonymous
@Riker It's a clustercluck of implicit casting and weird truthiness rules with strings
 
Mar 24 at 12:36, by ETHproductions
Well, INF < [], [] < [1], [1] < INF
 
@Riker yeah
 
why?
 
8:18 PM
Hooray for PHP ^^^
 
why do you need that fast internet?
 
@TuxCopter 100kbps :/
 
@Riker Define fast
 
google rates mine, 75 mbs as "very fast"
 
@TuxCopter 40 Mbps on LTE, 10 Mbps on DSL
 
8:19 PM
and it's enough to handle 3 computers and a tv running stuff all at once
 
Can you download ESXi in 12 seconds?
 
@Dennis wow
 
@Mendeleev I can download win10 iso in 5 minutes?
 
@Riker size? 5gb?
 
reads as 12 for me
> 12.43 gb
 
8:21 PM
12 gb? wat
that is not an iso
 
I don't have to download, I keep a copy of every single MSDN-included software offline. That's only about 120GB
 
well
 
or it may be, but it would be pointless
 
> Win10_1607_N_English_x64.iso
 
wouldn't fit on a DVD. you would need to burn a blu-ray disc.
 
8:21 PM
> 12.43 gb
@Mendeleev don't need to, using bootcamp
 
Windows isos can't be put on flash drives
 
@TuxCopter At home, 150Mbps (nominally speaking). At work, around 50Mbps.
 
and I have a 16 gb usb
 
@Riker idk about that.
 
@Mendeleev That's just wrong.
Of course they can.
 
8:22 PM
how do you all have more than 10mbps
 
Huh.
 
what is your secret
 
@Mendeleev why wouldn't they be able to?
@TuxCopter 1st world countries :/
 
I didn't know that computers could start CD bootloaders from flashdrives
@Riker Isn't s/he in France?
 
yes (he btw)
 
8:22 PM
@Mendeleev Welcome to 2005 I guess.
 
idk
oh, I thought you were betseg
nvm
 
@mınxomaτ I've tried it a few times, never seemed to work
 
too small of a usb?
 
You've been doing it wrong. Which is an accomplishment in itself.
 
@Riker 64GB
 
8:23 PM
huh
 
@mınxomaτ I've just been doing cp Windows.iso /dev/sde which should work.
 
Not really, because it needs an NTFS boot flag.
You can use the MS Media Creation Tool, Windows USB Download Tool or even just Rufus.
 
And that's why it didn't work. Doing it wrong would be very easy then.
 
Anonymous
There are a million utilities for creating bootable flash drives from ISOs
 
^
 
8:25 PM
you also need to make sure that the flash drive is first in the boot order unless you're just going to select it manually
 
@mınxomaτ Those are all windows software. I don't use Windows. I only needed a flash drive to install it for someone.
 
literally google "how to copy windows iso to usb"
 
@Poke I know how to use the BIOS.
 
@Mendeleev Set the boot flag with (g)parted.
 
Anonymous
UNetbootin is pretty good and is cross-platform
 
8:26 PM
@Mego It's better in PowerShell. You can't use the inline -eq (you get nothing back), the .Equals() method returns False like JavaScript, so you use Compare-Object, which gives a special object back indicating which elements are only on which array, but if they're equal you need to -IncludeEqual else that also gives nothing back.
 
Anonymous
@AdmBorkBork More reason to burn PS to the ground and forbid MS from making programming languages that aren't C#
 
@mınxomaτ I ended up overwriting that flashdrive with a GRUB and two partitions, ext2 and btrfs. the ext2 partition holds lots of Linux, etc. ISOs and btrfs partition holds two full Linux installations (Arch and Ubuntu). With GRUB I can select any image to install or just boot one of my system images.
 
BTW Mono 5.0 is about to be released. It'll be a lot more compliant than previous versions.
 
@Mego That overwrites bootloaders with its own. I don't use it for that reason.
 
@mınxomaτ Yay, a huge update, full with dependants!
 
Anonymous
8:28 PM
@Mendeleev You can easily remove it and install GRUB
 
@Mego ...which completely bricks the ISO it wrote.
 
Anonymous
Completely false
 
@Mego If it's a windows ISO, yes. I don't know how Grub can start ntoskrnl
 
@betseg If you have a stdlib this comprehensive, stable and well-documented, I don't care about the size.
 
or whatever it does
 
8:30 PM
hi
 
o/
 
@Mego A USB hard drive with built-in ISO loader is better yet.
 
Anonymous
root(hd0,0)
makeactive
chainloader + 1
boot
 
@AdmBorkBork Which is basically what I set up with GRUB, except that I have to add menu entries manually.
 
Anonymous
@Mendeleev The above is how GRUB boots Windows (chainloader defers to the Windows boot kernel)
 
8:32 PM
I ended up burning a DVD anyway, because I couldn't use the MCT and I didn't think of the possibility of using GRUB.
 
@AdmBorkBork on answer chaining Fibb I want to answer but I won't win if I do...
(it will leave about 0 chance as people are not posting)
 
at this point I'm lost regarding the iso discussion
all I know is I trust mego and minx when it comes to techy stuff
so imma just take their word for it
 
@Mego Well, but arrays in PowerShell can do other things. Like, feeding an array into a Switch statement executes the switch on each individual element. Or <array> -gt <scalar> returns an array of the elements that are individually greater than the scalar.
 
Just like APL
 
@Riker Aww. /sadface
 
8:34 PM
well I trust you too
you're just harder to spot
 
@AdmBorkBork should I answer the answer chaining or not? It is a hard choice
 
do it
you might inspire others to answer
 
but the chance to not win. I have yet to win a challenge and I kinda want to
 
@DownChristopher Well, I'd say go for it. It's already seemingly stopped, so at the least you'll get some updoots. For reference, I don't accept answers anymore (like many other high-rep users), and "accepting" an answer makes less sense for an answer-chaining anyway.
 
:(
 
8:38 PM
@AdmBorkBork Oh ok. But acceptation was so close I thougt... RIP
 
Why did you link your questions tab?
 
Showing that I don't place an accept any more.
 
@Doorknob @Riker @Downgoat @allothervimusers: Vim riddle: What sequence of normal mode commands can you call so that the dot command repeatedly '.' moves the cursor instead of changing the text in the buffer?
 
8:40 PM
Or in other words, can you make . repeat a motion instead of an operator?
 
I've come around to the belief that accepting answers on PPCG does more harm than good.
 
@DJMcMayhem googles how does . work in vim
 
(And by normal mode commands, I mean that :nnoremap . w or similar workarounds are not allowed)
 
@DJMcMayhem no iirc
 
@DJMcMayhem aww
 
8:41 PM
hold on, let me find a SO post I starred
> But it does not include:

> All move and display commands (too numerous to be listed here)
 
But there is a solution. :P
(Otherwise I wouldn't have pinged y'all)
 
@DJMcMayhem I don't want to solve because I wasn't pinged
 
@betseg Hey, I've got a riddle for you!
3 mins ago, by DJMcMayhem
@Doorknob @Riker @Downgoat @allothervimusers: Vim riddle: What sequence of normal mode commands can you call so that the dot command repeatedly '.' moves the cursor instead of changing the text in the buffer?
 
@AdmBorkBork How so?
 
8:43 PM
@DownChristopher For further reference, Martin doesn't, xnor doesn't, Helka doesn't, Doorknob doesn't, etc.
 
@mınxomaτ that's glorious
 
@DJMcMayhem oh, I can't try anything in vim rn
 
@AdmBorkBork Discourages further answers?
 
@DownChristopher Correct.
 
@AdmBorkBork Add stipulation that shorter answers will be accepted.
 
Neither have I
 
And BTW, cheap workarounds such as i:nnoremap . w<esc>dd@: are not allowed either. I mean no ex commands in any format
 
@Mego Yes, you were included in my "etc."
 
Anonymous
Just pointing it out :P
 
I think that Dennis is one of the only high-rep users still accepting.
2
 
8:46 PM
I stopped too
 
@AdmBorkBork Go Dennis!
 
I haven't accepted any answers on PPCG before this year.
 
(probably because he likes the +2 rep it gives him ... gotta catch Martin somehow. :D)
10
 
Anonymous
@ComradeSparklePony That's because you didn't have an account before this year :P
 
@ComradeSparklePony you weren't on ppcg before this year ;p
ninja'ed
 
8:54 PM
user image
3
 
lol
 

« first day (2271 days earlier)      last day (2574 days later) »