Good library/libraries for datastructures in assembler [closed] - data-structures

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Are there any good libraries (preferably with commented source) for standard datastructures (Linked list, array list, queue, stack etc.) for x86 (or others)
in Assembler ?
I don't like to reinvent (and debug !) the wheel....

Why not just find a good C library and call it from your asm?
Or if you need "inline" functionality:
Compile the functions you want to use into a Hello World program.
Disassemble the program.
Rewrite the assembly as asm/pre-processor macros.

You'd be best asking in one of the Assembler-specific groups rather than here. Try:
the recently-released MASM32 SDK v10 which gives a link to the MASM Forum.
the WinAsm site.
Google said there were some data structures demo-ed on Microsoft's MASM Samples page, but I didn't go hunting.
Another possibility is to check out HLA, the High Level Assembly Language. The blurb there is, in part,
Now you can enjoy all of the benefits of high-level and low-level languages, all rolled into a single language! HLA, the High-Level Assembler lets you write true low-level code while enjoying the benefits of high-level language programming. Don't let the name fool you; you can do anything with HLA that you can do with a traditional low-level assembler. All the same instructions are present, all the same low-level programming facilities are present. The difference between HLA and low-level assemblers is that you're not stuck using low-level programming paradigms when they're not needed. Watch your productivity soar when using HLA; and write far more efficient programs than you could using high-level languages.
IIRC, their support for data structures is quite good.

Related

Language and Platform [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am really new to Windows platform.
I was wondering if you guys can give me a tip on which language to start on and which platform is the best and easy to learn and use for the following
I will be working on Video dissecting, frame rate measurement. Everything to do with video frames and image processing measurement.
Performance is a very big concern. So I will not be able to work on Java or any other language. I would performance like C/C++.
Please give me reference as to where I can start off on it too.
Is OpenCV a good choice?
Thank you.
OpenCV is definitely a good place to start. The library is written in C++, have good API, and is highly optimized. OpenCV's cv::Mat data structure is fast and easy to work with and allows you to do linear algebra on matrices. The library has a large user community, so you should be able to find help on-line easily. You may use other libraries in conjunction with OpenCV or implement your own custom functions.
I would also suggest to use the power of GPU for image processing (when it is appropriate). OpenCV has a few functions that are implemented on GPU. This number will probably increase, because the library is being continuously updated (an updated version is released approximately every 3 to 4 months).
Yes OpenCV is very good choice to start. Its very easy to learn since it is widely used and lot of help is available online. You can get things done with minimum code.

What memory management algorithms are well-regarded and used by major compiler vendors? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
As an exercise I am writing a memory manager - that is, the code which implements malloc, realloc and free (or new and delete.) The RTL for my language, Delphi, allows the RTL's memory manager to be replaced easily. For those of you using C++, this is similar to, but lower-level than, overriding new and delete (it hooks into the RTL itself rather than being a language feature.) I'm looking for resources about high-quality approaches others have taken to the same problem.
I'm aware of a couple of memory management algorithms and implementations, including FastMM4 (quite complex), Doug Lea's allocator, Buddy, JeMalloc, TcMalloc, and Hoard. I am searching for information about the following:
Known, recommended algorithms: what other high-quality algorithms than the above have been published?
Are there specific algorithms tailored for highly threaded applications? That is, where there may be high thread contention at any locked points for allocation or freeing, and where memory may be allocated in one thread but deallocated in a different thread? Most algorithms - with the notable exceptions of Hoard, JeMalloc and TcMalloc - seem to be designed for single-threaded work, and the thread awareness is only thread safety in that there are locks or other synchronisation at appropriate points - no special design.
What do major vendors use? While Delphi and C++ Builder's is documented, I cannot find any information about the implementations used by MS VC++, .Net, or Objective C. (All documentation seems to be higher-level, such as NSAutoReleasePool for example. Linux seems to use Buddy.) These vendors do not seem to allow their RTL to be hooked into like Delphi does. I would be very interested to read about their implementations.

Are there any "fun" ways to learn about Languages, Grammars, Parsing and Compilers? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm preparing for an exam concerning languages, grammars, parsing and compilers. It's not really my cup of tea and most resources I find use the language of mathematics to define the different terms of the trade and explain the different concepts I need to know rather than stick with English or French, which I would very much prefer. Therefore, I'm having some trouble both with finding the motivation to continue studying and with simply understanding the theory.
So here is my question: Do any of you know where I could find a "fun" way of learning all this? Or at the very least, maybe a more "concrete" and less "mathematical" way of handling this subject.
I need to cover the following so anything on these subjects is welcome!
Parsing (LR, LL, ...)
Grammars (Context-free, deterministic, ...)
Syntax analysis Static flow analysis
Impact analysis concerning software maintenance and dependency to user interfaces
Dynamic analysis
Here are some resources which could be considered "fun" (with an emphasis on the quotation marks) ways to learn about a technical subject, just to get a sense of what I'm looking for.
Why's Poignant Guide to Ruby
Try MongoDB (type Help +
Enter)
If you want to learn a lot in a short time, go learn about meta compilers from Val Schorre's 1964 (yes, you read it right) Meta II paper on how to build self-compiling metacompilers. As a freebie, they can compile conventional lanuages, too! The paper is 10 pages, describes meta compilers (as a virtual machine beleive it or not), and contains two complete compilers.
There's a mind-blowing moment you eventually arrive at when you grok how the compiler can compile itself... I learned compilers this way back in the early 70s and it is the most memorable compiler lesson I ever had. This is fun.
There is an online tutorial here which implements all the ideas in JavaScript..
The author of the tutorial is Dr. James Neighbors, the guy who invented the term "domain analysis". He used the MetaII ideas for a spectacular domain-specific code generator named Draco. Draco was a key inspiration to compiler-like tools I've been building for the last 30 years.
How long do you have to prepare? The "best" way to learn compilers is to dig into them and the best way to do that is to use the best book on compilers EVER WRITTEN: The Dragon Book It's old, but awesome. It's not cheap but it is, quite possibly, the most concrete and least mathematical way to learn about the magical compiler.
It doesn't have any flashing lights and it won't be in an awesome font like the Ruby guide, but it's in the top 10 Books Every Programmer Should Read

Cool, visually-transmissible uses of Prolog [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I will be teaching only one lecture on basic Prolog to students with little to no experience in programming. I'd like them to see that programming and Prolog can be used in the real world, perhaps even to do cool things.
I have looked at this and this threads, but I cannot find anything that is visually appealing that I can show them when we wrap up the lecture.
Do you have any suggestions for cool applications that use Prolog? I'm especially looking for something that can be shown as a video or slideshow.
If what you want is to highlight the uses of prolog and use audio-visual media merely for presentation purposes, combining the following 2 links might do it:
Natural language processing with prolog in the IBM Watson system
IBM's Watson supercomputer destroys all humans in Jeopardy
Dynalearn is implemented in Prolog and has animations.
See:
http://personnel.univ-reunion.fr/fred/Enseignement/Prolog/index.html
under "La librairie clpfd", there are links to 3 finite domain constraint animations (N-Queens, Sudoku, Knight Tour) that are used in this class.
InFlow is written in Prolog. You may browse through the examples and / or contact the author for details. VisiRule might also help.
Disclaimer: I have not used either InFlow or VisiRule, but I do use WIN-Prolog which is the environment used for both programs.
+1 for Visirule. It is, as far as I can tell (and I've researched this topic quite a lot) a unique visual programming tool (I don't know of any other visual tool that is easily reduced to a turing-complete language). I have implemented a trouble-shooting website with it along with various other solutions. Highly recommended- version 5 coming out soon too.

What's a good matrix manipulation library available for C? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am doing a lot of image processing in C and I need a good, reasonably lightweight, and above all FAST matrix manipulation library with a permissive license. I am mostly focussing on affine transformations and matrix inversions, so i do not need anything too sophisticated or bloated.
Primarily I would like something that is very fast (using SSE perhaps?), with a clean API and (hopefully) prepackaged by many of the unix package management systems.
Note this is for C not for C++.
Thanks
:)
I'd say BLAS or LAPACK.
Here you have some examples.
OpenCV
alt text http://opencv.willowgarage.com/wiki/Welcome?action=AttachFile&do=get&target=OpenCV_Overview.jpg
You could try CUBLAS(CUDA Basic Linear Algebra Subroutines library) with CUDA enabled graphics card to do matrix manipulation on nVidia GPUs. It has quite significant performance boost than other CPU libraries, though it is not that lightweight to your requirement.
This page contains some description and figures about it.
I found this library and it's brilliant: Meschach
Armadillo have simple interface and can use different LAPACK and BLAS linear algebra libraries

Resources