freenode/#lisp - IRC Chatlog
Search
11:35:53
shka
thodg: it is pretty cool and useful lib, but i need gray stream api, so i stick to flexi-streams
11:50:47
flip214_
In case anyone wants to know the details: the "hanging" socket was a _new_ one, as Firefox helpful retries the request when there's no useful answer. but when QUUX handler crashed, it would just be accepted and then linger around.
12:03:54
Shinmera
Modern browsers like to spam the shit out of servers with requests when one fails.
12:14:13
flip214_
now let's hope that the maintainers merge soon, so that the next QL release already has the fixes, so that I can remove my checkouts
12:47:36
flip214_
beach: you're listed as maintainer for alexandria... would you like to take a look at https://gitlab.common-lisp.net/alexandria/alexandria/merge_requests? A few doc changes with little risk.
13:23:27
MetaYan
beach: I keep getting 'Unknown &KEY argument: :WEAKNESS-MATTERS' when loading clim-listener (SBCL 1.4.4 on OSX); http://termbin.com/lipp (<- it almost got it right... ;)
13:34:01
phoe
https://github.com/trivial-garbage/trivial-garbage/blob/master/trivial-garbage.lisp#L203
13:36:06
phoe
because (trivial-garbage:make-weak-hash-table :weakness :key :weakness-matters :nil) works on my machine
13:43:53
AeroNotix
can someone make the argument for anaphoric macros to me? It seems like unnecessary magic to me
13:44:10
AeroNotix
I get that "omg so rad" but in reality (where most of us should reside) they're annoying and magic
13:46:58
AeroNotix
honestly they seem like one day someone, somewhere realised "huh, that's possible" and here we are
13:46:58
pjb
AeroNotix: I don't know about code. But if "it" exists in natural languages, it must serve some purpose!
13:47:49
AeroNotix
I speak with several people on a daily basis who have different native languages and you wouldn't believe how often anaphora cause issues
13:48:37
pjb
But in a way, references such as "it" will always add some ambiguity, since they're implicit references. Therefore this may be something you want to remove from code. But then, how much implicit referencing do you have in your code really? More than you think in general!
13:49:22
pjb
The thing with implicit vs explicit, is that implicit is something that is hidden thru abstraction. So the question is whether rendering the reference named by "it" implicit is a good abstraction or not.
13:50:18
AeroNotix
lots of editors won't realise that they should jump to the anaphoric macro if you're looking for where `it' is defined.
13:50:30
pjb
If your scope is small and well delimited (as it generally is with lisp macros), then it could work.
13:52:41
AeroNotix
that --map function should be named something which describes how to access the element currently being mapped
13:53:39
pjb
AeroNotix: you can make a good case for binding macros where the user specifies the variable instead of using it.
13:54:23
pjb
(binding-when (foo (expression) (print foo))) -> (let ((foo (expression))) (when foo (print foo)))
13:56:27
shka
Xach: compressing sparse data, works great! If only, i wish I could have grey stream interface for compressor
14:08:33
shka
Xach: not sure, It failed once i attempted to write-byte into their stream, not sure if implementation is incomplete, or it is not gray stream
14:10:40
_death
you should also know that the gray stream protocol is incomplete (it lacks a stream-file-length function)
14:25:47
shka
Xach: also, i spent quite some time yesterday to figure out why no library offers that
14:28:59
comborico
I'm reading Practical Common Lisp, and there is an oversight that I'd like to get straightened out. What is the apostrophe before the parens called, and what
14:30:58
pjb
comborico: you should note that actually, the lisp reader interprets most characters going thru a table, the *readtable* and calling functions named reader macros, that return the "read" sexp.
14:31:16
pjb
comborico: in the case of 'x what is actually returned by the reader macro, is (CL:QUOTE x)
14:32:28
comborico
Phoe, check for yourself. '( ) is first used in second link with function REMOVE-IF-NOT.
14:33:01
Shinmera
comborico: I'm quite sure he elaborate how it works and what it means. Maybe just be a bit more patient with the book. There's a good reason he does not delve into things that are rather complicated to explain too early.
14:33:13
pjb
comborico: for example, the reader macro for ( reads a list. If that list is empty as in ( ) or as we usually write: (), then it actually returns the symbol CL:NIL
14:34:22
phoe
comborico: in other words: (a b c) most likely means a function call, function A is called with the values of B and C as arguments.
14:34:24
pjb
this is different of nil, which when read in the CL package, reads directly CL:NIL, and when evaluated, returns its value, which happens to be CL:NIL itself, so that's also what's returned, but there's it's a more complex evaluation process, since we go look for the value of a variable here.
14:35:03
pjb
(eval '(a b c)) means that (a b c) will be interpreted by the evaluator as an operator application.
14:36:58
comborico
Shinmera, I'm one of those types that has a burning desire to understand each character in the code. And because technical writings are notorious for oversights and typos, I thought it best to understand quote before progressing.
14:37:33
phoe
"practical" chapters are code first. you first write code, then are expected to understand it.
14:38:00
phoe
so if you don't know what a thing is, relax and just roll with it. it'll be explained later.
14:38:54
pjb
But don't take it for godspel, the CLHS is the reference (apart from where it has bugs, such as prog2).
14:38:58
phoe
also what Xach said; I myself started with the book ANSI Common Lisp by Paul Graham, and I consider it decent for learning the basics of Lisp.
14:39:17
Shinmera
In other news, ELS registration is now done! It's not online yet, but hopefully (up to Didier) within a few days.
14:39:17
phoe
It also has a more theoretical approach up front, and doesn't throw you straight into application writing like PCL does.
14:40:00
phoe
It also has Paul Graham who has a few pretty damn controversial views on Lisp's various parts
14:40:26
phoe
but then again, you'll figure it out after just using enough Lisp and asking enough questions afterwards.
14:41:53
Shinmera
And: it's not too late yet to give me harsh, soul-crushing feedback about my paper submission. https://github.com/Shinmera/talks/blob/master/els2018-glsl-oop/paper.pdf
14:45:58
comborico
Gotcha. The "and" part threw me off, which isn't difficult to do in my learning condition
14:56:31
comborico
They have a reputation for being slow-moving and redundant, but I've found that style is the best for me.
14:57:37
comborico
schweers, in book recommendations, if the recommender was aware of my preference, it would greatly aid in a proper recommendation.
14:59:08
schweers
I see; I don’t have any recommendations for you, apart from PCL, but I can tell you that you might have a hard time with grahams books. On the other hand, at least On Lisp is not directed at the newcomer anyway.
14:59:19
comborico
Thanks for acknowledging what i said was true, by the way. (No mention of quote upon its first use)
15:00:03
pjb
comborico: perhaps you'll like: Common Lisp: A Gentle Introduction to Symbolic Computation http://www.cs.cmu.edu/~dst/LispBook/ http://www-cgi.cs.cmu.edu/afs/cs.cmu.edu/user/dst/www/LispBook/index.html
15:15:23
schweers
comborico: sorry, I just realized I misunderstood your question about “On Lisp”. Yes, I kind of like it, but it covers fairly advanced and is kinda weird.
15:20:08
MetaYan
phoe: trivial-garbage / trivial-garbage-20150113-git / quicklisp 2018-01-31 (was away from keyboard)
15:21:09
phoe
I have the same version and the :WEAKNESS-SOMETHING keyword is *not* passed to the CL:MAKE-HASH-TABLE.
15:22:24
comborico
Out of curiosity, for explicit calling of functions #'( ), I wonder why #( ) is not sufficient. In other words, I'm wondering why that quote is necessary.
15:25:31
phoe
#lisp is good for these questions as well, but it might be better to ask there if #lisp has traffic at the moment. and such times happen.
16:19:24
tazjin
are different quicklisp libraries allowed to have overlapping package names, as long as the system names are unique?
17:32:06
fe[nl]ix
tazjin: actually I misread that. it can happen and there are actually a few systems that offer simple compatibility for other libraries
18:29:50
inaimathi
Hello; I wrote a thing to give me some cross-implementation generic-function introspection https://github.com/inaimathi/cl-mop/pull/1/files
18:31:03
inaimathi
(Also, I've only got access to clisp, sbcl and ccl locally, so I'm hoping a Lispworks/Allegro/CMUCL user can give me a rundown on how to extend this for those lisps)
18:35:30
Bike
i don't know why you'd want these functions that operate on both methods and generic functions
18:36:00
Bike
since specializer-object only works on eql specializers, specializer-objects-of is not going to work on anything with any methods that have any specializers other than eql ones
18:40:08
inaimathi
It looks like `closer-mop` does the cross-platform imports I'm looking for here. Thanks!
18:41:32
inaimathi
(`specializer-object` works on anything; it returns the object of eql-specializers and the identity of other specializers (which should be a class reference))
18:45:14
makomo_
are there any other languages that have 2-argument versions of rounding functions such as FLOOR, CEILING, ROUND, etc.?
18:49:37
makomo_
excel also has a 2-argument version of CEILING for example, but the second argument is the "singificance" rather than the divisor
19:11:31
aeth
Other languages probably optimise floor(x/y) to do the same thing as (floor x y) in CL (assuming that / is defined similarly to CL's)... but most (all?) CLs don't optimize (floor (/ x y)) because (floor x y) exists.
19:12:41
aeth
what's great, though, is that (1) it's explicit and (2) you have plenty of options (floor, ffloor, ceiling, fceiling, truncate, ftruncate, round, fround)
19:14:24
pjb
And that they return 2 values, so you don't need to call two functions to get the quotient and the remainder.
19:15:52
aeth
But if you do want just the latter, you have both mod and rem available, which is rare. Check out the table to see comparable languages: https://en.wikipedia.org/wiki/Modulo_operation#Remainder_calculation_for_the_modulo_operation
20:26:00
jasom
ooh, this is interesting, cxml with klacks does it wrong, but cxml with sax does it right...
20:51:49
Bike
Is an implementation allowed to define documentation for things automatically if the user doesn't?
20:52:12
Bike
like for example, (defun foo (a b) ...), and then (documentation 'foo 'function) => "Function FOO (a b)" or something.
20:55:04
phoe
An implementation may drop docstrings at any time... but the spec is silent about the implementation *supplying* them at any time.
20:56:34
phoe
I believe that your implementation may call #'(SETF DOCUMENTATION) as a part of its DEFUN, DEFVAR, DEFGENERIC, ... with default values if no user-provided value is specified.
20:57:22
phoe
the accessor itself might decide to resort to some kind of default value when there is no user-specified documentation set.
20:59:05
jasom
Xach: here's a pie-in-the-sky feature request: a single command to generate a diff from what is currently in the directory for a project from what QL would put there if downloading it fresh
20:59:54
pjb
For used defined objects, I feel that if the user didn't specify a documentation then documentation should return nil.
21:02:01
jasom
Bike: usually implementations show what you suggest with DESCRIBE not with DOCUMENTATION
21:03:01
Bike
whether i can avoid having another slot in the environment by putting it in the docstring instead
21:27:09
combo1611
Having troubles installing Alegro CL on Ubuntu. bunzip2 is loaded and is extracting, but even with sudo, I am getting mkdir permission denied error.
21:33:36
phoe
combo1611: you should ask on the Franz support forums. #lisp@freenode is mostly about FOSS Lisp implementations.
21:36:55
combo1611
Oh, I'm not sure I even want Alegro, then. I'll search this FOSS term, thank you.
21:38:26
phoe
Steel Bank Common Lisp, a Common Lisp implementation that is open source and put in the public domain.
21:44:29
aeth
I would recommend trying SBCL, CCL, and ECL in that order, which is also the order of popularity on Quicklisp when you skip CLISP (no stable release in nearly 8 years!), ABCL (the JVM is in its own world), and the commercial implementations (LispWorks and Allegro). http://blog.quicklisp.org/2018/02/quicklisp-implementation-stats-for-2017.html
21:49:00
Shinmera
I own a root server, which is set up with several lxc containers. But this is getting offtopic.
21:55:57
combo1611
Nermind, I think that is a silly question. I guess I'm just thrown off by the newest version not available for Debian.
22:05:28
aeth
in 1.4.3: "bug fix: fixed heap exhaustion bug when consing millions of small objects" <- I think I might have encountered this before
22:09:11
phoe
If you're already an emacs user, then you might prefer to set up your own environment from bits and pieces.
22:12:51
combo1611
Mmm, I'll probably stick with the method in Practical CL -- besides the Allegro part.
22:13:46
combo1611
phoe: I see. That does sound like a nice download to have all that. Very helpful.
22:13:56
Shinmera
if I remember correctly PCL wants you to use lispbox, which is outdated and has been superseded by Portacle
22:31:50
combo1611
Dang! What a slick install Portacle was. SBCL was also very easy. Bravo CL community.
22:33:30
combo1611
Installs have always been tough for me. I'm starting to get the hang of tarballs.
22:35:38
whoman
sometimes it feels that the software we made to help us version stuff is when versioning became a problem
23:11:36
dTal
the JS people probably talk on some flashy web-based thing that uses 80% of your CPU and will be broken in 6 months
23:13:34
dTal
the idea that javascript, an admittedly impressive 3-week hack from someone who was told "Java" and wanted "Scheme", could actually be a serious programming language decades later, is a sign of computing culture's completely bankrupt engineering philosophy
23:14:28
jmercouris
I think we should encourage off topic conversation, it's part of keeping the community healthy and alive
23:15:10
dTal
remember when we all collectively regarded javascript accurately? When we are all like "oh, that warty language that runs in web browsers"? Remember that?
23:17:10
jmercouris
also programming the way we know it, interactively, is I guess much newer- to be fair
23:17:11
learning
plus you got 75% of people who will say two lines are the same length if everyone else does first. and those 75% of people will defend bad design.
23:17:25
dTal
Or rather, history is filled with languages that, while not perfect, were clearly on the right track, and were then completely abandoned
23:18:10
learning
if you released a program that had a UI as bad as programming no one would use your program
23:18:39
pjb
jmercouris: sure, theres even a day of the year for her: https://www.daysoftheyear.com/days/ada-lovelace-day/
23:19:53
dTal
the trouble is that the computing world does not regard ergonomics a top priority, and programming barely regards it at all
23:20:33
dTal
hell, Python invented the revolutionary idea that maybe a language shouldn't totally suck to use, and look at it now even though it's slow and warty and unprincipled
23:22:16
learning
you can do it lisp, but we dont. for good reasons, but you can't discount the value of familarity and simplicity in python
23:22:20
dTal
now Python pisses me off tremendously but it's almost always the path of least resistance
23:22:20
pjb
Indeed, you'd go at least as far as Basic to find a language that sucks as much as Python.
23:22:22
whoman
about "nerds make the coolest shit" - no one is selling that. just saying that if you want ergo, pay money
23:23:07
dTal
Python sucks and does not suck. You have to admit it does something right, or it would not be so popular.
23:23:22
pjb
But it wasn't worth the pain to make a new language and a whole new ecosystem to such that much really! What a shame. Even Ruby which sucks a lot, sucks way less than Python!
23:23:26
whoman
video games arent exactly "the coolest shiz" after reaching a certain level of maturity
23:23:36
learning
well i think part of being a lisper is looking at other languages for inspriation because you know you can do it in yours
23:24:34
whoman
in bible times babylon worshipped 'baal' aka "the lord of the flies" because their "sacrifices" (garbage) would be accepted based on flies/maggots/etc
23:25:11
whoman
observing the last couple of months, i think lisp promotes being social, at least online. i dont think that is a "problem
23:25:21
pjb
Those languages, ruby, python, clojures, etc, are just me-too languages that have had success.
23:25:52
whoman
the more "ego-centric" or "ego-filled" languages are easier for the flies to be attracted to and identify with.
23:26:39
dTal
whoman: social in the sense of talking about Lisp, but not neccesarily in the sense of writing code that works together
23:27:45
dTal
A big problem in the programming language world is how fans of a language embrace their chosen language's shitty parts in a tribalistic way
23:28:45
pjb
Not at a given time. But this may be the number programmer who have used lisp seriously at one time or another.
23:29:10
whoman
for myself personally, i like to draw the parallel of the meditating and chanting monks of the world -- compared to 'regular' people -- righteousness is more concentrated or whatever, but i like to think it holds up the world.
23:29:10
dTal
For example APL variants should be vastly more influential than they are. They aren't because APL fans are addicted to unreadable syntax. It makes them feel clever.
23:30:06
pillton
The biggest problem in the programming language world is that the runtime environments don't compose. This causes this conversation to occur over and over again.
23:30:10
pjb
However unicode should help APL, recentering on the glyp-based notation. J was really to wild for me. :-)
23:30:11
whoman
dTal: people get that way with spoken language too. i see it often, where a person excludes themselves further from their immediate family/neighborhood/culture by using more private and meaningful-only-to-me language