On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to
do this
if(lc is NetworkMessage)
Sorry for my English, i speak french.
if
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to do
this
if(lc is NetworkMessage)
Sorry for my English, i speak french.
I develop a game server. Currently I use a switch :
import protocol.messages.connection.Message1;
import protocol.messages.connection.Message2;
import protocol.messages.queues.Message3;
import ..
import protocol.messages.NetworkMessage;
class ProtocolMessageManager
{
public static
On Saturday, 28 January 2017 at 01:55:10 UTC, Profile Anaysis
wrote:
On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter
wrote:
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
[...]
It's funny (or sad) that C has compound types since C99 and
that they are good.
https://issues.dlang.org/show_bug.cgi?id=17123
--- Comment #2 from Walter Bright ---
https://github.com/dlang/dmd/pull/6495
--
https://issues.dlang.org/show_bug.cgi?id=17123
Walter Bright changed:
What|Removed |Added
Keywords||safe
--
https://issues.dlang.org/show_bug.cgi?id=17124
b2.t...@gmx.com changed:
What|Removed |Added
CC||b2.t...@gmx.com
--- Comment #1 from
On 1/27/2017 2:51 AM, Chris wrote:
On Thursday, 26 January 2017 at 23:28:37 UTC, Walter Bright wrote:
On 1/26/2017 7:02 AM, aberba wrote:
I did this book:
https://www.amazon.com/Historians-History-World-Vol-Prolegomena-ebook/dp/B00REVL4BC/
Is it the same as this:
On 1/27/2017 4:43 PM, deadalnix wrote:
I mostly went silent on this because I this point, I have no idea how to reach
to you and Andrei. This is bad because of all the same reasons inout is bad,
plus some other on its own, and is going down exactly like inout so far, plus
some extra problems on
On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter
wrote:
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
[...]
It's funny (or sad) that C has compound types since C99 and
that they are good.
Your foo(|a,b,|c1,c2,3||,|e|,|f,g,c|) writes as
On Friday, 27 January 2017 at 12:44:30 UTC, rjframe wrote:
On Fri, 27 Jan 2017 10:38:53 +, Profile Anaysis wrote:
Do you realize
1. That without change there can be no progress?
...
If people with your mentality rules the world we would still
be using
sticks and stones. This is a
On Friday, 27 January 2017 at 19:32:29 UTC, Jesse Phillips wrote:
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
Many times we pass compound types(non-primitives) as arguments
to functions.
I don't understand what issue you are solving. I see an
undefined syntax:
https://issues.dlang.org/show_bug.cgi?id=11531
--- Comment #3 from Jack Stouffer ---
(In reply to Stefan Koch from comment #2)
> Jack, I do not see anything of the kind.
> The performance difference is within 2% and will within fluctuations being
> caused by the gc.
Hmm
https://issues.dlang.org/show_bug.cgi?id=17117
--- Comment #6 from Martin Krejcirik ---
Walter, can you fix this in 2.073 too ?
--
On Friday, 27 January 2017 at 19:12:37 UTC, Walter Bright wrote:
Yes, I'm 100% responsible for 'return scope' and pushing it
harder than most people probably would like. Maybe I'm alone,
but I strongly believe it is critical to D's future.
You sound like this guy:
On Friday, 27 January 2017 at 19:09:30 UTC, Walter Bright wrote:
On 1/26/2017 5:42 AM, Dicebot wrote:
https://issues.dlang.org/show_bug.cgi?id=17123
Can I have my "I told you so" badge please?
Yes, you may. But nobody promised there would be no regressions
- just that we'll fix them. I'll
https://issues.dlang.org/show_bug.cgi?id=17117
--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/4a4dcf23830e9066a70cb1c381d97306f2bb5bbc
fix Issue 17117 - erroneous 'escaping reference to local
On Friday, 27 January 2017 at 23:36:58 UTC, Stefan Koch wrote:
It should reclaim the memory from the beginning of the array.
I doubt the current implementation will though, you should check.
Does phobos offer concurrent containers?
I couldn't find one at http://dlang.org/phobos/std_container.html
Any other in the D land?
Arun
https://issues.dlang.org/show_bug.cgi?id=11531
Stefan Koch changed:
What|Removed |Added
CC||uplink.co...@gmail.com
On Friday, 27 January 2017 at 23:22:17 UTC, Nick Sabalausky wrote:
Suppose an array is being used like a FIFO:
---
T[] slice;
// Add:
slice ~= T();
// Remove:
slice = slice[1..$];
---
Assuming of course there's no other references to the memory,
as
Suppose an array is being used like a FIFO:
---
T[] slice;
// Add:
slice ~= T();
// Remove:
slice = slice[1..$];
---
Assuming of course there's no other references to the memory, as this
gets used, does the any of the memory from the removed elements
On 01/27/2017 03:03 AM, aberba wrote:
Are there any dub package for compressing images uploaded through web
forms? Cropping/resizing may also come in handy.
I want one for a vibe.d project.
I have a minimal MagickWand binding if you want to use or extend:
On Friday, 27 January 2017 at 19:14:19 UTC, Jesse Phillips wrote:
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote:
Are there any dub package for compressing images uploaded
through web forms? Cropping/resizing may also come in handy.
I want one for a vibe.d project.
I don't know of
On Friday, 27 January 2017 at 20:48:30 UTC, Ali Çehreli wrote:
On 01/27/2017 08:21 AM, Jack Stouffer wrote:
On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote:
And this:
http://youtu.be/-DK4r5xewTY
Hey Jon, if you're in this thread, are you able to post any of
the code
that
On Friday, 27 January 2017 at 21:02:13 UTC, medhi558 wrote:
Hello, I would like to know if it is possible to recover all
classes in the project in D.
Yes, `foreach(mod; ModuleInfo) foreach(lc; mod.localClasses)`...
but why do you want it? That facility is kinda limited in doing
many things
Hello, I would like to know if it is possible to recover all
classes in the project in D.
Example in c# :
Assembly asm = Assembly.GetAssembly(typeof(MyClass));
foreach (Type type in asm.GetTypes())
{
}
On 01/27/2017 08:21 AM, Jack Stouffer wrote:
On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote:
And this:
http://youtu.be/-DK4r5xewTY
Hey Jon, if you're in this thread, are you able to post any of the code
that you use for tsv parsing?
Yeah, the slide starting at 19'35 is the
https://issues.dlang.org/show_bug.cgi?id=11531
--- Comment #1 from Jack Stouffer ---
Created attachment 1635
--> https://issues.dlang.org/attachment.cgi?id=1635=edit
test.d
Currently group does not auto-decode, and I have attached a test case which
shows that using
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
Many times we pass compound types(non-primitives) as arguments
to functions.
I don't understand what issue you are solving. I see an undefined
syntax:
foo(|a,b,|c1,c2,3||,|e|,|f,g,c|)
To replace an existing syntax:
On 1/27/2017 3:12 AM, Dicebot wrote:
And also stuff like https://github.com/dlang/druntime/pull/1740
I'm curious what is wrong with that?
I think the
story behind `return scope` is the critical point for me. It is worst technical
disaster that has happened to compiler in years, and I am
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote:
Are there any dub package for compressing images uploaded
through web forms? Cropping/resizing may also come in handy.
I want one for a vibe.d project.
I don't know of any D projects. If I were doing this I'd be
running the vibe.d
On 1/26/2017 5:42 AM, Dicebot wrote:
https://issues.dlang.org/show_bug.cgi?id=17123
Can I have my "I told you so" badge please?
Yes, you may. But nobody promised there would be no regressions - just that
we'll fix them. I'll see about taking care of this one. Thanks for reporting it.
On Friday, 27 January 2017 at 12:59:54 UTC, Kagamin wrote:
On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter
wrote:
It's funny (or sad) that C has compound types since C99 and
that they are good.
Your foo(|a,b,|c1,c2,3||,|e|,|f,g,c|) writes as
foo((T1){a,b,{c1,c2,c3}}, (T2){e},
https://issues.dlang.org/show_bug.cgi?id=17123
Walter Bright changed:
What|Removed |Added
CC|
On 1/27/2017 6:36 AM, Nemanja Boric wrote:
```
void bar(scope char** c, scope int* n) @trusted
{
}
void foo() @safe
{
char[100] buf;
char* c = [0];
int n;
bar(, ); // Error: cannot take address of scope local c in @safe
function foo
}
void main()
{
foo();
}
```
This
On Friday, 27 January 2017 at 16:21:51 UTC, Jack Stouffer wrote:
On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote:
And this:
http://youtu.be/-DK4r5xewTY
Hey Jon, if you're in this thread, are you able to post any of
the code that you use for tsv parsing?
Code has been
https://issues.dlang.org/show_bug.cgi?id=11703
--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos
https://github.com/dlang/phobos/commit/5fedf3503d73cead36a33260ba3efcc39847b8ce
fix issue 11703, Typedef properties should not be of
On Thu, Jan 26, 2017 at 06:47:21PM +, Suliman via Digitalmars-d-learn wrote:
> On Thursday, 26 January 2017 at 18:42:29 UTC, Suliman wrote:
> > On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote:
> > > On Thu, Jan 26, 2017 at 05:38:59PM +, Suliman via
> > > Digitalmars-d-learn
On Friday, 27 January 2017 at 16:30:14 UTC, WhatMeWorry wrote:
But it seems like I'm committing some great sin by doing this.
meh i see no problem with it.
Just another quick question: is the module that holds the
main() function just the
same as any other module?
It is the same as any
module_common
import app; // Ugly? Bad? Better way?
common_func()
{
static if (compileTimeFlag1)
codeBlockA
static if (compileTimeFlag2)
codeBlockB
static if (compileTimeFlag3)
codeBlockC
}
I want to have many
On Friday, 27 January 2017 at 03:58:26 UTC, Ali Çehreli wrote:
And this:
http://youtu.be/-DK4r5xewTY
Hey Jon, if you're in this thread, are you able to post any of
the code that you use for tsv parsing?
On Friday, 27 January 2017 at 15:39:57 UTC, cym13 wrote:
On Friday, 27 January 2017 at 08:30:41 UTC, Dukc wrote:
[...]
Note that if the set of values to be excluded isn't smaller
than the haystack then using partition is way faster and your
method is the slowest of all. If the order of the
On Thursday, 26 January 2017 at 15:02:33 UTC, aberba wrote:
Will most likely go with markdown and use other solutions for
theming it. Then pandoc it to PDF
Markdown is also supported by vibe.d's diet templates.
On Friday, 27 January 2017 at 08:30:41 UTC, Dukc wrote:
On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote:
My method is much better for large arrays I tested here.
Trough, considering the size of the arrays the performance
difference should be even greater, like 1000X better instead of
On Friday, 27 January 2017 at 12:02:01 UTC, Chris wrote:
Yes, you are right of course. In a perfect world we'd just
write a text and give the odd reference. Unfortunately, anyone
who writes an M.A., M.Sc. or Ph.D. thesis has to reference
everything. Not even the most basic concept can be
Taken from
https://github.com/dlang/druntime/pull/1750#discussion_r98181564:
```
void bar(scope char** c, scope int* n) @trusted
{
}
void foo() @safe
{
char[100] buf;
char* c = [0];
int n;
bar(, );
}
void main()
{
foo();
}
```
This doesn't compile even with dip1000, but
On 01/27/2017 01:29 PM, Nordlöw wrote:
> On Friday, 27 January 2017 at 11:12:22 UTC, Dicebot wrote:
>> And also stuff like https://github.com/dlang/druntime/pull/1740 - I
>> think the story behind `return scope` is the critical point for me. It
>> is worst technical disaster that has happened to
https://issues.dlang.org/show_bug.cgi?id=17124
Issue ID: 17124
Summary: dmd segfaults on __traits(getMember, ...)
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: major
On Friday, 27 January 2017 at 11:12:22 UTC, Dicebot wrote:
And also stuff like https://github.com/dlang/druntime/pull/1740
- I think the story behind `return scope` is the critical point
for me. It is worst technical disaster that has happened to
compiler in years, and I am going to blame
On Friday, 27 January 2017 at 11:16:09 UTC, Patrick Schluter
wrote:
It's funny (or sad) that C has compound types since C99 and
that they are good.
Your foo(|a,b,|c1,c2,3||,|e|,|f,g,c|) writes as
foo((T1){a,b,{c1,c2,c3}}, (T2){e}, (T3){f,g,c});
of course, the lack of object orientation and
On Friday, 27 January 2017 at 12:21:29 UTC, Nestor wrote:
On Friday, 27 January 2017 at 12:06:33 UTC, Stefan Koch wrote:
On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote:
I take it you build without dub ?
Have you specified source/sqlite.d on your compile
commandline ?
That
On Fri, 27 Jan 2017 10:38:53 +, Profile Anaysis wrote:
> Do you realize
>
> 1. That without change there can be no progress?
>
> ...
> If people with your mentality rules the world we would still be using
> sticks and stones. This is a fact... I won't argue whether it would be
> the best
On Friday, 27 January 2017 at 11:12:22 UTC, Dicebot wrote:
And also stuff like https://github.com/dlang/druntime/pull/1740
Why it would break code if `in` meant `scope`?
On Friday, 27 January 2017 at 12:06:33 UTC, Stefan Koch wrote:
On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote:
I take it you build without dub ?
Have you specified source/sqlite.d on your compile commandline
?
That was supposed to say.
sqlite-d/source/sqlited.d
Please feel
On Friday, 27 January 2017 at 12:04:06 UTC, Stefan Koch wrote:
I take it you build without dub ?
Have you specified source/sqlite.d on your compile commandline ?
That was supposed to say.
sqlite-d/source/sqlited.d
Please feel free to post here or contact me directly regarding
the usage of
On Friday, 27 January 2017 at 11:05:41 UTC, Kagamin wrote:
On Thursday, 26 January 2017 at 10:26:25 UTC, Chris wrote:
Er, yes. That's how it works. Always ask the publisher first.
But that wasn't the question. The question was Markdown or
LaTeX, and if you want to generate your own PDF for
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote:
Hi,
I was trying to use https://github.com/UplinkCoder/sqlite-d
Unfortunately even something as simple as this doesn´t compile
(at least on Windows):
import std.stdio, sqlited;
void main(string[] args) {
string filename =
Hi,
I was trying to use https://github.com/UplinkCoder/sqlite-d
Unfortunately even something as simple as this doesn´t compile
(at least on Windows):
import std.stdio, sqlited;
void main(string[] args) {
string filename = (args.length == 2 ? args[1] : "data.db");
Database db =
On Friday, 27 January 2017 at 10:20:19 UTC, albert-j wrote:
I am also wondering why the standard library doesn't have
convenience functions for this, e.g. like Java's removeAll? Now
there's more typing than necessary for a relatively common task.
That might be a good addition considering how
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
auto t1 = T1(a,b,new X(c1,c2,c3));
auto t2 = T2(e);
auto t3 = T3(f,g,c);
and then f(t1,t2,t3);
or other wise simply inline the above.
This also cuts down on constructor overloading.
This is sort of liked named parameters
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
Many times we pass compound types(non-primitives) as arguments
to functions.
e.g.,
void foo(T1 t1, T2 t2, T3, t3);
But to call foo with new variables we have to create the
arguments. This usually requires extra code to
And also stuff like https://github.com/dlang/druntime/pull/1740 -
I think the story behind `return scope` is the critical point for
me. It is worst technical disaster that has happened to compiler
in years, and I am going to blame Walter personally for it.
On Thursday, 26 January 2017 at 10:26:25 UTC, Chris wrote:
Er, yes. That's how it works. Always ask the publisher first.
But that wasn't the question. The question was Markdown or
LaTeX, and if you want to generate your own PDF for e.g. a M.A.
or Ph.D., some people prefer LaTeX because of the
Are there any dub package for compressing images uploaded through
web forms? Cropping/resizing may also come in handy.
I want one for a vibe.d project.
On Wednesday, 25 January 2017 at 10:57:41 UTC, Russel Winder
wrote:
Asciidoc (and it's continuation Asciidoctor) was invented to be
a human usable front end to the DocBook/XML toolchain – and it
still works for this. Humans should not have to write XML.
Hence Asciidoctor.
DocBook FTW, other
On Thursday, 26 January 2017 at 23:28:37 UTC, Walter Bright wrote:
On 1/26/2017 7:02 AM, aberba wrote:
I did this book:
https://www.amazon.com/Historians-History-World-Vol-Prolegomena-ebook/dp/B00REVL4BC/
Is it the same as this:
On Friday, 27 January 2017 at 09:47:48 UTC, Bauss wrote:
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
Many times we pass compound types(non-primitives) as arguments
to functions.
[...]
This is going to be a no from me. It's just another syntactic
sugar that doesn't
On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote:
TickDuration(28085)
TickDuration(42868)
TickDuration(1509)
Thank you, this is very helpful. I am also wondering why the
standard library doesn't have convenience functions for this,
e.g. like Java's removeAll? Now there's more typing
On Friday, 27 January 2017 at 09:47:48 UTC, Bauss wrote:
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
Many times we pass compound types(non-primitives) as arguments
to functions.
[...]
This is going to be a no from me. It's just another syntactic
sugar that doesn't
https://issues.dlang.org/show_bug.cgi?id=16147
Vladimir Panteleev changed:
What|Removed |Added
Status|RESOLVED|REOPENED
On Thursday, 26 January 2017 at 00:02:03 UTC, Profile Anaysis
wrote:
Many times we pass compound types(non-primitives) as arguments
to functions.
[...]
This is going to be a no from me. It's just another syntactic
sugar that doesn't really have a purpose, but more syntactic
confusion. We
https://issues.dlang.org/show_bug.cgi?id=16147
--- Comment #6 from anonymous4 ---
Is it supposed to look like this https://abload.de/img/tmp62xp4.png ?
--
On Friday, 27 January 2017 at 07:02:52 UTC, Jack Applegame wrote:
On Monday, 16 January 2017 at 14:47:23 UTC, Era Scarecrow wrote:
static char[1024*4] buffer; //4k reusable buffer, NOT
thread safe
Maybe I'm wrong, but I think it's thread safe. Because static
mutable non-shared variables
On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote:
My method is much better for large arrays I tested here.
Trough, considering the size of the arrays the performance
difference should be even greater, like 1000X better instead of
15X better so it's definitely not that great.
On Thursday, 26 January 2017 at 23:10:02 UTC, albert-j wrote:
Will it also work correctly and fast for arrays of custom
objects? How should opCmp() be defined if objects don't have a
meaningful ordering? The order of elements in the original
array does not matter.
Two options: either define
On Friday, 27 January 2017 at 05:48:27 UTC, Stefan Koch wrote:
To me it looks rather slow.
please benchmark!
void main()
{ import std.stdio, std.algorithm, std.range, std.array,
std.datetime;
int[] a = [1, 2, 3, 4, 5, 6, 7, 4].cycle.take(2000).array;
int[] b = [3, 4,
77 matches
Mail list logo