quick-and-dirty port of my Zymosis Z80 emulation engine to D.
code was built from scratch and not using huge tables to generate
huge sources (it's just one module with source size ~64KB).
it properly emulates all known Z80 quirks (including MEMPTR
register) and passes all 1335 tests from
ketmar:
sorry, it uses GDC @attribute(forceinline) feature, so you
need latest GDC to build it. it's not strictly necessary though
(speed optimizations?
Have you performed a benchmark with and without that attribute?
http://repo.or.cz/w/zymosis.d.git
In this kind of code computed gotos
On 20 April 2014 21:16, ketmar via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
i'm pretty sure that this is the first Z80 emulator written in D. %-)
I suspect mine might have been the first Z80 emulator written in D, but
even then, probably not :)
On 21 April 2014 00:49, Manu turkey...@gmail.com wrote:
On 20 April 2014 21:16, ketmar via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
i'm pretty sure that this is the first Z80 emulator written in D. %-)
I suspect mine might have been the first Z80 emulator
On Sunday, 20 April 2014 at 13:08:02 UTC, bearophile wrote:
sorry, it uses GDC @attribute(forceinline) feature, so you
Have you performed a benchmark with and without that attribute?
not on this code yet. will check it someday,
http://repo.or.cz/w/zymosis.d.git
In this kind of code computed
On Sunday, 20 April 2014 at 15:17:56 UTC, Manu via
Digitalmars-d-announce wrote:
https://github.com/TurkeyMan/superemu
wow, my google-fu is bad than. %-) doing 'git clone' right now.
btw, what is the license for your code?
Funny you make a point of forceinline, I have forceinline
placeholders
In his article How non-member functions improve encapsulation
[1], Scott Meyers makes a good argument for why free functions
should generally be preferred over class methods in C++. TL;DR:
Fewer member functions means fewer functions that break when the
class implementation changes, and free
On Saturday, 19 April 2014 at 22:38:31 UTC, Nick Sabalausky wrote:
I had a brief thought of that too, but I quickly dismissed it
because it really *isn't* corporate-looking...
To me it looks like a typical start-up design. It does not peek
my interest in the 2 seconds you need to tell me that
On Saturday, 19 April 2014 at 23:44:45 UTC, Marco Leise wrote:
Am Wed, 16 Apr 2014 20:32:20 +
schrieb Peter Alexander peter.alexander...@gmail.com:
On Wednesday, 16 April 2014 at 20:29:17 UTC, bearophile wrote:
Peter Alexander:
(I assume that nothrow isn't meant to be there?)
In D
Just to stating some basic observations to avoid noise.
1. Graphic design of frontpages should follow the principle:
form follows function.
2. Mimicry of the visual style used on adobe.com will make you
look good, and somehow familiar, but it is not going to make you
stand out.
3. The
On Sunday, 20 April 2014 at 07:11:41 UTC, Lars T. Kyllingstad
wrote:
In his article How non-member functions improve encapsulation
[1], Scott Meyers makes a good argument for why free functions
should generally be preferred over class methods in C++.
TL;DR: Fewer member functions means fewer
On Sunday, 20 April 2014 at 07:11:41 UTC, Lars T. Kyllingstad
wrote:
In his article How non-member functions improve encapsulation
[1], Scott Meyers makes a good argument for why free functions
should generally be preferred over class methods in C++.
TL;DR: Fewer member functions means fewer
On 19 Apr 2014 13:00, Lars T. Kyllingstad via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Friday, 18 April 2014 at 14:22:24 UTC, Steven Schveighoffer wrote:
I don't share your opinion that the web site need to be modern to
avoid warding off potential adopters. If they are turned off
On Sunday, 20 April 2014 at 08:25:47 UTC, monarch_dodra wrote:
One thing to keep in mind, is that with the module system, and
templates, is that free functions can only be called if the
module *knows* about your free function.
For example int[] is a range thanks to the free
front/popFront,
On 2014-04-19 15:40, monarch_dodra wrote:
Nonsense. It still works 99% of the time (I think only a subset of 100
letters in all of Unicode are affect, and even then, another 100 of them
*shrink* on toUpper). It is really useful. It avoids *needles*
allocations. Removing it would be more harmful
On 2014-04-19 23:06, Nick Sabalausky wrote:
God no. I like forum.dlang.org and all, but scaling the font size when
the window resizes is horrible UX. Example: If I shrink the browser
window, for *whatever* reason, I expect not to have an over-zealous CSS
decide Oh! He must want the text to
On 2014-04-19 13:09, Aleksandar Ruzicic wrote:
I have experience with ElasticSearch but I'm open to all suggestions, if
Solr is better, then we'll use Solr.
But this is something Walter must approve first, as it would mean
ditching Google search in favor of our own search service.
They're
On 4/20/14, Lars T. Kyllingstad via Digitalmars-d
digitalmars-d@puremagic.com wrote:
In his article How non-member functions improve encapsulation
[1], Scott Meyers makes a good argument for why free functions
should generally be preferred over class methods in C++.
TDPL actually references
Hi,everyone,
Array's Length keeps the same value on x86 and on x64 ,it will be
help for compile the same codes.
Now,I compile the codes that works on x86 is ok,but on x64
,array's length's value type is ulong,the codes are very
more,modify them that is a big work.
I think
On Sunday, 20 April 2014 at 07:11:41 UTC, Lars T. Kyllingstad
wrote:
In his article How non-member functions improve encapsulation
[1], Scott Meyers makes a good argument for why free functions
should generally be preferred over class methods in C++.
TL;DR: Fewer member functions means fewer
On Sunday, 20 April 2014 at 11:01:27 UTC, Gary Willoughby wrote:
This is a quote from Walter that sums the reasoning up
perfectly:
A huge reason for them is to head off the temptation to write
What does them refer to here?
‘kitchen sink’ classes that are filled with every conceivable
On Sunday, 20 April 2014 at 11:12:42 UTC, Lars T. Kyllingstad
wrote:
On Sunday, 20 April 2014 at 11:01:27 UTC, Gary Willoughby wrote:
‘kitchen sink’ classes that are filled with every conceivable
method. The desired approach is to have the class implement
the bare minimum of functionality,
On Sunday, 20 April 2014 at 10:57:30 UTC, FrankLike wrote:
Hi,everyone,
Array's Length keeps the same value on x86 and on x64 ,it will
be help for compile the same codes.
Now,I compile the codes that works on x86 is ok,but on
x64 ,array's length's value type is ulong,the codes are
I just had a non-alcohol beer, so I think I'll rant some more
while I'm at it:
WHY don't the community front the story of Walter Bright's D
vision on the front-page? It is a wonderful selling point that
appeals to geeks and make them interested:
1. Competent: Wrote a well known C++ compiler
On 04/20/14 03:00, Iain Buclaw via Digitalmars-d wrote:
On 19 April 2014 17:10, Artur Skawina via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On 04/19/14 16:21, Iain Buclaw via Digitalmars-d wrote:
On 19 April 2014 14:33, Artur Skawina via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Sunday, 20 April 2014 at 11:12:42 UTC, Lars T. Kyllingstad
wrote:
Writing classes like this allows for better encapsulation
because only the required behaviour is contained within the
class keeping it focused. [...]
I'm also pretty sure Walter has repeatedly stated that the
module is the
On Sunday, 20 April 2014 at 11:12:42 UTC, Lars T. Kyllingstad
wrote:
However, in D, all functions defined in the same module as a
class will have access to the private state of that class, on
an equal footing with its member methods. Therefore, the above
statment doesn't really help in
On Wednesday, 16 April 2014 at 02:14:18 UTC, Walter Bright wrote:
On 4/15/2014 6:57 PM, Mike wrote:
I suspect some of the motivation for this is to give customers
faster horses.
I would be surprised if a @nogc attribute increased D's
appeal, and I think
efforts would be better allocated to
On Sunday, 20 April 2014 at 14:38:47 UTC, Frustrated wrote:
On Wednesday, 16 April 2014 at 02:14:18 UTC, Walter Bright
wrote:
On 4/15/2014 6:57 PM, Mike wrote:
I suspect some of the motivation for this is to give
customers faster horses.
I would be surprised if a @nogc attribute increased D's
You've already asked this question:
http://forum.dlang.org/thread/uxovgaptnpmuusmdp...@forum.dlang.org
You've already been told its by design.
Thank you.
On 4/19/14, 1:02 AM, Aleksandar Ruzicic wrote:
I'm planning to start working on this as soon as I get approval
from Walter/Andrei, and as most of people who answered here are agreed
that redesign would be a good thing I hope they wouldn't oppose..
Let's do it. Thank you very much! -- Andrei
On Sunday, 20 April 2014 at 15:04:28 UTC, Rikki Cattermole wrote:
On Sunday, 20 April 2014 at 14:38:47 UTC, Frustrated wrote:
On Wednesday, 16 April 2014 at 02:14:18 UTC, Walter Bright
wrote:
On 4/15/2014 6:57 PM, Mike wrote:
I suspect some of the motivation for this is to give
customers
On Saturday, 19 April 2014 at 18:41:39 UTC, Walter Bright wrote:
On 4/19/2014 11:05 AM, Dicebot wrote:
I feel like the origin of the discussion has been completely
lost here and we
don't speak the same language right now. The very point I have
made initially is
that @nogc in a way it is
On 4/19/14, 10:21 AM, Russel Winder via Digitalmars-d wrote:
My changes to SCons to support gdc and ldc2 as well as dmd, and to
integrate D as a peer to C++ appear to have been merged into SCons
mainline/default. This means it is time to retire the SCons_D_Tooling
repository. Well, not so much
On 20 April 2014 13:19, Artur Skawina via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On 04/20/14 03:00, Iain Buclaw via Digitalmars-d wrote:
On 19 April 2014 17:10, Artur Skawina via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On 04/19/14 16:21, Iain Buclaw via Digitalmars-d wrote:
The following solution
http://static.rust-lang.org/doc/master/intro.html#owning-concurrency
is partially a good start...
but I believe it would be better to let the (D) compiler
optimization stage figure out _automatically_ if it needs to make
a copy of the variable `numbers` or not
On 4/20/14, 12:11 AM, Lars T. Kyllingstad wrote:
The fact that private really means module private in D means that
any number of functions can break when a class/struct implementation
changes.
No, only those in that module. There's no change. -- Andrei
I want to use the tecgraf iup gui library for a cross platform
application - using dmd2.065.
I have simple .d program that links with iup on linux w/o a
problem using -L-liup
after installing the iup so library for linux provided by tecgraf.
HOWEVER, cannot quite get there for Windows with same
On Sunday, 20 April 2014 at 08:38:25 UTC, Iain Buclaw via
Digitalmars-d wrote:
On 19 Apr 2014 13:00, Lars T. Kyllingstad via Digitalmars-d
digitalmars-d@puremagic.com wrote:
On Friday, 18 April 2014 at 14:22:24 UTC, Steven Schveighoffer
wrote:
I don't share your opinion that the web site
but I believe it would be better to let the (D) compiler
optimization stage figure out _automatically_ if it needs to
make a copy of the variable `numbers` or not depending on
whether `numbers` is used or not further down the body of
`main`.
I just realized that solving this in an elegant
On Sunday, 20 April 2014 at 14:38:47 UTC, Frustrated wrote:
Why not allow one to define their own attributes from a
generalized subset and then define a few standard ones like
@nogc.
i.e., instead of having to define specific attributes every few
years to satisfy some new thing, why not just
On Sunday, 20 April 2014 at 00:55:31 UTC, David Held wrote:
On 4/19/2014 3:31 PM, Andrej Mitrovic via Digitalmars-d-learn
wrote:
[...]
struct S
{
int get() { return 0; }
T get(T)() { return T.init; }
}
void main()
{
S s;
float x = s.get(); // which overload? (currently int
On Sunday, 20 April 2014 at 07:52:08 UTC, matovitch wrote:
struct S
{
ubyte get() { return 0 ; }
float get() { return 0.; }
}
void main()
{
S s;
float x = s.get(); // does'nt know which overload, does'nt
compile.
}
What I do find interesting though, is that you are allowed
On Sunday, 20 April 2014 at 08:28:07 UTC, monarch_dodra wrote:
On Sunday, 20 April 2014 at 07:52:08 UTC, matovitch wrote:
struct S
{
ubyte get() { return 0 ; }
float get() { return 0.; }
}
void main()
{
S s;
float x = s.get(); // does'nt know which overload, does'nt
compile.
}
On 4/18/14, monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Yeah... static assert(void.sizeof == 1); passes :/
Note that you can even have static void arrays. E.g.:
https://issues.dlang.org/show_bug.cgi?id=9691
I'm not sure whether this is an oversight
Note sure if you can edit messages once sent.
$13,456.67
245,678,541
On Sunday, 20 April 2014 at 12:50:52 UTC, steven kladitis wrote:
How do you format numbers to have things like.
Leading $ or , or CR with or without leading zeros.
for example $56.00
$056.00
How do you format numbers to have things like.
Leading $ or , or CR with or without leading zeros.
for example $56.00
$056.00
$1,3456.67
345.89CR
On Sunday, 20 April 2014 at 12:53:11 UTC, steven kladitis wrote:
Note sure if you can edit messages once sent.
$13,456.67
245,678,541
On Sunday, 20 April 2014 at 12:50:52 UTC, steven kladitis wrote:
How do you format numbers to have things like.
Leading $ or , or CR with or without leading
I know the difference between a struct and a class but I remember
seeing somewhere that structs are much faster than classes in D
for some strange reason.
I'm not worried too much about class allocation performance
because I will try and use classes when they will not be created
frequently
On Sunday, 20 April 2014 at 12:53:11 UTC, steven kladitis wrote:
Note sure if you can edit messages once sent.
$13,456.67
245,678,541
On Sunday, 20 April 2014 at 12:50:52 UTC, steven kladitis wrote:
How do you format numbers to have things like.
Leading $ or , or CR with or without leading
On Saturday, 19 April 2014 at 12:06:58 UTC, FreeSlave wrote:
I use
ldc2 main.d -L-lcurses
or
dmd main.d -L-lcurses
and following source code:
import std.stdio;
extern(C) int tgetnum(const(char) *id);
int main()
{
writeln(tgetnum(li));
return 0;
}
Note that you don't need to apply
My understanding is not perfect. There may be compiler and CPU
optimizations that I am not aware of.
On 04/20/2014 08:03 AM, Frustrated wrote:
is the only argument really about performance when creating
structs vs creating classes
Not only creating but also when using. A class variable is a
is there a function in phobos anywhere that takes a string and
escapes it into a string literal suitable for string mixins?
something like
assert (f(abc\ndef) == \abc\\ndef\);
On Sunday, 20 April 2014 at 16:56:59 UTC, Ali Çehreli wrote:
My understanding is not perfect. There may be compiler and CPU
optimizations that I am not aware of.
On 04/20/2014 08:03 AM, Frustrated wrote:
is the only argument really about performance when creating
structs vs creating classes
On Sunday, 20 April 2014 at 17:55:25 UTC, Ellery Newcomer wrote:
is there a function in phobos anywhere that takes a string and
escapes it into a string literal suitable for string mixins?
something like
assert (f(abc\ndef) == \abc\\ndef\);
It's a bit hackish, but it avoids deploying code
On Sunday, 20 April 2014 at 18:08:19 UTC, Frustrated wrote:
In D though, I guess because of the GC(but which is why I am
asking because I don't know specifically), classes could be
much slower due to all the references causing the GC to take
longer scan the heap and all that. If allocate or
I know the socket has the nonblocking settings, but how would I
actually go around using it in D? Is there a specific procedure
for it to work correctly etc.
I've taken a look at splat.d but it seems to be very outdated, so
that's why I went ahead and asked here as I'd probably have to
end
On Tuesday, 25 March 2014 at 08:42:30 UTC, monarch_dodra wrote:
Interesting. I'd have thought the extra copy would be an
overall slowdown, but I guess that's not the case.
I installed ubuntu 14.04 64 bit, and measured some of these
examples using gdc, ldc and dmd on a corei3 box. The
On Sunday, 20 April 2014 at 22:44:28 UTC, Bauss wrote:
I know the socket has the nonblocking settings, but how would I
actually go around using it in D? Is there a specific procedure
for it to work correctly etc.
I've taken a look at splat.d but it seems to be very outdated,
so that's why I
On 2014-04-18 13:20, Nordlöw wrote:
Could someone please give some references to thorough explainings on
these latest concurrency mechanisms
- Go: Goroutines
- Coroutines (Boost):
- https://en.wikipedia.org/wiki/Coroutine
-
On 2014-04-20 18:44, Bauss wrote:
I know the socket has the nonblocking settings, but how would I actually
go around using it in D? Is there a specific procedure for it to work
correctly etc.
I've taken a look at splat.d but it seems to be very outdated, so that's
why I went ahead and asked
On 2014-04-21 00:32, Etienne Cimon wrote:
On 2014-04-20 18:44, Bauss wrote:
I know the socket has the nonblocking settings, but how would I actually
go around using it in D? Is there a specific procedure for it to work
correctly etc.
I've taken a look at splat.d but it seems to be very
https://issues.dlang.org/show_bug.cgi?id=12601
Issue ID: 12601
Summary: Nested functions and properties increase size of
struct.
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=12601
mrdarksys mrdark...@gmail.com changed:
What|Removed |Added
CC||mrdark...@gmail.com
--
https://issues.dlang.org/show_bug.cgi?id=12602
Dmitry Olshansky dmitry.o...@gmail.com changed:
What|Removed |Added
Keywords||CTFE
--
https://issues.dlang.org/show_bug.cgi?id=12602
Issue ID: 12602
Summary: [CTFE] Changes to an array slice wrapped in a struct
do not propogate to the original
Product: D
Version: D2
Hardware: All
OS: All
https://issues.dlang.org/show_bug.cgi?id=12601
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
Hardware|x86_64 |All
https://issues.dlang.org/show_bug.cgi?id=12601
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=10276
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=12601
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=10276
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
Summary|Compiler pointlessly makes |Nested structs
https://issues.dlang.org/show_bug.cgi?id=12507
--- Comment #4 from Jonathan M Davis jmdavisp...@gmx.com ---
Attempt #2: https://github.com/D-Programming-Language/phobos/pull/2088
--
https://issues.dlang.org/show_bug.cgi?id=12480
Andrej Mitrovic andrej.mitrov...@gmail.com changed:
What|Removed |Added
URL|
https://issues.dlang.org/show_bug.cgi?id=12593
--- Comment #2 from yazan.dab...@gmail.com ---
It is related, but I couldn't get it to work even with opCmp/opEquals/toHash or
different combinations of them. So this is a more general issue.
--
https://issues.dlang.org/show_bug.cgi?id=12603
Issue ID: 12603
Summary: [CTFE] Unknown bug with goto case.
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
https://issues.dlang.org/show_bug.cgi?id=12547
--- Comment #3 from bearophile_h...@eml.cc ---
In Python 3.4 those functions return an int (but Python has multiprecision
integers):
from math import ceil
print(type(ceil(1.5)))
Output:
class 'int'
--
https://issues.dlang.org/show_bug.cgi?id=12577
--- Comment #2 from Ellery Newcomer ellery-newco...@utulsa.edu ---
uh huh. when did 'normal' stop being the default value for that field?
--
https://issues.dlang.org/show_bug.cgi?id=12576
Ellery Newcomer ellery-newco...@utulsa.edu changed:
What|Removed |Added
Severity|enhancement |normal
--
https://issues.dlang.org/show_bug.cgi?id=12595
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--
https://issues.dlang.org/show_bug.cgi?id=12480
--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/7ec47e158601f18a2dad86d7c594628da753a58a
Fix Issue 12480 - Implement
https://issues.dlang.org/show_bug.cgi?id=12480
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=12604
Issue ID: 12604
Summary: No mismatched array lengths error with narrowing
conversions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=12604
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from
https://issues.dlang.org/show_bug.cgi?id=12593
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||rejects-valid
--- Comment
https://issues.dlang.org/show_bug.cgi?id=8309
--- Comment #5 from Kenji Hara k.hara...@gmail.com ---
New pull request:
https://github.com/D-Programming-Language/dmd/pull/3477
--
https://issues.dlang.org/show_bug.cgi?id=12605
Issue ID: 12605
Summary: Calculate proper common type of lambdas
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
https://issues.dlang.org/show_bug.cgi?id=12577
--- Comment #3 from Kenji Hara k.hara...@gmail.com ---
(In reply to Ellery Newcomer from comment #2)
uh huh. when did 'normal' stop being the default value for that field?
It's when bugzilla is moved to 'issues.dlang.org'.
--
https://issues.dlang.org/show_bug.cgi?id=12576
--- Comment #1 from Kenji Hara k.hara...@gmail.com ---
Is this a possible workaround for your 'original' code? I'm not sure it's the
actual issue, because the code still fail to compile.
template Replace(string base, T...)
{
template
88 matches
Mail list logo