Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

259 Neutral

About GnuVince

  • Rank
  1. GnuVince

    prefix lists in Haskell

    Avoid using (!!) when you can, lists have a lookup time of O(N).
  2. GnuVince

    I love F#

    Quote:Original post by Telastyn F# is a nice option for your random programmer without any functional experience to get at least a cursory glance at some functional goodness. And I think that mixing in F# for certain pieces of a .NET solution where a functional approach makes sense (a map gen, AI, perhaps a pathfinding algorithm) is interesting. But it's still primarily a functional language. Maybe it's just the way my brain is currently wired, but making a sizable app in a functional style is (imo) impractical. So no, I don't quite share your enthusiasm. It's not the way your brain is wired, it's the way you learned programming. These days, everybody learns to program by mutating every variable in a program and using side effects without control. It worked correctly with only one CPU, but with the advent of multi-cores, you will need to make your programs threaded (or whatever it is your pet language uses) to take advantage of the extra power of the CPU. And as we know, side effects must be kept to a minimum if you want your program to work correctly with threads. Functional programming, by opting for immutability by default, makes it easier to make programs that will run correctly with multiple cores. For a nice video presentation on concurrency and a functional language that tackles the problem (Clojure), see this: http://blip.tv/file/812787
  3. GnuVince

    Why use lua?......

    Quote:Original post by arthurprs I really prefer python, the only problem with python is that you can VERY EASILY make malicious scripts How is it easier than with Lua?
  4. There's a built-in function to convert an integer to an hex string representation. >>> hex(25) '0x19' >>>
  5. Scheme if you want to learn only about the functional programming paradigm or Haskell if you don't mind learning about a real static typing system as well. Scheme is easy and fast to learn, Haskell requires a lot more dedication, because static typing really raises the complexity bar. If you don't know the functional paradigm, go with Scheme first to get yourself acquainted with the different ideas and then go for Haskell, which is a lot more modern.
  6. GnuVince

    Applicabilty of Haskell

    Haskell is not widely used in the industry. Learning it however really expands your mind (or in my case, completely breaks it) and you see things you may not see in other languages. For example, Haskell is pure, it has no side effects, it has lazy evaluation, variables are immutable, functions are first-class objects, the static typing system is very strict, without being completely in your way. Learning Haskell will make you a better programmer even if you end up never using it again. Also, the community is absolutely terrific. You can check out this beta book: http://book.realworldhaskell.org/beta/
  7. GnuVince

    Getting started with Scheme

    DrScheme is highly recommended to people new to Scheme.
  8. Quote:Original post by Sneftel Quote:Original post by superpig The strict, lazy nature of it actually makes it very easy to approach - provided you come at it from a mathematical, "we can compute things" angle, rather than a "we can make the computer do things" angle. Beginners don't want to compute things. They want to do things. Which they can learn on their own time. University should not be a place to learn Perl in 24 hours, Java in 14 days and C++ in 30 days, it's a place where students should learn the more fundamental and advanced aspects of computer science. I am not a US citizen, and I don't know exactly what other options you have, but I recall hearing about trade schools which is where one might go if all he wants to do is learn to create VBA applications.
  9. Although I really like Haskell, I don't know if it's appropriate as an introduction language. Haskell is a very complex language (i.e.: static typing, type variables, type classes, type inference, laziness, monads, etc.), and I feel that probably too much time will be spent fighting problems with Haskell instead of the algorithm. Scheme is a great way to get started, and once you have a grasp of the basic programming concepts, functional programming, recursion, higher-order functions, etc. it is easier to move into Haskell.
  10. I posted my thoughts on the matter here Regarding the syntax issue, I use editors with paren matching, which helps a lot and I indent my code, which means that I see the structure from the indentation, not from the number of parentheses. Does anyone really count the closing braces in Java, or do you just look at the indentation? As for Scheme turning off students, the experience of a teacher and Scheme implementer suggests otherwise: http://www.ccs.neu.edu/home/matthias/Presentations/CCSNE/first%20year.pdf Some quotes from the PDF: Quote: * HtDP (A free book on programming in Scheme) students routinely outperform C/C++ students on C++ * All students: HtDP preferred by ~70% * The more C++, the more they prefer HtDP * Female students: prefer HtDP by a ratio of 4:1 If you are interested, HtDP is freely available online.
  11. GnuVince

    Programming Languages and Technologies to Learn

    "A language that doesn't affect the way you think about programming, is not worth knowing." -Alan Perlis
  12. GnuVince

    Programming Languages and Technologies to Learn

    Haskell is not dynamically typed, it's an *extremely* strong, statically typed language. And you should learn it. I am right now, it's melting my brain! There's nothing wrong with learning languages, you can often transfer the skills you learn to your primary language. Oh, and have fun! :)
  13. GnuVince

    Questions about managed languages

    Quote:Original post by Kaze Quote:Original post by SamLowry There's no such thing as slow or fast languages. I've heard this said a lot but it seems to me their are a few real reason why a java app can run slower than a c one. 1: uses the heap for trivial data structures 2: no unsigned types, especially for encryption and compression this can double the amount of memory copying and processing needed. 3: #2 compounded by how painful JNI is to use 4: memory footprint of java runtime, though not nearly as big of a issues as it was in the past I think what SamLowry was trying to say is that languages are just a means to describe a solution, and as such, a description of a solution is not faster in one language. What defines the "speed of a language" is the implementation. There are Common Lisps that are slower than Ruby and there are that often match the performance of C++, so we cannot say that Common Lisp is either fast or slow; the individual implementations are what determines the speed.
  14. GnuVince

    xml redundancy

    Quote:Original post by Lode Everything is done with xml these days, which is great, the concept of such a tree structure in documents works great. But why's there the redundancy in it where the name of an element is repeated twice? It can be perfectly deduced what end tag belongs to what element just like finding matching bracket pairs, there's no need to repeat the name there. I can at least find two alternatives for the following structure: <Alpha> <Beta Gamma="Hi">Hello</Beta> <Delta/> </> <Epsilon> <Zeta>123</Zeta> </Epsilon> </Alpha> Alternative 1: <Alpha> <Beta Gamma="Hi">Hello</> <Delta/> < /> <Epsilon> <Zeta>123</> </> </> Alternative 2: <Alpha/ <Beta Gamma="Hi"/Hello> <Delta/> </> <Epsilon/ <Zeta/123> > > Why didn't something like that become the hugely adopted standard instead of the version where tagnames are repeated twice? Because people don't like Lisp, unfortunately. (alpha (beta :gamma "hi" "Hello") (delta) (epsilion (zeta 123)))
  15. GnuVince

    Paul Graham Releases Arc

    Like many mentioned before, it doesn't bring anything new, except maybe that sequences are callable to make indexing easier. Languages like Erlang or Haskell or Clojure which bring new things to the table (ok maybe not new, but certainly non-mainstream) are much more interesting. I think PG should've looked at those other languages and learn new tricks instead of just bringing the same old Common Lisp and Scheme stuff with shorter names.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!