425 karma · joined February 5, 2011
This post does a great job of explaining what Erlang, as a whole, does and why it does it.
Let's say he gets what he wants - a distinct collection of instances that fulfill the 'Account' contract, but are different types. The approach so far is that to fulfill 'Account' by providing an accountID. That accountID is what indicates if two 'Account's are equal. What if a Twitter account and Hacker News account have the same id? According to this protocol, they are equal.
The error message he is seeing about Self requirements is telling him this. That error message doesn't exist because Swift is having a hard time understanding the code, it exists because Swift understands that his code is wrong.
Some gems in recent memory:
1. Someone posted an urgent 'BOLO black men with what appears to be a weapon or something to be used to break in to houses' accompanied by a picture of a man with a rake. Another neighbor commented, "That's my landscaper and he's been my landscaper for 10 years".
2. A heated debate over tearing down old houses and replacing them with bigger ones ended up with a guy crawling into someone's backyard, taking pictures of their house, and posting them and critiquing their design choices on the forum.
3. A neighbor created a small sculpture of stacked stones, each stone being about fist-sized. Another neighbor posted photographs and personal information, asking that he take the stones down, because if they fell on a kid, he would sue him.
4. Multiple occurrences where someone posted 'surveillance' video of dog poop not being cleaned up, which always resulted in another neighbor identifying the dog owner, and the dog owner almost always being an elderly woman, who embarrassingly had to indicate she ran out of poop bags but went back later to clean it up.
For anyone that hasn't tried it, grab the Dart SDK and the IntellIJ Dart plugin. Takes less than 5 minutes to setup. It's been a great platform for building server side stuff - I haven't tried it for front end web stuff. It took about 3 reads of the language tour (https://www.dartlang.org/docs/dart-up-and-running/ch02.html) and about a week and I already felt very comfortable with the entire platform.
2. The suspect was later arrested for dealing meth. This isn't a little dime bag situation as the clearly biased writer would have you believe.
3. This isn't the suspect's first arrest, he was arrested before for distribution. Police found an AK-47 in his house.
Here are things that could have been done to prevent this situation. 1. The homeowner could have not dealt meth. 2. The parents could have not moved in with their AK-47 owning, meth dealing nephew.
Here are some likely other outcomes even if the SWAT raid didn't occur: 1. One of homeowner's guns could have accidentally discharged and killed the child. 2. Criminals could have robbed the house (a higher likelihood when you are running a drug ring out of your house) and killed the child.
That poor child's situation is a direct product of irresponsible parenting. There was a reason the police were at this house. Their tactics and the damage they did would have not been remotely possible if this guy wasn't armed with illegal weaponry and dealing drugs.
This isn't reddit. America is not out to get you. Don't be a criminal and don't associate with criminals and this doesn't happen to you.
It was a tradeoff, for which they provide functions (unshare and copy) for opting out of the default behavior if you so choose.
You aren't hamstrung here. In fact, this Array behavior is going to be absolutely great for manipulating image and other fixed buffer operations. It's a week in, what looks like a wart today can be a great feature in the future.
Until that day, this guy will have a job.
I get that some folks are fearful of change. You're in the wrong industry, then.
A question: the pattern of let it crash makes sense to me. However, I struggle with it when implementing RESTful web services. Letting the process crash will typically yield a 500 - the monitor on the connection process in the web server library ensures that. Clearly though, a status code and some additional information is a more appropriate response to the client. An example is returning a 400 for "missing arguments". In a contrived example of idiomatic Erlang, I feel like I'd write this:
handle_request(Request) ->
% username and password are required
{ok, Username} = request:get_argument(<<"username">>, Request),
{ok, Password} = request:get_argument(<<"password">>, Request),
UserRecord = db:find(my_database, users, #{<<"username">> => Username}),
Password = maps:get(<<"password">>, UserRecord),
request:respond(200, UserRecord, Request).
And if the key username did not exist in Request, request:get_argument/2 would return undefined or {error, Reason}, giving me a bad match error. Or if the password didn't match, I'd get the same. In order to intercept that and return a reasonable status code, I would have to catch that in handle_request. My question, then, is am I missing a best practice on how to handle this? Or is this just the place where I do need to catch errors and process them? And if that is so, isn't it at odds with the whole concept of writing intentional code?I find it unfortunate that some pet owners would absolve their responsibility towards their pet with a machine. There is great value to the relationship between a pet and its owner during both feeding and training. While it's neat that we live in an age where technology allows us such "conveniences", I think there is a point where you must ask yourself what is the point of life if you don't actually do anything meaningful? Bonding with a dog, if you have not experienced it, is a lot more meaningful than just making sure they don't shit on your rug while you're gone.
Ended up working out. Was able to make that money back 5x in 6 months. It was a risky move and I could see it not panning out more often than not. But, to go against the grain here: there is no such thing as 'never'.
Instead, what you and this article are talking about is that perhaps not enough black and hispanic people are being exposed to technology as an industry. In which case, the failure would be on a lot of variables: community, family, schools, socioeconomic status, etc.
Blaming a company for not hiring non-existent people is sure great for Jesse Jackson's business model, though.
JSON doesn't solve every problem. It does solve the problem, quite elegantly, of creating a 'endianless' interchange format that is easily consumed, constructed, and debugged.