Re: Printing shortest decimal form of floating point number with Mir

2020-12-21 Thread 9il via Digitalmars-d-announce

On Tuesday, 22 December 2020 at 04:33:55 UTC, 9il wrote:
On Tuesday, 22 December 2020 at 02:02:24 UTC, Walter Bright 
wrote:

On 12/20/2020 9:42 PM, 9il wrote:
On Sunday, 20 December 2020 at 22:21:56 UTC, Walter Bright 
wrote:
Can the improved parsing be added to D? (It would need to be 
Boost licensed.)
If I am correct there is open PR that set DMD to use C’s 
primitives for literals parsing. So, for compiler itself we 
don’t need Mir.


That's not correct for the targets that use Digital Mars C.


I thought that DMD is compiled with LDC for release builds, 
isn't it?



If you mean Phobos - one can use Mir instead.


These functions in Phobos would make a great advertisement for 
Mir.


How this possible? Having them in Mir is already a great 
advertisement for Mir and not having them in Phobos is an even 
more great advertisement for Mir.


... I just have thought maybe I have missed something and DLF 
helps Mir with advertising at least a bit, maybe at least with 
two-three tweets per year? The last time @D_Programming tweeted 
something about Mir was in 2016.




Re: Printing shortest decimal form of floating point number with Mir

2020-12-21 Thread 9il via Digitalmars-d-announce

On Tuesday, 22 December 2020 at 02:02:24 UTC, Walter Bright wrote:

On 12/20/2020 9:42 PM, 9il wrote:
On Sunday, 20 December 2020 at 22:21:56 UTC, Walter Bright 
wrote:
Can the improved parsing be added to D? (It would need to be 
Boost licensed.)
If I am correct there is open PR that set DMD to use C’s 
primitives for literals parsing. So, for compiler itself we 
don’t need Mir.


That's not correct for the targets that use Digital Mars C.


I thought that DMD is compiled with LDC for release builds, isn't 
it?



If you mean Phobos - one can use Mir instead.


These functions in Phobos would make a great advertisement for 
Mir.


How this possible? Having them in Mir is already a great 
advertisement for Mir and not having them in Phobos is an even 
more great advertisement for Mir.




Re: Truly algebraic Variant and Nullable

2020-12-21 Thread 9il via Digitalmars-d-announce
On Sunday, 20 December 2020 at 12:32:35 UTC, Petar Kirov 
[ZombineDev] wrote:
How does your work compare to sumtype? Would mir.algebraic 
offer any benefits, which would make it worth switching over?


replied at
https://forum.dlang.org/post/zlphfxktclgdookqt...@forum.dlang.org

If we can work together to consolidate on a single API, I think 
it would be better for the language ecosystem.


Agreed. On the other hand, my public association with a DIP would 
be a red flag and will increase the chance the DIP would be 
declined. Cooperation is better to make silently.




Re: Truly algebraic Variant and Nullable

2020-12-21 Thread 9il via Digitalmars-d-announce
On Sunday, 20 December 2020 at 11:00:05 UTC, Tobias Pankrath 
wrote:

On Sunday, 15 November 2020 at 04:54:19 UTC, 9il wrote:
Truly algebraic Variant and Nullable with an order-independent 
list of types.


Thanks for sharing it!

Could you give a (very short) explanation on why sumtype could 
not meet your requirements? I am just starting a new D project 
and have to choose between sumtype and your solution.




Lets users do comparisons between libraries. Both are very good.

Some mir.algebraic features:

1. (optionally) Nullable algebraic types. Also serves as buggy 
Phobos Nullable replacement.

2. (optionally) Tagged algebraic types
3. Type list order-independent declaration
4. Feature-rich visitor handlers. For example, they can form new 
Algebraic types if the visitors return different types.
5. `void` support. This is an important brick for reflections on 
the algebra of type sets.
6. Algebraic type subsets are supported by `get`, `trustedGet`, 
`_is`, and `this` primitives. You can operate with algebraic 
subset as with the type of the original typeset. [1]
7. Members (fields and methods) reflection. Is more restrictive 
than in vibe.d implementation. It adds member reflection to an 
algebraic type if all of the types contain members with the same 
name.


Mir implements Algebra of (type) sets with reflections 
(functions) on it.


[1] https://github.com/libmir/mir-core/issues/33


Re: Printing shortest decimal form of floating point number with Mir

2020-12-21 Thread Walter Bright via Digitalmars-d-announce

On 12/20/2020 9:42 PM, 9il wrote:

On Sunday, 20 December 2020 at 22:21:56 UTC, Walter Bright wrote:

Can the improved parsing be added to D? (It would need to be Boost licensed.)
If I am correct there is open PR that set DMD to use C’s primitives for literals 
parsing. So, for compiler itself we don’t need Mir.


That's not correct for the targets that use Digital Mars C.



If you mean Phobos - one can use Mir instead.


These functions in Phobos would make a great advertisement for Mir.



Re: Beta 2.095.0

2020-12-21 Thread starcanopy via Digitalmars-d-announce

On Sunday, 20 December 2020 at 13:21:46 UTC, Martin Nowak wrote:
Glad to announce the first beta for the 2.095.0 release, ♥ to 
the 61 contributors.


http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.095.0.html

As usual please report any bugs at
https://issues.dlang.org

-Martin


Bugzilla 21452: isCallable erroneously returns false on 
function templates


Thank you, Mr. Schroll!


Re: Truly algebraic Variant and Nullable

2020-12-21 Thread sighoya via Digitalmars-d-announce

On Sunday, 20 December 2020 at 12:38:47 UTC, Max Haughton wrote:
On Sunday, 20 December 2020 at 12:32:35 UTC, Petar Kirov 
[ZombineDev] wrote:

On Sunday, 15 November 2020 at 04:54:19 UTC, 9il wrote:

[...]


I have been using SumType [1] for a while in some of my 
projects and I'm quite happy with it. The author has been very 
responsive to feedback and the quality bar of his work is 
definitely higher than that of many other D libraries (e.g. 
support for @safe/pure/@nogc/nothrow, immutable, betterC and 
DIP1000, etc.).


[...]


I'm increasingly thinking these should be a language feature, 
it just seems right.


+1 because it would allow for implicit overload resolution


Re: Truly algebraic Variant and Nullable

2020-12-21 Thread Oleg B via Digitalmars-d-announce
On Sunday, 20 December 2020 at 11:00:05 UTC, Tobias Pankrath 
wrote:

On Sunday, 15 November 2020 at 04:54:19 UTC, 9il wrote:
Truly algebraic Variant and Nullable with an order-independent 
list of types.


Thanks for sharing it!

Could you give a (very short) explanation on why sumtype could 
not meet your requirements? I am just starting a new D project 
and have to choose between sumtype and your solution.




The work has been sponsored by Kaleidic Associates and 
Symmetry Investments.


Much appreciated!


For me choose between sumtype and mir.algebraic ends when I not 
found
any solution for working with type kind [1] in sumtype. Kind 
represents in
taggedalgebraic [2] too, but it can't work in compile time 
(important for
me in current project). Also I find tagged_union [3] library, but 
it haven't

any visit [4] or match functions.

[1] http://mir-core.libmir.org/mir_algebraic.html#.TaggedVariant
[2] https://code.dlang.org/packages/taggedalgebraic
[3] https://code.dlang.org/packages/tagged_union
[4] http://mir-core.libmir.org/mir_algebraic.html#visit