HNHacker News
TopNewBestAskShowJobs

Labo333

1,195 karma · joined December 13, 2015

louisabraham.github.io

Founder & CTO of reduck.ai

submissionscomments
Labo333··on Faiss: A library for efficient similarity search
I totally agree and hnswlib is actually much faster than FAISS on CPU.

I'm really happy to see `hnswlib` as a Python dependency since I'm the one who implemented PyPI support: https://github.com/nmslib/hnswlib/pull/140

Labo333··on Text2Video-Zero Code and Weights Released by Picsart AI Research (12G VRAM)
SD models are much smaller so you can probably already run it with the github code.

Image models work well at least: https://huggingface.co/docs/diffusers/optimization/mps

It is even possible to run them in the browser: https://stablediffusionweb.com/

Labo333··on Python-based compiler achieves orders-of-magnitude speedups
I don't understand those benchmarks: why is there no comparison to numba? Also comparisons where C++ is beaten don't seem very realistic.
Labo333··on Launch HN: Pynecone (YC W23) – Web Apps in Pure Python
It really reminds me of https://github.com/miyakogi/wdom but also https://github.com/jupyter-widgets/ipywidgets and https://github.com/flexxui/flexx

The only different aspect is that the goal of Pynecone seems to be web apps over the network and not web interfaces to local programs.

Labo333··on Japanese government offers families 1M yen a child to leave Tokyo
I think the greatest incentive would be to normalize remote work.

Offering tax benefits to companies that move out of Tokyo might be effective but only in the long term.

Labo333··on Solving a Dungeons and Dragons riddle using Prolog
From a more algorithmic point of view, this is exactly the task of topological sorting [1].

And it runs linearly in the number of edges!

I expect Prolog to be slower for large and hard inputs. But Makefiles solve exactly that!

[1]: https://en.m.wikipedia.org/wiki/Topological_sorting

Labo333··on Petals: Run 100B+ language models at home bit-torrent style
Totally agree on that.

Big corps only invest in blockchain because of the buzz words that are used as marketing by the consulting firms to sell their "expertise" and by VCs to sell their companies.

Sure they hope to gain some money, like luxury brands wanting to sell to crypto-billionaires. But crypto was a useful toy, then Ponzi scheme and now it's a closed loop. How long will the bubble last?

Labo333··on Petals: Run 100B+ language models at home bit-torrent style
What I mean is that the current signal-to-noise ratio is way too weak.

This created a lot of bubbles. NFTs are already down by a lot, now yield farming (https://www.bloomberg.com/news/articles/2022-04-25/sam-bankm...) just took a big hit from the FTX case. I see way too many "revolutionnary" projects from fresh graduates. There is no way that tens of thousands of inexperienced people with barely enough CS education to pass programming interviews would magically create innovation just because VCs put a ton of money on them.

Also, can you tell me more about where decentralized tech is today? BitTorrent was a revolution as a way of information sharing, Onion was a revolution for privacy and Bitcoin was a revolution for decentralized ledgers.

Starting from that, IPFS is the continuation of BitTorrent with more features and Ethereum is a more efficient (especially since The Merge) and customizable (smart contracts are advanced checkers for write operations) ledger.

But what are the real world applications of those technologies? What are concrete use cases of Ethereum and IPFS besides payments, records and file sharing?

Surely there are exciting progresses to be made on the technical side like zk-SNARKS but how useful will they be to society?

I think we already have all the technical blocks we need. If there is no real-world adoption maybe we should just wait another 10 years before pumping crazy amounts of money.

Labo333··on Petals: Run 100B+ language models at home bit-torrent style
I would love for most of the Blockchain trend to be converted in efforts towards BitTorrent style projects.

Distributed File Sharing or computation without the whole tokenomics that, while interesting, creates too much attention from scammers.

Labo333··on GPT3/DALL-E2 in Discord, chat like ChatGPT, generate images, and more
Cool project!

I think ChatGPT is a different model from GPT-3, which you are using.

From https://openai.com/blog/chatgpt/:

> ChatGPT is fine-tuned from a model in the GPT-3.5 series

Labo333··on Swing Ratio
Related: https://en.wikipedia.org/wiki/Swing_(jazz_performance_style)
Labo333··on Swing Ratio
Interesting, usually the ratio is 2 as it makes triplets!
Labo333··on SvelteKit 1.0
Can you expand? I don't get how you can use SSR with another language than Node. I always thought one has to use the static adapter.
Labo333··on Debugging Lisp: fix and resume a program from any point in stack
I'm wondering whether it would be possible to build some debugger for Python to fix that!

For example, I modified my IPython config to always activate https://ipython.org/ipython-doc/3/config/extensions/autorelo...

It works well for modules with redefined functions. So if you do

    from module import f1, f2
    
    ans1 = f1()
    ans2 = f2(ans1)
and f2 fails, then you can just modify the code of module and relaunch `ans2 = f2(ans1)`.

What is not available is reloading classes, for example if it looks like:

    from module import Class
    
    c = Class()
    c.f1()
    c.f2()

and there is a bug in f2, then the class won't be redefined.

I guess there is no perfect way to do it (for example what if f2 needs some variables defined in Class.__init__), but the situation is the same for Lisp with its dynamic typing.

So maybe the situation would be to have some command like `%reload Class`.

The other obstacle is restarting from a frame, and I understand that Python's standard exception handling doesn't allow that. But pdb exists so there should be a solution.

Labo333··on Closures and Objects Are Equivalent (2013)
I wrote the blog post: https://louisabraham.github.io/articles/generating-closures
Labo333··on Closures and Objects Are Equivalent (2013)
Reminds me of a university project I did 6 years ago: we had to compute a bunch of shortest paths in a large graph, during the computation of reach [^1]. There were a small number of sources but a large number of queries, that were not easily predictible in advance.

The assignment was quite computation intensive and advised to use C++ or Java.

I had a tradeoff to make on each source between computing a full Dijkstra's (distance to all other nodes) or multiple "lazy" Dijkstra's (stopping upon reaching the target node).

Instead, I had a nice idea: what if I could continue computations at the last known Dijkstra's state?

To implement it, I could either: - create an object, list all variables of my Dijkstra's and put them in a dict state - use an iterator that looks very much like the textbook Dijkstras's and use the `next()` Python method to pass queries, while the state variables AND the instruction pointer are stored in the closure

This is a really good illustration that `next` makes closures "mutable" and "callable" as the link states.

The resulting code of an "AWESOME ONLINE MEMOISED DIJKSTRA" as I wrote in the docstring back then is stupidly small and simple to read [^2]. It is also easy to call: `dijkstra_with_target(graph, source).send(target)`.

In the end, my Python code (executed with Pypy) outperformed all C++ and Java implementations by an order of magnitude.

I should write a blog post about this (and almost did here)!

[^1]: https://www.irif.fr/~kosowski/INF421-2016/problem.html

[^2]: https://github.com/louisabraham/INF421-project/blob/master/s...

Labo333··on KDE beats macOS
Most of their concerns are addressable by external apps like Rectangle, AltTab and Maccy. Try those, they are free and open source 10x productivity boosters!
Labo333··on Advice that worked for me
> then a billion users. If there’s, what, 100,000 seconds in a day, if each user does 10 clicks per day, on average, then I think that gets you a million transactions per second, ballpark

1e9 * 10 / 1e5 = 1e5 transactions per second

Maybe the author needs to apply their advice and start to "think in numbers" \o/

Jokes aside and apart from the really dangerous idea of sleeping less, I really liked the article!

Labo333··on Review of the Kinesis Advantage360 Professional
I got the Kinesis Advantage2 last year. I got used to it, almost reaching my laptop typing speed. But I actually don't find it super comfortable.

To be honest, no keyboard matches the comfort of my macbook with the keyboard being under the level of the palms.

I also more recently got the keychron K3 (low profile) and realized that the thing I don't like in the KA2 is my wrists being locked.

I think it's not enough to consider a keyboard without a complete setup, including where the hands / arms will rest and where the mouse is positioned.

For example even the distance of my laptop stand makes a huge difference because it affects how far my keyboard can be from my torso, hence whether where my arms rest on the table.

Labo333··on Getting Out of a Rut
On top of the other answers that are really helpful, I would say to:

- take a break, go to vacation for 2 weeks

- get a regular sleep schedule with 8 hours.

- have a healthy diet without sugar (dopamine)

- do some exercise and cleaning instead of videos and games

- try L-theanine (possibly with caffeine). It helped me a ton in similar situations.

Labo333··on Show HN: I built a site that finds the cheapest place to buy a book
I found a site that is even cheaper: https://z-lib.org/
Labo333··on Nanking Massacre Photographic Proof
A guy found an album of photographs that includes unprecedented photos of Nanking's massacre. But they don't show them...
Labo333··on Knuth's Art of Computer Programming, V 4B, has gone into print
I'm currently going through Fascicule 6A dedicated to SAT solving and I can tell you it is by far the best reference. I haven't found anywhere else a complete reference that builds a SAT solver from scratch while explaining why each technique is used.

Regarding more classical algorithms, I never bothered reading the other fascicles. I think there are much more practical references but none is as complete and detailed as Knuth's treatment. He goes to the bottom of any algorithm, not just proving it has the right complexity but also asking what inputs are the most difficult, what other problems it can solve, etc. In the end you understand the field much better and have a good idea of what the boundary of knowledge (ie research) looks like.

But, and I say that as an ICPC world finalist, if you just want to solve practical problems you probably won't need TAOCP.

Labo333··on Common Lisp vs Racket
Those days I'm really rooting for PicoLisp (https://picolisp.com/wiki/?home)
Labo333··on List of Creepypastas
I'm not sure it qualifies as a "story" but here is one of the scariest copypasta I know, just explaining how you can die of rabies: https://www.reddit.com/r/copypasta/comments/7qwtd5/rabies_is...
Labo333··on Class action against Oracle’s worldwide surveillance machine
A lot of applications sell user data. Like menstrual cycle for Flo, seropositive status for Grindr. A lot of apps sell your location data.

Plus there is a very overlooked category of corporate software selling data, like payrolls. This can be used to target you better (eg can you afford that product). Another example is Salesforce selling consumer data to marketing departments: https://www.salesforce.com/products/marketing-cloud/data-sha...

Labo333··on How to create a blog post title optimizer with GPT-3 and Hacker News data
Should we be concerned that the author is "Data Scientist at BuzzFeed"?
Labo333··on Lisp.py
Thanks for the link! I think in that case it was made with https://pycco-docs.github.io/pycco/
Labo333··on Apple previews Lockdown Mode
What about E2EE backups? https://www.reuters.com/article/us-apple-fbi-icloud-exclusiv...
Labo333··on SQLite or PostgreSQL? It's Complicated
The major drawback I encountered when building upon SQLite is concurrency of writes.

I have a lot of worker processes writing new data.

With SQLite, I was getting a lot of "Database locked" errors and ended up having to use pg.

← PreviousPage 3 of 7Next →