On Friday, 26 May 2017 at 12:49:27 UTC, Oleksii wrote:
Hi,
Call methods and property C++ from D. Interface C++ and D and
their interaction.
https://pp.userapi.com/c636630/v636630885/4657a/07wCn5hbHHo.jpg
https://www.youtube.com/watch?v=HTgJaRRfLPk
On Friday, 26 May 2017 at 15:17:08 UTC, drug wrote:
Trying to bind to cpp code I stop at some moment having
undefined reference to some cpp function. But objdump -Ct
cpplibrary.so shows me that this cpp function exists in the
library. linker message about cpp function is _identical_ to
On Friday, 26 May 2017 at 15:17:08 UTC, drug wrote:
Trying to bind to cpp code I stop at some moment having
undefined reference to some cpp function. But objdump -Ct
cpplibrary.so shows me that this cpp function exists in the
library. linker message about cpp function is _identical_ to
On Fri, May 26, 2017 at 06:06:42PM +, Mike B Johnson via
Digitalmars-d-learn wrote:
> On Friday, 26 May 2017 at 14:05:34 UTC, ag0aep6g wrote:
> > On 05/26/2017 10:15 AM, realhet wrote:
> > > But hey, the GC knows that is should not search for any pointers
> > > in those large blocks. And the
On Friday, 26 May 2017 at 18:06:42 UTC, Mike B Johnson wrote:
On Friday, 26 May 2017 at 14:05:34 UTC, ag0aep6g wrote:
On 05/26/2017 10:15 AM, realhet wrote:
But hey, the GC knows that is should not search for any
pointers in those large blocks.
And the buffer is full of 0-s at the start, so
On Friday, 26 May 2017 at 14:05:34 UTC, ag0aep6g wrote:
On 05/26/2017 10:15 AM, realhet wrote:
But hey, the GC knows that is should not search for any
pointers in those large blocks.
And the buffer is full of 0-s at the start, so there can't be
any 'false pointers' in it. And I think the GC
On Friday, 26 May 2017 at 15:49:06 UTC, Ali Çehreli wrote:
For example, Stroustrup has the article "Learning Standard C++
as a New Language"[1]. It compares sorting performance of C to
C++ in section 3, "Efficiency". With those old C and C++
compilers he used (in May 1999), C++ was 1.74 to
On 05/26/2017 05:10 AM, Patrick Schluter wrote:
> in C, where sorting is done via the qsort() function. The comparison
> function must be provided by a function pointer. This means that the
> qsort function must call a function for doing even the simplest
> comparison.
For example, Stroustrup
Trying to bind to cpp code I stop at some moment having undefined
reference to some cpp function. But objdump -Ct cpplibrary.so shows me
that this cpp function exists in the library. linker message about cpp
function is _identical_ to objdump message so I don't know where is the
difference.
On Friday, 26 May 2017 at 11:05:37 UTC, Gary Willoughby wrote:
The exclamation mark here is not a binary operator, it's used
in D templates to define where compile-time parameters are.
It actually is a binary operator, its left-hand-side is a
template and its right-hand-side is a template
On 05/26/2017 10:15 AM, realhet wrote:
But hey, the GC knows that is should not search for any pointers in
those large blocks.
And the buffer is full of 0-s at the start, so there can't be any 'false
pointers' in it. And I think the GC will not search in it either.
The issue is not that the
On Friday, 26 May 2017 at 12:51:20 UTC, Stanislav Blinov wrote:
On Friday, 26 May 2017 at 12:49:27 UTC, Oleksii wrote:
Hi,
I'm trying to link against a DLL which exports a bunch of C
functions. The issue is: C symbols do not have underscore
prefix in Windows, but DMD sticks underscore in
On Friday, 26 May 2017 at 12:49:27 UTC, Oleksii wrote:
Hi,
I'm trying to link against a DLL which exports a bunch of C
functions. The issue is: C symbols do not have underscore
prefix in Windows, but DMD sticks underscore in front of the
symbol name. For example: `extern(C) void Foo()`
Hi,
I'm trying to link against a DLL which exports a bunch of C
functions. The issue is: C symbols do not have underscore prefix
in Windows, but DMD sticks underscore in front of the symbol
name. For example: `extern(C) void Foo()` becomes `_Foo`.
Is there a way to disable that underscore?
On Saturday, 1 October 2016 at 15:00:29 UTC, pineapple wrote:
Though I don't currently have any need for this feature I'd
imagine that if I did I'd want the time in UTC, not locally
You may invoke the compiler with TZ= prepended. (Linux)
On Friday, 26 May 2017 at 09:59:26 UTC, zakk wrote:
Hello everyone,
I just started using D and I am a bit puzzled by the syntax of
the sort function is std.algorithm.sorting, which is
sort!(comparingFunction)(list)
where comparingFunction is often a lambda expression. For
instance in the
On Friday, 26 May 2017 at 11:27:19 UTC, zakk wrote:
I have a followup question: my background is C and in Wolfram
Mathematica, so my knowledge of templates is limited to trivial
examples in C++, like:
template
const T& min(const T& lhs, const T& rhs)
{
return lhs < rhs ? lhs : rhs;
}
On Friday, 26 May 2017 at 11:27:19 UTC, zakk wrote:
I have a followup question: my background is C and in Wolfram
Mathematica, so my
knowledge of templates is limited to trivial examples in C++...
It seems to me that
when programming in D templates are something more powerful
Even in C++
On Friday, 26 May 2017 at 11:18:44 UTC, Stanislav Blinov wrote:
On Friday, 26 May 2017 at 09:59:26 UTC, zakk wrote:
Hello everyone,
I just started using D and I am a bit puzzled by the syntax of
the sort function is std.algorithm.sorting, which is
sort!(comparingFunction)(list)
where
On Friday, 26 May 2017 at 09:59:26 UTC, zakk wrote:
My questions are:
1) Why is D making using of the binary ! operator, which as far
as I understand introduces a template?
The ! operator *instantiates* a template. Whenever you need to
specify compile-time arguments to match the template
On Friday, 26 May 2017 at 09:59:26 UTC, zakk wrote:
Hello everyone,
I just started using D and I am a bit puzzled by the syntax of
the sort function is std.algorithm.sorting, which is
sort!(comparingFunction)(list)
where comparingFunction is often a lambda expression. For
instance in the
On Friday, 26 May 2017 at 09:59:26 UTC, zakk wrote:
1) Why is D making using of the binary ! operator, which as far
as I understand introduces a template?
The exclamation mark here is not a binary operator, it's used in
D templates to define where compile-time parameters are.
2) Why is a
Hello everyone,
I just started using D and I am a bit puzzled by the syntax of
the sort function is std.algorithm.sorting, which is
sort!(comparingFunction)(list)
where comparingFunction is often a lambda expression. For
instance in the Wolfram Language the equivalent function is
Jordan Wilson wrote:
This I think achieves the spirit of your code, but without the
memory exception:
ubyte[] st;
foreach(i; 0..2000){
writeln(i);
st.length=500_000_000; // auto = new ubyte[500_000_000];
st.length=0; // destory(st)
st.assumeSafeAppend;
//
On Friday, 26 May 2017 at 08:15:49 UTC, realhet wrote:
64bit is not a solution because I need to produce a 32bit dll,
and I also wanna use 32bit asm objs.
The total 2GB amount of memory is more than enough for the
problem.
My program have to produce 300..500 MB of continuous data
frequently.
On Friday, 26 May 2017 at 06:31:49 UTC, realhet wrote:
Hi,
I'm kinda new to the D language and I love it already. :D So
far I haven't got any serious problems but this one seems like
beyond me.
import std.stdio;
void main(){
foreach(i; 0..2000){
writeln(i);
auto st = new
On 26/05/2017 9:15 AM, realhet wrote:
Thanks for the answer!
But hey, the GC knows that is should not search for any pointers in
those large blocks.
And the buffer is full of 0-s at the start, so there can't be any 'false
pointers' in it. And I think the GC will not search in it either.
The
Thanks for the answer!
But hey, the GC knows that is should not search for any pointers
in those large blocks.
And the buffer is full of 0-s at the start, so there can't be any
'false pointers' in it. And I think the GC will not search in it
either.
The only reference to the buffer is 'st'
On Friday, May 26, 2017 06:31:49 realhet via Digitalmars-d-learn wrote:
> Hi,
>
> I'm kinda new to the D language and I love it already. :D So far
> I haven't got any serious problems but this one seems like beyond
> me.
>
> import std.stdio;
> void main(){
> foreach(i; 0..2000){
>
Hi,
I'm kinda new to the D language and I love it already. :D So far
I haven't got any serious problems but this one seems like beyond
me.
import std.stdio;
void main(){
foreach(i; 0..2000){
writeln(i);
auto st = new ubyte[500_000_000];
destroy(st); //<-this
On Wednesday, 15 August 2012 at 20:13:10 UTC, Era Scarecrow wrote:
On Wednesday, 15 August 2012 at 15:39:26 UTC, ixid wrote:
Could you supply your code? Which one are you using as the
hardest? If you're solving the 1400 second one in 12 seconds
that's very impressive, I can't get it below 240
31 matches
Mail list logo