I expect this small program to throw an Exception:
import std.stdio;
import std.range;
void main()
{
auto a = [[1,2],
[4,5,3]];
a.transposed!(TransverseOptions.enforceNotJagged).writeln;
}
But it just outputs:
[[1, 4], [2, 5], [3]]
Is it a bug or is it me who's doin
On Friday, 21 September 2018 at 12:15:52 UTC, NX wrote:
How can I properly convert a character, say, first one to upper
case in a unicode correct manner?
That would depend on how you'd define correctness. If your
application needs to support "all" languages, then (depending how
you interpret
On Thursday, 20 September 2018 at 10:51:52 UTC, braboar wrote:
Can anybody give me a guide of using serial port?
Here's a program I wrote (after lots of trial-and-error) to
control my monitor through an USB serial-port adapter:
https://github.com/CyberShadow/misc/blob/master/pq321q.d
Hope t
On Saturday, 22 September 2018 at 05:49:05 UTC, Vladimir
Panteleev wrote:
In short: there is no easy way, in the general sense.
If you can find something that achieves what you need in C++,
there's a good chance that it would work to some extent (or could
be adapted with reasonable effort) fo
On Saturday, 22 September 2018 at 05:43:53 UTC, Vladimir
Panteleev wrote:
The only way to do that would be using a debugger.
The specifics of the solution would thus depend on the
platform. On POSIX, it would probably mean getting gdb to print
a detailed backtrace for your project. On Windows,
On Friday, 21 September 2018 at 19:08:36 UTC, ANtlord wrote:
Hello! I need to make a some sort of error report system for an
application. I want to catch base Exception class instance and
report call stack and with the call stack I want to report all
variables with their values. There are a cou
On Saturday, 22 September 2018 at 01:58:57 UTC, Adam D. Ruppe
wrote:
You probably shouldn't name a module the same as a member
anyway, and it should also have two names, like "module
myproject.isprime;"
But the fix here is to just use the full name.
import isPrime;
void main() {
isPrime.isP
On Saturday, 22 September 2018 at 02:13:58 UTC, Chris Katko wrote:
On Friday, 21 September 2018 at 12:15:59 UTC, Ali Çehreli wrote:
On 09/21/2018 12:25 AM, Chris Katko wrote:
[...]
You can use a free-standing function as a workaround, which is
included in the following chapter that explains
On Friday, 21 September 2018 at 12:15:59 UTC, Ali Çehreli wrote:
On 09/21/2018 12:25 AM, Chris Katko wrote:
On Thursday, 20 September 2018 at 05:51:17 UTC, Neia Neutuladh
wrote:
On Thursday, 20 September 2018 at 05:34:42 UTC, Chris Katko
wrote:
All I want to do is loop from 0 to [constant] with
On Saturday, 22 September 2018 at 01:51:33 UTC, Samir wrote:
main.d:
import isPrime;
void main() {
isPrime(x);
}
You probably shouldn't name a module the same as a member anyway,
and it should also have two names, like "module
myproject.isprime;"
But the fix here is to just use the full
On Monday, 24 March 2008 at 17:41:11 UTC, Steven Schveighoffer
wrote:
I know you fixed the problem, but just an FYI, the reason is
because when you import rollDice, you bring both rollDice the
module and rollDice the function into the global namespace
(which confuses the compiler 'cause it does
Hello! I need to make a some sort of error report system for an
application. I want to catch base Exception class instance and
report call stack and with the call stack I want to report all
variables with their values. There are a couple of services that
make report using call stack and provide
On Friday, 21 September 2018 at 12:15:52 UTC, NX wrote:
How can I properly convert a character, say, first one to upper
case in a unicode correct manner?
In which code level I should be working on? Grapheme? Or maybe
code point is sufficient?
There are few phobos functions like asCapitalized()
On Friday, 21 September 2018 at 13:32:54 UTC, NX wrote:
On Friday, 21 September 2018 at 12:34:12 UTC, Laurent Tréguier
wrote:
I would probably go for std.utf.decode [1] to get the
character and its length in code units, capitalize it, and
concatenate the result with the rest of the string.
[1
On Friday, 21 September 2018 at 06:08:39 UTC, berni wrote:
Sorry, I made a mistake while testing and after I found out,
that it was not available in the documentation at dpldocs.info
I concluded, that it must be a really new feature. But now it
seems to me, that dpldocs is outdated a little bit
On Friday, 21 September 2018 at 13:32:54 UTC, NX wrote:
On Friday, 21 September 2018 at 12:34:12 UTC, Laurent Tréguier
wrote:
I would probably go for std.utf.decode [1] to get the
character and its length in code units, capitalize it, and
concatenate the result with the rest of the string.
[1
On Friday, 21 September 2018 at 12:34:12 UTC, Laurent Tréguier
wrote:
I would probably go for std.utf.decode [1] to get the character
and its length in code units, capitalize it, and concatenate
the result with the rest of the string.
[1] https://dlang.org/phobos/std_utf.html#.decode
So by t
On Friday, 21 September 2018 at 12:15:52 UTC, NX wrote:
How can I properly convert a character, say, first one to upper
case in a unicode correct manner?
In which code level I should be working on? Grapheme? Or maybe
code point is sufficient?
There are few phobos functions like asCapitalized()
On Friday, 21 September 2018 at 12:15:52 UTC, NX wrote:
How can I properly convert a character, say, first one to upper
case in a unicode correct manner?
In which code level I should be working on? Grapheme? Or maybe
code point is sufficient?
There are few phobos functions like asCapitalized()
How can I properly convert a character, say, first one to upper
case in a unicode correct manner?
In which code level I should be working on? Grapheme? Or maybe
code point is sufficient?
There are few phobos functions like asCapitalized() none of which
are what I want.
On 09/21/2018 12:25 AM, Chris Katko wrote:
On Thursday, 20 September 2018 at 05:51:17 UTC, Neia Neutuladh wrote:
On Thursday, 20 September 2018 at 05:34:42 UTC, Chris Katko wrote:
All I want to do is loop from 0 to [constant] with a for or foreach,
and have it split up across however many cores
On Friday, 21 September 2018 at 07:25:17 UTC, Chris Katko wrote:
I get "Error: template instance `reduce!((a, b) => a + b)`
cannot use local __lambda1 as parameter to non-global template
reduce(functions...)" when trying to compile that using the
online D editor with DMD and LDC.
Any ideas?
On Thursday, 20 September 2018 at 05:51:17 UTC, Neia Neutuladh
wrote:
On Thursday, 20 September 2018 at 05:34:42 UTC, Chris Katko
wrote:
All I want to do is loop from 0 to [constant] with a for or
foreach, and have it split up across however many cores I have.
You're looking at std.parallelism
23 matches
Mail list logo