[Issue 14027] New: segmentation fault in dmd in some circular import situation

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14027 Issue ID: 14027 Summary: segmentation fault in dmd in some circular import situation Product: D Version: unspecified Hardware: x86 OS: All Status:

Re: 404 on dlang.org

2015-01-22 Thread Szymon Gatner via Digitalmars-d
On Thursday, 22 January 2015 at 08:44:31 UTC, Szymon Gatner wrote: Hey, soemthing is wrong with the main page giving 404: https://dl.dropboxusercontent.com/s/vvxlb5mq4oafcp2/dlang_404.jpg?dl=0 still...

Re: DlangUI project update

2015-01-22 Thread Vadim Lopatin via Digitalmars-d-announce
On Wednesday, 21 January 2015 at 17:16:40 UTC, data man wrote: And there is the ability to embed resources into .exe? Done. Standard resources are embedded into executable by default. When your application uses custom resources, you can embed resources into executable and/or specify

is it a bug or what?

2015-01-22 Thread collerblade via Digitalmars-d
Dear D user, i have this code: import core.sys.windows.windows; real[] a; while(1) { a.length=4096*4096; a=null; Sleep(2000); } It allocates memory, but its never gets freed, just keep going up, and after 10 secs, memoryexception is thrown. I checked the pointer it is

Re: dlang.org redesign n+1

2015-01-22 Thread Mengu via Digitalmars-d
On Thursday, 22 January 2015 at 10:32:19 UTC, Chris wrote: Why not think outside the box a little? Design trends change every 3-5 years. I'm sure that users and web designers are already getting sick and tired of the tablet-friendly layout we see everywhere and are thinking of ways to improve

Re: forcing @nogc on class destructors

2015-01-22 Thread Paolo Invernizzi via Digitalmars-d
On Thursday, 22 January 2015 at 11:50:55 UTC, Steven Schveighoffer wrote: On 1/21/15 6:03 PM, Paolo Invernizzi wrote: On Wednesday, 21 January 2015 at 20:32:14 UTC, Steven Schveighoffer wrote: On 1/21/15 3:37 AM, Paolo Invernizzi wrote: On Wednesday, 21 January 2015 at 03:02:53 UTC, Steven

Re: dlang.org redesign n+1

2015-01-22 Thread CraigDillabaugh via Digitalmars-d
On Thursday, 22 January 2015 at 13:06:40 UTC, Sebastiaan Koppe wrote: On Thursday, 22 January 2015 at 01:37:25 UTC, Kiith-Sa wrote: On Thursday, 22 January 2015 at 01:34:01 UTC, Sebastiaan Koppe wrote: On Wednesday, 21 January 2015 at 17:52:56 UTC, Kiith-Sa wrote: Suggested improvement:

std.stdio and copying

2015-01-22 Thread Luc Bourhis via Digitalmars-d
If s is the instance of some struct S, write(s) will first copy s. Not only this can be very inefficient but it won't even compile if S features @disable this(this). The same goes for all the other functions, including format(s=%s, s) One is then force to manually insert s.toString(). Not

Initialization of structure field w/o default ctor

2015-01-22 Thread drug via Digitalmars-d-learn
What's the best way to initialize structure field that has no default ctor? http://dpaste.dzfl.pl/64cd0a3879fa Also can I avoid dummy non-default ctor for Bar?

Re: Initialization of structure field w/o default ctor

2015-01-22 Thread drug via Digitalmars-d-learn
On 22.01.2015 15:30, bearophile wrote: drug: Also can I avoid dummy non-default ctor for Bar? One solution: struct Foo { int foo; @disable this(); this(int foo_) pure nothrow @safe @nogc { this.foo = foo_; } } struct Bar { enum arraySize = 3;

Re: dlang.org redesign n+1

2015-01-22 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 22 January 2015 at 05:27:04 UTC, Zekereth wrote: First of all I like the new design. Way better than what's here now. I'll just throw another site into the mix that I like which is Ocaml's site: https://ocaml.org/ . I like than one and it addresses some of the remarks about a

Re: dlang.org redesign n+1

2015-01-22 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 21 January 2015 at 23:25:04 UTC, Mike wrote: I have to agree with Walter, and prefer the denser design. This proposal is attractive, though, but the new website trends are too sparse. I realize this is the modern trend, but that trend seems to treat eveything like a 5

Re: is it a bug or what?

2015-01-22 Thread collerblade via Digitalmars-d
Also forget to mention, that im using DMD 2.066.1. If i alloc memory with GC.malloc(..), it is handled correcty (and freed). Why GC doesn't frees dynamic arrays?

Re: 404 on dlang.org

2015-01-22 Thread CraigDillabaugh via Digitalmars-d
On Thursday, 22 January 2015 at 13:04:18 UTC, Steven Schveighoffer wrote: On 1/22/15 7:57 AM, Szymon Gatner wrote: On Thursday, 22 January 2015 at 08:44:31 UTC, Szymon Gatner wrote: Hey, clip Just FYI, it's supposed to contain the latest forum posts in there. Something was broken when

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread Gary Willoughby via Digitalmars-d-learn
On Thursday, 22 January 2015 at 11:23:49 UTC, Nordlöw wrote: What is the meaning of selectors such as `a[href]` used in doc.querySelectorAll(`a[href]`) ? Select all `a` tags that have a `href` attribute. You can also select using the attribute value too. For example get all the

[Issue 14024] unstable postblit/destructor call order on static array assignment

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14024 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, wrong-code ---

Re: Changing by ref a class passed in function

2015-01-22 Thread anonymous via Digitalmars-d-learn
On Thursday, 22 January 2015 at 13:06:42 UTC, Zaher Dirkey wrote: See example bellow, i want to pass object to function nullIt and want this function to null it. import std.stdio; static if (!is(typeof(writeln))) alias writefln writeln; class MyClass{ } void

Re: forcing @nogc on class destructors

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/21/15 6:03 PM, Paolo Invernizzi wrote: On Wednesday, 21 January 2015 at 20:32:14 UTC, Steven Schveighoffer wrote: On 1/21/15 3:37 AM, Paolo Invernizzi wrote: On Wednesday, 21 January 2015 at 03:02:53 UTC, Steven Schveighoffer wrote: On 1/20/15 9:04 PM, ketmar via Digitalmars-d wrote: If

Re: Splitting std.algorithm

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/21/15 1:50 AM, H. S. Teoh via Digitalmars-d wrote: On Tue, Jan 20, 2015 at 10:16:18PM -0500, Steven Schveighoffer via Digitalmars-d wrote: [...] I honestly don't care whether std.algorithm is split or not. The documentation needs to be split. But that can be done with the future doc

[Issue 13990] std.algorithm.move incorrectly uses hasAliasing for class references

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13990 --- Comment #4 from Steven Schveighoffer schvei...@yahoo.com --- Bleh, I can't be expected to find all the instances of a function I never use ;) I'll add another PR. --

Re: Compile time iota

2015-01-22 Thread Dicebot via Digitalmars-d
On Thursday, 22 January 2015 at 13:06:26 UTC, Nick Treleaven wrote: On 21/01/2015 19:15, zeljkog wrote: And good name staticIota, unlike TypeTuple. I always wonder what is raw tuple, TypeTuple or Tuple :) Yes, there's a DIP to rename std.typetuple to std.meta.list. I made a pull to do that

Re: dlang.org redesign n+1

2015-01-22 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 22 January 2015 at 01:37:25 UTC, Kiith-Sa wrote: On Thursday, 22 January 2015 at 01:34:01 UTC, Sebastiaan Koppe wrote: On Wednesday, 21 January 2015 at 17:52:56 UTC, Kiith-Sa wrote: Suggested improvement: http://imgur.com/a/zgSJa Can't open link. Direct image links: current:

Re: Data-Oriented Demo: SOA, composition via crazy 'using'

2015-01-22 Thread bearophile via Digitalmars-d
Fool: Jonathan Blow published another video [1] presenting the progress of his language. He is treating two main topics: - a keyword preliminary called 'using' which seems to be quite close to 'alias this'; - an annotation SOA for pointers and arrays which allow high level treatment of

Re: is it a bug or what?

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/22/15 8:44 AM, collerblade wrote: Dear D user, i have this code: import core.sys.windows.windows; real[] a; while(1) { a.length=4096*4096; a=null; Sleep(2000); } It allocates memory, but its never gets freed, just keep going up, and after 10 secs, memoryexception is thrown. I

Re: dlang.org redesign n+1

2015-01-22 Thread ref2401 via Digitalmars-d
Can we just get back the old design, please?

Re: 404 on dlang.org

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/22/15 9:00 AM, CraigDillabaugh wrote: So what you are saying is that at some point it will contain advertisements for bathroom renovations in the UK! Heh, I think the forum software already filters those out. -Steve

Re: 404 on dlang.org

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/22/15 7:57 AM, Szymon Gatner wrote: On Thursday, 22 January 2015 at 08:44:31 UTC, Szymon Gatner wrote: Hey, soemthing is wrong with the main page giving 404: https://dl.dropboxusercontent.com/s/vvxlb5mq4oafcp2/dlang_404.jpg?dl=0 still... Just FYI, it's supposed to contain the latest

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread Nordlöw
On Thursday, 22 January 2015 at 02:06:16 UTC, Adam D. Ruppe wrote: You can do that with a CSS selector like: document.querySelector(#H2_A + p); What is the meaning of selectors such as `a[href]` used in doc.querySelectorAll(`a[href]`) ?

[Issue 14028] [CTFE] Possible reinterpret cast to a pointer to static array

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14028 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from

Re: Berlin Meetup

2015-01-22 Thread Dicebot via Digitalmars-d-announce
On Thursday, 4 December 2014 at 15:07:16 UTC, Leandro Lucarella wrote: Just re-posting in case there is people here that are not subscribed to the D general group (like me ;). http://forum.dlang.org/post/yyfeeqiuuepuzhjvk...@forum.dlang.org Reminding that this happens tomorrow.

[Issue 14029] New: dynamic arrays dont free memory when they are gone..

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14029 Issue ID: 14029 Summary: dynamic arrays dont free memory when they are gone.. Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: trivial

Re: Splitting std.algorithm

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/21/15 12:03 AM, Jonathan M Davis via Digitalmars-d wrote: It's large enough that github won't display the whole thing, and it's far larger than any other module in Phobos. This is the only reason I think we need to split it :) Doing reviews on std.datetime PRs are painful. -Steve

Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/21/15 1:39 PM, Walter Bright wrote: On 1/21/2015 8:23 AM, ketmar via Digitalmars-d wrote: this simply not work. Neither does Windows Moviemaker. It hung again on me. Just FYI iMovie works just fine ;) and not worth it. WMM is over a decade old, and it still hangs doing something as

Re: What to do with InvalidMemoryOperationError

2015-01-22 Thread Nordlöw
On Wednesday, 21 January 2015 at 20:50:30 UTC, anonymous wrote: Or maybe dustmite can help here? If the file contains sensitive information, and you cannot reduce it to a reasonable size, you may be able to programmatically replace classes of characters with one character. E.g. replace all

Re: forcing @nogc on class destructors

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/22/15 8:42 AM, Paolo Invernizzi wrote: You can't ban them, either now with an annotated @nogc destructor: SetFunctionAttributes. Right, but the runtime will still catch it if it allocates. I think the correct place to check it is where it's checked now. I have troubles following your

Re: dlang.org redesign n+1

2015-01-22 Thread ponce via Digitalmars-d
On Wednesday, 21 January 2015 at 19:51:57 UTC, Walter Bright wrote: I can't say, but it's undeniable what people consider modern. (I like the older style, as it is denser and easier to navigate.) I'm not a big fan of these sites either, but because of association with bold marketing. As I

Re: Initialization of structure field w/o default ctor

2015-01-22 Thread bearophile via Digitalmars-d-learn
drug: Also can I avoid dummy non-default ctor for Bar? One solution: struct Foo { int foo; @disable this(); this(int foo_) pure nothrow @safe @nogc { this.foo = foo_; } } struct Bar { enum arraySize = 3; Foo[arraySize] foo = Foo(1); } void main() @safe {

Re: DlangUI project update

2015-01-22 Thread Vadim Lopatin via Digitalmars-d-announce
On Wednesday, 21 January 2015 at 23:21:27 UTC, FrankLike wrote: On Wednesday, 21 January 2015 at 17:36:36 UTC, Vadim Lopatin wrote: On Wednesday, 21 January 2015 at 16:20:31 UTC, FrankLike wrote: On Wednesday, 21 January 2015 at 15:49:06 UTC, FrankLike wrote: On Wednesday, 21 January 2015 at

Re: Compile time iota

2015-01-22 Thread zeljkog via Digitalmars-d
On 22.01.15 14:06, Nick Treleaven wrote: On 21/01/2015 19:15, zeljkog wrote: And good name staticIota, unlike TypeTuple. I always wonder what is raw tuple, TypeTuple or Tuple :) Yes, there's a DIP to rename std.typetuple to std.meta.list. I made a pull to do that (which goes further than the

Re: is it a bug or what?

2015-01-22 Thread collerblade via Digitalmars-d
i tested malloc, and it also run out of mem, except when i manually free the pointer. There is no GC im DMD?

404 on dlang.org

2015-01-22 Thread Szymon Gatner via Digitalmars-d
Hey, soemthing is wrong with the main page giving 404: https://dl.dropboxusercontent.com/s/vvxlb5mq4oafcp2/dlang_404.jpg?dl=0

[Issue 14025] New: unittests for memoize fail intermittently

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14025 Issue ID: 14025 Summary: unittests for memoize fail intermittently Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority:

Re: D on Slashdot

2015-01-22 Thread Kagamin via Digitalmars-d
On Wednesday, 21 January 2015 at 16:34:26 UTC, ketmar via Digitalmars-d wrote: i even knew how to quit vi ctrl-c? nope! it beeps. ;-) Duh! Don't console programs know, what ctrl-c is for? somehow i can't close cmd.exe by hitting ctrl+c. don't console programs know what ctrl+c is for?

Re: New menus are up

2015-01-22 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-21 22:38, Andrei Alexandrescu wrote: Pushed. Looks better now? -- Andrei Actually not so much. Is the site updated? -- /Jacob Carlborg

Re: Defining a static array with values in a range

2015-01-22 Thread bearophile via Digitalmars-d-learn
tcak: Well, that's just disguising what we can't do. When the a..b syntax was added to foreach() someone criticized that syntax saing it's a one trick pony, and indeed I don't know why Walter didn't make it a little more first-class. But note that in D the a..b ranges are always open on

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread Suliman via Digitalmars-d-learn
Adam, please add more simple docs about your parser on site. Also it would be perfect to create dub, for easier including parser to project.

Re: Defining a static array with values in a range

2015-01-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, January 22, 2015 05:56:39 tcak via Digitalmars-d-learn wrote: I want to define alphanumeric characters in an easy way. Something like that: char[] arr = ['a'..'z', 'A'..'Z', '0'..'9']; Though above example doesn't work. Is there any easy way to do this? I am trying to do

Re: Calypso: Direct and full interfacing to C++

2015-01-22 Thread Suliman via Digitalmars-d-announce
I can't build clang. I am getting strange error: D:\llvm\cfe-3.5.0.src\cfe-3.5.0.srcmake Error on line 23: expecting target : dependencies

Re: Defining a static array with values in a range

2015-01-22 Thread tcak via Digitalmars-d-learn
On Thursday, 22 January 2015 at 07:29:05 UTC, anony wrote: On Thursday, 22 January 2015 at 05:56:40 UTC, tcak wrote: I want to define alphanumeric characters in an easy way. Something like that: char[] arr = ['a'..'z', 'A'..'Z', '0'..'9']; Though above example doesn't work. Is there any easy

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread via Digitalmars-d-learn
On Thursday, 22 January 2015 at 02:06:16 UTC, Adam D. Ruppe wrote: On Wednesday, 21 January 2015 at 23:31:26 UTC, Nordlöw wrote: This means that I need some kind of interface to extract all the contents of each p paragraph that is preceeded by a h2 heading with a specific id (say H2_A) or

Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]

2015-01-22 Thread Kagamin via Digitalmars-d
On Wednesday, 21 January 2015 at 08:41:47 UTC, Walter Bright wrote: I wonder why software companies still make it impossible to submit bug reports. For example, google: submit windows movie maker bug report Click on Reporting and solving computer problems - Windows:

Re: Coedit alpha 11 released

2015-01-22 Thread Jordi Sayol via Digitalmars-d-announce
El 21/01/15 a les 18:35, Basile Burg via Digitalmars-d-announce ha escrit: I'm glad to announce this new release of Coedit. Congratulations for this new release! Did you fix the use of DCD simultaneously with other D editors?

[Issue 14026] New: More flexible array of array allocation syntax

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14026 Issue ID: 14026 Summary: More flexible array of array allocation syntax Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: Coedit alpha 11 released

2015-01-22 Thread Basile Burg via Digitalmars-d-announce
On Thursday, 22 January 2015 at 02:04:58 UTC, Andrei Alexandrescu wrote: On 1/21/15 9:35 AM, Basile Burg wrote: I'm glad to announce this new release of Coedit. [snip] Nice! Any change for highlighting in .dd and .ddoc (Ddoc) documents? :o) -- Andrei No, a dedicated highlightrt has to be

Re: dlang.org redesign n+1

2015-01-22 Thread Chris via Digitalmars-d
On Thursday, 22 January 2015 at 14:54:16 UTC, Chris wrote: On Thursday, 22 January 2015 at 14:15:58 UTC, ref2401 wrote: Can we just get back the old design, please? I think it's a waste of time to make the website look modern while what we really need is to point out the topics of interest

Re: dlang.org redesign n+1

2015-01-22 Thread Chris via Digitalmars-d
On Thursday, 22 January 2015 at 14:15:58 UTC, ref2401 wrote: Can we just get back the old design, please? I think it's a waste of time to make the website look modern while what we really need is to point out the topics of interest (better): What is D? - Systems programming language -

Re: dlang.org redesign n+1

2015-01-22 Thread Chris via Digitalmars-d
On Wednesday, 21 January 2015 at 19:51:57 UTC, Walter Bright wrote: On 1/21/2015 6:46 AM, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: Thank you very much for doing this!

Re: Defining a static array with values in a range

2015-01-22 Thread bearophile via Digitalmars-d-learn
Jonathan M Davis: auto r = chain(uiota('a', 'z'), uiota('A', 'Z'), uiota('0', '9')); Those ranges are probably open on the right. In Bugzilla I have asked for the syntax iota![](a, b) to change how the extrema are handled, modelled on std.random.uniform syntax. --- Kagamin:

Re: Defining a static array with values in a range

2015-01-22 Thread Meta via Digitalmars-d-learn
On Thursday, 22 January 2015 at 18:23:00 UTC, Meta wrote: Whoops, I forgot to make it a template to force CTFE. import std.stdio; template charRange(string spec) { static processInput(string spec) { import std.algorithm; import std.ascii; import std.conv;

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 22 January 2015 at 16:22:14 UTC, ketmar via Digitalmars-d-learn wrote: i miss it in Phobos. I'm sure it'd fail the phobos review process though. But since it is an independent file (or it + characterencodings.d for full functionality), it is easy to just download and add to your

Re: Problem with coupling shared object symbol visibility with protection

2015-01-22 Thread Benjamin Thaut via Digitalmars-d
There are uses in Phobos where workaround 1) would require some code changes: private @property File trustedStdout() @trusted { return stdout; } void write(T...)(T args) if (!is(T[0] : File)) { trustedStdout.write(args); } My workaround so far: export struct _impl1 { package @property

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 22 January 2015 at 10:14:58 UTC, Suliman wrote: Adam, please add more simple docs about your parser on site. I'll post some ddoc in the next dmd release, now that dmd finally supports some way to automatically escape xml examples. Also it would be perfect to create dub, for

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread ketmar via Digitalmars-d-learn
On Thu, 22 Jan 2015 18:39:25 +, Adam D. Ruppe wrote: On Thursday, 22 January 2015 at 16:22:14 UTC, ketmar via Digitalmars-d-learn wrote: i miss it in Phobos. I'm sure it'd fail the phobos review process though. But since it is an independent file (or it + characterencodings.d for full

[Issue 14028] New: [CTFE] Possible reinterpret cast to a pointer to static array

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14028 Issue ID: 14028 Summary: [CTFE] Possible reinterpret cast to a pointer to static array Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: forcing @nogc on class destructors

2015-01-22 Thread Steven Schveighoffer via Digitalmars-d
On 1/21/15 3:45 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Wednesday, 21 January 2015 at 03:03:50 UTC, Steven Schveighoffer wrote: It's neither spurious, nor a race condition. How can you say that a priori? When the GC collects, it doesn't allow

Re: dlang.org redesign n+1

2015-01-22 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-21 22:52, DaveG wrote: You're not alone gents. I like some parts and content pages aren't too bad, but the homepage is completely impractical. It feels like I'm emulating a giant phone. The problem with mobile first design is the desktop often gets left behind. This may not be a

Re: Compile time iota

2015-01-22 Thread Nick Treleaven via Digitalmars-d
On 21/01/2015 19:15, zeljkog wrote: And good name staticIota, unlike TypeTuple. I always wonder what is raw tuple, TypeTuple or Tuple :) Yes, there's a DIP to rename std.typetuple to std.meta.list. I made a pull to do that (which goes further than the DIP), but I don't know if the

Changing by ref a class passed in function

2015-01-22 Thread Zaher Dirkey via Digitalmars-d-learn
See example bellow, i want to pass object to function nullIt and want this function to null it. import std.stdio; static if (!is(typeof(writeln))) alias writefln writeln; class MyClass{ } void nullIt(ref Object o) { o = null; } void main() { auto o =

Re: std.stdio and copying

2015-01-22 Thread Kagamin via Digitalmars-d
Somewhat related: https://issues.dlang.org/show_bug.cgi?id=13586

Re: is it a bug or what?

2015-01-22 Thread collerblade via Digitalmars-d
Thank all of u, im going to use malloc.

Re: dlang.org redesign n+1

2015-01-22 Thread NVolcz via Digitalmars-d
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the

Re: D on Slashdot

2015-01-22 Thread ketmar via Digitalmars-d
On Thu, 22 Jan 2015 08:29:57 + Kagamin via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 21 January 2015 at 16:34:26 UTC, ketmar via Digitalmars-d wrote: i even knew how to quit vi ctrl-c? nope! it beeps. ;-) Duh! Don't console programs know, what ctrl-c is

Re: 404 on dlang.org

2015-01-22 Thread ketmar via Digitalmars-d
On Thu, 22 Jan 2015 08:12:33 -0800 H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thu, Jan 22, 2015 at 04:08:29PM +, Vladimir Panteleev via Digitalmars-d wrote: On Thursday, 22 January 2015 at 14:00:54 UTC, CraigDillabaugh wrote: [...] So what you are saying is

Re: dlang.org redesign n+1

2015-01-22 Thread Andrei Alexandrescu via Digitalmars-d
On 1/22/15 6:15 AM, ref2401 wrote: Can we just get back the old design, please? No. -- Andrei

Re: Coedit alpha 11 released

2015-01-22 Thread Basile Burg via Digitalmars-d-announce
On Thursday, 22 January 2015 at 09:44:28 UTC, Jordi Sayol via Digitalmars-d-announce wrote: El 21/01/15 a les 18:35, Basile Burg via Digitalmars-d-announce ha escrit: I'm glad to announce this new release of Coedit. Congratulations for this new release! Did you fix the use of DCD

Re: Coedit alpha 11 released

2015-01-22 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 1/21/15 9:35 AM, Basile Burg wrote: I'm glad to announce this new release of Coedit. Here is a summary of what's new since last public announce: [snip] http://www.reddit.com/r/programming/comments/2taql8/coedit_alpha_11_multiplatform_ide_for_d_written/ Andrei

Re: Calypso: Direct and full interfacing to C++

2015-01-22 Thread Elie Morisse via Digitalmars-d-announce
On Thursday, 22 January 2015 at 07:27:03 UTC, Suliman wrote: First you need a LLVM + Clang 3.5 source tree, built libraries and the Clang binaries. Installing binary packages from your distribution isn't enough since the include/ files aren't exposing many symbols, so the source packages are

Re: Initialization of structure field w/o default ctor

2015-01-22 Thread Kenji Hara via Digitalmars-d-learn
On Thursday, 22 January 2015 at 12:45:53 UTC, drug wrote: On 22.01.2015 15:30, bearophile wrote: drug: Also can I avoid dummy non-default ctor for Bar? One solution: struct Foo { int foo; @disable this(); this(int foo_) pure nothrow @safe @nogc { this.foo = foo_;

Re: is it a bug or what?

2015-01-22 Thread collerblade via Digitalmars-d
On Thursday, 22 January 2015 at 14:19:10 UTC, Steven Schveighoffer wrote: On 1/22/15 8:44 AM, collerblade wrote: Dear D user, i have this code: import core.sys.windows.windows; real[] a; while(1) { a.length=4096*4096; a=null; Sleep(2000); } It allocates memory, but its never gets

Re: Defining a static array with values in a range

2015-01-22 Thread bearophile via Digitalmars-d-learn
Jonathan M Davis: but that's easy fixed with some +1's. But the +1 changes the char to an int. Bye, bearophile

[Issue 13990] std.algorithm.move incorrectly uses hasAliasing for class references

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13990 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/8ccd882556b13afa9b8f72c0c41e72709e701c41 Fix second move

Re: 404 on dlang.org

2015-01-22 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 22, 2015 at 04:08:29PM +, Vladimir Panteleev via Digitalmars-d wrote: On Thursday, 22 January 2015 at 14:00:54 UTC, CraigDillabaugh wrote: [...] So what you are saying is that at some point it will contain advertisements for bathroom renovations in the UK! Not anymore.

Re: forcing @nogc on class destructors

2015-01-22 Thread via Digitalmars-d
On Thursday, 22 January 2015 at 14:07:31 UTC, Steven Schveighoffer wrote: resources) and everything works fine. And the runtime catches any slips with an appropriate handling (abort instead of corrupt memory). Runtime errors that could have been a compile time error should always be caught

Re: 404 on dlang.org

2015-01-22 Thread MattCoder via Digitalmars-d
On Thursday, 22 January 2015 at 15:28:34 UTC, Andrei Alexandrescu wrote: Woke up, rebased, pushed. It's up folks, take a look! http://dlang.org. -- Andrei Neat! I think all the efforts you made till now is a improvement from what the original site was. I know It will be hard to please

Re: dlang.org redesign n+1

2015-01-22 Thread Chris via Digitalmars-d
On Thursday, 22 January 2015 at 16:00:51 UTC, NVolcz wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach:

[Issue 7514] [e2ir] Error in e2ir at dynamic array to static array cast

2015-01-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7514 --- Comment #12 from Kenji Hara k.hara...@gmail.com --- (In reply to bearophile_hugs from comment #11) (In reply to Kenji Hara from comment #10) I think the cast from int[] to int[2][1] should not be accepted. Can you please explain why?

Re: 404 on dlang.org

2015-01-22 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 22, 2015 at 06:17:35PM +0200, ketmar via Digitalmars-d wrote: On Thu, 22 Jan 2015 08:12:33 -0800 H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thu, Jan 22, 2015 at 04:08:29PM +, Vladimir Panteleev via Digitalmars-d wrote: On Thursday, 22 January

Re: Extracting Structure from HTML using Adam's dom.d

2015-01-22 Thread ketmar via Digitalmars-d-learn
On Thu, 22 Jan 2015 11:40:52 + Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Thursday, 22 January 2015 at 11:23:49 UTC, Nordlöw wrote: What is the meaning of selectors such as `a[href]` used in doc.querySelectorAll(`a[href]`) ?

Re: D on Slashdot

2015-01-22 Thread Adam D. Ruppe via Digitalmars-d
BTW you should try the terminal.getline function in my terminal.d. It is fairly new, my own reimplementation of an editable getline with history and completion based on the history. One of the things mine does is show a bit of suggestion of it is unambiguous and also if you hit tab twice, it

Re: forcing @nogc on class destructors

2015-01-22 Thread via Digitalmars-d
On Thursday, 22 January 2015 at 11:58:13 UTC, Steven Schveighoffer wrote: A race condition can LEAD to this being triggered, but the abort itself is not a race condition. And forcing a default of @nogc will not fix this. Why not? If you have a race condition that leads a memory leak when

Re: 404 on dlang.org

2015-01-22 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 22 January 2015 at 14:00:54 UTC, CraigDillabaugh wrote: On Thursday, 22 January 2015 at 13:04:18 UTC, Steven Schveighoffer wrote: On 1/22/15 7:57 AM, Szymon Gatner wrote: On Thursday, 22 January 2015 at 08:44:31 UTC, Szymon Gatner wrote: Hey, clip Just FYI, it's supposed to

Re: sortUniq

2015-01-22 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 22 January 2015 at 21:40:57 UTC, Andrei Alexandrescu wrote: There's this classic patter on Unix: |sort|uniq, i.e. sort some data and only display the unique elements. What would be a better integrated version - one that does sorting and uniq in one shot? I suspect the combination

Re: topNIndex

2015-01-22 Thread Andrei Alexandrescu via Digitalmars-d
On 1/22/15 1:09 PM, H. S. Teoh via Digitalmars-d wrote: Do we really want to publicly document this function before we clean it up? Most likely not. If you have the time, please take it to completion; otherwise leave it deleted. -- Andrei

Re: Compile time iota

2015-01-22 Thread Andrei Alexandrescu via Digitalmars-d
On 1/22/15 5:08 AM, Dicebot wrote: On Thursday, 22 January 2015 at 13:06:26 UTC, Nick Treleaven wrote: On 21/01/2015 19:15, zeljkog wrote: And good name staticIota, unlike TypeTuple. I always wonder what is raw tuple, TypeTuple or Tuple :) Yes, there's a DIP to rename std.typetuple to

Re: sortUniq

2015-01-22 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 22, 2015 at 01:40:56PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: There's this classic patter on Unix: |sort|uniq, i.e. sort some data and only display the unique elements. What would be a better integrated version - one that does sorting and uniq in one shot? I suspect

Re: London D Programmers MeetUp

2015-01-22 Thread Kingsley via Digitalmars-d-announce
We now have a venue for the London D meetup. Skills Matter have kindly offered us their support. The first meetup will be Tuesday 3rd February - see details here: http://www.meetup.com/London-D-Programmers/ Please come along if you can :) --Kingsley On Tuesday, 23 December 2014 at 18:26:52

Re: 404 on dlang.org

2015-01-22 Thread jklp via Digitalmars-d
On Thursday, 22 January 2015 at 13:04:18 UTC, Steven Schveighoffer wrote: On 1/22/15 7:57 AM, Szymon Gatner wrote: On Thursday, 22 January 2015 at 08:44:31 UTC, Szymon Gatner wrote: Hey, soemthing is wrong with the main page giving 404:

Re: post qualifier and template constraint limitation, is there a reason ?

2015-01-22 Thread deadalnix via Digitalmars-d
On Monday, 19 January 2015 at 10:49:52 UTC, Walter Bright wrote: On 1/18/2015 8:23 PM, deadalnix wrote: IMO style is the role of the formater. Prompting the programmer with don't write this, write that instead only crate reaction à la If you know what I meant, why don't you compile that you

Re: New menus are up

2015-01-22 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 20 January 2015 at 04:03:23 UTC, Andrei Alexandrescu wrote: Well let be honest the site was in need of some fresh air. And the new menu is really good. Congratulations. Thanks! Well it's probably time to start talking content, too. Here's another guiding thought. The site should

Re: sortUniq

2015-01-22 Thread bearophile via Digitalmars-d
Andrei Alexandrescu: There's this classic patter on Unix: |sort|uniq, i.e. sort some data and only display the unique elements. In Bugzilla I've asked for a hashGroup, it returns a built-in associative array. Bye, bearophile

  1   2   3   >