I found another approach. It avoids the GC and the Heap: A
Circular Buffer:
http://dpaste.dzfl.pl/cf1e7afb
That should work.
18-Nov-2013 11:37, Jonathan M Davis пишет:
On Monday, November 18, 2013 08:22:37 qznc wrote:
On Sunday, 17 November 2013 at 21:00:16 UTC, Jonathan M Davis
wrote:
will definitely result in multiple calls to pure_func. It's not
that it's
impossible for the compiler to do it - it's perfectly
On Monday, 18 November 2013 at 08:32:11 UTC, Namespace wrote:
I found another approach. It avoids the GC and the Heap: A
Circular Buffer:
http://dpaste.dzfl.pl/cf1e7afb
That should work.
It is unsafe, but might work in your specific case.
The problem is that future changes might exhibit
On Monday, 18 November 2013 at 07:37:27 UTC, Jonathan M Davis
wrote:
This is middleend optimization stuff, though.
I'm not quite sure what you mean by this. There is no
middle-end. We have the
front-end, which is shared by dmd, gdc, and ldc, and then each
compiler has
its own backend.
On Sunday, 17 November 2013 at 20:56:47 UTC, John J wrote:
Can you please add the D language to the
http://learnxinyminutes.com/
That's an interesting way of quickly introducing a language
through a long and well commented code example.
Writing this is probably a good learning experience
On Sunday, 17 November 2013 at 18:40:34 UTC, Jacek Furmankiewicz
wrote:
It is possible to import an entire folder and subfolders of
assets? (e.g. static HTML with all of its pieces, i.e. CSS,
JSS. etc)
Theoretically possible but not really expected to and generally
does not give you much
Is JSONSerialization somehow related to the upcoming
std.serialization?
I feel that there is a big need for standardizing serialization
in D. There are too many alternatives: dproto, msgpack, JSON,
xml, etc should be made backends to the same frontend named
std.serialization right?
/Per
On
On 2013-11-18 12:25, Per Nordlöw per.nord...@gmail.com wrote:
Is JSONSerialization somehow related to the upcoming std.serialization?
No.
I feel that there is a big need for standardizing serialization in D.
There are too many alternatives: dproto, msgpack, JSON, xml, etc should
be made
On Sunday, 17 November 2013 at 20:56:47 UTC, John J wrote:
Can you please add the D language to the
http://learnxinyminutes.com/
That's an interesting way of quickly introducing a language
through a long and well commented code example.
There are several other languages on that site already
Hi, I am experiencing the same issue as here:
http://forum.dlang.org/thread/bug-1011...@http.d.puremagic.com/issues/
I have the DMD 2.061 for Linux 64 bit
In this thread. their is a mention of one -g switch. I am sorry
but can'T figure out how to implement the said -g switch.
Please help.
Ok. That is great.
Thx.
On Monday, 18 November 2013 at 12:26:19 UTC, Jacob Carlborg wrote:
On 2013-11-18 12:25, Per Nordlöw per.nord...@gmail.com
wrote:
Is JSONSerialization somehow related to the upcoming
std.serialization?
No.
I feel that there is a big need for standardizing
On 2013-11-18 13:48, seany wrote:
Hi, I am experiencing the same issue as here:
http://forum.dlang.org/thread/bug-1011...@http.d.puremagic.com/issues/
I have the DMD 2.061 for Linux 64 bit
In this thread. their is a mention of one -g switch. I am sorry but
can'T figure out how to implement the
On Monday, 18 November 2013 at 13:29:38 UTC, Jacob Carlborg wrote:
Just pass -g on the command line, example:
dmd main.d -g
Uh, that does not work, (same error message) but a
switch(cast(string)(enum_var))
seem to work
On 11/18/13, Per Nordlöw\ per.nord...@gmail.com@puremagic.com
Per Nordlöw\ per.nord...@gmail.com@puremagic.com wrote:
Is JSONSerialization somehow related to the upcoming
std.serialization?
I feel that there is a big need for standardizing serialization
in D. There are too many alternatives:
On Monday, 18 November 2013 at 10:09:12 UTC, qznc wrote:
On Monday, 18 November 2013 at 08:32:11 UTC, Namespace wrote:
I found another approach. It avoids the GC and the Heap: A
Circular Buffer:
http://dpaste.dzfl.pl/cf1e7afb
That should work.
It is unsafe, but might work in your specific
I would suspect that the biggest reason is the limitations that
that
imposes on the underlying serialization implementation, as it
would
require that the underlying format support a minimum set of
types.
I'm not sure that's actually true. I've been working on my own
serialisation library in
This shows a difference between the deprecated built-in complex
numbers and std.complex:
void main() {
import std.complex: complex;
const cdouble cd;
pragma(msg, typeof(cd.re));
const acc = complex(1, 2);
pragma(msg, typeof(acc.re));
}
It prints:
double
const(double)
Is
The reason I like Thrift is that it is backwards and forwards
compatible.
Assuming in your schema you keep defining new fields as
optional,
old clients can read data from new producers as well
as new clients can read data from old producers.
Not too many binary serialization formats offer
On 11/18/13, Atila Neves atila.ne...@gmail.com wrote:
I would suspect that the biggest reason is the limitations that
that
imposes on the underlying serialization implementation, as it
would
require that the underlying format support a minimum set of
types.
I'm not sure that's actually
On Monday, 18 November 2013 at 14:15:02 UTC, Namespace wrote:
On Monday, 18 November 2013 at 10:09:12 UTC, qznc wrote:
On Monday, 18 November 2013 at 08:32:11 UTC, Namespace wrote:
I found another approach. It avoids the GC and the Heap: A
Circular Buffer:
http://dpaste.dzfl.pl/cf1e7afb
That
On 2013-11-18 16:11, Atila Neves wrote:
I'm not sure that's actually true. I've been working on my own
serialisation library in D that I plan to unleash on the announce forum
soon and it does it in a manner described by the original poster. Even
with custom serialisations, client code need only
On Monday, 18 November 2013 at 15:26:28 UTC, Jacob Carlborg wrote:
On 2013-11-18 16:11, Atila Neves wrote:
I'm not sure that's actually true. I've been working on my own
serialisation library in D that I plan to unleash on the
announce forum
soon and it does it in a manner described by the
On 2013-11-18 16:33, seany wrote:
Is there a built in function in D to check if an element is a member of
a (possibly multidimensional array?
say function(array, element). that returns to, if the element is in the
array, (or even better, if the elements of the array are arrays
themselves, then
Is there a built in function in D to check if an element is a
member of a (possibly multidimensional array?
say function(array, element). that returns to, if the element is
in the array, (or even better, if the elements of the array are
arrays themselves, then recursively checks if element is
I am curious as to how exactly that would work, does it
determine the
output format at compile-time or runtime? Does it specify the
way it's
serialized, or it's serialized representation? I'd also be
curious
about the performance impact it brings, if any. Depending on
it's
exact function it's
On Monday, 18 November 2013 at 15:27:46 UTC, Maxim Fomin wrote:
On Monday, 18 November 2013 at 14:15:02 UTC, Namespace wrote:
On Monday, 18 November 2013 at 10:09:12 UTC, qznc wrote:
On Monday, 18 November 2013 at 08:32:11 UTC, Namespace wrote:
I found another approach. It avoids the GC and
On Monday, 18 November 2013 at 15:33:22 UTC, seany wrote:
Is there a built in function in D to check if an element is a
member of a (possibly multidimensional array?
say function(array, element). that returns to, if the element
is in the array, (or even better, if the elements of the array
struct Blah {
int val;
Blah* next;
}
Blah x, y;
Blah* p;
p = x;
p.next = y; //don't need (*p).next --- very nice
Can someone point me to where this feature of D is documented
please.
On 11/18/2013 08:18 AM, Carl Sturtivant wrote:
struct Blah {
int val;
Blah* next;
}
Blah x, y;
Blah* p;
p = x;
p.next = y; //don't need (*p).next --- very nice
Can someone point me to where this feature of D is documented please.
Other than being well known, I don't know where it is
On Monday, 18 November 2013 at 16:03:33 UTC, Namespace wrote:
On Monday, 18 November 2013 at 15:27:46 UTC, Maxim Fomin wrote:
I think there is bigger problem (and bigger memory error)
here. When you inside struct method load pointer to some field
you cannot rely that after leaving the
http://forum.dlang.org/thread/sctofkitoaxftosxt...@forum.dlang.org#post-sctofkitoaxftosxtspw:40forum.dlang.org
On Monday, 18 November 2013 at 15:32:30 UTC, Atila Neves wrote:
I am curious as to how exactly that would work, does it
determine the
output format at compile-time or runtime? Does it
On Saturday, 16 November 2013 at 16:34:31 UTC, Ali Çehreli wrote:
The problem with your example is that unlike main.c in my
example, what you pass is an rvalue, which may not be bound to
the ref parameter.
Thanks, this is what I needed!
On Sunday, 17 November 2013 at 10:56:16 UTC, Jonathan M Davis
wrote:
I think that the typical approach at this point is to just drop
purity for the
moment, but if you want you really want it, you are indeed
going to have to
implement it yourself. But we'll get there with Phobos
eventually.
Is it possible to do something like:
TestInterface testi = new classReferenceList[integer];
On 11/18/2013 10:28 AM, Jeroen Bollen wrote:
Is it possible to do something like:
TestInterface testi = new classReferenceList[integer];
We still don't know what the use case is :) but it is possible to store
types in a TypeTuple:
import std.stdio;
import std.typetuple;
interface I
{}
On Monday, 18 November 2013 at 19:32:39 UTC, Jeroen Bollen wrote:
How do I call a parent class's overidden method?
super.method
so
abstract class SuperClass {
public pure void methodA() {
}
}
class SubClass : SuperClass {
public override pure void methodA() {
// calls
How do I call a parent class's overidden method?
module test;
abstract class SuperClass {
public pure void methodA() {
}
}
class SubClass {
public override pure void methodB() {
// How do I call the parent methodA() from here?
}
}
On Monday, 18 November 2013 at 19:34:56 UTC, Adam D. Ruppe wrote:
On Monday, 18 November 2013 at 19:32:39 UTC, Jeroen Bollen
wrote:
How do I call a parent class's overidden method?
super.method
so
abstract class SuperClass {
public pure void methodA() {
}
}
class SubClass :
perhaps I sohould have myself played around, but I would love to
ask this :
I want to make a function, that takes ay array (whose elements
can be int, string, struct, etc) and a variable of the same type,
of which the array in an array.
Like function(int[] arr, int var)
or function(string[]
On Monday, November 18, 2013 19:16:11 Daniel Davidson wrote:
On Sunday, 17 November 2013 at 10:56:16 UTC, Jonathan M Davis
wrote:
I think that the typical approach at this point is to just drop
purity for the
moment, but if you want you really want it, you are indeed
going to have to
On Monday, 18 November 2013 at 19:36:07 UTC, Jeroen Bollen wrote:
Why aren't these things in the documentation? :/
blargh, i thought it was, but can't find it either
On Monday, 18 November 2013 at 19:47:47 UTC, seany wrote:
A natural choice is fuction(T)(T[] array, T var)
but i dont find much info on this type on construction, is
there any material introducing me to this type of construction?
Ali's book has a good introduction to templates:
I read that book, but dont find this constructtion, that is why
the question.
On Monday, 18 November 2013 at 20:20:38 UTC, seany wrote:
I read that book, but dont find this constructtion, that is why
the question.
Seany, you are on the right track for the function declaration, I
think the following code does what you are looking for:
import std.stdio;
void main() {
On Monday, 18 November 2013 at 20:42:36 UTC, Jon wrote:
On Monday, 18 November 2013 at 20:20:38 UTC, seany wrote:
I read that book, but dont find this constructtion, that is
why the question.
Seany, you are on the right track for the function declaration,
I think the following code does what
On Monday, 18 November 2013 at 20:32:25 UTC, Philippe Sigaud
wrote:
On Mon, Nov 18, 2013 at 9:20 PM, seany se...@uni-bonn.de
wrote:
I read that book, but dont find this constructtion, that is
why the
question.
IIRC I talk a bit about function templates in my tutorial. JR
gave the
link
On Monday, 18 November 2013 at 20:45:54 UTC, seany wrote:
On Monday, 18 November 2013 at 20:42:36 UTC, Jon wrote:
On Monday, 18 November 2013 at 20:20:38 UTC, seany wrote:
I read that book, but dont find this constructtion, that is
why the question.
Seany, you are on the right track for the
On 11/18/2013 12:20 PM, seany wrote:
I read that book, but dont find this constructtion, that is why the
question.
I will make such an addition. Thanks.
Ali
Hello all,
I'm new here ( first post ), and looking to get into D
Development. I currently use Python as my language of choice, but
am looking to transition. My first question of the D language is,
is there a SOAP module that I can consume web services with?
On Thursday, 14 November 2013 at 12:01:04 UTC, Ali Çehreli wrote:
On 11/13/2013 04:32 PM, bioinfornatics wrote:
Hi,
I try to understand which type char, dchar, wchar will give
ubyte,ushort,uint…
And for templates, there is std.range.ElementEncodingType:
import std.stdio;
import std.range;
On 11/18/2013 07:48 PM, bioinfornatics wrote:
On Thursday, 14 November 2013 at 12:01:04 UTC, Ali Çehreli wrote:
On 11/13/2013 04:32 PM, bioinfornatics wrote:
Hi,
I try to understand which type char, dchar, wchar will give
ubyte,ushort,uint…
And for templates, there is
On Monday, 18 November 2013 at 19:36:07 UTC, Jeroen Bollen wrote:
On Monday, 18 November 2013 at 19:34:56 UTC, Adam D. Ruppe
wrote:
To do it from outside the class, you write the class name:
void main() {
auto obj = new SubClass();
obj.SuperClass.methodA(); // calls the specific
52 matches
Mail list logo