HNHacker News
TopNewBestAskShowJobs

mg

7,565 karma · joined August 19, 2011

I like to build web projects and to meet like-minded people.

www.gibney.org

submissionscomments
mg··on Exo: Run your own AI cluster at home with everyday devices
Ah yes. At first, I thought that since it is all one-way forward-only communication, latency would only affect the time to the first token.

But I guess the final output needs to be sent back to the first node before it can continue. So if there are 50 nodes with a latency of 40ms each, each token would take 2s to process.

mg··on Exo: Run your own AI cluster at home with everyday devices
That's exciting. So we could build a SETI@home style network of even the largest models.

I wonder if training could be done in this way too.

mg··on Exo: Run your own AI cluster at home with everyday devices
Woops! I would have thought the number of neurons roughly equals the number of parameters, but you are right. The number of parameters is much higher.
mg··on A Review of Linux on Surface Pro 4
Yay, that sounds promising. Which protector do you use?
mg··on A Review of Linux on Surface Pro 4
One reason I don't use tablet is that they all have glossy screens.

And the new iPad with matte screen has a glossy frame around it. I tried it in a store and the glare around the otherwise nicely matte screen was uncomfortable.

Does anyone here have experience how well matte screen protectors for tablets work? I see them mostly discussed for they haptic feel when drawing on the tablet. I wonder how well they work to have a good experience when coding on the tablet.

mg··on Exo: Run your own AI cluster at home with everyday devices
Interesting. Let's do the math ...

Let's say the model has 50B parameters and 50 layers. That would mean about one billion values have to travel through the wifi for every generated token?

I wonder how much data that is in bytes and how long it takes to transfer them.

mg··on Exo: Run your own AI cluster at home with everyday devices

    This enables you to run larger models
    than you would be able to on any single
    device.
No further explanation on how this is supposed to work?

If some layers of the neural network are on deviceA and some layers are on deviceB, wouldn't that mean that for every token generated, all output data from the last layer on deviceA have to be transferred to deviceB?

mg··on Show HN: Hacker News homepage with links to comments ordered by most recent
I also like to read the homepage chronologically. I use a bookmarklet to do this:

https://x.com/marekgibney/status/1551483561621979136

This is how I have been reading HN for years now.

It jumps to the next newest post every time it is clicked.

I updated it with a few comfort functions meanwhile. When clicked while not on HN, it goes to HN. And keyboard navigation is possible by pressing "n" to get to the next post.

It also works in threads and on the "comments by user" pages. So for example to see new replies to my own comments, I go to my comments page and use it there.

This is the most recent version:

    javascript:(function()%7Bif%20(!location.href.match('ycom'))%0A%20%20%20%20location.href%3D'https%3A%2F%2Fnews.ycombinator.com'%3B%0A%0AdoTheMagic%20%3D%20function()%20%7B%0A%20%20%20%20if%20(typeof%20e!%3D%3D'undefined')%0A%20%20%20%20%20%20%20%20e.style.background%3D'%23c0c0c0'%3B%0A%0A%20%20%20%20e%3DArray.from(document.querySelectorAll('.age%20a%3Anot(.seen)')).sort().at(-1)%3Be.style.background%3D'%23ff0'%3B%0A%20%20%20%20e.classList.add('seen')%3B%0A%20%20%20%20e.scrollIntoView(%7Bbehavior%3A%22smooth%22%2Cblock%3A%22center%22%2Cinline%3A%22nearest%22%7D)%3B%0A%7D%0A%0AdoTheMagic()%3B%0A%0Aif%20(typeof%20theMagicIsActive%3D%3D'undefined')%20%7B%0A%20%20%20%20document.addEventListener(%22keydown%22%2C%20function(evnt)%20%7B%0A%20%20%20%20%20%20%20%20if%20(evnt.key%20%3D%3D%3D%20%22n%22)%20doTheMagic()%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20theMagicIsActive%20%3D%20true%3B%0A%7D%7D)()
If you want to customize it, you can convert it to clean code, edit it and convert it back into a bookmarklet with my bookmarklet editor:

https://www.gibney.org/bookmarklet_editor

mg··on Wikipedia is rolling out dark mode support
When I want to use a site in darkmode, I always use this code as a bookmarklet:

    s=document.createElement('style');
    s.textContent=`
        * {
            color: #2c2 !important;
            background: #222 !important;
            font-family: arial !important;
        }
    `;
    document.head.appendChild(s);
I use a lot of bookmarklets, so I wrote a tool to convert clean code to bookmarklets and vice versa:

https://www.gibney.org/bookmarklet_editor

mg··on Wikipedia is rolling out dark mode support
Me too, although I use bookmarklets instead of extensions.

A bookmarklet can change images too.

We would just have to decide on an algorigthm for the images.

For example here on HN - the algo could detect the similarity between the orange in the title bar and the orange in the Logo. And change the logo accordingly.

Or the site could add some semantic info on how the colors should behave.

mg··on Wikipedia is rolling out dark mode support
I still think dark mode should be a browser feature. Not a feature of every website.

In a broader sense, the whole design of a site could be selectable via the browser. Similar to how CSS Zengarden works:

https://www.csszengarden.com

But with layouts that are stored on the user's computer and applicable to every website.

mg··on Show HN: Dut – a fast Linux disk usage calculator
I have this in my bashrc:

    alias duwim='du --apparent-size -c -s -B1048576 * | sort -g'
It produces a similar output, showing a list of directories and their sizes under the current dir.

The name "duwim" stands for "du what I mean". It came naturally after I dabbled for quite a while to figure out how to make du do what I mean.

mg··on I miss the old IndieHackers website, so I started an alternative
I would love something like this if it where completely free of visual distractions. Purely text based like HN.

Using HN is kind of giving me a nice "easy time" without colors, images or animations. Using a site that has a lot of visually "loud" elements takes away energy from me.

Another aspect that would be nice is if everybody would announce the city they are in, so people could come together for local "builder meetups".

mg··on Children's daily sugar consumption halved just a year after tax, study finds
Next: Carbon Tax
mg··on Show HN: Jb / json.bash – Command-line tool (and bash library) that creates JSON
I like the syntax to send typed values from the terminal:

    jb id=42 size:number=42 surname=null data:null

    => {"id":"42","size":42,"surname":"null","data":null}
I never had the need to use typed arguments in bash, but if I ever have it, this might be the syntax I'd use.

In fact, I was thinking about such a syntax recently. I am writing a tool which lets you call functions in Python modules from the command line. At first, I thought I need to define the argument types on the command line. But then I decided it is more convenient to use inspection and auto-convert the values to the needed types.

mg··on Multivitamin does not improve longevity
From the conclusion section:

    MV use was not associated with lower all-cause
    mortality risk in the first (multivariable-adjusted
    HR, 1.04; 95% CI, 1.02-1.07) or second (multivariable-
    adjusted HR, 1.04; 95% CI, 0.99-1.08) halves of
    follow-up.
Do I read this correctly, that the hazard rate in the multivitamin group was 4% higher than in the non-multivitamin group?

And do I read the CI of 1.02-1.07 correctly in that this difference is statistically significant?

mg··on Ask HN: Any tool to generate AI images with exact same uploaded product images?
In that image, a little bit of the backside of the cap is visible. The dark border at the right bottom.

So as I understand it, the AI would have to figure that out on its own and remove it before it adds the boy to the image?

Also, that image has watermarks all over it. Does that mean the AI has to detect and remove those?

The perspective of the cap is rather unusual for a photo on a human. As it would cover the eyes. Does that mean the eyes of the boy would be covered in the result? Or do you expect the AI to change the perspective of the product photo?

mg··on Ask HN: Any tool to generate AI images with exact same uploaded product images?
I think the description of what you want to achieve is not clear.

Can you link to an example image which you would upload and then describe based on that example what the generated image should look like?

mg··on At 50 Years Old, Is SQL Becoming a Niche Skill?
You want to drop the ability to group data from database software?

Some issues come to mind:

Grouping on the client would mean that you have to send the ungrouped data over the wire/air. Which might be orders of magnitude more data than the client needs. What if "cars" is a table of car photos made over the last 15 years and there are 20 million photos of BMWs in there? You send all the 20 million rows to the client to crunch it down to 15 rows?

The ungrouped data might be something the client is not allowed to see.

Depending on the type of grouping, the client would have to reimplement fast and efficient algorithms that have been tested and optimized for decades in RDBMs. Good luck, matching that by writing some JS for the browser.

mg··on At 50 Years Old, Is SQL Becoming a Niche Skill?
So is the obj you created.
mg··on At 50 Years Old, Is SQL Becoming a Niche Skill?
It looks like "row" is already the object you want. Why make a copy of it? And why copy it by copying each property individually?
mg··on At 50 Years Old, Is SQL Becoming a Niche Skill?
Like all alternatives to SQL I have seen, this is not as lean and readable as SQL.
mg··on At 50 Years Old, Is SQL Becoming a Niche Skill?
It is certainly possible, but is it as lean and readable?
mg··on At 50 Years Old, Is SQL Becoming a Niche Skill?
It seems either the group or the order is missing?
mg··on At 50 Years Old, Is SQL Becoming a Niche Skill?
How do you do

    SELECT AVG(price) FROM cars
    WHERE brand='BMW'
    GROUP BY year
    ORDER BY year
without SQL?

So far, every alternative syntax I have encountered was less human readable and/or less concise.

I think SQL will never be replaced because it is not really something that was invented but rather the simple consequence of wanting to store and retreive data.

You could replace "SELECT" with "GET" or "FETCH". But in the end you need to define what action you want to perform. You could replace "WHERE" with "FILTER" or "CONDITION". But in the end you need to define what you want to retreive. Etc. So by just stating the neccessary information, you always end up with SQL. And every real alternative has the problem of being less concise, less easy to read and less easy to write.

mg··on What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
I tried it like this:

    1: apt install ruby
    2: Put your code in test.rb
    3: ruby test.rb
I then I got:

    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    \e[0m
        current directory: /var/lib/gems/3.1.0/gems/stringio-3.1.1/ext/stringio
    /usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240626-4044-iylnuy.rb extconf.rb
    mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

    You might have to install separate package for the ruby development
    environment, ruby-dev or ruby-devel for example.
So I tried:

    4: apt install ruby-dev
    5: ruby test.rb
Then I got:

    [4147, #<Thread:0x00007f9a4af6bc60 run>, #<NameError: uninitialized constant Gem::Source
    (defined?(@source) && @source) || Gem::Source::Installed.new
                                         ^^^^^^^^
mg··on What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
You never know into what a project will develop. So it is nice to know you can expand it into anything, even when you start simple.
mg··on What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
Cool. What would be the steps from a fresh Debian to get it running and see it in action?
mg··on What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
A lot could be said about it, but the first thing that comes to mind is that not every application uses a db.

And not every application that uses a db needs an ORM.

You probably can build an ORM into the single file. But I'm not saying every application should be developed as a single file forever. I just like that you can start with one and expand later.

mg··on What's up Python? Django get background tasks, a new REPL, bye bye gunicorn
Is the db mandatory in Rails or could the db specific lines be removed from the code if no db is needed?
← PreviousPage 13 of 34Next →