HNHacker News
TopNewBestAskShowJobs

ggerganov

2,089 karma · joined January 11, 2018

https://ggerganov.com
submissionscomments
ggerganov··on Run Stable Diffusion on Your M1 Mac’s GPU
The model is 4GB, not 4TB
ggerganov··on Show HN: Text-based UI (TUI) for a Slack client (mock)
Hi HN,

I did this little project over the weekend and thought you might find it fun. It's a mock UI for Slack running in the terminal. The demo is written in C++ using ImTui. You can quickly give it a try via the Emscripten port [0].

Cheers!

[0] - https://slack.ggerganov.com

ggerganov··on Ask HN: Increase Key Repeat rate on Mac OS beyond normal limits
I've been programming in Vim for a very long time and even though I use some of the available jump commands, I still find it very useful to have a fast key repeat rate. In most cases it's simply faster to start going to where I want to go, instead of calculating how many character to jump left or right, how many lines to jump up or down or find the closest unique pattern of symbols to search for.

It's just bizarre that Mac OS has such a small cap on the Key Repeat rate. Wondering if there is a way around this.

Edit: I do have a powerful plugin [0] for jumping which I often use, but still - in some cases I just want to scroll all the way there. Fast.

[0] - https://github.com/justinmk/vim-sneak

ggerganov··on Ask HN: Increase Key Repeat rate on Mac OS beyond normal limits
I'm just very used to the fast repeat rate on my Ubuntu workstation and recently started using my MacBook. I like having high repeat rate because it allows me to navigate much faster in my editor while developing stuff.
ggerganov··on Show HN: GGWave – Data over Sound for Microcontrollers
Hi HN,

I recently ported my data-over-sound library called "ggwave" to run on microcontrollers and I though it might be of interest for people working on various IoT project. Below are some technical details and if you just want a quick demo, you can watch this short demonstration:

https://youtu.be/aj_GLBtU3Vw

The library is written in C++, but to make it work on embedded devices I had to avoid using the standard library and reduce the memory usage and memory allocations to a minimum. As a result, I am now considering porting it to plain C, since I don't gain much from C++ at this point.

The communication protocols are based on frequency-shift keying (FSK) modulation. The library has built-in forward error correction using Reed-Solomon codes and optionally supports Direct Sequence Spread which seems to improve the robustness of the transmission. The protocols that are suitable for microcontrollers provide data rate speeds of about 5-10 B/second and the transmission is reliable withinh 0.5 - 1.0 m. They operate in the [1.0kHz - 2.5kHz] range, so your device has to support a sample rate of at least 6000 Hz in order to be able to receive sound data.

I have tested the library using an Arduino RP2040 Connect board which has a built-in microphone. Also, I did tests using an ESP32 microcontroller with external analog microphone. The ESP32 has a 12-bit ADC that can be used to process the analog input from the microphone in real-time. Both devices are demonstrated in the video above.

The library also allows the microcontrollers to transmit data - you just need to attach a buzzer or a speaker to one of the digital output pins and use a suitable mono-tone "ggwave" transmission protocol as demonstrated in the examples.

The project is open-source and available on Github [0] and provides many different examples. I am looking forward to some interesting ideas of using this type of communication on low-end microcontrollers, so if you have one - definitely let me know!

[0] - https://github.com/ggerganov/ggwave

ggerganov··on Doom RPG Ported to PC
Tangentially related - you can play a turn-based Doom (1993) on Twitter:

https://twitter.com/tweet2doom/status/1444355917160534024

There is a tree explorer that shows you all moves that have been played so far by everyone [0]. If you are interested how I made this, you can check the Github repo [1].

[0] - https://tweet2doom.github.io

[1] - https://github.com/ggerganov/tweet2doom

ggerganov··on Explaining Code Using ASCII Art
There is a "Boxart" button at the bottom of the page to toggle between pure ASCII chars and "extended" ASCII (not sure what is the proper name).
ggerganov··on Explaining Code Using ASCII Art
The way I use ASCII art diagrams in my source-code is through this simple web service that I hosted:

https://dot-to-ascii.ggerganov.com

I generate the ASCII graph and then paste it in the comments together with a link to the service. This way I can go back later and update it if needed:

/*

Link: https://dot-to-ascii.ggerganov.com/?src_hash=476410d3

                     0.6
                 ┌─────────────────────────┐
                 ▼                         │
  ┌───┐  0.8   ┌───┐  0.1   ┌───┐  0.7   ┌───┐  0.2   ┌───┐
  │ d │ ─────▶ │   │ ◀───── │ e │ ─────▶ │ a │ ─────▶ │ b │
  └───┘        │ c │        └───┘        └───┘        └───┘
               │   │  0.4                               │
               │   │ ◀──────────────────────────────────┘
               └───┘
*/
ggerganov··on GitHub Copilot is generally available
$10/month is a perfect price - that was my exact estimate of what I was willing to pay for this service when it becomes non-free.

To everyone expecting Copilot to magically write the code they are thinking about - you are missing the point. There is a learning curve of using this service that allows you to be more efficient in expressing your ideas. It's not about doing all the work for you. It's like auto-complete on the next level.

Licensing concerns - oh come on.. what is the big deal? There are millions of "for (int i ..)" loops out there. Like anyone gives a damn about 5 auto-generate lines being _probably_ copied from somewhere. Moreover, if you used Copilot just a bit you would know that is not how it works.

ggerganov··on Web Audio Modem (2017)
I don't know the paper, but I'm actually working on an Arduino library for data over sound and I think it kind of sounds similar to R2D2. Here is a 1 min demo if you are interested:

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

ggerganov··on Acoustic Keyboard Eavesdropping
Hey, author here - great to see this posted on HN again. Let me know if you have any questions.

I notice comments that the approach is not working for various setups. I recommend starting with the most simple test - using Keytap [0] and training it with just 2 keys (for example 'q' and 'p' on QWERTY keyboard). You should get nearly 100% recall rate with "Average CC" above 0.80 for each of the 2 keys. If this is not the case, then Keytap will most certainly not work for your setup.

[0] https://keytap.ggerganov.com

ggerganov··on DALL-E 2 open source implementation
Allegedly, based on info from a DALL-E 2 paper, it takes about 100k-200k GPU hours to train the model:

https://github.com/lucidrains/DALLE2-pytorch/issues/22#issue...

ggerganov··on A modern self-referential weight matrix that learns to modify itself
I would make a "Show HN" post
ggerganov··on Show HN: Zaplib – Speed up your webapp with Rust+Wasm
I've been using a similar stack (C++ and WASM) to build some simple applications and I enjoy it very much. For the UI components, text rendering and layout I use Dear ImGui [0] as I am very familiar with it and it allows me to implement GUIs very fast. The biggest convenience is that you can run the same code both as a native application and as a web app. The biggest drawback is you usually get 100% CPU usage when there is an active animation in the WebGL canvas because you need to redraw everything (similar to the OP's example).

If you are interested, checkout my Github template repo [1] - it contains a few examples:

[0] https://github.com/ocornut/imgui

[1] https://github.com/ggerganov/ggweb

ggerganov··on Show HN: I made a puzzle game in HTML5
Is lvl 23 solvable?

I quickly solved 7 levels and then tried doing lvl 23 and have been stuck on it for 10 minutes, always ending up with 2 circles next to each other that I cannot swap.

Cool game!

ggerganov··on Minimodem – general-purpose software audio FSK modem
Yes absolutely! (Edit: or maybe not :-) see sibling comment for more info)

Actually, the "Waver" youtube video linked at the top of the README has an embedded ultrasound transmission at around 0:36. I can for example decode the message on my iPhone by simply running the Waver app and playing the video on my PC.

Some people have already done some work for AV sync in the issues of the project [0].

[0] https://github.com/ggerganov/ggwave/issues/46

ggerganov··on Minimodem – general-purpose software audio FSK modem
Probably, but I suppose you would need lots of training data in various surrounding conditions and hardware (mic, speakers).

I wanted to experiment with using a mic-array in order to improve the SNR. Got a 4 Mic ReSpeaker [0] some time ago, but haven't played with it yet. My expectation is that capturing the audio simultaneously with multiple mics should reduce the noise and thus improve the robustness of the transmission allowing to increase the bandwidth.

[0] https://respeaker.io/4_mic_array/

ggerganov··on Minimodem – general-purpose software audio FSK modem
If you are interested in transmitting data over sound between airgapped devices, make sure to also checkout ggwave [0]. I've been working on this library on and off during the past year in my free time. I focused on making a FSK protocol that is robust in noisy environments at the cost of low bandwidth. Found some fun applications in various hobby projects.

[0] https://github.com/ggerganov/ggwave

ggerganov··on Ask HN: How does a CPU communicate with a GPU?
Another tool similar to this is https://dot-to-ascii.ggerganov.com
ggerganov··on Show HN: HNGuessr – Guessing the missing words in HN stories
Thanks for the suggestion! Definitely sounds fun :D
ggerganov··on Show HN: HNGuessr – Guessing the missing words in HN stories
Hi HN,

I made this little game where you have to guess the missing words in the titles of Hacker News stories. Hope you find it as fun as I do :) Cheers

ggerganov··on Some tiny personal programs I've written
I've always wondered what would be the chance to win the lottery if I played consistently a certain set of numbers. Every day, no excuses.

So I wrote a script to scrape the lottery site archive and check retrospectively the success rate [0]. Well.. the result is what you would have expected.

[0] https://ggerganov.github.io/lottery-check

Bonus - clicking the "Random" button helps you really understand how futile playing the lottery actually is.

ggerganov··on Ukraine island defenders who told Russian navy ‘go f yourself’ may be alive
I don't understand how the audio record was obtained in the first place - I can't imagine the defenders tweeting or sharing it while being attacked by an enemy warship.
ggerganov··on Criterion: A cross-platform C and C++ unit testing framework
A bit off topic - if I wanted to make a gif similar to the one in the README of this project, what tool would I need to use? The typing seems to be automated somehow to be at a constant rate.
ggerganov··on Show HN: Test your shape rotation skills
Cool!

Small issue I found - when I run this as native app, always the 2 bottom-left shapes are the answer.

ggerganov··on Show HN: Morse Codle – Wordle with Morse Code
My real-time morse code audio decoder handles this pretty well [0]. Just make sure to enable the "Full speed" setting in Morse Codle.

[0] https://ggmorse.ggerganov.com

ggerganov··on Show HN: An in-browser text editor to easily create static HTML
The style looks clean and simple - I like it. It seems to have a good set of presentation tools already.

I would recommend to emphasise less on the drawbacks (i.e. not being completely ready, not documented well enough, etc.). The initial warning should be enough for anyone interested in the project to know it's in its early stages.

Why not host the source on Github for example?

ggerganov··on The Classic C Quine (2003)
Replying to some old comment of mine to demonstrate hnreplies [0] functionality

[0] https://news.ycombinator.com/item?id=30014298

ggerganov··on Show HN: Get latest replies to an HN user
Thanks - I didn't know this existed (I now realize that I didn't even bother to check if the "hnreplies" name has been used already..)
ggerganov··on Show HN: Get latest replies to an HN user
I completely agree - I just wondered how one would do that and wrote the Bash script. Then I tried to optimize it with C++ and finally thought - why not share.

Btw, your comment somehow didn't get detected by my service :-). First I thought I have a bug somewhere, but then I checked the result from the official HN API and for some reason it fails to return a result for the item id (30014342) of your comment [0]. Strange .. haven't seen this before.

[0] https://hacker-news.firebaseio.com/v0/item/30014342.json

Edit: and it just showed up -- I guess it can take some time.

← PreviousPage 4 of 9Next →