Re: This Week in D

2015-11-30 Thread ketmar via Digitalmars-d
On Monday, 30 November 2015 at 21:52:34 UTC, Ola Fosheim Grøstad wrote: You have 3 seconds to convince a random visitor that the site is worth his/her time. If I am looking for a tool the last thing I want is to try to download something from an emotional boy scouts club. that's great: less SJW

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 1 December 2015 at 01:12:39 UTC, Chris Wright wrote: People typically use lax terminology. Here, when someone doesn't specify whether they're talking about average or worst case complexity for an algorithm, they're probably talking about average case. Don't use lax terminology whe

Re: I hate new DUB config format

2015-11-30 Thread Craig Dillabaugh via Digitalmars-d
On Tuesday, 1 December 2015 at 04:54:23 UTC, James Hofmann wrote: FWIW, I'm tempted to take the side of "make JS the default, compile existing SDL and JSON to JS when run, add compilers for TOML or YAML if there's demand". If you make code your lowest common denominator, nothing else matters,

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 9:47 PM, Timon Gehr wrote: On 12/01/2015 03:33 AM, Timon Gehr wrote: On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time (just a bunch of heapifications) and O(sqrt n) search. How do you build in O(n)? (The initial array is a

Re: I hate new DUB config format

2015-11-30 Thread James Hofmann via Digitalmars-d
Although I admit to coming in late to a big bikeshed-fest, I have some opinions on configuration file formats from having seen younger, non-technical end users try to configure their own game servers. The support cost of misconfiguration due to syntax error is enormous. Gob-stoppingly huge. It

Re: Three people out of four dislike SDL

2015-11-30 Thread Saurabh Das via Digitalmars-d
On Monday, 30 November 2015 at 22:59:04 UTC, retard wrote: Just voted at http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 - 140 votes, 75% are against SDL. That should count for something? Sonke? As Sonke had pointed out in the other thread, there was a long process before SDL w

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Marcelo Juchem via Digitalmars-d
On Monday, 30 November 2015 at 21:33:31 UTC, Andrei Alexandrescu wrote: [...] One well-known search strategy is "Bring to front" (described by Knuth in TAoCP). A BtF-organized linear data structure is searched with the classic linear algorithm. The difference is what happens after the search:

Re: Three people out of four dislike SDL

2015-11-30 Thread Adam D. Ruppe via Digitalmars-d
simpledisplay.d can do what SDL does :P oh wait this is about the other SDL well I want to talk about simpledisplay. I've been doing a documentation book in the ddoc with lots of examples: http://arsdnet.net/arsd/simpledisplay.html (similar docs are on the way for cgi, dom, minigui, and sim

Re: Three people out of four dislike SDL

2015-11-30 Thread deadalnix via Digitalmars-d
On Tuesday, 1 December 2015 at 03:29:42 UTC, rsw0x wrote: On Tuesday, 1 December 2015 at 01:14:05 UTC, Gordon wrote: On Monday, 30 November 2015 at 23:00:16 UTC, Brad Anderson wrote: On Monday, 30 November 2015 at 22:59:04 UTC, retard wrote: Just voted at http://www.easypolls.net/poll.html?p=5

Re: Three people out of four dislike SDL

2015-11-30 Thread rsw0x via Digitalmars-d
On Tuesday, 1 December 2015 at 01:14:05 UTC, Gordon wrote: On Monday, 30 November 2015 at 23:00:16 UTC, Brad Anderson wrote: On Monday, 30 November 2015 at 22:59:04 UTC, retard wrote: Just voted at http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 - 140 votes, 75% are against SDL.

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/2015 06:32 PM, Titus Nicolae wrote: On Monday, 30 November 2015 at 23:19:44 UTC, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elem

Re: Three people out of four dislike SDL

2015-11-30 Thread Bubbasaur via Digitalmars-d
On Monday, 30 November 2015 at 22:59:04 UTC, retard wrote: Just voted at http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 - 140 votes, 75% are against SDL. That should count for something? Sonke? What's going on here? There is a topic about this already, now another one? If th

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Timon Gehr via Digitalmars-d
On 12/01/2015 03:33 AM, Timon Gehr wrote: On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time (just a bunch of heapifications) and O(sqrt n) search. How do you build in O(n)? (The initial array is assumed to be completely unordered, afaic

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/2015 06:19 PM, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mistaken, the number of heaps is

Re: I hate new DUB config format

2015-11-30 Thread lobo via Digitalmars-d
On Tuesday, 1 December 2015 at 02:46:46 UTC, lobo wrote: On Monday, 30 November 2015 at 21:05:08 UTC, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 20:42:23 UTC, Suliman wrote: [...] No, I wasn't really talking about a build system for D, more like a hypothetic generic distribute

Re: I hate new DUB config format

2015-11-30 Thread lobo via Digitalmars-d
On Monday, 30 November 2015 at 21:05:08 UTC, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 20:42:23 UTC, Suliman wrote: Should we try to implement yet another language for writing building config? No, I wasn't really talking about a build system for D, more like a hypothetic gener

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Sriram Srinivasan via Digitalmars-d
The key search phrase is "cache oblivious data structures". One of the cache-friendly layouts is the van Emde Boas tree.

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Timon Gehr via Digitalmars-d
On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time (just a bunch of heapifications) and O(sqrt n) search. How do you build in O(n)? (The initial array is assumed to be completely unordered, afaict.)

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Timon Gehr via Digitalmars-d
On 11/30/2015 09:13 PM, Andrei Alexandrescu wrote: I haven't worked out the math for insertion and deletion yet, but they seem to also be around O(sqrt n) or O(log(n) * sqrt(n)). (Assuming the bucket sizes actually grow linearly.) It seems to me that for insertion O(√n̅ log n) is very easy to

Re: This Week in D

2015-11-30 Thread Idan Arye via Digitalmars-d
On Monday, 30 November 2015 at 23:54:15 UTC, Meta wrote: On Monday, 30 November 2015 at 22:32:50 UTC, Adam D. Ruppe wrote: [...] I think it looked pretty pointless to people on the inside as well Just because the discussion is pointless doesn't mean defeat is acceptable!

Re: Three people out of four dislike SDL

2015-11-30 Thread Gordon via Digitalmars-d
On Monday, 30 November 2015 at 23:00:16 UTC, Brad Anderson wrote: On Monday, 30 November 2015 at 22:59:04 UTC, retard wrote: Just voted at http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 - 140 votes, 75% are against SDL. That should count for something? Sonke? Stop. Why? Fact

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Chris Wright via Digitalmars-d
On Mon, 30 Nov 2015 23:27:24 +, Ola Fosheim Grøstad wrote: > On Monday, 30 November 2015 at 21:33:31 UTC, Andrei Alexandrescu wrote: >> So let's improve on that: whenever an element is found in position k, >> pick a random number i in the range 0, 1, 2, ..., k inclusive. Then >> swap the array

Re: This Week in D

2015-11-30 Thread Meta via Digitalmars-d
On Monday, 30 November 2015 at 22:32:50 UTC, Adam D. Ruppe wrote: On Monday, 30 November 2015 at 21:52:34 UTC, Ola Fosheim Grøstad wrote: You have 3 seconds to convince a random visitor that the site is worth his/her time. That's basically why i use the word 'flamewar' - it fits into a tweet

Re: This Week in D

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 22:32:50 UTC, Adam D. Ruppe wrote: * A flamewar among hackers doesn't need to be personal, profane, or particularly insulting. Just invested, long, and esoteric (which often appears pointless to those on the outside). Follow your own instincts, but I would perso

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Titus Nicolae via Digitalmars-d
On Monday, 30 November 2015 at 23:19:44 UTC, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mistaken, t

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 21:33:31 UTC, Andrei Alexandrescu wrote: So let's improve on that: whenever an element is found in position k, pick a random number i in the range 0, 1, 2, ..., k inclusive. Then swap the array elements at indexes i and k. This is the Randomized Slide to Front str

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Torin via Digitalmars-d
On Monday, 30 November 2015 at 23:19:44 UTC, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mistaken, t

OT: Denis is back! :)

2015-11-30 Thread Ali Çehreli via Digitalmars-d
On 11/30/2015 03:15 PM, Denis Koroskin wrote: Forget the algorithms! Denis is back... :) Ali

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Titus Nicolae via Digitalmars-d
On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mistaken, the number of heaps is proportional to n^(1/3) not n^(1/2) 1+2^2+.

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Denis Koroskin via Digitalmars-d
On Monday, 30 November 2015 at 22:11:09 UTC, deadalnix wrote: On Monday, 30 November 2015 at 21:50:09 UTC, Andrei Alexandrescu wrote: On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: What about when element i is matched, swap it with the (i/2)'th element? Randomization is essential -

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Torin via Digitalmars-d
On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: Now each of these arrays we organize as a max heap. Moreover, we arrange data such that the maximums of these heaps are in INCREASING order. That means the smallest element of the entire (initial) array is at the first posi

Re: Three people out of four dislike SDL

2015-11-30 Thread Brad Anderson via Digitalmars-d
On Monday, 30 November 2015 at 22:59:04 UTC, retard wrote: Just voted at http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 - 140 votes, 75% are against SDL. That should count for something? Sonke? Stop.

Three people out of four dislike SDL

2015-11-30 Thread retard via Digitalmars-d
Just voted at http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 - 140 votes, 75% are against SDL. That should count for something? Sonke?

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 21:33:31 UTC, Andrei Alexandrescu wrote: With RStF, worst case search time remains O(n), as is the unsuccessful search. However, frequently searched elements If you just do a linear search then shifting down the array in another pass won't change the complexity.

Re: This Week in D

2015-11-30 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 30 November 2015 at 21:52:34 UTC, Ola Fosheim Grøstad wrote: You have 3 seconds to convince a random visitor that the site is worth his/her time. That's basically why i use the word 'flamewar' - it fits into a tweet while being pretty descriptive. Though, indeed, the meaning among

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Chris Wright via Digitalmars-d
On Mon, 30 Nov 2015 16:58:16 -0500, Steven Schveighoffer wrote: > On 11/30/15 4:50 PM, Andrei Alexandrescu wrote: >> On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: >>> What about when element i is matched, swap it with the (i/2)'th >>> element? >> >> Randomization is essential - without

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread deadalnix via Digitalmars-d
On Monday, 30 November 2015 at 21:50:09 UTC, Andrei Alexandrescu wrote: On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: What about when element i is matched, swap it with the (i/2)'th element? Randomization is essential - without it you have thrashing if you search for 2 elements in

Re: JSON5 support for std.json

2015-11-30 Thread Chris Wright via Digitalmars-d
On Mon, 30 Nov 2015 20:42:20 +, Jack Stouffer wrote: > JSON5 is also just a terrible idea. There is a very good reason why JSON > does not have comments > https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaGSr and why > it's strict. Data formats should have data, not anything else. I f

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 4:58 PM, Steven Schveighoffer wrote: On 11/30/15 4:50 PM, Andrei Alexandrescu wrote: On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: What about when element i is matched, swap it with the (i/2)'th element? Randomization is essential - without it you have thrashing if you

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread H. S. Teoh via Digitalmars-d
On Mon, Nov 30, 2015 at 04:58:16PM -0500, Steven Schveighoffer via Digitalmars-d wrote: > On 11/30/15 4:50 PM, Andrei Alexandrescu wrote: > >On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: > >>What about when element i is matched, swap it with the (i/2)'th element? > > > >Randomization is

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 4:55 PM, deadalnix wrote: I guess randomizing would avoid hitting pathological cases too often, but would converge more slowly ? That's it. Problem is with deterministic approaches pathological cases are easy to hit and relatively common. -- Andrei

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 4:53 PM, H. S. Teoh via Digitalmars-d wrote: On Mon, Nov 30, 2015 at 01:41:12PM -0800, H. S. Teoh via Digitalmars-d wrote: [...] What about when element i is matched, swap it with the (i/2)'th element? Then it will take just log(n) searches to bring it to the front of the array, but

Re: extern(C++, NS)

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 21:42:19 UTC, Walter Bright wrote: On 11/30/2015 12:47 PM, Ola Fosheim Grøstad wrote: [...] Summary: if the C++ declarations change then the D ones that interface to it have to change, too. I'd have to say that's a given. It might be a given, but as pure C++

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Steven Schveighoffer via Digitalmars-d
On 11/30/15 4:50 PM, Andrei Alexandrescu wrote: On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: What about when element i is matched, swap it with the (i/2)'th element? Randomization is essential - without it you have thrashing if you search for 2 elements in alternation. -- Andrei

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread deadalnix via Digitalmars-d
On Monday, 30 November 2015 at 21:33:31 UTC, Andrei Alexandrescu wrote: Now that we got talking about searching in arrays, allow me to also share an idea I've had a short while ago. (Again, we're in the "I'd prefer to use an array if at all possible" mindset. So let's see how we can help searc

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread H. S. Teoh via Digitalmars-d
On Mon, Nov 30, 2015 at 01:41:12PM -0800, H. S. Teoh via Digitalmars-d wrote: [...] > What about when element i is matched, swap it with the (i/2)'th > element? > > Then it will take just log(n) searches to bring it to the front of the > array, but it won't (immediately) compete with whatever's cu

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 4:41 PM, H. S. Teoh via Digitalmars-d wrote: What about when element i is matched, swap it with the (i/2)'th element? Randomization is essential - without it you have thrashing if you search for 2 elements in alternation. -- Andrei

Re: This Week in D

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 20:07:10 UTC, Adam D. Ruppe wrote: I'll change it to "thread" on the front page. :-) On Monday, 30 November 2015 at 21:47:21 UTC, ketmar wrote: "professional". this means "boring, uninteresting, written for witless idiots without sense of humor". the worst thin

Re: extern(C++, NS)

2015-11-30 Thread Daniel Murphy via Digitalmars-d
On 30/11/2015 10:42 PM, Manu via Digitalmars-d wrote: > Exactly, the D module system would still be in place. Assuming they were in defferent modules, then the D module system would keep them out of conflict naturally, with rules identical to the normal D rules. I imagined this; C++ namespace is

Re: This Week in D

2015-11-30 Thread ketmar via Digitalmars-d
On Monday, 30 November 2015 at 14:07:03 UTC, Ola Fosheim Grøstad wrote: therefore be a good idea to keep the front page professional. "professional". this means "boring, uninteresting, written for witless idiots without sense of humor". the worst think we can do is start attracting such kind

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread H. S. Teoh via Digitalmars-d
On Mon, Nov 30, 2015 at 04:33:27PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: [...] > One well-known search strategy is "Bring to front" (described by Knuth > in TAoCP). A BtF-organized linear data structure is searched with the > classic linear algorithm. The difference is what happens a

Re: extern(C++, NS)

2015-11-30 Thread Walter Bright via Digitalmars-d
On 11/30/2015 12:47 PM, Ola Fosheim Grøstad wrote: [...] Summary: if the C++ declarations change then the D ones that interface to it have to change, too. I'd have to say that's a given.

Re: And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 4:33 PM, Andrei Alexandrescu wrote: [snip] I just posted to reddit: https://www.reddit.com/r/programming/comments/3uwp42/its_my_birthday_so_heres_some_cake_for_thought/ Andrei

Re: I hate new DUB config format

2015-11-30 Thread Daniel N via Digitalmars-d
On Monday, 30 November 2015 at 20:42:23 UTC, Suliman wrote: Should we try to implement yet another language for writing building config? Maybe we should use any of existence language that may be very good for it, like Red. It have very small foot prints so it can be easy to embeded to build sys

And here's another interesting algorithm/structure: Randomized Slide to Front

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
Now that we got talking about searching in arrays, allow me to also share an idea I've had a short while ago. (Again, we're in the "I'd prefer to use an array if at all possible" mindset. So let's see how we can help searching an array with as little work as possible.) One well-known search

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread H. S. Teoh via Digitalmars-d
On Mon, Nov 30, 2015 at 03:57:24PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > On 11/30/15 3:20 PM, H. S. Teoh via Digitalmars-d wrote: > >On Mon, Nov 30, 2015 at 03:13:11PM -0500, Andrei Alexandrescu via > >Digitalmars-d wrote: > >>Okasaki's book is a continued inspiration of data stru

Re: I hate new DUB config format

2015-11-30 Thread Atila Neves via Digitalmars-d
On Monday, 30 November 2015 at 20:42:23 UTC, Suliman wrote: Should we try to implement yet another language for writing building config? Maybe we should use any of existence language that may be very good for it, like Red. It have very small foot prints so it can be easy to embeded to build sys

Re: I hate new DUB config format

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 20:42:23 UTC, Suliman wrote: Should we try to implement yet another language for writing building config? No, I wasn't really talking about a build system for D, more like a hypothetic generic distributed build system for all languages. But I've read that Google

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 3:29 PM, Dmitry Olshansky wrote: Reminds me of Van Emde Boas layout which is however fractal in nature: sqrt(N) pieces each having sqrt(N) element are subdivided again into sqrt(sqrt(N)) pieces and so on. Not sure if you have seen, but see also cache-oblivious data-structures: http:/

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 3:20 PM, H. S. Teoh via Digitalmars-d wrote: On Mon, Nov 30, 2015 at 03:13:11PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: Okasaki's book is a continued inspiration of data structures and algorithms. I was thinking along the following lines: typical collections are searcha

Re: extern(C++, NS)

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 19:38:53 UTC, Walter Bright wrote: On 11/30/2015 10:51 AM, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 17:38:06 UTC, Walter Bright wrote: It'd be worthwhile to learn how D's name lookup system works before declaring it lame and insufficient: Nobod

Re: I hate new DUB config format

2015-11-30 Thread Suliman via Digitalmars-d
Should we try to implement yet another language for writing building config? Maybe we should use any of existence language that may be very good for it, like Red. It have very small foot prints so it can be easy to embeded to build system.

Re: JSON5 support for std.json

2015-11-30 Thread Jack Stouffer via Digitalmars-d
On Monday, 30 November 2015 at 16:12:07 UTC, Chris Wright wrote: The reason to incorporate it into the standard library interpretation is because it's mostly identical to JSON, so sharing implementations is obvious. That doesn't follow. Just because implementations are mostly shared doesn't m

Problems loading libcurl.so and running datetime unittest on NixOS package build

2015-11-30 Thread Thomas Mader via Digitalmars-d
I created a bug but wanted to get some opinions regarding the solution. You can read about the problem in https://issues.dlang.org/show_bug.cgi?id=15391#c3 . Thomas

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Dmitry Olshansky via Digitalmars-d
On 30-Nov-2015 23:13, Andrei Alexandrescu wrote: Okasaki's book is a continued inspiration of data structures and algorithms. I was thinking along the following lines: typical collections are searchable in linear time. Then we have highly structured collections that feature logarithmic search ti

Re: I hate new DUB config format

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 19:36:18 UTC, Atila Neves wrote: As much as possible, yes. But non-trivial builds require a DAG, ordering, and plain just telling the computer what to do. Representing a DAG in a logic language is not a problem. The biggest problem is probably that most programme

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread H. S. Teoh via Digitalmars-d
On Mon, Nov 30, 2015 at 03:13:11PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > Okasaki's book is a continued inspiration of data structures and > algorithms. > > I was thinking along the following lines: typical collections are > searchable in linear time. Then we have highly structured

An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
Okasaki's book is a continued inspiration of data structures and algorithms. I was thinking along the following lines: typical collections are searchable in linear time. Then we have highly structured collections that feature logarithmic search time. But there seems to be nothing in between. S

Re: I hate new DUB config format

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 18:50:57 UTC, Russel Winder wrote: you had to write you own Java coded Maven plugin. So having a language which can offer a declarative DSL and the ability to do a bit of imperative stuff if it is needed, you get a good system. SCons and Gradle both do this: mostl

Re: This Week in D

2015-11-30 Thread Adam D. Ruppe via Digitalmars-d
I'll change it to "thread" on the front page.

Re: I hate new DUB config format

2015-11-30 Thread Atila Neves via Digitalmars-d
On Sunday, 29 November 2015 at 22:52:20 UTC, Ola Fosheim Gr wrote: On Sunday, 29 November 2015 at 18:54:04 UTC, Russel Winder wrote: hand lots of people seem addicted to JSON. On the fourth hand I cannot get worked up about this, it is just a build specification script which really ought to be

Re: extern(C++, NS)

2015-11-30 Thread Walter Bright via Digitalmars-d
On 11/30/2015 10:51 AM, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 17:38:06 UTC, Walter Bright wrote: It'd be worthwhile to learn how D's name lookup system works before declaring it lame and insufficient: Nobody has said anything about lame. The issue is that you don't need to

Re: I hate new DUB config format

2015-11-30 Thread Atila Neves via Digitalmars-d
On Sunday, 29 November 2015 at 18:54:04 UTC, Russel Winder wrote: On Sun, 2015-11-29 at 17:25 +, Poyeyo via Digitalmars-d wrote: […] C/C++ make/cmake/nmake -> here be dragons Or SCons if you want to be cool. I guess Bazel (and maybe Tup) might become trendy. perl CPANfile -> somethi

Re: This Week in D

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 19:01:59 UTC, Bubbasaur wrote: Sorry if it seemed rude but the message wasn't for you and in fact I agree with you, it was a bit strange that mention on the newsletter. Bubba. *hugs*

Re: This Week in D

2015-11-30 Thread Bubbasaur via Digitalmars-d
On Monday, 30 November 2015 at 14:07:03 UTC, Ola Fosheim Grøstad wrote: No drama, the sole purpose of the front page is to inform newcomers and it has much more impact than the forums. It would therefore be a good idea to keep the front page professional. If there is not enough factual content

Re: Gradle, Mave, etc. [was I hate new DUB config format]

2015-11-30 Thread CraigDillabaugh via Digitalmars-d
On Monday, 30 November 2015 at 18:56:58 UTC, Russel Winder wrote: On Sun, 2015-11-29 at 22:38 +, Paulo Pinto via Digitalmars-d wrote: But this might be just a bikeshed issue. I have no intention of giving up on Gradle and SCons, I am intransigent. :-) If it is a bikeshed issue then it

Re: Gradle, Mave, etc. [was I hate new DUB config format]

2015-11-30 Thread Russel Winder via Digitalmars-d
On Sun, 2015-11-29 at 22:38 +, Paulo Pinto via Digitalmars-d wrote: > […] > Only those that are required to use it for Android and suffer the > pain of slow builds yet to be fixed as announced on Google IO > 2015. > > I have seen zero projects move to it, otherwise. On the other hand I hav

Re: extern(C++, NS)

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 17:38:06 UTC, Walter Bright wrote: It'd be worthwhile to learn how D's name lookup system works before declaring it lame and insufficient: Nobody has said anything about lame. The issue is that you don't need to know of "version1" on the C++ side. One purpose is

Re: I hate new DUB config format

2015-11-30 Thread Russel Winder via Digitalmars-d
On Sun, 2015-11-29 at 22:52 +, Ola Fosheim Gr via Digitalmars-d wrote: > […] > What is the advantage of having it in an imperative language, > though? Isn't a concurrent deductive language better and faster? Project definitions should be declarative, definitely. Proejcts should then have a d

Re: I hate new DUB config format

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 18:23:08 UTC, Chris wrote: When will people understand that indentation should not be part of a language's syntax? Where is that norm coming from? :-) I my experience YAML is a very visually clean format for configuration. I use it for configuration files for we

Re: I hate new DUB config format

2015-11-30 Thread Chris via Digitalmars-d
On Monday, 30 November 2015 at 18:13:11 UTC, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 18:02:34 UTC, Chris wrote: YAML takes spaces into account, doesn't it? That's a source of unnecessary, Pythonesque bugs. Most editors support YAML so you should get no Pythonesque bugs since

Re: I hate new DUB config format

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 18:07:20 UTC, Luis wrote: How do translate this example on SDLang ? You can translate it by following these patterns: http://www.yaml.org/spec/1.2/spec.html#Preview As you see, you have some room for making it more dense if you want to. So you can tailor it a b

Re: Collections question

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/2015 12:56 PM, bitwise wrote: On Saturday, 28 November 2015 at 13:39:35 UTC, Andrei Alexandrescu wrote: On 11/28/15 1:59 AM, bitwise wrote: Classes/real-ref-types dont act as you're describing, so why should these fake struct wrapper ref things act this way? This will likely achieve t

Re: I hate new DUB config format

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 18:02:34 UTC, Chris wrote: YAML takes spaces into account, doesn't it? That's a source of unnecessary, Pythonesque bugs. Most editors support YAML so you should get no Pythonesque bugs since they enforce WYSIWYG. I have more issues with my handwritten JSON than

Re: I hate new DUB config format

2015-11-30 Thread Luis via Digitalmars-d
On Monday, 30 November 2015 at 17:53:04 UTC, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 17:18:50 UTC, terchestor wrote: http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 shows right now that 70% of 98 voters DISILIKE SDL. Well, most people who didn't object probably

Re: I hate new DUB config format

2015-11-30 Thread Chris via Digitalmars-d
On Monday, 30 November 2015 at 17:53:04 UTC, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 17:18:50 UTC, terchestor wrote: http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 shows right now that 70% of 98 voters DISILIKE SDL. Well, most people who didn't object probably

Re: Collections question

2015-11-30 Thread bitwise via Digitalmars-d
On Saturday, 28 November 2015 at 13:39:35 UTC, Andrei Alexandrescu wrote: On 11/28/15 1:59 AM, bitwise wrote: Classes/real-ref-types dont act as you're describing, so why should these fake struct wrapper ref things act this way? This will likely achieve the exact opposite of what you're aimi

Re: I hate new DUB config format

2015-11-30 Thread terchestor via Digitalmars-d
On Monday, 30 November 2015 at 17:53:04 UTC, Ola Fosheim Grøstad wrote: On Monday, 30 November 2015 at 17:18:50 UTC, terchestor wrote: http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 shows right now that 70% of 98 voters DISILIKE SDL. Well, most people who didn't object probably

Re: I hate new DUB config format

2015-11-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 30 November 2015 at 17:18:50 UTC, terchestor wrote: http://www.easypolls.net/poll.html?p=565587f4e4b0b3955a59fb67 shows right now that 70% of 98 voters DISILIKE SDL. Well, most people who didn't object probably didn't bother to vote... What about just hashing it out in YAML? It woul

Re: extern(C++, NS)

2015-11-30 Thread Walter Bright via Digitalmars-d
On 11/30/2015 3:42 AM, Manu via Digitalmars-d wrote: Exactly, the D module system would still be in place. Assuming they were in defferent modules, then the D module system would keep them out of conflict naturally, with rules identical to the normal D rules. I imagined this; No need to imagine

Re: extern(C++, NS)

2015-11-30 Thread Walter Bright via Digitalmars-d
On 11/30/2015 3:42 AM, Manu via Digitalmars-d wrote: That's not how it seems to be, Are you still not understanding how name lookup works in D? (You won't be the first. I explain it to people over and over, and nobody gets it. I have no idea why it is so hard to understand.) C++ namespaces

Re: extern(C++, NS)

2015-11-30 Thread Walter Bright via Digitalmars-d
On 11/30/2015 2:26 AM, Ola Fosheim Grøstad wrote: I wish someone would shed som light on this as inline namespaces is what libraries will use in the future in order to do versioning and target different architectures, the one marked "inline" is made active and can be directly accessed through "X

Re: I hate new DUB config format

2015-11-30 Thread terchestor via Digitalmars-d
On Monday, 30 November 2015 at 17:06:56 UTC, ZombineDev wrote: On Monday, 30 November 2015 at 15:41:39 UTC, Tourist wrote: On Monday, 30 November 2015 at 15:12:13 UTC, Sönke Ludwig wrote: The number of posts in this thread has multiple reasons, I'd argue that it's questionable to draw conclusio

Re: I hate new DUB config format

2015-11-30 Thread ZombineDev via Digitalmars-d
On Monday, 30 November 2015 at 15:41:39 UTC, Tourist wrote: On Monday, 30 November 2015 at 15:12:13 UTC, Sönke Ludwig wrote: The number of posts in this thread has multiple reasons, I'd argue that it's questionable to draw conclusions from that. Don't fool yourself. You made a mistake. That's

Re: Efficient binary search using two-way comparisons

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/29/2015 04:13 PM, Enamex wrote: On Saturday, 28 November 2015 at 20:04:11 UTC, Andrei Alexandrescu wrote: While reading Okasaki's bool on persistent data structures, I found (page 14) a reference to a nice idea applicable to binary search using D's two-way "less than" comparisons. https:/

Re: Is D ready for quants?

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/2015 05:12 AM, Dominikus Dittes Scherkl wrote: On Monday, 30 November 2015 at 04:16:10 UTC, Saurabh Das wrote: On Monday, 30 November 2015 at 04:06:07 UTC, Jack Stouffer wrote: This sounds interesting! Would you be willing to write a blog post on your experiences with this, or even bet

Re: Collections question

2015-11-30 Thread Steven Schveighoffer via Digitalmars-d
On 11/30/15 11:21 AM, Tobias Pankrath wrote: On Monday, 30 November 2015 at 16:06:43 UTC, Steven Schveighoffer wrote: MyCollection!(int) c1; auto c2 = c1; c1 ~= 1; assert(c2.contains(1)); // pass? fail? BTW, I third Jonathan's and Timon's suggestion -- go with an external factory function. Use

Re: Collections question

2015-11-30 Thread Tobias Pankrath via Digitalmars-d
On Monday, 30 November 2015 at 16:06:43 UTC, Steven Schveighoffer wrote: MyCollection!(int) c1; auto c2 = c1; c1 ~= 1; assert(c2.contains(1)); // pass? fail? BTW, I third Jonathan's and Timon's suggestion -- go with an external factory function. Use IFTI to its fullest! -Steve That should

Re: JSON5 support for std.json

2015-11-30 Thread Chris Wright via Digitalmars-d
On Mon, 30 Nov 2015 03:40:12 +, Jack Stouffer wrote: > On Monday, 30 November 2015 at 00:30:07 UTC, Chris Wright wrote: >> I'm considering adding JSON5 support to std.json and want to know how >> well this would be received. > > Considering this is something that has apparently existed for mo

Re: Collections question

2015-11-30 Thread Steven Schveighoffer via Digitalmars-d
On 11/27/15 3:14 PM, Andrei Alexandrescu wrote: There's this oddity of built-in hash tables: a reference to a non-empty hash table can be copied and then both references refer to the same hash table object. However, if the hash table is null, copying the reference won't track the same object late

  1   2   >