On 12/20/2010 08:43 AM, Walter Bright wrote:
bearophile wrote:
Many games are like drugs.
Not for me. I get bored with games. You don't get bored with drugs.
You didn't play StarCraft when you were a teenager.
Andrei Alexandrescu wrote:
The main issue is perceived value. Books are not T-shirts as significant
time would have to be spent on reading them. Say I had 40 people in the
audience and 40 books. Then it would have been like passing around
marketing samples of no perceived value.
Right. If
Iain Buclaw wrote:
Other than that, it seemed to apply cleanly to
Fedora 14's version of GCC (gcc-4.5.1-20100924)
Not only applied, but also seems to be working... :-)
Once the enormous build and test completed, that is.
So now you can install both ldc and gcc-d (gdc),
and work with both
VladD2 wrote:
Don Wrote:
I
think VladD2 is right: You need to keep track of both current system and
target system. Unfortunately, there is some information about the target
system the compile-time code wouldn't be able discern without giving it the
ability to run code (RPC? Virtualization?
On Mon, Dec 20, 2010 at 10:36 AM, spir denis.s...@gmail.com wrote:
On Sun, 19 Dec 2010 20:33:39 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
The funny thing is that I wouldn't have expected anyone to be able to create
book 96 pages long on D just out of Wikipedia articles. And $44 for 96
Alex_Dovhal wrote:
Don nos...@nospam.com wrote:
I don't think it's quite the same. In a makefile, every executable is
listed, and so you can have some degree of control over it. But in this
scenario, the compiler is making calls to arbitrary shared libraries with
arbitrary parameters.
It
On 12/19/2010 09:48 PM, Nick Sabalausky wrote:
Assuming you meant that as a sarcastic counter-example: There may be ways in
which they make life suck less, but *overall*, they're generally considered
to make life suck *more*. So the make life suck less rule still holds.
Although, if you
Caligo Wrote:
You are absolutely right; life sucks for many people, and that's why some of
them choose to play video games. It gives them a chance to escape reality,
and game companies exploit this to make money. Game companies use all kinds
of psychology in their games to keep you playing
On 12/20/10 04:25, Max Samukha wrote:
On 12/19/2010 09:48 PM, Nick Sabalausky wrote:
Assuming you meant that as a sarcastic counter-example: There may be
ways in
which they make life suck less, but *overall*, they're generally
considered
to make life suck *more*. So the make life suck
On 12/19/10 14:00, Nick Sabalausky wrote:
Caligo iteronve...@gmail.com wrote in message
news:mailman.30.1292776925.4748.digitalmar...@puremagic.com...
You are absolutely right; life sucks for many people, and that's why some
of
them choose to play video games. It gives them a chance to
Nick Sabalausky Wrote:
Yea, and another thing is the matter of art in general: If you're an
ultra-utilitarian like Christopher seems to be (and even most programmers
aren't ultra-utilitarian), then art can be seen as lacking significant
contribution to society.
I think, the effect of art
Christopher Nicholson-Sauls Wrote:
That's a (sadly common) problem with people, though; not with games.
The same can be validly stated for television (which I usually avoid,
anyhow), sports, over-reliance on restaurants (a personal pet peeve),
and checking the D newsgroups... oh shi-
I hope
On 12/19/10 14:52, Nick Sabalausky wrote:
Daniel Gibson metalcae...@gmail.com wrote in message
news:mailman.37.1292790264.4748.digitalmar...@puremagic.com...
On Sun, Dec 19, 2010 at 5:41 PM, Caligo iteronve...@gmail.com wrote:
You are absolutely right; life sucks for many people, and that's
On 12/20/2010 02:48 AM, Andrei Alexandrescu wrote:
Yes, how about it? Is this a murder investigation? I have a hard time
figuring out what is the ultimate purpose of spelunking my past
statements to look for inconsistencies.
Hypocrisy is a pet peeve of mine. How about discussing the gory
On 19.12.2010 14:22, Alex_Dovhal wrote:
Stephan Sollerstephan.sol...@helionweb.de wrote:
I don't think that the syntax improvement of chaining is worth such an
effort. It adds tons of complexity for only a very limited gain. I'm not
sure if I could write such self-parsed code without thinking
Does this support building shared libs now (on x86_64)?
Anders F Björklund wrote:
Iain Buclaw wrote:
Other than that, it seemed to apply cleanly to
Fedora 14's version of GCC (gcc-4.5.1-20100924)
Not only applied, but also seems to be working... :-)
Once the enormous build and test
Neal Becker wrote:
Does this support building shared libs now (on x86_64)?
...
I uploaded the packages to SourceForge, if anyone else
wants to try them... It's made for Fedora 14 (x86_64):
http://sourceforge.net/projects/gdcgnu/files/gdc/8ac6cb4f40aa/
You mean in general, or specifics ?
On 12/20/10, Daniel Gibson metalcae...@gmail.com wrote:
I'd be surprised if these books weren't 99% automatically generated
(the last 1% is selecting a picture for the cover).
This is exactly what they do (or maybe it's just a one man operation).
Read this comment from wikipedia:
As an
Sorry, I meant there's *no work going on here* in that sentence.
On 12/20/10, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
On 12/20/10, Daniel Gibson metalcae...@gmail.com wrote:
I'd be surprised if these books weren't 99% automatically generated
(the last 1% is selecting a picture for
Anders F Björklund wrote:
Iain Buclaw wrote:
Other than that, it seemed to apply cleanly to
Fedora 14's version of GCC (gcc-4.5.1-20100924)
Not only applied, but also seems to be working... :-)
Once the enormous build and test completed, that is.
So now you can install both ldc and gcc-d
Stephan Soller stephan.sol...@helionweb.de wrote
I read your post in the context of method chaining with templates like
filter! and map!. Looks like I missed the point. :)
I think your idea is pretty impressive. Maybe useful for some high-level
stuff like mathematical formulas.
Yes, I
Nick Voronin wrote:
On Sat, 18 Dec 2010 02:17:46 +0100
Don nos...@nospam.com wrote:
Nick Voronin wrote:
btw, is there no explicit alignment for variables in D at all?
align(8) double d; compiles if d is global, but it does nothing.
That's a regression. Large globals are always aligned to a
Don nos...@nospam.com wrote:
In order for CTFE code to call pre-compiled code, three things are
required:
(1) the compiler needs to be able to find the file (.obj/.lib/shared
library) containing the compiled code;
(2) the compiler needs to be able to load the module and call it. This
On Sun, 19 Dec 2010 08:25:36 -0500, Gary Whatmore n...@spam.sp wrote:
jovo Wrote:
Hi,
Today I compiled my old two module console program with d-2.50.
It uses only std.c.time, std.c.stdio, std.random and templates.
Compiled with -O -release, on windows.
Executable size (d-2.50): 4.184 kb.
On 12/20/10, Steven Schveighoffer schvei...@yahoo.com wrote:
The reality is that
executable size *does* matter, and it always will. Smaller programs load
and run faster.
Smaller programs, as in *less code*? Yes. But I really doubt that an
application with the *exact same code* is faster if
On Sun, 19 Dec 2010 07:33:29 -0500, spir denis.s...@gmail.com wrote:
Hello,
I had not initially noticed that the 'in' operator (for AAs) returns a
pointer to the looked up element. So that, to avoid double lookup in
cases where lookups may fail, I naively used try...catch. In cases of
On Mon, 20 Dec 2010 12:28:10 -0500, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
On 12/20/10, Steven Schveighoffer schvei...@yahoo.com wrote:
The reality is that
executable size *does* matter, and it always will. Smaller programs
load
and run faster.
Smaller programs, as in *less
On 2010-12-19 22:02, Michel Fortin wrote:
On 2010-12-19 11:11:03 -0500, Jacob Carlborg d...@me.com said:
I can clearly see that you haven't used an Objective-C/D bridge. The
reason (or at least one of the reasons) for which Michel Fortin (as
well as I) gave up the Objective-C/D bridge and
On 12/20/10 6:02 AM, Jeff Nowakowski wrote:
On 12/20/2010 02:48 AM, Andrei Alexandrescu wrote:
Yes, how about it? Is this a murder investigation? I have a hard time
figuring out what is the ultimate purpose of spelunking my past
statements to look for inconsistencies.
Hypocrisy is a pet
On 2010-12-20 18:10, Steven Schveighoffer wrote:
On Sun, 19 Dec 2010 08:25:36 -0500, Gary Whatmore n...@spam.sp wrote:
jovo Wrote:
Hi,
Today I compiled my old two module console program with d-2.50.
It uses only std.c.time, std.c.stdio, std.random and templates.
Compiled with -O -release, on
On Mon, 20 Dec 2010 14:15:26 -0500, Jacob Carlborg d...@me.com wrote:
On 2010-12-20 18:10, Steven Schveighoffer wrote:
On Sun, 19 Dec 2010 08:25:36 -0500, Gary Whatmore n...@spam.sp wrote:
jovo Wrote:
Hi,
Today I compiled my old two module console program with d-2.50.
It uses only
On Mon, 20 Dec 2010 07:02:51 -0500
Jeff == Jeff Nowakowski j...@dilacero.org wrote:
Hi Jeff,
Jeff Hypocrisy is a pet peeve of mine. How about discussing the gory
Jeff problems with const, and discussing the true state of the
Jeff language at the next D talk? If you're going to bash Go
Jeff
spir wrote:
I agree the price is surprisingly high. But you are very wrong in stating
trying to cash in on something that they did no work for: Making a book out
of diverse material is _much_ work (I've done it). Actually so much and
difficult work that it's often worth rewriting from scratch!
On Mon, 20 Dec 2010 12:29:29 -0500
Steven Schveighoffer schvei...@yahoo.com wrote:
This example is misleading. First, catching an exception should be a rare
occurrence (literally, an exception to the rule). You are testing the
case where catching an exception vastly outweighs the cases
On 2010-12-20 12:50:47 -0500, Jacob Carlborg d...@me.com said:
On 2010-12-19 22:02, Michel Fortin wrote:
On 2010-12-19 11:11:03 -0500, Jacob Carlborg d...@me.com said:
I can clearly see that you haven't used an Objective-C/D bridge. The
reason (or at least one of the reasons) for which
On Mon, 20 Dec 2010 11:39:07 +0200, Daniel Gibson metalcae...@gmail.com
wrote:
I don't think they put much work in it. Probably just print the
wikipedia-article and some related (==linked) articles, maybe
recursively to fill at least these 96 pages.
I'd be surprised if these books weren't 99%
Just saw this:
http://www.reddit.com/r/programming/comments/eoq15/implementing_shortest_path_in_c_is_much_easier/
in which a reader points to this paper on thin heaps:
http://www.cs.princeton.edu/courses/archive/spr04/cos423/handouts/thin%20heap.pdf
Does anyone here have experience with thin
I think they'd be a good addition to std.container.
Why? What more do you need that std.container.BinaryHeap doesn't provide?
On 12/20/2010 05:01 PM, Andrei Alexandrescu wrote:
Just saw this:
http://www.reddit.com/r/programming/comments/eoq15/implementing_shortest_path_in_c_is_much_easier/
in which a reader points to this paper on thin heaps:
Michel Fortin wrote:
Exceptions are slow, that's a fact of life. The idea is that an
exception should be exceptional, so the case to optimize for is the case
where you don't have any exception: a try...catch that doesn't throw.
Other ways to implement exceptions exists which are faster at
Caligo wrote:
If there is going to be a D3, will it be backwards compatible with D2?
D3 plans are a complete unknown at the moment.
And why is work still being done on the D1 compiler? Shouldn't it be
marked deprecated so people stop using it and move to D2?
Since there are many breaking
Walter Bright Wrote:
Caligo wrote:
If there is going to be a D3, will it be backwards compatible with D2?
D3 plans are a complete unknown at the moment.
So, what's the main reason D3 plans are unknown? Have you got a list of
realistic new features? Is it lack of manpower? Too early to
Jean Crystof wrote:
So, what's the main reason D3 plans are unknown? Have you got a list of
realistic new features? Is it lack of manpower? Too early to release anything
new now that D2 isn't in serious production use yet?
D2 first.
Scala uses an inheritance-rich design for its containers that I'd
considered for D (in a slightly different form as D doesn't have traits)
and rejected. Still, I wonder how that design compares to D's choice.
Max Samukha spam...@d-coding.com wrote in message
news:ien42a$26q...@digitalmars.com...
On 12/20/2010 08:43 AM, Walter Bright wrote:
bearophile wrote:
Many games are like drugs.
Not for me. I get bored with games. You don't get bored with drugs.
You didn't play StarCraft when you were a
Christopher Nicholson-Sauls ibisbase...@gmail.com wrote in message
news:ienfgr$2st...@digitalmars.com...
On 12/19/10 14:52, Nick Sabalausky wrote:
Interesting. I don't think I would go so far as to claim that WoW was
unethical...just uninteresting ;) But that's just me. This is at least
one
On Mon, 20 Dec 2010 04:27:33 +0300
Nick Voronin elfy...@gmail.com wrote:
On Mon, 20 Dec 2010 01:24:02 +0100
CrypticMetaphor crypticmetapho...@gmail.com wrote:
Anyway, the problem is, if I call rdmd from outside the folder in which
the main source resides in, and main includes another
On Sun, 19 Dec 2010 21:33:56 -0500
bearophile bearophileh...@lycos.com wrote:
So, putting classes on the stack kind of negates the whole point of having
both structs and classes in the first place.
This is false, the definition of D class instance doesn't specify where the
instance
On Monday 20 December 2010 01:19:31 spir wrote:
On Sun, 19 Dec 2010 21:33:56 -0500
bearophile bearophileh...@lycos.com wrote:
So, putting classes on the stack kind of negates the whole point of
having both structs and classes in the first place.
This is false, the definition of D
Hi,
I'm currently patching Ragel (http://www.complang.org/ragel/) to generate
D2 compatible code. Right now it creates output like this for static
arrays:
enum ubyte[] _parseResponseLine_key_offsets = [
0, 0, 17, 18, 37, 41, 42, 44,
50, 51, 57, 58,
On Mon, 20 Dec 2010 01:29:13 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
For me, the important difference is that classes are referenced, while
structs are plain values. This is a semantic distinction of highest
importance. I would like structs to be subtype-able and to implement
Johannes Pfau:
Hello Johannes and thank you for developing your tool for D2 too :-)
Making it output enum ubyte[30] would be more complicated, so I wonder
if there's a difference between enum ubyte[] and enum ubyte[30]?
In D1 a enum ubyte[] is a compile-time constant dynamic array of
At 20.12.2010, 11:02, bearophile wrote bearophileh...@lycos.com:
Hello Johannes and thank you for developing your tool for D2 too :-)
Actually it's not mine, I'm just a regular user. I don't think I could
ever understand the finite state machine code (especially because it's
c++), but
Johannes Pfau:
Did you mean in D2?
Right, sorry.
Bye,
bearophile
Nick Voronin:
Here is where we diverge. Choosing struct vs class on criteria of their
placement makes no sense to me.
In D you use a class if you want inheritance or when you (often) need reference
semantics, and you use a struct when you need a little value passed around by
value or when
On 12/19/10 06:52, spir wrote:
On Sun, 19 Dec 2010 03:37:37 -0600
Christopher Nicholson-Sauls ibisbase...@gmail.com wrote:
On 12/18/10 07:19, spir wrote:
Hello,
I cannot find a way to define methods (I mean member functions) outside
the main type-definition body:
struct X {}
void
On Monday 20 December 2010 01:52:58 spir wrote:
On Mon, 20 Dec 2010 01:29:13 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
For me, the important difference is that classes are referenced, while
structs are plain values. This is a semantic distinction of highest
importance. I would
On Mon, 20 Dec 2010 10:26:16 +0100
Johannes Pfau s...@example.com wrote:
Hi,
I'm currently patching Ragel (http://www.complang.org/ragel/) to generate
D2 compatible code.
Interesting. Ragel-generated code works fine for me in D2. I suppose it mostly
uses such a restricted C-like subset of
On Monday 20 December 2010 01:26:16 Johannes Pfau wrote:
Hi,
I'm currently patching Ragel (http://www.complang.org/ragel/) to generate
D2 compatible code. Right now it creates output like this for static
arrays:
enum ubyte[] _parseResponseLine_key_offsets = [
Jonathan M Davis:
So, putting classes on the stack kind of negates the whole point of having
both structs and classes in the first place.
Where you put the instance is mostly a matter of implementation. This is why a
smart JavaVM is able to perform escape analysis and choose where to allocate
On Sun, 19 Dec 2010 07:01:30 +, doubleagent wrote:
Andrei's quick dictionary illustration [in his book, 'The D Programming
Language'] doesn't seem to work. Code attached.
That's strange. I ran the example you posted using DMD 2.050 myself, and
it works for me. Are you 100% sure that
On Mon, 20 Dec 2010 03:11:49 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
Now, you could conceivably have a language where all of its objects were
actually pointers, but they were treated as value types. So,
B b;
A a = b;
would actually be declaring
B* b;
A* a = b;
20.12.2010 8:35, doubleagent пишет:
Compared to the relatively snappy response other threads have been receiving I'm
going to assume that nobody is interested in my inquiry.
That's cool. Can anybody point me to an IRC chatroom for D noobs, and is there
anywhere to post errata for the book?
On Monday, December 20, 2010, Nick Voronin elfy...@gmail.com wrote:
On Mon, 20 Dec 2010 10:26:16 +0100
Johannes Pfau s...@example.com wrote:
Hi,
I'm currently patching Ragel (http://www.complang.org/ragel/) to
generate
D2 compatible code.
Interesting. Ragel-generated code works fine for
19.12.2010 10:51, Mandeep Singh Brar пишет:
Thanks a lot for your reply Tomek. I understand what you are saying
but this would not work for me. The reason is that i am trying to
make some kind of plugins from these libs. So i would not know the
name objectFactory also in advance (multiple
On Monday, December 20, 2010 06:01:23 Lars T. Kyllingstad wrote:
On Sun, 19 Dec 2010 07:01:30 +, doubleagent wrote:
Andrei's quick dictionary illustration [in his book, 'The D Programming
Language'] doesn't seem to work. Code attached.
That's strange. I ran the example you posted
On Monday, December 20, 2010 03:19:48 bearophile wrote:
Jonathan M Davis:
So, putting classes on the stack kind of negates the whole point of
having both structs and classes in the first place.
Where you put the instance is mostly a matter of implementation. This is
why a smart JavaVM is
On Monday, December 20, 2010 06:24:56 spir wrote:
On Mon, 20 Dec 2010 03:11:49 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
Now, you could conceivably have a language where all of its objects were
actually pointers, but they were treated as value types. So,
B b;
A a = b;
On Mon, 20 Dec 2010 00:35:53 -0500, doubleagent doubleagen...@gmail.com
wrote:
Compared to the relatively snappy response other threads have been
receiving I'm
going to assume that nobody is interested in my inquiry.
Just a tip, don't expect snappy responses on Sunday... We all have
On Sun, 19 Dec 2010 17:38:17 -0500, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Sunday 19 December 2010 14:26:19 bearophile wrote:
Jonathan M Davis:
There will be a library solution to do it, but again, it's unsafe.
It can be safer if the compiler gives some help. For me it's one of the
Are you 100% sure that you are running this version
I have to be. There are no other versions of phobos on this box and 'which dmd'
points to the correct binary.
dictionary[word.idup] = newId;
That fixes it.
The 'word' array is mutable and reused by byLine() on each iteration. By
doing
I understand. Thank you, and thanks for pointing out the chatroom.
On Mon, 20 Dec 2010 11:13:34 -0500, Stanislav Blinov bli...@loniir.ru
wrote:
And lastly, hasn't this by chance been your first post? AFAIR, the first
message is being moderated so it doesn't get to the public at once.
BTW, this message board is not moderated.
-Steve
On Mon, 20 Dec 2010 14:05:56 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Mon, 20 Dec 2010 11:13:34 -0500, Stanislav Blinov bli...@loniir.ru
wrote:
And lastly, hasn't this by chance been your first post? AFAIR, the
first message is being moderated so it doesn't get to the
The reason that std.string.splitter() does not show in the documentation is
that
its return type is auto, and there is currently a bug in ddoc that makes it so
that auto functions don't end up in the generated documentation. Looking at
the
code, it pretty much just forwards to
On Monday, December 20, 2010 10:44:12 doubleagent wrote:
Are you 100% sure that you are running this version
I have to be. There are no other versions of phobos on this box and 'which
dmd' points to the correct binary.
dictionary[word.idup] = newId;
That fixes it.
The 'word'
On Mon, 20 Dec 2010 18:44:12 +, doubleagent wrote:
Are you 100% sure that you are running this version
I have to be. There are no other versions of phobos on this box and
'which dmd' points to the correct binary.
dictionary[word.idup] = newId;
That fixes it.
The 'word' array
Okay. I don't know what the actual code looks like
Here.
import std.stdio, std.string;
void main() {
uint[string] dictionary; // v[k], so string-uint
foreach (line; stdin.byLine()) {
// break sentence into words
// Add each word in the sentence
This could be related to bug 2954, for which a fix will be released in
the next version of DMD.
Looking at that new descriptive error message ie error(associative arrays can
only be assigned values with immutable keys, not %s, e2-type-toChars()); it
appears to be a distinct possibility.
On Monday, December 20, 2010 16:45:20 doubleagent wrote:
Okay. I don't know what the actual code looks like
Here.
import std.stdio, std.string;
void main() {
uint[string] dictionary; // v[k], so string-uint
foreach (line; stdin.byLine()) {
// break
On Mon, 20 Dec 2010 17:17:05 +0100
Johannes Pfau s...@example.com wrote:
But if you are going to patch it, please make it add extra {} around
action code! The thing is that when there is a label before {} block
(and in ragel generated code I saw it's always so) the block isn't
On Mon, 20 Dec 2010 05:43:08 -0500
bearophile bearophileh...@lycos.com wrote:
Nick Voronin:
Here is where we diverge. Choosing struct vs class on criteria of their
placement makes no sense to me.
In D you use a class if you want inheritance or when you (often) need
reference
Good I agree.
Greetings
I want to find if a given struct type is instantiated from a
particular template struct type. For example:
struct S (T) {
alias T Type;
T t;
}
And later I want to find out if a given type is of type S(*)
(basically any type instantiated from template struct S). In fact I do
not
On Monday 20 December 2010 20:23:49 d coder wrote:
Greetings
I want to find if a given struct type is instantiated from a
particular template struct type. For example:
struct S (T) {
alias T Type;
T t;
}
And later I want to find out if a given type is of type S(*)
(basically
For instance, given your definiton of S, you could use
_traits/std.traits to check that the type that you're testing has a member
variable t. You could then check that S!(typeof(t)) was the same as the type
that you were testing. So, if you get particularly cunning about it, I believe
that it
http://d.puremagic.com/issues/show_bug.cgi?id=5359
Max Samukha samu...@voliacable.com changed:
What|Removed |Added
CC|
87 matches
Mail list logo