On 24/07/2016 2:28 PM, Rufus Smith wrote:
NM, ignore. Seems it was something else going on. Although, if you know
how how dmd resolves this stuff exactly, it would be nice to know. Does
it just use the module names regardless of path or does the path where
the module is located have any
NM, ignore. Seems it was something else going on. Although, if
you know how how dmd resolves this stuff exactly, it would be
nice to know. Does it just use the module names regardless of
path or does the path where the module is located have any
play(assuming they are properly passed to the
How do module names and actual folder paths relate?
For my own libraries, I use the file path as module name, more or
less.
e.g.,
module foo.bar.x;
is in folder foo\bar.
I imported some external lib that has it's own layout, but I
wanted to incorporate it in to my lib, so I stuck it in a
On Saturday, 23 July 2016 at 22:48:07 UTC, Lodovico Giaretta
wrote:
On Saturday, 23 July 2016 at 21:44:05 UTC, Rufus Smith wrote:
On Saturday, 23 July 2016 at 17:27:24 UTC, Lodovico Giaretta
wrote:
- we trust what we are doing: e.g. we cannot mark a thing
@nogc, but we know it is and the
On Saturday, 23 July 2016 at 19:08:00 UTC, WhatMeWorry wrote:
What I thought would be trivial is becoming a nightmare. Can
anybody set me straight. Thanks in advance.
[...]
Use the getchar() function.
void pause(const string msg = "Press enter/return to continue...")
{
write(msg);
On Saturday, 23 July 2016 at 23:36:40 UTC, Etranger wrote:
is there any good benchmarking lib like the #[bench] in rust
that I can use ?)
dunno, i'm usually just using std.datetime.benchmark.
On 07/23/2016 01:05 PM, Etranger wrote:
1- Is there a cleaner way to do it ? I had to use struct because I want
every thing to happen at compile time and on the stack (without gc). And
I had to use string mixins because template mixin does not work the way
I tried to use it ( see the error last
On Saturday, 23 July 2016 at 19:08:45 UTC, ketmar wrote:
2OP: sorry, i can barely read that code. this has nothing to do
with your skills, it is the topic -- i've never seen clean lazy
evaluation code. after all, this is a hack.
still, i think that such a library worth at least some work.
as
On Saturday, 23 July 2016 at 21:44:05 UTC, Rufus Smith wrote:
On Saturday, 23 July 2016 at 17:27:24 UTC, Lodovico Giaretta
wrote:
- we trust what we are doing: e.g. we cannot mark a thing
@nogc, but we know it is and the profiler confirms that no
allocation happens, so we are happy; our
On Saturday, 23 July 2016 at 21:44:05 UTC, Rufus Smith wrote:
Templates are not the end all be all. They don't allow for
run-time polymorphism, which is an important aspect of software.
Ok, so you need runtime polymorphism. And you want it in @nogc
code. That's not difficult. Just have the
On Saturday, July 23, 2016 21:33:29 Rufus Smith via Digitalmars-d-learn wrote:
> I am trying to write some general code that works on arbitrary
> types. I need to compare, obviously, as that is relatively basic
> thing on objects.
That's part of of why attribute inferrence works on templates.
On Saturday, 23 July 2016 at 17:27:24 UTC, Lodovico Giaretta
wrote:
On Saturday, 23 July 2016 at 17:04:42 UTC, Jonathan Marler
wrote:
On Saturday, 23 July 2016 at 16:46:20 UTC, Jonathan Marler
wrote:
[...]
Actually Im going to disagree with myself. This technique
actually wouldn't work with
On Saturday, July 23, 2016 11:25:02 Steven Schveighoffer via Digitalmars-d-
learn wrote:
> The real problem here is that there is a base method at all. We have
> been striving to remove it at some point, but it is very difficult due
> to all the legacy code which is written.
>
> Almost all the
On Saturday, 23 July 2016 at 17:23:37 UTC, Marco Leise wrote:
Am Sat, 23 Jul 2016 13:18:03 +
schrieb Rufus Smith :
Trying to compare a *ptr value with a value in nogc code
results in the error:
Error: @nogc function '...' cannot call non-@nogc function
On Friday, 22 July 2016 at 12:36:31 UTC, Alexander Milushev wrote:
I there any json serialization library which allow to make
decision about ignoring fields in runtime? I trying to write
rest client but server accept either 'cmd' or 'args' field for
example and I need to find solution.
can
On 2016-07-23 14:27, ParticlePeter wrote:
Is there any kind of project or workflow that converts D (subset) to
C/CPP ?
No idea about the status but:
https://github.com/adamdruppe/tools/blob/dtoh/dtoh.d
--
/Jacob Carlborg
2OP: sorry, i can barely read that code. this has nothing to do
with your skills, it is the topic -- i've never seen clean lazy
evaluation code. after all, this is a hack.
still, i think that such a library worth at least some work.
as for "is my code/approach is good enough", i know only two
What I thought would be trivial is becoming a nightmare. Can
anybody set me straight. Thanks in advance.
void writeAndPause(string s)
{
writeln(s);
// writeln("Press any key to continue..."); // works fine on
Windows
// executeShell("pause");// works fine on
On Saturday, 23 July 2016 at 12:27:39 UTC, rikki cattermole wrote:
Either way I recommend you not worry about it. Compilers can be
smart and dmd is mostly good enough in this department.
he has something to worry about. remember, this is scientific
department, where ours 4x4 matrices are
On Saturday, 23 July 2016 at 17:04:42 UTC, Jonathan Marler wrote:
On Saturday, 23 July 2016 at 16:46:20 UTC, Jonathan Marler
wrote:
[...]
Actually Im going to disagree with myself. This technique
actually wouldn't work with virtual methods:)
I don't think we have the big problems with
Am Sat, 23 Jul 2016 13:18:03 +
schrieb Rufus Smith :
> Trying to compare a *ptr value with a value in nogc code results
> in the error:
>
> Error: @nogc function '...' cannot call non-@nogc function
> 'object.opEquals'
>
> Shouldn't object opEquals be
On Saturday, 23 July 2016 at 16:46:20 UTC, Jonathan Marler wrote:
[...]
Actually Im going to disagree with myself. This technique
actually wouldn't work with virtual methods:)
On Saturday, 23 July 2016 at 15:25:02 UTC, Steven Schveighoffer
wrote:
On 7/23/16 10:53 AM, Rufus Smith wrote:
On Saturday, 23 July 2016 at 14:15:03 UTC, Lodovico Giaretta
wrote:
On Saturday, 23 July 2016 at 13:18:03 UTC, Rufus Smith wrote:
Trying to compare a *ptr value with a value in nogc
On 7/23/16 10:53 AM, Rufus Smith wrote:
On Saturday, 23 July 2016 at 14:15:03 UTC, Lodovico Giaretta wrote:
On Saturday, 23 July 2016 at 13:18:03 UTC, Rufus Smith wrote:
Trying to compare a *ptr value with a value in nogc code results in
the error:
Error: @nogc function '...' cannot call
On Saturday, 23 July 2016 at 14:53:49 UTC, Rufus Smith wrote:
Um, this isn't right. GC code can always call non-gc code.
If you mark opEquals nogc, it breaks nothing except
implementations of opEquals that use the GC. GC code can still
call it nogc opequals, it only enforces opEquals code to
On Saturday, 23 July 2016 at 14:15:03 UTC, Lodovico Giaretta
wrote:
On Saturday, 23 July 2016 at 13:18:03 UTC, Rufus Smith wrote:
Trying to compare a *ptr value with a value in nogc code
results in the error:
Error: @nogc function '...' cannot call non-@nogc function
'object.opEquals'
On Saturday, 23 July 2016 at 13:18:03 UTC, Rufus Smith wrote:
Trying to compare a *ptr value with a value in nogc code
results in the error:
Error: @nogc function '...' cannot call non-@nogc function
'object.opEquals'
Shouldn't object opEquals be marked?
If object.opEquals is marked
Trying to compare a *ptr value with a value in nogc code results
in the error:
Error: @nogc function '...' cannot call non-@nogc function
'object.opEquals'
Shouldn't object opEquals be marked?
On Saturday, 23 July 2016 at 12:27:39 UTC, rikki cattermole wrote:
If you evaluate it as v = a + b + c instead of v = a + (b + c)
you will still have a temporary value. Remember structs are
just the values they carry and are basically optimized out.
Either way I recommend you not worry about
On Saturday, 23 July 2016 at 12:29:45 UTC, rikki cattermole wrote:
On 24/07/2016 12:27 AM, ParticlePeter wrote:
Is there any kind of project or workflow that converts D
(subset) to
C/CPP ?
This probably will interest you for ldc:
On 24/07/2016 12:27 AM, ParticlePeter wrote:
Is there any kind of project or workflow that converts D (subset) to
C/CPP ?
This probably will interest you for ldc:
http://stackoverflow.com/questions/5180914/llvm-ir-back-to-human-readable-source-language
On 24/07/2016 12:09 AM, Etranger wrote:
On Saturday, 23 July 2016 at 11:19:34 UTC, rikki cattermole wrote:
On 23/07/2016 11:05 PM, Etranger wrote:
[snip]
* start of code **
import std.stdio;
import std.traits;
import std.conv;
struct VecExpression(alias
Is there any kind of project or workflow that converts D (subset)
to C/CPP ?
On Saturday, 23 July 2016 at 11:19:34 UTC, rikki cattermole wrote:
On 23/07/2016 11:05 PM, Etranger wrote:
[snip]
* start of code **
import std.stdio;
import std.traits;
import std.conv;
struct VecExpression(alias mixins) {
mixin (mixins);
On 23/07/2016 11:05 PM, Etranger wrote:
[snip]
* start of code **
import std.stdio;
import std.traits;
import std.conv;
struct VecExpression(alias mixins) {
mixin (mixins);
VecSum!(typeof(this), VecExpression!(RHS)) opBinary(string op, alias
RHS)(ref
Hello all,
I will greatly appreciate if you could help me with my first step
in the D land.
*YOU CAN SKIP DIRECTLY TO THE QUESTION BELLOW*:
Please allow me to introduce myself and give you my feelings
about the D language then I'll ask my question. I'm a
mathematician that works mainly on
On Thursday, 21 July 2016 at 19:54:34 UTC, Jonathan Marler wrote:
Is there a way to get the full path of the current source file?
Something like:
__FILE_FULL_PATH__
I'm asking because I'm rewriting a batch script in D, meant to
be ran with rdmd. However, the script needs to know it's own
37 matches
Mail list logo