AskDefine | Define swig

Dictionary Definition

swig n : a large and hurried swallow; "he finished it at a single gulp" [syn: gulp, draft, draught]

Verb

1 strike heavily, especially with the fist or a bat; "He slugged me so hard that I passed out" [syn: slug, slog]
2 to swallow hurriedly or greedily or in one draught; "The men gulped down their beers" [syn: gulp, quaff] [also: swigging, swigged]

User Contributed Dictionary

English

Pronunciation

Verb

  1. To drink (usually by gulping or in a greedy or unrefined manner); to quaff.
    That sailor can swig whisky with the best of 'em.
  2. To take up the last bit of slack in rigging by taking a single turn around a cleat, then hauling on the line above and below the cleat while keeping tension on the line (also: sweating)

Synonyms

Translations

to drink
  • Finnish: ryypätä, kulauttaa
to take up the last bit of slack in rigging

Noun

  1. a drink
    He took another swig.

Translations

a drink
  • Finnish: ryyppy, kulaus, huikka

Related terms

Extensive Definition

SWIG (Simplified Wrapper and Interface Generator) is an open source software tool used to connect programs or libraries written in C/C++ with scripting languages such as Tcl, Perl, Python, Ruby, PHP, Lua, R and other languages like Java, C#, Scheme and Ocaml. Output can also be in the form of XML or Lisp S-expressions

How does it work?

The aim is to achieve the connection between the programs and the scripting languages with minimal effort: a small number of directives are added to the program's header files, and then the SWIG tool creates source code which provides the glue between C/C++ and the target language. Depending on the language, this glue comes in three forms:
  • an executable that behaves like the original program but embeds an interpreter for the scripting language,
  • a shared library that an existing interpreter can link to as some form of extension module, or
  • a shared library that can be linked to other programs compiled in the target language (for example, using JNI in Java).

Purpose

There are two main purposes of embedding a scripting engine into an existing C/C++ program:
  • The program can then be customized much more quickly, using the scripting language rather than C/C++. The scripting engine may even be exposed to the end user, so that they can automate common tasks by writing scripts.
  • Even if the final product is not to contain the scripting engine, it may nevertheless be quite useful to write testing scripts.
There are several reasons to create dynamic libraries that can be loaded into existing interpreters, including:
  • Provide access to a C/C++ library which has no equivalent in the scripting language.
  • Write the whole program in the scripting language first, and after profiling, rewrite performance critical code in C or C++.

History

SWIG is written in C and C++ and has been publicly available since February 1996. The initial author and main developer was Dave Beazley who developed SWIG while working as a graduate student at Los Alamos National Laboratory and the University of Utah and while on the faculty at the University of Chicago. Development is currently supported by an active group of volunteers led by William Fulton. SWIG has been released under a BSD type license, meaning it can be used, copied, modified and redistributed freely, for commercial and non-commercial purposes.

See also

  • Py++ - an object-oriented framework for creating a code generator for Boost.Python library
swig in German: SWIG
swig in French: SWIG
swig in Japanese: SWIG
swig in Polish: SWIG
swig in Russian: SWIG

Synonyms, Antonyms and Related Words

beverage, bib, booze, bumper, chug, chug-a-lug, draft, drag, drain, drain the cup, dram, drench, drink, drink in, drink off, drink to, drink up, drop, gargle, gulp, guzzle, imbibe, jigger, jolt, lap, libation, liquor, liquor up, lush, nip, peg, pledge, portion, potation, potion, pull, quaff, raise the elbow, round, round of drinks, shot, sip, slurp, snifter, snort, soak, souse, spot, suck, suck in, suckle, sup, swill, tank up, tipple, toast, toss down, toss off, tot, wash down, wet
Privacy Policy, About Us, Terms and Conditions, Contact Us
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2
Material from Wikipedia, Wiktionary, Dict
Valid HTML 4.01 Strict, Valid CSS Level 2.1