On 7/20/14, 5:57 AM, bearophile wrote:
In those slides as other member of the sum type they have used an
enumeration of possible error conditions (or at first even just strings
of the error messages), sometimes augmented with more information, like:
| EmailNotValid of EmailAddress
|
The v2.066.0-b5 binaries are now available:
http://wiki.dlang.org/DMD_v2.066.0-b5
Now available from youtube by default.
http://www.reddit.com/r/programming/comments/2bbklj/dconf_2014_lightning_talks/
https://twitter.com/D_Programming/status/491299147015012352
https://www.facebook.com/dlang.org/posts/888753774471638
Andrei
On Monday, 21 July 2014 at 19:13:55 UTC, Andrei Alexandrescu
wrote:
Now available from youtube by default.
http://www.reddit.com/r/programming/comments/2bbklj/dconf_2014_lightning_talks/
https://twitter.com/D_Programming/status/491299147015012352
On 07/21/2014 12:13 PM, Andrei Alexandrescu wrote:
Now available from youtube by default.
http://www.reddit.com/r/programming/comments/2bbklj/dconf_2014_lightning_talks/
https://twitter.com/D_Programming/status/491299147015012352
https://www.facebook.com/dlang.org/posts/888753774471638
Hi,
Brian's talk is enjoyable. I's an evidence that D people are in
touch with ground... rolling and laughing...
Please keep some PRs open and save some WATs for next year.
Also, we still need more explosions and planes in presentations!
But seriously, thanks Brian and others for your work.
On Monday, 21 July 2014 at 21:39:52 UTC, Ali Çehreli wrote:
Ali Çehreli's (first speaker) slides are at
http://acehreli.org/AliCehreli_assumptions.pdf
Ali
Hi,
Assume meme was great too.
Cheers,
Piotrek
On 07/21/2014 02:51 PM, Piotrek wrote:
On Monday, 21 July 2014 at 21:39:52 UTC, Ali Çehreli wrote:
Ali Çehreli's (first speaker) slides are at
http://acehreli.org/AliCehreli_assumptions.pdf
Ali
Hi,
Assume meme was great too.
Cheers,
Piotrek
Thanks! I will wait at least another year
On Monday, 21 July 2014 at 22:04:58 UTC, Ali Çehreli wrote:
Thanks! I will wait at least another year before watching the
video. I don't think I can stand seeing myself cramming 26
slides in 10 minutes! :)
Ali
I know how you feel. I don't want to watch my talk either.
On Monday, 21 July 2014 at 22:08:26 UTC, Brian Schott wrote:
On Monday, 21 July 2014 at 22:04:58 UTC, Ali Çehreli wrote:
Thanks! I will wait at least another year before watching the
video. I don't think I can stand seeing myself cramming 26
slides in 10 minutes! :)
Ali
I know how you
Brian WAT slides were absolutely brilliant, I have totally
enjoyed watching those for the second time now :)
On 7/21/2014 3:59 PM, Robert burner Schadek wrote:
On Monday, 21 July 2014 at 22:08:26 UTC, Brian Schott wrote:
On Monday, 21 July 2014 at 22:04:58 UTC, Ali Çehreli wrote:
Thanks! I will wait at least another year before watching the video. I don't
think I can stand seeing myself cramming 26
On 19/07/2014 10:32, Kagamin wrote:
Try to define a constructor with parameters, then compiler won't
generate the default constructor, so the parameterless opCall won't be
hidden.
That only works for classes, not structs.
On Sunday, 20 July 2014 at 06:06:16 UTC, bearophile wrote:
Andrew Godfrey:
2) Annotations about when a function does not expect
re-entrancy
to be possible based on call-graph analysis.
I don't understand. Assuming I know tAhis
(http://en.wikipedia.org/wiki/Reentrancy_%28computing%29 ) can
Hi,
I have a C variadic function (passed from C code into my D code via
function pointer) that I need to call with a static array.
So according to the D documentation, static arrays are passed by value
in D2 and by reference in C and D1.
(Even though http://dlang.org/abi.html claims Static
On Sunday, 20 July 2014 at 16:00:41 UTC, Daniel Gibson wrote:
Hi,
I have a C variadic function (passed from C code into my D code
via function pointer) that I need to call with a static array.
So according to the D documentation, static arrays are passed
by value in D2 and by reference in C
On 7/20/14, 2:22 AM, Tove wrote:
On Friday, 18 July 2014 at 17:40:23 UTC, Timon Gehr wrote:
On 07/18/2014 12:00 AM, Trass3r wrote:
void foo(int a, int b = a)
{
}
is illegal in C++ because order of evaluation is undefined.
But since D defines the order to be left to right couldn't it also
Pros
The lighning talk about the std.logger proposal at DConf 2014 had
a positive impact.
We were able to change the Current D Use entry of our company
from
Uses D2 / Phobos, Tango (log, xml)
to
Uses D2 / Phobos, Tango (xml).
(We got rid of tango.util.log; we still rely on the
On Sunday, 20 July 2014 at 10:19:10 UTC, Jonathan M Davis wrote:
Do we really want to be naming functions which aren't
properties with adjectives instead of verbs?
Yes. We have parens for denoting functions.
Oh wait.
I posted in the wrong thread.
Daniel Gibson:
For normal functions http://dlang.org/interfaceToC.html tells
me to add a ref in the function signature, to tell D to pass
it by reference (couldn't this be implicit for extern (C)
functions?)
I don't know why D isn't adapting such things to the needs of C.
Bye,
bearophile
On Thursday, 17 July 2014 at 17:27:37 UTC, bearophile wrote:
Uranuz:
OK. Thanks. Using casts everywhere for such case us quite
annoying. I've tested it for plain array it doesn't work too.
However issue is marked as solved for it.
It's not exactly the same issue. Issue 3543 seems more
On Friday, 18 July 2014 at 09:25:46 UTC, Chris wrote:
On Thursday, 17 July 2014 at 18:19:04 UTC, H. S. Teoh via
Digitalmars-d wrote:
On Thu, Jul 17, 2014 at 05:58:14PM +, Chris via
Digitalmars-d wrote:
On Thursday, 17 July 2014 at 17:49:24 UTC, H. S. Teoh via
Digitalmars-d
wrote:
[...]
On Sunday, 20 July 2014 at 11:09:45 UTC, Tobias Müller wrote:
Marc Schütz schue...@gmx.net wrote:
On Saturday, 19 July 2014 at 19:49:24 UTC, Ola Fosheim Grøstad
wrote:
On Saturday, 19 July 2014 at 08:34:39 UTC, Kagamin wrote:
Can't it simply generate code as is? Seems wasteful to spend
On 7/20/2014 3:27 AM, Dmitry Olshansky wrote:
Functional programming is full of simple recursion and it would be nice not to
stack overflow in debug builds.
Traditional FP languages don't have loops, and so must do recursion. D has
loops, even in pure functions, there's no reason not to use
Am 20.07.2014 18:37, schrieb bearophile:
Daniel Gibson:
For normal functions http://dlang.org/interfaceToC.html tells me to
add a ref in the function signature, to tell D to pass it by
reference (couldn't this be implicit for extern (C) functions?)
I don't know why D isn't adapting such
On Sunday, 20 July 2014 at 09:21:13 UTC, Alix Pexton wrote:
others. I have not been able to discover if Germany is one of
those countries or not.
It doesn't matter. The Bern convention requires that you give
foreign works the same protection as local works. So if you
publish globally you
Do we really want to be naming functions which aren't
properties with adjectives instead of verbs? That seems very
wrong to me. I'd much rather see stuff like setExt or
setExtLazy than withExtension or extensionSet. Function names
are supposed to be verbs unless they're emulating variables.
On 7/19/2014 11:06 PM, Meta wrote:
I have to ask
now, what features of other games (probably tabletop based, given the time) did
YOU take inspiration from for the first version of Empire, Walter?
Mainly Risk.
On 7/20/2014 1:50 PM, Walter Bright wrote:
Both of these are worthy of bugzilla enhancement requests.
Amazingly, these suddenly appeared:
https://issues.dlang.org/show_bug.cgi?id=13169
https://issues.dlang.org/show_bug.cgi?id=13170
Walter Bright:
https://issues.dlang.org/show_bug.cgi?id=13169
https://issues.dlang.org/show_bug.cgi?id=13170
Are such optimizations portable and guaranteed on all D
compilers? If the answer is negative, then they can't replace a
_standard_ D syntax for computed gotos.
Bye,
bearophile
On 7/20/2014 3:10 PM, Dmitry Olshansky wrote:
The computed goto is faster for two reasons, according to the article:
1.The switch does a bit more per iteration because of bounds checking.
Now let's consider proper implementation of thread-code interpreter.
where *code pointer points to an
21-Jul-2014 00:50, Walter Bright пишет:
On 7/20/2014 3:27 AM, Dmitry Olshansky wrote:
Functional programming is full of simple recursion and it would be
nice not to
stack overflow in debug builds.
Traditional FP languages don't have loops, and so must do recursion. D
has loops, even in pure
On 7/20/2014 2:38 PM, bearophile wrote:
Are such optimizations portable and guaranteed on all D compilers? If the answer
is negative, then they can't replace a _standard_ D syntax for computed gotos.
C'mon, bearophile. Optimizations are always implementation dependent. People
rely on them for
Phobos pull request 2266 [1] has been blocked by an ICE (issue 12057
[2]) for almost a month now. I'm wondering if somebody more familiar
with dmd internals can help fix it. I've managed to reduce the code
down to a minimal (or close to minimal) test case:
// Compile with: dmd -O
(I hope OK to post:)
Location: Silicon Valley /San Jose, CA/ or Dallas TX.
Current 'app' version is mostly Java/Tomcat, so will need to
maintain that while writing a new version, likely mostly D (
possibly Qt depending on GC ). (Also a few lines assembly, C, IOS
Objective C, Andorid as
On 07/20/2014 10:50 PM, Walter Bright wrote:
On 7/20/2014 3:27 AM, Dmitry Olshansky wrote:
Functional programming is full of simple recursion and it would be
nice not to
stack overflow in debug builds.
Traditional FP languages don't have loops, and so must do recursion.
Uh...
D has loops,
On 7/20/2014 8:15 PM, Timon Gehr wrote:
On 07/20/2014 10:50 PM, Walter Bright wrote:
On 7/20/2014 3:27 AM, Dmitry Olshansky wrote:
Functional programming is full of simple recursion and it would be
nice not to
stack overflow in debug builds.
Traditional FP languages don't have loops, and so
Daniel Gibson wrote in message news:lqh3vb$c2b$1...@digitalmars.com...
* passing stuff to the function is done as C expects it (not done,
also: are there other cases than the static array one that are
different?)
Dynamic arrays.
D used to allow passing static and dynamic arrays to C
On Thursday, 17 July 2014 at 21:51:54 UTC, bearophile wrote:
Walter Bright:
The fear of breaking code should NOT freeze our brains in
terror. For each sigh of broken code could exist one thousand
sighs caused by broken designs that will keep causing troubles
forever.
+1
---
Paolo
On Thursday, 17 July 2014 at 21:03:08 UTC, Walter Bright wrote:
Did you see my response?
I suggested recognizing in the parser:
( Identifier )
as a special case, in addition to using Parser::isDeclaration().
I just want to point out that this special case is lacking, and
will inevitably
On 7/20/14, 8:15 PM, Timon Gehr wrote:
On 07/20/2014 10:50 PM, Walter Bright wrote:
On 7/20/2014 3:27 AM, Dmitry Olshansky wrote:
Functional programming is full of simple recursion and it would be
nice not to
stack overflow in debug builds.
Traditional FP languages don't have loops, and so
Marc Schütz schue...@gmx.net wrote:
On Sunday, 20 July 2014 at 11:09:45 UTC, Tobias Müller wrote:
Marc Schütz schue...@gmx.net wrote:
On Saturday, 19 July 2014 at 19:49:24 UTC, Ola Fosheim Grøstad wrote:
On Saturday, 19 July 2014 at 08:34:39 UTC, Kagamin wrote:
Can't it simply generate code
Jacob Carlborg:
Error: AA key type TagIndex now requires equality rather than
comparison
Hashing protocol has being finally fixed.
What exactly do I need to define to have a struct with two ints
working as a key in an associative array?
opEquals and opHash. But if your struct has only
Am 21.07.2014 16:34, schrieb bearophile:
Ary Borenszweig:
Wat?
Hash methods should be automatic for simple structs.
Bye,
bearophile
That would be too much magic = special cases one has to know about.
Cheers,
Daniel
Daniel Gibson:
That would be too much magic = special cases one has to know
about.
What special cases? It works for POD structs. If you want a
different hashing behavior (example: you want to ignore some
fields), you define the two methods.
struct Foo {
double x;
int y;
Ary Borenszweig:
Wat?
Hash methods should be automatic for simple structs.
Bye,
bearophile
On Sunday, 20 July 2014 at 12:30:02 UTC, Mike wrote:
Yes, I believe you are correct. I also believe there is even a
GCStub in the runtime that uses malloc without free. What's
missing is API documentation and examples that makes such
features accessible.
The existing functions should be
Basile Burg:
If you still feel ok today then dont read this:
-
module meh;
import std.stdio;
//https://stackoverflow.com/questions/24676375/why-does-int-i-1024-1024-1024-1024-compile-without-error
static shared immutable int o = 1024 * 1024 * 1024 * 1024;
void main(string
On Wednesday, 16 July 2014 at 21:26:41 UTC, Gary Willoughby wrote:
This was asked a few years ago and i could find a definitive
answer.
http://forum.dlang.org/thread/jo2c0a$31hh$1...@digitalmars.com
On Saturday, 5 May 2012 at 04:57:48 UTC, Alex Rønne Petersen
wrote:
I don't think the
On 7/21/14, 9:49 AM, bearophile wrote:
But if your struct has only two ints as fields, it
should work even if you don't define both methods.
Wat?
What's up with associative arrays, opCmp, opEquals and toHash in
2.066.0-b4. I'm trying to compile Tango with the latest beta and I'm
getting this error:
Error: AA key type TagIndex now requires equality rather than comparison
Four months ago opCmp was added to TagIndex to fix some compile
On Monday, 21 July 2014 at 02:43:51 UTC, Vic wrote:
(I hope OK to post:)
Location: Silicon Valley /San Jose, CA/ or Dallas TX.
Current 'app' version is mostly Java/Tomcat, so will need to
maintain that while writing a new version, likely mostly D (
possibly Qt depending on GC ). (Also a few
On Friday, 18 July 2014 at 20:35:33 UTC, Walter Bright wrote:
On 7/18/2014 12:40 PM, Tourist wrote:
Are you planning to deprecate the non-lazy functions at some
(maybe very
distant) point?
No. Phobos has already gone through multiple rounds of
renaming/deprecation, all at considerable
On 19/07/2014 01:31, Timon Gehr wrote:
auto createBuffer(T,alias size)(T[]
buf=(cast(T*)alloca(size))[0..size]){ return buf; }
alloca(T.sizeof * size)
I'm having all sorts of visibility problems.
I have this:
app/system/...
app/system/widgets/...
The 'system'/manager should be able to access all the widgets internals,
but things outside the system shouldn't be able to touch the internals.
This is what 'package' is supposed to be for,
On 2014-07-21 14:49, bearophile wrote:
opEquals and opHash. But if your struct has only two ints as fields, it
should work even if you don't define both methods.
If the struct already has opCmp I need to defined opEquals and toHash?
--
/Jacob Carlborg
On Sunday, 20 July 2014 at 10:01:27 UTC, Paulo Pinto wrote:
Since this theme keeps being discussed.
Here is some info how Unreal Engine makes use of GC in C++.
https://wiki.unrealengine.com/Garbage_Collection_Overview
--
Paulo
If that wiki page is up-to-date (and I don't see why it
Jacob Carlborg:
If the struct already has opCmp I need to defined opEquals and
toHash?
From what I know, the new hash protocol requires toHash and
opEquals. I think that now opCmp is not used by hashing. I don't
know if you define just toHash and opCmp it uses opCmp as
fallback.
Bye,
On 7/21/14, 11:39 AM, Daniel Gibson wrote:
Am 21.07.2014 16:34, schrieb bearophile:
Ary Borenszweig:
Wat?
Hash methods should be automatic for simple structs.
Bye,
bearophile
That would be too much magic = special cases one has to know about.
Cheers,
Daniel
Ah, good. I though it only
On Monday, 21 July 2014 at 17:32:53 UTC, Manu via Digitalmars-d
wrote:
I'm having all sorts of visibility problems.
I have this:
app/system/...
app/system/widgets/...
The 'system'/manager should be able to access all the widgets
internals,
but things outside the system shouldn't be able
H. S. Teoh via Digitalmars-d wrote in message
news:mailman.32.1405963928.32463.digitalmar...@puremagic.com...
Phobos pull request 2266 [1] has been blocked by an ICE (issue 12057
[2]) for almost a month now. I'm wondering if somebody more familiar
with dmd internals can help fix it. I've
On Mon, Jul 21, 2014 at 04:42:34PM +, bearophile via Digitalmars-d wrote:
Jacob Carlborg:
If the struct already has opCmp I need to defined opEquals and toHash?
From what I know, the new hash protocol requires toHash and opEquals. I
think that now opCmp is not used by hashing.
Yes,
On 7/17/2014 9:27 AM, Tero wrote:
Just watched Don's DConf 2014 talk where he said D has to be ruthless about
memory inefficiency. Here's one thing that I think could help avoid unnecessary
garbage: built-in syntax for this:
import core.stdc.stdlib : alloca;
ubyte[] buffer = (cast(ubyte*)
A rule I learned from writing Java is that if you implement
equality, you must also implement hashing, and if you implelement
hashing you must implement equality. I believe this is actually a
general truth of programming in any language, and now D has the
right kind of semantics.
On an off
On Sun, 2014-07-20 at 16:40 +, Paulo Pinto via Digitalmars-d wrote:
[…]
Java has AOT compilers available since the early days. Most
developers just tend to ignore them, because they are not part of
the free package.
Also, it is not entirely clear that AOT optimization can beat JIT
On Mon, Jul 21, 2014 at 06:28:48PM +, w0rp via Digitalmars-d wrote:
A rule I learned from writing Java is that if you implement equality,
you must also implement hashing, and if you implelement hashing you
must implement equality. I believe this is actually a general truth of
programming
On 2014-07-21 20:17, H. S. Teoh via Digitalmars-d wrote:
I'm inclined to say, file a regression bug. If opCmp is defined but
opEquals isn't, the compiler should auto-generate opEquals (as
opCmp(...)==0). Requiring the user to implement a separate opEquals
when opCmp is already there is
Am 21.07.2014 18:05, schrieb fra:
On Sunday, 20 July 2014 at 10:01:27 UTC, Paulo Pinto wrote:
Since this theme keeps being discussed.
Here is some info how Unreal Engine makes use of GC in C++.
https://wiki.unrealengine.com/Garbage_Collection_Overview
--
Paulo
If that wiki page is
On 07/21/14 16:32, bearophile via Digitalmars-d wrote:
https://github.com/D-Programming-Language/dmd/pull/1803
Disallowing integer overflow just at CT is not (sanely) possible
in a language with D's CTFE capabilities. (Would result in code
that compiles and works at runtime, but is not
On Monday, 21 July 2014 at 19:33:32 UTC, Artur Skawina via
Digitalmars-d wrote:
Disallowing integer overflow just at CT is not (sanely) possible
in a language with D's CTFE capabilities. (Would result in code
that compiles and works at runtime, but is not ctfe-able)
I'd like to see compile
On Sunday, 20 July 2014 at 07:27:36 UTC, Walter Bright wrote:
What about the @continuation
(http://en.wikipedia.org/wiki/Continuation-passing_style )?
I doubt they'll want to use that attribute, either.
Especially if that can be done with AST macros :D
On Monday, 21 July 2014 at 18:31:46 UTC, Russel Winder via
Digitalmars-d wrote:
On Sun, 2014-07-20 at 16:40 +, Paulo Pinto via
Digitalmars-d wrote:
[…]
Java has AOT compilers available since the early days. Most
developers just tend to ignore them, because they are not part
of the free
Hello !
When getting runtime errors the stack trace on terminal is a lot
confuse and hard to work with simple tools like scite text
editor, also there is a difference between windows/linux, windows
get a bit better/clean stack trace and includes line numbers,
where is this info generated to
After writing this post I found the place and the why:
- druntime/src/core/runtime.d
- Window implementation has extra code that search for more info
to display
- Linux only make calls to execinfo functions and dump what it
gets
On linux more work should be done to get line infos, I'm
On 07/21/14 21:53, via Digitalmars-d wrote:
On Monday, 21 July 2014 at 19:33:32 UTC, Artur Skawina via Digitalmars-d
wrote:
Disallowing integer overflow just at CT is not (sanely) possible
in a language with D's CTFE capabilities. (Would result in code
that compiles and works at runtime, but
Andrew Godfrey x...@y.com wrote:
1) A function annotation that means I will call myself
recursively, and when I do, I expect the tail recursion
optimization. I have seen code which allocates something big on
the stack and depends on the optimization. So this intent should
be expressible.
Tobias Müller:
Wouldn't it be more useful to have a modified/annotated return
statement for that?
I don't know.
Tail-recursiveness is an implementation detail, for the user of
the function it's not really interesting.
Yes, in theory a @tailrec annotation doesn't change the mangling
of
On linux more work should be done to get line infos, I'm
investigating how to get then.
Cheers !
That's the spirit!
On 07/21/2014 06:40 AM, Andrei Alexandrescu wrote:
On 7/20/14, 8:15 PM, Timon Gehr wrote:
On 07/20/2014 10:50 PM, Walter Bright wrote:
On 7/20/2014 3:27 AM, Dmitry Olshansky wrote:
Functional programming is full of simple recursion and it would be
nice not to
stack overflow in debug builds.
On 07/21/2014 06:56 AM, Walter Bright wrote:
On 7/20/2014 8:15 PM, Timon Gehr wrote:
On 07/20/2014 10:50 PM, Walter Bright wrote:
On 7/20/2014 3:27 AM, Dmitry Olshansky wrote:
Functional programming is full of simple recursion and it would be
nice not to
stack overflow in debug builds.
Andrei Alexandrescu:
And that doesn't look awkward at all :o). -- Andrei
A related thread:
http://stackoverflow.com/questions/6622524/why-is-haskell-sometimes-referred-to-as-best-imperative-language
Bye,
bearophile
On Sunday, 20 July 2014 at 16:15:53 UTC, linkrope wrote:
Pros
The lighning talk about the std.logger proposal at DConf 2014
had a positive impact.
We were able to change the Current D Use entry of our company
from
Uses D2 / Phobos, Tango (log, xml)
to
Uses D2 / Phobos, Tango
On 07/22/2014 12:10 AM, bearophile wrote:
Except for the fact that it has bounded stack size which is a useful
property by itself and not only for tailrecursive functions.
Yes, that's why I have said that a @continuation is a more general
solution than @tailrec.
Bye,
bearophile
On Monday, 21 July 2014 at 21:06:54 UTC, Domingo Alvarez Duarte
wrote:
After writing this post I found the place and the why:
- druntime/src/core/runtime.d
- Window implementation has extra code that search for more
info to display
- Linux only make calls to execinfo functions and dump what it
On Monday, 21 July 2014 at 14:32:38 UTC, bearophile wrote:
Basile Burg:
If you still feel ok today then dont read this:
-
module meh;
import std.stdio;
//https://stackoverflow.com/questions/24676375/why-does-int-i-1024-1024-1024-1024-compile-without-error
static shared
On 7/21/2014 3:25 PM, Timon Gehr wrote:
The example just uses the ST Monad which is quite similar to weakly pure
statements in D.
D doesn't have weakly pure statements - it has weakly pure functions.
On Monday, 21 July 2014 at 21:10:43 UTC, Artur Skawina via
Digitalmars-d wrote:
For D that is not possible -- if an expression is valid at
run-time
then it should be valid at compile-time (and obviously yield
the same
value). Making this aspect of CT evaluation special would make
CTFE
much
On 2014-07-20 01:40, Mike wrote:
Interesting! How was the original port from SWT to DWT done? Was some
utility used?
It's manually ported. There was a try to create a tool [1] to
automatically port the code but that required a too big part of the Java
standard library to be ported as well.
On 2014-07-20 15:52, Jacob Carlborg wrote:
It's manually ported. There was a try to create a tool [1] to
automatically port the code but that required a too big part of the Java
standard library to be ported as well.
It might be worth investigation to try and do an automatic port again. I
On Sunday, 20 July 2014 at 19:33:35 UTC, Jacob Carlborg wrote:
On 2014-07-20 15:52, Jacob Carlborg wrote:
It's manually ported. There was a try to create a tool [1] to
automatically port the code but that required a too big part
of the Java
standard library to be ported as well.
It might
On 21/07/14 03:00, Mike wrote:
Well, what's the GUI future of D? Does DWT have a role to play?
If we could make the process completely automatic (or nearly automatic)
to make it easy to keep up with SWT. And also create a GUI builder then
I think DWT is in a very good position.
--
/Jacob
On 2014-07-21 11:52, Mike wrote:
Or, is there a utility out there that can dump Java source to xml or
something more consumable by D? Then I might have some hope.
No, not that I know of. You might be able to find a Java grammar for
some parser generator that could be used. But, as I wrote
Hey guys. Can someone explain me, why this code does only works
with the inline assembler version but not with the mixin?
Thanks in advance!
Code:
import std.stdio : writeln;
import std.conv : to;
template Vala(uint count, alias arr) {
immutable string c = to!string(count);
sigod:
, but I see few mistakes in your code:
What's unfortunate is the silence of the compiler about that
programmer mistake :-)
Bye,
bearophile
For clarification: how would that work without mixin + string?
enum Vala(uint count, alias arr) = format(
asm {
sub ESP, %d; // Reserve 'count' bytes
mov %s, %d; // Set a.length = 'count'
mov %s + 4, ESP; // Set a[0] to reserved bytes
}, count, arr.stringof, count, arr.stringof);
I'd like to write that more like
On Sunday, 20 July 2014 at 14:44:07 UTC, sigod wrote:
On Sunday, 20 July 2014 at 14:18:58 UTC, Foo wrote:
template Vala(uint count, alias arr) {
immutable string c = to!string(count);
enum Vala = asm { sub ESP, ~ c ~ ; mov ~ arr.stringof ~
,
~ c ~ ; mov ~ arr.stringof ~ + 4,
On Sunday, 20 July 2014 at 14:46:32 UTC, bearophile wrote:
enum Vala(uint count, alias arr) = format(
asm {
sub ESP, %d; // Reserve 'count' bytes
mov %s, %d; // Set a.length = 'count'
mov %s + 4, ESP; // Set a[0] to reserved bytes
}, count, arr.stringof,
On Sunday, 20 July 2014 at 14:55:00 UTC, Foo wrote:
For clarification: how would that work without mixin + string?
I tried this:
mixin template Vala2(uint count, alias arr) {
asm {
sub ESP, count;
mov arr, count;
mov arr + 4, ESP;
1 - 100 of 227 matches
Mail list logo