Re: [OT] Generative C++

2017-07-28 Thread Nicholas Wilson via Digitalmars-d
On Friday, 28 July 2017 at 22:12:32 UTC, Kagamin wrote: On Friday, 28 July 2017 at 15:41:28 UTC, 12345swordy wrote: ... That's not what I consider to be "simple" (Hard to read IMO). struct DblRep { mixin(bitfieldString([ BitFieldDesc(Type.Ulong, "fraction", 23), BitFieldDesc(Type.Ush

Re: How do you use D?

2017-07-28 Thread Shannon via Digitalmars-d
On Friday, 28 July 2017 at 14:58:01 UTC, Ali wrote: How do you use D? One work project a few years ago, and many side projects. rdmd makes D my "scripting" language of choice. In work, (key projects or smaller side projects) The need for single executable with the speed of C prompted me to

Re: How do you use D?

2017-07-28 Thread NotSpooky via Digitalmars-d
On Friday, 28 July 2017 at 14:58:01 UTC, Ali wrote: How do you use D? I mostly use it for personal projects and used it several times for homework. In work, (key projects or smaller side projects) Still don't have a job :) in your side project, (github, links please) I'm creating a parasitic

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-28 Thread Nicholas Wilson via Digitalmars-d
On Friday, 28 July 2017 at 21:47:32 UTC, Jesse Phillips wrote: On Thursday, 27 July 2017 at 14:44:23 UTC, Mike Parker wrote: DIP 1012 is titled "Attributes". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md Thanks in advance to all who participate. Destroy! My primary points * Don'

Re: How do you use D?

2017-07-28 Thread Gerald via Digitalmars-d
How do you use D? I use D for building GTK applications, my current project is an open source Linux terminal emulator called Tilix (https://github.com/gnunn1/tilix) In work, (key projects or smaller side projects) Side projects only. Did you introduce D to your work place? How? What cha

Re: [OT] Generative C++

2017-07-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 July 2017 at 22:12:32 UTC, Kagamin wrote: On Friday, 28 July 2017 at 15:41:28 UTC, 12345swordy wrote: ... That's not what I consider to be "simple" (Hard to read IMO). struct DblRep { mixin(bitfieldString([ BitFieldDesc(Type.Ulong, "fraction", 23), BitFieldDesc(Type.Ush

Re: [OT] Generative C++

2017-07-28 Thread Kagamin via Digitalmars-d
On Friday, 28 July 2017 at 15:41:28 UTC, 12345swordy wrote: ... That's not what I consider to be "simple" (Hard to read IMO). struct DblRep { mixin(bitfieldString([ BitFieldDesc(Type.Ulong, "fraction", 23), BitFieldDesc(Type.Ushort, "exponent", 8), BitFieldDesc(Type.Bool, "sign",

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-28 Thread Jesse Phillips via Digitalmars-d
On Thursday, 27 July 2017 at 14:44:23 UTC, Mike Parker wrote: DIP 1012 is titled "Attributes". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md Thanks in advance to all who participate. Destroy! My primary points * Don't formally deprecate the keywords, there is not enough justific

Re: [OT] Generative C++

2017-07-28 Thread Kagamin via Digitalmars-d
On Friday, 28 July 2017 at 07:49:02 UTC, Yuxuan Shui wrote: Someone made an interesting proposal to C++: https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf Thoughts? Looks like a hybrid between imperative and declarative macros. It's natural for C++ to add lots of syntax, but declara

Re: How do you use D?

2017-07-28 Thread bachmeier via Digitalmars-d
On Friday, 28 July 2017 at 14:58:01 UTC, Ali wrote: How do you use D? I'm an economics professor. A lot of my work requires simulations and other tasks for which a slow language just won't work. I need good integration with C and the ability to call my programs from other languages. D is a

Re: How do you use D?

2017-07-28 Thread Anton Fediushin via Digitalmars-d
On Friday, 28 July 2017 at 18:48:25 UTC, Ali Çehreli wrote: On 07/28/2017 11:02 AM, Anton Fediushin wrote: > not with Go/Rust. They're good programming languages I really don't want to be in a position to diss other languages but with some experience, I can tell you that I agree with blog po

Re: How do you use D?

2017-07-28 Thread ketmar via Digitalmars-d
Ali wrote: How do you use D? ZX Spectrum emulator. Q2-like gfx engine. alot of 2d platformers, based on dynamic AABB trees tech. Secret Project of porting FPC platformer engine to D. highload TCP server. coding *all* my projects exclusively in D for at least 2.5 years now. converted some C

Re: [OT] Generative C++

2017-07-28 Thread 12345swordy via Digitalmars-d
On Friday, 28 July 2017 at 18:24:02 UTC, H. S. Teoh wrote: On Fri, Jul 28, 2017 at 05:38:10PM +, Stefan Koch via Digitalmars-d wrote: [...] Not necessarily. Perhaps "IR" is the wrong term to use, as in compiler parlance it means something very close to machine code, but the idea is that

Re: How do you use D?

2017-07-28 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 28 July 2017 at 14:58:01 UTC, Ali wrote: How do you use D? I use it for everything I can. In the past, I have used it for work as my main job on web apps, though right now my work usage of D is limited to helper apps (it has a legacy ruby on rails codebase I am forced to work with

Re: [OT] Generative C++

2017-07-28 Thread Jacob Carlborg via Digitalmars-d
On 2017-07-28 09:49, Yuxuan Shui wrote: Someone made an interesting proposal to C++: https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf Thoughts? Since no one else has mentioned it yet, I'm going to: it looks suspiciously like AST macros :). -- /Jacob Carlborg

Re: How do you use D?

2017-07-28 Thread Ali Çehreli via Digitalmars-d
On 07/28/2017 11:02 AM, Anton Fediushin wrote: > not with Go/Rust. They're good programming languages I really don't want to be in a position to diss other languages but with some experience, I can tell you that I agree with blog posts about Go being a disservice to programmers.[1] It is a go

Re: [OT] Generative C++

2017-07-28 Thread Jacob Carlborg via Digitalmars-d
On 2017-07-28 12:30, Russel Winder via Digitalmars-d wrote: This was arguably the most talked about keynote in ACCU history. I had to close the questions after 75 minutes, and even then it went on longer. Quite unfortunate that the questions did not appear in the video. -- /Jacob Carlborg

Re: [OT] Generative C++

2017-07-28 Thread H. S. Teoh via Digitalmars-d
On Fri, Jul 28, 2017 at 05:38:10PM +, Stefan Koch via Digitalmars-d wrote: > On Friday, 28 July 2017 at 17:18:35 UTC, H. S. Teoh wrote: > > > > But having a standardized IR that's available at the language level > > gives you much, much, more possibilities than merely metaclasses. > > You woul

Re: How do you use D?

2017-07-28 Thread Anton Fediushin via Digitalmars-d
On Friday, 28 July 2017 at 14:58:01 UTC, Ali wrote: How do you use D? For personal projects, from low-level system hacking (like implementing own reference counted struct) to high-level web apps. just to learn something new? (I would easily argue that learning D will make you a better C++ p

Re: [OT] Generative C++

2017-07-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 July 2017 at 17:18:35 UTC, H. S. Teoh wrote: But having a standardized IR that's available at the language level gives you much, much, more possibilities than merely metaclasses. You would be able to define foreach loops for ranges without baked-in compiler support, for example

Re: [OT] Generative C++

2017-07-28 Thread H. S. Teoh via Digitalmars-d
On Fri, Jul 28, 2017 at 07:49:02AM +, Yuxuan Shui via Digitalmars-d wrote: > Someone made an interesting proposal to C++: > https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf > > Thoughts? This is very interesting, both as a subject in and of itself, and also in terms of the enthusias

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 July 2017 at 16:44:24 UTC, MysticZach wrote: On Friday, 28 July 2017 at 11:04:23 UTC, Nick Treleaven wrote: One option to solve the out contract ambiguity and aid parsing by tools is to require 'do' after out contract expressions. It allows the syntax `out(expression) do {...}`, e

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-28 Thread MysticZach via Digitalmars-d
On Friday, 28 July 2017 at 11:04:23 UTC, Nick Treleaven wrote: One option to solve the out contract ambiguity and aid parsing by tools is to require 'do' after out contract expressions. It allows the syntax `out(expression) do {...}`, even when expression is a single identifier that should be i

Re: [OT] Generative C++

2017-07-28 Thread 12345swordy via Digitalmars-d
On Friday, 28 July 2017 at 16:04:00 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 15:41:28 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 15:12:29 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 15:09:32 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 14:46:46 UTC, Stefan Koch w

Re: newCTFE Status July 2017

2017-07-28 Thread Stefan Koch via Digitalmars-d
On Thursday, 13 July 2017 at 12:45:19 UTC, Stefan Koch wrote: [ ... ] Hi Guys I just fixed another bug that had me puzzled for a while. The following function ulong swap(ulong val) { ulong result; result |= (val & 0xFF) << 56; result |= (val & 0xFF00) << 40; result

Re: How do you use D?

2017-07-28 Thread ketmar via Digitalmars-d
Ali wrote: So How do you use D? mostly by invoking dmd or rdmd.

Re: How do you use D?

2017-07-28 Thread Moritz Maxeiner via Digitalmars-d
On Friday, 28 July 2017 at 14:58:01 UTC, Ali wrote: While the Orgs using D page is very nice ... I hoping to hear more personal stories ... So How do you use D? Privately whenever I need a program for something and D is the right tool for the job. in your side project, (github, links ple

Re: [OT] Generative C++

2017-07-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 July 2017 at 15:41:28 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 15:12:29 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 15:09:32 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 14:46:46 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 14:39:04 UTC, 12345swordy w

Re: [OT] Generative C++

2017-07-28 Thread 12345swordy via Digitalmars-d
On Friday, 28 July 2017 at 15:12:29 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 15:09:32 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 14:46:46 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 14:39:04 UTC, 12345swordy wrote: [...] Yes we can do that with mixins __traits and ct

Re: [OT] Generative C++

2017-07-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 July 2017 at 15:09:32 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 14:46:46 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 14:39:04 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 07:49:02 UTC, Yuxuan Shui wrote: Someone made an interesting proposal to C++: https://h

Re: [OT] Generative C++

2017-07-28 Thread 12345swordy via Digitalmars-d
On Friday, 28 July 2017 at 14:46:46 UTC, Stefan Koch wrote: On Friday, 28 July 2017 at 14:39:04 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 07:49:02 UTC, Yuxuan Shui wrote: Someone made an interesting proposal to C++: https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf Thoughts?

How do you use D?

2017-07-28 Thread Ali via Digitalmars-d
While the Orgs using D page is very nice ... I hoping to hear more personal stories ... So How do you use D? In work, (key projects or smaller side projects) in your side project, (github, links please) just to learn something new? (I would easily argue that learning D will make you a better C

Re: [OT] Generative C++

2017-07-28 Thread Stefan Koch via Digitalmars-d
On Friday, 28 July 2017 at 14:39:04 UTC, 12345swordy wrote: On Friday, 28 July 2017 at 07:49:02 UTC, Yuxuan Shui wrote: Someone made an interesting proposal to C++: https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf Thoughts? Can D achieve this "metaclasses" using templates and mixin

Re: [OT] Generative C++

2017-07-28 Thread 12345swordy via Digitalmars-d
On Friday, 28 July 2017 at 07:49:02 UTC, Yuxuan Shui wrote: Someone made an interesting proposal to C++: https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf Thoughts? Can D achieve this "metaclasses" using templates and mixins? I not familiar of any features that D can use to enforced

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-28 Thread Timon Gehr via Digitalmars-d
On 28.07.2017 13:04, Nick Treleaven wrote: On Friday, 21 July 2017 at 13:51:05 UTC, Mike Parker wrote: DIP 1009 is titled "Improve Contract Usability". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1009.md I think the proposed in/out expression contracts should require pure expressions.

Re: all OS functions should be "nothrow @trusted @nogc"

2017-07-28 Thread Grander via Digitalmars-d
On Friday, 28 July 2017 at 12:40:06 UTC, Kagamin wrote: On Wednesday, 26 July 2017 at 17:48:21 UTC, Walter Bright wrote: On 7/26/2017 6:29 AM, Kagamin wrote: Should we still try to mark them safe at all? Marking ones that are safe with @safe is fine. OS APIs pretty much never change. New t

Re: all OS functions should be "nothrow @trusted @nogc"

2017-07-28 Thread Kagamin via Digitalmars-d
On Wednesday, 26 July 2017 at 17:48:21 UTC, Walter Bright wrote: On 7/26/2017 6:29 AM, Kagamin wrote: Should we still try to mark them safe at all? Marking ones that are safe with @safe is fine. OS APIs pretty much never change. New technologies and new features get introduced over time: 64

Re: An Issue I Wish To Raise Awareness On

2017-07-28 Thread Kagamin via Digitalmars-d
On Tuesday, 25 July 2017 at 19:22:11 UTC, Marco Leise wrote: I understand that you apply D keywords to C types in a best fit fashion, to get some errors from the compiler when you use them in the wrong context. It should work alright in some APIs (maybe you can show me an example). I currently

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-28 Thread Nicholas Wilson via Digitalmars-d
On Friday, 28 July 2017 at 11:45:21 UTC, Nick Treleaven wrote: On Friday, 28 July 2017 at 01:50:24 UTC, Jonathan M Davis wrote: Should public have @ on it? Should static have @ on it? What about scope, const, or shared? If they are storage classes, they shouldn't have @. If they are statement

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-28 Thread Nick Treleaven via Digitalmars-d
On Friday, 28 July 2017 at 01:50:24 UTC, Jonathan M Davis wrote: Should public have @ on it? Should static have @ on it? What about scope, const, or shared? If they are storage classes, they shouldn't have @. If they are statement or expression keywords, they shouldn't have @. Things like tha

Re: DIP 1009--Improve Contract Usability--Preliminary Review Round 2 Begins

2017-07-28 Thread Nick Treleaven via Digitalmars-d
On Friday, 21 July 2017 at 13:51:05 UTC, Mike Parker wrote: DIP 1009 is titled "Improve Contract Usability". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1009.md I think the proposed in/out expression contracts should require pure expressions. In the rare case that impurity is required,

Re: [OT] Generative C++

2017-07-28 Thread Russel Winder via Digitalmars-d
On Fri, 2017-07-28 at 07:49 +, Yuxuan Shui via Digitalmars-d wrote: > Someone made an interesting proposal to C++:  > https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf > > Thoughts? Herb did the closing keynote at ACCU 2017 on this, the video just had the embargo released. See https:

Re: [your code here] Pure RPN calculator

2017-07-28 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 26 July 2017 at 09:45:07 UTC, Timon Gehr wrote: import std.stdio,std.string,std.algorithm,std.conv; void main(){ readln.split.fold!((stack,op){ switch(op){ static foreach(c;"+-*/") case [c]: return stack[0..$-2]~mixin("stack[$-2] "~c~" stack[

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-28 Thread Olivier FAURE via Digitalmars-d
On Friday, 28 July 2017 at 01:30:28 UTC, sarn wrote: To be totally honest, as it stands it feels like architecture astronautics: https://www.joelonsoftware.com/2001/04/21/dont-let-architecture-astronauts-scare-you/ Yeah, I think you nailed it. This DIP does seem to come from a 'what is the sm

Re: @safe and null dereferencing

2017-07-28 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 27 July 2017 at 23:52:27 UTC, H. S. Teoh wrote: On Thu, Jul 27, 2017 at 09:32:12PM +, Moritz Maxeiner via Digitalmars-d wrote: [...] Yes, and therefore "you already have much bigger things to worry about than D services hanging". That you're ignorant of the compromise does

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-28 Thread vit via Digitalmars-d
On Friday, 28 July 2017 at 07:50:43 UTC, Daniel N wrote: On Thursday, 27 July 2017 at 14:44:23 UTC, Mike Parker wrote: DIP 1012 is titled "Attributes". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md All review-related feedback on and discussion of the DIP should occur in this threa

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-28 Thread Daniel N via Digitalmars-d
On Thursday, 27 July 2017 at 14:44:23 UTC, Mike Parker wrote: DIP 1012 is titled "Attributes". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on August 10

[OT] Generative C++

2017-07-28 Thread Yuxuan Shui via Digitalmars-d
Someone made an interesting proposal to C++: https://herbsutter.files.wordpress.com/2017/07/p0707r1.pdf Thoughts?