News for hackers. Stuff that matters.

nybblet

Re:Firefox is back. It's time to give it a try on Wednesday June 20, 2018 @10:34PM (#17361640)
Sounds like you're using the Google Accounts feature, and using the [separate] browser profiles feature would exactly solve your problem.

In particular: you can log into different profiles in the browser (each window can be associated with up to one profile, and they can be different), by clicking the little "Sign In" tab in the upper right corner. See also https://support.google.com/chrome/answer/2364824?hl=en&co=GE....

You can then open tabs under the different profiles with right-click, "Open link as", and selecting the appropriate profile.

(Personally, once I tried profiles, I never touched multiple-accounts-logged-in again.)

The comment is not saying that prison will lower the risk of re-offending, but that it will lower the risk of impacting other people until the risk of re-offending falls suitably low (e.g. due to other means like treatment).
Re:How JavaScript works: inside the V8 engine on Tuesday August 22, 2017 @01:20PM (#15074481)
Not what I said. I said to avoid /hand-optimizing/ code.

Trying to write performant code is good. Some examples of advice on that front: - use an appropriate algorithm, and make sure the logic is free of bugs. For example, accidental out-of-bounds array accesses can really hurt performance. - avoid needless computations. Don't do something (complex) twice if doing it once is enough.

If this sounds like "use common sense/generally good design principles", that's because it is (and hence the agreement with many of parent post's points that are simply and straightforwardly good design principles).

Let's take the example of "remove function calls". It's true that each call costs a few instructions, but unless the function you're calling is tiny, that overhead won't be measurable. If it makes sense for readability/maintainability/testability to split your code into functions, then by all means do it!

Another example is the "trick" to write "for (var i = 0, len = array.length; i < len; i++)" instead of the simpler "for (var i = 0; i < array.length; i++)". As http://mrale.ph/blog/2014/12/24/array-length-caching.html (from the original V8 team) explains in great detail, what seems like a no-brainer can actually do the opposite of what you'd expect --- and at the same time, won't make any difference whatsoever in most real code (i.e. aside from microbenchmarks).

Yet another example is https://www.youtube.com/watch?v=UJPdhx5zTaw. You can spend all day on it, but at the end of the day, the best thing to do is code correctly and sanely, not hand-optimize the bejeezus out of the thing (mostly yourself, in many cases).

Re:How JavaScript works: inside the V8 engine on Monday August 21, 2017 @09:52PM (#15069160)
I agree with a lot of these bullets just as general design principles, and emphatic +1 to not hand-optimizing.

Just noticed this comment after posting https://news.ycombinator.com/item?id=15069116, which is specific to V8 but which I'd guess holds for other JS engines too. Relevant excerpt:

""" ...in just about every case, the real answer is "it depends". That's why V8 is ~1,000,000 lines of code, not 1,000.

Please don't try to follow some rule blindly, much less derive. More often than not, when you try to hand-tune for the last bit of performance, you'll actually trigger something that was introduced to streamline the other [95% of] cases/JS devs' code, and then you've spent hours on making your code less readable with no benefit.

There is no "Try This One Crazy Trick To Make Your JavaScript Fast!!!" (or even ten!) """

(And for the specific case of preallocation vs. growing as you go, right now, in most cases, the difference is negligible. In the others, it depends.)

Re:How JavaScript works: inside the V8 engine on Monday August 21, 2017 @09:39PM (#15069116)
tl;dr: No, this is outdated, and please don't try to hand-optimize.

This is outdated. It was true in 2013, but changed in 2014 (https://codereview.chromium.org/416403002/ ; specific change in elements.cc).

Two tangential cents/Unpopular Puffin: there's a lot of misinformation or half truths that are propagated about V8 in an effort to boil all their optimizations down to One True Set of Advice, in this post and others.

The thing is, in just about every case, the real answer is "it depends". That's why V8 is ~1,000,000 lines of code, not 1,000.

Please don't try to follow some rule blindly, much less derive. More often than not, when you try to hand-tune for the last bit of performance, you'll actually trigger something that was introduced to streamline the other [95% of] cases/JS devs' code, and then you've spent hours on making your code less readable with no benefit.

There is no "Try This One Crazy Trick To Make Your JavaScript Fast!!!" (or even ten!)

(And in this particular case of pre-allocation vs. growing as you go? Usually the difference is so tiny it doesn't matter, and in the other cases --- it depends.)

Disclaimer: I'm not on the V8 team but I'm on a personal basis with some of them, and these are my own thoughts cobbled from casual conversations.

It's true that Confucian values talk about not self-injuring/damaging what parents gave to children --- their physical bodies etc. --- but pretty sure the abandonment of the long queue of hair on the collapse of the Qing was due to the fact it'd been imposed on the Han Chinese by the Manchus as a form of suppression.
Haha: "He developed a questionable reputation among the other members of the Mission..."

Yes, I can see it, and this is very cool. Thank you very much!

You're quite welcome, glad it was interesting!
Just following up on the fascinating prospect you initiated.

Which Russian missionaries translated which Chinese classics, since that you've already searched? I'm turning up Russian -> Chinese, not the other way around.

Agreed on all counts!

"The Master said: 'Girls and inferior men are hard to get along with. If you get familiar with them, they lose their humility; if you are distant, they resent it.'" (Chapter 17)

This sounds pretty bad. My reading of it is that he meant that relationships between men and women are particularly tricky (bearing in mind heteronormative standards at the time, etc. etc.), so one has to be careful not to misrepresent them or else everyone suffers. This can be generously reinterpreted to general use ("don't toy around with people and treat them straightforwardly"). Realistically... I'm happy to take it as a mistake on his part and just extract something worthwhile from it even if it's not what he meant.

With regard to enlightened perspective or lack thereof, there's an interesting question. I'm no expert on Confucius himself and how he regarded women, but his filial piety towards his mother is widely lauded (as was Mencius').

Hope that helps!

Was just a guess on a uniform prior :)

If you have specific evidence of Chekhov referencing Confucius (the similarities are so striking that either he came up with them independently, which was my original point, or he was inspired by Confucius, which should then leave traces) please do tell! That would be really cool.

At a certain point, sure. There is, I suspect, an execution difference (which does not at all create mutual exclusivity) though. Have you read The Analects, out of curiosity? If so, you know what I mean. If not, by all means please check it out! It's a short read, unlike any of the Bible, Torah, or Quran ;)
Agreed with treve, what does culture really mean? If you read ALL the literature, listen to ALL the music, view ALL the art, can recite ALL the history and do ALL the science... and still conclude it's OK to cheat on your wife and taxes, the argument can be made that none of this culture was internalized, and hence you are not cultured.

Of course things are rarely so black-and-white, but that's the gist of it.

"The Master said, 'The prosecution of learning may be compared to what may happen in raising a mound. If there want but one basket of earth to complete the work and I stop, the stopping is my own work. It may be compared to throwing down the earth on the level ground. Though but one basketful is thrown at a time, the advancing with it is my own going forward.'" (The Analects, translated by Legge)
I'm struck by how much this echoes Confucius and the Analects and how they define the so-called gentleman or noble man (not to be confused with nobleman, and translation is hard). Given how unlikely it is that Chekhov had exposure to either, it's incredible to observe the universality of these qualities considered admirable.

If people haven't, do recommend checking out The Analects! Caveat: there are quite a few excerpts that need to be taken in historical perspective, or can be easily misinterpreted (e.g. advice to be slow to embrace new that was in context of centuries of chaos and warring, or statements on women that interpreted naïvely clearly contradict other statements on mothers).

Re:Distant languages have similar sounds for common words on Tuesday September 20, 2016 @07:20PM (#12544193)
The earliest sounds that babies make tend to be "ma/muh" sounds, as they're smacking their lips to signal for food. Seems likely for language then to develop that sound into the word for "mother", the nearest object (food source as the case may be).
Re:Love People, Not Pleasure on Monday July 21, 2014 @03:36PM (#8065565)
Clearly!

My points are straightforward, so perhaps you're reading more deeply than you need.

I understand why you would say their language is passive aggressive though.

It's been an interesting discussion at any rate. Best of luck!

Re:Love People, Not Pleasure on Monday July 21, 2014 @02:59PM (#8065380)
1) Nope, just stating what I've seen time and time again to be the case/interpretation of your points. This might not be the case for you, but I do want to point out an alternate perspective that is infrequently given coverage in such threads.

2) Also nope! Sorry if I seem a bit amused now. Controlling implies "You have to do such-and-such and be dominated by me, and I don't have to do such-and-such and be dominated by you." My philosophy is that what I expect from my partner, I follow all the way through myself. There is no power issue, because both contribute equally to the relationship.

I will again point out the seeming contradiction between "I don't need to be faithful; my partner[s] do," or if you don't like that, "Men don't need to be faithful; women do." Perhaps that's not what you intend, but it sure sounds that way.

In terms of "controlling," if you expect fidelity from your partners but not yourself, and if you say that expecting fidelity sounds controlling, that would logically imply you are controlling.

Incidentally, I hope you recognize nothing I've said should be taken as ad hominem attacks. Again, I'm just pointing out how many people might take your points.

Re:Love People, Not Pleasure on Monday July 21, 2014 @02:29PM (#8065170)
You state yourself exactly the problem with this and many similar situations.

"I may do injury to others, but they may not to me."

From observation, many women are NOT OK with it. They may be not explicitly not OK with it (which of course is wrong too).

A few other thoughts:

Causing injury is fine as long as the recipient, and "most of the world," is unaware? The onus is on the rest of the world not to "cause a problem," and for the recipient to point out that injury is being done, and not on the afflicter not to do injury in the first place? A woman should just be happy to be with you "as long as you give her what she needs," which apparently doesn't include fidelity?

I would be less sure.

Re:Love People, Not Pleasure on Monday July 21, 2014 @01:46PM (#8064892)
And you wouldn't mind if your so-called "primary" or "side" (how interesting to apply such terms for significant others) did the same to you?

Because most people would, whether they realize it or not, and that is why they agree to commit to a relationship in the first place---because they expect the same from their partner.

Also, your "primary" will know at some point. Is a configuration really stable if it sets the stage for collapse?

Re:Masters of Love on Friday June 27, 2014 @04:46PM (#7956215)
It's certainly the case that conflicts will be difficult to resolve if one or both parties are not reasonable!

Your comment also touches on something else, however, in terms of how you and your roommate discussed issues, and relates back to an earlier point about internal/external issues.

It's easy not to care when, well, you don't care---when you haven't invested yourself mentally, emotionally, and physically in a relationship and hence do not really expect or require reciprocity to indicate that your investment was not in vain and that your relationship will endure. In other words, it's hard not to care when you really do care---about the other person, about how the other person treats you, about the relationship.

As a side point, there's a big difference between not dreading coming home and looking forward to coming home. The latter is an uncommon way to describe just a rooming situation, but should be the case with people in a relationship.

Your point stands, of course, about words and particularly actions being powerful!

Re:Masters of Love on Friday June 27, 2014 @03:35PM (#7955880)
I think the idea is that she should be excited that you're excited, and happy that you're happy, not necessarily that she should be excited by the very code you wrote. (That said, you would probably not mind if she "returned your bid" or "opened a bid" by asking you what it did, how you came to it, and made an effort to appreciate it with you. It would probably be less pleasant if every time you got excited about some code you wrote, she just responded with an indifferent "cool"---if at all---while continuing to text her friends.)

Also, what exactly do you mean by your last sentence, specifically, "besides our own"? If, as indicated above, the idea is that both partners are happy in the other's happiness, and want to do the things that make their partners happy, and are unhappy doing the things that make their partners unhappy, what does it mean to "[maintain] hobbies and relationships besides [their] own"? Many people maintain hobbies and relationships aside from those with their partners such that they end up maintaining separation. Why is that necessarily desireable?

throwaway2719's main point also seems to be that for some people, sex is not just fun and games, but entails some sort of emotional closeness. If your position is that you should just go have fun sex as you wish, then that seems completely fine as long as your partners are on board.

Conversely, the logical extension is that you should be on board with your partners freely having fun sex, with whomever they desire.

True enough; I meant conditioned on the slant many of the comments were taking, which was certainly not made clear in my comment---apologies.
Sure; my main point is that sex should not the main point, because by focusing on that it's easy to lose sight of much else that some people actually value.
The article is too hard to analyze in terms of actionable advice, so to speak---too many factors that confound analysis of the author's position---but these comments are fascinating.

It seems that to many people, sex is just a way to pleasure themselves, or just a status symbol. And if their partners are fine with that, then by all means they should indulge.

Some other people, though, don't want to use other people just to pleasure themselves without intending to commit to anything greater. And if their partners are fine with that, then by all means they should refrain.

This view of, indeed fixation with, sex---as a "coming of age," as a way to preen socially, as a tool for pleasure---relegates to a position at most secondary the value of a genuine and meaningful relationship. Ultimately, though, it's a matter of priorities: people should choose what they value.

Logically and from experience, many people who have casual sex with people who are fine with having casual sex end up in casual relationships.

And in a similar vein, I happen to know a lot of women---and men---who would be extremely reluctant to enter into a relationship with anyone who slept around casually, and would much rather be with someone who waited until they already had a meaningful relationship. As someone mentioned, after all, if a meaningful relationship founded on more than desire for pleasure (which focuses on the self) or even lust (which does include the other person) exists, surprise surprise: a natural desire for sex will probably follow. And probably the sex will be longer and better.