News for hackers. Stuff that matters.

mattfenwick

Re:Moral Judgments Depend on What Language We’re Speaking on Tuesday September 23, 2014 @09:17AM (#8355175)
The paper (http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjourna...) is not an example of good science.

First: did they even find some kind of correlation, or is it just a statistical aberration? Second: if they found a real correlation, is their explanation of why that correlation exists correct?

IMHO, their evidence does not support their claims. Where are the controls? What are the sampling biases? What are possible alternative explanations, and why are those not considered? What is the relationship between a person's response to a hypothetical situation and his/her actions in a real one?

They greatly overstate their findings in the discussion section. It's almost painful to read:

> We have shown that people’s moral judgments and decisions depend on the native-ness of the language in which a dilemma is presented, becoming more utilitarian in a foreign language.

> Most likely, a foreign language reduces emotional reactivity, promoting cost-benefit considerations, leading to an increase in utilitarian judgments.

> This discovery has important consequences for our globalized world as many individuals make moral judgments in both native and foreign languages. Immigrants face personal moral dilemmas in a foreign language on a daily basis, sometimes dilemmas with even larger stakes such as when serving as a jury member in a trial.

> Given that what we have discovered is surprising and unintuitive, increasing awareness of the impact of using a foreign language may help us check our decision-making context and make choices that are based on the things that should really matter.

> Foreign languages are used in international, multilingual forums such as the United Nations, the European Union, large investment firms and international corporations in general. Moral choices within these domains can be explained better, and are made more predictable by our discovery.

Wait, what? When was that covered in the rest of the paper?

Re:Moral Judgments Depend on What Language We’re Speaking on Tuesday September 23, 2014 @09:05AM (#8355131)
That's right. And it's not even clear that they found a correlation that would hold up in different experimental conditions.

The paper is at http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjourna... , and unfortunately has the provocative title "Your Morals Depend on Language", instead of a more accurate title like "There's a possibility that some people's morals are correlated with language, but we're not sure and we're also not sure if that's true for everybody because our sampling is insufficient to allow us to draw such a conclusion".

Re:Homoiconic Faq on Monday September 22, 2014 @07:30AM (#8350101)
I think the word syntax is ambiguous. Is homoiconicity about concrete syntax? Abstract syntax? Both? Some other kind of syntax? Does parsing have something to do with homoiconicity?

I don't know the answers to these questions.

Re:Homoiconic Faq on Sunday September 21, 2014 @09:26AM (#8347096)
This is my understanding of homoiconicity. There's a good chance that I'm wrong. Comments and clarifications welcome!

-----

Is homoiconicity about concrete syntax? I think the answer is no , but I also think that this confuses lots of people because it's not explicitly stated.

Then is homoiconicity about abstract syntax? Let's say we have some arbitrary language, for which there's an eval function (input: abstract syntax tree, output: some data structure) whose job is to execute/evaluate a program in that language. Homoiconicity, then, is the case where the output data structure is also an abstract syntax tree, or conversely, that an abstract syntax tree is expressed in data structures of the language.

So for homoiconicity, the input and output of your eval function are of the same type (of course the type may be a complicated algebraic sum type etc.). Thus the input and output have the same domain. This means that you can take the output from eval, and throw it back into eval again without getting a type error.

If the input and output types of the eval function don't match, then the language isn't homoiconic.

Is this correct?

What I don't get is whether the eval function is available from inside or outside the language, or both.

I'm also unsure of whether homoiconicity is a property of a language, or of an implementation of a language.

Re:Monads without pretension (2011) on Friday September 12, 2014 @12:53PM (#8309036)
My suggestion is to use "side effects" -- it seems to me that most people have an intuitive understanding of that term.

... but I may be wrong about that.

Re:Monads without pretension (2011) on Friday September 12, 2014 @11:16AM (#8308454)
From your article:

> Monads are not "about effects".

What is your definition of "effects"? I ask because this article[0] and many others[1] seem[2] to use a contradictory definition, in which failure, nondeterminism, state etc. are viewed as effects and monads are a means of implementing those effects.

------

[0]: http://www.sciencedirect.com/science/article/pii/S2352220814...

[1]: http://scholar.google.com/scholar?q=algebraic+effects+monad&...

[2]: as far as I understand them; I may be wrong.

Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @09:47PM (#8288341)
Sure, we can't rule out those possibilities ... but to me it just sounds like wild speculation.
Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @09:36PM (#8288311)
Oops, instead of "reality" I meant "experimental observations". Good catch.

> You arbitrarily claim to be able to make accurate assertions of reality

Nope.

> while at the same time agreeing that the essence of reality is unknowable.

Yep. I guess? All I think is that it's okay if we don't know the true essence; science is still useful[0].

> Stop using the word good without making your case for righteousness.

Stop hijacking common words.

> You can't substitute it with practical or useful either, both infer benefit at the personal degree.

I don't know what that means.

> Just because an expectation proved to be useful once, remember that the past does not predict the future.

Depends what you mean by predict the future. Absolute truth? No. Useful[0] forecasts? Yes.

----

[0] dictionary.reference.com:

> useful: being of use or service; serving some purpose; advantageous, helpful, or of good effect

Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @09:19PM (#8288259)
At no point did I touch on morality or ethics. I do not know why you think that I did so.

> I agree with you that experimentation is futile in the absence of ethics.

I do not agree with that.

--------

Dictionary.reference.com:

> useful: being of use or service; serving some purpose; advantageous, helpful, or of good effect

> good: having admirable, pleasing, superior, or positive qualities; not negative, bad or mediocre

I urge you to reevaluate your understanding of the words "good" and "useful". Don't you understand that I'm not talking about morality?

Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @01:19PM (#8285956)
I'm not sure that I agree. I think that once you get into the realm of "absolute truth" (which is what I'm interpreting your post as saying -- apologies if I'm mistaken), you've left science behind. IMHO, science cannot (and does not aim to) deliver certain knowledge. Instead, it produces useful approximations.
Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @12:53PM (#8285798)
An alternative viewpoint: everything's easy after it's been done, but it's hard up until then.

> after centuries of science as a profession, pretty much all the easy stuff has already been done.

But with the benefit of all that has already been done, shouldn't we be able to do things now that were previously impossible? In other words, "easy in 2014" != "easy in 1200".

> It's actually an argument for more cojones in science-- being willing to do bold stuff and explore "crazy" hypotheses.

Maybe doing whatever's easy is the most efficient (by time, money) way to make progress?

Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @12:48PM (#8285769)
> If I say that an airplane functions on fairy dust and you make an argument about propulsion and lift, and you claim that my assertion is wrong because ...

The only reason "science" would claim that your assertion is wrong is if your explanation doesn't agree with reality.

However, if you collect a bunch of data that you say supports your theory, but your experimental technique or data analysis is not good, then it's perfectly reasonable to point out the problems and say that your result is not supported by your procedure. This is not the same as saying that your assertion is wrong.

Another important concept that you're missing is usefulness: your assertion is unlikely to be useful (this is totally different from whether it's correct). Let's say you want to ensure that planes don't fall out of the air: how would you take advantage of your assertion to do this? (My proxy for usefulness is falsifiability -- un-falsifiable theories often are useless)

Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @12:34PM (#8285683)
> Philosophically speaking you can never verify anything through experimentation

This depends on what you mean by "verify". You seem to mean "prove that something is absolutely true".

That is not what I meant. I should have clarified that I meant something along the lines of "we've collected a bunch of data that don't contradict <something>".

I've edited my meaning into the post because I don't want my stupid equivocation to distract from more significant issues.

Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @11:51AM (#8285440)
I do agree with you that science doesn't show causation, but I think your interpretation of science is incorrect:

> Therefore, all scientific analysis is unverifiable.

I disagree. It's verified by experiment. (Here I'm using "verify" to mean that contradictions have not (yet) been found by experimental observation).

> Knowledge of the world is completely unjustified.

I disagree. Again, it's justified by experiment. If that's not enough for you, too bad, because that's all we have.

> Our immense presumption of consistency in world phenomena when we really have no basis for asserting uniformity of nature.

I disagree. This is only asserted insofar as it's 1) useful, and 2) justified by observation.

I don't think you understand the significance of scientific results. They don't say "at a fundamental, irreducible level, this is how <some system> operates." Rather, they're saying something more along the lines of "as far as we can tell, this is a description of how <some system> operates, but it's entirely possible that we're wrong. However, we don't have any data that shows that we're wrong (yet), and because this description is useful for understanding <some system>, we're going to use it."

We don't need to know how a system works at a fundamental level, if understanding it at a less-detailed level is useful. I do agree with you that we can't determine "actual causality", but we don't need to, if we can instead find a bunch of really good correlations. The problem is that people find lots of crappy correlations, and/or can't tell the difference between good and crappy correlations.

Re:Correlation is usually not causation. But why not? on Monday September 08, 2014 @08:22AM (#8284343)
> it's fair to say that experiment shows causation

No, that experiment doesn't show causation.

> I do think 'perhaps' we could use correlation more to assume causation. I think we are too cautious

Why do you think that? Is it because you think that science is moving too slowly (thus wasting time and money)? Is it because you think that good results are mistakenly discarded?

"using correlation more to assume causation" should produce results more quickly, both correct and incorrect. Do you understand the costs of incorrect results? First, incorrect results can have negative consequences for the consumers: for example, drugs that have harmful impacts and no beneficial ones for the people taking them (in addition to the cost of the drug, and the opportunity cost of not doing something else known to be beneficial). Second, time is wasted following up incorrect results and work based on incorrect results would be worthless. Third, the incorrect results would have to be overturned (and this communicated to everybody who had taken them as correct).

I think deciding whether to "use correlation more to assume causation" needs to take into account the costs and benefits of incorrect results, as well as the costs and benefits of correct results. Do you have any data on this? (unfortunately, I do not)

> certainly the haters always bring in correlation to stop science articles they think don't follow their beliefs

Can you support this accusation with examples of it happening to articles that actually do a good job of showing their result is something more than a correlation? Or are you saying that this happened to articles that just present a correlation?

Re:Show HN: The Clojalyzer on Thursday September 04, 2014 @04:42PM (#8270522)
Wow, I had no idea that such a thing existed. That is far more feature-rich. Thanks for posting it.

However, one advantage (or disadvantage depending on your P.O.V :) ) of the Clojalyzer is that it's not tied to Clojars. So, for instance, if you have a Java project with a single Clojure script in it, you can Clojalyze that. While it is tied to Github, that's not fundamental to how it works and I plan on improving it soon, to also allow copy/paste and fetching from other urls (at the very least).

Re:Show HN: The Clojalyzer on Thursday September 04, 2014 @03:13PM (#8270072)
Author here. Thanks!

What other features could the Clojalyzer provide that you would find useful?

Re:Show HN: The Clojalyzer on Thursday September 04, 2014 @03:11PM (#8270062)
Author here.

That's really cool! Thanks for posting it, it's giving me more ideas for improving the Clojalyzer.

What are your favorite or most useful features of godoc?

Re:A minimal, UI-focused programming language for web designers on Tuesday September 02, 2014 @09:46AM (#8257474)
I don't know what you would like clarified, so please let me know if this doesn't cover it:

IMHO, the OP is presenting a DSL (DSL = domain specific language), and there are at least two common ways to implement DSLs, embedded and external (i.e. not embedded):

from http://en.wikipedia.org/wiki/Domain-specific_language:

     embedded (or internal) domain-specific languages, implemented as libraries
     which exploit the syntax of their host general purpose language or a subset 
     thereof, while adding domain-specific language elements (data types, routines,
     methods, macros etc.)
An example would be with parsers. Parser combinators are usually an embedded DSL. Tools like Lex and YACC are not embedded DSLs (as far as I know).

-----

Disclaimer: both have pros and cons, etc. etc. Interested in the author's motivations, not in debating which way is better, etc. etc.

Re:A minimal, UI-focused programming language for web designers on Tuesday September 02, 2014 @08:18AM (#8257095)
This seems to be implemented as an external DSL, with a brand new syntax and semantics. So my question is, why do that instead of implement it as an embedded DSL?

(Disclaimer: this is an honest question out of curiosity. I don't mean to imply that an embedded DSL is the right way, or that it's better -- but I do believe there's a tradeoff here and am interested in how that tradeoff factored in to the decision to implement this as a separate language.)

Re:CourtesyImplementation (2004) on Wednesday August 27, 2014 @12:27PM (#8232973)
It's difficult to see the point because it's not a very good example. Why do Elephants inherit from Node (they seem entirely unrelated)? How can I put things other than Elephants in boxes -- by also having them inherit from Node? Why isn't there a "Leaf" subclass of Node that contains one of anything?

I think the tradeoff between adding methods to a class hierarchy and adding cases to functions is relevant here (I think this is known as the expression problem -- http://en.wikipedia.org/wiki/Expression_problem -- but I'm not sure), but it's not mentioned:

> Now the kind_of? test in num_elephants is a smell, since we should be wary of any conditional that tests the type of an object.

Re:On the foolishness of “natural language programming” on Monday August 25, 2014 @07:36PM (#8224871)
> Could we generally agree that language is instinctual and follows formal or formalalizable rules

No, not without some evidence.

----

> First in it's immediate dismissal of any formalism inherent in natural language

That's not what Dijkstra's article is saying.

> the ease at which he dismisses the proposition without any real consideration

Dijkstra provides several paragraphs of clarification. IMHO, these do provide useful context and show the reader why he has the opinion that he does (of course, we may just disagree here -- but that's okay). What do you feel is missing?

> This subject should be under the purview of analytic philosophy and linguistics, not mathematics or computer science.

Why?

> To say differently is literally, demonstrably false.

Why? Can you demonstrate that, or point to a source that does?

> Many people in this thread are talking about the inability of plebes to express what they actually want. This is a fair point, but not a problem with language specifically.

Why not?

> Graduate of analytic philosophy

Possible appeal to authority.

> This is not up for debate

Why not?

> it's easily provable.

Then please prove it, or point to something else that does so.

> I could site dozens of linguists, Pinker immediately comes to mind offhand.

Then please do so, and please be more specific than just giving us "Pinker". The more specific you can be, the more useful the citation is. I (and presumably others here) are not familiar with his work.

Please forgive my ignorance, but what is the problem with bundling n different versions of a library? Is it just that the bundle size increases? Or are there additional problems?

(That's not to say that the bundle size isn't important -- just that I would like to know if it's the only drawback)

Sorry, I think I'm missing something because I don't see the problem -- why can't foo and bar just use different versions of baz? Is it not possible to do that?
Re:A JavaScript Quality Guide on Tuesday August 19, 2014 @10:14AM (#8197358)
That doesn't answer my question as far as I can tell, unless you're saying that:

      "Style checking" means "Automated style checkers such as jscs"
Re:A JavaScript Quality Guide on Tuesday August 19, 2014 @10:02AM (#8197290)
I'm confused by what "Style checking" (https://github.com/bevacqua/js/#style-checking) means.

Aren't many of the other suggestions precisely "style checking" concerns? Semicolons, spacing, string quotes, conditional brackets, etc. ?

Not to say that there isn't a difference -- just that I don't see what it is.

This is very interesting, however, I think the paper must be viewed with some skepticism:

- their Scopus queries had tons of problems, some of which they acknowledge. Their model for positive and negative results also seems to be inadequate: a paper can report multiple results, each of which will have its own p-value. How would this show up in their queries? Furthermore, how accurate were their queries (i.e. did they quantify them)?

- the results they got from Scopus depended heavily on what they queried for (as mentioned in a previous comment). (This was acknowledged in the paper)

- what about all the other p-values? They only looked at 0.04-0.049 and 0.051 and 0.06. What about 0.5? What about < 0.04? What about > 0.06? I can't understand why they don't report results for these other ranges, especially when they were already doing automated analysis. This makes me extremely suspicious.

- results before 1996 are suspect because the Scopus data is incomplete; this is assumed to not matter because "no discontinuity appears in Figs. 3 & 5." I.e., the authors have no idea what the results of the query would look like across the full data set.

Re:Safely Composable Type-Specific Languages [pdf] on Wednesday August 13, 2014 @12:50PM (#8173812)
Formatting thanks to @tempodox:

----------------

It's very interesting and neat and I hope they keep making progress, but one big question that I'm left with is why this is better than using an embedded DSL.

This is supposed to be addressed on page 2, but the example is kind of a strawman:

  let webpage : HTML = HTMLElement(Dict.empty(), [BodyElement(Dict.empty(),
    [H1Element(Dict.empty(), [TextNode("Results for " + keyword)]),
     ULElement((Dict.add Dict.empty() ("id","results")), to_list_items(query(db,
      SelectStmt(["title", "snippet"], "products",
       [WhereClause(InPredicate(StringLit(keyword), "title"))]))))])])
Although they claim that it's "too cognitively demanding for comfort", there are many ways that it could be improved without resorting syntax extensions, for example:

  let webpage : HTML = HTML({}, [Body({},
    [H1({}, ["Results for " + keyword]),
     UL({"id": "results"}, to_list_items(query(db,
     ... etc. ...
Another reason to prefer an EDSL over syntax extensions for writing HTML is that an EDSL won't require that you write the close tags!

This isn't to say that they're wrong, it's that I think they need to do a better job of comparing their approach with EDSLs.

Older »