For instance,
(foo "bar" '(println "hi"))
When I do
(foo "bar")
I want the result to be
true
And also have the side effecting of printing "hi" to the console.
What is the best way to go about doing this?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
(module "gmp.lsp")
(GMP:factor "4")
(set 'f (get-string (__gmpz_get_str rops 10 f)))
((a b c) (1 2 3)) => ((a 1) (b 2) (c 3))
(1+ x)
(1- x)
(-1 x)
(+1 x)
modules/mysql.lsp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/mysql.lsp b/modules/mysql.lsp
index aca5c9a..c23fb6e 100644
--- a/modules/mysql.lsp
+++ b/modules/mysql.lsp
@@ -91,6 +91,7 @@
(set 'files '(
"/usr/local/lib/libmysqlclient.so.19.0" ; OpenBSD 4.4
+ "/usr/lib/libmysqlclient.so.15" ; Ubuntu Jaunty
"/usr/lib/libmysqlclient.so" ; Linux, UNIX
"/usr/local/mysql/lib/libmysqlclient.so" ; Linux, UNIX
"/usr/local/mysql/lib/libmysqlclient.dylib" ; MacOS X
@@ -219,7 +220,7 @@
;; The whole result set from the query is returned at once as a list of row lists.
(define (fetch-all , (all '()))
- (dotimes (x (num-rows)) (push (fetch-row) alli -1)))
+ (dotimes (x (num-rows)) (push (fetch-row) all -1)))
;; @syntax (MySQL:databases)
;; @return A list of databases.
git clone http://reactor-core.org/newlisp/.git
cd newlisp
git merge mysql
git pull origin
git clone http://reactor-core.org/newlisp/.git
git blame nl-filesys.c
--enable-readline
--disable--readline
--enable-utf8
--disable-utf8
--enable-ipv6
--disable-ipv6
/* This platform is using the LP64 memory model */
#define NEWLISP64
/* Operating System Type */
#define _BSD
/* UTF8 support was chosen */
#define SUPPORT_UTF8
/* READLINE support was chosen */
#define READLINE
/* IPv6 support was chosen */
#define IPV6
/* EOF */
CC = cc
CFLAGS = -Wall -Wno-uninitialized -fno-strict-aliasing -DNEWCONFIG -O2 -c
LIBS = -lm -lreadline -lncurses
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o
default: $(OBJS)
$(CC) $(OBJS) $(LIBS) -o newlisp
strip newlisp
.c.o:
$(CC) $(CFLAGS) $<
$(OBJS): primes.h protos.h makefile_configure
./configure
make -f makefile_configure
make install
#include <stdio>
int
main(int argc, char** argv) {
short sc = sizeof(char) * 8;
short ss = sizeof(short) * 8;
short si = sizeof(int) * 8;
short sl = sizeof(long) * 8;
short sp = sizeof(void*) * 8;
if (si == 32 && sl == 64 && sp == 64) { printf("LP64n"); return 0; }
if (si == 64 && sl == 64 && sp == 64) { printf("ILP64n"); return 0; }
if (si == 32 && sl == 32 && sp == 64) { printf("LLP64n"); return 0; }
if (si == 32 && sl == 32 && sp == 32) { printf("ILP32n"); return 0; }
if (si == 16 && sl == 32 && sp == 32) { printf("LP32n"); return 0; }
}
(setq x "hee heenhi hinho ho ho")
(find-all "hee.*hi" (| 2 4 8 512))
=> nil
(trim "n foo ")
=> "n foo"
Is it supposed to work like that?