freenode/lisp - IRC Chatlog
Search
11:25:55
flip214
for the lisp-to-fpga people around here: http://zipcpu.com/blog/2017/06/12/minimizing-luts.html
11:26:12
flip214
would be interesting to know what kind of optimizations the translator already does
11:28:53
Cymew
Anyone know how planet lisp works? There seems to be very much about postgresql lately.
11:38:16
jackdaniel
I don't know exact details, but yes, it can subscribe to some specific tags on the blog
11:40:49
flip214
Bike: there was "VeriLisp: turns Common Lisp into a frontend to Verilog." but it seems dead now.
11:43:29
_user
seems nobody is on the clnoobs channel, so I I ask here, any good reccomendations on how to properly learn lisp, I've started with the practical common lisp book, but it has gone too deep too fast
11:43:50
minion
gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
11:44:50
Bike
flip214: if you're targeting verilog your optimization options are limited to expanding your high level constructs into verilog constructs appropriate for whatever combination of synthesizer you're using, i would think
11:45:36
_user
Bike: thanks for the reccomendation, I'd already come across that book, but I had dismissed it due to its age
11:46:01
Bike
as far as i remember there's some stuff that's not the best style now, but it should all basically work
11:56:48
flip214
Bike: yes, of course. I don't know about any other way to have Lisp as high-level language for FPGAs, though.
12:03:06
Bike
the only high level hw design things i'm aware of also output verilog. there's lots of vendor secrecy
12:07:04
Bike
it's pretty annoying since, as you can see in that post, a lot of the lower optimization seems to be reconstructing high level blocks from the sequential logic that nobody actually wants to write anyway
13:05:29
attila_lendvai
slick FPGA's, with competition among hw manufacturers, and good highlevel compilers would be a big liberation to computing
13:10:39
TeMPOraL
sure you won't fab a new 3GHz CPU, but maybe fabbing something that used to be commercially valuable in the 90s?
13:13:46
Bike
a MOS successor opened their micrometer fab in the nineties, but they got shut down by the EPA on account of being an environmental disaster
13:14:08
Bike
maybe there are similar companies except for the last part. but then, fpgas are usually for super high performance crap anyway
15:14:41
Grue``
paule32: src3 is a list, src2 is a string, you need to join src3 back to string to be able to compare them
15:22:45
Reinisch
hi paule32, that error message seems like it's saying, "you gave me the list ("something") instead of a string "something""
15:24:18
Reinisch
you could use (car '("mouse")) or (first '("mouse")) to get "mouse" from '("mouse")
16:58:52
Shinmera
In an ASDF system definition, how would I make a file in a module depend on a file outside of the module? as in, :coponents ((:module "foo" :components ((:file "bar" :depends-on ("baz")))) (:file "baz"))
17:00:42
jackdaniel
you have to make a separate module for file baz (you can provide pathname for module I think)
17:01:09
jackdaniel
(:module "bam" :pathname "bu" :components ((:file "baz"))) and then depend on "bam"
17:02:19
Shinmera
That doesn't work either. From the source code it seems like find-component only ever searches within the current parent of a component and not any higher up.
17:08:14
jackdaniel
for non-sibling dependencies you'd have to provide method for asdf:find-component indeed
17:09:43
jackdaniel
ah, if you don't want to, then you are out of luck, because imagine situation, where you have non-sibling dependency on "baz", but you have file "baz" at two different nodes (modules)
17:13:12
Shinmera
Here we go: (defmethod asdf/find-component:resolve-dependency-combination (component (combinator (eql :parent)) args) (asdf/find-component:resolve-dependency-spec (asdf:component-parent component) args))
17:24:43
paule32
Reinisch: thank you, now i am motivated to implement new free lisp derivate based on clisp
17:42:12
gigamonkey
I feel like this was discussed on comp.lang.lisp a long time ago but Google isn't helping me find it but is there some history about why CL:AND and CL:OR don't pass through multiple values?
17:49:20
aeth
"and passes back multiple values from the last subform but not from subforms other than the last."
17:49:26
gigamonkey
But OR doesn't, which I guess could be explained by the need to cons to save possible multiple values.
17:50:17
Bike
huh, OR specifically says if it hits the last form it does return all values, but otherwise it only returns the one, that's a bit confusing (i mean, makes perfect sense, just hard to explain)
18:02:08
shka_
is there common lisp equivalent of https://www.postgresql.org/docs/9.0/static/plpython.html ?
19:22:36
dim
nowadays we have background workers so the main CL kernel could be started on the side, and then triggers could execute in a “private” CL thread, if that's meaningful
19:23:40
dim
even better would be to expose PostgreSQL C internals too so that you could prototype core code and extensions in CL ;-)
21:14:22
s3a
Hello, everyone. :) In Common Lisp, using the time macro ( http://clhs.lisp.se/Body/m_time.htm ), it seems that this higher-order function ( http://dpaste.com/2FJADD5 ) is faster than this non-higher-order (recursive) function ( http://dpaste.com/0XJ5820 ). Why is that? Doesn't the higher-order function also (implicitly) use recursion?
21:40:25
phoe
Common Lisp is iterative and not recursive by default, which might be surprising at first, especially compared to Schemes or Clojure.
21:41:03
phoe
CL is not required to optimize tail calls and some implementations explicitly won't do it, either always, or in some situations like compiling functions with high debug values.
21:41:57
phoe
you can try compiling the second function with (declare (optimize (speed 3) (safety 1) (debug 0))) on a decently optimizing implementation like SBCL and tell me if it becomes any faster.
22:07:39
s3a
phoe, why isn't the non-higher-order function ( http://dpaste.com/0XJ5820 ) not tail recursive?
22:10:12
phoe
https://stackoverflow.com/questions/33923/what-is-tail-recursion seems like a good SO answer
22:11:17
phoe
basically - if function FOO is meant to be tail-recursive, then its return value must be either something that does not involve FOO, or a direct call to FOO with different arguments
22:20:20
s3a
phoe, Okay, so the non-higher-order function will bind stack frames for each element of the list, and the higher-order function will instead deal with its computation in an iterative manner. That's the answer to my question? So, would the non-higher-order one have no optimizations whatsoever? How would the optimized version of the higher-order function look, approximately or exactly?
22:30:59
Bike
sbcl is just what i happen to have open, i would be surprised if clisp was any different
22:32:44
phoe
AFAIK, apply #'+ will pass control to #'+ which accepts a variable amount of arguments anyway, so what Bike said, yes.
22:34:48
phoe
you can substitute (incf acc elt) with something like (setf acc (funcall fun acc elt)) where FUN is your higher order function
22:46:37
phoe
(loop with acc = 0 ...) <- here you have a variable ACC that is initialized to 0 in the beginning.
22:47:24
s3a
yes. it's just that the functional/functional-like paradigm messes with my mind since i'm still new to this
22:47:36
phoe
also, you do not need to (setf acc (incf x acc)) - INCF is a destructive macro, it modifies the place passed to it as its first element.
22:49:27
s3a
what's DSL, though? I'm assuming it's not dick-sucking lips as urban dictionary says, lol.
22:52:58
Bike
s3a: it's nothing to do with functional programming really, the loop increment version is the same idea as you'd do writing it in java