Reputation
18,090
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
1 47 73
Newest
 Nice Answer
Impact
~309k people reached

Aug
14
answered Can higher order functions ever be pure?
Aug
14
comment Why don't “multi-infinite” list comprehensions work with lazy evaluation?
For example, with most bijections the code in your questions would not find the first N Pythagorean triples, just some triples in an order that is meaningless unless you keep the exact bijection in mind. And none of this even begins to address the question of how you would decide when to apply this tranformation.
Aug
14
comment Why don't “multi-infinite” list comprehensions work with lazy evaluation?
All countable types can be represented by (non-negative) integers in some way. That is what it means to be countable. And all types expressible in Haskell (and indeed the set of all possible values in any computational process) are countable. The question is whether the compiler can infer an appropriate bijection, respecting the numerous invariants that most types have (e.g. rationals usually want to be irreducible, floating point-esque numbers want to be normalized, etc.) and whether the order is both (1) understandable and (2) the order the programmer wants.
Aug
14
comment Why don't “multi-infinite” list comprehensions work with lazy evaluation?
@TheEnvironmentalist There's more to infinite lists than infinite lists of integers, though. Why are those special? (Hint: They aren't.)
Aug
13
comment Can all code be represented as a series of Map / Filter / Reduce operations?
Idle thought: Even if we allow nonsense like my_list.map(_ignored => a copy of my_list), it seems like the space use of such a program is bounded by some polynomial (depending on the program length). Then such a language certainly couldn't compute problems that are not in PSPACE. However, as many problems in PSPACE are considered intractible, to say nothing of larger classes, this may not be a very serious restriction.
Aug
13
revised Why don't “multi-infinite” list comprehensions work with lazy evaluation?
added 418 characters in body
Aug
13
awarded  Nice Answer
Aug
13
answered Why don't “multi-infinite” list comprehensions work with lazy evaluation?
Aug
13
comment What prevents others from commerciallly redistributing open source software as-is?
There's a conflict between "allow commercial use" and "don't sell as-is". It is hard to define "as-is" in a satisfactory way: It can't simply mean bit-identical because it is easy to change some really minor aspect without meeting your intent, but to define "sufficently substantial" changes in a way that will hold up in court will at least require consultation with a lawyer, if possible at all.
Aug
13
awarded  Nice Answer
Aug
12
revised Is there any practical way for a linked node structure to be immutable?
added 83 characters in body
Aug
12
revised Is there any practical way for a linked node structure to be immutable?
added 16 characters in body
Aug
12
revised Is there any practical way for a linked node structure to be immutable?
deleted 108 characters in body
Aug
12
answered Is there any practical way for a linked node structure to be immutable?
Jul
25
comment What should JITed bytecode do exactly?
The last point cannot be overstated. All of these libraries take code that's almost at the level of machine code, and turn it into actual machine code. The tricky part in compiling most languages that are called "scripting languages" is getting from the dynamically typed, late-bound, huge, complicated source language to something that is even remotely efficient.
Jul
25
comment What should JITed bytecode do exactly?
@JörgWMittag Perhaps some Forth programs are faster than a C program that you spent the same amount of time writing and optimizing, but often faster than hand-optimized C? You'll excuse me if I am massively skeptical. In fact, if I didn't associate your user name with quite a few good answers, I'd simply dismiss this as yet another instance of the flat-out wrong propaganda that plagues programming language advocacy.
Jul
25
comment What should JITed bytecode do exactly?
FYI the second is called threaded code.
Jul
23
awarded  Guru
Jul
21
comment Error handling in math library functions
If 0 is a meaningful default value, then that is independent of the specific numeric type. Conversely, if semantically zero does not make sense as fallback, the IEEE float 0.0 is not a good value to return.
Jul
20
awarded  Good Answer