Skip to main content
17 votes
Accepted

Is it possible for a stack-based programming language to be concurrent?

So, can stack-based programming languages be concurrent? Sure. Could they achieve concurrency by using multiple stacks at the same time or something alike? Already for normal languages multi-...
Derek Elkins left SE's user avatar
8 votes

Is it possible for a stack-based programming language to be concurrent?

I know a bit about FORTH so I will confine myself to that. It is a low level language, giving you as programmer access to all the hardware resources. So you can do whatever you like. Concurrency In ...
ghellquist's user avatar
4 votes

Application of lambda function in Simply Typed Lambda Calculus

The term (λx. x(λx. x)) (u r) parses as (λx. M) N where M=(x (λx. x)) and N=(u r) so, we can perform a $\beta$ step and ...
chi's user avatar
  • 14.6k
3 votes
Accepted

Application of lambda function in Simply Typed Lambda Calculus

(Summary of my explanations in the comments under the questions) I think that you did not parse the term correctly. It should be read as $(λx.(x\;(λx.x)))\;(u\;r)$, not as $((λx.x)\;(λx.x))\;(u\;r)$. ...
Rodolphe Lepigre's user avatar
3 votes

Why Normalisation by Evaluation needs to use a different representation of programs?

It is good to know some basic facts about section-retraction pairs. Suppose $f : X \to Y$ of and $g : Y \to X$ are maps such that $g \circ f = \mathrm{id}_X$. We say that they form a section-...
Andrej Bauer's user avatar
  • 30.9k
3 votes

Can contiguous arrays be lazily evaluated?

Haskell supports immutable arrays in the obvious way. This is an extremely useful data structure when used in conjunction with lazy evaluation, because you can store unevaluated thunks in the array ...
Pseudonym's user avatar
  • 22.3k
3 votes

Playing to win strategy algorithm

Your game is equivalent to the PSPACE-complete problem TQBF. The quantified Boolean formula corresponding to your example is $$ \forall x \forall y \exists z (x \land y) \lor (y \land z) \lor (\lnot y ...
Yuval Filmus's user avatar
3 votes

Meaning of “call by reference”

When you call a function, it gets the arguments. In math, as well as "pure" functional languages, the function can look at those arguments and compute things based on them, then return a result. The ...
Joey Eremondi's user avatar
2 votes

In what cases is graph rewriting not enough to avoid duplicate work?

Consider this program: f (m : Nat) x y = (x, if H(m,m) then x else y) my_f = f my_number my_f hard harder where H(x,x) ...
Raphael's user avatar
  • 72.6k
2 votes
Accepted

Understanding Applicative Evaluation Order with the Z-Combinator

Let's call your proposal X, instead: X = lambda f : (lambda x : f( lambda z: x(x) (z) )) (lambda x : f(x(x))) For convenience,...
chi's user avatar
  • 14.6k
2 votes
Accepted

How to show that i have significant improvements over the baselines?

Odds are, you can't. That's a judgement call, and it's notoriously hard to get other people to change their judgement. The path is to find new evidence or facts they might not be aware of; assemble ...
D.W.'s user avatar
  • 162k
2 votes

Must the evaluation strategy for a language be specified in order to apply the Church-Rosser Theorem?

The Church-Rosser theorem gives you the following guarantees: A term has at most one normal form. That is, there aren't different normal forms depending on your choice of evaluation strategy. If a ...
Pseudonym's user avatar
  • 22.3k
1 vote

Best algorithm to evaluate a function that takes the elements of all possible combinations of N numbers

In The Coolest Way to Generate Combinations by Frank Ruskey and Aaron Williams the authors describe a method to iterate over all combinations of a set such that at most two elements are added or ...
orlp's user avatar
  • 13.6k
1 vote

Results of a Program After Call By Reference Vs. Call By Value-Result

Just to clean up some confusion: What you call “call by reference” was “call by name” in Algol. In newer languages, “call by reference” will take the address of an object and the function accesses the ...
gnasher729's user avatar
  • 30.7k
1 vote

Is there a hierarchy of computational expressivity that is sensitive to evaluation strategies?

Most (or all) reasonable programming are Turing-complete, and thus can be used to compute exactly the computable functions, i.e., to decide the decidable languages, nothing more and nothing less. So ...
D.W.'s user avatar
  • 162k
1 vote
Accepted

Is the term $(\lambda x.x)(y y)$ a normal form in call-by-value reduction strategy?

After some research, I think I can answer this question by myself now. Short answer Wikipedia is correct, that is If the $\lambda $-calculus uses call by value reduction strategy, the term $(\lambda x....
chansey's user avatar
  • 295
1 vote

How to evaluate the learned prototypes for multivariate time-series (e.g. motion)?

You note " but with more than one prototype per class/cluster." We often call this a polymorphic class. Consider the analogue in text.. C1 = { dpacekfjklwalkflwalkklpacedalyutekwalksfj} C2 = { ...
Eamonn Keogh's user avatar
1 vote

How to use Latin hypercube sampling with fixed points?

You've divided the x values into 10 columns, and divided the y values into 10 rows, so we have a 10x10 grid. Take any row that is already covered by some already evaluated point, and remove it from ...
D.W.'s user avatar
  • 162k
1 vote

Strategy to create a testbed and gold standard

You can't. You can't squeeze blood out of a stone. If you want to evaluate how well your method will work on real documents, you need real documents. With synthetically/artificially generated ...
D.W.'s user avatar
  • 162k

Only top scored, non community-wiki answers of a minimum length are eligible