Re: Compile time iota
On Wed, Jan 21, 2015 at 07:14:09PM +0100, zeljkog via Digitalmars-d wrote: Maybe something like this can be added to Fobos: template Iota(int start, int stop, int step = 1){ template tuple(T...){ alias tuple = T; } static if(start stop) alias Iota = tuple!(start, Iota!(start + step, stop, step)); else alias Iota = tuple!(); } This is actually already implemented as std.typecons.staticIota, but it's currently undocumented and restricted to only Phobos code. I'm not sure why it was decided not to make it public, but if you file an enhancement request, the devs can look at it and decide if it's worth making it public. T -- Life is unfair. Ask too much from it, and it may decide you don't deserve what you have now either.
Re: DlangUI project update
On Wednesday, 21 January 2015 at 18:23:09 UTC, ketmar via Digitalmars-d-announce wrote: On Wed, 21 Jan 2015 17:33:05 + Vadim Lopatin via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file? nope, it's impossible. CTFE code can't interoperate with environment. mix: (__FILE__.stripExtension.baseName) ~ .res;
Re: DlangUI project update
On Wednesday, 21 January 2015 at 18:34:09 UTC, Basile Burg wrote: On Wednesday, 21 January 2015 at 18:23:09 UTC, ketmar via Digitalmars-d-announce wrote: On Wed, 21 Jan 2015 17:33:05 + Vadim Lopatin via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file? nope, it's impossible. CTFE code can't interoperate with environment. mix: (__FILE__.stripExtension.baseName) ~ .res; It's not suitable for unknown set of files.
Re: dlang.org redesign n+1
On Wed, Jan 21, 2015 at 05:52:06PM +, MattCoder via Digitalmars-d wrote: On Wednesday, 21 January 2015 at 17:34:46 UTC, H. S. Teoh via Digitalmars-d wrote: z +1. I didn't like it either. But then again, the majority of people rarely agree with me, so I didn't say anything. But obviously I'm not alone in disliking this spaced-out layout. Well, of course it needs some polishing, for example: I think the top menu should be visible on screen while you scroll down, because imagine that you are at bottom of the page and want to go somewhere else (Forums, Documentation etc). I'm not talking about polishing. I'm talking about the design itself. (Obviously, the following is just my personal opinion, so please don't take it personally.) Let's start at the top. First, there's too much empty space. The entire top red band wastes a huge amount of screen real estate while providing only 6 links and a search bar that's (1) way too tall and (2) not wide enough for a meaningful (i.e. non-trivial) query. This giant red band is present on every page, effectively reducing the height of the browser window by 20% for no good reason. I mean, it could be a *single line* at the top of the page, what's the point of squatting on 20% of the page filling it with empty space? Don't get me wrong, judicious use of empty space is very important in any website design. But this is overuse of empty space. Second, that ugly gray band in the middle with The D Programming Language in a font that's way too big and in-your-face. This is nothing but a reincarnation of the evil Splash Page from the 90's, where useful content is hidden behind obscure links relegated to the corners of the page while the prime real estate in the middle of the screen is an overly big splash of the marketing message that the website authors want to shove down your throat. No thanks. Let *me* decide if I'm interested in your site, I don't need you to tell me what I should be interested in. The title should be just that: a title. At the top of the page, in a prominent place if you wish, but give me the *content*! When I go to a website, I'm looking for *information*. Not ads and vacuous slogans. If I wanted ads, I'd go read a pulp magazine website or something. Or monsterjobs.com. But on the website of a *programming language*?! Ick. Third, the real content of the page begins at the bottom of the screen, with an overly large heading C-like Syntax. Really?? The primary selling point of D is that it has C-like syntax? Wow. Not to mention, the text that follows is cut off halfway at the bottom mid-paragraph because the red bar and the gray splash screen has occupied almost all of the prime real estate on the screen, so there's not enough room for even a single paragraph of real content, but it has to spill to the next screenful. Which brings me to the next point: the page is WAY TOO LONG. Worse yet, its already overly-long length is further exacerbated by the gratuitously huge title font sizes. Too much space is wasted on titles and section headings for no good reason. And there are too many sections on the page. Nobody is going to read past the first 2 screenfuls, which, due to the wanton waste of screen space in the first screenful, has not enough space for meaningful content. When you have so much content you wish people to read, the first order of business should be to provide easy navigation so that people can *get* to the content in the first place. But, AFAICT, there is no way to jump between those overly-long sections past the first screenful. So basically, nobody is going to read that stuff. Unfortunately, that includes important information about dub, the Dconfs, TDPL, the various compilers, etc.. The only thing that's gonna impress people is the overly huge title and the 3 slogans that, as far as they can tell, are unsubstantiated (since the substantiation is too far down the page for them to care to read). They will have no idea about the Dconfs, TDPL, what compilers are available, etc.. I.e., things that are actually pertinent to *programmers*, who are our target audience. Or are we targeting marketing people as our primary audience now, and wish to impress them how sleek our website design is? IMO, things like (1) code examples, (2) language features, (3) language and standard library docs, (4) compilers, (5) IDE support, are what programmers care about. These things therefore should be front and center. Programmers don't really care about the name of the language -- unless you first convince them they should, by showing them the preceding pieces of information first. The overly prominent download link is misplaced, because before you present pertinent info to the programmer, why would he want to download your language in the first place? Why should he care for *your* language above the hundreds and thousands of others out there? The download link should be somewhere on the first page, in an easy-to-find place, for when he decides OK
Re: Variadic templates - D section on wikipedia
On Monday, 19 January 2015 at 21:26:47 UTC, Andrei Alexandrescu wrote: On 1/19/15 1:25 PM, Dicebot wrote: On Saturday, 17 January 2015 at 18:30:43 UTC, Andrei Alexandrescu wrote: Does that do a lot of moving stuff to a separate module? I have to say that after porting a bunch of code from 2.065 to 2.067.1 at work, I'm less keen about renaming stuff than I used to. Andrei That is partial implementation of typetuple solution you earlier agreed as necessary even if painful. Though I kind of expected you to change your mind over time so now it waits for approval again :) Thanks. I also have your email in my mailbox - I have 100% response rate at the cost of latency... Andrei Well done, thumb up. Just in case someone doesn't get the D thing...variadic templates is part of the D thing.
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On Wed, 21 Jan 2015 10:39:14 -0800 Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: Why even ship such a product you have no intention of fixing bugs for? It's a net negative for one's image. ah, that's a different question! i don't know why they still shipping it instead of providing link to virtualdub, for example. signature.asc Description: PGP signature
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On 1/21/15 10:45 AM, Walter Bright wrote: On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote: there's plenty of video processing software in the free world. About 10 years ago, I needed to edit a movie. I downloaded about 10 different video editors. Every one would hang, crash, go berserk, generate corrupt files, etc. I didn't do anything clever, just to trim, cut and paste. I never even bothered to try anything more advanced. I eventually gave up and did the editing with a standalone dvd recorder. It left such bad taste I was unwilling to try it again until recently. I'm disgusted that the problems remain. How hard can it be? 10 years is a long time -- Andrei
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:34:46 UTC, H. S. Teoh via Digitalmars-d wrote: z +1. I didn't like it either. But then again, the majority of people rarely agree with me, so I didn't say anything. But obviously I'm not alone in disliking this spaced-out layout. Well, of course it needs some polishing, for example: I think the top menu should be visible on screen while you scroll down, because imagine that you are at bottom of the page and want to go somewhere else (Forums, Documentation etc). There are some spaces not filled. Yes the font size needs a scale up. About the layout (Vertical Wall Text), I think they became popular because the mobile, you know those 7 or 8 size screens, then you can read the site like an ebook or maybe because the technical side, like partial loading. Matheus.
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:16:52 UTC, Sebastiaan Koppe wrote: On Wednesday, 21 January 2015 at 17:12:22 UTC, aldanor wrote: Sebastian, could please you publish your fork somewhere so we could take a closer look and/or fork/destroy it? It would also be easier to make specific suggestions https://github.com/skoppe/dlang.org I case you only want to make changes to the css, you can checkout the `compiled` branch and just make changes to the css/styles.css Too much wasted space on wide screens (right half of the screen is almost empty) Suggested improvement: http://imgur.com/a/zgSJa
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:34:46 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Jan 21, 2015 at 05:27:09PM +, anonymous via Digitalmars-d wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu I must have been taking crazy pills, because everyone else seems to love it, but I don't like the homepage. I have to scroll down way too much to actually see some content. Also, I can't make sense of the order of things. I know this is what-everybody-else-is-doing, and I don't like on other sites either. [...] +1. I didn't like it either. But then again, the majority of people rarely agree with me, so I didn't say anything. But obviously I'm not alone in disliking this spaced-out layout. I don't like the front page either, but the doc view isn't so bad. Then again, I'm biased because any major redesign means I'll have to implement it a second time for the forum :)
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:52:56 UTC, Kiith-Sa wrote: Suggested improvement: http://imgur.com/a/zgSJa Or: http://i.imgur.com/ciSn8vM.png Matheus.
Re: D on Slashdot
On Wed, Jan 21, 2015 at 06:14:16PM +, Paulo Pinto via Digitalmars-d wrote: On Wednesday, 21 January 2015 at 16:35:18 UTC, ketmar via Digitalmars-d wrote: On Wed, 21 Jan 2015 10:16:47 + Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via Digitalmars-d wrote: On Wed, 21 Jan 2015 01:44:07 + Vlad Levenfeld via Digitalmars-d digitalmars-d@puremagic.com wrote: i can see how this thread slowly turning into how i was forced to live with windows and how painful it was thread. ;-) Happy Windows user since Windows 3.0. ah. refreshing comment! ;-) Also UNIX user since Xenix, having used almost all known UNIX variants since then. I just prefer Windows, that is it. [...] To each his own. I personally find the Windows UI extremely cumbersome and painful to use, but obviously I'm in the minority since everyone around me (including my wife) finds *my* preferred UI basically unusable. :-P (I don't use gnome/kde/any of that jazz, I run a bare minimum X server with ratpoison as my WM. It's really not much of a window manager at all, just a glorified version of GNU screen. :-P And I like it that way. I have almost completely weaned myself off any rodent dependency, the sole major exception being the browser, but these days I've been wrangling with Vimperator, which is a rodent-free layer on top of Firefox, so I will soon be rid of the rodent completely. I'm a happy man. :-P) T -- Outlook not so good. That magic 8-ball knows everything! I'll ask about Exchange Server next. -- (Stolen from the net)
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On 1/21/2015 8:23 AM, ketmar via Digitalmars-d wrote: this simply not work. Neither does Windows Moviemaker. It hung again on me. and not worth it. WMM is over a decade old, and it still hangs doing something as simple as trimming off the start and the end. And not rarely, either. It does it constantly. Why even ship such a product you have no intention of fixing bugs for? It's a net negative for one's image.
Re: DlangUI project update
On Wed, 21 Jan 2015 17:33:05 + Vadim Lopatin via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file? nope, it's impossible. CTFE code can't interoperate with environment. signature.asc Description: PGP signature
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) And it only took me 20 minutes to get to the bottom of the page. Sorry, not a fan of that design, though I'm apparently the only one.
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote: there's plenty of video processing software in the free world. About 10 years ago, I needed to edit a movie. I downloaded about 10 different video editors. Every one would hang, crash, go berserk, generate corrupt files, etc. I didn't do anything clever, just to trim, cut and paste. I never even bothered to try anything more advanced. I eventually gave up and did the editing with a standalone dvd recorder. It left such bad taste I was unwilling to try it again until recently. I'm disgusted that the problems remain. How hard can it be?
Coedit alpha 11 released
I'm glad to announce this new release of Coedit. Here is a summary of what's new since last public announce: new features: - project configuration widget, the configurations can be edited in synchro-mode. It can be activated by clicking the chain icon at the right of the widget toolbar. - tool chaining, each tool can include a list of tool to execute before and after the item, according to their aliases. - editor cache, between two cessions Coedit remembers the position, the folding, the selection and the zoom of a document. cache files are located in the options and data folder, in a sub directory named editorcache. - static macros, auto insertion (or insertion using SHIFT+SPACE). see wiki, editor widget section. Macros can be edited in a dedicated file, located in the option folder. - new widget managing the TODO comments found within the sources. It automatically handles the context, for example in an orphan source or among all the project sources. Refer to the wiki for more information. - menu File, Run file unittests, compile and execute the current editor with -main and -unittest. useful to test a particular module which belongs to a project. miscellaneous: -- - under Linux, it was necessary to save a project before adding the sources. Now they can be added from the beginning and relative paths will be translated correctly. - a display problem could append under certain circumstances, suggesting that a file would be overwritten by another. Fortunately this was only a visual bug. - DCD integration, start faster. links: -- https://github.com/BBasile/Coedit/releases/tag/alpha_11
Re: D on Slashdot
On Wednesday, 21 January 2015 at 16:35:18 UTC, ketmar via Digitalmars-d wrote: On Wed, 21 Jan 2015 10:16:47 + Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via Digitalmars-d wrote: On Wed, 21 Jan 2015 01:44:07 + Vlad Levenfeld via Digitalmars-d digitalmars-d@puremagic.com wrote: i can see how this thread slowly turning into how i was forced to live with windows and how painful it was thread. ;-) Happy Windows user since Windows 3.0. ah. refreshing comment! ;-) Also UNIX user since Xenix, having used almost all known UNIX variants since then. I just prefer Windows, that is it. -- Paulo
Compile time iota
Maybe something like this can be added to Fobos: template Iota(int start, int stop, int step = 1){ template tuple(T...){ alias tuple = T; } static if(start stop) alias Iota = tuple!(start, Iota!(start + step, stop, step)); else alias Iota = tuple!(); }
Re: DerelictSASS
So I did it. Sorry for make you waiting for such a long time. Short info: - Git: https://github.com/Lodin/sassed - Tested on: Ubuntu 14.04, DMD 2.066.1. - Known bugs: segfault after program ends. It does not happen in all cases, and as I know does not affect compilation result. Trying to catch it. - Documentation: DDOC and Git Readme.md P.S. As before, if I done something wrong (including bad interface or not effective code) please tell. I'll be happy to learn doing it in the right way.
Re: Compile time iota
On 21.01.15 19:23, H. S. Teoh via Digitalmars-d wrote: This is actually already implemented as std.typecons.staticIota, but it's currently undocumented and restricted to only Phobos code. I'm not sure why it was decided not to make it public, but if you file an enhancement request, the devs can look at it and decide if it's worth making it public. I see, thx. And good name staticIota, unlike TypeTuple. I always wonder what is raw tuple, TypeTuple or Tuple :)
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On 1/21/2015 10:53 AM, Andrei Alexandrescu wrote: On 1/21/15 10:45 AM, Walter Bright wrote: It left such bad taste I was unwilling to try it again until recently. I'm disgusted that the problems remain. How hard can it be? 10 years is a long time -- Andrei Right, which is why I'm disgusted that I still cannot trim the left and right edges off.
Re: New menus are up
WIP: http://dump.thecybershadow.net/0ab998c7f4e2027fed300de718a4a058/013E.png That is excellent, a huge improvement!
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On 1/21/2015 11:03 AM, Brad Roberts via Digitalmars-d wrote: I'll note, for what it's worth, that there's open bug reports against D that are almost 9 years old... oldest open bug was filed in May of 2006. Some of them fairly fundamental. All software has bugs. But trimming a video is the most basic operation one would like to use a video editor for, and there's no workaround for it not working.
Re: Coedit alpha 11 released
On Wednesday, 21 January 2015 at 17:35:13 UTC, Basile Burg wrote: I'm glad to announce this new release of Coedit. Here is a summary of what's new since last public announce: new features: - project configuration widget, the configurations can be edited in synchro-mode. It can be activated by clicking the chain icon at the right of the widget toolbar. - tool chaining, each tool can include a list of tool to execute before and after the item, according to their aliases. - editor cache, between two cessions Coedit remembers the position, the folding, the selection and the zoom of a document. cache files are located in the options and data folder, in a sub directory named editorcache. - static macros, auto insertion (or insertion using SHIFT+SPACE). see wiki, editor widget section. Macros can be edited in a dedicated file, located in the option folder. - new widget managing the TODO comments found within the sources. It automatically handles the context, for example in an orphan source or among all the project sources. Refer to the wiki for more information. - menu File, Run file unittests, compile and execute the current editor with -main and -unittest. useful to test a particular module which belongs to a project. miscellaneous: -- - under Linux, it was necessary to save a project before adding the sources. Now they can be added from the beginning and relative paths will be translated correctly. - a display problem could append under certain circumstances, suggesting that a file would be overwritten by another. Fortunately this was only a visual bug. - DCD integration, start faster. links: -- https://github.com/BBasile/Coedit/releases/tag/alpha_11 BTW, as the project is now well established, it stands now in the IDE section of the wiki: http://wiki.dlang.org/IDEs.
Re: dlang.org redesign n+1
On 1/21/15 10:47 AM, bachmeier wrote: And it only took me 20 minutes to get to the bottom of the page. Sorry, not a fan of that design, though I'm apparently the only one. There are a few others (including myself) who are not fans of this sparse homepage. IMHO the sparse design requiring a lot of scrolling must be the very point to be impactful. I remember I saw a few sites where scrolling would effect some cool animation at the top, or would gradually (or suddenly) change the visual experience entirely, or would display fragments of a really really long rocket, etc. As things are now I see the sparse intro and I go - interesting. But I also see a fragment of the stuff below it, so I'm like - this wasn't designed for my resolution. So let me scroll down. Then I see those bands alternating with code snippets, and am like, why do I need to scroll through all that crap for three clickable things of interest. I do like the idea of a simple intro homepage with a big invite to download, but if at all it should be wholesome, not the beginning of an arduous scrolling workout. I also like the pages with the menu on the right, they're clean and luminous. They should have collapsible menus. Andrei
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:52:07 UTC, MattCoder wrote: Well, of course it needs some polishing, for example: I think the top menu should be visible on screen while you scroll down, because imagine that you are at bottom of the page and want to go somewhere else (Forums, Documentation etc). Actually, I wouldn't like that. I have more often been annoyed by menues I don't need than by having to scroll up. It may be nice for the 'Docs' menu on the left. Because there it's more likely that one tries different pages when searching for something. That menu also takes up horizontal space, which I find more tolerable on the big screen. [...] Yes the font size needs a scale up. It's at 100% of the user/browser-defined size, isn't it? That's fine with me. On the the current site the font is actually smaller than what I set in the browser. I'm not a fan of that.
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On Wed, Jan 21, 2015 at 10:45:26AM -0800, Walter Bright via Digitalmars-d wrote: On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote: there's plenty of video processing software in the free world. About 10 years ago, I needed to edit a movie. I downloaded about 10 different video editors. Every one would hang, crash, go berserk, generate corrupt files, etc. I didn't do anything clever, just to trim, cut and paste. I never even bothered to try anything more advanced. I eventually gave up and did the editing with a standalone dvd recorder. It left such bad taste I was unwilling to try it again until recently. I'm disgusted that the problems remain. How hard can it be? Maybe you should write a superior video editor in D. :-) That might be the killer app D has been waiting for. :-P T -- Those who don't understand D are condemned to reinvent it, poorly. -- Daniel N
Re: D on Slashdot
On Wed, Jan 21, 2015 at 09:06:50AM +0200, ketmar via Digitalmars-d wrote: On Tue, 20 Jan 2015 22:43:04 -0800 H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: I almost nuked my entire system with a mistyped `rm -rf` command, as I'm sure every *nix person has at least once in his life my expirience was simply doing `chmod -R 600 /` as root. lucky me. and i really hate that person who placed '.' and '/' next to each other. Mistyping a recursive rm command is a relatively easy mistake, but there are worse things than that. One time, an OS upgrade gone wrong left me with my entire filesystem intact, but with a broken, non-functional ld. ... which meant *nothing* can run, because ld is called to dynamically link in libc, etc., for just about *everything* on the system. So, no rm, no ls, no mv, no chmod, etc., etc.. This was on a remote server, too, and the only connection to the box that I had left was just the last ssh bash session to the box. One mistake, and it's bye-bye server. :-P To recover from that, I had to do this: http://eusebeia.dyndns.org/bashcp It was the most intense few hours, I tell ya, when I had to rescue the system from the brink of reinstallation from scratch back to a functioning system without losing any data. Now try that on Windows. :-D ah, and once i accidentally did dd the wrong way and rewrote my harddrive with contents of flash pen. Ouch! On a lighter note, one time I almost peed my pants when, after installing a major OS upgrade, I rebooted and got a kernel panic. (I also made the mistake of having no backup boot media, so there was no other way to get into the system to fix things.) I thought something serious had gone wrong with the upgrade, but fortunately, it turned out that the problem was that I had previously moved my main OS installation to a non-default root (/dev/sdc1 instead of the usual /dev/sda1), but had forgotten to update the bootloader to point to the new root (and didn't notice 'cos Linux tends to just run forever, so it was like 6 months later before this problem finally reared its ugly head). So when the kernel came up it tried to mount root from /dev/sda1 and couldn't, it panicked. Rebooting with the root=/dev/sdc1 parameter saved the day. :-P In many ways it's like D... in spite of all its niggling little problems, once I tasted the power of D, I just can't go back to C/C++ anymore. I used to take pride in being the resident C/C++ guru, but nowadays, doing C/C++ is like scratching on chalkboard. I'll do it if I have to (my employer pays me to do it, so I tolerate it), but I'd never do it again voluntarily. D has ruined my life; I just can't do C/C++ anymore. :-P it's almost the same for me. i hate alot of small things in D (that's why i'm so passioned about them), but i just can't return to C/C++ anymore! it's like going back to MS-DOS. ;-) despite all annoyances D managed to get the main thing right -- thanks to all people that made it possible. +1. T -- I see that you JS got Bach.
Re: Some array casts
The sizeof values aren't relevant for D array casts. What matters are the array contents. See: void main() { int[5] m = cast(int[5])[1, 2, 3, 4, 5]; assert(m == [1, 2, 3, 4, 5]); pragma(msg, m.sizeof); // 20u pragma(msg, [1, 2, 3, 4, 5].sizeof); // 8u } Bye, bearophile
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 18:01:14 UTC, Vladimir Panteleev wrote: Then again, I'm biased because any major redesign means I'll have to implement it a second time for the forum :) And also fix CHM generation. Let's not forget CHM generation.
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On 1/21/2015 10:53 AM, Andrei Alexandrescu via Digitalmars-d wrote: On 1/21/15 10:45 AM, Walter Bright wrote: On 1/21/2015 7:40 AM, Andrei Alexandrescu wrote: there's plenty of video processing software in the free world. About 10 years ago, I needed to edit a movie. I downloaded about 10 different video editors. Every one would hang, crash, go berserk, generate corrupt files, etc. I didn't do anything clever, just to trim, cut and paste. I never even bothered to try anything more advanced. I eventually gave up and did the editing with a standalone dvd recorder. It left such bad taste I was unwilling to try it again until recently. I'm disgusted that the problems remain. How hard can it be? 10 years is a long time -- Andrei I'll note, for what it's worth, that there's open bug reports against D that are almost 9 years old... oldest open bug was filed in May of 2006. Some of them fairly fundamental.
Data-Oriented Demo: SOA, composition via crazy 'using'
Jonathan Blow published another video [1] presenting the progress of his language. He is treating two main topics: - a keyword preliminary called 'using' which seems to be quite close to 'alias this'; - an annotation SOA for pointers and arrays which allow high level treatment of structures of arrays; Jonathan does not seem to be aware of 'alias this' in D. -- [1] https://www.youtube.com/watch?v=ZHqFrNyLlpA [2] https://www.reddit.com/r/programming/comments/2t5ikw/jai_demo_dataoriented_features_soa_crazy_using/
Re: DlangUI project update
On Wednesday, 21 January 2015 at 19:07:39 UTC, Vadim Lopatin wrote: On Wednesday, 21 January 2015 at 18:34:09 UTC, Basile Burg wrote: On Wednesday, 21 January 2015 at 18:23:09 UTC, ketmar via Digitalmars-d-announce wrote: On Wed, 21 Jan 2015 17:33:05 + Vadim Lopatin via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file? nope, it's impossible. CTFE code can't interoperate with environment. mix: (__FILE__.stripExtension.baseName) ~ .res; It's not suitable for unknown set of files. It's suitable for an IDE: file.d, matching file.res, if it exists then add a -J...no problem.
Re: dlang.org redesign n+1
On 1/21/2015 6:46 AM, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: Thank you very much for doing this! I very much appreciate the hard work you put into it. For comparison, here are some other language front doors: Swift: https://developer.apple.com/swift/ Go: https://golang.org/ Rust: http://www.rust-lang.org/ C++: http://www.cplusplus.com/ C#: doesn't seem to have one! Java: http://java.com/en/ Haskell: https://www.haskell.org/ Python: https://www.python.org/ Php: http://php.net/ Objective C: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html Typescript: http://www.typescriptlang.org/ Perl: https://www.perl.org/ Ruby: https://www.ruby-lang.org/en/ Fortran: http://www.fortran.com/ Dart: https://www.dartlang.org/ The Dart one is probably most similar to this proposal. But there definitely is a trend among these sites - a menu across the top, lots of white space, lots of scrolling. I can't say I'm a fan, but it's undeniable what people consider modern. (I like the older style, as it is denser and easier to navigate.)
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On 1/21/15 1:14 AM, Joakim wrote: On Wednesday, 21 January 2015 at 08:41:47 UTC, Walter Bright wrote: On 1/21/2015 12:19 AM, Russel Winder via Digitalmars-d wrote: The Emacs D-Mode will only improve if people provide bug reports and fixes. A number of people are doing this for their pain points. If the Emacs D-Mode is substandard for you, can you at least submit issues presenting the problems. I wonder why software companies still make it impossible to submit bug reports. For example, google: submit windows movie maker bug report Click on Reporting and solving computer problems - Windows: http://windows.microsoft.com/en-us/windows-vista/reporting-and-solving-computer-problems Note that there is actually no way to report a problem to Microsoft, in spite of what the headings say. Heh, considering Bill Gates couldn't even figure out how to _download_ Movie Maker a decade ago, you're way ahead of the game: ;) http://blog.seattlepi.com/microsoft/2008/06/24/full-text-an-epic-bill-gates-e-mail-rant/ Yah, that's a good read. FWIW the right answer here is to vote with one's feet - there's plenty of video processing software in the free world. I find this utterly baffling. Why make it so difficult to report a bug? Microsoft has always been like this, the only way I've ever been able to submit a bug report was if I had a friend on the inside who'd carry it in for me. This is probably why Windows Movie Maker is such a buggy program. It hangs constantly, generates corrupt files when creating a movie file longer than 2G (about 2 hours), etc. Probably because Microsoft has so many millions of users that their bug tracker would be awash with noise. Even better. At Facebook we use statistics and machine learning to derive excellent signal from large inputs. Andrei
Re: New menus are up
On Wednesday, 21 January 2015 at 14:47:09 UTC, John Colvin wrote: On Wednesday, 21 January 2015 at 14:27:23 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 21 January 2015 at 13:38:25 UTC, MattCoder wrote: On Wednesday, 21 January 2015 at 13:28:22 UTC, Tofu Ninja wrote: On Tuesday, 20 January 2015 at 03:29:23 UTC, Andrei Alexandrescu wrote: Can we have the old menus back : Why would you want that? Usability? The new ones flicker because they don't load with the right class set. This should be done on the server. The flickering is annoying when browsing library pages. not seeing any flickering here on OS X 10.10 + Safari Neither I, Linux + FF 34.0! Matheus.
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Impressive. Make the top menu larger on phone, pls. Otherwise, amazing.
Re: Nested C++ namespace library linking
On Wednesday, 21 January 2015 at 14:59:15 UTC, John Colvin wrote: Looks like a bug to me, for sure. In the mean-time you may be able to use some pragma(mangle, ...) hacks to force the compiler to emit the right symbols. Thx John, extern(C++, A.B) { struct Type {} pragma(mangle,_ZN1A1B3fooENS0_4TypeE) int foo(Type unused); } is indeed linking correctly :)
Re: DlangUI project update
On Wednesday, 21 January 2015 at 15:49:06 UTC, FrankLike wrote: On Wednesday, 21 January 2015 at 14:52:36 UTC, Vadim Lopatin wrote: DlangIDE status Update: Syntax highlight for D source is working. It's just highlight based on token types. No advanced features like code completion, folding, etc. Best regards, Vadim good work. If use dco to build the dlangIDE,config local.ini local.ini--- DC=dmd DCStandardEnvBin=dmd2\windows\bin SpecialLib=dlanguilib importPath= -I..\..\dlangui\src ;lflags=console lflags=win32 ;lflags=win64 ;dflags= libs= ..\lib\dlanguilib.lib ..\lib\dlib.lib ;targetType=exe//lib//staticLib//dynamicLib//sourceLib//none targetType=exe ;targetName=;//;'null is auto' targetName=dlangide.exe ;compileType=;//64//32mscoff compileType= ;buildMode=debug;//release buildMode=debug end- and copy dlib.lib with dlanguilib.lib to lib folder,and copy dlib to dmd2\windows\import,then run 'dco',will get the dlangIDE.exe file only 1206kb,but bu dub, 4518kb. get dco: git clone https://github.com/FrankLIKE/dco Frank
Re: dlang.org redesign n+1
shut up and take my money love it
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 15:35:59 UTC, Chris wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) Good start. A few points: 1. The font is too big (see also 2.). 2. A lot of space is wasted. To fix this, maybe it would help to lay it out in tiles (two or three items in one row, cf http://foundation.zurb.com/). As it is now, the three major points Convenience, Power and Efficiency are too far apart, there's too much scrolling involved (which users hate). All the important information should be visible at once. 3. No need to use so much space for The D Programming Language, especially since we don't have a fancy graphic to fill that space (why should we). 4. Tools like DUB etc. should be bundled as on the Foundation homepage under something like Build products, apps and services Yeah, alot of stuff needs some fine-tuning. Specially the fonts. Content is just copy-n-paste, could definitely use some marketing.
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 15:25:53 UTC, wobbles wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) I really like. How much work would be involved in keeping this look and feel over the rest of the site do you think? Took me around 14 hours to get this far. Probably still 80% needs to be done.
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu I must have been taking crazy pills, because everyone else seems to love it, but I don't like the homepage. I have to scroll down way too much to actually see some content. Also, I can't make sense of the order of things. I know this is what-everybody-else-is-doing, and I don't like on other sites either. I dig the red menu bar though (except for the hover effect). And 'Docs' looks nice, too.
Re: DlangUI project update
On Wednesday, 21 January 2015 at 17:16:40 UTC, data man wrote: And there is the ability to embed resources into .exe? I'm going to implement it soon - using import(). Btw, does anyone know if it's possible to list files in import directories in compile time (CTFE) to avoid manual adding of file paths for every resource file?
Re: DlangUI project update
On Wednesday, 21 January 2015 at 14:52:36 UTC, Vadim Lopatin wrote: DlangIDE status Update: Syntax highlight for D source is working. It's just highlight based on token types. No advanced features like code completion, folding, etc. Best regards, Vadim good work.
[Issue 13337] Invalid extern C++ namespace resolution
https://issues.dlang.org/show_bug.cgi?id=13337 --- Comment #1 from Guillaume Chatelet chatelet.guilla...@gmail.com --- Specifying the mangling explicitely does work though extern(C++, A.B) { struct Type {} pragma(mangle,_ZN1A1B3fooENS0_4TypeE) int foo(Type unused); } --
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 16:22:08 UTC, aldanor wrote: On Wednesday, 21 January 2015 at 15:35:59 UTC, Chris wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) Good start. A few points: 1. The font is too big (see also 2.). 2. A lot of space is wasted. To fix this, maybe it would help to lay it out in tiles (two or three items in one row, cf http://foundation.zurb.com/). As it is now, the three major points Convenience, Power and Efficiency are too far apart, there's too much scrolling involved (which users hate). All the important information should be visible at once. 3. No need to use so much space for The D Programming Language, especially since we don't have a fancy graphic to fill that space (why should we). 4. Tools like DUB etc. should be bundled as on the Foundation homepage under something like Build products, apps and services Good work in the right direction!.. and now for some bikeshedding: Agreed with Chris on (1), (2), (3), plus: (4) Not mobile-ready / not responsive. Try resizing horizontally and see what happens. This is related to (2) and could be solved by using a proper grid framework. (5) Use a better sans serif font (with a fallback to browser default sans family), it actually matters a lot :) Like Fira Sans, Helvetica Neue or something like that. Could use a better monospaced font as well (6) Hover-on/-off effects (like in the menu above) are usually frowned upon since they won't work on mobile devices as you expect. It's sometimes better to just have plain properly styled links. (7) The search bar seems misplaced I am using a grid framework (purecss). And I resize all the time. What browser are you using? Suggestions for the fonts are welcome. I just took the default and never looked back.
Re: dlang.org redesign n+1
On 01/21/2015 07:00 AM, Ali Çehreli wrote: On 01/21/2015 06:46 AM, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu I love it! While you're at it, can you fix the following as well? :p http://ddili.org/ders/d.en/ Kidding... I will adopt whatever you are doing for dlang.org. Ali
Re: DlangUI project update
And there is the ability to embed resources into .exe?
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) Awesome! I really like the one-click Download and Forum buttons. Idea: DUB logo could link to DUB downloads
Re: D on Slashdot
On Wednesday, 21 January 2015 at 00:11:46 UTC, Kiith-Sa wrote: http://developers.slashdot.org/story/15/01/20/2026221/is-d-an-underrated-programming-language?utm_source=rss1.0mainlinkanonutm_medium=feed https://www.reddit.com/r/programming/comments/2t6tvt/the_state_of_d_in_2015/
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) I really like. How much work would be involved in keeping this look and feel over the rest of the site do you think?
Re: D on Slashdot
On 1/21/15 1:31 AM, Mathias LANG wrote: On Wednesday, 21 January 2015 at 08:56:54 UTC, Kagamin wrote: [...] Windows console does it elegantly without telepathy: it rolls through the list of ambiguous names. Personally I use http://grml.org/zsh/. It's available as an ArchLinux package. It's also the default shell config for the installer, and it's a really, really neat out-of-the-box config. Love the zsh. -- Andrei
Re: New menus are up
On 1/21/15 5:28 AM, Tofu Ninja wrote: On Tuesday, 20 January 2015 at 03:29:23 UTC, Andrei Alexandrescu wrote: Can we have the old menus back : Yes: https://web.archive.org/web/20150102192528/http://dlang.org/
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:10:09 UTC, Sebastiaan Koppe wrote: On Wednesday, 21 January 2015 at 16:30:37 UTC, Andrei Alexandrescu wrote: This is awesome, and something I'd get behind. Here's a little feedback coming from a self-admitted dilettante: * On my laptop it looks like this: http://imgur.com/v8TC1xq. I'm seeing the red menu at the top, the gray sparse box, and also an odd fragment of the next page which has a different background, a title, and a fragment of code snippet. The way I look at it is either you go balls-out with the sparse gray page and make it occupy the entire viewport, or you make it smaller to allow me to get to some content. As things are I can't stop wondering: Why did they waste all that space so I can't see stuff? (...) * Generally I feel I must scroll too much through too little (and occasionally crappy - not your fault) content on the homepage. There's just so much air. But that might be part of the page's very look and feel, so if people like it no problem. Agreed. Again, it is a proof-of-concept. * Page doesn't seem to load on mobile at all. Hmm, that is odd. Some other people said the same thing. Loads fine on mine though... * Clicking on Overview while I'm on the homepage does nothing. But there's no visual indication I'm already on Overview. Also clicking on Overview or the logo seem to do the same thing. Oh, wait, not all menus are meant to work - take that back. There are no navigational helpers indeed. Didn't know how to get the current page from within ddoc to set css stuff to highlight things etc. * There's no accordion on Language Reference which makes for a really tall menu, sometimes even longer than the content itself. I find that hard to navigate. Statistically nobody will get to Visual D and Community :o). Haha. There are some other pages as well that nobody gets to read in full. * Layout is jerky as I reduce the width of the page: sometimes the right/left margins are really wide, even on thin viewports, thus wasting already precious space, then they get thin, then they get wide again, etc. There is a mismatch between some responsive stuff. Saw it as well. It's just about playing with thresholds, and alot of tweaking. You should have no trouble building dlang.org on linux following the instructions at https://github.com/D-Programming-Language/dlang.org/blob/master/CONTRIBUTING.md. Will look into it. The rationale for NOT using /usr/bin/dmd etc. is that oftentimes the docs use specific features of the compiler, which means you need to build a specific library docs with the same compiler version. For the site proper we always use the development version of dmd (which by default we assume is ../dmd/src/dmd) so people can change the compiler and the docs in tandem. Once you get that in place things should work smoothly. Yeah, but where can I get /dmd/src/dmd? Do I need to fork the dmd source code? Sebastian, could please you publish your fork somewhere so we could take a closer look and/or fork/destroy it? It would also be easier to make specific suggestions
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 16:30:37 UTC, Andrei Alexandrescu wrote: This is awesome, and something I'd get behind. Here's a little feedback coming from a self-admitted dilettante: * On my laptop it looks like this: http://imgur.com/v8TC1xq. I'm seeing the red menu at the top, the gray sparse box, and also an odd fragment of the next page which has a different background, a title, and a fragment of code snippet. The way I look at it is either you go balls-out with the sparse gray page and make it occupy the entire viewport, or you make it smaller to allow me to get to some content. As things are I can't stop wondering: Why did they waste all that space so I can't see stuff? (...) * Generally I feel I must scroll too much through too little (and occasionally crappy - not your fault) content on the homepage. There's just so much air. But that might be part of the page's very look and feel, so if people like it no problem. Agreed. Again, it is a proof-of-concept. * Page doesn't seem to load on mobile at all. Hmm, that is odd. Some other people said the same thing. Loads fine on mine though... * Clicking on Overview while I'm on the homepage does nothing. But there's no visual indication I'm already on Overview. Also clicking on Overview or the logo seem to do the same thing. Oh, wait, not all menus are meant to work - take that back. There are no navigational helpers indeed. Didn't know how to get the current page from within ddoc to set css stuff to highlight things etc. * There's no accordion on Language Reference which makes for a really tall menu, sometimes even longer than the content itself. I find that hard to navigate. Statistically nobody will get to Visual D and Community :o). Haha. There are some other pages as well that nobody gets to read in full. * Layout is jerky as I reduce the width of the page: sometimes the right/left margins are really wide, even on thin viewports, thus wasting already precious space, then they get thin, then they get wide again, etc. There is a mismatch between some responsive stuff. Saw it as well. It's just about playing with thresholds, and alot of tweaking. You should have no trouble building dlang.org on linux following the instructions at https://github.com/D-Programming-Language/dlang.org/blob/master/CONTRIBUTING.md. Will look into it. The rationale for NOT using /usr/bin/dmd etc. is that oftentimes the docs use specific features of the compiler, which means you need to build a specific library docs with the same compiler version. For the site proper we always use the development version of dmd (which by default we assume is ../dmd/src/dmd) so people can change the compiler and the docs in tandem. Once you get that in place things should work smoothly. Yeah, but where can I get /dmd/src/dmd? Do I need to fork the dmd source code?
Re: On Variable References
On Wednesday, 21 January 2015 at 08:23:44 UTC, Per Nordlöw wrote: On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw wrote: int x; auto ref xr; Correction: I, of course mean, int x = 42; auto ref xr = x; Walter is strongly against adding references a la C++ to D, as he believes they are too complicated and bug prone. He's made several posts on this, but I can't find them now.
Re: dlang.org redesign n+1
On 1/21/15 6:46 AM, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. This is awesome, and something I'd get behind. Here's a little feedback coming from a self-admitted dilettante: * On my laptop it looks like this: http://imgur.com/v8TC1xq. I'm seeing the red menu at the top, the gray sparse box, and also an odd fragment of the next page which has a different background, a title, and a fragment of code snippet. The way I look at it is either you go balls-out with the sparse gray page and make it occupy the entire viewport, or you make it smaller to allow me to get to some content. As things are I can't stop wondering: Why did they waste all that space so I can't see stuff? * The red band at the top has the logo misaligned vertically. * The font in the menus at the top are disproportionally small compared to the red band's thickness. Possibilities are to increase the fonts, reduce the band and the logo thickness, or make the logo go out of the bound in some stylish/asymmetric manner. * The search box flushes left with the rest of the menu. Flush right instead? * The design clarifies that some of the homepage content is awful, which is good :o) * I don't care much about the dark gray bands alternating with the light gray snippets. Especially the conference websites one makes it painfully clear the padding top and bottom are too large. To be frank they were poorly styled in the original homepage. * The bottom red strip is too thick, font is too large, and the top padding is larger than bottom padding. There's that awful old legal notice that's not on the homepage. How old is your content? * Generally I feel I must scroll too much through too little (and occasionally crappy - not your fault) content on the homepage. There's just so much air. But that might be part of the page's very look and feel, so if people like it no problem. * Where's twitter? * Page doesn't seem to load on mobile at all. * Clicking on Overview while I'm on the homepage does nothing. But there's no visual indication I'm already on Overview. Also clicking on Overview or the logo seem to do the same thing. Oh, wait, not all menus are meant to work - take that back. * Clicking on Docs takes me to spec.html. That looks nice except the Download menu item is rendered in almost invisible white. * There's no accordion on Language Reference which makes for a really tall menu, sometimes even longer than the content itself. I find that hard to navigate. Statistically nobody will get to Visual D and Community :o). * Preview new Layout is too small. * Top-level menu entries without submenus, of which there's only one (Visual D) are rendered in an awkward black color that doesn't do much for me. * The top and bottom spacing of submenus are not equal. * The Improve this page and page wiki are not rendered properly. * Layout is jerky as I reduce the width of the page: sometimes the right/left margins are really wide, even on thin viewports, thus wasting already precious space, then they get thin, then they get wide again, etc. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Yah, some editor support for ddoc would go a very long way. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. Love that. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) Glad to hear that. I don't use a Windows machine so it's good things work for you. FWIW we build the actual website on Posix; I'm not sure how much win32.mak does, but posix.mak builds both the release and prerelease libraries using the right compilers etc. You should have no trouble building dlang.org on linux following the instructions at https://github.com/D-Programming-Language/dlang.org/blob/master/CONTRIBUTING.md. The rationale for NOT using /usr/bin/dmd etc. is that oftentimes the docs use specific features of the compiler, which means you need to build a specific library docs with the same compiler version. For the site proper we always use the development
Re: D on Slashdot
On Wed, 21 Jan 2015 08:56:53 + Kagamin via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 21 January 2015 at 08:19:39 UTC, ketmar via Digitalmars-d wrote: i even knew how to quit vi ctrl-c? nope! it beeps. ;-) Duh! Don't console programs know, what ctrl-c is for? somehow i can't close cmd.exe by hitting ctrl+c. don't console programs know what ctrl+c is for? Windows console does it elegantly without telepathy: it rolls through the list of ambiguous names. this is the worst thing one can do with autocompletion. there is no single visual clue about where it hit the wall. it just continues to spit some filenames when i press tab, replacing the current one. shit! is it broken or what? And in quotes quotes are used for preventing autocompletion. ;-) AFAIK quotes are supposed to treat a string with spaces as a single argument. I don't see, how this is related to autocompletion. nope. you are wrong. quotes mark literal values. there is no sense to autocomplete literals, as they essentially not filenames. they are *literals*. escaped paths are ugly. just don't use paths that needs escaping. ;-) OK, but that's a weak excuse for an ugly interface. In my experience quotes work just fine in place of escaping. using a wrong thing to do something may be handy, but this is still using a wrong thing. And autocomplete an empty string too whether it's after a slash or alone. sorry, i can't understand you here. I mean autocomplete without typing a single character. The system may have no way to type some characters, rolling autocompletion really helps in this case. how can you autocomplete without typing? what awkward UI does that and why? It was quite daunting to see a basic operation of getting a file name so quirky and ugly. exactly! that's why i'm installing cygwin on any windows box i plan to use for a long time: i just can't live with windows' shitty shell. signature.asc Description: PGP signature
Re: dlang.org redesign n+1
On Wed, Jan 21, 2015 at 05:27:09PM +, anonymous via Digitalmars-d wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu I must have been taking crazy pills, because everyone else seems to love it, but I don't like the homepage. I have to scroll down way too much to actually see some content. Also, I can't make sense of the order of things. I know this is what-everybody-else-is-doing, and I don't like on other sites either. [...] +1. I didn't like it either. But then again, the majority of people rarely agree with me, so I didn't say anything. But obviously I'm not alone in disliking this spaced-out layout. T -- Живёшь только однажды.
Re: dlang.org redesign n+1
On 1/21/15 9:10 AM, Sebastiaan Koppe wrote: Yeah, but where can I get /dmd/src/dmd? Do I need to fork the dmd source code? Yah, it's all at https://github.com/D-Programming-Language/dlang.org/blob/master/CONTRIBUTING.md - step by step instructions that take you from nothing to where you want to me. -- Andrei
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 15:35:59 UTC, Chris wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) Good start. A few points: 1. The font is too big (see also 2.). 2. A lot of space is wasted. To fix this, maybe it would help to lay it out in tiles (two or three items in one row, cf http://foundation.zurb.com/). As it is now, the three major points Convenience, Power and Efficiency are too far apart, there's too much scrolling involved (which users hate). All the important information should be visible at once. 3. No need to use so much space for The D Programming Language, especially since we don't have a fancy graphic to fill that space (why should we). 4. Tools like DUB etc. should be bundled as on the Foundation homepage under something like Build products, apps and services Good work in the right direction!.. and now for some bikeshedding: Agreed with Chris on (1), (2), (3), plus: (4) Not mobile-ready / not responsive. Try resizing horizontally and see what happens. This is related to (2) and could be solved by using a proper grid framework. (5) Use a better sans serif font (with a fallback to browser default sans family), it actually matters a lot :) Like Fira Sans, Helvetica Neue or something like that. Could use a better monospaced font as well (6) Hover-on/-off effects (like in the menu above) are usually frowned upon since they won't work on mobile devices as you expect. It's sometimes better to just have plain properly styled links. (7) The search bar seems misplaced
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 15:25:53 UTC, wobbles wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) I really like. How much work would be involved in keeping this look and feel over the rest of the site do you think? like it*. Also, while we're on the subject, what ever happened with the redesign that was started last year?
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:12:22 UTC, aldanor wrote: Sebastian, could please you publish your fork somewhere so we could take a closer look and/or fork/destroy it? It would also be easier to make specific suggestions https://github.com/skoppe/dlang.org I case you only want to make changes to the css, you can checkout the `compiled` branch and just make changes to the css/styles.css
Re: What to do with InvalidMemoryOperationError
On Wednesday, 21 January 2015 at 14:50:06 UTC, Ali Çehreli wrote: Known bug with a pull request: https://issues.dlang.org/show_bug.cgi?id=13856 Here is the duplicate of it, which I've opened recently: https://issues.dlang.org/show_bug.cgi?id=14005 Ali How can this affect Mmfile plus splitter() aswell?
Re: New menus are up
On 1/21/15 5:39 AM, Jacob Carlborg wrote: On 2015-01-21 08:21, Jacob Carlborg wrote: The icons need higher resolution for retina displays. Especially the expand (plus) icons in the menu. Using glyphs/text as icons, with a special font should be considered, i.e.: * Font Awesome - http://fortawesome.github.io/Font-Awesome/ * Glyphicons - part of Bootstrap [1] or as regular icons [2] [1] http://getbootstrap.com/components/#glyphicons [2] http://glyphicons.com I was thinking it would be cool if each top menu entry had an icon by its left - a fat downward arrow by Download, a graduation hat by Reference, etc. With these fonts that seem to be easily doable. Any takers? -- Andrei
Re: Adding a C++ keyword in bugzilla ?
On Wednesday, 21 January 2015 at 15:51:25 UTC, Andrei Alexandrescu wrote: Not sure what the question is - add a C++ keyword to issues.dlang.org, or working on the issues themselves? Thanks! -- Andrei I guess both :D Add a C++ keyword to issues.dlang.org : will help with triaging. As for my issue I'll try debugging dmd but I'm new to the process/code, I was expecting someone familiar with the code to know exactly where and what to look for.
Re: Adding a C++ keyword in bugzilla ?
On 1/21/15 8:06 AM, Guillaume Chatelet wrote: On Wednesday, 21 January 2015 at 15:51:25 UTC, Andrei Alexandrescu wrote: Not sure what the question is - add a C++ keyword to issues.dlang.org, or working on the issues themselves? Thanks! -- Andrei I guess both :D Add a C++ keyword to issues.dlang.org : will help with triaging. Added. -- Andrei
Re: D on Slashdot
On Wed, 21 Jan 2015 10:16:47 + Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 21 January 2015 at 01:52:51 UTC, ketmar via Digitalmars-d wrote: On Wed, 21 Jan 2015 01:44:07 + Vlad Levenfeld via Digitalmars-d digitalmars-d@puremagic.com wrote: i can see how this thread slowly turning into how i was forced to live with windows and how painful it was thread. ;-) Happy Windows user since Windows 3.0. ah. refreshing comment! ;-) signature.asc Description: PGP signature
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 15:08:02 UTC, Xinok wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu This gets a big thumbs up from me. The layout is great, everything flows nicely, and a good blend of colors with the unofficial D red. The only issue is that some elements aren't laid out correctly in Firefox. Should be misplaced padding/margin somewhere.
Re: Adding a C++ keyword in bugzilla ?
On Wednesday, 21 January 2015 at 16:13:02 UTC, Kagamin wrote: Probably somewhere in https://github.com/D-Programming-Language/dmd/blob/master/src/cppmangle.c I'll have a look, thx :)
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 17:16:52 UTC, Sebastiaan Koppe wrote: On Wednesday, 21 January 2015 at 17:12:22 UTC, aldanor wrote: Sebastian, could please you publish your fork somewhere so we could take a closer look and/or fork/destroy it? It would also be easier to make specific suggestions https://github.com/skoppe/dlang.org I case you only want to make changes to the css, you can checkout the `compiled` branch and just make changes to the css/styles.css Great stuff, thanks a mil. I'll try to poke around tonight and see how to address some of the issues mentioned here
Re: DlangUI project update
On Wednesday, 21 January 2015 at 16:20:31 UTC, FrankLike wrote: On Wednesday, 21 January 2015 at 15:49:06 UTC, FrankLike wrote: On Wednesday, 21 January 2015 at 14:52:36 UTC, Vadim Lopatin wrote: DlangIDE status Update: Syntax highlight for D source is working. It's just highlight based on token types. No advanced features like code completion, folding, etc. Best regards, Vadim good work. If use dco to build the dlangIDE,config local.ini local.ini--- DC=dmd DCStandardEnvBin=dmd2\windows\bin SpecialLib=dlanguilib importPath= -I..\..\dlangui\src ;lflags=console lflags=win32 ;lflags=win64 ;dflags= libs= ..\lib\dlanguilib.lib ..\lib\dlib.lib ;targetType=exe//lib//staticLib//dynamicLib//sourceLib//none targetType=exe ;targetName=;//;'null is auto' targetName=dlangide.exe ;compileType=;//64//32mscoff compileType= ;buildMode=debug;//release buildMode=debug end- and copy dlib.lib with dlanguilib.lib to lib folder,and copy dlib to dmd2\windows\import,then run 'dco',will get the dlangIDE.exe file only 1206kb,but bu dub, 4518kb. get dco: git clone https://github.com/FrankLIKE/dco Frank Did you try dub build --build=release ?
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. Doing the ddoc was a maze of macro's at first. But spending a couple of hours untangling the mess, I finally found the ones I needed to change. After that things went pretty smooth. So ddoc ain't that bad. It is just that I didn't have syntax highlighting - nor goto-definition - and I hate that. Still, it is cool in a way that I can just change some macro's, tweak the index.dd, the doc.ddoc and don't have to worry about all the other pages. BTW, the build process on windows was way easier than linux. In fact, I could not get the makefile to run on linux at all. Looking into posix.mak, I see a blur of path's, all misconfigured, and I bet I am supposed to set those manually. I don't get it, doesn't everything has its own place? Isn't dmd always installed in /usr/bin, /usr/include/dmd and that stuff? I suppose not everyone is using the same distro. Or they are, except me :) Good start. A few points: 1. The font is too big (see also 2.). 2. A lot of space is wasted. To fix this, maybe it would help to lay it out in tiles (two or three items in one row, cf http://foundation.zurb.com/). As it is now, the three major points Convenience, Power and Efficiency are too far apart, there's too much scrolling involved (which users hate). All the important information should be visible at once. 3. No need to use so much space for The D Programming Language, especially since we don't have a fancy graphic to fill that space (why should we). 4. Tools like DUB etc. should be bundled as on the Foundation homepage under something like Build products, apps and services
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu Well like everyone else said, this is awesome. I don't know if this is problem in my browser (I'm using FF 34.0), but some boxes seems smaller than should be, example: http://i.imgur.com/Ge1ljck.png Matheus.
Re: New menus are up
On Wednesday, 21 January 2015 at 14:47:09 UTC, John Colvin wrote: On Wednesday, 21 January 2015 at 14:27:23 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 21 January 2015 at 13:38:25 UTC, MattCoder wrote: On Wednesday, 21 January 2015 at 13:28:22 UTC, Tofu Ninja wrote: On Tuesday, 20 January 2015 at 03:29:23 UTC, Andrei Alexandrescu wrote: Can we have the old menus back : Why would you want that? Usability? The new ones flicker because they don't load with the right class set. This should be done on the server. The flickering is annoying when browsing library pages. not seeing any flickering here on OS X 10.10 + Safari It does not open the menu until after the page is loaded. And if it is not in the cache that takes a good 600ms atm.
Re: New menus are up
On 1/21/15 7:57 AM, MattCoder wrote: On Tuesday, 20 January 2015 at 03:29:23 UTC, Andrei Alexandrescu wrote: Suggestion: The font-style used in one menu differs from the other, ex: http://i.imgur.com/fRwdFNj.png Which I think it should be the same, and as you can see in the image above, some words doesn't fit in the menu width, for example: std.container.package. That's intentional - module names are rendered in tt. It's been suggested that I eliminate std. but all that may be not needed because the upcoming redesign :o). -- Andrei
Re: New menus are up
On Tuesday, 20 January 2015 at 03:29:23 UTC, Andrei Alexandrescu wrote: Suggestion: The font-style used in one menu differs from the other, ex: http://i.imgur.com/fRwdFNj.png Which I think it should be the same, and as you can see in the image above, some words doesn't fit in the menu width, for example: std.container.package. Matheus.
Re: D on Slashdot
On Wed, 21 Jan 2015 13:36:46 + MattCoder via Digitalmars-d digitalmars-d@puremagic.com wrote: On Wednesday, 21 January 2015 at 13:19:00 UTC, Adam D. Ruppe wrote: It is a lot easier to just run wine dmd and distribute the finished exe than it is to copy all the development files to the windows computer and run it there. For what I'm seeing Wine isn't an emulator like VMWare, it's a layer, so you can compile with wine dmd, but can you test your software too? yep. this is way easier than having two very different development environments. if something works with Wine, there are big chances that it will work in real windows too. so i can do most of the debugging with Wine and then just test the final exe on windows box. and use most of my *nix-based dev tools, some of which doesn't even exist on windows. signature.asc Description: PGP signature
Re: Adding a C++ keyword in bugzilla ?
On Wednesday, 21 January 2015 at 16:31:41 UTC, Andrei Alexandrescu wrote: Added. -- Andrei Thx !
Re: Adding a C++ keyword in bugzilla ?
On 1/21/15 3:14 AM, Guillaume Chatelet wrote: I reported a bug 5 months ago (1) but it didn't get a lot of attention. I thought maybe I was doing something wrong and posted on D.learn (2). It indeed looks like a bug and Kagamin suggested to add a C++ keyword in bugzilla for better visibility/triaging. What do you guys think ? D claims to interact nicely C++ since DIP61 (3) but bugzilla seems to exhibit quite a few bugs in this category (4) What do you guys think ? -- 1 - https://issues.dlang.org/show_bug.cgi?id=13337 2 - http://forum.dlang.org/thread/weuopmmvgwqrqmbeo...@forum.dlang.org 3 - http://wiki.dlang.org/DIP61 4 - just a few bugs (there is more) https://issues.dlang.org/show_bug.cgi?id=13183 https://issues.dlang.org/show_bug.cgi?id=12854 https://issues.dlang.org/show_bug.cgi?id=13207 Not sure what the question is - add a C++ keyword to issues.dlang.org, or working on the issues themselves? Thanks! -- Andrei
Re: New menus are up
On 1/21/15 6:47 AM, John Colvin wrote: On Wednesday, 21 January 2015 at 14:27:23 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 21 January 2015 at 13:38:25 UTC, MattCoder wrote: On Wednesday, 21 January 2015 at 13:28:22 UTC, Tofu Ninja wrote: On Tuesday, 20 January 2015 at 03:29:23 UTC, Andrei Alexandrescu wrote: Can we have the old menus back : Why would you want that? Usability? The new ones flicker because they don't load with the right class set. This should be done on the server. The flickering is annoying when browsing library pages. not seeing any flickering here on OS X 10.10 + Safari I think it has to do with the menu closing and reopening every time. Easy to fix. Any takers? -- Andrei
Re: Adding a C++ keyword in bugzilla ?
Probably somewhere in https://github.com/D-Programming-Language/dmd/blob/master/src/cppmangle.c
Re: Emacs D-Mode [was Like Go/Rust, why not to have func keyword before function declaration]
On Wed, 21 Jan 2015 00:40:48 -0800 Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: I find this utterly baffling. Why make it so difficult to report a bug? Microsoft has always been like this, the only way I've ever been able to submit a bug report was if I had a friend on the inside who'd carry it in for me. This is probably why Windows Movie Maker is such a buggy program. It hangs constantly, generates corrupt files when creating a movie file longer than 2G (about 2 hours), etc. if they will allow public bugreports, they will have zillions bugreports like i pressed that button and it doesn't do that! -- literally. and they will need to hire special man who will be able to sort that bugreports. and he should be developer himself to see if that report can be used or must be moved to /dev/null. and... this simply not work. and not worth it. signature.asc Description: PGP signature
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 16:15:21 UTC, eles wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Impressive. Make the top menu larger on phone, pls. Otherwise, amazing. The menu is not working indeed. It needs to default to a sliding menu on phones.
Re: What to do with InvalidMemoryOperationError
On Wednesday, 21 January 2015 at 15:34:35 UTC, Per Nordlöw wrote: On Wednesday, 21 January 2015 at 14:50:06 UTC, Ali Çehreli wrote: Known bug with a pull request: https://issues.dlang.org/show_bug.cgi?id=13856 Here is the duplicate of it, which I've opened recently: https://issues.dlang.org/show_bug.cgi?id=14005 Ali How can this affect Mmfile plus splitter() aswell? I think it can't. The root of 13856/14005 is in std.stdio.readln. Unless MmFile uses readln somehow, this looks like a different issue to me.
Re: dlang.org redesign n+1
On 1/21/15 8:44 AM, Sebastiaan Koppe wrote: Yeah, alot of stuff needs some fine-tuning. Specially the fonts. Better fonts would be awesome, these (and the existing ones) are just... bare. Content is just copy-n-paste, could definitely use some marketing. No worries about content for now I'd say. Andrei
Re: What to do with InvalidMemoryOperationError
On Wednesday, 21 January 2015 at 13:07:11 UTC, Nordlöw wrote: On Wednesday, 21 January 2015 at 12:10:20 UTC, Nordlöw wrote: On Wednesday, 21 January 2015 at 12:00:47 UTC, Nordlöw wrote: My executable throws as core.exception.InvalidMemoryOperationError@(0) I've tracked it down to being caused by foreach (line; File(path).byLine) {} when path contains a very large text file (392 MB, 1658080 lines). Do I have any alternatives to this that doesn't trigger exception? I get the exact same behaviour when I try using MmFile instead: import std.mmfile: MmFile; auto mmf = new MmFile(path, MmFile.Mode.read, 0, null, pageSize); const data = cast(char[])mmf[]; foreach (line; data.splitter('\n') {} Does byLine use splitter? If so, maybe splitter is the problem... I tested it with a generated large file, and the (rough) file size and line count are apparently not enough to trigger the bug. Could you share the text file? Maybe it can be compressed to a manageable size? Or maybe you can reduce it to a manageable size? A 'binary reduction' might work: Take the first half of the file, and test with that. Error? Proceed with that half. No error? Try the other half. When both halves produce no error, give up. Or maybe dustmite can help here? If the file contains sensitive information, and you cannot reduce it to a reasonable size, you may be able to programmatically replace classes of characters with one character. E.g. replace all alphanumeric characters with 'x'. Be cautious of replacing multibyte characters with single bytes. And newlines should probably be left intact.
Re: New menus are up
On Wed, Jan 21, 2015 at 01:30:03PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 1/21/15 12:42 PM, Vladimir Panteleev wrote: On Wednesday, 21 January 2015 at 07:21:44 UTC, Jacob Carlborg wrote: On 2015-01-21 03:59, Andrei Alexandrescu wrote: Deployed. Let's thank Vladimir for this great work! -- Andrei The icons need higher resolution for retina displays. Especially the expand (plus) icons in the menu. https://github.com/D-Programming-Language/dlang.org/pull/820 Nice. That said, that broke the build. That's what we get for not having an autotester... -- Andrei Yeah we need an autotester for dlang.org, if only to verify it can still build. As a nice side-effect, it could possibly also publish the result to a temporary / staging server so that reviewers can preview what the changes will look like. T -- Computers are like a jungle: they have monitor lizards, rams, mice, c-moss, binary trees... and bugs.
Re: forcing @nogc on class destructors
On 1/21/15 3:37 AM, Paolo Invernizzi wrote: On Wednesday, 21 January 2015 at 03:02:53 UTC, Steven Schveighoffer wrote: On 1/20/15 9:04 PM, ketmar via Digitalmars-d wrote: On Tue, 20 Jan 2015 20:51:34 -0500 Steven Schveighoffer via Digitalmars-d digitalmars-d@puremagic.com wrote: You can always put @nogc on the dtor if you want. seems that you completely missing my point. (sigh) Nope, not missing it. The mechanics are there. You just have to annotate. that is where you missing it. your answer is like hey, C has all mechanics for doing OOP with virtual methods and type checking, you just have to write the code! No, actually it's not. Adding @nogc to a function is as hard as writing class when you want to do OOP. the whole point of my talk was free programmer from writing the obvious and setup some red tapes for beginners. If he does it wrong, it gives him a stack trace on where to look. What is different here than any other programming error? Are you suggesting that newcomers should learn D by discovering it day by day from stack traces? No, I was saying if something causes an exception/error, it is a programming error, and there just isn't any way for a compiler to prevent people from making *any* mistakes. But calling sometimes-allocating functions inside a dtor that don't allocate when you call them *that* time shouldn't be banned by the compiler. Actually there's nothing on the documentation about class destructors [1] that warns about that specific issue of the current (and default) GC. [1] http://dlang.org/class.html#destructors I think the docs are in need of updating there. It's not meant to be a secret that you cannot allocate inside a GC collection. I'll try to put together a PR. -Steve
Re: Data-Oriented Demo: SOA, composition via crazy 'using'
On 2015-01-21 19:12:20 +, Fool said: Jonathan Blow published another video [1] presenting the progress of his language. He is treating two main topics: - a keyword preliminary called 'using' which seems to be quite close to 'alias this'; - an annotation SOA for pointers and arrays which allow high level treatment of structures of arrays; Jonathan does not seem to be aware of 'alias this' in D. This is a very good video demonstrating the power that 'alias this' gives to people that really want to controll object layout and manage details of memory access patterns. AoS and SoA annotations are interesting. This should be easily replicatable with the power of D's templates except for the 'robustness' part of his talk, as you would have to change declarations at invocation part to switch AoS to SoA and back. The material in his talk would make a great blog post demostrating power of 'alias this'
Let's destroy https://github.com/D-Programming-Language/dlang.org/pull/815
Vladimir has been quick to act on my suggestion that we add forum content to the homepage. I trust that doesn't impact the current redesign work by Sebastiaan in ways that can't be mended. So, one question is where to place the forum content in the overall page layout. Please chime in with ideas! Andrei
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu It is still a wip, but the landing page and the language reference (see Docs menu-item) is working. [snip] Looks nice. The logo feels out of place. Maybe try one of these more minimalist variations: https://drive.google.com/a/gnuk.net/folderview?id=0Bx3n3LnLsNBzNngyZ055eDhTbGsusp=sharing# Perhaps d-flat-minimal.svg in white?
Re: Calypso: Direct and full interfacing to C++
On 12/22/2014 3:14 PM, Elie Morisse wrote: Hi everyone, I have the pleasure to announce to you all the existence of a modified LDC able to interface directly to C++ libraries, wiping out the need to write bindings: https://github.com/Syniurge/Calypso I think this is an exciting development! Considering the new D support for C++ namespaces, template mangling, etc., I think it would make Calypso's job easier. The big challenge is to get an interface to C++ STL, so one could do: import core.stdcpp.stl.vector; for example. I'd also like to encourage you to submit a Dconf 2015 presentation proposal on this.
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 18:01:14 UTC, Vladimir Panteleev wrote: On Wednesday, 21 January 2015 at 17:34:46 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Jan 21, 2015 at 05:27:09PM +, anonymous via Digitalmars-d wrote: On Wednesday, 21 January 2015 at 14:46:22 UTC, Sebastiaan Koppe wrote: Just for fun and proof-of-concept I went ahead and forked the dlang.org site. I basically took the `do-what-everybody-else-is-doing` approach: http://dlang.skoppe.eu I must have been taking crazy pills, because everyone else seems to love it, but I don't like the homepage. I have to scroll down way too much to actually see some content. Also, I can't make sense of the order of things. I know this is what-everybody-else-is-doing, and I don't like on other sites either. [...] +1. I didn't like it either. But then again, the majority of people rarely agree with me, so I didn't say anything. But obviously I'm not alone in disliking this spaced-out layout. I don't like the front page either, but the doc view isn't so bad. You're not alone gents. I like some parts and content pages aren't too bad, but the homepage is completely impractical. It feels like I'm emulating a giant phone. The problem with mobile first design is the desktop often gets left behind. This may not be a problem for sites that are primarily viewed on phones, but I don't think that will be the case for dlang any time soon.
Re: New menus are up
On Wednesday, 21 January 2015 at 07:21:44 UTC, Jacob Carlborg wrote: On 2015-01-21 03:59, Andrei Alexandrescu wrote: Deployed. Let's thank Vladimir for this great work! -- Andrei The icons need higher resolution for retina displays. Especially the expand (plus) icons in the menu. https://github.com/D-Programming-Language/dlang.org/pull/820
Re: dlang.org redesign n+1
On 1/21/15 11:55 AM, H. S. Teoh via Digitalmars-d wrote: This giant red band is present on every page, effectively reducing the height of the browser window by 20% for no good reason. I'm also a fan of vertical navigation menus because today's screens have a wide aspect ratio making vertical real estate precious and horizontal real estate cheap. -- Andrei
Re: dlang.org redesign n+1
On Wednesday, 21 January 2015 at 19:57:25 UTC, H. S. Teoh via Digitalmars-d wrote: On Wed, Jan 21, 2015 at 05:52:06PM +, MattCoder via Digitalmars-d wrote: On Wednesday, 21 January 2015 at 17:34:46 UTC, H. S. Teoh via Digitalmars-d wrote: z +1. I didn't like it either. But then again, the majority of people rarely agree with me, so I didn't say anything. But obviously I'm not alone in disliking this spaced-out layout. Well, of course it needs some polishing, for example: I think the top menu should be visible on screen while you scroll down, because imagine that you are at bottom of the page and want to go somewhere else (Forums, Documentation etc). I'm not talking about polishing. I'm talking about the design itself. (Obviously, the following is just my personal opinion, so please don't take it personally.) Never, I don't take anything like this personally, this is a discussion board and sometimes we will agree and some don't! :) There are some spaces not filled. Yes the font size needs a scale up. Please, no. The fonts are WAY TOO BIG already. So, reading from my Galaxy Tab 7 on Horizontal I found harder to read than other sites, but this is a minor problem, it could be solved with CSS and media thing. This is why I have said before, and I say again, that for mobile devices you need a different kind of layout. You cannot use that kind of layout for a PC browser. It simply doesn't translate. Yes, but on the technical side the partial loading will be same on mobile and desktop, but in this case if it is easy or not to do this partial loading with this layout is a purely guessing of my part, I'm not a web-developer! Matheus.
Re: dlang.org redesign n+1
I really don't like this style of page. I much prefer the look of the redesign that was proposed a while back and is floating around somewhere (I think there's a pull request lying around somewhere to get something very close to that). If I'm on a PC then I want to be able to see all the navigation options at a glance, but have to scroll forever.