This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 »
377
Tips, Tutorials, Examples / Re: Which should I use?
« on: June 14, 2010, 10:03:38 am »
array == &array
378
Tips, Tutorials, Examples / Re: Which should I use?
« on: June 09, 2010, 09:55:48 pm »
So basically, your three examples do the exact same thing using different syntax. Use whichever looks nicest.
379
Announcements / Re: Around the Clock
« on: June 09, 2010, 09:52:08 pm »
"great, another document for Josh to not maintain parse."
380
Off-Topic / Re: logy(x) ≢ log(x)÷log(y)
« on: June 09, 2010, 11:53:27 am »
The domain of logs with non-negative bases is (0, ∞), so log(-1) doesn't exist (or is complex). You are getting part of the answer set, so I imagine either the log base conversion rule is only for positive bases or it's similar to trig problems where you have to deal with different periods.
381
Proposals / Re: Recursion
« on: June 05, 2010, 02:55:43 pm »Code: (Haskell) [Select]
isurd n = sqrt (n + isurd n)
382
Now, when you're done raging over the bluntness of that statement, consider its implications. ISO C++ forbids void* arithmetic, it forbids implicit casts between pointers of non-inherited types, and it forbids implicit cast from pointer to integer. The question isn't of whether a separate garbage collector can be slapped on to the output of any old C++ program; that kind of thinking leads to output bloat instead of C85 language bloat that can be ignored.The problem is not solved by ISO C++. You can still say SomeObject* foo = (SomeObject*)0x0BADF00D.
Also, you can't pretend that a garbage collector alleviates all allocation problems. Specialized ones, knowing the size of everything up front, can be used to alleviate allocation headaches and just increment a pointer. There's nothing a garbage collector can accomplish that manual can't if given equal thought. Garbage collection has come a long way, and it's typically not an O(N) clusterfuck anymore. That doesn't mean that they are programmed with magic that fixes all our resource problems.Garbage collectors alleviate allocation headaches, which is more than enough for a lot of uses. The rest is just to show you that GC is fine for other uses as well. It improves memory locality (and thus cache usage), makes code more readable (which further helps productivity) and makes new techniques feasible (sane closures, etc.).
I don't see any of those as being exceptionally large... Looking at Xmonad, it's built off of X, which only serves to help my point. The rest are little things like RapidSVN that I kind of take for granted because really, they're just nice wrappers to what I'd otherwise be doing in a terminal.You still haven't done your research.
Also, I can be missing a huge, huge project made in Haskell without "making things up." I'm reporting my findings. I indicated what would "probably [be] notice[d]," based off of my findings. Quit accusing me of making things up simply because you disagree with my point.
Darcs is a full, distrubted version-control system- not a wrapper.
Yi is a full text editor which improves on Vim and Emacs.
GHC is a full, bootstrapping, optimizing, production-quality Haskell compiler.
Cabal is a full package manager, with a better interface than apt-get.
Xmonad is built on X the same way Gnome and KDE are, and it shows that Haskell is fine at interop.
seL4's prototype was implemented in Haskell to prove it's behavior.
You can write large systems just fine in languages even as high-level as Haskell.
Care to give an example? Lately it shouldn't appear the committees are having any trouble introducing new features to the language.Half of C99 got ignored. They ignored GC support (not built-in GC, nobody wants that in C++). They mostly added pointless things that could have been solved much better by removing or fixing something else.
383
Announcements / Re: Tentative Todo
« on: June 05, 2010, 02:11:30 pm »
GCC gives me a completely wrong error message if I'm missing the std:: or don't have vector #include'd. That might have been it.
385
Proposals / Re: Recursion
« on: June 04, 2010, 06:24:09 pm »
If you can end a loop by turning off the computer, then it's not infinite according to your definition. Apparently.
Anyway, you assume wrong. The computer doesn't just shut down when it runs past the kernel's code. If that ever happens, it starts executing whatever garbage happens to be there. Shutting down the computer is pretty forceful, even if it's the OS doing it.
Anyway, you assume wrong. The computer doesn't just shut down when it runs past the kernel's code. If that ever happens, it starts executing whatever garbage happens to be there. Shutting down the computer is pretty forceful, even if it's the OS doing it.
386
"know what is a pointer and what is not, and that is impossible in C++."From the point of view of a GC, you don't know if some word in memory is an integer or a pointer cast to an integer. If casting between pointers and integers were impossible, you could place GC roots at compile time; as it is you can't.
I'm going to assume you meant something other than how that reads; otherwise, that's the biggest lout of bullshit I've ever heard.
Is it possible to get C++ to wipe all the memory management ickiness off your ass for you? No. What I think Rusky was trying to convey is that C++ introduces no system of reference tracking. Personally, all considered, I prefer it that way.Reference counting is not good enough in many cases. You can implement it yourself fairly easily in C++ anyway.
How so? The idea is a garbage collector that can linearly assume you are done with it because the entire scope's life is ending. My argument was never that all convenient things are inefficient; it's if you start periodically iterating through everything to make sure nothing's just kind of waiting there that shit becomes inefficient.GC has come a long way from stop-the-world collectors. And as I've said before, it mostly just moves the processing required. Allocation in a GC system is just incrementing a pointer; in your favorite manual systems it is much more than that.
...Okay. For the most part, this has worked for a few large projects. You'll probably notice that the more the language does for you, the less large projects are successfully written in it. Openoffice is a shining example, in my opinion. Only a few of its aspects have been reported as being slow (the one I am thinking of is Calc, being 12x slower than Excel at something or another). I look at Haskell, and I see things like Geordi. Marvelous little toy; not ultimately very big.Haskell has Darcs and Yi. It has GHC and Cabal. It has Xmonad and seL4 and House. It has compilers for Perl 6, Lisp, bla bla bla look at Hackage. Do some research before making things up.
387
There IS a way to add GC to C++.You can make a reference-counting GC for C++. You can make an inaccurate GC for C++. What you cannot do without language and/or compiler modifications is a GC that takes advantage of the techniques that make GC just as good as manual memory management. Those techniques require that you know what is a pointer and what is not, and that is impossible in C++. The reverse of this problem is not true for other languages- it is possible to have a memory-safe language with manual memory management, but not a memory-unsafe language with accurate GC.
Just create a special smart pointer class, and have a bunch of methods so they keep track of their memory and stuff.
This way you can just #include the smart pointer stuff when you want to use it, and when you don't want to you can just use normal pointers. You can even mix them in the same line of code.
This is the beauty of C++, you can do anything you want.
388
Proposals / Re: Recursion
« on: June 03, 2010, 08:53:50 pm »the kernel's loop never ends until the computer turns off.I believe that the definiton of "infinite" implies "never ending"unless it's intended like many parts of a kernel or a device driver.that is the programmer's fault and they are an idiot if that happens...like if it's in an infinite loop.No, most compiler writers just think that disallowing void main() is stupid.Meaning that the program never fails ever
389
"C++ is designed to give the programmer choice, even if this makes it possible for the programmer to choose incorrectly" -WikipediaThese ideas are completely orthogonal to being bloated.
"C++ does not incur overhead for features that are not used (the "zero-overhead principle")" -Wikipedia
C++ is great because it lets you do anything you want, while at the same time not slowing your game down with extra stuff you don't want. If you don't use something, it's as if it never existed.
Sure the bloat can be a bit of a burden for someone learning c++, but it's also a burden having to learn all the many languages and their programming styles which c++ easily covers.
C++ puts everything together, while giving YOU the choice of what you want to do.
If you don't like c++, then don't use it.
I think it's quite obvious that the c++ supporters here aren't going to change their mind, so there's not much point arguing.
Bloat is a problem for everyone- you can't just ignore features others use.
Nobody's arguing against C++ anyway. Just that it's bloated.
We all use Windows at some point or another- I'm fairly sure everyone here agrees that while it runs nearly everything you want in some form or another, it's got a lot of stuff you don't want and a lot of stuff that's designed stupidly. It's the same with a lot of useful systems- nothing is perfect, and bloat is a pretty popular problem to have.
390
Proposals / Re: Recursion
« on: June 03, 2010, 07:59:36 am »unless it's intended like many parts of a kernel or a device driver.that is the programmer's fault and they are an idiot if that happens...like if it's in an infinite loop.No, most compiler writers just think that disallowing void main() is stupid.Meaning that the program never fails ever