News for hackers. Stuff that matters.

amttc

Re:Lua: A Guide for Redis Users on Monday November 21, 2016 @02:11PM (#13008191)
Yeah, I wish Lua hadn't taken undefined and nil to be the same thing given the way tables work in it. Most of the time it doesn't matter, thankfully. Sometimes you bump into it.

A sigil value can work too if you absolutely need it. ex:

  undef = {}

  function isundef(val)
    return undef == val
  end
The sigil value is truthy and makes your code more convoluted, though. ex:

  if not val or isundef(val) then -- ...
So, :/. I do love the language though.
I agree with this, mostly. I feel that Trump's campaign has already damaged the country in a very profound way that will take years for us to recover from as a people. But, I don't see Trump suddenly being the adult in the room given how he ran his campaign. At the very least, the tone has made people talking to each other very difficult.

I know people keep turning to hard data to try to explain the election. I think that's generally the right way to look at it. However, I think we all know people who have supported Trump. I feel like we should be sharing what they're thinking respectfully, even though it's feels more than likely many of his supporters would not reciprocate, however true or not true that may be. More viewpoints is better after all, right? They perceive us as aloof and disconnected from their problems. So, what do we do?

I don't want another election like this more than anyone else does, but it will happen again if something doesn't change. I have little faith in the protests ability to change people's minds. The people they need to talk to likely have never even been to the streets they're protesting on. All they're going to hear is that the protests in Oregon were deemed a riot and dispersed, and that will be that.

Within my family, not all voted for Trump, but most did and they come from different economic strata. So, I've seen multiple viewpoints on this. I think in order for me to understand the elections, I've made a separation between: 1.) economics, and 2.) race & culture. The people I know that voted for Trump might have responded to the dog whistling (can it really be called that when it's so unsubtle?). But, in their minds it's about 1. and not 2. I think when it comes to changing hearts, the only thing that matters is how you feel, so it's important to make that distinction. They don't see themselves as fomenting racial anxiety, even though the United States is inevitably becoming a more diverse place. They only care about the economy, and Trump made a point of opposing trade pacts that have hollowed away their traditional place in American society.

At home and at work, I feel like I occupy two totally different worlds that don't interact with each other at all. I come to work, and it's nice. It's a diverse workplace, people are kind, we're making money. It's nice. Then I go home and it's like 2008 is rumbling on. It really does feel to me like people don't humanize people they disagree with anymore because they filter their world through cable news & the internet. Maybe changing that might help change this?

But how do we do talk to them? To them it sounds like we're waiting for them to die off, which is profoundly insulting to them but also not true of us, or at least not of me. We aren't waiting for them to die off. To me, or us, it sounds like they're trying to turn back the clock on the progress we've made for a lot of people who have endured a lot of hurt. But to them, they're trying desperately to preserve a way of life. But the world is just changing around them. We're all uncertain about where we're going to from here.

So how do we talk to them about it? How do we make them not feel threatened? I'm really at a loss. I think it's hard for the left (or at least me) to appreciate how divergent our understanding of what constitutes racist/sexist behavior is from theirs too. What's unacceptable behavior to me is locker room talk or just crude humor to them. It's hard for me to not lose my temper about it. I'm not sure how to shrink the empathy gap between the two sides, but I don't see these conversations taking place, so somebody has to start, right? But how do we do it?

I know this is a difficult pill to swallow because it involves entreating people who frighten or even mean ill to our friends (or ourselves). I happen to be in a position of extreme privilege so this post is a little too easy for me to write. Consulting with people I disagree with presents no threat to me. Others definitely will not have that experience. I don't mean to suggest that people who feel at risk should try it. But I feel like there's not a whole lot of options available to me right now. I don't want my country to tear itself apart in two or four years from now. I'm really at a loss here as to what's the best way forward for everyone, and for the country.

Re:Chez Scheme is now free on Tuesday April 26, 2016 @12:05PM (#11573020)
Wow, I never thought they'd open source Chez. This is really cool.
Re:Sebastian Thrun Steps Down as Udacity's CEO on Monday April 25, 2016 @12:09PM (#11565178)
I'm an OMSCS student. Udacity is fine. It serves its purpose. Sometimes it looks like the poor instructors are getting a double whammy of Georgia heat and hot spotlights, but the lectures are pretty high quality.

I'm not too far into the program, but the courses I've seen are built around readings, projects, and Piazza (a student forum for us to talk to each other in). Piazza is where most of the interesting stuff happens. For my class, there's the professor but also 5-10 TAs who are swarming Piazza at most hours of the day responding to questions. Once a week, there are office hours for a couple hours hosted on Hangouts. There's your normal midterm and final exam, but the courses seem very much structured around deadlines rather than mandatory participation week to week.

It's been good thusfar.

Re:Sebastian Thrun Steps Down as Udacity's CEO on Monday April 25, 2016 @12:00PM (#11565103)
Also an OMSCS student. Funny. On my iPad, it's less than straightforward to use Udacity on the website, and I've never been able to get the mobile app for the GT login. I have my IOS course bookmarked so I can watch the lectures on my tablet.
Re:Classism in America on Wednesday April 06, 2016 @10:25PM (#11444226)
The people who Fox News caters to the most are suburbanites. Most people way out here are lukewarm on Fox News. They're just... different. They agree with some things that I imagine would be popular in big coastal cities, but disagree with other things that might surprise you, so.
Re:Ask HN: Best book (or other media) to learn lua from? on Monday March 21, 2016 @10:44AM (#11328388)
Hey! I really love Lua. I'd recommend reading Programming in Lua (whatever the latest edition is) and Lua Programming Gems. Unfortunately, Lua is one of those languages that isn't written about a lot because its use case is usually for embedding. You'll have to do some legwork to read how other people write Lua. You probably want to read a lot of code on Github. Olivine Labs springs to mind here as an org that uses Lua quite a bit, but there are more. I got off the Lua train at 5.1, but 5.3 adds a lot of niceties.

Depending on how deep into the rabbit hole you want to go, reading the VM source code is instructive too (it's a pleasant read at ~10kloc. I'd actually recommend reading it on the website as they've hyperlinked much of the code.)

Re:A CEO's Guide to Emacs on Sunday November 29, 2015 @04:01PM (#10646050)
Yeah, I agree. I use emacs avidly. I still think for editing raw text it's a fairly nice experience. I like a lot of the features in emacs but I rarely need some of the more advanced ones. In order to leverage them, you need some highly specific use cases. Maybe my brain-meats aren't as myelinated as others, but most people don't want or need the universal pocket knife.
I don't think he would build a computer. 10k years ago was before writing. I imagine if anyone were transported that far back they'd want to focus on the stuff that has a huge impact (hygiene, food, basic medicine, potable water, writing, architecture, etc.) for the people at that time period.

There's a lot of common things we all know that we take for granted that would make a world of difference for people so long ago.

Re:Why so many Americans claim Cherokee ancestry on Thursday November 05, 2015 @09:11PM (#10517478)
I'm from the South and hear this all the time. I have no idea how many people are actually descended from the Cherokee (they were one of the larger groups in the South). I have a different crackpot theory. Historically, admitting you were less than 100% white was a dicey proposition. Sometimes I wonder if there aren't actually a larger than obvious percentage of people who have Native ancestors, but since they were assimilated, their descendants are only dimly aware of it and use "Cherokee" as a catch-all for saying they have some Native American blood in them. I'm sure some people are getting confused or just retelling tales passed down, but the South did have a lot of Native Americans in it. Has anyone researched this?
Colossus is one of those games that I can play just to ride around on a horse and explore to veg out for a couple of hours. It's a weird game.
This is interesting. Is there anyone who has worked in companies like this willing to talk about how it ends up working out? I've never been in sales but I've never heard of companies not implementing commission.
Re:Is Typed Clojure worth the trouble? on Monday June 22, 2015 @09:47AM (#9758254)
As much as I love dynamic languages, I have to disagree friend. :( Static typing confers more benefits than just enforcing a self-documenting type check on your code. It adds a level of expressiveness about datatypes to match the expressiveness of the algorithm itself. This is especially true in languages like SML or Haskell where the type system lets you describe the data you're working with in a pretty precise way.

Dynamic langs have lots of good qualities to them, but every tool has a drawback. Tests, documentation, good team dynamic, etc. hedge against some of the disadvantages of a dynamic language. They aren't a panacea.

Re:How a keyboard changed what I look for in an editor on Sunday June 14, 2015 @02:26PM (#9715836)
For me, at least, it's not so much a "raw LOC output" thing as it is a comfort thing. When I go back to IDEs or text editors that aren't Emacs, even though I can be productive there are lots of movements and tricks that I miss. It's less time spent text editing and more time spent looking, reading, and thinking.

Rarely, I'll be in a situation where I have to do a series of complex edits. At my old job if we were crunching, some of the people that were junior to me would look over my shoulder and see me rushing through a ton of different files to make them. I think if you're familiar with a tool/setup it's easy to do this, but it's not totally necessary.

When I'm out with friends and we order a larger bottle of beer (like chimay) or get a pitcher the person who grabs the pitcher usually pours for others before themselves. It's pretty informal though, other times we just pass the pitcher around and wait for everyone to get their drink before starting. I'm in the southeast, not sure what the manners are like for the rest of the country.
Re:Ten Days of Silence on Monday June 08, 2015 @12:48PM (#9680316)
Yeah, that part of the article I feel is off. I've never been on a retreat but I do sit. It's definitely an experience that I think people should try, but it doesn't really bear any resemblance to a trip (at least for me). It's more like turning a magnifying glass on how I make thoughts.
Re:Confessions of a Congressman on Saturday February 07, 2015 @08:46AM (#9013928)
Yeah, this is a pet peeve of mine. As far as I know, right now it's structurally impossible to have Congress make real reform, or even legislate effectively. There have been a string of these "inside" articles from staffers and congressmen themselves. They all have the same tone: money ruins politics, partisan politics ruins legislation, lobbyists steer the wheel more than the people, congressmen don't spend enough time with each other so they see each other as enemies, and so on.

This article in particular is funny. The writer suggests that we won't change the constitution. If the problem is that deeply rooted, what else could work but an amendment? Why not just change the rules of the game? I don't think there's a person I know who's happy with Congress, regardless of political party. I think it could work. All you need is enough people who agree, right?

Re:C, The Beautiful Language on Tuesday March 15, 2011 @03:29PM (#2328987)
Not that this has too much to do with what you two were talking about, but (car '(lambda (x) x)) will return lambda in Scheme.
Re:Programming Languages to watch in 2011 on Monday December 13, 2010 @12:57PM (#2001333)
There's no good way to easily gauge scheme with this site. At first I typed in "scheme programming language" and came up with 250 results, "scheme lisp" provided something slightly more relevant, but with only 45. I didn't scroll through, but even then they were only asking for people with experience in scheme (among other languages that aren't de jour, like smalltalk).
Re:No Babies? -- Causes for the aging population of Europe on Saturday October 02, 2010 @06:04PM (#1751463)
I think what all of these articles point to is that it's expensive or time consuming to raise kids, so people simply don't have them. It seems like the key to raising fertility rates is just to provide a good environment for parents to have them in, like giving leave to new parents and giving tax incentives or stipends to those who do. Then again, its probably more complex than this.
Re:No Babies? -- Causes for the aging population of Europe on Saturday October 02, 2010 @04:20PM (#1751260)
Compare with this article from a few months back: http://www.nytimes.com/2010/06/10/world/europe/10iht-sweden.... . While this article isn't exclusively about just birth rate, it notes that Sweden has one of the higher birthrates in Europe. Looking at wikipedia, the birth rate for Sweden is still (what I suppose is) low, only 1.67, compared with the US at 2.09.

edit: just in case you aren't inclined to read through, the article is about granting fathers paternity leave.

Re:Improving The Linux Desktop? Why, It’s Elementary on Saturday June 19, 2010 @09:12AM (#1444583)
I think that this has to do with flaws in the UIs themselves though. Having one sellable point is a great plan, but not if the rest of the user experience is poor. People should never have to open up the command line, yet you have to do it all the time in order to get any use out of a distro even like Ubuntu.
Re:Improving The Linux Desktop? Why, It’s Elementary on Saturday June 19, 2010 @08:53AM (#1444565)
Maybe. It depends on if we're talking about individual applications or just the desktop experience in general.

The thing about people using applications like Photoshop and Word is that they have established workflows that its users have come to expect. From a design perspective, they're pidgeonholed because any significant UI change means that they would have to retrain the vast majority of its users. So Adobe and MS make minor tweaks to its UI instead. Admittedly, MS made a big change with the ribbons ui element, but you get the picture.

Open source stuff has the advantage (I guess you could call it that) of having a much larger volume of new users and a much smaller volume of old users, so there's more room to experiment with different UIs to solve the problem of getting people to interact meaningfully with the programs. I'd say for the vast majority of the projects, the UI is an afterthought so it ends up being poorly designed. Even so, the opportunity is there.

The desktop is a little different though, there's already a load of user expectations that you have to live up to. The space for proposing solutions is a lot smaller. Riding on the coat tails of OSX may not be a bad idea so long as the developers understand the reasons why Mac made the design decisions that they did and adjust accordingly.

At least that's how I feel. Trying to innovate isn't a bad thing, it has to lead to failure first before you get it right.

Re:C: The Complete Nonsense on Wednesday May 12, 2010 @01:30AM (#1340252)
I've heard that C Interfaces and Implementation is a good read after you've got an understanding of the language. I don't know any good encyclopedic references, though. I'm still learning the language myself.

I don't see what's wrong with saying that an educational book that has misinformation in it should be avoided on Amazon. With other things it might be more open to opinion, but if whole swathes of a reference book are filled with errors, I don't see what's wrong with writing a negative review.