Thread: Does managed code make people stupid?

  1. #31
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by Mario F. View Post
    I could for instance take advantage of the apparently more streamlined multithreading (or even traffic/queue) support of Erlang by writing whatever engine I needed in Erlang and expose it through a dll I could call from C++, no?
    This might be tough; erlang has a mechanism called 'ports' which let Erlang communicate with non-erlang languages, and as well, you can also write linked-in drivers for the erlang runtime which will essentially give you a foreign function interface, but beyond that I do not think it's possible to link the erlang virtual machine itself into something like a library/shared object. Here are some resources that might provide some information in that area, though:

    http://www.erlang.org/doc/
    http://www.trapexit.org/

    Specifically you will want to look at the 'interoperability tutorial' on the erlang.org documentation pages.

    Well I do know reading Mad_guy's post makes me feel dumb.
    Do not be disheartened, I am extremely weak at things like math (when I go to uni. for the first time in a month or so I'll only be doing algebra)! I tried as I could to make the above post approachable to those who do not have first hand experience with a language like haskell, and if you have questions I would be happy to answer and can likely explain it to you in easier terms. :]
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  2. #32
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Mad_guy View Post
    but beyond that I do not think it's possible to link the erlang virtual machine itself into something like a library/shared object
    I was thinking more on the line of something like HiPE (pdf). I understand this is for SPARC, but my readings tell me there's a x86 Linux version too. I assumed before there would be a Windows version, but it seems there are problems implementing one.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #33
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Today, I mostly use MATLAB for development, which is an "extremely managed" language. Nevertheless, it come with a JIT compiler and some projects, written in a couple of days, would take months to write faster (or at all!) in C or C++, due to the heavily optimized standard libraries.

    I don't know about Haskell, though. As far as I know, it's not very widely used.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #34
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    I understand this is for SPARC, but my readings tell me there's a x86 Linux version too. I assumed before there would be a Windows version, but it seems there are problems implementing one.
    HiPE is now apart of the standard erlang distribution. But it doesn't generate an object-file; it generates a 'fat binary' with the native code alongside the regular BEAM code that is in a .beam file. When you run it, the native code is executed instead.

    There doesn't seem to be much of a push to get it on windows, however.

    As far as I know, it's not very widely used.
    For appropriate definitions of "widely," sure. Regardless it still has an active community, is growing every day and (I think, anyway) offers an elegant solution to many problems.

    Plus learning it will expand your brain, even if you don't use it much for your day-job (I think similarly of other languages like prolog and erlang.) I don't think haskell will ever become truly mainstream; it's greatest legacy will be the impact it has on other languages. :]
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Call managed code (c#) from unmanaged code (VC++ 6.0)
    By playxn in forum C++ Programming
    Replies: 3
    Last Post: 10-14-2008, 12:11 PM
  2. make user press enter / wierd code thingy
    By CorvusVita in forum C++ Programming
    Replies: 10
    Last Post: 04-05-2006, 09:55 AM
  3. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 12:01 PM
  4. How do I make and edit box scroll down with code?
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 11-26-2001, 02:33 PM
  5. Replies: 25
    Last Post: 10-28-2001, 01:08 PM