Re: emscripten
Andrei Alexandrescu Wrote: > On 12/14/10 9:25 AM, Sean Kelly wrote: > > Adam Ruppe Wrote: > >> > >> Client side scripting sucks. It's garbage. Slow, incompatible, unreliable, > >> and a > >> piece of junk platform in general - it does very little that's > >> interesting. That's > >> not even getting into the language itself. It's up to you what you're doing with the language/platform. I created some pretty decent almost-MVC apps with JS in the browser, using a lot of the language's features. If you're just hacking some stuff together.. ay.. then you might not get into the language itself. Anyways, your fault. :) > > It totally sucks, but it does scale better than executing everything > > server-side. Always a matter of using the right tools for the job. > Surprisingly, it doesn't. Facebook is reducing its client-side > Javascript to a minimum in favor of server-side code. Reason? Speed. You > can't control user's OS, browser, and hardware platform, but you can > control your own. I've never heard of that before. I can also not really imagine it, given that Facebook is one of the providers of the most-included JS cross-site snippets? Ever heard of FBML? The only thing they reduced was the *markup* code which was slowing some browsers down when displaying a lot of items in the feed. Javascript isn't a bottleneck here, they really did a good job on the architecture of the whole site. D as server-side was once something I tried to achieve, but it wasn't the right time. It would have been perfect as backend for a full-blown JS browser app, only handling & shuffling data around, sending JSON back and forth. Cheers, Alex
Re: emscripten
Vladimir Panteleev Wrote: > On Tue, 14 Dec 2010 18:27:28 +0200, Alexander Pánek > wrote: > > > D as server-side was once something I tried to achieve, but it wasn't > > the right time. It would have been perfect as backend for a full-blown > > JS browser app, only handling & shuffling data around, sending JSON back > > and forth. > > I've done this. I wrote three web-apps (HTML/CSS, JS+jQuery and D). It's > awesome. > > Two of the three are private, but here's the simplest one I wrote in 2006 > (no jQuery): > http://snoop.worms2d.info/ (basically web IRC client) Nice nice! > D really hits the spot here, though. The apps' backends needed to be > persistent and fast (things like searching through growable memory-mapped > files), so CGI-like languages (PHP/Perl) were no good. With D's inline > struct types and a JSON serializer, returning JSON is really clean and > easy, which isn't possible in mainstream compiled languages: > > if (resource == "/getfoo") > { > struct FooResult { int n; string s; } > return toJSON(FooResult(42, "bar")); // {"n":42,"s":"bar"} > } That's what I'm talkin' 'bout! :D
Re: Fwd: A public apology.
Jarrett Billingsley wrote: I am sorry. I am not. I’m just thankful for being proven wrong when necessary. Also: wtf, Jarrett. Is that really you?
Re: D Wiki
Brad Roberts wrote: This has come up before and never really gone anywhere. I've considered setting up a new, modern, wiki for us to migrate to. Prowiki has a number of limitations that annoy me at least. The biggest is it's history management sucks. Looking at what changed over time is either too hard for the likes of me to figure out, or it's broken, or it just isn't available. That said, I've only ever run one wiki package, mediawiki, and it was a pain in the rear. The debian packaging of it sucks. I dunno if it's any easier to manage just off the official releases. Anyone have a wiki package they've actually run (not just used via the web interface) that they can recommend? An obvious one is likely to be Trac via dsource. I've considered it, but personally I'm really not fond of trac (sorry). Would any of you guys volunteer to help migrate content to it if one should spring up? I'd be willing to be one of those volunteers, but there's a lot of content and it really shouldn't be moved over exactly as is. A lot of re-organization should be done. My thoughts were to put it at d.puremagic.com to subsume the entire site, with the exception of /issues which would continue to be the bugzilla installation. Thoughts? Later, Brad At my company, we have been using Redmine for a year now. Redmine is comparable to Trac, but with a lot less effort to maintain, since almost everything is configurable through the web interface *out of the box*. It’s basically a project management application, but the wiki is a crutial part of it, using textile as markup language. And before anyone comes up with another bikeshed-argument: textile is in use by all employees of this company, *especially* non-IT people. We also use it in our home-grown blog software, and not even users submitting blog posts ever had a problem with using it. Most people even really like it because it’s so simple and intuitive! :) I would help setting up a Redmine installation and content migration, too, of course. It’s using Ruby on Rails, btw., and can be either deployed with a mongrel cluster or via mod_passenger (though I don’t have any experience with the latter). ad Helmut: I think Brad knows quite well how to keep a server running and maintain a community website. :)
Re: Fwd: A public apology.
Jarrett Billingsley wrote: On Wed, Jun 17, 2009 at 6:42 AM, Alexander Pánek wrote: Jarrett Billingsley wrote: I am sorry. I am not. I’m just thankful for being proven wrong when necessary. Also: wtf, Jarrett. Is that really you? That was me on beer. I'm an apologetic drunk. Should this be telling me something? Oh ok. I’ve only known you as happily-passing-out-and-drooling-on-the-table drunk. :D
Re: Any chance to call Tango as Extended Standard Library
Bill Baxter wrote: On Wed, Jan 21, 2009 at 6:29 AM, Lars Ivar Igesund wrote: I thought the license page (.../wiki/License) was pretty clear ... even if the licenses themselves aren't. Actually this was something I meant to bring up. I couldn't actually find that page when I was looking for it. I ended up doing a search on the Tango site for "license". I think there should be a link to the license page somewhere on the front page. Right now the word "license" doesn't appear anywhere on that page. There’s a link on the front page “All Documentation” where you find the link to the “License Agreement” page, but having the latter on the front page wouldn’t be a bad idea either, I suppose.
Re: Any chance to call Tango as Extended Standard Library
Lars Ivar Igesund wrote: Steven Schveighoffer wrote: "Lars Ivar Igesund" wrote Steven Schveighoffer wrote: I can't really understand whether it is required to distribute the source code of a derivative work under the Academic Free License, so I don't really understand that. It is not required, AFAIK only LGPL and GPL of the common licenses require that. That is good to hear. Can a statement like this be made on the license page? Or in the license itself? I found it very difficult to discern what was meant, at some point it states that you must provide a copy of the source code, but I wasn't sure how that applies. I thought the license page (.../wiki/License) was pretty clear ... even if the licenses themselves aren't. It’s actually /wiki/LibraryLicense. I’ve created /wiki/License including and displaying the contents of LibraryLicense.
Re: Any chance to call Tango as Extended Standard Library
John Reimer wrote: > > Don wrote: The other option (which I would prefer) is for druntime to get bigger, and encompass more of the common code from both. So that both Phobos and Tango became (crucial) extension libraries over a small core. And the bigger that common core becomes, the smaller the library problem becomes. Actually, I very much like that idea. And it seems to make sense too. Seconded! That’s a nice idea.
Re: Compiler as dll
grauzone wrote: John Reimer wrote: ddl does not work for memory sharing like normal dll's, where multiple applications have access to a single dll at runtime. It appears that such support would be quite difficult to implement and moves in the direction of operating system features. Couldn't this be achieved by simply mmap()-ing the file contents into memory? mmap() normally shared the memory pages with other processes. Of course, this wouldn't work if the code both isn't position independent, and needs to be relocated to a different base address. But that's also the case with operating system supported dynamic shared objects. It does do runtime linking, however, which is extremely useful for certain situations... specifically any sort of application that needs a plugin architecture for D (ie.. it can link with libraries and object files at runtime) that is gc and exception friendly. I never understood why this is needed. Can't they simply compile the plugins into the main program? Well, compiling them directly into the main program kinda defeats the purpose of runtime-pluggable plugins, wouldn’t it? When it's a commercial program, the DLL plugin approach probably wouldn't work anyway: in order to enable others to compile plugins, you would need to expose your internal "headers" (D modules). Note that unlike in languages like C/C++, this would cause internal modules to be exposed too, even if they are not strictly needed. What would you do to avoid this? Maintain a separate set of import modules? Make use of .di files. You don’t have to distribute code.
Re: OT -- Re: random cover of a range
Steve Schveighoffer wrote: On Sun, 15 Feb 2009 15:42:17 -0800, Andrei Alexandrescu wrote: BCS wrote: Hello Andrei, Let me add one too: there/their. Andrei Oops :( I don't /think/ I'm dyslexic :b That lysdexia is a killer isn't it :o). Andrei dyslexics of the world untie!!! I put the SEX in DYSLEXIA!
Re: OT -- Re: random cover of a range
Nick Sabalausky wrote: The closet rebel in me can't help but be tempted to make a risque' drawing involving the anthropomorphic D mascot. And maybe toss in Tux, the BSD deamon, an...apple...and...umm...a window, I guess...to like, symbolize cross-platform harmony...or something...and stuff...dude. But fortunately for everyone, I can't draw ;) LOL
Re: OT -- Re: random cover of a range
Christopher Wright wrote: I can't take it any more! Shouldn’t it be “anymore” or “any longer”? ;P
Re: OT -- Re: random cover of a range
Anonymous Coward wrote: Nick Sabalausky wrote: It takes a weak person to be harmed by words. Let me put it this way: if you've been picked on, put down, *hunted* by the people around you and generally treated as a sub-human piece of worthless garbage for over eight years of your life across both primary and secondary school, often with no friends or even acquaintances for years at a time and came out completely and utterly unscathed, then you are obviously a robot and won't mind when I remove your head. Because otherwise you have NO FUCKING RIGHT to say that. If you've really gone through what I have and weren't affected, then I guess you're just a better person than I. I’ve been through that. Almost my whole childhood and youth consisted of being discriminated by class-/sportsmates. But after all I learned a lot just by that - granted, it wasn’t nice and easy but I am pretty damn sure I learned more about the human nature and group dynamics than those people picking on me, or anyone else. This didn’t make me a nicer person or whatnot, but at some point you start taking every statement with a grain of salt, maybe even laugh about yourself if there’s a reason to. That’s a kind of tolerance that lets you get to know people better, since not everyone thinks twice before saying something, thus sometimes coming out too harsh or even insulting. If you get past that, you mostly find quite interesting people who also able to overcome their own insecurity once you open up a bit. After all most “Taking harm by words” is a very common phrase... I don’t take any harm if someone swears around like a maniac or talks complete and utter bullshit about me, my family or whatnot (however, I did as a kid). But I do take harm if someone actively doesn’t show respect in my views, work or feelings. Best example for this is a recent argument between a former user in #d and myself. I banned him because of his complete disrespect for me - some people understood it, many didn’t. I on the other hand didn’t understand how people could tolerate such behaviour. It really made me angry. Ad OT-topic: I was a bit puzzled by the way John brought this issue up, but I completely agree with him. Having content mixed up like that is just plain unprofessional to me - especially if you contribute quite a lot. The possibility to be referenced by someone else is quite high in that case and... well... D has nothing to do with furry or yiffi or whatever. I don’t start drawing at work either (well, except diagrams for my own understanding). *shrug* Just create a blog for your programming stuff and one for your personal stuff, just like most people do in case of email accounts. Also: wtf guys - stop going all “omg u r so religious”, you nazis.
Re: OT -- Re: random cover of a range
Jarrett Billingsley wrote: On Tue, Feb 17, 2009 at 4:59 PM, Alexander Pánek wrote: Jarrett Billingsley Wrote: On Tue, Feb 17, 2009 at 12:04 PM, Daniel de Kok wrote: Shouldn't we talk about D or (Belgian) beer here? :^) There are no parens about it. It's either Belgian or it's not beer. :D Rght. What about Austrian, Polish and Czech beer? Those are AWESUM. OFINE. They're good too. Mr. Pánek, whatever a-tilde upside-down-bang means. Wtf @ web interface. :(
Re: Encapsulating Locked File Appends
dsimcha wrote: Is there an easy way to write a function, or a function already written for me, that will allow for a file shared between processes to be appended to safely? This should be done in a way that will make it impossible for two processes to write to it at the same time, using locking, and should be platform-independent. Performance does not matter because, in the use case I have, we're only talking about one update every few minutes. Simplicity, however, does matter. All I'm trying to do is run a simulation thousands of times on a bunch of different computers sharing an NFS file system and have all of the results end up in one nice plain text file instead of having each instance write to its own file and having to keep track of them and piece them together by hand. Ideally you’d use a clustered file system for that, namely GFS (Global File System), OCFS(2) (Oracle, I think) or Lustre (Sun)... but I don’t know what your use-case is so you might not really need it. 0.02€
Re: for in D versus C and C++
Sergey Gromov wrote: for (; a Only in Enterprise Software!
Re: eliminate writeln et comp?
Andrei Alexandrescu wrote: Denis Koroskin wrote: On Wed, 18 Mar 2009 03:26:16 +0300, Andrei Alexandrescu wrote: Denis Koroskin wrote: That's not a very frequent operation. In most cases you should use Cout("Hello"); instead. An ideal design solution, imo (fast, short and clear). Interesting. Should I do the same in phobos? stdout("wyda"); I'd like that particularly because write() is too common a name to place at namespace level for my taste. So then we'd have: stdout("wyda"); // no newline stdout("wyda\n"); // newline but no flushing on binary stream stdout("wyda", newline); // write'n'flush stdout.writeln("wyda"); // same If we go that route I'll even drop writeln and rely on passing newline. For formatting there'd be stdout.format and stdout.formatln or something. This is funny because Tango has adopted exactly the same design. Well it isn't funny. It's obvious: you just told me about it! :o) The only difference is that Stdout is written in upper case: import tango.io.Stdout; void main() { Stdout("Hello, World\n"); // no flushing Stdout("Hello, World").newline; // new line appended, flushs Stdout.format("Hello, {}!", "Andrei").newline; // formatting Stdout.formatln("Hello, {}!", "Kris"); } It would be great if the two libraries share the same interface. Ionno. In Phobos, types are Capitalized, values are camelCase or justminuscules. BTW, since you are in process of redesigning of Phobos IO/stream system, it would be great if you take a look at the Tango IO system, first. I recall you telling that you didn't give a good look at Tango, so now is the time. I particularly insist on talking to Kris about it; perhaps, he has some ideas on the topic. He may also share experience with you (errors he made etc). I'll give you a few ideas of mine in a separate post. I don't know about licensing issues, and last thing I need would be to be accused of stealing from Tango. You shouldn't avoid looking on someone's code, especially if it may help D get better standard library. There's nothing wrong with borrowing ideas from others, too, especially if they give you a permission for that. Tango is dual-licensed under Academic Free License v3.0 and BSD License, so there might not be a need to, but anyway. I have zero knowledge of licensing stuff, but I understand Walter does. He's not looking at Tango so nor should I. I'm sure it has some cool ideas, but so do other libraries. You know, this is just counter-productive. There are several people - all of them very valuable members of the D community, with countless contributions - who have put forth a library with its goals being mainly the success of D and especially a vital, alive development process. This library is available licensed under BSD, which basically means you can do whatever you please with it, as long as you don’t remove the copyright of the original authors. Now, what you’re doing is despite the fact that the Tango sources are completely free and available to you, deny any kind of insight you might be able to gather in there. Why? If you’re responsible for the standard library and you *do* take ideas from Tango and integrate them into the official standard library, you’re doing every Tango dev a big favour. Because, you know, that’s why there is Tango. You didn’t forget that, did you? No offense intended, of course. I just think you should really reconsider your decision to not look at Tango, based on facts. Not based on “I might step on someone’s toes because of I don’t know why.” Kind regards, Alex PS: Pretty please, don’t get me wrong, I really appreciate your contributions to D! :)
Re: for in D versus C and C++
Steve Teale wrote: Don Wrote: Steve Teale wrote: for (; a It breaks a lot of broken C and C++ code. OK, that's possibly the case, but you know that among C programmers in particular there was an absolute prohibition on typing more characters than necessary. It’s just one character more in D. Really just the closing curly bracket that adds up. for(;;); vs. for(;;){}
Re: Is DSSS still being developed?
Trass3r wrote: Seems quite inactive? :( Not quite, since Gregor is very busy with studying. Do you face any specific problems?
Re: State of Play
Denis Koroskin wrote: On Fri, 27 Mar 2009 23:33:43 +0300, Tomas Lindquist Olsen wrote: On Fri, Mar 27, 2009 at 12:01 AM, Walter Bright wrote: Jarrett Billingsley wrote: So what about the following counterargument: "even if nightly builds were made available, how can we be sure that enough people are using them to sufficiently test them?" OK, sure, if not many people are using the nightly builds, then there wouldn't be much benefit. But it does seem to work out fine for a lot of projects. And with a proper SCM set up which you commit to daily, there's virtually no work on your part. You just commit, and everyone else can download and compile. I believe that people downloading half-baked works in progress and then finding problems I already know about and am fixing is probably not more productive. Some of us might actually look at your changes. 1) We get a forewarning for changes that might affect LDC/GDC/D.NET etc. 2) We can comment on changes. Ideally there would be a mailing list with each commit. This makes discussion of specific changes much easier. 3) You get feedback on the code. I'm not sure how many people have access to your code, or if you even use a SCM repository locally. As an extra bonus you could release your internal test suite as well. This would be useful for projects like LDC, as a compliment to DStress. Do you use Dstress? The testing process of DMD could be much less opaque in general. -Tomas *Highly* agree! 2nded
Re: Objective-D, reflective programming, dynamic typing
Jarrett Billingsley wrote: On Thu, Apr 2, 2009 at 2:14 PM, Robert Jacques wrote: On Thu, 02 Apr 2009 11:20:13 -0400, Eljay wrote: Although D 2.0 is a multi-paradigm programming language, it does not support two paradigms: + dynamic typing std.variant is a good example of a dynamic typing wrapper for value types. + reflective programming By reflective programming it looks like you mean Properties or Prototype Design ala Java Script/Lua/MiniD/etc. (http://en.wikipedia.org/wiki/Prototype-based_programming_language) With D2.0's compile-time reflection you should be able to implement this very cleanly. Steve Yegge has a nice blog on the subject (http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html) which mentions several performance optimizations which are applicable to D's associative arrays. Thanks for the link to that article. MiniD no longer uses a "pure" prototype-based object system, but it is still very closely related and faces the same performance issues. Most of the things he mentions I've already implemented, but freezing an object's fields is something I haven't.. frozen namespaces would also be incredibly useful for sandboxed environments. Hm. Yes, please!
Re: Objective-D, reflective programming, dynamic typing
Eljay wrote: Ultimately, I would love to have D support reflective programming and dynamic typing in the core language. I agree on the reflection part, just.. the dynamic typing part sounds very very very unlikely. D has a static type system for a reason, I highly doubt this is going to change. Also, would you mind summing up what you want to do in a few lines? I don't have the time to go through text worth 4 A4 pages - and I'm sure I'm not the only one. :) Kind regards, Alex
Re: [OT] can't wait for tomorrow....
Andrei Alexandrescu wrote: Walter Bright wrote: Andrei Alexandrescu wrote: 10:56 am my local time. Starting that minute, new messages in this newsgroup will start again reappearing as most recent. Did your computer get stuck in a wormhole? Seven messages from Simon Gomizelj are wrongly dated and sit at the top of my message list. I thought everybody has the same problem. Nope, everything works fine here. Maybe recreate your index/sorting/etc.?
Re: The version of dsss I use
Bill Baxter wrote: I really hope someone emerges to take over DSSS before too long here. I didn't think it was going to take so long. :-( If you have any bugfixes/patches/requests for DSSS, create a ticket for it and I'll review those. I do have commit rights, but I can't find the time to maintain DSSS fully right now, either. :(
Re: D, so it happend...
Baas wrote: In the past 10 motnhs, I completly rewrote the D Compiler in C#! Wtf. No you didn't.
Re: D, so it happend...
grauzone wrote: Christopher Wright wrote: Tom S wrote: How is compilar formed? How is compilar formed? How executable get maked? They need to do way> instain programer, who wriet thier compilars, just becuase these compilars cant get debuged? It was on the newsgroup this mroing, a programer in d.D who had rewrite D compilar. They are taking the compilar back to teh net, too vapour too warez. My pary are with the programers who use compilar, I am truley sorry for your lots I don't understand this. Ask the web search engine of your choice about "HOW IS BABBY FORMED".
Re: D, so it happend...
Christopher Wright wrote: Tom S wrote: How is compilar formed? How is compilar formed? How executable get maked? They need to do way> instain programer, who wriet thier compilars, just becuase these compilars cant get debuged? It was on the newsgroup this mroing, a programer in d.D who had rewrite D compilar. They are taking the compilar back to teh net, too vapour too warez. My pary are with the programers who use compilar, I am truley sorry for your lots LOL, awesome! I love it! :D
Re: D, so it happend...
grauzone wrote: Alexander Pánek wrote: grauzone wrote: Christopher Wright wrote: Tom S wrote: How is compilar formed? How is compilar formed? How executable get maked? They need to do way> instain programer, who wriet thier compilars, just becuase these compilars cant get debuged? It was on the newsgroup this mroing, a programer in d.D who had rewrite D compilar. They are taking the compilar back to teh net, too vapour too warez. My pary are with the programers who use compilar, I am truley sorry for your lots I don't understand this. Ask the web search engine of your choice about "HOW IS BABBY FORMED". I know about this phrase, but I don't understand Christopher's posting. Yeah, some joke about internet memes, but...? Christopher changed the response’s sense to match with Tom’s question. http://www.youtube.com/watch?v=Ll-lia-FEIY
Re: why Unix?
Walter Bright wrote: Andrei Alexandrescu wrote: It took me a couple of minutes to write under her eyes a script that downloaded HTML, scraped the code for links, followed those of interest, and output a concatenation of all pages she was interested in, with details highlighted, that was loadable back in the browser. I'd show her one iteration, get feedback, and get the next iteration within seconds. All without "coding" in any sense as regularly understood by Windows programmers. I have no idea how to do that under unix. I obviously have not learned anywhere near enough about it. I suppose you know all the tools you need for that: a POSIX shell, wget, sed, maybe sort, some xargs and pipes!
Re: why Unix?
Adam D. Ruppe wrote: On Mon, Apr 06, 2009 at 10:29:57PM -0400, Christopher Wright wrote: The Windows terminal emulator sucks. This is not subject to debate. What terminal emulator? This might be a bit of a nitpick, but Windows doesn't try to emulate a terminal (not in the OS anyway; there are hundreds of third party programs to do such) and it is better off for it. Unix hurls chunks for the actual terminal system. The programs are pretty decent, but the terminal itself - TERRIBLE. Tried to write an interactive program that makes full use of the keyboard and mouse? You can't get the shift key's state. It is a whole todo just to get the arrow keys. You can't depend on the escape key. You can't output data and expect it to be reliable (you have to depend on an environment variable to figure out what you're writing to and it often isn't accurate!) It gets worse as a user. Have you ever pressed delete and just got a ~? Pressed home and got a ~[B (or whatever the hell it is)? Tried to use a program with color after changing the background color of your window? Resized a window and had your text cut off? Go up through your history and get corrupted lines? The Unix terminal system is barely usable - NOT something anyone should ever try to emulate. The Windows console, on the other hand, is a lot better, though still has its warts. At least it is predictable though. I am sincerely puzzled. Do you know vim? It's a console program. It sports all of what you're describing as impossible (ncurses says hi!). Have you ever tried to resize your cmd.exe window on Windows? It's funny since you can only really resize its height with the mouse. Have you ever tried to copy & paste multiple lines *not* as x*y block of characters including whitespace (aka hardcopy), but as multiple lines of text as you would expect it, even though a few might be wrapped? Good luck on that. Tried pasting? Tried... using a proper editor inside cmd.exe? Screen? dvtm? An IRC client? A mail client? Proper tab completion of segments of your argument, not the whole argument? cmd.exe is a severe pain in the ass compared to ANY terminal emulator you would find on any Unix. Even xterm on any Linux or Terminal on OS X work way better. Kind regards, Alex P.S.: No offense intended, I'm just really puzzled. Srsly.
Re: My body is ugly (was Re: Contract programming syntax)
Jarrett Billingsley wrote: Wed, Apr 8, 2009 at 1:02 PM, Denis Koroskin <2kor...@gmail.com> wrote: On Wed, 08 Apr 2009 20:01:46 +0400, Kagamin wrote: Don Wrote: I agree, the 'body' keyword is the most useless thing in the language. I find it makes functions much harder to read. I hate my body. I second this. Thirded. Fourthed. I also can't tell you how many times I wanted to use 'body' as a variable name :| Fifthed. How about using bigfloat for that?
Re: why Unix?
Daniel Keep wrote: Christopher Wright wrote: With Powershell, you need to be familiar with the tools for dealing with System.Data.DataTable or whatever. Maybe it would only take ten minutes. The most time it could save in that regard is an hour. The syntax for these commands is so simple, you don't even really need to learn them. It's stuff like "get-columns" and "sort-list". I don't think I ever ran across a powershell command where I couldn't accurately guess it's purpose. Most of the time, I even got the syntax first try without needing to check the help. What's more, it's the SAME set of tools for EVERY kind of object. If it helps, imagine if in UNIX you could treat any file as a folder of files containing the parsed contents (each of which may, themselves, be folders of files.) You wouldn't need sed or awk for parsing any more because the environment has already done it for you. The cost of learning is not a significant factor here. You might have plenty of other good arguments (and I offered some), but this isn't one of them. It took me a year or more to become fluent and comfortable with scripting in UNIX. I don't think you CAN learn things like sed or grep straight away because you've got to learn the regex language first (and they're always bloody different in every different environment.) You then have to learn how the program works, and which options are actually useful. And then you need to practice with it. When I first started using sed, I had to constantly check the man page because I forgot which options I wanted to use. Same thing with grep (I only recently started remembering when I needed the -v switch, for example, and I've been using it for years!) Powershell's learning curve is practically non-existent. There are no domain-specific languages; just standard commands with regular, obvious names that all do one thing really well. Within about an hour of first seeing powershell in action, I felt comfortable writing simple scripts to munge data. An hour versus a year+ with UNIX; that's not something you can simply ignore. If you're happy with UNIX, then that's fine. But discounting the things powershell does well is just doing yourself a disservice. What really saddens me is that, assuming powershell is better, UNIX will never match it; at least not for a very long time. UNIX has so much history in its CLI, whereas Windows doesn't. Microsoft can afford to "reboot" the Windows CLI and start from scratch; UNIX can't. Then again, Microsoft could just flub the whole thing anyway. :P -- Daniel The thing is, I don't *want* my _shell_ to be able to parse anything. It's a shell, not a framework with everything and two kitchensinks built in to parse every imaginable file format on my computer. That's the whole point of the UNIX philosophy: small, encapsulated tools that do one or a few tasks very well. So instead of just writing a program that reads text from STDIN or a file, parses the input and spits something about the file out in another form of text, I'd have to write, maintain and distribute that exact program AND an additional .NET "cmdlet". Not only that it's another part of my software I will have to maintain, it only works on one OS with one shell. On any UNIX, I can just use it. Compile it, use it. Pretty straight forward. When I write a sh script, it will work on a multitude of OSes, no matter how old or young it might be, no matter what purpose it serves. Granted, the syntax is a big downside, but you will usually fall back to the scripting language of your (or your project's) choice anyways at some point. E.g. the deploy process of Rails applications is not written using sh. They're simply written in Ruby (as rake/capistrano tasks). I'm not saying the powershell is a bad thing. The bad thing is that it doesn't work everywhere. When the powershell was released I couldn't use it because the Windows I was running was too old. So Microsoft has this awesome shell that only works on their newest OS. What if I wanted to automate something on my grandmother's PC with Windows 98? Or for less suckage, lets say Windows 2000? I can automate processes on *any* UNIX, as long as it provides a shell and every UNIX I could possibly think of does that. So the same automation that I made on my opensolaris server works on my aunt's completely different computer with Linux on it. .02 Alex
Re: "with" still sucks + removing features + adding features
Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Thank you for bringing a "real" example that gives something to work on. Awful!< Well, one of your cases was wrong. Using the +1 at the end one of those cases become: case 'A' .. 'Z'+1, 'a' .. 'z'+1: Instead of what you have written: case 'A' .. 'Z'+1: case 'a' .. 'z'+1: I agree that that syntax with +1 isn't very nice looking. But the advantage of +1 is that it introduces (almost) no new syntax, it's not easy to miss, its meaning is easy to understand. AND you don't have to remember that in a case the .. is inclusive while in foreach is exclusive on the right, keeping the standard way in D to denote ranges. You don't understand. My point is not that people will dislike 'Z'+1. They will FORGET TO WRITE THE BLESSED +1. They'll write: case 'A' .. 'Z': You know, Ruby solves this by introducing a “seperate” range syntax for exclusive ranges: “...”. An inclusive range is written the same as an exclusive range in D: “..”. a[1 .. 2].length #=> 1 ([a[1]]) a[1 ... 2].length #=> 2 ([a[1], a[2]]) I see no reason not to include such a seperate syntax in D. “..” being exclusive and “...” being inclusive, not the other way round as in Ruby — see “Programmer’s Paradox” @ http://www.programmersparadox.com/2009/01/11/ruby-range-mnemonic/ . Kind regards, Alex
Re: "with" still sucks + removing features + adding features
Georg Wrede wrote: Jarrett Billingsley wrote: On Tue, May 19, 2009 at 8:37 AM, Georg Wrede wrote: After several decades, I'm still uncomfortable when anybody writes .1, be it in programming or on street billboards. For what it's worth, I'm American and have neither seen the 'one-sided floating-point number' used in public nor am I comfortable with it being in a programming language. It just doesn't look right. Yeah. If it was up to me, it'd be forbidden. Same here.
Re: "with" still sucks + removing features + adding features
Andrei Alexandrescu wrote: Robert Fraser wrote: Frank Benoit wrote: Alexander Pánek schrieb: Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Thank you for bringing a "real" example that gives something to work on. Awful!< Well, one of your cases was wrong. Using the +1 at the end one of those cases become: case 'A' .. 'Z'+1, 'a' .. 'z'+1: Instead of what you have written: case 'A' .. 'Z'+1: case 'a' .. 'z'+1: I agree that that syntax with +1 isn't very nice looking. But the advantage of +1 is that it introduces (almost) no new syntax, it's not easy to miss, its meaning is easy to understand. AND you don't have to remember that in a case the .. is inclusive while in foreach is exclusive on the right, keeping the standard way in D to denote ranges. You don't understand. My point is not that people will dislike 'Z'+1. They will FORGET TO WRITE THE BLESSED +1. They'll write: case 'A' .. 'Z': You know, Ruby solves this by introducing a “seperate” range syntax for exclusive ranges: “...”. An inclusive range is written the same as an exclusive range in D: “..”. a[1 .. 2].length #=> 1 ([a[1]]) a[1 ... 2].length #=> 2 ([a[1], a[2]]) I see no reason not to include such a seperate syntax in D. “..” being exclusive and “...” being inclusive, not the other way round as in Ruby — see “Programmer’s Paradox” @ http://www.programmersparadox.com/2009/01/11/ruby-range-mnemonic/ . Kind regards, Alex Yes, this is useful for all use cases of ranges. I like '...'. Indeed it's not a bad idea... But it might be easily mistyped, lead to strange off-by-one errors and be very difficult to find while debugging them. Hmmm... It's an awful idea. It's a non-idea. If "idea" had an antonym, that would be it. I can't fathom what's on the mind of a person (not you, at least you foresee some potential problems) who, even after patiently explained the issues with this mental misfire, several times, still can bring themselves to think it's not that bad. I don’t see a reason not to restrict other features to introduce a new one. I never used .foo to access the global scope or .1 for floating point literals. But what I do use very often is array[n..m + 1], which would ease things for quite a lot of things going on when working with arrays. Of course it’s just syntactic sugar, but so is the whole slicing feature. It could easily be done in the standard library. So I’m not demanding anything, I’m just providing my very own thoughts on this topic. If there are too many obstacles then it’s probably not worth it. The thing is, I don’t know half as much as most of the guys here do, so I don’t see those obstacles at first glance. Please bear with me. :) Let me add one more, although more than sure someone will find a remedy for it, too. a...b inclusive range from a to b vs. a.. .b exclusive range from a to .b Personally, I see “...” as an atomic operator, like “!=” or “==”. I wouldn’t ever recognize “.. .” as “...” or “! =” as “!=”. Additionally, I add a space before and after every operator, so there’s no ambiguity in any way, plus it’s nicely recognizable what the hell is going on. If it was for me, I’d even go as far as to make this a requirement in the specification. But that would upset downs. Actually, what about “…” as inclusive range operator? :P I’d love that. and of course the beauty ab Inclusive range from “a” to “.b”? Pretty clear in this *particular* case. ;) I don't plan to discuss minor features on this group anymore. But.. bike shed discussions are fun! Seriously, though — I learn a lot thanks to people “nitpicking” other people’s ideas, showing corner cases, obstacles and so on. So please, don’t stop discussing minor features. :)
Re: The Next Big Language
Julio César Carrascal Urquijo wrote: Steve Yegge's latest article has a ratter nice quote about D: http://steve-yegge.blogspot.com/2007/02/next-big-language.html "D's a really beautiful language. By rights it should be the next C++. However, C++ programmers won't have it because it's garbage collected (even though it can be disabled, and even though Stroustroup himself is now advocating adding garbage collection to C++). Walter Bright is one hell of a lot smarter than the C++ programmers who won't look at his language, and he has demonstrated that D is as fast as or faster than C++ and nearly as expressive as Ruby or Python. It's a secret weapon just waiting to be seized by some smart company or open-source project." This article is ooolde. :)
Re: The Next Big Language
Jarrett Billingsley wrote: On Fri, Nov 14, 2008 at 4:57 PM, Julio César Carrascal Urquijo <[EMAIL PROTECTED]> wrote: Hello Julio César, ECMAScript 2 ECMAScript 4 I was typing up a snarky comment at the same time you posted this ;) How dare you being snarky!
Re: dmd platform support - poll
Walter Bright wrote: What platforms for dmd would you be most interested in using? 32 & 64bit OS X 64bit Linux
Re: Properties
Ellery Newcomer wrote: BCS wrote: Reply to Vishaal, Properties, such as array.length, should return lvalues to allow: a.length += 8; or other similar statements. I think there is a (long standing) bug report about that one. Maybe if enough people gripe about it it will get fixed! (NOT said sarcastically!) Gripe gripe gripe gripe gripe Guripe. Gripe gripe. GRIPE.
Re: Anomaly on Wiki4D GuiLibraries page
Stewart Gordon wrote: Really, while Tango DWT may have superseded Phobos DWT as being the DWT that's still actively maintained, Phobos DWT remains the SDGL. That’s a tremendously awesome idea. It’s at least as awesome as to keep the car with two blown tyres and no engine because it’s been declared the standard family vehicle by your grandfather a hundred decades ago. *facepalm*
Re: Anomaly on Wiki4D GuiLibraries page
Stewart Gordon wrote: John Reimer wrote: 2) You don't have enough information to go on to make that change, unless you have dicussed this with Walter. Maybe he doesn't want to recognize the old DWT as "standard" anymore, if it isn't actively developed. Maybe neither library is "standard". Maybe you're right. But if Walter hasn't stripped Phobos DWT of its 'standard' title, I think technically it still applies. But it might be more practical to consider neither to be. Even though it technically still appears to be the declared standard GUI, it might be a bad idea to actually label it standard in a wiki. The project is dead. Guess why there has been another approach to this by other people. I guess what's really needed is for both DWTs to be maintained in parallel. Or maybe merge into one DWT that's versioned for the two. Who has experience of writing dual-mode libraries like this? (SDWF is dual-mode for D1 and D2; I'm guessing it could further be made triple-mode for Tango as well. Even quadruple-mode once we have a Tango for D2. Anyone fancy trying it?) I’m not sure this is technically feasable for such a big codebase.
Re: Any chance to call Tango as Extended Standard Library
Stewart Gordon wrote: IUnknown wrote: Really, D's community needs to grow up and create ONE standard library for D2. D2 would be a nice time to break backwards compatibility in the libraries. D already has ONE standard library. It's called Phobos. *yawn* Don’t you get tired of this?
Re: Any chance to call Tango as Extended Standard Library
Stewart Gordon wrote: Alexander Pánek wrote: Stewart Gordon wrote: D already has ONE standard library. It's called Phobos. *yawn* Don’t you get tired of this? I do get tired of the misunderstanding of what Tango is that seems to have arisen from the misterminology. It didn’t arise from misterminology, but people who do call it their (de-facto, but nonetheless) standard D library. You might not accept, respect or acknowledge this in any way, but then again you seem to be all into semantics. “A standard library for a programming language is the library that is conventionally made available in every implementation of that language. In some cases, the library is described directly in the programming language specification; in other cases, the contents of the standard library are determined by more informal social practices in the programming community.” I think Tango meets every but the first (conventional) “rule”. So there might have been a misunderstanding I do get tired of on your side. Kind regards, Alex
Re: Any chance to call Tango as Extended Standard Library
Alexander Pánek wrote: Stewart Gordon wrote: Alexander Pánek wrote: Stewart Gordon wrote: D already has ONE standard library. It's called Phobos. *yawn* Don’t you get tired of this? I do get tired of the misunderstanding of what Tango is that seems to have arisen from the misterminology. It didn’t arise from misterminology, but people who do call it their (de-facto, but nonetheless) standard D library. You might not accept, respect or acknowledge this in any way, but then again you seem to be all into semantics. “A standard library for a programming language is the library that is conventionally made available in every implementation of that language. In some cases, the library is described directly in the programming language specification; in other cases, the contents of the standard library are determined by more informal social practices in the programming community.” Source: http://en.wikipedia.org/wiki/Standard_library I think Tango meets every but the first (conventional) “rule”. So there might have been a misunderstanding I do get tired of on your side.