1. a -> b :: Function(a)[b]
(a, k1=t1, k2=t2) -> b :: Function(a, k1=t1, k2=t2)[b]
2. JSON = RecTypeVar('JSON', lambda Self: Union[None, bool, int, float, str, List[Self], Dict[str, Self]])huh!
445 karma · joined February 24, 2020
1. a -> b :: Function(a)[b]
(a, k1=t1, k2=t2) -> b :: Function(a, k1=t1, k2=t2)[b]
2. JSON = RecTypeVar('JSON', lambda Self: Union[None, bool, int, float, str, List[Self], Dict[str, Self]])huh!
* ''Woman Blacksmith'' (Linux Networking Cookbook)
* ''Woman on Circus Trapeze'' (Network Security Tools)
huh! not animals!!
4 * integrate sqrt(r^2 - x^2) w.r.t. x from x=0 to x=r
which is from the equation of circle with radius r centered at the origin: x^2 + y^2 = r^2
=> y = sqrt(r^2 - x^2)
any other way achieve the same using integration?Or ((~n) & 1) as ChrisLomont pointed out
((n + (n % 2)) // 2) % 2 = ((n + (n & 1)) >> 1) & 1 = ((n & 2) >> 1) ^ (n & 1) = (n ^ (n >> 1)) & 1
In human terms, that means XOR of 1, 2, ..., n is: (if (n is divisible by 2) then n else 0) + (if ((if (n is divisible by 2) then n else n + 1) is divisible by 4) then 1 else 0)
Or, as code: n * ~(n & 1) + (n ^ (n >> 1)) & 1
Phew! Can this be made any simpler or smaller?
1 ^ 10 = 11, 11 ^ 11 = 0, 0 ^ 100 = 100, 100 ^ 101 = 001, 1 ^ 110 = 111, 111 ^ 111 = 0, 0 ^ 1000 = 1000, ...
----
If you have some time, take a pen and a paper and think it through, you'll really like it...
It is like PHP, but without namespace pollution (like C has)
It is like JavaScript: the good parts
It is like C : as advertised, only in syntax
== End of free advertising, yeah ==
It is like Wren or Squirrel, but not as lightweight. Why the source code tgz'd is more that 100MB?
.POSIX
and then you have an ifeq .. endif block? and then after a few lines: %.o: src/%.c
Why?But one request, please: make 'break' implicit at the end of each case in switch statements, introduce fallthrough (fallthru?) as a keyword instead.
(How many times did you need to NOT use break in switch-case?)
< ''Muft nehi, Mukt''
What happened in 1886?
$ git clone http://git.bytex64.net/blerg.git
Cloning blerg...
error: Empty reply from server (curl_result = 52, http_code = 0, sha1 = 95d56e6cc [...])
[...]
Sigh! How can we look at the C code?[EDIT: now looked at other comments about how this is a joke... is this error intentional?]
In your m.awk, I also noticed that the markdown formattings (bold, inline and links) are not turned off in code blocks.
I suppose it is not much hard to translate this into PHP...
* More pollution, global warming, rise of sea level, more health threats etc.
* Political and socio-economical instability, crisis and maybe a third world war?
#define foreach(container, variable, iterator) \
for (JOIN(container, it) iterator = JOIN(JOIN(container, it), each) (variable); \
!iterator.done; iterator.step(&iterator))
Is this less nice? I personally do not like dangling )'s [I did not have to write DOS batch scripts :D]Say, you defined a function OMEGA as:
=LAMBDA(F, F(F))
and then call =OMEGA(OMEGA)
hmm.Well, it is not clear if Excel's LAMBDAs are first-class or not. If not, the above wouldn't work.