On Wednesday, 8 January 2014 at 20:25:28 UTC, Xavier Bigand wrote:
Is there a way to get backtrace outside exceptions?
If you're on Linux, you can try this library:
https://github.com/yazd/backtrace-d
On Thursday, 9 January 2014 at 03:36:30 UTC, Rikki Cattermole
wrote:
You won't have access to the GC so a lot of language features
(like slices) are out of the question.
Slices are fine, it's just the slice concatenation operators that
must be disabled. This is easily accomplished by simply no
On Thursday, 9 January 2014 at 00:02:00 UTC, Szymon Gatner wrote:
On Wednesday, 8 January 2014 at 23:46:28 UTC, bearophile wrote:
Or even:
void main()
{
...
}
Bye,
bearophile
Thanks, was not aware, main() was actually generated by VisualD
Yeah, VisualD was guilty of propagating that poor
On Thursday, 9 January 2014 at 03:36:30 UTC, Rikki Cattermole
wrote:
I don't know how easy it would be to get a bootloader to call a
D kernel although it has been done.
Pretty easy if you use GRUB. You can just compile a regular linux
program with a linker script and load it right up.
My min
On Wednesday, 8 January 2014 at 23:38:31 UTC, Goran Petrevski
wrote:
I'm new in the programming, systems programming especially, but
I want to learn D more as a systems programming language and by
that I mean avoiding libraries at all. My goal is to write a
simple operating system totaly in D (
On Wednesday, 8 January 2014 at 19:40:34 UTC, Nordlöw wrote:
Is/Are there a function(s) in `std.algorithm` or `std.range`
with which to lazily compute a forward difference? I need this
to differentially pack sorted elements (integers) in a range.
The integers happen to be `SysTime` timestamps.
On Wednesday, 8 January 2014 at 23:46:28 UTC, bearophile wrote:
Szymon Gatner:
Two small improvements in your code:
writeln("Base : " ~ text);
=>
writeln("Base : ", text);
int main(string[] argv)
{
...
return 0;
}
=>
void main(string[] argv)
{
...
}
Or even:
void main()
On Wednesday, 8 January 2014 at 23:27:37 UTC, Brad Anderson wrote:
On Wednesday, 8 January 2014 at 23:20:06 UTC, Szymon Gatner
wrote:
Still exploring what D has to offer but this blew my mind:
I don't quite understand why "enum name" part is necessary (as
my understanding is that "op" is com
On Wednesday, 8 January 2014 at 23:26:26 UTC, Adam D. Ruppe wrote:
On Wednesday, 8 January 2014 at 23:20:06 UTC, Szymon Gatner
wrote:
I don't quite understand why "enum name" part is necessary
It isn't!
Indeed, I don't know why it didn't compile for me the first time.
Szymon Gatner:
Two small improvements in your code:
writeln("Base : " ~ text);
=>
writeln("Base : ", text);
int main(string[] argv)
{
...
return 0;
}
=>
void main(string[] argv)
{
...
}
Or even:
void main()
{
...
}
Bye,
bearophile
I'm new in the programming, systems programming especially, but I
want to learn D more as a systems programming language and by
that I mean avoiding libraries at all. My goal is to write a
simple operating system totaly in D (using Assembly wherever is
needed) and by progressing in that project
On Wednesday, 8 January 2014 at 23:20:06 UTC, Szymon Gatner wrote:
Still exploring what D has to offer but this blew my mind:
I don't quite understand why "enum name" part is necessary (as
my understanding is that "op" is compile-time constant anyway)
but since I am crap at D that is what wo
On Wednesday, 8 January 2014 at 23:20:06 UTC, Szymon Gatner wrote:
I don't quite understand why "enum name" part is necessary
It isn't!
Still exploring what D has to offer but this blew my mind:
import std.stdio;
struct Base
{
void print(string text)
{
writeln("Base : " ~ text);
}
int add(int a, int b)
{
return a + b;
}
}
struct Wrap
{
auto opDispatch(string op, Args...)(Args args)
{
enum name = op;
On 01/08/2014 11:40 AM, "Nordlöw" wrote:
Is/Are there a function(s) in `std.algorithm` or `std.range` with which
to lazily compute a forward difference? I need this to differentially
pack sorted elements (integers) in a range. The integers happen to be
`SysTime` timestamps.
There is a forward d
On 01/08/2014 12:20 PM, John Carter wrote:
>>> Very well written, a pleasure to read.
>
>> And very hard to translate! :)
>
> Leaping off the immediate topic of computer language D into the realm
> of human languages English and Turkish...
>
> With the Sapir–Whorf hypothesis in the back of my min
On 01/08/2014 11:39 AM, "Ola Fosheim Grøstad"
" wrote:> On Wednesday, 8 January
2014 at 19:26:28 UTC, Ali Çehreli wrote:
>> And very hard to translate! :) In case a Turkish reader is interested,
>> here is the translation:
>>
>> http://ddili.org/makale/saflik.html
>
>
> So, "saflik" is "pure"
Am 08.01.2014 21:25, schrieb Xavier Bigand:
Is there a way to get backtrace outside exceptions?
On which plattform?
On Wednesday, 8 January 2014 at 20:25:28 UTC, Xavier Bigand wrote:
Is there a way to get backtrace outside exceptions?
Yes
http://arsdnet.net/dcode/stacktrace.d
works at least on linux
Is there a way to get backtrace outside exceptions?
Am 08.01.2014 21:25, schrieb Xavier Bigand:
Is there a way to get backtrace outside exceptions?
Found a plattform independend way:
import core.runtime;
import std.stdio;
void main(string[] args)
{
auto trace = defaultTraceHandler(null);
foreach(t; trace)
{
> > Very well written, a pleasure to read.
> And very hard to translate! :)
Leaping off the immediate topic of computer language D into the realm
of human languages English and Turkish...
With the Sapir–Whorf hypothesis in the back of my mind...
What makes it harder to translate?
Is there a hu
Is/Are there a function(s) in `std.algorithm` or `std.range` with
which to lazily compute a forward difference? I need this to
differentially pack sorted elements (integers) in a range. The
integers happen to be `SysTime` timestamps.
On Wednesday, 8 January 2014 at 19:26:28 UTC, Ali Çehreli wrote:
And very hard to translate! :) In case a Turkish reader is
interested, here is the translation:
http://ddili.org/makale/saflik.html
So, "saflik" is "pure" in turkish, cool! I like the sound of it.
8-D
On 01/08/2014 11:09 AM, Paolo Invernizzi wrote:
> This one is a good introduction, or at least the best one I can remember:
>
> http://klickverbot.at/blog/2012/05/purity-in-d/
>
> Very well written, a pleasure to read.
And very hard to translate! :) In case a Turkish reader is interested,
here
On Wednesday, 8 January 2014 at 19:04:24 UTC, John Colvin wrote:
On Wednesday, 8 January 2014 at 18:40:46 UTC, Ola Fosheim
Grøstad wrote:
Is pure meant to be a compiler hint so that it is up to the
programmer to enforce it? It is sometimes useful to maintain
hidden state for lazy evaluation, th
Ola Fosheim Grøstad:
Is pure meant to be a compiler hint so that it is up to the
programmer to enforce it?
Nope, it's enforced by the compiler. (But its rules are not
immediately obvious, there are three kinds of purity, strong,
weak and constant purity, etc). There are several corners cases
On Wednesday, 8 January 2014 at 18:40:46 UTC, Ola Fosheim Grøstad
wrote:
Is pure meant to be a compiler hint so that it is up to the
programmer to enforce it? It is sometimes useful to maintain
hidden state for lazy evaluation, that does not affect purity
optimizations:
e.g.
a = foo(1) // ev
Is pure meant to be a compiler hint so that it is up to the
programmer to enforce it? It is sometimes useful to maintain
hidden state for lazy evaluation, that does not affect purity
optimizations:
e.g.
a = foo(1) // evaluates, caches and returns value
b = foo(1) // returns cached value
c = f
On Wed, Jan 08, 2014 at 08:32:15AM +0100, Jacob Carlborg wrote:
> On 2014-01-07 21:44, H. S. Teoh wrote:
[...]
> >I like the alias idea, so here's the revised proposal:
> >
> >1) Argumentless trailing-delegate syntax:
> >
> > // Given this declaration:
> > void foo(alias dg)();
> >
> >
On Wednesday, 8 January 2014 at 09:47:03 UTC, Sönke Ludwig wrote:
In that particular case (dub build --build=ddox), you can just
have your own versions of the style files in your docs/styles/
folder (copy and modify from ddox/public/styles). That won't
work for "dub run --build=ddox" as it will
On Wednesday, 8 January 2014 at 14:01:43 UTC, Gary Willoughby
wrote:
On Wednesday, 8 January 2014 at 12:40:39 UTC, evilrat wrote:
ok. gotta using mixins :(
Just use another ctor.
class MyObjectA : MyObject
{
this(MyContext mc)
{
super(mc);
}
}
i do this in template. just
On Wednesday, 8 January 2014 at 12:40:39 UTC, evilrat wrote:
ok. gotta using mixins :(
Just use another ctor.
class MyObjectA : MyObject
{
this(MyContext mc)
{
super(mc);
}
}
On 2014-01-08 13:22, evilrat wrote:
Greetings everyone,
i have the code where i have to keep pointers to so storage(context
dependent stuff), so i tried declare abstract class with ctors and it
didn't worked.
--- [code]
class MyContext;
abstract class MyObject
{
// yet another bug? al
On Wednesday, 8 January 2014 at 12:29:48 UTC, Mike Parker wrote:
On 1/8/2014 9:22 PM, evilrat wrote:
Greetings everyone,
i have the code where i have to keep pointers to so
storage(context
dependent stuff), so i tried declare abstract class with ctors
and it
didn't worked.
--- [code]
c
On 1/8/2014 9:22 PM, evilrat wrote:
Greetings everyone,
i have the code where i have to keep pointers to so storage(context
dependent stuff), so i tried declare abstract class with ctors and it
didn't worked.
--- [code]
class MyContext;
abstract class MyObject
{
// yet another bug? al
Greetings everyone,
i have the code where i have to keep pointers to so
storage(context dependent stuff), so i tried declare abstract
class with ctors and it didn't worked.
--- [code]
class MyContext;
abstract class MyObject
{
// yet another bug? all descendants errors no default cto
Am 07.01.2014 21:15, schrieb Kelet:
Also, I cannot find any documentation on ddox arguments
(ddoxFilterArgs). Is this currently not available? I had to look
through the source code and vibe.d to figure them out.
Regards,
Kelet
Running just "ddox filter" or "dub run ddox -- filter" will print t
Am 07.01.2014 21:14, schrieb Kelet:
Hello,
I'm working on a library, and I'm trying to write the documentation with
Sönke's ddox software[1]. As I understand, it works with the Ddoc
documentation format[2].
The first problem I came across is that documented unit tests weren't
being converted in
39 matches
Mail list logo