Aleppo Palace

2019-Feb-08, Friday 22:08
mindstalk: (food)
There's a new restaurant in Central Square, at 25 Central Square Cambridge. It replaced a previous Mideast restaurant the name of which Google has forgotten. It's very new: opened in the past three days (I didn't go out Wed or Thurs.) Pure takeout -- no seating, though there's a ledge if you really wanted to wolf your food there. Prices in the $9 range.

I was given two small falafel for free; I thought they weren't as good as Falafel King's, but decent. I ordered a lamb kafta pita with hummus and fava beans. The guy kept asking if I wanted the ground lamb and not the beef shawarma, which seemed odd; maybe he has no faith in Americans knowing what they want. It rang up oddly: $8.99 turn into $10-something with tax, then back down to $9.60 with cash discount. I thought total sales tax was 7% here, meaning $9.62.

The actual food? Pretty tasty. It was a stuffed pita, not a wrap; the pita looked small, but came out to a decent amount of food; I could probably have made 2 small meals out of it. Tasty and juicy: I was foresighted enough to eat over a plate, the tinfoil covering would not have saved my clothes if eating over my lap.

There are breakfast specials at $6.49, though all vegetarian.

Python is annoying

2019-Feb-07, Thursday 09:38
mindstalk: (Default)
Our code works with binary data (hashes/digest) and hexstring representations of such data, a lot. It was written in Python 2, when everything was a string, but some strings were "beef" and some were "'\xbe\xef'"

Then we converted to Python 3, which introduced the 'bytes' type for binary data, and Unicode strings everywhere, which led to some type problems I had figured out, but a recent debugging session revealed I had to think about it some more. Basically we can now have a hexstring "beef", the bytes object b'\xbe\xef' described by that hexstring... and the bytes b"beef" which is the UTF-8 encoding of the string.

In particular, the function binascii.hexlify (aka binascii.b2a_hex) which we used a lot, changed what it returned.

Python 2:
>>> binascii.a2b_hex("beef")
'\xbe\xef'
>>> binascii.hexlify(_)
'beef'

Python 3:
>>> binascii.a2b_hex("beef")
b'\xbe\xef'
>>> binascii.hexlify(_)
b'beef'

vs.
>>> binascii.a2b_hex("beef")
b'\xbe\xef'
>>> _.hex()
'beef'


I found it easy to assume that if one of our functions was returning b"beef" and the other "beef" that they were on the same page, when really, not.

Bunch of examples in the cut.

Grah Python )

Factfulness 1

2019-Feb-01, Friday 21:43
mindstalk: (Earth)
I'm reading Factfulness: Ten Reasons We're Wrong About the World – and Why Things Are Better Than You Think by Hans Rosling, on the state of the world and people's misconceptions of it. It's kind of like Pinker's Enlightenment Now except with less Enlightenment crowing and I think fewer people distrust Rosling, and more about "so, why are people so wrong?" Because that's his first point: people are very wrong about how things are going in income distribution, life expectancy, child mortality, etc. Worse-than-random-chimps wrong. I can confirm in a small way: a Facebook poll of my friends regarding global life expectancy was mostly wrong.

Gapminder link

Wall o' text )
mindstalk: (thoughtful)
There are only six shrouds in the chamber beneath Litharge. Why?

bitcoin ETF

2019-Jan-24, Thursday 12:15
mindstalk: (Default)
A well-written 13 page PDF submitted to the SEC, arguing against the approval of a Bitcoin ETF. https://www.sec.gov/comments/sr-cboebzx-2018-040/srcboebzx2018040-4064523-169183.pdf

Highly manipulated penny stock equivalent, with no revenue and negative sum trading, used largely for illegal money transfer, plus unbacked claims of insurance by the ETF proposers, who would be in a position to manipulate the alleged value.

meditation

2019-Jan-22, Tuesday 21:47
mindstalk: (Enki)
I've been sort of into meditation for a while. I'm not going to push it as changing your life; I don't know that it's changed my life, or had any effect other than giving me a way to break negative thoughts in the moment. Not that I've done it very regularly; OTOH, studies claim to find medium-term benefits from even short practice. And having a way to break negative thoughts is actually pretty useful by itself. That said, Western studies do claim decent evidence for meditation helping treat anxiety and depression (or at least reducing depressive relapses.) They also claim many other things, but small sample size and file drawer effect justify skepticism.

I don't see a need for 'woo', even as metaphors. It makes sense to me that if you practice focusing your attention and discarding unwanted thoughts, which seem common to nearly all the multitudinous kinds of meditation, then you'll get better at focusing your attention and discarding unwanted thoughts. Also we know the body can influence mood: you smile when you're happy, but become a bit happier when you smile; you breathe slowly when calm, but calm down when your force yourself to breathe slowly. And a lot of meditations are about attending to if not controlling breath, too.

I did find, today, that very brief meditations -- 5 breaths or 'Oms' -- helped me refocus on reading some documentation I'm entirely unthrilled about reading.

In skimming through various articles, a few kinds jumped out at me.

* Breath-attention, supposedly distinct from 'mindfulness meditation' but I couldn't tell a difference. You focus on your breathing. Maybe you count durations, or try to control how you breathe, or maybe you just pay attention to how it feels. You'll have other thoughts, you note that you're having other thoughts, and go back to attending to your breathing without feeling guilty about having other thoughts.

* Mantra: you focus on reciting a mantra. I like 'Om'. Without needing any mysticism, it's a nice resonant sound, especially if you try to say it from deep in your chest, that can easily drive out other thoughts like a ringing gong or bell. Repeat the stuff above about labeling extraneous thoughts and going back to your mantra.

* Loving-kindness. I haven't tried this much. You dwell on wishing the best, or something, for yourself, your friends, acquaintances, people you hate... It sounds foofy at odds with my personality, but I can imagine how practicing feeling positive might get you better at feeling positive. Alternately, it at least gives you a period in which you're *not* dwelling on negative emotions that stress and anger you. There's also the gratitude variant, where you focus on things to feel grateful for.

* This thing I may have invented since I've found nothing like it. I could call it external mindfulness, maybe. (Edit: or mindful seeing.) The idea is to try to be attentive to everything around you. You'll fail, at least if you do it walking as I usually do, but the point is to saturate your attention with the current moment. I get started by trying to label everything I see, in detail, or else to imagine drawing it, particularly imagining tracing edges with my hand, which really means tracing them with my eyes. If you're *not* moving, then you can spend longer focusing on individual objects, staring at them until you've run out of detail. As an example, I was making dinner earlier, and there's a row of cups in my kitchen, but I went beyond "row of cups" to looking at each cup in turn, noting the color, reading any text, noticing anything else odd about them.

It disrupts your other thoughts since it demands so much attention. As a bonus, you're more likely to notice odd things about your environment, since you're actually paying attention to things rather than letting them blur by.

If you search "walking meditation" you find descriptions that are almost completely opposite: focusing on the movement of your body, the soles of your feet, the motion of your pelvis, and such, preferable in a small safe area so you won't hurt yourself when you stumble from paying so much attention to how you walk. I haven't really tried it and think I'd prefer my "focus on everything" method.

You'll note I don't say anything about posture or position. I suspect those aren't important, unless you *want* to be focusing on maintaining a particular position; some people tell you about precise postures and breathing regimens, other say sitting or lying down is fine. I rather think that focusing on *something* is the only key element.

Disclaimer: non-spiritual atheist Westerner dabbling in readings and occasional practice.

2018 books

2019-Jan-22, Tuesday 21:28
mindstalk: (rathorn)
2018 book count: 109 fiction, 26 non-fiction. I'd meant to read more non.

32 fiction with female main characters, 36 male, 25 other (both?), 16 unlabeled (most of those are Spice and Wolf, which I guess should be mostly 'male' in terms of 3rd person POV but Horo is so important I was reluctant to go that way. That or I was lazy with cut and paste.)

47 by female authors, 55 male, 20 other, 13 unlabeled. other definitely means male/female author pairs, like the Liaden series, while unlabeled tends to mean "I don't know", like for fanfics by authors with opaque names.
mindstalk: (science)
GMO opposition study.
"about 75 percent of the population chose health and safety concerns" though this summary doesn't spell out "GMO being safe to eat" vs. "concerns about more pesticide use".
Opposition anti-correlates with knowledge of genetics: the more you know, the less concerned about GMO safety you are. And in the US (but not Europe), the ignorant considered themselves knowledgeable.
Opposition isn't a left-right thing.

https://arstechnica.com/science/2019/01/on-gmo-safety-the-fiercest-opponents-understand-the-least/?fbclid=IwAR2Eervm2HrE-OISJCZklFp4pmn1S17veJlPyO1mZs8em_-g1LywPlBlMEU

air dryer power

2019-Jan-11, Friday 16:48
mindstalk: (Default)
At the place I'm staying now, there's a hair dryer prominently labeled as 1875 Watts. That's... a lot. A 5000 BTU/hour window air conditioner is 1465 Watts. Small and effective [1] space heaters are often 1000 or 1500 Watts. No wonder hair dryers can trip breakers.

[1] Unless trying to heat a cavernous and leaky basement on low power.

Study resolutions

2019-Jan-09, Wednesday 11:36
mindstalk: (Default)
As mentioned in my poll, I usually don't make New Year's resolutions. But I recently did make resolutions, and it's near New Year's, so hey. Anyway, there are various subjects I've wanted to become better at: Spanish, Japanese, physics (Feynman lectures), machine learning (Ng course), drawing. Many of which I started an embarrassingly long time ago, with limited progress or even effort. So my new goal is to spend at least 10 minutes a day on each. Or if that somehow feels too much, 1 minute. Something. Also, at least one new word a day of Spanish and Japanese.  Emphasis on "at least"; going longer is fine, but aim to do at least that much a day, every day.

This doesn't sound like much, and it's not, but it's something. The key idea is that I feel it's easier to keep doing something than to start doing something, so lower the mental barrier to starting as much as possible. Arguably a more efficient plan would be to budget 40 minute 'class periods' to each subject, maybe 2x a week. But beyond the fact that I'm not used to keeping such a regular schedule without outside structure, there's also that it's a lot easier to go "ugh, I don't have the time or energy for 40 minutes, I'll make it up later", with that later becoming never. And I'm speaking from experience. Whereas 10 minutes is like an extended potty break. 1 minute should be doable for anyone not feverish or critically depressed.

10 minutes a day is 60 hours a year, which still isn't a lot: a class at Caltech was budgeted for 90 hours (3 class, 6 homework a week, for 10 weeks.) But again, more than I've managed apart from Spanish. 1 minute a day is 6 hours, which is more than I've drawn most years.

Nice ideas; do I have any evidence? Yes: I've had the 40 minute class periods idea before, and not gotten far. Conversely, my daily Duolingo budget is a measly 10 points, on a scale of 10 to 50, and I have a streak longer than a year. I also use Anki flashcards for Spanish vocabulary, and going through them takes about 10 minutes a day, and I've been pretty regular with that. So: aim low but regular and hope for spillover, rather than aim high and miss and get discouraged and stop aiming at all.  And while my Spanish progress has been slow, there has been some detectable progress.
mindstalk: (atheist)
I haven't tried reading the proof yet, but there's an alleged trilemma: correctness, cost-effective, decentralized, pick two. It's plausible, sound very similar to the CAP theorem in distributed computing and databases. (Correctness, Availability, Partition-free -- basically if your nodes are partitioned, you can either shut down and stay correct, or be available and risk conflict when the nodes are re-connected.)
https://blog.dshr.org/2018/08/the-blockchain-trilemma_9.html

There's a list of various paradoxes about cryptocurrency: more users make it worse (more congested), quadratic total storage costs, conflict between users and miners... https://bankunderground.co.uk/2018/11/13/the-seven-deadly-paradoxes-of-cryptocurrency/

I can suggest some math. Say a blockchain is reasonably successful and has 100 million users (Bitcoin aims at competing with the global financial system!) doing an average of one transaction a day[1]. That's 1e8 transactions in under 1e5 seconds, so over 1000 transactions a second. The top blockchains, bitcoin and Ethereum, can handle around 5 transactions a second. See a problem? And a really global system could plausibly need 100,000 transaction a second.

There are some blockchains -- bitshares, EOS -- that claim such capacity, though I've also seen people say that they're not really decentralized, and one study claimed they didn't even measure up to their claims. https://www.prnewswire.com/news-releases/whiteblock-completes-industrys-first-eos-benchmark-testing-and-blockchain-investigation-300742130.html

But let's say some system can handle that many transactions. What's the storage? 20 bytes each for the From and To addresses, say 10 bytes for the amount, 50 bytes per transaction. At the small scale, each node needs to add 50 kB a second to the distributed ledger (which is what a blockchain at heart is.) No big deal. 5 MB at the big scale... still doable.

But imagine bringing up a new node after three years of such activity. 1e8 seconds in three years, so 5e12 or 5e14 bytes -- 5 or 500 Terabytes to download so that you can be a miner too. Eep!

I can imagine a way around that: a blockchain that every N blocks produces an explicit balance sheet, so that you don't have to go through the entire blockchain history to figure out how much someone has. I don't know if that's viable, such balance sheet blocks would be extra-attractive to attack, but I can't say it's unviable either. OTOH, how big is such a sheet? 100 million users, 20 bytes address per user, 10 bytes balance per user, 3 GB. If 3 billion users, 90 GB. Which has to be shipped around and validated by the mining nodes in the time it takes to make a block -- 10 minutes for Bitcoin, 10 seconds for Ethereum, IIRC. So we cut down on the total storage cost but need some really fat bandwidth.

[1] 30 per month. My own records show an average of 2 expenditures a day, or 60 a month. An average worker's month might see 2 paychecks, 1 rent or mortgage payment, 2-3 phone + utility bills, 4 grocery payments, 1 gas or transit pass payment... we're up to 10 a month right there.
mindstalk: (Default)
Good practice for a serving storing passwords is to not do so. Rather it hashes your password and stores that: when you log in, your password is hashed and compared to the stored value. This way someone who steals the password file doesn't get anything immediately useful. (Hashing is a one way function.) To prevent dictionary and other attacks, the password is combined with a non-secret 'salt' value, then hashed. (The password file contains the salt and the hash(password+salt) value.)

More recently, good practice has become to repeatedly hash the password like 1000 times. If a computer can do a billion hashes in a second then you won't notice a slower login, but it makes a brute force attack (of a stolen password file) 1000x harder. This is called "key stretching" or "key strengthening". The description on Wikipedia says to repeatedly hash the hash value with the salt, and I wondered why that was necessary. I think I figured it out.

Say the salt is applied just once, followed by 1000 consecutive hashings. It's possible that two passwords and their salts would collide, give the same value, samevalue, say on the 3rd iteration. Since they have the same value then, they'll have the same value on every subsequent hashing, and the same stored value in the file; they're basically locked in synchrony An attacker could see that they would get two accounts for the work of one.

But by repeatedly using the salt, that's foiled. In this case, the 4th iteration would see hash(samevalue, salt1) and hash(samevalue, salt2), and diverge again due to the different salts. You can still get collisions in the password file, but it has to actually be after 1000 iterations, not at any point in between.
mindstalk: (thoughtful)
(Forward links: street land use and Google Street View browsing).

Back in college, I found a newspaper article talking about the decline of US cities (or not, of a few) and it gave population densities. Having read Jane Jacobs and turned into a wee amateur urbanist, I memorized the numbers. I still know them. But of course they were all in people/sq. mile. Since I'm on a one person campaign to get more comfortable with the units used by 96% of the human race, I thought I'd type up the numbers in /km2, for my better retention, with a lot more places, significant to me or friends, added. And then I'll do various botec/Fermi modeling, to try to show what's going on on the ground.

Density data )




Models )
mindstalk: (riboku)
[community profile] questionoftheday asks: Does your family have any unique holiday traditions? What's the story behind them?

My answer:

The properly non-standard one was my birthdays when I was a small kid. My parents had created our own maypole, painted and with tassels, and I and other kids would run around under it in a circle. Or something like that; I haven't thought about that in years.

A stronger memory is the food. Instead of cake and ice cream, we would make wontons -- bought the wrappers, but made the stuffing and stuffed and fried them -- and chocolate mousse (two flavors, rum and orange). Compared to most birthday cakes, I feel I got the better deal. Sadly, I never got the recipes for these. I can say that the wontons were much more stuffed any any store ones, bursting with chicken and green onions and what not, vs. the more common "fried dough with some microparticles of meat".

Christmas was Christmas, insofar as atheists have a tree and gifts, though we also did some Hanukah stuff out of some cultural reflex of my mothers. Dreidel, yarmulke, kid me lighting candles and reciting Hebrew I didn't understand or believe in. Eventually that just stopped. Later my father refused to drag a Christmas tree home by foot or bus anymore; my mother was sad but I supported him. We still had gifts and possibly even fruitcake... I don't remember what Christmas meal was, I'd guess roast beef and vegetables most often.


Icon appropriateness: hi

She-Ra tech

2018-Dec-18, Tuesday 16:24
mindstalk: (Default)
The Evil Horde has tanks but no radio.
mindstalk: (Default)
A DW friend got nostalgic about Smallville and its "Save Me" theme. I looked it up on Youtube and it's a total blank. I watched this show for at least a couple seasons!

Gilmore Girls, which also got at least a year if not 2 or 3, was mostly blank, though I recognize some lines (and visuals).

Dawson's Creek and Roswell did just fine. Granted I may have seen most of DC... don't recall if I followed it all the way through. I did Roswell but there wasn't as much of it.

I didn't try Charmed or Felicity which I didn't see much of, or the bizarre "Zoe" shows (or seasons?), which don't even rate a mention in the network Wikipedia article.

(The WB)

(Of course I remember Buffy and Angel, those were *important*. And rewatched. And I have fanvids of the openings.)
mindstalk: (Nanoha)
[community profile] questionoftheday asks: Is there a fictional world that feels like your home away from home? What is it and why does it appeal so much to you?

My answer:

Strictly speaking, no, that is not a thought I have.

More loosely speaking, Nanoha. It has the most fanfic I have actually written down, not just cycled in my head, and I think the most characters whose POVs I've thought about, and my own OCs. Although these days I've been reading more elsewhere, especially Valinor and Silmarillion fics, Nanoha is like a mental home space for composition.

Why? I like the characters: their good will, determination, prettiness, and yuri subtext. I like the optimistic magical Starfleet full of second chances and adoption, struggling to survive in a post-post-apocalyptic universe. I like the second communication channel of mental telepathy (Madoka has this too, and some brave Macross Frontier fics) and the games you can play with that. I like that I can justify some of the characters being immortal. I like how the various artificial beings raise various issues of ethics and identity, like some SF, only with a more engaging milieu and set of characters than most transhumanist SF.

And on the reading side of things, it's had quite a bit of good (re-readable) fic: funny gen fic, interesting worldbuilding gen fic, hot (to me) smut fic. Though not enough of the stuff I most want. The one (gen) which I know has amused multiple people who knew nothing of the franchise is Ready, Sette, Go.

qotd: seasons

2018-Dec-13, Thursday 22:13
mindstalk: (Default)
[community profile] questionoftheday asks: What is your least favourite thing about each season?

My answer:

I'm not going to try to come up with something against spring and fall.

Boston summer: when it's hot and humid, obviously.

Boston winter: there's the usual cold and snow and ice, especially ice. And the short days, sun going down at 4pm because Boston should be in Atlantic time (which still would mean 5pm...) But my most unusual complaint is the sun *angle*: it's so low even at mid day, often in my eyes, and my summer hat wouldn't help even if temperatures were warm enough to wear it.

Getting extra sun from snow is an added 'bonus'. But yeah, the angle. Sun should not be in my eyes between 10 and 2.
mindstalk: (Default)
[community profile] questionoftheday asks: What is your internet history? What websites were you a part of that might not be around anymore, and do you have any fond memories of them?

My answer:

Got to college, was given a shell account with email and such. And talk/ytalk, I could communicate with friends across the country, for free! Like a long-distance phone call, but typing and free! Somehow found people purely online, too, chatting with some girl at an engineering college. Found Usenet, spending many years on the B5 newsgroups (I think I coined 'battlecrab' for Shadow ships) and rec.arts.sf.written. Mailing lists: extropians, cypherpunks, Julian May, Deryni (that might have been Usenet), Buffy.

Oh, and the early web, getting on with NCSA Mosaic, and Netscape Navigator, and I have web pages dating to 1995, if not earlier.

Early webcomics I forget the names of. Doctor Fun, User Friendly, Sluggy (still going!) Writing my own comic-scraper to generate a local page of updated comics, because RSS hadn't been invented yet.

A girlfriend found me via Orkut, I think. Was on that and Friendster before Facebook killed them. Technically am still on Livejournal, crossposting from here.

I sort of miss people *having* personal web pages. Or adding anything to mine.
mindstalk: (lizqueen)
I mentioned the Guild of Boston Artists. I found it Saturday by walking around Back Bay and going inside. One featured artist was there, and while I did ask a question about her art (it had a light quality reminiscent of pastels), I also asked the mundane question of how long it took to do a painting. Variable, but she went with an average of 25 hours, for the modest sizes displayed. That's for physical execution, like to copy an existing painting; design is a lot more.

Prices were also variable but I'll guess an average of $2500. So $100/hour, or $50/hour assuming double time for design (which would mean coming up with an artwork in under a week). Given the vagaries of freelance life, hardly unreasonable compensation on her end. I am unlikely to ever spend that much on a single work, though, and give thanks for prints.

Some other paintings in the galley were more; I think one was a bit short of $100,000. I forget if it was particularly large or detailed.

The website of another artist says she does oil portraits starting from $8,000, taking 5-8 sittings of 3 hours. At 24 hours, that's $333/hour. My first thoughts were unkind about her. My second thoughts were that if someone is willing and able to pay $8,000 on what amounts to a glorified photograph, it is practically her social or class duty to relieve them of their money.

As a side note, another gallery was right next door, just one artist working in acrylics and providing prints and printed clothing(!), but apparently "print to canvas" is also a thing, IIRC replicating the physical texture of the paint. Though maybe the texture comes from hand work.

April 2019

S M T W T F S
 123456
78910111213
141516 17181920
21222324252627
282930    

Expand Cut Tags

No cut tags

Style Credit