Search found 8004 matches

by phlip
Wed Sep 14, 2016 6:06 am UTC
Forum: News & Articles
Topic: Police misbehavior thread
Replies: 6429
Views: 937075

Re: Police misbehavior thread

I had a double-take before I realised they didn't mean 57 gigadollars...
by phlip
Wed Sep 07, 2016 2:26 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Sure, that lets you find the .bar elements that are children of any .foo elements. But how to find the .bar elements that are children of a specific .foo element? Specifically, the one I have in this variable here? There's Element.querySelector when you're looking specifically for descendants, but n...
by phlip
Wed Sep 07, 2016 1:53 pm UTC
Forum: General
Topic: The "I can't find a particular XKCD comic" thread
Replies: 158
Views: 103809

Re: The "I can't find a particular XKCD comic" thread

I'mOkWithThis.jpg
by phlip
Wed Sep 07, 2016 7:05 am UTC
Forum: General
Topic: The "I can't find a particular XKCD comic" thread
Replies: 158
Views: 103809

Re: The "I can't find a particular XKCD comic" thread

I don't think there's anyone I know who tells stories like the first panel of that one...
by phlip
Wed Sep 07, 2016 12:00 am UTC
Forum: General
Topic: Thoughts for ships
Replies: 90033
Views: 7921394

Re: Random natterings

A significant number of my aborted posts are when I'm replying to a thread to add extra detail or context, or clarify something someone else already posted... and then I read it back when I'm done and I realise I haven't actually added anything, everything I've said is already covered in the previou...
by phlip
Fri Sep 02, 2016 5:03 pm UTC
Forum: Mathematics
Topic: Math: Fleeting Thoughts
Replies: 382
Views: 123016

Re: Math: Fleeting Thoughts

I'm not sure how spoilery this suggestion is compared to what you want, so I've broken it up into two... When I'm working on this sort of thing, I'll usually work backwards from the solution, rather than forward from the question... asking not "what can I construct from what I have?&quo...
by phlip
Wed Aug 17, 2016 11:49 am UTC
Forum: Coding
Topic: Python - Is this an anti-pattern for yield keyword?
Replies: 5
Views: 4630

Re: Python - Is this an anti-pattern for yield keyword?

Which is why I prefer to use @contextmanager rather than trying to remember exactly how __enter__ and __exit__ work when writing these things...
by phlip
Wed Aug 17, 2016 8:03 am UTC
Forum: News & Articles
Topic: Police misbehavior thread
Replies: 6429
Views: 937075

Re: Police misbehavior thread

"But in light of that, this is a positive story. … This case is a prime example of how things should be done."
by phlip
Mon Aug 15, 2016 1:24 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Out of curiosity... are the files actually different?

Code: Select all

md5sum VoidRewardParser/Localization/German.txt
git show HEAD:VoidRewardParser/Localization/German.txt | md5sum
And what does a "git diff" from the command line say?
by phlip
Wed Aug 10, 2016 11:34 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Flumble wrote:
Are you implying I have a bad taste in porn?! :o

I'm more intrigued by your porn-viewing sessions that last in the order of weeks...
by phlip
Sun Aug 07, 2016 8:10 am UTC
Forum: The Help Desk
Topic: Wanted: "Layered/tiered" password manager
Replies: 15
Views: 8350

Re: Wanted: "Layered/tiered" password manager

For Google Authenticator (and other TOTP apps), it doesn't need any Internet connection to work... as long as you connect to it for long enough for it to sync the clock on your phone every now and again (because if the clock on your phone is out by more than a minute or so, depending on what you're ...
by phlip
Thu Aug 04, 2016 1:03 am UTC
Forum: Site/Forum issues
Topic: 1663
Replies: 1
Views: 3386

Re: 1663

We have a thread for this already.

Short version: don't use HTTPS for this one. http://xkcd.com/1663/ works.
by phlip
Fri Jul 22, 2016 2:49 pm UTC
Forum: News & Articles
Topic: Police misbehavior thread
Replies: 6429
Views: 937075

Re: Police misbehavior thread

Say you were in a situation where there were two people, and you thought one was a threat. Even putting aside how ridiculous it is to think that, let's grant that for the sake of argument. You fire three shots at them... two miss, and one hits the wrong guy. What's the chain of logic from there to h...
by phlip
Mon Jul 18, 2016 4:42 am UTC
Forum: Coding
Topic: How do you manage Python dependencies?
Replies: 8
Views: 4876

Re: How do you manage Python dependencies?

I believe this is the traditional method.

The short version: list the requirements in a text file called requirements.txt, one per line. Then people can run "pip install -r requirements.txt" and grab everything.
by phlip
Wed Jul 13, 2016 3:48 pm UTC
Forum: General
Topic: XKCD, where they talk shit about you in a secret subforum
Replies: 150
Views: 28588

Re: XKCD, where they talk shit about you in a secret subforum

↶ Not yet gotten around to joining in, and it seems wrong to leap in after this public 'announcement' likely draws in other non-members to apply. Not saying this to argue with you, but just as an FYI for others reading the thread: it's not so much an application as it is an opting-in... maybe it wa...
by phlip
Thu Jun 23, 2016 5:00 am UTC
Forum: Coding
Topic: Good books for learning to create proxy servers?
Replies: 18
Views: 8110

Re: Good books for learning to create proxy servers?

Yeah, you're being incredibly cagey with what you're actually trying to do... We're not going to just sit here and help you try vainly not to get caught at whatever nonsense you're planning to get up to. I highly recommend either explaining what you're trying to do, if it's legitimate, or just leav...
by phlip
Wed Jun 15, 2016 1:01 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

↶ Python's operators seem particularly bizarre to me... [...] The only rhyme or reason here seems to be sgn(a%b)==sgn(b) . But what's the point of that? That's the usual div/mod definition... The point is that, for b > 0 you can always say 0 <= a%b < b. Which makes modular arithmetic a lot easier. ...
by phlip
Fri Jun 10, 2016 12:14 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Yeah, there used to be this thing where if you clicked a link and then clicked back to return to the results, there'd be a couple of options underneath the search result, one of which was "stop showing results from w3schools.com", which applied until your preferences cookie expired (or unt...
by phlip
Thu Jun 09, 2016 11:19 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Once upon a time, Google had an option to hide results from domains of your choice, so you could hide w3schools results and be at peace. But they removed that option years ago.
by phlip
Tue Jun 07, 2016 7:45 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

↶ The following code turns std::vector into a Functor: template<typename X, typename G> std::vector<std::result_of_t<G(X)>> fmap(G g, const std::vector<X> &m) { std::vector<std::result_of_t<G(X)>> r; std::transform(m.begin(), m.end(), std::inserter(r, r.begin())); return r; } I'm not super fami...
by phlip
Tue May 24, 2016 12:02 pm UTC
Forum: School
Topic: Forum Migration
Replies: 412
Views: 759960

Re: Forum Migration

↶ It may be that that's specifically hardcoded into phpBB and not available for custom bbcodes, though. That one. The built-in tags are handled by a bunch of overcomplicated spaghetti code deep in the bowels of phpBB. The custom tags are just turned into regex search/replaces. This is why, for exam...
by phlip
Fri May 13, 2016 1:59 pm UTC
Forum: Coding
Topic: arithmetic on functions in haskell
Replies: 4
Views: 4026

Re: arithmetic on functions in haskell

Others have pointed out ways of doing a more fundamental rearranging of the code, but I will point out that this:
>-) wrote:

Code: Select all

bar op f g x = op (f x) (g x)
is liftA2 (or, alternatively, liftM2).
by phlip
Wed May 11, 2016 5:26 am UTC
Forum: General
Topic: The "I can't find a particular XKCD comic" thread
Replies: 158
Views: 103809

Re: The "I can't find a particular XKCD comic" thread

FreshPrinceofXKCD wrote:
it was definitely an xkcd comic.

Bet you five bucks it isn't.
by phlip
Sun May 08, 2016 12:28 pm UTC
Forum: School
Topic: Forum Migration
Replies: 412
Views: 759960

Re: Forum Migration

Hold up, load of BBCode suggestions comin' through, most of which are from my own forum. Hmm... [box], [float], [font], [hr] - Sure, I guess? Not sure I see the use-case, but I'm sure people would find one. Though, for [float] especially, I'm sure the potential for messing up the board layout by mi...
by phlip
Fri May 06, 2016 6:49 am UTC
Forum: School
Topic: Forum Migration
Replies: 412
Views: 759960

Re: Forum Migration

Huh. Pretty sure last time I used Chrome it worked like that, but that was a long time ago. Good to know.
by phlip
Thu May 05, 2016 10:35 am UTC
Forum: School
Topic: Forum Migration
Replies: 412
Views: 759960

Re: Forum Migration

↶ It's always been a little choppy with many or slow-loading images on a page. Once it's all loaded (and thrown the view out of place), select the address bar and hit enter, and you should be back at the intended post. Wouldn't that just jump to the top of the next page (or the current page, if it'...
by phlip
Thu May 05, 2016 1:02 am UTC
Forum: Computer Science
Topic: Fleeting Thoughts (CS Edition)
Replies: 99
Views: 66540

Re: Fleeting Thoughts (CS Edition)

To preempt the inevitable question in the comments section: yes, we did run these Turing machines for a while, and no, none of them had halted after a day or so. But before you interpret that as evidence in favor of Goldbach, Riemann, and the consistency of ZFC, you should probably know that a Turi...
by phlip
Fri Apr 29, 2016 6:34 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Man, been a while since I found an actual dangling else in real production code.

I haven't missed it.
by phlip
Fri Apr 22, 2016 1:48 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

↶ Interesting... I've never thought about how similar a function declaration and an object declaration are in C++. Huh, phlip's code is actually valid C++. Okay, sign me up for the C++ syntax hate club. Oh, that's far from the only ambiguity in C++, though it's probably the most fun simple exam...
by phlip
Fri Apr 22, 2016 6:17 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Code: Select all

struct A { A(int) {} };
int x;
typedef int y;

A foo(x), bar(y);
by phlip
Fri Apr 22, 2016 1:05 am UTC
Forum: Mathematics
Topic: Pi from the Menger Sponge
Replies: 9
Views: 4169

Re: Pi from the Menger Sponge

1 dimension works, but the sponge definition gets a bit degenerate... ↶ (specifically, remove any subhypercube that is in the middle third on at least two axes ) Since we don't have two axes, there are no intervals (hypocubes?) that are in the middle on at least two axes, so we never remove anything...
by phlip
Thu Apr 21, 2016 6:33 am UTC
Forum: Mathematics
Topic: Pi from the Menger Sponge
Replies: 9
Views: 4169

Re: Pi from the Menger Sponge

Yeah, I tried coming at it from a similar angle... but that addition inside the product term makes manipulating the product complicated, and the fact that "n" makes an appearance as a multiplicand, rather than just exponents, makes inducting on it also complicated...
by phlip
Wed Apr 13, 2016 12:19 pm UTC
Forum: Mathematics
Topic: Pi from the Menger Sponge
Replies: 9
Views: 4169

Pi from the Menger Sponge

Time for some completely-useless recreational number-crunching... So, I was watching this YouTube video about pi and the Sierpinski Carpet/Menger Sponge , which talks about this interesting fact: Say you build a Sierpinski Carpet, starting with a 2x2 square, but instead of always cutting the square ...
by phlip
Sun Apr 10, 2016 11:25 pm UTC
Forum: Religious Wars
Topic: Is 1 prime?
Replies: 30
Views: 17328

Re: Is 1 prime?

↶ You need to allow negative primes in order to appropriately generalize the concept of prime to rings which don't have a notion of "positive" and "negative". But you still need some restriction there, or you have (-2)*(-3) = 2*3, and 6 no longer has a unique prime factorisation...
by phlip
Sun Apr 10, 2016 9:11 am UTC
Forum: Religious Wars
Topic: Is 1 prime?
Replies: 30
Views: 17328

Re: Is 1 prime?

↶ They define a prime number as "a number that can only be exactly divided by itself and by 1". By this very official declaration by THE official source, I conclude that 1 is considered prime since it can be divided exactly by itself and 1. But then, the primary examples of using language...
by phlip
Thu Apr 07, 2016 11:43 pm UTC
Forum: School
Topic: Forum Migration
Replies: 412
Views: 759960

Re: Forum Migration

The Snide Sniper wrote:
So if it's phpBB3 now, does that mean we can request new BBCodes?

It's been phpBB3 for many years. This upgrade was from 3.0 to 3.1.

Also: you can request things. Just don't necessarily expect that request to be fulfilled.
by phlip
Wed Apr 06, 2016 7:30 am UTC
Forum: The Help Desk
Topic: Diagnosing a Dead Dell Inspiron Touchpad
Replies: 9
Views: 6345

Re: Diagnosing a Dead Dell Inspiron Touchpad

Honestly, I think Occam's Razor is currently pointing towards something being broken in the hardware. Could be a broken connection, or it could just be dead. Seems more likely than software troubles at this point, given what you've tried so far...
by phlip
Wed Apr 06, 2016 12:18 am UTC
Forum: School
Topic: Forum Migration
Replies: 412
Views: 759960

Re: Forum Migration

mosc wrote:
so no chance for prosilver_left?
davean wrote:
You can all suggest themes from https://www.phpbb.com/customise/db/styles-2 or create a custom one for this board. Or use the 'Allan Style - SUBSILVER' option.
by phlip
Mon Apr 04, 2016 3:51 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9870
Views: 1777549

Re: Coding: Fleeting Thoughts

Had a fun one today... Daylight Savings just ended here, so yesterday had 25 hours, which confused a piece of code that added timedelta(days=1) to a datetime and assumed it would be the next day. It wasn't. This then flowed through to another piece of code which got confused and tried to schedule so...
by phlip
Fri Apr 01, 2016 2:20 pm UTC
Forum: School
Topic: Forum Migration
Replies: 412
Views: 759960

Re: Forum Migration

↶ In Chrome I see the favicon in incognito mode as well as when I do a hard refresh, so it's not a cache issue. I think Chrome is just way more aggressive about caching favicons than other things. Like, if I go into Incognito, and load up the forum page with the Network tab open, I can see it speci...

Go to advanced search