Better HN
topnewbestaskshowjobs
Log inSign up

mattfenwick

121 karma · joined Dec 6, 2013 (12y ago) · 112 submissions

Looking for interesting problems!
Submissions

comment 12y ago · link · parent

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?

comment 12y ago · link · parent

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".

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

Sure, we can't rule out those possibilities ... but to me it just sounds like wild speculation.

comment 12y ago · link · parent

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

comment 12y ago · link · parent

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?

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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?

comment 12y ago · link · parent

> 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)

comment 12y ago · link · parent

> 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.

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

> 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?

comment 12y ago · link · parent

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).

comment 12y ago · link · parent

Author here. Thanks!

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

comment 12y ago · link · parent

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?

19.

Show HN: The Clojalyzer(mattfenwick.github.io ↗)

21 points · by mattfenwick · 12y ago · 8 comments

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

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.)

comment 12y ago · link · parent

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.

comment 12y ago · link · parent

> 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.

24.

Men More Likely to Make Dumb Decisions at U.S. Open(time.com ↗)

1 points · by mattfenwick · 12y ago · discuss

comment 12y ago · link · parent

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)

comment 12y ago · link · parent

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?

comment 12y ago · link · parent

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"

comment 12y ago · link · parent

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.

1234