Re: javascript or typescript

2018-11-04 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 5 November 2018 at 02:51:19 UTC, Fred wrote: i'd like to give d a try. Why do you need to convert it to javascript? D can serve up web stuff by itself too.

Re: Putting dmd error through grep for dustmite

2018-11-04 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 5 November 2018 at 03:01:43 UTC, Dennis wrote: Does anybody know what the problem is? I'm using Windows 10 and Git Bash. Sounds like the problem comes from the differences in shell syntax (quoting style) for the two shells here. When you run the command in Git Bash, the syntax

Putting dmd error through grep for dustmite

2018-11-04 Thread Dennis via Digitalmars-d-learn
I am debugging a case where operator overloading seems to break when I define the opBinary templates in a mixin template. On my own simple test-case it worked fine, so I'm trying to reduce my current code with dustmite. The file tree is simply: myproject/ q16.d And the command I run is:

javascript or typescript

2018-11-04 Thread Fred via Digitalmars-d-learn
hi, my javascript skill is bad. but i want to host some nodejs app i am aware that there is converter to js like dtojs. but it is out of date. i'd like to give d a try. is there any other converter available. a decent one.

Re: Accessing LPARAM param from SendMessage acts weird.

2018-11-04 Thread John Chapman via Digitalmars-d-learn
On Sunday, 4 November 2018 at 19:06:22 UTC, Mark Moorhen wrote: Another Windows challenge: I'm trying to get the title of the active window even if it is from an external application. This is what I've come up with so far: import std.stdio; import core.sys.windows.windows; extern

Re: d word counting approach performs well but has higher mem usage

2018-11-04 Thread Jon Degenhardt via Digitalmars-d-learn
On Saturday, 3 November 2018 at 14:26:02 UTC, dwdv wrote: Hi there, the task is simple: count word occurrences from stdin (around 150mb in this case) and print sorted results to stdout in a somewhat idiomatic fashion. Now, d is quite elegant while maintaining high performance compared to

Accessing LPARAM param from SendMessage acts weird.

2018-11-04 Thread Mark Moorhen via Digitalmars-d-learn
Another Windows challenge: I'm trying to get the title of the active window even if it is from an external application. This is what I've come up with so far: import std.stdio; import core.sys.windows.windows; extern (Windows) void main() { HWND foreground = GetForegroundWindow();

Re: d word counting approach performs well but has higher mem usage

2018-11-04 Thread dwdv via Digitalmars-d-learn
Assoc array allocations? Yup. AAs do keep their memory around (supposedly for reuse). [...] Why it consumes so much is a question to the implementation. [...] I guess built-in AAs just love to hoard. What a darn shame. This way I'm missing out on all those slick internet benchmark points.

Re: Overriding behaviour of `is` for small-sized-optimized strings

2018-11-04 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 4 November 2018 at 13:19:45 UTC, Jacob Carlborg wrote: You cannot overload the the "is" operator. Use "==" if you want to overload it. Ok, thanks.

Re: Overriding behaviour of `is` for small-sized-optimized strings

2018-11-04 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-11-04 12:49, Per Nordlöw wrote: At https://github.com/nordlow/phobos-next/blob/master/src/sso_string.d I would like to override the behaviour of     `x is y` for `x` and `y` being instances of `SSOString`. to always mean     `x[] is y[]` How do I do this? Is this the

Overriding behaviour of `is` for small-sized-optimized strings

2018-11-04 Thread Per Nordlöw via Digitalmars-d-learn
At https://github.com/nordlow/phobos-next/blob/master/src/sso_string.d I would like to override the behaviour of `x is y` for `x` and `y` being instances of `SSOString`. to always mean `x[] is y[]` How do I do this? Is this the recommended behaviour in D for small-size-optimized

Re: Need help with calling a list of functions

2018-11-04 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Sunday, 4 November 2018 at 01:17:01 UTC, Luigi wrote: I need to call a function that can create a function from an array of functions and calls them in reverse order. I am learning D any help would be That sounds a lot like std.functional.compose