Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ryanprichard
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
ryanprichard
10y ago
To do that, you have to attach the conhost.exe process to its own console with AttachConsole, right? I tried that and also noticed the deadlock. An out-of-context handler avoids the deadlock, but then it's not synchronized. The other
2.
▲
by
ryanprichard
10y ago
Yeah, I considered that route, but I was concerned that it'd be unreliable -- maybe with other programs doing clever tricks with import/export tables, or maybe with antivirus. I can't think of a specific reason it wouldn
3.
▲
by
ryanprichard
10y ago
Yes, it's a tiny program that (1) detaches the console, (2) attaches a new console, (3) closes all screen buffer handles, then (4) creates a new screen buffer. The fourth step caused a BSOD on Vista and Server 2008. AFAIK, they were
4.
▲
by
ryanprichard
10y ago
Regarding a public API, this GitHub comment suggests that people at Microsoft are working on it.[1] Of course, Microsoft can't commit to anything. As the winpty maintainer, I hope some kind of public API emerges to reduce my maintena
5.
▲
by
ryanprichard
10y ago
FWIW, the tis-interpreter doesn't flag that code (aside from the missing semicolon). I think you're right, though, that it has UB.
6.
▲
by
ryanprichard
11y ago
If you haven't seen it, I'd also recommend looking at the excel1040[1] spreadsheet. It's been developed for about 20 years by a single author, AFAICT. It has numerous forms, schedules, and worksheets, and it makes aggressiv
7.
▲
by
ryanprichard
11y ago
I tried it on this bit of code, but it didn't detect a type mismatch. Is it supposed to? def foo(n: int): pass def bar(): foo("123") It does detect this mismatch: def foo(n: int): pass foo(
8.
▲
by
ryanprichard
11y ago
_Generic might not work so well to handle int vs double vs pointer-to-T. Apparently, even unselected associations must type-check. e.g.: Here's a simple implementation: enum AnyKind { AnyInt, AnyDouble, AnyStr }; struct Any
9.
▲
by
ryanprichard
11y ago
Compound literals were never formally added to C++. Still, that hasn't stopped various front-ends (including GCC and Clang) from adding them to their C++ dialects. My code compiles with Clang, but not GCC. GCC complains that it'
10.
▲
by
ryanprichard
11y ago
My impression is that it's impossible in MSVC's C dialect today. (Obviously there's std::min in C++.) AFAICT, it could be done using _Generic and inline functions, if/when MSVC adds _Generic. I'd expect to see _Ge
11.
▲
by
ryanprichard
11y ago
The example does not actually use compound literals. (i.e. _arg's initializer would work in C89.) It does use two other C99 features, though -- variadic macros and a for-loop-scoped variable declaration. The biggest compatibility is
12.
▲
by
ryanprichard
11y ago
Someone just sent a patch this morning upgrading it to Clang 3.7, which is available in the Ubuntu 15.10 repository, but not earlier. There are also official x64 llvm.org binaries for 14.04 that work. I don't actually use the program
13.
▲
by
ryanprichard
11y ago
SourceWeb needs a list of C++ invocations (compile_commands.json), but it ignores compiler errors, so I'm not sure how precise the invocations need to be. If all the C++ source files in a directory were naively listed, the index might
14.
▲
Documentation of Win32 handles (consoles, {Get,Set}StdHandle, inheritance)
(github.com)
2 points
by
ryanprichard
11y ago
|
0 comments
15.
▲
by
ryanprichard
11y ago
Will this OpenSSH server be able to run interactive console programs (like cmd.exe or python.exe), or will it be limited to (say) PowerShell? Windows doesn't have a good API for hosting a console--it's not like Unix, where a pty h
16.
▲
by
ryanprichard
12y ago
At least there seems to be a supported method for updating the 14.04 kernel: https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes#LTS_Hardware... Apparently, Ubuntu 14.04.2 installs a 3.16 kernel by default, and previous 14