Stephan Sokolow

Results 866 comments of Stephan Sokolow

> All the parsers presented here use an amount of memory that is proportional to the input. None cause the program's memory usage to balloon up on deeply nested inputs....

I hope it can be fixed. Having to manually implement the error response for receiving the wrong number of positional arguments from Python seems un-Rusty at best.

I'm going to assume you're embedding Python rather than writing a library to be `import`ed by Python. rust-cpython links against Python as a library in that case. I don't think...

> Given a source tree of > myapp/ > myapp/src/main.rs > where does python3.dll go? I've never compiled any Rust binaries with dynamic dependencies for Windows, but I think it's...

Fundamentally, there are two ways to interact with C from Python: 1. Write a C library which uses the libpython API. This will produce a compiled library which Python's `import`...

I do think that "Rust bindings for the python interpreter." would be better as "Rust bindings for the python interpreter, suitable for writing compiled Python extensions or embedding the Python...

In the beginning, Rust only had a macro named `try!(thing)` for unwrapping a result and returning early if it contained an error. Later, Rust gained `thing?` to replace it. I'm...

No problem. Oh, there *is* one other reason `?` won out. Which if these equivalent statements is easier to read? ```rust try!(try!(try!(foo()).bar()).baz()).quux() foo()?.bar()?.baz()?.quux()

You want to minimize the amount of Python machinery in anything where performance matters, so here's how I'd implement something like a recursive factorial that's intended to serve as a...

I fail to see how having a separate `void` type would help Rust here. (Also, Rust does have a `void` type. `c_void` is part of the C FFI alongside `CString`...