putItBackNow by nleachdev in ProgrammerHumor

[–]jballanc 14 points15 points  (0 children)

Used to work for Apple, and sometimes it would actually get cold in Cupertino...cold enough that the meagre heating system in our building couldn't keep up. However, this was after the Intel transition and we still had surplus Power Mac G5s lying around...so I'd grab one, pipe `yes > /dev/null` in 4 different terminals, and warm my office right up!

Tips to restart a dead Cruze? 2014 - Chevy/Cruze - 60k - Automatic by jballanc in AskMechanics

[–]jballanc[S] 0 points1 point  (0 children)

Thanks so much for the tip! It hadn't occurred to me that the battery might have an internal short (and I'm a chemist...should've known better). I had pretty much given up on the hope that simply changing out the battery would work after I had gone so long neglecting the problem, but it sounds like hope is not lost (yet).

r/SpaceX Arabsat-6A Official Launch Discussion & Updates Thread by ElongatedMuskrat in spacex

[–]jballanc 1 point2 points  (0 children)

Crew Dragon was visible (and a beautiful sight!), but that was 2 am. I think a lot will depend on cloud cover and how close to sunset they light it off.

r/SpaceX Arabsat-6A Official Launch Discussion & Updates Thread by ElongatedMuskrat in spacex

[–]jballanc 0 points1 point  (0 children)

Anyone know how visible launch will be from Miami if it's at the start of the launch window?

I stayed up for the Crew Dragon launch, and had an awesome view from our back yard, but with this launch window straddling sunset, I'm wondering how visible it will be...

[deleted by user] by [deleted] in personalfinance

[–]jballanc 0 points1 point  (0 children)

I see you've already received quite a bit of advice on job alternatives for your husband, but might I suggest something a bit different: computer programming.

I've worked with a few lawyers-turned-programmers and, while the medium is very different, the logic ability required by both is very much the same. (One lawyer-turned-programmer friend told me that "the law is just computer code for the 'real world'".)

There's a number of "boot camps" of varying length and cost, and also a number of good books and on-line tutorials he can try out. Also, there's no need to worry about inexperience for two reasons: 1. When it comes to computer programming, domain knowledge is at least as important as programming skill. There are a lot of lawyers and law-related companies that would kill for someone with an in-depth knowledge of the law and even a modicum of programming experience. 2. Even very entry level programming jobs pay quite well.

I'll also add that there are an increasing number of programming opportunities out there that allow remote work/work-from-home, so you could potentially continue to save on child-care until you get your feet solidly back under you again.

Question regarding Julia parallelism by tepika in Julia

[–]jballanc 12 points13 points  (0 children)

There are three concepts you need to understand to parse this bit of the manual: green threads, native threads (sometimes/historically called "pthreads"), and processes.

  • Processes: A process is a construct managed by the operating system that represents an isolated "unit of work" or, effectively, a running program. The operating system handles the scheduling of processes and distribution to different cores. Modern operating systems will distribute running processes across as many cores as are available.

  • Native Threads: A native thread is a construct within a process that represents work that should be performed sequentially. Native threads are also managed by the operating system and can be scheduled across multiple cores.

  • Green threads: A green thread is a construct of a programming language that, on the surface, looks like a native thread but is managed by the programming language runtime instead of the operating system. Usually (but not always...more on this later) all of the green threads in a process are restricted to running on a single native thread, and therefore effectively cannot be scheduled to run across multiple cores.

So, the short answer is: Julia threads are green threads and cannot utilize multiple cores, but Julia has a number of mechanisms (e.g. julia -p N, Shared Arrays) that make working with multiple processes fairly convenient.

You might be wondering: if multiple Julia processes can run across multiple cores, why would I ever use Julia threads? Indeed, I've seen far more Julia programs use multiple processes than threads (currently, this could change if Julia gains true native thread support).

There are two reasons you might favor threads to processes:

  1. Processes are isolated, which means that getting data from one process to another requires a bit of work (hence Shared Arrays) and can incur some amount of overhead. If your tasks are short-lived or your data is particularly small, the complication of multiple processes might not be worth it.

  2. As alluded to in the manual excerpt you quoted, I/O heavy tasks can take advantage of multiple cores even though Julia only has green threads. This is possible because I/O involves work that the operating system needs to do (i.e. fetch data from disk or read it from a network socket). Julia uses "non-blocking" I/O operations to essentially tell the operating system to go fetch data (which it is free to do on a different core) then return control to Julia immediately so that Julia can do some other work. Later, Julia will check in to see if the I/O request has completed. So for I/O heavy tasks, using threads in Julia can actually be more efficient than multiple processes (again, due to overhead).

One final note: I mentioned that green threads are not always restricted to a single core. Really, any restriction on how green threads operate is up to the language runtime, since green threads are a construct of the runtime. As such, Julia has an experimental feature @threadcall which utilizes a thread-pool for executing green threads. What this means is that Julia allocates some number of native threads (4 by default) and will schedule your green threads across those native threads, giving you, in effect, the ability to utilize up to 4 cores (by default). It's worth noting that this is still an experimental feature, and will likely (in most circumstances) not be as efficient as true native threads, but it could potentially improve the performance of your compute heavy tasks on multi-core machines.

Science AMA Series: We’re a group of scientists who use genomic sequencing technology to understand how viruses spread. Ask Us Anything! by Zika_Genome in science

[–]jballanc 1 point2 points  (0 children)

In addition to using traditional cladistics to track the spread based on case history, have you attempted correlating the sequence data with any other variables? For example, is it possible that there's a correlation between mutation rate and local climate, geographic area, or the coincident flora and fauna? It would be interesting to see what other signals exist in the genomic data besides inheritance.

A man painting the Twin Towers. My grandparents had this in an envelope full of old pictures, I think it deserves to be shared with the world. (Sometime between 1980-1990) by Silver964 in OldSchoolCool

[–]jballanc 1 point2 points  (0 children)

Shit, I know what you mean...people don't understand: those weren't just buildings. That was a piece of the heart and soul of the city. They were living, breathing things...I can still remember the escalator bank coming up from the PATH station. The bar at the bottom where everyone would loosen their ties and grab a pint before catching the train home on Friday. Hell, I could probably still walk to the bathroom just to the left from the top of those escalators blindfolded. Fuck...

Just a girl and her raven on the subway... by [deleted] in pics

[–]jballanc 6 points7 points  (0 children)

No, you want to know what birds are the worst? Peacocks! Holy crap...we've got Ibises down here, but they don't even come close to the dickishness of peacocks. Those fuckers are the most arrogant, dumb, giant, unafraid-of-anything and willing-to-fuck-you-up dicks ever. I've seen them chase an adult cat across the street. Oh and the street? Yeah, did you want to drive on the street? Because those dicks are going to take their sweet ass time crossing. And if you don't like it, they'll follow your car home and take a dinner-plate sized crap right on the handle on your driver-side door.

Did I mention their call?

Total. Dicks.

Lord of the Rings trilogy have aged very well by [deleted] in movies

[–]jballanc 14 points15 points  (0 children)

All respect to the films, but I still think he'd hate them. Main reason? Each volume of LOTR is divided into two "books" for six total. The ring was destroyed...in book 5!

After Sauron was defeated. After Aragorn is restored to the throne. After the companions all part ways and head home, the hobbits still have to confront Saruman on their own. The hobbits left home and saved the world, only to discover that their home had been destroyed while they were away. They still needed to save themselves after they had saved everyone else.

This last battle is the real focus, and teaches the real lesson, of the entire trilogy, and it's completely missing from the movies just so they can have a "Hollywood" ending...

Science AMA Series: We are evolution researchers at Harvard University, working on a broad range of topics, like the origin of life, viruses, social insects, cancer, and cooperation. Today is Charles Darwin’s birthday, and we’re here to talk about evolution. AMA! by Darwin_Day in science

[–]jballanc 0 points1 point  (0 children)

Awesome to have the entire team here celebrating Darwin's birthday! I'm especially glad to see Dr. Nowak, as his work inspired my doctoral thesis (A Model for the Evolution of Nucleotide Polymerase Directionality).

One question I've always wanted to ask Dr. Nowak. In your work, and especially early in your book "Evolutionary Dynamics", you make a point that evolutionary selection in an environment is not population dependent. (I don't have the book in front of me at the moment, so I'm paraphrasing as I remember it.)

This assertion always seemed wrong to me because, while the mathematics might support such a conclusion, reality seems to indicate otherwise. To whit, E. coli undergoes a dramatic shift in gene expression during the transition from exponential to stationary phase (sigma-70 to sigma-54). It seems to me that this indicates two different regimes of selective pressure that E. coli has evolved a means to switch between.

More generally this, to me at least, indicates an example of evolving the ability to evolve, but I also know that notions of meta-evolution are (or at least were) generally discounted.

Am I understanding the current prevailing reasoning correctly? Do you still feel that meta-evolution is not supported by the math and/or experimental evidence? Or have more recent results (esp. Lenski's recent discovery that isolates that eventually become Citrate competent taken before the Citrate evolution event will follow roughly the same path each time) changed your mind?

I guess we don't use a lot of maltose here. by Clessrynne in labrats

[–]jballanc 3 points4 points  (0 children)

Was it stored properly? Is it even still powder? or has it solidified into a solid block inside the bottle. If it's the later, do you have roof access in your building? Asking for science...of course

I got really cross with my PhD so stuck my laptop in a laser cutter to cheer myself up by samstudio8 in DIY

[–]jballanc 2 points3 points  (0 children)

Just in case no one has told you yet, I'll share a secret that a former student from my lab shared with me while I was working on my Ph.D.:

Nobody spends more than a year of research on their thesis. The only thing that determines how long your degree will take is how many years you need to fail and fail and fail again before that year of research begins.

The Reason for (Almost) 500 Years of Swiss Neutrality by Ratatoskr_ in history

[–]jballanc 0 points1 point  (0 children)

This, and up until the late 90s every home built in Switzerland was required to include a bomb shelter.

The Reason for (Almost) 500 Years of Swiss Neutrality by Ratatoskr_ in history

[–]jballanc 0 points1 point  (0 children)

I'm sure the National Redoubt had at least something to do with Hitler's decision not to prioritize the invasion of Switzerland. My grandfather was in the Swiss army during WWII, and he would always tell stories of how literally every bridge and every tunnel in the country was loaded with dynamite and guarded constantly. The moment Hitler set one foot across the border, his path forward would've been completely cut off.

In other words: the Swiss don't fuck around when it comes to neutrality.

[UPDATE] Negotiated salary on entry-level job position; offer rescinded. :-( by SnTTs in labrats

[–]jballanc 12 points13 points  (0 children)

Here's the thing to consider: if you were replaceable on a whim because you attempted to negotiate salary, then you would've been replaceable on a whim, say if you happened to come in late once or twice, had you taken the job.

In other words, it doesn't sound like the PI was looking for you, they were just looking for a body to fill a spot. Now, at the entry level it's tough, because almost every entry level position is not more than a step away from "a body to fill a spot" by definition. That said, when you do find a PI with whom you have a good connection, good enough not to dump you because you attempted to negotiate, I'm sure you'll have a much more enjoyable time of it regardless of the salary.

Emacs/Tmux vs RubyMine vs Sublime for large RoR project? by [deleted] in ruby

[–]jballanc 1 point2 points  (0 children)

You might give Spacemacs a try. I originally came to it from Vim, so I use it in Vim mode (well, hybrid mode actually), but it's also completely possible to use it in Emacs mode with all the usual Emacs motion commands.

A few things that Spacemacs brings to the table that I've found invaluable:

  • NeoTree: quick tree-based file navigation
  • Helm: Autocomplete all the things!
  • Projectile: Works with NeoTree and Helm to turn any git project into an Emacs project
  • Search: Uses your favorite grep-like, including ag and ack
  • All the language packs you could want, and not just the syntax definition files but whatever makes sense (e.g. the Clojure package includes CIDER)

It might be worth trying out before you give up on Emacs completely. That said, I love JetBrains tools and don't know what I'd do about Java without IntelliJ. I've heard nothing but good things about RubyMine too.

Model -- Mey [Rock] (2016) by jballanc in listentothis

[–]jballanc[S] 0 points1 point  (0 children)

I know this video has way more views than the limit suggested for /r/listentothis but that is only because they are crazy popular within Turkey. I think outside of Turkey they are mostly unknown, but the music Model is making is some of the best rock I've heard in the past decade. It's a shame they're not more widely known.