News for hackers. Stuff that matters.

tomatsu

Re:Electronics Lab Bench Setup Guide on Thursday May 11, 2023 @06:58PM (#35909468)
The coarse carbon mats don't even filter half of the fumes.

These super basic fan+mat fume extractors do get the fumes out of your face, which is the most important part, but the particulate and VOC levels in the room will quickly exceed acceptable levels.

But even with a proper filter stack which filters over 99.9%, you can only filter what's actually captured. You still need some ventilation and it's also a good idea to run an air purifier in automatic mode to filter what wasn't captured at the source. What isn't filtered by filters is filtered by your lungs.

I prefer light mode + f.lux or Redshift.

There's no need to stare at cold blue light all day long.

Fun fact, there is actually a CSS media query for selecting dark/light themes:

https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...

Re:Firefox Local Files Theft – Not Patched Yet on Wednesday July 03, 2019 @08:58PM (#20350572)
You need to spin up a server if you want to use modules anyways.

Well, it's not a big deal. Just run `python3 -m http.server` or install "http-server" via npm.

I wonder if you can still cut and engrave it with a CO2 laser (10.6 µm). It might be a very interesting material to work with.
Re:Is Conference Room Air Making Us Dumber? on Wednesday May 08, 2019 @12:09PM (#19860218)
There are ventilation systems with heat recovery.

They are usually triggered by a timer or humidity, but it would be also possible to trigger them based on VOC or CO2 levels.

Single-room heat recovery ventilation units are relatively affordable (about $400). There are also some which can be integrated into the window frame if drilling a 6" hole into a wall isn't an option.

Re:Green Material for Refrigeration Identified on Tuesday April 23, 2019 @11:41AM (#19729675)
> The gases currently used in the vast majority of refrigerators and air conditioners —hydrofluorocarbons and hydrocarbons (HFCs and HCs) — are toxic and flammable. When they leak into the air, they also contribute to global warming.

R-600a (isobutane) only has 3.3 times the GWP (global warming potential) of CO2 and for a fridge you only need about 80g. For safety reasons, the limit is 150g.

For comparison, the GWP of R-132a is 1,430 and R-12's is 10,900.

R-600a has mostly replaced R-132a in Europe.

Isobutane is of course flammable, but the operational pressure is very low. Aerosol cans also use isobutane. It's comparable to those.

Markdown themes are also a great starting point.

You only have to set the margins/width of your document and maybe some sort of header & footer and you're done with the CSS your very basic but also very readable website.

Re:A guide to rhythm in web typography on Wednesday October 17, 2018 @01:01PM (#18241045)
> if you don't have a consistent rule about whether to apply it to the top or bottom and by how much.

I recommend to use only top margins and to apply them to every element which isn't the first child (`whatever:not(:first-child)`).

This way there is no extraneous spacing at the very top or very bottom, which means the only spacing around the content is the padding of the container.

It's the same idea as the "lobotomized owl" selector (`* + *`). It's just more explicit.

Re:A guide to rhythm in web typography on Wednesday October 17, 2018 @08:54AM (#18238458)
I still think that vertical rhythm is snake oil.

Yes, it does look neater if you have a striped background and the lines of text align with that. However, you won't use a striped background. There is nothing else those lines of text align with unless you stick the text into multiple columns, which you probably won't do since it's annoying (zigzag scrolling) and pointless (there is no height limit on websites).

I think it's more important to pick distinct headline sizes which still look good when they wrap around. If they don't perfectly align with some imaginary stripe pattern which no one is imaging, then so be it.

> The practical effect of GDPR seems to me that I have to click away about half a dozen consent popups every day. Sometimes a cookie warning in addition to that.

At this point I just want those consent forms to be standardized via ARIA tags or whatever so that some extension can click the "yea, sure, whatever" button for me.

Devices for measuring the concentration of particulates (PM10, PM2.5, and maybe PM1.0), TVOC (total volatile organic compounds), and HCHO (formaldehyde) are fairly affordable nowadays. You could get one of those.

The air quality indoors is usually even worse than the air outside if you aren't using some filtration system. New-ish buildings release formaldehyde, laser printers release particulates and ozone, 3d printers release VOCs and particulates, and there is lots of dust generated by inhabitants and their pets.

Sadly, the Trump administration did a rollback of emission and fuel efficiency standards. It's a big step in the wrong direction.

Personally, I'd even ban combustion engines within city limits. It's completely insane that we poison the air we breathe 24/7.

Re:How true hackers write JavaScript on Wednesday September 05, 2018 @05:05AM (#17916267)
You're still returning a live HTMLCollection or an Array.

It's still bad code. Using newer syntax to do the same thing didn't actually improve anything.

Re:The Hardest Program I've Ever Written (2015) on Sunday June 10, 2018 @07:32AM (#17277634)
With a larger monitor I'd use the additional space for another document or window.
> A simple speaker and microphone is all you need to make a functioning motion sensor.

You could just use an infrared motion sensor. They are dirt cheap and widely used for controlling lights.

The AC unit at work has one, too.

So, all of this already exists. Without spying capabilities, that is.

It seems that way because the headline is a lie.
Re:Go gets preliminary WebAssembly support on Saturday April 14, 2018 @09:14AM (#16837191)
In Chrome and Node, Wasm code is executed by V8.

V8 can be embedded in C/C++/Go/etc applications. That allows you to use JS for scripting. This is quite different from compiling to Wasm, though.

4,000 IU per day is the recommended supplement limit.

You can synthesize 1000 IU from 10 minutes in the sun if... you're young, have light skin (of which most is visible), don't wear sunscreen, it's the middle of the day & summer, and you're lying down to get roasted.

4,000 IU is equivalent to getting burnt to a crisp.

5,000 IU per day is an excessively high dose.

4,000 IU is the upper limit. 2K is high.

https://en.wikipedia.org/wiki/Hypervitaminosis_D

Re:Google Flutter and AWS Lambda for a serverless mobile app on Wednesday March 07, 2018 @09:00AM (#16536337)
It's a few KB with Cordova/Phonegap. However, startup is bad, performance is bad, and testing is terrible.

Also, making UIs with HTML/CSS/JS really isn't that nice. The workflow with Flutter is way more streamlined.

Re:Google Flutter and AWS Lambda for a serverless mobile app on Wednesday March 07, 2018 @08:53AM (#16536289)
Yea, it's not a problem. Even more so if you can install apps onto SD cards. There is lots of room on my 32 GB card. I could literally install thousands of simple Flutter apps.
Re:Google Flutter and AWS Lambda for a serverless mobile app on Wednesday March 07, 2018 @08:46AM (#16536244)
It's comparatively compact for the kind of functionality the runtime provides. You also get instantaneous startup thanks to AOT. Performance is great, too.

My phone's calculator app is about 14 MB and the gallery is 10 MB in size. Flutter versions would have been probably a tad smaller than these native Android apps.

Well, just check the file sizes of the apps which you have installed on your phone.

Re:Google Flutter and AWS Lambda for a serverless mobile app on Wednesday March 07, 2018 @04:58AM (#16535355)
A release build of an Hello World app is around 7 MB.
Re:A Gym Chain Is Banning Cable News on Wednesday January 10, 2018 @02:29PM (#16118102)
> I'm delighted to have found a gym that simply doesn't have massive TV screens within every line of sight.

I like shopping at Aldi because they don't play music.

The worst are chains which don't just play pop music but also have pseudo radio jockeys which talk about gossip and try to be funny. It's insultingly stupid.

The gym I'm currently at doesn't have any TVs. Unfortunately, they play some music. The volume is very low, though.

Re:How to test a random number generator (2010) on Saturday December 30, 2017 @06:41PM (#16038361)
https://github.com/mohae/bench-rng

csprng: 909 ns/Op

Xorhift128+: 2 ns/Op

Xorhift128+ is what all major JS engines use for Math.random().

I don't think it's a good idea if you use a CSPRNG if there isn't any reason for that. Especially if you need a lot of random numbers. E.g. a game might drop some additional frames here and there and your particle effects won't look any better and your AI won't behave any smarter either.

Not to use PRNGs ever is bad advice.

Re:Yew: Rust framework for making React-like client web apps on Monday December 25, 2017 @04:45PM (#16005847)
> The biggest holdout is non-Edge IE

IE is discontinued. IE11, which was released back in 2013, only gets security-related updates. It's on life support.

IE11 part of Windows 10 which EOLs in 2020 (mainstream) or 2025 (extended).

Re:The Big Vitamin D Mistake on Thursday December 07, 2017 @12:17PM (#15871818)
> Apparently I should be upping my dosage.

Get your current nmol/L value and decide based on that data.

In Germany, you have to pay around €30 for that test. It's not covered by insurance for some reason. Anyhow, if they ask for significantly more than that, they are ripping you off.

There are probably some people who go with the DNR route because the healthcare system isn't that great in the US. They might prefer being 6 feet under over being crushed by debt.

https://en.wikipedia.org/wiki/Medical_debt

> 70 million Americans either have difficulty paying for medical treatment or have medical debt.

Re:A Clever Line of JavaScript on Saturday December 02, 2017 @06:51AM (#15831516)
Is it actually any faster? Let's see...

https://jsperf.com/trimcall/1

For me, the "clever" one is slightly faster in Chrome while the supposedly naive one is significantly faster in Firefox.

Looks like the naive approach not only wins in terms of readability, but performance, too. (Unless I seriously screwed this up which is always a possibility with micro benchmarks.)

Re:JavaScript. The Core: 2nd Edition on Friday November 17, 2017 @01:53PM (#15724864)
Dart's strong mode is different (it's about using a sound type system) and with 2.0 (or if you're using Flutter), it's mandatory.

https://www.dartlang.org/guides/language/sound-dart

Re:JavaScript. The Core: 2nd Edition on Thursday November 16, 2017 @06:09PM (#15717556)
> why nobody has created a version of JavaScript that just throws exceptions for all the WTF cases?

Google experimented with something they called "strong mode". Classes were read-only, accessing nonexistent properties was an error, and things like that.

I liked it. Unfortunately, the experiment didn't go anywhere and strong mode was removed from Chrome.

Dart is somewhat similar, though. It got more straightforward semantics than JS and most of those WTF things are an error.

Older »