On Thursday, 31 October 2019 at 12:37:55 UTC, user1234 wrote:
On Thursday, 31 October 2019 at 12:29:28 UTC, Tobias Pankrath
wrote:
[...]
Try
struct S
{
S*[] children;
}
because otherwise when you declare the array the compiler has
not finished the semantic ana of S.
so S size is not
On Thursday, 31 October 2019 at 12:29:28 UTC, Tobias Pankrath
wrote:
My Problem:
--- (https://run.dlang.io/is/CfLscj)
import std.container.array;
import std.traits;
struct Test
{
Test[] t;
}
struct Test2
{
Array!Test2 t;
}
int main()
{
return FieldTypeTuple!Test.length +
On Saturday, 5 October 2019 at 02:59:58 UTC, Paul Backus wrote:
I was curious how C++17's std::variant compared to the options
we have in D, like Algebraic and SumType, so I did a simple
comparison of the generated assembly for each of them. You can
read about it at the link below. And as you
On Saturday, 20 July 2019 at 05:21:01 UTC, Newbie2019 wrote:
On Saturday, 20 July 2019 at 04:18:15 UTC, Adam D. Ruppe wrote:
show me what you're doing now and I'll see which case it is.
Most the time I see these, the code is significantly
simplified and bugs fixed by removing the usages of
On Thursday, 4 July 2019 at 08:11:26 UTC, Martin Nowak wrote:
Glad to announce D 2.087.0, ♥ to the 63 contributors.
This release comes with types matching single template alias
parameters, nested template methods/local template functions,
multi-threaded GC marking, and a phobos compiled with
On Friday, 21 June 2019 at 20:42:00 UTC, Tomas wrote:
Does it matter in which order a class inherits from interfaces?
class A : Interface1, Interface2{ ... }
vs
class A : Interface2, Interface1{ ... }
Conceptually it should not matter, but I'm getting really weird
segfault errors
On Monday, 17 June 2019 at 05:04:50 UTC, Bart wrote:
Consider
void foo(string A = "")(string B = "")
{
static if (A != "")
do(A);
else
do(B);
}
[...]
I see the annoyance but D clearly separates what is CT and RT so
such a change would require a DIP. I don't even know
On Saturday, 15 June 2019 at 17:42:04 UTC, ag0aep6g wrote:
On Saturday, 15 June 2019 at 17:24:45 UTC, user1234 wrote:
---
void foo(){writeln(__PRETTY_FUNCTION__);}
void main(string[] args)
{
void delegate() dg;
dg.funcptr =
dg.ptr = null; // usually a "this" or a frame address
On Saturday, 15 June 2019 at 16:34:22 UTC, Robert M. Münch wrote:
On 2019-06-15 16:19:23 +, Anonymouse said:
By design, I think: "delegate and function objects cannot be
mixed. But the standard function std.functional.toDelegate
converts a function to a delegate."
Your example compiles
On Wednesday, 29 May 2019 at 11:17:22 UTC, user1234 wrote:
D-Scanner 0.7.2 was released yesterday, justified by a couple
of bug fixed.
This version relies on dparse 0.11.5 which is (exceptionally) a
branch with backports. All the tools will be upgraded to use
dparse 0.13.0 during the summer.
D-Scanner 0.7.2 was released yesterday, justified by a couple of
bug fixed.
This version relies on dparse 0.11.5 which is (exceptionally) a
branch with backports. All the tools will be upgraded to use
dparse 0.13.0 during the summer.
See
D:YAML 0.8.0 was released a few days ago.
D:YAML is a project for reading or writing yaml files, 100%
written in D.
The project is getting closer to a 1.0 release, which means
official test suite supported and more D-ish way of doing stuff
(range or less class for example).
see
On Saturday, 25 May 2019 at 19:10:44 UTC, Ron Tarrant wrote:
On Thursday, 23 May 2019 at 00:34:42 UTC, H. S. Teoh wrote:
And this isn't just for mobile apps; even the pervasive
desktop browser nowadays seems bent on eating up as much CPU,
memory, and disk as physically possible
This has
On Wednesday, 15 May 2019 at 22:03:39 UTC, Ferhat Kurtulmuş wrote:
Hi,
Maybe I already know the answer, but have to be sure about
this. I am emulating this cpp code "int val = mat.at(row,
col)" like:
T at(T)(int row, int col){
static if (T.stringof == "float"){
return
On Saturday, 11 May 2019 at 09:59:25 UTC, Anonymouse wrote:
On Tuesday, 7 May 2019 at 17:33:22 UTC, Ron Tarrant wrote:
I've had this happen, too. I don't know for sure, but I think
it may be because the installers aren't prepared to do
updates, not on Windows, anyway.
My best success for
On Friday, 3 May 2019 at 19:14:32 UTC, M.M. wrote:
On Friday, 3 May 2019 at 20:03:03 UTC, Walter Bright wrote:
Thank you, Iain Buclaw!
https://www.phoronix.com/scan.php?page=news_item=GCC-9.1-Compiler-Released
On Wednesday, 24 April 2019 at 21:12:10 UTC, JN wrote:
I noticed a construct I haven't seen before in D when reading
the description for automem -
https://github.com/atilaneves/automem
static struct Point {
int x;
int y;
}
What does "static" do in this case? How does it
On Sunday, 3 March 2019 at 18:32:14 UTC, user1234 wrote:
On Sunday, 3 March 2019 at 18:07:57 UTC, Samir wrote:
or // sorry i don't have the regex API in mind
import std.array: array;
import std.alogrithm.iteration : map;
auto allMatches = matchAll(line, pattern).map(a =>
a.hit).array;
On Sunday, 3 March 2019 at 18:07:57 UTC, Samir wrote:
I am belatedly working my way through the 2018 edition of the
Advent of Code[1] programming challenges using D and am stumped
on Problem 3[2]. The challenge requires you to parse a set of
lines in the format:
#99 @ 652,39: 24x23
#100 @
On Saturday, 19 January 2019 at 14:14:32 UTC, H. S. Teoh wrote:
On Sat, Jan 19, 2019 at 08:17:30AM +, Anonymouse via
Digitalmars-d-announce wrote:
On Saturday, 19 January 2019 at 06:43:34 UTC, H. S. Teoh wrote:
> [...]
[...]
For us on the browser pages don't always load, though.
That's
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
A few things that have annoyed me about writing D lately:
https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/
I agree about template lambdas. But is something that misses
really an error ?
On Saturday, 23 June 2018 at 09:19:45 UTC, user1234 wrote:
On Saturday, 23 June 2018 at 08:07:23 UTC, Jacob Carlborg wrote:
On 2018-06-23 03:27, aedt wrote:
for line in stdin.lines() {}
if condition {}
while condition {}
for init; condition; op {}
What's the rationale of keeping the
On Saturday, 23 June 2018 at 09:41:19 UTC, Ecstatic Coder wrote:
Man, proggit can be savage with the criticism. Every Nim/Rust
and the one Ada programmer have come out of the woodwork to
make sure you know their language supports nested functions.
You've seemingly got to be an expert in every
On Saturday, 23 June 2018 at 08:07:23 UTC, Jacob Carlborg wrote:
On 2018-06-23 03:27, aedt wrote:
for line in stdin.lines() {}
if condition {}
while condition {}
for init; condition; op {}
What's the rationale of keeping the requirement that the
condition of
if/for/while must be wrapped
On Saturday, 23 June 2018 at 05:09:13 UTC, aedt wrote:
On Saturday, 23 June 2018 at 04:45:07 UTC, user1234 wrote:
On Saturday, 23 June 2018 at 01:27:30 UTC, aedt wrote:
for line in stdin.lines() {}
if condition {}
while condition {}
for init; condition; op {}
What's the rationale of
On Saturday, 23 June 2018 at 01:27:30 UTC, aedt wrote:
for line in stdin.lines() {}
if condition {}
while condition {}
for init; condition; op {}
What's the rationale of keeping the requirement that the
condition of if/for/while must be wrapped with a parenthesis
(other than keeping
On Wednesday, 20 June 2018 at 18:47:10 UTC, Jordi Gutiérrez
Hermoso wrote:
I'm specifically thinking of the GNU Octave codebase:
http://hg.savannah.gnu.org/hgweb/octave/file/@
It's a fairly old and complicated C++ codebase. I would like to
see if I could slowly introduce some D in it,
On Wednesday, 2 May 2018 at 20:32:43 UTC, jmh530 wrote:
In the function below, there is a template parameter and a
normal parameter both with the same name. However, the function
returns the normal parameter. The template parameter is
effectively ignored. I was surprised by this behavior.
Is
On Thursday, 19 April 2018 at 08:13:00 UTC, Andrey wrote:
Hello,
I wrote a small test code with WinApi:
import core.runtime;
import std.utf;
import core.sys.windows.windows;
import core.sys.windows.wingdi;
class Test
{
public this()
On Sunday, 15 April 2018 at 22:55:41 UTC, Giles Bathgate wrote:
On Sunday, 15 April 2018 at 22:52:47 UTC, Giles Bathgate wrote:
I am proposing a new function called getOrAdd in
I posted details of the PR here because at least 2 people do
not like the name getOrAdd (and one of those people
On Friday, 13 April 2018 at 17:41:00 UTC, Adam D. Ruppe wrote:
On Friday, 13 April 2018 at 17:38:39 UTC, Dr.No wrote:
string s = null;
if(s !is null && s[0] == '/')
is this correct?
No, that doesn't work if the string = "a"[$..$] for example
Just use
if(s.length && s[0])
instead
just
On Saturday, 7 April 2018 at 20:46:39 UTC, bauss wrote:
On Saturday, 7 April 2018 at 20:34:57 UTC, user1234 wrote:
On Saturday, 7 April 2018 at 20:14:49 UTC, bauss wrote:
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class
that access its own private
On Thursday, 5 April 2018 at 17:59:40 UTC, Jack Stouffer wrote:
On Wednesday, 4 April 2018 at 05:31:10 UTC, Andrei Alexandrescu
wrote:
...
We can certainly try it, I'd be interested to see it's impact.
The biggest problem Phobos is facing at the moment is total
number of reviewers.
On Saturday, 7 April 2018 at 20:14:49 UTC, bauss wrote:
jesus that became a long title.
Anyway as the title says, is it a bug that a parent class that
access its own private members from derived classes gets
deprecation warning?
If the import is selective no. (`import foo : Foo;`)
If the
On Friday, 16 March 2018 at 11:44:59 UTC, Chris wrote:
Would it be possible to find out at DConf in Munich why exactly
D is so popular in Germany (my impression) and in other
countries of Europe (and that general post code) like France,
Italy, GB, Romania and Russia etc.? I've always been
On Sunday, 25 February 2018 at 05:16:21 UTC, Meta wrote:
On Sunday, 25 February 2018 at 04:59:58 UTC, Basile B. wrote:
Use templates to prevent implicit conversion:
alias f(T = int) = (T n) => 0;
alias f(T = char) = (T n) => 'a';
alias f(T = bool) = (T n) => false;
Bug report is invalid and
On Wednesday, 14 February 2018 at 18:47:31 UTC, Jonathan Marler
wrote:
On Wednesday, 14 February 2018 at 18:44:06 UTC, user1234 wrote:
how does it mix with markdown, html etc ?
They'll have to use escapes to be compliant, haven't they ?
Works great with mardown.
```
--- file1
Contents of
On Wednesday, 14 February 2018 at 18:33:23 UTC, Jonathan Marler
wrote:
@timotheecour and I came up with a solution to a common problem:
How to represent multiple files in a forum post?
So we decided to take a stab at creating a standard! (queue
links to https://xkcd.com/927)
We're calling
On Wednesday, 14 February 2018 at 17:58:49 UTC, Meta wrote:
On Wednesday, 14 February 2018 at 16:45:49 UTC, user1234 wrote:
On Wednesday, 14 February 2018 at 01:11:33 UTC, David
Nadlinger wrote:
On Tuesday, 13 February 2018 at 23:09:07 UTC, Ali Çehreli
wrote:
David (aka klickverbot) is a
On Wednesday, 14 February 2018 at 01:11:33 UTC, David Nadlinger
wrote:
On Tuesday, 13 February 2018 at 23:09:07 UTC, Ali Çehreli wrote:
David (aka klickverbot) is a longtime D contributor […]
… who is slightly surprised at the amount of media interest
this has attracted. ;)
— David
Damn
On Monday, 1 January 2018 at 15:23:19 UTC, Adam D. Ruppe wrote:
On Monday, 1 January 2018 at 15:09:53 UTC, Lily wrote:
I started learning D a few days ago, coming from some very
basic C++ knowledge, and I'd like some help getting a program
to run faster.
So a few easy things you can do:
1)
On Monday, 1 January 2018 at 15:09:53 UTC, Lily wrote:
I started learning D a few days ago, coming from some very
basic C++ knowledge, and I'd like some help getting a program
to run faster. The code is here:
https://github.com/IndigoLily/D-mandelbrot/blob/master/mandelbrot.d
Right now it
On Friday, 29 December 2017 at 16:11:20 UTC, Dukc wrote:
I was building one example of DLangUi (dub build
--build-mode=allAtOnce --build=debuglinker) and it did compile
but the linker started to complain. I did notice it seemed to
be related to the standard library, so I updated it and
On Friday, 22 December 2017 at 10:06:18 UTC, Joakim wrote:
This one of the main strengths of D, it is what Walter focuses
on, yet I have seen almost nothing on the D blog talking about
this. What brought me to emphasize this today is this recent
post about how long it takes to compile the
On Friday, 22 December 2017 at 05:50:15 UTC, drug wrote:
22.12.2017 01:11, Steven Schveighoffer пишет:
On 12/21/17 4:55 PM, Walter Bright wrote:
[...]
We should also consider provider's name - github, bitbucket,
gitlab etc. Because there can be different (real) users with
identical names.
On Thursday, 21 December 2017 at 20:22:05 UTC, Martin Nowak wrote:
On Monday, 6 November 2017 at 16:12:14 UTC, Martin Tschierschke
wrote:
Even being the wrong Martin :-) I think the DUB registry
really needs more and better filters, so that the gems inside
can be found easily. (like: Number of
On Wednesday, 20 December 2017 at 19:11:19 UTC, Jean-Louis Leroy
wrote:
See http://rosettacode.org/wiki/Inheritance/Multiple#D
I feel that the entry is incomplete. I am a supported of
full-fledged MI, à la Common Lisp or C++, and the argument that
interfaces solve most problems that MI
On Thursday, 21 December 2017 at 02:57:00 UTC, Mike Franklin
wrote:
"Don't expect class destructors to be called at all by the GC"
I was a bit shocked to read that here:
https://p0nce.github.io/d-idioms/#The-trouble-with-class-destructors
The document tries to clarify with:
"The garbage
On Monday, 11 December 2017 at 15:45:07 UTC, Guillaume Piolat
wrote:
On Monday, 11 December 2017 at 14:22:37 UTC, Jakob Bornecrantz
wrote:
And to add more, CommonMark on the other hand has a full spec
written and several test that covers the difficult to get
right parts of
On Friday, 8 December 2017 at 22:22:14 UTC, Nick Sabalausky
(Abscissa) wrote:
On 12/08/2017 05:53 AM, Chris wrote:
Yep. D seems to be quite popular in Europe. I wonder why that
is, given that it originated in the USA and people in the
States are more open to new technologies. What were the
On Saturday, 9 December 2017 at 03:24:52 UTC, codephantom wrote:
On Saturday, 9 December 2017 at 02:45:35 UTC, rjframe wrote:
`sort` returns a SortedRange of ushorts, not an array of
ushorts. Make it:
```
import std.array : array;
return sort(numbers.take(8)).array;
```
--Ryan
That's it!
On Wednesday, 6 December 2017 at 19:19:09 UTC, A Guy With a
Question wrote:
On Wednesday, 6 December 2017 at 18:09:45 UTC, Steven
Schveighoffer wrote:
On 12/6/17 12:17 PM, Steven Schveighoffer wrote:
So why wouldn't the compiler fail? Because it has no idea yet
what you mean by Nullable. It
On Thursday, 7 December 2017 at 14:31:01 UTC, Chris wrote:
On Saturday, 2 December 2017 at 19:11:31 UTC, Dmitry Olshansky
wrote:
Truth be told I find survey largely irrelevant.
What my gender or some such have to do with D? Or my job? What
do we want to understand from that - “teenagers
On Thursday, 7 December 2017 at 12:00:00 UTC, Jonathan M Davis
wrote:
On Thursday, December 07, 2017 09:55:56 Antonio Corbi via
Digitalmars-d wrote:
Hello all,
Jussi Pakkanen (one of the meson build system creators) has
written a post comparing C, C++ and D. Worth a read.
On Wednesday, 6 December 2017 at 21:17:55 UTC, Tofu ninja wrote:
On Wednesday, 6 December 2017 at 21:12:20 UTC, Tofu ninja wrote:
I am compiling with -m64 -shared -debug -g and a .pdb is
generated but visual studio says the dll was not compiled with
debug information, am I missing something or
On Monday, 4 December 2017 at 21:22:39 UTC, Guillaume Piolat
wrote:
On Friday, 1 December 2017 at 18:56:50 UTC, WebFreak001 wrote:
Hi everyone,
I made a public survey (everyone can look at the responses)
and it would be great if you took some time and answered it. I
think it will greatly
On Friday, 1 December 2017 at 18:56:50 UTC, WebFreak001 wrote:
Hi everyone,
I made a public survey (everyone can look at the responses) and
it would be great if you took some time and answered it. I
think it will greatly benefit D as a whole if we had more
anonymous data on users. I'm also
On Friday, 1 December 2017 at 03:39:12 UTC, helxi wrote:
1. Template specialisation.
Why is this useful?:
T getResponse(T = int)(string question); And how does it differ
from
int getResponse(string question); ?
Good Q. Without thinking more it looks like a pointless example.
The only
On Friday, 1 December 2017 at 03:43:07 UTC, Adam D. Ruppe wrote:
On Friday, 1 December 2017 at 03:23:23 UTC, Walter Bright wrote:
26 bytes of inserted Bloaty McBloatface code and 15 bytes of
data. My proposal:
[...]
int 3, on the other hand, is explicitly for debugging - which
is what we want
On Wednesday, 29 November 2017 at 11:32:51 UTC, Jayam wrote:
In D lang,
[...]
3. Can we make library file and use that in any project like
'Util class' ?
Of course ! Plenty of them can be found here:
https://code.dlang.org/?sort=updated=library
On Wednesday, 29 November 2017 at 10:55:35 UTC, user1234 wrote:
On Wednesday, 29 November 2017 at 06:18:09 UTC, Fra Mecca wrote:
[...]
You must also use a type constructor later, when a
Configuration is declared:
```
immutable(Configuration) config;
config.toString.writeln; // okay this
On Wednesday, 29 November 2017 at 06:18:09 UTC, Fra Mecca wrote:
I have this struct:
immutable struct Configuration {
string title;
string baseurl;
string url;
string email;
string author;
string parser;
string target;
string urlFormat;
string urlFormatCmd;
On Monday, 27 November 2017 at 20:07:08 UTC, A Guy With a
Question wrote:
On Monday, 27 November 2017 at 19:41:03 UTC, Adam D. Ruppe
wrote:
On Monday, 27 November 2017 at 19:10:04 UTC, A Guy With a
One thing that is bugging me is having to mark up all of my
declarations with attributes.
Meh,
On Monday, 27 November 2017 at 15:34:22 UTC, Seb wrote:
On Monday, 27 November 2017 at 10:20:17 UTC, Chris wrote:
There seems to be a problem with
http://code.dlang.org/
at the moment (27.11.)
FYI there are a couple of mirrors now:
https://code-mirror.dlang.io
https://code-mirror2.dlang.io
On Monday, 27 November 2017 at 10:20:17 UTC, Chris wrote:
There seems to be a problem with
http://code.dlang.org/
at the moment (27.11.)
Yay ! It's back.
On Monday, 27 November 2017 at 10:25:20 UTC, user1234 wrote:
On Monday, 27 November 2017 at 10:20:17 UTC, Chris wrote:
There seems to be a problem with
http://code.dlang.org/
at the moment (27.11.)
Yeah again :/
Breaking TravisCI as a side effect.
Hopefully this doesn't take long to come
On Monday, 27 November 2017 at 10:20:17 UTC, Chris wrote:
There seems to be a problem with
http://code.dlang.org/
at the moment (27.11.)
Yeah again :/
Breaking TravisCI as a side effect.
Hopefully this doesn't take long to come back.
On Monday, 20 November 2017 at 12:48:10 UTC, Satoshi wrote:
On Monday, 20 November 2017 at 10:38:59 UTC, user1234 wrote:
On Saturday, 18 November 2017 at 08:59:53 UTC, Satoshi wrote:
On Saturday, 18 November 2017 at 01:31:09 UTC, Indigo wrote:
On Wednesday, 15 November 2017 at 17:32:50 UTC,
On Saturday, 18 November 2017 at 08:59:53 UTC, Satoshi wrote:
On Saturday, 18 November 2017 at 01:31:09 UTC, Indigo wrote:
On Wednesday, 15 November 2017 at 17:32:50 UTC, Satoshi wrote:
Hi,
as the title says, I'm looking for a job opportunity in the
Salary... In US you get $100,000/year as a
On Sunday, 19 November 2017 at 01:40:32 UTC, codephantom wrote:
On Saturday, 18 November 2017 at 23:21:08 UTC, user1234 wrote:
It seems that they close systematically after a month or so.
You need to hire a vilain that will do this dirty job for you
(or maybe even use a bot)...everybody will
On Saturday, 18 November 2017 at 07:52:43 UTC, Michael V.
Franklin wrote:
I'll just refer you to this comment:
https://github.com/dlang/dmd/pull/6947#issuecomment-345423103
Manually merging this pull as it sat around long enough
waiting to be marked approved that it accumulated github's max
On Saturday, 18 November 2017 at 20:06:28 UTC, 12345swordy wrote:
ATM the destroy function can't be called in a @nogc context,
severely handicap the use of the @nogc attribute. Can we add a
@nogcclass attribute for classes or at the very least have
@nogc attribute apply stricter rules when
On Thursday, 16 November 2017 at 23:03:10 UTC, H. S. Teoh wrote:
On Thu, Nov 16, 2017 at 08:21:41PM +, user1234 via
Digitalmars-d wrote:
On Thursday, 16 November 2017 at 14:11:22 UTC, Dukc wrote:
> On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei
> Alexandrescu wrote:
>
On Friday, 17 November 2017 at 14:57:52 UTC, Stas wrote:
I use and highly recommend Codelobster:
http://www.codelobster.com
https://s3.amazonaws.com/EarthwatchMedia/GalleryImages/unearthing-ancient-history-in-tuscany-c.-archeodig-h1_2196.jpg
On Thursday, 16 November 2017 at 14:11:22 UTC, Dukc wrote:
On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei
Alexandrescu wrote:
Hello, for all of you with expertise in graphics, we'd be in
your debt if you could create a logo for DConf 2018. Proposals
would be appreciated!
Thanks,
On Wednesday, 15 November 2017 at 22:43:03 UTC, codephantom wrote:
On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei
Alexandrescu wrote:
Hello, for all of you with expertise in graphics, we'd be in
your debt if you could create a logo for DConf 2018. Proposals
would be appreciated!
On Saturday, 11 November 2017 at 15:48:59 UTC, Mike Parker wrote:
On Saturday, 11 November 2017 at 15:38:18 UTC, aki wrote:
auto bytes = cast(immutable(ubyte)[])s;
Of course, if you need a mutable array you should dup:
auto bytes = cast(ubyte[])s.dup;
Not only "should" but he "must"
On Sunday, 25 June 2017 at 23:21:25 UTC, aberba wrote:
Can you share feature(s) in D people are not talking about
which you've found very useful?
I see none.
¯\_(ツ)_/¯
Everything is more or less discussed and known. I was not
surprised when i saw that the topic went OT since (almost) the
On Monday, 6 November 2017 at 20:14:17 UTC, Meta wrote:
[...]
import std.stdio;
writeln(safeDeref(tree).right.right.val.orElse(-1));
writeln(safeDeref(tree).left.right.left.right.orElse(null));
writeln(safeDeref(tree).left.right.left.right.val.orElse(-1));
vs.
writeln(tree?. right?.right?.val
On Sunday, 5 November 2017 at 14:25:24 UTC, user1234 wrote:
On Sunday, 5 November 2017 at 13:43:15 UTC, user1234 wrote:
[...]
Hmmm it was just the amount of nops.
---
import std.stdio;
alias Proc = size_t function();
size_t allInnOne()
{
asm pure nothrow
{
naked;
On Sunday, 5 November 2017 at 14:27:18 UTC, Eugene Wissner wrote:
On Sunday, 5 November 2017 at 13:43:15 UTC, user1234 wrote:
[...]
One of the problems is that "naked" is missing in your
assembly. If you write
asm pure nothrow
{
naked;
mov RAX, 1;
ret;
On Sunday, 5 November 2017 at 13:43:15 UTC, user1234 wrote:
[...]
Hmmm it was just the amount of nops.
---
import std.stdio;
alias Proc = size_t function();
size_t allInnOne()
{
asm pure nothrow
{
naked;
mov RAX, 1;
ret;
nop;nop;
mov RAX, 2;
Hello, try this:
---
import std.stdio;
alias Proc = size_t function();
size_t allInnOne()
{
asm pure nothrow
{
mov RAX, 1;
ret;
nop;nop;nop;nop;nop;nop;nop;
mov RAX, 2;
ret;
}
}
void main()
{
Proc proc1 =
Proc proc2 = cast(Proc)
On Thursday, 2 November 2017 at 20:37:11 UTC, user1234 wrote:
On Thursday, 2 November 2017 at 08:58:03 UTC, codephantom wrote:
replace function by void.
On Thursday, 2 November 2017 at 08:58:03 UTC, codephantom wrote:
Now, I'm new to D (I only discovered it a month or so
ago)...but do free floating statements already exist in the
language?
There's this one:
void main() {
int i;
switch (i)
default: break;
}
you have 3
On Thursday, 2 November 2017 at 11:13:34 UTC, Jean-Yves Vion-Dury
wrote:
Dear colleagues,
I cannot solve this compilation issue; the message is
ambiguous, in this sense that one of the proposed sulution
(line 81) is apparently the one exposed as problematic...
I suppose you meant 89 ?
On Saturday, 28 October 2017 at 11:41:16 UTC, Ryan Frame wrote:
On Tuesday, 17 May 2016 at 06:56:36 UTC, rikki cattermole wrote:
On 17/05/2016 6:55 PM, chmike wrote:
Hello,
The nice and handy documentation of dlang doesn't provide any
info on
the core.sys. How can I find out all the things
On Tuesday, 24 October 2017 at 06:49:37 UTC, abad wrote:
On Monday, 23 October 2017 at 12:41:09 UTC, Márcio Martins
wrote:
What is everyone doing to get proper file name and line number
info for callstacks with DMD?
addr2line just gives me ??:0
You could try compiling with the
On Saturday, 21 October 2017 at 21:45:11 UTC, Adam D. Ruppe wrote:
On Saturday, 21 October 2017 at 20:02:28 UTC, user1234 wrote:
I'm not sure that people talked much about the elvis operator
(which was introduced in the topic by M.Nowak). In the first
message were mentioned the null
On Saturday, 21 October 2017 at 20:17:12 UTC, NX wrote:
I was working on some sort of math library for use in graphical
computing and I wrote something like this:
const float PiOver2 = (atan(1.0) * 4) / 2;
Interestingly enough, I realized that atan() returns double (in
this case) but wait,
On Saturday, 21 October 2017 at 19:39:31 UTC, Andrei Alexandrescu
wrote:
[...]
Using the topic of the Elvis operator as a running example, a
good DIP would contain motivation such as:
* Present evidence of the successful use of ?: in other
languages
I'm not sure that people talked much
On Friday, 20 October 2017 at 21:42:32 UTC, Jonathan M Davis
wrote:
On Friday, October 20, 2017 21:32:48 Patrick via
Digitalmars-d-learn wrote:
The compiler seems to reject the following code in a class
method:
bool test = is(this : myClass);
Could some please explain this?
"this" is not a
On Friday, 20 October 2017 at 20:11:46 UTC, jmh530 wrote:
On Friday, 20 October 2017 at 19:54:09 UTC, user1234 wrote:
On Friday, 20 October 2017 at 18:11:50 UTC, Adam D. Ruppe
wrote:
[...] The elvis operator, while trivial and
unnecessary, would be easy to implement correctly and give
a nice
On Friday, 20 October 2017 at 18:11:50 UTC, Adam D. Ruppe wrote:
[...] The elvis operator, while trivial and
unnecessary, would be easy to implement correctly and give
a nice little PR boost to show that we care about the people
talking about it.
If you go by there, the safe navigation
On Wednesday, 18 October 2017 at 15:16:21 UTC, drug wrote:
18.10.2017 18:11, pham пишет:
Is there a way to identify if a type is a struct, something
like isStruct
similar to isArray.
struct X
{
}
isStruct!X == true?
Also, there are isAbstractClass & isFinalClass but want to
check if type
On Tuesday, 17 October 2017 at 17:27:17 UTC, Biotronic wrote:
On Tuesday, 17 October 2017 at 15:33:02 UTC, drug wrote:
[...]
I have very little knowledge about sbrk, so here's my solution.
Tested on win32 and win64.
[...]
Nice solution. Is `stackStart` thread local on purpose?
On Tuesday, 17 October 2017 at 15:02:29 UTC, Adam D. Ruppe wrote:
Or try this newest commit
https://github.com/adamdruppe/arsd/blob/master/terminal.d and
see if it works better for you.
in the commit message: ~~ascii~~ ANSI.
On Wednesday, 11 October 2017 at 09:27:49 UTC, John Burton wrote:
[...]
I therefore feel like I ought to not use assert and should
instead validate my assumptions with an if statement and a
throw or exit or something.
Yes, that's the way of doing. assert() are just used to test the
program.
On Sunday, 8 October 2017 at 02:58:36 UTC, Fra Mecca wrote:
On Saturday, 7 October 2017 at 23:54:50 UTC, user1234 wrote:
On Saturday, 7 October 2017 at 19:56:52 UTC, Fra Mecca wrote:
Hi all,
I am writing a backend that is partly Vibe.d and partly
clucene in c++.
I have some object files
On Saturday, 7 October 2017 at 19:56:52 UTC, Fra Mecca wrote:
Hi all,
I am writing a backend that is partly Vibe.d and partly clucene
in c++.
I have some object files written in c++ and compiled with g++
that are not considered by dub during the linking phase and
throws `function undefined
201 - 300 of 343 matches
Mail list logo