Re: Announcing: D support in SWIG

2010-11-21 Thread BCS

Hello klickverbot,


In a nutshell, SWIG is a »glue code« generator, allowing you to access
C/C++ libraries from various target languages, including C#, Go, Java,
Ruby, Python . and, since I merged my work into SWIG trunk a few days
ago, also D, both version 1 and 2.



I'm so tempted to go learn Go so I can write a program that's half D, half 
Go and some SWIG to tie the two together.





Re: totally OT: Re: TDPL in Russian

2010-11-12 Thread BCS

Hello Nick,


Pavel Vozenilek pavel_vozeni...@yahoo.co.uk wrote in message
news:ibjrca$158...@digitalmars.com...


And one little thing: the Czech Republic is part of the Central
Europe.
Saying it belongs to the Eastern Europe is a reliable way to upset
the Czechs, for rather complex historical reasons.


If a Yank can tell you something's in Europe at all, he's doing good. If 
he can tell you where (geographically) in Europe it is without a map... but 
I'm just being cynical.


OTOH a fair number of us can't even do that for all 50 states.


Good to know. I'm a total ignorant american when it comes to those
things.





Re: New home page

2010-10-04 Thread BCS

Hello Nick,


BCS n...@anon.com wrote in message
news:a6268ff1d6668cd315bbe9b6...@news.digitalmars.com...


are you in china?


Unless
the browser is stupid enough to actually try to load external scripts
when JS is off...


1) You are assuming some third party isn't an idiot. I wouldn't usually bet 
on that one.
2) there could be some sort of CSS/img/etc. component to it that doesn't 
get ignored.


Point being that the whole web is so stinking complicated the only way to 
tell what the effects of blocking something are is to block it and see.


--
... IXOYE





Re: New home page

2010-10-04 Thread BCS

Hello Nick,



http://www.digitalmars.com
http://www.digitalmars.com/dmlogo.gif
http://www.digitalmars.com/download.png
http://www.digitalmars.com/library.png
http://www.digitalmars.com/news.png
http://www.digitalmars.com/buy.png


where is favicon.ico?


So at least in FF2 with JS disabled via NoScript, twitter doesn't get
referenced by the client. Or at least if HttpFox is to be trusted, but
I've never had a problem with it.


--
... IXOYE





Re: New home page

2010-10-03 Thread BCS

Hello Nick,


Lionello Lunesu l...@lunesu.remove.com wrote in message
news:i8bf68$s5...@digitalmars.com...


Twitter is blocked in China, so when I open your
website nothing is shown until the connection to twitter times out.


Works fine with JS off.


are you in china?


--
... IXOYE





Re: dmd 1.064 and 2.049 release

2010-09-16 Thread BCS

Hello Walter,


This is primarily a bug fix release.


And that it is! Great job!

--
... IXOYE





Re: MatD - Matlab external interface bindings for D

2010-08-16 Thread BCS

Hello Trass3r,


I've created some bindings to access Matlab's external interface from
D, i.e. manipulating .mat files, accessing the current workspace and
creating  .mex files.

Thought I'd share it:
http://bitbucket.org/trass3r/matd/wiki/Home



If you are looking for a place to host that I can get you access to: 
http://dsource.org/projects/scrapple

--
... IXOYE





Re: In the Bay Area on August 11?

2010-08-02 Thread BCS

Hello Ali,


== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
article


I've been kindly invited by the ACCU Silicon Valley Chapter to give a
talk on D at their next meeting. The talk starts at 7:00pm on
Wednesday,
August 11 and takes place in Mountain View. Attendance is free and
opened to everyone. For details:
http://accu.org/index.php/accu_branches/accu_usa/next
The talk will use the same slides as my Google talk. I'll give away a
few free copies of TDPL as prizes to the persons who ask the most
embarrassing questions.
Hope to see many of you there!
Andrei

Grrr! I have to publicly whine about my timing problem.

I am a member of the ACCU and an active member who takes part in
organizing the monthly talks in Silicon Valley; I live 5 minutes from
the meeting location; I work 5 minutes from there too.

But unfortunately I am on the other side of the globe on the 11th,
organizing mini D meetings in Turkey.



Well, at least you have a really good excuse :)



I will be in the area on the 13th. Perhaps he will still be around? :)



I'd be up for a get together after work on the 13th (provided I can get to 
it).



Ali


--
... IXOYE





Re: In the Bay Area on August 11?

2010-08-02 Thread BCS

Hello BCS,


I'd be up for a get together after work on the 13th (provided I can
get to it).


Scratch that, I've got a conflict.

--
... IXOYE





Re: In the Bay Area on August 11?

2010-08-02 Thread BCS

Hello Mike,


Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message
news:i353ak$1n...@digitalmars.com...


I'll give away a
few free copies of TDPL as prizes to the persons who ask the most
embarrassing questions.


Is that to the embarrassment of the questioner or the questionee ;-)



Based off the last talk, the questionee.

--
... IXOYE





Stackoverflow has added per tag wiki pages.

2010-08-01 Thread BCS
I've seeded the D tag's page from the D front page. If anyone wants to improve 
it but doesn't have access, send me the text.


http://stackoverflow.com/questions/tagged?sort=infotagnames=d

--
... IXOYE





Re: Emerging Languages Conference next week!

2010-07-24 Thread BCS

Hello Walter,


Yes, I receive a lot of information via the back channel that I
can't discuss more than that.



Can you give a ball park on how many?

--
... IXOYE





Re: D talk at Google

2010-07-22 Thread BCS

Hello Andrei,


Benjamin Shropshire from Google was kind enough to extend me an
invitation on behalf of his employer to give a talk on D on Friday,
July 30, 11:00 am in or around Building 43. I'm not sure whether the
talk will be taped but they asked me to sign a video release form so
there is a possibility.


FWIW: unless I mess something up, it will be taped and put on-line.



If you work at Google, I'd be thrilled if you joined (contact Benjamin
for details about the exact location). If you have friends at Google
and can make the time, you may want to ask them if you could attend.

Wish me luck!

Andrei


--
... IXOYE





Re: D web site facelift

2010-07-02 Thread BCS

Hello Walter,


David Gileadi was kind enough to spend some time redesigning the look
of the D web site. A preview of it is up on
d-programming-language.org. This isn't about the content, just the
look/style/feel.

Comments welcome.



I like it visually but I found it to hard to find the documentation (The 
language and lib documentation root pages should be linked from all pages).



Please don't put links to anything other than the front page yet, as
the organization may change.


--
... IXOYE





Re: D web site facelift

2010-07-02 Thread BCS

Hello Adam,



On Internet Explorer, the size looks OK, but the menu text has poor
contrast. The mouse hover color looks better than the regular color.



Ditto, chrome.

--
... IXOYE





Re: fedora will get ldc and tango in official repo

2010-06-26 Thread BCS

Hello bioinfornatics,


because not all is in open License, i read this:
http://www.prowiki.org/wiki4d/wiki.cgi?PhobosLicenseIssues



Looking at it I don't recognize what license most of it is under but IIRC 
it's supposed to all be all under the boost license. I do know that Walter 
has been careful to only put in code that can be freely used (if not fully 
open source).


--
... IXOYE





Re: Code::Blocks 10.05

2010-05-31 Thread BCS

Hello Matthias,


Sadly they haven't applied my patches for D (uploaded on 12.April)
and many new users are overstrained with applying patchtes and compile
it per hand, ...
:(


When was the last time you buged them about it?

--
... IXOYE





Re: Visual D 0.3.9. released

2010-05-29 Thread BCS

Hello Lionello,


(It crashed when I started typing pragma (comment,...);
and I'm not sure that syntax is even correct.



The syntax is correct, but I didn't think comment is a supported pragma.

--
... IXOYE





Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread BCS

Hello superdan,



dun tell me it dun work. i dun explain shit again. it works coz a
struct cant be null. but a struct can be a ref if it only haz one
pointer inside. methinks the builtin hash iz dat way.




void foo(container!shit poo)
{
if(!poo) poo = new container!shit; // fuck dat shit
poo.addElement(Shit(diarrhea));
}
dat sucks bull ballz.


That code is broken, if poo is of a class type, that just new's a container, 
adds an element, and then drops the reference to get GC'ed. To many it do 
anything generally useful, it would need to have another level of indirection.


--
... IXOYE





Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread BCS

Hello Vladimir,


On Thu, 20 May 2010 04:42:35 +0300, Steven Schveighoffer
schvei...@yahoo.com wrote:


interfaces


Does that imply that the most important methods are virtual?

If so, say good-bye to inlining, and hello to an additional level of
dereferencing.



From a technical standpoint there is no reason that a method needs to be 
called virtually from a class reference just because the same method gets 
called virtually from an interface reference.


--
... IXOYE





Re: dmd 1.061 and 2.046 release

2010-05-16 Thread BCS

Hello Charles,


On 05/15/2010 06:13 PM, BCS wrote:


The same holds for every file in /usr/bin, I wonder what that says
about all the other people who put stuff there. Similar thought hold
for the other bits and places.


/usr/bin is for system installed executables.  It's bad practice to
put other things there.  I could see installing them to /usr/local/bin
, /usr/opt/bin or /home/$USER/bin, but otherwise just leaving them
where they're unzipped is quite reasonable.  (Each of the approaches
has their own particular reason why they're a good idea.  E.g.
/usr/local/bin is easy to share with other users on the system.


#if you are assuming DMD is being installed by an un privileged user

By all means, run it from where it got unziped. In fact if I were admin on 
the system I'd discourage anyone from running binaries owned by another user. 
If they want it but can't talk me into installing it for everyone, then build 
your own. I think there might be security problems with doing it the other 
way.


#else

Follow the lead of most every other program out there and put things where 
they belong.


#endif



I'm
not sure why /usr/opt/bin, but some have, historically, preferred it.
/home/$USER/bin allows sharing libraries within a single user.  And
just leaving it where you unzipped it facilitates having multiple
versions of the same program available.)



--
... IXOYE





Re: dmd 1.061 and 2.046 release

2010-05-16 Thread BCS

Hello linux,



The site looks like it was created using some generic boring
documentation tool with a basic minimalistic style template. It might
attract some developers who think that javadoc or doxygen looks a bit
too artistic for their taste and their largest goal in life is to win
the international dryness competition. The content of the
documentation is a bit too grammar oriented. Hopefully the coming book
will solve this issue.


For documentation, my primary requirements are that it be clear, correct 
and informative. A fair distance after that comes nice prose and that it 
be at least as visually readable as a simple text file in a text editor. 
A *long* ways after that comes any style goals. I'll take an understandable 
document, done as a plain default HTML file over the best presentation anyone 
can do if it gets me even a moderate improvement in the first three points.


--
... IXOYE





Re: dmd 1.061 and 2.046 release

2010-05-15 Thread BCS

Hello Adam,


On 5/15/10, Bernard Helyer b.hel...@gmail.com wrote:


Set executable bit, modify PATH


Meh, you don't have to do that. On my box, I have a wrapper script in
/usr/bin
so the dmd command works from anywhere, but you can just as well run
it right out of wherever you download it too. ./dmd works just as well
as dmd.

I've a little script that copies the executables into /usr/bin, the
manpages into manpage land, the docs into /usr/share/docs/dmd,
imports into /usr/include/d and the libraries into /usr/lib, and so
on.


Ew, why? I guess if you have a script it is ok for you, but there's
really no need to take it out of the folders where they are at the
unzip.



The same holds for every file in /usr/bin, I wonder what that says about 
all the other people who put stuff there. Similar thought hold for the other 
bits and places.



--
... IXOYE





Re: dmd 1.061 and 2.046 release

2010-05-15 Thread BCS

Hello Nick,


BCS n...@anon.com wrote in message
news:a6268ff13bd08ccc27164400...@news.digitalmars.com...


The same holds for every file in /usr/bin, I wonder what that says
about all the other people who put stuff there. Similar thought hold
for the other bits and places.


Maybe it's my windows upbringing, but I've never liked the idea of
having each of my apps spread all across the whole filesystem.



There is something to be said for that, but at least with Linux it's *only* 
the filesystem that it gets spread across (registry).


I think this is a case where the phrase when in Rome is a good starting 
point.


--
... IXOYE





Re: dmd 1.060 and 2.045 release

2010-05-10 Thread BCS

Hello Steven,


Several others have privately brought up this problem to Walter. He
does not want to change how the symbol lookup tables work, and there
is no way to iterate them.



Is it fundamentally impossible to iterate or is the code just not there and/or 
nasty to write?


--
... IXOYE





Re: dmd 1.060 and 2.045 release

2010-05-06 Thread BCS

Hello Walter,


Walter Bright wrote:


Alex Makhotin wrote:


It takes ~40 seconds 50% load on the dual core processor(CentOS 5.3
kernel 2.6.32.4), to get the actual error messages about the
undefined identifier.


Definitely there's a problem.


The problem is the spell checker is O(n*n) on the number of characters
in the undefined identifier.



How about switch algos for long identifiers: you could bucket the knows by 
length and compare histograms on things of similar length. Or maybe just 
turn it off for long names. 


--
... IXOYE





Re: TDPL is #75 on the bestselling list at bestbookbuys.com

2010-04-22 Thread BCS

Hello Steven,


I have a feeling that bestwebbuys counts a purchase when you click
on  the referring BUY link to e.g. amazon, even if you don't buy the
book at  that site.



In that case it's counting interest in books, not sales. That's a different 
but also interesting metric.


--
... IXOYE





Re: dmd 1.058 and 2.043 release

2010-04-10 Thread BCS

Hello Walter,


bearophile wrote:


Walter Bright:

Thank you for your answer.


The error is not a mismatched file name, which is perfectly
legitimate in D.


Do you mean that in D it is OK to have a file named foo.d with
inside it at the top written module bar; ?


Yes.


What's the rationale behind this? (I don't like this).


The flexibility comes in handy now and then.



For example, having foo_linux.d and foo_win.d both claiming to be foo.


--
... IXOYE





Re: dmd 1.058 and 2.043 release

2010-04-10 Thread BCS

Hello Robert,


No need for a huge module, or module names mismatching file names:

module foo;
version (linux) import foo_linux;
version (Windows) import foo_win;

Sure it adds and extra file, it's a lot cleaner imo than having a huge
module with both implementations or mismatching file/module names.


I don't think that works in one case; where you are forced to use fully qualified 
name.


import foo;
import something.else;

bar(); // calls  something.else.bar;
foo.bar(); // IIRC this don't work

OTOH, you might be able to get around that with the following:

version (linux) { import foo_linux; alias foo_linux foo; }
version (Windows) { import foo_win; alias foo_win foo; }

(I haven't tested any of that because my systems are being shipped right 
now.)


--
... IXOYE





Re: dmd 1.058 and 2.043 release

2010-04-10 Thread BCS

Hello bearophile,


BCS:


I don't think that works in one case; where you are forced to use
fully qualified name.


You can probably use a public import.



IIRC, all that does is make anything that imports you, import that as well. 
It doesn't do anything to the names.


--
... IXOYE





Re: dmd 1.058 and 2.043 release

2010-04-10 Thread BCS

Hello bearophile,


BCS:


IIRC, all that does is make anything that imports you, import that as
well. It doesn't do anything to the names.


I meant to create a module named foo with inside:

module foo;
version (linux) public import foo_linux;
version (Windows) public import foo_win;
The module system has numerous holes (that Walter will need to take a
look at, because three of them alone cover almost 10% of all bugzilla
votes), so this is not going to work perfectly, but now if you import
foo you have available all the names inside foo_linux and foo_win.


That's exactly what I thought you were suggesting.

The problem is that, IIRC and assuming foo_linux and foo_win both contain 
a bar, the the following still doesn't work:


foo.bar();

what works is:

foo_linux.bar();

or

foo_win.bar();

In the case that just bar() doesn't work (say there is another bar somewhere 
else), you're sunk.


--
... IXOYE





Re: Decimal Arithmetic module available

2010-03-15 Thread BCS

Hello Don,


Paul D. Anderson wrote:


I've been working on an arbitrary-precision floating-point module for
a while and have uploaded the source to DSource.
(www.dsource.org/projects/decimal)

It's an implementation of the General Decimal Arithmetic
Specification, Version 1.70, March 2009.
(www.speleotrove.com/decimal). It contains most of the specified
arithmetic operations (except exponential and logarithmic operations)
and miscellaneous operations (except for logical and rotate/shift
operations).

I would appreciate feedback, especially with regard to the
implementation of the context for the operations.

The current implementation compiles with D version 2.30, so does not
incorporate the new operator overloading.

Paul


Awesome! Hmm, I really need to get my BigInt modules into D2 so that
you can use them.



Ditto my united type: 
http://www.dsource.org/projects/scrapple/browser/trunk/units/si2.d
(I'll tweak it and/or the license as needed to get it in).

Maybe we need a std.arithmetic.* for all the a little more than just a number 
types.


--
... IXOYE





Stack tracing assert for linux/D2

2010-03-04 Thread BCS

I just created a module that generates stack traces on asserts (D2):

http://www.dsource.org/projects/scrapple/browser/trunk/backtrace_assert/debugging.d

Just compile and link it.

It does have some not exactly ideal bits:

-it won't work nicely unless you link with gcc and add the -rdynamic flag.
-accessing some of the posix stuff fubared my link (unresolved ModuleInfos) 
so I had to add the prototypes directly (yuck)
-it uses the c function dprintf that on some system does what I want (print 
to a low level file stream) and on some system does something totaly different.

-it has the expected executable name and the location of addr2line hard coded

(any ideas on how to fix these issues welcomed)

--
... IXOYE





Re: dmd beta mailing list

2010-01-05 Thread BCS

Hello Walter,


grauzone wrote:


Why are you creating these as mailing lists and not as
news.digitalmars.com groups?


Because I expect it to be very low traffic, and I wouldn't expect
people to constantly have to check the n.g. to see if the beta is
available. 


A decent NG client will do that for them and then pop up a notification window.


It also gives feedback on who actually cares about the
beta.



OTOH that's a valid point, up to a point. What about lurkers?




Re: dmd 1.055 and 2.039 release

2010-01-03 Thread BCS

Hello Walter,


digited wrote:


Walter Bright Wrote:


Fixes the Tango build breaks.


With RC's, you'll never need this.


I put out a beta to the people who have asked to be on the beta
announcement list, and nobody (other than Don) gave any feedback on
it. If you want to be on the beta list, please email me.

Or on second thought, perhaps I'll ask Brad to set up a beta mailing
list.



If you do, please add a link to it to the D front page. (I might be interested 
later but not now)





Re: dmd 1.054 and 2.038 release

2009-12-31 Thread BCS

Hello Walter,


Happy New Year!

http://www.digitalmars.com/d/1.0/changelog.html
http://ftp.digitalmars.com/dmd.1.054.zip
http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.038.zip
Many thanks to the numerous people who contributed to this update.




New updates, Always nice to see! Damn, I like to see those long list of bugs!




Re: dmd 1.053 and 2.037 release

2009-12-11 Thread BCS

Hello Walter,


How do we fix the CPU? ;-)


I was thinking 220VAC might help!



That one way to be totally sure what is wrong with your CPU.




Re: Metaprogramming in D : Some Real-world Examples

2009-11-24 Thread BCS

Hello Lutger,


Walter Bright wrote:


Looks like Bill Baxter is giving a presentation on D Nov. 18!

http://www.nwcpp.org/


slides are there! Very pretty, I bet it was a fine presentation. The
slides are informative, good examples.



re: the slides, are they avalable in .ppt or pdf for us ludites?




Re: Progopedia - encyclopedia of programming languages

2009-11-23 Thread BCS

Hello Phil,


On the C++ page, I see:

Physical (shallow) equality a == b
Physical (shallow) inequality   a != b
Deep equality   *a == *b (a and b are pointers)
Deep inequality *a != *b (a and b are pointers)
On the D page, I see:

Physical (shallow) equality x == y
Physical (shallow) inequality   x != y
Deep equality   x is y
Deep inequality x !is y
I'm not sure which is right, but I don't think they can both be right
as  x is y is more like x == y in C++ than *x == *y. I might be
wrong  here; as I am a bit confused about this.



I think you are correct is in D does to pointers what == does in C++.




Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread BCS

Hello Michel,


Really? Can't you just partition your hard disk in two for 10.5? I'm
not saying you should take the burden of testing with both, but saying
you can't install 10.5 alongside 10.6 seems dubious to me:

1. Use Disk Utility to resize your current partition and create a new
one.
2. Boot using your 10.5 installer DVD and install on the new
partition.
3. Press option at startup to see a boot menu; open the Startup
preference pane to set the default boot partition (or use bless on
the command line).


IIRC Walter mentioned in the NG that his mac box is running as a headless 
box in the basement somewhere so boot switching might be annoying.





Re: dmd 1.048 and 2.033 releases

2009-10-05 Thread BCS

Hello Walter,


#ponce wrote:


I think it's disabled in debug mode to keep the compilation time low.


That, and the optimizer tends to scramble the relationship between
source and assembler, making source debugging next to impossible.



How hard would it be to have the code generate run on the unoptimized code 
and then do the optimizer backed test and only if no bugs jump out, move 
the results into the object file? 





Re: DMD svn and contract inheritance

2009-10-05 Thread BCS

Hello Walter,


I can set it
up to automatically build dmd after a commit, and run dstress/build
popular projects and libraries


The problem is if some package fails, then I have a large debugging
problem trying to figure out unfamiliar code.



Or it could just inform the owner of the lib and they can cut out a test 
cases or even do most of the detective work for you.





Re: spiritd

2009-08-31 Thread BCS

Hello div0,



Maybe your just using a tiny resolution?
(does anybody use less than 1680x1050 these days?)


Right now I'm running at 1024X600 on a netbook, and mobile devices will go 
even smaller. Also, I've heard that people tend to quit using the whole screen 
for apps once they get to large enough but rather put things in corners.





Re: Descent, now with Open Type Hierarchy

2009-07-30 Thread BCS

Reply to Robert,


BCS wrote:


Major suggestion:

The auto compleat drop down is very un-aggressive. I'd love to see it
be Google style sort based rather than ordered-list/browse based.


JDT definitely has this and Descent has some.



(I'll admit I don't know much about how the auto-compleat works in descent 
because I've never gotten it to work correctly at all)



(or to a lesser extent, if they have members that are of the correct
type), and do infix matches rather than just prefix matches.


Infix matches would be cool, but... where should they be presented in
the list?


Sort based on how close to the start of the name the match is: prefix matches 
end up at the top, suffix matches just above non matches.




There is a feature in the Open Type dialog where you can type
acronyms, i.e. DQL and get DatabaseQueryListener as a suggestion.
Not sure how practical/useful this would be to implement in
autocomplete.



will it find it if I ask out of order? Say, QDL?


Also nice would be history based sorting (the more often I use
something, the higher up it is).


VS has this  it's a nice feature.



Only kind of. I've never seen VS reorder entries in the drop down, so it 
can only places the start location on the most recent item. I'd want that 
one at the top of the list and then the rest sorted based on how recently 
I used them and how often I've used them in the last few hours or days.





Re: C++0x Concepts - Dead?

2009-07-16 Thread BCS

Reply to Nick,


Hmm, but I guess it does allow match/not-match to
be determined by arbitrary compile-time expressions. Is there another
benefit to the constraints that I'm missing?



Not that I know of (but that says very little :). It might be a good rule 
of thumb to never directly use the simple is(T:U) in a template constraint.





Re: dmd 1.046 and 2.031 releases

2009-07-16 Thread BCS

Reply to bearophile,


John C:


Did you not read the change log?
Implicit integral conversions that could result in loss of
significant bits are no longer allowed.

This was the code:
ubyte m = (n = 0 ? 0 : (n = 255 ? 255 : n));
That last n is guaranteed to fit inside an ubyte (yes, I understand
the compiler is not smart enough yet to understand it, but from the
things explained by Andrei I have thought it was. So I am wrong and I
have shown this to other people, that may be interested. I have also
encouraged to make the compiler smarter to avoid a cast in such case,
because this is a single expression, so range propagation is probably
not too much hard to implement given the current design of the
front-end. You have missed most of the purposes of my post).

Bye,
bearophile


I'm going with Steven on this one. Making the legality of code dependent 
on it's semantics is risky because it then ends up with bazaar portability 
issues or requiters that the scope of the semantics analysts engine be part 
of the language spec.





Re: C++0x Concepts - Dead?

2009-07-16 Thread BCS

Reply to Jarrett,


I was thinking it'd be more intuitive if constraints - which are more
general - would be used to implement specialization.  That is,

template X(T: A, U: B)

would basically be syntactic sugar for

template X(T) if(is(T: A)  is(U: B))

Then you have only a single system of specialization and constraining
to worry about.  How would best matching work?  The compiler could
definitely be smart enough to pick apart the logical expression in the
constraint,


My thought on this is discard non `is(T:U)` terms and expand the expressions 
into a set of simple AND expressions:


- discard any template options where the expression fails
- replace all sub trees other than AND, OR and `is(T:U)` nodes with their 
evaluated value.

- expand to disjunctive normal form 
(http://en.wikipedia.org/wiki/Disjunctive_normal_form)
- discard false disjuncts
- discard negated terms
- treat each disjunct or each template options as it's own specialization 
option and apply the current partial ordering rules.





Re: C++0x Concepts - Dead?

2009-07-16 Thread BCS

Reply to Walter,


How could I do partial ordering if one constraint expression accepts
only odd integers? 


you wouldn't, but rather ignore that clause and mine the constraints that 
you would use out of the expression (see my post for details)





Re: C++0x Concepts - Dead?

2009-07-16 Thread BCS

Reply to Walter,


BCS wrote:


Reply to Walter,


How could I do partial ordering if one constraint expression accepts
only odd integers?


you wouldn't, but rather ignore that clause and mine the constraints
that you would use out of the expression (see my post for details)


Then aren't things getting just as, or even more, complicated?



99% of the time nobody needs to worry about how exactly partial ordering 
works. 90% of the time* people don't need to worry about putting constraints 
in the if clause or in the argument list.


I'd much rather have more complexity on the thing I need 1% of the time than 
the thing I need 10%. And the the rules I proposed are arguably simpler than 
the partial ordering bit that it inherits wholesale from the current solution 
so it might not even be the hard part.


On top of that, they may also alow for fewer cases wher the partial ordering 
even comes into play.


*87.6% of statistics are made up on the spot.




Re: [OT] dmd 1.046 and 2.031 releases

2009-07-07 Thread BCS

Hello Daniel,


[1] like me. My girlfriend disagrees with me on this,


You have a girlfriend that even bothers to have an opinion on a programming 
issue, lucky bastard.



though. *I* think she's crazy, but I'm not exactly
inclined to try and change her mind. :)


That reminds me of a quote: If you assume a woman's mind is supposed to 
work like a man's, the only conclusion you can come to is they are *all* 
crazy. OTOH you can switch the perspective on that around and I expect it's 
just as true. It should be pointed out that, almost by definition, you can't 
have 50% of the world be crazy.





Re: dmd 1.046 and 2.031 releases

2009-07-06 Thread BCS

Hello Derek,


The -deps= switch is helpful, but can we also have a -nogen switch
so that a compile is done but no object files are created. 


look at: -o-




Re: dmd 1.046 and 2.031 releases

2009-07-06 Thread BCS

Reply to Walter,


Ary Borenszweig wrote:


Walter Bright escribio':


MIURA Masahiro wrote:


Thanks for the new release!  Are case ranges limited to 256 cases?


Yes.


Why?


To avoid dealing with it in the back end for the moment. The back end
will die if you pass it 3,000,000 case statements :-)



I get your point. OTOH I rather suspect the back end will die if you give 
it 3,000,000 of just about anything. 





Re: dmd 1.046 and 2.031 releases

2009-07-06 Thread BCS

Reply to Chad,


Walter Bright wrote:


The fall-through thing, though, is purely local and so much less of
an issue.


huh?

These bugs always take me no less than 2 hours to find, unless I am
specifically looking for fall-through bugs.

They are that evil kind of bug where you can stare at the exact lines
of code that cause it and remain completely clueless until the
epiphany hits.  This is no good, unless the compiler can be rewritten
to induce epiphanies.

much less of an issue
T_T


The much worse class of bugs is the ones that you can be staring at the location 
of the bug, have an epiphany about what the bug is and still not be able 
to tell if it is the case: the bug is here, but cause by a line of code that 
could be anywhere.





Re: dmd 1.046 and 2.031 releases

2009-07-06 Thread BCS

Hello Ary,


But that's kind of redundant:

case 1: goto case 11:
case 11: goto case 111:
case 111: goto case :
case :
doIt();
don't you think?



case 1, 11, 111, :
doIt();


If you change the case expression, you must change it twice.

Why not:

case 1: continue case;
case 11: continue case;
etc.?



Or how about the way c# does it: consecutive cases are treated as a single 
target. For that matter, it's debatable if going from one case label to an 
immediately following one even constitutes a fall through considering they 
are attached to the following statement rater than being statements in there 
own right.





Re: Serialization for D. Comments, please!

2009-06-18 Thread BCS

Reply to grauzone,


BCS wrote:


The demarshaller function is indexed via a string derived from the
original object. What would the marshaller function key on? The best
I can think of right now is the typeinfo and as of now, that's broken
under DLLs


DLLs are broken in general. There are many more problems associated
with them, and you won't be happy with them. I write all my code with
the assumption in mind, that TypeInfos/ClassInfos for the same type
always are the same instance.



On second pass, even putting DLLs aside, I can't count on typeinfo being 
the same in both sides because I can't even count on them being in the same 
process, exe or even under the same compiler, OS or CPU.


Can you get the mangled name of an object instance at runtime via typeinfo?




Re: Serialization for D. Comments, please!

2009-06-18 Thread BCS

Reply to grauzone,


Can you get the mangled name of an object instance at runtime via
typeinfo?


Not that I know of. IMHO, ClassInfo.name() is good enough.

But if you don't like it, just keep using mangleof. You obviously have
compile time access to the serializeable type, e.g.:

char[][ClassInfo] TypeMangledNames;

template SerializeMixin() {
static this() { TypeMangledNames[typeof(this).classinfo] = typeof(this).mangleof; 

}

}



I'm looking at what it would take to get by without a mixin in the types 
(someone objected to that) without loosing anything I want. with a mixin 
in the class, I've already got a solution.





Re: Serialization for D. Comments, please!

2009-06-16 Thread BCS

Hello grauzone,


BCS wrote:


Well, I can switch the default but, in my experience, most of the
time repetition doesn't matter. I also dissagree on the relatively
useless


Oh really?


I haven't used a graph data structure in some time. Most of them have
been trees. And the cases I can think of, the repeated reference bit
has been central the the structure so the chances of getting it wrong
(or of missing it under test) are about nil.


IMO, most tree-like structures are still full graphs in memory,
because they often contain parent pointers, or point back to a
parent indirectly (e.g. even if a generic tree data structure is
implemented without parent pointers, the data element itself might
contain such pointers).


I'm referring to data structure that I could add serialization to, e.i. ones 
where I would know of they have parent references. I still stand by my assertion.





OTOH pointers to struct are not value types...


Pointers are a whole different thing. A pointer can still point to a
value type, because that struct might be embedded within an object
(a class member that's a struct).



pointers to members won't be supported any time soon.


interfaces are not supported either.


But supporting interfaces would be very simple.


It wouldn't be hard in the current form (you would add a mixin to the
interface as well) but the non-mixin, outside in approach would have
all sorts of interesting issues like how to get the correct
sterilizer function.


Huh? You can simple cast the interface to an object.


That is not safe. not all interface instances are D objects.


And then cast the
object to the serializeable type.


Cast only works if you know /at compile time/ what type to cast to so I don't 
think that's going to work. 


You need to be able to do that
anyway, because object references can be of the type Object, and
there's no way you'd add your serialize mixin to Object.


And that just brought up another issue: how do you serialize a class that 
only ever shows up as a base class reference? The lib has no way to /find/ 
the type at compile time so it has no way to generate code to deal with it.




Also, is you writing sterilizer a typo or not?


typo (is it in the lib or just this thread?) I'd be even worse without a 
spellchecker :(





Re: Serialization for D. Comments, please!

2009-06-16 Thread BCS

Hello grauzone,


Huh? You can simple cast the interface to an object.


That is not safe. not all interface instances are D objects.


There are people who care for COM and C++ interfaces? COM is Windows
specific, and C++ vtables are... uh, I don't know,
platform/architecture/compiler vendor specific?

In any case, serializable objects shouldn't contain references to such
interfaces in the first place.



I think there are ways to have a D interface implemented by a non D object.


And that just brought up another issue: how do you serialize a class
that only ever shows up as a base class reference? The lib has no way
to /find/ the type at compile time so it has no way to generate code
to deal with it.


But you already handle this. One of your mixins contains a static this
ctor (which, btw., makes it impossible to use serializable types in
cyclic dependent modules). It seems right now this ctor is only for
registering the demarshaller function, but the same can be done with
the marshaller function.



The demarshaller function is indexed via a string derived from the original 
object. What would the marshaller function key on? The best I can think of 
right now is the typeinfo and as of now, that's broken under DLLs


---

The solution I have now works. Unless someone can show an intractable problem 
with it I'm keeping it. The only significant issue so far voiced is the concern 
about what all that mixin is adding and I think I can kill that one with 
some minor refactoring and documentation.


p.s. could you please not delete the citation line from the quote, it makes 
it easier (at least with good NG clients) for people to find replies to there 
posts.





Re: Serialization for D. Comments, please!

2009-06-14 Thread BCS

Hello grauzone,


BCS wrote:


That's why I'd still require types to be marked as serializeable by
the programmer.


How would you do that aside from mixins?

Make the user implement a marker interface, 


that would work (for classes) but IMHO the side effects of that are more 
invasive and it still ends up mucking with internal state from the outside



or let him provide a
(single) special class member which fulfill the same function,


What's the difference between one and two?


or
introduce annotations into the language.


NO, not an option.


As far as marking goes, a
mixin would be OK too, but as I said, I don't like adding arbitrary
members into the user's scope without the user knowing.



how about if what the mixins add is documented?


At least for all
those structs, it's truly annoying and unneeded. Having to use
different mixins for structs/classes sucks even more (wouldn't be
required if you wanted).

It isn't required, the difference is not struct vs. class but do you
care about repeated references to instances of this type?


IMHO a relatively useless optimization, that will only confuse the
user. It will introduce subtle bugs if objects accidentally are
repeated instead of serialized only once.



Well, I can switch the default but, in my experience, most of the time repetition 
doesn't matter. I also dissagree on the relatively useless optimization 
bit, it adds some not exactly trivial overhead in about 3 or 4 different 
places.



By the way, how are you going to solve the other problems when
serializing D types? Here are some troublesome types:
- pointers?

class references are pointers, for struct and what not, I'll just use
a similar approach


That's not really the problem here. You have no idea where a pointer
points to. Is it a pointer to a new'ed memory block? Does it point
into an object? Does it point into an array? Into the data segment?

The GC provides no API to find out. You may be able to handle some
cases above, but not all.



What I can't handle will be documented as unsupported.


- function pointers?
- delegates?

I won't


Forces the user to use interfaces instead of delegates.


interfaces are not supported either.


- referential integrity across arrays and slices?


I won't


I wonder if anyone (I mean, especially user of a serialization
library) would disagree with that choice. Sure, there are valid D
programs that would break with this, but is relying on this really
clean?



That's what I'm hoping for. D is to low level for setting up serialization 
to be completely automatic. The programmer will have to be careful how things 
are set up. My go is to make that as easy as I can.



First off there is not enough information to correctly generate
sterilizers for types. So the user has to do some thinking for most
types. How do I make the user thinks about how and for what types
code is being generated?

Option 1) have the template run a paramg(msg,T.stringof) for each
type
and hope the user don't just ignore the list.
Option 2) do nothing and be sure the user won't see anything.
Option 3) Make the user write per type code and error when they
don't.


Oh, you mean if there are types in the object graphs the serializer
can't deal with it?


Almost, I think. I'm looking at the case where a new types is /added/ to 
the the object graph at some point removed form the use of the sterilizer. 
Someone needs to be informed that new types are being serialized and that 
they need to make sure it's working correctly.



But how would option 2) work?


It dosn't




Re: Serialization for D. Comments, please!

2009-06-14 Thread BCS

Hello grauzone,


BCS wrote:


introduce annotations into the language.


NO, not an option.


What, why? Sure, this is not a realistic option.



D1 is fixed, and D2 will be in the next few months. I'm not going to even 
think of targeting D3 at this point. I'm writing this to be used, not as 
a theoretical construct.



Well, I can switch the default but, in my experience, most of the
time repetition doesn't matter. I also dissagree on the relatively
useless


Oh really?



I haven't used a graph data structure in some time. Most of them have been 
trees. And the cases I can think of, the repeated reference bit has been 
central the the structure so the chances of getting it wrong (or of missing 
it under test) are about nil.



optimization bit, it adds some not exactly trivial overhead in about
3 or 4 different places.


Maybe it costs a hash table lookup, but apart from that, you're saving
space and time for marshaling additional instances. Of course, this is
different with structs. But structs are value types.



which side are you arguing there? 


OTOH pointers to struct are not value types...


interfaces are not supported either.


But supporting interfaces would be very simple.



It wouldn't be hard in the current form (you would add a mixin to the interface 
as well) but the non-mixin, outside in approach would have all sorts of interesting 
issues like how to get the correct sterilizer function.





Serialization for D. Comments, please!

2009-06-11 Thread BCS

the latest and greatest:

http://arrayboundserror.blogspot.com/2009/06/serialization-for-d-part-6-of-n.html

This time I'm hoping for some feedback on how people want to interface with 
3rd party types.





Re: Serialization for D. Comments, please!

2009-06-11 Thread BCS

Reply to grauzone,


BCS wrote:


Reply to grauzone,


Is there any real reason for all those mixins?


which ones?


All used by the user. That would be Serializable and
SerializableRecuring.


What else would you use? I guess if I really wanted to I could use
the same device as for 3rd party types, but that just pushes the
mixin to global scope (the functions have to be defined in the same
module as the type or they won't be able to access private members)
and introduces unneeded performance issues from using function
pointers.

If you can spot a better solution, I'm all for it, but I don't see
one and don't think this solution is to bad.


tupleof _can_ access private members, even if the type is from a
different module than the function that uses the tupleof. This changed
somewhere between dmd 1.030 and 1.040, I think.


If it can, I would consider that a bug.

And even if Walter sanctions it, I wont use it because I'm very leery of 
generating a system that automaticly reaches in from the outside and mucks 
with private members. Whoever makes a type serializeable needs to put at 
least some thought into how to serialize it. If it is the type's author, 
I'm comfortable with them saying just do everything, but if someone else 
is doing it, that is likely to get feet shot off. If I made a generic any 
type function, it would recur into any referenced types and either spew 
a big list of type that it's dealing with (that people won't look at) or 
give no warning that it's walking into new territory and that it may not 
be doing valid operations.





Re: Serialization for D. Comments, please!

2009-06-11 Thread BCS

Hello Christopher,


SerializableRecuring.


Also, what is curing in this context, and why would you need to do it
multiple times?



My spelling sucks: s/Recuring/Recurring/




Re: Taunting

2009-06-01 Thread BCS

Reply to Ary,


(I came to this conclusion when trying to debug the scrapple:units
project).



I'm sorry g OTOH that is a rater pathological cases.

One option that might be doable (I don't know how the inside works so I'm 
guessing here) is to have the debug more highlight expression that can undergo 
CTFE and constant folding. The user would work by selecting an expression 
and it would be replace with it's value. to make things manageable, long 
string expressions could be truncated and accessed via pop up and as for 
string mixins, run the result thought the general code formatter.





Re: Descent with compile-time debug for testing

2009-06-01 Thread BCS

Reply to Pablo,


Hello,

just before it closes there appears a window message tittled Problems
saving worksppace and the message is:

Problems occurred while trying to save the state of the workbench.

On details it's written:

Problems ocurred during save.
java.lang.NullPointerException


somewhere there should be a .log file that has alls sorts of goodies like 
stacktraces for the error and the like.



Thanks!

Ary Borenszweig Wrote:


And what's on the Error Log?






Re: Serialization for D. Comments, please!

2009-05-31 Thread BCS
And yet more progress. This time I've got hard-links working and I'm thinking 
about how to do 3rd party types.


I don't have any useable ideas I really /like/, but I have one I'm sure I 
can make work. I do have one idea down at the bottom that I'd love to use 
but it would need some new language features.


http://arrayboundserror.blogspot.com/2009/05/serialization-for-d-part-5-of-n.html

As always: Comments, Please! (particularly on the feature request)




Re: OT: Flash and Javascript (Was: Taunting)

2009-05-29 Thread BCS

Reply to Nick,

[sniped rant about why the web sucks]

I'll grant you most of that and I don't care about the rest.

It's ironic that this should come up in the D community because it sounds 
a lot like C++ template are to the web like D template are to what the web 
should be. That is; the Web has taken what it has and abused it (because 
nothing better was available) to get something it wants with no pity for 
the sucker who has to use it.





Re: Serialization for D. Comments, please!

2009-05-26 Thread BCS

Hello Bill,


I'll also add that you should be able to properly
serialize/deserialize a BaseClass pointer that actually points to a
DerivedClass.
This is pretty tricky to get working seamlessly when combined with the
external serialization requirement.
H3r3tic's xpose library has this working IIRC.
--bb



The current version of the code has this working. It was fairly high on my 
feature list.  





Re: OT: Flash and Javascript (Was: Taunting)

2009-05-25 Thread BCS

Hello Nick,


I wish you were a higher-up at Epic ;) They seem to have pretty much
the opposite attitude, and I get so worked-up every time I see a quote
from CliffyB or any of the others...



I'm sorry to disappoint, but gaming is the only case where building to the 
latest hardware has any rational justification. That said, build to scale 
all the way down is also a good idea, but I have no problem with games that 
use and need a nice system to run. Than again I'm not a gamer by any stretch.





Re: OT: Flash and Javascript (Was: Taunting)

2009-05-24 Thread BCS

Hello Nick,


Yes, yes, yes. This. All of it.

[...]

Anything that can be used for good can be used for ill. Yes, lots of sites 
out there are junk, but that would be true no matter what tools were available.


The (long term) solution isn't to reject the tools but to figure out how 
to make them (or there replacements) easy enough to use correctly and hard 
enough to use incorrectly that people don't abuse them through ignorance.





Re: OT: Flash and Javascript (Was: Taunting)

2009-05-24 Thread BCS

Hello Nick,


Just trying to anticipate that argument. It's amazing how many times
I've seen people try to argue that something isn't worth developing
for just because the stores don't sell them. What matters is what is
people are *using*, not what the stores are selling.

Should they stop offering brake-pads/spark-plugs/tires that work on
2008-model cars? No? Well why not?! It's not like the stores sell
2008's anymore!!

It's a ridiculous line of reasoning made even more ridiculous by how
frequently people actually try to use it.


If I'm ever in a position to do it, I will spec the target platform for a 
program as something like the 20th percentile of computers used by our target 
market when the project is started. I'd get a bunch of system like that and 
then mandate that any prototypes be shown to management on one of them before 
it's shown on anything else and that the devs must run their code on them 
regularly.


I wouldn't have any problem with the program being able to take advantage 
of something a lot newer, but it darn well better run on those old boxes.





Re: Taunting

2009-05-23 Thread BCS

Hello Nick,


what they can do is additionally provide a
non-youtube/flash version. Which should be really [censored] easy since
they had to have already had one in order to upload it to craptube in
the first place.


If they can, yes, but they might not have access to general file hosting 
or if they do, the bandwidth to steam video.





Re: Taunting

2009-05-23 Thread BCS

Hello Nick,


BCS n...@anon.com wrote in message
news:a6268ff63c58cba9bbc96d8...@news.digitalmars.com...


Hello Nick,


what they can do is additionally provide a
non-youtube/flash version. Which should be really [censored] easy
since
they had to have already had one in order to upload it to craptube
in
the first place.

Ha ha, you censored the f^*^*? :)



And you just proved that not showing something sometimes makes a bigger point 
than showing it g



If they can, yes, but they might not have access to general file
hosting or if they do, the bandwidth to steam video.


1. Sure, some people may not, but considering how cheap and easy good
hosting packages are these days,


a.k.a. almost but /not/ free.


I find it hard to believe that, out
of a group of programmers, any more than a small minority wouldn't
have reasonable hosting.


I don't because I can't afford it.


I mean look at me, I can't afford basic
airfare to go to a conference (or any of the repairs that my car
currently needs), but I still have a gig or so of hosted space and
about 100x as much bandwidth as I'm actually using.


The cheapest hosting package I've seen would be about 15-25% of my income 
after expenses; food, rent, power (to run my Intel brand heaters), tuition.



2. Torrent


For me that is even less accessible. I don't have a torrent client because 
I'd have to be rude: http://xkcd.com/553/


Torrents has the problem that many places need to throttle them to let other 
stuff thought and for torrents, the only way to throttle them is ban and 
block them completely like my university tries to do. 





Serialization for D part 2

2009-05-23 Thread BCS
It turned out that the first pass was easy. No unexpected problems. However 
I noticed a few more things I'm going to have to deal with at some point.


http://arrayboundserror.blogspot.com/2009/05/serialization-for-d-part-2-of-n.html

Again, please comment! (here or there, doesn't matter, I think I'll see both)

p.s. Sorry, no code yet (it's still messy) but fixing that is on the list 
as well.





Re: Taunting

2009-05-21 Thread BCS

Reply to Ary,


http://www.youtube.com/watch?v=rtYCFVPfx4M



The clunk you just heard is my jaw bouncing on the floor G NICE!




Serialization for D. Comments, please!

2009-05-19 Thread BCS
I'm planning on taking a crack at a Serialization template library and I'm 
looking for feed back. My thinking so far is up on my blog here:


http://arrayboundserror.blogspot.com/2009/05/serialization-for-d-part-1-of-n.html

Please comment! (here or there, doesn't matter, I think I'll see both)




Re: D Meeting at Kahili's in Kirkland Saturday at 11

2009-05-17 Thread BCS

Hello Walter,


I went there, but saw nobody around.

I walked all over Lake and Kirkland, but nobody. I even checked the
parking lot at the street end.

I love Google.


We were there from 11 to nearly 7 PM. By we I mean myself, Bartosz,
David, Bill, and Paul, though Bill and Paul were there for only an
hour or two.



use GPS next time?

http://xkcd.com/240/




Re: Split digitalmars.D newsgroup into .D and .D2 newsgroups?

2009-05-15 Thread BCS

Hello BLS,


Georg Wrede wrote:


(FWIW, I'd sure prefer to fly with ADA or D, than with C.) :-)


So you better fly with Boeing !

ASTREE is a static analyzer for C programs that proves the absence of
run-time errors in critical embedded software.
It has been applied to the flight control software of the Airbus 340
and
380 airplanes. 
ASTREE is written in OCAML.  // http://www.astree.ens.fr/



If you can *prove* it's correct, I don't care if it's in BF I'll fly on it 
over something you can't. OTOH I /think/ Ada programs can be written so they 
won't compile if they can't be proven to be correct, at some level. 





Re: dmd 1.045 / 2.030 release

2009-05-14 Thread BCS

Hello Robert,


If Walter is willing to put dmd under public source control I'd
happily set this up to automatically compile dmd, run tests suites,
compile libraries etc. I could even set up a one command/one click
release candidate/final release thing if needed (maybe even nightly
builds too).



that would also make setting up RPM/DEB genation something walter dosn't 
need to worry about.





Re: Split digitalmars.D newsgroup into .D and .D2 newsgroups?

2009-05-12 Thread BCS

Hello BLS,


(I think it is not really top secret to talk about what is in use.
1) OCAML, 2) C and 3) ADA ... )


The only surprise there (if any) is OCAML. *Everyone* uses C and, last I 
heard, Ada is still the #1 choice for Bugs==DeadBodiesOrWorse development. 
From what I've heard, it's actually a darn nice language to work in if you 

are going to be doing all the engineering process stuff anyway.




Re: Metaprogramming in D tonight at the NWCPP

2009-05-06 Thread BCS

Hello Brad,


BCS wrote:


I can't memorize speeches either (OTOH I really like ones where I can
read it off a script) what I'd love to have is a power point setup
with two screens for me, one with a copy of the projector and one
with my notes (in inch high font) and thumbnails of the following
slides.


If you haven't before, check out presenter mode in powerpoint.  It's
pretty much what you just described.  Only takes two screens, one the
projector and the other your laptop's display.  The laptop display has
3 panes: a sliding window of the slides; the current slide; and your
notes.

Later,
Brad


I've tried it, I actually prefer the normal PP edit screen as it has more 
info, but I can't ever seem to get enough info on the screen. Maybe I just 
need a bigger screen (like 24-30). Even so I still want a clone of the projector 
on a screen all by its self.





Re: Slide design

2009-05-05 Thread BCS

Reply to Sean,



Some professors seem to think that lecturing about material that isn't
presented anywhere else will force students to attend class.  But in
my experience it also creates a class that takes notes furiously
rather than engaging the material and asking questions.  Overall, I
think it's a counterproductive strategy.


At the other end, if the professor *only* lectures on what's in the book, 
what are they being paid for? Just talking? Better would be for the professor 
to lecture on application, the what/why (and not the how), how ideas are 
related, anecdotes and the like.





Re: Metaprogramming in D tonight at the NWCPP

2009-05-05 Thread BCS

Reply to Walter,


BCS wrote:


I can't memorize speeches either (OTOH I really like ones where I can
read it off a script) what I'd love to have is a power point setup
with two screens for me, one with a copy of the projector and one
with my notes (in inch high font) and thumbnails of the following
slides.


I.e. a teleprompter!



NO! It takes about 10 (or 100) times a much work to get a speech down word 
for word. I just want to have a better handle on context and more notes than 
I get with the setups I've used.





Re: Metaprogramming in D tonight at the NWCPP

2009-04-27 Thread BCS

Hello Arild,


Here's the link:

http://www.vimeo.com/4333802



SWEET! to bad it's almost midnight and I'm pineing for a 56K link right now 
(don't ask) so I'll have to wait til later 





Re: dmd 2.029 release [OT]

2009-04-25 Thread BCS

Hello Nick,


I guess if you really hate having it not kill the app then the
program could just not /have/ a x button.


You've got to be kidding me, that would be just as bad. Why would I
want to have a program get rid of the standard exit mechanism?


If you basicly never want to exit it? (see below)


Whever I come across an app like that, the first thing I do is open
the task manager and kill it, and then immediately uninstall it.



I'll grant there are only very few cases where I want it, but in those cases 
I wouldn't have the program at all unless I wanted it running *all the time*. 
If I found myself killing/restarting the program more than rarely, I'd git 
rid of it and find one I don't have to do that with. For those apps, I basically 
never want to actually close them (even less often than I reboot) and on 
the few occasions when I do, I'm willing to do file-exit-Yes I really 
do sequence.


As an example of a program that works this way that I'll bet you don't mind: 
The volume control in the system tray. I'm not even sure if there /is/ a 
way to close it all the way.


To put it objectively: say the program take 10 sec to reload and 90% of the 
time (I'd bet that's low) that I click the x button, it was a mistake (bad 
mouse control, reflex go way action, whatever). From that it can take 90 
seconds to close the program before tuning off the x button is a net loss 
(as long as it's easy to figure out how to really kill it).


We may have to agree to disagree; I use a few programs where having the x 
button kill them would be a bad thing IMHO. You disagreeing really doesn't 
matter to me. 





Re: dmd 2.029 release [OT]

2009-04-24 Thread BCS

Reply to Nick,


BCS n...@anon.com wrote in message
news:a6268ff50d58cb92d952e5b...@news.digitalmars.com...


Hello Nick,


BCS n...@anon.com wrote in message
news:a6268ff50558cb926917215...@news.digitalmars.com...

yah, for some programs you rarely want to close the program but
often want to close the UI.


That's called Minimize.


It can be, OTOH I might want the UI process killed without killing
the main program. Another point is the other side of the assertion,
you rarely want to close the program as in 90% of the time even
when I hit the x button, I don't actually want to close the program.


The whole point of the 'x' button is the close the program. Always has
been. If I didn't want to close the program, I wouldn't push it.


Are you saying you never make mistakes? There are program out there that 
90% of the time when I hit the x button it was a mistake and in that cases 
I think it to be a good design to work around it. I guess if you really hate 
having it not kill the app then the program could just not /have/ a x button.



If you want to hide/kill the UI without closing the program, that's
minimize. True, minimizing to the taskbar doesn't kill the UI
process/thread (assuming it even is a separate process/thread), but in
the rare cases where the distinction of UI process running/killed
actually matters, the program can still do that through a minimize to
tray. And while neither minimize nor close truly mean minimize to
tray, clearly minimize is FAR closer in both wording and behavior.
Any way you look at it, having a close button that doesn't close
the app is like having a cancel button that prints, or a save
button that plays music.



Your missing my point. I don't want to re-task the button but make it not 
do something that most of the time is not what I want.





Re: dmd 2.029 release [OT]

2009-04-23 Thread BCS

Hello Christopher,


Nick Sabalausky wrote:
 

The absolute worst of all though is when an app (*cough* skype
*cough*) decides that close and the 'close' button should mean
don't close anything at all, but minimize to tray instead. That
should be a firing squad offense ;)


I'd be killing my IM client constantly if not for that feature. I
pretty much expect it of any application that's meant to be running
for a long time and only rarely needing user interaction (such as a
bittorrent client).



yah, for some programs you rarely want to close the program but often want 
to close the UI.





Re: Metaprogramming in D tonight at the NWCPP

2009-04-22 Thread BCS

Reply to Arild,


Walter Bright skrev:


BCS wrote:


Hello Walter,


Robert Fraser wrote:


Walter Bright wrote:


http://www.nwcpp.org/


!!! I had a lab or I would have gone ;-( Any chance of a
video...?


Bartosz videotaped it, I imagine he'll put it up on the nwcpp.org
web site soon.


Bump ?


You'll have to ask Bartosz!


Done.



link?




Re: dmd 2.029 release

2009-04-20 Thread BCS

Hello Walter,


This is a major revision to Phobos, including Andrei's revolutionary
new range support.

http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.029.zip


Cool template function literals sounds interesting




Re: dmd 2.029 release

2009-04-20 Thread BCS

Reply to bearophile,


Andrei Alexandrescu:


If it were an error, I wouldn't let it go.


It's an error. It will lead to troubles.

Bye,
bearophile


Then there need to be a way for the format string to use an argument without 
generating output for it because as Andrei is saying, there are real world 
cases where not using all the args is *normal* and not an error.


One option would be to not throw an error if the format string uses indexing 
formats (e.i. out of order formatting)





Re: dmd 2.029 release

2009-04-20 Thread BCS

Reply to Nick,


Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message
news:gsiqdr$1cs...@digitalmars.com...


BCS wrote:


One option would be to not throw an error if the format string uses
indexing formats (e.i. out of order formatting)


Yah, that's an option I considered. Maybe it's the best way to go.


That would be far too clumbsy, unless you made it into two separate
functions.

For instance (psuedocode):
auto userInput = getUserInput()
// userInput now contains {Name} at {Address}, zip deliberately
ignored
writefln(userInput, name, address, zip); // They're used in-order, but
there
shouldn't be an error


They are in order but are listed by name so the error doesn't throw. The 
case where the error would be thrown is where the only format strings used 
are the get the next arg kind.





Re: dmd 2.029 release

2009-04-20 Thread BCS

Hello Walter,


Stewart Gordon wrote:


Walter, how often do you update your working copy from the SVN?
Obviously less than once every 2 releases.


As far as I know, it is current. Everything got checked in.



I think he was asking about the otherway (not that I known why)




Re: dmd 1.043 alpha for FreeBSD 7.1

2009-04-16 Thread BCS

Hello Walter,


If dmd/phobos binaries for osx won't work on those machines, then it's
appropriate to have a different version identifier.



I'd assert the test should be if the systems are source code compatible.




Re: Cristian Vlasceanu and D for the .NET platform

2009-03-09 Thread BCS

Reply to Walter,


http://www.reddit.com/r/d_language/comments/838lf/cristian_vlasceanu_a
nd_d_for_the_net_platform/



His comments on array slicing are interesting.

Seems to me the solution should be to have *all* dynamic arrays be ArraySegment 
as all dynamic arrays under DMD are a slices of the full memory space.





Has anyone tried this befor?

2009-03-08 Thread BCS

I just figured out a neet trick to do with structs and mixins:

http://arrayboundserror.blogspot.com/

Oh, and I started a blog.




Re: Boost.ScopeExit based on D's scope(exit)

2009-03-03 Thread BCS

Reply to Georg,



The biggest lie I've ever heard is the meek shall inherit the earth.



That is a bit out of context... 

OTOH have you looked that the earth recently? Frankly I'd rather NOT inherit 
it thank you very much.





Re: Metaprogramming in D tonight at the NWCPP

2009-03-01 Thread BCS

Hello Walter,


Robert Fraser wrote:


Walter Bright wrote:


http://www.nwcpp.org/


!!! I had a lab or I would have gone ;-( Any chance of a
video...?


Bartosz videotaped it, I imagine he'll put it up on the nwcpp.org web
site soon.



Bump ?




Re: Poppler

2009-02-28 Thread BCS

Hello Moritz,


On Sat, 28 Feb 2009 12:53:03 -0500, bobef wrote:


Because I'm lazy and I doubt there will be any interest. But if you
want I can send them to you and you can release them publicly ;)


I would suggest
http://dsource.org/projects/scrapple
Just make a ticket. :)



bobef: post your dsource user name and I'll let you into scrapple.




Re: Just one more thing...

2009-02-15 Thread BCS

Hello Dejan,


Well done!
When can we expect 64bit version of DMD?


OSX is still 32bit x86 so don't get your hopes up.




Re: Descent 0.5.4 released

2009-02-01 Thread BCS

Hello Frits,


Perhaps the computer he's running Eclipse on doesn't have an internet
connection?
This way he can download it onto (e.g.) an USB stick and install from
there.


you got it




  1   2   >