On Saturday, 26 September 2020 at 03:08:56 UTC, Marcone wrote:
#include
import core.sys.windows.windows
WINAPI
extern(Windows)
int main(int argc, char *argv[]) {
int main(string[] args)
CreateThread(NULL, 0, threadFunc, NULL, 0, NULL);
CreateThread(null, 0, , null, 0, null);
This is C++ code:
#include
WINAPI DWORD threadFunc(LPVOID x) {
while (true) {
try {
throw 1;
} catch (...) {
}
}
return 0;
}
int main(int argc, char *argv[]) {
CreateThread(NULL, 0, threadFunc, NULL, 0, NULL);
CreateThread(NULL, 0, threadFunc, NULL, 0, NULL);
On Saturday, 26 September 2020 at 01:43:00 UTC, Denis Feklushkin
wrote:
On Saturday, 26 September 2020 at 00:40:21 UTC, Marcone wrote:
On Friday, 25 September 2020 at 17:00:04 UTC, Denis Feklushkin
wrote:
On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
I need windowsx.d but for I
On Saturday, 26 September 2020 at 00:40:21 UTC, Marcone wrote:
On Friday, 25 September 2020 at 17:00:04 UTC, Denis Feklushkin
wrote:
On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
I need windowsx.d but for I don't know the reason is not in
dmd. Someone that have it can send to
On Friday, 25 September 2020 at 17:00:04 UTC, Denis Feklushkin
wrote:
On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
I need windowsx.d but for I don't know the reason is not in
dmd. Someone that have it can send to me? I don't know convert
windowsx.h to windowsx.d
Try to
On Monday, 7 July 2014 at 21:32:30 UTC, JD wrote:
I'm using a compile time regex to find some tags in an input
string. Is it possible to capture the offset of the matches in
some way? Otherwise I have to "calculate" the offsets myself by
iterating over the results of matchAll.
Thanks,
Jeroen
On Fri, Sep 25, 2020 at 05:58:08PM +, 60rntogo via Digitalmars-d-learn
wrote:
> On Friday, 25 September 2020 at 15:21:22 UTC, Steven Schveighoffer wrote:
> > If the input is not ref, you should not return by ref, because then
> > you would be returning a reference to local stack data that is
On Friday, 25 September 2020 at 15:21:22 UTC, Steven
Schveighoffer wrote:
If the input is not ref, you should not return by ref, because
then you would be returning a reference to local stack data
that is about to be destroyed.
Yes, I understand that. What I'm really after at this point is
On Friday, 25 September 2020 at 15:03:56 UTC, Marcone wrote:
I need windowsx.d but for I don't know the reason is not in
dmd. Someone that have it can send to me? I don't know convert
windowsx.h to windowsx.d
Try to convert C header into D file by dpp tool.
On 9/25/20 11:21 AM, Steven Schveighoffer wrote:
I wouldn't depend on that mechanism yes.
*yet*.
-Steve
On 9/25/20 11:13 AM, 60rntogo wrote:
On Friday, 25 September 2020 at 14:21:59 UTC, Steven Schveighoffer wrote:
in does not mean "take by reference", it means "scope const"
I'm not sure that I really understand scope, but I read
https://dlang.org/spec/function.html#param-storage as saying "in
On Friday, 25 September 2020 at 14:21:59 UTC, Steven
Schveighoffer wrote:
in does not mean "take by reference", it means "scope const"
I'm not sure that I really understand scope, but I read
https://dlang.org/spec/function.html#param-storage as saying "in
means take by value or reference
On Friday, 25 September 2020 at 13:38:56 UTC, Paul wrote:
Hi Community,
I'm Win10: I have VSCode installed. I have DMD installed and
can compile examples from a Win CMD console.
1) How do I compile and run from within VSCode?
2) VSCode Extensions:
Do I need them?
One kept
I need windowsx.d but for I don't know the reason is not in dmd.
Someone that have it can send to me? I don't know convert
windowsx.h to windowsx.d
On 9/25/20 10:12 AM, 60rntogo wrote:
On Friday, 25 September 2020 at 13:15:27 UTC, Steven Schveighoffer wrote:
ou can use auto ref to alleviate that:
int x()(auto ref Foo f) // needs to be a template for auto ref to work
That's a good point, thanks. Since we are on that topic, how would
On Friday, 25 September 2020 at 13:15:27 UTC, Steven
Schveighoffer wrote:
I don't know, you can search for and report it here:
https://issues.dlang.org
I find it quite hard to search for anything here, but I couldn't
find anything similar so I submitted a bug report.
You can use auto ref
On Friday, 25 September 2020 at 13:38:56 UTC, Paul wrote:
Hi Community,
I'm Win10: I have VSCode installed. I have DMD installed and
can compile examples from a Win CMD console.
1) How do I compile and run from within VSCode?
2) VSCode Extensions:
Do I need them?
One kept
Hi Community,
I'm Win10: I have VSCode installed. I have DMD installed and can
compile examples from a Win CMD console.
1) How do I compile and run from within VSCode?
2) VSCode Extensions:
Do I need them?
One kept generating errors and a note said it was not under
active
On 9/25/20 9:16 AM, Ferhat Kurtulmuş wrote:
On Friday, 25 September 2020 at 13:08:16 UTC, Sebastiaan Koppe wrote:
On Friday, 25 September 2020 at 11:58:53 UTC, Ferhat Kurtulmuş wrote:
[...]
No need for fibers per se.
You can run 2 threads. One that produces {time: now + 1500.msecs,
value:
On Friday, 25 September 2020 at 13:13:50 UTC, Sebastiaan Koppe
wrote:
On Friday, 25 September 2020 at 13:08:16 UTC, Sebastiaan Koppe
wrote:
On Friday, 25 September 2020 at 11:58:53 UTC, Ferhat Kurtulmuş
How can I implement schedulePWMSignalToValve(pwmval,
afterNmilliseconds ) using fibers?
On Friday, 25 September 2020 at 13:08:16 UTC, Sebastiaan Koppe
wrote:
On Friday, 25 September 2020 at 11:58:53 UTC, Ferhat Kurtulmuş
wrote:
[...]
No need for fibers per se.
You can run 2 threads. One that produces {time: now +
1500.msecs, value: getFlameIntensityViaImageProcessing} objects
On Friday, 25 September 2020 at 13:08:16 UTC, Sebastiaan Koppe
wrote:
On Friday, 25 September 2020 at 11:58:53 UTC, Ferhat Kurtulmuş
How can I implement schedulePWMSignalToValve(pwmval,
afterNmilliseconds ) using fibers?
No need for fibers per se.
Can also use
On 9/25/20 3:43 AM, 60rntogo wrote:
On Wednesday, 23 September 2020 at 19:27:13 UTC, Steven Schveighoffer
wrote:
This is a bug in the language.
Is this a known bug? If not, it should be reported.
I don't know, you can search for and report it here:
https://issues.dlang.org
I came up
On Friday, 25 September 2020 at 11:58:53 UTC, Ferhat Kurtulmuş
wrote:
int main(){
...
while(true){
int pwmval = getFlameIntensityViaImageProcessing();
sendPWMSignalToValfe(pwmval); // I need this streamed
ctrl signal to the valfe with a delayed time shift
//
On Friday, 25 September 2020 at 12:43:41 UTC, Imperatorn wrote:
On Friday, 25 September 2020 at 11:58:53 UTC, Ferhat Kurtulmuş
wrote:
[...]
A naive implementation would be to store 1500 ms worth of data
with the pwm values, like a buffer. I guess memory is not a
problem if you're using a
On Friday, 25 September 2020 at 11:58:53 UTC, Ferhat Kurtulmuş
wrote:
Hi,
I have a problem to solve that may be solved using fibers. I
have no previous experience with fibers. We are working on a
variable-rate weeder. A camera is installed in front of a
tractor. A flame weeder is connected
On Thursday, 24 September 2020 at 22:22:13 UTC, mw wrote:
Hi,
I'm just wondering what's the best way to convert sysTime to
local machine's time (zone)?
Is there any library function does this already?
https://dlang.org/phobos/std_datetime_systime.html#SysTime
(The time in SysTime is kept
Hi,
I have a problem to solve that may be solved using fibers. I have
no previous experience with fibers. We are working on a
variable-rate weeder. A camera is installed in front of a
tractor. A flame weeder is connected to the behind of a tractor.
Doing image processing (on RP3), we
On Wednesday, 23 September 2020 at 19:27:13 UTC, Steven
Schveighoffer wrote:
This is a bug in the language.
Is this a known bug? If not, it should be reported.
I came up with an answer to my original question that sort of
works:
---
module foo;
struct Foo
{
private int x;
}
int x(Foo
29 matches
Mail list logo