On 10/28/2016 11:25 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
>> void main() {
>> @(`str`, 123) uint k;
>> foreach (a; __traits(getAttributes, k)) {
>> pragma(msg, typeof(a));
>> }
>> }
> I don't know if Typeof is actually needed for what the OP is trying
to
On 10/28/2016 05:48 AM, Temtaime wrote:
On Friday, 28 October 2016 at 12:44:20 UTC, Adam D. Ruppe wrote:
On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote:
Are there something or should I create a PR to phobos?
Why would you want that?
I have UDAs with values à la @(`str`, 123)
On Friday, October 28, 2016 11:19:46 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 10/28/2016 05:48 AM, Temtaime wrote:
> > On Friday, 28 October 2016 at 12:44:20 UTC, Adam D. Ruppe wrote:
> >> On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote:
> >>> Are there something or should I
On 10/28/2016 04:32 AM, Guillaume Piolat wrote:
> When you try shooting at your foot with your AK-47, you realize the GC
> has blown it already.
Or... the bullet stops midair, waiting for the GC to finish a collection
cycle (probably for a lollipop created in another thread).
Ali
On 10/28/2016 04:41 AM, John Colvin wrote:
> a bullet that's paused by the GC
Wow. I've just said almost the same thing before reading this one. :)
Ali
On 10/28/2016 07:37 AM, Basile B. wrote:
try this
echo "enum a = 0/0;" > d.d && dmd d.d -main
any reason for this ?
One is too easy to miss, two is better, but three is just right. :o)
Must be an implementation oddity. Please file a bug.
Ali
On Friday, 28 October 2016 at 14:31:47 UTC, Chris wrote:
On Friday, 28 October 2016 at 13:50:24 UTC, Alfred Newman wrote:
It boils down to something like:
if (c in _accent)
return _accent[c];
else
return c;
Just a normal lambda (condition true) ? yes : no;
I'd recommend you to use Marc's
On Friday, 28 October 2016 at 13:37:55 UTC, Basile B. wrote:
I would need actually something like
https://github.com/CouscousPHP/Couscous but in D.
You can easily make a custom SSG with
https://github.com/kiith-sa/dmarkdown
There isn't a official D youtube channel right?
Would be be nice to have all the D related videos spread on
youtube centralized in one place :)
Another update on CTFE.
I have found a few errors in my handling of switch-statments.
An efficient solution for this is still pending,
Futhermore I have begun to work on ctfe handling refernces.
These are a little bit harder to do in bytecode and do pessimise
performance if overused.
I hope
Someone may be, it will be interesting, in the C# 7 `switch` will
be extended syntax for pattern matching:
https://github.com/dotnet/roslyn/blob/features/patterns/docs/features/patterns.md
Original post:
https://github.com/dotnet/roslyn/issues/206
On Friday, 28 October 2016 at 14:12:53 UTC, Mike Parker wrote:
On Friday, 28 October 2016 at 13:19:19 UTC, WhatMeWorry wrote:
[...]
I generally use GLFW event callbacks to populate an event queue
with custom event types, then process the queue and handle
events elsewhere. That way, the
On Friday, 28 October 2016 at 06:31:19 UTC, Ilya Yaroshenko wrote:
On Friday, 28 October 2016 at 03:44:05 UTC, Andrei Alexandrescu
wrote:
On 10/27/16 3:59 AM, Ilya Yaroshenko wrote:
[...]
I must plead ignorance on the finer interface details, but from
what I am reading this seems like an
On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote:
Hello,
I'm getting some troubles to replace the accented letters in a
given string with their unaccented counterparts.
Let's say I have the following input string "très élégant" and
I need to create a function to return just
On Friday, October 28, 2016 10:52:05 Temtaime via Digitalmars-d-learn wrote:
> Hi !
> Tried to find
> alias Typeof(alias A) = typeof(A);
> or something, but failed.
>
> Are there something or should I create a PR to phobos?
> Thanks
If it were in Phobos, I'd expect it to be in std.meta, and it's
https://issues.dlang.org/show_bug.cgi?id=15604
Martin Krejcirik changed:
What|Removed |Added
Summary|std.array.array of structs |[REG2.070] std.array.array
On Friday, 28 October 2016 at 03:33:33 UTC, Basile B. wrote:
Hello, I think the correct isStringLiteral would be:
import
std.meta;
template isStringLiteral(alias V)
{
enum isCompileTime = is(typeof((){enum a = V;}));
enum isString = is(typeof(V) == string);
enum isStringLiteral
On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote:
Here are the specifications of token strings:
"Token strings open with the characters q{ and close with the
token }. In between must be valid D tokens. The { and }"
So we can deduce that any invalid D token inside a token string
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote:
https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing
Thanks for uploading these!
On Tuesday, 25 October 2016 at 22:53:54 UTC, Walter Bright wrote:
Eliminating loops is something D adds, and goes even further to
making code a straight line.
A problem for myself and probably many programmers, is some of
the tricks like what Linus did simply doesn't come to mind
because
On Thursday, 27 October 2016 at 13:37:29 UTC, Steven
Schveighoffer wrote:
Hm... what about:
import std.traits: Parameters;
auto mySpawn(F)(F func, Parameters!F params)
{
static auto callIt(F func, Parameters!F params)
{
try
{
return func(params);
}
On Thursday, 27 October 2016 at 12:11:09 UTC, Johan Engelen wrote:
On Thursday, 27 October 2016 at 06:43:15 UTC, Sebastien Alaiwan
If code generation/optimization is the bottleneck, a
"ccache-for-D" ("dcache"?) tool might be very beneficial.
See
On Friday, 28 October 2016 at 03:44:05 UTC, Andrei Alexandrescu
wrote:
On 10/27/16 3:59 AM, Ilya Yaroshenko wrote:
Mir GLAS (Generic Linear Algebra Subprograms) has its own
repository [1]
now.
Big news:
1. Mir GLAS does not require D / C++ runtime and can be used
in any
programming language
https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing
On Friday, 28 October 2016 at 06:21:38 UTC, Johan Engelen wrote:
On Friday, 28 October 2016 at 05:16:45 UTC, Basile B. wrote:
Here are the specifications of token strings:
"Token strings open with the characters q{ and close with the
token }. In between must be valid D tokens. The { and }"
So I'm trying to debug a project with the work flow of
ssh into remote box
edit/compile/run
if it hangs yank the power out
repeat
this appears to corrupt the the last modification time to some
time in the future and leads to the warning
File
Hello,
I've open sourced my project SoundTab:
https://github.com/buggins/soundtab/
Play like on Theremin, but instead of moving hand in the air,
move pen over wacom tablet. Volume is modulated by pen pressure,
instead of left hand movement in Theremin.
For better experience, use Wacom
On Friday, 28 October 2016 at 08:28:31 UTC, Johan Engelen wrote:
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko
wrote:
https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing
Nice :)
Something I noticed on slide 6-8. The call __adEq2
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote:
https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing
Nice :)
Something I noticed on slide 6-8. The call __adEq2 is pretty
lame, we have our fix ready:
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko wrote:
https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing
Thanks. Was it for live presentation? Is there a video?
And where is this fox from?
On Thursday, 27 October 2016 at 17:03:09 UTC, Nick Sabalausky
wrote:
On 10/27/2016 02:22 AM, Joakim wrote:
1. low-level compiled languages like C++, D, Rust, and Swift,
meant for
performance and usually experts who want to squeeze it out
2. mid-level bytecode languages like Java and C#,
On Friday, 28 October 2016 at 01:25:55 UTC, Kirill Kryukov wrote:
You shoot yourself in a tuple containing your foot, boot and
sock.
Cannot implicitly convert expression (map(shoot(foot))) of type
MapResult to std.ouch.InputRange!limb
On Friday, 28 October 2016 at 09:29:41 UTC, Chris wrote:
On Friday, 28 October 2016 at 01:25:55 UTC, Kirill Kryukov
wrote:
You shoot yourself in a tuple containing your foot, boot and
sock.
Cannot implicitly convert expression (map(shoot(foot))) of type
MapResult to
On Friday, 28 October 2016 at 08:26:03 UTC, FreeSlave wrote:
On Friday, 28 October 2016 at 06:46:27 UTC, Ilya Yaroshenko
wrote:
https://docs.google.com/presentation/d/1w1cQ8vDluglRIt8Qdnm-sY7kqxoKZxbPEWW6tR3lPpo/edit?usp=sharing
Thanks. Was it for live presentation?
Yes
Is there a video?
On Friday, 28 October 2016 at 08:28:41 UTC, Vadim Lopatin wrote:
I've open sourced my project SoundTab:
https://github.com/buggins/soundtab/
Play like on Theremin, but instead of moving hand in the air,
move pen over wacom tablet. Volume is modulated by pen pressure,
instead of left hand
On Thursday, 27 October 2016 at 22:51:13 UTC, pineapple wrote:
On Thursday, 27 October 2016 at 22:17:35 UTC, WhatMeWorry wrote:
I'm using Derelict GLFW3 and I found the following GLFW3 code
snippet in a demo.
In a small demo, crap like this usually isn't a big deal.
It's not common
On Friday, 28 October 2016 at 11:40:37 UTC, Chris wrote:
On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote:
Hello,
I'm getting some troubles to replace the accented letters in a
given string with their unaccented counterparts.
Let's say I have the following input string "très
On Friday, 28 October 2016 at 12:52:04 UTC, Marc Schütz wrote:
On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote:
[...]
import std.stdio;
import std.algorithm;
import std.uni;
import std.conv;
void main()
{
auto str = "très élégant";
immutable accents =
On Friday, 28 October 2016 at 11:41:11 UTC, John Colvin wrote:
You unregister your feet from the runtime in order to move
smoothly, wander in front of a bullet that's paused by the GC,
which then un-pauses and hits you in the foot.
This is the best one so far! This is typical D: circumvent
On Friday, 28 October 2016 at 10:43:36 UTC, thedeemon wrote:
On Wednesday, 26 October 2016 at 01:11:05 UTC, Mike Parker
wrote:
For anyone tempted to share this on /r/programming, please
wait! I hope to do a blog post about this on Friday, so I'll
post to reddit then. Thanks!
Please don't.
I would need actually something like
https://github.com/CouscousPHP/Couscous but in D.
On Tuesday, 25 October 2016 at 22:15:38 UTC, Andrei Alexandrescu
wrote:
The D Language Foundation is proud to announce its first
scholarship, offered to CS and EE students at University
"Politehnica" Bucharest in Romania. More details here:
http://dlang.org/dlangupb-scholarship.html
We are
But what about the case when default ctor is disabled ?
On Friday, 28 October 2016 at 11:20:50 UTC, Temtaime wrote:
Hi !
Is there such a magic ?
struct S { uint k = 2; }
enum Value = Foo!(S.k); // Value == 2
Thanks.
struct S { int k = 2; }
enum Value = S.init.k;
static assert (Value == 2);
Hi !
Is there such a magic ?
struct S { uint k = 2; }
enum Value = Foo!(S.k); // Value == 2
Thanks.
Hello,
I'm getting some troubles to replace the accented letters in a
given string with their unaccented counterparts.
Let's say I have the following input string "très élégant" and I
need to create a function to return just "tres elegant".
Considering we need to take care about unicode
On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote:
http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
Some entries for reference:
C
- You shoot yourself in the foot.
- You shoot yourself in the foot and then nobody else can
figure out what you did.
C++
-
On Friday, 28 October 2016 at 11:24:28 UTC, Alfred Newman wrote:
Hello,
I'm getting some troubles to replace the accented letters in a
given string with their unaccented counterparts.
Let's say I have the following input string "très élégant" and
I need to create a function to return just
On Friday, 28 October 2016 at 09:55:34 UTC, Patric Dexheimer
wrote:
On Friday, 28 October 2016 at 09:29:41 UTC, Chris wrote:
On Friday, 28 October 2016 at 01:25:55 UTC, Kirill Kryukov
wrote:
You shoot yourself in a tuple containing your foot, boot and
sock.
Cannot implicitly convert
On Wednesday, 26 October 2016 at 01:11:05 UTC, Mike Parker wrote:
For anyone tempted to share this on /r/programming, please
wait! I hope to do a blog post about this on Friday, so I'll
post to reddit then. Thanks!
Please don't. This is a total offtopic for /r/programming, don't
create the
Hi !
Tried to find
alias Typeof(alias A) = typeof(A);
or something, but failed.
Are there something or should I create a PR to phobos?
Thanks
On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote:
http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
Some entries for reference:
C
- You shoot yourself in the foot.
- You shoot yourself in the foot and then nobody else can
figure out what you did.
C++
-
On Friday, 28 October 2016 at 11:23:47 UTC, John Colvin wrote:
On Friday, 28 October 2016 at 11:20:50 UTC, Temtaime wrote:
Hi !
Is there such a magic ?
struct S { uint k = 2; }
enum Value = Foo!(S.k); // Value == 2
Thanks.
struct S { int k = 2; }
enum Value = S.init.k;
static assert
On Friday, 28 October 2016 at 15:08:59 UTC, Chris wrote:
On Friday, 28 October 2016 at 14:31:47 UTC, Chris wrote:
[...]
What you basically do is you pass the logic on to `map` and
`map` applies it to each item in the range (cf. [1]):
[...]
The life is beautiful !
Thx.
https://issues.dlang.org/show_bug.cgi?id=16643
ag0ae...@gmail.com changed:
What|Removed |Added
Keywords||ice
CC|
On Wednesday, 28 January 2015 at 07:43:35 UTC, ketmar wrote:
On Wed, 28 Jan 2015 06:58:41 +, Tom wrote:
Or is there now the possibility of disabling the GC
altogether, or replacing it with a refcounting 'GC' etc?
you still can do manual memory management with `malloc()` and
friends. but
On Friday, 28 October 2016 at 18:39:36 UTC, Ali Çehreli wrote:
On 10/28/2016 11:25 AM, Jonathan M Davis via
Digitalmars-d-learn wrote:
>> void main() {
>> @(`str`, 123) uint k;
>> foreach (a; __traits(getAttributes, k)) {
>> pragma(msg, typeof(a));
>> }
>> }
> I don't
https://issues.dlang.org/show_bug.cgi?id=16644
Issue ID: 16644
Summary: final switch on int should error unless VRP matches
all cases
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
https://issues.dlang.org/show_bug.cgi?id=16643
Issue ID: 16643
Summary: CTFE internal error with null
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
On Friday, 28 October 2016 at 11:50:20 UTC, hardreset wrote:
On Thursday, 27 October 2016 at 07:52:09 UTC, Guillaume Piolat
wrote:
On Wednesday, 26 October 2016 at 08:18:07 UTC, hardreset wrote:
Is there a page somewhere on how to program D without using
the GC?
The information is scattered.
https://issues.dlang.org/show_bug.cgi?id=16645
b2.t...@gmx.com changed:
What|Removed |Added
Keywords||CTFE
--
Hi All!
I will try to illustrate by code what exactly I have in mind:
// we have not shared class/struct with some interface.
class FooController
{
...
int foo1(int a, string b);
string foo2(Struct1 c);
...
}
// now we want to make a running task with an instance inside
auto
On Friday, 28 October 2016 at 13:19:19 UTC, WhatMeWorry wrote:
Anyone have a good example of what I should be doing?
I generally use GLFW event callbacks to populate an event queue
with custom event types, then process the queue and handle events
elsewhere. That way, the callbacks need no
On Friday, 28 October 2016 at 13:57:37 UTC, Mike Parker wrote:
How is a scholarship for CS degrees off topic?
OK, nevermind. Been a while since I looked at the sidebar.
"If there is no code in your link, it probably doesn't belong
here."
On Friday, 28 October 2016 at 13:50:24 UTC, Alfred Newman wrote:
On Friday, 28 October 2016 at 11:40:37 UTC, Chris wrote:
[...]
@Chris
As a new guy in the D community, I am not sure, but I think the
line below is something like a Python's lambda, right ?
auto removed =
try this
echo "enum a = 0/0;" > d.d && dmd d.d -main
any reason for this ?
On Friday, 28 October 2016 at 16:14:56 UTC, Sameer Pradhan wrote:
I must plead ignorance on the finer interface details, but from
what I am reading this seems like an amazing development. I am
so happy that that D has a solid base for GPU work.
The post from a few weeks back with
https://issues.dlang.org/show_bug.cgi?id=16645
Issue ID: 16645
Summary: 3 errors messages instead of 1 after CTFE divide by 0
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
On Friday, 28 October 2016 at 11:37:52 UTC, Temtaime wrote:
But what about the case when default ctor is disabled ?
Only relevant if you've written something like `@disable static S
init();`, which you shouldn't be doing anyway. `.init` is
independent of `@disable this()`
On Tuesday, 27 September 2016 at 17:53:39 UTC, Steven
Schveighoffer wrote:
On 9/27/16 1:38 PM, Mark wrote:
I've been going through Andrei's excellent book and I noticed
that the
latest printing is from 2010. Since D is still a very young
language I
can imagine it changing quite a bit within
On Monday, 24 October 2016 at 04:14:52 UTC, Nick Sabalausky wrote:
It's just...I mean, yea, it works, and you could probably DRY
it up a little with a type contructing template ("alias
RgbColor = DoMagic!RgbColor_"), but...meh...
I think the following should be better. Instead of Proxy we
On Thursday, 27 October 2016 at 07:52:09 UTC, Guillaume Piolat
wrote:
On Wednesday, 26 October 2016 at 08:18:07 UTC, hardreset wrote:
Is there a page somewhere on how to program D without using
the GC?
The information is scattered.
How do I allocate / free structs / classes on the heap
On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote:
Are there something or should I create a PR to phobos?
Why would you want that?
On Friday, 28 October 2016 at 12:44:20 UTC, Adam D. Ruppe wrote:
On Friday, 28 October 2016 at 10:52:05 UTC, Temtaime wrote:
Are there something or should I create a PR to phobos?
Why would you want that?
I have UDAs with values à la @(`str`, 123) uint k;
And i want to know a type of a
On 29/10/2016 1:35 AM, Mark wrote:
On Tuesday, 27 September 2016 at 17:53:39 UTC, Steven Schveighoffer wrote:
On 9/27/16 1:38 PM, Mark wrote:
I've been going through Andrei's excellent book and I noticed that the
latest printing is from 2010. Since D is still a very young language I
can
On Friday, 21 October 2016 at 07:56:40 UTC, Ethan Watson wrote:
On Thursday, 20 October 2016 at 19:49:42 UTC, Andrei
Alexandrescu wrote:
I think a solid DIP addressing the problem would have a good
chance to get traction.
I think all the information in this thread and the "Binding
rvalues to
76 matches
Mail list logo