On 4/7/21 8:57 PM, Brad wrote:
auto a = [1,0,1,1,1,0,1,0,1,1,1,1,0];
I want to come out of this with a string that looks like this:
101110100
Me, me, me, me! :)
import std;
void main()
{
auto a = [1,0,1,1,1,0,1,0,1,1,1,1,0];
string s = format!"%-(%s%)"(a);
writeln(s);
}
Al
When I import modules from dub im my SublimeText, D Linter show
as errors.
Example:
7:8 error dmd:Error module `core` is in file
'vibe\core\core.d' which cannot be read
How solve it?
Here an example of using gtkd without dub :
ldc2 -I/usr/local/include/d/gtkd-3 -L-lgtkd-3 -L-ldl hello.d
When you run dub with parameters "--verbose" it informs you what
is going on.
I have not figured out how to use tkd without dub.
It would be nice to know how.
Now I see.
I need to sort the packages by score.
[ There are some dead monkeys in the package database ]
On Wednesday, 7 April 2021 at 14:52:25 UTC, Alain De Vos wrote:
Let's say I want to connect to the databases :
- tokyokabinet
- redis
- mongodb
- postgresql
- sqlite
- mysql
- couchdb
Which "dub add X" commands should I run for each of them ?
https://code.dlang.org/search?q=database
You need t
On Wednesday, 7 April 2021 at 17:31:09 UTC, Paul Backus wrote:
On Wednesday, 7 April 2021 at 17:04:56 UTC, novice2 wrote:
On Wednesday, 7 April 2021 at 13:43:18 UTC, Paul Backus wrote:
So, you should change your code to
writefln("%-(%s, %)", s);
sorry i dont read docs so carefully
thanks
On Wednesday, 7 April 2021 at 17:31:09 UTC, Paul Backus wrote:
It's not your fault--this is a pretty obscure feature, and it's
not documented very well. Even after you've found the correct
page in the documentation (the page for `formattedWrite` [1]),
you have to scroll down past multiple examp
On 4/7/21 10:04 AM, novice2 wrote:
On Wednesday, 7 April 2021 at 13:43:18 UTC, Paul Backus wrote:
So, you should change your code to
writefln("%-(%s, %)", s);
sorry i dont read docs so carefully
thanks
For the sake of completeness, I mention this feature in a couple of
other places:
On Wednesday, 7 April 2021 at 17:04:56 UTC, novice2 wrote:
On Wednesday, 7 April 2021 at 13:43:18 UTC, Paul Backus wrote:
So, you should change your code to
writefln("%-(%s, %)", s);
sorry i dont read docs so carefully
thanks
It's not your fault--this is a pretty obscure feature, and it
On Wednesday, 7 April 2021 at 13:43:18 UTC, Paul Backus wrote:
So, you should change your code to
writefln("%-(%s, %)", s);
sorry i dont read docs so carefully
thanks
Let's say I want to connect to the databases :
- tokyokabinet
- redis
- mongodb
- postgresql
- sqlite
- mysql
- couchdb
Which "dub add X" commands should I run for each of them ?
On Wednesday, 7 April 2021 at 13:31:59 UTC, novice3 wrote:
there is extra quotes, wich not present in firmat specifier.
is this bug, or i should change something in my code?
This is actually an intentional feature (albeit kind of a stupid
one). From the documentation:
Inside a compound forma
https://run.dlang.io/is/p4NVp8
```d
void main()
{
import std.stdio: writefln;
string[] s = ["a", "b", "c"];
writefln("%(%s, %)", s);
}
```
output
```d
"a", "b", "c"
```
expected
```d
a, b, c
```
there is extra quotes, wich not present in firmat specifier.
is this bug, or i should chan
On Wednesday, 7 April 2021 at 12:57:12 UTC, tcak wrote:
Well, I have a struct, that is defined as a variable already. I
want to read X bytes from the file (not Struct.sizeof bytes
though), and read into the struct variable without any extra
buffer.
file.rawRead((cast(ubyte*) &your_struct)[0 .
I meant dlang bindings.
On Wednesday, 7 April 2021 at 12:50:01 UTC, Adam D. Ruppe wrote:
On Wednesday, 7 April 2021 at 11:42:56 UTC, tcak wrote:
There is rawRead, but it takes an array as parameter, which
causes a dirty looking code with cast etc!
What did you wrote?
file.rawRead(address[0 .. desiredLength])
shou
struct A
{
private int[] a;
this(int[] b){a=b;}
int[] c(){ return a; }
@disable void opAssign();
}
struct B
{
A a;
this(int){ a=new int[5]; }
int[] b(){ return a.c; }
void f(){ a=new int[5]; }
}
On Wednesday, 7 April 2021 at 11:42:56 UTC, tcak wrote:
There is rawRead, but it takes an array as parameter, which
causes a dirty looking code with cast etc!
What did you wrote?
file.rawRead(address[0 .. desiredLength])
should do what you want.
On Wednesday, 7 April 2021 at 12:28:25 UTC, tcak wrote:
@property auto b(){ return a.ptr; } // this is a
possibility, but results with overhead of calling. Also, b is
not an array anymore, just int*.
Why are you returning a.ptr instead of just a?
If you return just a, it works fine for w
In javascript, with "const" keyword, you assign an object to a
variable. Later, you cannot assign anything else to that
variable, but content of it still can be changed. No matter by
using "immutable" or "const", I cannot imitate that. Is there a
way to do this without an overhead (like calling
I am talking about std.file.File.
I have opened the file, and at a specific offset.
I want to read X many bytes from the file, and want it to be
written to given address directly without any Magical D-stuff
like ranges etc.
Is there a way to do this without getting into C or Posix header
fi
On Friday, 2 April 2021 at 22:29:20 UTC, Imperatorn wrote:
On Thursday, 4 March 2021 at 13:47:11 UTC, Imperatorn wrote:
On Monday, 1 March 2021 at 22:25:39 UTC, Rey Valeza wrote:
Hi, I wrote a tutorial on Vibe.d while trying to re-learn
Vibe.d. I find that most of Kai Nacke's book need updating
On 2021-04-06 21:57, Alain De Vos wrote:
Can we say tk ang gtk toolkits are alive.
But wxwidgets , fox an fltk are dead ?
Do you mean these libraries in general or D bindings to these libraries?
--
/Jacob Carlborg
23 matches
Mail list logo