Quantcast
Channel: User Daira-Emma Hopwood - Stack Overflow
Browsing latest articles
Browse All 22 View Live

Comment by Daira Emma Hopwood on Rust seems to allocate the same space in...

Right, but BitRef behaves in every way like a &bool hypothetically would, so that's not a reason why Rust couldn't have supported &bool for packed bit arrays at the language level. That is,...

View Article



Comment by Daira Emma Hopwood on How to update-alternatives to Python 3...

The question as asked isn't about differences between versions of Python 3; it's specifically about getting python to run Python 3 without upgrading the system from Python 2. It's unsurprising that...

View Article

Comment by Daira Emma Hopwood on How to convert a slice into an array reference?

It definitely can be done in safe code; see Shepmaster's answer. It could also have been done in safe code prior to Rust 1.34, with a loop over the elements or with copy_from_slice.

View Article

Comment by Daira Emma Hopwood on Is the order in which struct fields are...

I don't really have anything to add to the existing answers for that question. With hindsight, I regret all the time that I put into contributing to standardization of ES5. It seemed useful at the...

View Article

Comment by Daira Emma Hopwood on git cherry-pick says "...38c74d is a merge...

The stated premise was that you want to cherry-pick the commits Y..Z. If instead you want to cherry-pick Y^..Z, then yes, substitute Y^ for Y everywhere. (Incidentally, I think git's notation here...

View Article


Comment by Daira Emma Hopwood on Python popen command. Wait until the command...

Also, that bug (github.com/python/cpython/issues/81971) was closed for lack of reproducibility and insufficient information about the platform it was seen on.

View Article

Comment by Daira Emma Hopwood on Python, Unicode, and the Windows console

The answer has been updated. There is no need to include anything else from the previously linked answer.

View Article

Comment by Daira Emma Hopwood on Conversion of boost::optional to bool

The "See here" link appears to be dead.

View Article


Comment by Daira Emma Hopwood on Why can't I use strerror?

This is the only answer that mentions the actual reason: that the string in general has to be dynamically constructed, because it includes the error code when it is unknown. It isn't desirable to have...

View Article


Comment by Daira Emma Hopwood on How to make Cytoscape desktop interface font...

Yup, it's totally inaccessible. Seems to not be paying any attention to window manager font sizes at all.

View Article

Comment by Daira Emma Hopwood on How do I define a macro with multiple...

That won't work if expr contains commas. You could use a variadic macro (C++11 or later) to avoid that problem.

View Article

Answer by Daira Emma Hopwood for How to display utf-8 in windows console

Changing the console code page is both unnecessary and won't work (in particular, setting it to 65001 runs into a Python bug). See this question for details, and for how to print Unicode characters to...

View Article

Answer by Daira Emma Hopwood for Python: Which encoding is used for...

"What should be done with Windows (so that sys.argv elements are correctly interpreted whatever the console)?"For Python 2.x, see this comment on issue2128.(Note that no encoding is correct for the...

View Article


Answer by Daira Emma Hopwood for How can I tell where my python script is...

You could also try http://code.activestate.com/recipes/576515-debugging-a-running-python-process-by-interrupting/ . It should work as long as the Python process doesn't have signals masked, which is...

View Article

Answer by Daira Emma Hopwood for Examples of monoids/semigroups in programming

A really useful example of a commutative monoid is unification in logic and constraint languages. See section 2.8.2.2 of 'Concepts, Techniques and Models of Computer Programming' for a precise...

View Article


Answer by Daira Emma Hopwood for How do I get monotonic time durations in...

As pointed out in this question, avoiding NTP readjustments on Linux requires CLOCK_MONOTONIC_RAW. That's defined as 4 on Linux (since 2.6.28).Portably getting the correct constant #defined in a C...

View Article

Answer by Daira Emma Hopwood for Which way to go with twisted and...

At this point Nevow is definitively dead. As illustration of how dead it is, there is a bug that prevents installation of Nevow using pip, which was fixed on trunk in 2009, but it isn't in any release...

View Article


Answer by Daira Emma Hopwood for Setting windows creation date using POSIX api

The Win32 API for this isn't really all that bad, as Windows APIs go: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724933%28v=vs.85%29.aspx . The trickiest thing is to work out how many...

View Article

Answer by Daira Emma Hopwood for Makefile rule depend on directory content...

A disadvantage of having the rule depend on a directory is that any change to that directory will cause the rule to be out-of-date — including creating generated files in that directory. So unless you...

View Article

Answer by Daira Emma Hopwood for Windows cmd encoding change causes Python crash

Update: On Python 3.6 or later, printing Unicode strings to the console on Windows just works.In Python 3.8 or later the underlying bug described in this question has been fixed by making cp65001 an...

View Article

Comment by Daira-Emma Hopwood on iOS 9 app lunch URL for 'Storage and iCloud...

Both of those threads are about prefs:, not App-prefs:. They are not relevant here. App-prefs: was added precisely because apps were using prefs: in ways that were not intended to be supported.

View Article

Browsing latest articles
Browse All 22 View Live




Latest Images