freenode/lisp - IRC Chatlog
Search
15:11:26
dlowe
once a language has been bootstrapped, I'm not sure its bootstrappability is really an issue
15:12:45
random-nick
dlowe: well, you need to bootstrap it again when porting it to a new architecture
15:13:35
jackdaniel
random-nick: for practical purposes SBCL has problem solved, because clisp is ported to that architecture (hence it may be used) and C is ported as well
15:13:53
dlowe
random-nick: you emit object code for the new architecture on a supported architecture
15:18:30
dlowe
the point is that you don't need an implementation in some other language in which to do it
15:28:49
jackdaniel
one with host architecture and one with target architecture (during the building process)
15:29:26
jackdaniel
so it is way easier to grab some already ported implementation and boostrap SBCL directly on the host. but yeah, GCC is for instance bootstrapped from GCC, not from assembler
15:38:08
fiddlerwoaroof
butterthebuddha: you have to be a bit careful when redefining a constant because it won't necessarily update all the references to that constant
15:39:00
fiddlerwoaroof
The compiler will, on occasion, do things like inline a constant's value and then those references won't necessarily get the new value.
15:40:55
fiddlerwoaroof
So, the "redefine constant" restart can lead to an inconsistent application state: it's probably better to use reader conditionals to use defparameter in your development environment and defconstant in production, or something like that.
15:45:41
Bike
what define-constant does is avoid trying to redefine the constant if it meets the test with the original value.
15:46:20
Bike
so if you do (defconstant +foo+ (list 1 2 3 4) :test 'equal) twice, it defines the constant normally the first time, then the second time ignores the new list.
17:01:19
jasom
The real sollution for string constants is: (define-symbol-macro +foo+ "some string") /s
17:02:24
pjb
(define-symbol-macro +foo+ "some string") (let ((+foo+ "some other string")) +foo+) #| --> "some other string" |#
17:08:10
jasom
IIRC sbcl will give you a warning for (let (*foo*) ) or (let (+foo+)) because of the earmuffs
17:28:21
dlowe
and in that case, it would be legal, but still inadvisable, since it's clearly intended to be constant-ish
17:46:44
_user
does anyone know of a common lisp docstring documentation generator that works with org-mode markup, other than this one: https://github.com/jphmrst/cl-org-sampler
18:33:46
butterthebuddha
"The ~t directive is for tabulating. The ~10t tells FORMAT to emit enough spaces to move to the tenth column before processing the next ~a. A ~t doesn't consume any arguments."
18:39:43
malice
I believe it inserts at least 1 space, and at most enough to get into the nth column
20:20:01
malice
I have something like #<someobject>, but when I press C-c I in there I get error about illegal sharp macro character
20:44:41
gnuhurd
hi, if I have a function that setf's a variable, and I want to return the variable at the end, can I use eval? will it pose any risks? if not, what should I do to return it?
20:47:34
Xach
the value of the last form evaluated in the function is what gets returned. and evaluation is "automatic" in this context.
20:50:39
jasom
are there any decent refactoring tools for lisp (e.g. rename a lexical binding)? I currently make do with find/replace but that seems slightly awkward for some code.
20:51:17
Xach
jasom: there was redshank, but i never tried it and i think it was pretty limited in scope.
20:51:26
jasom
other things that would be nice to automate is: turn this block into a defun, with parameters named the same as all externally-bound values referenced in the block
20:52:22
jasom
(let (foo) (let (bar) (baz foo bar))) <-- e.g. it would be nice to be able to turn the (let (bar) ...) into (defun _CURSOR_ (foo) (baz foo bar)) at the toplevel somewhere
22:30:13
malice
How do you declaim type of &key arguments? (declaim (ftype (function (first-arg ???) return-type) func-name))
22:38:10
axion
malice: Keyword arguments are slower than regular function arguments. If you are trying to provide type annotations to the compiler for optimization purposes, might just want to use regular arguments if speed is important.
22:38:51
basket
malice: You can normally look at things like that by asking Lisp to describe things, eg after (defun f (&key x) (declare (fixnum x)) x), (describe #'f) on SBCL tells me the derived type is (FUNCTION (&KEY (:X FIXNUM)) (VALUES FIXNUM &OPTIONAL))
22:49:55
slyrus
is there a dedicated channel to lisp web stuff, particularly caveman/clack/ningle/lack/etc...?
1:36:03
lerax
Pipelines in Python: https://gist.github.com/ryukinix/1e99bac3d49f81f006c620d102675e16 :v
2:52:43
eeyyy
Hey i just started learning this a week ago and i put in the code (defmacro unless (condition &rest body) '(if (not ,condition) (progn ,@body))) and got an error. Anyboody know what i did wrong?
2:58:31
Bike
you'll probably get a complaint for trying to redefine the CL macro "unless", so give it a different name.