freenode/lisp - IRC Chatlog
Search
6:11:43
aeth
It's a large language, but every time you learn something new, you can see if there's something in a previous program that you can rewrite to be better. But first there needs to be previous programs.
6:12:45
aeth
Just write lots of tiny functions that, if you can get away with it easily, return values rather than set things.
6:13:34
aeth
Few functions are too small. If you're concerned about the performance of having an extremely tiny arithmetic function add: (declaim (inline foo)) right above the line (defun foo ()
6:13:59
aeth
But only inline tiny functions, and if you're not sure disassemble to make sure they're actually tiny!
6:40:59
beach
I think I have an idea for a separate library for Concrete Syntax Trees (CSTs). I'll create a repository and write some code and some documentation.
11:05:42
dxtr
So what's the common thing to do in multi-file projects? Are all files their own package or the same?
11:08:31
jackdaniel
some prefere file-per-package, others have a separate packages file and source scattered trough many files
11:08:59
jackdaniel
sometimes it's just one package for whole system, or two packages (interface, and internal implementation)
12:38:49
phoe
I've somehow installed OpenJDK7 on FreeBSD on SPARC and managed to run ABCL on it. Installing Quicklisp fails though and all I get is, debugger entered on ERROR: "Invalid argument".
13:41:50
dxtr
jackdaniel: If I were to use one package per file (or directory for that matter) would it make more sense to define the package in package.lisp or the file itself?
14:15:32
dxtr
So if I were to create a macro that creates some variables with DEFPARAMETER with names based on the input; would I have to concatenate the variable names as strings and then convert them to symbols and then pass that to DEFPARAMETER?
14:24:28
dxtr
I actually found a stackoverflow question that was close to what I wanted to do :D http://stackoverflow.com/questions/22359035/define-variable-with-defparameter-with-name-determined-at-runtime
14:25:15
dxtr
like if I want it to do three defparameter I just do `(defparameter ....)\n`(defparameter ...)?
15:13:29
afidegnum
hi, i m reading some gigamonkey tutorial but i don't understand this part.... https://ghostbin.com/paste/v355s which among them is responsible for the prompt ?
15:14:31
drmeister
Does this look right? In the cl-jupyter project there is an UNWIND-PROTECT that looks like it has a typo where the form that should be in the protected-form ends up in a cleanup-form
15:16:14
beach
afidegnum: The call to FORMAT is responsible for the prompt, and the call to FORCE-OUTPUT makes sure that all buffered output is transmitted to the device.
15:17:44
nyef
drmeister: But the nature of the failure is such that a casual test wouldn't find a problem, since it's basically "just" the cleanup code not getting called.
15:18:20
nyef
And that, only with a non-local exit. If SHELL-LOOP exits cleanly then there's nothing to see.
15:19:37
beach
afidegnum: It generates some output that the user sees. That's what we call a prompt.
15:20:33
beach
afidegnum: Some other function calls the function prompt-read to print the prompt and read a line of input typed by the user.
15:22:05
afidegnum
so if i understand, force-output will emit the prompt and read-line will capture what the user typed, right ?
15:22:56
beach
afidegnum: No, the FORMAT will emit the prompt, either to the device or to a buffer. FORCE-OUTPUT will make sure that, if the prompt was emitted to a buffer, then the buffer is transmitted to the device.
15:25:32
afidegnum
ok, i think i will read more about it, Ah, earlier i read (fornat t "") where t is part of the destination, we do have string and streams
15:26:45
beach
afidegnum: For FORMAT, the first argument designates a stream. For FORMAT it can either be a stream or T or NIL. T means the same as the stream *standard-output* and NIL means that the result is returned as a string.
15:38:19
afidegnum
beach: i know there is a read function which prompt a user but i don't understand how come FORMAT too play a role as a prompt
15:40:00
beach
afidegnum: By "prompting the user" I mean show some kind of message, such as "Pleas user, enter a file name, would you:"
15:40:58
beach
It is the PRINT functions (and in this case the formatted output function FORMAT) that can print such messages.
15:45:50
beach
I don't see any function under "Output functions" that says it prompts. Which one do you see?
16:58:39
learning
hi, i'm trying to find a toy example for (format t "~:@c" #\magic-character) where #\magic-character shows unusual shift keys so that I can better understand the c directive. i know its imlementation dependent. have sbcl and clisp already setup.
16:58:59
learning
page that im referencing: http://www.lispworks.com/documentation/HyperSpec/Body/22_caa.htm
17:03:44
nyef
Problem is, it basically needs both the "implementation-defined attributes" and full knowledge of the input device mapping, neither of which are things that a modern Lisp system tends to have.
17:30:06
afidegnum
lispworks and allegro, don't they have a free license? or everything is paid? and after the trial version of what they offered you can't use their product again?
18:10:20
Xach
afidegnum: If you ask nicely, you can get the full version without paying anything. But you cannot use it for anything you wish, usually.
18:10:42
Xach
afidegnum: for example, I asked nicely and was granted full licenses for quicklisp testing purposes. but I cannot use it to make and sell applications.