I have only a limited knowledge of Lisp (trying to learn a bit in my free time) but as far as I understand Lisp macros allow to introduce new language constructs and syntax by describing them in Lisp itself.
This means that a new construct can be added as a library, without changing the Lisp compiler / interpreter.
This approach is very different…
We have many great tools which helps a lot when programming, such as good programmers text editors, IDEs, debuggers, version control systems etc. Some of the tools are more or less "must have" tools for getting the job done (e.g. compilers).
There are still always tools which do help a lot, but still don't get so much attention, for various…
I am 30 years old and I have 7 years experience in system administration, networking. Due to economic downturn it is not so easy find jobs in this sector anymore. I am thinking to leave this career and start programming. I am interested in Java, However I have no programming experience at all. In university we have seen Java which was in…
Possible Duplicate:
Is it too late to start programming?
Hi, i am 26 and have a mathematics degree (specialized in logic and set theory). I feel i need a change and wanted to start programming, i have some experience (low-midd) with python and lisp, right now i am starting with c++ (stroustrup book)...
My problem is that i am…
How can I basically carry out a unique constraint on a string data-type field.
class User{
String username
String Email
static hasMany = [roles:Roles]
static constraints = {
Email(email:true)
username(unique:true)
}
Is there any simple way to implement username(unique:true)
or
I will have to manually check the database…
Let's say there's a table created as follows:
create table testTable ( colA int not null )
How would you drop the not null constraint? I'm looking for something along the lines of
ALTER TABLE testTable ALTER COLUMN colA DROP NOT NULL;
which is what it would look like if I used PostgreSQL. To my amazement, as far as I've been able…
I asked a question about Currying and closures where mentioned.
What is a closure? How does it relate to currying?
Additional:
Kyle's answer is great but to my poor procedural/OO mind Ben Childs answer is really useful.
Hi
I am wondering if any Developer Conferences are coming up in Vancouver, BC, Canada in the next few months. I am particularity interested in Microsoft technologies(such as .Net, Visual Studios, etc)
Thanks
I heard the binary compiled from typed functional languages runs faster than otherwise. Is it true?
If so, why is that?
And normally, do typed languages produce better binary?
Hullo all.
In this (Warning: PDF) presentation on Haskell Type Classes, on slide #54, there's this question:
Open Question:
In a language with generics and
constrained polymorphism, do you need
subtyping too?
My questions are:
How do generics and constrained polymorphism make subtyping unnecessary?
If generics and…
I want to rewrite TCP/IP streams. Ettercap's etterfilter command lets you perform simple live replacements of TCP/IP data based on fixed strings or regexes. Example:
http://ettercap.sourceforge.net/forum/viewtopic.php?t=2833
I would like to rewrite streams based on my own filter program instead of just simple string replacements.
…
hello, explain me please how exactly pipe works, for example I have this snippet of the code
set line = ($<)
while(${#line} != 0)
if(${#line} == 5) then
echo line | sort | ./calculate ${1}
endif
set line = ($<)
end
I need to choose all rows with 5 words and after sort it and after transfer, but I'm confused, how…
I have a table that describes which software versions were installed on a machine at various times:
machine_id::integer, version::text, datefrom::timestamp, dateto::timestamp
I'd like to do a constraint to ensure that no date ranges overlap, i.e. it is not possible to have multiple software versions installed on a machine at…
Recently Erik Meijer and others have show how IObservable/IObserver is the dual of IEnumerable/IEnumerator. The fact that they are dual means that any operation on one interface is valid on the other, thus providing a theoretical foundation for the Reactive Extentions for .Net
Do other dual interfaces exist? I'm interested in…
Dear Gurus,
I'm working on a Kernel module and i'm trying to Uniquely identify each one of the users trying to open() the module ( can be either processes or threads ).
what is the best way to identify them? is there an ID i can get from a system call?
i wish to get all users in a list that specifies whether they're trying…
Why did programmers ever start using status codes? I mean, I guess I could imagine this might be useful back in the days when a text string was an expensive resource. WAYYY back then. But even after we had megabytes of memory to work with, we continued to use them. What possible advantage could there be for obfuscating…
So, I'm being confused about foreign key constraint handling in Postgresql. (version 8.4.4, for what it's worth).
We've got a couple of tables, mildly anonymized below:
device:
(id, blah, blah, blah, blah, blah x 50)…
primary key on id
whooooole bunch of other junk
device_foo:
(id, device_id, left, right)
…
Are there any languages that target the LLVM that:
Are statically typed
Use type inference
Are functional (i.e. lambda expressions, closures, list primitives, list comprehensions, etc.)
Have first class object-oriented features (inheritance, polymorphism, mixins, etc.)
Have a sophisticated type system (generics,…
I have a table defined by the following SQL:
CREATE TABLE test (
id integer PRIMARY KEY NOT NULL UNIQUE,
status text NOT NULL,
enddate date,
/* Checks */
CHECK (status IN ("Current", "Complete"))
);
I'd like to add a constraint that requires enddate to be non-null if the status is "Complete".…
Hello
Is there a tutorial for migration from plain udp sockets (linux, C99/C++, recv syscall is used) to the raw sockets?
According to http://aschauf.landshut.org/fh/linux/udp_vs_raw/ch03s04.html
raw socket is much faster than udp.
Application is client-server. client is proprietary and must use exactly same…
I heard that F# is actually a modification of Occaml. Is this true?
If so, F# is just Occaml on .NET?
If not, what's the major difference between the two functional languages?
Hello,
I am trying to implement my own transport layer protocol in Linux for an experiment. I am going to use socket interface and add my protocol using sock_register. For the proto_ops i can see that the parameters for the sendmsg and recvmsg are (struct kiocb *iocb, struct socket *sock, struct msghdr *msg,…
And I mean that in the same sense that a C/Java for is just a funky syntax for a while loop.
I still remember when first learning about the for loop in C, the mental effort that had to go into understanding the execution sequence of the three control expressions relative to the loop statement. Seems to me…
Hi all,
Does anyone know of a truly declarative language? The behaviour I'm looking for is kind of what Excel does, where I can define variables and formulas, and have the formula's result change when the input changes (without having set the answer again myself)
The behaviour I'm looking for is best…