HNHacker News
TopNewBestAskShowJobs

klavinski

198 karma · joined February 19, 2018

Email: kamil (at) withcomment (dot) com

Website: https://withcomment.com/kamil

submissionscomments
klavinski··on Ask HN: How do you find new games to play?
Steam250 [0] lists top games on Steam, and you can filter by tag and period. Additionally, it features a "hidden gems" section, with highly-rated but unpopular titles.

[0] https://steam250.com/

klavinski··on Using Llamafiles for embeddings in local RAG applications
I have built a Chrome extension to do this one year ago: [0]

Here is the list of technological problems:

1. When is a page ready to be indexed? Many websites are dynamic.

2. How to find the relevant content? (To avoid indexing noise)

3. How to keep an acceptable performance? Computing embeddings on each page is enough to transform a laptop into a small helicopter with its fans. (I used 384 as the embedding dimension. Below, too imprecise; above, too compute-heavy).

4. How to chunk a page? It is not enough to split the content into sentences. You must add context to them.

5. How to rank the results of a search? PageRank is not applicable here.

[0] https://www.youtube.com/watch?v=GYwJu5Kv-rA

klavinski··on Building a hybrid native application with Gleam and Tauri
For the most straightforward nominative pattern matching, I would write a small match function:

    type A = { kind: "kindA", a: "dataA" }
    type B = { kind: "kindB", b: "dataB" }
    type Sum = A | B

    const match = <
        const V extends { kind: string },
        const C extends { [ kind in V[ "kind" ] ]: ( value: V & { kind: kind } ) => unknown }
    >( value: V, cases: C ) => cases[ value.kind as V[ "kind" ] ]( value ) as ReturnType<C[ V[ "kind" ] ]>

    // You check the type of result, change the type of value to A or B, make the cases non-exhaustive...
    const howToUse = ( value: Sum ) => {
        const result = match( value, {
            kindA: _ => _.a,
            kindB: _ => _.b
        } )
    }
You can test it here: https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDeU...
klavinski··on Show HN: Librarian - Semantic Bookmark Search Using Transformers
I also built such an extension half a year ago [0]. The first iteration was a local-first natural-language full-text search for the browser history [1]. The second iteration was focusing on bookmarks [2].

None of these could spark enough interest to get feedback on what users want. I am sharing this experience so that you may study my attempt, if you want.

[0] https://getpinbot.com/

[1] https://www.youtube.com/watch?v=GYwJu5Kv-rA

[2] https://www.youtube.com/watch?v=PQh1qhvxZzc

klavinski··on Find Legal Moves in Brass Birmingham with Datalog
The most clever way I have found is through a mathematic structure with the same shape, i.e., a magic square:

  2 7 6
  9 5 1
  4 3 8
Here, if a triplet of one player's cells sums to 15, that player has won.
klavinski··on Show HN: Autolicious – AI-powered bookmark cataloging Chrome extension
If you want a similar extension which works without sending data to an external server, I made Pinbot as an experiment: https://getpinbot.com
klavinski··on Client harassed by The Type founders for using Proxima Nova font on website
If you need a free alternative, the closest I know of is Metropolis[0] by Chris Simpson, although it is closer to Gotham.

[0] https://github.com/dw5/metropolis

klavinski··on Physics Engine 13x Faster than Matter.js
Good work, Altanis! After exactness, speed is certainly a priority. For my engine, I settled on Rapier, which also offers excellent performance (and determinism!). Do you think you could compare it with Kinetics?

Can you provide a high-level view of how you achieve that speed? I have also heard of eXtended Position-Based Dynamics as one of the latest improvements in physics engine. Do you have a perspective on that?

klavinski··on More than 75% of Steam games tested are playable or verified on the Steam Deck
Steam 250 [0] lists the top-rated games. You can filter by tags, price, date; but the most interesting category for me is the "hidden gems".

[0] https://steam250.com/

klavinski··on Phind AI search engine system prompt (GPT-4)
Probably A/B testing. If I ran such a service, I would try different prompts to find the best, by checking the user behaviour: do they stop rephrasing the question? If so, the prompt was probably effective.
klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
Actually, a tab only sends its content to a unique offscreen document[0], and because of the single-threaded nature of JS, it works as a queue. So, you are right, throttling might be feasible without too much hurdle.

[0] https://developer.chrome.com/docs/extensions/reference/offsc...

klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
I often prototype in Greasemonkey myself, so I understand and agree with your point. However, there are many requirements (the AI model weighs 90Mb; I run it in a sandboxed iframe because it uses `eval` and I want to guarantee it would not do something bad; but initialising the iframe and loading the model on every page would be quite cumbersome; etc.) that made more sense in an extension.
klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
That information is very important for me, thank you.

Currently, to avoid computing the embedding of a sentence twice, I put them in a JS Map as a cache. I will find a way to empty the cache.

klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
How would you want to do it? Among the fields, have a checkbox "search among the bookmarks"?
klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
Yes, for the proof of concept. It is an arbitrary limit, as I am not completely sure how people would use the extension: it may fill the users' storage too quickly. In the future, I may consider adding a counter instead (removing websites which have not been visited/searched for X days).
klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
It does not work yet for PDFs, but I agree it would be amazing. Full-text search for one's library and documents!

Thank you for reporting the bug regarding Twitter. I will investigate.

klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
Thank you for letting me know, this information is crucial. The CPU-only compatibility of transformers.js might make it too slow for text-heavy websites. I will immediately study a way to throttle it.

However, the Chrome web store review might take some time to allow the update.

klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
VoidTools Everything is truly an excellent tool! I have indeed considered making a desktop version. It is more complex than the current proof of concept, but a private one-stop shop for AI search is definitely a great vision!
klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
Thank you the for the idea! I will add "allow a user-defined forbidden list of websites" to the ideas on the Discord server.

Regarding the privacy policy, you have a point: I did not put one on the website, as everything works offline, but people may indeed look for one.

klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
I targeted Chrome for the proof of concept because of its market share, but to be honest, I use and prefer Firefox as my default browser.

Manifest v3 is a remarkably hostile development environment: Google knows that people block advertisements with extensions and want to limit their scope. I had to adapt a lot of code, and as such, making it work cross-browser would require more than a few changes. But I understand your point and want Pinbot to run on more browsers, especially Firefox!

klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
No, that is what I find exciting! The AI model runs entirely on your device, and your data is never sent anywhere. You can inspect the Developer tools of the extension if you are interested: it works offline!
klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
The extension uses an SQLite database in the Origin Private File System[0]. Disabling the extension keeps the database, while removing it deletes the database.

Regarding performance, here is how it works: the extension accumulates page changes (thanks to a Mutation Observer[1], so I do not have to regularly read and compare the page) for some time, then checks if the sentences are in the database. Only unknown sentences are converted to embeddings.

The extension is CPU-only currently (WebGPU support was not merged yet in transformers.js), so it may be slow. I understand your concern, while that is a proof of concept, I consider a good performance to be vital to a good user experience.

[0] https://developer.chrome.com/blog/sqlite-wasm-in-the-browser... [1] https://developer.mozilla.org/en-US/docs/Web/API/MutationObs...

klavinski··on Show HN: Pinbot – An extension to privately search one's browser history with AI
Currently, yes. Allowing a user to crawl his recent history just after installing the extension is a great idea! I added it on the Discord server.
klavinski··on Building a new functional programming language
See also the Higher-Order Virtual Machine for a functional, non-garbage-collected, and parallel runtime: https://github.com/HigherOrderCO/HVM
klavinski··on Ask HN: Who wants to be hired? (March 2023)
Location: France

Remote: Yes, only

Willing to relocate: No

Technologies: currently using React (top 5% of LinkedIn test-takers), TypeScript (I can perform arithmetic with types), Next.js, Vite.js, TRPC, Tauri and Capacitor for cross-platform, CRDTs, other web technologies, Postgres, SQLite. Believer in statically-typed functional (like OCaml)/logic (like Prolog) programming, solvers (like Z3/CVC5), probabilistic programming.

Résumé/CV: https://drive.google.com/file/d/1HylyUPPZS2lcHLYTX0yI5OfdTsu...

Email: kamil (at) withcomment (dot) com

Hello, I am Kamil, an aspiring Renaissance humanist who became a frontend-leaning software engineer. Other than graduating as the top CS student from Sorbonne Université (1st/194 students), I have included my major professional achievements in my CV. Outside of work, I keep looking for the fundamental nature of things — through music theory, great tales, mathematics, or human virtue.

Nowadays, I want to focus on doing my best work, without other worries: work-life balance (ideally a 4-day week), pay, office politics, etc. Working with coworkers I can trust for their competence and integrity is important, as well as being challenged intellectually and keeping learning.

Emails require a salary range to be considered.

klavinski··on Firecracker internals: Inside the technology powering AWS Lambda (2021)
Not a drop-in replacement: the OCI image entry point is not automatically executed.

Issue opened in 2021: https://github.com/weaveworks/ignite/issues/874

klavinski··on Ask HN: Which big tech companies are still (or permanently) remote?
Levels.fyi has a list of remote companies: https://www.levels.fyi/remote/

You can run the following script in your browser console to show only the fully remote listings.

  document.querySelectorAll("tr").forEach(_=>!_.textContent.includes("Fully Remote")&&_.remove())
klavinski··on Ask HN: What is your default font for coding and terminal?
Julia Mono: https://juliamono.netlify.app/

By far the best monospaced font I have seen, discovered on HN. Before that, I used Ligconsolata (Inconsolata with ligatures).

klavinski··on Why have female animals evolved such wild genitals?
Sexuality is a solution to Muller's ratchet [0].

[0] https://thehighbook.netlify.app/muller's-ratchet (first half)

klavinski··on Show HN: Hubfs – File System for GitHub
If you are signed in, you can hit '.' on your keyboard when browsing a GitHub repo to open it in VS Code in your browser.
Page 1 of 2Next →