On Thursday, 30 April 2020 at 18:30:14 UTC, H. S. Teoh wrote:
On Thu, Apr 30, 2020 at 06:05:55PM +, Paul Backus via
Digitalmars-d-learn wrote: [...]
Doing work in popFront instead of front is usually an
anti-pattern, since it forces eager evaluation of the next
element even when that elemen
On Thursday, 30 April 2020 at 16:21:05 UTC, Steven Schveighoffer
wrote:
I would say part of the issue is that you are doing all your
work in front and not popFront.
What happens is that Appender is a pointer-to-implementation
struct, and the compiler will allocate the first one shared
amongst
On Thursday, 30 April 2020 at 15:42:03 UTC, Casey wrote:
I'll give it a try when I get back to it (fixing lint issues),
but are you sure that's the issue? In popFront, I recreate the
appender. So, the appender should be clear before the empty
check after it processes the last of the data from
On Thursday, 30 April 2020 at 13:23:25 UTC, Paul Backus wrote:
Using a default value like this means that it will be shared
among all instances of the struct. Instead, you should set
`buff = appender!string` in the constructor, so that each
struct will have its own appender.
I'll give it a tr
On Wednesday, 29 April 2020 at 22:32:00 UTC, Simen Kjærås wrote:
I mean, it might be you messed up in posting this, but having
an empty popFront and expecting it to do something is a tad
optimistic.
I was just trying to get the example to a very minimal state. I
just added more descriptive c
Here's a minimal code example that duplicates the issue:
import std.array, std.range, std.stdio, std.traits, std.string;
auto readStream(Range)(auto ref Range r) if
(isInputRange!(Unqual!Range))
{
struct StreamRange(Range)
{
alias R = Unqual!Range;
So, I'm trying to run some tests and I had code that looks
similar to this:
unittest
{
auto range =
readStream(File("test_data/multiple.xml").byLine);
int count = 0;
while (!range.empty)
{
count++;
range.popFront();
}
On Saturday, 5 March 2016 at 18:01:48 UTC, Atila Neves wrote:
On Saturday, 5 March 2016 at 15:05:50 UTC, Casey wrote:
Hello,
I'm just starting a small project with dub and unit-threaded,
but I'm getting an issue where the file "unit_threaded.d"
cannot be found.
[...]
You mispelled "depend
On Saturday, 5 March 2016 at 18:01:48 UTC, Atila Neves wrote:
On Saturday, 5 March 2016 at 15:05:50 UTC, Casey wrote:
Hello,
I'm just starting a small project with dub and unit-threaded,
but I'm getting an issue where the file "unit_threaded.d"
cannot be found.
[...]
You mispelled "depend
Hello,
I'm just starting a small project with dub and unit-threaded, but
I'm getting an issue where the file "unit_threaded.d" cannot be
found.
Details:
DMD version: DMD64 2.070.0
Dub version: 0.9.24
Dub Config:
{
"name": "pst",
"targetType": "executable",
"targetPath": "bin",
On Friday, 14 November 2014 at 03:51:17 UTC, Adam D. Ruppe wrote:
On Friday, 14 November 2014 at 02:08:22 UTC, Casey wrote:
Well, I edited the code to add the chat button, and as I
feared it didn't recignise it in game. However, if I manually
press the chat button it'll work fine
What exactl
Aha! I found a sleep command.
On this page here:
http://forum.dlang.org/thread/diuepu$2ebg$1...@digitaldaemon.com
Looks like I'd do something like this
[code]
import std.c.time
msleep(1)
[/code]
Now I'm looking into if there's a way to send a key down, and
then up. I don't think this will
Well, I edited the code to add the chat button, and as I feared
it didn't recignise it in game. However, if I manually press the
chat button it'll work fine, so all I need to do is add that
delay in, then fine tune it to add all of the different messages
I need now.
1)What part of this do I
On Thursday, 13 November 2014 at 23:59:59 UTC, Casey wrote:
On Thursday, 13 November 2014 at 23:54:13 UTC, Casey wrote:
All on the same line... That makes a lot more sense. Sorry, I
probably just didn't understand what you meant. I'll do that
now and see if I can't get this working. Then I'l
On Thursday, 13 November 2014 at 23:54:13 UTC, Casey wrote:
All on the same line... That makes a lot more sense. Sorry, I
probably just didn't understand what you meant. I'll do that
now and see if I can't get this working. Then I'll try to get
it working in a game. I think I'll have to com
All on the same line... That makes a lot more sense. Sorry, I
probably just didn't understand what you meant. I'll do that now
and see if I can't get this working. Then I'll try to get it
working in a game. I think I'll have to come up with something
to add a delay in between the chat key d
On Thursday, 13 November 2014 at 22:28:43 UTC, Israel wrote:
On Thursday, 13 November 2014 at 22:20:58 UTC, Casey wrote:
On Thursday, 13 November 2014 at 21:56:48 UTC, Casey wrote:
On Thursday, 13 November 2014 at 16:04:43 UTC, Adam D. Ruppe
wrote:
On Thursday, 13 November 2014 at 07:01:08 UTC,
I also just now got it to CD to the right directory. I had a
suspicion it was having an issue with the second drive, and it
was. Just had to type D: and it did the rest.
On Thursday, 13 November 2014 at 21:56:48 UTC, Casey wrote:
On Thursday, 13 November 2014 at 16:04:43 UTC, Adam D. Ruppe
wrote:
On Thursday, 13 November 2014 at 07:01:08 UTC, Rikki
Cattermole wrote:
I did find this [0]. I don't know what state its in for
compilating/running ext. But it might gi
On Thursday, 13 November 2014 at 16:04:43 UTC, Adam D. Ruppe
wrote:
On Thursday, 13 November 2014 at 07:01:08 UTC, Rikki Cattermole
wrote:
I did find this [0]. I don't know what state its in for
compilating/running ext. But it might give you a good starting
point.
[0] https://github.com/pytho
On Thursday, 13 November 2014 at 02:58:02 UTC, Rikki Cattermole
wrote:
On 13/11/2014 3:45 p.m., Israel wrote:
On Thursday, 13 November 2014 at 02:00:11 UTC, Rikki Cattermole
wrote:
On 13/11/2014 2:37 p.m., Casey wrote:
On Thursday, 13 November 2014 at 01:35:28 UTC, Israel wrote:
On Wednesday,
On Thursday, 13 November 2014 at 01:35:28 UTC, Israel wrote:
On Wednesday, 12 November 2014 at 23:40:09 UTC, Casey wrote:
I'll look into that, it seems as it might work. If D would be
too hard to get working, what would you recommend? I would
assume Ptyhon or C++ would be good choices, any
On Wednesday, 12 November 2014 at 23:35:33 UTC, Israel wrote:
On Wednesday, 12 November 2014 at 19:43:49 UTC, Casey wrote:
On Wednesday, 12 November 2014 at 19:29:26 UTC, Israel wrote:
On Wednesday, 12 November 2014 at 04:56:40 UTC, Casey wrote:
also, you came to the right place. PB is extreme
On Wednesday, 12 November 2014 at 19:29:26 UTC, Israel wrote:
On Wednesday, 12 November 2014 at 04:56:40 UTC, Casey wrote:
also, you came to the right place. PB is extremely paranoid and
even more so about autohokey, so if you program your own native
macro, its not very likely it will catch it.
On Wednesday, 12 November 2014 at 08:02:06 UTC, ketmar via
Digitalmars-d-learn wrote:
On Wed, 12 Nov 2014 04:56:39 +
Casey via Digitalmars-d-learn
wrote:
D has nothing to do with your task, WinAPI does. and you'll
need alot
of expirience in reverse engineering, 'cause f...
/Long/ story short, I want to pretty much make a macro using this
program. I don't really have time to explain in further detail
at the moment, but /no/ macro program out there will do what I'm
trying to do. I want to basically make it so that when I press a
hotkey, it'll send an in game chat
Perhaps we need a built-in syntax solution as in C#, like a
"$delete".
So, two things:
1. I guess my current approach is screwed. I figured as much.
2. Seeing "$delete" makes me miss Perl/PHP variable naming. It
is one extra character, but it did make them stand out more.
Anyway, thanks.
On Tuesday, 22 April 2014 at 19:38:09 UTC, bearophile wrote:
Casey:
My question is, is there a way I can prevent this conflict
from occurring without affecting what the struct will look
like?
The usual strategy is to append an underscore. (I think C# uses
a @ prefix).
Bye,
bearophile
I'
Hello,
I'm working on some code where I'm trying to generate structs
that map to JSON documents via a mixin. That part works except
when specific variable gets created. Below is the error that I'm
getting:
source/objects.d-mixin-70(75): Error: no identifier for
declarator string
s
29 matches
Mail list logo