Hacker News new | past | comments | ask | show | jobs | submit | more disentanglement's comments login

Your comment calling political measures which are universally accepted across the entire range of politics in Europe (state healthcare, universal education, ...) authoritarian marxist is a hilarious example of what the top poster meant by "the Overton Window is so far right even the Democratic Party is center-right".


Authoritarian - centrally controlled and managed

Marxism - attempt to remove classes from society

The Marxism is being implemented through high taxes and redistribution of wealth via services centrally administered via government.

That seems to meet the definition.


What you're describing are simply ordinary welfare state policies, and what you view as "high taxes" are not particularly high compared to historical tax rates even within the US. The idea that you'd have to be a Marxist to want to centralize health insurance to reduce costs so people don't go bankrupt paying for medical care is simply propaganda. In fact, most Marxists would probably view these kinds of measures as capitalist Band-Aids to keep the entire system from collapsing.


> What you're describing are simply ordinary welfare state policies

Yes, people who support these policies are authoritarian Marxists. I'm not disparaging it, it just is what it is.

The U.S. is authoritarian and largely Marxist.

> The idea that you'd have to be a Marxist to want to centralize health insurance to reduce costs so people don't go bankrupt paying for medical care is simply propaganda.

Not propaganda, it is by definition what it is. It's not really arguable. The propaganda are the opinions on whether or not it's good. There's a fair argument it's good to make centralized healthcare, there's a fair argument against.


Perhaps I can add a counterpoint before anybody gets too excited and spends too much money on a tool they might not enjoy.

Having used Mathematica quite a bit for doing symbolic computation, my opinion on it is pretty much opposite to yours. While the extensive standard library is certainly nice, I think that the programming language used to access it is one of the worst programming languages in the world - certainly the worst I have ever used. I have never seen any other programming language where the basic scoping and evaluation rules are so badly designed and error-prone as in Mathematica.


Can you elaborate as to what you dislike about scoping and eval rules? Asking as a language designer.


Global scope (really global -- even between windows) is the default and the encapsulation tools are not particularly easy or convenient to use and not heavily promoted in the example material.

This leads to a dynamic where anyone without the CS background to recognize the foot-gun and the discipline to disarm it winds up with awful spaghetti code and the all-to-familiar consequences: a big blob of unmaintainable mystery code that becomes more and more difficult to modify until all project time is spent merely keeping it working rather than improving upon it.

We might laugh about this kind of newbie mistake here on HN, but even extremely intelligent people can't be experts at everything and the sheer number of physicist-hours and mathematician-hours I've seen needlessly flushed down this particular toilet is really quite unfortunate.


Thanks for this comment. Have the same experience at a Maths Department.

Each run of some specific code is “ouch, we must try and see when we have the time to understand how it works and how each error is handled.” Just because it is soooo difficult to properly write a module.


> really global -- even between windows

This isn't the language though. A runtime in Mathematica is called a kernel. By default, Mathematica uses one. I think base licenses allow you to run two simultaneous runtimes and you can buy more. When you start a new window you have to pick the kernel, it doesn't launch its own like Jupyter would do.

This is an annoyance with Mathematica: it's proprietary software so it's in a world of license servers, license keys, artificial limits and paid upgrades.


The main issue with the evaluation rules is that Mathematica doesn't distinguish between creating a symbolic expression and evaluating code. That is if I type

  f[x]

and the function `f` is not defined, Mathematica will not give me an error but instead just assume that I meant to create a symbolic expression. If you know some Lisp, just imagine that everything came with an implicit `quote` which would automatically get invoked whenever a unbound variable or function would we encountered.

That issue alone has caused me so many errors simply from mistyping some function or variable name. For simple expressions, such bugs are pretty obvious to spot but if the same occurs deep inside a chain of function calls, this often lead to completely wrong results because the bug got masked by some other manipulations I did on the result of the function call.

Of course, there are tons of hacks and ad-hoc workarounds in Mathematica to get around this (imho fundamentally broken) behaviour to the tune of "just stick another `Evaluate` here" or "just change the function definition from `g[x_]` to `g[x_?NumericQ]` to call the function only when the argument is numeric and otherwise leave it unevaluated".

The situation with the scoping rules is not much better. Consider for instance the following code:

  y = 1;
  expression = Module[{y},1+y]; (* Module creates a new scope in which y is unbound *)

Can you guess what happens if I print out `expression` now?

  Print[expression]
  1+y$4066
Yes, Mathematica has just renamed our variable. If now we wanted to set `y` in our expression to some concrete value, of course the obvious thing to try doesn't work, but just gives me some bullshit:

  Print[ReplaceAll[expression, y->10]]
  10+y$4066
These are all only some simple examples of why doing any kind of metaprogramming in Mathematica just sucks.


Mathematica doesn't suck, it is just an extremely large language and it takes years to learn how to use it properly.

Anyway, to solve your first problem, add the definition f[_]:= Throw["Your error message here"}

To solve your second problem, use Block instead of Module (though in your simple example given here the solution is to just use neither).


> and the function `f` is not defined, Mathematica will not give me an error but instead just assume that I meant to create a symbolic expression.

I've dreamed about creating a language like this, but had to give up because it makes diagnostics impossible in case o typos and things like that..

My best bet now is to have some quote syntax to make a symbol stand for an abstract symbol, like

1 + x -- this sums 1 with x, and errors if x is unbound

1 + 'x -- this is an abstract expression, doesn't care if x is bound or not

Like lisp, except with some first class support to things like derive(1 + 'x, 'x), and, well, every operator needs to respect quoted symbols.. even if + were a user-defined operator or function, 1 + 'x needs to return (the AST) 1 + 'x. I suppose this is the same as Mathematica, except that Mathematica doesn't need quoting


I don't really know what more you wanted from `Module[{y}, 1+y] /. y -> 10`. You've explicitly asked for a new symbol that is unrelated to the global one, and then replaced any occurrences of the global one with 10. Of course there are no occurrences of the global one.

I claim any semantics which resulted in `11` would be extremely confusing, because it would imply the following also resulting in `11`, which is obvious nonsense:

    y = 10;
    Module[{y}, 1+y]


> I claim any semantics which resulted in `11` would be extremely confusing, because it would imply the following also resulting in `11`, which is obvious nonsense:

> y = 10; > Module[{y}, 1+y]

Yes that is precisely the point: because of Mathematicas weird evaluation model, you cannot have ordinary lexical scope as in every other programming language, but the only sensible thing to do is to rename variables under the hood. It is then very easy to leak those renamed variables accidentally in the global scope where you cannot do anything useful with them, because the symbols `y` in the global scope and in the subscope are different.

Another point that the example was meant to illustrate is that once you assign some value to a variable, you can no longer do symbolic manipulation with it (note that in the example, we have replaced 1 by 10 in the end).


Just wondering if this is an example where you are looking for dynamic scope instead of lexical scope? E.g:

y = 1;

expression = Block[{y},1+y];

Print[expression]

2

There are also the 'formal' symbols, e.g. https://reference.wolfram.com/language/ref/character/FormalY... if you want a symbol that will never be assigned a value but can still be substituted using ReplaceAll etc.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: