On Monday, 9 March 2020 at 17:46:42 UTC, Steven Schveighoffer
wrote:
On 3/9/20 1:23 PM, GreatSam4sure wrote:
[...]
You can use it, but you have to compile it yourself. Vibe.d
does nothing with the javascript except serve it to the
browser. It has no restrictions on what files can be sent, bu
I write a code as below:
auto result = new char[4];
It allocates memory as expected.
Later I define an alias and do the above step:
alias Pattern = char[4];
auto result = new Pattern;
But compiler says:
Error: new can only create structs, dynamic arrays or class
objects, not `char[4]`'s
Hey Everyone,
I'm a new D developer and therefore new to Gtkd. By day I'm an
android developer using Kotlin and most of my hobby projects are
in Go.
So far I've enjoyed my time working in D. I've been working on
this project, https://gitlab.com/kendellfab/rest-scope, a rest
testing proje
On 09.03.20 13:14, Adam D. Ruppe wrote:
Here's a wiki page referencing one of the 2013 discussions
https://wiki.dlang.org/Property_Discussion_Wrap-up
https://wiki.dlang.org/DIP24
On Monday, 9 March 2020 at 16:44:55 UTC, Steven Schveighoffer
wrote:
You're not the first person to ask.
Accepted.
On 3/9/20 11:49 AM, mark wrote:
On Monday, 9 March 2020 at 14:45:15 UTC, Steven Schveighoffer wrote:
On 3/9/20 9:23 AM, mark wrote:
I have this struct:
[snip]
I would name it dup instead of copy for consistency with D. A copy
constructor is pretty heavy for a struct to do a complete duplicati
On 3/9/20 1:23 PM, GreatSam4sure wrote:
On Monday, 9 March 2020 at 15:11:48 UTC, Steven Schveighoffer wrote:
On 3/9/20 5:42 AM, GreatSam4sure wrote:
I want to know if it is possible to use typescript with the vibe.d
since typescript is a superset of javascript. I will appreciate any
example if
On Monday, 9 March 2020 at 15:11:48 UTC, Steven Schveighoffer
wrote:
On 3/9/20 5:42 AM, GreatSam4sure wrote:
I want to know if it is possible to use typescript with the
vibe.d since typescript is a superset of javascript. I will
appreciate any example if it is possible
My understanding is tha
On 3/9/20 11:35 AM, Manfred Nowak wrote:
Having a function `f' overloaded for argument types `bool' and `ulong',
the specs guarantee, that for `f( 1uL)' the boolean overload of `f' is
called.
What is this good for?
You're not the first person to ask.
https://github.com/dlang/DIPs/blob/maste
On Sunday, March 8, 2020 11:19:33 PM MDT tchaloupka via Digitalmars-d-learn
wrote:
> On Sunday, 8 March 2020 at 17:28:33 UTC, Robert M. Münch wrote:
> > On 2020-03-07 12:10:27 +, Jonathan M Davis said:
> >
> > DateTime dt =
> > DateTime.fromISOExtString(split("2018-11-06T16:52:03+01:00",
> > r
On Monday, 9 March 2020 at 14:45:15 UTC, Steven Schveighoffer
wrote:
On 3/9/20 9:23 AM, mark wrote:
I have this struct:
[snip]
I would name it dup instead of copy for consistency with D. A
copy constructor is pretty heavy for a struct to do a complete
duplication of the AA. You should have to
Having a function `f' overloaded for argument types `bool' and
`ulong', the specs guarantee, that for `f( 1uL)' the boolean
overload of `f' is called.
What is this good for?
On Sunday, 8 March 2020 at 20:28:01 UTC, Robert M. Münch wrote:
You can get rid of the enum [...]
That depends on your use case. You will need enum if you want to
use the value at compile time (e.g. when using it as a template
parameter). Otherwise a normal string will suffice.
und the sta
On 3/9/20 5:42 AM, GreatSam4sure wrote:
I want to know if it is possible to use typescript with the vibe.d since
typescript is a superset of javascript. I will appreciate any example if
it is possible
My understanding is that Typescript needs to be compiled to javascript.
You can't serve type
On Monday, 9 March 2020 at 09:42:16 UTC, GreatSam4sure wrote:
I want to know if it is possible to use typescript with the
vibe.d since typescript is a superset of javascript. I will
appreciate any example if it is possible
What do you want to do?
On 3/9/20 9:23 AM, mark wrote:
I have this struct:
struct Deb {
string name;
...
Unit[string] tags; // set of tags
Deb copy() const {
Deb deb;
...
foreach (key, value; tags) // XXX
deb.tags[key] = value;
return deb;
}
On Monday, 9 March 2020 at 13:55:08 UTC, Calvin P wrote:
The current compiler "-i=module_name" option will include
imported modules as source code.
When the module define from di file extension, I think compiler
should avoid treat it as source file.
What do you think?
The use case:
If I
The current compiler "-i=module_name" option will include
imported modules as source code.
When the module define from di file extension, I think compiler
should avoid treat it as source file.
What do you think?
On Monday, 9 March 2020 at 12:14:06 UTC, Adam D. Ruppe wrote:
Here's a wiki page referencing one of the 2013 discussions
https://wiki.dlang.org/Property_Discussion_Wrap-up
though i'll note the thing is older than that.
What especially drove me nuts is people would so often say
"property *synt
On Monday, 9 March 2020 at 12:14:06 UTC, Adam D. Ruppe wrote:
On Monday, 9 March 2020 at 10:09:56 UTC, Calvin P wrote:
@property exists so many years, Druntime & Phobos use it
2280 times. I can't believe it is not recommended.
They never implemented it right. This opCall type thing was THE
I have this struct:
struct Deb {
string name;
...
Unit[string] tags; // set of tags
Deb copy() const {
Deb deb;
...
foreach (key, value; tags) // XXX
deb.tags[key] = value;
return deb;
}
void clear() {
name = "";
On Monday, 9 March 2020 at 10:09:56 UTC, Calvin P wrote:
@property exists so many years, Druntime & Phobos use it
2280 times. I can't believe it is not recommended.
They never implemented it right. This opCall type thing was THE
case we brought up to introduce @property in the first place..
On 07.03.20 17:41, MoonlightSentinel wrote:
On Saturday, 7 March 2020 at 16:30:59 UTC, Robert M. Münch wrote:
Is this possible at all?
You can use an anonymous lambda to build the string in CTFE:
It turns out that if you do use this standard idiom, you might end up
getting blamed for an unr
On Monday, 9 March 2020 at 09:44:40 UTC, Simen Kjærås wrote:
As written on
https://dlang.org/spec/function.html#property-functions:
WARNING: The definition and usefulness of property functions
is being reviewed, and the implementation is currently
incomplete. Using property functions is not r
On Monday, 9 March 2020 at 09:25:31 UTC, Calvin P wrote:
Is this a bugs ?
==
struct A {
ref auto opCall(string tmp) scope return {
return this;
}
}
struct B {
A _a;
@property ref auto a() scope return {
return _a;
I want to know if it is possible to use typescript with the
vibe.d since typescript is a superset of javascript. I will
appreciate any example if it is possible
Is this a bugs ?
==
struct A {
ref auto opCall(string tmp) scope return {
return this;
}
}
struct B {
A _a;
@property ref auto a() scope return {
return _a;
}
}
extern(C) int main(){
A a;
a("a")
On Saturday, 7 March 2020 at 15:44:38 UTC, Arine wrote:
The case when there isn't a value should be handled explicitly,
not implicitly. Propogating a None value
isn't useful
Except when it is useful, and shouldn't be handled explicitly. I
have code in D, C and C++ that looks like this:
On Sunday, 8 March 2020 at 17:58:16 UTC, Jesse Phillips wrote:
On Friday, 7 February 2020 at 19:37:08 UTC, mark wrote:
[snip]
I think I've usually used the associative arrays, but I also
think I tend to avoid using this approach but couldn't quite
remember what I do instead.
I believe I have
29 matches
Mail list logo