On 11/9/22 11:30, Vladimir Panteleev wrote:
> On Wednesday, 9 November 2022 at 19:05:58 UTC, Ali Çehreli wrote:
>> Running the program shows no output; 'a' is not visited as a directory
>> entry.
>
> That's not what happens for me:
Does not happen for me today either. (?) I must have confused mys
Hi,
Anyone can help explain what is the difference between
x.atomicOp!"+="(1) and atomicFetchAdd(x, 1)?
From the doc, their return values are different
atomicOp
Performs the binary operation 'op' on val using 'mod' as the
modifier.
Returns:
The result of the operation.
atomicFetchAdd
Atom
On Thursday, 10 November 2022 at 17:04:31 UTC, mw wrote:
Hi,
Anyone can help explain what is the difference between
x.atomicOp!"+="(1) and atomicFetchAdd(x, 1)?
Looking at the source in druntime, `atomicOp!"+="` forwards to
`atomicFetchAdd` internally, so they should have the same
behavior.
On Thursday, 10 November 2022 at 18:30:16 UTC, Paul Backus wrote:
On Thursday, 10 November 2022 at 17:04:31 UTC, mw wrote:
Hi,
Anyone can help explain what is the difference between
x.atomicOp!"+="(1) and atomicFetchAdd(x, 1)?
Looking at the source in druntime, `atomicOp!"+="` forwards to
`
On Thursday, 10 November 2022 at 16:34:53 UTC, Ali Çehreli wrote:
On 11/9/22 11:30, Vladimir Panteleev wrote:
> On Wednesday, 9 November 2022 at 19:05:58 UTC, Ali Çehreli
wrote:
>> Running the program shows no output; 'a' is not visited as a
directory
>> entry.
>
> That's not what happens for me:
On Thu, Nov 10, 2022 at 07:07:33PM +, Imperatorn via Digitalmars-d-learn
wrote:
> On Thursday, 10 November 2022 at 16:34:53 UTC, Ali Çehreli wrote:
> > On 11/9/22 11:30, Vladimir Panteleev wrote:
> > > On Wednesday, 9 November 2022 at 19:05:58 UTC, Ali Çehreli
> > > wrote:
> > >> Running the p
On 11/9/22 12:06, Ali Çehreli wrote:
> I am using its sibling 'ftw'
Now that we know that dirEntries works properly, I decided not to use ftw.
However, ftw performs about twice as fast as dirEntries (despite some
common code in the implementation below). I am leaving it here in case
somebody
I'm trying to make a more thread-safe wrapper for AA's:
```
synchronized final class SyncAA(K, V) ///
{
///
V opIndex(K key) { return data_[key]; }
///
V opIndexAssign(V value, K key) { return data_[key] = value; }
///
K[] keys() const { return data_.keys; }
///
I have an array of self-written class `A`. I'm sorry for my
tactlessness, but I'm confused about the modules. How do I
correctly find a specific object `fragment` inside the array and
delete it? I don't quite understand which modules to use to do
this optimally.
```d
A[] arr;
A fragment = new
On Thu, Nov 10, 2022 at 11:26:45PM +, Alexander Zhirov via
Digitalmars-d-learn wrote:
> I have an array of self-written class `A`. I'm sorry for my tactlessness,
> but I'm confused about the modules. How do I correctly find a specific
> object `fragment` inside the array and delete it? I don't
On Thursday, 10 November 2022 at 23:36:29 UTC, H. S. Teoh wrote:
On Thu, Nov 10, 2022 at 11:26:45PM +, Alexander Zhirov via
Digitalmars-d-learn wrote:
I have an array of self-written class `A`. I'm sorry for my
tactlessness, but I'm confused about the modules. How do I
correctly find a spec
On Thursday, 10 November 2022 at 21:55:26 UTC, torhu wrote:
I'm trying to make a more thread-safe wrapper for AA's:
```
synchronized final class SyncAA(K, V) ///
I chose to fix this by just using `synchronized (this)` inside
each method instead, for now. Still interested in cleaner
solutions
Wondering if someone can help me with this. Mr. Adam D. Ruppe got
me 90% there, but I'm a little lost after reaching the 99% mark.
I want to use XLSX I/O to manipulate excel spreadsheets.
I've cloned, built, and installed the library. And with the help
of Adam, I am now able to import it and l
On Friday, 11 November 2022 at 01:09:54 UTC, torhu wrote:
On Thursday, 10 November 2022 at 21:55:26 UTC, torhu wrote:
I'm trying to make a more thread-safe wrapper for AA's:
```
synchronized final class SyncAA(K, V) ///
I chose to fix this by just using `synchronized (this)` inside
each meth
On Friday, 11 November 2022 at 00:02:09 UTC, Alexander Zhirov
wrote:
```d
import std.algorithm;
arr = arr.remove(arr.countUntil(fragment));
```
And will this method work?
```d
A[] arr;
A fragment = new A;
...
remove(current => current == fragment)(arr);
```
On Friday, 11 November 2022 at 05:36:37 UTC, Alexander Zhirov
wrote:
On Friday, 11 November 2022 at 00:02:09 UTC, Alexander Zhirov
wrote:
```d
import std.algorithm;
arr = arr.remove(arr.countUntil(fragment));
```
And will this method work?
```d
A[] arr;
A fragment = new A;
...
remove(current
16 matches
Mail list logo