Hello! I'm trying to do some strange thing: compile some
Statement (do semantic3 phase) in the scope of other function.
Other function is for example:
auto megafunction()
{
B b;
uint a = 25;
return b;
}
AST of this code looks like:
FuncDeclaration
{
fbody = CompoundStatement
On Tuesday, July 25, 2017 09:31:28 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> The unfortunate thing is that if you want to have non-templated unit
> tests, you have to put them outside the struct itself. This sucks for
> documented unit tests, and for tests being close to the thing bein
On Wednesday, July 26, 2017 22:29:00 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 07/26/2017 09:20 PM, FoxyBrown wrote:
> >> Somebody else had the same problem which they solved by removing
> >>
> >> "entire dmd":
> >> http://forum.dlang.org/thread/ejybuwermnentslcy...@forum.dlang.org
>
I have a multi-threaded application, whose threads normally run
forever. But I need to profile this program, so I compile the
code with -profile, send a SIGTERM and call exit(0) from my
signal handler to exit the program. The problem is that I get the
profiling information only from the main th
Exit is not "normal exit" for D programs so, do not use it.
Your threads should stop at some point to make able the app exit
successfully.
There's a "join" method. You can use it with your "done" variable.
Also there was an issue that profiling doesn't work with
multi-threaded apps and leads to a crash.
Don't know if it is fixed.
On Thursday, 27 July 2017 at 14:30:33 UTC, Eugene Wissner wrote:
I have a multi-threaded application, whose threads normally run
forever. But I need to profile this program, so I compile the
code with -profile, send a SIGTERM and call exit(0) from my
signal handler to exit the program. The prob
On Thursday, 27 July 2017 at 14:52:18 UTC, Stefan Koch wrote:
On Thursday, 27 July 2017 at 14:30:33 UTC, Eugene Wissner wrote:
I have a multi-threaded application, whose threads normally
run forever. But I need to profile this program, so I compile
the code with -profile, send a SIGTERM and cal
On Thursday, 27 July 2017 at 14:44:31 UTC, Temtaime wrote:
Also there was an issue that profiling doesn't work with
multi-threaded apps and leads to a crash.
Don't know if it is fixed.
Was fixed two years ago:
http://forum.dlang.org/post/mia2kf$djb$1...@digitalmars.com
On Thursday, 27 July 2017 at 11:59:51 UTC, unDEFER wrote:
So how to get scope e.g. after line "B b;"?
I have found. That in scopes was found symbols from declarations,
you must iterate by declarations (DeclarationExp) and add symbols
by sc.insert(decexp.declaration);
On Thursday, 27 July 2017 at 12:23:52 UTC, Jonathan M Davis wrote:
On Wednesday, July 26, 2017 22:29:00 Ali Çehreli via
Digitalmars-d-learn wrote:
On 07/26/2017 09:20 PM, FoxyBrown wrote:
>> Somebody else had the same problem which they solved by
removing
>>
>> "entire dmd":
>>
http://f
On 7/27/17 1:58 PM, FoxyBrown wrote:
On Thursday, 27 July 2017 at 12:23:52 UTC, Jonathan M Davis wrote:
On Wednesday, July 26, 2017 22:29:00 Ali Çehreli via
Digitalmars-d-learn wrote:
On 07/26/2017 09:20 PM, FoxyBrown wrote:
>> Somebody else had the same problem which they solved by removing
On Thursday, July 27, 2017 14:14:52 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> On 7/27/17 1:58 PM, FoxyBrown wrote:
> > I do not use the installer, I use the zip file. I assumed that
> > everything would be overwritten and any old stuff would simply go
> > unused.. but it seems it doesn
On Thursday, 27 July 2017 at 18:14:52 UTC, Steven Schveighoffer
wrote:
On 7/27/17 1:58 PM, FoxyBrown wrote:
On Thursday, 27 July 2017 at 12:23:52 UTC, Jonathan M Davis
wrote:
On Wednesday, July 26, 2017 22:29:00 Ali Çehreli via
Digitalmars-d-learn wrote:
On 07/26/2017 09:20 PM, FoxyBrown wrote
On Thursday, 27 July 2017 at 18:35:02 UTC, FoxyBrown wrote:
But the issue was about missing symbols, not anything "extra".
If datatime.d is there but nothing is using it, why should it
matter?
YOU were using it with an `import std.datetime;` line. With the
file still there, it sees it referen
On Thursday, 27 July 2017 at 18:47:57 UTC, Adam D. Ruppe wrote:
YOU were using it with an `import std.datetime;` line
Of course, it is also possible that import was through a
dependency of something you used, possibly including the standard
library.
On Thursday, July 27, 2017 18:35:02 FoxyBrown via Digitalmars-d-learn wrote:
> On Thursday, 27 July 2017 at 18:14:52 UTC, Steven Schveighoffer
>
> wrote:
> > On 7/27/17 1:58 PM, FoxyBrown wrote:
> >> On Thursday, 27 July 2017 at 12:23:52 UTC, Jonathan M Davis
> >>
> >> wrote:
> >>> On Wednesday, Ju
On 7/27/17 2:35 PM, FoxyBrown wrote:
On Thursday, 27 July 2017 at 18:14:52 UTC, Steven Schveighoffer wrote:
On 7/27/17 1:58 PM, FoxyBrown wrote:
On Thursday, 27 July 2017 at 12:23:52 UTC, Jonathan M Davis wrote:
On Wednesday, July 26, 2017 22:29:00 Ali Çehreli via
Digitalmars-d-learn wrote:
O
On 07/27/2017 11:47 AM, Adam D. Ruppe wrote:
On Thursday, 27 July 2017 at 18:35:02 UTC, FoxyBrown wrote:
But the issue was about missing symbols, not anything "extra". If
datatime.d is there but nothing is using it, why should it matter?
YOU were using it with an `import std.datetime;` line. W
On 07/27/2017 11:54 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> You ended up with two versions of std.datetime. One was the module,
and the
> other was the package.
I don't know how many people install from the zip file but I think the
zip file should include a datetime.d file with
On 7/27/17 2:54 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
You ended up with two versions of std.datetime. One was the module, and the
other was the package. importing std.datetime could have imported either of
them. dmd _should_ generate an error in that case, but I don't know if it
do
//D-CODE
struct MyStruct{
int id;
this(int id){
writeln("ctor");
}
~this(){
writeln("dtor");
}
}
MyStruct* obj;
void push(T)(auto ref T value){
obj[0] = value;
}
void main()
{
obj = cast(MyStruct*)malloc( MyStruct.sizeof );
push(MyStruct(1));
}
OU
On 7/27/17 3:00 PM, Ali Çehreli wrote:
On 07/27/2017 11:54 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> You ended up with two versions of std.datetime. One was the module,
and the
> other was the package.
I don't know how many people install from the zip file but I think the
zip f
On 07/27/2017 12:24 PM, Steven Schveighoffer wrote:
On 7/27/17 3:00 PM, Ali Çehreli wrote:
On 07/27/2017 11:54 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> You ended up with two versions of std.datetime. One was the module,
and the
> other was the package.
I don't know how many peop
On Thursday, 27 July 2017 at 03:34:19 UTC, FoxyBrown wrote:
Knowing that every time I upgrade to the latest "official" D
compiler I run in to trouble:
I recompiled gtkD with the new compiler, same result. My code
was working before the upgrade just fine and I did not change
anything.
I've
I would like to encode code in such a way that each compilation
produces "random" code as compared to what the previous
compilation produced, but ultimately the same code is ran each
time(same effect).
Basically we can code a function that does a job X in many
different ways. Each way looks d
On Thursday, 27 July 2017 at 19:19:27 UTC, SrMordred wrote:
//D-CODE
struct MyStruct{
int id;
this(int id){
writeln("ctor");
}
~this(){
writeln("dtor");
}
}
MyStruct* obj;
void push(T)(auto ref T value){
obj[0] = value;
}
void main()
{
obj = cast(MySt
I'm using regex `matchAll`, and mapping it to get a sequence of
strings. I then want to pass that sequence to a function. What is
the general "sequence of strings" type declaration I'd need to
use?
In C#, it'd be `IEnumerable`. I'd rather not do a
to-array on the sequence, if possible. (e.g.
I'm interested in trying it out, says it's just for ldc. Can we
simply compile it using ldc then import it and use dmd, ldc, or
gdc afterwards?
---
a SPIRV capable LLVM (available here to build ldc to to support
SPIRV (required for OpenCL)).
or LDC built with any LLVM 3.9.1 or greater that has
On 07/27/2017 02:16 PM, Chris wrote:
> What is the value of `???` in the following program:
> void categorize(??? toks) {
> foreach (t; toks) {
> writeln(t);
> }
> }
The easiest solution is to make it a template (R is a suitable template
variable name for a range type):
void categori
On Thursday, July 27, 2017 11:55:21 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 07/27/2017 11:47 AM, Adam D. Ruppe wrote:
> > On Thursday, 27 July 2017 at 18:35:02 UTC, FoxyBrown wrote:
> >> But the issue was about missing symbols, not anything "extra". If
> >> datatime.d is there but nothing
On Thursday, 27 July 2017 at 21:33:29 UTC, James Dean wrote:
I'm interested in trying it out, says it's just for ldc. Can we
simply compile it using ldc then import it and use dmd, ldc, or
gdc afterwards?
The ability to write kernels is limited to LDC, though there is
no practical reason that
On Thursday, 27 July 2017 at 23:37:41 UTC, Jonathan M Davis wrote:
On Thursday, July 27, 2017 11:55:21 Ali Çehreli via
Digitalmars-d-learn wrote:
On 07/27/2017 11:47 AM, Adam D. Ruppe wrote:
> On Thursday, 27 July 2017 at 18:35:02 UTC, FoxyBrown wrote:
>> But the issue was about missing symbols,
On Friday, 28 July 2017 at 00:23:35 UTC, Nicholas Wilson wrote:
On Thursday, 27 July 2017 at 21:33:29 UTC, James Dean wrote:
I'm interested in trying it out, says it's just for ldc. Can
we simply compile it using ldc then import it and use dmd,
ldc, or gdc afterwards?
The ability to write ker
On Friday, 28 July 2017 at 00:28:52 UTC, FoxyBrown wrote:
You are not being very logical.
The zip file as N files in it. No matter what those files are,
it should be a closed system. That is, if I insert or add(not
replace) M file to the directory structure it should not break
D, period!
T
On Friday, 28 July 2017 at 00:39:43 UTC, James Dean wrote:
On Friday, 28 July 2017 at 00:23:35 UTC, Nicholas Wilson wrote:
On Thursday, 27 July 2017 at 21:33:29 UTC, James Dean wrote:
I'm interested in trying it out, says it's just for ldc. Can
we simply compile it using ldc then import it and
On Friday, 28 July 2017 at 01:30:58 UTC, Nicholas Wilson wrote:
Yes, although I'll have to add an attribute shim layer for the
dcompute druntime symbols to be accessible for DMD. When you
compile LDC will produce .ptx and .spv files in the object file
directory which will be able to be used i
On Thursday, 27 July 2017 at 03:01:50 UTC, Danni Coy wrote:
I am trying to build my projects documentation via the ddox
system via dub. It seems that my modules are being documented
and then filtered out.
Ironically for a documentation system there isn't a lot of
documentation.
What is the mi
yup figured it out -
module documentation needs to go *above*
the module declaration or you get nothing.
On Fri, Jul 28, 2017 at 11:53 AM, Soulsbane via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> On Thursday, 27 July 2017 at 03:01:50 UTC, Danni Coy wrote:
>
>> I am trying t
On Friday, 28 July 2017 at 01:10:03 UTC, Mike Parker wrote:
On Friday, 28 July 2017 at 00:28:52 UTC, FoxyBrown wrote:
You are not being very logical.
The zip file as N files in it. No matter what those files are,
it should be a closed system. That is, if I insert or add(not
replace) M file t
On 2017-07-27 16:30, Eugene Wissner wrote:
I have a multi-threaded application, whose threads normally run forever.
But I need to profile this program, so I compile the code with -profile,
send a SIGTERM and call exit(0) from my signal handler to exit the
program. The problem is that I get the
41 matches
Mail list logo