Re: static foreach issues

2017-09-05 Thread Psychological Cleanup via Digitalmars-d
On Wednesday, 6 September 2017 at 05:23:47 UTC, Ali Çehreli wrote: On 09/05/2017 07:05 PM, Psychological Cleanup wrote: > Nesting static foreach and using enum has latent problem. > > static foreach() > static foreach() > { > enum A = ; > } > > compiler complains because A is defined

Re: Going on std.regex & std.uni bug-fixing hunt

2017-09-05 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 6 September 2017 at 05:23:51 UTC, Jon Degenhardt wrote: On Tuesday, 5 September 2017 at 10:50:46 UTC, Dmitry Olshansky wrote: Before I'm too deep down this rabbit hole I decided to first address the long-standing backlog of issues of std.regex and std.uni. Not intending to add

Re: Going on std.regex & std.uni bug-fixing hunt

2017-09-05 Thread Jon Degenhardt via Digitalmars-d
On Tuesday, 5 September 2017 at 10:50:46 UTC, Dmitry Olshansky wrote: Before I'm too deep down this rabbit hole I decided to first address the long-standing backlog of issues of std.regex and std.uni. Not intending to add to your workload, but I added an enhancement request for something I

Re: static foreach issues

2017-09-05 Thread Ali Çehreli via Digitalmars-d
On 09/05/2017 07:05 PM, Psychological Cleanup wrote: > Nesting static foreach and using enum has latent problem. > > static foreach() > static foreach() > { > enum A = ; > } > > compiler complains because A is defined multiple times by the outer most > foreach. That's understandable

Re: Deimos X11 bindings license question

2017-09-05 Thread Joakim via Digitalmars-d
On Tuesday, 5 September 2017 at 22:25:57 UTC, Jonathan M Davis wrote: If you go with a BSD or Boost license, you're maximizing who can use your software, but you have no guarantees that any improvements will be made available, whereas the (L)GPL does guarantee that those improvements will be

[Issue 17810] New: Add wcwidth/wcswidth equivalents to std.uni

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17810 Issue ID: 17810 Summary: Add wcwidth/wcswidth equivalents to std.uni Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement

Re: Using closure causes GC allocation

2017-09-05 Thread Vino.B via Digitalmars-d-learn
On Monday, 4 September 2017 at 14:42:45 UTC, Azi Hassan wrote: On Monday, 4 September 2017 at 05:45:18 UTC, Vino.B wrote: In order to resolve the issue "Using closure causes GC allocation" it was stated that we need to use delegates Alternatively you can drop the functional style and use a

Re: run unittest inside program

2017-09-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, September 06, 2017 02:06:59 Psychological Cleanup via Digitalmars-d-learn wrote: > Is it possible to run a unit test without adding -unittest to the > command line? > > unittest X > { > pragma(msg, "Boo!"); > } > > X; > > void main() { } No. Without -unittest, the unittest

Re: Interface inheritance

2017-09-05 Thread GGB via Digitalmars-d
On Tuesday, 5 September 2017 at 21:45:51 UTC, jmh530 wrote: On Tuesday, 5 September 2017 at 21:44:07 UTC, jmh530 wrote: This is related to Issue 2538: https://issues.dlang.org/show_bug.cgi?id=2538 The spec has more information on interfaces here https://dlang.org/spec/interface.html And

Re: Can attributes trigger functionality?

2017-09-05 Thread Moritz Maxeiner via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 02:43:20 UTC, Psychological Cleanup wrote: I'm having to create a lot of boiler plate code that creates "events" and corresponding properties(getter and setter). I'm curious if I can simplify this without a string mixin. If I create my own attribute like

Re: Can attributes trigger functionality?

2017-09-05 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 02:43:20 UTC, Psychological Cleanup wrote: I'm having to create a lot of boiler plate code that creates "events" and corresponding properties(getter and setter). I'm curious if I can simplify this without a string mixin. You certainly don't need a string

Can attributes trigger functionality?

2017-09-05 Thread Psychological Cleanup via Digitalmars-d-learn
I'm having to create a lot of boiler plate code that creates "events" and corresponding properties(getter and setter). I'm curious if I can simplify this without a string mixin. If I create my own attribute like @Event double foo(); and I write any code that will trigger when the event is

static foreach issues

2017-09-05 Thread Psychological Cleanup via Digitalmars-d
Nesting static foreach and using enum has latent problem. static foreach() static foreach() { enum A = ; } compiler complains because A is defined multiple times by the outer most foreach. To fix this static foreach() static foreach() { { enum A = ; } }

run unittest inside program

2017-09-05 Thread Psychological Cleanup via Digitalmars-d-learn
Is it possible to run a unit test without adding -unittest to the command line? unittest X { pragma(msg, "Boo!"); } X; void main() { }

Re: DUB and LTO?

2017-09-05 Thread Jon Degenhardt via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 11:36:06 UTC, Sönke Ludwig wrote: Am 24.01.2017 um 17:02 schrieb Las: How do I enable LTO in DUB in a sane way? I could add it to dflags, but I only want it on release builds. You can put a "buildTypes" section in your package recipe and override default

Re: Hong Kong dlang Meetup

2017-09-05 Thread Lionello Lunesu via Digitalmars-d-announce
Let's occupy codeaholics: https://www.meetup.com/Codeaholics/events/242640432/ On 6/9/2017 00:26, Lionello Lunesu wrote: +1! Let me know the dates and I'll blast it to the channels I'm on (Codeaholics, Dim Sum Labs hacker space.) L. On 5/9/2017 03:25, Jonathan M Davis via

Re: Hong Kong dlang Meetup

2017-09-05 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, September 05, 2017 10:19:10 sarn via Digitalmars-d-announce wrote: > On Monday, 4 September 2017 at 19:25:59 UTC, Jonathan M Davis > > wrote: > > Several of us from the D community will be in Hong Kong on a > > business trip next week (me, John Colvin, Atila Neves, and Ilya > >

Re: Hong Kong dlang Meetup

2017-09-05 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, September 05, 2017 00:16:54 Nicholas Wilson via Digitalmars-d- announce wrote: > On Monday, 4 September 2017 at 19:25:59 UTC, Jonathan M Davis > > wrote: > > Several of us from the D community will be in Hong Kong on a > > business trip next week (me, John Colvin, Atila Neves, and Ilya

Re: C `restrict` keyword in D

2017-09-05 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 05, 2017 18:32:34 Johan Engelen via Digitalmars-d wrote: > On Monday, 4 September 2017 at 21:23:50 UTC, Moritz Maxeiner > > wrote: > > On Monday, 4 September 2017 at 17:58:41 UTC, Johan Engelen > > > > wrote: > >> (The spec requires crashing on null dereferencing, but this >

Re: Templates, D way

2017-09-05 Thread Void-995 via Digitalmars-d
On Tuesday, 5 September 2017 at 21:18:11 UTC, crimaniak wrote: On Tuesday, 5 September 2017 at 14:55:21 UTC, Void-995 wrote: Using unions? Count and Offset are different depending on input data, so the address where they are is varying depending on which file I've loaded. Or I didn't get

Re: dub projects generate docs and host on code.dlang.org?

2017-09-05 Thread user1234 via Digitalmars-d
On Tuesday, 5 September 2017 at 02:08:08 UTC, Manu wrote: On 4 September 2017 at 21:45, user1234 via Digitalmars-d < digitalmars-d@puremagic.com> wrote: On Monday, 4 September 2017 at 10:47:47 UTC, Manu wrote: Thoughts? - Manu It has existed in the past, see

Re: Deimos X11 bindings license question

2017-09-05 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 05, 2017 18:23:00 jmh530 via Digitalmars-d wrote: > On Tuesday, 5 September 2017 at 18:12:23 UTC, bachmeier wrote: > > But LGPL and GPL are very different licenses. Also, while I > > don't have time to participate in yet another debate on the > > topic, the GPL does not in

Re: Deimos X11 bindings license question

2017-09-05 Thread Jonathan Marler via Digitalmars-d
On Tuesday, 5 September 2017 at 18:12:23 UTC, bachmeier wrote: ...the GPL does not in any way restrict users. Using GPL code means you promise *not* to impose restrictions... Reading things like this is much more humorous when you have a solid background in logic and contradiction. As for

Re: I would like to draw attention regarding std.signals

2017-09-05 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 05, 2017 15:05:09 12345swordy via Digitalmars-d wrote: > On Tuesday, 5 September 2017 at 14:55:20 UTC, Bastiaan Veelo > > wrote: > > On Tuesday, 5 September 2017 at 13:27:44 UTC, 12345swordy wrote: > >> [...] > > > > I assume you think that is a long time. It could also mean

Re: dub projects generate docs and host on code.dlang.org?

2017-09-05 Thread Andrei Alexandrescu via Digitalmars-d
On 09/05/2017 12:05 PM, Seb wrote: On Tuesday, 5 September 2017 at 07:59:09 UTC, denizzzka wrote: On Monday, 4 September 2017 at 10:47:47 UTC, Manu wrote: Suggest; code.dlang.org should attempt to generate ddoc for each hosted project, host it, and clearly link to it from the project

Re: Interface inheritance

2017-09-05 Thread jmh530 via Digitalmars-d
On Tuesday, 5 September 2017 at 21:44:07 UTC, jmh530 wrote: This is related to Issue 2538: https://issues.dlang.org/show_bug.cgi?id=2538 The spec has more information on interfaces here https://dlang.org/spec/interface.html And here is a simpler example: interface I1 { void A(); }

[Issue 2538] Final method is not involved in inteface method resolution

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2538 John Hall changed: What|Removed |Added CC|

Re: Interface inheritance

2017-09-05 Thread jmh530 via Digitalmars-d
On Tuesday, 5 September 2017 at 20:15:44 UTC, GGB wrote: What are the rules regarding one interface (not class, but interface) inheriting from another? Nothing in the documentation seems to refer to interface inheritance, only to class inheritance. I have tried to do some code with this,

Re: D scripting

2017-09-05 Thread EntangledQuanta via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 19:59:27 UTC, Andre Pany wrote: On Tuesday, 5 September 2017 at 19:44:40 UTC, EntangledQuanta wrote: Just an idea for you: in delphi you can set the properties of a component (a class with runtime reflection enabled) on runtime. You can even call the methods and

Re: C `restrict` keyword in D

2017-09-05 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 5 September 2017 at 18:32:34 UTC, Johan Engelen wrote: On Monday, 4 September 2017 at 21:23:50 UTC, Moritz Maxeiner wrote: On Monday, 4 September 2017 at 17:58:41 UTC, Johan Engelen wrote: (The spec requires crashing on null dereferencing, but this spec bit is ignored by DMD and

Re: Templates, D way

2017-09-05 Thread crimaniak via Digitalmars-d
On Tuesday, 5 September 2017 at 14:55:21 UTC, Void-995 wrote: Using unions? Count and Offset are different depending on input data, so the address where they are is varying depending on which file I've loaded. Or I didn't get what you meant. Yes, so you need separate union type for every

Re: Templates, D way

2017-09-05 Thread crimaniak via Digitalmars-d
On Tuesday, 5 September 2017 at 14:43:19 UTC, John Colvin wrote: On Tuesday, 5 September 2017 at 12:41:45 UTC, Computermatronic wrote: On Tuesday, 5 September 2017 at 12:20:14 UTC, crimaniak wrote: [...] I find it very strange that this works, as a non-mixin template should not be able to

Re: Deimos X11 bindings license question

2017-09-05 Thread Walter Bright via Digitalmars-d
On 9/4/2017 10:54 AM, Vadim Lopatin wrote: That said, I don't know if the Oracle v. Google case and its precedent that APIs are copyrightable impact this common understanding. After all, it was commonly understood prior to that case that that copyright applies to implementations, not

Interface inheritance

2017-09-05 Thread GGB via Digitalmars-d
What are the rules regarding one interface (not class, but interface) inheriting from another? Nothing in the documentation seems to refer to interface inheritance, only to class inheritance. I have tried to do some code with this, and the compiler does not complain about one interface

Re: Editor recommendations for new users.

2017-09-05 Thread Dukc via Digitalmars-d
On Sunday, 27 August 2017 at 10:28:29 UTC, Dukc wrote: I'm sure there are other good options too. The problem with geany is that it's syntax highlighting and auto-completion depend on having the file where the symbol's defined open. But that's because it's primarily a lightweight editor, not

Re: D vs Rust

2017-09-05 Thread Ali Çehreli via Digitalmars-d
On 09/04/2017 08:13 AM, Eljay wrote: > the original language was Object Pascal. Just a random connection: Bastiaan Veelo's DConf presentation was about parsing Extended Pascal. http://dconf.org/2017/talks/veelo.html > Sorry if I didn't express myself clearly. I agree that D rocks! :p

Re: Finding chars in strings

2017-09-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 05, 2017 18:04:16 ag0aep6g via Digitalmars-d-learn wrote: > On 09/05/2017 05:54 PM, Per Nordlöw wrote: > > Follow up question: If a character literal has type char, can we always > > assume it's an ASCII character? > > Strictly speaking, this is a character literal of type

Re: Making a repo of downloaded dub package

2017-09-05 Thread Dukc via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 08:43:02 UTC, Jonathan M Davis wrote: Yeah. I'm fairly certain that that's your only option. dub is not designed with the idea that you would be editing the source code that it downloads. That's just intended for building the code that you are editing. It does

Re: Finding chars in strings

2017-09-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 05, 2017 17:55:20 ag0aep6g via Digitalmars-d-learn wrote: > On 09/05/2017 05:43 PM, Per Nordlöw wrote: > > If a character literal has type char, always below 128, can we always > > search for it's first byte offset in a string without decoding the > > string to a range of

Re: D scripting

2017-09-05 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 19:44:40 UTC, EntangledQuanta wrote: Just an idea for you: in delphi you can set the properties of a component (a class with runtime reflection enabled) on runtime. You can even call the methods and events of a component. I build a Delphi Bridge for D (see

Re: C `restrict` keyword in D

2017-09-05 Thread dukc via Digitalmars-d
On Tuesday, 5 September 2017 at 18:32:34 UTC, Johan Engelen wrote: My point was that that is not workable. The "null dereference" is a D language construct, not something that the machine is doing. It's ridiculous to specify that reading from address 1_000_000 should crash the program, yet

Re: D scripting

2017-09-05 Thread EntangledQuanta via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 19:19:19 UTC, Andre Pany wrote: On Tuesday, 5 September 2017 at 18:37:17 UTC, EntangledQuanta wrote: On Tuesday, 5 September 2017 at 08:13:02 UTC, Andre Pany wrote: On Tuesday, 5 September 2017 at 07:32:24 UTC, EntangledQuanta wrote: I would like to use D as a

Re: D on Tiobe Index

2017-09-05 Thread dukc via Digitalmars-d-announce
On Friday, 1 September 2017 at 10:18:25 UTC, Vadim Lopatin wrote: I believe DlangIDE can become such tool. Runs on all platforms. Small. which includes syntax highlighting, auto-complete, symbol-information on hover, go to declaration, Supports it using embedded DCD. and runtime debugging

Re: D scripting

2017-09-05 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 18:37:17 UTC, EntangledQuanta wrote: On Tuesday, 5 September 2017 at 08:13:02 UTC, Andre Pany wrote: On Tuesday, 5 September 2017 at 07:32:24 UTC, EntangledQuanta wrote: I would like to use D as a "scripting" language for my D app. There seems to be no such

Re: GitBook about D on embedded ARM Linux

2017-09-05 Thread thinwybk via Digitalmars-d-announce
On Sunday, 3 September 2017 at 16:17:37 UTC, thinwybk wrote: In the beginning porting some of the C++ classes from https://github.com/derekmolloy/exploringBB/tree/master/chp06 could be a good starting point. ...the complete C++ HAL can be found here:

Re: Deimos X11 bindings license question

2017-09-05 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 5 September 2017 at 18:23:00 UTC, jmh530 wrote: However, if you use GPL code in a project and want to distribute it, then you also have to license that project as GPL. Which just means your users also promise not to put restrictions on their users. It is like the 13th amendment

Re: SIMD under LDC

2017-09-05 Thread Johan Engelen via Digitalmars-d-learn
On Monday, 4 September 2017 at 20:39:11 UTC, Igor wrote: I found that I can't use __simd function from core.simd under LDC and that it has ldc.simd but I couldn't find how to implement equivalent to this with it: ubyte16* masks = ...; foreach (ref c; pixels) { c = __simd(XMM.PSHUFB,

Re: D scripting

2017-09-05 Thread EntangledQuanta via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 08:13:02 UTC, Andre Pany wrote: On Tuesday, 5 September 2017 at 07:32:24 UTC, EntangledQuanta wrote: I would like to use D as a "scripting" language for my D app. There seems to be no such thing. Since we can include the D compiler in our distribution, it is

Re: C `restrict` keyword in D

2017-09-05 Thread Johan Engelen via Digitalmars-d
On Monday, 4 September 2017 at 21:23:50 UTC, Moritz Maxeiner wrote: On Monday, 4 September 2017 at 17:58:41 UTC, Johan Engelen wrote: (The spec requires crashing on null dereferencing, but this spec bit is ignored by DMD and LDC, I assume in GDC too. Crashing on `null` dereferencing requires

Re: Deimos X11 bindings license question

2017-09-05 Thread jmh530 via Digitalmars-d
On Tuesday, 5 September 2017 at 18:12:23 UTC, bachmeier wrote: But LGPL and GPL are very different licenses. Also, while I don't have time to participate in yet another debate on the topic, the GPL does not in any way restrict users. Using GPL code means you promise *not* to impose

Re: Deimos X11 bindings license question

2017-09-05 Thread bachmeier via Digitalmars-d
On Tuesday, 5 September 2017 at 16:32:47 UTC, Jonathan Marler wrote: On Sunday, 3 September 2017 at 16:10:11 UTC, Gary Willoughby wrote: Hi, A few years ago I forked the Deimos X11 bindings[1] repo to add dub support. Since then my repo[2] has received bug fixes and as such it's being used

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

2017-09-05 Thread Mark via Digitalmars-d
On Saturday, 2 September 2017 at 20:22:44 UTC, Robert M. Münch wrote: Iterators are not the silver bullet. But IIRC you can specify if you want to iterate over a graph BF or DF. If you just need to "iterate" over the elements things work pretty good IMO. If you want to select a sub-set and

[Issue 9776] Make raw write mode the default

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9776 --- Comment #14 from anonymous4 --- Not documented that std.file doesn't use C stdio and is not compatible with it (and not intended) and no remark to not mix it with stdio as was suggested here. --

Re: SIMD under LDC

2017-09-05 Thread Igor via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 01:11:29 UTC, 12345swordy wrote: On Monday, 4 September 2017 at 23:06:27 UTC, Nicholas Wilson wrote: Don't underestimate ldc's optimiser ;) I seen cases where the compiler fail to optimized for smid. I tried it and LDC optimized build did generate SIMD

Re: Deimos X11 bindings license question

2017-09-05 Thread Jonathan Marler via Digitalmars-d
On Sunday, 3 September 2017 at 16:10:11 UTC, Gary Willoughby wrote: Hi, A few years ago I forked the Deimos X11 bindings[1] repo to add dub support. Since then my repo[2] has received bug fixes and as such it's being used in many projects. (Also, in the following years dub support was added

Re: Hong Kong dlang Meetup

2017-09-05 Thread Lionello Lunesu via Digitalmars-d-announce
+1! Let me know the dates and I'll blast it to the channels I'm on (Codeaholics, Dim Sum Labs hacker space.) L. On 5/9/2017 03:25, Jonathan M Davis via Digitalmars-d-announce wrote: Several of us from the D community will be in Hong Kong on a business trip next week (me, John Colvin, Atila

Re: DLang IDE [RU]

2017-09-05 Thread TM via Digitalmars-d-learn
Из более серьезных улучшений, я бы предложил возможность в Workspace Explorer добавлять пакеты, переименовывать пакеты / модули, перемещать пакеты / модули и удалять пакеты / модули. Но это, очевидно уже будет требовать некоторых усилий на реализацию. А так, за неимением, IDE работает впаре с

Re: dub projects generate docs and host on code.dlang.org?

2017-09-05 Thread Seb via Digitalmars-d
On Tuesday, 5 September 2017 at 02:21:26 UTC, Nicholas Wilson wrote: On Monday, 4 September 2017 at 10:47:47 UTC, Manu wrote: I've seen a lot of dub projects with embedded ddoc that follows phobos example. These projects are then hosted on code.dlang.org, but often, the docs are never

Re: dub projects generate docs and host on code.dlang.org?

2017-09-05 Thread Seb via Digitalmars-d
On Tuesday, 5 September 2017 at 07:59:09 UTC, denizzzka wrote: On Monday, 4 September 2017 at 10:47:47 UTC, Manu wrote: Suggest; code.dlang.org should attempt to generate ddoc for each hosted project, host it, and clearly link to it from the project front-page. Hosted docs should be styled

Re: Finding chars in strings

2017-09-05 Thread ag0aep6g via Digitalmars-d-learn
On 09/05/2017 05:54 PM, Per Nordlöw wrote: Follow up question: If a character literal has type char, can we always assume it's an ASCII character? Strictly speaking, this is a character literal of type char: '\xC3'. It's clearly above 0x7F, and not an ASCII character. So, no. But if it's an

Re: Finding chars in strings

2017-09-05 Thread ag0aep6g via Digitalmars-d-learn
On 09/05/2017 05:43 PM, Per Nordlöw wrote: If a character literal has type char, always below 128, can we always search for it's first byte offset in a string without decoding the string to a range of dchars? Yes. You can search for ASCII characters (< 128) without decoding. The values in

Re: Finding chars in strings

2017-09-05 Thread Per Nordlöw via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 15:43:02 UTC, Per Nordlöw wrote: If a character literal has type char, always below 128, can we always search for it's first byte offset in a string without decoding the string to a range of dchars? Follow up question: If a character literal has type char, can

Re: dub projects generate docs and host on code.dlang.org?

2017-09-05 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 5 September 2017 at 03:15:58 UTC, Adam D. Ruppe wrote: On Monday, 4 September 2017 at 11:15:08 UTC, Joakim wrote: While it's an interesting suggestion, dub has 355 open issues, would be better if more people pitched in on those: I have zero interest in fixing dub issues since I

Re: C `restrict` keyword in D

2017-09-05 Thread Dukc via Digitalmars-d
On Monday, 4 September 2017 at 18:03:51 UTC, Johan Engelen wrote: It's need for auto-vectorization, for example. I would support an LDC PR for adding a magic UDA to be able to attach 'restrict' with C-semantics to function parameters. E.g. ``` // add restrict to parameters 1 and 2 void

[Issue 15399] unaligned pointers are not @safe

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15399 ag0ae...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED CC|

DLang IDE [RU]

2017-09-05 Thread TM via Digitalmars-d-learn
Да простят англоязычные участники :) С попеременным успехом пытаюсь оседлать DLang IDE, связи с чем накопился ряд вопросов, прежде всего к автору. Рабочая станция: I3-550, ОС Windows 7 Pro SP1 русская, 32 битная. 1. Невозможно собрать как IDE, так и любой пример из DlangUI, если в профиле

Finding chars in strings

2017-09-05 Thread Per Nordlöw via Digitalmars-d-learn
If a character literal has type char, always below 128, can we always search for it's first byte offset in a string without decoding the string to a range of dchars?

Re: I would like to draw attention regarding std.signals

2017-09-05 Thread Bastiaan Veelo via Digitalmars-d
On Tuesday, 5 September 2017 at 14:55:20 UTC, Bastiaan Veelo wrote: According to [5] it is already thread safe. [5] http://forum.dlang.org/post/sxuiargigylszcurp...@forum.dlang.org The docs seem to state the contrary, though: * This struct is not thread-safe in general, it just handles the

Re: I would like to draw attention regarding std.signals

2017-09-05 Thread 12345swordy via Digitalmars-d
On Tuesday, 5 September 2017 at 15:18:08 UTC, Bastiaan Veelo wrote: On Tuesday, 5 September 2017 at 15:05:09 UTC, 12345swordy wrote: I am not interested in add features like the other guy did, I am interested in fixing the bug regarding thread safety. Sure, ripping out the extra features and

Re: I would like to draw attention regarding std.signals

2017-09-05 Thread Bastiaan Veelo via Digitalmars-d
On Tuesday, 5 September 2017 at 15:05:09 UTC, 12345swordy wrote: I am not interested in add features like the other guy did, I am interested in fixing the bug regarding thread safety. Sure, ripping out the extra features and keeping the fixes might be what would get this accepted. I didn't

[Issue 9776] Make raw write mode the default

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9776 --- Comment #13 from Vladimir Panteleev --- (In reply to anonymous4 from comment #12) > Not documented though. How so? The documentation for stdioOpenmode says "range or string represting the open mode (with the

Re: I would like to draw attention regarding std.signals

2017-09-05 Thread 12345swordy via Digitalmars-d
On Tuesday, 5 September 2017 at 14:55:20 UTC, Bastiaan Veelo wrote: On Tuesday, 5 September 2017 at 13:27:44 UTC, 12345swordy wrote: [...] I assume you think that is a long time. It could also mean it is stable. [...] There is lack of interest regarding event driven programming!? I am

[Issue 5866] std.math.sin(float), std.math.cos(float) to return float

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5866 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED

Re: Templates, D way

2017-09-05 Thread Void-995 via Digitalmars-d
On Tuesday, 5 September 2017 at 14:01:02 UTC, crimaniak wrote: On Tuesday, 5 September 2017 at 12:54:20 UTC, Void-995 wrote: Thanks, that definitely working and doesn't require mixin with strings. But while waiting for response I've tried another thing, and I doubt I would able do to that

Re: I would like to draw attention regarding std.signals

2017-09-05 Thread Bastiaan Veelo via Digitalmars-d
On Tuesday, 5 September 2017 at 13:27:44 UTC, 12345swordy wrote: On Tuesday, 5 September 2017 at 12:09:55 UTC, Bastiaan Veelo wrote: I don't really know, but there are some alternatives on dub that try to improve on std.signals, for example https://code.dlang.org/packages/phobosx. Not sure

Re: Struct with float members in betterC

2017-09-05 Thread user1234 via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 11:58:18 UTC, Azi Hassan wrote: Hi, I'm trying to create the following struct in betterC but I keep getting undefined reference errors when I try to compile the code : [...] I'm aware that betterC is still experimental at this point, but I thought I'd ask

Re: Templates, D way

2017-09-05 Thread John Colvin via Digitalmars-d
On Tuesday, 5 September 2017 at 12:41:45 UTC, Computermatronic wrote: On Tuesday, 5 September 2017 at 12:20:14 UTC, crimaniak wrote: [...] I find it very strange that this works, as a non-mixin template should not be able to capture the context of where it was instantiated. If you take the

[Issue 17809] New: "this" is implicitly captured by template with alias parameter

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17809 Issue ID: 17809 Summary: "this" is implicitly captured by template with alias parameter Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 17809] "this" is implicitly captured by template with alias parameter

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17809 John Colvin changed: What|Removed |Added Keywords|

Re: Problem with std.string.strip(): Can't use result in format routine

2017-09-05 Thread Ky-Anh Huynh via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 13:56:20 UTC, Andrea Fontana wrote: I used `lines(stdin)` as in https://dlang.org/phobos/std_stdio.html#.lines . My source code is here https://github.com/icy/dusybox/blob/master/src/plotbar/main.d#L47 . Thanks for your support. I think formattedRead is

Re: vibed services stop response after several days of work

2017-09-05 Thread crimaniak via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 13:51:40 UTC, Sönke Ludwig wrote: The error is most likely caused by issuing two requests to the MySQL server from two different tasks on the same connection. Usually, mysql-native uses a connection pool to avoid this, but that could have been circumvented by

[Issue 12171] Parenthesis-less call fails in static array length context

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12171 --- Comment #3 from RazvanN --- Seeing as the platform on which the bug was reported is windows, I modified to WORKSFORME, if anyone has a windows platform, please try the example and reopen if necessary. --

[Issue 12171] Parenthesis-less call fails in static array length context

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12171 RazvanN changed: What|Removed |Added Resolution|FIXED |WORKSFORME --

[Issue 12171] Parenthesis-less call fails in static array length context

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12171 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED

Re: Templates, D way

2017-09-05 Thread crimaniak via Digitalmars-d
On Tuesday, 5 September 2017 at 12:54:20 UTC, Void-995 wrote: Thanks, that definitely working and doesn't require mixin with strings. But while waiting for response I've tried another thing, and I doubt I would able do to that without string now: ... int %sCount;

[Issue 11729] protected toString causes strange error message

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11729 --- Comment #5 from RazvanN --- There is nothing wrong with the compiler message. The toString method is not visible outside the module it was declared so the template constraint hasToString!(T, Char) fails (as it should).

Re: Problem with std.string.strip(): Can't use result in format routine

2017-09-05 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 13:40:18 UTC, Ky-Anh Huynh wrote: On Tuesday, 5 September 2017 at 13:17:34 UTC, Azi Hassan wrote: Maybe it has something to do with how you read from STDIN. Can you show that part of the code to see if I can reproduce the issue ? I used `lines(stdin)` as in

[Issue 11729] protected toString causes strange error message

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11729 --- Comment #4 from anonymous4 --- And I think this can't be patched in phobos: formatObject can't work with protected toString, hence it must be skipped, which results in the generic template mismatch error. --

Re: vibed services stop response after several days of work

2017-09-05 Thread Sönke Ludwig via Digitalmars-d-learn
Am 01.09.2017 um 12:31 schrieb Suliman: On Friday, 1 September 2017 at 08:01:24 UTC, Suliman wrote: I got same problem on Windows Server 2016 and on Linux Debian 8.5. I have few very simple backend based on vibed 0.8.1, compiler dmd 2.075.1. nginx servise is do port forwarding. Nothing more

[Issue 9626] More precise error message in some cases when failed template constraint

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9626 anonymous4 changed: What|Removed |Added See Also|

[Issue 11729] protected toString causes strange error message

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11729 anonymous4 changed: What|Removed |Added See Also|

Re: Problem with std.string.strip(): Can't use result in format routine

2017-09-05 Thread Ky-Anh Huynh via Digitalmars-d-learn
On Tuesday, 5 September 2017 at 13:17:34 UTC, Azi Hassan wrote: Maybe it has something to do with how you read from STDIN. Can you show that part of the code to see if I can reproduce the issue ? I used `lines(stdin)` as in https://dlang.org/phobos/std_stdio.html#.lines . My source code

[Issue 17808] New: VisualD doesn't work if Visual Studio is installed to non-ASCII path

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17808 Issue ID: 17808 Summary: VisualD doesn't work if Visual Studio is installed to non-ASCII path Product: D Version: D2 Hardware: x86_64 OS: Windows

[Issue 11729] protected toString causes strange error message

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11729 anonymous4 changed: What|Removed |Added Keywords||diagnostic ---

Re: Templates, D way

2017-09-05 Thread crimaniak via Digitalmars-d
On Tuesday, 5 September 2017 at 12:41:45 UTC, Computermatronic wrote: I find it very strange that this works, ... I'm too. :) In any case, it's not a big deal. It's possible to modify this template to transfer `this` as the first parameter and modify its usage accordingly.

[Issue 4555] Double newlines with std.file.readText

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4555 --- Comment #5 from RazvanN --- Since this one was reported originally, I think it would make more sense to mark 9776 as a duplicate of this one. Either way, the issues reference each other so I guess anything works. --

[Issue 9776] Make raw write mode the default

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9776 anonymous4 changed: What|Removed |Added CC||bearophile_h...@eml.cc

[Issue 4555] Double newlines with std.file.readText

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4555 anonymous4 changed: What|Removed |Added Resolution|WONTFIX |DUPLICATE --- Comment

[Issue 9776] Make raw write mode the default

2017-09-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9776 --- Comment #12 from anonymous4 --- (In reply to Vladimir Panteleev from comment #8) > Whether you agree or disagree, everything here works "as designed" Not documented though. --

Re: I would like to draw attention regarding std.signals

2017-09-05 Thread 12345swordy via Digitalmars-d
On Tuesday, 5 September 2017 at 12:09:55 UTC, Bastiaan Veelo wrote: On Monday, 4 September 2017 at 23:19:31 UTC, 12345swordy wrote: The current bug that I like to focus on is the following: "Not safe for multiple threads operating on the same signals or slots. " However boost.signals2 is

  1   2   >