Re: TIOBE December 2015 - D rose 5 positions

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 04:24:05 UTC, Joakim wrote: How is it "political?" My prediction is entirely geared around hardware and software realities. No, businesses don't want P2P, client-server is the ultimate dongle... _are_ very useful. Having an online map with my GPS location

Self-Modifying code for user settings optimization

2016-01-09 Thread Jason Jeffory via Digitalmars-d
Instead of something like DoSomething(UserSettings["width"]); Which requires an access to UserSettings, which may be slow in time critical code(but you want to provide some way to configure various behaviors), why not use self-modifying code? DoSomething(3); // 3 maybe the default, but a

Re: Proposal: Database Engine for D

2016-01-09 Thread Russel Winder via Digitalmars-d
On Mon, 2016-01-04 at 12:07 -0800, Walter Bright via Digitalmars-d wrote: > […] > I'm surprised you'd ask. I thought this was well known. > > 1. ugly as hell For you perhaps, others have different opinions. I like it. > 2. not exception safe Indeed. but then most code is not exception safe

Re: Wait-free thread communication

2016-01-09 Thread Jin via Digitalmars-d
On Saturday, 9 January 2016 at 08:28:33 UTC, thedeemon wrote: Your benchmarks show time difference in your favor just because you compare very different things: your queue is benchmarked in single thread with fibers while std.concurrency is measured with multiple threads communicating with

Changing Name of a thread

2016-01-09 Thread Keywan Ghadami via Digitalmars-d-learn
Hello, i am trying to the set the name of thread with: import core.thread; auto thisThread = Thread.getThis(); thisThread.name = "kiwi"; but GDB prints the name of the programm ("helloworld") [Thread debugging using libthread_db enabled] Using host libthread_db library

version in enum

2016-01-09 Thread Øivind via Digitalmars-d-learn
Hi, Why doesn't this work? Seems like it should: enum { A = 1, version(xx) { B = 2 } } void main() { } Compilation output: /d732/f174.d(5): Error: basic type expected, not version /d732/f174.d(5): Error: no identifier for declarator int

Re: Browsing D compiler source code

2016-01-09 Thread Bubbasaur via Digitalmars-d
On Saturday, 9 January 2016 at 10:23:02 UTC, Jacob Carlborg wrote: On 2016-01-08 20:49, Bubbasaur wrote: Someone could explain what's the difference between having a source code browsable here vs github? If you read the whole post you can see that it's about generating documentation from

Re: Proposal: Database Engine for D

2016-01-09 Thread Walter Bright via Digitalmars-d
On 1/9/2016 2:49 AM, Russel Winder via Digitalmars-d wrote: The D code as presented is clearly simpler and easy to read. However the D grammar is a string and not code so the anticipation is that errors in the C++ code would be easier to find and correct. I guess the question here is how good

Re: Wait-free thread communication

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 14:20:18 UTC, Andy Smith wrote: I'm a little worried you have no volatile writes or fences around your code when you 'publish' an event using head/tail etc. It looks like it's working but how are you ensuring no compiler/CPU reordering is ocurring. Does x86_64

Re: Browsing D compiler source code

2016-01-09 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-08 20:49, Bubbasaur wrote: Someone could explain what's the difference between having a source code browsable here vs github? If you read the whole post you can see that it's about generating documentation from the DMD source code. -- /Jacob Carlborg

Re: Wait-free thread communication

2016-01-09 Thread thedeemon via Digitalmars-d
On Saturday, 9 January 2016 at 11:00:01 UTC, Jin wrote: No, jin.go creates new native thread on every call. And this is problem :-) We can not create thousand of threads without errors. Ah, sorry, I misread the source. FiberScheduler got me distracted. Why is it there?

Re: TIOBE December 2015 - D rose 5 positions

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 14:01:20 UTC, Ola Fosheim Grøstad wrote: Or maybe there would have been a market for commercial browsers, like Opera. This timeline is quite telling: https://upload.wikimedia.org/wikipedia/commons/7/74/Timeline_of_web_browsers.svg It is rather obvious that the

Re: Wait-free thread communication

2016-01-09 Thread Andy Smith via Digitalmars-d
On Friday, 8 January 2016 at 16:58:59 UTC, Jin wrote: Idea: no mutex, no CAS, only one direction queues without any locks. My prototype (https://github.com/nin-jin/go.d) is up to 10x faster than std.concurrency.send/receive --- writers =512 readers =1 std.concurency milliseconds=1313 jin.go

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread Jason Jeffory via Digitalmars-d
On Saturday, 9 January 2016 at 10:41:23 UTC, Rikki Cattermole wrote: I've been looking into this issue for web routing. Over all its definitely more performant. But: - You need some way to generate code - ABI compatibility - Host binary compatibility (not the same as ABI) - Front end for the

Re: Is there a good lib out there to handle large integer of know size ?

2016-01-09 Thread rumbu via Digitalmars-d
Here is what I've done as a side project for a decimal data type: https://github.com/rumbu13/fixed/blob/master/src/fixedtest/fixed.d - signed and unsigned fixed width types; - all current operators supported (even signed shift or power); - optimized division and multiplication; - formatting

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread Rikki Cattermole via Digitalmars-d
On 10/01/16 3:50 AM, John Colvin wrote: On Saturday, 9 January 2016 at 11:38:06 UTC, Rikki Cattermole wrote: Enums are free and global variables may have cache misses issue An enum isn't guaranteed to be embedded in the instruction stream, there's still plenty of opportunities for cache

Re: Browsing D compiler source code

2016-01-09 Thread Sönke Ludwig via Digitalmars-d
Am 08.01.2016 um 08:54 schrieb Jacob Carlborg: On 2016-01-07 21:18, ZombineDev wrote: A) Local http server that you can start like so: cd dmd make serve-dmd-docs browser 127.0.0.1:8080/dmd-internal-docs What would be the point of the web server? Talk about adding complexity and dependencies.

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread Rikki Cattermole via Digitalmars-d
On 10/01/16 12:32 AM, Jason Jeffory wrote: On Saturday, 9 January 2016 at 10:41:23 UTC, Rikki Cattermole wrote: I've been looking into this issue for web routing. Over all its definitely more performant. But: - You need some way to generate code - ABI compatibility - Host binary compatibility

Re: TIOBE December 2015 - D rose 5 positions

2016-01-09 Thread Joakim via Digitalmars-d
On Saturday, 9 January 2016 at 10:13:01 UTC, Ola Fosheim Grøstad wrote: On Saturday, 9 January 2016 at 04:24:05 UTC, Joakim wrote: How is it "political?" My prediction is entirely geared around hardware and software realities. No, businesses don't want P2P, client-server is the ultimate

Re: version in enum

2016-01-09 Thread Basile B. via Digitalmars-d-learn
On Saturday, 9 January 2016 at 12:43:32 UTC, Øivind wrote: Hi, Why doesn't this work? Seems like it should: enum { A = 1, version(xx) { B = 2 } } It's not allowed in the grammar but I agree with you, it could be useful. Recent example where it could:

Re: TIOBE December 2015 - D rose 5 positions

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 13:43:09 UTC, Joakim wrote: On Saturday, 9 January 2016 at 10:13:01 UTC, Ola Fosheim Grøstad wrote: On Saturday, 9 January 2016 at 04:24:05 UTC, Joakim wrote: How is it "political?" My prediction is entirely geared around hardware and software realities. No,

Re: Wait-free thread communication

2016-01-09 Thread Jin via Digitalmars-d
On Saturday, 9 January 2016 at 14:20:18 UTC, Andy Smith wrote: I'm a little worried you have no volatile writes or fences around your code when you 'publish' an event using head/tail etc. It looks like it's working but how are you ensuring no compiler/CPU reordering is ocurring. Does x86_64

Re: Extending Objective-C from D.

2016-01-09 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-09 11:09, Jeremie Pelletier wrote: Hello, I'm trying to see if I can write a full Cocoa app in D, and I'm having trouble creating D classes when the underlying Objective-C interfaces have methods. D doesn't yet support implementing Objective-C methods or classes in D. It currently

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread Rikki Cattermole via Digitalmars-d
I've been looking into this issue for web routing. Over all its definitely more performant. But: - You need some way to generate code - ABI compatibility - Host binary compatibility (not the same as ABI) - Front end for the "language" to specify what to generate I'm either going sljit way or my

[Issue 15531] dmd.conf linker flags should be prepended instead of appended to subsequent linker flags

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15531 Mike Wey changed: What|Removed |Added CC||m...@mikewey.eu --- Comment #1

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread John Colvin via Digitalmars-d
On Saturday, 9 January 2016 at 11:38:06 UTC, Rikki Cattermole wrote: Enums are free and global variables may have cache misses issue An enum isn't guaranteed to be embedded in the instruction stream, there's still plenty of opportunities for cache misses.

Re: [dlang.org] getting the redesign wrapped up

2016-01-09 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-08 23:32, anonymous wrote: My implementation of the redesign is pretty much complete. Check it out: http://d-ag0aep6g.rhcloud.com/ I'm not sure that I like that some of the headers (learn, packages) are clickable on the main page. This also causes some icons to be black (gray?)

Re: Proposal: Database Engine for D

2016-01-09 Thread Russel Winder via Digitalmars-d
On Thu, 2016-01-07 at 15:32 -0500, Andrei Alexandrescu via Digitalmars- d wrote: > On 01/07/2016 02:02 PM, Russel Winder via Digitalmars-d wrote: […] > > Got it, thanks. I took a look at a familiar topic - json grammars. > > I just googled `boost spirit json` and followed through the top >

Re: version in enum

2016-01-09 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 9 January 2016 at 12:43:32 UTC, Øivind wrote: Why doesn't this work? Seems like it should: D defines version to only work on *complete* blocks. You're trying to use it on a partial block there. You'll have to try something else. Perhaps copying the whole enum in the different

Re: Wait-free thread communication

2016-01-09 Thread Jin via Digitalmars-d
On Saturday, 9 January 2016 at 13:55:16 UTC, thedeemon wrote: On Saturday, 9 January 2016 at 11:00:01 UTC, Jin wrote: No, jin.go creates new native thread on every call. And this is problem :-) We can not create thousand of threads without errors. Ah, sorry, I misread the source.

Re: Proposal: Database Engine for D

2016-01-09 Thread Walter Bright via Digitalmars-d
On 1/9/2016 3:02 AM, Russel Winder via Digitalmars-d wrote: [...] And also generally bad architecting of I/O in applications. These problems have persisted since the genesis of iostreams. The problems do not exist in the way other modern languages do I/O. Iostreams was a great idea in 1985,

Re: D Cross Platform Status + OpenGL Status ?

2016-01-09 Thread wobbles via Digitalmars-d
On Saturday, 9 January 2016 at 19:43:03 UTC, Jakob Jenkov wrote: And what about OpenGL support? Is that easy? And does it work easily across platforms? http://code.dlang.org/packages/derelict-gl3 This is the OpenGL binary. Have used it on both Windows and Linux, I just got a window up and

[Issue 15535] New: Emit error on "goto default" in final switch

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15535 Issue ID: 15535 Summary: Emit error on "goto default" in final switch Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

concurrency and standard logger of std.experimental.logger

2016-01-09 Thread sanjayss via Digitalmars-d-learn
Is there a way to include some form of thread-id in the standard logger log messages without resorting to the use of the 'f' functions to log this info too?

Re: [dlang.org] getting the redesign wrapped up

2016-01-09 Thread Andrei Alexandrescu via Digitalmars-d
On 1/8/16 5:32 PM, anonymous wrote: My implementation of the redesign is pretty much complete. Check it out: http://d-ag0aep6g.rhcloud.com/ This is an implementation of a design done by one Ivan Smirnov, brought forward by Jacob Carlborg [1]. The dark forum widgets on the home page are in

Re: What are you planning for 2016?

2016-01-09 Thread jmh530 via Digitalmars-d
On Saturday, 9 January 2016 at 19:39:44 UTC, Jakob Jenkov wrote: The communication is the easy part. The time consuming part is converting R objects to D objects and vice versa. I've had to learn the internals of R at the same time that I've learned D. I've been working on it in my spare time

Re: Linking a DLL to a DLL with packages

2016-01-09 Thread Thalamus via Digitalmars-d-learn
On Friday, 8 January 2016 at 12:13:15 UTC, Benjamin Thaut wrote: On Thursday, 7 January 2016 at 19:29:43 UTC, Thalamus wrote: Hi everyone, First off, I've been working with D for a couple of weeks now and I think it's the bee's knees! :) Except for DLLs. thanks! :) Dlls don't currently

Re: UFCS vs auto-completion support

2016-01-09 Thread cym13 via Digitalmars-d-learn
On Saturday, 9 January 2016 at 15:50:33 UTC, Jay Norwood wrote: I'm reading Jack Stouffer's documentation: http://jackstouffer.com/blog/nd_slice.html considering the UFCS example below and how it would impact auto-completion support. auto slice = sliced(iota(1000), 5, 5, 40); auto slice =

Re: Wait-free thread communication

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 16:22:12 UTC, Jin wrote: On Saturday, 9 January 2016 at 16:05:34 UTC, Ola Fosheim Grøstad wrote: You need it in the tests. If memory writes will reorder, then current tests will fail. Memory reades can be in any order. They have to be atomic if you want your

Re: Changing Name of a thread

2016-01-09 Thread tcak via Digitalmars-d-learn
On Saturday, 9 January 2016 at 11:02:53 UTC, Keywan Ghadami wrote: Hello, i am trying to the set the name of thread with: import core.thread; auto thisThread = Thread.getThis(); thisThread.name = "kiwi"; but GDB prints the name of the programm ("helloworld") [Thread debugging

[Issue 15533] RDMD: -g switch produces linker error

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15533 Ivan Kazmenko changed: What|Removed |Added CC||ga...@mail.ru --

Re: Wait-free thread communication

2016-01-09 Thread Andy Smith via Digitalmars-d
On Saturday, 9 January 2016 at 17:49:46 UTC, David Nadlinger wrote: On Saturday, 9 January 2016 at 17:44:26 UTC, Andy Smith wrote: Unfortunately I'm not well versed enough on the internals of the three main compiler versions to give an opinion on whether this will be a problem or not :-( It

Re: What are you planning for 2016?

2016-01-09 Thread Jakob Jenkov via Digitalmars-d
The communication is the easy part. The time consuming part is converting R objects to D objects and vice versa. I've had to learn the internals of R at the same time that I've learned D. I've been working on it in my spare time for more than two years. Would it have been possible to make a

assumeSorted can't access private function when compiling with -debug

2016-01-09 Thread FreeSlave via Digitalmars-d-learn
Here's code: private { import std.algorithm; import std.range; import std.typecons; alias Tuple!(int, string) Data; } private bool myCmp(Data a, Data b) { return a[0] < b[0]; } auto bar() { return [Data(1, "one"), Data(2, "two")].assumeSorted!myCmp; } void main() {

[Issue 15440] std.uni outputs \u0069\u0307 as the lower case of \u0130

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15440 ag0ae...@gmail.com changed: What|Removed |Added Resolution|FIXED |INVALID --- Comment #2 from

[Issue 15535] Emit error on "goto default" in final switch

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15535 --- Comment #1 from Johan Engelen --- (This is probably mostly a note to self.) Note that "goto default" means to go to the default label of the current switch statement only. So this does not work: void main() { int i =

Re: D Cross Platform Status + OpenGL Status ?

2016-01-09 Thread Joakim via Digitalmars-d
On Saturday, 9 January 2016 at 19:43:03 UTC, Jakob Jenkov wrote: Hi, What is the status of cross compiling D to multiple platforms? I know it is possible, but how easy is it? How many issues do you have to mess with on different platforms? What about ARM / Android support? And what about

Re: Is there a good lib out there to handle large integer of know size ?

2016-01-09 Thread Andrei Alexandrescu via Digitalmars-d
On 1/9/16 6:31 AM, rumbu wrote: Here is what I've done as a side project for a decimal data type: https://github.com/rumbu13/fixed/blob/master/src/fixedtest/fixed.d Who can champion ONE fixed large integer library for Phobos? -- Andrei

Re: Proposal: Database Engine for D

2016-01-09 Thread Andrei Alexandrescu via Digitalmars-d
On 1/9/16 5:49 AM, Russel Winder via Digitalmars-d wrote: On Thu, 2016-01-07 at 15:32 -0500, Andrei Alexandrescu via Digitalmars- d wrote: On 01/07/2016 02:02 PM, Russel Winder via Digitalmars-d wrote: […] Got it, thanks. I took a look at a familiar topic - json grammars. I just googled

Re: Proposal: Database Engine for D

2016-01-09 Thread Andrei Alexandrescu via Digitalmars-d
On 1/9/16 6:02 AM, Russel Winder via Digitalmars-d wrote: Assuming EBNF is actually a good way of writing grammers.;-) What would be a better way? -- Andrei

[Issue 15534] New: [std.experimental.logger.core] Documentation mismatch

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15534 Issue ID: 15534 Summary: [std.experimental.logger.core] Documentation mismatch Product: D Version: D2 Hardware: All URL: http://dlang.org/phobos/ OS: All

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread Jason Jeffory via Digitalmars-d
On Saturday, 9 January 2016 at 11:38:06 UTC, Rikki Cattermole wrote: On 10/01/16 12:32 AM, Jason Jeffory wrote: On Saturday, 9 January 2016 at 10:41:23 UTC, Rikki Cattermole wrote: I've been looking into this issue for web routing. Over all its definitely more performant. But: - You need some

Re: [dlang.org] getting the redesign wrapped up

2016-01-09 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 8 January 2016 at 22:32:59 UTC, anonymous wrote: My implementation of the redesign is pretty much complete. Check it out: http://d-ag0aep6g.rhcloud.com/ This is an implementation of a design done by one Ivan Smirnov, brought forward by Jacob Carlborg [1]. Very nice work. Thank

[Issue 15440] std.uni outputs \u0069\u0307 as the lower case of \u0130

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15440 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: Wait-free thread communication

2016-01-09 Thread Jin via Digitalmars-d
On Saturday, 9 January 2016 at 16:29:07 UTC, Ola Fosheim Grøstad wrote: They have to be atomic if you want your code to be portable. Do not want yet :-)

Re: UFCS vs auto-completion support

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
On Saturday, 9 January 2016 at 16:00:51 UTC, cym13 wrote: I may be very naive but how is the second form more complicated than the first? Pretending these were regular function implementations ... 1000. 1000.iota. 1000.iota.sliced( iota( sliced( sliced(iota( I wouldn't be surprised if

Re: Changing Name of a thread

2016-01-09 Thread Keywan Ghadami via Digitalmars-d-learn
On Saturday, 9 January 2016 at 17:30:47 UTC, tcak wrote: I tried your code with a little addition as follows: [code] import core.sys.posix.pthread; import std.string; import std.stdio; extern(C) int pthread_setname_np(pthread_t, const char*); void main(){

D Cross Platform Status + OpenGL Status ?

2016-01-09 Thread Jakob Jenkov via Digitalmars-d
Hi, What is the status of cross compiling D to multiple platforms? I know it is possible, but how easy is it? How many issues do you have to mess with on different platforms? What about ARM / Android support? And what about OpenGL support? Is that easy? And does it work easily across

Re: Wait-free thread communication

2016-01-09 Thread Jin via Digitalmars-d
On Saturday, 9 January 2016 at 14:20:18 UTC, Andy Smith wrote: I'm a little worried you have no volatile writes or fences around your code when you 'publish' an event using head/tail etc. It looks like it's working but how are you ensuring no compiler/CPU reordering is ocurring. Does x86_64

Re: TIOBE Januar 2016 - D rose 2 positions

2016-01-09 Thread Ozan via Digitalmars-d
On Friday, 8 January 2016 at 10:40:14 UTC, Martin Tschierschke wrote: D rose again from 23th to 21th! http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html The rating is now more than 1% same as many other languages in the ~15+ range Tiobe's data is garbage? Already discussed?

UFCS vs auto-completion support

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
I'm reading Jack Stouffer's documentation: http://jackstouffer.com/blog/nd_slice.html considering the UFCS example below and how it would impact auto-completion support. auto slice = sliced(iota(1000), 5, 5, 40); auto slice = 1000.iota.sliced(5, 5, 40); Seems like auto-complete support for

Re: Linking a DLL to a DLL with packages

2016-01-09 Thread tcak via Digitalmars-d-learn
On Friday, 8 January 2016 at 12:13:15 UTC, Benjamin Thaut wrote: On Thursday, 7 January 2016 at 19:29:43 UTC, Thalamus wrote: Hi everyone, First off, I've been working with D for a couple of weeks now and I think it's the bee's knees! :) Except for DLLs. thanks! :) Dlls don't currently

Re: Wait-free thread communication

2016-01-09 Thread David Nadlinger via Digitalmars-d
On Saturday, 9 January 2016 at 16:22:12 UTC, Jin wrote: So i simple use atomicFence. Performance does not degrade. Either you are not calling it in the way you think you are, then, or your code is otherwise very unoptimized. You can definitely measure the impact of a full mfence on otherwise

Re: Wait-free thread communication

2016-01-09 Thread Andy Smith via Digitalmars-d
On Saturday, 9 January 2016 at 17:24:47 UTC, Jin wrote: On Saturday, 9 January 2016 at 16:29:07 UTC, Ola Fosheim Grøstad wrote: They have to be atomic if you want your code to be portable. Do not want yet :-) Okay I've just refreshed my mental X86/64 memory model :-) What you've done

Re: TIOBE December 2015 - D rose 5 positions

2016-01-09 Thread Joakim via Digitalmars-d
On Saturday, 9 January 2016 at 17:29:34 UTC, Ola Fosheim Grøstad wrote: On Saturday, 9 January 2016 at 16:58:15 UTC, Joakim wrote: On Saturday, 9 January 2016 at 14:01:20 UTC, Ola Fosheim Grøstad wrote: Copy protection. Anti-piracy measure in hardware. Heh, the web had none until very

Re: Wait-free thread communication

2016-01-09 Thread David Nadlinger via Digitalmars-d
On Saturday, 9 January 2016 at 15:16:43 UTC, Ola Fosheim Grøstad wrote: On Saturday, 9 January 2016 at 14:20:18 UTC, Andy Smith wrote: I'm a little worried you have no volatile writes or fences around your code when you 'publish' an event using head/tail etc. It looks like it's working but how

Re: Wait-free thread communication

2016-01-09 Thread David Nadlinger via Digitalmars-d
On Saturday, 9 January 2016 at 17:44:26 UTC, Andy Smith wrote: Unfortunately I'm not well versed enough on the internals of the three main compiler versions to give an opinion on whether this will be a problem or not :-( It might work on DMD, but I know from experience (one-to-many queues,

Re: Hash Tables in D

2016-01-09 Thread Andre Polykanine via Digitalmars-d-announce
WBvDda> http://minas-mina.com/2016/01/01/associative-arrays/ This article translated into Russian: http://habrahabr.ru/post/274723/ -- With best regards from Ukraine, Andre Skype: Francophile Twitter: @m_elensule; Facebook: menelion

Re: Proposal: Database Engine for D

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 11:02:46 UTC, Russel Winder wrote: There is a difference always between what you can do and what you should do. The language should not be fascist in stopping all things not deemed the one true way by the language designers. To do so stops serendipitous

Re: Wait-free thread communication

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 15:51:51 UTC, Jin wrote: On Saturday, 9 January 2016 at 14:20:18 UTC, Andy Smith wrote: I'm a little worried you have no volatile writes or fences around your code when you 'publish' an event using head/tail etc. It looks like it's working but how are you

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread John Colvin via Digitalmars-d
On Saturday, 9 January 2016 at 14:55:27 UTC, Rikki Cattermole wrote: On 10/01/16 3:50 AM, John Colvin wrote: On Saturday, 9 January 2016 at 11:38:06 UTC, Rikki Cattermole wrote: Enums are free and global variables may have cache misses issue An enum isn't guaranteed to be embedded in the

Re: Wait-free thread communication

2016-01-09 Thread Jin via Digitalmars-d
On Saturday, 9 January 2016 at 16:05:34 UTC, Ola Fosheim Grøstad wrote: You need it in the tests. If memory writes will reorder, then current tests will fail. Memory reades can be in any order. On Saturday, 9 January 2016 at 16:05:34 UTC, Ola Fosheim Grøstad wrote: I haven't used atomics

Re: Flipboard collection of D articles

2016-01-09 Thread jamonahn via Digitalmars-d-announce
On Friday, 8 January 2016 at 08:43:52 UTC, florin wrote: However as I'm programming less and less in D lately /@sunre/d-programming-language-e87f94iky Florin May I ask why / what language you are now using? I just recently became a big fan of D, and just watched your 2014 talk. Is the

Re: TIOBE December 2015 - D rose 5 positions

2016-01-09 Thread Joakim via Digitalmars-d
On Saturday, 9 January 2016 at 14:01:20 UTC, Ola Fosheim Grøstad wrote: On Saturday, 9 January 2016 at 13:43:09 UTC, Joakim wrote: On Saturday, 9 January 2016 at 10:13:01 UTC, Ola Fosheim Grøstad wrote: On Saturday, 9 January 2016 at 04:24:05 UTC, Joakim wrote: How is it "political?" My

Re: TIOBE December 2015 - D rose 5 positions

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 16:58:15 UTC, Joakim wrote: On Saturday, 9 January 2016 at 14:01:20 UTC, Ola Fosheim Grøstad wrote: Copy protection. Anti-piracy measure in hardware. Heh, the web had none until very recently, and that's something most businesses don't use. If you run a

[Issue 15527] Template instantiation uses same-name symbol from different scope as template alias parameter

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15527 Ketmar Dark changed: What|Removed |Added CC|

[Issue 15527] Template instantiation uses same-name symbol from different scope as template alias parameter

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15527 --- Comment #1 from Ketmar Dark --- i bet i've seen this bug reported already. sorry, can't find it — my search-foo sux. --

Re: [dlang.org] getting the redesign wrapped up

2016-01-09 Thread Jack Stouffer via Digitalmars-d
On Friday, 8 January 2016 at 22:32:59 UTC, anonymous wrote: My implementation of the redesign is pretty much complete. Check it out: http://d-ag0aep6g.rhcloud.com/ Looks great! 3) New Pages Aside from the overall style changes and menu reorganization, I also added overview pages for the

Re: Wait-free thread communication

2016-01-09 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 9 January 2016 at 17:42:41 UTC, David Nadlinger wrote: Not only that. It's a problem on x86 as well because advanced optimizers like those in GDC or LDC will happily assume that the members are not written to by another thread (because there would be a race otherwise) and cache

Re: D Cross Platform Status + OpenGL Status ?

2016-01-09 Thread Rikki Cattermole via Digitalmars-d
On 10/01/16 9:17 AM, wobbles wrote: On Saturday, 9 January 2016 at 19:43:03 UTC, Jakob Jenkov wrote: And what about OpenGL support? Is that easy? And does it work easily across platforms? http://code.dlang.org/packages/derelict-gl3 This is the OpenGL binary. Have used it on both Windows and

[Issue 15538] New: final switch statement raises an exception even though all cases are covered und certain conditions

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15538 Issue ID: 15538 Summary: final switch statement raises an exception even though all cases are covered und certain conditions Product: D Version: D2 Hardware: x86_64

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread Jason Jeffory via Digitalmars-d
On Saturday, 9 January 2016 at 23:43:32 UTC, Rikki Cattermole wrote: interface IFoo { void a(); void b(); } __gshared IFoo a, b; __gshared IFoo instance; class Foo(bool bar) : IFoo { void a() { static if (bar) { // do something

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 00:41:35 UTC, Ilya Yaroshenko wrote: It is a bug (Slice or Parallel ?). Please fill this issue. Slice should work with parallel, and array of slices should work with parallel. Ok, thanks, I'll submit it.

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? I find that without using parallel, all

[Issue 15537] New: Private function is not accessible from other module when compiling with -debug flag

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15537 Issue ID: 15537 Summary: Private function is not accessible from other module when compiling with -debug flag Product: D Version: D2 Hardware: All OS: All

Extended DirectX bindings with Direct3D{7,8,9,11,12} support

2016-01-09 Thread Jeremie Pelletier via Digitalmars-d
Hello, I'm decoupling some stuff from my project code and dumped a lot of it into the directx-d bindings, I want to turn it more derelict-like in the future but here is what I have so far: https://github.com/ddude/directx-d I successfully created contexts in all versions except 12 which I

[Issue 15536] New: [std.experimental.logger] More detailed example

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15536 Issue ID: 15536 Summary: [std.experimental.logger] More detailed example Product: D Version: D2 Hardware: All URL: http://dlang.org/phobos/ OS: All

sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? I find that without using parallel, all the means get computed, but with parallel, only about half of

Re: Self-Modifying code for user settings optimization

2016-01-09 Thread Rikki Cattermole via Digitalmars-d
interface IFoo { void a(); void b(); } __gshared IFoo a, b; __gshared IFoo instance; class Foo(bool bar) : IFoo { void a() { static if (bar) { // do something } else { // do nothing

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
for example, means[63] through means[251] are consistently all NaN when using parallel in this test, but are all computed double values when parallel is not used.

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? [...] It is a bug (Slice or Parallel

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? [...] Oh... there is no bug. means

Re: version in enum

2016-01-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, January 09, 2016 13:32:49 Adam D. Ruppe via Digitalmars-d-learn wrote: > On Saturday, 9 January 2016 at 12:43:32 UTC, Øivind wrote: > > Why doesn't this work? Seems like it should: > > D defines version to only work on *complete* blocks. You're > trying to use it on a partial block

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 01:54:18 UTC, Jay Norwood wrote: ok, thanks. That works. I'll go back to trying ndslice now. The parallel time for this case is about a 2x speed-up on my corei5 laptop, debug build in windows32, dmd. D:\ec_mars_ddt\workspace\nd8>nd8.exe parallel time msec:2495

issue porting C++/glm/openGL to D/gl3n/openGL

2016-01-09 Thread WhatMeWorry via Digitalmars-d-learn
Just translating some simple C++/glm/opengl tutorial code to D/gl3n/opengl and I'm coming across more friction than I expected. I've got a square centered at my window which is rotated by 45 degrees (counter clockwise) and then moved to the lower right quadrant. // C++ glm opengl code

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: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 01:16:43 UTC, Ilya Yaroshenko wrote: On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be

[Issue 15539] New: core.sys.windows.* tweaks for 2.070

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15539 Issue ID: 15539 Summary: core.sys.windows.* tweaks for 2.070 Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: blocker

[Issue 15539] core.sys.windows.* tweaks for 2.070

2016-01-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15539 Vladimir Panteleev changed: What|Removed |Added CC|

Re: issue porting C++/glm/openGL to D/gl3n/openGL

2016-01-09 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 10 January 2016 at 02:51:57 UTC, WhatMeWorry wrote: Is gl3n not a direct replacement for glm? From the very top of the gl3n github page: "OpenGL Maths for D (not glm for D)." So, no, it is not. You might want to start with the glm documentaion [1]. [1]

  1   2   >