pddubs
Re:State of Multicore OCaml [pdf]
on Thursday June 28, 2018 @01:10PM (#17418703)
"Objects are a poor man's closures"
Yea but don't forget that closures are a poor man's objects!
Re:Show HN: Cannoli – A compiler for a subset of Python written in Rust
on Thursday May 17, 2018 @07:23PM (#17097089)
> you look up local variables in hash tables every time they are referenced. This is not what Python does: It maps variable names to integer indices during compilation to bytecode, and the bytecode just takes those embedded constant indices and indexes into an array to obtain a local variable's value.
This is only true for function arguments right? Module level bindings and class and object attributes are looked up in dictionaries. I think the same for variables used in closures too?
Re:Show HN: A Python Script to Download Thousands of Wallpapers at Once
on Monday April 23, 2018 @12:33PM (#16904944)
You could just use threads here too - CPython releases the GIL during IO.
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor as executor:
executor.map(function, sequence)
Re:Show HN: Shareable reasons to upgrade to Python 3
on Thursday August 10, 2017 @09:28PM (#14985951)
I think mypy can be considered the canonical type checker for python, Guido van Rossum works on that project. It uses python 3.6 type annotations fully as far as I know.