sbcl

How to read from large process output correctly

孤人 提交于 2019-12-14 03:49:13
问题 There are already a few answers on how to read from a process stream but as far as I can see they do not cover reading from a process which: may run for a long time before making any output makes a huge output at the end of its lifetime (more than the stream buffer can hold) should not run longer than a given time frame the resulted output is needed as a whole (long character string) Therefore using the mentioned solutions would either result in wasted process cycles as the loop will try to

How to use buildapp with a pre-defined asd file

早过忘川 提交于 2019-12-14 01:36:03
问题 I intend to use buildapp for getting executables out of my lisp-code, but I do not understand how I can specify my .asd file for the project, for loading up the code. I imagined some call like: buildapp --asdf-file:/path/to/projectasdffile.asd \ --entry-point package:main But the examples provided by the homepage do not cover a call I recognize as equal, all the example calls look like a whole asdf definition itself. This would be a bit big for a whole project, especially as I already got a

Executing a lisp function from Java

这一生的挚爱 提交于 2019-12-13 01:33:22
问题 I have compiled Lisp code and I want to make a front end GUI for it. I chose Java swing to develop the GUI. Now I want to call the LISP code (SBCL) from java application! Is there any way to do that? How to execute lisp code from Java? Thanks 回答1: I believe that the best solution for you is use: http://common-lisp.net/project/armedbear/ You cand find this samples on that web /* * Main.java * * Copyright (C) 2008 Ville Voutilainen * $Id$ * * This program is free software; you can redistribute

USocket on SBCL: connection refused (Drakma and Dex)

白昼怎懂夜的黑 提交于 2019-12-12 23:31:09
问题 Running simple HTTP-request: with dexador or drakma and on SBCL 1.4.14 and on OS X 10.13.6 with (ql:client-version) equals to "2017-03-06" and (defvar qlqs-info:*version* "2015-01-28" (I've just installed Quicklisp from https://www.quicklisp.org/beta/ via https://beta.quicklisp.org/quicklisp.lisp) via Emacs+SLIME or just from the command line using only SBCL (dex:get "http://localhost:8000/wp-json/wp/v2/posts") fails with the error ( dex stacktrace) Condition USOCKET:CONNECTION-REFUSED-ERROR

Why in Common Lisp, when I run the function “acos” with an argument of 1, is the answer is wrong?

陌路散爱 提交于 2019-12-12 21:53:07
问题 instead of the correct answer of 0 when I run (acos 1) in, to find the ArcCosine of 1 emacs, I get the answer -6.125742f-17 why is that and how do I get the correct answer of 0 like Windows Calculator says it should be I'm using SBCL as my Lisp Interpreter on Windows 8 and SBCL is 32-BIT when I run: (acos (rational 1)) i get the same answer and when I run (acos (float 1)) i get this error The value -6.1257422745431e-17 is not of type (DOUBLE-FLOAT 0.0 3.141592653589793). [Condition of type

External vs Internal Symbols in Common Lisp Package

我是研究僧i 提交于 2019-12-12 19:20:57
问题 What is the difference between them in the context of a Common Lisp package? I am reading through SLIME documentation and some commands mention that extensively. 回答1: The author of a Common Lisp package can export a symbol for the user of the package. Then the symbol is an external symbol and you can access it with package-name:external-symbol-name . Internal symbols are not meant for the user but can be accessed with package-name::symbol-name More explanations are in Peter Seibel's book and

Increasing Stack Space

老子叫甜甜 提交于 2019-12-11 10:03:19
问题 When I run the following code: (defun countdown (n) (if (>= n 0) (cons n (countdown (- n 1))))) (countdown 100000) I get the following message : INFO: Control stack guard page unprotected Control stack guard page temporarily disabled: proceed with caution debugger invoked on a SB-KERNEL::CONTROL-STACK-EXHAUSTED in thread #<THREAD "main thread" RUNNING {1002B03653}>: Control stack exhausted (no more space for function call frames). This is probably due to heavily nested or infinitely recursive

sbcl: encoding and decoding characters without actual I/O

拈花ヽ惹草 提交于 2019-12-11 09:05:41
问题 In sbcl, when encoding a string using, say, :utf-8, is there a way to encode it to a byte vector without doing actual I/O, similar to clisp's (EXT:CONVERT-STRING-TO-BYTES string encoding &KEY :START :END) and also decode with something like clisp's (EXT:CONVERT-STRING-FROM-BYTES vector encoding &KEY :START :END) I could crudely approximate this by writing the data to a file with the desired encoding and then rereading it using :iso-8859-1, but that seems to be a dorky longcut. 回答1: SBCL has

not able to find package when running from SLIME, but from command line is ok

天大地大妈咪最大 提交于 2019-12-11 08:51:33
问题 I'm running the teapot example from cl-opengl package. The only changes I've made are loading the required packages. It works fine when executed from unix shell ( sbcl --load "3.cl" ), but when I try to compile and load it through SLIME ( C-c C-k ) i get the error about package GLUT not found. Curiously, the compiler chokes on the (defclass glut-teapot-window (glut:window) . What gives??? Here's a screenshot of what happens Here's the code for 3.cl. ;;;; -*- Mode: lisp; indent-tabs-mode: nil

slime-fancy not loading with emacs sbcl slime windows configuration

假如想象 提交于 2019-12-11 01:17:19
问题 I have slime with sbcl working in emacs 24.1 but can not get a slime repl to open. I can use M-x slime to make a connection to sbcl in a inferior-lisp buffer but I can not invoke the slime-repl or get a nice lisp auto-indent when editing lisp files even though I am loading the slime-fancy contrib in .emacs. I don't get any error messages during start-up. When I try M-x slime-repl I get [No match]. my .emacs file: (setq inferior-lisp-program "sbcl") (add-to-list 'load-path "c:/home/bin/emacs