Re: Error 42 When Trying to Interop with a C# Libary

2016-11-05 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 5 November 2016 at 22:06:21 UTC, Sarcross wrote: LINK : fatal error LNK1104: cannot open file '+C:\Users\antzy_000\Documents\Programming\D\Resume-Parser\src\Parser2.lib' --- errorlevel 1104 dmd failed with exit code 1104. "lflags" :

Re: Bug after update to 2.072?

2016-11-05 Thread Vladimir Panteleev via Digitalmars-d-learn
On Sunday, 6 November 2016 at 01:11:34 UTC, Alex wrote: dub dustmite ../dm2 --program-status=11 Try --program-status=139 (139 is 128 + 11)

Re: Bug after update to 2.072?

2016-11-05 Thread Alex via Digitalmars-d-learn
On Saturday, 5 November 2016 at 22:38:31 UTC, cym13 wrote: Could you use DustMite to generate a minimal code sample showing the bug? https://github.com/CyberShadow/DustMite tried dub dustmite ../dm which reduced my code to an empty main... :) and tried dub dustmite ../dm2

Re: Combining "chunkBy" and "until" algorithms

2016-11-05 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-11-05 14:57, Timon Gehr wrote: "chunkBy" a predicate that checks whether a line is standard. Use 'zip' to focus two adjacent chunks at the same time. Use 'filter' to only consider adjacent chunks where the first chunk consists of standard lines. Then extract the last line of the first

Re: Bug after update to 2.072?

2016-11-05 Thread cym13 via Digitalmars-d-learn
On Saturday, 5 November 2016 at 21:45:46 UTC, Alex wrote: Hi everybody, something strange is going on: trying compiling and running my code after an update to 2.072, I get a not very instructive segmentation fault (code -11). [...] Could you use DustMite to generate a minimal code sample

Re: Error 42 When Trying to Interop with a C# Libary

2016-11-05 Thread Sarcross via Digitalmars-d-learn
On Saturday, 5 November 2016 at 20:45:55 UTC, John C wrote: On Saturday, 5 November 2016 at 16:13:18 UTC, Sarcross wrote: If you're wondering, I did use the COFF2OMF tool on the library I got from the C# code, which is why in WordFileParser.d you'll see "pragma(lib, "Parser2")". I have never

Bug after update to 2.072?

2016-11-05 Thread Alex via Digitalmars-d-learn
Hi everybody, something strange is going on: trying compiling and running my code after an update to 2.072, I get a not very instructive segmentation fault (code -11). Setted up a debugger in Visual Studio Code, I managed to find out the last accessible code point before the error. And this

Re: Error 42 When Trying to Interop with a C# Libary

2016-11-05 Thread John C via Digitalmars-d-learn
On Saturday, 5 November 2016 at 21:02:14 UTC, Adam D. Ruppe wrote: coff2omf works with .obj files Well, that's not what the docs say! http://www.digitalmars.com/ctg/coff2omf.html "The input files can be either object files (.obj) or library files (.lib)" Apparently you have to convert

Re: Error 42 When Trying to Interop with a C# Libary

2016-11-05 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 5 November 2016 at 20:45:55 UTC, John C wrote: I have never had success trying to link with a lib file converted by COFF2OMF. coff2omf works with .obj files coffimplib works on .lib files

Re: Error 42 When Trying to Interop with a C# Libary

2016-11-05 Thread John C via Digitalmars-d-learn
On Saturday, 5 November 2016 at 16:13:18 UTC, Sarcross wrote: If you're wondering, I did use the COFF2OMF tool on the library I got from the C# code, which is why in WordFileParser.d you'll see "pragma(lib, "Parser2")". I have never had success trying to link with a lib file converted by

Re: Map type to class instance at compile-time

2016-11-05 Thread pontius via Digitalmars-d-learn
On Thursday, 27 October 2016 at 19:16:03 UTC, Ali Çehreli wrote: The problem is with that line. In the previous design, ManagerRegistrationFor would generate a manage() template instance for T and mix it in to the scope. As a result manage(t) would be bound to it the correct template instance.

Re: check instance of nested variadic template

2016-11-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 5 November 2016 at 13:43:34 UTC, Lodovico Giaretta wrote: On Saturday, 5 November 2016 at 13:34:51 UTC, Gianni Pisetta wrote: When i have time i will test it with ldc and see if the result is the same, then it will probably be a front-end bug and i will report it as an issue. I

Error 42 When Trying to Interop with a C# Libary

2016-11-05 Thread Sarcross via Digitalmars-d-learn
I do apologize if this has been covered before, but I haven't come across anyone with this particular issue. I'm using D for a class project in which we're making a rudimentary resume parser. We're using C# to handle pulling plaintext from .docx files and using D for the rest. The plan was

Re: check instance of nested variadic template

2016-11-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 5 November 2016 at 14:37:53 UTC, Basile B. wrote: On Saturday, 5 November 2016 at 13:34:51 UTC, Gianni Pisetta wrote: [...] Indeed, I've been fighting against that since a few minutes. We cant select the Base of an eponymous template. template isEponymousTemplate(T) {

Re: check instance of nested variadic template

2016-11-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 5 November 2016 at 13:34:51 UTC, Gianni Pisetta wrote: When i have time i will test it with ldc and see if the result is the same, then it will probably be a front-end bug and i will report it as an issue. Indeed, I've been fighting against that since a few minutes. We cant

Re: Combining "chunkBy" and "until" algorithms

2016-11-05 Thread Timon Gehr via Digitalmars-d-learn
On 04.11.2016 09:04, Jacob Carlborg wrote: I have a file with a bunch of lines I want to process. I want to process these lines line by line. Most of these lines have the same pattern. Some of the lines have a different pattern. I want to bundle those lines, which have a non-standard pattern,

Re: check instance of nested variadic template

2016-11-05 Thread Lodovico Giaretta via Digitalmars-d-learn
On Saturday, 5 November 2016 at 13:34:51 UTC, Gianni Pisetta wrote: When i have time i will test it with ldc and see if the result is the same, then it will probably be a front-end bug and i will report it as an issue. I think it has already been reported.

Re: check instance of nested variadic template

2016-11-05 Thread Gianni Pisetta via Digitalmars-d-learn
When i have time i will test it with ldc and see if the result is the same, then it will probably be a front-end bug and i will report it as an issue.

Re: check instance of nested variadic template

2016-11-05 Thread Gianni Pisetta via Digitalmars-d-learn
On Friday, 4 November 2016 at 17:37:10 UTC, Basile B. wrote: Hello, I'm not sure that's exactly what you want but check this: template A(As...) { template B(Bs...) { } } alias BI = A!(1,2).B!(3,4,5); import std.traits; template NestedTemplateArgsOf(alias

Re: Combining "chunkBy" and "until" algorithms

2016-11-05 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-11-04 16:23, Edwin van Leeuwen wrote: Could you filter [1] for the non standard pattern? Filter is lazy, so will only start looking for the next when the current one has been "handled". Hmm, no I don't think so. Do you have an example of how this would work? -- /Jacob Carlborg

Re: check instance of nested variadic template

2016-11-05 Thread Basile B. via Digitalmars-d-learn
On Friday, 4 November 2016 at 17:37:10 UTC, Basile B. wrote: On Friday, 4 November 2016 at 15:50:36 UTC, Gianni Pisetta wrote: Hi all, I am having issues finding a solution for this, i want to check if an alias is an istance of a variadic template nested in another variadic template. [...]

Re: system's "kill " signal

2016-11-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 5 November 2016 at 06:17:51 UTC, Basile B. wrote: On Saturday, 5 November 2016 at 02:24:00 UTC, Konstantin Kutsevalov wrote: Hi, is there a way to catch system signal of "kill" command or "shutdown"? During the Run-time: You can register a signal callback,

Re: system's "kill " signal

2016-11-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 5 November 2016 at 02:24:00 UTC, Konstantin Kutsevalov wrote: Hi, is there a way to catch system signal of "kill" command or "shutdown"? During the Run-time: You can register a signal callback, like in this sample (hit CTRL+C once running in a terminal):