freenode/lisp - IRC Chatlog
Search
21:40:59
aeth
The furthest mainstream languages are probably C++ or Java in terms of OOP with the object system being incompatible with CL's, while being very massive so compatibility would be a lot of work. A lot of these other "far" languages can be (and sometimes have been) implemented in CL.
21:41:58
aeth
jcowan: Well, yes, I mean in the sense that both CL and C++/Java are "OOP" languages, but only if you use different definitions of OOP.
21:42:35
aeth
They don't just have incompatible object systems, they have incompatible definitions of OOP.
22:25:35
jcowan
I remember an OO system in Prolog where the objects are theories (collections of predicates)
22:26:11
jcowan
the subtheory could add its rules to the supertheory's rules for a given predicate, or only add whole predicates
23:14:41
stylewarning
Hey Lisp folks. Just wanted to advertise the sale of my Lisp machines. Thanks! http://watrophy.com/files/lispm/lisp-sale.html
23:59:43
lxbarbosa
for Lispers that know enough of Haskell, does it offers singular features that Lispers "must know about"? I mean, Lisp has a lot of interesting points that I did not see in .NET/Python, and I want to learn new paradigms and perspectives.
0:00:48
lxbarbosa
Ive read that Haskell is way different of mainstream language but not that different of Lisp
0:03:34
Bike
"must know about" sounds like some kind of weird fad advertisement so i'm not going to say that
0:11:52
lxbarbosa
no-defun-allowed: https://www.reddit.com/r/LispMemes/comments/fq4q2g/i_made_this_for_my_friend_and_thought_i_should/?utm_source=share&utm_medium=web2x
0:12:38
stylewarning
lxbarbosa: I think understanding strictly typed parametric polymorphism and how lazy evaluation affects API boundaries is important
0:14:00
lxbarbosa
stylewarning: hm, cool. I hope there are epub Haskell books, not in the mood of touching lately :D
0:31:22
loli
lxbarbosa: there are tools lisp could easily steal, ADTS are an example (and thus deriving functions over this structure)
0:32:06
loli
probably stealing effect systems would be nice. Though they are quite primitive in Haskell
0:40:33
White_Flame
stylewarning: please try to sell the keyboards to people with a lispm that need one
0:46:30
loli
lxbarbosa: you will! I find it's a nice language, though beware you might just taking harder languages like Coq or F*
3:20:10
sjl
When using &key (foo some-form foo-supplied?) in a destructuring-bind, shouldn't foo-supplied be bound to true if :foo is given in the call and false otherwise?
3:20:21
sjl
like, what am I missing here? https://paste.stevelosh.com/7c301026ece2efc869e5ce253f5ff56f98bbf307
3:23:28
Bike
it uses sb-int:binding* which can bind multiple values, and uses multiple values for the variables
3:23:33
sjl
yeah, it works properly in vanilla lambda lists -- only seems to be an issue in destructuring-bind
8:18:21
amazoniantoad
Hey guys. I'm trying to take two columns and generate a matrix from their multiplication. Could anyone show me how to do this? Currently I'm trying to do (elt (elt matrix i) j) and using setf to set the value. But instead of getting unique values for every cell I wind up getting the exact same row in the matrix
8:19:04
no-defun-allowed
Why are you using an array of arrays? Common Lisp has n-dimensional arrays.
8:19:34
no-defun-allowed
And are you talking about matrix multiplication, element-wise multiplication, or...?
8:21:32
no-defun-allowed
How do you get a 2D array from two 1D arrays? Something like O_i,j = M_i × N_j?
8:24:08
no-defun-allowed
Well, to make a 2 dimensional array, you can use (make-array (list columns rows)), and then (setf (aref <array> column row) value) to set an element of that array.
8:27:26
no-defun-allowed
(Using Petalisp, you could write (defun cross-multiply (a b) (petalisp:α #'* (petalisp:reshape a (petalisp:τ (i) (i 0))) (petalisp:reshape b (petalisp:τ (j) (0 j))))). I don't think Common Lisp is very nice for doing n-dimensional array work without some helper functions.)
8:29:14
phoe
I don't think amazoniantoad is a possible client for petalisp if he's still working on getting the basics of 2D arrays done - maybe in a few months, but not yet
8:29:45
no-defun-allowed
Writing a step between a JIT-compiling parallel array manipulation DSL and using big loops of (setf aref) is left to the reader.
8:46:08
no-defun-allowed
amazoniantoad: "element-wise" would probably refer to O_i = M_i + N_i, if I'm not mistaken.
8:56:37
pjb
Well, you can also use (map 'vector (lambda (x) (map 'vector (lambda (y) (* x y)) v2)) v1) which should be more efficient allocating temp storage, but still O(m*n) temp space.