Re: static array with inferred size

2017-09-20 Thread Ilya via Digitalmars-d
On Wednesday, 20 September 2017 at 00:47:25 UTC, Steven Schveighoffer wrote: This needs to happen. e.g.: char[$] arr = "hello"; // syntax up for debate, but I like this. Yes, hope to see this one day as a language feature, not a library solution. --Ilya

Re: 24-bit int

2017-09-03 Thread Ilya via Digitalmars-d-learn
On Sunday, 3 September 2017 at 23:30:43 UTC, EntangledQuanta wrote: On Sunday, 3 September 2017 at 04:01:34 UTC, Ilya Yaroshenko wrote: On Saturday, 2 September 2017 at 03:29:20 UTC, EntangledQuanta wrote: On Saturday, 2 September 2017 at 02:49:41 UTC, Ilya Yaroshenko wrote: [...] Thanks.

Re: C++ / Why Iterators Got It All Wrong

2017-09-03 Thread Ilya via Digitalmars-d
On Sunday, 3 September 2017 at 16:33:04 UTC, Moritz Maxeiner wrote: On Sunday, 3 September 2017 at 14:19:19 UTC, Ilya Yaroshenko wrote: Ranges requires for 25% more space for canonical matrixes then iterators. We do have to differentiate between a container and the API with which to iterate

Re: Generalized Linear Models and Stochastic Gradient Descent in D

2017-06-11 Thread Ilya via Digitalmars-d-announce
On Sunday, 11 June 2017 at 13:36:09 UTC, jmh530 wrote: On Sunday, 11 June 2017 at 12:36:19 UTC, 9il wrote: I ported few large complex Matlab scripts using Lubeck and Mir-Algorithm (closed source). It works perfectly and results are the same as Matlab original! All functions from Lubeck was

Re: Recently added ndslice API

2017-03-17 Thread Ilya via Digitalmars-d-announce
On Friday, 17 March 2017 at 17:35:33 UTC, jmh530 wrote: On Saturday, 11 March 2017 at 10:53:35 UTC, Ilya Yaroshenko wrote: Github: https://github.com/libmir/mir-algorithm Every time I look at that mir-alogrithm main page with the Scheme image, I'm just like what the hell is going on. Maybe

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-22 Thread Ilya via Digitalmars-d
On Friday, 22 January 2016 at 17:09:01 UTC, Jacob Carlborg wrote: On 2016-01-21 20:31, Andrei Alexandrescu wrote: [...] Can we just implement a basic form of named parameters that remove the ugly workaround that Flag is. void a(int x); a(x: 3); // error, cannot be called with named

Re: Collapsing n-dimensional array to linear (1 dimensional)

2016-01-22 Thread Ilya via Digitalmars-d-learn
On Friday, 22 January 2016 at 12:07:11 UTC, abad wrote: Let's say I have an array like this: int[][][] array; And I want to generate a linear int[] based on its data. Is there a standard library method for achieving this, or must I iterate over the array manually? What I'm thinking of is

Re: Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

2016-01-21 Thread Ilya via Digitalmars-d
On Thursday, 21 January 2016 at 19:31:19 UTC, Andrei Alexandrescu wrote: The correct idiom involving Flag is: * Use the name Flag!"frob" for the type of the flag * Use Yes.frob and No.frob for the flag values * Do NOT alias Flag!"frob" to a new name. This is unnecessary, unhelpful, and

Re: opIndex, opSlice, length for joiner?

2016-01-20 Thread Ilya via Digitalmars-d
On Wednesday, 20 January 2016 at 17:36:29 UTC, Maverick Chardet wrote: Hi everyone, After reading the thread "Distributed Memory implementation": http://forum.dlang.org/post/oqcfifzolmolcvyup...@forum.dlang.org And more precisely the suggestion of Dragos Carp on page 2:

Re: medianOfMedians

2016-01-19 Thread Ilya via Digitalmars-d
On Wednesday, 20 January 2016 at 02:26:35 UTC, Timon Gehr wrote: On 01/20/2016 02:20 AM, Andrei Alexandrescu wrote: [...] This is not an implementation of the median of medians algorithm. [...] The approximate medianOfMedians algorithm can be used for topN. --Ilya

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Monday, 18 January 2016 at 23:27:19 UTC, Ivan Kazmenko wrote: On Monday, 18 January 2016 at 23:18:03 UTC, Ilya wrote: A RNGs don't improve worst case. It only changes an permutation for worst case. --Ilya Still, use of RNG makes it impossible to construct the worst case beforehand, once

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Tuesday, 19 January 2016 at 00:02:08 UTC, Timon Gehr wrote: On 01/19/2016 12:55 AM, Ilya wrote: On Monday, 18 January 2016 at 23:53:53 UTC, Timon Gehr wrote: On 01/19/2016 12:50 AM, Ilya wrote: ... 1. Yes, probability of hitting the worst case repeatedly is is practically zero. But RNGs

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Tuesday, 19 January 2016 at 01:04:03 UTC, Andrei Alexandrescu wrote: On 1/18/16 7:46 PM, Ilya wrote: On Tuesday, 19 January 2016 at 00:38:14 UTC, Timon Gehr wrote: On 01/19/2016 01:12 AM, Ilya wrote: There is already implementation with predictable seed. Proof:

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Tuesday, 19 January 2016 at 01:04:03 UTC, Andrei Alexandrescu wrote: On 1/18/16 7:46 PM, Ilya wrote: On Tuesday, 19 January 2016 at 00:38:14 UTC, Timon Gehr wrote: On 01/19/2016 01:12 AM, Ilya wrote: There is already implementation with predictable seed. Proof:

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Monday, 18 January 2016 at 20:45:56 UTC, Ivan Kazmenko wrote: On Monday, 18 January 2016 at 12:00:10 UTC, Ivan Kazmenko wrote: Here goes the test which shows quadratic behavior for the new version: http://dpaste.dzfl.pl/e4b3bc26c3cf (dpaste kills the slow code before it completes the task)

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Monday, 18 January 2016 at 23:49:36 UTC, Andrei Alexandrescu wrote: On 1/18/16 6:44 PM, Ilya wrote: On Monday, 18 January 2016 at 23:27:19 UTC, Ivan Kazmenko wrote: On Monday, 18 January 2016 at 23:18:03 UTC, Ilya wrote: A RNGs don't improve worst case. It only changes an permutation for

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Monday, 18 January 2016 at 23:39:02 UTC, Andrei Alexandrescu wrote: On 1/18/16 6:18 PM, Ilya wrote: On Monday, 18 January 2016 at 20:45:56 UTC, Ivan Kazmenko wrote: On Monday, 18 January 2016 at 12:00:10 UTC, Ivan Kazmenko wrote: Here goes the test which shows quadratic behavior for the

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Tuesday, 19 January 2016 at 00:11:40 UTC, Andrei Alexandrescu wrote: On 1/18/16 6:51 PM, Ilya wrote: On Monday, 18 January 2016 at 23:49:36 UTC, Andrei Alexandrescu wrote: On 1/18/16 6:44 PM, Ilya wrote: On Monday, 18 January 2016 at 23:27:19 UTC, Ivan Kazmenko wrote: On Monday, 18

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Tuesday, 19 January 2016 at 00:38:14 UTC, Timon Gehr wrote: On 01/19/2016 01:12 AM, Ilya wrote: There is already implementation with predictable seed. Proof: https://github.com/D-Programming-Language/phobos/blob/master/std/random.d#L1151 --Ilya The default RNG is seeded with

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Tuesday, 19 January 2016 at 01:04:03 UTC, Andrei Alexandrescu wrote: On 1/18/16 7:46 PM, Ilya wrote: On Tuesday, 19 January 2016 at 00:38:14 UTC, Timon Gehr wrote: On 01/19/2016 01:12 AM, Ilya wrote: There is already implementation with predictable seed. Proof:

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Monday, 18 January 2016 at 23:55:38 UTC, Timon Gehr wrote: On 01/19/2016 12:51 AM, Ilya wrote: On Monday, 18 January 2016 at 23:49:36 UTC, Andrei Alexandrescu wrote: On 1/18/16 6:44 PM, Ilya wrote: On Monday, 18 January 2016 at 23:27:19 UTC, Ivan Kazmenko wrote: [...] No, it is

Re: topN using a heap

2016-01-18 Thread Ilya via Digitalmars-d
On Monday, 18 January 2016 at 23:53:53 UTC, Timon Gehr wrote: On 01/19/2016 12:50 AM, Ilya wrote: ... 1. Yes, probability of hitting the worst case repeatedly is is practically zero. But RNGs do not change this probability. 2. It is possible to build attack for our RNGs, because they are

Re: Scale-Hierarchy on ndslice

2016-01-13 Thread Ilya via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 20:11:55 UTC, Timothee Cour wrote: On Wed, Jan 13, 2016 at 10:13 AM, jmh530 via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: On Tuesday, 12 January 2016 at 21:48:39 UTC, Per Nordlöw wrote: Have anybody been thinking about adding a

Re: std.experimental.yesnogc

2016-01-13 Thread Ilya via Digitalmars-d
On Thursday, 14 January 2016 at 00:35:53 UTC, Andrei Alexandrescu wrote: Hey folks, I want to push things forward with artifacts dedicated to avoiding the GC, and of course my main worry is finding the right name. An obvious choice is std.experimental.nogc but we know from Marketing 101 that

Re: Tutorials section on vibed.org

2016-01-12 Thread Ilya via Digitalmars-d
On Monday, 4 January 2016 at 09:53:45 UTC, Sönke Ludwig wrote: I've just added a sub page on vibed.org to collect links to all existing vibe.d tutorials [1]. If you know of any additional ones, or would like to have an existing one removed, please leave a quick comment:

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya via Digitalmars-d-learn
On Sunday, 10 January 2016 at 02:43:05 UTC, Jay Norwood wrote: On Sunday, 10 January 2016 at 01:54:18 UTC, Jay Norwood wrote: [...] The parallel time for this case is about a 2x speed-up on my corei5 laptop, debug build in windows32, dmd. [...] I will add significantly faster pairwise

Re: shouldn't this throw ? iota(5).sliced(2,2)

2016-01-08 Thread Ilya via Digitalmars-d
it to not throw? On Fri, Jan 8, 2016 at 6:09 PM, Ilya via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Saturday, 9 January 2016 at 00:15:10 UTC, Timothee Cour wrote: I'm not sure I understand your argument. My problem is that iota(5) has 5 elements which is more than 2*2

Re: ndslice: allow: a[ _, 9, R(2, $, -3)] as matlab's a[: ,9, reverse(2:3:end)) ]

2016-01-08 Thread Ilya via Digitalmars-d
On Saturday, 9 January 2016 at 00:26:42 UTC, Timothee Cour wrote: i wrote my own tensor library a while ago and it allows the more convenient matlab/python+numpy like syntax: a[ _, 9, R(2, $, -3)] these are allowed: R() or _: full range for an index R(a,b): a..b R(a,b,s): when s>0, iota(a,b,s)

Re: shouldn't this throw ? iota(5).sliced(2,2)

2016-01-08 Thread Ilya via Digitalmars-d
On Saturday, 9 January 2016 at 00:15:10 UTC, Timothee Cour wrote: I'm not sure I understand your argument. My problem is that iota(5) has 5 elements which is more than 2*2, so I would expect iota(5).sliced(2,2) or iota(7).sliced(2,3).sliced(1,2) to throw, as in pretty much any other tensor

Re: DMD now does Dwarf style exception handling!

2016-01-04 Thread Ilya via Digitalmars-d
On Saturday, 2 January 2016 at 21:16:38 UTC, Walter Bright wrote: What I've been working on for the last month or so. https://github.com/D-Programming-Language/dmd/pull/5324 For Linux 64 anyway. Anyone who wants to do PRs to extend it to Linux 32, OSX and FreeBSD, feel free! Unfortunately,

Re: Using D and std.ndslice as a Numpy Replacement

2016-01-03 Thread Ilya via Digitalmars-d-announce
On Sunday, 3 January 2016 at 23:18:16 UTC, Andrei Alexandrescu wrote: On 1/2/16 6:24 PM, Ilya Yaroshenko wrote: On Saturday, 2 January 2016 at 23:23:38 UTC, Ilya Yaroshenko wrote: On Saturday, 2 January 2016 at 19:49:05 UTC, Jack Stouffer wrote: http://jackstouffer.com/blog/nd_slice.html

CyberShadow/DAutoTest — Merge failed

2015-12-31 Thread Ilya via Digitalmars-d
In the same time auto-tester works well (it may be not shown after the latest rebase). https://github.com/D-Programming-Language/phobos/pull/3397

Re: Voting For std.experimental.ndslice

2015-12-30 Thread Ilya via Digitalmars-d
On Wednesday, 30 December 2015 at 22:46:28 UTC, John Colvin wrote: On Wednesday, 30 December 2015 at 21:39:54 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 18:08:52 UTC, Andrei Alexandrescu wrote: On 12/29/2015 11:28 AM, Robert burner Schadek wrote: [...] Hopefully this is

Re: Phobos and D runtime build are broken.

2015-12-30 Thread Ilya via Digitalmars-d
On Wednesday, 30 December 2015 at 23:54:22 UTC, tsbockman wrote: All pull requests for Phobos and the D runtime are failing the auto tester now: Exception - file 'lexer.h': lexer.h: No such file or directory Exception - file 'parse.h': parse.h: No such file or directory Error - file 'doc.d'

Re: Voting For std.experimental.ndslice

2015-12-29 Thread Ilya via Digitalmars-d
On Wednesday, 30 December 2015 at 01:03:39 UTC, Ilya Yaroshenko wrote: On Wednesday, 30 December 2015 at 00:24:38 UTC, Ilya Yaroshenko wrote: On Tuesday, 29 December 2015 at 21:19:19 UTC, Jack Stouffer wrote: On Tuesday, 29 December 2015 at 17:38:06 UTC, Ilya Yaroshenko wrote: On Tuesday, 29

pragma(inline)

2015-12-29 Thread Ilya via Digitalmars-d-learn
Hi, Does `pragma(inline, true)` force DMD compiler to inline function when `-inline` was _not_ defined? I am failing to get a good disassembled code with obj2asm/otool :-( Best, Ilya

Re: ndslice and limits of debug info and autocompletion

2015-12-21 Thread Ilya via Digitalmars-d-learn
On Tuesday, 22 December 2015 at 00:21:16 UTC, Jay Norwood wrote: I'm trying to determine if the debugger autocompletion would be useful in combination with ndslice. I find that using visualD I get offered no completion to select core_ctr or epu_ctr where epu_ctr is used in the writeln below.

Re: Formal Review of std.range.ndslice

2015-12-11 Thread Ilya via Digitalmars-d
On Friday, 11 December 2015 at 19:31:14 UTC, Stefan Frijters wrote: Today I've made an abortive attempt at replacing my code's [1] dependence on unstd.multidimarray [2] with ndslice. I'm guessing it's just me being stupid, but could anyone supply with some hints on how to do the conversion with

Re: Formal Review of std.range.ndslice

2015-12-11 Thread Ilya via Digitalmars-d
On Friday, 11 December 2015 at 22:56:15 UTC, Ilya wrote: On Friday, 11 December 2015 at 19:31:14 UTC, Stefan Frijters wrote: Today I've made an abortive attempt at replacing my code's [1] dependence on unstd.multidimarray [2] with ndslice. I'm guessing it's just me being stupid, but could

Re: MurmurHash3

2015-12-11 Thread Ilya via Digitalmars-d-announce
On Friday, 11 December 2015 at 22:43:00 UTC, Guillaume Chatelet wrote: On Friday, 11 December 2015 at 01:51:09 UTC, Ilya wrote: http://dpaste.dzfl.pl/1b94ed0aa96e#line-222 - seed is uint, can it be ulong? Done Mutmur hash has three stages: 1. Computation of hash for blocks (32bit or 128bit)

Re: MurmurHash3

2015-12-10 Thread Ilya via Digitalmars-d-announce
On Thursday, 10 December 2015 at 22:25:21 UTC, Guillaume Chatelet wrote: Here is an implementation of MurmurHash [1] for D. http://dpaste.dzfl.pl/1b94ed0aa96e I'll do a proper pull request later on for addition to std.digest if the community feels like it's a valuable addition. Guillaume --

Re: MurmurHash3

2015-12-10 Thread Ilya via Digitalmars-d-announce
On Thursday, 10 December 2015 at 22:25:21 UTC, Guillaume Chatelet wrote: Here is an implementation of MurmurHash [1] for D. http://dpaste.dzfl.pl/1b94ed0aa96e I'll do a proper pull request later on for addition to std.digest if the community feels like it's a valuable addition. Guillaume --

Re: Release D 2.069.2

2015-12-03 Thread Ilya via Digitalmars-d-announce
On Thursday, 3 December 2015 at 03:36:10 UTC, Martin Nowak wrote: Glad to announce D 2.069.2. http://dlang.org/download.html This point release fixes a few issues over 2.069.1, see the changelog for more details. http://dlang.org/changelog/2.069.2.html -Martin I am planing to open voting

Compile time strings auto concatenation!?

2015-11-20 Thread Ilya via Digitalmars-d-learn
Can DMD frontend optimize string concatenation ``` enum Double(S) = S ~ S; assert(condition, "Text " ~ Double!"+" ~ ___FUNCTION__); ``` to ``` assert(condition, "Text ++_function_name_"); ``` ?

Re: Formal Review of std.range.ndslice

2015-11-20 Thread Ilya via Digitalmars-d
On Friday, 20 November 2015 at 19:21:45 UTC, Jack Stouffer wrote: On Wednesday, 18 November 2015 at 10:26:13 UTC, Ilya Yaroshenko wrote: On Wednesday, 18 November 2015 at 08:52:11 UTC, Robert burner Schadek wrote: [...] I have added makeSlice, however this function can be easily implemented

Re: Formal Review of std.range.ndslice

2015-11-20 Thread Ilya via Digitalmars-d
On Friday, 20 November 2015 at 21:23:40 UTC, Jack Stouffer wrote: On Friday, 20 November 2015 at 20:33:27 UTC, Ilya wrote: Great! Added to PR's TODO list :-) This will be interesting because there is no defined idiomatic usage of std.allocator. I imagine std.range.ndslice will be the

Re: range.save

2015-11-19 Thread Ilya via Digitalmars-d
On Friday, 20 November 2015 at 02:47:17 UTC, Rikki Cattermole wrote: On 20/11/15 10:30 AM, Freddy wrote: Does anyone else think range.save is a hack? I often find myself forgetting to call range.save in my generic code with my unittests working fine. Also, working with a range of ranges may

Re: Formal Review of std.range.ndslice

2015-11-18 Thread Ilya via Digitalmars-d
On Wednesday, 18 November 2015 at 18:40:40 UTC, Jack Stouffer wrote: On Wednesday, 18 November 2015 at 08:52:11 UTC, Robert burner Schadek wrote: [...] I know it's bad practice for regular Phobos code to import from std.experimental, but what's the protocol for code inside std.experimental

Re: Wanted: Review manager for std.experimental.range.ndslice

2015-11-17 Thread Ilya via Digitalmars-d
On Tuesday, 17 November 2015 at 13:45:38 UTC, Andrea Fontana wrote: On Monday, 16 November 2015 at 19:17:34 UTC, Ilya Yaroshenko wrote: w[1..$, 1..$].strided!0(3).strided!1(3)[] = m; Impressive :) Another way: w[1..2, 1..2] = m; --Ilya

Re: Wanted: Review manager for std.experimental.range.ndslice

2015-11-16 Thread Ilya via Digitalmars-d
On Monday, 16 November 2015 at 19:56:01 UTC, Jack Stouffer wrote: On Monday, 16 November 2015 at 03:05:03 UTC, Ilya Yaroshenko wrote: Hello, Review manager for N-dimensional ranges is wanted What does the job entail? It is very close draft: http://wiki.dlang.org/Review/Process

Re: Please vote for the DConf logo

2015-11-04 Thread Ilya via Digitalmars-d-announce
3