Better HN
topnewbestaskshowjobs
Log inSign up

bgschiller

45 karma · joined Jun 21, 2013 (13y ago) · 27 submissions

Submissions

comment 10mo ago · link · parent

I'm at https://brianschiller.com, thanks for making a list :)

comment 2y ago · link · parent

I'm trying to make a spreadsheet interface for solving scheduling problems.

Constraint satisfaction and optimization is exactly the sort of problem we should be using computers for, but there's zero chance your neighborhood cafe can figure out prolog or OR-tools or whatever.

comment 2y ago · link · parent

Nice writeup, this is also how I think about OAuth.

I gave a very similar talk at Develop Denver back in 2018: https://www.youtube.com/watch?v=7rGkz9Ib4fQ

My slides even look similar to your diagrams: https://brianschiller.com/lets-build-oauth/#/31/10

comment 5y ago · link · parent

Unless you're importing *, pylint will tell you about both missing imports and unused ones.

comment 6y ago · link · parent

There are a couple of attempts in that direction with TypeScript[1,2]. A bit more work than if there was direct language support, but I've used "branded types" to distinguish between UserIds and ProductIds, between different types of currency, and between different unit systems.

1: https://spin.atomicobject.com/2018/01/15/typescript-flexible...

2: https://basarat.gitbook.io/typescript/main-1/nominaltyping

comment 6y ago · link · parent

> E.g. I couldn’t for the life of me annotate the return value of the pipe function

Don't feel bad, no one can do that (yet! I think it should be possible with Variadic Tuple Types, coming in TS 4). There are a couple of attempts[1][2], but they all lack in some way. Redux does it with a boatload of overloads [3].

1: https://dev.to/ascorbic/creating-a-typed-compose-function-in...

2: https://stackoverflow.com/a/53066700/1586229

3: https://github.com/reduxjs/redux/blob/686d29b5d4e2dcb6709c16...

comment 6y ago · link · parent

I think you might be underestimating how hard breastfeeding is pushed in US hospitals. Our second night in the hospital with my son, my wife's milk hadn't come in yet.

Our son was screaming because he was hungry. The nurse kept saying this was good, that it would encourage breast milk production. It took several tries to convince her that, while it might be good in the long run, we needed some food for this baby.

This was a consistent experience with all nurses we dealt with. Interestingly, breastfeeding specialists tended to be more understanding.

8.

Show HN: Encourage Operational Security at your org by pwning your coworkers(pwn.devetry.com ↗)

3 points · by bgschiller · 6y ago · 1 comment

comment 6y ago · link · parent

perhaps it should be called "post-modern"?

comment 7y ago · link · parent

I think I'm confused. If you want to delegate _everything_, why not just actually use inheritance? Or even the object itself. What's an example of when you would want an ObjectProxy?

Definitely agree about metaclass magic being a blessing and a curse. That superdelegate library was fun to write and uses a metaclass to make the API pleasant.

comment 7y ago · link · parent

Nice write-up! Coincidentally, I wrote on the same topic, also in python just a few days ago [1]

I came to largely the same conclusions, but instead of forwardable, I wrote a new library called superdelegate that is, IMO, more explicit [2]

1: https://brianschiller.com/blog/2019/05/03/two-sorted-lists 2: https://github.com/bgschiller/superdelegate

comment 8y ago · link · parent

This reminds me of the Ducks pattern[1] that I've been excited about recently. And also Vue's single-file components.

[1] https://github.com/erikras/ducks-modular-redux/blob/master/R...

comment 8y ago · link · parent

I enjoy Statistics Done Wrong https://www.statisticsdonewrong.com

comment 8y ago · link · parent

I'm in Denver and would love to help out.

comment 9y ago · link · parent

I wrote about my (mac-specific) pass setup at https://brianschiller.com/blog/2016/08/31/gnu-pass-alfred

It uses Alfred to get fast, autocompleted access to passwords.

comment 9y ago · link · parent

I also found myself doing that pretty often, so I wrote this:

    def nget(d, *ks, **kwargs):
        for k in ks:
            d = d.get(k)
            if d is None:
                return kwargs.get('default')
        return d

   >>> d = {'a': {'b': {'c': 12 }}}
   >>> nget(d, 'a', 'd', 'c', default='Not Found!')
   'Not Found!'
   >>> nget(d, 'a', 'b', 'c')
   12

17.

Heidi the dog recruited for a data science job(imgur.com ↗)

1 points · by bgschiller · 10y ago · discuss

18.

Change AppleID Fail(imgur.com ↗)

1 points · by bgschiller · 11y ago · discuss

comment 12y ago · link · parent

This is very cool!

As a piece of constructive feedback, consider waiting until a visualization is scrolled into view to start animation. I'm particularly thinking of the Exponentiation page. Mike Bostock wrote about this recently: http://bost.ocks.org/mike/scroll/#4

comment 12y ago · link · parent

This guy keeps quoting his own tweets... from today. http://i.imgur.com/EePKQ.png

21.

Where's the Facebook app?(brianschiller.com ↗)

1 points · by bgschiller · 12y ago · discuss

22.

Pthreads and PRNGs, oh my!(brianschiller.com ↗)

1 points · by bgschiller · 12y ago · discuss

comment 13y ago · link · parent

I'm glad you enjoyed it!

comment 13y ago · link · parent

Good catch! I've fixed it now.

25.

Putnam Boxes and Balls(brianschiller.com ↗)

5 points · by bgschiller · 13y ago · 4 comments

26.

Muggles and Base Two(brianschiller.com ↗)

1 points · by bgschiller · 13y ago · discuss

27.

I wrote a LaTeX macro to choose a 'Therefore'-like transition at random(github.com ↗)

5 points · by bgschiller · 13y ago · discuss