On Sunday, 30 September 2018 at 11:11:09 UTC, Nicholas Wilson
wrote:
On Sunday, 30 September 2018 at 09:30:38 UTC, Vijay Nayar wrote:
Is there a way to either have a constant reference to a class
that can be set to a new value, or is there a way to convert
the class variable to a class pointer?
On Tuesday, 2 October 2018 at 18:27:04 UTC, Aurélien Plazzotta
wrote:
Thank you both for all the links! I guess DiamondMVC is very
powerful but I would rather avoid using such heavy artillery.
I'm expecting the learning curve to be very long.
I currently use two libraries I wrote to keep thing
According to https://dlang.org/articles/ctarguments.html compile time
sequences "...allow a programmer to operate on types, symbols and values..."
Phobos has `isType`/`isTypeTuple` traits, also `isExpressions` where
expression may contain both values and symbols, but has no traits like
`isSymbol
On 01/10/2018 15:51, Steven Schveighoffer wrote:
On 10/1/18 3:21 AM, Rainer Schuetze wrote:
A profiler reveals that most of the time is spent in "sweeping" the
memory, i.e. looking for allocations no longer referenced. The
existing implementation checks every page which causes a linear growt
I was looking over some Rust examples, and found something
interesting:
https://github.com/serde-rs/serde
let deserialized: Point =
serde_json::from_str(&serialized).unwrap();
from_str is defined as:
pub fn from_str<'a, T>(s: &'a str) -> Result
From what I understand, the function infers t
On Wednesday, 3 October 2018 at 09:37:29 UTC, JN wrote:
int i = returnDefault!int(); obviously works, but the point is
I would like to skip the explicit type.
See:
https://forum.dlang.org/post/ufhibwmouxpivjylq...@forum.dlang.org
On Wednesday, 3 October 2018 at 10:01:02 UTC, Andrea Fontana
wrote:
On Wednesday, 3 October 2018 at 09:37:29 UTC, JN wrote:
int i = returnDefault!int(); obviously works, but the point is
I would like to skip the explicit type.
See:
https://forum.dlang.org/post/ufhibwmouxpivjylq...@forum.dlang
I've got this simple task but I'm trying to perfect it as best I
can to learn something in the process.
I have Linux terminal ASCII codes for coloring terminal output.
string red(string) { /* ... */ }
"Hello world".red => "\033[31mHello World\033[0m"
which translates to "[red]Hello World[rese
On Wednesday, 3 October 2018 at 11:01:53 UTC, Chris Katko wrote:
I've got this simple task but I'm trying to perfect it as best
I can to learn something in the process.
I have Linux terminal ASCII codes for coloring terminal output.
string red(string) { /* ... */ }
"Hello world".red => "\033[
On Wednesday, 3 October 2018 at 07:57:07 UTC, drug wrote:
According to https://dlang.org/articles/ctarguments.html
compile time sequences "...allow a programmer to operate on
types, symbols and values..."
Phobos has `isType`/`isTypeTuple` traits, also `isExpressions`
where expression may contai
On 03.10.2018 20:22, Paul Backus wrote:
In my experience doing metaprogramming in D, it's best to make your
static if/template constraint tests as narrow and specific as possible.
For example, if you want to know whether you can call a function with a
particular argument, you don't need to mu
On Tuesday, 2 October 2018 at 03:30:50 UTC, Jonathan wrote:
I can use `std.traits.getSymbolsByUDA` to get all the members
of a class that have a particular UDA
`getSymbolsByUDA(ValueType, UDA)`.
But how do I get the values with it?
Is there a more convenient way than `__traits(getMember, valu
I was playing around with dmd`s make file trying to see if I can
compile dmd with different compilers and different compilation
flags. By playing around I found that some dmd files are compiled
with -vtls flag unconditionally and that ldc do not support this
flag. First I dont know what -vtls f
On Wednesday, 3 October 2018 at 20:41:15 UTC, welkam wrote:
I was playing around with dmd`s make file trying to see if I
can compile dmd with different compilers and different
compilation flags. By playing around I found that some dmd
files are compiled with -vtls flag unconditionally and that
On Monday, 1 October 2018 at 19:29:56 UTC, Aurélien Plazzotta
wrote:
Hello guys,
I would like to implement a forum and a blog within my website
(currently including only HTML, CSS and JS, written without
CMS), using D and SQL but I really don't know how to proceed.
How can I integrate D into
On Wednesday, 3 October 2018 at 20:58:01 UTC, Stanislav Blinov
wrote:
No, all *static non-immutable* variables are thread-local by
default, not just "all variables".
I misspoke but this should write something
https://run.dlang.io/is/3u1wFp
If you look at asm output there are "call _d_arraycatT@
On Wednesday, 3 October 2018 at 21:18:26 UTC, welkam wrote:
On Wednesday, 3 October 2018 at 20:58:01 UTC, Stanislav Blinov
wrote:
No, all *static non-immutable* variables are thread-local by
default, not just "all variables".
I misspoke but this should write something
https://run.dlang.io/is/3u
string a = "test";
is a variable that mutates so it should be thread local. Also ASM
output shows that these variables are not optimized away so
compiler should output something but it doesnt. Or I dont
understand thread local storage.
On Wednesday, 3 October 2018 at 21:39:12 UTC, welkam wrote:
string a = "test";
is a variable that mutates so it should be thread local. Also
ASM output shows that these variables are not optimized away so
compiler should output something but it doesnt. Or I dont
understand thread local storage
On Wednesday, 3 October 2018 at 20:41:15 UTC, welkam wrote:
This flag blocks compilation and I want to just remove it but
since I dont know what it is used for I hesitate. If my
attempts were to be successful in compiling dmd with other
compilers I would make pull request but now I have more
q
I need some C++ stuff, but some of the functions take reference
values (Stuff&), and I don't know if this feature is emulated on
D side with extern(C++) functions. While I don't have to worry
about it with functions that are defined in the header, other
ones and classes are a different matter.
On Wednesday, 3 October 2018 at 23:05:10 UTC, solidstate1991
wrote:
I need some C++ stuff, but some of the functions take reference
values (Stuff&), and I don't know if this feature is emulated
on D side with extern(C++) functions.
Of course; you're restricted to D value types though (D class
On Wednesday, 3 October 2018 at 11:51:01 UTC, Sebastiaan Koppe
wrote:
On Wednesday, 3 October 2018 at 11:01:53 UTC, Chris Katko wrote:
[...]
A combination of static introspection with string mixins does
the trick:
---
enum colors {
reset = "\033[0m",
red = "\033[31m"
}
auto Generat
On Monday, 1 October 2018 at 10:45:25 UTC, Basile B. wrote:
On Monday, 1 October 2018 at 09:24:47 UTC, Basile B. wrote:
On Monday, 1 October 2018 at 08:14:07 UTC, dokutoku wrote:
I get a compiler error when I try to put non-ASCII characters
in a string literal in the inline assembler.
Is this
24 matches
Mail list logo