On Wednesday, 15 January 2020 at 19:50:31 UTC, mark wrote:
I really do need a set for the next part of the program, but
taking your code and ideas I have now reduced the function to
this:
WordSet getWords(string filename, int wordsize) {
WordSet words;
File(filename).byLine
.ma
On Wednesday, 15 January 2020 at 20:06:01 UTC, mark wrote:
For example, I haven't found one definitive place in the docs
that document D's strings.
My unofficial docs are built from the same source, so not
perfect, but at least have better cross linking:
http://dpldocs.info/experimental-docs
On Wednesday, 15 January 2020 at 20:06:01 UTC, mark wrote:
However, what I really miss is a contents page so that I can
look at each topic and jump back when I want to recap something.
Please submit an enhancement request:
https://github.com/dlang-tour/core/issues
For example, I haven't f
On Wed, Jan 15, 2020 at 07:50:31PM +, mark via Digitalmars-d-learn wrote:
[...]
> Why did you use string.count rather than string.length?
The .length of a `string` type is the number of bytes that it occupies,
which is not necessarily the same thing as the number of characters in
the string. E
I am learning D for the first time.
While I wait for Mike Parker's "Learning D" book to arrive, I
have started using the tour.
I really like the tour, especially the fact that you can run and
tweak the code as well as read the explanations.
However, what I really miss is a contents page so
I really do need a set for the next part of the program, but
taking your code and ideas I have now reduced the function to
this:
WordSet getWords(string filename, int wordsize) {
WordSet words;
File(filename).byLine
.map!(line => line.until!(not!isAlpha))
.filter!(word =
On 2020-01-15 19:45, Chris Katko wrote:
Still, some internal instrumentation would be nice. But I'm not aware of
any.
There are some runtime flags that can be passed to the executable when
running it to get some info about the GC. Of course these are not
documented (except perhaps in the cha
On Sunday, 12 January 2020 at 13:58:18 UTC, Per Nordlöw wrote:
Is there a druntime/phobos function for getting the amount of
memory (both, stack, malloc, and GC) being used by the current
process?
Valgrind will tell you the exact usage (except no delineation for
GC) per here:
https://stacko
On 2020-01-15 16:34, mark via Digitalmars-d-learn wrote:
Is this as compact as it _reasonably_ can be?
How about this?
auto uniqueWords(string filename, uint wordsize) {
import std.algorithm, std.array, std.conv, std.functional, std.uni;
return File(filename).byLine
.map!(line
On Sunday, 12 January 2020 at 22:00:33 UTC, p.shkadzko wrote:
Ok, I am trying to meson and is struggling with meson.build
file. I looked up the examples page:
https://github.com/mesonbuild/meson/tree/master/test%20cases/d
which has a lot of examples but not the one that shows you how
to build
Concerning the first (fresh) compilation:
On Wednesday, 8 January 2020 at 13:14:38 UTC, kinke wrote:
[...] you can also try to compile all modules at once, but
output separate object files - `ldc2 -c a.d b.d c.d`.
I just had another try at `ldc2 -c ...`. It does work when
grouping the files i
On 1/15/20 6:26 PM, TodNaz wrote:
Hello!
Maybe someone came across ... I use sdl 2 derelcit, and wanted to draw
text (not English, but Russian, for example). And when called in
TTF_RenderUTF8_Blended, the text is drawn with incorrect characters
(with these: ""). And with wstribg and TTF_Render
On Thursday, 9 January 2020 at 10:26:07 UTC, Jonathan M Davis
wrote:
On Wednesday, January 8, 2020 10:56:20 PM MST rikki cattermole
via Digitalmars-d-learn wrote:
Slicing via the opSlice operator overload is a convention, not
a requirement.
It's not a requirement, but it's more than a conventi
Thanks for the ideas, I've now reduced the size of the getWords()
function (even allowing for moving the imports to the top of the
file) to this:
WordSet getWords(string filename, int wordsize) {
string bareWord(string line) {
auto rx = ctRegex!(r"^([a-z]+)", "i");
auto matc
Hello!
Maybe someone came across ... I use sdl 2 derelcit, and wanted to
draw text (not English, but Russian, for example). And when
called in TTF_RenderUTF8_Blended, the text is drawn with
incorrect characters (with these: ""). And with wstribg and
TTF_RendererUNICODE_Blended, the surface has
Hi, I had a related question in the "Does -profile need the D runtime?" thread.
Since D runtime is required for profile to work, the question is how
can I use profile when initializing it myself?
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
On Monday, 13 January 2020 at 23:06:01 UTC, Per Nordlöw wrote:
Unfortunately that didn't tell me the cause of the problem but
only the stack trace of the failing call to `new` which is not
called inside a destructor.
I found the problem. I was greedly using the `__monitor__` slot
of some clas
On 1/14/20 8:15 PM, Alex Burton wrote:> On Thursday, 9 January 2020 at
10:26:07 UTC, Jonathan M Davis wrote:
>> On Wednesday, January 8, 2020 10:56:20 PM MST rikki cattermole via
>> Digitalmars-d-learn wrote:
>>> Slicing via the opSlice operator overload is a convention, not a
>>> requirement.
>>
18 matches
Mail list logo