freenode/#lisp - IRC Chatlog
Search
15:56:56
ogamita
hectorhonn: then find a customer, and start up your own company. As the boss, you'll be able to enforce the use of lisp for all your projects.
16:00:14
jackdaniel
it is perfectly suitable for so-called functional programming, oop programming or procedural programming
16:00:20
francogrex
if you want to continue using your favorite lisp implementation but want to interact with java, use foil
16:00:42
ogamita
hectorhonn: the fact that we defile global variables with those stars, shows that we don't encourage them at all!
16:00:56
Odin-
hectorhonn: They have a handful of features that make using them very different from global variables in most other languages.
16:02:00
jackdaniel
hectorhonn: nothing prevents you from using a lexical variable. special variable enables you to work with dynamic contexts
16:03:44
beach
hectorhonn: Bindings to special variables are per-thread so they are quite safe compared to global variables.
16:05:20
schweers
ogimata: or even if you are creating threads which start with a closure, and you think every one closes over a different variable, but they don’t ...
16:06:12
jackdaniel
schweers: lolol idiom: (let ((arg :something)) (lambda () (let ((arg arg)) ,@body))) gives you nice workaround for that
16:07:00
schweers
jackdaniel: I know, I ended up with something like that. You guys here helped me figure that one out, I’m still grateful for that :)
16:09:52
hectorhonn
but, one of the element, is an integer, which i want to convert to a date string
16:10:37
pfdietz
Converting an integer to a date string is a problem orthogonal to where that integer came from.
16:13:10
beach
hectorhonn: But, these are questions that are a bit to basic for #lisp. I suggest you ask them in #clschool instead.
16:14:03
pfdietz
(let ((x (list 1 2 3))) (let ((y (elt x 1))) (setf y 10) x)) ==> (1 2 3), not (10 2 3)
16:15:54
pfdietz
Often when these questions get asked, the hard part is figuring out what led to the question, not answering the question itself.
16:25:39
hectorhonn
(defun ff (list position function) (append (subseq list 0 position) (funcall function) (nth list position) (subseq list (1+ position))))
16:28:37
beach
Here is another (defun ff (list position function) (loop for element in list for i from 1 collect (if (= i position) (funcall function element) element)))
16:28:40
hectorhonn
hmm it says, ; Derived type of LIST is (VALUES SEQUENCE &OPTIONAL), conflicting with its asserted type UNSIGNED-BYTE.
16:29:06
pfdietz
The best solution, though, is seeing if one of the de facto standard libraries has a function that does what you want, and using that.
16:30:47
beach
hectorhonn: I don't usually write code using IRC, so I don't have the usual help from SLIME and the Common Lisp implementation.
16:37:47
hectorhonn
(defun ff (list position function) (append (subseq list 0 position) (list (funcall function (nth position list))) (subseq list (1+ position))))
16:39:48
hectorhonn
pfdietz: i looked in the CL quick reference but didn't find any.. might have missed it
18:03:10
jackdaniel
beach: this excerpt addresses this question: "the metaclass is changed from the standard generic function metaclass which in turn prevents certain optimizations, of the dynamic generic function dispatch, from being performed by the compiler." (part of comparison with inlined-generic-funcitons
18:07:20
pfdietz
This suggests that gf metaclasses need additional infrastructure to support these optimizations (perhaps in an implementation-dependent way).
19:18:33
jasom
fouric: late now I know, but the following should find symlink loops: find . -follow -printf ""
20:13:46
Younder
I say this in remembrance of Vladimir Voevodsky a brilliant mathematician who died before his time. This is his legacy.
20:15:53
Younder
Homtopy type theory, the univalent theorem and a program at Princeton Institute of Advanced Study for continuing it.
21:20:57
no-defun-allowed
Not in the standard but lparallel and Bordeaux threads are good starting points.
21:21:56
figurelisp
so when common lisp was popular people used these kind of libraries to handle concurrency?
21:24:37
no-defun-allowed
Well, probably not before the AI winter, concurrent machines probably had non-generic designs since those were expensive and new.
21:26:39
pfdietz
There's a common model of concurrency in CLs now, where special variables dynamically bound in a thread are thread local.
21:27:32
pfdietz
And I think there's de facto compatibility of the various thread primitives, at least through a compatibility layer?
21:33:10
figurelisp
I am still in my very early lisp phases. It was just that this question popped in my head