On Tuesday, 21 August 2018 at 08:22:34 UTC, Russel Winder wrote:
If there was a D version of SQLAlchemy, that would be
wonderful. Feel free to s/TBA/Russel Winder/
Great! there are many people waiting for this! ^_^
On Tuesday, 21 August 2018 at 10:48:30 UTC, bauss wrote:
Currently (When I get time again) working on implementing
PostgreSQL and Sqlite support for Diamond.
Mysql and Mssql should work out the box.
https://github.com/DiamondMVC/Diamond
Some examples will come later, unless you use the lates
On Tuesday, August 21, 2018 6:56:06 PM MDT Mike Parker via Digitalmars-d-
learn wrote:
> On Tuesday, 21 August 2018 at 14:56:21 UTC, Seb wrote:
> > I'm aware, but we don't have any other process for people to
> > show their support for a DIP, do we?
> >
> >
> > And for DMD/Druntime/Phobos etc. havi
On Tuesday, 21 August 2018 at 14:56:21 UTC, Seb wrote:
I'm aware, but we don't have any other process for people to
show their support for a DIP, do we?
And for DMD/Druntime/Phobos etc. having a bunch of +1 helps a
PR to move faster as we as reviewers can thus realize that this
is sth. tha
On Tuesday, 21 August 2018 at 21:29:38 UTC, Andrey wrote:
Hello,
This is a code:
import std.stdio;
struct Test
{
static Test opCall()
{
Test test;
test.handler = &test.one;
return test;
}
void one() const { writeln("In handler: Address = ", &this,
"; Text = "
On Tuesday, August 21, 2018 1:46:31 PM MDT Jim Balter via Digitalmars-d-
learn wrote:
> That's a lot of detail. The bottom line is that the warning in
> the spec is completely wrong and should be removed -- using
> property functions is not discouraged, nor is @property.
> @property should be used,
On Tuesday, 21 August 2018 at 18:44:15 UTC, Jim Balter wrote:
Python is not statically typed; D is. Why are you talking about
Python? You asked whether D's auto is like C#'s var ... it is,
but it doesn't have C#'s pointless restriction of not being
allowed for non-local declarations.
I think
On 08/21/2018 03:27 PM, Steven Schveighoffer wrote:
If you examine how the code for variant works, it's quite clever. It
establishes a "handler" that is generated with full compile-time type
info available when the value is *assigned*, but then cast to a function
taking a void pointer and an
Hello,
This is a code:
import std.stdio;
struct Test
{
static Test opCall()
{
Test test;
test.handler = &test.one;
return test;
}
void one() const { writeln("In handler: Address = ", &this,
"; Text = ", text); }
void execute()
{
text = "Inited!"
On Monday, 20 August 2018 at 00:49:02 UTC, Jonathan M Davis wrote:
On Sunday, August 19, 2018 12:32:17 PM MDT QueenSvetlana via
Digitalmars-d- learn wrote:
In the D Style Guide, it says:
Properties
https://dlang.org/dstyle.html#properties
Functions should be property functions whenever appropr
On Tuesday, August 21, 2018 12:22:42 PM MDT QueenSvetlana via Digitalmars-d-
learn wrote:
> On Monday, 20 August 2018 at 17:55:11 UTC, JN wrote:
> > class Foo
> > {
> >
> > auto bar;
> >
> > }
> >
> > because now the compiler doesn't know what type 'bar' is
> > supposed to be.
>
> Just to clari
On Tuesday, August 21, 2018 9:04:31 AM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 8/20/18 9:15 PM, Mike Parker wrote:
> > I tend to use type inference liberally, almost always with
> > const/immutbale locals, though I tend to use auto only when the type
> > name is longer than fo
On 8/21/18 3:11 PM, Nick Sabalausky (Abscissa) wrote:
On 08/21/2018 03:03 AM, Nicholas Wilson wrote:
On Monday, 20 August 2018 at 00:27:04 UTC, Nick Sabalausky (Abscissa)
wrote:
Suppose I've wrapped a Variant in a struct/class which ensures the
Variant *only* ever contains types which satisfy a
On 08/21/2018 03:03 AM, Nicholas Wilson wrote:
On Monday, 20 August 2018 at 00:27:04 UTC, Nick Sabalausky (Abscissa)
wrote:
Suppose I've wrapped a Variant in a struct/class which ensures the
Variant *only* ever contains types which satisfy a particular
constraint (for example: isInputRange, or
On Monday, 20 August 2018 at 08:34:56 UTC, Andrey wrote:
Hello,
Here is a code that you can execute using online compiler
https://run.dlang.io/:
import std.stdio;
void main()
{
ushort first = 5;
ushort second = 1000;
ushort result = first + second;
writeln(result);
}
I hae thi
On Tuesday, 21 August 2018 at 18:18:25 UTC, QueenSvetlana wrote:
On Tuesday, 21 August 2018 at 16:15:32 UTC, XavierAP wrote:
Only if someone
likes "Type x = new Type()" instead of "auto x = new Type()" I
would say they're clearly wrong.
As you stated it's up to the programmer to decided. I'm
On Monday, 20 August 2018 at 17:55:11 UTC, JN wrote:
class Foo
{
auto bar;
}
because now the compiler doesn't know what type 'bar' is
supposed to be.
Just to clarify, even if I set bar in the constructor, I can't
declare it with auto first, correct? I would have to declare a
specific ty
On Tuesday, 21 August 2018 at 16:15:32 UTC, XavierAP wrote:
Only if someone
likes "Type x = new Type()" instead of "auto x = new Type()" I
would say they're clearly wrong.
As you stated it's up to the programmer to decided. I'm in favor
of Type x = new Type() because when it comes to construc
On Monday, 20 August 2018 at 17:52:17 UTC, QueenSvetlana wrote:
So I can't declare class level variables with auto, correct?
only local method variables?
One difference between D's auto and C#'s var or C++'s auto is
that the latter languages allow automatically typed declarations
only for l
On Tuesday, 21 August 2018 at 12:31:20 UTC, Petar Kirov
[ZombineDev] wrote:
What Dub does is what it calls "platform probing" [3]. It
creates a temporary .d file containing various `pragma (msg,
..)` statements that output information to stderr during
compilation. Of course the question is then
On 8/20/18 9:15 PM, Mike Parker wrote:
I tend to use type inference liberally, almost always with
const/immutbale locals, though I tend to use auto only when the type
name is longer than four characters. For me, it's a nice way to save
keystrokes. Some take a dim view of that approach and prefe
On Tuesday, 21 August 2018 at 08:47:53 UTC, Mike Parker wrote:
On Tuesday, 21 August 2018 at 08:32:17 UTC, Seb wrote:
How and where to vote?
At the pull request via +1 and the upcoming "official"
discussion of the PR.
Except that there's no voting process for DIPs. The Community
Review
On Tuesday, 21 August 2018 at 08:08:58 UTC, Andrey wrote:
Hello,
I have a function:
string format(string pattern, T...)(T value)
{
auto writer = appender!string();
writer.formattedWrite!pattern(convertToUnderlyingType(value));
//Tuple!T(value).expand.to!(OriginalType!T)
return write
On Monday, 20 August 2018 at 18:59:23 UTC, Russel Winder wrote:
Hi,
[...]
Hi Russel,
So the questions are:
1. How does Dub find the compiler version number, in this case
2.081, given that neither DMD or LDC seem to have a way of
delivering only the version number.
The __VERSION__ [1] sp
MS has resource compiler too:
https://docs.microsoft.com/en-us/windows/desktop/menurc/resource-compiler
On Monday, 20 August 2018 at 13:42:58 UTC, spikespaz wrote:
I would also like to know how to add a PNG or ICO file to my
compiled executable. I have icons in the resolutions of 16, 32,
64, 128, 256. Currently I'm adding them in using GitHub's
RCEDIT tool (https://github.com/electron/rcedit) but
On Monday, 20 August 2018 at 02:30:16 UTC, binghoo dang wrote:
hi,
I thinks D need an ORM library for Sqlite/Mysql/PostgreSQL,
entity currently support all the three targets, but entity's
API is too complex and cumbersome for using.
Is there a more light-weight and simpler implementation lik
On Tuesday, 21 August 2018 at 08:32:17 UTC, Seb wrote:
How and where to vote?
At the pull request via +1 and the upcoming "official"
discussion of the PR.
Except that there's no voting process for DIPs. The Community
Review is not intended as a way to vote, simply to provide
feedback o
On Tuesday, 21 August 2018 at 06:29:12 UTC, Andrey wrote:
On Monday, 20 August 2018 at 17:45:25 UTC, Seb wrote:
... yet. Though you can vote for this DIP and show your
support there:
https://github.com/dlang/DIPs/pull/71
It even comes with an implementation in DMD already:
https://github.com
On Tue, 2018-08-21 at 01:42 +, binghoo dang via Digitalmars-d-learn
wrote:
[…]
>
> SQLAlchemy is very great, and I remember that
> in D wiki has mentioned this, but the status is "Proposed Project
> Mentors: TBA".
SQLAlchemy is how SQL building and ORM should be done, in Python. For
other
Hello,
I have a function:
string format(string pattern, T...)(T value)
{
auto writer = appender!string();
writer.formattedWrite!pattern(convertToUnderlyingType(value));
//Tuple!T(value).expand.to!(OriginalType!T)
return writer.data;
}
The "value" in this function can be any type in
On Monday, 20 August 2018 at 00:27:04 UTC, Nick Sabalausky
(Abscissa) wrote:
Suppose I've wrapped a Variant in a struct/class which ensures
the Variant *only* ever contains types which satisfy a
particular constraint (for example: isInputRange, or hasLength,
etc...).
Is there a way to call a
32 matches
Mail list logo