freenode/lisp - IRC Chatlog
Search
0:02:08
no-defun-allowed
there's some ML libraries in CL without C, I am finishing up a deep network library with Petalisp, and GPU programming can be done in "Lisp" using oclcl
0:02:30
aeth
Isn't ML just essentially running CUDA or OpenCL (nothing to do with CL as in Common Lisp) or similar?
0:03:27
aeth
I'd be interested in seeing a proper abstraction over SPIR-V so Lisp-like GPU-oriented languages can compile down to it.
0:05:50
no-defun-allowed
yeah, but most people abstract the GPU (or TPU i guess?) as a machine that does matrix multiplication and element-wise sigmoids, adds and multiplies
0:06:03
verisimilitude
That would be amusing, at the least, using a Lisp for that idiotic idea of ``machine learning'', when it's more suited to proper symbolic manipulation.
0:07:12
no-defun-allowed
indeed, but symbol manipulation doesn't make much sense in a high performance matrix library, and you can't get the kids hooked on calculating derivatives unfortunately unless they're maxima users
0:07:39
no-defun-allowed
well, the IR is SSA like LLVM which isn't very lispy (i have a library that converts trees to LLVM IR/SSA for that reason)
0:07:49
no-defun-allowed
https://www.khronos.org/registry/spir-v/papers/WhitePaper.pdf may be of interest?
0:09:16
aeth
no-defun-allowed: In CL, you have far more abstractions available to you than in most other languages for dealing with things like e.g. GPU shaders. This is because you can transform arbitrary s-expressions into just about anything you want. Other approaches would probably be string-to-string or heavily object-oriented (not too unlike a database ORM) or similar messes.
0:09:38
aeth
verisimilitude: Common Lisp has been an acceptable FORTRAN for years at this point, especially SBCL. It's not just symbolic.
0:14:09
aeth
Bike: At the moment, most SPIR-V tools are LLVM and/or C++ oriented. Targeting SPIR-V properly from CL involves a lot more than e.g. targeting GLSL properly (really, that can just be generating a valid source string). Just look at https://www.khronos.org/spir/ and then https://www.khronos.org/assets/uploads/apis/2018-spir-api-ecosystem.jpg
0:21:41
aeth
verisimilitude: The way you harmonize symbolic behavior with numeric behavior is by writing some pretty low level CL. (SBCL works pretty well with the structs-of-arrays low-level pattern, and nothing is stopping other implementations from similarly optimizing.) You then abstract over these low-level details, including via macros, getting something pretty high level, as if you wrote your own programming language to solve the problem.
0:22:08
aeth
Not really a particularly good solution for ML in particular, though, because afaik serious ML is done on GPUs, so you'd need to write your own GPU-mini-Lisp.
0:23:05
no-defun-allowed
though, i wonder how hard writing a petalisp backend is, probably too hard for me, but running it on a GPU should be possible i think if you can copy over all the GPU-used functions too
0:27:35
aeth
You wouldn't want to put a proper Lisp on the GPU because proper GPU programming is all about knowing when to do things on the CPU and when to do things on the CPU. Implementing it as a DSL in CL means you can do all the macros, list processing (probably for the macros), etc., on the CPU in CL.
0:28:06
no-defun-allowed
of course, i'm suggesting a backend for a matrix processing library that offloads work to the GPU
0:28:36
aeth
I'm not sure about GPU compute, but GPU graphics shaders definitely have a "program" metaphor that imo is unnecessary. Why not just define-shader-function etc.?
0:31:47
aeth
The whole thing is structured for familiarity for C programmers, but it's pretty far from PDP-11 so it's imo pretty weird imo to see things like a main()
0:39:58
no-defun-allowed
makes the C++ people feel fuzzy inside, and makes the interface fuzzy for everyone else
0:40:59
aeth
More "UNIX philosophy" than C++. It's pretending you're doing something Unixy with independent programs like: head -n 42 foo.txt | grep bar
0:48:48
aeth
GLSL for GPU shaders is kind of strange. Every shader stage has its own main() but then you link them. But you'd just get a multiple main()s issue if you tried that with GCC and C... so it's inconsistent in its C-like behavior. Shaders aren't programs!
0:49:50
aeth
tsizz: Common Lisp is mostly compatible with the historic Lisps, so it seems more archaic than Scheme, which broke compatibility with historic Lisps and even itself.
0:51:26
aeth
tsizz: Common Lisp is a primarily a replacement for Maclisp and Interlisp, which predate Scheme, and Lisp Machine Lisp, which apparently came out in the same year as Scheme. See the timeline at https://en.wikipedia.org/wiki/Maclisp#History
0:56:03
aeth
tsizz: Newer is definitely always better for programming languages... because that way you can't use anyone else's code and have to write all of the key libraries yourself!
0:58:38
tsizz
aeth: since ur saying that tho, i feel like current languages do have way better support, but im not sure
0:59:26
aeth
tsizz: Current languages? Most new languages either have nothing or they're backed by Google, Apple, Microsoft, etc. Many are built on the JVM so they can just use Java libraries.
1:00:59
aeth
JavaScript has a ton of libraries because its bar for "library" is much lower. A single function can be a library in JS land.
1:02:23
aeth
(Okay, CL has one popular library that comes close to that: split-sequence, but it's very non-trivial and it has three functions.)
1:08:14
verisimilitude
Common Lisp wasn't designed in a week and wasn't designed solely by people who had no place designing a language.
1:08:40
verisimilitude
Not counting Ada revisions, I'm not aware of a single new language that is worthwhile.
1:14:57
aeth
verisimilitude: The ML family of languages (and influenced languages like Haskell) have some interesting ideas. There are also some specific language features that might be interesting, such as async.
1:17:23
aeth
Looks like Standard ML is 1983 so it predates CL by a year, though. Haskell is 1990, OCaml is 1996.
1:20:04
aeth
Another language of potential interest for proglang design features is Erlang (1986). I'm probably missing a few more, but quite a few interesting languages are pre-1984 languages.
1:21:16
aeth
The 1990s were mostly about web-oriented Unix scripting languages... exactly the sort of thing you'd probably not call interesting, e.g. most of the ones here: https://en.wikipedia.org/wiki/History_of_programming_languages#1990s:_the_Internet_age
1:22:57
aeth
verisimilitude: Just looking at that history page... Forth is 1970, APL is 1962, Smalltalk is 1972, Prolog is 1972, SQL is 1978... all of which might be interesting even to a CL programmer. I was trying to exclude languages that weren't "new", relatively speaking.
1:25:21
aeth
Julia seems to be the only really new (released this decade, specifically in 2012) major language that interests Lispers.
1:26:37
aeth
I don't really see what others seem to see in it, though. It's dynamically typed but the fast numerical code that does well in benchmarks uses type declarations... exactly like SBCL.
2:04:43
Hexstream
Check out the Common Lispers list! Discover Common Lisp open-source contributors and their best contributions! Add yourself! Gone are the days of toiling in obscurity, now everyone has a chance! We're ushering in a new era of unprecedented discoverability!
2:22:31
pjb
Once we've done (ql-dist:install-dist "http://dist.ultralisp.org/" :prompt nil), how can we select it as default distribution for ql:quickload?
2:51:24
Hexstream
The "barren" setting is a planned feature, but unfortunately won't happen soon. My version has always contained 148 "RS" links to easily get to the corresponding section in Robert Strandh's more barren version.
3:57:14
patrixl
I'm trying to use cl-sqlite on my Mac, as part of using Radiance. So Radiance + cl-sqlite needs regex support in sqlite, which is fine I can install it, however.....
3:57:38
patrixl
so I installed one with brew which supports it, and compiled regex support for that one and it works
3:58:02
patrixl
but it seems like cl-sqlite still uses the default sqlite and not the one compiled with brew. Not sure if I can somehow make it use the newer one?
3:58:20
patrixl
hopefully someone here has similar experience and can help... otherwise I'll have to dig in and figure it out ;)
4:00:31
patrixl
right, well as far as I can see, cl-sqlite is usinf cffi, so I would assume that it would need to find the correct libraries when cl-sqlite is being compiled?
4:00:59
jackdaniel
Hexstream: is there exclusion policy? while I appreciate the effort I have mixed feelings about such data aggregation and public release without my consent
4:05:23
patrixl
ok let me try to clear the cache ,and try what brew is suggesting, see if cl-sqlite can find the correct libs this time
4:05:47
patrixl
if not, then you would recommend adding brew's sqlite lib path to cffi:*foreign-library-directories*?
4:10:08
patrixl
yeah!!! now I am actually hitting bugs in Radiance, so at least I can move forward lol
4:11:10
Josh_2
anyone know how to send a mouse click event with Xlib? am using (xlib:send-event :pointer-window :button-press 256 :display display) but I get no-applicable-method :O
4:36:44
equwal
Is is possible to have an immutable variable? So (and (setf *five* 5) (setf *five* 6)) will give an error? I can make immutable structures with defstruct, but I can't store them.
5:12:51
pjb
equwal: well, defconstant defines a constant variable, which is a variable with a constant binding. However this constant binding can be made to a mutable object!
5:13:15
pjb
equwal: (defconstant +cell+ (cons nil nil)) (setf (car +cell+) 42) +cell+ #| --> (42) |#
5:14:09
stylewarning
Coalton now has basic pattern matching. (Not as expressive as a full fledged ML or Haskell but it’s getting there.) https://github.com/stylewarning/coalton/blob/master/src/library.lisp
5:44:50
stylewarning
it's better to just design an API that discourages mutability, e.g. by making copies, not exposing accessors, etc.
6:18:50
MichaelRaskin
beach: well, if I were _not_ coming it would mean I managed to get a committment to Lisp out of my coauthor. Which would also be great.
6:19:20
Josh_2
beach: it is send event I have (xlib:send-event :pointer-window :button-press 256 :display display) but that is very much not working
6:22:08
MichaelRaskin
beach: a PhD student here in Munich, he was given some projects about verifying mutex algorithms in various settings, and I had some code for playing with first order proofs, and so we decided to start with having a formal spec and a formal proof (and gradually reducing the part of proof we do manually)
7:29:47
gilberth
I was watching my tongue as I said to myself 'what' and some German words like "Wasser", "Wand", "war" etc. And I feel the difference.
9:46:34
moldybits
is there a reason you can't (push 1 (last x)) where x is a list? other than the standard not saying you should be able to.
9:50:26
moldybits
right, i just wondered if there was a particular reason for that being that case :o
10:02:13
MichaelRaskin
Indeed, both the case of empty list and the case of setting non-list are a bit undesirable
10:02:17
_death
it would also not do for (single-element), since it would need to change the binding of X so that it be (1 single-element).. (cdr (last x 2)) can work in other cases
10:02:19
no-defun-allowed
yeah, to replace the last cons in a list, you would need to back up a cons if the list has conses before it, or replace the variable if there is only one cons
10:03:45
phoe
because the compiler would have to figure out that the place for (last x) in this case would be the variable binding
10:04:01
phoe
and I don't think the compiler has the ability to know that at compile-time, especially if X is not constant but provided at run-time
10:04:18
phoe
so it has no idea whether it will have to set a CDR of some cons or if it will have to modify a variable binding
10:06:50
phoe
you'd need to close over the variable I guess, and, at runtime, check if you need to setq that variable or if you need to setf some cdr
10:15:41
vms14
wanted to ask, Why quicklisp stills being beta if it's used even in production stuff?
10:22:32
MichaelRaskin
vms14: what observable decisions are you going to make based on this information?
10:36:21
trafaret1
just wondering about is there tool for linux by which I can manager packages like ranger?