Better HN
topnewbestaskshowjobs
Log inSign up

PartiallyTyped

2,940 karma · joined Oct 16, 2020 (6y ago) · 2,890 submissions

me [at] [$handle].dev

----------------------------------------------------

Submissions

comment 4y ago · link · parent

We have quite a bit of evidence that our gut bacteria influence our long term actions and behaviour through neurotransmitter precursors.

comment 4y ago · link · parent

Could timing be used to seed a cpu? ie, not all cpus are built the same, and similarly for all powersupplies, could the two be used together to bootstrap seeding i.e. by measuring voltage or voltage differences?

comment 4y ago · link · parent

I like your your solution, I think using `a[0:min(map(len,arrays))]` (ie with 0) is faster because it returns a slice and not a copy of the array.

I am glad you liked the trick!

comment 4y ago · link · parent

That does not zip though. In fact, it creates a 1-dimensional array of objects because the arrays do not have the same number of items.

     >>> a = [np.arange(i) for i in range(1, 11)]

     >>> np.array(a).T

        array([array([0]), array([0, 1]), array([0, 1, 2]), array([0, 1, 2, 3]),

        array([0, 1, 2, 3, 4]), array([0, 1, 2, 3, 4, 5]),

        array([0, 1, 2, 3, 4, 5, 6]), array([0, 1, 2, 3, 4, 5, 6, 7]),

        array([0, 1, 2, 3, 4, 5, 6, 7, 8]),

        array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])], dtype=object)
In fact, if we are to zip them, it should yield:

>>> list(zip(*a))

[(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)]

zip_arrays otoh does give the same result.

>>> zip_arrays(a)

array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])

comment 4y ago · link · parent

>>> arrays = [np.arange(1000)]*10

>>> zip_arrays(arrays)

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "<stdin>", line 2, in zip_arrays2

  File "<stdin>", line 2, in <listcomp>

  File "<__array_function__ internals>", line 180, in concatenate
ValueError: zero-dimensional arrays cannot be concatenated

Try this:

def zip_arrays(arrays):

    return np.concatenate([array[:l,...,None] for l in [min(array.shape[0] for array in arrays)] for array in arrays], axis=-1)
Or if we are trying to be more tidy instead of a one liner

def zip_arrays(arrays):

    l = min(a.shape[0] for a in arrays)

    arrays = [a[:l, ..., None] for a in arrays]

    return np.concatenate(arrays)

comment 4y ago · link · parent

Part of being idealistic is standing up for what is right but without causing more harm than necessary.

> If you limit access to anyone it is, by definition, no longer open source

Licensing disagrees. Not everything opensource is permissive.

comment 4y ago · link · parent

Mainly optimizers/solvers for multivariate functions.

The 1e4 speedup was on a Trust Region optimizer. The algorithm was implemented to solve "the hard case"[1] involves multiple Cholesky factorizations, a matrix inversion, an eigenvalue decomposition on each step, and a call to scipy.linalg.solve_triangular.

Part of the speedup is likely from caching/avoiding recomputations things.

Granted, I had to rewrite a lot of the code to accommodate jax's peculiarities around python semantics, and made extensive use of jax.lax.{fori_loop, while_loop, scan, cond}.

[1] http://www.apmath.spbu.ru/cnsa/pdf/monograf/Numerical_Optimi..., see page 87.

comment 4y ago · link · parent

Jax is great, but there are some rough edges.

I am using Jax for differentiable programming, and in many cases, I saw enormous speedup after jit, sometimes in the ballpark of 1e4.

For Neural Networks, I use Equinox, and/or Elegy.

comment 4y ago · link · parent

Transformers are really just fancy graph neural networks, the next step is diffusion networks.

comment 4y ago · link · parent

There is constructor theory

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

comment 4y ago · link · parent

Speaking of group theory, I can recommend "A book of abstract algebra". I think that it's a very approachable introduction to the topic. As a person with a CS degree doing ML, it changed my perspective on so many different topics, I can't recommend it enough.

https://www.goodreads.com/book/show/8295305-a-book-of-abstra...

comment 4y ago · link · parent

In what world is the failing country that began rationing its food 10 days in is a bear?

comment 4y ago · link · parent

Only if you can argue free-will exists.

comment 4y ago · link · parent

Include France in there, hence the propagandas like "White flag", "French need saving", "Freedom fries", and the deep resentment of France in the US.

comment 4y ago · link · parent

In the way they actively threatened a nuclear holocaust.

comment 4y ago · link · parent

I have sources for more interesting stuff regarding Trump, here:

https://news.ycombinator.com/item?id=30542741

comment 4y ago · link · parent

Unity is pushing for Reinforcement Learning, with the necessary mechanisms for training, built into the engine.

That seems like a reasonable first step imho.

comment 4y ago · link · parent

What alternative?

The same alternative that cut taxes for his rich friends [1], and hiked the taxes for the same people that voted for him [2-3]?

[1] https://www.theguardian.com/business/2019/oct/09/trump-tax-c...

[2] https://www.nytimes.com/2020/10/31/opinion/republicans-biden...

[3] https://www.washingtonpost.com/news/wonk/wp/2017/11/16/senat...

> The law they passed initially lowered taxes for most Americans, but it built in automatic, stepped tax increases every two years that begin in 2021 and that by 2027 would affect nearly everyone but people at the top of the economic hierarchy. All taxpayer income groups with incomes of $75,000 and under — that’s about 65 percent of taxpayers — will face a higher tax rate in 2027 than in 2019.

comment 4y ago · link · parent

That was written under the assumption they'd have occupied Ukraine in 3 days or so, not the embarrassment that is happening now. At this point, Kremlin will put out any false flag and use it to justify levelling Kyiv and his population will suck it up.

comment 4y ago · link · parent

Furthermore, gas is considered "Green" by EU and would have provided a steady source of income to Russia [1-2].

[1] https://www.dw.com/en/european-commission-declares-nuclear-a...

[2] https://time.com/6139049/europe-natural-gas-green-energy

comment 4y ago · link · parent

> Ilves said the vessel might have struck a mine.

From the article.

comment 4y ago · link · parent

Fact check:

- Trump wanted to sell US gas to EU in 2018.

- Trump wanted to pull out of NATO -> weaker NATO weaker response to Putin's invasion in 2019.

- Germany cut nuclear because Schroeder, friend of Putin's. See links above.

What weakness did Trump "exploit" and "how"? Also, citations needed.

> If dumb Western leaders were at least as smart as Trump, we wouldn’t be in this situation.

Yes, if western leaders were as smart as Trump, Ukraine would have been lost already, and covid would have ravaged Europe like it did with US.

comment 4y ago · link · parent

Do you really believe that that minor error on my behalf is enough to dismiss the mountains of evidence?

- Trump calls Putin "savvy" https://youtu.be/UsTH-WqbEu8?t=80

- Trump defends praising Putin https://edition.cnn.com/2022/02/26/politics/trump-cpac-putin...

> The problem is not that Putin is smart, which, of course, he's smart

And sorry, it wasn't a genius, it was a stupid flop filled with greed and hubris.

Jesus Christ touch some grass.

comment 4y ago · link · parent

I can provide arguments in favour of the position but not definitive proof, you can decide whether all of this is just "circumstantial".

- First day of war, Trump praises Putin for his behaviour, on tape, call him a genius [1, 4].

- Second day of war, Trump doubles down, on tape. [1]

- When asked whether [Trump] made a mistake calling [Putin] a genius, Moskow Mitch dodges the question, responds that Putin is a "ruthless thug". [2]

- [Repeatedly] met with Putin with no staff / note takers. [3]

- [The first time] Trump was impeached over holding aid of $400m from Ukraine. [4]

- Trump sides with Russia against FBI at Helsinki summit [5]

- Trump veto'd sanctions against Russia [6]

- Trump says it's 'common sense' to include Russia in G7 [7]

- Trump revealed highly classified information to Russian foreign minister and ambassador [8]

- Trump offered to help Putin with wildfires while ignoring wildfires in US [9, 10]

And the list keeps growing, consider looking into Manafort under the light of these events.

As for Schroeder, consider that he pushed for gas, is a close friend of Putin and didn't extend lifetimes of Nuclear plants, and after leaving his position he became board member in Gazprom [11, 12, 13]

[1] https://www.independent.co.uk/news/world/americas/us-politic...

[2] https://www.newsweek.com/mitch-mcconnell-calls-putin-ruthles...

[3] https://www.vox.com/2019/1/29/18202515/trump-putin-russia-g2...

[4] https://www.businessinsider.com/trump-statement-ukraine-cris...

[5] https://www.bbc.com/news/world-europe-44852812

[6] https://www.nytimes.com/2017/07/27/us/politics/senate-russia...

[7] https://www.reuters.com/article/us-g7-summit-trump/trump-say...

[8] https://www.washingtonpost.com/world/national-security/trump...

[9] https://www.reuters.com/article/us-usa-russia-trump-putin-wi...

[10] https://democrats.org/news/fact-sheet-trump-ignored-and-refu...

[11] https://www.politico.eu/article/outrage-germany-ex-chancello...

[12] https://www.thisismoney.co.uk/money/markets/article-10562307...

[13] https://www.theglobeandmail.com/world/article-former-german-...

comment 4y ago · link · parent

I consider my self a "commie", but I find Russia's government's behaviour repugnant.

It has nothing to with the average Russian, but everything to do with the Government, the dictator, and those who willingly support them.

That isn't to say the west hasn't done anything wrong. But by my account, we can pin the following on Russia:

- Installing puppets in foreign governments

  - Schroeder

  - Trump / GOP

  - Pushing for Brexit
- Supporting conspiracy groups that lead to an insurrection that threatened the semblance of democracy that the US had

- Sent children to war

- Committed 11 distinct war crimes in just 8 days, including shooting civies and children that were fleeing, hospitals, and wearing UN and Ua colours.

Russia isn't the problem, the problem is the person at the driver seat that is actively threatening a nuclear holocaust.

comment 4y ago · link · parent

The Russian government with its propaganda has caused a few millions of covid deaths worldwide, supported fringe groups and conspiracy theorists that lead to an insurrection, stole from foreign countries by installing puppets (Schroeder/Trump/GOP), supported Brexit, and has caused so much damage to humanity, sent thousands of kids to their death, is actively killing civilians and levelling cities.

It is a plague that needs to be eradicated. That isn't silencing a nation though, that is silencing a cancerous government that is infecting every nation it can.

comment 4y ago · link · parent

[citation, from a non russian-state owned source, needed]

comment 4y ago · link · parent

Being neutral is an action, and so is eating propaganda.

comment 4y ago · link · parent

You are certainly to blame for not understanding the situation and lashing out on a person that is obviously worried about their employees, and doing what they can to put pressure, even if by proxy, on the shelling and killing their friends, colleagues, and employees.

> Are regular American citizens to be blamed and punished for their leaders war crimes?

Whataboutism is unnecessary and the answer is I can't see any reason as to why not.

comment 4y ago · link · parent

Most staff and engineers are Ukrainian and are getting shelled by the country your officials openly support. Read the reply from Namecheap's CEO.
1
787980
97