Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nedbat
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
61.
▲
by
nedbat
7y ago
Did you mean that Git's source code is open?
62.
▲
by
nedbat
7y ago
So despite their blog post explaining why it took so long to cancel, you believe something nefarious or incompetent was going on?
63.
▲
by
nedbat
7y ago
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-...
64.
▲
by
nedbat
7y ago
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 i
65.
▲
by
nedbat
7y ago
In my reproduction, yes. But the original failure was on Travis, which I doubt is using docker on mac.
66.
▲
by
nedbat
7y ago
If the monoculture were easy to resist, it wouldn't need lamentation. :)
67.
▲
by
nedbat
7y ago
I have tried removing the two pragmas, and the problem still happens.
68.
▲
by
nedbat
7y ago
And Guido is currently one of the five members of the steering council.
69.
▲
by
nedbat
7y ago
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.
70.
▲
by
nedbat
7y ago
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
71.
▲
by
nedbat
7y ago
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
72.
▲
by
nedbat
7y ago
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 mi
73.
▲
by
nedbat
7y ago
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?
74.
▲
by
nedbat
7y ago
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 rul
75.
▲
by
nedbat
7y ago
Nothing is dated, except the binary releases, which are all 10 years old.... :(
76.
▲
by
nedbat
8y ago
Python errors in your Cog-generator will report the correct file and line number in the larger containing file.
77.
▲
by
nedbat
8y ago
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?
78.
▲
by
nedbat
8y ago
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?
79.
▲
by
nedbat
8y ago
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 name
80.
▲
by
nedbat
8y ago
Good idea: i added syntax highlighting to the first example on the page.
81.
▲
by
nedbat
8y ago
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.
82.
▲
by
nedbat
8y ago
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.
83.
▲
by
nedbat
8y ago
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.
84.
▲
by
nedbat
8y ago
As it happens, "cog" is also implicitly imported, though tbh I forget why....!
85.
▲
by
nedbat
8y ago
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.
86.
▲
by
nedbat
8y ago
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.
87.
▲
by
nedbat
8y ago
That would be interesting. In what form would you express the result?
88.
▲
by
nedbat
10y ago
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)
89.
▲
by
nedbat
10y ago
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.
90.
▲
by
nedbat
10y ago
True dat.
More ›