On Wednesday, 28 October 2020 at 21:56:46 UTC, Anonymouse wrote:
On Wednesday, 28 October 2020 at 19:34:43 UTC, ikod wrote:
To make this transition as painless as possible I'll create
new package with major version "2" if you confirm that
everything works as expected.
...
No vibe-d downloaded
On Thursday, 29 October 2020 at 01:26:38 UTC, Mike Parker wrote:
enum int[] arr = [1,2,3];
someFunc(arr);
This is identical to
someFunc([1,2,3]);
Manifest constants have no address. They are effectively
aliases for their values.
Hi Mike,
I really didn't know about this.
Thanks for the in
On Thursday, 29 October 2020 at 00:55:29 UTC, matheus wrote:
On Wednesday, 28 October 2020 at 22:07:06 UTC, H. S. Teoh wrote:
... (This is why it's a bad idea to use enum with an array
literal, because every time it's referenced you get a new copy
of the array.)
...
Could you please give an
On Wednesday, 28 October 2020 at 22:07:06 UTC, H. S. Teoh wrote:
... (This is why it's a bad idea to use enum with an array
literal, because every time it's referenced you get a new copy
of the array.)
...
Could you please give an example (Snippet) about this?
Matheus.
IMO, 3rd party libraries should always be in their own package
namespace. Leave the top-level for user code! Why should a
local module 'util' conflict with any dependency? It should be
the library author's job to make sure his code doesn't conflict
with the user's!
logged:
https://github.
On Wed, Oct 28, 2020 at 10:52:33PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Wednesday, 28 October 2020 at 22:43:12 UTC, mw wrote:
> > I wonder what's the best way to resolve this conflict, i.e my local
> > file name with 3rd party library dir name.
>
> Don't write any module with
On Wednesday, 28 October 2020 at 22:52:33 UTC, Adam D. Ruppe
wrote:
On Wednesday, 28 October 2020 at 22:43:12 UTC, mw wrote:
I wonder what's the best way to resolve this conflict, i.e my
local file name with 3rd party library dir name.
Don't write any module with a single name unless you are
On Wednesday, 28 October 2020 at 22:43:12 UTC, mw wrote:
I wonder what's the best way to resolve this conflict, i.e my
local file name with 3rd party library dir name.
Don't write any module with a single name unless you are
guaranteed to never import it.
pyd should have called it like `modu
I run into a similar issue today:
-- I try to use a library `pyd`, and
-- my local project has a file called "source/util.d"
the dub build error out:
/.dub/packages/pyd-0.13.1/pyd/infrastructure/util/typelist.d(1,1): Error:
package name 'util' conflicts with usage as a module name in file sour
On Wednesday, 28 October 2020 at 21:54:19 UTC, Jan Hönig wrote:
shared immutable x = 1;
Is there a point to add shared to an immutable? Aren't immutable
implicitly also shared?
On Wed, Oct 28, 2020 at 09:54:19PM +, Jan Hönig via Digitalmars-d-learn
wrote:
> Maybe this is a silly question, but I don't understand completely the
> difference between an `enum` and a `shared immutable`.
>
> I could have:
>
> enum x = 1;
>
> or
>
> shared immutable x = 1;
>
> What is
On Wednesday, 28 October 2020 at 19:34:43 UTC, ikod wrote:
To make this transition as painless as possible I'll create new
package with major version "2" if you confirm that everything
works as expected.
I tried cloning requests from git and added it as a dub package,
and it seems to work.
Maybe this is a silly question, but I don't understand completely
the difference between an `enum` and a `shared immutable`.
I could have:
enum x = 1;
or
shared immutable x = 1;
What is the exact difference between those too?
My best guess is, that shared immutable gets initialized during
On 10/28/20 9:30 AM, Paul wrote:
> On Wednesday, 28 October 2020 at 15:40:23 UTC, aberba wrote:
>> Have you tries .values() function? dictionary.values.sort()
>
> Thanks aberba. Yes, that was my first attempt!
>
> If my terminology is correct that gives me a "range" of sorted VALUES.
No, both .v
On Tuesday, 27 October 2020 at 22:15:34 UTC, Anonymouse wrote:
On Tuesday, 27 October 2020 at 21:15:35 UTC, ikod wrote:
On Tuesday, 27 October 2020 at 17:01:23 UTC, Anonymouse wrote:
On Sunday, 4 October 2020 at 21:00:49 UTC, ikod wrote:
Thanks, Andre!
I'll split requests as you suggested (inc
On Wed, Oct 28, 2020 at 06:54:01PM +, Vino via Digitalmars-d-learn wrote:
> Hi All,
>
>Is it possible to create an associative array using
> std.container.array, if possible can you please provide me an example
> nor send me some link which has this information.
https://dlang.org/phobos/s
Hi All,
Is it possible to create an associative array using
std.container.array, if possible can you please provide me an
example nor send me some link which has this information.
From,
Vino.B
On Wednesday, 28 October 2020 at 05:51:14 UTC, Nicholas Wilson
wrote:
class A(T,int,args...) {}
alias C = A!(int, 0, float);
I need `ScopeClass!C` to be
template ScopeClass(C)
{
class Anon(T,int,args...) // name doesn't matter
{
// implement members with compile time reflection
On Monday, 26 October 2020 at 21:38:39 UTC, Jack wrote:
I did consider do something like this but the class would only
live in the function's lifetime, right? that wouldn't work if I
need to pass the class around
Right, you'd have to manage the memory somehow. One possibility
is to malloc it
On Wednesday, 28 October 2020 at 15:27:04 UTC, H. S. Teoh wrote:
foreach (key; aa.keys.sort!((a,b) => aa[a] < aa[b])) {
writeln(key);
This solution worked perfectly without modifying any of my other
code. I don't fully understand it but can study up on
On Wednesday, 28 October 2020 at 15:40:23 UTC, aberba wrote:
Have you tries .values() function? dictionary.values.sort()
Thanks aberba. Yes, that was my first attempt!
If my terminology is correct that gives me a "range" of sorted
VALUES.
I think I can't "iterate"(foreach) through an array of
On Wednesday, 28 October 2020 at 15:25:26 UTC, Paul Backus wrote:
auto sorted = dictionary.byPair.array.sort!((a, b) => a.value <
b.value)
It seems this method produces a ?sorted array of tuples?
[..Tuple!(string, "key", uint, "value")("Program", 74),
Tuple!(string, "key", uint, "value")("
On Wednesday, 28 October 2020 at 15:15:40 UTC, Paul wrote:
per the D sample wc2.d
size_t[string] dictionary; <-is printed by...
.
foreach (word1; dictionary.keys.sort) writef etc
I want to print the dictionary sorted by value not key. I can
write an algorithm but is there a librar
Thanks Teoh
On Wednesday, 28 October 2020 at 15:25:26 UTC, Paul Backus wrote:
On Wednesday, 28 October 2020 at 15:15:40 UTC, Paul wrote:
per the D sample wc2.d
size_t[string] dictionary; <-is printed by...
.
foreach (word1; dictionary.keys.sort) writef etc
I want to print the dictionary sorted
On Wednesday, 28 October 2020 at 15:15:40 UTC, Paul wrote:
per the D sample wc2.d
size_t[string] dictionary; <-is printed by...
.
foreach (word1; dictionary.keys.sort) writef etc
I want to print the dictionary sorted by value not key. I can
write an algorithm but is there a librar
On Wed, Oct 28, 2020 at 03:15:40PM +, Paul via Digitalmars-d-learn wrote:
> per the D sample wc2.d
> size_t[string] dictionary; <-is printed by...
> .
> foreach (word1; dictionary.keys.sort) writef etc
>
> I want to print the dictionary sorted by value not key. I can write
> an a
per the D sample wc2.d
size_t[string] dictionary; <-is printed by...
.
foreach (word1; dictionary.keys.sort) writef etc
I want to print the dictionary sorted by value not key. I can
write an algorithm but is there a library method(s) I can use to
iterate through the array sorted b
Look this video https://www.youtube.com/watch?v=Es9Qs9_1ipk
On Wednesday, 28 October 2020 at 12:33:18 UTC, Ruby The Roobster
wrote:
On Wednesday, 28 October 2020 at 00:48:36 UTC, Ruby The
Roobster wrote:
On Tuesday, 27 October 2020 at 02:05:37 UTC, Ruby The Roobster
wrote:
Following function when called throws an access violation. I
think it has to do w
On Wednesday, 28 October 2020 at 00:48:36 UTC, Ruby The Roobster
wrote:
On Tuesday, 27 October 2020 at 02:05:37 UTC, Ruby The Roobster
wrote:
Following function when called throws an access violation. I
think it has to do with the assert statements, but I don't
know why.
[...]
Okay. I messed
On Wednesday, 28 October 2020 at 06:52:35 UTC, evilrat wrote:
Just an advice, Qte5 isn't well maintained, the other
alternatives such as 'dlangui' also seems abandoned, so
basically the only maintained UI library here is gtk-d, but
there was recently a nice tutorial series written about it.
On Wednesday, 28 October 2020 at 07:56:35 UTC, Mike Parker wrote:
On Wednesday, 28 October 2020 at 07:50:27 UTC, Josh Dredge
wrote:
developers would love to be working with! I will give Gtk a go
too - I've never programmed with it, but I used Ubuntu alot
back in the day and never really liked
On Wednesday, 28 October 2020 at 07:50:27 UTC, Josh Dredge wrote:
developers would love to be working with! I will give Gtk a go
too - I've never programmed with it, but I used Ubuntu alot
back in the day and never really liked applications that used
it, but maybe its more responsive on Window
On Wednesday, 28 October 2020 at 06:52:35 UTC, evilrat wrote:
On Tuesday, 27 October 2020 at 11:46:02 UTC, Josh Dredge wrote:
[...]
Welcome! If by web development you also have back-end
programming then you should be like 50% know how desktop
programming works.
[...]
Fantastic, thank you
Hi All,
Request your help in the below code, the logic is that fetch
the json data(Pool) from apidata1 and use that and search for
"pool" in sapidata2 and print the matched(pool) type from
apidata2.
Code:
import datacollector.GetLamaAssignment;
import std.stdio: writeln;
import asdf: p
On Tuesday, 27 October 2020 at 08:00:55 UTC, Imperatorn wrote:
On Monday, 26 October 2020 at 19:05:04 UTC, Vino wrote:
[...]
Some comments:
1. You're missing a comma (,) after the first item in your
apidata
2. You're creating a string[int][string] instead of
string[][string] (your expected
On Tuesday, 27 October 2020 at 02:50:55 UTC, 9il wrote:
On Monday, 26 October 2020 at 14:31:00 UTC, Vino wrote:
[...]
No. ndslice provides rectangular arrays. An associative array
(as it defined in D) can't be really 2D, instead, it is an AA
of AAs like in your example. A real 2D analog asso
38 matches
Mail list logo