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

The container is a Linux container running a virtual machine inside.

WinApps needs a Windows RDP server to work. Most of the functionality doesn't care where that Windows RDP server is actually running as long as its FreeRDP client can connect to it. The container or libvirt VM options are just ways to accomplish that via virtualization.

I imagine the container part makes it easier to automate QEMU virtualization using bash scripting without worrying about distribution specific differences in the environment. These kinds of scripts become fairly ossified to their environment. Making them run consistently on different Linux distributions is its own adventure unrelated to installing and running Windows, so the containerization eliminates the need for a lot more bash scripting to account for those differences.

The container's bash scripts download the Windows installer ISOs and run them in an unattended mode inside a QEMU VM. The unattended installation is configured to skip activation:

- https://github.com/dockur/windows/blob/c7aac1edcf37a69ff730d...

- https://github.com/dockur/windows/blob/c7aac1edcf37a69ff730d...

- https://github.com/dockur/windows/blob/c7aac1edcf37a69ff730d...

Once the container is running, WinApps configures RDP via some scripts and registry settings exposed into the container via a volume so the container's scripts can copy and run them in the Windows VM:

- https://github.com/winapps-org/winapps/blob/b4766336903d0cbe...

- https://github.com/winapps-org/winapps/blob/main/oem/RDPApps...

You can do it all yourself too with your own libvirt VM, but it's just more involved:

- https://github.com/winapps-org/winapps/blob/main/docs/libvir...

I haven't seen any of this before, but I think it's a pretty clever use of scripting and containers on top of some fairly mature but hard to use pieces of software.


I think most people don't care about optimizing an extra $10 out of their weekly grocery run.

Probably a better example is figuring out the cost of a loan. Just multiply the amortized monthly payment by the term and compare that to the loan amount. If the difference makes you balk, then go ahead and walk.

How many people even realize that loan interest is a significant cost and would bother to do that? Or know how to do that? Most people just try to minimize monthly payments to something they can bear and sign the paperwork.


> I think most people don't care about optimizing an extra $10 out of their weekly grocery run

I remember when this kind of "optimization" was done regularly by a great many shoppers on budgets. Back in the day some stores even used to put calculators on the shopping carts.

People used to know how to budget. Apparently the average American is affluent enough to not need to be able to do this any more. I worry that the atrophy of these kinds of practical skills will cause much pain for a great many people at some point down the road.


I worry too. American consumer credit card debt sounds like it's rising pretty quickly, and many people I talk to have a lack of free will and carry a sense of unfairness in the system they live in.

However, people can also adapt pretty quickly.

Those grocery shopping "optimization" skills are making a big come back (and have been since Covid). There are plenty of YouTube and TikTok videos popularizing how to get more out of their grocery hauls.

Lots of people are also learning how to budget, how to invest, etc. and sharing their excitement about it too. For some folks, they finally learn this stuff in their 40s and 50s, but there are also a lot of young adults learning these skills thanks to the Internet.

So I also have hope.

I just don't think the lack of basic math and budgeting skills displayed by average consumers are a problem so much as a symptom.


One of my undergrad degrees is in math. As you study it, you learn to identify your assumptions (axioms), find or build interesting abstractions, prove properties about them (theorems), and then map all sorts of other things into those abstractions by figuring out that they're really the same thing. It's even more interesting when you start to find things that are different or question things you always took for granted.

Math gives you the ability to leverage the very structure and relationships of pure abstraction. It's quite the super power.

None of the specific things you learn studying math will be nearly as useful as the ability to think mathematically.


I would hesitate to judge based on what's "easy to type" on the keyboard in front of me.

A lot of editing tools and processes automatically converting `--` to `—`, so folks editing markdown or using a Word processor might get the emdash automatically. Similar things are often done for matching double quotes. I wouldn't be surprised if quite a few WYSIWYG CMS systems do this conversion too.

There are also a lot of input methods that make it trivial to write special characters.

Apple famously uses the Alt/Option key to make inputting a lot of special characters simple. Look at any place that does a lot of writing and publishing, and you're bound to see a lot of Macs.

On Windows, you can memorize and input code points pretty easily as well if you have a number pad. Just hold Alt and punch in the 4-digit character code.

I hop platforms a lot, so I commonly use digraphs with Ctrl+K in VIM, or TeX input in Emacs to insert unicode characters. I'll also use `Ctrl+x 8 <RET>` to insert characters by name in Emacs when I need to search for something specific.


I might get this for my basement sump pump in case the power goes out during a storm.


This can start up a Sump Pump with a 7.8kW surge (2.4kw running output)


A suitable UPS for that application costs less than $100.


Do you have any examples? I haven't seen what you're describing despite shopping UPSes, but something less than $100 that could last 10+ hours would be amazing.

My $200 1500VA/1000W CyperPower UPS could handle a short one or two hour storm, but storms can last for 10+ hours here during the wet season. One long power outage could cost me a lot more than $1000 in basement damages (my basement is finished).

A comparable all-in-one product to this pila battery would also be around $1000: https://us.ecoflow.com/products/delta-2-max-portable-power-s...

You can easily cut that in half shopping for an inverter and battery separately:

$240 for an inverter: https://www.homedepot.com/p/VEVOR-2500-Watt-3-4-HP-Sump-Pump...

$200 for a battery: https://www.homedepot.com/p/Basement-Watchdog-Maintenance-Fr...

But a lead acid battery might last 5 years where the pila battery is designed for 10+ years, so you're looking at $400 total on batteries. That quickly gets close to the $1000 for one pila battery.

I want to believe $100 is all you need, but to me the math with the numbers that I've seen suggests $1000 is not unreasonable for something like this.


> A comparable all-in-one product to this pila battery would also be around $1000

That unit is more powerful, higher capacity, and has more solar features than the Pila product. The Pila is also $1300 after pre-orders are over.

I'd pick the Delta unit, personally. They go on sale and you can even grab them from local places like Costco with good return policies.


You buy lithium battery (lifepo4) not agm, much longer life time. I have exactly the same Vevor inverter + lithium battery total cost was 400$. But I regret doing this setup, I should have just gotten Ecoflow power station, it's a bit more expensive but more versatile.. You can take it with you anywhere


Thanks for the suggestion. It looks like 100Ah LiFePo4 batteries are pretty easy to find too.


It depends on the wattage and duty cycle of your sump pump.

My experience with sump pumps is low wattage and intermittent use. Sounds like this does not correspond to yours.


That makes sense. Mine runs every few minutes sometimes in heavy rain.


Exactly, traditional lead-acid UPS cannot power much for long and often last less than 3 years.

Pila is great value.


The official Python documentation actually comes with a Socket Programming HOWTO that goes over conceptual topics and intended socket API usage:

https://docs.python.org/dev/howto/sockets.html#socket-howto

It gets overlooked because most folks only check the Tutorial and the Standard Library sections.


The problem is platforms moved away from S3 sleep. I've heard people claim it was mostly so managed Windows laptops could force updates with the lid shut and the laptop suspended.

Now I have to worry about my laptop randomly overheating itself in my backpack and even catching fire.


I've heard people claim it was mostly so managed Windows laptops could force updates with the lid shut and the laptop suspended.

That, but probably also to compete with Mac's Power Nap feature (2012) that updates Mail, Messages, and other applications during sleep (so that when you open up the laptop messaging apps are immediately up to date):

https://www.engadget.com/2012-06-11-apple-introduces-power-n...

Apple managed to do it without setting your laptop on fire. Meanwhile Dell recommends you to switch off a laptop when you put it in your backpack:

https://www.dell.com/support/kbdoc/en-us/000124304/notebook-....


Hold on, Apple used the same intel chips as everyone else when Power Nap was introduced. In fact, it was implemented via S0ix state. It's just almost no one except Apple figured how to utilize it correctly.

Now i'm wondering if it's Apple fault that S3 got removed.


Perfect "we have PowerNap at home" moment for Dell and friends. Well played, Apple.


Nah. Apple's Intel implementation at least was equally crap. I've had my 2018 MBP cook itself in my bag a couple times.


My Macbook Pro lasts about two days on battery while doing work (in clamshell mode, with the screen off). My Thinkpad drains its battery in less time than that in sleep. The removal of S3 is a travesty.


I believe it came about during the "Windows must run on tablets" era. They needed a way for WiFi to stay on during sleep so things like notifications would continue to work. It also enabled media players to continue playing audio in sleep mode, similar to iOS and Android.


Would be great to have a bios switch for it then.


I tried a few times as some BIOS have a hidden or disabled setting but I never got past a plain crash. Device and CPU vendor support for classic S3 is shrinking. E.g. on framework laptops the Intel CPU(!) does not officially support S3 sleep.

So I can understand that there is no option for it if all you can get is out of spec behavior and crashes.

Also note that it is incompatible with some secure boot and system integrity settings.


Thinkpads do. It's poorly named but they let you choose Windows (S0x) or Linux (S3) sleep.


No, not on modern Thinkpads.


Every XPS and Thinkpad that I owned, had a bios setting to "enable linux compatibility" which was enabling S3 state.


> It also enabled media players to continue playing audio in sleep mode

Is that actually a thing? On my Windows machine media stops playing when I put it to sleep. The machine is clearly not completely off, though, judging by the fan spinning like crazy from time to time.

Also, the whole "keep checking for e-mails" and whatever is clearly broken, since after waking up Outlook needs a while to come back to life and show new messages.


weirds me out since acpi etc. is uaed to control power qnd such states why would devices even need to do such things to support some OS.. the OS should be able to manage states, its the controller and hw should listen... in this case, windows could simply not put the devices to sleep?

i know it didnt end up with this logic but it melts my brain as to why... is it cheaper to implement the hw without support for deep sleep?

most specifications have it included (pcie, nvme, ahci etc. etc.) so you'd expect most devices working via pc platform would implement these things :(

cant wait to push my OS onto real hardware and burn my fucking house down


FTDI also makes a lot of USB chips with software controllable GPIO pins:

https://www.adafruit.com/product/2264

https://ftdichip.com/products/ft2232h-mini-module/

Bit banging on a modern OS subjects you to a lot of jitter though. It's not like using a parallel port in DOS where you just have to worry about interrupts. The preemptive scheduler can really mess up your timing.

That said, the FT232H, FT2232H, and FT4232H have an FTDI Multi-Protocol Synchronous Serial Engine (MPSSE) cores that you can program to protocols like SPI and I2C where the high speed part doesn't require any smart logic to handle. It's a bit of a special skill though (you send MPSSE specific command bytes over the USB interface into the chip's command buffer and tell it to execute them).

If you need more high speed smarts, it's also convenient to use a Raspberry Pi Pico with MicroPython or CircuitPython with Programmable I/O (Pio) with an interactive session:

https://www.raspberrypi.com/news/what-is-pio/

https://docs.micropython.org/en/latest/rp2/quickref.html#pro...

But yeah, beyond that, you're better off using an Arduino or something and doing it all on the microcontroller.

On the plus side, all of these things are relatively cheap and easy to obtain.


I wanted this for GPIO on my PC to interface with some hardware, but all the prebuilt USB TF232 adapters had the GPIO pins closed off, and AFAICT the TF232 requires flashing using some proprietary windows binary to get into a mode where the GPIO pins can be used as GPIO (since it has multiple modes of operation).

I can't believe I'm not missing something... Is there an off the shelf USB GPIO device somewhere? Plug it in and start using the linux GPIO driver?

The solution my friends gave me was "buy an arduino", flash the arduino, and use the arduino's gpio... which yeah, I could do, but is that really what it takes for a $2000 desktop to flip a bit these days?


Here a few options for you:

https://www.adafruit.com/product/2264 - USB to GPIO (and other stuff)

"Bus Pirate"

Or get a RasPi - it's not your desktop PC, but they're running Linux with direct GPIO access available in userspace.


The FT232H you linked in the default UART configuration has no GPIO pins according to the datasheet pin description table. You need to change to MPSSE mode or similar using the flashing tool.


The Adafruit FT232H works out of the box with pyftdi and libftdi. You don't have to use any special tools or flash it in any way. The USB commands are handled by the underlying libraries.

See page 9 of the datasheet here:

https://ftdichip.com/wp-content/uploads/2020/07/DS_FT232H.pd...

The async and sync bitbang columns denote the GPIO pins as D0-D7 and show them assigned to the 8 ADBUS pins that are provided on the breakout board.

Assuming the udev rules are set up in Linux, you can simply install pyftdi, open the device, and start using the ADBUS pins as GPIO pins:

https://eblot.github.io/pyftdi/gpio.html#setting-gpio-pin-st...

If you're using libftdi, you want to call ftdi_set_bitmode with the BITMODE_BITBANG enum value for the mode:

https://www.intra2net.com/en/developer/libftdi/documentation...

Then the ftdi_read_data and ftdi_write_data functions can be used to read or write to the ADBUS pins:

https://www.intra2net.com/en/developer/libftdi/documentation...

https://www.intra2net.com/en/developer/libftdi/documentation...

You can then build a nice, simple high level GPIO interface over that if you want.


That (or an ESP) is a really effective, easy, and cheap solution, which makes it hard for a more limited and more expensive solution to take hold. Most everyone who wants a digital output is capable of following the Arduino route to the end.


There's little market for the product you crave. Most people who know what GPIO is know how to buy a $5 microcontroller with a USB port and upload some firmware to convert serial commands to the pin states/transitions they need.


Parallel port adapters maybe?


Also, while libftdi isn't hard to work with:

http://developer.intra2net.com/git/?p=libftdi;a=blob;f=examp...

It's dead simple to also use these FTDI devices with Python:

https://eblot.github.io/pyftdi/api/index.html


Arduino is a nice, but it's still built on the shoulders of tools like GCC, isn't it?

I never owned a computer in the 90s, but my impression was that Cygnus[1] did a lot of work porting GCC and improving it for use in a variety of platforms, including embedded targets. They arguably helped pull GCC into mainstream usage, to the point of almost permanently forking it [2].

Those first 20 years of GCC development were prerequisites for something like Arduino to emerge in the mid-2000s. I'm just not sure we have the equivalent of GCC yet when it comes to synthesis tools.

When it appears, it might be a good opportunity to create a consulting company and drive it forward while also making some money. The key pitch would be improving your ability to maintain and share designs across targets while not having to pay recurring licenses on your tools.

[1]: https://en.wikipedia.org/wiki/Cygnus_Solutions

[2]: https://gcc.gnu.org/wiki/History


PBS Kids has a lot of games and activities on their website:

https://pbskids.org/games

If your kids watch any PBS shows them they'll recognize the characters.

The activities were fun enough for our twins to learn how to use computer mice at age 3.

Tux Paint is also really fun for young kids and a good way to learn mouse usage:

https://tuxpaint.org/


Thanks for the Tux Paint suggestion, I played a lot with Kid Pix as a kid and it seems that Tux Paint is similar :)

Haven't looked at the PBS shows yet, right now our son has been rather obsessed in a BBC show called Maddie do you know? because it explains how things works and he's excited to see train tracks, helicopters etc... He also really liked Mickey Clubhouse which has the advantage of being translated in Cantonese (my wife's language).


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

Search: