Better HN
topnewbestaskshowjobs
Log inSign up

TD-Linux

4,829 karma · joined Jan 31, 2014 (12y ago) · 1,177 submissions

Submissions

comment 9y ago · link · parent

I agree with not starting with the RPi (to avoid the complexities of the Linux kernel), but I started with the PIC and SX series (before Arduino was a thing) and wouldn't recommend it anymore. If you want to learn an assembly language and twiddle registers then maybe you'd like the PIC, but I don't think it's more "professional" - virtually everyone uses C if at all possible at this point, and the AVR (or bigger PICs) are just as "production-ready" as the old PIC16F series. And you can still twiddle AVR registers with C if you so desire.

comment 9y ago · link · parent

Not really, I generally find vendor libraries to be middling in quality, I think the core Arduino libraries are actually far more battle tested (if much less featureful). If you don't need more than the Arduino provides, it's probably not worth the extra complexity.

The Atmega8 (and entire series of attiny/atmegas) is totally suitable for commercial applications - just stick the chip directly on your PCB. AVRs are pretty ubiquitous in consumer products.

comment 9y ago · link · parent

Any of the Cortex-M* series are also generally a good choice, for example the STM32* series. All of these are supported in mainline gcc, and have open source support libraries provided by the vendor or via libopencm3. Be a bit careful, as some vendors like to use proprietary licenses for their headers, but in most cases there is at least one open source alternative.

And of course the RISC-V HiFive1, though it's still very new and in sampling quantities.

comment 9y ago · link · parent

I think this paper was part of it, which showed that the advantages of fractal image compression could equivalently be achieved with smooth wavelets and efficient representation of zerotrees, except with a lot more speed and flexibility (sorry no PDF): https://www.researchgate.net/publication/5585498_A_wavelet-b...

comment 9y ago · link · parent

There is no block to block prediction other than DC prediction, so is this effect due to your distortion function spanning multiple blocks? Same for cross YUV channels, because your metric is in RGB space?

edit: second read-through I found the paper [1] which explains it. The answer is basically "yes", where the large scale distortion function is basically activity masking. Normally this would be implemented with delta-QPs, but because JPEG doesn't have that, Guetzli uses runs of zeroes instead.

[1] https://arxiv.org/pdf/1703.04421

comment 9y ago · link · parent

There's less flexibility than you might think - you get only one choice of quantizer and quantization matrix for the entire frame. So pretty much your only option is to twiddle the values themselves. This is usually done with trellis quantization, such as in mozjpeg. Guetzli seems to implement something simpler that just sets increasing numbers of coefficients to zero (based on my cursory reading of the source code).

comment 9y ago · link · parent

Step 3), choosing more zeros, can be generalized with trellis quantization, which does a search for the best values to encode for each block for the best distortion-per-rate score, where distortion can be any metric (edit: apparently guetzli does some sort of whole frame search for this). mozjpeg does trellis with effectively the PSNR-HVS metric. Because the other two steps are only one setting that affects the entire picture, I do wonder how Guetzli would perform if it was just a wrapper around mozjpeg.

comment 9y ago · link · parent

mozjpeg also generates progressive JPEGs by default, for the same reason.

comment 9y ago · link · parent

Well, I suppose it is one of the fastest CP/M computers around... especially because it's the PCPI Applicard (or rather, Franklin's licensed version) instead of the Microsoft Softcard, which means it runs at 6MHz and has its own dedicated 64k of RAM.

comment 9y ago · link · parent

You do need part of that - a lot of it is capacitors wired directly to the ribbon cable, for the COG's charge pump. There's also a temperature sensing chip and a couple of external mosfets, one of which is to fix a bug on older COGs. On my own layout I was able to shrink it quite a bit by using 0603 parts. Still expect to burn 300mm^2 on the passives. https://0x0.st/tqo.png

comment 9y ago · link · parent

It's way simpler than that, you just write the displayed image more times based on temperature. If you don't do it your display will just have less contrast in the code.

The chip-on-glass has tons of registers to set drive voltages and the like, but the datasheet just gives you values to write to all of them.

What do you mean by e-ink driver? If you mean the software, check out the Arduino and Raspberry Pi librares on the repaper site. If you mean the hardware, just follow the schematics in the datasheet and repaper.org.

comment 9y ago · link · parent

I have a copy of WordStar running on an Franklin Ace 1200 (Apple II+ clone from 1983)... it runs WordStar via a Z80 peripheral card that runs PCPI CP/M while talking to the Apple 6502 to use the rest of the peripherals. So even then people were using workarounds to keep on running WordStar on newer hardware...

I still write letters with it and print them on my dot matrix printer. I certainly wouldn't reach for it over emacs in the modern era, though.

comment 9y ago · link · parent

BU doesn't implement a hard fork but rather potentially infinite hard forks, depending on two user controlled parameters. If the AD parameter is low (the default), then it will just be a long orphan chain, with effectively miner selected block size, but in kind of a gross way (for miners to limit block size they need to orphan other miners' blocks... but they might all have different settings, so it's a risky deal). You also don't know when a chain fork will happen. To avoid this, all users are supposed to coordinate their 'EB' parameter via some side channel, like Reddit. In my opinion this is very error prone, and maintaining consensus is the job of the software, not the user. Earlier hard fork proposals like BIP-100, BIP-101, etc which had BIP9 style voting, or even just a flag day that activate on a certain height, are far safer.

It also doesn't help that BU forked from an old version of Bitcoin Core, which means it's missing some new features and is slower.

comment 9y ago · link · parent

You can, I've used Pervasive Displays (I bought them from Digikey, they also have breakout boards): http://www.pervasivedisplays.com/

But yeah they are kind of complicated to drive. I've only used the small ones, but you do the refresh pattern manually - you also need to compensate for the temperature, and the pixel layout is a bit funky. Luckily there's already software for this at repaper.org, so you don't have to worry about it. The complicated logic being in software opens the doors for more complex refresh logic as well. Just keep in mind if you do this you can burn in the display, so buy a couple if you plan to experiment :)

comment 9y ago · link · parent

You don't even have to invent a new cryptocurrency. Bitcoin has had a non-turing-complete script from day 1. And if you want to run something more complicated, you can use zk-SNARKs combined with a tiny HTLC script on-chain.

comment 9y ago · link · parent

Huh? Even BIP-101, the original Bitcoin XT BIP to have forever increasing block size, mentioned this as a risk [1]. It argues that the effect is insignificant, but I would hardly call it watertight.

[1] https://github.com/bitcoin/bips/blob/master/bip-0101.mediawi...

comment 9y ago · link · parent

As someone who will never run BU, I'd rather have segwit activate, which will bump the blocksize to ~2.1MB and also enable a lot of better payment channel implementations, like lightning, that can lessen the demand.

It seems very clear to me that simply increasing the block size forever to keep under some arbitrary fee isn't going to work, though the reasons I have against running BU are mostly to do with its implementation.

comment 9y ago · link · parent

Yes and yes, though that would require your users to pay $100 per year, install Xcode, and compile your app.

comment 9y ago · link · parent

Hangouts doesn't use WebRTC, it uses a NPAPI plugin on Firefox and nonstandard APIs on Chrome.

comment 9y ago · link · parent

Note that this is unrelated to Zcash, the zk-SNARKS based cryptocurrency perhaps more known to HN.

comment 9y ago · link · parent

Being unable to represent 0.1 exactly is unrelated to any precision limitation. It's because the quantization of binary and decimal is different.

comment 9y ago · link · parent

Most of the nonstandard features that Hangouts uses are built into Chromium and the JS APIs it exposes to Hangouts. In particular, SDES, google-ICE, RTP data channels, and plan B are all nonstandard features exposed that way. [1]

[1] https://webrtchacks.com/hangout-analysis-philipp-hancke/

comment 9y ago · link · parent

Hangouts uses a bunch of non-standard Hangouts-specific APIs in Chrome. Maybe it's be best to call it "Google-RTC".

https://webrtchacks.com/hangout-analysis-philipp-hancke/

In summary, they use weaker encryption than allowed by the spec, nonstandard ICE (firewall hole punching), nonstandard data channels, and an abandoned way to do multistream.

comment 9y ago · link · parent

... and making it open-source?

comment 9y ago · link · parent

Yup, the format is called SDP. It's an old, crufty, and mostly effective way to specify not only the port and IP, but also whether a TCP fallback is being used, video and audio formats, and other things you can mostly ignore when just using data channels. See the "answer" section of 5.2.3 of [1], for details of some of the other magic numbers (which your JS library should handle for you). You can also check out about:webrtc to see SDPs made by other websites, like the Janus demo page.

[1] https://tools.ietf.org/html/draft-ietf-rtcweb-sdp-03

comment 9y ago · link · parent

That's because you don't need to implement any of those things for a basic client-server architecture. Unfortunately it looks like the author saw the massive and complex webrtc.org implementation and gave up, rather than try writing their own minimal implementation, or borrow from other implementations like Janus (https://janus.conf.meetecho.com/textroomtest.html).

comment 9y ago · link · parent

Yup, it's not an exact tradeoff, and near-0 it breaks down entirely. At zero it's worse than that, because of the diminishing block subsidy schedule, having zero fee pressure will reduce the incentive for mining, and therefore security.

However, miners can't simply apply the limit to themselves without a consensus rule. There is code in Bitcoin Core to apply a soft limit, but as long as there is any fee pressure, ignoring transactions leads to a disadvantage compared to other miners, so in practice all miners tend to always use the maximum permitted block size. Most proposed schemes for increased or variable block size still enforce the same size across all miners for this reason.

comment 9y ago · link · parent

There is no global mempool, it's a per-node thing. I think the default for Bitcoin Core is to hold 300MB of transactions, which means for most nodes the number of transactions in the mempool is constant. A better metric is transaction fees. Here's an example site: https://bitcoinfees.info/

comment 9y ago · link · parent

Larger block sizes allow more transactions, so although per-tx fees will be lower, there will be more transactions.

The computational costs of larger block sizes are borne on the entire network, however the effects are most severe for miners as larger blocks tend to increase the profitability of large geographically-close pools in comparison to small pools [1]. This is why segwit is only an increase to ~2.1MB.

[1] http://bitfury.com/content/5-white-papers-research/block-siz...

comment 9y ago · link · parent

Being in the EU is not a magical bullet against software patents.

https://arstechnica.com/tech-policy/2017/02/blackberry-sues-...

1
121314
40