digitalmars.D.announce - QtD 0.1 is out!
- Eldar Insafutdinov (1/1) Feb 04 2009 It didn't take very long after previous post to make a first implementat...
- Eldar Insafutdinov (2/3) Feb 04 2009 For those who don't know: http://code.google.com/p/qtd/
- ideage (2/2) Feb 05 2009 Great stuff!
- Eldar Insafutdinov (2/7) Feb 05 2009 I will probably do it in couple of weeks. Don't have time now :(
- David Ferenczi (3/8) Feb 05 2009 I'm glad to see this release and the progress of qtd!
- Eldar Insafutdinov (3/15) Feb 05 2009 tutorials are in trunk/examples
- Daniel Keep (9/26) Feb 05 2009 "No files in this directory."
- Ary Borenszweig (3/36) Feb 05 2009 What? Why?
- Daniel Keep (47/63) Feb 05 2009 So... not having a scripting language would make pages run slower.
- Daniel Keep (6/6) Feb 05 2009 Also, I apologise for the derailment.
- =?UTF-8?B?QWxleGFuZGVyIFDDoW5law==?= (3/4) Feb 07 2009 Oh I hear ya. Web development makes pacifistic people wanna kill.
- Bill Baxter (5/12) Feb 05 2009 There's something really humorous about a guy going on a rambling,
- BCS (3/28) Feb 05 2009 [...]
- Daniel Keep (6/18) Feb 05 2009 I believe I was going to make a comment to the effect that it's fine to
- Nick Sabalausky (23/86) Feb 05 2009 This is by far the best description/explanation of the evils of Javascri...
- Bill Baxter (7/10) Feb 05 2009 What kind of sites do you go that are so bad? I find things a little
- Nick Sabalausky (12/22) Feb 05 2009 FlashBlock is another one of my essential addons :)
- Daniel Keep (6/31) Feb 05 2009 I run AdBlock, NoScript, FlashBlock and Nuke Anything Enchanced. And if
- Nick Sabalausky (17/54) Feb 05 2009 I use QuickJava instead of NoScript. I find it handy to be able to toggl...
- Chad J (11/25) Feb 05 2009 Whoa. At some point I realized that I was at peace with the web because
- John Reimer (59/72) Feb 05 2009 It's not always about the class of sites anymore. Although naturally, t...
- Chris R Miller (4/107) Feb 05 2009 You must frequent some fantastically horrible websites. I use the 'net
- John Reimer (8/130) Feb 05 2009 Yeah, I don't go to that many websites beyong a usual few. Firefox's bu...
- Nick Sabalausky (6/24) Feb 05 2009 Adblock Plus blocks any type of ad, not just popups. To be honest, I wou...
- Ary Borenszweig (9/45) Feb 05 2009 lol :)
- Daniel Keep (22/30) Feb 05 2009 The point is that instead of giving you a sub-optimal but functional
- Nick Sabalausky (16/45) Feb 05 2009 Oh great, now you've gotten ME started on Flash... ;)
- Robert Fraser (3/9) Feb 05 2009 lol, enjoy!
- Ary Borenszweig (3/61) Feb 06 2009 Oh, you are not near as lucky as me. Imagine a site built entirely in
- Christopher Wright (2/4) Feb 06 2009 I can -- it looks like about:blank.
- Denis Koroskin (3/7) Feb 06 2009 It is also built entirely in JavaScript.
- grauzone (27/28) Feb 05 2009 Yesterday, I was on digitalmars.com, browsing the archive for the D
- Nick Sabalausky (30/47) Feb 05 2009 Yes, yes, yes, exactly! A couple more examples of API docs that are
- Walter Bright (12/22) Feb 06 2009 I had some email discussions with Amazon about the miserable speed of
- grauzone (8/32) Feb 07 2009 Not sure what you're saying, but it was eating up my CPU even some
- Walter Bright (3/12) Feb 07 2009 Yeah, that's it.
- BCS (4/8) Feb 05 2009 without javascript, the page should show the full directory tree (or n l...
- Nick Sabalausky (9/36) Feb 05 2009 I'd be first in line for that even if I had to camp out all week.
- Nick Sabalausky (4/6) Feb 05 2009 Clarification: That problem seems to happen on Ctrl-Click, but not
- grauzone (7/40) Feb 05 2009 Finally somehow who shares my pain. You have my sympathy.
- David Ferenczi (2/20) Feb 06 2009
- Chris Nicholson-Sauls (5/6) Feb 05 2009 Very cool! What versions of DMD/Tango are currently known to work with
- Eldar Insafutdinov (3/11) Feb 05 2009 It's dmd v1.036 and tango-trunk dated November 25. But QtD is not on the...
- grauzone (2/2) Feb 05 2009 Do I see correctly, that you didn't need to introduce a MOC compiler for...
- Eldar Insafutdinov (2/4) Feb 06 2009 Yes. But it is limited. No information, no dynamic invokation, different...
- Eldar Insafutdinov (2/7) Feb 10 2009 So after some time trying to build qtd windows packages I realized that ...
- Bill Baxter (12/19) Feb 10 2009 here are huge issues. I tried first dmd and since I have to link D part ...
- Eldar Insafutdinov (2/19) Feb 10 2009 Thanks, but could you please clarify something for me: as well as D part...
- Denis Koroskin (2/15) Feb 10 2009 You can try building Qt with DMC. It works quite will in pair with DMD o...
- Eldar Insafutdinov (2/21) Feb 11 2009 And will dmc be able to compile Qt? And also as much as I undestdood mak...
- Bill Baxter (5/26) Feb 11 2009 You could use mingw's GNU make with CC=dmc. But I dunno if dmc will
- Eldar Insafutdinov (2/33) Feb 11 2009 Actually I decided to make a dll. It is possible to do it and will be mo...
- John Reimer (18/59) Feb 11 2009 A dll is probably your best option, if you can make it work with the C++...
- John Reimer (2/3) Feb 11 2009 Sorry, not "ddl"... meant to say dll.
- Don (5/74) Feb 12 2009 Well, since Qt is going to use the lunatic# LGPL license, you have to
- Eldar Insafutdinov (2/78) Feb 12 2009 I'm thinking on putting only C++ part of binding to a dll, while statica...
- naryl (3/8) Feb 12 2009 LGPL doesn't explicitly prohibits static linking. It serves to ensure th...
- Don (8/17) Feb 12 2009 Exactly. That's why it's the lunatic license.
- Nick Sabalausky (3/5) Feb 12 2009 I'd go for that ;-)
- Arnold S. (3/11) Feb 12 2009 Awesome. It'll be law by next Tuesday. Thanks for the idea.
- renoX (9/19) Feb 16 2009 I disagree: the LGPL is probably the most 'derived' license: because
- Daniel de Kok (15/35) Feb 17 2009 at
- Eldar Insafutdinov (2/6) Feb 12 2009 It's a subject to discuss. I am not good at licenses.
- Mike Parker (11/18) Feb 12 2009 The revised (or modified) BSD is the version most commonly used today.
- Eldar Insafutdinov (2/24) Feb 13 2009 Okey, if it is the most suitable license, we can go with it.
- Eldar Insafutdinov (6/6) Feb 12 2009 Can somebody help me with exporting functions from a DLL? I am defining ...
- Bill Baxter (4/10) Feb 12 2009 What's the implib command you're using? Often you need to use the /syst...
- Eldar Insafutdinov (2/15) Feb 12 2009 Thanks, that helped! I used it without any flags.
- Eldar Insafutdinov (3/16) Feb 12 2009 okay, second problem then - I need to be able to call extern (C) functio...
- Bill Baxter (9/25) Feb 12 2009 I think you may have to write some code to explicitly register your D
- Denis Koroskin (5/16) Feb 13 2009 I believe it should be extern extern(C) ...
- Eldar Insafutdinov (2/32) Feb 12 2009 This way won't really work because there are dozens of such a functions ...
- Max Samukha (3/35) Feb 12 2009 You are a genius! ;)
- Eldar Insafutdinov (2/41) Feb 12 2009 No, you are ;)
- Eldar Insafutdinov (3/4) Feb 14 2009 So porting qtd to windows almost finished, but I experienced couple of n...
- Eldar Insafutdinov (1/1) Feb 15 2009 Finally we managed to compile qtd for Windows. But at the very last step...
- Max Samukha (5/6) Feb 15 2009 This may be related to the famous
- Bill Baxter (6/12) Feb 15 2009 It can also happen because of a single very large file. Perhaps one
- Max Samukha (7/21) Feb 15 2009 Yes, all modules are autogenerated. You are right, we probably should
- Eldar Insafutdinov (2/27) Feb 15 2009 The reason why is this file is big is in this bug http://d.puremagic.com...
- Bill Baxter (12/13) Feb 15 2009 issues/show_bug.cgi?id=3D282 And I don't thing that placing enums outsid...
- Eldar Insafutdinov (11/40) Feb 15 2009 Anyway, I tried to place enums outside the classes, and I got:
- Jarrett Billingsley (9/20) Feb 15 2009 /issues/show_bug.cgi?id=3D282 And I don't thing that placing enums outsi...
- Eldar Insafutdinov (2/20) Feb 16 2009 It's the way Qt is. I can't change the API.
- grauzone (3/20) Feb 16 2009 I really wonder why Walter doesn't just forbid circular dependencies in
- Jarrett Billingsley (4/32) Feb 16 2009 Because that's redefining the problem rather than solving it?
- Max Samukha (35/75) Feb 16 2009 You can still alias global enums into the class scope if you want Qt.A
- Bill Baxter (8/9) Feb 15 2009 Was this what you saw?
- Eldar Insafutdinov (2/15) Feb 15 2009 Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD"....
- Bill Baxter (6/21) Feb 15 2009 Do you compile it with inlining on? Not positive about this, but you
- Eldar Insafutdinov (2/27) Feb 15 2009 it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both in...
- Bill Baxter (5/32) Feb 15 2009 Ok. Is it some kind of automatically generated file? I don't see it
- Eldar Insafutdinov (2/38) Feb 15 2009 yes, all files are automatically generated. If you wish I can upload it(...
- Bill Baxter (7/45) Feb 15 2009 No, that's ok. I was just curious. So it sounds like the best hope
- Eldar Insafutdinov (2/50) Feb 15 2009 It's in one file because of cyclic imports bug in dmd. The bug with optl...
- Don (4/50) Feb 16 2009 Approximately zero chance. Optlink is entirely written in asm, and AFAIK...
- Eldar Insafutdinov (2/52) Feb 16 2009 Ok, so I splitted all big files, circular imports now don't cause troubl...
- Walter Bright (3/7) Feb 16 2009 What you can do is try to obj2asm and dumpobj -p the .obj files, to see
- Jarrett Billingsley (4/12) Feb 16 2009 I don't know if you realize just how unbelievably unhelpful that
-
Walter Bright
(3/15)
Feb 16 2009
You aren't the typical user
. If the obj file is not well-formed, - Eldar Insafutdinov (2/10) Feb 16 2009 I have never dealed with asm before and besides there are more than 200 ...
- Eldar Insafutdinov (1/1) Feb 21 2009 qtd now works for windows. Here's the binary package http://qtd.googleco...
- Bill Baxter (5/6) Feb 21 2009 Fantastic. Have you written anywhere how you eventually resolved the
- Eldar Insafutdinov (3/11) Feb 21 2009 Actually it is a magic. Another guy wrote a makefile that is now buildin...
- Chad J (7/7) Feb 21 2009 What you and your crew are doing is really awesome! And you are beating
- Eldar Insafutdinov (1/1) Feb 21 2009 We found out that while compiling qtd with dmd 1.038 and newer compiler ...
- Bill Baxter (5/6) Feb 21 2009 I think Walter has figured this one out. My code was hanging too, and
- Moritz Warning (2/14) Feb 21 2009 Do you happen to know what bug report that is?
- Bill Baxter (6/20) Feb 21 2009 It was the one about compiling taking a long time that he was looking
- Moritz Warning (3/27) Feb 21 2009 Thanks.
- grauzone (3/26) Feb 21 2009 So the bug will likely be fixed in the next version of dmd? I'm really
- Eldar Insafutdinov (1/1) Feb 27 2009 We faced a bug that module static constructors don't work with cyclic im...
- Jarrett Billingsley (5/6) Feb 27 2009 I'll save Walter the trouble: come up with a reproduceable testcase if
- Walter Bright (7/17) Feb 27 2009 I'll add to that my experience is that if the test case is incomplete,
- Eldar Insafutdinov (3/24) Feb 27 2009 Now we have to make a manual init function called from class constructor...
- Walter Bright (5/11) Feb 27 2009 One of the goals of D is to eliminate undefined behavior wherever
- Eldar Insafutdinov (2/14) Feb 27 2009 in our case resources we are initializing are unrelated to the modules w...
- Walter Bright (3/6) Feb 27 2009 True, often there isn't an actual dependency on the order, but the
- Jarrett Billingsley (8/15) Feb 27 2009 I was going to say "can't it?" but then remembered separate compilation.
- Fawzi Mohamed (14/27) Feb 27 2009 I fully agree, circular dependencies between modules is in general a
- Fawzi Mohamed (2/33) Feb 27 2009
- Yigal Chripun (11/45) Feb 28 2009 I agree with the above but there is still a small issue here:
- Jarrett Billingsley (8/18) Feb 28 2009 Preciiiisely. I've been toying with the concept of a compiler which
- Yigal Chripun (6/26) Feb 28 2009 I also think that source code organization should be orthogonal to the
- Daniel Keep (21/49) Feb 28 2009 You can do this with mixins or aliases.
- Walter Bright (9/13) Feb 28 2009 D can do the same thing - it can use the source of the module directly,
- Don (5/21) Mar 01 2009 The D system has a major limitation, though -- you can't split the
- Jarrett Billingsley (3/6) Mar 01 2009 Yeah. Imagine if DMDFE were written in D; how big would those modules
- Christopher Wright (3/11) Mar 01 2009 The current organization of DMDFE is totally inconducive to D's module
- Lars Ivar Igesund (7/10) Feb 28 2009 IMO it is the cyclic import that is the bug ;)
- grauzone (8/15) Feb 28 2009 Maybe all cyclic dependency bugs are on purpose, to teach people not to
- Lutger (4/21) Feb 28 2009 Well it's about cyclic dependency of initialization via module construct...
- Christopher Wright (3/24) Feb 28 2009 Additionally, the compiler has sufficient information to complain about
- Walter Bright (3/5) Feb 28 2009 No, it does not. The compiler doesn't know about private imports of
- Jarrett Billingsley (6/12) Feb 28 2009 See it's funny, since in the other post, you said that using an
- Walter Bright (4/8) Feb 28 2009 You can make hand-generated ones, too. The idea of keeping private
- Andrei Alexandrescu (3/12) Feb 28 2009 encapsuli...what? I definitedly need to conceptify that one :o).
- Derek Parnell (6/18) Feb 28 2009 I think the word Walter was reaching for was "encapsulement" ;-)
- Jarrett Billingsley (2/8) Feb 28 2009 Encapsulosity.
- Christopher Wright (4/10) Feb 28 2009 Okay, the compiler could gain that information, but it does not, since
- Walter Bright (3/15) Feb 28 2009 The problem if it detects it in an implementation-defined manner is the
- Frits van Bommel (3/19) Mar 01 2009 ... If the result of compilation provably won't *run* anyway, what's the...
- Christopher Wright (3/23) Mar 01 2009 Right. It's like the compiler warning you if your program starts with
- Walter Bright (2/8) Mar 01 2009 Nothing, it's just that the compiler cannot prove it is an error.
- Frits van Bommel (5/14) Mar 01 2009 Not even on a best-effort basis?
- Walter Bright (3/7) Mar 01 2009 Doing so would require full blown data flow analysis, which the front
- Christopher Wright (23/45) Feb 28 2009 And in point of fact, you can modify the runtime so it will not throw
- Fawzi Mohamed (2/51) Feb 28 2009 Tango has it (thanks to lindquist) your change removes it :)
- Walter Bright (18/21) Feb 28 2009 Yes, the bug where module A depends on module B being initialized first,...
- Eldar Insafutdinov (2/16) Feb 28 2009 I am not an expert but, Qt is a good example in my opinion, beause it is...
- Lars Ivar Igesund (20/40) Feb 28 2009 I do not agree that this proves anything. My opinion is that a circular
- Georg Wrede (10/15) Mar 06 2009 I read on http://code.google.com/p/qtd/ the following:
- Eldar Insafutdinov (2/26) Mar 06 2009 of course once there is somebody to do this job, it will appear in repos...
- Max Samukha (4/19) Mar 07 2009 I'm planning to make it work with D2 sooner or later. No plans for
It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.
Feb 04 2009
Eldar Insafutdinov Wrote:It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.For those who don't know: http://code.google.com/p/qtd/
Feb 04 2009
ideage Wrote:Great stuff! Expect window's version!I will probably do it in couple of weeks. Don't have time now :(
Feb 05 2009
I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.
Feb 05 2009
David Ferenczi Wrote:I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:tutorials are in trunk/examples http://code.google.com/p/qtd/source/browse/#svn/trunk/examplesIt didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.
Feb 05 2009
Eldar Insafutdinov wrote:David Ferenczi Wrote:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript... -- Daniel (Not angry at you, Eldar; angry at Google. They should know better :) )I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:tutorials are in trunk/examples http://code.google.com/p/qtd/source/browse/#svn/trunk/examplesIt didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.
Feb 05 2009
Daniel Keep escribió:Eldar Insafutdinov wrote:What? Why? A web like that without Javascript is awfuly slow and ugly...David Ferenczi Wrote:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript...I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:tutorials are in trunk/examples http://code.google.com/p/qtd/source/browse/#svn/trunk/examplesIt didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.-- Daniel (Not angry at you, Eldar; angry at Google. They should know better :) )
Feb 05 2009
Ary Borenszweig wrote:Daniel Keep escribió:So... not having a scripting language would make pages run slower. ... I *really* hope you're joking. As for the "ugly" argument, that's bunk as well. The only two things you can't do without Javascript is to perform dynamic positioning and visibility. But you don't NEED those to make aesthetically pleasing pages. Just go look at CSS Zen Garden. *deep breath* <tirade> I have no problem with having scripting available for pages in general. But what DOES make me spew LIQUID HATE from every bodily orifice [1] is when they use Javascript to REPLACE FUNCTIONALITY THAT HTML ALREADY HAS. Like the sites where instead of using hyperlinks, they use Javascript in onclick events. Gee thanks, a**hole, you just broke tabs. Thanks for dictating how I'm allowed to view your site! Or the sites where they "inject" the content of the page like this:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript...What? Why? A web like that without Javascript is awfuly slow and ugly...<script>document.write("THE PAGE CONTENT");</script>Or pages where they have forms that go over perfectly ordinary HTTP POST and use perfectly ordinary form elements... but the submit button doesn't work BECAUSE IT REQUIRES F**KING SCRIPTING. This sort of bulls**t is inexcusable. It's like breaking someone's legs and saying "but now you can use crutches; isn't that great?!" No, you broke my legs you bastard! What's more, thanks to the plague of popup ads, ads that hang your browser for 5 seconds every time you mouse over the word "synergy" in an article, ads that show up in the same window but OVER the content, ads that play music or stream video when I'm on a QUOTA-LIMITED 'net connection, ads that start TALKING to you if your mouse goes anywhere near them or sites that just generally abuse the hell out of scripting, I'm amazed ANYONE browses the web with Javascript enabled by default. Frankly, if you build a site that utterly depends on Javascript to function [2], then you're an _idiot_. You want to use JS to make the site more usable? That's great! But you DO NOT break basic functionality to do it. EVER. If you can't figure out how, you're not qualified to be writing JS for web pages [3]. As someone who used to do web development: anyone, **ANYONE** who does this should be taken out back, shot, hung, drawn & quartered then buried upside-down at a crossroads under a crucifix with a steak through the heart and a silver bullet in the head. Then burn and salt the earth just to make sure. </tirade> Sorry about that, but MAN do I feel better. -- Daniel [1] ... to borrow a phrase from Ben Croshaw. [2] Obviously, this doesn't apply for sites that GENUINELY cannot function without Javascript. Stuff like Google Docs or a Javascript image editor; that stuff is fine because HTML can't do that.
Feb 05 2009
Also, I apologise for the derailment. Back on topic for a moment, I've never worked with Qt before, but going over some of the examples it shows definite promise. It certainly looks easier to use than other toolkits I've worked with in the past. Again, sorry for getting off-topic, and do keep up the good work. :) -- Daniel
Feb 05 2009
Daniel Keep wrote:Also, I apologise for the derailment.Oh I hear ya. Web development makes pacifistic people wanna kill. Including myself.
Feb 07 2009
On Fri, Feb 6, 2009 at 9:00 AM, Daniel Keep <daniel.keep.lists gmail.com> wrote:</tirade> Sorry about that, but MAN do I feel better. -- Daniel [1] ... to borrow a phrase from Ben Croshaw. [2] Obviously, this doesn't apply for sites that GENUINELY cannot function without Javascript. Stuff like Google Docs or a Javascript image editor; that stuff is fine because HTML can't do that.There's something really humorous about a guy going on a rambling, fired-up, emotional tirade for a page and a half, but concluding it with proper footnotes. :-) --bb
Feb 05 2009
Reply to Bill,On Fri, Feb 6, 2009 at 9:00 AM, Daniel Keep <daniel.keep.lists gmail.com> wrote:[...] what I want to known is what happened to that last footnote!You want to use JS to make the site more usable? That's great! But you DO NOT break basic functionality to do it. EVER. If you can't figure out how, you're not qualified to be writing JS for web pages [3].</tirade> Sorry about that, but MAN do I feel better. -- Daniel [1] ... to borrow a phrase from Ben Croshaw. [2] Obviously, this doesn't apply for sites that GENUINELY cannot function without Javascript. Stuff like Google Docs or a Javascript image editor; that stuff is fine because HTML can't do that.There's something really humorous about a guy going on a rambling, fired-up, emotional tirade for a page and a half, but concluding it with proper footnotes. :-) --bb
Feb 05 2009
BCS wrote:Reply to Bill,I believe I was going to make a comment to the effect that it's fine to make websites like this for the purposes of learning. I decided that I was probably going a bit far in attempting to clarify myself. -- DanielOn Fri, Feb 6, 2009 at 9:00 AM, Daniel Keep <daniel.keep.lists gmail.com> wrote:[...] what I want to known is what happened to that last footnote!You want to use JS to make the site more usable? That's great! But you DO NOT break basic functionality to do it. EVER. If you can't figure out how, you're not qualified to be writing JS for web pages [3].
Feb 05 2009
"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message news:gmfujj$2t5$1 digitalmars.com...Ary Borenszweig wrote:This is by far the best description/explanation of the evils of Javascript I have ever seen. It might sound a little extreme to some people, but speaking as another person who has done plenty of web development, there is absolutely no way to cover this topic *properly* without putting it in such terms. If the above rant is overly-*anything*, it's overly conciliatory. There's just no excuse for so many of the things that most web developers do. Now if we can only nudge Daniel to give the same treatment to Firefox 3... ;) BTW, Daniel, if you're on Firefox, you need to install the Adblock Plus addon and set it up with some of the subscriptions here: http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely. (I have some other addon recommendations too, if you're interested.) In fact, that addon is the main reason I use Firefox as my primary browser even though I generally dislike Firefox. This addon still doesn't solve all of the problems with JS, but it at least changes to web from "completely unusable garbage" (and that's no exaggeration) to merely "frequently irritating". Also, your footnote [3] seems to be missing...I'm on the edge of my seat here!!Daniel Keep escribió:So... not having a scripting language would make pages run slower. ... I *really* hope you're joking. As for the "ugly" argument, that's bunk as well. The only two things you can't do without Javascript is to perform dynamic positioning and visibility. But you don't NEED those to make aesthetically pleasing pages. Just go look at CSS Zen Garden. *deep breath* <tirade> I have no problem with having scripting available for pages in general. But what DOES make me spew LIQUID HATE from every bodily orifice [1] is when they use Javascript to REPLACE FUNCTIONALITY THAT HTML ALREADY HAS. Like the sites where instead of using hyperlinks, they use Javascript in onclick events. Gee thanks, a**hole, you just broke tabs. Thanks for dictating how I'm allowed to view your site! Or the sites where they "inject" the content of the page like this:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript...What? Why? A web like that without Javascript is awfuly slow and ugly...<script>document.write("THE PAGE CONTENT");</script>Or pages where they have forms that go over perfectly ordinary HTTP POST and use perfectly ordinary form elements... but the submit button doesn't work BECAUSE IT REQUIRES F**KING SCRIPTING. This sort of bulls**t is inexcusable. It's like breaking someone's legs and saying "but now you can use crutches; isn't that great?!" No, you broke my legs you bastard! What's more, thanks to the plague of popup ads, ads that hang your browser for 5 seconds every time you mouse over the word "synergy" in an article, ads that show up in the same window but OVER the content, ads that play music or stream video when I'm on a QUOTA-LIMITED 'net connection, ads that start TALKING to you if your mouse goes anywhere near them or sites that just generally abuse the hell out of scripting, I'm amazed ANYONE browses the web with Javascript enabled by default. Frankly, if you build a site that utterly depends on Javascript to function [2], then you're an _idiot_. You want to use JS to make the site more usable? That's great! But you DO NOT break basic functionality to do it. EVER. If you can't figure out how, you're not qualified to be writing JS for web pages [3]. As someone who used to do web development: anyone, **ANYONE** who does this should be taken out back, shot, hung, drawn & quartered then buried upside-down at a crossroads under a crucifix with a steak through the heart and a silver bullet in the head. Then burn and salt the earth just to make sure. </tirade> Sorry about that, but MAN do I feel better. -- Daniel [1] ... to borrow a phrase from Ben Croshaw. [2] Obviously, this doesn't apply for sites that GENUINELY cannot function without Javascript. Stuff like Google Docs or a Javascript image editor; that stuff is fine because HTML can't do that.
Feb 05 2009
http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely.What kind of sites do you go that are so bad? I find things a little annoying without FlashBlock, and I have Firefox's default popup blocking on, but with those two things, I don't see much of anything all *that* annoying in my day-to-day web use. So I'm wondering if it has to do with the sites you frequent or something? Or is it just your threshold for tolerating an ad or two is so much lower than mine? --bb
Feb 05 2009
"Bill Baxter" <wbaxter gmail.com> wrote in message news:mailman.658.1233882921.22690.digitalmars-d-announce puremagic.com...FlashBlock is another one of my essential addons :) Let me put it this way: I don't have any sort of documented reading disability (ex, I've always done well on reading comprehension tests). But dispite that, I find it nearly impossible to read anything more than a single trivial sentence whenever there's anything moving, blinking, spinning, a slideshow, etc anywhere near the text (or when there's a voice reading it to me). It's not just annoying, it's a genuine distraction that my mind is simply unable to block out. Plus, as far as I'm concerned, there shouldn't be any moving, spinning, pulsating, animating crap to be blocked out of my mind in the first place.http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely.What kind of sites do you go that are so bad? I find things a little annoying without FlashBlock, and I have Firefox's default popup blocking on, but with those two things, I don't see much of anything all *that* annoying in my day-to-day web use. So I'm wondering if it has to do with the sites you frequent or something? Or is it just your threshold for tolerating an ad or two is so much lower than mine?
Feb 05 2009
Nick Sabalausky wrote:"Bill Baxter" <wbaxter gmail.com> wrote in message news:mailman.658.1233882921.22690.digitalmars-d-announce puremagic.com...I run AdBlock, NoScript, FlashBlock and Nuke Anything Enchanced. And if I DO see an ad get through all that, I add the company to my mental "people I will never buy from" list. I'm an advertiser's worst nightmare. -- DanielFlashBlock is another one of my essential addons :) Let me put it this way: I don't have any sort of documented reading disability (ex, I've always done well on reading comprehension tests). But dispite that, I find it nearly impossible to read anything more than a single trivial sentence whenever there's anything moving, blinking, spinning, a slideshow, etc anywhere near the text (or when there's a voice reading it to me). It's not just annoying, it's a genuine distraction that my mind is simply unable to block out. Plus, as far as I'm concerned, there shouldn't be any moving, spinning, pulsating, animating crap to be blocked out of my mind in the first place.http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely.What kind of sites do you go that are so bad? I find things a little annoying without FlashBlock, and I have Firefox's default popup blocking on, but with those two things, I don't see much of anything all *that* annoying in my day-to-day web use. So I'm wondering if it has to do with the sites you frequent or something? Or is it just your threshold for tolerating an ad or two is so much lower than mine?
Feb 05 2009
"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message news:gmg4oj$dqp$2 digitalmars.com...Nick Sabalausky wrote:I use QuickJava instead of NoScript. I find it handy to be able to toggle JS on/off with just a single click. I used to keep JS off by default and only turn it on when I really needed it, but sites requiring JS became more and more common to the point that I ended up reluctantly just keeping JS on by default, and only turning it off when something obnoxious is going on. Not an action I'm proud of, but it keeps me sane. My other bare-minimum essentials, in addition to Adblock Plus and FlashBlock, are Winestripe, Tab Mix Plus, and DisableBackspaceNavigation. I also make heavy use of Repagination, DownThemAll (I'm a packrat), BatchDownload, DownloadHelper, Download Statusbar (a little ugly, but much more handy than the default download window) and FasterFox (useful to see just how absurdly slow page-loading often is. I'm on a good broadband connection, and I frequently find sites that take 40-50 seconds to load a single page whenever JS is enabled (that's a good example of how JS slows the web down instead of speeding it up))."Bill Baxter" <wbaxter gmail.com> wrote in message news:mailman.658.1233882921.22690.digitalmars-d-announce puremagic.com...I run AdBlock, NoScript, FlashBlock and Nuke Anything Enchanced. And if I DO see an ad get through all that, I add the company to my mental "people I will never buy from" list. I'm an advertiser's worst nightmare.FlashBlock is another one of my essential addons :) Let me put it this way: I don't have any sort of documented reading disability (ex, I've always done well on reading comprehension tests). But dispite that, I find it nearly impossible to read anything more than a single trivial sentence whenever there's anything moving, blinking, spinning, a slideshow, etc anywhere near the text (or when there's a voice reading it to me). It's not just annoying, it's a genuine distraction that my mind is simply unable to block out. Plus, as far as I'm concerned, there shouldn't be any moving, spinning, pulsating, animating crap to be blocked out of my mind in the first place.http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely.What kind of sites do you go that are so bad? I find things a little annoying without FlashBlock, and I have Firefox's default popup blocking on, but with those two things, I don't see much of anything all *that* annoying in my day-to-day web use. So I'm wondering if it has to do with the sites you frequent or something? Or is it just your threshold for tolerating an ad or two is so much lower than mine?
Feb 05 2009
Nick Sabalausky wrote:FlashBlock is another one of my essential addons :) Let me put it this way: I don't have any sort of documented reading disability (ex, I've always done well on reading comprehension tests). But dispite that, I find it nearly impossible to read anything more than a single trivial sentence whenever there's anything moving, blinking, spinning, a slideshow, etc anywhere near the text (or when there's a voice reading it to me). It's not just annoying, it's a genuine distraction that my mind is simply unable to block out. Plus, as far as I'm concerned, there shouldn't be any moving, spinning, pulsating, animating crap to be blocked out of my mind in the first place.Whoa. At some point I realized that I was at peace with the web because my eye balls would automatically repel from all of the pulsating/spinny/blinky crap on the sides of web pages. So apparently my mind works a bit differently than yours. My brain must have, at some point, grown entire subnetworks of neurons dedicated to spam blocking. I have come to consciously realize this as well, and become incredibly thankful to it at the same time. Nick, you have my sympathies. Unfortunately for me, conceptual distractions are the bane of my existence. Really, I should be doing homework right now. But I'm not. I'm doing this instead.
Feb 05 2009
Hello Bill,It's not always about the class of sites anymore. Although naturally, there will be a higher incident of problems among certain types of sites. The problems are starting to prevalent among many types of sites since these locations, commercial or otherwise, are "pushing" a lot more than they use to. Many elements (like flash) are not necessarily visible, but still gather "permanent" information on you, and it doesn't seem to matter if you had your cookies disabled or not. I use noscript with firefox (which also allows control of Java and Flash). I completely agree that the use of JavaScript is pretty evil these days. Even worse is that websites are taking advantage of so many people that are rather ignorant of how to protect themselves. I have found some sites that are quite surfable without javascript: I'm very impressed when I see this because it says volumes about their good manners and respect for the user. I must admit that I also get greatly irritated when I come across websites that are inoperable without javascript. I often will refuse to use them... unless I really must. Contrary to popular opinion, javascript does not appear to be a dire necessity for a fast, usable website (though, I also admit there are certain good applications for it). Javascript is one of the worst potential security breeches today /especially/ because of all the websites that force you to keep it enabled. Unfortunately, most people have become so dependent on it that they can't think of giving it up just to have more privacy and security. Yet disabling JavaScript remains one of the most highly recommended ways to eliminate a whole spectrum of attacks that regularly can sneek through all your anti-virus and anti-malware software. And the attacks can come from websites that normally would be harmless because sometimes they get "injected" (I don't know how) with evil Javascript that is just waiting to be run in your browser. Flash is also a secret horror. The funny thing is that the blocking of cookies has long been controllable in most browsers, but little is said about flash "local shared objects" that can accomplish the same sort of tracking in a much more hidden medium. Even worse is that there is much less stricture on these objects (like expiry dates and storage size). There is a way to limit these LSO's but few people seem to know or think about this being necessary. A simple google search on Flash cookies gives a fair amount on interesting information on this. Incidentally Google is another one to keep your eye on; and while I don't want to sound alarmist, I think Google will eventually could turn out to be one of the greatest security/privacy concerns on the web over the next few years. They have managed to spread their influence everywhere by getting people excited on various ideas, and it's amazing to see that almost every website out there is linked to Google in sort of way or use a "free" Google feature (google analytics for one). All these "free" services are concerns. It seems Google is very clever... a little too clever for my liking. Overall, I think the web is a mess... a dangerous mess, and it's getting worse as fast as people are becoming ignorant: the gap expands even faster in the relative sense. I'm guessing the security and privacy risk it presents to the public will only get worse as we eat up the freebies, for which most of us have developed a taste from the bountiful supply of the information age. There's a general apathy that has grown along side it all. -JJR PS. I've found a few good ways to view both outgoing and incoming internet communications. Any sort of port logging is both interesting and educational. A couple good pieces of software to monitor these things are PeerGuardian2 (not only useful for p2p ... just generally useful to see incoming/outgoing traffic) and PortReporter (a Microsoft tool). Both allow you to see what kind of probes occur over time, including what your computer is doing to communicate with the outside world, perhaps even when you don't intend it to. :Phttp://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely.What kind of sites do you go that are so bad? I find things a little annoying without FlashBlock, and I have Firefox's default popup blocking on, but with those two things, I don't see much of anything all *that* annoying in my day-to-day web use. So I'm wondering if it has to do with the sites you frequent or something? Or is it just your threshold for tolerating an ad or two is so much lower than mine? --bb
Feb 05 2009
Nick Sabalausky wrote:"Daniel Keep"<daniel.keep.lists gmail.com> wrote in message news:gmfujj$2t5$1 digitalmars.com...You must frequent some fantastically horrible websites. I use the 'net quite frequently, and I don't experience anywhere near enough consternation to even consider finding a popup blocker.Ary Borenszweig wrote:This is by far the best description/explanation of the evils of Javascript I have ever seen. It might sound a little extreme to some people, but speaking as another person who has done plenty of web development, there is absolutely no way to cover this topic *properly* without putting it in such terms. If the above rant is overly-*anything*, it's overly conciliatory. There's just no excuse for so many of the things that most web developers do. Now if we can only nudge Daniel to give the same treatment to Firefox 3... ;) BTW, Daniel, if you're on Firefox, you need to install the Adblock Plus addon and set it up with some of the subscriptions here: http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely. (I have some other addon recommendations too, if you're interested.) In fact, that addon is the main reason I use Firefox as my primary browser even though I generally dislike Firefox. This addon still doesn't solve all of the problems with JS, but it at least changes to web from "completely unusable garbage" (and that's no exaggeration) to merely "frequently irritating".Daniel Keep escribió:So... not having a scripting language would make pages run slower. ... I *really* hope you're joking. As for the "ugly" argument, that's bunk as well. The only two things you can't do without Javascript is to perform dynamic positioning and visibility. But you don't NEED those to make aesthetically pleasing pages. Just go look at CSS Zen Garden. *deep breath* <tirade> I have no problem with having scripting available for pages in general. But what DOES make me spew LIQUID HATE from every bodily orifice [1] is when they use Javascript to REPLACE FUNCTIONALITY THAT HTML ALREADY HAS. Like the sites where instead of using hyperlinks, they use Javascript in onclick events. Gee thanks, a**hole, you just broke tabs. Thanks for dictating how I'm allowed to view your site! Or the sites where they "inject" the content of the page like this:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript...What? Why? A web like that without Javascript is awfuly slow and ugly...<script>document.write("THE PAGE CONTENT");</script>Or pages where they have forms that go over perfectly ordinary HTTP POST and use perfectly ordinary form elements... but the submit button doesn't work BECAUSE IT REQUIRES F**KING SCRIPTING. This sort of bulls**t is inexcusable. It's like breaking someone's legs and saying "but now you can use crutches; isn't that great?!" No, you broke my legs you bastard! What's more, thanks to the plague of popup ads, ads that hang your browser for 5 seconds every time you mouse over the word "synergy" in an article, ads that show up in the same window but OVER the content, ads that play music or stream video when I'm on a QUOTA-LIMITED 'net connection, ads that start TALKING to you if your mouse goes anywhere near them or sites that just generally abuse the hell out of scripting, I'm amazed ANYONE browses the web with Javascript enabled by default. Frankly, if you build a site that utterly depends on Javascript to function [2], then you're an _idiot_. You want to use JS to make the site more usable? That's great! But you DO NOT break basic functionality to do it. EVER. If you can't figure out how, you're not qualified to be writing JS for web pages [3]. As someone who used to do web development: anyone, **ANYONE** who does this should be taken out back, shot, hung, drawn& quartered then buried upside-down at a crossroads under a crucifix with a steak through the heart and a silver bullet in the head. Then burn and salt the earth just to make sure. </tirade> Sorry about that, but MAN do I feel better. -- Daniel [1] ... to borrow a phrase from Ben Croshaw. [2] Obviously, this doesn't apply for sites that GENUINELY cannot function without Javascript. Stuff like Google Docs or a Javascript image editor; that stuff is fine because HTML can't do that.
Feb 05 2009
Hello Chris,Nick Sabalausky wrote:Yeah, I don't go to that many websites beyong a usual few. Firefox's built-in popup blocker has been sufficient for me (and it usually tells me when it has blocked a popup). It's actually been a long time since I've worried too much about popups. I /do/ remember the day, though, when popups were a problem, and it was annoying. My beef is mostly with JS and Flash which noscript handles quite well. -JJR"Daniel Keep"<daniel.keep.lists gmail.com> wrote in message news:gmfujj$2t5$1 digitalmars.com...You must frequent some fantastically horrible websites. I use the 'net quite frequently, and I don't experience anywhere near enough consternation to even consider finding a popup blocker.Ary Borenszweig wrote:This is by far the best description/explanation of the evils of Javascript I have ever seen. It might sound a little extreme to some people, but speaking as another person who has done plenty of web development, there is absolutely no way to cover this topic *properly* without putting it in such terms. If the above rant is overly-*anything*, it's overly conciliatory. There's just no excuse for so many of the things that most web developers do. Now if we can only nudge Daniel to give the same treatment to Firefox 3... ;) BTW, Daniel, if you're on Firefox, you need to install the Adblock Plus addon and set it up with some of the subscriptions here: http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely. (I have some other addon recommendations too, if you're interested.) In fact, that addon is the main reason I use Firefox as my primary browser even though I generally dislike Firefox. This addon still doesn't solve all of the problems with JS, but it at least changes to web from "completely unusable garbage" (and that's no exaggeration) to merely "frequently irritating".Daniel Keep escribió:So... not having a scripting language would make pages run slower. ... I *really* hope you're joking. As for the "ugly" argument, that's bunk as well. The only two things you can't do without Javascript is to perform dynamic positioning and visibility. But you don't NEED those to make aesthetically pleasing pages. Just go look at CSS Zen Garden. *deep breath* <tirade> I have no problem with having scripting available for pages in general. But what DOES make me spew LIQUID HATE from every bodily orifice [1] is when they use Javascript to REPLACE FUNCTIONALITY THAT HTML ALREADY HAS. Like the sites where instead of using hyperlinks, they use Javascript in onclick events. Gee thanks, a**hole, you just broke tabs. Thanks for dictating how I'm allowed to view your site! Or the sites where they "inject" the content of the page like this:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript...What? Why? A web like that without Javascript is awfuly slow and ugly...<script>document.write("THE PAGE CONTENT");</script>Or pages where they have forms that go over perfectly ordinary HTTP POST and use perfectly ordinary form elements... but the submit button doesn't work BECAUSE IT REQUIRES F**KING SCRIPTING. This sort of bulls**t is inexcusable. It's like breaking someone's legs and saying "but now you can use crutches; isn't that great?!" No, you broke my legs you bastard! What's more, thanks to the plague of popup ads, ads that hang your browser for 5 seconds every time you mouse over the word "synergy" in an article, ads that show up in the same window but OVER the content, ads that play music or stream video when I'm on a QUOTA-LIMITED 'net connection, ads that start TALKING to you if your mouse goes anywhere near them or sites that just generally abuse the hell out of scripting, I'm amazed ANYONE browses the web with Javascript enabled by default. Frankly, if you build a site that utterly depends on Javascript to function [2], then you're an _idiot_. You want to use JS to make the site more usable? That's great! But you DO NOT break basic functionality to do it. EVER. If you can't figure out how, you're not qualified to be writing JS for web pages [3]. As someone who used to do web development: anyone, **ANYONE** who does this should be taken out back, shot, hung, drawn& quartered then buried upside-down at a crossroads under a crucifix with a steak through the heart and a silver bullet in the head. Then burn and salt the earth just to make sure. </tirade> Sorry about that, but MAN do I feel better. -- Daniel [1] ... to borrow a phrase from Ben Croshaw. [2] Obviously, this doesn't apply for sites that GENUINELY cannot function without Javascript. Stuff like Google Docs or a Javascript image editor; that stuff is fine because HTML can't do that.
Feb 05 2009
"Chris R Miller" <lordsauronthegreat gmail.com> wrote in message news:gmgeq2$11jp$1 digitalmars.com...Nick Sabalausky wrote:Adblock Plus blocks any type of ad, not just popups. To be honest, I would have no problem with web ads if they were just simple static images like from back before popups. It's just all of the visual-movement, slow-JS, potential for malware, etc. that I can't/won't tolerate.BTW, Daniel, if you're on Firefox, you need to install the Adblock Plus addon and set it up with some of the subscriptions here: http://adblockplus.org/en/subscriptions I'm not exaggerating when I say that for a few months before I found that addon, using the web was so bad I was *very* close to abandoning use of the web entirely. (I have some other addon recommendations too, if you're interested.) In fact, that addon is the main reason I use Firefox as my primary browser even though I generally dislike Firefox. This addon still doesn't solve all of the problems with JS, but it at least changes to web from "completely unusable garbage" (and that's no exaggeration) to merely "frequently irritating".You must frequent some fantastically horrible websites. I use the 'net quite frequently, and I don't experience anywhere near enough consternation to even consider finding a popup blocker.
Feb 05 2009
Daniel Keep escribió:Ary Borenszweig wrote:(...)Daniel Keep escribió:So... not having a scripting language would make pages run slower. ... I *really* hope you're joking. As for the "ugly" argument, that's bunk as well. The only two things you can't do without Javascript is to perform dynamic positioning and visibility. But you don't NEED those to make aesthetically pleasing pages. Just go look at CSS Zen Garden. *deep breath* <tirade>"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript...What? Why? A web like that without Javascript is awfuly slow and ugly...</tirade> Sorry about that, but MAN do I feel better.lol :) Yeah, well, for a directory listing they could have shown the full tree, but if it's too big then it's ugly, and browsing folder by folder (like dsource) is slow for me. You are right in that replacing href="" with onclick="" just for a link is stupid. But... why Javascript hurts you that much? What did it do to you?
Feb 05 2009
Ary Borenszweig wrote:lol :) Yeah, well, for a directory listing they could have shown the full tree, but if it's too big then it's ugly, and browsing folder by folder (like dsource) is slow for me.The point is that instead of giving you a sub-optimal but functional alternative, they give you none. It's like not putting in wheelchair access ramps on the argument that they're inconvenient due to being a longer path than the stairs.You are right in that replacing href="" with onclick="" just for a link is stupid.Not just stupid; there's a whole circle of hell devoted to people who do that. They sit in endless thirst with water coolers everywhere. The catch is the taps have been replaced with "low-resistance" jobbies that require a special spanner to turn. Such spanners were never built.But... why Javascript hurts you that much? What did it do to you?Leaving aside Javascript the language and talking about JS as used in browsers, it's not the language itself. It's how it's used. It's the constant needless use of it that breaks the user experience. I think I enumerated all the big ones previously. Let's say you're moving house, and ask someone to help. They come over, and are really helpful. But every five minutes, they bitch-slap you and kick you between the legs. Then go back to being helpful. Eventually, you're going to throw them out no matter HOW helpful they is. Bad web developers have abused JS so much, so often and for so long, that I've decided it's less stressful to run with JS disabled. Don't even get me started on sites based entirely on Flash... -- Daniel
Feb 05 2009
"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message news:gmg4av$dqp$1 digitalmars.com...Ary Borenszweig wrote:Oh great, now you've gotten ME started on Flash... ;) There are a LOT of people (myself included), that will immediately leave a site, never to return, the moment they see that FlashBlocker box taking up 99% of the page. I can sum up all my feelings about Flash (and many, but not all, uses of JS) pretty simply: They are the 2000's version of animating GIFs and blink tags, except it's worse simply because most people don't seem to have actually learned anything from the history of animating GIFs and blink tags. Interesting side note: I've noticed that such flash-only pages and sites seem to be by far the most common among musicians and restaurant chains. Don't get me started on actual Flash development... (I have the oh-so-wonderful luck of being near the beginning of a large project that, due to client requirements, is built primarily on Flash and PHP. Whooo boy, am I having fun...(/sarcasm))lol :) Yeah, well, for a directory listing they could have shown the full tree, but if it's too big then it's ugly, and browsing folder by folder (like dsource) is slow for me.The point is that instead of giving you a sub-optimal but functional alternative, they give you none. It's like not putting in wheelchair access ramps on the argument that they're inconvenient due to being a longer path than the stairs.You are right in that replacing href="" with onclick="" just for a link is stupid.Not just stupid; there's a whole circle of hell devoted to people who do that. They sit in endless thirst with water coolers everywhere. The catch is the taps have been replaced with "low-resistance" jobbies that require a special spanner to turn. Such spanners were never built.But... why Javascript hurts you that much? What did it do to you?Leaving aside Javascript the language and talking about JS as used in browsers, it's not the language itself. It's how it's used. It's the constant needless use of it that breaks the user experience. I think I enumerated all the big ones previously. Let's say you're moving house, and ask someone to help. They come over, and are really helpful. But every five minutes, they bitch-slap you and kick you between the legs. Then go back to being helpful. Eventually, you're going to throw them out no matter HOW helpful they is. Bad web developers have abused JS so much, so often and for so long, that I've decided it's less stressful to run with JS disabled. Don't even get me started on sites based entirely on Flash...
Feb 05 2009
Nick Sabalausky wrote:Interesting side note: I've noticed that such flash-only pages and sites seem to be by far the most common among musicians and restaurant chains.Yup; I *hate* looking up tour dates.Don't get me started on actual Flash development... (I have the oh-so-wonderful luck of being near the beginning of a large project that, due to client requirements, is built primarily on Flash and PHP. Whooo boy, am I having fun...(/sarcasm))lol, enjoy!
Feb 05 2009
Nick Sabalausky escribió:"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message news:gmg4av$dqp$1 digitalmars.com...Oh, you are not near as lucky as me. Imagine a site built entirely in Silverlight. Whoooooo!!!Ary Borenszweig wrote:Oh great, now you've gotten ME started on Flash... ;) There are a LOT of people (myself included), that will immediately leave a site, never to return, the moment they see that FlashBlocker box taking up 99% of the page. I can sum up all my feelings about Flash (and many, but not all, uses of JS) pretty simply: They are the 2000's version of animating GIFs and blink tags, except it's worse simply because most people don't seem to have actually learned anything from the history of animating GIFs and blink tags. Interesting side note: I've noticed that such flash-only pages and sites seem to be by far the most common among musicians and restaurant chains. Don't get me started on actual Flash development... (I have the oh-so-wonderful luck of being near the beginning of a large project that, due to client requirements, is built primarily on Flash and PHP. Whooo boy, am I having fun...(/sarcasm))lol :) Yeah, well, for a directory listing they could have shown the full tree, but if it's too big then it's ugly, and browsing folder by folder (like dsource) is slow for me.The point is that instead of giving you a sub-optimal but functional alternative, they give you none. It's like not putting in wheelchair access ramps on the argument that they're inconvenient due to being a longer path than the stairs.You are right in that replacing href="" with onclick="" just for a link is stupid.Not just stupid; there's a whole circle of hell devoted to people who do that. They sit in endless thirst with water coolers everywhere. The catch is the taps have been replaced with "low-resistance" jobbies that require a special spanner to turn. Such spanners were never built.But... why Javascript hurts you that much? What did it do to you?Leaving aside Javascript the language and talking about JS as used in browsers, it's not the language itself. It's how it's used. It's the constant needless use of it that breaks the user experience. I think I enumerated all the big ones previously. Let's say you're moving house, and ask someone to help. They come over, and are really helpful. But every five minutes, they bitch-slap you and kick you between the legs. Then go back to being helpful. Eventually, you're going to throw them out no matter HOW helpful they is. Bad web developers have abused JS so much, so often and for so long, that I've decided it's less stressful to run with JS disabled. Don't even get me started on sites based entirely on Flash...
Feb 06 2009
Ary Borenszweig wrote:Oh, you are not near as lucky as me. Imagine a site built entirely in Silverlight. Whoooooo!!!I can -- it looks like about:blank.
Feb 06 2009
On Sat, 07 Feb 2009 02:36:54 +0300, Christopher Wright <dhasenan gmail.com> wrote:Ary Borenszweig wrote:It is also built entirely in JavaScript. But wait!.. How can it be built entirely in Silvermoon if it is built entirely in JavaScript? o_OOh, you are not near as lucky as me. Imagine a site built entirely in Silverlight. Whoooooo!!!I can -- it looks like about:blank.
Feb 06 2009
But... why Javascript hurts you that much? What did it do to you?Yesterday, I was on digitalmars.com, browsing the archive for the D newsgroup. Actually, I just had it open in a tab, and was actively browsing another website. I wondered why the browser had such a bad response. Finally, I figured out, that the cause was some JavaScript code included from Amazon. It showed some applet on the bottom of the archive page, and it didn't even work. All it did was displaying some loading gif animation and eating CPU. When I blocked Amazon, all was fast and responsive again. Another example is Candydoc. That tree on the left is awful JavaScript hackery. It only works if JS is enabled, and even then it is slow, annoying to use, and all that. Candydoc advertises itself as "Produced result is AJAX web-application that is compatible with all mainstream web browsers." Without AJAX, the authot of Candydoc would have done a much better job. Now isn't that typical? (By the way, AJAX for offline browsable documentation? What?) And sorry, I can't stop my rant. Did you ever see those polls, which are mostly added on the left or right border of a webpage? Lately, I only see AJAX-style ones, and you can use them only with JavaScript enabled. When you vote, they show an animation, which alpha blends from one display state into another. Wheee, great. In the old days, you had to wait for the slow GUI to respond. Today, you wait for the GUI animation to finish. Both introduce a small but annoying delay. And not to forgot, when some dirty piece of AJAX JavaScript code runs wild. Then it will send HTTP requests in a loop, even though the page finished loading. Good that we have Noscript to trash the AJAX programmer's worthless effort. Sometimes I love new technology.
Feb 05 2009
"grauzone" <none example.net> wrote in message news:gmgjou$1af5$1 digitalmars.com...But... why Javascript hurts you that much? What did it do to you?Another example is Candydoc. That tree on the left is awful JavaScript hackery. It only works if JS is enabled, and even then it is slow, annoying to use, and all that. Candydoc advertises itself as "Produced result is AJAX web-application that is compatible with all mainstream web browsers." Without AJAX, the authot of Candydoc would have done a much better job. Now isn't that typical? (By the way, AJAX for offline browsable documentation? What?)Yes, yes, yes, exactly! A couple more examples of API docs that are barely-usable (ie, painful sluggishness, lack of offline viewing, and general bugginess) thanks to AJAX: MSDN Library and Adobe LiveDocs.When you vote, they show an animation, which alpha blends from one display state into another. Wheee, great. In the old days, you had to wait for the slow GUI to respond. Today, you wait for the GUI animation to finish. Both introduce a small but annoying delay.Yes, yes, yes, exactly! DVD menus do it too, and the blatant lack of thought that goes into such a design always irritates me. "I don't want to [watch | listen to] some cute little [transition | movie quote | film clip], I just want to [watch the movie | select a scene | setup audio options | view extras]." Most people, like myself, who have spent time in game programming (particularly old-school style games) learn very quickly that interactive interfaces need to have response times of no more than about 100ms max (preferably less) and transition times of no more than about 250ms (preferably less) for the user to really feel "in control". That's *not* much time, and far less time than many modern interface designers (games or otherwise) are comfortable restricting themselves to these days. I think part of the problem is that artists and graphic designers are usually hired for these jobs instead of actual interactive interface designers (because when most managers think "user interface" they just think of the visual side, and sometimes audio too, but they don't know that there are also temporal and usability concerns).And not to forgot, when some dirty piece of AJAX JavaScript code runs wild. Then it will send HTTP requests in a loop, even though the page finished loading. Good that we have Noscript to trash the AJAX programmer's worthless effort. Sometimes I love new technology.I have a certain viewpoint on that: AIUI, The strict definition of "technology" is the application of science to improve the quality of life. As such, there are many things that people consider to be "technologies" that I insist aren't technologies because they only satisfy the "application of science" part and not the "improve the quality of life" part. (A related pet peeve I have when dealing with laymen: "Technology" does not necessarily imply "electronics". Heck, even indoor plumbing is a technology...and one of my personal favorites ;) )
Feb 05 2009
grauzone wrote:I had some email discussions with Amazon about the miserable speed of the Amazon cloud widget. The idea of the cloud widget is great, it's supposed to look at the contents of the page and produce links to Amazon products, like books, that are related. So I really wanted this to work. But Amazon tech support insisted that it was not slow, it was merely pining for the fjords (ok, I added that last bit <g>). I was seeing load times that averaged around 30 seconds. In the face of that, I removed the widget a few weeks ago, after telling tech support I'd add it back in once they fixed the speed problems. If you found a page where it is still active, can you please give me the url?But... why Javascript hurts you that much? What did it do to you?Yesterday, I was on digitalmars.com, browsing the archive for the D newsgroup. Actually, I just had it open in a tab, and was actively browsing another website. I wondered why the browser had such a bad response. Finally, I figured out, that the cause was some JavaScript code included from Amazon. It showed some applet on the bottom of the archive page, and it didn't even work. All it did was displaying some loading gif animation and eating CPU. When I blocked Amazon, all was fast and responsive again.
Feb 06 2009
Walter Bright wrote:grauzone wrote:Not sure what you're saying, but it was eating up my CPU even some minutes after the page was loaded.I had some email discussions with Amazon about the miserable speed of the Amazon cloud widget. The idea of the cloud widget is great, it's supposed to look at the contents of the page and produce links to Amazon products, like books, that are related. So I really wanted this to work. But Amazon tech support insisted that it was not slow, it was merely pining for the fjords (ok, I added that last bit <g>). I was seeing load times that averaged around 30 seconds.But... why Javascript hurts you that much? What did it do to you?Yesterday, I was on digitalmars.com, browsing the archive for the D newsgroup. Actually, I just had it open in a tab, and was actively browsing another website. I wondered why the browser had such a bad response. Finally, I figured out, that the cause was some JavaScript code included from Amazon. It showed some applet on the bottom of the archive page, and it didn't even work. All it did was displaying some loading gif animation and eating CPU. When I blocked Amazon, all was fast and responsive again.In the face of that, I removed the widget a few weeks ago, after telling tech support I'd add it back in once they fixed the speed problems. If you found a page where it is still active, can you please give me the url?http://www.digitalmars.com/d/archives/digitalmars/D/learn/Mixin_versus_c_preprocessor_11830.html I suspect this is the offending piece of HTML: <SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822/US/classicempire/8006/adfa749b-6f27-4cdf a046-716a8fab7cab"> </SCRIPT>
Feb 07 2009
grauzone wrote:Ah, I see. It's an older page, one that I didn't update.If you found a page where it is still active, can you please give me the url?http://www.digitalmars.com/d/archives/digitalmars/D/learn/Mixin_versus_c_pre rocessor_11830.htmlI suspect this is the offending piece of HTML: <SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822/US/classicempire/8006/adfa749b-6f27-4cdf a046-716a8fab7cab"> </SCRIPT>Yeah, that's it.
Feb 07 2009
Reply to Ary,What? Why? A web like that without Javascript is awfuly slow and ugly...without javascript, the page should show the full directory tree (or n levels down). they could get real cute and have that anyway and just have the JS hide it.
Feb 05 2009
"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message news:gmfo1e$2ktp$1 digitalmars.com...Eldar Insafutdinov wrote:I'd be first in line for that even if I had to camp out all week. Plus, notice that you can't open one of the files in a new tab without it *also* opening in the same tab. That sort of garbage would never happen without JS. As for concerns about a web without JS being too slow: JS-heavy sites ARE absurdly slow. I never had a problem with lag on *basic text entry* on a 386 or even an Apple 2. But with Firefox it happens constantly. Pathetic.David Ferenczi Wrote:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript...I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:tutorials are in trunk/examples http://code.google.com/p/qtd/source/browse/#svn/trunk/examplesIt didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.
Feb 05 2009
"Nick Sabalausky" <a a.a> wrote in message news:gmfr9m$2u54$1 digitalmars.com...Plus, notice that you can't open one of the files in a new tab without it *also* opening in the same tab.Clarification: That problem seems to happen on Ctrl-Click, but not "Right-Click"->"Open In New Tab".
Feb 05 2009
Daniel Keep wrote:Eldar Insafutdinov wrote:Finally somehow who shares my pain. You have my sympathy. Especially Google is really bad with this. Not only are they pushing AJAX. They completely fail to make their sites useful without JS. Did you ever try to browse Youtube with JavaScript disabled? It's really fun to see, for what things they thought you _must_ have JS enabled. (My solution to this is not to browse Youtube at all.)David Ferenczi Wrote:"No files in this directory." Well that sucks. Oh well, I... hey, wait a second... *unblocks javascript* "No files in this directory, but there ARE subdirectories!" Sometimes, I really wish there was a way to electrocute people for making their sites break without Javascript... -- Daniel (Not angry at you, Eldar; angry at Google. They should know better :) )I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:tutorials are in trunk/examples http://code.google.com/p/qtd/source/browse/#svn/trunk/examplesIt didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.
Feb 05 2009
Thank you! Eldar Insafutdinov wrote:David Ferenczi Wrote:I'm glad to see this release and the progress of qtd! Coudl you please provide a link to the tutrial? Many thanks! Eldar Insafutdinov wrote:tutorials are in trunk/examples http://code.google.com/p/qtd/source/browse/#svn/trunk/examplesIt didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.
Feb 06 2009
Eldar Insafutdinov wrote:It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.Very cool! What versions of DMD/Tango are currently known to work with QtD? (ie, what are you developing against.) It'd be nifty to add a QtD profile to Sean Kerr's awesomely nifty sandboxing script. -- Chris Nicholson-Sauls
Feb 05 2009
Chris Nicholson-Sauls Wrote:Eldar Insafutdinov wrote:It's dmd v1.036 and tango-trunk dated November 25. But QtD is not on the bleeding edge of both compiler and tango, so I think tango 1.037 will be enough, so as compiler. I should specify dependency on tango on main page.It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.Very cool! What versions of DMD/Tango are currently known to work with QtD? (ie, what are you developing against.) It'd be nifty to add a QtD profile to Sean Kerr's awesomely nifty sandboxing script. -- Chris Nicholson-Sauls
Feb 05 2009
Do I see correctly, that you didn't need to introduce a MOC compiler for D? And that the Signal and Slots implementation is written in pure D?
Feb 05 2009
grauzone Wrote:Do I see correctly, that you didn't need to introduce a MOC compiler for D? And that the Signal and Slots implementation is written in pure D?Yes. But it is limited. No information, no dynamic invokation, different type of connections not implemented(but this theoretically is possible to do without moc)
Feb 06 2009
ideage Wrote:Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 10 2009
On Wed, Feb 11, 2009 at 6:59 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:ideage Wrote:here are huge issues. I tried first dmd and since I have to link D part of = wrapper with C++ object files produced by mingw - it didnt work and I was t= old that it's because mingw and dmd have different object file formats. So = 2 options left are gdc(which is kinda outdated) and ldc(which doesn't suppo= rt exception handling). So the situation is suspended, although I am trying= to build it with ldc now. My usual approach is to use mingw to build a dll out of the needed functionality. If you can make the C++ part a DLL then a D program can use it just fine. --bbGreat stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that t=
Feb 10 2009
Bill Baxter Wrote:On Wed, Feb 11, 2009 at 6:59 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Thanks, but could you please clarify something for me: as well as D part, C++ part is calling extern "C" functions defined in D part of the binding. will this work with dll? And also currently it doesn't use dynamic loading - it's just plain extern (C) function definitions on both sides, is this an issue?ideage Wrote:My usual approach is to use mingw to build a dll out of the needed functionality. If you can make the C++ part a DLL then a D program can use it just fine. --bbGreat stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 10 2009
On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 10 2009
Denis Koroskin Wrote:On Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 11 2009
On Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Denis Koroskin Wrote:You could use mingw's GNU make with CC=dmc. But I dunno if dmc will compile Qt or not. I would think it would, though. --bbOn Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 11 2009
Bill Baxter Wrote:On Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Actually I decided to make a dll. It is possible to do it and will be more robust solution. Qt is not tested to be compiled with dmc by trolltech(mingw, msvc and icc are guaranteed).Denis Koroskin Wrote:You could use mingw's GNU make with CC=dmc. But I dunno if dmc will compile Qt or not. I would think it would, though. --bbOn Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 11 2009
Hello Eldar,Bill Baxter Wrote:A dll is probably your best option, if you can make it work with the C++ code(?). I would have thought you needed a C interface, though. dmc is rarely supported by the majority of open-source projects out there, so you end up having to fix a lot of makefiles and a lot of code. It is especially difficult getting C++ code working with such projects because many of these will use macro definitions to enable/disable certain vendor compiler features. Also you will run into C++ implementation differences that make dmc choke. On several occasions where I've tried to use dmc for the same reason, and I've come to the conclusion that dmc support is a whole project in itself. It's a huge waste of time if all you want is to interface with a library. I recommend the ddl route if you can make it work. Most others have done the same. Incindentally, if you are curious why projects like Derelict and other bindings (using dynamic loading) are so oft used in the D community, this is pretty much the reason. -JJROn Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Actually I decided to make a dll. It is possible to do it and will be more robust solution. Qt is not tested to be compiled with dmc by trolltech(mingw, msvc and icc are guaranteed).Denis Koroskin Wrote:You could use mingw's GNU make with CC=dmc. But I dunno if dmc will compile Qt or not. I would think it would, though. --bbOn Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 11 2009
I recommend the ddl route if you can make it work.Sorry, not "ddl"... meant to say dll. :P
Feb 11 2009
John Reimer wrote:Hello Eldar,use a DLL anyway for commercial use. understand why anyone would use such an absolutely moronic license.Bill Baxter Wrote:A dll is probably your best option, if you can make it work with the C++ code(?). I would have thought you needed a C interface, though. dmc is rarely supported by the majority of open-source projects out there, so you end up having to fix a lot of makefiles and a lot of code. It is especially difficult getting C++ code working with such projects because many of these will use macro definitions to enable/disable certain vendor compiler features. Also you will run into C++ implementation differences that make dmc choke. On several occasions where I've tried to use dmc for the same reason, and I've come to the conclusion that dmc support is a whole project in itself. It's a huge waste of time if all you want is to interface with a library. I recommend the ddl route if you can make it work. Most others have done the same. Incindentally, if you are curious why projects like Derelict and other bindings (using dynamic loading) are so oft used in the D community, this is pretty much the reason. -JJROn Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Actually I decided to make a dll. It is possible to do it and will be more robust solution. Qt is not tested to be compiled with dmc by trolltech(mingw, msvc and icc are guaranteed).Denis Koroskin Wrote:You could use mingw's GNU make with CC=dmc. But I dunno if dmc will compile Qt or not. I would think it would, though. --bbOn Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 12 2009
Don Wrote:John Reimer wrote:I'm thinking on putting only C++ part of binding to a dll, while statically link D part. With Qt 4.5 out under lgpl we can make QtD under BSD, so this will work.Hello Eldar,use a DLL anyway for commercial use. understand why anyone would use such an absolutely moronic license.Bill Baxter Wrote:A dll is probably your best option, if you can make it work with the C++ code(?). I would have thought you needed a C interface, though. dmc is rarely supported by the majority of open-source projects out there, so you end up having to fix a lot of makefiles and a lot of code. It is especially difficult getting C++ code working with such projects because many of these will use macro definitions to enable/disable certain vendor compiler features. Also you will run into C++ implementation differences that make dmc choke. On several occasions where I've tried to use dmc for the same reason, and I've come to the conclusion that dmc support is a whole project in itself. It's a huge waste of time if all you want is to interface with a library. I recommend the ddl route if you can make it work. Most others have done the same. Incindentally, if you are curious why projects like Derelict and other bindings (using dynamic loading) are so oft used in the D community, this is pretty much the reason. -JJROn Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Actually I decided to make a dll. It is possible to do it and will be more robust solution. Qt is not tested to be compiled with dmc by trolltech(mingw, msvc and icc are guaranteed).Denis Koroskin Wrote:You could use mingw's GNU make with CC=dmc. But I dunno if dmc will compile Qt or not. I would think it would, though. --bbOn Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 12 2009
Eldar Insafutdinov wrote:Don Wrote:Cool!John Reimer wrote:I'm thinking on putting only C++ part of binding to a dll, while statically link D part. With Qt 4.5 out under lgpl we can make QtD under BSD, so this will work.Hello Eldar,use a DLL anyway for commercial use. understand why anyone would use such an absolutely moronic license.Bill Baxter Wrote:A dll is probably your best option, if you can make it work with the C++ code(?). I would have thought you needed a C interface, though. dmc is rarely supported by the majority of open-source projects out there, so you end up having to fix a lot of makefiles and a lot of code. It is especially difficult getting C++ code working with such projects because many of these will use macro definitions to enable/disable certain vendor compiler features. Also you will run into C++ implementation differences that make dmc choke. On several occasions where I've tried to use dmc for the same reason, and I've come to the conclusion that dmc support is a whole project in itself. It's a huge waste of time if all you want is to interface with a library. I recommend the ddl route if you can make it work. Most others have done the same. Incindentally, if you are curious why projects like Derelict and other bindings (using dynamic loading) are so oft used in the D community, this is pretty much the reason. -JJROn Wed, Feb 11, 2009 at 8:10 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Actually I decided to make a dll. It is possible to do it and will be more robust solution. Qt is not tested to be compiled with dmc by trolltech(mingw, msvc and icc are guaranteed).Denis Koroskin Wrote:You could use mingw's GNU make with CC=dmc. But I dunno if dmc will compile Qt or not. I would think it would, though. --bbOn Wed, 11 Feb 2009 00:59:28 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:And will dmc be able to compile Qt? And also as much as I undestdood make is not compatible with the one that comes with dmc? I will probably run into a big problem..ideage Wrote:You can try building Qt with DMC. It works quite will in pair with DMD on Windows.Great stuff! Expect window's version!So after some time trying to build qtd windows packages I realized that there are huge issues. I tried first dmd and since I have to link D part of wrapper with C++ object files produced by mingw - it didnt work and I was told that it's because mingw and dmd have different object file formats. So 2 options left are gdc(which is kinda outdated) and ldc(which doesn't support exception handling). So the situation is suspended, although I am trying to build it with ldc now.
Feb 12 2009
Eldar Insafutdinov Wrote:I'm thinking on putting only C++ part of binding to a dll, while statically link D part. With Qt 4.5 out under lgpl we can make QtD under BSD, so this will work.You mean the Revised BSD License I presume?
Feb 12 2009
Don Wrote:use a DLL anyway for commercial use. understand why anyone would use such an absolutely moronic license.LGPL doesn't explicitly prohibits static linking. It serves to ensure that the modified library can be replaced by other version at any time. And there's a good reason for that. Obviously you can't replace a library with other version if it's statically linked. But nothing prohibits from distributing a product in object files. :)
Feb 12 2009
naryl wrote:Don Wrote:Yes. But does ANYONE ever do that? It's an invitation to DLL hell.use a DLL anyway for commercial use. understand why anyone would use such an absolutely moronic license.LGPL doesn't explicitly prohibits static linking. It serves to ensure that the modified library can be replaced by other version at any time. And there's a good reason for that.Obviously you can't replace a library with other version if it's statically linked. But nothing prohibits from distributing a product in object files. :)Exactly. That's why it's the lunatic license. The LGPL inconveniences everyone in order to preserve a freedom which benefits NOBODY. It feels to me like giving you a free car PROVIDED that you ensure that there is a coffee cup glued to the top of it at all times. I'm strongly in favour of the GPL (especially for apps), but the LGPL is pure lunacy.
Feb 12 2009
"Don" <nospam nospam.com> wrote in message news:gn1saj$14uo$1 digitalmars.com...It feels to me like giving you a free car PROVIDED that you ensure that there is a coffee cup glued to the top of it at all times.I'd go for that ;-)
Feb 12 2009
Don Wrote:naryl wrote:Awesome. It'll be law by next Tuesday. Thanks for the idea. -ASDon Wrote: Obviously you can't replace a library with other version if it's statically linked. But nothing prohibits from distributing a product in object files. :)Exactly. That's why it's the lunatic license. The LGPL inconveniences everyone in order to preserve a freedom which benefits NOBODY. It feels to me like giving you a free car PROVIDED that you ensure that there is a coffee cup glued to the top of it at all times.
Feb 12 2009
naryl a écrit :Don Wrote:I disagree: the LGPL is probably the most 'derived' license: because developers don't like the stupid restriction on static linking they change it.. Too bad as it creates a lot of different LGPL-like license. That said, I know for sure that the LGPLv2 prevents static linking I don't know about the LGPLv3 though. BR, renoXuse a DLL anyway for commercial use. understand why anyone would use such an absolutely moronic license.LGPL doesn't explicitly prohibits static linking. It serves to ensure that the modified library can be replaced by other version at any time. And there's a good reason for that. Obviously you can't replace a library with other version if it's statically linked. But nothing prohibits from distributing a product in object files. :)
Feb 16 2009
On Tue, Feb 17, 2009 at 7:06 AM, renoX <renosky free.fr> wrote:naryl a =E9crit :seDon Wrote:ata DLL anyway for commercial use. understand why anyone would use such an absolutely moronic license.LGPL doesn't explicitly prohibits static linking. It serves to ensure th=ethe modified library can be replaced by other version at any time. And there's a good reason for that. Obviously you can't replace a library with other version if it's statically linked. But nothing prohibits from distributing a product in object files. :)I disagree: the LGPL is probably the most 'derived' license: because developers don't like the stupid restriction on static linking they chang=it..Well, there's another reason: the LPGL (at least version 2.1) is not exactly clear on the status of templates. Does instantiating a template create a derived work or not? This is also the reason why Qt Software/Nokia is currently still working on their modification of the GPL. The non-static restriction is probably built in for guaranteeing 'user freedom' with respect to the LGPLed code, but in practice it's a PITA for the user because it requires you to carry around a bunch of DLLs. Oh well :). All hail the Apache 2.0 license ;). Take care, Daniel
Feb 17 2009
naryl Wrote:Eldar Insafutdinov Wrote:It's a subject to discuss. I am not good at licenses.I'm thinking on putting only C++ part of binding to a dll, while statically link D part. With Qt 4.5 out under lgpl we can make QtD under BSD, so this will work.You mean the Revised BSD License I presume?
Feb 12 2009
Eldar Insafutdinov wrote:naryl Wrote:The revised (or modified) BSD is the version most commonly used today. In my experience, when people say "BSD License" it's the one they are usually referring to. This is the version of BSD used for Derelict. As for the difference, the original BSD included a clause that required derived works to acknowledge the original work. The modified version has no such requirement. You can read more about it on Wikipedia[1]. I've looked at numerous open source projects over the years which were licensed under the BSD. I can't recall the last time I saw one using the original version. IMO, using the modified version is a no-brainer. [1] http://en.wikipedia.org/wiki/BSD_licensesEldar Insafutdinov Wrote:It's a subject to discuss. I am not good at licenses.I'm thinking on putting only C++ part of binding to a dll, while statically link D part. With Qt 4.5 out under lgpl we can make QtD under BSD, so this will work.You mean the Revised BSD License I presume?
Feb 12 2009
Mike Parker Wrote:Eldar Insafutdinov wrote:Okey, if it is the most suitable license, we can go with it.naryl Wrote:The revised (or modified) BSD is the version most commonly used today. In my experience, when people say "BSD License" it's the one they are usually referring to. This is the version of BSD used for Derelict. As for the difference, the original BSD included a clause that required derived works to acknowledge the original work. The modified version has no such requirement. You can read more about it on Wikipedia[1]. I've looked at numerous open source projects over the years which were licensed under the BSD. I can't recall the last time I saw one using the original version. IMO, using the modified version is a no-brainer. [1] http://en.wikipedia.org/wiki/BSD_licensesEldar Insafutdinov Wrote:It's a subject to discuss. I am not good at licenses.I'm thinking on putting only C++ part of binding to a dll, while statically link D part. With Qt 4.5 out under lgpl we can make QtD under BSD, so this will work.You mean the Revised BSD License I presume?
Feb 13 2009
Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?
Feb 12 2009
On Fri, Feb 13, 2009 at 4:22 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?What's the implib command you're using? Often you need to use the /system flag. --bb
Feb 12 2009
Bill Baxter Wrote:On Fri, Feb 13, 2009 at 4:22 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Thanks, that helped! I used it without any flags.Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?What's the implib command you're using? Often you need to use the /system flag. --bb
Feb 12 2009
Bill Baxter Wrote:On Fri, Feb 13, 2009 at 4:22 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:okay, second problem then - I need to be able to call extern (C) functions defined in D code from DLL. I tried to do getProcAddress(NULL, "__some_D_func"); but this doesn't work.Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?What's the implib command you're using? Often you need to use the /system flag. --bb
Feb 12 2009
On Fri, Feb 13, 2009 at 5:00 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Bill Baxter Wrote:I think you may have to write some code to explicitly register your D functions with the DLL. You could write a mini getDCodeProcAddress kind of thing in your D code. Then give a pointer to that function to the C code in the DLL at startup. Then C code uses getDCodeProcAddress from there. Maybe there's an easier way, but that's what I'd try. --bbOn Fri, Feb 13, 2009 at 4:22 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:okay, second problem then - I need to be able to call extern (C) functions defined in D code from DLL. I tried to do getProcAddress(NULL, "__some_D_func"); but this doesn't work.Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?What's the implib command you're using? Often you need to use the /system flag. --bb
Feb 12 2009
On Thu, 12 Feb 2009 22:22:41 +0300, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?I believe it should be extern extern(C) ... Otherwise you /declare/ a function with C linkage but provide no implementation so that's why it fails at link time.
Feb 13 2009
Bill Baxter Wrote:On Fri, Feb 13, 2009 at 5:00 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:This way won't really work because there are dozens of such a functions - that's for virtual dispatch. I have just solved it by declaring functions "export extern (C)" and adding "_" prefix to function name when calling GetProcAddress. So technically there are no issues to make qtd working on windows!Bill Baxter Wrote:I think you may have to write some code to explicitly register your D functions with the DLL. You could write a mini getDCodeProcAddress kind of thing in your D code. Then give a pointer to that function to the C code in the DLL at startup. Then C code uses getDCodeProcAddress from there. Maybe there's an easier way, but that's what I'd try. --bbOn Fri, Feb 13, 2009 at 4:22 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:okay, second problem then - I need to be able to call extern (C) functions defined in D code from DLL. I tried to do getProcAddress(NULL, "__some_D_func"); but this doesn't work.Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?What's the implib command you're using? Often you need to use the /system flag. --bb
Feb 12 2009
On Thu, 12 Feb 2009 15:48:07 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Bill Baxter Wrote:You are a genius! ;)On Fri, Feb 13, 2009 at 5:00 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:This way won't really work because there are dozens of such a functions - that's for virtual dispatch. I have just solved it by declaring functions "export extern (C)" and adding "_" prefix to function name when calling GetProcAddress. So technically there are no issues to make qtd working on windows!Bill Baxter Wrote:I think you may have to write some code to explicitly register your D functions with the DLL. You could write a mini getDCodeProcAddress kind of thing in your D code. Then give a pointer to that function to the C code in the DLL at startup. Then C code uses getDCodeProcAddress from there. Maybe there's an easier way, but that's what I'd try. --bbOn Fri, Feb 13, 2009 at 4:22 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:okay, second problem then - I need to be able to call extern (C) functions defined in D code from DLL. I tried to do getProcAddress(NULL, "__some_D_func"); but this doesn't work.Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?What's the implib command you're using? Often you need to use the /system flag. --bb
Feb 12 2009
Max Samukha Wrote:On Thu, 12 Feb 2009 15:48:07 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:No, you are ;)Bill Baxter Wrote:You are a genius! ;)On Fri, Feb 13, 2009 at 5:00 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:This way won't really work because there are dozens of such a functions - that's for virtual dispatch. I have just solved it by declaring functions "export extern (C)" and adding "_" prefix to function name when calling GetProcAddress. So technically there are no issues to make qtd working on windows!Bill Baxter Wrote:I think you may have to write some code to explicitly register your D functions with the DLL. You could write a mini getDCodeProcAddress kind of thing in your D code. Then give a pointer to that function to the C code in the DLL at startup. Then C code uses getDCodeProcAddress from there. Maybe there's an easier way, but that's what I'd try. --bbOn Fri, Feb 13, 2009 at 4:22 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:okay, second problem then - I need to be able to call extern (C) functions defined in D code from DLL. I tried to do getProcAddress(NULL, "__some_D_func"); but this doesn't work.Can somebody help me with exporting functions from a DLL? I am defining functions in C++ like extern "C" __declspec(dllexport) void* __qtd_QObject_QObject_QObject(args) After compiling a DLL with MINGW and producing a lib file for it with implib I am trying to use them from D. In D I declare them as extern (C) void* __qtd_QObject_QObject_QObject(args); And then compile it and link it to the .lib file made by implib for that DLL, but optlink complains that symbol is undefined. I tried to use that Cfunction from C++ and it worked. What I can do?What's the implib command you're using? Often you need to use the /system flag. --bb
Feb 12 2009
Eldar Insafutdinov Wrote:This way won't really work because there are dozens of such a functions - that's for virtual dispatch. I have just solved it by declaring functions "export extern (C)" and adding "_" prefix to function name when calling GetProcAddress. So technically there are no issues to make qtd working on windows!So porting qtd to windows almost finished, but I experienced couple of new problems. One of them is that these callback functions that I declare on D side(as export extern C) of the binding and that should be called from C++ part which sits in DLL, they are not put by linker into executable if they are in a static library. If I compile module which contains them with the resulting executable - it works fine, functions are in executable. I tried -L/-L/NOPACKFUNCTIONS but it didn't help. What can solve this problem? Thank you.
Feb 14 2009
Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..
Feb 15 2009
On Sun, 15 Feb 2009 13:06:46 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..This may be related to the famous http://d.puremagic.com/issues/show_bug.cgi?id=424, though we don't make extensive use of templates.
Feb 15 2009
On Mon, Feb 16, 2009 at 3:28 AM, Max Samukha <samukha voliacable.com.removethis> wrote:On Sun, 15 Feb 2009 13:06:46 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It can also happen because of a single very large file. Perhaps one created by some sort of automatic code generation. Anything like that in qtd? --bbFinally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..This may be related to the famous http://d.puremagic.com/issues/show_bug.cgi?id=424, though we don't make extensive use of templates.
Feb 15 2009
On Mon, 16 Feb 2009 03:55:58 +0900, Bill Baxter <wbaxter gmail.com> wrote:On Mon, Feb 16, 2009 at 3:28 AM, Max Samukha <samukha voliacable.com.removethis> wrote:Yes, all modules are autogenerated. You are right, we probably should think about splitting up that big file. For example, by placing enum definitions into a separate module. It is still a less preferred solution because it requires more tweaking of the original code generator, which is already messy.On Sun, 15 Feb 2009 13:06:46 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It can also happen because of a single very large file. Perhaps one created by some sort of automatic code generation. Anything like that in qtd? --bbFinally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..This may be related to the famous http://d.puremagic.com/issues/show_bug.cgi?id=424, though we don't make extensive use of templates.
Feb 15 2009
Max Samukha Wrote:On Mon, 16 Feb 2009 03:55:58 +0900, Bill Baxter <wbaxter gmail.com> wrote:The reason why is this file is big is in this bug http://d.puremagic.com/issues/show_bug.cgi?id=282 And I don't thing that placing enums outside the class is a good idea, because enums will be exposed to global namespace unlike original Qt version. I have just checked, if enum A belongs to qt.core.Qt module you can't access it like Qt.A - which means that we have to keep that file big until this bug is fixed.On Mon, Feb 16, 2009 at 3:28 AM, Max Samukha <samukha voliacable.com.removethis> wrote:Yes, all modules are autogenerated. You are right, we probably should think about splitting up that big file. For example, by placing enum definitions into a separate module. It is still a less preferred solution because it requires more tweaking of the original code generator, which is already messy.On Sun, 15 Feb 2009 13:06:46 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It can also happen because of a single very large file. Perhaps one created by some sort of automatic code generation. Anything like that in qtd? --bbFinally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..This may be related to the famous http://d.puremagic.com/issues/show_bug.cgi?id=424, though we don't make extensive use of templates.
Feb 15 2009
On Mon, Feb 16, 2009 at 10:32 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:The reason why is this file is big is in this bug http://d.puremagic.com/=issues/show_bug.cgi?id=3D282 And I don't thing that placing enums outside t= he class is a good idea, because enums will be exposed to global namespace = unlike original Qt version. I have just checked, if enum A belongs to qt.co= re.Qt module you can't access it like Qt.A - which means that we have to ke= ep that file big until this bug is fixed. I guess we'll just have to wait for LDC then, because eliminating the "too many fixups" issue in OPTLINK is completely and utterly impossible. --bb ;-)
Feb 15 2009
Eldar Insafutdinov Wrote:Max Samukha Wrote:Anyway, I tried to place enums outside the classes, and I got: qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced Circular import is present.On Mon, 16 Feb 2009 03:55:58 +0900, Bill Baxter <wbaxter gmail.com> wrote:The reason why is this file is big is in this bug http://d.puremagic.com/issues/show_bug.cgi?id=282 And I don't thing that placing enums outside the class is a good idea, because enums will be exposed to global namespace unlike original Qt version. I have just checked, if enum A belongs to qt.core.Qt module you can't access it like Qt.A - which means that we have to keep that file big until this bug is fixed.On Mon, Feb 16, 2009 at 3:28 AM, Max Samukha <samukha voliacable.com.removethis> wrote:Yes, all modules are autogenerated. You are right, we probably should think about splitting up that big file. For example, by placing enum definitions into a separate module. It is still a less preferred solution because it requires more tweaking of the original code generator, which is already messy.On Sun, 15 Feb 2009 13:06:46 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It can also happen because of a single very large file. Perhaps one created by some sort of automatic code generation. Anything like that in qtd? --bbFinally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..This may be related to the famous http://d.puremagic.com/issues/show_bug.cgi?id=424, though we don't make extensive use of templates.
Feb 15 2009
On Sun, Feb 15, 2009 at 9:27 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:/issues/show_bug.cgi?id=3D282 And I don't thing that placing enums outside = the class is a good idea, because enums will be exposed to global namespace= unlike original Qt version. I have just checked, if enum A belongs to qt.c= ore.Qt module you can't access it like Qt.A - which means that we have to k= eep that file big until this bug is fixed.The reason why is this file is big is in this bug http://d.puremagic.com=Anyway, I tried to place enums outside the classes, and I got: qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced Circular import is present.You would do well to remove all circular imports. They make the compiler do stupid things.
Feb 15 2009
Jarrett Billingsley Wrote:On Sun, Feb 15, 2009 at 9:27 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It's the way Qt is. I can't change the API.You would do well to remove all circular imports. They make the compiler do stupid things.The reason why is this file is big is in this bug http://d.puremagic.com/issues/show_bug.cgi?id=282 And I don't thing that placing enums outside the class is a good idea, because enums will be exposed to global namespace unlike original Qt version. I have just checked, if enum A belongs to qt.core.Qt module you can't access it like Qt.A - which means that we have to keep that file big until this bug is fixed.Anyway, I tried to place enums outside the classes, and I got: qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced Circular import is present.
Feb 16 2009
Jarrett Billingsley wrote:On Sun, Feb 15, 2009 at 9:27 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:I really wonder why Walter doesn't just forbid circular dependencies in the language spec.You would do well to remove all circular imports. They make the compiler do stupid things.The reason why is this file is big is in this bug http://d.puremagic.com/issues/show_bug.cgi?id=282 And I don't thing that placing enums outside the class is a good idea, because enums will be exposed to global namespace unlike original Qt version. I have just checked, if enum A belongs to qt.core.Qt module you can't access it like Qt.A - which means that we have to keep that file big until this bug is fixed.Anyway, I tried to place enums outside the classes, and I got: qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced Circular import is present.
Feb 16 2009
On Mon, Feb 16, 2009 at 7:10 AM, grauzone <none example.net> wrote:Jarrett Billingsley wrote:Because that's redefining the problem rather than solving it? Circular dependencies are not always a sign of bad design. Shoving everything into one module sure is.On Sun, Feb 15, 2009 at 9:27 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:I really wonder why Walter doesn't just forbid circular dependencies in the language spec.You would do well to remove all circular imports. They make the compiler do stupid things.The reason why is this file is big is in this bug http://d.puremagic.com/issues/show_bug.cgi?id=282 And I don't thing that placing enums outside the class is a good idea, because enums will be exposed to global namespace unlike original Qt version. I have just checked, if enum A belongs to qt.core.Qt module you can't access it like Qt.A - which means that we have to keep that file big until this bug is fixed.Anyway, I tried to place enums outside the classes, and I got: qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced Circular import is present.
Feb 16 2009
On Sun, 15 Feb 2009 21:27:35 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Eldar Insafutdinov Wrote:You can still alias global enums into the class scope if you want Qt.AMax Samukha Wrote:On Mon, 16 Feb 2009 03:55:58 +0900, Bill Baxter <wbaxter gmail.com> wrote:The reason why is this file is big is in this bug http://d.puremagic.com/issues/show_bug.cgi?id=282 And I don't thing that placing enums outside the class is a good idea, because enums will be exposed to global namespace unlike original Qt version. I have just checked, if enum A belongs to qt.core.Qt module you can't access it like Qt.A - which means that we have to keep that file big until this bug is fixed.On Mon, Feb 16, 2009 at 3:28 AM, Max Samukha <samukha voliacable.com.removethis> wrote:Yes, all modules are autogenerated. You are right, we probably should think about splitting up that big file. For example, by placing enum definitions into a separate module. It is still a less preferred solution because it requires more tweaking of the original code generator, which is already messy.On Sun, 15 Feb 2009 13:06:46 -0500, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It can also happen because of a single very large file. Perhaps one created by some sort of automatic code generation. Anything like that in qtd? --bbFinally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..This may be related to the famous http://d.puremagic.com/issues/show_bug.cgi?id=424, though we don't make extensive use of templates.Anyway, I tried to place enums outside the classes, and I got: qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced qt/core/QFile.d(24): Error: enum FileError is forward referenced Circular import is present.Taking them outside the class doesn't help. I proposed to put them in a separate module. That would require renaming them to include class names. Yes, that sucks but it seems there's not much choice. ---- module QFooEnums; enum QFooState {} ---- module QBarEnums; enum QBarState {} ---- module QFoo; import QBar; import QFooEnums; import QBarEnums; class QFoo { alias QFooState State; // if you really want to void bar(QBarState e) {} } --- module QBar; import QFooEnums; import QBarEnums; QBar { alias QBarState State; void foo(QFooState e) {} } Or put all the enums in a single module (which will result in a big file but more digestable for optlink) Btw, circular imports magically erase static constructors from the menu.
Feb 16 2009
On Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
Bill Baxter Wrote:On Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
On Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
Bill Baxter Wrote:On Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both inlining and non-inlining.Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
On Mon, Feb 16, 2009 at 4:28 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Bill Baxter Wrote:Ok. Is it some kind of automatically generated file? I don't see it in the qtd repo. --bbOn Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both inlining and non-inlining.Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
Bill Baxter Wrote:On Mon, Feb 16, 2009 at 4:28 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:yes, all files are automatically generated. If you wish I can upload it(compiled binding with headers) somewhere.Bill Baxter Wrote:Ok. Is it some kind of automatically generated file? I don't see it in the qtd repo. --bbOn Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both inlining and non-inlining.Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
On Mon, Feb 16, 2009 at 4:38 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Bill Baxter Wrote:No, that's ok. I was just curious. So it sounds like the best hope is to try to find some way to split it up some. There must be some way it can be broken up, even if that requires turning some private members public. No? --bbOn Mon, Feb 16, 2009 at 4:28 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:yes, all files are automatically generated. If you wish I can upload it(compiled binding with headers) somewhere.Bill Baxter Wrote:Ok. Is it some kind of automatically generated file? I don't see it in the qtd repo. --bbOn Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both inlining and non-inlining.Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
Bill Baxter Wrote:On Mon, Feb 16, 2009 at 4:38 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It's in one file because of cyclic imports bug in dmd. The bug with optlink seems to be old, any chance that it's going to be fixed?Bill Baxter Wrote:No, that's ok. I was just curious. So it sounds like the best hope is to try to find some way to split it up some. There must be some way it can be broken up, even if that requires turning some private members public. No? --bbOn Mon, Feb 16, 2009 at 4:28 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:yes, all files are automatically generated. If you wish I can upload it(compiled binding with headers) somewhere.Bill Baxter Wrote:Ok. Is it some kind of automatically generated file? I don't see it in the qtd repo. --bbOn Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both inlining and non-inlining.Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 15 2009
Eldar Insafutdinov wrote:Bill Baxter Wrote:Approximately zero chance. Optlink is entirely written in asm, and AFAIK Walter doesn't want to touch it. There's a much greater chance of the circular imports bug getting fixed -- it has to happen one day.On Mon, Feb 16, 2009 at 4:38 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It's in one file because of cyclic imports bug in dmd. The bug with optlink seems to be old, any chance that it's going to be fixed?Bill Baxter Wrote:No, that's ok. I was just curious. So it sounds like the best hope is to try to find some way to split it up some. There must be some way it can be broken up, even if that requires turning some private members public. No? --bbOn Mon, Feb 16, 2009 at 4:28 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:yes, all files are automatically generated. If you wish I can upload it(compiled binding with headers) somewhere.Bill Baxter Wrote:Ok. Is it some kind of automatically generated file? I don't see it in the qtd repo. --bbOn Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both inlining and non-inlining.Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 16 2009
Don Wrote:Eldar Insafutdinov wrote:Ok, so I splitted all big files, circular imports now don't cause troubles. But optlink still crashes. Something else I can try?Bill Baxter Wrote:Approximately zero chance. Optlink is entirely written in asm, and AFAIK Walter doesn't want to touch it. There's a much greater chance of the circular imports bug getting fixed -- it has to happen one day.On Mon, Feb 16, 2009 at 4:38 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:It's in one file because of cyclic imports bug in dmd. The bug with optlink seems to be old, any chance that it's going to be fixed?Bill Baxter Wrote:No, that's ok. I was just curious. So it sounds like the best hope is to try to find some way to split it up some. There must be some way it can be broken up, even if that requires turning some private members public. No? --bbOn Mon, Feb 16, 2009 at 4:28 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:yes, all files are automatically generated. If you wish I can upload it(compiled binding with headers) somewhere.Bill Baxter Wrote:Ok. Is it some kind of automatically generated file? I don't see it in the qtd repo. --bbOn Mon, Feb 16, 2009 at 4:11 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:it is qt/gui/QPaintDevice.d if you have it. It doesn't work with both inlining and non-inlining.Bill Baxter Wrote:Do you compile it with inlining on? Not positive about this, but you may be able to cut down on the number of fixups it needs by not using inlining. Which file is it, anyway? --bbOn Mon, Feb 16, 2009 at 3:06 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Yes, it is this issue: "Unexpected OPTLINK Termination at EIP=0041AFFD". And yes, there is 1 quite large file, 14k lines, but because of forward reference and cyclic imports problems we can't split it currently.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..Was this what you saw? "Unexpected OPTLINK Termination at EIP=0044C37B" http://d.puremagic.com/issues/show_bug.cgi?id=424 Whatever it was, chances are good it's a known bug. So it would be good to figure out which one it is that you're hitting exactly. --bb
Feb 16 2009
Eldar Insafutdinov wrote:Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..What you can do is try to obj2asm and dumpobj -p the .obj files, to see if those files are well-formed or not.
Feb 16 2009
On Mon, Feb 16, 2009 at 8:26 PM, Walter Bright <newshound1 digitalmars.com> wrote:Eldar Insafutdinov wrote:I don't know if you realize just how unbelievably unhelpful that advice is for the typical user.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..What you can do is try to obj2asm and dumpobj -p the .obj files, to see if those files are well-formed or not.
Feb 16 2009
Jarrett Billingsley wrote:On Mon, Feb 16, 2009 at 8:26 PM, Walter Bright <newshound1 digitalmars.com> wrote:You aren't the typical user <g>. If the obj file is not well-formed, it's a compiler bug, and hence presumably much easier for me to fix.Eldar Insafutdinov wrote:I don't know if you realize just how unbelievably unhelpful that advice is for the typical user.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..What you can do is try to obj2asm and dumpobj -p the .obj files, to see if those files are well-formed or not.
Feb 16 2009
Walter Bright Wrote:Eldar Insafutdinov wrote:I have never dealed with asm before and besides there are more than 200 files in the project, that would be crucial to check them all.Finally we managed to compile qtd for Windows. But at the very last step when compiling example, optlink crashed with a messagebox containing X86 registers content. This seems to be a blocker for qtd working on windows..What you can do is try to obj2asm and dumpobj -p the .obj files, to see if those files are well-formed or not.
Feb 16 2009
qtd now works for windows. Here's the binary package http://qtd.googlecode.com/files/qtd-dmd-tango-win32.zip . It is compiled with dmd 1.036 and tango from trunk dated November 2008.
Feb 21 2009
On Sun, Feb 22, 2009 at 5:27 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:qtd now works for windows. Here's the binary package http://qtd.googlecode.com/files/qtd-dmd-tango-win32.zip . It is compiled with dmd 1.036 and tango from trunk dated November 2008.Fantastic. Have you written anywhere how you eventually resolved the linker problems? --bb
Feb 21 2009
Bill Baxter Wrote:On Sun, Feb 22, 2009 at 5:27 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Actually it is a magic. Another guy wrote a makefile that is now building library. C++ part of binding sits in a dll, while D part is in static library. to access symbols from dll we use implib. So what he did, he combined implib output lib with D object files(I don't know how exactly, I didn't even look into makefile). So the linker bug didn't appear. Btw if somebody wants to build qtd from sources, he should modify makefiles - paths to Qt, etc. In couple of days we will make it more usable and make a written guide.qtd now works for windows. Here's the binary package http://qtd.googlecode.com/files/qtd-dmd-tango-win32.zip . It is compiled with dmd 1.036 and tango from trunk dated November 2008.Fantastic. Have you written anywhere how you eventually resolved the linker problems? --bb
Feb 21 2009
What you and your crew are doing is really awesome! And you are beating all of the nasty linker errors and odd obstacles. Way to go. At some point in the future I will probably need to write cross-platform GUI apps in D, and I'll be looking to QT since it is good at this kind of work. So your work could potentially make my life much easier and my code much better at some point. Thanks. Keep up the good work and victory!
Feb 21 2009
We found out that while compiling qtd with dmd 1.038 and newer compiler hangs. ldc is also affected by this issue. which means that this is frontend bug. testcase is big of course. What are the possible options to solve this issue?
Feb 21 2009
On Sun, Feb 22, 2009 at 7:45 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:We found out that while compiling qtd with dmd 1.038 and newer compiler hangs. ldc is also affected by this issue. which means that this is frontend bug. testcase is big of course. What are the possible options to solve this issue?I think Walter has figured this one out. My code was hanging too, and I gave him some info off list that seemed to lead him to a resolution. --bb
Feb 21 2009
On Sun, 22 Feb 2009 08:04:12 +0900, Bill Baxter wrote:On Sun, Feb 22, 2009 at 7:45 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Do you happen to know what bug report that is?We found out that while compiling qtd with dmd 1.038 and newer compiler hangs. ldc is also affected by this issue. which means that this is frontend bug. testcase is big of course. What are the possible options to solve this issue?I think Walter has figured this one out. My code was hanging too, and I gave him some info off list that seemed to lead him to a resolution. --bb
Feb 21 2009
On Sun, Feb 22, 2009 at 10:16 AM, Moritz Warning <moritzwarning web.de> wrote:On Sun, 22 Feb 2009 08:04:12 +0900, Bill Baxter wrote:It was the one about compiling taking a long time that he was looking into, but it turned out that for my app it wasn't just taking a long time, it was getting stuck in an infinite loop. http://d.puremagic.com/issues/show_bug.cgi?id=2582 --bbOn Sun, Feb 22, 2009 at 7:45 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Do you happen to know what bug report that is?We found out that while compiling qtd with dmd 1.038 and newer compiler hangs. ldc is also affected by this issue. which means that this is frontend bug. testcase is big of course. What are the possible options to solve this issue?I think Walter has figured this one out. My code was hanging too, and I gave him some info off list that seemed to lead him to a resolution. --bb
Feb 21 2009
On Sun, 22 Feb 2009 10:26:04 +0900, Bill Baxter wrote:On Sun, Feb 22, 2009 at 10:16 AM, Moritz Warning <moritzwarning web.de> wrote:Thanks. I've added some info.On Sun, 22 Feb 2009 08:04:12 +0900, Bill Baxter wrote:It was the one about compiling taking a long time that he was looking into, but it turned out that for my app it wasn't just taking a long time, it was getting stuck in an infinite loop. http://d.puremagic.com/issues/show_bug.cgi?id=2582 --bbOn Sun, Feb 22, 2009 at 7:45 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Do you happen to know what bug report that is?We found out that while compiling qtd with dmd 1.038 and newer compiler hangs. ldc is also affected by this issue. which means that this is frontend bug. testcase is big of course. What are the possible options to solve this issue?I think Walter has figured this one out. My code was hanging too, and I gave him some info off list that seemed to lead him to a resolution. --bb
Feb 21 2009
Bill Baxter wrote:On Sun, Feb 22, 2009 at 10:16 AM, Moritz Warning <moritzwarning web.de> wrote:So the bug will likely be fixed in the next version of dmd? I'm really glad to hear this!On Sun, 22 Feb 2009 08:04:12 +0900, Bill Baxter wrote:It was the one about compiling taking a long time that he was looking into, but it turned out that for my app it wasn't just taking a long time, it was getting stuck in an infinite loop. http://d.puremagic.com/issues/show_bug.cgi?id=2582 --bbOn Sun, Feb 22, 2009 at 7:45 AM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:Do you happen to know what bug report that is?We found out that while compiling qtd with dmd 1.038 and newer compiler hangs. ldc is also affected by this issue. which means that this is frontend bug. testcase is big of course. What are the possible options to solve this issue?I think Walter has figured this one out. My code was hanging too, and I gave him some info off list that seemed to lead him to a resolution. --bb
Feb 21 2009
We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?
Feb 27 2009
On Fri, Feb 27, 2009 at 12:36 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?I'll save Walter the trouble: come up with a reproduceable testcase if you haven't already. It won't get fixed it he can't tell what the problem is.
Feb 27 2009
Jarrett Billingsley wrote:On Fri, Feb 27, 2009 at 12:36 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:I'll add to that my experience is that if the test case is incomplete, then I need to guess at the rest and fill it in. Often, then the test case works, and there's a cycle of "I can't reproduce the problem" followed by the missing bit of context that was the real cause. Then once the problem gets fixed, the reproducible test case goes into the test suite so it stays fixed.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?I'll save Walter the trouble: come up with a reproduceable testcase if you haven't already. It won't get fixed it he can't tell what the problem is.
Feb 27 2009
Walter Bright Wrote:Jarrett Billingsley wrote:I'm sorry, my mistake - it's in specs http://www.digitalmars.com/d/1.0/module.htmlOn Fri, Feb 27, 2009 at 12:36 PM, Eldar Insafutdinov <e.insafutdinov gmail.com> wrote:I'll add to that my experience is that if the test case is incomplete, then I need to guess at the rest and fill it in. Often, then the test case works, and there's a cycle of "I can't reproduce the problem" followed by the missing bit of context that was the real cause. Then once the problem gets fixed, the reproducible test case goes into the test suite so it stays fixed.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?I'll save Walter the trouble: come up with a reproduceable testcase if you haven't already. It won't get fixed it he can't tell what the problem is.Cycles (circular dependencies) in the import declarations are allowed as long as not both of the modules contain static constructors or static destructors. Violation of this rule will result in a runtime exception.Now we have to make a manual init function called from class constructors. I understand that allowing static consructors with cyclic imports will make order of their execution undefined, but this is acceptable and actually semantically doesn't break the idea of cyclic imports. Otherwise in my opinion this behavior is inconsistent..
Feb 27 2009
Eldar Insafutdinov wrote:Now we have to make a manual init function called from class constructors. I understand that allowing static consructors with cyclic imports will make order of their execution undefined, but this is acceptable and actually semantically doesn't break the idea of cyclic imports. Otherwise in my opinion this behavior is inconsistent..One of the goals of D is to eliminate undefined behavior wherever possible. In C++, the undefined order of static construction was a source of many porting problems. I think it's better in the long run to have a defined order, even if it means having to reorganize the code a bit.
Feb 27 2009
Walter Bright Wrote:Eldar Insafutdinov wrote:in our case resources we are initializing are unrelated to the modules we are importing. and semantically the code is placed in modules as it should be.Now we have to make a manual init function called from class constructors. I understand that allowing static consructors with cyclic imports will make order of their execution undefined, but this is acceptable and actually semantically doesn't break the idea of cyclic imports. Otherwise in my opinion this behavior is inconsistent..One of the goals of D is to eliminate undefined behavior wherever possible. In C++, the undefined order of static construction was a source of many porting problems. I think it's better in the long run to have a defined order, even if it means having to reorganize the code a bit.
Feb 27 2009
Eldar Insafutdinov wrote:in our case resources we are initializing are unrelated to the modules we are importing. and semantically the code is placed in modules as it should be.True, often there isn't an actual dependency on the order, but the compiler can't tell that.
Feb 27 2009
On Fri, Feb 27, 2009 at 5:07 PM, Walter Bright <newshound1 digitalmars.com> wrote:Eldar Insafutdinov wrote:I was going to say "can't it?" but then remembered separate compilation. Sigh. I think the separate compilation paradigm, at least as designed for C and C++, has to go the way of the dodo for lots of cool things to be made possible. The thread on .D about not being able to non-virtualize methods in the face of separate compilation is another example.in our case resources we are initializing are unrelated to the modules we are importing. and semantically the code is placed in modules as it should be.True, often there isn't an actual dependency on the order, but the compiler can't tell that.
Feb 27 2009
On 2009-02-27 21:10:29 +0100, Walter Bright <newshound1 digitalmars.com> said:Eldar Insafutdinov wrote:I fully agree, circular dependencies between modules is in general a good practice: a circular dependency it means that you have tight coupling, in in that case it is normally better to have everything in the same module to have a better control on it. Sometime one has cases in which circular dependencies arise, two ways to get rid of them are for example: 1) define and interface, the circular dependency is in the interfaces that are described in the same module, the two (or more) modules include the interfaces, and are not directly dependent on each other (only through the interfaces) 2) use templates, the circular dependencies are on a template parameter. The circular dependencies arise only upon instantiationNow we have to make a manual init function called from class constructors. I understand that allowing static consructors with cyclic imports will make order of their execution undefined, but this is acceptable and actually semantically doesn't break the idea of cyclic imports. Otherwise in my opinion this behavior is inconsistent..One of the goals of D is to eliminate undefined behavior wherever possible. In C++, the undefined order of static construction was a source of many porting problems. I think it's better in the long run to have a defined order, even if it means having to reorganize the code a bit.
Feb 27 2009
On 2009-02-27 21:49:58 +0100, Fawzi Mohamed <fmohamed mac.com> said:On 2009-02-27 21:10:29 +0100, Walter Bright <newshound1 digitalmars.com> said:*avoiding*Eldar Insafutdinov wrote:I fully agree,Now we have to make a manual init function called from class constructors. I understand that allowing static consructors with cyclic imports will make order of their execution undefined, but this is acceptable and actually semantically doesn't break the idea of cyclic imports. Otherwise in my opinion this behavior is inconsistent..One of the goals of D is to eliminate undefined behavior wherever possible. In C++, the undefined order of static construction was a source of many porting problems. I think it's better in the long run to have a defined order, even if it means having to reorganize the code a bit.circular dependencies between modules is in general a good practice: a circular dependency it means that you have tight coupling, in in that case it is normally better to have everything in the same module to have a better control on it. Sometime one has cases in which circular dependencies arise, two ways to get rid of them are for example: 1) define and interface, the circular dependency is in the interfaces that are described in the same module, the two (or more) modules include the interfaces, and are not directly dependent on each other (only through the interfaces) 2) use templates, the circular dependencies are on a template parameter. The circular dependencies arise only upon instantiation
Feb 27 2009
Fawzi Mohamed wrote:On 2009-02-27 21:49:58 +0100, Fawzi Mohamed <fmohamed mac.com> said:I agree with the above but there is still a small issue here: A module is a single file and when you have several large classes that are tightly coupled you can get a very big file with thousands of lines. what if i want to put each class in its own file? besides, the notion of a module is somewhat redundant - it's functionally a static struct. this is related to D's compilation model which is copied from C/C++ and metadata seems more capable. for instance there's no need for header files, that info is stored in the metadata of the assembly.On 2009-02-27 21:10:29 +0100, Walter Bright <newshound1 digitalmars.com> said:*avoiding*Eldar Insafutdinov wrote:I fully agree,Now we have to make a manual init function called from class constructors. I understand that allowing static consructors with cyclic imports will make order of their execution undefined, but this is acceptable and actually semantically doesn't break the idea of cyclic imports. Otherwise in my opinion this behavior is inconsistent..One of the goals of D is to eliminate undefined behavior wherever possible. In C++, the undefined order of static construction was a source of many porting problems. I think it's better in the long run to have a defined order, even if it means having to reorganize the code a bit.circular dependencies between modules is in general a good practice: a circular dependency it means that you have tight coupling, in in that case it is normally better to have everything in the same module to have a better control on it. Sometime one has cases in which circular dependencies arise, two ways to get rid of them are for example: 1) define and interface, the circular dependency is in the interfaces that are described in the same module, the two (or more) modules include the interfaces, and are not directly dependent on each other (only through the interfaces) 2) use templates, the circular dependencies are on a template parameter. The circular dependencies arise only upon instantiation
Feb 28 2009
On Sat, Feb 28, 2009 at 11:05 AM, Yigal Chripun <yigal100 gmail.com> wrote:I agree with the above but there is still a small issue here: A module is a single file and when you have several large classes that are tightly coupled you can get a very big file with thousands of lines. what if i want to put each class in its own file? besides, the notion of a module is somewhat redundant - it's functionally a static struct. this is related to D's compilation model which is copied from C/C++ and it metadata seems more capable. for instance there's no need for header files, that info is stored in the metadata of the assembly.Preciiiisely. I've been toying with the concept of a compiler which doesn't actually emit object files until it has to link its code into some form of executable. Instead it produces these sort of platform-independent internal representation files, which can contain all the metadata and symbol information needed. They can be as small as a single module or as large as an entire multi-level package. It
Feb 28 2009
Jarrett Billingsley wrote:On Sat, Feb 28, 2009 at 11:05 AM, Yigal Chripun<yigal100 gmail.com> wrote:I also think that source code organization should be orthogonal to the organization of the deployment executables (assemblies in .net) other useful metadata to include in those files is the documantation and versioning info.I agree with the above but there is still a small issue here: A module is a single file and when you have several large classes that are tightly coupled you can get a very big file with thousands of lines. what if i want to put each class in its own file? besides, the notion of a module is somewhat redundant - it's functionally a static struct. this is related to D's compilation model which is copied from C/C++ and it metadata seems more capable. for instance there's no need for header files, that info is stored in the metadata of the assembly.Preciiiisely. I've been toying with the concept of a compiler which doesn't actually emit object files until it has to link its code into some form of executable. Instead it produces these sort of platform-independent internal representation files, which can contain all the metadata and symbol information needed. They can be as small as a single module or as large as an entire multi-level package. It
Feb 28 2009
Yigal Chripun wrote:You can do this with mixins or aliases. Honestly, something I'd like to see is to extend the import syntax to allow you to import symbols from other symbols. For example:On Sat, Feb 28, 2009 at 11:05 AM, Yigal Chripun<yigal100 gmail.com> wrote:I agree with the above but there is still a small issue here: A module is a single file and when you have several large classes that are tightly coupled you can get a very big file with thousands of lines. what if i want to put each class in its own file? besides, the notion of a module is somewhat redundant - it's functionally a static struct.module foo; struct bar { static void baz(); }module main; import foo.bar; void main() { baz(); }Given that D name mangling contains most if not all of a function's interface, it sometimes makes me wonder why we can't just import a .lib file. Heck, stick an extra symbol on the end called _D_Interface if you must. :)this is related to D's compilation model which is copied from C/C++ and it metadata seems more capable. for instance there's no need for header files, that info is stored in the metadata of the assembly.I also think that source code organization should be orthogonal to the organization of the deployment executables (assemblies in .net)There are times where I hate this. The problem is that this seems to encourage very flat hierarchies in .NET code, with everything jammed together. What really exacerbates the situation is that namespaces can be added to by any library at any time. figure out what I was supposed to link to. Because the examples had multiple libraries all dumping their stuff into the same namespace, it was impossible to work out where any given symbol was coming from. I ended up having to manually go through every goddamn library with the object browser to figure it out. Enforcing the module<->file thing can be annoying at times, but nowhere near as bad as having no indication whatsoever where something is defined. -- Daniel
Feb 28 2009
Yigal Chripun wrote:this is related to D's compilation model which is copied from C/C++ and metadata seems more capable. for instance there's no need for header files, that info is stored in the metadata of the assembly.D can do the same thing - it can use the source of the module directly, or it can use a hand-generated 'header' file, or an automatically generated 'header' file. The latter is semantically indistinguishable from compiling the source module to a "metadata" file. I originally considered having D write such a "metadata" file, until I realized I didn't have to invent a format and a writer and reader for that format. I could just use the D source code notation as a "metadata" file and reuse the existing code.
Feb 28 2009
Walter Bright wrote:Yigal Chripun wrote:The D system has a major limitation, though -- you can't split the source for a module across multiple files. Which pushes you towards respect.this is related to D's compilation model which is copied from C/C++ assemblies and metadata seems more capable. for instance there's no need for header files, that info is stored in the metadata of the assembly.D can do the same thing - it can use the source of the module directly, or it can use a hand-generated 'header' file, or an automatically generated 'header' file. The latter is semantically indistinguishable from compiling the source module to a "metadata" file. I originally considered having D write such a "metadata" file, until I realized I didn't have to invent a format and a writer and reader for that format. I could just use the D source code notation as a "metadata" file and reuse the existing code.
Mar 01 2009
On Sun, Mar 1, 2009 at 10:16 AM, Don <nospam nospam.com> wrote:The D system has a major limitation, though -- you can't split the source for a module across multiple files. Which pushes you towards enormous sourceYeah. Imagine if DMDFE were written in D; how big would those modules have to be?
Mar 01 2009
Jarrett Billingsley wrote:On Sun, Mar 1, 2009 at 10:16 AM, Don <nospam nospam.com> wrote:The current organization of DMDFE is totally inconducive to D's module system, which I find ironic.The D system has a major limitation, though -- you can't split the source for a module across multiple files. Which pushes you towards enormous sourceYeah. Imagine if DMDFE were written in D; how big would those modules have to be?
Mar 01 2009
Eldar Insafutdinov wrote:We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;) -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Feb 28 2009
Lars Ivar Igesund wrote:Eldar Insafutdinov wrote:Maybe all cyclic dependency bugs are on purpose, to teach people not to use this evil D feature? Yeah, that must it be. I can't explain why else these bugs/issues aren't fixed, and why people only reply with incredibly useful statements like "but you shouldn't use this feature anyway!". Broken features should be either fixed or removed. This half-assedness about it isn't really going to help D.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;)
Feb 28 2009
grauzone wrote:Lars Ivar Igesund wrote:Well it's about cyclic dependency of initialization via module constructors only right? Cyclic imports in general aren't (supposed to be) broken, nor are module constructors.Eldar Insafutdinov wrote:Maybe all cyclic dependency bugs are on purpose, to teach people not to use this evil D feature? Yeah, that must it be. I can't explain why else these bugs/issues aren't fixed, and why people only reply with incredibly useful statements like "but you shouldn't use this feature anyway!". Broken features should be either fixed or removed. This half-assedness about it isn't really going to help D.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;)
Feb 28 2009
Lutger wrote:grauzone wrote:Additionally, the compiler has sufficient information to complain about the problem at compile time, but it doesn't. That is a bug.Lars Ivar Igesund wrote:Well it's about cyclic dependency of initialization via module constructors only right? Cyclic imports in general aren't (supposed to be) broken, nor are module constructors.Eldar Insafutdinov wrote:Maybe all cyclic dependency bugs are on purpose, to teach people not to use this evil D feature? Yeah, that must it be. I can't explain why else these bugs/issues aren't fixed, and why people only reply with incredibly useful statements like "but you shouldn't use this feature anyway!". Broken features should be either fixed or removed. This half-assedness about it isn't really going to help D.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;)
Feb 28 2009
Christopher Wright wrote:Additionally, the compiler has sufficient information to complain about the problem at compile time, but it doesn't. That is a bug.No, it does not. The compiler doesn't know about private imports of separately compiled modules.
Feb 28 2009
On Sat, Feb 28, 2009 at 3:05 PM, Walter Bright <newshound1 digitalmars.com> wrote:Christopher Wright wrote:See it's funny, since in the other post, you said that using an autogenerated header file is semantically indistinguishable from compiling it to a metadata file. And here you're pointing out an obvious shortcoming!Additionally, the compiler has sufficient information to complain about the problem at compile time, but it doesn't. That is a bug.No, it does not. The compiler doesn't know about private imports of separately compiled modules.
Feb 28 2009
Jarrett Billingsley wrote:See it's funny, since in the other post, you said that using an autogenerated header file is semantically indistinguishable from compiling it to a metadata file. And here you're pointing out an obvious shortcoming!You can make hand-generated ones, too. The idea of keeping private imports private is to explicitly *avoid* dependencies on knowing the contents. It's a principle of encapsulization.
Feb 28 2009
Walter Bright wrote:Jarrett Billingsley wrote:encapsuli...what? I definitedly need to conceptify that one :o). AndreiSee it's funny, since in the other post, you said that using an autogenerated header file is semantically indistinguishable from compiling it to a metadata file. And here you're pointing out an obvious shortcoming!You can make hand-generated ones, too. The idea of keeping private imports private is to explicitly *avoid* dependencies on knowing the contents. It's a principle of encapsulization.
Feb 28 2009
On Sat, 28 Feb 2009 13:03:05 -0800, Andrei Alexandrescu wrote:Walter Bright wrote:I think the word Walter was reaching for was "encapsulement" ;-) -- Derek Parnell Melbourne, Australia skype: derek.j.parnellJarrett Billingsley wrote:encapsuli...what? I definitedly need to conceptify that one :o).See it's funny, since in the other post, you said that using an autogenerated header file is semantically indistinguishable from compiling it to a metadata file. And here you're pointing out an obvious shortcoming!You can make hand-generated ones, too. The idea of keeping private imports private is to explicitly *avoid* dependencies on knowing the contents. It's a principle of encapsulization.
Feb 28 2009
On Sat, Feb 28, 2009 at 5:30 PM, Derek Parnell <derek psych.ward> wrote:Encapsulosity.I think the word Walter was reaching for was "encapsulement" =A0;-)You can make hand-generated ones, too. The idea of keeping private imports private is to explicitly *avoid* dependencies on knowing the contents. It's a principle of encapsulization.encapsuli...what? I definitedly need to conceptify that one :o).
Feb 28 2009
Walter Bright wrote:Christopher Wright wrote:Okay, the compiler could gain that information, but it does not, since it is not required. In many cases, the compiler could detect these issues. Detecting these would be a reasonable, if low priority, enhancement.Additionally, the compiler has sufficient information to complain about the problem at compile time, but it doesn't. That is a bug.No, it does not. The compiler doesn't know about private imports of separately compiled modules.
Feb 28 2009
Christopher Wright wrote:Walter Bright wrote:The problem if it detects it in an implementation-defined manner is the source code is no longer portable.Christopher Wright wrote:Okay, the compiler could gain that information, but it does not, since it is not required. In many cases, the compiler could detect these issues. Detecting these would be a reasonable, if low priority, enhancement.Additionally, the compiler has sufficient information to complain about the problem at compile time, but it doesn't. That is a bug.No, it does not. The compiler doesn't know about private imports of separately compiled modules.
Feb 28 2009
Walter Bright wrote:Christopher Wright wrote:... If the result of compilation provably won't *run* anyway, what's the problem with a compile-time error?Walter Bright wrote:The problem if it detects it in an implementation-defined manner is the source code is no longer portable.Christopher Wright wrote:Okay, the compiler could gain that information, but it does not, since it is not required. In many cases, the compiler could detect these issues. Detecting these would be a reasonable, if low priority, enhancement.Additionally, the compiler has sufficient information to complain about the problem at compile time, but it doesn't. That is a bug.No, it does not. The compiler doesn't know about private imports of separately compiled modules.
Mar 01 2009
Frits van Bommel wrote:Walter Bright wrote:Right. It's like the compiler warning you if your program starts with "assert (false)".Christopher Wright wrote:... If the result of compilation provably won't *run* anyway, what's the problem with a compile-time error?Walter Bright wrote:The problem if it detects it in an implementation-defined manner is the source code is no longer portable.Christopher Wright wrote:Okay, the compiler could gain that information, but it does not, since it is not required. In many cases, the compiler could detect these issues. Detecting these would be a reasonable, if low priority, enhancement.Additionally, the compiler has sufficient information to complain about the problem at compile time, but it doesn't. That is a bug.No, it does not. The compiler doesn't know about private imports of separately compiled modules.
Mar 01 2009
Frits van Bommel wrote:Walter Bright wrote:Nothing, it's just that the compiler cannot prove it is an error.The problem if it detects it in an implementation-defined manner is the source code is no longer portable.... If the result of compilation provably won't *run* anyway, what's the problem with a compile-time error?
Mar 01 2009
Walter Bright wrote:Frits van Bommel wrote:Not even on a best-effort basis? It doesn't have to catch every possible case; I for one would be perfectly fine with it if it didn't catch the "I omitted a private import from my .di file" case...Walter Bright wrote:Nothing, it's just that the compiler cannot prove it is an error.The problem if it detects it in an implementation-defined manner is the source code is no longer portable.... If the result of compilation provably won't *run* anyway, what's the problem with a compile-time error?
Mar 01 2009
Frits van Bommel wrote:Not even on a best-effort basis? It doesn't have to catch every possible case; I for one would be perfectly fine with it if it didn't catch the "I omitted a private import from my .di file" case...Doing so would require full blown data flow analysis, which the front end is not equipped to do.
Mar 01 2009
Lutger wrote:grauzone wrote:And in point of fact, you can modify the runtime so it will not throw exceptions on cyclic dependencies: Index: genobj.d =================================================================== --- genobj.d (revision 4339) +++ genobj.d (working copy) -1098,11 +1098,7 if (m.ctor || m.dtor) { if (m.flags & MIctorstart) - { if (skip || m.flags & MIstandalone) - continue; - throw new Exception( "Cyclic dependency in module " ~ (from is null ? "*null*" : from.name) ~ " for import " ~ m.name); - } - + continue; m.flags |= MIctorstart; _moduleCtor2(m,m.importedModules, 0); if (m.ctor) This opens you up to certain bugs, but they should be relatively rare. I've tried it, and it appears to work.Lars Ivar Igesund wrote:Well it's about cyclic dependency of initialization via module constructors only right? Cyclic imports in general aren't (supposed to be) broken, nor are module constructors.Eldar Insafutdinov wrote:Maybe all cyclic dependency bugs are on purpose, to teach people not to use this evil D feature? Yeah, that must it be. I can't explain why else these bugs/issues aren't fixed, and why people only reply with incredibly useful statements like "but you shouldn't use this feature anyway!". Broken features should be either fixed or removed. This half-assedness about it isn't really going to help D.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;)
Feb 28 2009
On 2009-02-28 14:54:26 +0100, Christopher Wright <dhasenan gmail.com> said:Lutger wrote:Tango has it (thanks to lindquist) your change removes it :)grauzone wrote:And in point of fact, you can modify the runtime so it will not throw exceptions on cyclic dependencies: Index: genobj.d =================================================================== --- genobj.d (revision 4339) +++ genobj.d (working copy) -1098,11 +1098,7 if (m.ctor || m.dtor) { if (m.flags & MIctorstart) - { if (skip || m.flags & MIstandalone) - continue; - throw new Exception( "Cyclic dependency in module " ~ (from is null ? "*null*" : from.name) ~ " for import " ~ m.name); - } - + continue; m.flags |= MIctorstart; _moduleCtor2(m,m.importedModules, 0); if (m.ctor) This opens you up to certain bugs, but they should be relatively rare. I've tried it, and it appears to work.Lars Ivar Igesund wrote:Well it's about cyclic dependency of initialization via module constructors only right? Cyclic imports in general aren't (supposed to be) broken, nor are module constructors.Eldar Insafutdinov wrote:Maybe all cyclic dependency bugs are on purpose, to teach people not to use this evil D feature? Yeah, that must it be. I can't explain why else these bugs/issues aren't fixed, and why people only reply with incredibly useful statements like "but you shouldn't use this feature anyway!". Broken features should be either fixed or removed. This half-assedness about it isn't really going to help D.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;)
Feb 28 2009
Christopher Wright wrote:This opens you up to certain bugs,Yes, the bug where module A depends on module B being initialized first, yet B imports A. With this patch, it may or may not work correctly, as order of initialization for cyclic imports will be unpredictable.but they should be relatively rare.But nasty, as they tend to show up when porting or updating the compiler or build system, long after the original programmer left. Furthermore, these bugs may go undetected at QA time if nobody put a test for proper initialization in the test suite. Java is a very portable language, not because of the VM, but because it tries to eliminate all implementation and undefined behavior. It hasn't been 100% successful at that, but this facet of Java has, in my opinion, been a big factor in the wide adoption of Java. In contrast, only experienced C and C++ programmers are able to write code that ports reliably. Experience at having been burned by implementation and undefined language behavior. This is no longer acceptable in a language.I've tried it, and it appears to work.That's the problem with undefined behavior :-(, it only appears to work. It is not guaranteed to work.
Feb 28 2009
Lars Ivar Igesund Wrote:Eldar Insafutdinov wrote:I am not an expert but, Qt is a good example in my opinion, beause it is a mature API (fourth version) which shows that you can't go without cyclic dependencies in a very complex project.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;) -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Feb 28 2009
Eldar Insafutdinov wrote:Lars Ivar Igesund Wrote:I do not agree that this proves anything. My opinion is that a circular dependency at the very least is a hazardous design decision. In a class hierarchy this may work out well if there never ever will be any sub-classes to the involved classes, but typically this will come back and bite you in the toe when you cannot afford to redesign. I know D is less forgiving about this than other languages, and so it is a good help in creating a good design. Note that Java allows circular import dependencies, but not class dependencies at construction time (instance variables initialised prior to the constructor being run) which is similar to the static construction restriction in D. I understand that your issue is due to Qt's design and not your own, and as such the compiler could be more helpful, but in general I think the compiler should flag this at least at warning level (I agree with those who think it should be a compile time rather than a runtime error). -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the TangoEldar Insafutdinov wrote:I am not an expert but, Qt is a good example in my opinion, beause it is a mature API (fourth version) which shows that you can't go without cyclic dependencies in a very complex project.We faced a bug that module static constructors don't work with cyclic imports. Currently it's fixed with a dirty hack which is not really acceptable. Is there any chance for this to be fixed?IMO it is the cyclic import that is the bug ;) -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Feb 28 2009
Eldar Insafutdinov wrote:It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.I read on http://code.google.com/p/qtd/ the following: "QtD requires tango. Those who use phobos should try tangobos or modify qtd(that should not be very difficult)." I bet quite some of the non-Tango users ignore QtD because they don't want to install Tango just for one thing. If you can find a Phobos user who has done this "not very diffcult" QtD modification, he might write a short description. And a link to that could be on the page, next to the sentence. Even better would of course be to make QtD work with both already.
Mar 06 2009
Georg Wrede Wrote:Eldar Insafutdinov wrote:of course once there is somebody to do this job, it will appear in repos. Moreover there will be starting a job to port it to D2. Most probably there won't be D1+phobos support. I don't use phobos myself and the trend is that some projects I like use tango. DWT is one of them and it also uses tango. So the main concentration will be on D1-tango and D2-phobos I guess.It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.I read on http://code.google.com/p/qtd/ the following: "QtD requires tango. Those who use phobos should try tangobos or modify qtd(that should not be very difficult)." I bet quite some of the non-Tango users ignore QtD because they don't want to install Tango just for one thing. If you can find a Phobos user who has done this "not very diffcult" QtD modification, he might write a short description. And a link to that could be on the page, next to the sentence. Even better would of course be to make QtD work with both already.
Mar 06 2009
On Fri, 06 Mar 2009 18:34:19 +0200, Georg Wrede <georg.wrede iki.fi> wrote:Eldar Insafutdinov wrote:I'm planning to make it work with D2 sooner or later. No plans for D1+phobos.It didn't take very long after previous post to make a first implementation of signals and slots(thanks to great people from #d) which means that you can actually start doing something useful. 0.1 is probably most suitable tag for this release. Again - see tutorials for how to use signals.I read on http://code.google.com/p/qtd/ the following: "QtD requires tango. Those who use phobos should try tangobos or modify qtd(that should not be very difficult)." I bet quite some of the non-Tango users ignore QtD because they don't want to install Tango just for one thing. If you can find a Phobos user who has done this "not very diffcult" QtD modification, he might write a short description. And a link to that could be on the page, next to the sentence. Even better would of course be to make QtD work with both already.
Mar 07 2009