Search found 25 matches

by porky11
Mon Feb 09, 2015 7:09 am
Forum: Common Lisp
Topic: Macros multiple return values
Replies: 3
Views: 10569

Re: Macros multiple return values

As for a macro returning multiple forms, I think 0 return values will get converted to one return value - nil. I've played around with generating code with multiple 'lines', and it is incredibly confusing (i.e. nested instances of "Is this return value in a progn or do I need to wrap it?"...
by porky11
Sun Feb 08, 2015 6:16 pm
Forum: Common Lisp
Topic: Macros multiple return values
Replies: 3
Views: 10569

Macros multiple return values

It would be nice if macros could have multiple return values. Then one wouldn't have to write multiple macros to create special-functions, once for defun and once for lambda Why is it possible with 0 return-values, and with 1 but not with other numbers ;( Examples: (defmacro test1 (a b c) (values c ...
by porky11
Sun Feb 08, 2015 5:51 pm
Forum: Common Lisp
Topic: Save data structures directly (not as pointer)
Replies: 2
Views: 8944

Save data structures directly (not as pointer)

In C(++) its also possible to save datastructures directly (not as pointers). Is this possible in CL (maybe via libaries)? for example if I have a struct, that can have different number of dimensions, I would do it this way: (defstruct mover (pos nil :type vector) (vel nil :type vector)) and make th...
by porky11
Thu Dec 25, 2014 5:49 pm
Forum: The Lounge
Topic: Some type of Intro
Replies: 0
Views: 7085

Some type of Intro

I wanted to create a game, but didn't find a good language. Every language is slow, complicated or Java. When I found Lisp, I liked it, and it seemed really easy, but I didn't think, it would be good for large projects, becuase of his minimalism. It is the only programming language I read books and ...
by porky11
Thu Dec 25, 2014 4:53 pm
Forum: Common Lisp
Topic: Text and graphics
Replies: 1
Views: 5650

Text and graphics

I want to make a lib for drawing text-boxes, It would be good if a text-line automatically split into multiple strings, that no string is longer than a box. (such a function may be complicated, if the length of a char is Are there alredy types of libraries for this? or is there a graphic-lib that ca...
by porky11
Thu Dec 25, 2014 4:28 pm
Forum: Common Lisp
Topic: Which utilities do you use?
Replies: 9
Views: 19003

Re: Which utilities do you use?

"as-vanilla-as-you-can" I think, thats good in some way, especially for macros, that only help using few brackets (like a arc-like if (instead of if/cond) or a clojure-like let or a let1) the additional, but unnecessary brackets are also good for visibility(?..<I dont want to google the r...
by porky11
Thu Dec 18, 2014 3:13 am
Forum: Emacs
Topic: Open Buffers in new Frames instead in new Windows?
Replies: 1
Views: 15164

Open Buffers in new Frames instead in new Windows?

When Emacs automatically opens new windows (for example SLIME, when compiling a function from file), they appear in the same frame (X-window).
How do I change this behavior to open everything, that will be opened in a new Emacs-window by default, in a new frame?
by porky11
Mon Dec 15, 2014 2:22 pm
Forum: The Lounge
Topic: mercurial window
Replies: 1
Views: 6927

mercurial window

I made an account at bitbucket, where I uploaded a project. now I am not sure, what to do next. Will the people automatically come, and watch my things, and help if they want, or do I have to ask people. It is a program to draw text-boxes in a window (to make text-based games etc.) If you want to &q...
by porky11
Mon Dec 15, 2014 2:07 pm
Forum: Common Lisp
Topic: I do not understand symbol-macros
Replies: 5
Views: 10581

Re: I do not understand symbol-macros

It is ok, but I don't like it
by porky11
Sat Dec 13, 2014 3:16 pm
Forum: Common Lisp
Topic: I do not understand symbol-macros
Replies: 5
Views: 10581

I do not understand symbol-macros

I thought symbol-macros are like function-like macros, but they only substitute single symbols to expressions, if they are not interpreted as functions or macros. lets define the symbol-macro as (define-symbol-macro macro 0) so the form (let ((macro 1)) macro) would expand to (let ((0 1)) 0) and thr...