libera/#commonlisp - IRC Chatlog
Search
16:06:00
Guest63
https://www.reddit.com/r/lisp/comments/o5bqb6/lispers_active_anywhere_else_with_a_better/
16:09:58
jackdaniel
logging is one thing, but irc discussions are more or less ephemeral anyway (without any organization)
16:10:09
pjb
Perhaps you could manage a nntp server with some authentication to avoid spammers and we could restore the glory of past comp.lang.lisp?
16:10:44
jackdaniel
i.e if I had answered to what Bike said a week ago I doubt that will be intelligible
16:12:00
Guest63
(I may be wrong since I don't use mailing lists) but the issue with mailing lists / IRC is discoverability
16:14:42
Guest63
beach: honestly I don't know. I just used forums for other things and prefer them to reddit
16:15:57
Guest63
Projects would be better on GitHub Issues / GitLab, Q&A would be better on Stack Overflow, Chat / Quick responses would be better on IRC, memes on Reddit --> So I don't know
16:16:28
jackdaniel
that said I think that old forums were much more useful than facebook, reddit and other attention-seeking platforms
16:17:03
Guest63
_death: indeed :) Which is a scary thing (except SO, I think that one is safe for now)
16:17:05
jackdaniel
(i.e they didn't try to addict you to use them; many smart people work on that shameful practice)
16:17:38
edgar-rft
I'd say that not finding answers in mailing lists is a poverty of Google, not a bad thing of mailing lists
16:17:44
Guest63
jackdaniel: thanks, that's basically where I"m coming from - there always going to be a bit of attention seeking / blog posts / news etc, and a forum is better for those imo
16:18:38
jackdaniel
that said, mailing lists are quite good for discussions (when you have a topic to discuss - compared to posting cat pictures ;)
16:19:01
_death
you could also blog using mailing lists.. I'm thinking of the old kragen-thoughts list
16:22:01
pjb
Guest63: you can make your mail list discoverable, by puting their archives on the wbe.
16:25:38
Guest63
pjb: I'm waiting for lisp programmers to be in short demand, then I will get a professional job writing lisp :)
16:25:38
pjb
Guest63: but you'd definitely need to filter it, given the number of spammers and idiots who broke it.
16:27:10
pjb
Also, libera has a new rule: Nickname and account registrations expire ten weeks after they are last used. So you can expect me to not come back after my next holidays.
17:56:17
jcowan
on SBCL exts: this problem really bites in Scheme, because people get used to using non-portable stuff because they need to, and when some portable API comes along they don't switch to it. And of course the ANS is much larger than any Scheme standard hitherto
18:23:07
phantomics
Is there a reason (gcd) and (lcm) don't work with ratios? Writing a version that works with ratios simple - multiply both by the product of denominators, take the gcd/lcm of the result and divide the result by the denominator product. Is there a gotcha I'm missing?
18:25:47
Bike
what is the definition of gcd and lcm on ratios? i've always understood them as integer operations
18:33:33
Bike
what you describe seems wrong even if we extend the definition to be the largest ratio that divides the inputs
18:33:40
susam
phantomics: As per your definition gcd(1/2, 1/6) = 1/6. Right? After multiplying by the product of denominators, we get 6, 2. Their gcd is 2. Then 2/12 = 1/6. But gcd(1/2, 1/6) = 1/6 does not make sense. Why 1/6? What is special about 1/6? Why couldn't the answer be 1/2 or 1/4 or some other fraction?
18:35:55
susam
I mean, we need to first define divisibility for fractions in a sensible manner. Otherwise it would appear that every fraction divides every fraction. Given p/q and r/s, surely (p/q)/(r/s) is another fraction.
18:37:05
susam
For integers, divisibility is neatly defined. d divides n if there is an integer c such that n = cd.
18:39:16
susam
Bike: in that case 1/24 does not divide 1/18 because the quotient is (1/18)/(1/24) = 24/18 = 4/3, not an integer.
18:44:12
phantomics
APLs allow for gcd and lcf of fractions (most implementations only have floats, not ratios), 1/36 is also given as the result by Dyalog and GNU APL
18:45:01
susam
Yes, with the definition that p/q divides r/s if r/s = c(p/q) for some integer c, I think it will work.
18:46:28
Quasus
if a ring happens to be a field, then everything (except zero) divides everything, as susam notes
18:48:40
Quasus
"d divides n if there is an integer c such that n = cd" doesn't work in general, e. g. for polynomials; sure we'd like x + 1 to divide (x + 1)(x + 2)
18:49:45
phantomics
Guest63: When will you know the dimensions? This sounds like a hash table not array
18:50:35
Guest63
Actually that's a good idea, I was trying to create attribute1 x attribute2 array, but I can just do (attribute1 . attribute2) as a key to the hash table!
18:59:03
Josh_2
I came up with a good (maybe) use for MOP, defining categories of 'hooks' into my system where the class is the category and each slot is an individual 'hook' that is executed, and then args to each hook are defined in the class definition. Although I guess this would mean I couldn't easily add new hooks without changing the class definition
19:00:31
susam
phantomics: So stated concisely, gcd(p/q, r/s) is defined to be gcd(ps, rq)/qs. It is a reasonable definition for the expressed intention.
19:00:58
susam
phantomics: By the way, do you come across any practical usefulness for such a gcd definition?
19:07:37
phantomics
Also http://dfns.dyalog.com/c_rational.htm which they use to convert float to rational
19:09:17
entre-parenteses
Is anyone aware of any work being done to (eventually) have an implementation target WebAssembly? I know it's not completely possible, yet, due to lack of certain features in WebAssembly - i.e. GC is the main one that comes to mind - but I'm curious if anyone knows of any work being done along those lines.
19:12:28
Bike
clasp uses llvm so webassembly isn't that far off, but putting a several-hundred-megabyte lisp image into a webpage seems kind of silly
19:13:38
entre-parenteses
Bike: Yeah, I looked a bit into ECL, so far, but I haven't made it very far with that.
19:19:03
phantomics
Would make sense for a locally-hosted Lisp environment interfaced through the browser, it could talk to remote Lisps
19:26:14
entre-parenteses
_death: That's right! I came across it a few months ago (but forgot about it). If nothing else it could be a good jumping-off point.
20:14:32
phantomics
Here's some discussion about wasm/CL concerns: http://article.gmane.org/gmane.lisp.steel-bank.devel/19495
20:24:10
rdrg109
[Q] newbie here. Just as I can create tests for Emacs packages through the ert package. Is there any widely used package for testing Common Lisp modules?
21:01:56
entre-parenteses
phantomics: Thanks for the reference! I'm having trouble accessing the gmane.org article but I'm reading through the PR comments - hopefully that covers most of what's discussed.
21:56:03
sm2n
kind of late and Guest63 seems to have gone, but for posterity—SO is bigco now as well, it got bought out recently
22:00:42
rdrg109
I'm gonna put it clearer: I've recently installed Quicklisp and the documentation mentions that to install a package, you need to execute (ql:quickload system-name), but before doing that I would like to know the docstring of ql:quickload to understand what it does
22:01:59
sm2n
there are many ways to do it, but easiest is probably C-c I #'ql:quickload to open it in the slime inspector
22:17:28
rdrg109
[Q] Thanks for the help! All of them worked. Another quesstion: Let's say I install a package with (ql:quickload "package-name") How to list all the functions that are defined by a given package?
22:19:22
Bike
(loop for s being the symbols of "package" when (fboundp s) collect s else if (fboundp `(setf ,s)) collect `(setf ,s))
22:19:51
Bike
a given quicklisp system may have any number of packages, and the names of any packages defined don't have to coincide with the name of the system
22:20:03
_death
(package-name: C-c C-i ... you could also use lisp's introspective capabilities.. (remove-if #'fboundp (apropos-list "" "PACKAGE-NAME")) ;; homework: write a better apropos
22:37:02
rdrg109
[Q] I'm using SBCL + Emacs Slime, is it possible to get the list of all existing/loaded functions?
22:40:02
phoe
loop over all packages, loop over all external symbols of a package, collect that symbol if it is fboundp and does not name a macro and does not name a special operator
23:06:34
Bike
you probably don't even want all the external symbols, unless you're really interested in sbcl compiler internals
23:09:08
White_Flame
rdrg109: tab completion is much more useful than a massive list of thousands of things
23:10:02
White_Flame
you can do sb-ext:<Tab> to see all the exported symbols in a package, for instance.
23:10:25
White_Flame
and then search that list however you want, or from whatever prefix you tab from to pare it down
23:23:15
jasom
On Firefox it's 2 minutes before it prints "Startup completed" and a total of about 5 before you get a REPL.
23:25:34
jasom
about 3 years ago I said I'd profile the doppio JVM to see where the hot-spots are... yeah I didn't do that
23:29:46
jasom
Naive (doubly recursive) fibonacci of 20 takes ~2 seconds on Doppio/Chrome vs 11ms on the native JVM
23:30:43
jasom
My new plan: convince the "Must Rewrite Everything In Rust" brigade to make a JVM in rust, and compile *that* to wasm.
0:51:14
Bike
in that case it needs to be accepted asn an initarg to the direct slot definition class, and you'll probably need to specialize compute-effective-slot-definition to get the information into the effective slot definition as well
0:54:07
Bike
here's the basics. a direct slot definition is the particular slot definition for a class - with no inherited information. the direct slot definition is constructed by, essentially, (apply #'make-instance [slightly-modified-slot-specification])
0:54:25
Bike
so if you want to have a slot (foo :initarg :foo :mykeyword baz) you need make-instance to understand :mykeyword
0:55:06
Bike
Which you can do either by adding a slot to your direct slot definition class, or by specializing one of the instance initialization methods - so basically the same as for any old class
0:55:23
Bike
Next, the system will compute an effective slot definition - this is the definition incorporating inherited information
0:56:17
Bike
For that to work with your new information, you will have to define a method on compute-effective-slot-definition that figures out how to merge the information from all of the direct slot definitions, and puts that in the effective slot object
0:57:37
Bike
I linked it the other day, but you can see an example of this in cl-jupyter, which adds a :trait keyword
0:58:07
Bike
you can see the slot definition classes that are defined, as well as methods on effective-slot-definition-class, compute-effective-slot-definition, and direct-slot-definition-class
1:13:00
kakuhen
I did the mistake of trying out qtools on a Mac and pulled in two dozen dependencies that I don't use or need
1:15:11
Bike
Josh_2: Say you have (defclass foop () ((%bar :initarg :bar :type integer))) (defclass fooc (foop) ((%bar :type fixnum)))
1:15:29
Bike
Josh_2: there's a direct slot for the %bar in foop, and a different direct slot for the %bar in fooc
1:15:58
Bike
Josh_2: Then, an effective slot for fooc has the information from both - initarg :bar, type fixnum
1:19:27
Bike
The inheritance can get complicated if there are multiple superclasses, or depending on the information
1:19:47
Josh_2
So if I want subclasses of classes defined with my superclass then I need an effective slot as well as a direct slot
1:20:01
_death
kakuhen: nope.. looking at the uninstall code it does delete some text files and the local archive, but I never did that
1:30:23
Josh_2
Okay, I am getting an error saying there is no application method for generic function sb-mop:slot-definition-allocation when called with <my direct slot>