« first day (2204 days earlier)      last day (2744 days later) » 

12:00 AM
9
A: Composing functions in python

pokedef compose (*functions): def inner(arg): for f in reversed(functions): arg = f(arg) return arg return inner Example: >>> def square (x): return x ** 2 >>> def increment (x): return x + 1 >>> def half (x): return x / 2 >>> composed =...

 
I guess if you call the function c then it's pretty compact
 
I've sniped myself with this whole subject. Maybe wim did...
 
That still doesn't solve the "when should we iterate" problem, but it's more compact than my class-based solution.
 
wim
J.F. Sebastian showed me this one-liner
compose = lambda *funcs: lambda x: reduce(lambda y, f: f(y), reversed(funcs), x)
 
ow stop that
 
wim
12:07 AM
it was in 2012, possible poke pinched his answer from that
anyway, I'm out ... L8R
 
me too, good night
 
user559633
@idjaw let me know if you find a good alternative to a macbook pro
 
@tristan dude.....so sad
Are we getting an XPS and slapping linux on it?
 
YEAH!
I've never had either, but that plan sounds great
 
user559633
12:22 AM
@idjaw Yeah, maybe, but the build quality is quite bad, last I saw.
 
user559633
I can't believe that the macbook pro didn't get the mobile nvidia gtx 1060
 
Chat fell apart for me. Avatars are missing, some of them. Refresh doesn't help.
this might be the universe telling me to go to sleep
 
user559633
Hah, wouldn't be the worst idea. G'night Andras
 
Oh I'll show that stupid universe:P
but I do have to get up tomorrow today
 
user559633
The OLED touchbar on that new macbook pro is a silly gimmick.
 
12:24 AM
so rhubarb:)
 
user559633
rb :)
 
@tristan I kinda lost my shit at the ports
 
user559633
Oh, you don't want to carry a handful of USB C->USB A, USB C to mini DP adapters?
 
Especially the one you're going to need for your iPhone
I love it. Apple to Apple still needs an adapter
c'est magnifique
 
user559633
I mean, at some point, I think we'll go from USB A to USB C, but I'd expect it to be a gradual thing like 2 usb C 1 usb A
 
12:28 AM
People plug their phones into their computers?
 
this is what I have been trying to express!
@KevinMGranger Absolutely
charging on the go
If my phone is running low you better believe I want to plug that thing in to charge
sometimes if for whatever reason I can't get a good connection when setting up a hotspot...I'll plug in as well
 
user559633
@KevinMGranger yeah, especially if you're on android (because maintainers do not care about usability) or want to charge your phone at work
 
Yeah but if you have a macbook, you probably have an iPhone. Those have batteries that actually last
ducks
 
user559633
Ha, you'll still want to plug it in. Is the iphone 6+ usb C?
 
nay
I think the only usbc devices are the macbook and pro
 
user559633
12:29 AM
Yeah, then that's surprising.
 
user559633
Oh wait. No more magsafe. Ouch
 
yeah....you know how great it was to have an adapter at work and home
and I can charge both air and pro devices?
 
user559633
I fail to see how this isn't a major step back to accommodate a smaller form factor that people don't care about. I think Apple has lost their charm under new leadership -- no one cares about an extra 200g or 1cm.
 
the weight is not different really either I don't think
 
user559633
They're getting into the tech spec and numbers game, which I think is a massive misstep.
 
user559633
12:37 AM
Macbook Pro: Operating altitude: tested up to 10,000 feet am I misunderstanding or is this considerably below cruising altitude on a commercial flight?
 
Was Apple really convinced in their hive that coming out with a laptop that wasn't necessarily thinner would have not been accepted by the general public?
Would it have killed them to maybe give one standard USB port?
ease the pain slowly
 
user559633
I don't know. They're also on yearly releases of iPhone, so I think they're overmilking their cash cows
 
user559633
Like the headphone jack -- definitely removed to accommodate a thinner profile, but I don't think people would make that tradeoff.
 
Wait a minute....@tristan that sounds really weird....don't commercial flights go up to 35K feet usually?
 
user559633
@idjaw Yeah, and the max shipping height...cargo planes go higher.
 
12:41 AM
@tristan well, just checked the 2015 specs: apple.com/ca/macbook-pro/specs-2015
 
and I've definitely taken my laptop on an airplane a few times and used it without any problems.
 
user559633
That's weird. Yeah, I think that's why they said "tested up to", so maybe that's legal-speak for "we ran X battery of tests on it?"
 
and they can get off the hook for any shenanigans that might happen that high
well sorry...our specs clearly state: X Y Z
 
user559633
Like the battery having issues :)
 
user559633
12:44 AM
Funny that the shipping altitude is low as well -- as if they have special "apple low-altitude shipping flights"
 
sorry, have to be nosy before going to sleep
altitude isn't evident in the cabin, because it's pressurized
this could only be an issue in the cargo bay or whatsitsname
and if you don't put your laptop into your carry-on luggage, you're already in for a gamble
 
user559633
so it's proxy for atm?
 
beg your pardon?:)
 
 
user559633
@AndrasDeak atmospheric units for pressure
 
12:47 AM
@tristan the "atm" part was the only bit that I understood:D
 
hey, Andras. I can make a deal with you. When it gets to a certain time of the night when you really want to go to bed and you're still online, I can kick you to help motivate you to bed :P
 
Antti would be proud:P
 
user559633
@AndrasDeak oh, I meant so they don't confuse the nice, normal people, even though it confuses nerds
 
@tristan ah. Yes:D
 
user559633
@idjaw kicking pings & notifies all the room owners. at some point it also notifies 10k+ users and site moderators.
 
12:49 AM
it does? 10k, I mean
 
jeeeeez. I just keep finding out more and more of these rules
:P
 
user559633
@AndrasDeak yurp :) oh sorry that's flags. ignore me.
 
never seen that:)
I knew about the auto mod-flag, though
@tristan no, I won't:P
anyway, I'm totes leaving now
 
user559633
@idjaw yeah, if you boot someone as a RO, there's a chance you need to have a boring chat about why you did it after
 
he told me too.. Seriously. He wouldn't go to bed. In this situation, I was being a bro. For real, yo
 
12:50 AM
(the usual Columbo-esque returns I make are usually after taking a shower, right before actually going to sleep)
 
It would really improve my morning efficiency if I showered the night before
 
user559633
moderation of room/6 is "on point", so i imagine moderators just assume we did it for good reason
 
and if they see Andras on the receiving end, they definitely won't ask questions :P
<3
 
yeah, I'm on the blacklist
Jon, Martijn and Madara will definitely know I had it coming:P
 
user559633
i took a bath earlier today, got out, and felt weirdly okay. like, i didn't feel anxious or mildly sick. it then occurred to me that's what "relaxed" feels like
 
12:52 AM
take care, guys \o
 
user559633
night
 
later Andras :) Have a great night, man
@tristan dude......yeah. =/
btw...one last thing about the macbook. Canada got it bad....2299$ for the 13"
 
user559633
Haha, what. At least you're close to the border
 
huge price hike + extra for definite adapter purchasing
++
 
user559633
canada's power outlets are the same as in the USA, no?
 
12:56 AM
yes
I absolutely can go to the states to get one and it would not make a difference
 
user559633
OH. I understand. Additional
 
how much is in the US?
 
user559633
 
1799 USD
ouch
2408.23 CAD conversion
jeez
wtf Apple
 
user559633
 
user559633
12:59 AM
Spot the problem.
 
Are we talking about this
Oh, that's why. Interesting.
 
user559633
Yes, we're finally talking about this
 
I want to get this...I really want to. But I'm not getting it.
I feel like there is something up with the font?
 
user559633
Joke that I'm the problem and that we're finally not ignoring the elephant in the room
 
1:01 AM
^ just look at that idjaw
 
user559633
@idjaw I think this is what happens when you decide that designers should call the shots. Customers don't care about your ~~design film~~ or the ~~vision~~.
 
Elephant in the room? Save that for chat.stackoverflow.com/rooms/11/php
 
why did I click on that....
ah yeah...the vision...the courage....the struggle....
La Pomme: Version Professionelle
 
user559633
Designers help shape the feel of the product and sand off the engineering "technically it's better this way", and if you let them go crazy, they'll take your escape key and give you renders of a laptop that reflects creativity and ignores realities.
 
I can't think of the last time I used my escape key, and I use vim.
 
user559633
1:04 AM
How I, and everyone else I've watched, adjust volume on their macbook: "feel top right of keyboard, slide over and press button"
 
user559633
When was the last time you used the function keys?
 
other than volume, and pausing video?
 
To adjust volume? Just right now. And I had to look
 
user559633
I have esc mapped to capslock, so losing esc isn't a big deal for me, but losing a row of inputs does matter for me.
 
user559633
I also hate touchscreens, so maybe it's just not for me.
 
1:06 AM
^^
 
The only thing i use function keys for aside from whatever my laptop manufacturer decided they also do was to switch ttys.
I know I switched tenses like 5 times there but whatever
 
do what you want, I'm not your real dad. (did I do that right?)
 
user559633
Great article on why i dislike touch screens (not exhaustive): A Brief Rant on the Future of Interaction Design
 
Oh I completely agree. I hope for a future where e-ink displays can have raised bumps behind them.
 
user559633
I was really hoping for oled key caps and not another screen.
 
user559633
1:09 AM
If the surface is where you are meant to look a thing, requiring a user to use their hand on it is antithetical to the aim.
 
Yeah but if you got OLED keys you cant swipe to lower your volume and fast forward through movies
you just aren't thinking big picture here, tristan.
 
user559633
Oh yeah, this will come in handy the 0 seconds a year I'm in final cut pro.
 
Or rather, they better have really good aim
Didn't they butcher final cut pro anyway :/
 
> claiming that Pictures Under Glass is the future of interaction is like claiming that black-and-white is the future of photography.
 
They're just trying to toy with partial touch input on a macbook before going full surface.
The future of interaction is VR, haven't you seen?
 
user559633
1:11 AM
I think they'll use a lot of users if they go full surface.
 
Ah yes, the users are used. A favorite term of Stallman's.
 
user559633
I think Apple has greatly benefitted from highly-productive, technical people using their hardware over the past ten years, and if culture stops seeing people in tech and business using Apple hardware, it will encourage a shift away from the prosumers and consumers.
 
user559633
Oh, I'm not talking about freedoms or corporate manipulation of users or anything, I'm talking in ownership of machines (in so far as you even own your own computer anymore)
 
yep. Well, this is the second laptop Apple introduced that our entire department rejected
I'm sure other dev departments feel the same way
 
user559633
It does have a headphone jack, correct?
 
1:16 AM
I was actually surprised it did.
 
Why? They don't need to save space on the laptop.
 
user559633
You could ask the same question about why not include usb A headers
 
Well, you've kinda got me there
 
user559633
magsafe has saved my laptop twice this year -- and that's just counting times i remember. three. a child ran into the power cord while i was charging it at an airport
 
user559633
brb, wine run
 
1:22 AM
They should have stuck with magsafe, that I agree with. If they wanted ubiquitous charging everywhere they should have just made a magsafe spec :/
 
hi @LESANG Weclome.
 
Images are back! tristan is a helmeted pea again!
 
@tristan wife and I are having some tonight and are having this which taste amazing - Riserva Cannonau di Sardegna 2012
 
user559633
1:42 AM
@idjaw I'll look for it next time. The wine/beer store near me doesn't work with distributors that carry my regular brand recognitions
 
user559633
@KevinMGranger Or if they want to go USB-C for everything, maybe have it magnetic at some point in the cord?
 
What do we do for an OP that has posted the same question masked as a different question just minutes apart?
 
user559633
close as dupe of the other if it's the same question
 
DSM
I'd like some wine too, but instead I have ctypes to play with. :-/
 
user559633
:( Doing anything fun?
 
DSM
1:50 AM
Naw, just writing some interface code. We have a c++ api which is a little hairy, and definitely no fun to write business logic in. So I'm writing a wrapper to make the rest easier.
 
user559633
Oh cool.
 
that's pretty cool
 
DSM
Then I definitely didn't describe it right. :-P
 
user559633
Or we just have a sick sense of what's fun/cool
 
user559633
I'm off. Have a good night
 
DSM
1:55 AM
Evening rhubarb.
 
rbrb @tristan
sick sense of what is fun. That's my vote
 
DSM
@idjaw: do you have a preferred pub/sub lib? I know some people like 0mq.. I like the ideas of wamp but have never used it in anything productiony.
 
@DSM I'm using rabbitMQ because it is what is used in the platform I'm using.
what is your use case?
 
DSM
So I have datastreams which I'm pulling and sending into a repository (probably two stages with an in-memory cache first). This datastore needs to be interact with other users in a few ways: some procedural calls with no real return value except an error code; some request/response calls; and some streams. I've been working on handling the data vendor's API, and that's now settling down, so I need to turn again to the interaction side of things.
I can always do something manual using sockets, and might still, but I'm undecided.
That's kind of what's pulling me towards autobahn, then I can use the same approach for the rpc and for the subscription.
 
2:14 AM
hmm...interesting. So, to be honest, I have not dabbled with autobahn. So I'm actually interested in knowing more about it. Give me a minute.
so just for the sake of sharing what I'm finding, I'll put it here. stackoverflow.com/a/20906271/1832539
oh wait that is very old
2014
nvm :)
hmm...this autobahn thing is interesting
 
DSM
This on WAMP gives a good high-level description.
 
2:29 AM
WAMP seems like it hits what you are trying to solve. So, autobahn is the Python implementation for this.
This is actually pretty interesting.
 
DSM
I experimented with it when I wanted to have some JS/Python interop a few years ago. Eventually we went in a different direction, but it's been lurking at the back of my mind for a while.
 
Here is a small view of a piece of how rabbitMQ looks like in one of the components of the stack we use
 
omg, now that is bad.
she's the exact opposite of AW, I haven't heard anything from her in years.
 
@DSM sorry, I just realized that was a very vague diagram that didn't show much.
 
DSM
I can follow arrows, at least. :-)
 
2:41 AM
hehe
 
(^she didn't even really desire to become miss Finland she told in an interview)
 
DSM
NHL; NFL; CFL; NBA; NCAA FB; and the World Series. Hell, even MLS postseason, and LargeCanadianCity's team is in play. How am I supposed to get any work done?
 
@DSM on the same day?
 
@DSM I know man...I know....
it's rough
well, thanks a lot DSM....I'm now looking at rabbitmq internals
I think purely on fun and the fact I've never used it, I think you should mess around with autobahn :P
along with some wonderful code: rabbitmq.com/releases/rabbitmq-server/v2.3.1
 
ah and using rabbitmq here
 
2:48 AM
DSM is trying to chose a message broker
 
ah and for python framework, I'd recommend Asphalt,
 
DSM
@AnttiHaapala: over the last few years some of the sports are bleeding into other days, so it's easy to be swamped. :-(
 
not that I've used it
 
@idjaw eeeeeeeee
(I don't know how complete Asphalt is for your use case yet, but Alex needs more users)
seems that asphalt-wamp docs are work in progress asphalt-wamp.readthedocs.io/en/latest
(it was just a epic, not legendary :D)
 
3:07 AM
@AnttiHaapala do you agree with that java sentinel dupe?
 
just reopened
 
ok good thanks
I actually can't find an explicit iter example
 
I am writing an answer
 
yeah I noticed
that's why I pinged
sent a response to that in other place :P
 
@Ffisegydd You were totally right about Westworld. Just started EP3 and I love it.
 
3:09 AM
@AnttiHaapala what do you think of this as a helper to explain how iter is used with second argument: stackoverflow.com/questions/19728330/…
@AnttiHaapala
If @Antti hadn't nuked my dupe target, you would have an answer to exactly that. I'm not sure why he did that. — TigerhawkT3 1 min ago
 
hmm
"I am not sure why he did that"
are we reading the same question
 
DSM
Headache means time to sleep. rhubarb for all!
 
@DSM night.
@AnttiHaapala now that's a good iter answer.
if that question can get cleaned up, it could be a good canon dupe for how iter works
 
3:28 AM
I lost the java answer
 
it's in the comments
@AnttiHaapala so far this is the only one that I can find that is relevant: stackoverflow.com/questions/33709805/…
 
yeah
I added the tigerhawk link there
the problem is that people will google for any code there in the q and they'll be redirected to "sentinel is no particular value, just some end marker as explained by this java code" :D
this is totally butchered
 
 
1 hour later…
4:59 AM
morning cbg
 
5:18 AM
hi @idjaw Thanks! :)) I'm Python beginner.
 
cbg all
 
dunno if my internet is shitty or if this is yet another ddos
and cbg
 
 
2 hours later…
7:19 AM
cabbage
 
Diwali Cabbage :-)
 
Happy Diwali @thefourtheye
 
Melons @BhargavRao :-)
 
7:41 AM
what is cabbage
 
cbg
a new macbook pro
with no function keys
but it looks cool
1.5k for the cheapest model though
 
Cabbage!
 
7:50 AM
cbg
 
cbg
@khajvah discussed here before...
I don't care for "looks cool"
I care for "is useful, saves time, works for me"
 
@AnttiHaapala ah I was off-duty
they could have added both function keys and touchscreen thing
 
Green Bean
 
@khajvah Nah, That would help them make more money
 
13 hours ago, by davidism
The only reason I know this is because the Mac fans in the office were scrambling to convince IT to buy them right now.
lol
@khajvah starts from there
 
7:57 AM
I will forget about it. I won't afford that thing anyway
 
@khajvah macbook is never a good buy
:D
 
@AnttiHaapala I am a college student. I have to have a macbook
 
peas
still peased
Asparagus
 
Antti - I've had Macbooks for about seven years now. What's wrong with them to make them "never a good buy"?
 
price/quality ratio
 
8:03 AM
Not a fanboy, and definitely not going to go out and buy whatever it is they just released, but I've found them generally solid and reliable.
 
dubious choices like using aluminium for covering material, leaving out ports, not enough extension space for that extra inch etc, and all for a hefty price with good profit margin for apple.
 
cbg
 
for 1.5k you have a massive choice
 
@AndyK cbg
 
too expensive for entry level core i5
 
8:07 AM
hey Bhargav
 
i can build supercomputer in 1.5k instead of buying mac
the only thing mac has is class
 
I do not agree @SohaibAsif MAc is very reliable
not many issues nor slowdown
 
it needs extra care
 
not at all
windows do
not mac
 
if we buy other brands we can use rough
 
8:10 AM
@AndyK so are thinkpads
 
Have you own one Sohaib?
 
@khajvah what are the specs for that
 
the thing is its thin when it fall everything will be break
 
@khajvah maybe. I had one Lenovo for work and I have to be honest, it never breaks down
 
but other brands fall from bag
 
8:11 AM
@AnttiHaapala there are a lot of options.
 
these never break
 
the 1.5k
 
jumma break
 
I have a lenovo thinkpad, a toddler ruined the keyboard....
 
@AnttiHaapala lol lenovo website is broken
 
8:14 AM
lol
16G memory: $200
 
@khajvah it's that toddler again ;-)
 
:) the funny thing is, their website never worked correctly
 
what is the display resolution
@khajvah you'd want 16G ram or at least option
 
damn
amazon links are ugly
 
I have 13" thinkpad T450
sorry 14 this is
chose it exactly so that I can have 16G ram
this has actual buttons on the mouse. it is a big thing
 
8:19 AM
@AnttiHaapala macbook doesn't have a 16G version
 
my friend got a lenovo laptop with touchpad that doesn't have buttons. It is completely unusable
it was the "highend model"
with carbon frame, they copied from macbook the "buttonless touchpad"
 
yeah, they did it for one generation I think
but then brought back the buttons
@AnttiHaapala the only company that gets away with such weird choices is the apple
 
8:54 AM
On this note, my next machine will be not-a-mac 32Gb RAM/i7 with a 500Gb SSD, which will come in around £950-1100 depending on which version I get. Apple burned me with their nonsense repairs policy, so I was almost totally done with them anyway, the ugly-assed new macbook was just the icing on the cake.
 
9:08 AM
My laptop is my office that I carry around with me, so I justify spending maybe £1,800 on it by amortising the cost over its three-year lifetime at around £12 a week. Given the relative absence of driver issues, printing problems, failure to return from hibernation and all the other crap I put up with on (admittedly, Windows) PCs that seems like money well spent
 
9:23 AM
Like I said I've not seen the specifications of anything new, but Paul Graham very clearly put the writing on the wall for Apple in PyCon 2013 (?) in Santa Clara
 
9:37 AM
@holdenweb apart from the display - you can spec up a pretty awesome laptop for less than the cost of a macbook and install linux... (that's my preferred approach for dev laptops anyway...)
 
cabbage
 
Looking at the evolution of vaultah's avatar, I'm starting to think that he's really Edward Snowden
(sorry, Edward)
 
9:54 AM
@AndrasDeak Kinda looks like that. We need to add a white patch here, check and then report him.
 
10:17 AM
@holdenweb T450 just works, tm.
even the Smartcard reader works in Linux and with SSH.
 
Nice. But with experience as my guide I'll take the £12 a week hit and convenient high availability.
Remember, I'm an old fart, so I'm probably way out of date on hardware.
Certainly the joys of system administration sort of ran out for me about twenty years ago.
Since when I've had to do far too much. ANY is far too much
 
10:51 AM
@holdenweb don't think I've had those problems on Windows for a long time
If anything, I'm surprised you don't get more printer driver issues with *n*x
 
if you stick with HP, hplip is great:P
 
(Still enjoying new phone. Now on work wifi and got lots of apps)
 
was that the oneplus 3?
ah, it was
I think my mom got the same phone a little while ago:P
 

« first day (2204 days earlier)      last day (2744 days later) »