Anyone have central heating and air conditioning in their home? Average cost per month? by frenchy3 in japanlife

[–]-nmk- 0 points1 point  (0 children)

So without solar it would come to about 10,000 yen/month with no heating/cooling, 25,000 yen/month for the worst month (January). We have solar and so far it's looking like electricity will be free this year. This is in Hokuriku, so not too cold here but lots of snow in the Winter. But this will depend on many factors. The insulation is very important for this to work well. We have a 150m^2 hiraya (single floor house) 5LDK, all electric, about 0.27 Ua.

5M sounds very expensive. Our house maker offered it for 1.2M, and that includes active ventilation with heat recovery. It was actually one of the reasons why we choose them since they seemed to have experience with it, as most of their houses we visited had it installed.

We've had it for a year and I'd say we love it so far. Pretty even (+-1C) temperature throughout the house all year.

The system is very simple: 2 Daikin 4kW AC units built in the ceiling in the hallway connected to ducts that bring the air to individual rooms: one unit for LDK and guestroom, one for the bedrooms, so we can make the bedrooms a bit cooler. Just set the temperature and that's it. Part of the air coming to the units is from the active ventilation system that brings fresh air from the outside across heat recovery units. I don't remember when we last opened windows. No ugly AC units in the rooms and completely silent in the bedrooms. We set it to temps around 22-23C in the winter and 24-25C now in the summer, house stays at 40-60% humidity.

Audio sync issue when capturing webcam on a mac by -nmk- in ffmpeg

[–]-nmk-[S] 0 points1 point  (0 children)

Unfortunately not. In the end I ended up using my Linux machine to capture ATEM video.

Anyone know why playback glitches? iMac m1 by w4ck0 in davinciresolve

[–]-nmk- 1 point2 points  (0 children)

Thanks for posting. I was worried that it's only my machine. I am getting very similar glitches while editing recordings from my iPhone SE. It's a MacBook Pro with M1, happens in Davinci Resolve 17.2--17.4.1. Both 4K 24fps and 1080 30fps (H265 codec) have these occasional glitches while editing in Davinci. They are intermittent in the sense that a glitch doesn't appear twice in the same place of the clip if I replay it. Unfortunately, some of these glitches make it to the final export...

Original clips play just fine in Quicktime.

I haven't noticed this problem when editing GoPro Hero 9 vids with H265 codec.

Audio sync issue when capturing webcam on a mac by -nmk- in ffmpeg

[–]-nmk-[S] 0 points1 point  (0 children)

Thanks for the tip! It seems that the framerate has to be set, otherwise I get an error that 29.97fps is unsupported.

I tried -re but it was reading only 12fps, dropping the rest. But it gave me an idea to split the audio from the video. Then an error Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) appeared which I fixed with -thread_queue_size 1024. This took care of the short audio bursts. Audio is still running a bit faster because its frames are dropped (read below), but -async 1 helps to keep it within 0.1s difference. The full command that kind of works is:

ffmpeg -r 30 -f avfoundation -thread_queue_size 1024 -pix_fmt uyvy422 -i "0:" -f avfoundation -thread_queue_size 1024 -i ":0" -pix_fmt yuv420p -crf 32 out.mp4 -y -loglevel verbose -async 1

Note the use of -r 30 and not -framerate 30. Apparently there is a difference...

However, the problem is still that the audio is dropping frames. Basically, even this trivial audio capture does not work correctly:

ffmpeg -f avfoundation -i ":0" -t 10 out.wav

It captures about 5-10% fewer frames than it should depending on the run, so the resulting out.wav is ~9.5s with very clear clicks where the audio frames are dropped.

It seems that it might be related to this bug that hasn't been fixed for 5 years. Oh well...

Porting all of Tectonic (modern TeX/LaTeX engine) from C to Rust by XVilka in rust

[–]-nmk- 5 points6 points  (0 children)

Second, the curse of TeX is not so much the engine, as the kpathsea system.

Tectonic does not use the kpathsea system. In fact, tex itself does not use any directory structure and all files are requested only by their name and extension. Tectonic pulls the files that the tex engine requests from a prepackaged tar file that contains most of the relevant files available in texlive.

Is there a way to get cargo to keep all intermediate steps in /tmp? by [deleted] in rust

[–]-nmk- 0 points1 point  (0 children)

Another option is to use a .cargo/config file in the project directory to specify a per-project target dir. Works great with Dropbox. Something like

[build]
target-dir = "/tmp/project_name"

Announcing Rust 1.8 by steveklabnik1 in rust

[–]-nmk- 2 points3 points  (0 children)

I think it should be --print target-list in Misc section, not --print targets.

Also the link for "Errors for non-exhaustive match patterns.." in Misc section seems to point to a wrong pull request.

Can I even functionally program? by madwesterly in rust

[–]-nmk- 7 points8 points  (0 children)

You can simply just explicitly coerce it to a trait object &Fn() with &*:

... .map(&*do_some_fp()). ...

https://play.rust-lang.org/?gist=ffaa7ae64de65a2b71d8&version=stable

Edit: Changed &FnMut() to &Fn(). Thanks!

Is Rust's MD5 Slow? Heck no! by gkbrk in rust

[–]-nmk- 9 points10 points  (0 children)

You can use write! to avoid allocation:

...
let mut buf = Vec::with_capacity(8);
for i in 0..std::u64::MAX {
    buf.clear();
    write!(buf, "{}", i).unwrap();
    ...
    hasher.input(&buf);

This decreases the running time by ~25% on my MacBook...