Re: DlangIDE v0.8.0 released

2017-09-26 Thread puming via Digitalmars-d-announce
On Tuesday, 26 September 2017 at 15:20:54 UTC, Vadim Lopatin wrote: New DlangIDE version is released. Prebuilt win32 binaries are available on https://github.com/buggins/dlangide/releases Milestone 0.8 is reached. List of 56 issues closed in this milestone:

Re: code.dlang.org internal server error

2017-02-09 Thread puming via Digitalmars-d
On Thursday, 9 February 2017 at 12:19:12 UTC, Daniel Kozák wrote: V Thu, 9 Feb 2017 11:54:05 +0100 Sönke Ludwig via Digitalmars-d napsáno: [...] In general issue is not with connectivity to China but with GFW (https://en.wikipedia.org/wiki/Great_Firewall), So

Re: code.dlang.org internal server error

2017-02-09 Thread puming via Digitalmars-d
On Thursday, 9 February 2017 at 10:54:05 UTC, Sönke Ludwig wrote: Am 09.02.2017 um 03:34 schrieb puming: On Wednesday, 8 February 2017 at 14:11:48 UTC, Sönke Ludwig wrote: [...] I have a VPS slot in Hong Kong for personal use, with 1GB memory, 30GB disk and 300GB monthly bandwidth. Is that

Re: code.dlang.org internal server error

2017-02-08 Thread puming via Digitalmars-d
On Wednesday, 8 February 2017 at 14:11:48 UTC, Sönke Ludwig wrote: Am 08.02.2017 um 14:29 schrieb singingbush: [...] Yes, we need to prioritize this somehow. Having a fallback mirror, coupled with dependency upgrade checks that run asynchronously would get rid of these issues. It would be

Re: Internal error on Wiki page

2017-02-08 Thread Puming via Digitalmars-d
On Wednesday, 8 February 2017 at 02:19:23 UTC, Ali Çehreli wrote: On 02/06/2017 06:43 PM, Luís Marques wrote: This page shows an error instead of displaying the Wiki content: [54c97baea4172eeabd69f522] 2017-02-06 13:47:44: Fatal

Re: Replace/Rename DWT forum with GUIs forum?

2016-10-27 Thread Puming via Digitalmars-d
On Thursday, 22 September 2016 at 05:48:42 UTC, Vadim Lopatin wrote: On Sunday, 18 September 2016 at 23:21:26 UTC, Gerald wrote: I would like to suggest that the existing DWT forum be renamed or replaced with a more generic GUIs forum. As far as I can tell, the DWT forum doesn't get much

Re: New Diet template engine almost complete, ready for comments

2016-07-26 Thread Puming via Digitalmars-d-announce
On Tuesday, 26 July 2016 at 05:54:39 UTC, Sönke Ludwig wrote: Am 26.07.2016 um 05:22 schrieb Puming: [...] A real runtime solution would require a D runtime interpreter or JIT compiler. There would be an alternative solution based on compiling each template to a shared library and then

Re: New Diet template engine almost complete, ready for comments

2016-07-25 Thread Puming via Digitalmars-d-announce
On Monday, 25 July 2016 at 09:29:38 UTC, Sönke Ludwig wrote: The Diet template language is aimed at providing a way to define procedurally generated HTML/XML pages (or other output formats), with minimal visual noise. Syntax and feature set are heavily inspired by Jade ,

Re: Blocking points for further D adoption

2016-07-06 Thread Puming via Digitalmars-d
On Friday, 1 July 2016 at 00:08:51 UTC, dalailambda wrote: On Thursday, 30 June 2016 at 23:48:29 UTC, Mike Parker wrote: DMD *is* the official compiler. That's what a reference compiler is. The other compilers are there for those who want them and are developed independently of DMD. It's no

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Puming via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 17:21:58 UTC, Jon D wrote: On Wednesday, 13 April 2016 at 17:01:33 UTC, Dicebot wrote: On Wednesday, 13 April 2016 at 16:34:16 UTC, Jon D wrote: [...] You don't need to put anything on path to run utils from dub packages. `dub run` will take care of setting

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Puming via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 16:34:16 UTC, Jon D wrote: Thanks Rory, Puming. I'll look into this and see how best to make it fit. I'm realizing also there's one additional capability it'd be nice to have in dub for tools like this, which in an option to install the executables somewhere

Re: Command line utilities for tab-separated value files

2016-04-12 Thread Puming via Digitalmars-d-announce
On Tuesday, 12 April 2016 at 07:17:05 UTC, Jon D wrote: On Tuesday, 12 April 2016 at 06:22:55 UTC, Puming wrote: On Tuesday, 12 April 2016 at 00:50:24 UTC, Jon D wrote: Hi all, I've open sourced a set of command line utilities for manipulating tab-separated value files. They are

Re: Command line utilities for tab-separated value files

2016-04-12 Thread Puming via Digitalmars-d-announce
On Tuesday, 12 April 2016 at 00:50:24 UTC, Jon D wrote: Hi all, I've open sourced a set of command line utilities for manipulating tab-separated value files. They are complementary to traditional unix tools like cut, grep, etc. They're useful for manipulating large data files. I use them

Re: execute bash?

2016-04-10 Thread Puming via Digitalmars-d-learn
On Sunday, 10 April 2016 at 10:43:48 UTC, wobbles wrote: This would be cool. I'll have a think about how to go about it! Looking forward to your updates! :P

Re: execute bash?

2016-04-10 Thread Puming via Digitalmars-d-learn
On Sunday, 10 April 2016 at 02:59:41 UTC, Adam D. Ruppe wrote: On Sunday, 10 April 2016 at 00:47:28 UTC, Puming wrote: 3. when hiting 'vim a.file' on the command, things go messy. Have you got these interactive commands work in dexpect? It is surely capturing exactly what vim sends to a

Re: execute bash?

2016-04-09 Thread Puming via Digitalmars-d-learn
On Saturday, 9 April 2016 at 08:56:17 UTC, wobbles wrote: On Friday, 8 April 2016 at 23:06:06 UTC, Puming wrote: On Friday, 8 April 2016 at 18:23:32 UTC, wobbles wrote: On Friday, 8 April 2016 at 16:07:13 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 15:20:09 UTC, Puming wrote: I tried

Re: execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 16:16:27 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 15:31:13 UTC, Puming wrote: The D version behavior is strange. Are you still calling bash? Cuz that is going to complicate things a lot because bash does its own signal handling too and could be

Re: execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 18:23:32 UTC, wobbles wrote: On Friday, 8 April 2016 at 16:07:13 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 15:20:09 UTC, Puming wrote: I tried with signal, but didn't catch SIGTTOU, it seems that spawnProcess with `bash -i -c` will signal with SIGTTIN.

Re: execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 16:08:02 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 14:09:16 UTC, Puming wrote: I just found that you have terminal.d in arsd repo, are you writing a repl with it? I'm hoping I might be able to use it. I have done it before. terminal.d has a getline

Re: execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 16:07:13 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 15:20:09 UTC, Puming wrote: I tried with signal, but didn't catch SIGTTOU, it seems that spawnProcess with `bash -i -c` will signal with SIGTTIN. Oh, surely because it wants to be interactive and is thus

Re: execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 13:25:37 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 13:23:10 UTC, Adam D. Ruppe wrote: Odds are it is that there's terminal output for the background process NOT a character btw, just any output, then the OS puts you on hold so it can do its thing. To

Re: execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 13:25:37 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 13:23:10 UTC, Adam D. Ruppe wrote: Odds are it is that there's terminal output for the background process NOT a character btw, just any output, then the OS puts you on hold so it can do its thing. To

Re: execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 13:23:10 UTC, Adam D. Ruppe wrote: On Friday, 8 April 2016 at 10:08:07 UTC, Puming wrote: but with each command loop, the program is stopped (equal to Ctrl-Z). Your program is stopped, right? Odds are it is that there's terminal output for the background process,

execute bash?

2016-04-08 Thread Puming via Digitalmars-d-learn
Hi, I'd like to write an interactive commmand line tool for my commands, and that also support bash commands. My first thinking is 'why not just execute those bash commands with bash'? But it turns out to have some problem. When I use executeShell, I found that .bashrc is not loaded so

Re: is std.algorithm.joiner lazy?

2016-04-08 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 08:44:36 UTC, Mike Parker wrote: On Friday, 8 April 2016 at 03:20:53 UTC, Puming wrote: On Friday, 8 April 2016 at 02:49:01 UTC, Jonathan M Davis wrote: [...] Thanks. I'll adopt this idiom. Hopefully it gets used often enough to warrent a phobos function :-)

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 02:49:01 UTC, Jonathan M Davis wrote: [...] Thanks. I'll adopt this idiom. Hopefully it gets used often enough to warrent a phobos function :-)

Re: how to parse a string into a phobos datatype with additional logic

2016-04-07 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 11:07:35 UTC, Marc Schütz wrote: On Thursday, 7 April 2016 at 08:06:03 UTC, Puming wrote: On Thursday, 7 April 2016 at 07:45:06 UTC, yawniek wrote: what is the way one is supposed to parse e.g. a double of unixtime (as delived by nginx logs) into a SysTime?

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 01:14:11 UTC, Jonathan M Davis wrote: [...] Well, given your example, I would strongly argue that you should write a range that calls read in its constructor and in popFront rather (so that calling front multiple times doesn't matter) rather than using map. While

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Friday, 8 April 2016 at 01:14:11 UTC, Jonathan M Davis wrote: [...] Lazy means that it's not going to consume the entire range when you call the function. Rather, it's going to return a range that you can iterate over. It may or may not process the first element before returning,

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 18:15:07 UTC, Jonathan M Davis wrote: On Thursday, April 07, 2016 08:47:15 Puming via Digitalmars-d-learn wrote: On Thursday, 7 April 2016 at 08:27:23 UTC, Edwin van Leeuwen wrote: > On Thursday, 7 April 2016 at 08:17:38 UTC, Puming wrote: >> On Thursday

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 10:57:25 UTC, Edwin van Leeuwen wrote: On Thursday, 7 April 2016 at 09:55:56 UTC, Puming wrote: [...] That seems like a bug to me and you might want to submit it to the bug tracker. Even converting it to an array first does not seem to work: [...] Thanks. I

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 08:27:23 UTC, Edwin van Leeuwen wrote: On Thursday, 7 April 2016 at 08:17:38 UTC, Puming wrote: On Thursday, 7 April 2016 at 08:07:12 UTC, Edwin van Leeuwen wrote: OK. Even if it consumes the first two elements, then why does it have to consume them AGAIN when

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 08:27:23 UTC, Edwin van Leeuwen wrote: On Thursday, 7 April 2016 at 08:17:38 UTC, Puming wrote: On Thursday, 7 April 2016 at 08:07:12 UTC, Edwin van Leeuwen wrote: OK. Even if it consumes the first two elements, then why does it have to consume them AGAIN when

Re: is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 08:07:12 UTC, Edwin van Leeuwen wrote: On Thursday, 7 April 2016 at 07:07:40 UTC, Puming wrote: [...] Apparently it works processing the first two elements at creation. All the other elements will be processed lazily. Even when a range is lazy the algorithm

Re: how to parse a string into a phobos datatype with additional logic

2016-04-07 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 07:45:06 UTC, yawniek wrote: what is the way one is supposed to parse e.g. a double of unixtime (as delived by nginx logs) into a SysTime? currently i'm creating a wrapper struct around SysTime with alias this as:

is std.algorithm.joiner lazy?

2016-04-07 Thread Puming via Digitalmars-d-learn
Hi: when I use map with joiner, I found that function in map are called. In the document it says joiner is lazy, so why is the function called? say: int[] mkarray(int a) { writeln("mkarray called!"); return [a * 2]; // just for test } void main() { auto xs = [1, 2]; auto r =

Re: Build release and debug with dub

2016-04-06 Thread Puming via Digitalmars-d-learn
On Thursday, 7 April 2016 at 02:07:18 UTC, Puming wrote: On Wednesday, 6 April 2016 at 19:49:38 UTC, Suliman wrote: [...] In the document it says you can not specify targetName in buildType. I wonder why is that? But you can use two configurations like this(assumming your project is named

Re: Build release and debug with dub

2016-04-06 Thread Puming via Digitalmars-d-learn
On Wednesday, 6 April 2016 at 19:49:38 UTC, Suliman wrote: Is it's possible to make rule, that allow to build two version of App? One release and one debug at same time. I looked at "buildTypes" https://code.dlang.org/package-format?lang=json But it's not possible to set different names for

Re: The Sparrow language

2016-04-06 Thread Puming via Digitalmars-d
On Wednesday, 6 April 2016 at 20:42:27 UTC, Lucian Radu Teodorescu wrote: On Wednesday, 6 April 2016 at 14:54:18 UTC, Puming wrote: On Wednesday, 6 April 2016 at 13:15:48 UTC, Andrei Alexandrescu wrote: [...] Interesting. I've thinking about concepts too. Hopefully they could come into D.

Re: The Sparrow language

2016-04-06 Thread Puming via Digitalmars-d
On Wednesday, 6 April 2016 at 13:15:48 UTC, Andrei Alexandrescu wrote: I just got word about Sparrow (from its creator no less): presentation_offline_Sparrow.pdf - https://db.tt/m2WwpxIY Speak.mp4 - https://db.tt/RDmrlEu7 ThesisLucTeo.pdf - https://db.tt/1ylGHuc1 An interesting language that

Re: Release D 2.071.0

2016-04-06 Thread Puming via Digitalmars-d-announce
On Tuesday, 5 April 2016 at 22:43:05 UTC, Martin Nowak wrote: Glad to announce D 2.071.0. http://dlang.org/download.html This release fixes many long-standing issues with imports and the module system. See the changelog for more details. http://dlang.org/changelog/2.071.0.html -Martin

Re: infer type argument in classe constructor?

2016-03-29 Thread Puming via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 10:29:46 UTC, Simen Kjaeraas wrote: On Tuesday, 29 March 2016 at 10:13:28 UTC, Puming wrote: Hi, I'm writing a generic class: ```d struct Message { ... } class Decoder(MsgSrc) { } ``` When using it, I'd have to include the type of its argument: ``` void main()

infer type argument in classe constructor?

2016-03-29 Thread Puming via Digitalmars-d-learn
Hi, I'm writing a generic class: ```d struct Message { ... } class Decoder(MsgSrc) { } ``` When using it, I'd have to include the type of its argument: ``` void main() { Message[] src = ...; auto decoder = new Decoder!(Message[])(src); ... } ``` Can it be inferred so that I only

Re: string and char[] in Phobos

2016-03-29 Thread Puming via Digitalmars-d-learn
On Friday, 18 March 2016 at 20:06:27 UTC, Jonathan M Davis wrote: When a function accepts const(char)[] than it can accept char[], const(char)[], const(char[]), immutable(char)[], and immutable(char[]), which, whereas if it accepts string, then all it accepts are immutable(char)[] and

string and char[] in Phobos

2016-03-19 Thread Puming via Digitalmars-d-learn
Hi, I saw from the forum that functions with string like arguments better use `in char[]` instead of `string` type, because then it can accept both string and char[] types. But recently when actually using D, I found that many phobos functions/constructors use `string`, while many returns

Re: Official compiler

2016-02-24 Thread Puming via Digitalmars-d
On Thursday, 25 February 2016 at 02:48:24 UTC, Walter Bright wrote: On 2/24/2016 6:05 PM, Adam D. Ruppe wrote: I've also heard from big users who want the performance more than compile time and hit difficulty in build scaling.. I know that performance trumps all for many users. But we can

Re: Vision for the first semester of 2016

2016-01-29 Thread Puming via Digitalmars-d-announce
On Friday, 29 January 2016 at 23:41:47 UTC, Ola Fosheim Grøstad wrote: Yep, a curated list like those awesome-lists found on github would be a start. I've got one before there were many awesome-lists: https://github.com/zhaopuming/awesome-d

Re: What is the best declaration type for a string like parameter?

2016-01-28 Thread Puming via Digitalmars-d-learn
On Thursday, 28 January 2016 at 15:03:38 UTC, sigod wrote: On Thursday, 28 January 2016 at 13:36:46 UTC, Puming wrote: [...] `in char[]` is short for `scope const char[]` or `scope const(char[])`. See http://dlang.org/spec/function.html#parameters It depends on the situation. If possible

What is the best declaration type for a string like parameter?

2016-01-28 Thread Puming via Digitalmars-d-learn
I have a function that reads a line of string and do some computation. I searched the forum and found that people use `const(char)[]` or `in char[]` to accept both string and char[] arguments. What's the difference between `const(char)[]` and `in char[]`? If they are not the same, then

Re: What is the best declaration type for a string like parameter?

2016-01-28 Thread Puming via Digitalmars-d-learn
On Thursday, 28 January 2016 at 15:10:38 UTC, Adam D. Ruppe wrote: But for just both string and char[], yeah, const is the way to do it. [...] Thanks for the clear explaination. So `in char[]` is stricter (and safer) than `const(char)[]`. I will stick to that.

Re: Vision for the first semester of 2016

2016-01-24 Thread Puming via Digitalmars-d-announce
On Monday, 25 January 2016 at 02:37:40 UTC, Andrei Alexandrescu wrote: Hot off the press! http://wiki.dlang.org/Vision/2016H1 -- Andrei For PRs, I suggest the goal to be number of PRs MERGED instead of created. That may provide the core team a subconsious incentive to look at long pending

Re: Vision for the first semester of 2016

2016-01-24 Thread Puming via Digitalmars-d-announce
On Monday, 25 January 2016 at 03:49:56 UTC, Rikki Cattermole wrote: On 25/01/16 4:21 PM, Puming wrote: On Monday, 25 January 2016 at 02:37:40 UTC, Andrei Alexandrescu wrote: Hot off the press! http://wiki.dlang.org/Vision/2016H1 -- Andrei For PRs, I suggest the goal to be number of PRs

Re: Vision for the first semester of 2016

2016-01-24 Thread Puming via Digitalmars-d-announce
On Monday, 25 January 2016 at 05:50:34 UTC, Rikki Cattermole wrote: I want us to hold off on that as well. I agree that we need a more solid base. I want people to really have a go with making GUI toolkits in D without the worry about how to do the cross platformy technical things. Is

Re: [dlang.org] new forum design

2016-01-18 Thread Puming via Digitalmars-d
On Monday, 18 January 2016 at 10:20:13 UTC, Vladimir Panteleev wrote: As the new design rolled out on dlang.org, I decided to push the changes on forum.dlang.org as well. From what I gathered from the previous feedback thread, I believe we've addressed the most stringent issues. Once again

Re: [dlang.org] new forum design - preview

2016-01-13 Thread Puming via Digitalmars-d
On Wednesday, 13 January 2016 at 06:01:41 UTC, Vladimir Panteleev wrote: http://beta.forum.dlang.org/ https://github.com/CyberShadow/DFeed/pull/51 My 2 cents: 1. The left side bar is too wide. The content pane should be wider. 2. The "Group" column is too wide. 3. The "Last Post" column is

Re: What are you planning for 2016?

2016-01-06 Thread Puming via Digitalmars-d
On Tuesday, 5 January 2016 at 12:27:12 UTC, Ola Fosheim Grøstad wrote: I wonder what kind of programming people plan or _hope_ to use D for in 2016? Do you have plans to: 8. or something else? What other languages do you think you will use or toy with in 2016 and for what purpose? What

Multiple range enumeration

2015-11-10 Thread puming via Digitalmars-d-learn
Hi, If I have multiple ranges, say: auto a = [1, 2, 3]; auto b = ["a", "b", "c"]; auto c = ["x", "y", "z"]; I'd like a composition range that enumerate all combinations of these ranges, having the same effect as a nested foreach loop: foreach (i; a) { foreach (j; b) { foreach (k; c) {

Re: Multiple range enumeration

2015-11-10 Thread puming via Digitalmars-d-learn
On Wednesday, 11 November 2015 at 02:55:25 UTC, cym13 wrote: On Wednesday, 11 November 2015 at 02:38:19 UTC, puming wrote: Hi, If I have multiple ranges, say: auto a = [1, 2, 3]; auto b = ["a", "b", "c"]; auto c = ["x", "y", "z"]; I'd like a composition range that enumerate all combinations

Re: Type helpers instead of UFCS

2015-09-13 Thread Puming via Digitalmars-d
On Sunday, 13 September 2015 at 14:37:36 UTC, Kagamin wrote: On Saturday, 12 September 2015 at 21:04:47 UTC, BBasile wrote: You've got the idea. IDE plugins can not decently provide completion based on the UFCS possibilities. It's possible, just not implemented yet. Mono-d seems to have

Re: Programming in D – Tutorial and Reference

2015-08-30 Thread puming via Digitalmars-d-announce
On Friday, 28 August 2015 at 22:58:30 UTC, Luís Marques wrote: On Friday, 28 August 2015 at 22:42:00 UTC, sigod wrote: Actual link: https://news.ycombinator.com/item?id=10136882 I think Walter didn't post the direct link because the referrer impacts the voting algorithm. So, please don't use

Re: The object operator

2015-08-14 Thread puming via Digitalmars-d
On Friday, 14 August 2015 at 04:17:25 UTC, TheHamster wrote: assert(@@myObj.Do(3).Do(@).Do(@2) == 9); If what you want is to omit the object during the call chain, you can use with statement to mimic this feature, though not as compact as you suggested: ``` import std.stdio; class

Re: D3

2014-12-09 Thread Puming via Digitalmars-d
On Tuesday, 9 December 2014 at 05:04:35 UTC, Jeremy DeHaan wrote: On Tuesday, 9 December 2014 at 03:52:01 UTC, ketmar via Digitalmars-d wrote: On Mon, 08 Dec 2014 21:08:03 + Brad Anderson via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 8 December 2014 at 20:21:51 UTC,

Re: D in my trashbin

2014-10-24 Thread Puming via Digitalmars-d
The only OS that I found problematic with the dmd zip is CentOS 5.8, all other systems I've tried: Centos 6.x, Ubuntu, Windows, MacOS, they all work perfectly. On Friday, 24 October 2014 at 02:42:13 UTC, frustrated wrote: Two days later and I still cant get a 'Hello World' to compile. It is

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Zhao Puming via Digitalmars-d
Great work Etienne! will libasync make it into phobos? On Wednesday, 24 September 2014 at 13:13:34 UTC, Etienne wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively

Clojure transducers

2014-08-31 Thread Puming via Digitalmars-d
Clojure is introducing a new way of composing functions (reducers this time), called transducers. It looks similar to composition/binding of functions, but somehow different. My functional-fu is not that deep to understand the statement transducers are as fundamental as function composition

Re: sdlang-d can not link after updating to dmd 2.066

2014-08-28 Thread Puming via Digitalmars-d-learn
I updated dub to 0.9.22 and still got the same error... THis is the output of `dub build --force`: --- output --- ## Warning for package sdlang-d ## The following compiler flags have been specified in the package description file. They are handled by DUB and direct use in packages is

sdlang-d can not link after updating to dmd 2.066

2014-08-27 Thread Puming via Digitalmars-d-learn
Hi, I'm using sdlang-d version 0.8.4 (http://code.dlang.org/packages/sdlang-d). When I update dmd to version 2.066 today, I found that sdlang-d won't link, with these errors: Undefined symbols for architecture x86_64:

Awesome-D, and an invitation to you awesome guys

2014-08-10 Thread Puming via Digitalmars-d-announce
Hi, I'm maintaining this awesome-d list similar to other awesome-stuff lists on github, for keeping a hook on interesting D related links. https://github.com/zhaopuming/awesome-d At first it was only for my personal use, but recently I got some ideas about it that could potentially

Re: Awesome-D, and an invitation to you awesome guys

2014-08-10 Thread Puming via Digitalmars-d-announce
I forgot to note about wiki.dlang.org, and here it is: I knew we have maintained a library list on wiki.dlang.org, actually I made several links to it in awesome-d. But why should I create this separate list on github? After some thinking, I justified it with the following reasons: 1. It is

Re: Awesome-D, and an invitation to you awesome guys

2014-08-10 Thread Puming via Digitalmars-d-announce
On Sunday, 10 August 2014 at 10:01:58 UTC, NCrashed wrote: On Sunday, 10 August 2014 at 09:28:48 UTC, Puming wrote: Hi, I'm maintaining this awesome-d list similar to other awesome-stuff lists on github, for keeping a hook on interesting D related links.

Re: Are there desktop appications being developed in D currently?

2014-08-10 Thread Puming via Digitalmars-d-learn
On Sunday, 10 August 2014 at 05:34:49 UTC, thedeemon wrote: On Sunday, 10 August 2014 at 04:41:45 UTC, Puming wrote: Photo processing app: Disk space visualizer and redundancy searcher: A tool for watching some folders and processing video files there... Interesting :-) Unfortunately they

Re: Are there desktop appications being developed in D currently?

2014-08-10 Thread Puming via Digitalmars-d-learn
Wow, it just happens that I checked your terminal.d code on the list an hour ago :-) Definitely gonna look at it. What do you mean by 'boring'? I think a shell in D would be awesome. I'm planning to make a shell scripting lib in D, I would like it to be very powerful, but my coding skills

Re: Are there desktop appications being developed in D currently?

2014-08-10 Thread Puming via Digitalmars-d-learn
Sorry for my misunderstanding. After looking at your code I realized that your terminal emulator is a GUI application and I was responding about a shell :-) Nonetheless, a terminal emulator is a very interesting tool. On Sunday, 10 August 2014 at 13:25:32 UTC, Adam D. Ruppe wrote: My thing

Re: Are there desktop appications being developed in D currently?

2014-08-10 Thread Puming via Digitalmars-d-learn
On Sunday, 10 August 2014 at 18:40:23 UTC, Adam D. Ruppe wrote: On Sunday, 10 August 2014 at 14:28:33 UTC, Puming wrote: What do you mean by 'boring'? I think a shell in D would be awesome. tbh I think shells are a bit boring too, but like you said in the other message, they are two

Re: Are there desktop appications being developed in D currently?

2014-08-09 Thread Puming via Digitalmars-d-learn
On Saturday, 9 August 2014 at 21:46:45 UTC, Peter Alexander wrote: On Saturday, 9 August 2014 at 00:34:43 UTC, Puming wrote: Yes, rust is a more infantile language compared to D, but people are already using them to create complicate applications like browser! Rust was designed to build

Re: Are there desktop appications being developed in D currently?

2014-08-09 Thread Puming via Digitalmars-d-learn
On Saturday, 9 August 2014 at 15:19:35 UTC, ketmar via Digitalmars-d-learn wrote: On Sat, 09 Aug 2014 00:34:42 + Puming via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: yes, there is. all of ours apps are done with D and GtkD now. alas, it's in-house, but alot of people

Re: Are there desktop appications being developed in D currently?

2014-08-09 Thread Puming via Digitalmars-d-learn
Interesting :-) Unfortunately they are all windows only apps, I don't have a windows machine. Can I link them on my bookmarks about D projects? https://github.com/zhaopuming/awesome-d On Saturday, 9 August 2014 at 17:14:39 UTC, thedeemon wrote: On Saturday, 9 August 2014 at 00:34:43 UTC,

Are there desktop appications being developed in D currently?

2014-08-08 Thread Puming via Digitalmars-d-learn
Hi, I bumped into a blog talking about building a (toy) browser engine in Rust: (http://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html) In the blog I found that the OP is in the mozilla servo team building a parallel browser for mozilla. The servo is hosted on github here:

Re: Are there desktop appications being developed in D currently?

2014-08-08 Thread Puming via Digitalmars-d-learn
On Saturday, 9 August 2014 at 01:26:05 UTC, ed wrote: On Saturday, 9 August 2014 at 00:34:43 UTC, Puming wrote: Hi, I bumped into a blog talking about building a (toy) browser engine in Rust: (http://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html) In the blog I found that the OP

Re: Behaviour of AAs after initialization

2014-08-07 Thread Puming via Digitalmars-d
On Thursday, 7 August 2014 at 16:53:24 UTC, H. S. Teoh via Digitalmars-d wrote: On Thu, Aug 07, 2014 at 11:46:48AM +, via Digitalmars-d wrote: AAs are (like regular dynamic arrays) initialized to `null`. On first modification (i.e. assignment of an element), memory is allocated and the AA

Re: Behaviour of AAs after initialization

2014-08-07 Thread Puming via Digitalmars-d
On Thursday, 7 August 2014 at 18:05:15 UTC, H. S. Teoh via Digitalmars-d wrote: On Thu, Aug 07, 2014 at 05:42:28PM +, via Digitalmars-d wrote: On Thursday, 7 August 2014 at 17:35:46 UTC, Puming wrote: So I'd like to suggest a rule here similar to what assignment does to null AA: If

Re: Behaviour of AAs after initialization

2014-08-07 Thread Puming via Digitalmars-d
On Thursday, 7 August 2014 at 17:42:29 UTC, Marc Schütz wrote: On Thursday, 7 August 2014 at 17:35:46 UTC, Puming wrote: So I'd like to suggest a rule here similar to what assignment does to null AA: If someone refers to an uninitialized null AA ( in implementation, that maybe, a copy of a

Re: Member access of __gshared global object

2014-08-07 Thread Puming via Digitalmars-d-learn
. Actually, I think ANY structs that mimics a reference behavior should add this rule to really look like a reference. On Thursday, 7 August 2014 at 02:17:19 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Thu, Aug 07, 2014 at 02:00:27AM +, Puming via Digitalmars-d-learn wrote

Re: Member access of __gshared global object

2014-08-07 Thread Puming via Digitalmars-d-learn
Yes indeed, null initial value is reasonable. My suggestion does not affect that rationale, but is only based on my observation that if someone want to `refer` to an AA, he is more likely to fill it very soon, and he really mean to refer to it. These are similar concerns: - create a null AA,

AA initialization

2014-08-06 Thread Puming via Digitalmars-d-learn
I found AA initialization have a strange effect: ```d string[string] map; // same as `string[string] map = string[string].init; writeln(map); // output: [] string[string] refer = map; // make a reference refer[1] = 2; // update the reference writeln(map); // output:

Re: AA initialization

2014-08-06 Thread Puming via Digitalmars-d-learn
On Wednesday, 6 August 2014 at 14:38:34 UTC, Marc Schütz wrote: On Wednesday, 6 August 2014 at 13:15:27 UTC, Kozzi11 wrote: AFAIK there is no easy way to do it. Maybe it would be fine to add some function to phobos. Something like this: auto initAA(VT,KT)() { static struct Entry

Re: Member access of __gshared global object

2014-08-06 Thread Puming via Digitalmars-d-learn
On Wednesday, 6 August 2014 at 15:42:05 UTC, Marc Schütz wrote: On Wednesday, 6 August 2014 at 15:18:15 UTC, Dragos Carp wrote: On Wednesday, 6 August 2014 at 14:36:23 UTC, Marc Schütz wrote: This would defeat the purpose, see the original post. sorry, I red just the last post. __gshared

Re: Member access of __gshared global object

2014-08-05 Thread Puming via Digitalmars-d-learn
On Thursday, 31 July 2014 at 10:22:28 UTC, Marc Schütz wrote: On Thursday, 31 July 2014 at 02:03:37 UTC, Puming wrote: 1. Are AAs reference type? if so, why does the compiler copy it? This is probably your problem. They are reference types, but initially that reference is `null`. When you

Re: HTP Handler

2014-08-05 Thread Puming via Digitalmars-d-learn
See this list: https://github.com/zhaopuming/awesome-d#web-frameworks On Wednesday, 6 August 2014 at 04:10:28 UTC, HUSSAIN wrote: Hi , I am new to D, I would like to build HTTP Server in D. Can any one throw some light on what are all the libraries available in D and if there is any

Member access of __gshared global object

2014-07-30 Thread Puming via Digitalmars-d-learn
Hi, I'm writing this global Config class, with an AA member: ```d module my.config; class Config { Command[string] commands; } __gshared Config CONFIG; ``` and initialize it in another module: ```d module my.app; import my.config; void main() { CONFIG = new Config();

Re: fork/waitpid and std.concurrency.spawn

2014-07-23 Thread Puming via Digitalmars-d-learn
OK, I see your point. I didn't know much about windows, so didn't know that fork in windows was so different from posix. This looks reasonable. What I really want is a actor modal similar to std.concurrency, with a similar API and spawn/send/replay semantics, but using processes instead of

Re: fork/waitpid and std.concurrency.spawn

2014-07-23 Thread Puming via Digitalmars-d-learn
OK, I understand your point :-) On Wednesday, 23 July 2014 at 09:05:49 UTC, FreeSlave wrote: Seems like you need inter process communication. There are many ways to make one. For example, through sockets. You may use D bindings to ZMQ or other library, or just use std.socket. Anyway the

Re: fork/waitpid and std.concurrency.spawn

2014-07-22 Thread Puming via Digitalmars-d-learn
I've only found spawnProcess/spawnShell and the like, which executes a new command, but not a function pointer, like fork() and std.concurrency.spawn does. What is the function that does what I describe? On Tuesday, 22 July 2014 at 10:43:58 UTC, FreeSlave wrote: On Tuesday, 22 July 2014 at

Re: DConf 2014: Adam D Ruppe's amazing slideless talk on x86 Bare Metal and Custom Runtime Programming

2014-07-18 Thread Puming via Digitalmars-d-announce
I've added an indirect link to my awesome-d github page where your book is listed: https://github.com/zhaopuming/awesome-d#books But don't know whether that would be filtered also. On Thursday, 17 July 2014 at 19:29:44 UTC, Adam D. Ruppe wrote: On Thursday, 17 July 2014 at 18:48:11 UTC,

Re: Continuous integration testing with travis and drone

2014-07-16 Thread Puming via Digitalmars-d
On Wednesday, 16 July 2014 at 04:11:28 UTC, Kapps wrote: On Wednesday, 16 July 2014 at 03:31:13 UTC, Pavel Evstigneev wrote: May I improve forum to support markdown? The forum is actually an interface to a newsgroup, so most forms of markdown would not be supported in the interest of having

Re: How can I express the type '(int) = int' where it is a function or a delegate

2014-07-16 Thread Puming via Digitalmars-d-learn
On Wednesday, 16 July 2014 at 04:10:13 UTC, Rikki Cattermole wrote: On 16/07/2014 3:50 p.m., Puming wrote: I'd like to have a Command class, where their is a name and a handler field: ```d class Command { string name; string delegate(string[]) handler; } ``` this is ok, but sometimes I

lazy construction of an immutable object

2014-07-15 Thread Puming via Digitalmars-d-learn
Hi, I'd like to use immutable data, but instead of a one time constructor, I would like to `build` the data lazily, by setting its fields separately. In java version of protocol-buffer, there is a pattern for this mechanism: 1. Every data class in protobuf is immutable. 2. Each data class

Re: lazy construction of an immutable object

2014-07-15 Thread Puming via Digitalmars-d-learn
I found another way to do this, namely first create a class that is mutable, then cast it to an immutable object before using it. ```d class A { int a; B b; this(int a, int b) { this.a = a; this.b = new B(b); } } class B

Re: lazy construction of an immutable object

2014-07-15 Thread Puming via Digitalmars-d-learn
On Tuesday, 15 July 2014 at 13:59:24 UTC, Ali Çehreli wrote: On 07/15/2014 05:20 AM, Puming wrote: I found another way to do this, namely first create a class that is mutable, then cast it to an immutable object before using it. ```d class A { int a; B b; this(int a, int b) {

Re: lazy construction of an immutable object

2014-07-15 Thread Puming via Digitalmars-d-learn
On Tuesday, 15 July 2014 at 17:09:04 UTC, Meta wrote: On Tuesday, 15 July 2014 at 15:48:10 UTC, Puming wrote: wow, that's interesting :-) Is it the idiomatic approach to initiate immutable objects lazily? Or do people use data class with immutable fields and generate a companion builder class

  1   2   >