On 11/5/2016 21:13, deadalnix wrote:
On Wednesday, 11 May 2016 at 10:50:47 UTC, Lionello Lunesu wrote:
On 10/5/2016 22:16, deadalnix wrote:
On Tuesday, 10 May 2016 at 10:09:40 UTC, Andrei Alexandrescu wrote:
On 5/10/16 12:52 PM, Mathias Lang wrote:
So, following DConf2016, I raised a P.R. to
Writing a lot of server side D code lately, and bummed the usual `string
literals` (or r"string literals") will only use '\n' as the End of line
character, while HTTP (and others too) use CRLF for EOL.
One way is to create a CTFE function that replaces all \n with \r\n, and
call this on all st
On 5/11/2016 6:52 PM, Joakim wrote:
That example is misleading, as that was translated from C++ and the host half of
it was removed a couple months ago:
https://github.com/dlang/dmd/pull/5549/files
I'll submit a PR for the rest: I'm sick of this argument that "ddmd is using
static if, so why sh
On Tuesday, 10 May 2016 at 14:47:05 UTC, Tomer Filiba wrote:
On Tuesday, 10 May 2016 at 12:27:19 UTC, Johan Engelen wrote:
We resort to enums whenever 'version' is not adequate like
this:
https://github.com/ldc-developers/ldc/blob/master/ddmd/globals.d#L18-L45
A good example -- which only pro
2016-05-12 0:32 GMT+02:00 deadalnix via Digitalmars-d <
digitalmars-d@puremagic.com>:
> On Wednesday, 11 May 2016 at 18:36:11 UTC, H. S. Teoh wrote:
>
>> On Wed, May 11, 2016 at 05:55:27PM +, deadalnix via Digitalmars-d
>> wrote:
>>
>>> On Wednesday, 11 May 2016 at 16:44:43 UTC, H. S. Teoh wro
On Wednesday, 11 May 2016 at 16:09:50 UTC, Russel Winder wrote:
Not as far as I know, but if anyone puts together an Emacs
package for them I'd be happy to add it to the things that get
uploaded to MELPA.
I put together a couple here:
https://github.com/nordlow/elisp/tree/master/mine/snippets
On Wednesday, 11 May 2016 at 18:41:12 UTC, ZombineDev wrote:
On Wednesday, 11 May 2016 at 11:27:44 UTC, nazriel wrote:
On Tuesday, 10 May 2016 at 16:39:05 UTC, Anonymouse wrote:
I just had a PEBCAK moment where I was composing a large-ish
snippet on dpaste, then accidentally left the page by
c
On Wednesday, 11 May 2016 at 18:36:11 UTC, H. S. Teoh wrote:
On Wed, May 11, 2016 at 05:55:27PM +, deadalnix via
Digitalmars-d wrote:
On Wednesday, 11 May 2016 at 16:44:43 UTC, H. S. Teoh wrote:
>That's what I've been saying, it should be treated as a
>special case in the syntax of for-loop
On Tuesday, 10 May 2016 at 16:39:05 UTC, Anonymouse wrote:
I just had a PEBCAK moment where I was composing a large-ish
snippet on dpaste, then accidentally left the page by clicking
the back button on my mouse. Going back to the page I see my
changes were lost.
Could we maybe add a warning w
On 5/11/2016 1:42 PM, John Colvin wrote:
I'm convinced that you're argument is reasonable if version is only for things
like platforms, but it's used for a lot of other stuff e.g.
version(PrintSomeExtraInfo) or version(CacheSomeStuffForPerformance). Do you
think the same principle applies there?
On Wednesday, 11 May 2016 at 20:37:35 UTC, Walter Bright wrote:
Actually, dmd is a nice example of how unnecessary it is. The
dmd C++ source code used to be full of it.
I'm convinced that you're argument is reasonable if version is
only for things like platforms, but it's used for a lot of oth
On 5/11/2016 10:02 AM, bitwise wrote:
When even D gurus writing D compilers have to hack solutions together with
static if to get by,
Really? There are a few lines of that left in dmd, but as a result of mechanical
conversion from C++. There's other C++ cruft in there, too.
its time to re-
On Wednesday, 11 May 2016 at 11:27:44 UTC, nazriel wrote:
On Tuesday, 10 May 2016 at 16:39:05 UTC, Anonymouse wrote:
I just had a PEBCAK moment where I was composing a large-ish
snippet on dpaste, then accidentally left the page by clicking
the back button on my mouse. Going back to the page I
On Wed, May 11, 2016 at 05:55:27PM +, deadalnix via Digitalmars-d wrote:
> On Wednesday, 11 May 2016 at 16:44:43 UTC, H. S. Teoh wrote:
> >That's what I've been saying, it should be treated as a special case
> >in the syntax of for-loops, but not as an operator in general.
> >
>
> Please no sp
On Wednesday, 11 May 2016 at 17:15:29 UTC, Kagamin wrote:
https://dpaste.dzfl.pl/46f24c3def62
It gave compilation error because, one of the parameters of the
comma() template in your code is void. Currently, does D support
void as a type of an expression separated by comma?
On Wednesday, 11 May 2016 at 17:00:41 UTC, H. S. Teoh wrote:
On Wed, May 11, 2016 at 04:46:48PM +, Nick Treleaven via
Digitalmars-d wrote:
On Wednesday, 11 May 2016 at 13:29:56 UTC, Gopan wrote:
>int x;
>while( scanf("%d", &x), x!= 0) // until user input 0.
>{
> //do something with x
>}
>
On Wednesday, 11 May 2016 at 16:44:43 UTC, H. S. Teoh wrote:
That's what I've been saying, it should be treated as a special
case in the syntax of for-loops, but not as an operator in
general.
Please no special cases.
On Wednesday, 11 May 2016 at 16:46:48 UTC, Nick Treleaven wrote:
In places where the comma operator does help, use a
comma(expr,result) template function, implemented here:
http://forum.dlang.org/post/ngslcl$otg$1...@digitalmars.com
May not always work: https://dpaste.dzfl.pl/1ea0df70787b
https://dpaste.dzfl.pl/46f24c3def62
Eeek, dpaste swallowed error message :)
On Wed, May 11, 2016 at 04:46:48PM +, Nick Treleaven via Digitalmars-d
wrote:
> On Wednesday, 11 May 2016 at 13:29:56 UTC, Gopan wrote:
> >int x;
> >while( scanf("%d", &x), x!= 0) // until user input 0.
> >{
> > //do something with x
> >}
> >
> >Without the comma operator, I would have to r
On Tuesday, 10 May 2016 at 11:12:58 UTC, Tomer Filiba wrote:
Hey guys,
Looking at our code base (weka), I realized it would be really
useful if we had logical operators (negation, conjunction,
disjunction) in the version's "condition" clause. Here's what I
have in mind:
version(!extra_check
On Wed, May 11, 2016 at 02:37:37PM +, burjui via Digitalmars-d wrote:
> On Wednesday, 11 May 2016 at 13:29:56 UTC, Gopan wrote:
> >int x;
> >while( scanf("%d", &x), x!= 0) // until user input 0.
> >{
> > //do something with x
> >}
> >
> >Does anybody think that this is a useful case of comma
On Wednesday, 11 May 2016 at 13:29:56 UTC, Gopan wrote:
int x;
while( scanf("%d", &x), x!= 0) // until user input 0.
{
//do something with x
}
Without the comma operator, I would have to repeat the scanf
statement.
int x;
scanf("%d", &x);
while(x != 0)
{
//do something with x
scanf("
On Wed, 2016-05-11 at 15:01 +, Nordlöw via Digitalmars-d wrote:
> Have anybody put together Yasnipets for D?
Not as far as I know, but if anyone puts together an Emacs package for
them I'd be happy to add it to the things that get uploaded to MELPA.
--
Russel.
===
On 05/10/16 13:48, Tomer Filiba via Digitalmars-d wrote:
> On Tuesday, 10 May 2016 at 11:12:58 UTC, Tomer Filiba wrote:
>> Alternatively, an isVersion(x) predicate that I could use in a static if
>> could do the trick
>
> Well, I've come up with
>
> template isVersion(string ver) {
> mixin(f
On Wednesday, 11 May 2016 at 14:54:07 UTC, Jonathan M Davis wrote:
On Wednesday, May 11, 2016 14:22:39 Dicebot via Digitalmars-d
wrote:
On Wednesday, 11 May 2016 at 14:12:47 UTC, Jonathan M Davis
wrote:
> Regardless of the desirability of marking stuff with
> nothrow, one _huge_ difference betw
On Monday, 9 May 2016 at 20:16:59 UTC, Walter Bright wrote:
I oppose this change. You'd be better off not having unsigned
types at all than this mess, which was Java's choice.
The language forces usage of unsigned types. Though in my
experience it's relatively easy to fight back including
int
Have anybody put together Yasnipets for D?
On Wednesday, May 11, 2016 14:22:39 Dicebot via Digitalmars-d wrote:
> On Wednesday, 11 May 2016 at 14:12:47 UTC, Jonathan M Davis wrote:
> > Regardless of the desirability of marking stuff with nothrow,
> > one _huge_ difference between nothrow and pure or @nogc is that
> > it's trivial to use a f
On Wednesday, 11 May 2016 at 13:29:56 UTC, Gopan wrote:
int x;
while( scanf("%d", &x), x!= 0) // until user input 0.
{
//do something with x
}
Does anybody think that this is a useful case of comma operator?
Well, it is, but judging from my experience, comma operator is
the most rarely us
On Wednesday, 11 May 2016 at 14:12:47 UTC, Jonathan M Davis wrote:
Regardless of the desirability of marking stuff with nothrow,
one _huge_ difference between nothrow and pure or @nogc is that
it's trivial to use a function that throws inside of nothrow
code by wrapping it in a try-catch block.
On Wednesday, May 11, 2016 11:16:41 Dicebot via Digitalmars-d wrote:
> On Wednesday, 11 May 2016 at 07:05:07 UTC, Dicebot wrote:
> > On Tuesday, 10 May 2016 at 17:46:17 UTC, Vladimir Panteleev
> >
> > wrote:
> >> So I guess the way forward here for the Druntime code is to
> >> abandon the synchroni
On Wednesday, 11 May 2016 at 13:29:56 UTC, Gopan wrote:
On Tuesday, 10 May 2016 at 09:52:07 UTC, Mathias Lang wrote:
Do you like comma expressions, ...
I am a student.
In C, one scenario where I like comma is this.
int x;
while( scanf("%d", &x), x!= 0) // until user input 0.
{
//do som
On Tuesday, 10 May 2016 at 09:52:07 UTC, Mathias Lang wrote:
Do you like comma expressions, ...
I am a student.
In C, one scenario where I like comma is this.
int x;
while( scanf("%d", &x), x!= 0) // until user input 0.
{
//do something with x
}
Without the comma operator, I would have
On Wednesday, 11 May 2016 at 13:05:43 UTC, Chris wrote:
On Wednesday, 11 May 2016 at 13:02:29 UTC, Jacob Carlborg wrote:
On 2016-05-11 13:00, Chris wrote:
It's working fine for me. Which version of DVM are you using?
It should by default fetch from
http://downloads.dlang.org/releases/2.x/ and
On Wednesday, 11 May 2016 at 11:16:41 UTC, Dicebot wrote:
It is probably also worth re-iterating on my long standing
position that adding more `nothrow` in fundamental facilities
is a false goal and almost always does more harm than good.
Exceptions are main (and pretty much only) error handlin
On Wednesday, 11 May 2016 at 10:50:47 UTC, Lionello Lunesu wrote:
On 10/5/2016 22:16, deadalnix wrote:
On Tuesday, 10 May 2016 at 10:09:40 UTC, Andrei Alexandrescu
wrote:
On 5/10/16 12:52 PM, Mathias Lang wrote:
So, following DConf2016, I raised a P.R. to deprecate usage
of the comma
expressi
On Wednesday, 11 May 2016 at 13:02:29 UTC, Jacob Carlborg wrote:
On 2016-05-11 13:00, Chris wrote:
It's working fine for me. Which version of DVM are you using?
It should by default fetch from
http://downloads.dlang.org/releases/2.x/ and only fallback to
http://ftp.digitalmars.com if it canno
On 2016-05-11 13:00, Chris wrote:
The latest version of DMD is not yet DVM-able:
The resource with URL "http://ftp.digitalmars.com/dmd.2.071.0.zip"; could
not be found.
Can anybody fix this please? Thanks!
It's working fine for me. Which version of DVM are you using?
It should by default fet
On 2016-05-11 11:39, ZombineDev wrote:
Macros... well I think a solution like Jonathan Blow's Jai CTFE inside
the compiler would be much more powerful and easy to integrate into the
language. But it will require heavy refactoring of DMDFE, but this is a
good idea regardless.
Macros are not har
On 9 May 2016 at 23:02, Stefan Koch via Digitalmars-d
wrote:
> On Monday, 9 May 2016 at 12:49:16 UTC, Stefan Koch wrote:
>>
>> On Monday, 9 May 2016 at 12:33:33 UTC, Stefan Koch wrote:
>>>
>>> On Monday, 9 May 2016 at 12:24:18 UTC, Timon Gehr wrote:
[...]
>>>
>>>
>>> I see.
>>> I did not
On Monday, 9 May 2016 at 08:44:53 UTC, Dmitry Olshansky wrote:
On 09-May-2016 02:38, Jon D wrote:
[...]
The only problem is that it should consider multi-codepoint
replacements aka full-case folding in Unicode.
Otherwise - go ahead and issue a pull request to add
special case for < 0x80.
W
On Tuesday, 10 May 2016 at 16:39:05 UTC, Anonymouse wrote:
I just had a PEBCAK moment where I was composing a large-ish
snippet on dpaste, then accidentally left the page by clicking
the back button on my mouse. Going back to the page I see my
changes were lost.
Could we maybe add a warning w
On Wednesday, 11 May 2016 at 07:05:07 UTC, Dicebot wrote:
On Tuesday, 10 May 2016 at 17:46:17 UTC, Vladimir Panteleev
wrote:
So I guess the way forward here for the Druntime code is to
abandon the synchronized() statement and use locks directly?
I believe this is the way. Synchronized statemen
On 5/11/2016 12:05 AM, Dicebot wrote:
I believe this is the way. Synchronized statements don't add any crucial value
compared to plain locks. At the same time forbidding throwing from even more
runtime overrides would be both annoying and unnecessary restrictive.
Also, the synchronized statemen
On 5/11/2016 12:01 AM, Jacob Carlborg wrote:
There's code in DWT and Tango as well that throws a SyncException exception when
failing to acquire a lock.
The code in DWT is basically copy pasted from Tango. Since druntime is derived
from Tango I guess we can update the code in DWT and Tango to do
The latest version of DMD is not yet DVM-able:
The resource with URL
"http://ftp.digitalmars.com/dmd.2.071.0.zip"; could not be found.
Can anybody fix this please? Thanks!
On 10/5/2016 22:16, deadalnix wrote:
On Tuesday, 10 May 2016 at 10:09:40 UTC, Andrei Alexandrescu wrote:
On 5/10/16 12:52 PM, Mathias Lang wrote:
So, following DConf2016, I raised a P.R. to deprecate usage of the comma
expressions, except within `for` loops increment [5].
The agreed-upon idee
On 10/5/2016 14:39, Jacob Carlborg wrote:
On 2016-05-10 06:49, Lionello Lunesu wrote:
Well, it's either wrong phobos or wrong dmd. I assumed phobos was
mismatched, but perhaps DMD was mismatched? Installing with brew suggest
it's installing 2.071.0, but DMD appears to be 2.070:
The issue Stev
On 10/5/2016 16:24, John Colvin wrote:
On Tuesday, 10 May 2016 at 04:49:33 UTC, Lionello Lunesu wrote:
Well, it's either wrong phobos or wrong dmd. I assumed phobos was
mismatched, but perhaps DMD was mismatched? Installing with brew
suggest it's installing 2.071.0, but DMD appears to be 2.070:
On 11.05.2016 11:39, ZombineDev wrote:
By "parametric polymorphism" do you mean multiple dispatch/multimethods?
It's a type system feature. It allows one uniform implementation to work
on different types without a loss of type information (i.e., by using a
variant, or up-casting to a less sp
On Wednesday, 11 May 2016 at 09:06:40 UTC, Kagamin wrote:
On Wednesday, 11 May 2016 at 00:32:33 UTC, Mithun Hunsur wrote:
+1. The comma operator should go, especially if it makes tuple
syntax possible.
To clarify a possible misunderstanding: tuples are possible in
D3, and macros, and concepts
On 11 May 2016 at 07:47, Walter Bright via Digitalmars-d
wrote:
> On 5/10/2016 12:31 AM, Manu via Digitalmars-d wrote:
>>
>> Think of it like this; a float doesn't represent a precise point (it's
>> an approximation by definition), so see the float as representing the
>> interval from the absolute
On Wednesday, 11 May 2016 at 09:03:29 UTC, Kagamin wrote:
On Tuesday, 10 May 2016 at 12:49:28 UTC, Steven Schveighoffer
wrote:
Note, there was some pretty good examples of (ab)use of the
comma operator in one of those:
https://github.com/dlang/dmd/pull/3399#issuecomment-38401339
If we had con
On Wednesday, 11 May 2016 at 07:05:07 UTC, Dicebot wrote:
On Tuesday, 10 May 2016 at 17:46:17 UTC, Vladimir Panteleev
wrote:
So I guess the way forward here for the Druntime code is to
abandon the synchronized() statement and use locks directly?
I believe this is the way. Synchronized statemen
On Wednesday, 11 May 2016 at 00:32:33 UTC, Mithun Hunsur wrote:
+1. The comma operator should go, especially if it makes tuple
syntax possible.
To clarify a possible misunderstanding: tuples are possible in
D3, and macros, and concepts, and parametric polymorphism.
On Tuesday, 10 May 2016 at 12:49:28 UTC, Steven Schveighoffer
wrote:
Note, there was some pretty good examples of (ab)use of the
comma operator in one of those:
https://github.com/dlang/dmd/pull/3399#issuecomment-38401339
If we had control flow statements as expressions one could rewrite
retur
On 2016-05-11 09:22, ZombineDev wrote:
These cases all look like they want to use tryLock instead
(http://dlang.org/phobos/core_sync_mutex#.Mutex.tryLock).
Ah, thanks. Although I see now that the code is not using Monitor.lock,
it uses Condition.wait. Condition in this case is not the one in
On Wednesday, 11 May 2016 at 07:01:43 UTC, Jacob Carlborg wrote:
On 2016-05-11 03:08, Walter Bright wrote:
[...]
There's code in DWT and Tango as well that throws a
SyncException exception when failing to acquire a lock.
[...]
These cases all look like they want to use tryLock instead
On Tuesday, 10 May 2016 at 17:46:17 UTC, Vladimir Panteleev wrote:
So I guess the way forward here for the Druntime code is to
abandon the synchronized() statement and use locks directly?
I believe this is the way. Synchronized statements don't add any
crucial value compared to plain locks. At
On 2016-05-11 03:08, Walter Bright wrote:
Why does vibe.d throw?
Also, any throwing code can be converted to nothrow with:
try
{
...throwing code...
}
catch (Exception e)
{
...
}
There's code in DWT and Tango as well that throws a SyncException
exception whe
62 matches
Mail list logo