freenode/lisp - IRC Chatlog
Search
20:05:40
butterthebuddha
Shinmera: yeah that's kind of my Q haha - why do I ever want to do '(+ 1 2)
20:06:03
butterthebuddha
dlowe: Yep, I'm aware of using '(...) for literal lists. I was wondering if quoting a form is ever useful though
20:06:05
Shinmera
butterthebuddha: I don't know. You might want to save forms for evaluation at a later point.
20:06:37
Shinmera
There are legitimate reasons to want to quote code and evaluate it at another time.
20:07:25
Shinmera
For example in a test framework you might want a macro that saves the original form-- both to display it when a failure occurs or when the test is run, and to possibly sidestep compilation errors until test evaluation.
20:08:51
Shinmera
You might also be implementing some special purpose language that happens to use s expressions as its code format, in which case '(+ 1 2) would be a natural way of writing a program in that language.
20:15:29
butterthebuddha
I'm actually kind of excited to get to macros; they sound like they're super powerful
20:18:40
pjb
(defmacro if* (test then &optional else) `(if-fun ,test (lambda () ,then) (lambda () ,else)))
20:19:31
pjb
(defun if-fun (test then else) (funcall (aref (vector else then) (get (not test) 'bit))))\
20:19:35
aeth
`(+ 1 2 ,foo) is used more in practice than '(+ 1 2) afaik... especially in CL macros.
20:26:34
pjb
If you implemented it in lambda-calculus, you could attach a selector function (car or cdr) to each lisp value. You'd just call: (funcall (selector test) (cons then else)). The macro is only useful to avoid evaluating the other branch.
21:16:18
phoe
it can't become any more dead than what it's been proclaimed for the past twenty years I think
21:16:51
jasom
I have now created 2685 nix expressions from the quicklisp repository; there's another ~1300 or so systems that ql2nix could not process. I plan to publish it later tonight.
22:41:34
axion
Whats a good way to get a CL array from a binary file on disk, bypassing all the streaming? only interested in the full array for a small file.
22:42:29
Bike
well, there will still be a stream, but you can just use with-open-file and read-sequence and it's only a few lines.
22:45:05
antoszka
Rosetta Code has a rather canonical take on this: https://rosettacode.org/wiki/Read_entire_file#Common_Lisp
22:48:16
Bike
yeah, that just means you don't need to worry about de/encoding. a blessing if there ever was one.
23:07:07
BitPuffin
does common lisp have a function like ormap in racket? By default in the standard (it can obviously be easily defined)
0:24:41
jasom
Xach: any chance of switching the quicklisp database from md5 to something newer? It doesn't appear to be used anywhere, and it would save me some small amount of work in ql2nix, since md5 is no longer allowed for verification of downloads in nix.
0:26:40
jasom
Xach: here's my current workaround; an awk script that calculates sha256 sums for each package: http://paste.lisp.org/+7L8Q
0:28:10
jasom
Xach: I then overwrite releases.txt and rebuild the cdb... nothing broke, and it met me use those sums in my script
0:47:54
slyrus
Fare: yeah, I know people _used_ to use it. But it seems like some things are broken now and I'm wondering if it's just me.
0:48:36
slyrus
I put closure-common up the sharplisper's github page. maybe we need to do the same for cxml and cxml-rng.
0:49:56
Fare
the following projects were unresponsive and had no github repo: bknr-web cl-blapack cxml-rng jwacs madeira-port org-sampler s-dot
0:52:21
Fare
if sharplispers take over some or all of these projects, I'll gladly send a PR. Or I can put the diffs in a repo of its own.
0:56:29
Fare
I decided to jump ship from CL. Too many things I missed from a modern Lisp. And those things I miss from CL (mainly, CLOS), I can reimplement on top of Gerbil when the time comes.
1:00:39
axion
Fare: Does that mean Racket was not as good as your recent post suggested? I've never heard of Gerbil.
1:07:24
Fare
2- it does implement a variant of the Racket module system, the most valuable part of Racket.
1:07:44
Fare
3- though it has fewer libraries, they are more consistent, being implemented by one man
1:08:06
Fare
4- it sits on top of Gambit, which is efficient and very suited to backend work, like I do
1:08:22
axion
Yeah. I actually spent a week learning Racket after reading your post, and I found it a little too complex for my liking.
1:09:42
Fare
5- Gambit has a very portable VM, the GVM, that provides interruptability and observability at the GVM level, abstracting away what's below. Which means that to achieve observability for the entire system (which would yield Erlang-style killability, among other things), I "only" have to work on top of the GVM, not down to assembly level. That's a big win for my future plans.
1:10:31
Fare
whoman: can they kill their actors? I seriously doubt they can, or with big unenforceable restrictions
1:19:35
axion
3.1.5 is pretty much unusable for large directory trees, taking longer than I could care to wait, compared to about a second for CL-FAD
1:41:11
White_Flame
Xach: had talked about moving an executable image to another box, and continuing to run quicklisp there. Now, consider if there is no QL installation on that box, what will need to be done?
1:42:15
White_Flame
our model is to drop a binary onto a machine and go, but now with certain things needing more stuff out of quicklisp, there is no preexisting lisp or ql environment there at all for it to go from
1:43:38
White_Flame
yes, but then it's going to want to load new systems after launching the binary on a different box
1:44:21
White_Flame
I'm already using an executable. QL needs to load systems after that executable is deployed
1:52:56
aeth
pillton: I'm a big language proponent. So the language vs. library distinction will be different for me than for some.
2:06:20
aeth
whoman: You can deduce things from axioms, and you can establish things statistically. Good luck doing either in software engineering, though, if that's what you mean.
3:13:07
vtomole
wow top post: https://news.ycombinator.com/ maybe people are interested in lisp more than i thought ;)
3:50:19
axion
Does anyone know anyone else besides attila that maintains alexandria? Looks like he hasn't been on IRC in several weeks.
3:52:30
axion
ROTATE mentions that it returns a sequence of the same type, which to me implies that it does an implicit copy. It doesn't mention anything about destructive behavior. However (let ((x "hello")) (list x (alexandria:rotate x -1))) => ("elloh" "elloh"). I'm not sure what to make of that, heh.
4:15:58
White_Flame
what's the idiomatic way to invoke a function from a package that wasn't available at read-time? (eval (read-from-string "(foo:bar 1 2 3)")) ?
4:19:01
loke
If EVAL is part of the proposed solution, that solution is very likely wrong. Not guaranteed, but very likely.
4:29:49
White_Flame
yeah, eval is the most compact for specifying the package:symbol directly, but if you need to pass params it gets messy
4:31:01
beach
By doing find-package and find-symbol, you can probably emit better error messages as well.
4:32:01
White_Flame
eh, I think symbol-not-found conditions would be relatively similar in either, for this case
4:54:47
fiddlerwoaroof
where alist-plist is a function that turns an a-list into a p-list (e.g. ALEXANDRIA:ALIST-PLIST)
4:59:35
shka_
(reduce (lambda (prev next) (cons (car next) (cons (cdr next) prev))) '((a . b) (c . d)) :initial-value nil)
4:59:41
borei
(loop for arg in '((:width . 100) (:hight . 100)) collect (car arg) collect (cdr arg))
5:00:23
fiddlerwoaroof
vtomole: in what context? (return-from 'function-name) would work, if it's in the body of a function
5:00:39
loke
H4ns: My judgment is clouded by the fact that the APPEND solution is mine, so I will not argue that.
5:48:44
fiddlerwoaroof
H4ns: when writing my own json serializers, I'm I supposed to specialize YASON:ENCODE + YASON:ENCODE-SLOTS?
5:54:06
fiddlerwoaroof
It would be nice if YASON:ENCODE had a default method that just called YASON:ENCODE-OBJECT
7:14:07
jasom
someone Fare? was asking about my ql2nix script. It needs a lot of cleanup, but here it is in all of its ugliness: https://github.com/jasom/ql2nix
7:16:49
jasom
Fare: oh, I want to hear more about safe killing of actors; that's generally not possible without a lot of restrictions