libera/#commonlisp - IRC Chatlog
Search
9:30:22
asarch
Yeah, it works: '(:tacos 1 :pizza 3 :beer 4 :tacos 4 :ramen 4 :taquitos 1 :tacotes 4)
9:37:04
hayley
https://plover.com/~mjd/misc/hbaker-archive/letters/CACM-RelationalDatabases.html provides some reasons, which I would summarise as that 1. the relational theory didn't come first and 2. joins are messier than pointers at times.
9:38:02
hayley
Personally, I prefer that good programs are based around protocols of functions, whereas SQL has no such concept and is only concerned with storing homogenous rows. This is called the "object-relational impedance mismatch". Some people use it to claim object-oriented programming is bad, but I use it to claim that relational databases are bad.
9:39:33
pjb
lisp has not. lambda was just a keyword, when he introduced it, JMC didn't understand lambda-calculus.
9:39:56
hayley
That doesn't change that doing things in SQL or Haskell can get very hairy if you're not doing "the right things".
9:42:41
hayley
I wonder if https://counterexamples.org/ has any bugs in Haskell. Some Haskell examples, sure, but I can't remember if there are bugs.
9:49:02
pjb
moon-child: sql a une base mathématique solide. haskell a une base mathématique solide.
9:50:11
pjb
The point is that because you're have a good mathematical model doesn't mean that you have a practical system. The universe is still messy.
9:52:04
tfb
pjb: and if you try and program in a version of lambda calculus which *does* make sense mathematically, but leave out all the stuff you actually need, you rapidly find out how little the good mathematical underpinnings actually help you
9:53:53
moon-child
pjb: that doesn't explain anything. What does it _mean_ to have a solid mathematical base? I can model lisp, c, sql, haskell... in a mathematical fashion. So what distinction are you trying to draw?
10:19:24
tfeb
moon-child: it should mean among other things there is a consistent model which would le you predict the behaviour of a program (modulo halting problem etc)
10:19:42
hayley
Is a mathematical specification any better than any other specification in this regard?
10:21:05
hayley
https://plover.com/~mjd/misc/hbaker-archive/MetaCircular.html "we believe that a carefully fashioned system of metacircular definitions can achieve most of the precision of denotational semantics."
10:21:17
kakuhen
suppose I have a restart-case that skips executing some pure function entirely, but I do not want to abort evaluation; does it matter if I make this restart return t or nil?
10:22:39
kakuhen
basically, I have a macro that can add a key to an alist, but I want to avoid duplicate keys in the alist, so I signal a duplicate-key condition when someone attempts to insert a key that already exists
10:22:51
hayley
From memory, the RESTART-CASE evaluates to whatever the last form in the restart clause is. So it should return something that makes sense for the operation.
10:23:06
kakuhen
there are two restarts I have: one just deletes the key and its values entirely, and another one just "does nothing" and it's intended for when the user wants to cancel redefining the key
10:23:59
kakuhen
oh and to clarify, the former restart deletes the already existing key and then inserts what would've been a duplicate key
10:25:48
kakuhen
if i want to return t, it's probably more meaningful to return the original alist anyway
10:27:00
hayley
Well, if you have a pure function, then you are going to return the modified alist, right?
10:55:21
lisp123
If i want to learn to write more efficient search & loop algorithms in Lisp, am I better off learning SICP or an algorithm book (e.g. the design and analysis of computer programs - which was recommended here and I'm starting to read)
10:56:24
lisp123
I assume an algorithm book is better, but perhaps SICP will make me better and is more applicable to Lisp?
11:17:17
lisp123
OK - chapter 1 of 'The Design and Analysis of Computer Algorithms' was pretty dry and felt too out of the way, but chapter 2 is looking _good_ and very useful. So I will do this book first and not SICP
11:18:48
pjb
moon-child: Well, basically what it means is that the "sound mathematical models" are simplistic, while the real-life mathematical models are too complex to handle efficiently or cost-effectively. Yes, indeed, you could formalize complex systems. But it's difficult, and once you've integrated into the mathemacal model all the complexities, you're not any more advanced (you have to switch to physics, biology, or "computer science").
11:19:51
hayley
I'd say I just drew up a state machine for what I considered to be a subtle module, but it is fairly simple on paper.
11:46:15
etimmons
Xach: when is the next QL release? It looks like we're going to release ASDF/UIOP v3.3.6 to prevent that error you found from happening in most circumstances
11:56:43
pl
for writing efficient algorithm, in lisp or otherwise, an algorithm book and detailed specs for implementation and language (CLHS/WSCL) are the go to
14:20:38
jcowan
This Lisper doesn't hate SQL because it's relational, but because it is not relational enough, being full of gaps, unorthogonal, and plagued with things that look relational but make no sense.
14:49:38
aeth
SQL is relational... with a bunch of compromises for real-world performance and usability
14:50:02
aeth
Lisp is functional programming with similar compromises, to the point where many don't even call it FP anymore
15:12:02
jcowan
Yes? What's so efficient about the result of SELECT SUM(price) where product_name = "nonexistent"?
15:16:10
jackdaniel
ACTION gives in to wondering whether the cave empty of dragons is the same the cave empty of knights
15:27:00
jcowan
Admittedly you probably need to take further steps before sending an invoice to the customer demanding a payment of $0.00.
15:30:23
raeda
Taking further steps is still a tall order for most places. I got a bill for $0 a few days ago :p
15:56:01
jcowan
I'd actually rather have a recurring bill for $0 than wonder if the bill got lost in the (e)mail.
16:56:04
jackdaniel
right now the eastern front is stuck, however we make some small progress on the center, under the proud banner "clhs liberation front"
16:59:40
jackdaniel
nij-: clhs won't be "liberated"; its clearly stated by the copyright holder; scymtym started a repository for wscl here: https://github.com/s-expressionists/wscl and new clarifications happen from time to time
17:09:28
nij-
jackdaniel: By liberating clhs I mean to work on DPANS (https://github.com/xach/dpans) and create "another" CLHS.
17:10:35
Josh_2
nij-: I think there have been many attempts to create a new hyperspec, or a complimentary one at least
17:10:49
nij-
Oh wow, seems like some movement has been 'ROLLING! https://github.com/s-expressionists/dpans
17:19:29
phantomics
Hi, a question: is there a way to find out if a symbol is lexically bound? For example: (let ((abc 1)) (lex-boundp 'abc)) => T
17:20:10
Bike
No. I mean, whether it's bound should be obvious from the source code. What are you trying to do? Something in a macro?
17:21:27
jackdaniel
phantomics: lexical variables may be optimized away by the compiler, so there is not even a guarantee that they will be stored (unportably) in the environment
17:21:36
phantomics
Yes, a macro that creates functions that can be used to set a variable value outside of a given scope, this is for output from the April compiler so there are constraints that I wouldn't normally have
17:23:28
jackdaniel
(but during macroexpansion time lexical variables should be accessible in the env)
17:24:46
jackdaniel
yes, and code walkers easily break (because of impementation-specific special forms)
17:25:54
phantomics
In APL you have the ability to either create a local alias of an external variable to a function (changeable without side-effects) or to write a side-effecting statement that changes a variable external to a function, I'm figuring out how to support both of these cases
17:26:06
jackdaniel
phantomics: i.e try this: (defmacro foobar (&body body &environment env) (print env))
20:56:22
recordgroovy
To go against email scrapers on the GitHub... I see no reason why this *can't* be done, right?
21:02:39
_death
interestingly, the glossary entry for "single escape" says "(In the standard readtable, slash is the only single escape.)".. but it's not slash, but backslash (2.1.4.6 has it right)
21:04:30
recordgroovy
I'm targeting it to be readable by humans and asdf, but not by generic scrapers.
21:04:46
recordgroovy
Enough backslashes would make it readable by asdf, but probably not humans without good effort
21:06:12
specbot
Single Escape Character: http://www.lispworks.com/reference/HyperSpec/Body/02_adf.htm
21:09:26
tfeb
ACTION is now planning a tool which will convert code with string literals into code which uses load-time-value in ... interesting ways