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 N
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
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 thi
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 ev
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:
https://github.com/acehreli/alibum/
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 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 wi
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 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 ser
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 w
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 ot
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 stan
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 a
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: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 was
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 fr
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 sq
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 = (args.len
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 = Database(f
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 w
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 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 t
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 o
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, 6].cycle.take(2
29 matches
Mail list logo