Periodic fractions.
On Tuesday, 17 February 2015 at 08:05:49 UTC, Kagamin wrote:
Periodic fractions.
Or transcendental numbers, for that matter, but arbitrary !=
infinite. A max_expansion template parameter could be useful here.
For my use case I'm less concerned with absolute resolution than
with preserving t
On Tuesday, 17 February 2015 at 07:20:19 UTC, Ivan Kazmenko wrote:
The readf function does not seem to support reading BigInts
directly.
However, you can read a string and construct a BigInt from it,
either by std.conv.to or directly invoking the constructor:
import std.algorithm, std.bigi
On Monday, 16 February 2015 at 23:49:31 UTC, 岩倉 澪 wrote:
I'm looking to manage my current project with dub, but there is
one problem that has been getting in my way. I want to use
`-rpath=$ORIGIN`, which I can pass with `-L-rpath=\$ORIGIN`
when directly invoking the compiler, but when putting
On Monday, 16 February 2015 at 20:17:55 UTC, anonymous wrote:
Remove that `alias _r this;`. You don't want to forward
opIndex, so you can't use alias this which forwards everything
that doesn't compile. opDispatch may be an option to forward
everything but opIndex.
This looses most of the mea
On Tuesday, 17 February 2015 at 09:08:17 UTC, Vlad Levenfeld
wrote:
On Tuesday, 17 February 2015 at 08:05:49 UTC, Kagamin wrote:
Periodic fractions.
Or transcendental numbers, for that matter, but arbitrary !=
infinite. A max_expansion template parameter could be useful
here.
For my use ca
On Tuesday, 17 February 2015 at 09:08:17 UTC, Vlad Levenfeld
wrote:
For my use case I'm less concerned with absolute resolution
than with preserving the information in the smaller operand
when dealing with large magnitude differences.
What do you mean? As long as you don't change the operand,
On Tuesday, 17 February 2015 at 13:38:41 UTC, Per Nordlöw wrote:
This looses most of the meaning of my idea. I still want my
range to inherit all the powers of its wrapped range.
Is there no way to disable member functions in D?
I hadn't thought of @disable. Played around with it a bit. The
I'd like to create a Terminal using terminal.d and make it
available across several source files (as a global rather than
having to pass it around) but when I define it like this in
global scope:
Terminal Screen = Terminal(ConsoleOutputType.cellular);
I get this error:
Error: getenv cannot b
On Tuesday, 17 February 2015 at 19:17:42 UTC, Paul wrote:
I don't understand the error and Google doesn't help - can it
be fixed or am I just using the wrong approach?
Trying to create it as a global tries to make it as a static
variable which means it constructs at compile time. It can't
acc
On Tue, Feb 17, 2015 at 07:17:41PM +, Paul via Digitalmars-d-learn wrote:
> I'd like to create a Terminal using terminal.d and make it available
> across several source files (as a global rather than having to pass it
> around) but when I define it like this in global scope:
>
> Terminal Scree
On 02/16/2015 01:51 AM, Baz wrote:
> For each language there is a column about handing multiple
> list, i thought it could be a good idea to see how D handle
> this:
I've updated the page with my understanding:
http://en.wikipedia.org/wiki/Map_(higher-order_function)
I think they mean walkin
On Tuesday, 17 February 2015 at 15:02:05 UTC, anonymous wrote:
I hadn't thought of @disable. Played around with it a bit. The
following code seems to work. I didn't really test it or think
very hard about it, though.
Superb! I'd like to see this getting into std.typecons.
Having this in the l
On Tuesday, 17 February 2015 at 19:29:52 UTC, Adam D. Ruppe wrote:
On Tuesday, 17 February 2015 at 19:17:42 UTC, Paul wrote:
I don't understand the error and Google doesn't help - can it
be fixed or am I just using the wrong approach?
Trying to create it as a global tries to make it as a stati
On Tuesday, 17 February 2015 at 19:35:27 UTC, H. S. Teoh wrote:
On Tue, Feb 17, 2015 at 07:17:41PM +, Paul via
Digitalmars-d-learn wrote:
I'd like to create a Terminal using terminal.d and make it
available
across several source files (as a global rather than having to
pass it
around) but
On Tue, 17 Feb 2015 19:56:19 +, Paul wrote:
> I see, thanks once again :D I don't know why the environment variable
> isn't accessible at compilation (from a terminal)
'cause you can't execute C code in CTFE.
signature.asc
Description: PGP signature
On Tuesday, 17 February 2015 at 20:06:15 UTC, Paul wrote:
There doesn't seem to be an alternative to using a pointer as
it's rather a large struct to pass to functions as is!
yeah, copying is disabled too. The struct isn't big in memory
terms (it has few actual data members) but since the dest
On Tue, Feb 17, 2015 at 07:56:19PM +, Paul via Digitalmars-d-learn wrote:
[...]
> I see, thanks once again :D I don't know why the environment variable isn't
> accessible at compilation (from a terminal) but that's OS business I guess
> rather than D related.
Even if you *could* access it at c
On Tuesday, 17 February 2015 at 14:03:45 UTC, Kagamin wrote:
On Tuesday, 17 February 2015 at 09:08:17 UTC, Vlad Levenfeld
wrote:
For my use case I'm less concerned with absolute resolution
than with preserving the information in the smaller operand
when dealing with large magnitude differences.
On Tuesday, 17 February 2015 at 13:55:15 UTC, Dominikus Dittes
Scherkl wrote:
We have rational (two bigint, one for the numerator and one for
the denominator), which I like better than floatingpoint (it's
more expressive).
Yeah, this is probably the best that can be done, since any
arbitrary-
In C++, the index operator for maps will either return a
reference to the existing value if the key can be found, or a
reference to a new, default-initialized value if one with the
given key cannot be found.
In D, an exception is thrown instead when a value with the given
key cannot be found,
On Wednesday, 18 February 2015 at 00:21:11 UTC, Matt Kline wrote:
if (value) {
should of course be
if (!value) {
Sorry for the typo.
On 18/02/2015 1:21 p.m., Matt Kline wrote:
In C++, the index operator for maps will either return a reference to
the existing value if the key can be found, or a reference to a new,
default-initialized value if one with the given key cannot be found.
In D, an exception is thrown instead when a v
I have searched online and I found no way for dividing D Module
between multiple files.
While other languages move to making classes distributed on
multiple files (like C#'s partial classes), D is moving in the
opposite direction, and makes a bigger code unit in one file.
Biding every module
On Wed, 18 Feb 2015 07:23:24 +
Muahmmad Adel via Digitalmars-d-learn
wrote:
> I have searched online and I found no way for dividing D Module
> between multiple files.
>
> While other languages move to making classes distributed on
> multiple files (like C#'s partial classes), D is moving
25 matches
Mail list logo