On Thursday, 30 October 2014 at 17:39:14 UTC, Laeeth Isharc wrote:
Thanks for the warning. I will have a low number of users, and
whilst on occasion working data sets might be large, they won't
stick around for very long so pre-allocating buffers should
work fine (I hope).
Dart+DartVM+D/C/C+
On Friday, 31 October 2014 at 02:01:00 UTC, Paul O'Neil wrote:
I'm trying to bind to some C++ code, but when I compile the D
side,
there are errors. Here's my reduced test case:
// C++
namespace ns {
void func1();
void func2();
}
// D
module cpp;
extern(C++, ns) void func1();
extern(C++,
On Wednesday, 29 October 2014 at 11:49:59 UTC, John Colvin wrote:
On Wednesday, 29 October 2014 at 10:01:18 UTC, Gareth Foster
wrote:
Hi there,
I'm looking to write a function template that operates only on
value types. Basically I'm looking for an equivalent of
where T: struct
from C# (ht
On Friday, 31 October 2014 at 02:04:00 UTC, Domingo wrote:
I spent two days to find a nasty aleatory problem due to a
string been assigned a range from a char[] array.
This issue on vibe.d detail it a bit more:
https://github.com/rejectedsoftware/vibe.d/issues/889
I'm putting it here to call
On Fri, Oct 31, 2014 at 02:03:58AM +, Domingo via Digitalmars-d-learn wrote:
> I spent two days to find a nasty aleatory problem due to a string been
> assigned a range from a char[] array.
>
> This issue on vibe.d detail it a bit more:
> https://github.com/rejectedsoftware/vibe.d/issues/889
>
I'm trying to bind to some C++ code, but when I compile the D side,
there are errors. Here's my reduced test case:
// C++
namespace ns {
void func1();
void func2();
}
// D
module cpp;
extern(C++, ns) void func1();
extern(C++, ns) void func2()
dmd says:cpp_test.d(4): Error: namespace cpp.ns
I spent two days to find a nasty aleatory problem due to a string
been assigned a range from a char[] array.
This issue on vibe.d detail it a bit more:
https://github.com/rejectedsoftware/vibe.d/issues/889
I'm putting it here to call attention for other developers for
this problem.
Cheers
On Fri, Oct 31, 2014 at 12:17:00AM +, Samuel Pike via Digitalmars-d-learn
wrote:
> Hi all.
>
> First time posting here. I recently downloaded the dmd compiler and
> started making a few exercises with the language. Nice language
> features but still somewhat confused with the library.
>
> If
On Friday, 31 October 2014 at 00:17:02 UTC, Samuel Pike wrote:
Hi all.
First time posting here. I recently downloaded the dmd compiler
and started making a few exercises with the language. Nice
language features but still somewhat confused with the library.
If I use byDchar() over a "string"
On 31/10/2014 6:39 a.m., Laeeth Isharc wrote:
Hi.
Thanks for all the thoughts, and sorry it has taken me a little while to
reply.
Adam - I liked your book very much: it really complemented the other
resources out there, especially in communicating a refreshing spirit of
enthusiasm and fearless
Hi all.
First time posting here. I recently downloaded the dmd compiler
and started making a few exercises with the language. Nice
language features but still somewhat confused with the library.
If I use byDchar() over a "string" is there a possibility to get
part of a character or is guaran
On Thu, 30 Oct 2014 22:18:22 +
Laeeth Isharc via Digitalmars-d-learn
wrote:
> Ah - makes sense. It is satisfyingly fast...
the only bad thing is that it trashes /tmp/.rdmd-$UID dir. i wrote
another simple script that is clearing that dir (but doesn't touch
'locked' dirs, as they are obviousl
Ah - makes sense. It is satisfyingly fast...
On Thursday, 30 October 2014 at 21:33:59 UTC, ketmar via
Digitalmars-d-learn wrote:
On Thu, 30 Oct 2014 17:39:13 +
Laeeth Isharc via Digitalmars-d-learn
wrote:
BTW what was the story behind dscript? It seems to have
changed its name and no l
On Thu, 30 Oct 2014 17:39:13 +
Laeeth Isharc via Digitalmars-d-learn
wrote:
> BTW what was the story behind dscript? It seems to have changed
> its name and no longer have so much connection to D:
> http://forum.dlang.org/thread/422be824.6030...@nospam.org
we have rdmd now, which can be use
The code below works fine if you remove the extern(C). But I
get the error "functionpointertest.d(6): Error: basic type
expected, not extern" with the code as it is.
How do I use alias with extern ?
[...]
alias Callback= extern(C) void function(int);
Compiles as is with dmd 2.066. For 2.0
On Thursday, 30 October 2014 at 18:43:21 UTC, Laeeth Isharc wrote:
The code below works fine if you remove the extern(C). But I
get the error "functionpointertest.d(6): Error: basic type
expected, not extern" with the code as it is.
How do I use alias with extern ?
[...]
alias Callback= ex
Hi.
I am trying to translate the following from the Dart header:
typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate
dest_isolate);
So I made a little simple test to understand callbacks in D. The
code below works fine if you remove the extern(C). But I get the
error "functionpointerte
Hi.
Thanks for all the thoughts, and sorry it has taken me a little
while to reply.
Adam - I liked your book very much: it really complemented the
other resources out there, especially in communicating a
refreshing spirit of enthusiasm and fearless exploration.
ketmar - I took a look at sc
On Wed, Aug 13, 2014 at 07:53:34AM -0700, H. S. Teoh via Digitalmars-d-learn
wrote:
> On Wed, Aug 13, 2014 at 03:03:14PM +0200, simendsjo via Digitalmars-d-learn
> wrote:
> > On 08/13/2014 02:50 PM, Dicebot wrote:
> > > On Wednesday, 13 August 2014 at 12:26:02 UTC, simendsjo wrote:
> > >> This is
Thank you very much for your additions.
I am still new to D so I am glad to see solutions from
experienced D programmers.
On 10/30/14 11:06 AM, bearophile wrote:
Steven Schveighoffer:
long a = src.countUntil(start);
if (a < 0)
return src; // null
a += start.length;
long b = src[a..$].countUntil(end);
I think there it's better to use "auto" instead of "long".
Sure, I didn't touch OP's function body,
On Thursday, 30 October 2014 at 14:03:23 UTC, Wyatt wrote:
At work, I have to target SPARC/Solaris. I'm writing code to
interface with an internal network protocol, so my current
choices are C and (old) C++ (remember Sun Studio? I wish I
didn't have to). Having looked, it seems like there's
Steven Schveighoffer:
long a = src.countUntil(start);
if (a < 0)
return src; // null
a += start.length;
long b = src[a..$].countUntil(end);
I think there it's better to use "auto" instead of "long".
Bye,
bearophile
On 10/29/14 3:50 PM, advibm wrote:
Hello,
I would like to create a D function that returns a slice of a string.
This slice shall be a reference to a part of the string argument.
Is this generally possible in D?
This is the function:
auto ref betweenTwoStrings(T)(inout T src, string start, strin
DMD is for x86 AFAIK.
On Thursday, 30 October 2014 at 06:14:18 UTC, Suliman wrote:
Is it's possible to create single language that cover desktop
and web? Like D+Dart?
You can also run D code on the web server and do very little on
the web client itself for a lot of programs.
On Thursday, 30 October 2014 at 10:18:40 UTC, Suliman wrote:
No! I mean not translation to js. I mean theoretical ability of
creation new programming language that can work every where!
The problem is getting new features into the browsers that people
use.
You could also just write native pr
At work, I have to target SPARC/Solaris. I'm writing code to
interface with an internal network protocol, so my current
choices are C and (old) C++ (remember Sun Studio? I wish I
didn't have to). Having looked, it seems like there's some
manner of support for SPARC in the runtime, but restri
On Thursday, 30 October 2014 at 10:18:40 UTC, Suliman wrote:
No! I mean not translation to js. I mean theoretical ability of
creation new programming language that can work every where!
Yes, you can create a new programming language that can work
everywhere if you restrict the semantics to the
On Thursday, 30 October 2014 at 10:28:06 UTC, Kagamin wrote:
On Thursday, 30 October 2014 at 10:18:40 UTC, Suliman wrote:
No! I mean not translation to js. I mean theoretical ability
of creation new programming language that can work every where!
It's already created - C++! http://www.chromium
On Thursday, 30 October 2014 at 10:18:40 UTC, Suliman wrote:
No! I mean not translation to js. I mean theoretical ability of
creation new programming language that can work every where!
It's already created - C++! http://www.chromium.org/nativeclient
No! I mean not translation to js. I mean theoretical ability of
creation new programming language that can work every where!
On Thursday, 30 October 2014 at 09:35:04 UTC, Suliman wrote:
It is possible, but you need to design the language within the
constraints of javascript:
1. single threaded (or worker threads)
Javascript is single threaded by nature. Parallel execution is
done in isolation. No shared memory.
It is possible, but you need to design the language within the
constraints of javascript:
1. single threaded (or worker threads)
2. 53 bits integers, 26 bits for multiplies.
4. "weird" fixed size heaps (ArrayView)
5. if garbage collection then it has to be javascript style
6. no tricks: forg
On Thursday, 30 October 2014 at 08:39:15 UTC, Suliman wrote:
I know that there is way to write all on JS. But I can't
understand what the reason that there are no single language
that can work on web and as native language.
It is possible, but you need to design the language within the
constr
On Thursday, 30 October 2014 at 08:54:03 UTC, Joakim wrote:
As far as I know, ldc's support for iOS is still in the early
stages but they should be binary compatible, particularly if
you compile ldc against the same llvm backend, and a C wrapper
is likely still necessary, as I don't think Dan O
On Wednesday, 29 October 2014 at 04:45:00 UTC, JJDuck wrote:
I'm trying to compile my D code using LDC and hopefully used by
my iOS program in Xcode.
So I did some research
(correct me if I'm wrong)
If I compile my D code using LDC into static file and used by
my iOS app and since they have th
I know that there is way to write all on JS. But I can't
understand what the reason that there are no single language that
can work on web and as native language.
On Thursday, 30 October 2014 at 06:57:23 UTC, Ola Fosheim Grøstad
wrote:
There are also scripting frameworks that let you write portable
code for web and mobile platforms, but they tend to be geared
towards a special type of application.
E.g.
http://www.tidesdk.org/
http://cordova.apache.org/
On Thursday, 30 October 2014 at 06:14:18 UTC, Suliman wrote:
Is it's possible to create single language that cover desktop
and web? Like D+Dart?
It is probably not possible with D or any other language that is
too far off from Javascript since the generated code becomes to
large for fast down
40 matches
Mail list logo