Is the d compiler on the path?
Also, check the compiler settings for the d compiler and make sure that
the d compiler is the default compiler.
On 08/08/2014 11:15 AM, Borneq wrote:
I want use dmd compiler with COde:Blocks. IDE detect compiler but is
error "can't find compiler executable". I ha
The actual code is not that much slower according to the numerous
other operations we do. And certainly faster than D version doing
almost nothing.
Well it is about massive bitshifts and array accesses and
calculations.
With all the optimizations we are on par with fortran numerical
code (tha
Right
On Wednesday, 9 July 2014 at 18:18:43 UTC, Ali Çehreli wrote:
On 07/09/2014 03:57 AM, Larry wrote:
> struct timeval s,e;
[...]
> gettimeofday(&e,NULL);
>
> printf("so ? %d %lu %d %d %d",g,e.tv_usec - s.tv_usec,
> arr[4],arr[9],pol);
Changing the to
@Chris :
Actually yes. If we consider the device to run 20h a day, by
shaving a few microseconds there and there on billions of
operations a day over a whole machine park, you can enable
yourself to shut down some of them for maintenance more easily,
or pause some of them letting their battery
I may definitely help on the D project.
I noticed that gdc doesn't have profile guided optimization too.
So yeah, I cannot use D right now, I mean for this project.
Ok, I will do my best to have some spare time on Dlang. Didn't
really looked at the code already and I code for years in C,
which
On Wednesday, 9 July 2014 at 14:30:41 UTC, John Colvin wrote:
On Wednesday, 9 July 2014 at 13:46:59 UTC, Larry wrote:
The rest of the code is numerical so it will not change by
much the fact that d cannot get back the huge launching time.
At the microsecond level(even nano) it counts because
@Bearophile: just tried. No dramatic change.
import core.memory;
void main() {
GC.disable;
...
}
On Wednesday, 9 July 2014 at 13:46:59 UTC, Larry wrote:
Yes you are perfectly right but our need is to run the fastest
code on the lowest powered machines. Not servers but embedded
systems.
That is why I just test the overall structures.
The rest of the code is numerical so it will not
Yes you are perfectly right but our need is to run the fastest
code on the lowest powered machines. Not servers but embedded
systems.
That is why I just test the overall structures.
The rest of the code is numerical so it will not change by much
the fact that d cannot get back the huge launch
On Wednesday, 9 July 2014 at 12:25:40 UTC, bearophile wrote:
Larry:
Now the performance :
D : 12 µs
C : < 1µs
Where does the diff comes from ? Is there a way to optimize
the d version ?
Again, I am absolutely new to D and those are my very first
line of code with it.
Your C code is
Hello,
I extracted a part of my code written in c.
it is deliberately useless here but I would understand the
different technics to optimize such kind of code with gdc
compiler.
it currently runs under a microsecond.
Constraint : the way the code is expressed cannot be changed much
we need
Sometimes I am such a dunce. That is exactly what I did. Fixed
now.
Somehow I read import stdio.d as import std.stdio.d must have
been a late night.
On Tuesday, 20 May 2014 at 03:21:52 UTC, Rikki Cattermole wrote:
On 20/05/2014 3:17 p.m., Larry Hemsley wrote:
I just installed dmd on Mint
I just installed dmd on Mint Linux distro using the Ubuntu dep
package.
Ran a simple test program test.d and recieved this error.
test.d(1): Error: module stdio is in file 'stdio.d' which cannot
be read
import path[0] = /usr/include/dmd/phobos
import path[1] = /usr/include/dmd/druntime/import
Ch
Ok python3-dev was missing.
Now, it is a gdc problem:
[code]
def: hello
wrap_struct: 'RangeWrapper'
class.def: __iter__
class.def: next
wrapped_struct_init, S is 'struct pyd.make_object.RangeWrapper'
library_dirs: []
runtime_library_dirs: []
libraries: []
gdc -fPIC -nostartfiles -shared -fdebug
Ah, forgot to say :
I executed "python3.3 setup.py pydexe --compiler=gdc"
Any other way won't work.
tried hacking dcompiler.py in the python local packages, no luck.
Libraries won't be taken into account.
May I read something wrong..
Hello,
Not working here on a Debian sid :
gdc -fproperty -c -fversion=Python_2_4_Or_Later
-fversion=Python_2_5_Or_Later -fversion=Python_2_6_Or_Later
-fversion=Python_2_7_Or_Later -fversion=Python_3_0_Or_Later
-fversion=Python_3_1_Or_Later -fversion=Python_3_2_Or_Later
-fversion=Python_3_3_O
:)
You are perfectly right !
So many thanks !
Yes it is not very polished yet.
But now I see how I can manage it, I will follow your lead and
try things. :)
Thanks again,
Larry
.
Thanks,
Larry
On Wednesday, 31 July 2013 at 12:09:02 UTC, David wrote:
https://github.com/rejectedsoftware/mysql-native
Waw ! Many thanks,
Completely missed it :)
See you
Hello,
I was searching the web for anything relating D to mysql but
didn't find my way.
Is it on the roadmap to add mysql support ?
There is a c++ connector on debian, but no mention of a D
connector..
Thanks,
Larry
AAAh !!
Got it !
I will make the switch !
Thanks a lot :)
Larry
I have gdc 4.6 on Debian testing.
Is that so old ?
Humm,
A copy-paste of your code lead to :
"[[segmentation
fault"
So it doesn't work for me.
I use gdc if it might help !
Hello,
I read the library reference for regex.
I really miss python's equivalent of finditer.
Sometimes matching is not on purpose and one will want to match
all the occurences to iterate over it since it is much more
regarding concerning the orders and repetitions.
my code :
-
For those writing documentation, I would recommend:
http://docs.eiffel.com/book/method/et-dynamic-structure-execution-model
If I had had something like that for D it would have saved
me a lot of guessing and grief.
Larry
Thanks everyone.
Thanks guys.
Simen asked: "Is there a problem?".
Well, I kind of expected a "ubyte" buffer to be matched with a
"get(T:ubyte)".
I thought methods were searched for the "best" match.
Larry
uot;get(T:ubyte)" then "get(T:byte)" would be
called in both cases.
Q: Is this the way it's supposed to be?
Thanks, Larry
"Steven Schveighoffer" wrote in message
news:op.vddvhs17eav...@localhost.localdomain...
| On Thu, 27 May 2010 17:04:35 -0400, Larry Luther
| wrote:
|
| > "bearophile" wrote in message
| > news:ht4krg$17l...@digitalmars.com...
| > | On the base of your long ex
quot; can be used several ways:
private member_function () {)
private {
member_function () {}
}
private:
member_function () {}
I'm anxiously waiting for something of the quality of the "Annotated C++
Reference Manual".
Larry
"bearophile" wrote in message
news:ht4g3r$vu...@digitalmars.com...
| Larry Luther:
|
| > I did not get an error when building and running with DMD 2.042:
|
| I am using dmd v2.046, and I have taken the good habit of compiling
with -w (warnings on).
| It seems this error I see
lass instances don't need to copy their contents
and
instances of D structs do? While migrating C++ code to D I've had to
convert
"struct"s to "class"es because of the need for inheritance. Why would the
need
to copy an instance's contents to another instance disappear?
Larry
Thank you, I had no idea that scope was doing this.
I thought that when the docs said that it was being allocated on the stack
that I was getting "struct" like behavior.
"Simen kjaeraas" wrote in message
news:op.vc0qlpjovxi...@biotronic-pc.home...
| Larry Luther wrote:
Ok, Ok,
I'm a newbie to D, not to programming. The first computer I got to
program was a Digital PDP-8L.
I'm learning D.
I'm learning how to use SlickEdit as an IDE for D.
I've never used it to compile, debug, and execute before.
Therefore it will take a while before I can figure
I did not get an error when building and running with DMD 2.042:
import std.stdio;
class A {
int x, y;
void copy (in A a) {
x = a.x;
y = a.y;
}
void dump (string s) {
writefln( "%s.A = { %s, %s }", s, x, y);
}
}
class B : A {
int z;
void copy (in B b) {
super.co
void copy (in B b) {
super.copy( b);
z = b.z;
}
}
B foo = new B,
B bar = new B;
Q: Do I copy the member variables contributed by class A
from "foo" to "bar", this way: "(cast(A) bar).copy( foo);"?
Or maybe "bar.A.copy( foo);"?
Larry
ow do I do a deepcopy of foo to bar?
In C++: bar = foo;
Q3: Is the object "alpha" on the stack (per documentation)?
Q4: What happens when I do "alpha = foo;"?
"printf( "%p\n", alpha);" indicates that the address of "alpha" has
changed.
Thanks, Larry
Hi, Dan used the following method for his vector class:
void opOpAssign (string op:"+=")(ref Vector3 other) {...}
Why the "ref"? As I understand it, objects of class vector
would already be passed as references.
Larry
Thanks for your help.
Thanks for your help.
This code describes the concept:
module a;
import B;
struct A { B *ptr; }
-
module b;
import A;
struct B { A *ptr; }
-
Can this be done?
Do both classes have to be in the same module?
Why do I get an "object.Error: Access Violation" in the following code?
If I change "class" to "struct" and remove "public:" I don't get an error.
I'm using D2.
import std.stdio;
class Plane {
public:
int
xres,
yres;
};
void main (string[] args) {
Plane
p;
p.xres = 1920;
44 matches
Mail list logo