HNHacker News
TopNewBestAskShowJobs

scardine

1,990 karma · joined November 12, 2012

[ my public key: https://keybase.io/scardine; my proof: https://keybase.io/scardine/sigs/qeBpi0HYlFKHREYPh9n-xmWcbtfL4QLbtHsGFGzGD2g ]
submissionscomments
scardine··on The Fed is getting into the Real-Time payments business
Brazil - Sistema de Pagamentos Brasileiro (Brazilian Payment System) 2002

https://www.bcb.gov.br/en/financialstability/paymentsystem

> Guidelines for the Brazilian Instant Payments Ecosystem: The Brazilian instant payments ecosystem will have a flexible and open participation structure and will be similar to the existing interbank electronic funds transfer (TED)—with greater availability, speed, and simpler addressing of payments. The transactions will be performed in a simple and fast way to different beneficiaries. Moreover, the BCB (Brazilian Central Bank) will develop a single settlement infrastructure.

scardine··on The Titanic Compared With a Modern Cruiseship (2014)
That is the whole point, the ship is an environment where kids will never be alone. Bad things can happen everywhere and you can't protect your children all the time.

If you have kids try it and compare with other vacation trips. And if you don't, parenting is that kind of experience you must live it yourself in order to fully understand.

scardine··on The Titanic Compared With a Modern Cruiseship (2014)
If you have kids, it is a vacation trip where you can relax: there is no way your kid will get lost in the woods, be kidnapped or something like that (there is a 10 feet glass fence all over the boat).
scardine··on Ebooks Purchased from Microsoft Deleted April 2019 as DRM Servers Shutdown
Probably the refund does not account for inflation, though.

500 dollars today may not have the same purchase power of 500 dollars a few years ago.

scardine··on Microsoft's Linux Kernel
There are a few annoyances with WSL2. For me the most important are:

1. You can't connect to a port listening on WSL localhost like in WSL1, you have to figure out the WSL IP address and use that.

2. From WSL you can't connect to a Windows TCP port on localhost, you must figure out the Windows IP (cat /etc/resolv.conf) and use that.

3. The WSL remote interpreter on PyCharm is not working anymore. The suggested workaround is "use SSH remote interpreter" but given #1 you can't connect to localhost (and the WSL IP changes every time you restart it)

In order to use the SSH remote interpreter in my favorite IDE I'm using this script (on Windows):

    import subprocess
    import re

    output = subprocess.check_output('wsl.exe ifconfig')
    match = re.search(r"\sinet\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s", output.decode('utf-8'))
    if match:
        ip = match.group(1)
        with open(r"C:\Windows\System32\drivers\etc\hosts") as i:
            content = i.read()
            new_content = re.sub(r"(172.\d+\.\d+\.\d+)\s+wsl", f"{ip} wsl", content, re.M)       
        if new_content != content:
            try:
                with open(r"C:\Windows\System32\drivers\etc\hosts", "w") as o:
                    o.write(new_content)
            except PermissionError:
                print(new_content)
First I use the Windows Scheduler to start SSH (wsl service start ssh) on logon. Then this script is executed on logon with elevated privileges to update the hosts file. Instead of "localhost", I use "wsl" and it works well enough for me while I wait for the fixes.

Despite the above, the combo Windows 10 + WSL2 is the best "Linux Desktop" for me.

scardine··on Ask HN: Do you use automated tools to create APIs, or do you code them manually?
I use Django REST Framework which may be or may be not an automated tool depending on the definition you are using - but DRF makes API's very declarative and I love it (batteries included).
scardine··on The Future of Docker Desktop for Windows
I just got WSL2 from the Windows Insider updates and it is great so far. Things like git are way faster and I can run docker on Linux.
scardine··on uBlock Origin 1.20
Lets not forget WSL. I just got the WSL2 upgrade - it turns a Windows 10 desktop into a quite decent software developer workstation.

Seriously guys, if the last time you used Windows was a few years ago it is time to give it a another shot.

scardine··on Pointers in Python
Nothing happens with the cache. According to the article you can't use a Python int, instead you have to use a ctypes.c_int and those are not cached.
scardine··on Pointers in Python
IINM the reference implementation has a cache for small integers. I wonder what happens if you try the ctypes example in the article with one of the cached integers.
scardine··on I got asked LeetCode questions for a dev-ops systems engineering job today
Check glassdoor for this company/position, looks like most people think it is a difficult interview process:

https://www.glassdoor.com/Interview/Palantir-Technologies-De...

scardine··on Building Sentry, a service to process native crash reports and minidumps
Hey @the_mitsuhiko, any plans to support Django Channels (daphne) out of the box? Debugging async stuff is tough.
scardine··on Can cannibalism lead to disease resistance? (2018)
An honest title should be "Can cannibalism promote resistance to cannibalism-induced diseases?" - which most people would guess since evolution will promote survival of the disease-resistant lineages.

The current click-bait title implies cannibalism could improve resistance to disease in general.

scardine··on Sleep tweaks boost night owls' wellbeing
Well, in my trade (software development) it is becoming irrelevant with more and more companies embracing remote working.

I'm a night owl living in Brazil so when I take a job in CT I can sleep 2 hours more and still be seen as an early bird. I can sleep even more if the main office is in the west cost.

São Paulo is a huge, sleepless city (10 million citizens), you have excellent 24 x 7 options for almost everything.

scardine··on Ask HN: Server-side web apps – is the database still a bottleneck?
I think parent is talking about things like MVCC[1] in contrast with simple read-write locks.

[1] https://en.wikipedia.org/wiki/Multiversion_concurrency_contr...

scardine··on Translating math into code with examples in Java, Racket, Haskell, Python (2011)
Python has both generator functions and generator expressions. A generator function is like this:

    def int_generator():
        i = 0
        while True:
           yield i
           i += 1
A generator expression looks like a list comprehension (a Python construct based on the set-builder notation in Math) and is used in situations where you don't really need to materialize the list - for example when you are just iterating over it in a `for` loop:

    for n, square in ((i, i * i) for i in int_generator()):
        print(f"{n}² = {square}")
        time.sleep(1)
scardine··on Assange Indicted Under Espionage Act, Raising First Amendment Issues
I'm halfway "parable of the talents" by Octavia E. Butler (I'm trying to read all the novels that won a Nebula Award). I can see it happening if US keep the current trajectory.
scardine··on Antergos Linux Project Ends
This. Nuke the entire site from orbit. It's the only way to be sure.

https://www.youtube.com/watch?v=aCbfMkh940Q

scardine··on People see it as more acceptable to make passionate employees do extra: study
If you hate your job, someone may be taking advantage of you.

If you love your job, someone may be taking advantage of you.

Someone may be taking advantage of you. Or not. Who knows?

scardine··on Books and lectures don't work
The brain is very good at ignoring some sounds. Personally I'm fond of "white noise" generators - I have my own perfect combination of rain, wind, flowing water and nature noises that cancels everything else.
scardine··on Books and lectures don't work
If I'm interested in the subject nothing breaks my hyperfocus (this is both my superpower and my kryptonite). Well, conversations around me or music with lyrics do disturb my reading but classic music or pos-rock are a very effective way to cancel environmental noise.
scardine··on An Update on Spline Licensing
Cool, looking forward to the talk.

My first job as a software developer was writing AutoCAD extensions (in "AutoLisp" so you can guess how old I am).

Even if I don't work in the field anymore the topic is still fascinating for me.

scardine··on Books and lectures don't work
The title feels incomplete. It should be "why books don't work for <something>".

Books may work better for some people for some purposes, but books do work.

scardine··on Why what we think we know about schizophrenia is wrong
Well, the support network is far from perfect - having a 5yo son in the autistic spectrum I experience this first hand. Not too long ago my kid would be segregated to a "special" school and I'm glad he is able to attend a regular school although he still needs a dedicated tutor.

Do you think weird people that do not endanger their own life or the life of others should be locked away?

scardine··on Why what we think we know about schizophrenia is wrong
This. I'm fortunate enough to be considered only "eccentric" as most people are willing to forgive my weirdness in exchange for other useful personality traits. Not everybody is that lucky.
scardine··on An Update on Spline Licensing
Can you comment on the advantages of this implementation comparing to the one used in Inkscape or other popular software?
scardine··on Why what we think we know about schizophrenia is wrong
I don't think "one flew over the cuckoo's nest" romanticizes mental illness, for me it is about demonizing institutionalization.

It pictures the time when mental illness diagnostic was an easy method to put away anyone annoying or inconvenient (the subject really having a mental illness or not made little difference). It talks about institutional cruelty like torture and lobotomy.

But then I didn't read the book, just watched the movie - perhaps the "romanticization of illness" angle is more pronounced in the book but I'm pretty sure it was not the main theme and the novel did more good than bad for those diagnosed with a mental disorder or developmental disability.

scardine··on Ask HN: What was your experience starting a tech consultancy?
It is one of the first skills you should master.

- it is hard to make good money if you are not good talking about money.

- talk money first - do not spend days writing a detailed proposal just to discover later your proposal is way over the client's budget: your first proposal should be verbal, the detailed proposal should be the contract once the verbal proposal is accepted (even worst, don't give for free a detailed proposal your client will use to bargain with your competitors). Many clients will resist to disclose the budget but you should argue: too often people say we are too expensive, let's make sure we don't waste each other's time knowing at least the investment ballpark.

- run from clients that say they want to invest as little as possible.

- if the prospect don't know how much they want to invest you probably are selling to the wrong person - always insist to present the deal to someone that is able to financially approve the investment. Decline to present your proposal if the person is late or can't attend to the meeting, say you can wait for 20 minutes and if the person is unable make it, reschedule. Don't waste time with minions.

- in order to frame the business proposition as an investment you must understand how much the problem costs.

scardine··on PostgreSQL 11.3 and 10.8
Even when the ORM models start to get cumbersome I like to use sqlalchemy.sql to assemble SQL queries.

It maps pretty much 1:1 to SQL and for me it beats the alternative (using text interpolation for composing queries).

scardine··on PostgreSQL 11.3 and 10.8
I can't remember the last time I started a project using MySQL, may be it is catching up - but PITR, partition tables and document-oriented columns are some features I use a lot. Postgis also used to be stronger then the MySQL counterpart.
← PreviousPage 2 of 20Next →