Re: Distinction of null and empty [was Re: Ceylon language]

2011-04-14 Thread Kagamin
Nick Sabalausky Wrote: > I've thought about that and I don't know how I feel about it. On one hand, I > can certainly image cases where the distiction between null and empty would > be useful. But OTOH, after having to put up with the nightmare of VB6's "One > million distinct ways to have a st

Re: Units of measurement for D (Phobos?)

2011-04-14 Thread Nick Sabalausky
I see no one's responded yet. FWIW, I love the idea of having a static units system in D. But I just haven't really had a chance to look through your post here, or your code. So busy... :(

Re: Distinction of null and empty [was Re: Ceylon language]

2011-04-14 Thread Nick Sabalausky
"Jesse Phillips" wrote in message news:io7oov$21d8$1...@digitalmars.com... > spir Wrote: > >> This also leads to actual distinction of null and [] or "" for arrays & >> strings. Just dreaming... > > Really? You want this? I really like that a null array is equal to an > empty array. > I've thou

Re: Ceylon language

2011-04-14 Thread Nick Sabalausky
"bearophile" wrote in message news:io7gk3$1jea$1...@digitalmars.com... > spir: > >> But I guess optionality could, and should, extend to non-ref types; thus, >> null >> is just a particular case of non-existence. And this would apply >> especially on >> function parameters: >>void f (int i?

Re: Ceylon language

2011-04-14 Thread Nick Sabalausky
"spir" wrote in message news:mailman.3497.1302788057.4748.digitalmar...@puremagic.com... > On 04/13/2011 02:34 PM, bearophile wrote: > >> >> If a value of type T can be null, it must be declared as type >> Optional, which may be abbreviated to T? >> >> String? name = process.args.first; >> if (e

Re: [OT] Partial-reparsing thory?

2011-04-14 Thread Nick Sabalausky
"spir" wrote in message news:mailman.3527.1302824019.4748.digitalmar...@puremagic.com... > On 04/15/2011 12:51 AM, Nick Sabalausky wrote: >> Is anyone aware of any (formal or informal) >> theory/information/research/articles/etc. that's already been done on the >> idea of reparsing *part* of an a

Re: [OT] Partial-reparsing thory?

2011-04-14 Thread spir
On 04/15/2011 12:51 AM, Nick Sabalausky wrote: Is anyone aware of any (formal or informal) theory/information/research/articles/etc. that's already been done on the idea of reparsing *part* of an already-parsed source? Either lexing, parsing or both together. Preferably LR, but LL might be helpfu

Re: Backporting Tango runtime enhancements to druntime

2011-04-14 Thread Walter Bright
On 4/14/2011 4:15 PM, SiegeLord wrote: Also, if this discussion is best done on the druntime mailing list... can someone tell me where that mailing list is? http://lists.puremagic.com/mailman/listinfo/d-runtime

Backporting Tango runtime enhancements to druntime

2011-04-14 Thread SiegeLord
I am porting Tango to D2 and while I try my best to use druntime instead of Tango's runtime, occasionally I find that Tango's runtime has additional features that other parts of Tango make use of. The most important of these differences right now is the Thread module. For example, Tango's versi

[OT] Partial-reparsing thory?

2011-04-14 Thread Nick Sabalausky
Is anyone aware of any (formal or informal) theory/information/research/articles/etc. that's already been done on the idea of reparsing *part* of an already-parsed source? Either lexing, parsing or both together. Preferably LR, but LL might be helpful, too. (I'd imagine it may be notably more d

Re: single-line string?

2011-04-14 Thread Nick Sabalausky
"spir" wrote in message news:mailman.3500.1302792612.4748.digitalmar...@puremagic.com... > > This is a bug of the editor, indeed, but since Geany is based on > Scintilla's editon component, I guess this bug may be widely shared. FWIW, I use Programmer's Notepad 2 which is also based on Scintill

Re: question to Walter - about the GUI library

2011-04-14 Thread Jesse Phillips
Jacob Carlborg Wrote: > It's in development again now. I just announced that it now supports D2. > > -- > /Jacob Carlborg Yes, I shouldn't have left it sounding as though DWT has died. However it was picked up a year or two later and was completely done from scratch.

Distinction of null and empty [was Re: Ceylon language]

2011-04-14 Thread Jesse Phillips
spir Wrote: > This also leads to actual distinction of null and [] or "" for arrays & > strings. Just dreaming... Really? You want this? I really like that a null array is equal to an empty array. If you really care to find out if a string is null if(str is null)

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 3:31 PM, bearophile wrote: Andrei: BTW there is a proposal to change group to yield a range of ranges instead of a range of tuples. Do you folks estimate this could cause significant harm to existing code? This proposal makes group closer to the semantics of the Python itertools.

Re: "Try it now"

2011-04-14 Thread bearophile
Andrei: > BTW there is a proposal to change group to yield a range of ranges > instead of a range of tuples. > > Do you folks estimate this could cause significant harm to existing code? This proposal makes group closer to the semantics of the Python itertools.groupby. This change doesn't harm

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 3:00 PM, David Nadlinger wrote: On 4/14/11 9:38 PM, Gerrit Wichert wrote: Am 13.04.2011 22:38, schrieb Andrei Alexandrescu: I'm quite excited about the new look of std (right now realized only by http://d-programming-language.org/phobos-prerelease/std_algorithm.html). I just had a

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 09:10 PM, Steven Schveighoffer wrote: On Thu, 14 Apr 2011 14:57:44 -0400, Andrei Alexandrescu wrote: On 4/14/11 1:26 PM, Steven Schveighoffer wrote: On Thu, 14 Apr 2011 13:54:00 -0400, Andrei Alexandrescu wrote: On 4/14/11 12:26 PM, Steven Schveighoffer wrote: Any particular

Re: "Try it now"

2011-04-14 Thread David Nadlinger
On 4/14/11 9:38 PM, Gerrit Wichert wrote: Am 13.04.2011 22:38, schrieb Andrei Alexandrescu: I'm quite excited about the new look of std (right now realized only by http://d-programming-language.org/phobos-prerelease/std_algorithm.html). I just had a look and stumbled over the short description

Re: Ceylon language

2011-04-14 Thread spir
On 04/14/2011 09:06 PM, bearophile wrote: But I guess optionality could, and should, extend to non-ref types; thus, null > is just a particular case of non-existence. And this would apply especially on > function parameters: > void f (int i?) {...} From C# experience it seems non-ref nu

Re: "Try it now"

2011-04-14 Thread Gerrit Wichert
Am 13.04.2011 22:38, schrieb Andrei Alexandrescu: I'm quite excited about the new look of std (right now realized only by http://d-programming-language.org/phobos-prerelease/std_algorithm.html). I just had a look and stumbled over the short description of group:

Re: single-line string?

2011-04-14 Thread spir
On 04/14/2011 07:58 PM, Jesse Phillips wrote: spir Wrote: I would like to know how& how well other editors deal with all of that (especially but not only emacs and vim). Vim's heritage is line based editing. For this reason operations are performed by line and it does processing by line.

Re: "Try it now"

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 14:57:44 -0400, Andrei Alexandrescu wrote: On 4/14/11 1:26 PM, Steven Schveighoffer wrote: On Thu, 14 Apr 2011 13:54:00 -0400, Andrei Alexandrescu wrote: On 4/14/11 12:26 PM, Steven Schveighoffer wrote: Any particular reason why adding a new trait is more desirable th

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-14 Thread spir
On 04/14/2011 07:58 PM, "Jérôme M. Berger" wrote: spir wrote: Actually, I have never been pleased that func defs (1) look like func calls (2) have an exceptional syntax compared to other definitions. I'd like instead eg: square = function (int n) int { return n * n; }

Re: optionally verbose assertions

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 14:38:32 -0400, spir wrote: On 04/14/2011 06:35 PM, Daniel Gibson wrote: Am 14.04.2011 17:47, schrieb Steven Schveighoffer: On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asse

Re: Ceylon language

2011-04-14 Thread bearophile
spir: > But I guess optionality could, and should, extend to non-ref types; thus, null > is just a particular case of non-existence. And this would apply especially on > function parameters: >void f (int i?) {...} >From C# experience it seems non-ref nullable types are not so useful (and it's

Re: question to Walter - about the GUI library

2011-04-14 Thread Jacob Carlborg
On 2011-04-14 16:31, Jesse Phillips wrote: David Wang Wrote: Dear Walter Bright, I would like to know that what GUI library you would like to use for D Language ? Have you ever considered the GTK+ 3.0? or other library? or you will produce a new D library of GUI? wainting for your kindly f

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 07:09 PM, Andrei Alexandrescu wrote: Applying "let me output something and eye it" at the level of each unit test does not scale because it makes it extremely difficult to identify issues once one test of many produces unexpected output. There are programs (such as "expect") that au

Re: question to Walter - about the GUI library

2011-04-14 Thread Walter Bright
On 4/14/2011 7:31 AM, Jesse Phillips wrote: Walter has dropped the idea of endorsing a GUI/any library. There was once a statement that DWT was the official library for D, development promptly stopped afterwards. Not trying to claim there was causation here. I'm not making that mistake again!

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 1:26 PM, Steven Schveighoffer wrote: On Thu, 14 Apr 2011 13:54:00 -0400, Andrei Alexandrescu wrote: On 4/14/11 12:26 PM, Steven Schveighoffer wrote: Any particular reason why adding a new trait is more desirable than modifying assert? Absolutely! Maybe I worded my question wron

Re: GSoC 2011 update: we have 3 slots

2011-04-14 Thread Fawzi Mohamed
On 14-apr-11, at 00:36, Andrei Alexandrescu wrote: Digital Mars has received 3 slots for GSoC 2011. That means we need to choose three student projects to go with. We have enjoyed many strong applications and we have a great lineup of mentors, but Google is reluctant to allocate a lot of s

Re: Linux RPM out of date

2011-04-14 Thread Kai Meyer
Kai, It would be indeed great to automate this once and for all. We have an installer project at https://github.com/D-Programming-Language/installer. If you create a pull request for that project, I'd be glad to review and integrate it. If you need help with creating a pull request on github,

Re: optionally verbose assertions

2011-04-14 Thread spir
On 04/14/2011 06:52 PM, Steven Schveighoffer wrote: A compromise might be to be able to name unit tests, and then run a specific unit test by name on execution only. This allows you to ensure a specific unit test (and specific asserts in that unit test) are running without having to see all the

Re: optionally verbose assertions

2011-04-14 Thread spir
On 04/14/2011 06:35 PM, Daniel Gibson wrote: Am 14.04.2011 17:47, schrieb Steven Schveighoffer: On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have t

Re: optionally verbose assertions

2011-04-14 Thread spir
On 04/14/2011 05:47 PM, Steven Schveighoffer wrote: On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have to change one to fail to make sure that code i

Re: "Try it now"

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 13:54:00 -0400, Andrei Alexandrescu wrote: On 4/14/11 12:26 PM, Steven Schveighoffer wrote: Any particular reason why adding a new trait is more desirable than modifying assert? Absolutely! Maybe I worded my question wrong. What I meant was what *is* the particular

Re: single-line string?

2011-04-14 Thread spir
On 04/14/2011 05:03 PM, Andrej Mitrovic wrote: Some editors automatically add the closing double quote, which pretty much eliminates this problem. For example: step1: string s = |<- caret step2: string s = "|<- caret step3: string s = "|"<- editor automatically adds the ending quote step4: strin

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-14 Thread Jérôme M. Berger
spir wrote: > Actually, I have never been pleased that func defs (1) look like func > calls (2) have an exceptional syntax compared to other definitions. I'd > like instead eg: > > square = function (int n) int { > return n * n; > } > That is still different from other def

Re: single-line string?

2011-04-14 Thread Jesse Phillips
spir Wrote: > I > would like to know how & how well other editors deal with all of that > (especially but not only emacs and vim). Vim's heritage is line based editing. For this reason operations are performed by line and it does processing by line. However as it is visual its buffer consist

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 12:26 PM, Steven Schveighoffer wrote: Any particular reason why adding a new trait is more desirable than modifying assert? Absolutely! Andrei

Re: "Try it now"

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 13:38:11 -0400, Jonathan M Davis wrote: Actually, std.datetime doesn't use assert much. It mostly uses a version of assertPred which it has as a private function. Also, I've been rewriting the unit tests, and that will result in far fewer actual lines with assert or _a

Re: "Try it now"

2011-04-14 Thread Jonathan M Davis
> On Thu, 14 Apr 2011 13:16:33 -0400, Andrei Alexandrescu > > wrote: > > On 4/14/11 12:00 PM, Steven Schveighoffer wrote: > >> On Thu, 14 Apr 2011 12:48:26 -0400, Andrei Alexandrescu > >> > >> wrote: > >>> On 4/14/11 9:03 AM, Steven Schveighoffer wrote: > Sometimes, I worry that my unit te

Re: optionally verbose assertions

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 13:27:32 -0400, Jonathan M Davis wrote: On Thu, 14 Apr 2011 12:35:49 -0400, Daniel Gibson wrote: > Am 14.04.2011 17:47, schrieb Steven Schveighoffer: >> On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: >>> On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: Som

Re: "Try it now"

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 13:16:33 -0400, Andrei Alexandrescu wrote: On 4/14/11 12:00 PM, Steven Schveighoffer wrote: On Thu, 14 Apr 2011 12:48:26 -0400, Andrei Alexandrescu wrote: On 4/14/11 9:03 AM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running.

Re: optionally verbose assertions

2011-04-14 Thread Jonathan M Davis
> On Thu, 14 Apr 2011 12:35:49 -0400, Daniel Gibson > > wrote: > > Am 14.04.2011 17:47, schrieb Steven Schveighoffer: > >> On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: > >>> On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: > Sometimes, I worry that my unit tests or asserts aren't runn

Re: Slides about Nemerle

2011-04-14 Thread VladD2
bearophile Wrote: > Simple slides about Nemerle language, derived from C#, so far I have never > used Nemerle: > http://www.reddit.com/r/programming/comments/gnaop/nemerle_vs_c/ It is better to learn a language by reading articles about it, but not looking to slides. Here is a simple introducti

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 12:00 PM, Steven Schveighoffer wrote: On Thu, 14 Apr 2011 12:48:26 -0400, Andrei Alexandrescu wrote: On 4/14/11 9:03 AM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have to change one to fail to make sure tha

Re: "Try it now"

2011-04-14 Thread Jonathan M Davis
> On 04/14/2011 04:22 PM, Andrei Alexandrescu wrote: > > On 4/14/11 6:52 AM, spir wrote: > >> On 04/14/2011 01:11 AM, bearophile wrote: > * Since most of them don't actually output anything, the program > > > now detects output.length == 0 and says "Program run > > successfully

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 10:34 AM, spir wrote: On 04/14/2011 04:22 PM, Andrei Alexandrescu wrote: On 4/14/11 6:52 AM, spir wrote: On 04/14/2011 01:11 AM, bearophile wrote: * Since most of them don't actually output anything, the program > now detects output.length == 0 and says "Program run > successfully."

Re: "Try it now"

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 12:48:26 -0400, Andrei Alexandrescu wrote: On 4/14/11 9:03 AM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have to change one to fail to make sure that code is compiling (this is especially true whe

Re: optionally verbose assertions

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 12:35:49 -0400, Daniel Gibson wrote: Am 14.04.2011 17:47, schrieb Steven Schveighoffer: On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 9:03 AM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have to change one to fail to make sure that code is compiling (this is especially true when I'm doing version statements or templates). It would be nice if th

Re: optionally verbose assertions

2011-04-14 Thread Daniel Gibson
Am 14.04.2011 17:47, schrieb Steven Schveighoffer: > On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: > >> On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: >>> Sometimes, I worry that my unit tests or asserts aren't running. >>> Every once in >>> a while, I have to change one to fail to make s

Re: optionally verbose assertions

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 11:28:39 -0400, spir wrote: On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have to change one to fail to make sure that code is compiling (this is especially true when I'm doi

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 04:24 PM, Andrei Alexandrescu wrote: On 4/14/11 7:25 AM, spir wrote: On 04/14/2011 03:04 AM, Adam D. Ruppe wrote: bearophile wrote: > This is a problem. Unittest code is not meant to produce an output, > while online snippets to try are meant to nearly always produce a > meaningf

Re: "Try it now"

2011-04-14 Thread Daniel Gibson
Am 14.04.2011 16:56, schrieb spir: > On 04/14/2011 03:50 PM, David Nadlinger wrote: >> On 4/14/11 3:44 PM, spir wrote: >>> On 04/14/2011 02:40 PM, David Nadlinger wrote: On 4/14/11 2:26 PM, spir wrote: >> Not having any imports makes for a faster compile, too. > > ... and helps in

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 04:22 PM, Andrei Alexandrescu wrote: On 4/14/11 6:52 AM, spir wrote: On 04/14/2011 01:11 AM, bearophile wrote: * Since most of them don't actually output anything, the program > now detects output.length == 0 and says "Program run > successfully." upon completion to give some feed

optionally verbose assertions

2011-04-14 Thread spir
On 04/14/2011 04:03 PM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have to change one to fail to make sure that code is compiling (this is especially true when I'm doing version statements or templates). It would be nice

Re: "Try it now"

2011-04-14 Thread Andrej Mitrovic
If you remove asserts then we're forced to run the examples every time we want to remind ourselves of what the code does. With assert it's obvious what the code does. And besides, why discourage newbies from learning about assert? Looking at examples with write's could make them think it's a stand

Re: single-line string?

2011-04-14 Thread Andrej Mitrovic
Some editors automatically add the closing double quote, which pretty much eliminates this problem. For example: step1: string s = | <- caret step2: string s = "| <- caret step3: string s = "|" <- editor automatically adds the ending quote step4: string s = "typesomething" step5: string s = "types

Re: single-line string?

2011-04-14 Thread Steven Schveighoffer
On Thu, 14 Apr 2011 10:49:58 -0400, spir wrote: Hello, This may be a feature request for a single-line string syntactic form --if ever others are annoyed as well, see below. One possible form may be: str = s"abc"; I have myself long found it stupid to separate single- and multi-line

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 03:50 PM, David Nadlinger wrote: On 4/14/11 3:44 PM, spir wrote: On 04/14/2011 02:40 PM, David Nadlinger wrote: On 4/14/11 2:26 PM, spir wrote: Not having any imports makes for a faster compile, too. ... and helps in having safe sandboxes. In which way exactly do I need an im

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 04:21 PM, Andrei Alexandrescu wrote: On 4/14/11 6:49 AM, spir wrote: On 04/14/2011 11:30 AM, Jacob Carlborg wrote: On 2011-04-13 22:38, Andrei Alexandrescu wrote: I'm quite excited about the new look of std (right now realized only by http://d-programming-language.org/phobos-prer

single-line string?

2011-04-14 Thread spir
Hello, This may be a feature request for a single-line string syntactic form --if ever others are annoyed as well, see below. One possible form may be: str = s"abc"; I have myself long found it stupid to separate single- and multi-line string, since there is no formal reason for that. But

Re: question to Walter - about the GUI library

2011-04-14 Thread Jesse Phillips
David Wang Wrote: > Dear Walter Bright, > > I would like to know that what GUI library you would like to use for D > Language ? > > Have you ever considered the GTK+ 3.0? or other library? or you will produce a > new D library of GUI? > > > wainting for your kindly feedback. > > > Best rega

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 7:25 AM, spir wrote: On 04/14/2011 03:04 AM, Adam D. Ruppe wrote: bearophile wrote: > This is a problem. Unittest code is not meant to produce an output, > while online snippets to try are meant to nearly always produce a > meaningful output. I don't know - I like the approach Andre

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 6:49 AM, spir wrote: On 04/14/2011 11:30 AM, Jacob Carlborg wrote: On 2011-04-13 22:38, Andrei Alexandrescu wrote: I'm quite excited about the new look of std (right now realized only by http://d-programming-language.org/phobos-prerelease/std_algorithm.html). Here's a suggestion on h

Re: "Try it now"

2011-04-14 Thread Andrei Alexandrescu
On 4/14/11 6:52 AM, spir wrote: On 04/14/2011 01:11 AM, bearophile wrote: * Since most of them don't actually output anything, the program > now detects output.length == 0 and says "Program run > successfully." upon completion to give some feedback. This is a problem. Unittest code is not meant

Re: "Try it now"

2011-04-14 Thread David Nadlinger
On 4/14/11 4:03 PM, Steven Schveighoffer wrote: Sometimes, I worry that my unit tests or asserts aren't running. Every once in a while, I have to change one to fail to make sure that code is compiling (this is especially true when I'm doing version statements or templates). It would be nice if th

Re: "Try it now"

2011-04-14 Thread Steven Schveighoffer
On Wed, 13 Apr 2011 21:04:25 -0400, Adam D. Ruppe wrote: On the other hand, having output there might be more interesting to look at than "yay the asserts all passed!". I think this is a good point. Someone playing with a language might type in the example, and do: /home/steves> dmd ex

Re: "Try it now"

2011-04-14 Thread David Nadlinger
On 4/14/11 3:44 PM, spir wrote: On 04/14/2011 02:40 PM, David Nadlinger wrote: On 4/14/11 2:26 PM, spir wrote: Not having any imports makes for a faster compile, too. ... and helps in having safe sandboxes. In which way exactly do I need an import to write »extern(C) int system(in char *);

Re: question to Walter - about the GUI library

2011-04-14 Thread Denis Koroskin
On Thu, 14 Apr 2011 17:39:32 +0400, David Wang wrote: Dear Walter Bright, I would like to know that what GUI library you would like to use for D Language ? Have you ever considered the GTK+ 3.0? or other library? or you will produce a new D library of GUI? wainting for your kindly fee

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 02:40 PM, David Nadlinger wrote: On 4/14/11 2:26 PM, spir wrote: Not having any imports makes for a faster compile, too. ... and helps in having safe sandboxes. In which way exactly do I need an import to write »extern(C) int system(in char *); system(…);«? Did I write "it pr

question to Walter - about the GUI library

2011-04-14 Thread David Wang
Dear Walter Bright, I would like to know that what GUI library you would like to use for D Language ? Have you ever considered the GTK+ 3.0? or other library? or you will produce a new D library of GUI? wainting for your kindly feedback. Best regards. David.

Re: Ceylon language

2011-04-14 Thread spir
On 04/13/2011 07:06 PM, bearophile wrote: Kagamin: > How will it work on this code? > > String? name = process.args.first; > myLibCustomEnforce(exists name); > writeLine("Hello " name "!"); If you want to implement the feature well, then the compiler has to manage a bit of type state too.

Re: Ceylon language

2011-04-14 Thread spir
On 04/13/2011 02:34 PM, bearophile wrote: - Ceylon does not support method overloading (or any other kind of overloading). How to survive? Named args and default values somewhat mitigate this lack, but still... I read (somewhere) this only for /operator/ overloading. -

Re: "Try it now"

2011-04-14 Thread David Nadlinger
On 4/14/11 2:26 PM, spir wrote: Not having any imports makes for a faster compile, too. ... and helps in having safe sandboxes. In which way exactly do I need an import to write »extern(C) int system(in char *); system(…);«? David

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 06:32 AM, Walter Bright wrote: On 4/13/2011 6:04 PM, Adam D. Ruppe wrote: I don't know - I like the approach Andrei took in the docs, writing a series of true assertations. assert(sort([4, 2]) == [2, 4]); does look pretty neat. I guess the alternative is: writeln(sort[4, 2]); //

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 03:04 AM, Adam D. Ruppe wrote: bearophile wrote: > This is a problem. Unittest code is not meant to produce an output, > while online snippets to try are meant to nearly always produce a > meaningful output. I don't know - I like the approach Andrei took in the docs, writing a

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 02:56 AM, bearophile wrote: Andrei: I disagree. I find examples that use assert() much clearer than examples that print something to the console and then explain in a comment what you ought to be seeing. I don't understand why you say that. Isn't learning and understanding based

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 02:56 AM, bearophile wrote: Andrei: > I disagree. I find examples that use assert() much clearer than examples > that print something to the console and then explain in a comment what > you ought to be seeing. I don't understand why you say that. Isn't learning and understandi

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 02:51 AM, Adam D. Ruppe wrote: Andrej Mitrovic wrote: I've always wondered.. how do you detect malicious D code? It doesn't. What it does is use the ulimit feature in linux to limit the resources available to each process so they can't do anything. Try it: int[] a; a.length = 5

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 01:11 AM, bearophile wrote: * Since most of them don't actually output anything, the program > now detects output.length == 0 and says "Program run > successfully." upon completion to give some feedback. This is a problem. Unittest code is not meant to produce an output, wh

Re: "Try it now"

2011-04-14 Thread spir
On 04/14/2011 11:30 AM, Jacob Carlborg wrote: On 2011-04-13 22:38, Andrei Alexandrescu wrote: I'm quite excited about the new look of std (right now realized only by http://d-programming-language.org/phobos-prerelease/std_algorithm.html). Here's a suggestion on how we could improve it more. Ada

Re: "Try it now"

2011-04-14 Thread spir
On 04/13/2011 10:54 PM, Adam D. Ruppe wrote: Andrei wrote: Adam wrote an in-browser evaluator for D programs. These, when presented on the homepage with "hello, world" in them are of limited usefulness. However, a personalized "try it now" button present for _each_ artifact in an std module woul

unittest{...} as "free" code bolck

2011-04-14 Thread spir
On 04/13/2011 10:38 PM, Andrei Alexandrescu wrote: Similarly, it would be great if next to e.g. http://d-programming-language.org/phobos-prerelease/std_algorithm.html#setUnion there would be a "Try it now" button. Clicking on that button would open an overlay with an edit window. The edit window

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-14 Thread spir
On 04/13/2011 11:44 PM, Andrei Alexandrescu wrote: On 4/13/11 4:17 PM, "Jérôme M. Berger" wrote: Well, standard (printed) typographic practices put spaces outside the parenthesis and none inside. And as opposed to a lot of typographic rules, that one is a constant across languages and variants.

Re: "Try it now"

2011-04-14 Thread Sequ
> bearophile wrote: > > This is a problem. Unittest code is not meant to produce an output, > > while online snippets to try are meant to nearly always produce a > > meaningful output. > ... > assert(sort([4, 2]) == [2, 4]); > > does look pretty neat. I guess the alternative is: > > writeln(sort[4

Re: "Try it now"

2011-04-14 Thread Jacob Carlborg
On 2011-04-13 22:38, Andrei Alexandrescu wrote: I'm quite excited about the new look of std (right now realized only by http://d-programming-language.org/phobos-prerelease/std_algorithm.html). Here's a suggestion on how we could improve it more. Adam wrote an in-browser evaluator for D programs.