Python language has a well known feature named interactive mode where interpreter can read commands directly from tty.
I tipically use this mode to test if a given module is in the classpath or to play around and test some snippets.
Do you know any other programming languages that has Interactive Mode?
If you can, give the name of the...
I am wondering if there are any statically typed, embeddable scripting languages. Python, JavaScript, etc. are great languages, but they are dynamically typed (that is, types are checked at run time). I am just wondering if anyone knows of any statically typed scripting languages that can be embedded in a C++ application?
...
I just finished to read "Coders at works", a brilliant book by Peter Seibel with 15 interviews to some of the most interesting computer programmers alive today.
Well, many of the interviewees have (co)invented\implemented a new programming language.
Some examples:
Joe Armstrong: Inventor of Erlang
L. Peter Deutsch: implementer of Sma...
A long time ago, when my company was much smaller, dividing the development work over teams was quite easy:
the 'application' team developed the applications-specific logic, often requiring a deep insight of specific industry problems)
the 'generic' team developed the parts that were common/generic for all applications (user interface ...
I'm guessing that there's a word for this concept, and that it's available in at least some popular languages, but my perfunctory search was fruitless.
A pseudocode example of what I'd like to do:
function foo(a, b) {
return a * b // EG
}
a = [ 1, 2, 3 ]
b = [ 4, 5, 6 ]
matrix = the_function_for_which_I_search(foo, [a, b] )
print m...
The Decorator Pattern is dynamic extension-at-runtime of classes. It dynamically forms a is-a relationship.
I started to wonder if I was over-complicating my API by using the Decorator Pattern after I got this answer about the difference between a mixin and an abstract class.
...
Well obviously Ruby and Sass, but what are some other ones?
...
Is it normal to have tests that are way bigger than the actual code being tested? For every line of code I am testing I usually have 2-3 lines in the unit test. Which ultimately leads to tons of time being spent just typing the tests in (mock, mock and mock more).
Where are the time savings? Do you ever avoid tests for code that is alo...
Python needs a framework, so does Java (for the web). I don't know much about Ruby or Coldfusion. But is there another language out there for the web that can stand alone as it is without a need for a framework or without strict adherence to a design pattern (MVC and the likes) aside from PHP? BTW, the statement that Python and Java need...
Lets say I have a simple ecommerce site that sells 100 different t-shirt designs. I want to do some a/b testing to optimise my sales. Let's say I want to test two different "buy" buttons. Normally, I would use AB testing to randomly assign each visitor to see button A or button B (and try to ensure that that the user experience is con...
For example on a high traffic web server.
To reduce problems when switching a file I usually rename the old file out and then rename in the new file.
I was told some time ago that renaming a file does not change the 'inode data' so that processes reading the file can keep doing so without glitches. And, of course, rather than copying i...
How is a language construct with the following properties called?
It has a beginning and an end, just like a function
It has a header containing it's name, also like a function but without arguments
There can be any number of statements between its beginning and end, like a function
You can use a function to jump to its beginning from ...
For an art project, one of the things I'll be doing is zooming in on an image to a particular pixel. I've been rubbing my chin and would love some advice on how to proceed.
Here are the input parameters:
Screen:
sw - screen width
sh - screen height
Image:
iw - image width
ih - image height
Pixel:
px - x position of pixel in image
py ...
Hi, I'm looking to write a quick program to read and inspect packets of a certain format and then blacklist ips with a certain style of packet-traffic (packet patterns of an attack against the network). Are there decent samples of reading and inspecting packet flow on a network?
...
/// \todo Loop must be rewritten
...
/// \todo Delete this loop
Can Doxygen generate a todo.txt file containing these comments ?
...
I'm currently in the process of programming an utility which generates GA tracking pixel (utm.gif) URL:s based on given parameters. For those of you who are wondering why I'm doing this on the server side, I need to do this server side since the context which I'm going to start tracking simply doesn't support JavaScript and as such ga.js...
I am currently doing a dissertation about the implications or dangers that today's software development practices or teachings may have on the long term effects of programming.
Just to make it clear: I am not attacking the use abstractions in programming. Every programmer knows that abstractions are the bases for modularity.
What I wa...
Intro:
EDIT: See solution at the bottom of this question (c++)
I have a programming contest coming up in a bit, and I've been prepping :)
I'm practicing using these questions:
http://cemc.math.uwaterloo.ca/contests/computing/2009/stage2/day1.pdf
I'm looking at problem B ("Dinner").
Any idea where to start? I can't really think of a...
I frequently find myself creating classes which use this form (A):
abstract class Animal {
public void Walk() {
// TODO: do something before walking
// custom logic implemented by each subclass
WalkInternal();
// TODO: do something after walking
}
protected abstract void WalkInternal();
}
class Dog : Animal {
...
As in question, I'd like to know best alternative for garbage collector, with it's pros and cons. My priority is speed, memory is less important - if there is gc which doesn't make any pause, let me know.
EDIT: maybe I should add, that I'm working on safe language, and garbage collecting or its alternative has to be used
...