If I search for what ever, not related to D, I very often end
with a solution
found on one of the StackExchange forums like StackOverflow or
AskUbuntu etc.
The main advantage is, that all answers can be classified
(up/down voted, moderated etc.)
This is much better than finding something in th
On Friday, 18 October 2019 at 10:23:28 UTC, jmh530 wrote:
On Friday, 18 October 2019 at 07:35:21 UTC, Martin Tschierschke
wrote:
[snip]
I think this is something that's been proposed before, but most
people are happy with just asking a question here and usually
people are pretty good about h
On Friday, 18 October 2019 at 12:51:35 UTC, bachmeier wrote:
On Friday, 18 October 2019 at 07:35:21 UTC, Martin Tschierschke
wrote:
If I search for what ever, not related to D, I very often end
with a solution
found on one of the StackExchange forums like StackOverflow or
AskUbuntu etc.
The m
On Friday, 18 October 2019 at 12:41:53 UTC, Paolo Invernizzi
wrote:
On Friday, 18 October 2019 at 11:45:33 UTC, Seb wrote:
On Friday, 18 October 2019 at 10:55:59 UTC, Martin
Tschierschke wrote:
[...]
In the state of the D survey, there were more people in favor
of StackOverflow than D.learn,
On Friday, 18 October 2019 at 13:38:11 UTC, Ron Tarrant wrote:
On Friday, 18 October 2019 at 07:35:21 UTC, Martin Tschierschke
wrote:
I very often end with a solution found on one of the
StackExchange forums like > StackOverflow or AskUbuntu etc.
I have found that StackExchange does often have
When building my small vibe.d app I am getting this messages
twice:
/usr/include/dmd/phobos/std/range/primitives.d(174,38):
Deprecation: alias byKeyValue this is deprecated - Iterate over
.byKeyValue instead.
/usr/include/dmd/phobos/std/range/primitives.d(176,27):
Deprecation: alias byKeyValu
Hi,
I have to find a certain line in a file, with a text containing
umlauts.
How do you do this?
The following was not working:
foreach(i,line; file){
if(line=="My text with ö oe, ä ae or ü"){
writeln("found it at line",i)
}
}
I ended up using line.canFind("with part of the text without
On Monday, 18 May 2020 at 14:22:31 UTC, WebFreak001 wrote:
[...]
It solved the problem, but what is the right way to use
umlauts (encode them) inside the program?
Your code should have already worked like that, assuming your
input file is a UTF-8 file. Check with an editor like Notepad++
or V
On Monday, 18 May 2020 at 14:28:33 UTC, Steven Schveighoffer
wrote:
On 5/18/20 9:44 AM, Martin Tschierschke wrote:
[...]
using == on strings is going to compare the exact bits for
equality. In unicode, things can be encoded differently to make
the same grapheme. For example, ö is a code unit
On Monday, 18 May 2020 at 14:28:33 UTC, Steven Schveighoffer
wrote:
What you need is to normalize the data for comparison:
https://dlang.org/phobos/std_uni.html#normalize
For more reference:
https://en.wikipedia.org/wiki/Combining_character
-Steve
I checked it again but could not reprodu
What would be the idiomatic way to write a floating point division
occuring inside a loop and handle the case of division by zero.
c = a/b; // b might be zero sometimes, than set c to an other
value (d).
(In the moment I check the divisor being zero or not, with an
if-than-else structure,
bu
On Friday, 31 July 2020 at 15:19:25 UTC, Andrea Fontana wrote:
On Friday, 31 July 2020 at 13:55:18 UTC, Martin Tschierschke
wrote:
What would be the idiomatic way to write a floating point
division
occuring inside a loop and handle the case of division by zero.
c = a/b; // b might be zero some
On Friday, 31 July 2020 at 14:18:15 UTC, Steven Schveighoffer
wrote:
On 7/31/20 9:55 AM, Martin Tschierschke wrote:
What would be the idiomatic way to write a floating point
division
occuring inside a loop and handle the case of division by zero.
c = a/b; // b might be zero sometimes, than set
On Monday, 3 August 2020 at 15:33:54 UTC, Dominikus Dittes
Scherkl wrote:
[...]
For really long expressions you could also split it on multiple
lines:
c = (b_expression == 0)
? (d_longer_expression)
: (a_expression/b_expression);
+1 looks clean!
Hello, if you take the example from the home page, with the
additional last line:
```d
struct Point
{
private double[2] p;
// Forward all undefined symbols to p
alias p this;
double dot(Point rhs)
{
return p[0] * rhs.p[0] + p[1] * rhs.p[1];
}
}
void main()
{
i
On Thursday, 18 November 2021 at 16:08:22 UTC, Paul Backus wrote:
On Thursday, 18 November 2021 at 13:51:42 UTC, Martin
Tschierschke wrote:
[...]
You can define a `toString` method, like this:
```d
string toString()
{
import std.conv;
return p.to!string;
}
```
You can find more infor
I just want to share a view lines of code.
The availability of operator overloading can result in very short
and precise code for linear algebra.
To test/explore it a little I just modified the alias this
example:
```
#!/usr/bin/env rdmd
struct Point
{
double[2] p;
// Forward all undefi
On Wednesday, 9 May 2018 at 11:52:11 UTC, Jonathan M Davis wrote:
On Wednesday, May 09, 2018 09:38:14 BoQsc via
Digitalmars-d-learn wrote:
[...]
Every language makes its own choices with regards to how it
goes about things, some of which are purely subjective.
[...]
- Jonathan M Davis
Jus
On Friday, 1 June 2018 at 09:49:23 UTC, biocyberman wrote:
I need to convert a compressed 17GB SQL dump to CSV. A workable
solution is to create a temporary mysql database, import the
dump, query by python, and export. But i wonder if there is
something someway in D to parse the SQL file direct
On Monday, 25 June 2018 at 08:05:53 UTC, Mr.Bingo wrote:
On Monday, 25 June 2018 at 07:02:24 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 05:47:30 Mr.Bingo via
Digitalmars-d-learn wrote:
The problem then, if D can't arbitrarily use ctfe, means that
there should be a way to force ctfe o
On Friday, 7 September 2018 at 16:37:18 UTC, MamoKupe wrote:
On Friday, 7 September 2018 at 16:20:40 UTC, MamoKupe wrote:
marcinan@marcinan-PC ~/Pulpit/d $ dub init bibe
Package recipe format (sdl/json) [json]: d
Invalid format, "d", enter either "sdl" or "json".
Package recipe format (sdl/json)
A very simple question, is there an example how to generate
documentation with dub?
(like dmd -D)
My internet search was not successful.
On Friday, 28 June 2019 at 13:03:17 UTC, Daniel Kozak wrote:
Did you try dub build --help?
Oh, thank you! I just looked at dub --help | grep -i doc ... and
several other places...
Hello for a simple game I would like to add some very simple
sound, not much different than the beeps of "PAC Man". Is there
anything I can use for this?
On Monday, 3 July 2017 at 09:24:35 UTC, Guillaume Piolat wrote:
On Monday, 3 July 2017 at 08:55:20 UTC, Martin Tschierschke
wrote:
Hello for a simple game I would like to add some very simple
sound, not much different than the beeps of "PAC Man". Is
there anything I can use for this?
Derelict
On Tuesday, 4 July 2017 at 11:59:33 UTC, Vladimir Panteleev wrote:
On Monday, 3 July 2017 at 10:40:03 UTC, Martin Tschierschke
wrote:
On Monday, 3 July 2017 at 09:24:35 UTC, Guillaume Piolat wrote:
On Monday, 3 July 2017 at 08:55:20 UTC, Martin Tschierschke
wrote:
Hello for a simple game I woul
On Wednesday, 5 July 2017 at 07:21:45 UTC, Sebastiaan Koppe wrote:
On Wednesday, 5 July 2017 at 05:34:37 UTC, FoxyBrown wrote:
On Tuesday, 4 July 2017 at 20:37:44 UTC, Sebastiaan Koppe
wrote:
Portaudio is simple as well. And nice cross platform.
are there any bindings?
Sure, see http://code
On Wednesday, 5 July 2017 at 10:19:54 UTC, Sebastiaan Koppe wrote:
On Wednesday, 5 July 2017 at 09:43:05 UTC, Martin Tschierschke
wrote:
On Wednesday, 5 July 2017 at 07:21:45 UTC, Sebastiaan Koppe
wrote:
On Wednesday, 5 July 2017 at 05:34:37 UTC, FoxyBrown wrote:
On Tuesday, 4 July 2017 at 20:3
On Wednesday, 5 July 2017 at 13:55:22 UTC, Martin wrote:
Hi,
i have a coulpe of different machines with MySQL Servers
running on it.
Now, i want to execute queries for all Databases at the same
time and collect the Result to process it.
I am new to the parallelism - so maybe i understand som
When I tried to set the atime and mtime of a file (f) via:
import std.datetime;
auto time = Clock.currTime();
setTimes(f,time,time);
I get "Operation not permitted."
This is caused on linux by the rule, that if you are not the
owner of the file
you may only set the mtime of a file to current
As a rookie in D programming I try to understand the power of
templated functions with compile time parameters. With DMD 2.074
a compile time format
(auto output = format!("Print this %s")(var);)
was introduced, now we all know that very many of this format
strings are immutable, so wouldn't i
On Monday, 31 July 2017 at 15:57:28 UTC, Anonymouse wrote:
On Monday, 31 July 2017 at 15:46:47 UTC, inevzxui wrote:
On Monday, 31 July 2017 at 15:43:21 UTC, Martin Tschierschke
wrote:
[...]
But the parameters are not checked at compile-time unless you
specifically pass the pattern string as a
With
import std.file:timeLastModified;
auto time = timeLastModified(source);
I get a SysTime, how to check if it is older than an interval (1
day)?
D/Phobos idiomatically?
(Currently I am using
(Clock.currTime().toUnixTime-time.toUnixTime)< 60*60*24)).
Regards mt.
On Wednesday, 2 August 2017 at 13:32:46 UTC, Adam D. Ruppe wrote:
On Wednesday, 2 August 2017 at 13:25:25 UTC, Martin
Tschierschke wrote:
I get a SysTime, how to check if it is older than an interval
(1 day)?
D/Phobos idiomatically?
if(Clock.currTime - timeLastModified("aa.d") > 1.days) {
On Saturday, 9 September 2017 at 05:58:59 UTC, Ali Çehreli wrote:
On 09/08/2017 09:51 PM, Ky-Anh Huynh wrote:
> When I execute a program thanks to dub, `dub` also prints its
> information to STDOUT:
Try dub's --quiet command line switch.
Ali
Can I configure this also in dub.json (dub.sdl)?
Sp
On Friday, 30 June 2017 at 08:19:07 UTC, Anton Fediushin wrote:
On Friday, 30 June 2017 at 07:44:45 UTC, Martin Tschierschke
wrote:
What do I have to do, to make this work?
iota(number).each!...command_x(a...);command_y(b...);command_z(c..))
You can use it like this:
iota(10).each!((x) { com
Hello,
Parsing mbox file (/var/spool/mail/... on a Ubuntu machine)
and splitting to a range or array of mail objects.
Has anyone done this with D? please give me hint. (DUB, git, this
forum?)
Or should I start with formail (-s) as a subprocess?
(At first step, I want to run a vibe.d server t
This post is to try if it works now.
But I got an answer from Adam...
Thank you.
On Thursday, 1 February 2018 at 09:18:30 UTC, I Lindström wrote:
[...]
And thank you all for your ideas and suggestions. I'll try some
out and see what works.
I found this useful:
https://github.com/adamdruppe/arsd/blob/master/simpledisplay.d
I just started to play around with D again on my notebook at home
and realized,
that I have a broken installation.
Even the minimal D "hello world" throws an error at execution.
Speicherzugriffsfehler (Speicherabzug geschrieben) aka. core dump
Compiling with ldc2 still works.
Any hint?
On Monday, 12 February 2018 at 21:08:30 UTC, Seb wrote:
On Monday, 12 February 2018 at 20:56:11 UTC, Martin
Tschierschke wrote:
I just started to play around with D again on my notebook at
home and realized,
that I have a broken installation.
Even the minimal D "hello world" throws an error at
On Sunday, 4 February 2018 at 11:50:05 UTC, Timoses wrote:
On Thursday, 1 February 2018 at 09:01:34 UTC, Kagamin wrote:
On Wednesday, 31 January 2018 at 16:59:15 UTC, Timoses wrote:
And I would need to do what about it?
Sorry, I'm not familiar with assembly code stuff in detail.
You can try
On Monday, 12 February 2018 at 21:18:01 UTC, Jordi Sayol wrote:
El 12/02/18 a les 21:56, Martin Tschierschke via
Digitalmars-d-learn ha escrit:
I just started to play around with D again on my notebook at
home and realized,
that I have a broken installation.
Even the minimal D "hello
On Tuesday, 13 February 2018 at 21:25:44 UTC, Jordi Sayol wrote:
El 13/02/18 a les 08:03, Martin Tschierschke via
Digitalmars-d-learn ha escrit:
On Monday, 12 February 2018 at 21:18:01 UTC, Jordi Sayol wrote:
El 12/02/18 a les 21:56, Martin Tschierschke via
Digitalmars-d-learn ha escrit:
I
On Wednesday, 14 February 2018 at 10:57:47 UTC, Andrea Fontana
wrote:
On Tuesday, 13 February 2018 at 22:21:18 UTC, Martin
Tschierschke wrote:
I will downgrade to 16.04., the dist-upgrade to 17.10 was a
mistake, resulting in problems with startx and newer kernels
so I have to use 4.10.
In my
On Wednesday, 14 February 2018 at 10:28:51 UTC, Kagamin wrote:
On Tuesday, 13 February 2018 at 06:53:46 UTC, Martin
Tschierschke wrote:
I am unfamiliar with debugging (gdb etc.) so any hint would be
appreciated!
https://issues.dlang.org/show_bug.cgi?id=18350 - maybe adjust
bug severity.
I ad
On Wednesday, 14 February 2018 at 11:23:48 UTC, Andrea Fontana
wrote:
On Wednesday, 14 February 2018 at 11:16:25 UTC, Martin
Tschierschke wrote:
Ok, good to know!
I started with 16.04 and made the initial mistake to take the
32 Bit version,
do you use 32 or 64 Bit?
64bit of course!
Andrea
On Sunday, 4 March 2018 at 16:46:56 UTC, Marc wrote:
then copy it to sources folder?
let's say I have a small library folder at C:\mylibrary\D where
I want to use dir.d from it. How do I add that file dependence
to dub? But I do not want to that file be passed directly to
dmd, I want to that
On Monday, 12 March 2018 at 09:38:41 UTC, Martin Tschierschke
wrote:
On Sunday, 4 March 2018 at 16:46:56 UTC, Marc wrote:
[...]
I did it this sway:
the part of dub.json:
"dependencies": {
[...]
"mylib":{
"versions": "~master",
Is there an step by step introduction how to convert a C header
of an external lib into the right extern(C){} block?
A blog post or tutorial, or chapter in a D book? (I have those
from Packt Publishing)
(Especially I am trying to get this used with D:
Montetdb C-API
https://www.monetdb.org/D
On Wednesday, 21 March 2018 at 18:42:43 UTC, nkm1 wrote:
On Wednesday, 21 March 2018 at 16:22:45 UTC, Martin
Tschierschke wrote:
[...]
The easiest thing to do is to write a wrapper in C. The wrapper
will include all necessary headers and provide some easy to use
functions that you can call f
On Wednesday, 21 March 2018 at 17:12:07 UTC, Timoses wrote:
On Wednesday, 21 March 2018 at 16:22:45 UTC, Martin
Tschierschke wrote:
Is there an step by step introduction how to convert a C
header of an external lib into the right extern(C){} block?
A blog post or tutorial, or chapter in a D bo
On Thursday, 22 March 2018 at 12:53:23 UTC, Martin Tschierschke
wrote:
On Wednesday, 21 March 2018 at 17:12:07 UTC, Timoses wrote:
[...]
I got it, my first mini test with C bindings!
Important missing at first: (stderr)
import core.stdc.stdio : stderr, FILE;
and use of toStringz inside: mapi_
On Thursday, 22 March 2018 at 17:42:46 UTC, Paul Backus wrote:
On Wednesday, 21 March 2018 at 16:22:45 UTC, Martin
Tschierschke wrote:
Is there an step by step introduction how to convert a C
header of an external lib into the right extern(C){} block?
In addition to what others have said, I fo
On Friday, 23 March 2018 at 01:12:58 UTC, Mike Parker wrote:
On Thursday, 22 March 2018 at 21:45:40 UTC, Martin Tschierschke
wrote:
On Thursday, 22 March 2018 at 17:42:46 UTC, Paul Backus wrote:
On Wednesday, 21 March 2018 at 16:22:45 UTC, Martin
Tschierschke wrote:
Is there an step by step int
On Wednesday, 11 April 2018 at 02:37:39 UTC, bachmeier wrote:
On Monday, 9 April 2018 at 19:17:20 UTC, Adam D. Ruppe wrote:
[...]
I had a chance to try this out and it worked without a problem.
I did have to download color.d in addition to the other
dependencies you listed. In the event that
On Thursday, 12 April 2018 at 00:00:04 UTC, bachmeier wrote:
On Wednesday, 11 April 2018 at 15:20:08 UTC, Martin
Tschierschke wrote:
My question in the moment is, how do I invoke Thunderbird to
display a certain single mail (or maildir) file?
How do I use Thunderbird as the client, to show, to
When I do the following:
auto mysql = new Mysql("localhost", 3306, "mt", "", "verwaltung");
auto rows = mysql.query("select field from my_table limit 50");
foreach(row;rows){
writeln(row["field"]);}
// second time same loop
foreach(row;rows){
writeln(row["field"]);}
I only get the output of
On Monday, 7 December 2015 at 16:11:19 UTC, Daniel Kozak wrote:
On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke
wrote:
When I do the following:
auto mysql = new Mysql("localhost", 3306, "mt", "",
"verwaltung");
auto rows = mysql.query("select field from my_table limit 50");
f
On Tuesday, 8 December 2015 at 15:14:06 UTC, Daniel Kozak wrote:
[...]
>> A nested loop, did not worked either:
>>
>> foreach(row;rows){
>> foreach(field;row){
>> writeln(field);}
>> }
[...]
Now I took a work around, getting the field names in a separate
mysql-request,
but they should be avai
On Saturday, 2 January 2016 at 00:15:32 UTC, Jason Jeffory wrote:
Ok, So Deit allows D code inside html... looks great.
But how do external variables work? If I create a variable in
the server(such as a class), can an html file access it easily?
(not having to jump through hoops)
doctype ht
On Friday, 1 January 2016 at 00:14:08 UTC, Jason Jeffory wrote:
Vibe.d uses deit files for html generation. Seems nice but
haven't dived into it(just removes a but of nonsense and allows
code integration for dynamic generation... sounds great!!).
But what about visual editing? It's nice to be
When I was writing a small speed test - D versus Ruby,
calculating the first n prime numbers, I realized, that for small
n
Ruby may be faster, than compiling and executing with D.
But for n = 1,000,000 D outperforms Ruby by app. 10x.
Looking at the size of my prime executable, it was around 800
On Monday, 4 January 2016 at 14:16:54 UTC, Marc Schütz wrote:
On Monday, 4 January 2016 at 13:49:03 UTC, Martin Tschierschke
wrote:
When I was writing a small speed test - D versus Ruby,
calculating the first n prime numbers, I realized, that for
small n
Ruby may be faster, than compiling and
On Monday, 4 January 2016 at 14:51:59 UTC, Adam D. Ruppe wrote:
On Monday, 4 January 2016 at 13:49:03 UTC, Martin Tschierschke
wrote:
When I was writing a small speed test - D versus Ruby
The smallest possible ruby program has about ~5 MB of
dependencies, outside the operating system (the rub
On Monday, 4 January 2016 at 14:01:18 UTC, Basile B. wrote:
On Monday, 4 January 2016 at 13:49:03 UTC, Martin Tschierschke
wrote:
[...]
- if debug info are generated this increases the size.
- if bounds checking is turned off there is some code generated
for each array operation
- if contracts
What about the idea to allow discussion entries/threads to be
linked to dub package entries?
So they appear in DUB and in a additional section of this forum?
So vibe.d for example comes with his own forum that is good, but
a solution for all
would be nicer?
So coming back to my first questi
On Monday, 7 March 2016 at 09:18:37 UTC, ciechowoj wrote:
I'm using `dub` to build project. And every time I run `dub` it
seems to check if dependencies are up to date, which takes some
time. Is there a way to switch of that checking? Or any other
way to speed up building process? It really slo
On Wednesday, 9 March 2016 at 22:31:50 UTC, Nordlöw wrote:
[...]
foreach (const i; iota(0, n))
{
x[i] = true; // indicate that it's stored
}
import std.stdio : writeln, readln;
writeln("Press return: ");
readln;
}
consumes 842.m MiB on my Ubuntu.
The consumption
Hello!
I want to set up a web robot to detect changes on certain web
pages or sites.
Any hint to similar projects or libraries at dub or git to look
at,
before starting to develop my own RegExp for parsing?
Best regards
mt.
On Wednesday, 23 March 2016 at 09:06:37 UTC, Rene Zwanenburg
wrote:
[...]
Adam's dom.d will get you pretty far. I believe it can also
handle documents that aren't completely well-formed.
https://github.com/adamdruppe/arsd/blob/master/dom.d
Thank you! This forum has an incredible fast auto r
I know there are easy ways to handle this,
anyone with a code snippet for me?
I would use two regex first to make 01,02,03... from Jan,Feb,..
and
second to split the result.
best regards mt.
On Wednesday, 8 June 2016 at 10:42:19 UTC, Martin Tschierschke
wrote:
I know there are easy ways to handle this,
anyone with a code snippet for me?
I found this solution, letting the MySQL engine do the work:
SELECT STR_TO_DATE('26/Apr/2011:13:21:58', '%d/%b/%Y:%H:%i:%S');
https://www.expert
On Thursday, 21 July 2016 at 19:54:34 UTC, Jonathan Marler wrote:
Is there a way to get the full path of the current source file?
Something like:
__FILE_FULL_PATH__
I'm asking because I'm rewriting a batch script in D, meant to
be ran with rdmd. However, the script needs to know it's own
pa
On Thursday, 4 August 2016 at 12:14:48 UTC, Adam D. Ruppe wrote:
On Thursday, 4 August 2016 at 10:36:05 UTC, llaine wrote:
Any idea how can I call them ?
Just like any other function. Consider this:
[...]
Compile
[...]
hi from D, Ruby user!
Thank you a lot!!! I want to use some vibe.d r
On Tuesday, 13 September 2016 at 23:45:18 UTC, Intersteller wrote:
vibe.d does not have much lateral support as the most commons
web technologies do. Can vibe.d leverage pre-existing techs
such as php, ruby/rails, etc? Starting from scratch and having
to build a robust and secure framework is
On Wednesday, 14 September 2016 at 09:01:11 UTC, Guillaume Piolat
wrote:
Is there vibe.d hosting sold anywhere?
I am using this one: https://www.menkisys.de/
in the moment vibe.d only for tests.
But with an Rails web service, using a small parser for email
with attached pdf,
written in D, it
On Thursday, 15 September 2016 at 20:56:19 UTC, Intersteller
wrote:
On Thursday, 15 September 2016 at 14:31:28 UTC, Martin
Tschierschke wrote:
On Tuesday, 13 September 2016 at 23:45:18 UTC, Intersteller
wrote:
vibe.d does not have much lateral support as the most commons
web technologies do. C
On Thursday, 22 September 2016 at 01:38:12 UTC, Gestalt Theory
wrote:
1. I get this error when trying to run a project in VS. dub
doesn't give the error.
First-chance exception: core.exception.AssertError free()
called with null array. at
vibe-d-0.7.26\source\vibe\utils\memory.d(110)
It con
On Friday, 23 September 2016 at 21:32:59 UTC, Gestalt Theory
wrote:
On Thursday, 22 September 2016 at 09:14:46 UTC, Martin
Tschierschke wrote:
On Thursday, 22 September 2016 at 01:38:12 UTC, Gestalt Theory
wrote:
3. How to serve static files properly?
sendFile(req, res, Path(req.path));
D
Hello,
I have a little program where I am filling a struct with values
from an regex match.
Now I want to display the content of the struct for debugging
purpose.
If struct is named MyStruct
I can print a list of the field names with:
foreach(fieldname;FieldNameTuple!MyStruct){writef("%s
",
On Monday, 20 February 2017 at 16:18:58 UTC, Paul Backus wrote:
On Monday, 20 February 2017 at 16:04:17 UTC, Martin
Tschierschke wrote:
Hello,
I have a little program where I am filling a struct with
values from an regex match.
Now I want to display the content of the struct for debugging
purp
On Tuesday, 21 February 2017 at 14:02:54 UTC, Jacob Carlborg
wrote:
[...]
Yes, this works, I would say this is the simplest:
MyStruct s;
foreach (index, name ; FieldNameTuple!MyStruct)
writefln("%s: %s", name, s.tupleof[index]);
If you want something more close to "send" in Ruby, you need
On Saturday, 25 February 2017 at 01:30:09 UTC, Minty Fresh wrote:
On Saturday, 25 February 2017 at 01:27:09 UTC, Minty Fresh
wrote:
On Wednesday, 22 February 2017 at 11:18:15 UTC, Martin
Tschierschke wrote:
[...]
Since structs are Plain-old Data and don't do inheritance, the
best option is a
Hello,
when trying to process an string at compile time with
...
auto reg = ctRegex!`as\ [a-z]+`;
enum replaced = replaceAll(call,reg,"");
I get:
/usr/include/dmd/phobos/std/regex/package.d(708,34): Error:
malloc cannot be interpreted at compile time, because it has no
available source code
On Thursday, 13 April 2017 at 08:47:16 UTC, Ali Çehreli wrote:
I haven't played with ndslice nor followed its deprecation
discussions. Could someone summarize it for us please. Also, is
it still used outside Phobos or is Ilya or someone else
rewriting it?
Ali
We should additionally mention
Is it possible to define an alias for something like
mixin(import("local_function_file.d"));
to write only
use_local_function;
which will be translated to:
mixin(import("local_function_file.d"));
(this additionally needs the file local_function_file.d in
source/ +
-J./source as paramete
On Friday, 21 April 2017 at 10:31:46 UTC, ketmar wrote:
biozic wrote:
On Friday, 21 April 2017 at 09:42:33 UTC, ketmar wrote:
Martin Tschierschke wrote:
Is it possible to define an alias for something like
mixin(import("local_function_file.d"));
to write only
use_local_function;
whic
On Friday, 21 April 2017 at 11:58:13 UTC, Martin Tschierschke
wrote:
On Friday, 21 April 2017 at 10:31:46 UTC, ketmar wrote:
biozic wrote:
I thought way to complicated:
Just define the string at top:
enum exho="auto mixinter(string x)(){return mixin(interp!x);}
auto exho(string x)(){return
m
Just a thought it might be useful for cut-n-paste when porting
code:
Would it be possible to define an operator overloading for
'+'-Operator for strings to work as append? (like ~).
I understand, that '~' is in general a better choice than '+', so
this is of more theoretical interest.
It is cl
On Monday, 19 June 2017 at 12:22:43 UTC, ketmar wrote:
Martin Tschierschke wrote:
Just a thought it might be useful for cut-n-paste when porting
code:
Would it be possible to define an operator overloading for
'+'-Operator for strings to work as append? (like ~).
I understand, that '~' is in
On Friday, 23 June 2017 at 06:59:22 UTC, Suliman wrote:
I need to get external variable and make class by it's value
- string mystr = "lng-" ~ language;
- foreach(i, line; arrayOfLines )
li
code.mystr #{line}
I need to get HTML code like this:
some D code
But class n
What do I have to do, to make this work?
iota(number).each!...command_x(a...);command_y(b...);command_z(c..))
^?
how to write the lambda?
Similar to the ruby (1..number).each{ commands...}
Don't want to write the following, because the index i is not
used inside the loop
On Friday, 30 June 2017 at 00:52:28 UTC, crimaniak wrote:
Hi!
Moving my project from mysql-lited to mysql-native I faced the
problem with null pointer error inside of mysql-native:
[...]
It seems I am doing something wrong so myself-native fails to
detect it in isValid(). So I search for exa
94 matches
Mail list logo