HN user

bakery2k

433 karma
Posts37
Comments121
View on HN
lwn.net 6y ago

Lua and Python

bakery2k
3pts0
discuss.python.org 6y ago

Guido van Rossum Exits Python Steering Council

bakery2k
70pts4
martin.ankerl.com 6y ago

Hashmaps Benchmarks – Finding the Fastest, Memory Efficient Hashmap

bakery2k
3pts0
news.ycombinator.com 7y ago

Ask HN: Any experience with Python-in-the-browser (Python-to-JavaScript) tools?

bakery2k
3pts2
lwn.net 8y ago

PEP 572 and decision-making in Python

bakery2k
1pts0
lwn.net 8y ago

Linux distributions and Python 2

bakery2k
3pts0
medium.com 8y ago

The other (great) benefit of Python type annotations

bakery2k
1pts0
penguindreams.org 8y ago

Tech Culture Shock: From America to the South Pacific, and Seattle to Chicago

bakery2k
2pts0
news.ycombinator.com 8y ago

Ask HN: Which version of JavaScript are you using for public websites in 2018?

bakery2k
2pts0
mail.python.org 8y ago

Guido van Rossum: Python 2 end-of-life will be on January 1st, 2020

bakery2k
91pts30
news.ycombinator.com 8y ago

Ask HN: Have tracing JIT compilers lost?

bakery2k
9pts3
news.ycombinator.com 8y ago

Ask HN: What “new” programming languages will you be using in 2018?

bakery2k
2pts1
www.youtube.com 8y ago

Armin Ronacher – A Python for Future Generations

bakery2k
1pts0
www.youtube.com 8y ago

Implementing Swift Generics (2017 LLVM Developers’ Meeting)

bakery2k
1pts0
www.deathandtaxesmag.com 8y ago

Steve Jobs muses on his own obsolescence and legacy in 1994

bakery2k
1pts0
news.ycombinator.com 8y ago

Ask HN: Would you recommend sharing code between an in-browser app and a CLI tool?

bakery2k
3pts2
medium.com 8y ago

Understanding Asyncio in Python

bakery2k
2pts0
maniagnosis.crsr.net 8y ago

On Complete Gibberish: Language syntax that [Tommy M. McGuire] doesn’t like

bakery2k
1pts0
lwn.net 9y ago

2017 Python Language Summit: Lightning Talks

bakery2k
92pts13
www.synopsys.com 9y ago

Swift: Close to greatness in programming language design (Part 1 of 3)

bakery2k
3pts1
www.youtube.com 9y ago

The removal of Python's Global Interpreter Lock – how's it going? (PyCon 2017)

bakery2k
3pts0
medium.com 9y ago

The future is looking bright for Python

bakery2k
4pts0
news.ycombinator.com 9y ago

Ask HN: Which Amazon S3 region should I use if latency is not a consideration?

bakery2k
1pts0
lambda-the-ultimate.org 9y ago

Have tracing JIT compilers won? (2010)

bakery2k
2pts0
news.ycombinator.com 9y ago

Ask HN: Which language for interacting with AWS?

bakery2k
5pts6
www.infoworld.com 9y ago

3 new programming languages: What their creators say

bakery2k
1pts0
gist.github.com 9y ago

Total pip packages downloaded, separated by Python versions (June – August 2016)

bakery2k
2pts3
mail.python.org 9y ago

[Python-Dev] PEP 526 Ready: Syntax for Variable and Attribute Annotations

bakery2k
2pts0
learning-python.com 9y ago

Python Changes 2014+ by Mark Lutz (author, Learning Python and Programming Python)

bakery2k
3pts0
www.youtube.com 9y ago

MicroPython: a journey from Kickstarter to Space

bakery2k
4pts0

So, Envoy will be embedding WebAssembly alongside (or instead of) Lua?

Are other projects moving from Lua (or other embedded scripting languages) to WebAssembly? What are the benefits of compiling an extension to WASM rather than writing it in Lua?

Isn't code generation during parsing still common today? In particular, bytecode generation in interpreters (and JIT compilers) for scripting languages, e.g. Lua?

Well, however the `range` function is implemented, IMO its API would be better expressed as true overloading - as two functions with the same name.

If all we do is write Pythonic code (especially now that "Pythonic" seems to include type hints), what's the benefit of the highly dynamic CPython virtual machine?

Surely a faster VM, or even an ahead-of-time compiler, would be possible if we give up on some dynamism? Is that a direction the community should take?

(I think Guido's answer would be no, based on his apparent dislike of existing "Python compiler" projects such as Nuitka.)

`range(stop)` and `range(1, stop)` are both supported, but without overloading, the implementation of `range` is messy as it has to work out the meaning of each argument manually.

That's the thing - it's documented as overloaded, because that's the most intuitive explanation. Wren would allow it to actually be implemented as an overloaded function.

Python doesn't support overloading, and it doesn't support optional arguments before required ones, so the actual implementation in Python is a bit messy - something like:

  def range(start_or_stop, optional_stop=None):
      if optional_stop is None:
          start = 0
          stop = start_or_stop
      else:
          start = start_or_stop
          stop = optional_stop
      ...

The Wren scripting language supports this kind of "overloading by arity" [0].

Wren therefore allows overloads such as `range(stop)` and `range(start, stop)`. This is more intuitive than Python's `range(start=0, stop)`, which might be the only function in the language that has an optional parameter before a required one.

[0] http://wren.io/method-calls.html

From GitHub [1]:

  "Plans to try MIR light-weight JIT first for CRuby or/and MRuby implementation"
  "MIR is strongly typed"
Is there an explanation of how the project bridges the gap between dynamically-typed Ruby and statically-typed MIR?

More generally, I'd love to see something like MRuby+MIR be successful. It would be great to see an alternative to the aging LuaJIT.

[1] https://github.com/vnmakarov/mir

Python Type Hints 7 years ago

Spot on. Static typing has benefits, but it also has a cost. Python's optional type hints have all the complexity but only some of the benefits - in my experience, runtime type errors are still common.

To me it feels like python is running as far away from simplicity as fast as possible.

Despite its reputation, Python hasn't been a simple language for a long time.

the actual creator of the language was so against the addition of this operator that he saw the community’s insistence on it as reason to step down as BDFL.

That's backwards. The community was generally opposed to the walrus operator, and Guido stepped down because of (among other things) the community's reaction when he insisted on adding it.

I came across this recently, when writing a blog post about a puzzle I solved. I wasn't sure whether to structure the post "chronologically", telling a story:

    1. Here's an interesting puzzle.
    2, 3, 4, 5. These are the steps I took to solve it.
    6. Hence the solution is X.
or using BLUF:
    1. Here's an interesting puzzle.
    2. I found the solution is X.
    3, 4, 5, 6. These are the steps I took to find that solution.
I'm still not sure which structure would be the best choice in which situation. Are there any guidelines?
A lighter V8 7 years ago

I don't think its possible to efficiently compile a dynamically-typed language like Python to statically-typed WASM.