Better HN
topnewbestaskshowjobs
Log inSign up

devnonymous

2,757 karma · joined Dec 2, 2013 (12y ago) · 829 submissions

Just your run of the mill anonymous developer named Steve. github, can ? https://github.com/lonetwin
Submissions

comment 9y ago · link · parent

I've submitted this before a couple of times over the last couple of years but re-submitting now because I've added a few interesting (at least I think so) enhancements. The '\l' command to list the code for objects and now the '\e' command will also let you ^edit^ objects (ie: open the source file for objects in the editor). Also the ability to load and pre-populate your sessions when working in virtualenvs.

Would love to hear feedback or ideas. Hope at least some people find it as useful as I do.

362.

Show HN: Pythonrc, now with ability to load virtualenv specific customizations(github.com ↗)

12 points · by devnonymous · 9y ago · 12 comments

comment 9y ago · link · parent

tl;dr for those who read the definitions but don't want to Get Got.

* Understand the difference between the value of something and the cost of the thing.

* Understand opportunity cost (and sunk cost).

Get Got when when value is high and opportunity cost is low.

Get compact when value is high but opportunity cost is non trivial.

Get Gone when value is low and opportunity cost is high.

Get ready when cost as well as sunk cost is high.

comment 9y ago · link · parent

Yep, that's what I thought as well and was curious to see the link between the author being a rubyist and contributing to python. Too bad it wasn't any such thing.

On the plus side tho', I thought the principles mentioned go beyond the specifics of the code snippent which was being used more like an example.

The author being a rubyist has no influence to anything mentioned in the article AFAICT.

comment 9y ago · link · parent

Ugh, what's with the cheeky/inflammatory/click-baity title.

That's a turn off from an otherwise good article on guidelines one can use to easily identify opportunities to potentially optimize python code.

comment 9y ago · link · parent

/Rant

Oh come off it! I hate this kind of elitist bull crap. Don't like editor putting something into buffer, do you? Do you have set ai in your vimrc? 3 guesses to what that does. How about set et? 'consent' you say? How is explicitly installing a plugin not expression of consent?

And as for your dismissive jibe about 'just imap' - auto-pairs is a bit more nuanced than that. For example it handles pairing quotes as well. Let's see your quick dismissive solution for that which handles closing quotes as well.

Why am I so angry? Well, because there are so many of these 'gurus' who go around being dismissive of other peoples preferences as tho their's is the only one true way. The comment could easily just have been, "I like to be explicit about entering my parentheses and even if I wasn't here's how I'd do it without a plugin ", instead of all that consent nonsense.

/End rant

comment 9y ago · link · parent

I honestly didn't follow the argument - "Gun control policies in other countries don't provide sufficient data to conclusively state that applying them would bring down gun related violence... But hey, here are some completely random measures I think that might work despite having not data to back up my claim"

368.

Infamous 'fake news' writer found dead in his bed(amp.independent.ie ↗)

1 points · by devnonymous · 9y ago · 1 comment

369.

In India, a Big GE Deal Goes Off the Rails(wsj.com ↗)

1 points · by devnonymous · 9y ago · discuss

comment 9y ago · link · parent

Just to nitpick :) but I think the reason inverters was mentioned in brackets was to inform that they are commonly (although incorrectly) called inverters in Delhi. The reason being you don't just buy the inverters by themselves you almost always buy along with batteries.

comment 9y ago · link · parent

I imagine this was said a bit tongue-in-cheek but seriously tho, that would not be the better story since the reality of engineering is mistakes happen. Bugs exist in every system. Yes, these might even cause nuclear war and that's why the 'better story for this audience' is why it didn't.

comment 9y ago · link · parent

> Software patents can only be used offensively.

Well, not really. This exists:

  https://en.wikipedia.org/wiki/Open_Invention_Network
  http://www.openinventionnetwork.com/

comment 9y ago · link · parent

A tip (and shameless promotion) - here's a pair of functions that make the saving of sessions and loading them easier :

https://github.com/lonetwin/lonetvim/blob/master/vimrc#L279

Behaviour should be fairly self evident from the code. Feel free to ask if it isn't.

comment 9y ago · link · parent

> I can absolutely not recommend a book about a critical topic, which contains that kind of defects.

I think your definition of formal proofs is a bit different from Alan Downey's (who incidentally has also written an entire book on Complexity and the Philosophy of science[1]). Providing a formal proof for even a 'simple' algorithm is incredibly wasteful in the context of the example in which the statement is made. Perhaps you should read the book before calling out it's 'defects'.

[1] http://greenteapress.com/complexity/index.html

More of Alan's books at: http://greenteapress.com/

comment 9y ago · link · parent

Object destructuring is tuple unpacking in python which is exactly what the code example does. What the parent was remarking on was caring about the performance of that rather than the ability.

comment 9y ago · link · parent

A friend of mine got something like this for her daughter, who seemed to have loved it:

http://www.snapcircuits.net

I'm not sure about the current state of littlebits, but I remember it being very promising :

https://littlebits.cc

comment 9y ago · link · parent

I don't understand the negativity in the top voted comments here! It's almost as though I read a completely different article than the one being commented on.

The comments here are being dismissive and then reiterating what the post said! Here's the summary from the post :

> So I stopped worrying about whether my code is perfect. And I just accepted that if I can't see any immediate flaws with the code, and if all the tests pass (whether automated or manual), then it's fine. And I trusted that if I ever come across a bug, I can fix it.

Why, specifically, is that a bad thing?

comment 9y ago · link · parent

> So with JavaScript you've got arrow functions, the method shorthand definition syntax, the spread operator, destructuring assignments, all functional Array methods and async functions.

In language that pythonistas would grok:

Arrow functions: multiline lambda definitions

method shorthand definition syntax: class defined with only classmethods, or in other words a namespace

the spread operator: *args in functions

destructuring assignments: tuple unpacking... But also for creation of instances

all functional Array methods and async functions: functools and async... Plus a bit more

While most of this is good to know, I'd still stick with python for readability and maintainability purposes.

comment 9y ago · link · parent

Well, gay people cannot marry, so that's definitely not everybody.

comment 9y ago · link · parent

While I know you were making fun of the word 'license', what you claim is not true legally in India.

comment 9y ago · link · parent

Uh huh, and what if I do not want to depend of the government to provide me with food, clothing and shelter since I am able to earn those for my family and me (reducing the social security burden on the government), should I not have the freedom to excuse myself from these alleged social benefit schemes.

Your argument and many similar ones are now boring and have been countered enough times already.

comment 9y ago · link · parent

I've submitted this earlier, but I recently added a new command (for listing source code of objects using inspect) which I am finding very useful in my daily work, so I thought I'd re-share.

383.

Show HN: Improving the python shell experience, using just the stdlib(github.com ↗)

3 points · by devnonymous · 9y ago · 1 comment

384.

How privileged are you?

4 points · by devnonymous · 9y ago · discuss

comment 9y ago · link · parent

Reading the comments here I get a feeling not a lot of commenters are reading the entire post (please do), or are reading after already deciding that they won't agree with what they read (if that's the case, please don't bother with the comments and move on to the next HN article)

I thought it was an insightful read as much as I dislike the arrogance that SV seems to possess despite its ignorance of the rest of the world... And the accompanying culture that spills out of that combination of arrogance and ignorance.

SV culture has a lot of problems, sexism is one of them.

386.

Aphantasia: How It Feels to Be Blind in Your Mind(m.facebook.com ↗)

2 points · by devnonymous · 9y ago · discuss

comment 9y ago · link · parent

Since you think government action is warranted, and since it can be argued that HN seems to have an anti-trump bent, I'm assuming you'll be fine if the government wants to know about every single interaction you've had here so that you can be identified ?

...any government? ... Including the inevitable non-trump one?

comment 9y ago · link · parent

...and in this presumptive Sharia rally there won't be any radical Islamic extremists, just a bunch of different Muslim people with repressed resentment about their lives all of who do not want to kill the infidels, right? See, false equivalence, assumptions and whatabout-ism can be employed in many ways.

comment 9y ago · link · parent

IMHO, Airbnb did the right thing and as for your what-ifs, capitalism can take care of that. If the Nazi-uber and hate-van mentioned in the article actually become profitable businesses, then there is something to feel concerned about. Not right now, not with this.

> When they come for you and your soon-to-be-declared radical beliefs

Airbnb is a business. Not the government. They can't come for me. I go to them and if tomorrow they declare my beliefs radical, I will not go to them.

1
121314
28