HNHacker News
TopNewBestAskShowJobs

nedbat

365 karma · joined February 1, 2013

submissionscomments
nedbat··on Dgit: Git with decentralized remotes
Did you mean that Git's source code is open?
nedbat··on PyCon US 2020 in Pittsburgh, Pennsylvania is cancelled
So despite their blog post explaining why it took so long to cancel, you believe something nefarious or incompetent was going on?
nedbat··on PyCon US 2020 in Pittsburgh, Pennsylvania is cancelled
Conference organizers are liable for cancelled contracts, unless the cancellation is due to a larger force.

Did you read the March 12th blog post? https://pycon.blogspot.com/2020/03/march-12-update-on-covid-...

nedbat··on Bug #915: Please help
Thanks, this was a good idea. I tried adding "pragma temp_store = 2", and it did not fix the problem, though I'm not sure I wasn't already using memory temp storage. The interaction of compile-time macros and pragmas is hard to decipher from the Python bindings.
nedbat··on Bug #915: Please help
In my reproduction, yes. But the original failure was on Travis, which I doubt is using docker on mac.
nedbat··on Bug #915: Please help
If the monoculture were easy to resist, it wouldn't need lamentation. :)
nedbat··on Bug #915: Please help
I have tried removing the two pragmas, and the problem still happens.
nedbat··on Thank You, Guido
And Guido is currently one of the five members of the steering council.
nedbat··on Why a mock doesn’t work
I can see why adding "Python" would help here on Hacker News. The original complaint seemed to go deeper than that, I think because the title here is different than the title on my site.
nedbat··on Why a mock doesn’t work
I notice that the title on HN is "Why a mock doesn't work," which could be interpreted as "Mocks don't work." My title was (and still is) "Why your mock doesn't work." I don't know if that is the source of the confusion.
nedbat··on Why a mock doesn’t work
How is "altering a symbol table" different than "creating a new variable"? Imports have to create a new variable of some sort: their entire point is to provide a name that you can use.

"import mod" defines mod, which didn't exist in your module before.

"from mod import val" defines val, which didn't exist in your module before.

nedbat··on Why a mock doesn’t work
I'm not sure what your objection is. People try to use mocks, and they don't work because they've mocked the wrong name. I explain this in the article. The article is about why their mock didn't work. How is this a misleading title? How is this a title I don't agree with?

Are we talking about the same piece and the same title? You seem to be under the impression that I am trying to tell people not to use mocks. Have you read the piece?

nedbat··on Why a mock doesn’t work
What title would you prefer? "Your Python mock might not work, but it could still be a good idea if you do it right, and here I will explain how"? :)

I didn't mean to imply that mocking is bad. Is that what you took from it? Why would I explain how to get mocks to work if I thought people shouldn't use mocks?

nedbat··on Why a mock doesn’t work
I don't understand what you mean by "will always work, even if it doesn't accomplish what you want." Mocking os.listdir will be useless if your product code's imports don't match it. How is this "one rule" to use?
nedbat··on SETL programming language
Nothing is dated, except the binary releases, which are all 10 years old.... :(
nedbat··on Cog: Use pieces of Python code as generators in your source files
Python errors in your Cog-generator will report the correct file and line number in the larger containing file.
nedbat··on Cog: Use pieces of Python code as generators in your source files
What macro system should I use if I want to define a data schema in one place, and then generate C code and SQL code from it?
nedbat··on Cog: Use pieces of Python code as generators in your source files
I'm not sure what you mean by "standard tooling for every language." Cog will work with any text file. Or do you mean that cog itself is non-standard?
nedbat··on Cog: Use pieces of Python code as generators in your source files
Maybe I don't understand the nuances here, but I don't see how Cog code isn't hygenic: the Python namespace it operates in has nothing to do with the namespaces in the containing file as a whole. There's no way for names chosen by the Cog -writer to conflict with the names in the larger file.
nedbat··on Cog: Use pieces of Python code as generators in your source files
Good idea: i added syntax highlighting to the first example on the page.
nedbat··on Cog: Use pieces of Python code as generators in your source files
Have you actually looked at what cog does? I don't see how you would manually use Emacs commands to do the same more than once.
nedbat··on Cog: Use pieces of Python code as generators in your source files
C++ macros can't read a configuration file to generate code (at least I don't want to know that they can!). And Cog works in any text file, so it can be used for languages (like HTML) that don't have macros.
nedbat··on Cog: Use pieces of Python code as generators in your source files
I use it in my presentations' HTML files to add computed content, such as the results of running code, or more complicated tables and diagrams.
nedbat··on Cog: Use pieces of Python code as generators in your source files
As it happens, "cog" is also implicitly imported, though tbh I forget why....!
nedbat··on Cog: Use pieces of Python code as generators in your source files
Doing it manually in an editor is fine, but it's useful to automate the process also. Just because something can be done in an editor doesn't mean you don't want to be able to do it at the command line too.
nedbat··on Cog: Use pieces of Python code as generators in your source files
The file containing the code is text. What AST do you mean? Cog doesn't have to understand anything about the structure of the containing file, so it can be used on any text file.
nedbat··on Remote code execution vulnerability in SQLite
That would be interesting. In what form would you express the result?
nedbat··on Computing primes with CSS
Anything can be overused. Do you find my use of them "awful"? It will mean we don't need code like: "...".format(a=a, b=b, c=c, d=d)
nedbat··on Computing primes with CSS
There is a precomputation that 32 is the (rough) square root of 1000. There is no precomputation of primes. It is true that the code will not work beyond 1000, unless you also add more selectors.
nedbat··on Computing primes with CSS
True dat.
← PreviousPage 3 of 4Next →