Re: streaming redux

2010-12-28 Thread Robert Jacques
On Tue, 28 Dec 2010 23:34:42 -0700, Andrei Alexandrescu wrote: On 12/28/10 11:54 AM, Sean Kelly wrote: Andrei Alexandrescu Wrote: On 12/28/10 5:09 AM, Vladimir Panteleev wrote: abstract interface Formatter; I'm really not sure about this interface. I can see at most three implementation

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 8:33 PM, SHOO wrote: (2010/12/29 8:41), Andrei Alexandrescu wrote: On 12/28/10 5:14 PM, Haruki Shigemori wrote: (2010/12/28 16:02), Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from o

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 6:14 PM, Michel Fortin wrote: On 2010-12-28 18:58:40 -0500, Sean Kelly said: Michel Fortin Wrote: The only thing is that you need to define writeTo (or use the mixin) with any class and subclass you want to serialize. Similar to what I did in C++ then. Gotcha. I never pretende

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 4:06 PM, Jonathan M Davis wrote: On Monday 27 December 2010 23:02:29 Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 12:07 PM, Sean Kelly wrote: Michel Fortin Wrote: So because of all this virtual dispatch and all this rigidity, I think Formatter needs to be rethought a little. My preference obviously goes to satically-typed formatters. But what I'd like to see is something like this: int

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 11:39 AM, Michel Fortin wrote: On 2010-12-28 02:02:29 -0500, Andrei Alexandrescu said: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phob

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 11:54 AM, Sean Kelly wrote: Andrei Alexandrescu Wrote: On 12/28/10 5:09 AM, Vladimir Panteleev wrote: abstract interface Formatter; I'm really not sure about this interface. I can see at most three implementations of it (native, high-endian and low-endian variants), everything el

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 10:57 AM, SHOO wrote: (2010/12/28 16:02), Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_stream2.html

Re: GC conservatism -- again

2010-12-28 Thread Vladimir Panteleev
On Wed, 29 Dec 2010 05:13:10 +0200, Vladimir Panteleev wrote: when the total size of pointers in the managed heap Correction: total size of *stray* pointers. This is a very important distinction. If you have over 300 MB of stray pointers in your managed heap, then it's almost certain th

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 9:45 AM, Andrej Mitrovic wrote: On 12/28/10, Andrei Alexandrescu wrote: http://erdani.com/d/phobos/std_stream2.html What exactly is the difference between an interface and an abstract interface..? Just an artifact of ddoc. Andrei

Re: Phobos Patch - Version (X86_64) for struct_stat64 on Linux x86_64

2010-12-28 Thread Walter Bright
Chuck Blake wrote: Hi. I realize that 64-bit phobos is relatively work in progress. I thought I'd contribute. struct_stat64 is broken on Linux x86_64 which further breaks an awful lot of file IO. I have a small patch that fixes it by just adding a version fork for X86_64 in the default fallba

Re: Phobos Patch - Version (X86_64) for struct_stat64 on Linux x86_64

2010-12-28 Thread Jason House
Chuck Blake Wrote: > Hi. I realize that 64-bit phobos is relatively work in progress. I thought > I'd contribute. struct_stat64 is broken on Linux x86_64 which further breaks > an awful lot of file IO. > > I have a small patch that fixes it by just adding a version fork for X86_64 in > the def

Re: std.openrj

2010-12-28 Thread Haruki Shigemori
(2010/12/29 12:55), Sean Kelly wrote: > Sean Kelly Wrote: > >> Andrej Mitrovic Wrote: >> >>> I've accidentally found this openrj.d module while reading phobos. The >>> thing doesn't even compile, importing it fails. But it has no unittests so >>> it's been dragged along in all recent DMD release

Re: std.openrj

2010-12-28 Thread Sean Kelly
Sean Kelly Wrote: > Andrej Mitrovic Wrote: > > > I've accidentally found this openrj.d module while reading phobos. The > > thing doesn't even compile, importing it fails. But it has no unittests so > > it's been dragged along in all recent DMD releases without anyone noticing. > > > > Line 9

Re: std.openrj

2010-12-28 Thread Sean Kelly
Andrej Mitrovic Wrote: > I've accidentally found this openrj.d module while reading phobos. The thing > doesn't even compile, importing it fails. But it has no unittests so it's > been dragged along in all recent DMD releases without anyone noticing. > > Line 9 in openrj.d: Updated 10th March 2

Re: GC conservatism -- again

2010-12-28 Thread Vladimir Panteleev
On Wed, 29 Dec 2010 02:01:14 +0200, Sean Kelly wrote: The lists are more topical and receive SVN commit messages and such. I guess this could all be done via usenet, but somehow it seems overkill. FWIW, Gmane offers NNTP access to the list, and from personal experience it seems to work

Re: streaming redux

2010-12-28 Thread Vladimir Panteleev
On Tue, 28 Dec 2010 18:09:01 +0200, Andrei Alexandrescu wrote: Nonono. Perhaps I chose the wrong name, but Formatter is really anything that takes typed data and encodes it in raw bytes suitable for transporting. That includes e.g. json, csv, and also a variety of binary formats. Ah, O

Re: Serenity web framework - early feedback wanted

2010-12-28 Thread Robert Clipsham
On 29/12/10 03:20, Robert Clipsham wrote: Hey all, I've just uploaded the source code to a pet project I've been working on over the past few weeks - an MVC web framework written with D. https://bitbucket.org/mrmonday/serenity/src -snip- Currently features include: Knew I'd forget something

Serenity web framework - early feedback wanted

2010-12-28 Thread Robert Clipsham
Hey all, I've just uploaded the source code to a pet project I've been working on over the past few weeks - an MVC web framework written with D. https://bitbucket.org/mrmonday/serenity/src It's by no means ready for production use, I'm posting here primarily for some early feedback on how th

Re: GC conservatism -- again

2010-12-28 Thread Vladimir Panteleev
On Tue, 28 Dec 2010 20:07:03 +0200, Ulrik Mikaelsson wrote: Considering the "don't count on collection"-principle I mentioned above, is this approach safe, especially if other parts of the program grows large in address-space? There is a simple formula with which you can calculate the proba

std.openrj

2010-12-28 Thread Andrej Mitrovic
I've accidentally found this openrj.d module while reading phobos. The thing doesn't even compile, importing it fails. But it has no unittests so it's been dragged along in all recent DMD releases without anyone noticing. Line 9 in openrj.d: Updated 10th March 2005 File modification date: Septem

Phobos Patch - Version (X86_64) for struct_stat64 on Linux x86_64

2010-12-28 Thread Chuck Blake
Hi. I realize that 64-bit phobos is relatively work in progress. I thought I'd contribute. struct_stat64 is broken on Linux x86_64 which further breaks an awful lot of file IO. I have a small patch that fixes it by just adding a version fork for X86_64 in the default fallback version{} (which s

Re: streaming redux

2010-12-28 Thread SHOO
(2010/12/29 8:41), Andrei Alexandrescu wrote: On 12/28/10 5:14 PM, Haruki Shigemori wrote: (2010/12/28 16:02), Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffere

Re: D vs C++

2010-12-28 Thread Robert Jacques
On Tue, 28 Dec 2010 04:49:54 -0700, Max Samukha wrote: Another QVariant feature I would like to see in Variant is a constructor taking the type descriptor and a void pointer to the value. For example, it is needed for constructing Variants from variadic arguments. For what it's worth, I'

Re: streaming redux

2010-12-28 Thread Robert Jacques
On Tue, 28 Dec 2010 00:02:29 -0700, Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_stream2.html There are

Re: streaming redux

2010-12-28 Thread Michel Fortin
On 2010-12-28 18:58:40 -0500, Sean Kelly said: Michel Fortin Wrote: The only thing is that you need to define writeTo (or use the mixin) with any class and subclass you want to serialize. Similar to what I did in C++ then. Gotcha. I never pretended I had overcome the problem of the lack o

Re: streaming redux

2010-12-28 Thread Sean Kelly
Michel Fortin Wrote: > On 2010-12-28 17:19:01 -0500, Sean Kelly said: > > > > And I guess writeTo could just call formatter.write(MyClass c). You're > > right, that works. > > Well, not exactly. I'd expect formatter.write(Object) do be the one > calling writeTo. ... > A typical writeTo might

Re: GC conservatism -- again

2010-12-28 Thread Sean Kelly
Johan Granberg Wrote: > > Acctually I think one reason for low intrest on the druntime list is that > people simply have not heard of it. I for one hasn't. I personally think > more people would read it if it was just another news group on the > digitalmars server. There might be other benefits fo

Re: GC conservatism -- again

2010-12-28 Thread Johan Granberg
Sean Kelly wrote: > Ulrik Mikaelsson Wrote: > >> > I have posted about this problem several times. Never got any replies. >> > I think memory management is D's "elephant in the room" in this regard. >> I'm sorry to agree. I recently brought up this general question in a >> thread called "Mixing G

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 5:14 PM, Haruki Shigemori wrote: (2010/12/28 16:02), Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_st

Re: streaming redux

2010-12-28 Thread Michel Fortin
On 2010-12-28 17:19:01 -0500, Sean Kelly said: Michel Fortin Wrote: On 2010-12-28 13:07:56 -0500, Sean Kelly said: Michel Fortin Wrote: So because of all this virtual dispatch and all this rigidity, I think Formatter needs to be rethought a little. My preference obviously goes to satical

Re: streaming redux

2010-12-28 Thread Haruki Shigemori
(2010/12/28 16:02), Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_stream2.html There are a number of questions in

Re: streaming redux

2010-12-28 Thread sclytrack
class SerializableObject { void describe( PropertyDescription d ) { d.addProperty(...) } } == Quote from Sean Kelly (s...@invisibleduck.org)'s article > Michel Fortin Wrote: > > > > So because of all this virtual dispatch and all this rigidity, I think > > Formatter needs to be rethoug

Re: align(n) not working as expected

2010-12-28 Thread Stewart Gordon
On 28/12/2010 07:41, Robert Jacques wrote: As per the docs, align behaves in the manner of the companion C++ compile. DMC only defines align(1) and align(4), so they're the only two that work. But what is meant to happen if an alignment the companion C compiler doesn't support is used? I wo

Re: streaming redux

2010-12-28 Thread Sean Kelly
Michel Fortin Wrote: > On 2010-12-28 13:07:56 -0500, Sean Kelly said: > > > Michel Fortin Wrote: > >> > >> So because of all this virtual dispatch and all this rigidity, I think > >> Formatter needs to be rethought a little. My preference obviously goes > >> to satically-typed formatters. But w

Re: streaming redux

2010-12-28 Thread Jonathan M Davis
On Monday 27 December 2010 23:02:29 Andrei Alexandrescu wrote: > I've put together over the past days an embryonic streaming interface. > It separates transport from formatting, input from output, and buffered > from unbuffered operation. > > http://erdani.com/d/phobos/std_stream2.html > > There

Re: How do I make/use my own run-time library?

2010-12-28 Thread Don
%u wrote: Hi, I've been trying to make my own run-time library for D, but I've come across a dead end: *any* library I make will inherently depend on SNN.lib, and there are no headers for that C run-time library. How can I write my own library in place of SNN.lib if I do not know what the funct

Re: align(n) not working as expected

2010-12-28 Thread Don
JimBob wrote: "Robert Jacques" wrote in message news:op.voeybap626s...@sandford... On Tue, 28 Dec 2010 00:32:37 -0700, %u wrote: As per the docs, align behaves in the manner of the companion C++ compile. DMC only defines align(1) and align(4), so they're the only two that work. So this isn

Re: D vs C++

2010-12-28 Thread Walter Bright
Jimmy Cao wrote: Anyways, dynamic typing abilities in D would be very nice, and it opens up quite a number possibilities. And D2 has it! See opDispatch.

Re: D Language Custom Google Search

2010-12-28 Thread Chris Dahl
http://stackoverflow.com/questions/tagged/d Hrm. I will have to see if I can figure out how to get Google to crawl to the relevant articles while not getting everything else at stackoverflow. This might be hard since nothing in a specific article's URL indicates the "D" tag.

Re: D Language Custom Google Search

2010-12-28 Thread Chris Dahl
Nice. I will work on adding some of these soon. On Tue, Dec 28, 2010 at 1:49 PM, Andrej Mitrovic wrote: > duckduckgo for the win: > > http://duckduckgo.com/D_%28programming_language%29 > >

Re: D Language Custom Google Search

2010-12-28 Thread Chris Dahl
Thanks for the link! I am putting it on the search page. On Tue, Dec 28, 2010 at 1:39 PM, Adam Ruppe wrote: > You might find my little documentation search useful too. Probably > not for inclusion into your search results, but maybe we could link > to each other. > > http://dpldocs.info > > It i

Re: streaming redux

2010-12-28 Thread Michel Fortin
On 2010-12-28 12:47:26 -0500, Andrei Alexandrescu said: On 12/28/10 11:34 AM, Michel Fortin wrote: As for fine/coarse granularity, that's somewhat true when the stream is buffered before the virtual calls, but do you realize that using Formatter to output bytes can easily result in two virtua

Re: D Language Custom Google Search

2010-12-28 Thread Andrej Mitrovic
I'm already seeing your website listed on duckduckgo btw. ;) On 12/28/10, Andrej Mitrovic wrote: > Nevermind its gmail messing up the quotes. > > On 12/28/10, Andrej Mitrovic wrote: >> Why are websites allowed to mess with my clipboard? I didn't copy that >> wikipedia link.. >> >> On 12/28/10, A

Re: D Language Custom Google Search

2010-12-28 Thread Andrej Mitrovic
Nevermind its gmail messing up the quotes. On 12/28/10, Andrej Mitrovic wrote: > Why are websites allowed to mess with my clipboard? I didn't copy that > wikipedia link.. > > On 12/28/10, Andrej Mitrovic wrote: >> duckduckgo for the win: >> >> http://duckduckgo.com/D_%28programming_language%29 >

Re: D Language Custom Google Search

2010-12-28 Thread Andrej Mitrovic
Why are websites allowed to mess with my clipboard? I didn't copy that wikipedia link.. On 12/28/10, Andrej Mitrovic wrote: > duckduckgo for the win: > > http://duckduckgo.com/D_%28programming_language%29 > > On 12/28/10, Caligo wrote: >> On Tue, Dec 28, 2010 at 9:16 AM, Chris Dahl wrote: >> >>

Re: D Language Custom Google Search

2010-12-28 Thread Andrej Mitrovic
duckduckgo for the win: http://duckduckgo.com/D_%28programming_language%29 On 12/28/10, Caligo wrote: > On Tue, Dec 28, 2010 at 9:16 AM, Chris Dahl wrote: > >> Hi. I am new here (and new to D) and just wanted to share the URL for a >> page that I put together for myself to use as I am learning

Re: D Language Custom Google Search

2010-12-28 Thread Caligo
On Tue, Dec 28, 2010 at 9:16 AM, Chris Dahl wrote: > Hi. I am new here (and new to D) and just wanted to share the URL for a > page that I put together for myself to use as I am learning the language. > > http://d.nuverde.com/ > > This page is just a custom Google search of some of the more comm

D Language Custom Google Search

2010-12-28 Thread Chris Dahl
Hi. I am new here (and new to D) and just wanted to share the URL for a page that I put together for myself to use as I am learning the language. http://d.nuverde.com/ This page is just a custom Google search of some of the more common D related web pages that I have found. My purpose is to hav

Re: streaming redux

2010-12-28 Thread Michel Fortin
On 2010-12-28 13:07:56 -0500, Sean Kelly said: Michel Fortin Wrote: So because of all this virtual dispatch and all this rigidity, I think Formatter needs to be rethought a little. My preference obviously goes to satically-typed formatters. But what I'd like to see is something like this:

Re: GC conservatism -- again

2010-12-28 Thread Sean Kelly
Ulrik Mikaelsson Wrote: > > I have posted about this problem several times. Never got any replies. > > I think memory management is D's "elephant in the room" in this regard. > I'm sorry to agree. I recently brought up this general question in a > thread called "Mixing GC and non-GC in D." in both

Re: streaming redux

2010-12-28 Thread Sean Kelly
Michel Fortin Wrote: > > So because of all this virtual dispatch and all this rigidity, I think > Formatter needs to be rethought a little. My preference obviously goes > to satically-typed formatters. But what I'd like to see is something > like this: > > interface Serializable(F) { >

Re: GC conservatism -- again

2010-12-28 Thread Ulrik Mikaelsson
> I have posted about this problem several times. Never got any replies. > I think memory management is D's "elephant in the room" in this regard. I'm sorry to agree. I recently brought up this general question in a thread called "Mixing GC and non-GC in D." in both druntime and here. Only got one

Re: D vs C++

2010-12-28 Thread Caligo
On Mon, Dec 27, 2010 at 6:41 AM, spir wrote: > On Sun, 26 Dec 2010 12:06:04 -0800 > Walter Bright wrote: > > > 11. generative programming > > Does someone have a pointer to any kind of doc about this? (in D) > > Denis > -- -- -- -- -- -- -- > vit esse estrany ☣ > > spir.wikidot.com > > I just re

Re: Clay language

2010-12-28 Thread Adam Ruppe
Andrej Mitrovic wrote: > Actually, D is equipped to solve even that problem Indeed. Though, that doesn't cover all the uses of shuffling things around. My oauth.d module currently still includes some of my own specific app, like my own api secret. (It was originally hard coded, then I moved it to

Re: streaming redux

2010-12-28 Thread Sean Kelly
Andrei Alexandrescu Wrote: > On 12/28/10 5:09 AM, Vladimir Panteleev wrote: > >> abstract interface Formatter; > > > > I'm really not sure about this interface. I can see at most three > > implementations of it (native, high-endian and low-endian variants), > > everything else being too obscure to

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 11:34 AM, Michel Fortin wrote: On 2010-12-28 11:09:01 -0500, Andrei Alexandrescu said: On 12/28/10 5:09 AM, Vladimir Panteleev wrote: First of all: was ranges-like duck typing considered for streams? The language allows on-demand runtime polymorphism, and static typing allows comp

Re: Clay language

2010-12-28 Thread bearophile
Andrej Mitrovic: > This is much saner than bearophile's "force full qualified names by > default", I have never said that to force that. I have said to not import all names from a module on default. But there are three ways to avoid that when you want it: list the names you want, use a star, or

Re: D vs C++

2010-12-28 Thread bearophile
Sean Kelly: > Yeah, I mulled it over and figured out how this works. For long-running > sequences of code I imagine it's quite fast. CorePy also allows to write loops in a higher level style, to produce efficient code (unrolled, and maybe tiled too) with short code. Bye, bearophile

Re: streaming redux

2010-12-28 Thread Michel Fortin
On 2010-12-28 02:02:29 -0500, Andrei Alexandrescu said: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_stream2.html There are a number o

Re: Clay language

2010-12-28 Thread Andrej Mitrovic
On 12/28/10, Adam Ruppe wrote: > That's not the only bad part. It also means refactoring your modules > requires changes to the user code too. See my other post here: Actually, D is equipped to solve even that problem. If you really want to use fully qualified names and reserve the right to renam

Re: streaming redux

2010-12-28 Thread Michel Fortin
On 2010-12-28 11:09:01 -0500, Andrei Alexandrescu said: On 12/28/10 5:09 AM, Vladimir Panteleev wrote: First of all: was ranges-like duck typing considered for streams? The language allows on-demand runtime polymorphism, and static typing allows compile-time detection of stream features for a

Re: streaming redux

2010-12-28 Thread jovo
Daniel Gibson Wrote: > > Question: May we eliminate seekFromCurrent and seekFromEnd and just > > have seek with absolute positioning? I don't know of streams that > > allow seek without allowing tell. Even if some stream doesn't, it's > > easy to add support for tell in a wrapper. The marginal

Re: Clay language

2010-12-28 Thread Adam Ruppe
sybrandy wrote: > Now, the nice thing about this is that you immediately see what > module this function came from. Yes, that's like a static import in D. You can also use fully qualified names with a standard import: std.stdio.File -- optional long form for File static import std.stdio; // you

Re: streaming redux

2010-12-28 Thread jovo
Daniel Gibson Wrote: > > Question: May we eliminate seekFromCurrent and seekFromEnd and just > > have seek with absolute positioning? I don't know of streams that > > allow seek without allowing tell. Even if some stream doesn't, it's > > easy to add support for tell in a wrapper. The marginal

Re: Clay language

2010-12-28 Thread sybrandy
On 12/28/2010 11:49 AM, Adam D. Ruppe wrote: Let me tell a horror story about what is definitely bad modularity: something that happened in the old PHP app. (I might pick on PHP a lot, but that's just because it is the language I have the most professional experience in so I've seen a lot of its

Re: streaming redux

2010-12-28 Thread SHOO
(2010/12/28 16:02), Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_stream2.html There are a number of questions in

Re: align(n) not working as expected

2010-12-28 Thread JimBob
"Robert Jacques" wrote in message news:op.voeybap626s...@sandford... > On Tue, 28 Dec 2010 00:32:37 -0700, %u wrote: > > > As per the docs, align behaves in the manner of the companion C++ compile. > DMC only defines align(1) and align(4), so they're the only two that work. > So this isn't a

Re: Clay language

2010-12-28 Thread Adam D. Ruppe
Let me tell a horror story about what is definitely bad modularity: something that happened in the old PHP app. (I might pick on PHP a lot, but that's just because it is the language I have the most professional experience in so I've seen a lot of its horrors first hand. That, and it is a godawful

Re: streaming redux

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 5:09 AM, Vladimir Panteleev wrote: On Tue, 28 Dec 2010 09:02:29 +0200, Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani

Re: Clay language

2010-12-28 Thread Adam D. Ruppe
> While you read a module code you don't know where the imported > names it uses come from. That's a feature. Let me give an example. I recently wrote an OAuth implementation for my web app. I started off by writing it all in one module, the one where it was used. That was ok until I wanted to us

Re: D vs C++

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 9:48 AM, Sean Kelly wrote: Andrei Alexandrescu Wrote: On 12/28/10 9:30 AM, Sean Kelly wrote: Don Wrote: bearophile wrote: Je'rome M. Berger: I have almost never used inline assembler even in languages that support it. Of course, this is only a sub-point of your point 6: using

Re: D vs C++

2010-12-28 Thread Sean Kelly
Andrei Alexandrescu Wrote: > On 12/28/10 9:30 AM, Sean Kelly wrote: > > Don Wrote: > > > >> bearophile wrote: > >>> Je'rome M. Berger: > >>> > I have almost never used inline assembler even in languages that support > it. Of course, this is only a sub-point of your point 6: using inline

Re: streaming redux

2010-12-28 Thread Andrej Mitrovic
On 12/28/10, Andrei Alexandrescu wrote: > http://erdani.com/d/phobos/std_stream2.html What exactly is the difference between an interface and an abstract interface..?

Re: D vs C++

2010-12-28 Thread Andrei Alexandrescu
On 12/28/10 9:30 AM, Sean Kelly wrote: Don Wrote: bearophile wrote: Je'rome M. Berger: I have almost never used inline assembler even in languages that support it. Of course, this is only a sub-point of your point 6: using inline assembly in a language as slow as Python would be completely

Re: D vs C++

2010-12-28 Thread Sean Kelly
Don Wrote: > bearophile wrote: > > Je'rome M. Berger: > > > >> I have almost never used inline assembler even in languages that support > >> it. Of course, this is only a sub-point of your point 6: using inline > >> assembly in a language as slow as Python would be completely pointless.< > > >

Re: Contracts in library code

2010-12-28 Thread Sean Kelly
bearophile Wrote: > To solve the problem with Contracts in library code (like in Phobos or in > user-created libraries) is it possible to let DMD (asking it with a compiler > switch, I presume) compile and put inside the library two versions of each > function/method, with differently mangled n

Re: streaming redux

2010-12-28 Thread Daniel Gibson
Am 28.12.2010 08:02, schrieb Andrei Alexandrescu: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_stream2.html There are a number of questions

Re: Clay language

2010-12-28 Thread Don
bearophile wrote: Stanislav Blinov: ...which quickly expands to a lot of *long* import lines, with "don't forget to add another" constantly pushing the door-bell. That's redundancy is "making your subsystems interfaces explicit". I see that you and other people here fail to understand this,

Re: Clay language

2010-12-28 Thread Lutger Blijdestijn
bearophile wrote: > Andrei: > >> FWIW I just posted a response to a question asking for a comparison >> between Clay and D2. >> >> http://www.reddit.com/r/programming/comments/es2jx/clay_programming_language_wiki/ > > Just few comments: > >> The docs offer very little on Clay's module system

Re: Clay language

2010-12-28 Thread Stanislav Blinov
On 12/28/2010 03:26 PM, bearophile wrote: Stanislav Blinov: ...which quickly expands to a lot of *long* import lines, with "don't forget to add another" constantly pushing the door-bell. That's redundancy is "making your subsystems interfaces explicit". I see that you and other people here f

Re: Phobos usability with text files

2010-12-28 Thread spir
On Mon, 27 Dec 2010 18:21:24 + (UTC) Ary Borenszweig wrote: > If the function is left as is I expect questions about "Why isn't this > working?" > for it to appear on D.learn about 1 time each month. > > Exactly like what happens with property += value and other things that lead to > incorr

Re: Clay language

2010-12-28 Thread bearophile
Stanislav Blinov: > ...which quickly expands to a lot of *long* import lines, with "don't > forget to add another" constantly pushing the door-bell. Walter: > Reading about a language is not good enough to make such decisions. You need > to > have considerable experience with them. I've seen a

Re: "The D Programming Language" : Still valid?

2010-12-28 Thread Klaim
Thanks for your answers everybody! Andrei> Ok so I guess I'll continue with the book. I only installed the last dmd and VS2010 extension to work with so I'm not yet hitting the missing features. Gour> Ok thanks I'll read that. Caligo> Yes, some kind of roadmap would help. When a release is planned

Re: D vs C++

2010-12-28 Thread Walter Bright
KennyTM~ wrote: In pure Python you bind C code with the 'ctypes' module. from ctypes import * xso = CDLL('x.so') xso.fooC.restype = c_double xso.fooC.argtypes = [c_int] ... xso.fooC(4) Compare that with: extern(C) double foo(int); foo(4); and you don't need to build a .so either.

Re: Phobos usability with text files

2010-12-28 Thread spir
On Sun, 26 Dec 2010 12:53:29 -0500 Michel Fortin wrote: > On 2010-12-26 12:13:41 -0500, Andrei Alexandrescu > said: > > > On 12/26/10 10:12 AM, bearophile wrote: > >> This is related to this (closed) issue, but this time I prefer to > >> discuss the topic on the newsgroup: > >> http://d.purem

Re: Clay language

2010-12-28 Thread Walter Bright
bearophile wrote: bearophile: import foo: all*; // imports all names in the "all" name pack Or just: import foo.all: *; Better yet: import foo.all; and it's even implemented!

Re: Clay language

2010-12-28 Thread Walter Bright
bearophile wrote: (Reading about safer language subsets like SPARK and MISRA I have learnt that having a language safe on default is better Reading about a language is not good enough to make such decisions. You need to have considerable experience with them. I've seen a lot of claims about l

Re: Clay language

2010-12-28 Thread bearophile
Stanislav Blinov: > ...which quickly expands to a lot of *long* import lines, with "don't > forget to add another" constantly pushing the door-bell. That's redundancy is "making your subsystems interfaces explicit". I see that you and other people here fail to understand this, or just value a b

Re: D vs C++

2010-12-28 Thread Max Samukha
On 12/27/2010 07:09 PM, Andrei Alexandrescu wrote: On 12/27/10 2:19 AM, Gour wrote: On Sun, 26 Dec 2010 14:33:25 -0600 "Seth" == Seth Hoenig wrote: Seth> This is certainly a personal preference, but I would add static Seth> typing to that list. +1 Conversely, I wonder how we can improve th

Re: Clay language

2010-12-28 Thread Stanislav Blinov
On 12/28/2010 11:19 AM, bearophile wrote: Adam D. Ruppe: That's the ideal situation. Writing out qualified paths by default is just awful, and I can't understand why you keep asking for it. Importing all names from a module on default is against modularity. While you read a module code you d

Contracts in library code

2010-12-28 Thread bearophile
To solve the problem with Contracts in library code (like in Phobos or in user-created libraries) is it possible to let DMD (asking it with a compiler switch, I presume) compile and put inside the library two versions of each function/method, with differently mangled names? So when you import a

Re: streaming redux

2010-12-28 Thread Vladimir Panteleev
On Tue, 28 Dec 2010 09:02:29 +0200, Andrei Alexandrescu wrote: I've put together over the past days an embryonic streaming interface. It separates transport from formatting, input from output, and buffered from unbuffered operation. http://erdani.com/d/phobos/std_stream2.html There are

Re: D vs C++

2010-12-28 Thread Jimmy Cao
On Tue, Dec 28, 2010 at 3:03 AM, Don wrote: > bearophile wrote: > >> Je'rome M. Berger: >> >> I have almost never used inline assembler even in languages that support >>> it. Of course, this is only a sub-point of your point 6: using inline >>> assembly in a language as slow as Python would be c

Re: Inline asm expressions for ranged integrals?

2010-12-28 Thread bearophile
> Is it possible to fix bug 4331? Sorry, I think fixing bug 4331 is not necessary to implement good enough ranged integrals. The out of range tests are enough inside the getter and setter @properties. Bye, bearophile

Re: D vs C++

2010-12-28 Thread Don
bearophile wrote: Je'rome M. Berger: I have almost never used inline assembler even in languages that support it. Of course, this is only a sub-point of your point 6: using inline assembly in a language as slow as Python would be completely pointless.< For scientific computing this is bette

Inline asm expressions for ranged integrals?

2010-12-28 Thread bearophile
The many things Andrei keeps explaining (teaching) me have changed the way I desire the "ranged integrals" in D. Now I'd like means to implement "good enough" library-defined ranged integrals in D2, instead of just having them built-in. I think currently D2 offers a good enough syntax to implem

Re: align(n) not working as expected

2010-12-28 Thread %u
Interesting... I didn't know that only two are supported. Thank you for the information!

Re: Clay language

2010-12-28 Thread bearophile
bearophile: > import foo: all*; // imports all names in the "all" name pack Or just: import foo.all: *; Bye, bearophile

Re: D vs C++

2010-12-28 Thread Jimmy Cao
On Mon, Dec 27, 2010 at 11:58 AM, bearophile wrote: > we could type with a few additional keystrokes: > > COMObj objDoc = COMObj.create("Word.Application"); > objDoc.invoke("Open", new COMData[] { new COMString(strFilename) }; > > Now that it's been mentioned, dynamic typing abilities within D wo

  1   2   >