On Wednesday, 11 March 2020 at 00:24:13 UTC, jmh530 wrote:
On Tuesday, 10 March 2020 at 23:31:55 UTC, p.shkadzko wrote:
[snip]
Below does the same thing as the numpy version.
/+dub.sdl:
dependency "mir-algorithm" version="~>3.7.18"
+/
import mir.ndslice.sorting : sort;
import mir.ndslice.topo
On Wednesday, 11 March 2020 at 05:25:43 UTC, kookman wrote:
I am using libpcap to read from stored pcap files, and want to
use std.bitmanip.bitfields to read TCP flags from the file,
using a struct like:
struct TcpHeader {
align(1):
ushort srcPort;
ushort dstPort;
uint seqNo;
I am using libpcap to read from stored pcap files, and want to
use std.bitmanip.bitfields to read TCP flags from the file, using
a struct like:
struct TcpHeader {
align(1):
ushort srcPort;
ushort dstPort;
uint seqNo;
uint ackNo;
mixin(bitfields!(
bool, "flagFin",
On Tuesday, 10 March 2020 at 23:31:55 UTC, p.shkadzko wrote:
[snip]
Below does the same thing as the numpy version.
/+dub.sdl:
dependency "mir-algorithm" version="~>3.7.18"
+/
import mir.ndslice.sorting : sort;
import mir.ndslice.topology : byDim;
import mir.ndslice.slice : sliced;
void main(
I need to reproduce numpy sort for 2D array.
--
import numpy as np
a = [[1, -1, 3, 2], [0, -2, 3, 1]]
b = np.sort(a)
b
# array([[-1, 1, 2, 3],
#[-2, 0, 1, 3]])
--
Numpy sorted the array by columns, which visually look
On Monday, 13 January 2020 at 20:47:07 UTC, p.shkadzko wrote:
On Sunday, 12 January 2020 at 13:07:33 UTC, dnsmt wrote:
On Saturday, 11 January 2020 at 16:45:22 UTC, p.shkadzko wrote:
I am trying to run example code from
https://tour.dlang.org/tour/en/dub/lubeck
...
This is Linux Manjaro with
I've managed to make a cut-down version that's < 170 LOC.
It needs to be run on Debian or a Debian-based Linux (e.g.,
Ubuntu).
Below is the full source followed by the error output.
// app.d
import std.typecons: Tuple;
void main() {
import std.stdio: writeln, writefln;
auto model = Mo
On Tuesday, 10 March 2020 at 15:27:04 UTC, Steven Schveighoffer
wrote:
On 3/10/20 7:09 AM, mark wrote:
[snip]
Still, the correct thing here is to handle immutable(Deb).
However, I'd strongly caution you against casting away
immutable, that can lead to undefined behavior in D. Better to
just s
On Monday, 9 March 2020 at 22:48:35 UTC, Kendell wrote:
Hey Everyone,
I'm a new D developer and therefore new to Gtkd. By day I'm an
android developer using Kotlin and most of my hobby projects
are in Go.
[...]
I opened an issue about a year ago when I started playing around
with d. looks
On Tue, 2020-03-10 at 14:18 +, Ron Tarrant via Digitalmars-d-learn
wrote:
> On Monday, 9 March 2020 at 22:48:35 UTC, Kendell wrote:
>
> > Hey Everyone,
> >
> > I'm a new D developer and therefore new to Gtkd.
> > So far I've had no problems building this project with DUB.
> > However I want
On 3/10/20 7:09 AM, mark wrote:
I just tried:
auto jobs = tids.length;
while (jobs) {
receive(
(Deb deb) { debForName[deb.name] = cast(Deb)deb; },
(DoneMessage m) { jobs--; }
);
}
On 3/10/20 2:09 AM, tcak wrote:
I write a code as below:
auto result = new char[4];
It allocates memory as expected.
Later I define an alias and do the above step:
alias Pattern = char[4];
auto result = new Pattern;
But compiler says:
Error: new can only create structs, dynamic arrays or
On Monday, 9 March 2020 at 22:48:35 UTC, Kendell wrote:
Hey Everyone,
I'm a new D developer and therefore new to Gtkd.
So far I've had no problems building this project with DUB.
However I want to move over to meson so that I can build it for
flatpak. I am finding that I am unable to build
On Monday, 9 March 2020 at 19:10:54 UTC, Timon Gehr wrote:
https://wiki.dlang.org/DIP24
Hi , Timon Gehr
Thanks for the reply, very good DIPS.
I think this is very basic work, why the core team not take care
it for such a long time.
I just tried:
auto jobs = tids.length;
while (jobs) {
receive(
(Deb deb) { debForName[deb.name] =
cast(Deb)deb; },
(DoneMessage m) { jobs--; }
);
}
to cast away the immutable from the se
On Tuesday, 10 March 2020 at 10:02:16 UTC, Simen Kjærås wrote:
[snip]
As the error message hints at, the problem is Deb may hold
references to data that is shared with other objects on the
thread from which it originates. Since you know this is not the
case, even if the compiler can't prove it,
On Tuesday, 10 March 2020 at 08:13:19 UTC, mark wrote:
I have this struct:
struct Deb {
string name;
...
Unit[string] tags; // set of tags
Deb dup() const {
Deb deb;
deb.name = name;
...
foreach (key; tags.byKey)
deb.tags[key] = unit;
On Monday, 9 March 2020 at 09:42:16 UTC, GreatSam4sure wrote:
I want to know if it is possible to use typescript with the
vibe.d since typescript is a superset of javascript. I will
appreciate any example if it is possible
There's a Diet filter for TypeScript here [1], but it hasn't been
upda
On Tuesday, 10 March 2020 at 06:09:23 UTC, tcak wrote:
I write a code as below:
auto result = new char[4];
It allocates memory as expected.
This is a slice of four chars, which can be used as a dynamic
array.
Later I define an alias and do the above step:
alias Pattern = char[4];
This
I have this struct:
struct Deb {
string name;
...
Unit[string] tags; // set of tags
Deb dup() const {
Deb deb;
deb.name = name;
...
foreach (key; tags.byKey)
deb.tags[key] = unit;
return deb;
}
}
And I want to populate an A
20 matches
Mail list logo