Re: SoAC

2019-08-13 Thread Seb via Digitalmars-d-announce

On Sunday, 11 August 2019 at 19:16:22 UTC, Tiberiu Lepadatu wrote:

Hi everyone,

I want to participate to Symmetry Autumn of Code 2019 with 
either the project "Solve dependency hell" or "Implement 
Reactive programming into D". I have some experience with 
programming languages mainly Rust, FORTRAN, Python and 
JavaScript and this summer I have worked intensively with RxJS 
and with python FORTRAN wrapping. I think, giving my past 
experience that I can get each one of them to a finished state. 
But I think that the question that should be asked is which one 
of those will be more impactful to the community? Which one 
will better serve the D future? I will try by Wednesday to 
prepare an application for both of them. But I can't wait to 
hear your opinions.


Thanks,
Tiberiu


You don't have to decide. Like GSoC submitting multiple project 
proposals is ok if you can't decide, though typically it makes 
sense to focus on one and making it a high-quality one.


Re: cachetools v.0.3.1

2019-08-13 Thread ikod via Digitalmars-d-announce

On Tuesday, 13 August 2019 at 17:18:23 UTC, ag0aep6g wrote:

On 13.08.19 11:34, ikod wrote:

What is it?

cachetools - package with @safe and @nogc cache and containers 
implementations.

[...]

Project page: https://github.com/ikod/cachetools
docs: https://ikod.github.io/cachetools/


They don't seem to actually be @safe. An example:


import cachetools.containers.lists;
import std.stdio;
void main() @safe
{
DList!int dl;
dl.insert_first(42);
auto r = dl.range;
dl.clear();
writeln(r.front); /* Prints garbage, because it's accessing 
`free`d memory. */

}


As far as I can I see, that compiles because you have a bad 
@trusted here:


Probably this @trusted is not a problem (std.container.dlist also 
contain @trusted code). I mistakenly  ignored this case.


Thanks for your report, and  I'll create issue on github.


.

Other containers probably have similar problems.





Re: SoAC

2019-08-13 Thread aberba via Digitalmars-d-announce

On Sunday, 11 August 2019 at 19:16:22 UTC, Tiberiu Lepadatu wrote:

Hi everyone,

I want to participate to Symmetry Autumn of Code 2019 with 
either the project "Solve dependency hell" or "Implement 
Reactive programming into D". I have some experience with 
programming languages mainly Rust, FORTRAN, Python and 
JavaScript and this summer I have worked intensively with RxJS 
and with python FORTRAN wrapping. I think, giving my past 
experience that I can get each one of them to a finished state. 
But I think that the question that should be asked is which one 
of those will be more impactful to the community? Which one 
will better serve the D future? I will try by Wednesday to 
prepare an application for both of them. But I can't wait to 
hear your opinions.


Thanks,
Tiberiu


I like how reactive programming is become the default pattern in 
both iOS (SwitftUI) and Android UI development. I vote for 
"Implement

Reactive programming into D" for that.


Re: cachetools v.0.3.1

2019-08-13 Thread ag0aep6g via Digitalmars-d-announce

On 13.08.19 11:34, ikod wrote:

What is it?

cachetools - package with @safe and @nogc cache and containers 
implementations.

[...]

Project page: https://github.com/ikod/cachetools
docs: https://ikod.github.io/cachetools/


They don't seem to actually be @safe. An example:


import cachetools.containers.lists;
import std.stdio;
void main() @safe
{
DList!int dl;
dl.insert_first(42);
auto r = dl.range;
dl.clear();
writeln(r.front); /* Prints garbage, because it's accessing `free`d 
memory. */

}


As far as I can I see, that compiles because you have a bad @trusted 
here: 
.


Other containers probably have similar problems.


Re: cachetools v.0.3.1

2019-08-13 Thread ikod via Digitalmars-d-announce
On Tuesday, 13 August 2019 at 10:12:45 UTC, Martin Tschierschke 
wrote:

On Tuesday, 13 August 2019 at 09:34:48 UTC, ikod wrote:

Hello

cachetools version 0.3.1 released


[...]
Looking at your performance numbers, I am wondering should your 
work in the end result in a better std AA implementation?


Regards mt.


I'm not sure if I can say too much here. And I can be wrong, but 
looks like std AA allocate table bucket entry on every insert. 
This can hurt performance when you have mixed insert/lookup use 
case. If this is the case then fix will require rewrite of AA 
code.


Thanks and regards,
Igor


Re: cachetools v.0.3.1

2019-08-13 Thread Martin Tschierschke via Digitalmars-d-announce

On Tuesday, 13 August 2019 at 09:34:48 UTC, ikod wrote:

Hello

cachetools version 0.3.1 released


[...]
Looking at your performance numbers, I am wondering should your 
work in the end result in a better std AA implementation?


Regards mt.



Re: cachetools v.0.3.1

2019-08-13 Thread ikod via Digitalmars-d-announce

Hello

cachetools version 0.3.1 released

Changelog:

"Set" container added (based on hashtable)
Const-ness problems for hashtable fixed.

What is it?

cachetools - package with @safe and @nogc cache and containers  
implementations.


It inherits @nogc and @safe property from key toHash and opEquals 
methods and can store immutable keys and values (with 
restrictions).


Currently implemented:

caches: LRU, 2Q (with TTL)

containers: HashMap, OrderedHashMap, unrolled list, dlist, slist, 
set


Project page: https://github.com/ikod/cachetools
docs: https://ikod.github.io/cachetools/

Some performance test results:
https://github.com/ikod/cachetools/tree/master/testhash