Hacker Newsnew | past | comments | ask | show | jobs | submit | FreeHugs's commentslogin

What happened to the real x, "gene x", "photographer and friend of lemurs"?

https://web.archive.org/web/20220906224326/https://twitter.c...


At the core of Web3 projects is the idea that one can own their identity via cryptographic proof.

Over time, this concept will find its way into many projects. Especialy into open source projects which try to make the web a better place.

For example, as soon as browsers support a DNS based on cryptographic proofs like ENS, other technologies which have URL based identities (like ActivityPub) will automatically support cryptographic identities. Which would bring it to projects like Mastodon and Bluesky automatically.


The big question is if this will be a net positive or just adds more bloat.

They tried the same with Bing and failed. Bing did not see any uptick even with the new AI features:

https://gs.statcounter.com/search-engine-market-share/deskto...

My takeaway is that users are not as stupid and lazy as Microsoft thinks they are. They want a clean UI. And if they have to sign up for ChatGPT to get it, they will. ChatGPT already gained as many users as Bing has. With a clean UI, Bing might have already doubled it's userbase.

Why doesn't Microsft just remove all the clutter from Bing and enjoy the benefits of having their search engine being the default on all the Windows tablets and laptops out there? Why waste it all and make every user change their search engine to Google?


Microsoft as a UI company historically has been absolutely god awful: Probably one of the main reasons Apple stayed in business before the iPhone. I wouldn't expect them to wake up one day and start making clean UIs.


I assume a few hundred project managers have jockeyed to get their stupid widget on the page and whoever is in charge now holds onto their team’s widget as their only real visible contribution to the company.


I don't think regular people know that Bing has added AI features. Even if they knew, why would they not just use ChatGPT? ChatGPT also benefits from a fresh, cool brand name that Bing will never have.


Answer: Bing provides GPT4 for free with integrated search to ground the response. It’s a totally different experience than free ChatGPT that some people would prefer.


Maybe I'm holding it wrong, but I tried Bing with GPT4 and I got really useless answers. Maybe I'm just used to the chatGPT interface.

Edit: I found the bing interface confusing. I couldn't really distinguish between the AI bit and just searching. When I asked how to write some code that did X, I got a bunch of links to stack overflow or whatever. I wanted the ai to write some code for me.


ChatGPT's knowledge only goes up to 2021. BingChat, meanwhile, can access the Internet and try to look things up.


Why is Termux not on the Google Play Store?


Because of some issues: https://github.com/termux/termux-packages/wiki/Termux-and-An...

"Termux and its plugins are no longer updated on Google Play Store due to android 10 issues and have been deprecated. The last version released for Android >= 7 was v0.101. It is highly recommended to not install Termux apps from Play Store any more."


Basically, Google keeps locking down more and more niche computing functions like "file access" and "running subprocesses" that no one would ever want to use, in the name of security.



Reminds me of https://www.literature-map.com

Which is a map of all authors in the world sorted by overlap in readership. I found some of my favorite writers by browsing it.

I wonder which approach is better suited to find something that is spot on to my interests.

When I think of my favorite books, they usually are the most popular books of their authors.

Are there any counterexamples, where an author wrote a book that is more profound than their biggest hit but got overlooked for some reason?


Oh man, Literature Map looks really great for finding recs.

That said, I do think book-level might be much more valuable. My first thought for this was Night in the Lonesome October by Roger Zelazny. I haven't read anything else by him yet because my brother informs me his other stuff is entirely different. Looking at Goodreads, I think that qualifies as far from his biggest hit. Is it "more profound?"? Doubtful, but seems likely that you shouldn't group it with his others. I want recommendations based on the book I like, not the author I mostly might-not.

A better example might be how Stephenie Meyer wrote the extremely popular Twilight books, and also The Host which is much less well-known, and better in many respects. Probably qualifies as more profound, too—it's told from the perspective of a parasitic alien. Picture the Yeerks from Animorphs if you read those.)


I wish it was easier to see some of their books, or even copy and search the author from each page.


Whoa, this is a great resource. Never heard of it before, it looks like I'm finally able to get some proper book recommendations. Absolutely loving it.

Weird though that for certain cases it spells English author names with Cyrillic alphabet. Like for instance when I center the graph on "Stanisław Lem", I can see names like George Orwell or Terry Pratchett spelled in Cyrillic. I wonder why.


Stella Gibbons is basically only known for Cold Comfort Farm, but IMO many of her other things are better, although in a different way. My favourite is Pure Juliet, which is a beautifully gentle portrayal of someone who is on the Autism spectrum, written before Autism was really a thing that people talked about.


> Are there any counterexamples, where an author wrote a book that is more profound than their biggest hit but got overlooked for some reason?

Any reply is going to be somewhat subjective, but All Systems Red is not even in my top 5 books by Martha Wells...


The most important part of the article seems to be that this Python code is taking "an avg of 293.41ms per iteration":

        def find_close_polygons(
            polygon_subset: List[Polygon], point: np.array, max_dist: float
        ) -> List[Polygon]:
            close_polygons = []
            for poly in polygon_subset:
                if np.linalg.norm(poly.center - point) < max_dist:
                    close_polygons.append(poly)

            return close_polygons
And after replacing it with this Rust code, it is taking "an avg of 23.44ms per iteration":

        use pyo3::prelude::*;
        use ndarray_linalg::Norm;
        use numpy::PyReadonlyArray1;

        #[pyfunction]
        fn find_close_polygons(
            py: Python<'_>,
            polygons: Vec<PyObject>,
            point: PyReadonlyArray1<f64>,
            max_dist: f64,
        ) -> PyResult<Vec<PyObject>> {
            let mut close_polygons = vec![];
            let point = point.as_array();
            for poly in polygons {
                let center = poly
                    .getattr(py, "center")?
                    .extract::<PyReadonlyArray1<f64>>(py)?
                    .as_array()
                    .to_owned();

                if (center - point).norm() < max_dist {
                    close_polygons.push(poly)
                }
            }

            Ok(close_polygons)
        }
Why is the Rust version 13x faster than the Python version?


Yeah but the Python code is so bad that it's easy to get a 10x speedup using only numpy, as well. The current code essentially does:

    import numpy as np

    n_sides = 30
    n_polygons = 10000

    class Polygon:
        def __init__(self, x, y):
            self.x = x
            self.y = y
            self.center = np.array([self.x, self.y]).mean(axis=1)


    def find_close_polygons(
        polygon_subset: List[Polygon], point: np.array, max_dist: float
    ) -> List[Polygon]:
        close_polygons = []
        for poly in polygon_subset:
            if np.linalg.norm(poly.center - point) < max_dist:
                close_polygons.append(poly)

        return close_polygons

    polygons = [Polygon(*np.random.rand(2, n_sides)) for _ in range(n_polygons)]
    point = np.array([0, 0])
    max_dist = 0.5

    %timeit find_close_polygons(polygons, point, max_dist)
(I've made up number of sides and number of polygons to get to the same order of magnitude of runtime; also I've pre-computed centers, as they are cached anyway in their code), which on my machine takes about 40ms to run. If we just change the function to:

    def find_close_polygons(
        polygon_subset: List[Polygon], point: np.array, max_dist: float
    ) -> List[Polygon]:
        centers = np.array([polygon.center for polygon in polygon_subset])
        mask = np.linalg.norm(centers - point[None], axis=1) < max_dist
        return [
            polygon
            for polygon, is_pass in zip(polygon_subset, mask)
            if is_pass
        ]
then the same computation takes 4ms on my machine.

Doing a Python loop of numpy operations is a _bad_ idea... The new code hardly even takes more space than the original one.

(as someone else mentioned in the comments, you can also directly use the sum of the squares rather than `np.linalg.norm` to avoid taking square roots and save a few microseconds more, but well, we're not in that level of optimization here)


Python's for loop implementation is slow, also. You can use built in utils like map() which are "native" and can be a lot faster than a for loop with a push:

https://levelup.gitconnected.com/python-performance-showdown...


Nope. Map() is same speed as for loop.

Benchmarking methodology in the link is not good. Author should use timeit() or cProfiler or so. 0.01s of difference is mostly due to fluctuation. The order of execution also matters. Say you want to test A and B function, you need actually to run A, B, B, A to see if the ordering brings the different.


Yeah I guess this isn't true anymore, it looks like maybe it was true in 2.6 days.


I immediately verified both claims.

list(map(func, arr)) did bring 10% benefits if the func is builtin e.g. int(), str().

But if func is tuple(), list(), set() or any kind of user defined function, list(map()) is always slower.

You can try yourself to see list(map()) is not working well:

    import numpy as np
    a = np.arrange(100000, 100000)
    %%timeit
    b1 = [np.sum(x) for x in a]
    # repeat once
    %%timeit
    b2 = list(map(np.sum, a))
    # repeat once
    import gc
    gc.collect()
    %%timeit
    b2 = list(map(np.sum, a))
    # repeat once
    b1 = [np.sum(x) for x in a]
    # repeat once
I guess that's why I only use map() if and only if is it the case 'list(map(itemgetter, arr))', because generally there is no benefit to use it.


thanks!


I don't think it's the loop implementation. The stuff in the loop should take multiple orders of magnitude more time than the loop itself:

    for poly in polygon_subset:
        if np.linalg.norm(poly.center - point) < max_dist:
            close_polygons.append(poly)


I don’t know if numpy fixed this, but it used to be that mixing Python numbers with numpy in a tight loop is horribly slow. Try hoisting max_dist out of the loop and replacing it with max_dist_np that converts it to a numpy float once.


Speaking of this, I once find that

    for x in numpy.array: 
is 9X slower than

    for x in numpy.array.tolist():
in 2021.


Its not the looping itself that is slow in the article you linked, its that every element is appended to the list. If you use a list comprehension its even faster and it still loops over all elements of the list.


Here is the decompilation of the listcomp

    [x for x in range(5)]
:

    RESUME 0
    BUILD_LIST
    LOAD_FAST
    FOR_ITER 4
    STORE_FAST (x)
    LOAD_FAST (x)
    LIST_APPEND
    JUMP_BACKWARDS 5
    RETURN_VALUE
As you can see from the third last instruction, a listcomp does append individual elements to the list. What it doesn’t need to do is call a method to do so (let alone lookup the corresponding method).


No, AFAIK each for loop iteration appends and pops the stack in the interpreter, while map loops all entirely in the native implementation of the interpreter itself.


I was surprised that the Rust version is _only_ 13x as fast as the Python version.


Probably because it wasn't pure Python to start with.


Shouldn't `close_polygons` be presized in both Python and Rust to avoid repeated allocation and copy ?


One carries the entire feature set of the python runtime, the other is compiled.


The time is spent in this 3-line loop:

    for poly in polygon_subset:
        if np.linalg.norm(poly.center - point) < max_dist:
            close_polygons.append(poly)
I don't think the entire feature set of the Python runtime is involved in this.


Without using every feature you still have to conform to the complexity of the runtime. Every variable in that loop is a hash map lookup into the locals. `np.linalg.norm` is two field accesses, necessitating more hash map lookups on the module objects. `-` and `<` are attribute lookups as well as full function calls.


> Every variable in that loop is a hash map lookup into the locals.

No, it's a LOAD_FAST bytecode instruction. (The other stuff is mostly right, and probably contributes.)


The final code takes just 2.90ms per iteration.


The rest is not a fair comparison, because it rewrites the used libraries, not the application code.

You can always speed up an application if you rewrite the used libraries to match your specific use case.


It's a fair comparison if the purpose is to guide people in fixing performance issues in their python code.

"That Rust library will be faster than the corresponding python library" is a useful thing to know here.


Usually not by 10x though, unless the original implementation involved some really bad decisions.


The Rust code is still only brute force - using suitable persistent acceleration structures you can probably get a 10x again or maybe even 100x, in 2D a kd-tree is really fast for NNs.

So much faster that the allocations for the result will probably be the bottleneck.


Even just "anemia in dogs" is sufficient.

The first Google hit goes to a page that lists IMHA right away.

I am sure LLMs already are helpful to do medical research. But this case seems not to be a great example to show their superiority to old fashioned googling.


Yea I actually gave the author the benefit of the doubt thinking it must be a really rare thing, but "dog anemia" works even better.


For smaller LLMs, there is also Gnod Search:

https://www.gnod.com/search/ai

Just enter a question and then select which AIs shall reply.


I don't know this product yet, thanks!


    Wyre Payments, the company’s upstream payment
    processor, terminated SpankPay’s account because
    Wyre’s new payment processor, Checkout.com
    doesn’t allow processing for payments related
    to sexual businesses
SpankPay, Wyre, Checkoutcom ... How does this all work? What does the person who wants to pay a sex worker via SpankPay do? Do they use their usual Visa credit card or is the process different?


you change the laws in banking so the risk is much lower to financial companies. Sex work intertwined with trafficking and no company wants to take financial risk. Chase is in the headlines for getting sued for facilitating trafficking.


Increasing the interest rate is supposed to fight inflation.

I often wonder if that really works.

When the risk-free rate rises, doesn't that mean the opposite? That _more_ money will be printed?

When the government says "You give me $100 and I'll give you back more later" - where is this "more" coming from? Isn't it just more debt that will be paid back with more printed money?


You can look at Turkey, which has chosen to fight inflation by lowering interest rates. Turkey’s president is an autocrat who can make this kind of decision unilaterally and his economic beliefs run counter to the mainstream, so it makes for a fascinating experiment. He’s been lowering rates for two years, from 18% to 8.5%.

The results so far seem to support the economist orthodoxy: inflation in Turkey has ran up to 80% compared to a historical average of about 20% (which was roughly in line with the interest rate when Erdogan started his rate-decrease project.)


But was it the lower interest rate that caused the inflation or the printing of money?

Over what time did the inflation rate go up from 20% to 80% and by what percentage did the money supply change during that time?


I'm certainly not any kind of expert on Turkey's economy. I'll just link to graphs that show the effects, someone smarter can debate the cause and effect.

The rate cuts in Turkey began in September 2021:

https://tradingeconomics.com/turkey/interest-rate

The inflation rate soared from 20% to over 80% soon afterwards:

https://tradingeconomics.com/turkey/inflation-cpi

It's now stabilized to "only" 55% because of decreased energy price pressures, apparently.

The M2 money supply in Turkish liras is climbing, but not in the same proportion as the rate cuts and inflation:

https://tradingeconomics.com/turkey/money-supply-m2

Turkey has also been spending its foreign currency reserves to prop up the lira. They've experimented with extraordinary measures like a government guarantee to protect Turkish account holders against currency depreciation, in an effort to make people keep liras in banks rather than hard currency:

https://www.kcl.ac.uk/news/supporting-the-turkish-lira-asses...

So Erdogan's Turkey is an interesting basket case all around — one for future economics textbooks maybe.


    The M2 money supply in Turkish liras is climbing,
    but not in the same proportion as the rate cuts and inflation
Not? It looks like the money supply doubled over the last 12 months.

Does it really need an expert on Turkey's economy to see a relation between the doubling of an asset and the asset being worth half as much afterwards?


There are many other factors like the foreign exchange reserves of Turkey and its commercial banks, which have been depleting.

Consider a case where a Turkish bank held two billion euros in 2021. They exchange half of it for liras in 2022 and receive N billion liras. A year later and after 80% inflation, they exchange the other half for liras and receive 1.8*N billion liras. That's not the government printing money to fund its spending, yet the money supply is increasing just like you'd see on the graph.

Like I wrote in my previous reply, Turkey has a unique program where it guarantees local currency deposits against hard currency exchange rate losses. That's meant to attract deposits and will obviously increase the money supply when locals trade their dollars/euros for liras — but it's not exactly "money printing", rather a completely new layer of risk for the central bank (and the losses may have to be offset by printing money eventually, but importantly that wouldn't show up yet in the graph we're looking at).


What does it mean when you say the turkish bank exchanged their Euros for Liras? Where did the Euros go, where did the Liras come from?


The Turkish central bank provides hard currency liquidity. It's absolutely vital for the economy, as import and export businesses in Turkey can't use the lira for most of their operations because foreign companies don't want that kind of emerging market currency risk.

The Turkish lira is free floating, so the central bank buys and sells liras at market rates. And seems like they're getting desperate to make sure foreign currency stays in the central bank:

https://www.bloomberg.com/news/articles/2023-02-24/turkey-ce...

"The request comes after commercial banks wired a net $2.3 billion to deposit accounts abroad in the first six weeks of the year, one of the people said, asking not to be named because the information is confidential. Hard-currency outflows are hampering efforts to keep the lira stable and inflation in check in the run-up to elections slated for May.

"While there are no regulations preventing banks from wiring capital to their correspondent banks abroad, Turkish officials have said that they want free cash kept in the monetary authority’s coffers."

So, a Turkish business sells a boatload of plums to Germany and gets paid in euros. The euros are wired from Germany to a Turkish bank. The bank's accounts are held in liras, so the business can't keep the euros directly. Instead the bank deposits the euros with the central bank and gets liras at market rate. The central bank now has more hard currency that Turkey's government might eventually use to pay for things like buying fighter jets (or whatever in the budget that's not domestically produced).

The plum business owner isn't very happy about holding liras in his bank account though, because he knows they might be worth 50% less in a year. So he immediately spends the money on things his business needs, paying a bit more than he did last time, just to ensure he can get the products... And that's how local inflation is being fed even by a seemingly positive thing like exporting plums. Government spending wasn't a factor here. But low local interest rate is a factor because lowering the costs of loans enables the plum business owner to spend more liras.


Nothing in this description contradicts my view that printing more of a currency will lower its value.

You showed me a currency that lost 80% of its value while the amount of it was doubled. Not surprising. The plums don't change that.


> When the government says "You give me $100 and I'll give you back more later"

No it's the other way around. The FED rate is the rate for which the FED will lend you money. The government borrows money by writing out government bonds, which' yield (rate) is determined by the market. Every time the FED lends someone money, it basically prints it. Higher interest rates will cause fewer people to borrow money -> less money is printed -> inflation goes down. At least that's how it works in theory.


The theory completes ignores the fact that inflation is driven by two things: external supply shocks and corporate profiteering. There's some catch-up from wage inflation later, but it's a reaction to higher prices not a driver of them.

Tinkering with the money supply is like repainting your house when it's on fire. If your house is unstable it's not because it's the wrong colour. It's because the foundations need underpinning and perhaps a redesign.


>The theory completes ignores the fact that inflation is driven by two things: external supply shocks and corporate profiteering.

Citation please for this supposed "fact".

The accepted wisdom is that inflation is driven by the size of the money supply and the velocity of the money.


> Every time the FED lends someone money, it basically prints it.

It is the commercial/retail banks that create money through credit:

> Most of the money in the economy is created, not by printing presses at the central bank, but by banks when they provide loans.

* https://www.bankofengland.co.uk/explainers/how-is-money-crea...

* https://www.bankofengland.co.uk/quarterly-bulletin/2014/q1/m...

While central bank reserve rates do have impact, there are countries have have no reserve requirements (UK/England being one of them).

The transmission mechanism of monetary policy is… complicated:

* https://www.ecb.europa.eu/mopo/intro/transmission/html/index...

* https://www.chicagofed.org/publications/working-papers/2012/...


No, this is not correct. The term "Fed Rate" is not correct or meaningful either. There are two different things - the Fed Funds Rate and the Discount Rate(also known as the Discount Window.) The Fed Funds Rate is "the rate" being discussed when the Fed raises interest rates[1][2]. The Fed Funds Rate is the interest rates banks charge each other to borrow money overnight to meet their Federal Reserve requirements. When it becomes more expensive for banks to borrow money from each other to meet their overnight Federal Reserve requirements it makes credit more expensive for both the banks and the consumers of a bank's loan products.

Banks can also borrow directly from the Federal Reserve via a facility called the discount window or Fed Discount rate[1]. Banks for a long time have avoided borrowing directly from the Fed as it has had something of stigma attached to it.[3] That has changed recently however(2007-2008.) The Discount Rate is always more than the Fed Funds Rate.

>"Every time the FED lends someone money, it basically prints it."

This is not correct either. The Fed maintains a balance sheet with assets and liabilities similar to a corporation [4]. One of those assets is money they have lent to other financial institutions. They do this by crediting or debiting the bank's account at the Fed. You seem to be confusing the Discount Rate with Quantitative Easing.

[1] https://www.investopedia.com/terms/f/federalfundsrate.asp

[2] https://www.investopedia.com/terms/f/federal_discount_rate.a...

[3] https://www.federalreserve.gov/econres/notes/feds-notes/stig...

[4] https://www.investopedia.com/terms/f/fed-balance-sheet.asp


Does this rate not also cause personal mortgages to rise, due to the increase? This effects monthly payments, on already agreed contracts, which makes homeowners struggle, no?


In the US almost all mortgages are fixed rate, so the monthly payments don't change. The interest rate does not change for the life of the mortgage, often 30 years. Because a mortgage can be refinanced, this causes a downward ratchet on interest rates for mortgages over time. This is one of the ways in which a mortgage is a hedge against inflation and rising costs. There are tens of millions of Americans with a mortgage rate in the 2.5-3.5% range because the mortgages pre-date the current rise in interest rates.

What this does impact is the ability of people to move houses, since a new mortgage would be priced to current market conditions.


The FED lends someone money? Whom do they lend money?


Commercial banks.


Really? I have never heard about the process of banks lending money from the FED.

Do you have a link where this process is described?



My understanding is that increasing the interest rate causes capital to be more likely to seek low-risk guaranteed returns. The effect of this is to disincentivize investments and economic activity in general, as capital is more likely to be "parked" in risk-free debt, rather than seeking other ways of reaching high yield. The unintuitive aspect of it is how inflation could reach 2% when capital has a guaranteed, risk-free way of generating 5%+ yield. But I suppose that could be explained by examining the growing economic inequality of the past 30+ years.


But the "high yield" investments are a zero-sum game. They don't create new money. If you invest in a company and the company is successful, your return is not printed. It comes from the pockets of the companies customers.

The risk-free returns on government bonds are risk free because the government never goes bankrupt. Because it simply prints the money it needs.


When you start a company and a vc gives you a million dollars at a $10 million valuation, 1 million is real, the other 9 just got printed.

When you do labor, you print money. When you take out a loan and commit your future labor to paying interest, you are printing money (converting labor to money)


Not by the definition of money I am using when I refer to "the money supply" or the term "printing money".

I am referring to sum of money the FED has created.


There is always two sides to money. The fed pays government workers, the other side is the worker’s labor. Fed buys bonds, the other side is the bond. Fed sells a bond, it destroys the money it receives back. fed buys gold, the other side is the gold. the other side is as much responsible for the money creation as the fed. Fed doesn’t unilaterally create money.



Money is printed every time a commercial bank makes a loan.

Money is destroyed when government sells treasuries.

If you buy treasuries you aren’t using it to buy goods and services.

When bank buys your debt, you spend the money on goods and services.


There are still those that take a loan, they will need to pay the higher interest. As long as there is a balance there will not need to be money printed.


One can take a loan from the government?


It takes many years and higher rates relative to inflation. Based on precedent, we are going to be in this inflationary period for some time.


No, the debt will be paid back with borrowed money.


If it is borrowed from the FED, then it is still paid back with printed money.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: