« first day (22 days earlier)    last day (15 days later) » 

3:19 PM
@isaacg what should we do with the non-functional parts of Pyth? If, break, else, etc
 
3:43 PM
@isaacg by the way we can generalize augmented assignment, such that =<op><var>... just becomes <var>=<op><var>... in general, not just binary ops
so to negate Z you could just do =_Z
 
4:07 PM
@orlp I would make I function, that is implicit ). I'd keep B as is and remove E entirely.
@orlp That's how it currently works
=hZZ prints 1.
 
4:55 PM
@isaacg ah k
 
 
3 hours later…
7:51 PM
Catching up the discussion about mJJ2 from a week ago.
Shouldn't we just change the parameter order of m?
So mJ2J gives [2, 2], because it maps each element of urange(assign(J,2)) to J.
I can't see any disadvantages (beside that the notation is unfamiliar).
And also follow through this notation on all other lambda-funcitons, like order-by, enumerated-map, reduce, ...
 
 
2 hours later…
10:19 PM
@Jakube because it doesn't make any sense - you're effectively time traveling
and it's impossible in Pyth
I explained it before, if you scroll up
it's because we're a fixed arity prefix language
you can't have an arity depend on what comes AFTER that thing
 
10:39 PM
If we change the parameter order of map, then it is no time traveling.
In the expression map(a, b), b the iterable is evaluated first, and then mapped using the lambda-expression a.
So if we change the order to map(b, a), the parsing order and the evaluation order is the same.
So the first J assigns, all other J only evaluate.
@orlp
 
that's a possibility
oh now I see what you mean
 
It is be really easy to implement. And can save 2 chars on various challenges.
For instance on this one: goo.gl/BbJOx1
 
we can't swap the order of L though
actually
that generalizes a bit
you can't swap the order for things where the argument is optional
not sure if there are any other functions for which the argument is optional
 
What do you mean by swapping the order of L?
But your right, optional arguments are difficult.
 
like, since calling L is optional the lambda has to be first
(in Pyth5 L is quite different)
 
10:50 PM
Oh, I see
 
L no longer replaces y - you call it using L
 
Would there be any other conflicts?
 
but when you define L you instantly call it
 
Yes, I know.
But I think it could work on everything else, like map, enumerated-map, filter, order-by, group-by, reduce.
 

« first day (22 days earlier)    last day (15 days later) »