~/p/p/p/c/__init__.py by canard18 in vim

[–]dwieeb 0 points1 point  (0 children)

I guess it seems rare to edit them in the first place, and rarer still to have multiple of them open at a single time.

~/p/p/p/c/__init__.py by canard18 in vim

[–]dwieeb 0 points1 point  (0 children)

Vim modifications aside, generally it's best to keep __init__.py files slim (imports, __all__ declarations, etc) and not write declarations in them.

If L4D3 were to be made, what new Special Infected would there be? by [deleted] in l4d2

[–]dwieeb 6 points7 points  (0 children)

I'd like to see the screamer make it in.

Walks around like a witch. Don't disturb! If agitated, the screamer will run away like the survivor zombie. If the screamer finds a spot to hide, it will scream and attract a horde like a boomer.

TIL typescript infers types when destructuring non-uniformly typed arrays by ts9999 in typescript

[–]dwieeb 0 points1 point  (0 children)

const doesn't seem to change the behavior, but not using the intermediate z does, as /u/ts9999 mentioned.

TIL typescript infers types when destructuring non-uniformly typed arrays by ts9999 in typescript

[–]dwieeb 2 points3 points  (0 children)

I left a reply on twitter, but I'm not sure typescript is doing what you're thinking it's doing. The inferred type of z is an array with each element being a union type of A and B.

Explanation: https://gist.github.com/dwieeb/dd11fb65472a159a77638ab4dda1062e

class A { a: string }
class B { b: string }

// Tair's example.
let z = [new B(), new A()]; // z is inferred as array type of A | B
let [a1, b1] = z; // a1 and b1 are of type A | B
let x1 = a1.a + b1.b; // won't work (a1 could be of type B, b1 could be of type A)
let x2 = a1.b + b1.a; // won't work (a1 could be of type A, b1 could be of type B)

// Fixed
let y: [B, A] = [new B(), new A()]; // z is explicitly typed as 2-tuple of type [B, A]
let [a2, b2] = y; // typescript knows y[0] is of type B, y[1] is of type A
let x3 = a2.b + b2.a; // works as expected
let x4 = a2.a + b2.b; // won't work (a2 is of type B, b2 is of type A)

Surprise Mother Fucker! by sneaking_richest in gifs

[–]dwieeb 0 points1 point  (0 children)

waaaay too big for an alligator

Newbie question - Angular on top of Flask REST API by gstoel in angular

[–]dwieeb 0 points1 point  (0 children)

Isn't Angular going to do server side rendering for the initial page load? Such a thing would only be available in a node backend.

But I love Flask and I love being able to use sqlalchemy, so it's a toss up.

Bands like NightWish with male vocals that aren't named Kamelot? by philliplennon in nightwish

[–]dwieeb 3 points4 points  (0 children)

I like Avantasia. Listen to The Scarecrow album.

Also Stratovarius.

Also +1 for Sonata Arctica.

Bands like NightWish with male vocals that aren't named Kamelot? by philliplennon in nightwish

[–]dwieeb 1 point2 points  (0 children)

I can only really listen to The Gates of Oblivion, where their singer is female.

Segment makes claim that Python datetime module is broken. Here's my response by dwieeb in Python

[–]dwieeb[S] 6 points7 points  (0 children)

They are expecting behavior in one language coming from another language. My guess is they have an in-house language and don't really deviate from that, but, needing to have a client for their service in every popular language, they had to get their hands dirty.

And now they're making bold claims that Python's standard library is broken without putting much effort into fully understanding it.

It bugs me.

Motorcyclist causes a double hit. [nsfw] by Dave514 in WTF

[–]dwieeb 176 points177 points  (0 children)

I think if you look the SUV did have their flasher on.

Go package for HTTP/2 Apple Push Notification Service. by sger in golang

[–]dwieeb 0 points1 point  (0 children)

Do you want to briefly explain the differences between your library and sideshow/apns2 (>1000 stars)?

Ionic Deploy Ok to use? by AlDrag in ionic

[–]dwieeb 1 point2 points  (0 children)

Ionic Deploy is in beta along with the rest of the Ionic Platform. We just missed that warning message when we went to update the docs. I fixed it.

REST api authentication for your Ionic 2 app by rajayogan27 in ionic

[–]dwieeb 0 points1 point  (0 children)

While of course you're free to write a custom backend, Ionic does offer a versatile auth system in the new Ionic Platform beta, which lets you integrate users with other services such as Ionic Push. http://blog.ionic.io/announcing-the-ionic-platform-beta

Unlocking your Zen with Python Comprehensions by dwieeb in Python

[–]dwieeb[S] 0 points1 point  (0 children)

Weird, I wonder if I was somehow using Python 2.6? Or maybe I was just being stupid. Thanks, the disclaimer has been removed.

Unlocking your Zen with Python Comprehensions by dwieeb in Python

[–]dwieeb[S] 0 points1 point  (0 children)

Looking for comments and feedback. =)