sqlite the miracle DB

Sep. 25th, 2017 11:24 pm
mindstalk: (Default)
[personal profile] mindstalk
At work today, Boss suggested I look at sqlite a bit, since our client code uses it. What I thought might be a brief glance turned into hours of reading, as it became rather fascinating. For those who don't know, it's an embedded SQL database, with not much code, unlike the client/server databases of Oracle or anything else you've probably heard of. As their docs put it, they're not competing with such databases, they're competing with fopen() and other filesystem access.

They call their testing "aviation grade", possibly without hyperbole: 100% branch coverage, 100% coverage of something stronger than branches, 700x more testing code than actual library code and a lot of that generates tests parametrically... it sounds pretty nuts. They worship Valgrind but find compiler warnings somewhat useless; getting warnings to zero added more bugs than it solved. https://www.sqlite.org/testing.html

They claim "billions and billions of deployments", which sounded like humorous hyperbole until they added being on every iPhone or Android phone, every Mac or Windows 10 machine, every major browser install... There are over 2 billon smartphones, so just from the phone OS and the phone browser, you've got 4 billion installs...

They also make a pitched case for consider a sqlite database any time you'd be considering some complex file format. With almost no code to write, you'd get consistency robustness, complex queries, machine and language independence, and at least some ability to do partial writes[1], compared to throwing a bunch of files into a zipfile.

https://www.sqlite.org/appfileformat.html
https://www.sqlite.org/affcase1.html

They also had a nicely educational description of their rollback and write-ahead models. https://www.sqlite.org/atomiccommit.html
https://www.sqlite.org/wal.html

[1] I do wonder about this. One odd thing about sqlite is a looseness about types, and AIUI cramming numeric values into the smallest range that will hold them. So I'd think that if you UPDATED a value 100 to a value 1000000000000, you'd have to shuffle the trailing part of the file, compared to a format that e.g. reserved 8 bytes for a numeric type. But maybe they do buffer numeric or string storage. And not having to write the whole file, or not having to read the whole file (e.g. to decompress it) seem like at least partial wins.

Close Encounters of the Third Kind

Sep. 25th, 2017 09:24 pm
calzephyr: (Default)
[personal profile] calzephyr
(contains minor spoilers)

It says a lot when we watched a 40 year old movie than any of Hollywood’s current offerings over the Labour Day weekend, but then there were also less than a dozen people in the theatre who also felt the same way! This summer felt really lacklustre for movies for us. I just happened to see that CE3K was playing when I looked up show times for The Sound of Music. It's a puzzler how both of us haven't watched it given that it's as old as I am. My husband had watched the ending and of course here and there we saw the iconic scenes. The theatre edition was the 135 minute Director’s Cut and it had apparently been remastered for 4K screens. It looked very, very good and the sound was top notch. I understand that the ending is slightly different from the original ending - but YouTube was of no help in finding a clip. There are plenty of joke "original" endings though!

I was really surprised by what an optimistic movie it was for a 70s production. Other 70s movies tend to be full of grit and disillusionment like Chinatown and The Godfather. It would actually be hard to call CE3K a movie about aliens, because it's more about the persistence of human struggle. In a way, I think it's a good representation of the artist's journey - this struggle to make an intangible idea real and overcoming the obstacles necessary to achieve that goal. Main character Roy Neary's constant dreams and thoughts about the aliens/Devil's Tower brings him into conflict with his work, his family and himself.

The ending surprised me a little and not just because aliens are not usually greeted with wonder and curiosity in movies. Roy had some affection for his family and to just leave without a second thought made the ending feel unresolved to me. Still, it's a minor quibble in an otherwise almost flawless film.
lireavue: A red-haired woman in a black dress, playing violin while leaves swirl around her. (Default)
[personal profile] lireavue
*Heat wave through the midwest + letting C talk me into taking the window AC upstairs out for the season = insufficient sleep at shitty hours and more frequent migraines than I care to think about.

*Went to doc today for weird gag reflex/pill-swallowing issues. I feel like a cat who has abruptly gone NOPETOPUS DONE WITH THESE THINGS and started puking them back up on the rug five minutes later. SIGH, BODY. Also got my Rx for triptans started up again since this is now enough of a Thing that... yeah. Fucking bodies.

*Current vague birthday plans are gestures in the direction of "everyone shows up and laughs at me swearing at the loom until it works; also there is cake and food and booze." Still not sure who's in the area/able to become in the area over the right weekend though.

*STILL getting hammered sporadically in the PTSD-brain. Would like new brain. Failing that, would like less knowledge of why becoming an alcoholic is a really fucking bad idea. Failing THAT, would at least like the anhedonia to lift a little more.

*This weekend C goes out to LA to see his grandfather one last time, which you would think would be seriously stressful, and in some respects IS... but all I want right now is to be totally fucking unaccountable to anyone for where I go and what I eat and how I spend my time. So I'm super looking forward to it. There will be so much seafood, you guys. So much.

*Taking a lengthy hiatus from Twitter, despite every other thing fucking me up right now, is the best thing I've done for my mental health in an age. I get the Srsly Important shit, I get spoons back to actually *gasp* write my congresscritters (I KNOW WHAT A SHOCK), and I get people showing me cute shit on purpose. There was a goat and otter friendship thing today. Reader, I squeed.

Guess who has two thumbs

Sep. 25th, 2017 10:07 pm
james_davis_nicoll: (Default)
[personal profile] james_davis_nicoll
And was in a vehicular mishap that got him to work two hours early?

(no subject)

Sep. 26th, 2017 03:00 am
beccaelizabeth: my Watcher tattoo in blue, plus Be in red Buffy style font (Default)
[personal profile] beccaelizabeth
Today I went through one complete magazine file of homes magazines, tore out the pages I want, and set the rest aside for someone who wants slightly torn three year old homes magazines.
I did not think there were such people, but I actually have two people who might want, so that's nice.

Then I put the torn out pages into a file with others of that sort, so I had an empty magazine file, which I filled with stuff from the front room shelves that I'm trying to empty.

I am trying to feel all accomplished at completing this small task, but, it very small.

Still, it is done now.

Tomorrow - or technically today part the second - it is Cleaner Day and I shall have many things to achieve just to make things stay roughly the same.

Life is frustrating like that.

But so it goes.

Plotting

Sep. 25th, 2017 08:54 pm
kalloway: (Athrun Epic Facepalm)
[personal profile] kalloway
[personal profile] kalloway: *also mostly going hmmm*

[personal profile] kalloway: Well, I mentioned trying to make a little bingo card out of things I want/need/should write, etc.?

[personal profile] kalloway: And I found a sticky for [Fandom], which just says 'for [friend]', but that's literally all I've got

[personal profile] kalloway: Except I did find a comment where I mentioned having a bit of fluff for her pairing in a notebook.

[personal profile] kalloway: in a notebook

[personal profile] kalloway: IN A NOTEBOOK

[personal profile] kalloway: I think the safer route is going to be the two cakes route in which I ignore this detail, write something new, and then if the aforementioned bit turns up while going through notebooks later, yay bonus.

building affordable housing

Sep. 25th, 2017 08:39 pm
mindstalk: (Default)
[personal profile] mindstalk
A longish article on cities (or a country) that have built their way to affordable housing, contrary to the claims of many market-allergic leftists.

http://www.sightline.org/2017/09/21/yes-you-can-build-your-way-to-affordable-housing/

Money-quote paragraph:

"Houston, for example, can be Cascadia’s model for how easy it ought to be to get permits to build homes—if we believed, as Houston does, that building homes is in itself a good thing, our permitting processes would encourage rather than discourage it through endless months of hoop-jumping and politicized reviews. Tokyo, meanwhile, reminds us that placing control over development at senior levels of government, and making development of urban property a right of its owner, helps to elevate the broad public interest in abundant housing choices over parochial opposition to change. (Leaders in California have recently succeeded in passing a raft of new laws to act upon this lesson.) Chicago teaches that a pro-housing political orientation can provide abundant housing even under conventional zoning in a deep blue city, while Montreal offers Cascadia a model of a cityscape no longer of single-family homes but of three-story rowhouses, walk-up apartments, and condominiums on quiet, tree-lined streets close to transit and neighborhood centers. Singapore’s lesson is the promise of erecting high-density, park-like “new towns” on underused city land. And Germany shows us that a future is possible where housing is no longer an investment vehicle but “a very durable consumption good that provides a stream of housing services, not a ticket to financial gain.”"


Relatedly, Vienna and Singapore as two examples of massive public housing: https://www.shareable.net/blog/public-housing-works-lessons-from-vienna-and-singapore
Also useful if anyone tries to tout Singapore as a free-market miracle...

How Are You? (in Haiku)

Sep. 25th, 2017 08:36 pm
jjhunter: A sheep with shaded glasses and a straw hat lies on its side; overhead floats the pun 'on the lamb' (as in baby sheep). (on the lamb)
[personal profile] jjhunter
Pick a thing or two that sums up how you're doing today, this week, in general, and tell me about it in the 5-7-5 syllables of a haiku. I will leave anonymous comments screened unless otherwise asked; feel free to use this to leave private comments if that's what you're most comfortable with.

=

Signal-boosting much appreciated!
jjhunter: Watercolor sketch of arranged diatoms as seen under microscope (diatomaceous tessellation)
[personal profile] jjhunter
Ed Yong @ the Atlantic: Even Jellyfish Sleep
Do jellyfish dream of gelatinous sheep?

Ephrat Livni @ Quartz: Octlantis is a just-discovered underwater city engineered by octopuses
Gloomy octopus males seem to spend a great deal of time chasing each other out of dens.

Ed Yong @ the Atlantic: Octopuses Do Something Really Strange to Their Genes
It’s impossible to say if their prolific use of RNA editing is responsible for their alien intellect, but “that would definitely be my guess”

Greta Keenan @ New Scientist: Fish recorded singing dawn chorus on reefs just like birds
Nocturnal predatory fish use calls to stay together to hunt, while fish that are active during the day use sound to defend their territory.

(no subject)

Sep. 25th, 2017 08:33 pm
jhetley: (Default)
[personal profile] jhetley
Rash assumption, I know, but I presume people remember that the Korean War ended without a peace treaty.

On Reports and Discovery

Sep. 25th, 2017 07:24 pm
dewline: (canadian media)
[personal profile] dewline
I was going to explore my reactions to Star Trek: Discovery(AKA "DSC") in greater depth, and you may expect that later in this entry. For the moment, a surprising bit of news from closer to home arrived this morning: Rick Mercer's announcement that the Mercer Report will be closing up shop at the end of what will be its fifteenth season CBC Television.

Allow me to share his announcement via his own recording...



I admit that I see this as another sign of something akin to a Canadian Apocalypse. Some of you who've been watching this weblog for a while will be making informed deductions and/or guesses as to what some of the other signs are.

I'm not happy. But it's Rick's choice to make. Not mine. Not CBC's.

Okay, on to DSC.

What we ended up getting on Sunday night, after delays thanks to CBS' contractual obligations to the NFL impacting on BellMedia's obligations to CBS, was the first two episodes of DSC. Aired back to back, with "The Vulcan Hello" followed immediately by "Battle at the Binary Stars". Together they form what you might call either a prologue or a full Act One of the first season's larger story.

Without giving away too much, it's a good setup for whatever else we're about to get this year.

I'm still getting over my bout of design history dissonance considering this is supposed to be happening about a year after the events of "The Cage" and ten years before "Where No Man Has Gone Before". The uniforms, the user interface designs, the starship architecture...all seem a bit out of place with those two episodes of the original series. We're being promised explanations and evolution over time, to be sure. How fast the production team delivers is up to them. Our reactions to that speed - or the lack of it - are up to us.

Just about everything else: the scripts, the performances of the live actors, the visual effects work...all meet my hopes.

That visual dissonance remains. For now, anyway.

One bit of advice to CBS and its production partners: please show the episode titles in the episode itself.

Meanwhile

Sep. 25th, 2017 05:43 pm
jhetley: (Default)
[personal profile] jhetley

While everyone is nattering about the NFL, remember Puerto Rico.

beccaelizabeth: my Watcher tattoo in blue, plus Be in red Buffy style font (Default)
[personal profile] beccaelizabeth
I have half a shelf of unlistened doctor who audios to get through and decided to do so while sorting stuff in the living room.

I tried to put a USB thingy into my tv to listen my musics, but nothing happened. And I don't know how to troubleshoot when the starting point is nothing happened. So I don't think that plan works.

But I can still play CDs.

Read more... )

Adventure had good features.

I think it's just my mood putting me off.

Growth rings

Sep. 25th, 2017 01:27 pm
rebeccmeister: (cricket)
[personal profile] rebeccmeister
Figuring out how to count cricket growth rings has been an interesting endeavor. Friday morning, after I'd posted about my quandary, I brainstormed with [personal profile] slydevil and [personal profile] sytharin about further methods for cutting thin sections of cricket legs. I mentioned the slice of potato method, which really didn't work, and L came up with the idea of trying some other sort of vegetable that is firmer than a potato, like a radish, perhaps.

Armed with this notion, I headed in to work. After some further failures with the potato (I didn't happen to have radishes sitting around at work), I decided to try cutting thin slices without any extra support, but working under the dissecting scope instead.

And, success. The scope made it much easier to position the razor blade at just the right spot to get multiple beautiful sections. I know it worked well because I was then able to compare growth rings for Day 0 adult crickets (hint: zero growth rings) versus Day 6 adults. Here's a photo of the Day 6 adult:

Gryllus lineaticeps growth rings

I also did a bit more reading about methods for preserving stuff on microscope slides. Apparently I'm not the only one who has wondered about this. Our lab storeroom had little bottles of clear nail polish for sale next to the various flavors of slides and coverslips, so I figured I'd give that a try at first.

As of today, it looks like it works well! This is really good because it means I can work in batches and don't have to do each cricket one at a time. So now the rest will be fairly routine: prepare and count rings for crickets of known adult ages to make a calibration curve, then prepare and count rings from the field crickets.

I'm really enjoying the chance to play with the compound microscope we're borrowing from another lab.
aldersprig: an egyptian sandcat looking out of a terra-cotta pipe (Default)
[personal profile] aldersprig
Chapter 47: Abednego
by Lyn Thorne-Alder




read on...
grav_ity: (no power in the verse can stop me)
[personal profile] grav_ity
This book is, theoretically, YA, but also has amazing potential to crossover into MG. I feel like she knew she was going to write kids as they grew, and took the opposite approach that Riordan and Rowling did (ie started with them in the upper age bracket). It works well.

ANYWAY, the most basic pitch is "Nigerian Harry Potter", but it's SO much more developed than that. Okorafor's world is brilliant and terrifying, and Sunny's magical world is MUCH closer to the real one than Harry's is. I absolutely loved it.

Penguin is publishing a book 2 (Akata Warrior) in a couple of weeks, and I am really pumped about it.
aldersprig: a red-heded freckled girl, smiling (Autumn)
[personal profile] aldersprig
Written to eseme‘s prompt.  This comes after Tangles and Knots, Snarls and Combs. 

🔥

There were bits of Tattercoats everywhere.

Sometimes literally: pieces of his coat tended to come off in the strangest places, so that he was always sewing on new bits.  Sometimes figuratively: a book

read on…
[syndicated profile] sociological_images_feed

Posted by Paige Connell and Danielle Antoinette Hidalgo

Mild Spoiler Alert for Season 3 of House of Cards

Where is Rachel Posner?

Representations of sex workers on popular shows such as Game of Thrones, The Good Wife, and, of course, any version of CSI, are often stereotypical, completely incorrect, and infuriatingly dehumanizing. Like so many of these shows, House of Cards offers more of the same, but it uses a somewhat different narrative for a former sex worker and central character, Rachel Posner. Rachel experiences many moments of sudden empowerment that are just as quickly taken away. She is not entirely disempowered, often physically and emotionally resisting other characters and situations, but her humanization only lasts so long.  

The show follows Rachel for three full seasons, offering some hope to the viewer that her story would not end in her death, dehumanization, or any other number of sensational and tumultuous storylines. So, when she is murdered in the final episode of Season 3, viewers sensitive to her character’s role as a sex worker and invested in a new narrative for current and former sex worker characters on popular TV shows probably felt deeply let down. Her death inspired us to go back and analyze how her role in the series was both intensely invisible and visible.  

Early in the show, we learn that Rachel has information that could reveal murder and corrupt political strategizing orchestrated by the protagonist Frank Underwood.  She is the thread that weaves the entire series together. Despite this, most characters on the show do not value Rachel beyond worrying about how she could harm them. Other characters talk about her when she’s not present at all, often referring to her as “the prostitute” or “some hooker,” rather than by her name or anything else that describes who she is.

The show, too, devalues her. At the beginning of an episode, we watch Rachel making coffee one morning in her small apartment.  Yet, instead of watching her, we watch her body parts; the camera pans over her torso, her breasts in a lace bra, and then her legs before we finally see her entire body and face.  There is not one single scene even remotely like this for any other character on the show. Even the promotional material for Season 1 (pictured above) fails to include a photo of Rachel while including images of a number of other characters who were less central to the storyline and appeared in fewer episodes. Yet, whoever arranged the photoshoot didn’t think she was important enough to include.

Another major way that Rachel is marginalized in the context of the show is that she is not given many scenes or storylines that are about her—her private life, time spent with friends, or what’s important to her. This is in contrast to other characters with a similar status. For instance, the audience is made to feel sympathy for Gavin, a hacker, when an FBI agent threatens the life of his beloved guinea pig. In contrast, it is Rachel’s ninth episode before the audience sees her interact with a friend, and we never really learn what motivates her beyond fear and survival. In this sense, Rachel is almost entirely invisible in her own storyline. She only exists when people want something from her.

Rachel is also made invisible by the way she is represented or discussed in many scenes.  For instance, although she’s present, she has zero lines in her first couple scenes. After appearing (without lines) in Episodes 1 and 2, Rachel reappears in Episode 7, although she’s not really present; she re-emerges in the form of a handwritten note to Doug Stamper (Underwood’s indispensable assistant).  She writes: “I need more money.  And not in my mouth.” These are Rachel’s first two lines in the entire series; however, she’s not actually saying them, she’s asking for something and one of the lines draws attention to a sexualized body part and sexual act that she engaged in with Doug. Without judging the fact that she engaged in a sexual act with a client, what’s notable here is the fact that she isn’t given a voice or her own resources. She is constantly positioned in relation to other characters and often without the resources and ability to survive on her own.

This can clearly be seen in the way Rachel is easily pushed around by other characters in the show, who are able to force their will upon her. When viewers do finally see her in a friendship, one that blossoms into a romance, the meaning that Rachel gives the relationship is overshadowed by the reaction Doug Stamper has to it. Doug has more contact with Rachel than any other character on the show; in the beginning of the series, he acts as a sort of “protector” to Rachel, by finding her a safe place to stay, ensuring that she can work free from sexual harassment in her new job, and getting her an apartment of her own. However, all these actions highlight the fact that she does not have her own resources or connections to be able to function on her own, and they are used to manipulate her. Over Rachel’s growing objections, Doug is able to impose his wishes upon her fairly easily. The moment she is able to overpower him and escape, she disappears from the show for almost a whole season, only to reappear in the episode where she dies. In this episode, we finally see Rachel standing on her own two feet. It seems like a hard life, working lots of double shifts and living in a rundown boardinghouse, but we also see her enjoying herself with friends and building something new for herself. And yet, it is also in this episode where she has leveraged her competence into a new life that she also meets her demise. Unfortunately, after seeing this vision of Rachel on the road to empowerment, more than half of her scenes relate to her death, and in most of them she is begging Doug for her life, once again reduced to powerlessness. 

Every time we begin to see a new narrative for Rachel, one that allows her to begin a life that isn’t entirely tethered to Doug Stamper and her past, she is almost immediately drawn back into his web.  Ultimately, in this final episode, she can no longer grasp her new narrative and immediately loses hold of it.  In her final scenes, after kidnapping her, Doug temporarily lets her go.  She begins to walk in the opposite direction of his van before, only moments later, he flips the van around and heads back in her direction.  The next scene cuts suddenly to her lifeless body in a shallow grave.  The sudden shock of this scene is jarring, yet oddly expected, given how the show has treated Rachel’s character throughout the series.  It’s almost as if the show does not have any use for a sex worker character who can competently manage their own affairs.  Perhaps that idea didn’t even occur to the writers because of the place in our society in which sex workers are currently situated, perhaps it disrupts the fallen woman narrative, or perhaps for some reason, a death seems more “interesting” than a storyline where a sex worker has agency and takes an active role in shaping her own life and affecting those around her.  Whatever the reason, House of Cards ultimately fails Rachel and sex workers, in general.

Paige Connell is an undergraduate sociology student at Chico State University. Her areas of interest include intimate relationships, gender, and pop culture. 

Dr. Danielle Antoinette Hidalgo is an Assistant Professor in Sociology at California State University, Chico, specializing in theory, gender and sexuality, and embodiment studies.

(View original at https://thesocietypages.org/socimages)

aldersprig: (NanoGiraffe)
[personal profile] aldersprig
The original poll was a little too long, so I'm divvying this up into little polls for everyone's sanity.

Stories that WILL be written because I've already started their outlines:
Heroes
Catbois in Cages
Space Accountant Accidental Marriage

The other winners of the first Poll (At least 2 of these will be written):
Bless the Cat.(AF)
Legacy Cat.(AF)
King(maker) Cake, etc.(AF)

Current Winner of Stranded/Reiassan Poll (feel free to vote if you haven't already!)
Stranded in Winter
Love Meme: Autumn and Ink
Rin and her Mother, and Knowing Where His Place Is
Road Map To....


Poll #18864 Second Poll of the Polling Polls
Open to: Registered Users, detailed results viewable to: All, participants: 5


Fae Apoc and Tir na Cali: Which of these stories should I continue?

View Answers

Clarisse: Paint it Blue and Paint Me Blue
3 (75.0%)

Bjorn: Uncle and The Uncle’s… Pet?
2 (50.0%)

Matchmaker, Matchmaker (Adg)
0 (0.0%)

Abrelle: Shades and Shifting
1 (25.0%)

Cumhai: A couple helping hands etc
2 (50.0%)

About That… (Adg)
0 (0.0%)

Bracken, her first year, second year, etc.
2 (50.0%)

Deaths in the Faerie apocalypse, a side note (Adg)
0 (0.0%)

They Were Over (Adg)
1 (25.0%)

Together/Again (Adg)
1 (25.0%)

Where It All Began (Adg)
1 (25.0%)

Return to Sender/Old Debts and Old Favors***
2 (50.0%)

The Collar Job, Part VI
1 (25.0%)

Tir na Cali Slave School
1 (25.0%)

I Serve
1 (25.0%)

Hallowing New Ground
0 (0.0%)

Turning, Tables, and Other Things
0 (0.0%)

Little Lost Kitty Girl
1 (25.0%)

What (not on the giant list) should I continue for Vas World, Dragons Next Door, and/or Facets of Dusk?



The Links:

Profile

zyzyly: (Default)
zyzyly

September 2017

S M T W T F S
     1 2
3 4 5 6 78 9
10 11 12 13 1415 16
17 18 19 20 21 22 23
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 26th, 2017 03:45 am
Powered by Dreamwidth Studios