User loginNavigation |
Coroutines with async and await syntax (Python 3.5)With Python 3.5 released, the thing that drew my attention is the support for asynchronous programming through PEP 0492 -- Coroutines with async and await syntax, which added awaitable objects, coroutine functions, asynchronous iteration, and asynchronous context managers. I found the mailing list discussions (look both above and below) particularly helpful in understanding what exactly is going on. Ancient use of generatorsGuido van Rossum reminisces a bit about early discussions of generators in the Python community (read the other messages in the thread as well). I think we talked about the articles he mentions way back when. Earlier still, and beyond the discussion by Guido here, was Icon, a clever little language that I have a soft spot for. i don't think we ever fully assessed its influence on Python and other languages. Portable Efficient Assembly Code-generation in High-level Python
You can use the same code to generate assembly for Windows, Unix, and Golang assembly. The library handles the various ABIs automatically. I haven't seen this cool project before. Among the cool features is the ability to invoke the generated assembly as regular Python functions. Nice. Freer Monads, More Extensible EffectsFreer Monads, More Extensible Effects, by Oleg Kiselyov and Hiromi Ishii:
This looks very promising, and includes some benchmarks comparing the heavily optimized and special-cased monad transformers against this new formulation of extensible effects using Freer monads. See also the reddit discussion. By naasking at 2015-09-05 14:30 | Functional | Theory | Type Theory | 18 comments | other blogs | 19715 reads
Haskell for MacAvailable here with hackernews and reddit discussions ongoing. Even though I'm not a big fan of Haskell, I'm pretty excited about this. It represents a trend where PL is finally taking holistic programmer experiences seriously, and a move toward interactivity in program development that takes advantage of our (a) rich type systems, and (b) increasing budget of computer cycles. Even that they are trying to sell this is good: if people can get used to paying for tooling, that will encourage even more tooling via a healthy market feedback loop. The only drawback is the MAS sandbox, app stores need to learn how to accept developer tools without crippling them. Reagents: Expressing and Composing Fine-grained ConcurrencyReagents: Expressing and Composing Fine-grained Concurrency, by Aaron Turon:
This is a pretty neat approach to writing concurrent code, which lies somewhere between manually implementing low-level concurrent algorithms and STM. Concurrent algorithms are expressed and composed semi-naively, and Reagents automates the retries for you in case of thread interference (for transient failure of CAS updates), or they block waiting for input from another thread (in case of permanent failure where no input is available). The core seems to be k-CAS with synchronous communication between threads to coordinate reactions on shared state. The properties seem rather nice, as Aaron describes:
The benchmarks in section 6 look promising. This appears to be work towards Aaron's thesis which provides many more details. By naasking at 2015-08-24 23:05 | Functional | Implementation | Object-Functional | 2 comments | other blogs | 22066 reads
OcaPic: Programming PIC microcontrollers in OCamlMost embedded systems development is done in C. It's rare to see a functional programming language target any kind of microcontroller, let alone an 8-bit microcontroller with only a few kB of RAM. But the team behind the OcaPic project has somehow managed to get OCaml running on a PIC18 microcontroller. To do so, they created an efficient OCaml virtual machine in PIC assembler (~4kB of program memory), and utilized some clever techniques to postprocess the compiled bytecode to reduce heap usage, eliminate unused closures, reduce indirections, and compress the bytecode representation. Even if you're not interested in embedded systems, you may find some interesting ideas there for reducing overheads or dealing with constrained resource budgets. Eric Lippert's Sharp RegretsIn an article for InformIT, Eric Lippert runs down his "bottom 10" C# language design decisions:
The "lessons learned in retrospect" for each one are nicely done. STABILIZER : Statistically Sound Performance EvaluationMy colleague Mike Rainey described this paper as one of the nicest he's read in a while.
STABILIZER : Statistically Sound Performance Evaluation
One take-away of the paper is the following technique for validation: they verify, empirically, that their randomization technique results in a gaussian distribution of execution time. This does not guarantee that they found all the source of measurement noise, but it guarantees that the source of noise they handled are properly randomized, and that their effect can be reasoned about rigorously using the usual tools of statisticians. Having a gaussian distribution gives you much more than just "hey, taking the average over these runs makes you resilient to {weird hardward effect blah}", it lets you compute p-values and in general use statistics. State of the Haskell ecosystem - August 2015Interesting survey. Based on a brief look I am not sure I agree with all the conclusions/rankings. But most seem to make sense and the Notable Libraries and examples in each category are helpful. By Ehud Lamm at 2015-08-17 17:54 | Functional | login or register to post comments | other blogs | 18629 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 1 day ago
22 weeks 1 day ago
22 weeks 1 day ago
44 weeks 2 days ago
48 weeks 4 days ago
50 weeks 1 day ago
50 weeks 1 day ago
1 year 5 days ago
1 year 5 weeks ago
1 year 5 weeks ago