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

Nice project, always interesting to see HTMX-inspired frameworks.

If you want something even more minimalistic, I did Swap.js: 100 lines of code, handles AJAX navigation, browser history, custom listeners when parts of DOM are swapped, etc.

https://github.com/josephernest/Swap.js

Using it for a few production products and it works quite well!


Nice! 100 lines is impressive. µJS is a bit more feature-rich (patch mode, SSE, DOM morphing, View Transitions...) but if you need something truly minimal, Swap.js looks like a great option.

Let's say I want to compile a helloworld.cpp with no build tools installed yet.

What is the minimal winget command to get everything installed, ready for : cl main.cpp ?

Ps: I mean a winget command which does not ask anything, neither in command line, nor GUI ? Totally unattenfed.


The winget installer just downloads vs_buildtools.exe and runs it, which first installs vs_setup.exe and then that one prompts you for the workloads you want. I believe passing --silent to the winget installer will install vs_setup unattended but not any workloads from the Build Tools.

To install it all in a single step, and beware I haven't tested this, you're better off downloading and running yourself

  vs_buildtools.exe --quiet --add Microsoft.VisualStudio.Workload.VCTools
adding whatever workloads you need.

Then you'll need to locate and run vcvarsall.bat to setup the environment, which will require some clever code if you're doing it from PowerShell instead of a .bat, and then you can finally call the compiler.


In France (and probably everywhere) there is currently massive deployment of FTTH (fiber to the home) and removal of copper lines, since a decade.

Does this mean we could have kept the good old copper lines from 60 years ago and still enjoy 1 Gbit internet in residential areas?


Yes, yes it does.


Do I understand correctly: would someone have a concrete example of URL which is both an IP address and HTTPS, widely accessible from global internet? e.g. https://<ipv4-address>/ ?


The websites for DNS servers known by IP? https://1.1.1.1/ presents a valid cert although it redirects.


Out of curiosity, any other example without redirect, in which the URL stays https://<ip> in the browser?


Related: for some hardware project, I have a backend server (either C++ or python) receiving frames from an industrial camera, uncompressed.

And I need these frames displayed in a web browser client but on the same computer (instead of network trip like in this article).

How would you do this ?

I eventually did more or less like OP with uncompressed frames.

My goal is to minimize CPU usage on the computer. Would h264 compression be a good thing here given source and destination are the same machine?

Other ideas?

NB: this camera cannot be directly accessed by the browser.


> How would you do this ?

It depends. I have many questions.

> My goal is to minimize CPU usage on the computer. Would h264 compression be a good thing here given source and destination are the same machine?

No.

> Other ideas?

1. Why does it need to be displayed in a web browser (as opposed to more appropriate / better performing software specifically built for video)?

2. via what interface/library is the camera connected to the machine? What format/codec is the uncompressed stream you're getting from the camera?

3. I am available at very reasonable consulting rates


Thanks.

1. It is part of a bigger web-browser dashboard/control interface and this camera display is just one component among many others.

2. Some of the (USB) cameras can have proprietary interfaces such as https://www.ximea.com/support/wiki/apis/python

How would you do in this situation, to have the video stream in the browser, with as low CPU usage as possible?

3. Not for this project but for a future project, feel free to put a link to your portfolio or contact page (even if you remove the comment later)


1. fair enough

2. "How would you do in this situation, to have the video stream in the browser, with as low CPU usage as possible?"

Since it's being consumed on (only) the local machine you've got an excellent situation where you can use any obscure codec you like, as long as the browser you're using supports it. Also you don't need to care at all about network bandwidth. If minimising CPU usage is the #1 priority then something fairly lightweight like mjpeg might do the trick. Alternatively you might get away with not compressing the video at all (but this might cause issues due to dealing with huge amounts of data). If I wanted to minimise CPU usage, I wouldn't be doing it in python.

3. You can find me if you look.


Why would it be limited to ~ 100 connections on a 1-4 GB RAM server? Out of curiosity if we fork() httpd and exec() the cgi handler, it doesn't take the same RAM as the parent process and it could just take a few KB or MB, is that right? So I guess 1000+ concurrent connections even on a small server is possible.


Reminder that one of the best browser bookmarking system is already built-in: https://afewthingz.com/browserbookmark


I still use Office 2007 on my computer. Super super snappy, I think Word or Excel starts and finishes loading in 0.5 second after clicking the icon. It has 99% of the features I need compared to the newest Office version.


Same ... Office 2007 for the win. Frankly, i do not even use 90% of Office 2007 feature, so why do i even need more? For AI ... no.

And funny thing, barely uses any memory! Makes todays apps look like monsters. Even my music player uses 5x more memory while paused, then freaking Excel with multiple pages open.


Do you have a good way to run multiple versions of office? I do sometimes need some of the newer features but I'd like to default to using the older versions.


I still use Office 2007 on my computer. Super super snappy, I think Word or Excel starts and finishes loading in 0.5 second after clicking the icon. It has 99% of the features I need compared to the newest Office version.


No it is not.


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

Search: