How can you capture multiple arguments weakly in a Swift closure?

From Expressions in “The Swift Programming Language” (emphasis added): Closure Expression … A closure expression can explicitly specify the values that it captures from the surrounding scope using a capture list. A capture list is written as a comma separated list surrounded by square brackets, before the list of parameters. If you use a capture … Read more

Defining Setter/Getter for an unparented local variable: impossible?

This is currently possible in environments with Proxies. That would be node > 0.6 run as node –harmony_proxies or >0.7 with node –harmony. Chromium Canary (not sure if it’s out of that yet) in about:flags at the bottom, experimental javascript. Firefox has had it for a while with no flags. So this probably won’t work … Read more

Is there a a way to achieve closures in C

Using FFCALL, #include <callback.h> #include <stdio.h> static void incrementer_(int *in) { ++*in; } static void emitter_(int *in) { printf(“%d\n”, *in); } int main() { int in1 = 10, in2 = 20; int (*incrementer1)() = alloc_callback(&incrementer_, &in1); int (*emitter1)() = alloc_callback(&emitter_, &in1); int (*incrementer2)() = alloc_callback(&incrementer_, &in2); int (*emitter2)() = alloc_callback(&emitter_, &in2); incrementer1(); incrementer2(); emitter1(); emitter2(); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)