Pebble smart watches are tethered (to an android/ios device via bluetooth), do not talk to a cellular network, and have had an especially good battery life because of that and their low-power displays which are always on and visible with external light, only turning on the backlight when you are using it (e.g. hitting buttons or after giving the watch a little shake). afaik, every Pebble watch has had a significantly longer battery life than all of Apple's watches even though they're always displaying.
The newer Pebbles do have a better battery life, lasting multiple weeks maybe thanks of better battery tech.
I think most of the battery life improvement is the much more power-efficient SOCs available. The original Pebble used an STM32 processor and a TI Bluetooth chip, where nowadays having BLE integrated into the SOC is table stakes.
I live in Japan so I have seen what danieltanfh95 describes many times in person. Japanese people at work seem to have infinite patience with whatever random bullshit their company will ask for, but outside of work they get easily frustrated when things don't go the way they expect.
I'm in the same boat, recursion tends to be easier for me to reason about because I'm expressing the problem in terms of some base case that incoming parameters are being reduced to rather than some condition that an iterative approach is working towards.
I prefer recursion over loops. But even more I prefer abstracting away the recursion into combinators.
One of my favourite combinators is matrix multiplication. You define what 'addition' and 'multiplication' mean in your case, and all of a sudden you get an algorithm that computes shortest paths in a graph or does regex matching. See https://news.ycombinator.com/item?id=9751987
But for more bread and butter cases, there's 'map' over various data structures, and 'reduce' and traversals of trees etc.
Oh, that's a shame. However, if you do a websearch for 'fun with semirings' you can find the relevant publication. Or you can use the wayback machine or so?
I'm very happy with my Unihertz Jelly Max aside from the camera being not great. I think it's the smallest it can reasonably be (62.7mm wide) while still having its touchscreen keyboard be usable and because it's fairly thick it actually feels good to hold in my hands and I don't need to stick one of those silly pop sockets on the back.
Seems fairly standard stuff for libraries to consider. I was really hoping for some weird stuff like patching bytecode or implementing entire different languages as a python library.
Check out Coconut (https://github.com/evhub/coconut), which implements an entire functional programming language as a Python superset that compiles to Python bytecode.
can you not narrow it down further to O(k * nCr(n, k)) (n=size of input, k=combination size) since it does k conses for each of the nCr(n, k) combinations?
(the final filter sums k elements nCr(n, k) times as well)
with N as the length of the subsets and X as the length of input, `combinations n xs` basically walks through list xs and at each element, conses that element onto each combination of size n-1 of later elements in the list then appends those resulting lists together. this is on the order of N * nCr(X, N) aka O(NX!/(N!(X-N)!)) which dominates the overall runtime. the final filter walks through each combination and does O(N) work at each element to find the ones that sum to the desired amount, again O(NX!/(N!(X-N)!))
Exactly. At some point every parser combinator turns into a three-line awk script that runs perfectly as long as the moon is waning and the file isn’t saved from Excel for Mac.
Ah, you've clearly never had to parse a CSV exported from a municipal parking database in 2004. Quoted fields inside quoted fields, carriage returns mid-name, and a column that just says "ERROR" every 37th row. Your pseudocode would flee the scene.
The newer Pebbles do have a better battery life, lasting multiple weeks maybe thanks of better battery tech.
reply