They may use different debugging formats, but just linking should
be possible, especially with import libraries.
On Fri, 2014-05-30 at 16:44 +, Andrew Brown via Digitalmars-d-learn
wrote:
GDC version 4.8.2,i guess that's my problem. This is what happens
when you let Ubuntu look after your packages.
Debian Sid has GCC 4.9 packages, but that may not help?
--
Russel.
On Saturday, 31 May 2014 at 06:54:13 UTC, Russel Winder via
Digitalmars-d-learn wrote:
On Fri, 2014-05-30 at 16:44 +, Andrew Brown via
Digitalmars-d-learn
wrote:
GDC version 4.8.2,i guess that's my problem. This is what
happens
when you let Ubuntu look after your packages.
Debian Sid
So, I've gotten interested in kernel programming in D.. And as
much as I like C/C++, I wanna try innovating, I'm aware that
phobos/gc and any OS-specific issues are going to be a problem,
but I'm willing to implement them into the kernel itself.
So, I guess what I'm asking is this: What
On Sat, 31 May 2014 06:38:46 +
Kagamin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
They may use different debugging formats, but just linking should
be possible, especially with import libraries.
_Dynamic_ linking is possible. Static linking is not.
- Jonathan M Davis
On Sat, May 31, 2014 at 6:39 AM, Dicebot via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
private in D does not provide any strong guarantees, it only controls direct
access to the symbol. You effectively want some sort of strict internal
linkage attribute which does not exist
By dynamic linking do you mean LoadLibrary or linking with import
library?
What do you mean? Like this?
Hidden* foo() { return new Hidden();}
Yes, this way you can control all aspects of the construction and use. You
wouldn't need to make it private even, just don't lay out the struct in the
normal import:
struct Hidden;
I think you would need to use a .di
http://www.xomb.org/ ?
On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote:
Any ideas? :P
Buy my book, chapter 11 talks about it a little to get you
started :P
http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book
The summary of my approach there is:
1) Use a regular linux compiler
On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote:
So, I've gotten interested in kernel programming in D.. And as
much as I like C/C++, I wanna try innovating, I'm aware that
phobos/gc and any OS-specific issues are going to be a problem,
but I'm willing to implement them into the kernel
This has been asked so many times, is this info not on the website? We
should have an article on the site explaining this in depth. OT: Sorry for
top-quoting and over-quoting.
On Friday, May 30, 2014, monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Friday, 30
Hi,
import std.stdio;
void main() {
writefln(Entered);
sub1();
sub1();
sub1();
writefln(Returning);
void sub1() {
static int i2 = 6;
i2 = i2 + 1;
writefln(%s,i2);
};
}
does not compile, but
import std.stdio;
void main() {
void sub1() {
On Saturday, 31 May 2014 at 16:18:35 UTC, DLearner wrote:
Is this intended?
Yes, nested functions access local variables and thus follow the
same order of declaration rules as they do; you can't use a local
variable before it is declared so same with a nested function.
Hello all,
Is there a straightforward way to indicate that two modules should not be used
together in the same program? Preferably one that does not require editing both
of the modules?
The application I have in mind is when one is making available an experimental
module which is planned
Hi !
Does anybody knows why dmd segfaults on this code ? Should I
report this as a bug ?
import std.stdio;
enum LiftingGender
{
PREDICT,
UPDATE,
}
struct Test(float[][] coeffs,
int[] offsets,
LiftingGender gender)
{
immutable float[][] coeffs = coeffs;
matovitch:
Does anybody knows why dmd segfaults on this code ? Should I
report this as a bug ?
Please report this minimized case to Bugzilla:
struct Foo(int[] arr) {
const int[] arr = arr;
}
void main() {
Foo!([0]) foo;
}
The error it gives before the crash:
test.d(2,17):
On Saturday, 31 May 2014 at 17:01:23 UTC, bearophile wrote:
matovitch:
Does anybody knows why dmd segfaults on this code ? Should I
report this as a bug ?
Please report this minimized case to Bugzilla:
struct Foo(int[] arr) {
const int[] arr = arr;
}
void main() {
Foo!([0]) foo;
}
In fact it segfauls on any template parameter if it has the same
name as the immutable member (at least it's coherent). Something
as simple as :
struct Foo(int i)
{
immutable int i = i;
}
void main()
{
Foo!5 foo;
writeln(foo);
}
I am suprised that nobody tried this before. BTW I
I remembered my psswd don't take my last sentence into account (i
will filed this).
On Saturday, 31 May 2014 at 17:22:41 UTC, matovitch wrote:
In fact it segfauls on any template parameter if it has the
same name as the immutable member (at least it's coherent).
Something as simple as :
struct Foo(int i)
{
immutable int i = i;
}
void main()
{
Foo!5 foo;
I updated the issue. Strangely if done in the main everything is
fine :
Error: undefined identifier i
On Sat, May 31, 2014 at 04:50:11PM +, matovitch via Digitalmars-d-learn
wrote:
Hi !
Does anybody knows why dmd segfaults on this code ? Should I report
this as a bug ?
[...]
Compiler segfaults should always be reported. No matter how wrong the
code may be, it is never right for the
See: http://dlang.org/function.html#variadicnested
The second example explains that nested functions can be accessed only
if the name is in scope.
On Saturday, 31 May 2014 at 16:34:00 UTC, Joseph Rushton Wakeling
via Digitalmars-d-learn wrote:
Hello all,
Is there a straightforward way to indicate that two modules
should not be used together in the same program? Preferably
one that does not require editing both of the modules?
The
In contrast to those two examples where immutable can be used at compile
time, what are some other cases where it is necessary to use enum instead
of immutable?
On 31 May 2014 09:33, Andrej Mitrovic via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
This has been asked so many
Miles Stoudenmire:
In contrast to those two examples where immutable can be used
at compile
time, what are some other cases where it is necessary to use
enum instead of immutable?
By default use enum if you define a compile-time-known value,
unless it's composed data like an array, etc.
On 30/05/14 22:45, monarch_dodra via Digitalmars-d-learn wrote:
Didn't you make changes to how and when the global PRNG is popped and accessed
in randomShuffle? I figured it *could* be an explanation.
No, it was partialShuffle that I tweaked, and that shouldn't affect the results
here. There
I'm working on the decimal number package for D. A decimal is a
struct with precision, max exponent and rounding mode parameters:
Decimal!(PRECISION, MAX_EXPO, ROUNDING). I was trying to
overload the opCast operator for this struct and I found that it
does not seem necessary. I can cast
On 31/05/14 22:37, Joseph Rushton Wakeling via Digitalmars-d-learn wrote:
On 30/05/14 22:45, monarch_dodra via Digitalmars-d-learn wrote:
Didn't you make changes to how and when the global PRNG is popped and accessed
in randomShuffle? I figured it *could* be an explanation.
I think it's more
On Saturday, 31 May 2014 at 20:14:59 UTC, bearophile wrote:
Miles Stoudenmire:
In contrast to those two examples where immutable can be used
at compile
time, what are some other cases where it is necessary to use
enum instead of immutable?
By default use enum if you define a
On 05/31/2014 11:21 PM, Paul D Anderson wrote:
On Saturday, 31 May 2014 at 20:14:59 UTC, bearophile wrote:
Miles Stoudenmire:
In contrast to those two examples where immutable can be used at compile
time, what are some other cases where it is necessary to use enum
instead of immutable?
By
On 31/05/14 23:22, Joseph Rushton Wakeling via Digitalmars-d-learn wrote:
It's due to the the updated uniform() provided in this pull request:
https://github.com/D-Programming-Language/phobos/commit/fc48d56284f19bf171780554b63b4ae83808b894
You can see the effects in action by running e.g. the
On Saturday, 31 May 2014 at 21:21:59 UTC, Paul D Anderson wrote:
'enum' as a manifest constant keyword has been an unpopular
decision from its introduction. Everybody agrees that it
should be changed. Everybody but Walter
I find enum makes sense.
On 05/31/2014 02:11 PM, Paul D Anderson wrote:
I'm working on the decimal number package for D. A decimal is a struct
with precision, max exponent and rounding mode parameters:
Decimal!(PRECISION, MAX_EXPO, ROUNDING). I was trying to overload the
opCast operator for this struct and I found that
On 06/01/2014 12:25 AM, Ali Çehreli wrote:
dec10 little = cast(dec10(bingo));
You meant cast(dec10)(bingo).
assert(little == dec10(123.45));
Is this expected behavior?
Paul
That is surprising. I've discovered that if the template has members
that depend on a template parameter than the
On Saturday, 31 May 2014 at 22:13:35 UTC, monarch_dodra wrote:
On Saturday, 31 May 2014 at 21:21:59 UTC, Paul D Anderson wrote:
'enum' as a manifest constant keyword has been an unpopular
decision from its introduction. Everybody agrees that it
should be changed. Everybody but Walter
I find
Chris Nicholson-Sauls:
Good... I was starting to fear I was the only one.
In general you can't fix the names in a language because you
always find someone that likes the ones present :) I think enum
is a bad name for the purpose of defining manifest constants, but
I don't think this will
On Sat, 31 May 2014 07:53:40 +
Kagamin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
By dynamic linking do you mean LoadLibrary or linking with import
library?
Both will work, otherwise we couldn't use Microsoft's libraries - e.g.
std.windows.registry uses advapi32.dll
You should definitly use templating and CTFE for your advantage.
For example you could use the (compile time) component based
design to design (heap) allocators after a at cmpile time known
configuration. The possibilities of templating and compile time
code gen are enormous.
Instead of
On Saturday, 31 May 2014 at 07:57:18 UTC, Kagamin wrote:
http://www.xomb.org/ ?
seems to be outdated, but its another OS written in D.
On Saturday, 31 May 2014 at 22:34:45 UTC, Timon Gehr wrote:
On 06/01/2014 12:25 AM, Ali Çehreli wrote:
dec10 little = cast(dec10(bingo));
You meant cast(dec10)(bingo).
assert(little == dec10(123.45));
Is this expected behavior?
Paul
That is surprising. I've discovered that if the
Jonathan M Davis via Digitalmars-d-learn wrote in message
news:mailman.1421.1401576730.2907.digitalmars-d-le...@puremagic.com...
By dynamic linking do you mean LoadLibrary or linking with import
library?
Both will work, otherwise we couldn't use Microsoft's libraries - e.g.
On Saturday, 31 May 2014 at 22:54:48 UTC, Qox wrote:
scope(exit) foo();
uses exception handling in the background.
That just works with dmd even in the bare metal environmnet.
Throwing an exception needs library support with dmd but you can
copy/paste it from druntime - I did that in my
Is there any way that I can detect whether or not a function is
being evaluated at compile time? Specifically I want to switch
between to use/not to use memoize!func without having to figure
out when its CTFE-able and calling it with different syntax.
45 matches
Mail list logo