Re: Temporary @trusted scope

2018-12-18 Thread rikki cattermole via Digitalmars-d-learn
On 19/12/2018 1:34 AM, Per Nordlöw wrote: On Tuesday, 18 December 2018 at 10:42:51 UTC, Jonathan M Davis wrote: Unfortunately, D does not currently have a way to do that. Only functions can be marked with @trusted. However, the typical approach to this problem is to use a lambda, which is more

Re: is(ElementType!(char[2]) == dchar - why?

2018-12-11 Thread rikki cattermole via Digitalmars-d-learn
On 12/12/2018 6:51 AM, Denis Feklushkin wrote: import std.stdio; import std.range.primitives; void main() {     writeln(     typeid(ElementType!(char[2]))     );     static assert(is(ElementType!(char[2]) == dchar)); // why? } ? https://run.dlang.io/is/Q74yHm Because docs:

Re: Writing Program Without main Function

2018-12-07 Thread rikki cattermole via Digitalmars-d-learn
There is always a main function. It doesn't matter in which module its in or language. It just has to exist.

Re: Imports and Subfolders and Links (Oh, My!)

2018-12-07 Thread rikki cattermole via Digitalmars-d-learn
On 08/12/2018 6:41 AM, Ron Tarrant wrote: Does D have the concept of makefiles? I haven't run across any reference to such things so far. Make isn't a D specification application (it doesn't really specialize in any language) dmd, druntime and Phobos are all built using it. Though for user

Re: Liran Zvibel of WekaIO on using D to Create the World’s Fastest File System

2018-12-05 Thread rikki cattermole via Digitalmars-d-announce
On 06/12/2018 12:35 PM, aliak wrote: On Wednesday, 5 December 2018 at 23:18:12 UTC, rikki cattermole wrote: On 06/12/2018 10:18 AM, aliak wrote: "Weka is a name of a Machine learning product from New Zealand. Weka is the company that produced Lord of the Rings here in NZ. *Weta. Bless

Re: Liran Zvibel of WekaIO on using D to Create the World’s Fastest File System

2018-12-05 Thread rikki cattermole via Digitalmars-d-announce
On 06/12/2018 10:18 AM, aliak wrote: "Weka is a name of a Machine learning product from New Zealand. Weka is the company that produced Lord of the Rings here in NZ. It is also a bird! (which makes WekaIO's name a bit weird). http://nzbirdsonline.org.nz/species/weka

Re: How to pass -J switch to compiler via DUB?

2018-11-30 Thread rikki cattermole via Digitalmars-d-learn
On 01/12/2018 12:05 AM, Andrey wrote: Hi, How to pass -J switch to compiler via DUB? I want to import some text file at compile time: string data = import("vertex.glsl"); In dub.json: "dflags": [     "-J=vertex.glsl" ] The file itself is located on the same level as "dub.json".

Re: Profiling DMD's Compilation Time with dmdprof

2018-11-17 Thread rikki cattermole via Digitalmars-d-announce
On 18/11/2018 1:29 AM, welkam wrote: I just updated DMD on my windows and tried to compile hello world. It took 7.4 sec. Something is not right. Can anyone reproduce? On the same mashine running linux it compiles and runs in 0.1 sec PS C:\Users\Welkam\Desktop\Projects> Measure-Command {dmd

Re: Writing Postgresql extension in D

2018-11-15 Thread rikki cattermole via Digitalmars-d-learn
On 16/11/2018 3:18 PM, Ranjan wrote: On Thursday, 15 November 2018 at 17:03:55 UTC, Andrea Fontana wrote: On Thursday, 15 November 2018 at 13:05:59 UTC, Ranjan wrote: This is my first time on the Dlang forum. I like the language but my usecase is a bit different. I want to write Postgresql

Re: DMD backend now in D

2018-11-12 Thread rikki cattermole via Digitalmars-d-announce
On 13/11/2018 12:12 AM, Jacob Carlborg wrote: On 2018-11-12 03:37, Walter Bright wrote: On 11/11/2018 3:58 PM, Mike Franklin wrote: This is a significant milestone.  Congratulations, Walter! Many people helped out with this, too. There are still a few .c files in

Re: Creating InputRanges from strings, files etc.

2018-11-08 Thread rikki cattermole via Digitalmars-d-learn
On 09/11/2018 2:58 AM, Vinay Sajip wrote: Excuse my ignorance, but from looking at the documentation on std.range and a quick skim of the guides mentioned there near the top, I can't see what the simple way is of creating an InputRange!(ubyte) from strings, files etc. I would have expected to

Re: Profiling DMD's Compilation Time with dmdprof

2018-11-07 Thread rikki cattermole via Digitalmars-d-announce
On 08/11/2018 4:17 AM, Neia Neutuladh wrote: On Thu, 08 Nov 2018 01:49:49 +1300, rikki cattermole wrote: On 08/11/2018 1:46 AM, Patrick Schluter wrote: Now that the compiler is completely in D, wouldn't it be a good idea to activate the GC in the compiler. I know that it requires some care for

Re: Profiling DMD's Compilation Time with dmdprof

2018-11-07 Thread rikki cattermole via Digitalmars-d-announce
On 08/11/2018 1:46 AM, Patrick Schluter wrote: Now that the compiler is completely in D, wouldn't it be a good idea to activate the GC in the compiler. I know that it requires some care for bootstrapping the compiler when there are dependencies to the D runtime, but the compiler would be an

Re: Wed Oct 17 - Avoiding Code Smells by Walter Bright

2018-10-31 Thread rikki cattermole via Digitalmars-d-announce
On 01/11/2018 2:42 AM, Stanislav Blinov wrote: Well, yes, it can be a litmus test, I guess. I meant to say that it isn't per se a deciding factor. It is a deciding factor for me. Because it seems to be almost always correct. As I said, my rules are stricter than what most people have. My

Re: Wed Oct 17 - Avoiding Code Smells by Walter Bright

2018-10-31 Thread rikki cattermole via Digitalmars-d-announce
On 01/11/2018 2:35 AM, 12345swordy wrote: On Wednesday, 31 October 2018 at 13:28:54 UTC, rikki cattermole wrote: On 01/11/2018 2:25 AM, 12345swordy wrote: On Wednesday, 31 October 2018 at 13:22:28 UTC, rikki cattermole wrote: On 01/11/2018 2:16 AM, 12345swordy wrote: [...] We have been

Re: Wed Oct 17 - Avoiding Code Smells by Walter Bright

2018-10-31 Thread rikki cattermole via Digitalmars-d-announce
On 01/11/2018 2:33 AM, Stanislav Blinov wrote: On Wednesday, 31 October 2018 at 13:28:54 UTC, rikki cattermole wrote: But at the end of the day, it just depends on the scope of the module. Is it getting to large? If so, split. Yup. LOC aren't a particulalry informative metric. Documentation,

Re: Wed Oct 17 - Avoiding Code Smells by Walter Bright

2018-10-31 Thread rikki cattermole via Digitalmars-d-announce
On 01/11/2018 2:25 AM, 12345swordy wrote: On Wednesday, 31 October 2018 at 13:22:28 UTC, rikki cattermole wrote: On 01/11/2018 2:16 AM, 12345swordy wrote: On Wednesday, 31 October 2018 at 05:42:26 UTC, Nicholas Wilson wrote: Running into such problems is a sign that your module is too large,

Re: Wed Oct 17 - Avoiding Code Smells by Walter Bright

2018-10-31 Thread rikki cattermole via Digitalmars-d-announce
On 01/11/2018 2:16 AM, 12345swordy wrote: On Wednesday, 31 October 2018 at 05:42:26 UTC, Nicholas Wilson wrote: Running into such problems is a sign that your module is too large, and should become a package. I seen modules with more then thousand lines of code in the Phobos library. What

Re: expanding variadic into format

2018-10-31 Thread rikki cattermole via Digitalmars-d-learn
On 01/11/2018 1:08 AM, Codifies wrote: On Wednesday, 31 October 2018 at 11:56:31 UTC, rikki cattermole wrote: On 01/11/2018 12:53 AM, Codifies wrote: [...] Just to confirm, format there is std.format:format right? Because that isn't using C variadics, its using template variadics. thought

Re: expanding variadic into format

2018-10-31 Thread rikki cattermole via Digitalmars-d-learn
On 01/11/2018 12:53 AM, Codifies wrote: I have a routine that was happily printing ASCII strings and values using opengl, however I want to improve it so it can be used in the same manner as some other languages printf function... void printValue(Font fnt,float x, float y, string frmt, ...) {

Re: Add D front-end, libphobos library, and D2 testsuite... to GCC

2018-10-29 Thread rikki cattermole via Digitalmars-d-announce
On 30/10/2018 10:47 AM, Walter Bright wrote: On 10/28/2018 8:43 PM, Mike Parker wrote: Congratulations are in order for Iain Buclaw. His efforts have been rewarded in a big way. I think that's an understatement. It's a massive achievement by Iain, and he did it pretty much all on his own.

Re: link errors when using extern (C) structs

2018-10-28 Thread rikki cattermole via Digitalmars-d-learn
On 28/10/2018 11:11 PM, DanielG wrote: Wait, wut? Do modules that get pulled in from dub's "importPaths" not get compiled in the same way? No. They just get -I'd.

Re: getting Win32 Messagebox to work

2018-10-26 Thread rikki cattermole via Digitalmars-d-learn
On 27/10/2018 1:46 AM, Mark Moorhen wrote: On Friday, 26 October 2018 at 12:39:13 UTC, rikki cattermole wrote: On 27/10/2018 1:36 AM, Mark Moorhen wrote: [...] alias string = immutable(char)[]; A slice (string in this case) is a length + pointer pair. You need to add .ptr on content with a

Re: getting Win32 Messagebox to work

2018-10-26 Thread rikki cattermole via Digitalmars-d-learn
On 27/10/2018 1:36 AM, Mark Moorhen wrote: Hi, I've recently started looking into D, and I'm afraid i'm gonna need some support to get me going. I work mostly on Windows, so i've downloaded the examples from "https://github.com/AndrejMitrovic/DWinProgramming;. Only these examples do not

Re: shared - i need it to be useful

2018-10-22 Thread rikki cattermole via Digitalmars-d
On 22/10/2018 10:28 PM, Walter Bright wrote: On 10/22/2018 1:34 AM, Manu wrote: I posted it, twice... 2 messages, back to back, and you're responding to this one, and not that one. I'll post it again... Posting it over and over is illustrative of the failure of posting proposal documents to

Re: shared - i need it to be useful

2018-10-21 Thread rikki cattermole via Digitalmars-d
On 21/10/2018 10:41 PM, Manu wrote: On Sun., 21 Oct. 2018, 2:05 am Walter Bright via Digitalmars-d, mailto:digitalmars-d@puremagic.com>> wrote: On 10/20/2018 11:30 AM, Manu wrote: > You can write an invalid program in any imaginable number of ways; > that's just not an

Re: Just found this debugger...

2018-10-20 Thread rikki cattermole via Digitalmars-d
On 21/10/2018 5:59 PM, solidstate1991 wrote: On Wednesday, 3 October 2018 at 13:08:50 UTC, Vladimir Panteleev wrote: On Wednesday, 3 October 2018 at 03:25:04 UTC, solidstate1991 wrote: and I don't want to go back to VisualD after VSCode for either a usable mago or VS native debug. Visual

Re: Can opApply be made @nogc?

2018-10-19 Thread rikki cattermole via Digitalmars-d-learn
On 20/10/2018 12:32 PM, solidstate1991 wrote: Since it's a bit difficult to make tree traversal through range (especially if someone wants to make it @nogc), I thought I'll make it through opApply override, however the delegate passed by it doesn't have the @nogc attribute, which would

Re: shared - i need it to be useful

2018-10-19 Thread rikki cattermole via Digitalmars-d
On 20/10/2018 2:07 AM, Dominikus Dittes Scherkl wrote: This document provide no reasoning about what usecases it supports: It was a basic idea of mine... It was never meant to be PR'd.

Re: shared - i need it to be useful

2018-10-19 Thread rikki cattermole via Digitalmars-d
On 19/10/2018 9:02 PM, Walter Bright wrote: On 10/17/2018 4:29 AM, jmh530 wrote: Isn't that also true for isolated data (data that only allows one alias)? That's colloquially called "unique" data. And yes, it is also true for that. That's why casting the return value of malloc() to 'shared'

Re: shared - i need it to be useful

2018-10-19 Thread rikki cattermole via Digitalmars-d
On 19/10/2018 7:09 PM, Norm wrote: There's another way; Stanislav isn't one you need to convince so if that particular discussion is unproductive and disruptive just ignore it. I.e technical discussions should be robust but once they become personal just ignore that input and move on. Isn't

Re: Documents about ddoc? and markdown in ddoc?

2018-10-18 Thread rikki cattermole via Digitalmars-d-learn
On 18/10/2018 6:38 PM, dangbinghoo wrote: hi, Is there any other documents related about ddoc usage? the only thing I can find is:  https://dlang.org/spec/ddoc.html#using_ddoc_to_generate_examples But I found it never mentioned something like $(LI a  list item), is there a full ddoc

Re: std.digest

2018-10-17 Thread rikki cattermole via Digitalmars-d
On 17/10/2018 10:36 PM, Márcio Martins wrote: Hi! To my surprise, std.digest.MurmurHash3 doesn't work in CTFE. Would it be hard to have it explicit in the documentation if a particular Phobos symbol works in CTFE? Maybe it could be manual, and vote-based, to avoid building infrastructure

Re: ref tidy way to defreference or is something else going on ?

2018-10-16 Thread rikki cattermole via Digitalmars-d-learn
On 16/10/2018 11:36 PM, Codifies wrote: I've a bunch of 4x4 matrix routines in C, in order to avoid copying around multiple 4x4 matrices I pass pointers... I'm assuming that in D it would make sense to use ref ? what's going on behind the scenes with ref is it just a nice way of passing

Re: When does GC run?

2018-10-16 Thread rikki cattermole via Digitalmars-d-learn
On 16/10/2018 10:38 PM, John Burton wrote: Is there any documentation or information about the specifics of the garbage collector? The information I have found indicates that it runs to free memory when the system runs out of memory to allocate. But will this try to use all the system memory

Re: You don't like GC? Do you?

2018-10-13 Thread rikki cattermole via Digitalmars-d
On 14/10/2018 2:08 AM, Atila Neves wrote: "Fun" fact: it's not @safe to "new" anything in D if your program uses any classes. Thing is, it does unconditionally thanks to DRuntime. I hardly ever use classes in D, but I'd like to know more about why it's not @safe. void main() @safe { Foo

Re: D Logic bug

2018-10-11 Thread rikki cattermole via Digitalmars-d
On 12/10/2018 3:35 AM, James Japherson wrote: Took me about an hour to track this one down! A + (B == 0) ? 0 : C; D is evaluating it as (A + (B == 0)) ? 0 : C; The whole point of the parenthesis was to associate. I usually explicitly associate precisely because of this! A + ((B == 0) ? 0

Re: Can't Compile Global Semaphores?

2018-10-08 Thread rikki cattermole via Digitalmars-d-learn
On 09/10/2018 4:43 AM, Matt Richardson wrote: On Monday, 27 July 2015 at 20:57:00 UTC, Jack Stouffer wrote: On Monday, 27 July 2015 at 20:12:10 UTC, John Colvin wrote: Yes, but then core.sync.semaphore doesn't support being shared, so... Ok, so I made the code run by using __gshared instead

Re: DUB??

2018-10-06 Thread rikki cattermole via Digitalmars-d
On 07/10/2018 6:36 AM, steven kladitis wrote: what has happened to dub? 1.11 is current or so it says, but I see 1.9.x and when I click on dub in dub I get vibe errors. What has happened? 1.11.0 is current https://github.com/dlang/dub/tree/v1.11.0 for DUB I always see 500 - Internal Server

Re: Deep nesting vs early returns

2018-10-04 Thread rikki cattermole via Digitalmars-d
On 05/10/2018 8:23 AM, Nick Sabalausky (Abscissa) wrote: I was in college during the height of the Java craze, so my instructors highly recommended the deep nesting approach. This was because return statements are control-flow, and control-flow isn't very object-orientedy, and is old-fasioned

Re: Please don't do a DConf 2018, consider alternatives

2018-10-04 Thread rikki cattermole via Digitalmars-d
On 04/10/2018 8:53 PM, Iain Buclaw wrote: I went to a conference once where they had mixed live talks and prerecorded talks - questions where taken at the end to the speaker of the prerecorded talk via a sip call. The organisers at the end admitted that the prerecorded talks experiment

Re: Aurora DirectX Bindings 12.1

2018-10-03 Thread rikki cattermole via Digitalmars-d-announce
On 04/10/2018 5:33 PM, Nicholas Wilson wrote: On Thursday, 4 October 2018 at 04:03:27 UTC, rikki cattermole wrote: On 04/10/2018 2:06 PM, Adam Wilson wrote: The Aurora DirectX bindings have been updated to support Windows 10 1809. Also the D2D Effect Authoring SDK has been added. GitHub:

Re: Aurora DirectX Bindings 12.1

2018-10-03 Thread rikki cattermole via Digitalmars-d-announce
On 04/10/2018 2:06 PM, Adam Wilson wrote: The Aurora DirectX bindings have been updated to support Windows 10 1809. Also the D2D Effect Authoring SDK has been added. GitHub: https://github.com/auroragraphics/directx DUB: http://code.dlang.org/packages/aurora-directx Please send PR's if you

Re: New With Struct and Getting Class Object Pointers

2018-09-30 Thread rikki cattermole via Digitalmars-d-learn
On 30/09/2018 8:29 PM, Vijay Nayar wrote: I have two brief questions. Code that uses "new" to create struct objects appears to compile and run. Is this an actual language feature, to get structs on the heap? void main() { struct S {int data = 1;} S* s1 = new S(); S* s2 = s1;  

Re: Does the WInMain function is mandatory ?

2018-09-30 Thread rikki cattermole via Digitalmars-d-learn
On 30/09/2018 7:24 PM, Vinod K Chandran wrote: Hi, I would like to do some win api coding in D. I just taste the syntactic sugar but cant do anything more. I have few questions. 1. Does WinMain is needed for a D program in order to use win api ? No. 2. Can we use D strings in win api

Re: Warn on unused imports?

2018-09-26 Thread rikki cattermole via Digitalmars-d
On 27/09/2018 3:53 AM, Neia Neutuladh wrote: On 09/26/2018 12:39 AM, FeepingCreature wrote: On Tuesday, 25 September 2018 at 19:28:47 UTC, Jacob Carlborg wrote: The DMD compiler is available as a library. A linter tool can be based on that. Repeating it here: the library does not have

Re: Rather D1 then D2

2018-09-22 Thread rikki cattermole via Digitalmars-d
On 23/09/2018 2:31 AM, Jonathan Marler wrote: On Saturday, 22 September 2018 at 13:25:27 UTC, rikki cattermole wrote: Then D isn't the right choice for you. I think it makes for a better community if we can be more welcoming, helpful a gracious instead of responding to criticism this way.

Re: Rather D1 then D2

2018-09-22 Thread rikki cattermole via Digitalmars-d
On 23/09/2018 1:22 AM, new wrote: On Saturday, 22 September 2018 at 10:53:25 UTC, bauss wrote: On Saturday, 22 September 2018 at 09:42:48 UTC, Jonathan Marler wrote: I'd be interested to hear/read about the features that some developers don't like with D2. I'm going to guess it has to do

Re: Updating D beyond Unicode 2.0

2018-09-21 Thread rikki cattermole via Digitalmars-d
On 22/09/2018 11:17 AM, Seb wrote: In all seriousness I hate it when someone thought its funny to use the lambda symbol as an identifier and I have to copy that symbol whenever I want to use it because there's no convenient way to type it. (This is already supported in D.) This can be

Re: LLVM 7.0.0 no mention of D anymore

2018-09-19 Thread rikki cattermole via Digitalmars-d-announce
On 20/09/2018 1:10 AM, Daniel Kozak wrote: http://releases.llvm.org/7.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-7 no mention of D anymore :( http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html#external-open-source-projects-using-llvm-6

Re: extern(C++, ns) is wrong

2018-09-19 Thread rikki cattermole via Digitalmars-d
On 19/09/2018 1:49 PM, Jonathan M Davis wrote: On Tuesday, September 18, 2018 6:22:55 PM MDT Manu via Digitalmars-d wrote: On Mon, 17 Sep 2018 at 06:00, Atila Neves via Digitalmars-d wrote: On Sunday, 16 September 2018 at 17:46:26 UTC, Steven Schveighoffer wrote: On 9/14/18 6:41 PM, Neia

Re: filtered imports

2018-09-13 Thread rikki cattermole via Digitalmars-d
On 13/09/2018 11:54 PM, Jonathan Marler wrote: "Selective imports" limit the symbols imported from a module by providing a list of all the symbols to include: import std.stdio : writeln, writefln; The complement of this would be a "Filtered import", meaning, import all the symbols except the

Re: Is it's correct to say that ALL types that can grow are place on heap?

2018-09-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/09/2018 3:22 AM, Timoses wrote: On Wednesday, 12 September 2018 at 14:46:22 UTC, rikki cattermole wrote: On 13/09/2018 2:34 AM, drug wrote: 12.09.2018 15:14, Timoses пишет: On Tuesday, 11 September 2018 at 12:07:14 UTC, drug wrote: If data size is less or equal to total size of

Re: Is it's correct to say that ALL types that can grow are place on heap?

2018-09-12 Thread rikki cattermole via Digitalmars-d-learn
On 13/09/2018 2:34 AM, drug wrote: 12.09.2018 15:14, Timoses пишет: On Tuesday, 11 September 2018 at 12:07:14 UTC, drug wrote: If data size is less or equal to total size of available registers (that can be used to pass values) than passing by value is more efficient. Passing data with size

Re: Copy Constructor DIP and implementation

2018-09-11 Thread rikki cattermole via Digitalmars-d-announce
On 12/09/2018 3:08 AM, RazvanN wrote: Hello everyone, I have finished writing the last details of the copy constructor DIP[1] and also I have published the first implementation [2]. As I wrongfully made a PR for the DIP queue in the early stages of the development of the DIP, I want to

Re: Small @nogc experience report

2018-09-10 Thread rikki cattermole via Digitalmars-d
On 10/09/2018 9:11 PM, Kagamin wrote: On Saturday, 8 September 2018 at 08:32:58 UTC, Guillaume Piolat wrote: There is no other choice when the runtime is disabled but to have @nogc. It's a fantastic peace of mind for high-performance to be able to _enforce_ something will not allocate. You

Re: "immutable string" vs "const string*"

2018-09-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/09/2018 8:41 PM, Christian Mayer wrote: On Sunday, 9 September 2018 at 08:14:41 UTC, rikki cattermole wrote: Are you aware that a string is just an alias of immutable(char)[]? Yes, I'm aware of that. But it's the same, for example, with just one char. "immutable char" vs "const

Re: "immutable string" vs "const string*"

2018-09-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/09/2018 8:09 PM, Christian Mayer wrote: In regard of performance, why should I rather use "immutable string" over "const string*" (or just "string*")? For example, as a function argument. When I have a loop which calls a function with a string argument. (And to avoid function inling in

Re: Source changes should include date of change

2018-09-08 Thread rikki cattermole via Digitalmars-d
On 09/09/2018 5:43 PM, Paul Backus wrote: On Sunday, 9 September 2018 at 04:37:48 UTC, Josphe Brigmo wrote: If git would automatically do the dates then one could download the source code. Git would be the central repository and if one wanted an offline version that had enough info in it such

Re: Returning dynamic array from the function?

2018-09-08 Thread rikki cattermole via Digitalmars-d-learn
On 08/09/2018 9:46 PM, SuperPrower wrote: On Saturday, 8 September 2018 at 09:36:21 UTC, rikki cattermole wrote: We're going to need to see a minified version of the code to see what you're doing. Sure, here it is: ``` auto getBoards() { string[] boardList; auto url = baseUrl ~

Re: Returning dynamic array from the function?

2018-09-08 Thread rikki cattermole via Digitalmars-d-learn
On 08/09/2018 9:34 PM, SuperPrower wrote: I have a function that produces dynamic array of strings. I would like to return this array from this function. I understand that dynamic arrays are of reference type, and thus if I try to return array variable, I will actually return a pointer to the

Re: [vibe-d/dub] Lin

2018-09-07 Thread rikki cattermole via Digitalmars-d-learn
On 08/09/2018 4:20 AM, MamoKupe wrote: marcinan@marcinan-PC ~/Pulpit/d $ dub init bibe Package recipe format (sdl/json) [json]: d Invalid format, "d", enter either "sdl" or "json". Package recipe format (sdl/json) [json]: Name [bibe]: Description [A minimal D application.]: Author name [Marcin]:

Re: dip1000 issue

2018-09-07 Thread rikki cattermole via Digitalmars-d-learn
On 08/09/2018 2:29 AM, Orfeo wrote: ==> And why (maybe a silly question) `-dip1000` breaks  my project so badly without warning.. DIP 1000 is an experimental addition to D, that is yet to be complete. It is a compiler switch for a reason, it isn't ready for usage, only some experimentation.

Re: file io

2018-09-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/09/2018 4:17 AM, Arun Chandrasekaran wrote: On Thursday, 6 September 2018 at 16:13:42 UTC, hridyansh thakur wrote: how to read a file line by line in D std.stdio.File.byLine() Refer the doc here: https://dlang.org/library/std/stdio/file.by_line.html An example from the doc: ```

Re: linking trouble

2018-09-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/09/2018 4:03 AM, hridyansh thakur wrote: i am on windows i have tried DMD LDC and i am getting same linking error with linking my c++ object i am doing by the official tutorial (dlang spec book) here is my app.d code import std.stdio; void main() { //writeln("Edit source/app.d to

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 07/09/2018 2:30 AM, Guillaume Piolat wrote: On Thursday, 6 September 2018 at 13:30:11 UTC, Chris wrote: And autodecode is a good example of experts getting it wrong, because, you know, you cannot be an expert in all fields. I think the problem was that it was discovered too late. There

Re: Dub registry refresh

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 8:39 PM, Bastiaan Veelo wrote: On Thursday, 6 September 2018 at 08:29:03 UTC, rikki cattermole wrote: On 06/09/2018 8:22 PM, Bastiaan Veelo wrote: Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I

Re: Dub registry refresh

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 8:29 PM, rikki cattermole wrote: On 06/09/2018 8:22 PM, Bastiaan Veelo wrote: Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I can expect dub to pick that up. Thanks! It is semi-constant.

Re: Dub registry refresh

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 8:22 PM, Bastiaan Veelo wrote: Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I can expect dub to pick that up. Thanks! It is semi-constant. However if you care about it showing up sooner,

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 7:54 PM, Joakim wrote: On Thursday, 6 September 2018 at 07:23:57 UTC, Chris wrote: On Wednesday, 5 September 2018 at 22:00:27 UTC, H. S. Teoh wrote: // Seriously, people need to get over the fantasy that they can just use Unicode without understanding how Unicode works. Most

Re: Random thought: Alternative stuct

2018-09-05 Thread rikki cattermole via Digitalmars-d
On 04/09/2018 3:38 PM, Nick Sabalausky (Abscissa) wrote: We have classes and structs: Classes: - Default Storage: GC Heap - Indirection Overhead: Yes - Semantics: Reference - Passed By: Copying the Data's Address Structs: - Default Storage: Stack - Indirection Overhead: No - Semantics: Value -

Re: This is why I don't use D.

2018-09-05 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 4:19 AM, H. S. Teoh wrote: On Wed, Sep 05, 2018 at 09:34:14AM -0600, Jonathan M Davis via Digitalmars-d wrote: On Wednesday, September 5, 2018 9:28:38 AM MDT H. S. Teoh via Digitalmars-d wrote: [...] And that is why I think we should implement my idea of putting *all* dub

Re: DIP Draft Reviews

2018-09-05 Thread rikki cattermole via Digitalmars-d-announce
On 06/09/2018 2:20 AM, Nicholas Wilson wrote: On Monday, 20 August 2018 at 14:54:24 UTC, Mike Parker wrote: I'm getting ready to start prepping one of the DIPs in the PR queue for community review. It proposes adding an `in` operator for arrays. I haven't gone through it in detail yet, so I

Re: Static foreach bug?

2018-09-05 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 12:52 AM, JN wrote: On Wednesday, 5 September 2018 at 12:41:05 UTC, Andre Pany wrote: On Wednesday, 5 September 2018 at 12:05:59 UTC, rikki cattermole wrote: Indeed. scope enum would make much more sense. scope enum sounds a lot better for me than static enum or even __local.

Re: Static foreach bug?

2018-09-05 Thread rikki cattermole via Digitalmars-d
On 05/09/2018 11:39 PM, Jonathan M Davis wrote: On Wednesday, September 5, 2018 5:19:04 AM MDT Dechcaudron via Digitalmars-d wrote: On Wednesday, 5 September 2018 at 10:45:20 UTC, Jonathan M Davis wrote: Too many people already think that the point of static is to just make something be done

Re: andrei - better breakdown of statistics for downloads by region, OS, kind of site (academic/large corporate/large financial/etc)

2018-09-05 Thread rikki cattermole via Digitalmars-d
On 05/09/2018 10:19 PM, Jonathan M Davis wrote: On Wednesday, September 5, 2018 1:44:33 AM MDT Suliman via Digitalmars-d wrote: On Tuesday, 8 May 2018 at 07:54:15 UTC, Suliman wrote: Stat out of date... Plz update it. And once again plz Just FYI, responding to a thread that's several

Re: extern(C++, ns) is wrong

2018-09-05 Thread rikki cattermole via Digitalmars-d
On 05/09/2018 9:35 PM, Jonathan M Davis wrote: On Wednesday, September 5, 2018 2:30:25 AM MDT Walter Bright via Digitalmars-d wrote: On 9/4/2018 10:16 PM, Manu wrote: I'm serious, you can have your cake, and potentially, I could have my cake too, and everybody would be happy... nobody would be

Re: What changes to D would you like to pay for?

2018-09-05 Thread rikki cattermole via Digitalmars-d
On 05/09/2018 7:00 PM, Joakim wrote: The D foundation is planning to add a way for us to pay for changes we'd like to see in D and its ecosystem, rather than having to code everything we need ourselves or find and hire a D dev to do it: "[W]e’re going to add a page to the web site where we

Re: How to use listener.d example?

2018-09-04 Thread rikki cattermole via Digitalmars-d-learn
On 05/09/2018 12:10 AM, Marcin wrote: "" Am i doing it right? I've unpacked vibe.d-master to my "C:\D\dtwo\src" commands in cmd: cd C:\D\dtwo\windows\bin\ echo "vibe.d-master is a folder" dmd -lib C:\D\dtwo\src\vibe.d-master\core\vibe\appmain.d

Re: Random thought: Alternative stuct

2018-09-04 Thread rikki cattermole via Digitalmars-d
On 04/09/2018 11:47 PM, Kagamin wrote: On Tuesday, 4 September 2018 at 06:32:02 UTC, rikki cattermole wrote: If D didn't have built-in OOP features already, it'd be an interesting question, but given that it does, I think getting rid of them is a clear net-negative. You also loose loads of

Re: How to use listener.d example?

2018-09-04 Thread rikki cattermole via Digitalmars-d-learn
On 04/09/2018 10:57 PM, Marcin wrote: On Friday, 31 August 2018 at 07:38:54 UTC, Marcin wrote: https://github.com/dlang/dmd/blob/master/samples/listener.d Im using Notepad++ as my IDE cuz i dont have administrator privileges on PC Coedit is a good option since it is a simple unzip and

Re: D is dead

2018-09-04 Thread rikki cattermole via Digitalmars-d
On 04/09/2018 10:27 PM, Ecstatic Coder wrote: On Tuesday, 4 September 2018 at 09:56:13 UTC, rikki cattermole wrote: On 04/09/2018 9:40 PM, Ecstatic Coder wrote: But it seems that the latest version of "std.file.copy" now completely ignores the "PreserveAttributes.no" argument on Windows,

Re: D is dead

2018-09-04 Thread rikki cattermole via Digitalmars-d
On 04/09/2018 9:40 PM, Ecstatic Coder wrote: But it seems that the latest version of "std.file.copy" now completely ignores the "PreserveAttributes.no" argument on Windows, which made recent Windows builds of Resync fail on read-only files. What??? There is nothing in the changelog between

Re: Random thought: Alternative stuct

2018-09-04 Thread rikki cattermole via Digitalmars-d
On 04/09/2018 4:24 PM, Paul Backus wrote: On Tuesday, 4 September 2018 at 04:03:19 UTC, Mike Franklin wrote: There are also a few additional differences.  classes can inherit implementations, but using the technique illustrated in

Re: Load entire file, as a char array.

2018-09-03 Thread rikki cattermole via Digitalmars-d-learn
On 03/09/2018 7:38 PM, Chris Katko wrote: On Monday, 3 September 2018 at 06:28:38 UTC, bauss wrote: On Monday, 3 September 2018 at 06:25:23 UTC, bauss wrote: On Monday, 3 September 2018 at 03:19:39 UTC, Neia Neutuladh wrote: On Monday, 3 September 2018 at 03:04:57 UTC, Chris Katko wrote: This

Re: [OT] college

2018-09-03 Thread rikki cattermole via Digitalmars-d
On 03/09/2018 7:05 PM, Joakim wrote: One of the root causes of that dysfunction is there's way too much software written. Open source has actually helped alleviate this, because instead of every embedded or server developer who needs an OS kernel convincing management that they should write

Re: Example of using C API from D?

2018-09-02 Thread rikki cattermole via Digitalmars-d-learn
On 03/09/2018 5:07 AM, Russel Winder wrote: On Mon, 2018-09-03 at 01:00 +1200, rikki cattermole via Digitalmars-d- learn wrote: […] You don't need to create a complete binding for something to use a subset of it. True, but all too often you find there are so many interdependencies of names

Re: Example of using C API from D?

2018-09-02 Thread rikki cattermole via Digitalmars-d-learn
On 03/09/2018 12:52 AM, Russel Winder wrote: I am rewriting a C++ program in D, but need to access a C library that has no D binding: this is a GtkD based program which has a Pango binding, but Pango doesn't offer the information I need, that is hidden in the underlying Fontconfig C API. I

Re: This thread on Hacker News terrifies me

2018-09-01 Thread rikki cattermole via Digitalmars-d
On 02/09/2018 1:15 AM, Jonathan M Davis wrote: On Saturday, September 1, 2018 6:46:38 AM MDT rikki cattermole via Digitalmars-d wrote: On 02/09/2018 12:21 AM, tide wrote: On Saturday, 1 September 2018 at 05:53:12 UTC, rikki cattermole wrote: On 01/09/2018 12:40 PM, tide wrote: On Friday, 31

Re: This thread on Hacker News terrifies me

2018-09-01 Thread rikki cattermole via Digitalmars-d
On 02/09/2018 12:57 AM, tide wrote: On Saturday, 1 September 2018 at 12:49:12 UTC, rikki cattermole wrote: On 02/09/2018 12:37 AM, tide wrote: On Saturday, 1 September 2018 at 08:18:03 UTC, Walter Bright wrote: On 8/31/2018 7:28 PM, tide wrote: I'm just wondering but how would you code an

Re: This thread on Hacker News terrifies me

2018-09-01 Thread rikki cattermole via Digitalmars-d
On 02/09/2018 12:21 AM, tide wrote: On Saturday, 1 September 2018 at 05:53:12 UTC, rikki cattermole wrote: On 01/09/2018 12:40 PM, tide wrote: On Friday, 31 August 2018 at 22:42:39 UTC, Walter Bright wrote: On 8/31/2018 2:40 PM, tide wrote: I don't think I've ever had a **game** hung up in a

Re: This thread on Hacker News terrifies me

2018-09-01 Thread rikki cattermole via Digitalmars-d
On 02/09/2018 12:37 AM, tide wrote: On Saturday, 1 September 2018 at 08:18:03 UTC, Walter Bright wrote: On 8/31/2018 7:28 PM, tide wrote: I'm just wondering but how would you code an assert to ensure the variable for a title bar is the correct color? Just how many asserts are you going to

Re: This thread on Hacker News terrifies me

2018-09-01 Thread rikki cattermole via Digitalmars-d
It all comes down to, not enough time to cover the material. Programming is the largest scientific field in existence. It has merged material from Physics, Chemistry, Psychology (in a BIG WAY), Biology, you name it and that ignores Mathematics. Three to four years is just scratching the

Re: This thread on Hacker News terrifies me

2018-08-31 Thread rikki cattermole via Digitalmars-d
Then there are polytechnics which I went to for my degree, where the focus was squarely on Industry and not on academia at all. But in saying that, we had third year students starting out not understanding how cli arguments work so... Proper software engineering really takes 5+ years just to

Re: This thread on Hacker News terrifies me

2018-08-31 Thread rikki cattermole via Digitalmars-d
On 01/09/2018 12:40 PM, tide wrote: On Friday, 31 August 2018 at 22:42:39 UTC, Walter Bright wrote: On 8/31/2018 2:40 PM, tide wrote: I don't think I've ever had a **game** hung up in a black screen and not be able to close it. I've had that problem with every **DVD player** I've had in the

Re: Engine of forum

2018-08-31 Thread rikki cattermole via Digitalmars-d
On 31/08/2018 10:16 PM, Andrey wrote: Any self-respecting website related to programming or developing something, has in its composition a place where people can comfortably and freely discuss pressing issues. Not some weird news group. Feel free to argue this for projects like the Linux

Re: splitting general into Technical and less technical

2018-08-29 Thread rikki cattermole via Digitalmars-d
On 30/08/2018 5:20 AM, Jonathan M Davis wrote: Also, dlang-study was already basically an attempt to get more focused, technical discussions separate from the main newsgroup, and it didn't work. It wasn't as simple as posting to D.General. It required subscription (based upon what I did) and

Re: Go 2 draft

2018-08-29 Thread rikki cattermole via Digitalmars-d
On 29/08/2018 7:03 PM, JN wrote: Found this interesting link on proggit - https://go.googlesource.com/proposal/+/master/design/go2draft.md D is mentioned in the generics part: https://go.googlesource.com/proposal/+/master/design/go2draft-generics-overview.md I like their design for

Re: std.encoding:2554 - Unrecognized Encoding: big5 - Please help!

2018-08-28 Thread rikki cattermole via Digitalmars-d
We have a reasonably number (but quiet) Chinese user base, we should really support big5 and its extensions out-right.

Re: std.encoding:2554 - Unrecognized Encoding: big5 - Please help!

2018-08-28 Thread rikki cattermole via Digitalmars-d
https://github.com/dlang/phobos/blob/master/std/net/curl.d#L1197 get!ubyte will disable encoding.

<    1   2   3   4   5   6   7   8   9   10   >