Twitter messages are pretty limited, so I think it could make sense to
implement a QR code based twitter like information-service. D could be
the tool of choice, But does this idea makes sense at all ? I Think so,
but would like to hear your opinion.
TIA
Bjoern
How do I call opDispatch(string name, E...)(E elements) ?
What I want to archive is to call f.i. fm.list with an arbitrary number
of arguments without using
fm.list(1, abc, 4L, 3.33);
Instead I would prefer
fm.list = (1, abc, 4L, 3.33);
Is this somehow possible ?
import std.variant;
import
On 03/25/2012 02:04 PM, James Miller wrote:
On 26 March 2012 09:45, blsbizp...@orange.fr wrote:
How do I call opDispatch(string name, E...)(E elements) ?
What I want to archive is to call f.i. fm.list with an arbitrary number of
arguments without using
fm.list(1, abc, 4L, 3.33);
Instead I
On 03/25/2012 02:59 PM, James Miller wrote:
Ok, so looking here:http://dlang.org/function.html, I have determined
that, if you are using Variant arrays (though I'm not sure if you can
do that using literals...) you can use the syntax from this example:
Thanks James..
will give it tomorrow a
Thanks Artur,
On 03/25/2012 03:18 PM, Artur Skawina wrote:
On 03/25/12 22:45, bls wrote:
How do I call opDispatch(string name, E...)(E elements) ?
What I want to archive is to call f.i. fm.list with an arbitrary number of
arguments without using
fm.list(1, abc, 4L, 3.33);
Instead I would
On 03/31/2012 10:05 AM, Andrej Mitrovic wrote:
This is related to wrapping wxWidgets.
One issue with the new wxWidgets 2.9.x series is that there seem to be
more multiply-inherited classes than before
As Jacob already said mixin templates and Interfaces are the way to go.
I think you have to
On 03/31/2012 10:05 AM, Andrej Mitrovic wrote:
One issue with the new wxWidgets 2.9.x series is that there seem to be
more multiply-inherited classes than before
A bit more complete snippet.
interface Foo
{
void doFoo();
}
// Foo implementation
mixin template FooMixin()
{
alias
On 08/12/2010 02:23, Simen kjaeraas wrote:
Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
Cool! But, when is ctod.exe coming out? :p
That should have been cpptod. ;)
As soon as you write it.
See d.announce SWIG for D :)
On 10/19/2011 06:22 AM, Jay Norwood wrote:
can someone propose the appropriate D features or libraries that would
support a native D implementation of the ropes structures described in this Sgi
C++ library.
http://www.sgi.com/tech/stl/Rope.html
From the library
std.range -Iteration
On 12/28/2011 03:45 PM, Tal wrote:
Can I do something like this :
__
extern (Windows) LRESULT delegate (HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam) MyWinProcDelegate;
this() {
MyWinProcDelegate =Events;
}
On 12/28/2011 03:45 PM, Tal wrote:
Can I do something like this :
__
extern (Windows) LRESULT delegate (HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam) MyWinProcDelegate;
this() {
MyWinProcDelegate =Events;
}
On 12/28/2011 03:45 PM, Tal wrote:
Can I do something like this :
__
extern (Windows) LRESULT delegate (HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam) MyWinProcDelegate;
this() {
MyWinProcDelegate =Events;
}
On 01/10/2012 06:53 AM, Jacob Carlborg wrote:
On 2012-01-10 14:48, simendsjo wrote:
On 10.01.2012 14:43, Mike Parker wrote:
On 1/10/2012 10:05 PM, simendsjo wrote:
If I want to have a method taking a callback function, I have to
specify
if it should take a function or delegate even if I don't
On 01/16/2012 09:07 AM, Andrej Mitrovic wrote:
Oh I thought that tutorial was about MFC/ATL, but it seems to use the
regular C API. I might look into this to add it to the DWinProgramming
project if it's worthwhile.
I think it is worth a closer look. Especially Bartosz Milewski
ActiveObject
On 01/29/2012 01:43 PM, Mars wrote:
Hello everybody.
Quick question, is there anything like C#'s partial classes in D?
Mars
As already said template mixins are close to partial classes.
A snippet. HTH
import std.stdio, std.cstream;
void main(string[] args)
{
auto bar = new Bar();
On 01/31/2012 12:41 PM, Trass3r wrote:
*whispers gee dee c*
windows binaries please...
Hi I want to do bulk queries on whois engines. Everthing works fine for
a single request. whois(suneido.com) for instance. The problem is that
the whois servers are disconnecting after 1 request. I know about a few
desktop whois apps which are able to do bulk queries..
Questions is what is the
John schrieb:
BCS Wrote:
Reply to John,
Hello!
I'm wanting to use D to send a PDF to a printer. Is there an easy way
to do this? Also, I may need to set which tray to go to and whether it
should duplex or not.
Could someone help me out?
THANKS!
You would do it the same way that it would
Hi,
I wonder if this is doable in D ?
class Cpp
{
public:
void* operator new(size_t n);
void* operator new(size_t n, void* p)
{ return p; }
}
Just guessing that operator new means this in D
class D
{
new(uint n);
new(uint
Tyro[a.c.edwards] wrote:
I've used Burton Radons' urllib in the past to get download files from the
internet, however the library has atrophied and can no longer be used with DMD v2.029
(not how long it's been this way because I haven't tried to compile it since 2006).
I'm wondering if
Sam Hu wrote:
I looked up in D2 in std.stdio,std.file,std.cstream and std.stream and try to find
a very simple method which can read from a file once a value other than once an
entire row.I just can not find it maybe this idea is wrong.Say how to simply read
write key/value pairs to and
BCS wrote:
http://stackoverflow.com/questions/1057219/memory-paging-with-d
I'm using D/Tango for catalog indexing, is there any library to aid with
memory (RAM) paging for a dictionary which is in memory and can go up to
10gb while performing indexing?
Why not using SQLite as memory db ?
Vladimir Voinkov wrote:
std.regex can't be used in compile time function call. It's quite frustrating...
see dsource.org .. afaik there is a compile time regex project. hth
Robert Fraser wrote:
BLS wrote:
Vladimir Voinkov wrote:
std.regex can't be used in compile time function call. It's quite
frustrating...
see dsource.org .. afaik there is a compile time regex project. hth
http://www.dsource.org/projects/scregexp
But the generated functions aren't CTFE
Sergey Gromov wrote:
Use case: I'm writing an ActiveX plug-in for a dynamic language. The
class Component : IUnknown
WOW!
But shouldn't you use
class Component : IDispatch
{
HRESULT QueryInterface( REFIID riid, LPVOID * ppvObj) {};
ULONG AddRef() {};
ULONG Release(){};
//
Sergey Gromov wrote:
Thu, 23 Jul 2009 12:37:42 +0200, BLS wrote:
Sorry, I'm not a guru at all, so ActiveX was a misnomer. What I'm
writing is a simple in-process server DLL which implements a couple of
interfaces.
Oh, that's sad. :(
well, especially in this case I would suggest to have
HI,
I would like to use some pbobos string based functions within an DLL.
Unfortunately all I can do is to pass char* parameters from the callee
side.
Now I want to use f.i. std.regex
export extern(windows) char* xxx()
//Heck were is Jarret when I need him most ?
D2,beside
Björn
On 05/11/2009 00:11, BLS wrote:
char* xxx()
better
char* xxx(char* a, char* b)
{
string A =
}
yep, mean it...
has somebody done it before...to me it seems to be not as trivial as it
looks on the very first view. (speed matters)
On 05/11/2009 01:04, Spacen Jasset wrote:
BLS wrote:
yep, mean it...
has somebody done it before...to me it seems to be not as trivial as
it looks on the very first view. (speed matters)
Did one in C once for an editor (of course). Does that count? I might be
able to find the code. It might
On 19/04/2010 20:16, Ellery Newcomer wrote:
Hello.
Say I have a [struct] template T, which takes a param S.
Any T!(S) satisfies a certain template constraint W, so I can use any
T!(S) the same way. I want to be able to store heterogeneous T!(S) in a
single list. Is there any good way to
Hi I have a forward reference pb in conjunction with @property.
Err msg is :
forward refrence to inferred return type of function call s1.servername.
any ideas ? beside, where are the @property docs ?
thanks, bjoern
final class LoadBalancer {
private static LoadBalancer lb;
On 28/06/2010 22:37, BLS wrote:
forward refrence to inferred return type of function call s1.servername.
any ideas ? beside, where are the @property docs ?
thanks, bjoern
ok moving the inner Server class (see prev. msg) in front of
LoadBalancer works.. seems to be a forward reference bug
On 28/06/2010 22:47, Steven Schveighoffer wrote:
houldn't this be
@property Server nextServer() {
Ouch, you are right.. Interesting enough that @property nextServer() {
return ...} compiles without giving any error message..
Anyway it seems to be a forward reference bug. moving the inner
On 28/06/2010 22:58, Steven Schveighoffer wrote:
I wasn't aware that @property implies auto. I guess that makes sense,
but I didn't consider it anything but a hint to the compiler about how
it could be called, not that did anything with the type.
Hm, this snippet does not compile :
class
On 28/06/2010 23:00, Steven Schveighoffer wrote:
http://www.digitalmars.com/d/2.0/function.html#property-functions
-Steve
Makes sense :) thanks
On 29/06/2010 00:07, Simen kjaeraas wrote:
Maybe it's because you haven't added string to the setter? Just grasping
at straws here.
--
Simen
Hi Simen, yes, thats the prob. I just have not found the @property
docs.. thanks for all the help..
This snippet works now as expected.. D properties
Just wonder how to translate this C# snippet into D..
//C#
public interface IBindingList {
bool AllowEdit {
get;
}
}
//D2
interface IBindingList {
@property bool allowEdit();
}
Is this correct ? I think in C# AllowEdit() takes tare that you don't
implement a
;
@property {
bool AllowEdit() { return _allowEdit; }
//bool AllowEdit(bool enable) { return _allowEdit = enable; }
}
}
bjoern
On 29/06/2010 12:11, BLS wrote:
Just wonder how to translate this C# snippet into D..
//C#
public interface IBindingList
On 29/06/2010 12:32, Jonathan M Davis wrote:
So, there certainly won't be any restriction on
having a getter or setter in a class if an interface it implements declared only
one. It's just that you'll only be able to use the one that's part of the
interface if you're using a reference of the
On 29/06/2010 14:08, Steven Schveighoffer wrote:
Besides, try to do this in C#:
@property int value() {return _x;}
@property int value(int x) { return _x = x;}
@property int value(string s) { return _x = to!int(s);}
:) D's properties are so much better...
-Steve
Ok, convinced ;)
Hi bearophile,
sorry for my ignorance, but what is the difference between @disable and
simply deleting the line ?
where can I read more about @disable ?
thanks, bjoern
Hi, in C# you can do some thing like this.
public interface IDataErrorInfo
{
// INDEXER
string this[string columnName] { get; }
}
}
how to translate this into D2 ?
thanks in advance, bjoern
On 29/06/2010 15:27, Steven Schveighoffer wrote:
string opIndex(string columnName);
yeah this is what I did, too..
However defined as ;
interface I1 {
string opIndex(string columnName);
}
is a no go. So can we say operator overloading within interfaces is not
allowed in D2 ?
thanks
On 29/06/2010 15:35, BLS wrote:
On 29/06/2010 15:27, Steven Schveighoffer wrote:
string opIndex(string columnName);
yeah this is what I did, too..
However defined as ;
interface I1 {
string opIndex(string columnName);
}
is a no go. So can we say operator overloading within interfaces
Hi
- probably Steve :)
I have problem in compiling a little programm using dcollection.LinkList.
(similar problem appears when I use dcollections.ArrayList)
D2.047
Linker error..
Error 1 Error 42: Symbol Undefined _D12dcollections8LinkList7__arrayZ
Error 2 Error 42: Symbol
On 29/06/2010 20:19, Steven Schveighoffer wrote:
Are you linking against dcollections? It looks like you are not...
No.
BTW, you can use dcollections' ticket tracking system for things like
this instead of sending to the newsgroup :)
Will do. Thanks Steve
bjoern
Hi,
in C# this is common.
private ListServer _servers;
_servers = new ListServer
{
new Server{ Name = ServerI, IP = 120.14.220.18 },
new Server{ Name = ServerII, IP = 120.14.220.19 },
new Server{ Name = ServerIII, IP = 120.14.220.20 },
new Server{
On 29/06/2010 22:12, Steven Schveighoffer wrote:
For now, can you do something like this?
sl = new ServerList;
sl.add([
new Server(ServerI, 120.14.220.18),
new Server(...)
...
]);
Hi Steve, I think this should work, however I got very strange err. msg.
in file ArrayList.d Have
On 29/06/2010 23:49, Steven Schveighoffer wrote:
One thing to note, ArrayList *does* accept an array as a constructor,
and it will actually use that array as its storage. This is so you can
wrap an array as a ArrayList and get the full dcollections
functionality from it.
Hi Steve
This is why
Hi,
IMHO ArrayList has a bug. Just declaring ArrayList!B bl, raises an
error. But maybe I am wrong.. Nevertheless I 've filed a ticket. In case
that I switch from class to struct also std.algorithm is involved.
class AListTest {
alias ArrayList!B BList;
BList bl;
Hi, I have a problem with a mixin template. More exact with an
Arraylist!T within a mixin template.
Given.
void main() {
auto p = new Person(Hans, 32);
p ~= new Person(Steve, 40);
p ~= new Person(Bjoern, 101);
}
class Person {
private string _name;
On 01/07/2010 22:59, Steven Schveighoffer wrote:
On Thu, 01 Jul 2010 15:36:53 -0400, BLS windev...@hotmail.de wrote:
Hi, I have a problem with a mixin template. More exact with an
Arraylist!T within a mixin template.
Given.
void main() {
auto p = new Person(Hans, 32);
p ~= new Person(Steve, 40
On 02/07/2010 00:26, bearophile wrote:
Steven Schveighoffer:
I think a member initializer has to be a constant expression, like int i =
1. Anything else has to be done in the constructor.
There are the static constructors too, for modules, structs, classes.
Bye,
bearophile
Hi bearophile,
Hi, for reasons I don't completely understand I would like to implement
a BIP Buffer in D2. ;) well async IO is the use case .. I think.
How can I allocate/free buffer-space from virtual memory ?
What I am looking for is a way to do platform independent allocating of
memory from the virtual
On 02/07/2010 20:11, BLS wrote:
Hi, for reasons I don't completely understand I would like to implement
a BIP Buffer in D2. ;) well async IO is the use case .. I think.
How can I allocate/free buffer-space from virtual memory ?
What I am looking for is a way to do platform independent
Hi,
Andrei brings in the idea of std.pattern. Seems that this module is
stalled; Unfortunately !
However I would like to enhance collection classes (likewise
dcollections) with a Publisher - Subscriber pattern (signal - slot, or
observer pattern) , if you prefer)
Hope the idea of enhancing
Okay a bit better snippet than before. snippet should be almost
functional..
/*
Hi,
Andrei brings in the idea of std.pattern. Seems that this module is
stalled; Unfortunately !
However I would like to enhance collection classes (likewise
dcollections) with a Publisher - Subscriber pattern
Hi Dimitry, thanks for the feedback!
Please have a look at the new snippet (just posted)
msg is a ref parameter cause it is filled in our example from Stack. The
Publisher mixin HOST.
In other words. Where ever you mixin the Publisher template a message
will be broad casted to all
@ Dmitry
Thanks for all the feedback Dmitry. Seems that we have similar projects
in mind :) (maybe we can talk about the GUI project.. mine is similar to
win32++ at http://sourceforge.net/projects/win32-framework/)
On 12/07/2010 10:35, Justin Spahr-Summers wrote:
On Mon, 12 Jul 2010 00:03:53 +0200, BLSwindev...@hotmail.de wrote:
On 11/07/2010 21:29, Philippe Sigaud wrote:
I tried this because I was reading an article on Scala's actors, where
they talk about millions of actors. I guess they are quite
On 12/07/2010 14:18, Lars T. Kyllingstad wrote:
I'm pretty sure they will be soon, perhaps even in the next release:
http://www.dsource.org/projects/druntime/changeset/321
-Lars
Thanks Lars.. Good news ! Hope the auto x = whatever(); // thing for
ddoc is also solved than..
On 05/09/2010 02:16, Jonathan M Davis wrote:
void foo(T)(T[] collection, T elem)
{
// Blah, whatever
}
I am curious, how this will look and feel once inout is working ?
inout void foo(T)(inout(T)[] collection, inout T elem)
{
// Blah, whatever}
}
// ..snip
point3D p; // Da
p.x = 10;
p.y = 20;
p.z = 100;
point3D = = new point3D(10,20,30) // Njet
//etc
}
struct point {
int x;
int y;
}
struct point3D {
point p;
alias p this;
int z;
// NOPE :(
/*static point3D opcall(int _x, int _y, int
On 06/09/2010 22:36, BLS wrote:
point3D = = new point3D(10,20,30) // Njet
//etc
should be
point3D p3 = new point3D(10,20,30) // Njet
sorry
On 13/09/2010 20:58, Jesse Phillips wrote:
There is a question on using COM with D and how it simplifies using COM[1]. I
haven't done it myself and don't have any examples.
http://stackoverflow.com/questions/3698910/d-support-for-com
http://www.dsource.org/projects/juno/wiki
Juno contains a
66 matches
Mail list logo