freenode/#lisp - IRC Chatlog
Search
10:38:21
jackdaniel
I see some [] which are not valid common lisp as well as various indentation and naming problems
10:38:39
jackdaniel
if I had to guess, I'd say it is not Common Lisp either way (even if it is not scala)
10:38:59
DonVlad
Well I tried to copy as much as possible Common Lisp but still add my own unique features, but it's lisp...
10:40:47
jackdaniel
if something is an atom in non-functional position, then it is not a function (unless it is lisp-1, which Common Lisp is not)
12:30:56
shka_
is there standard or de facto standard function for comparing floating point numbers?
12:36:04
shka_
i know that, it would be silly though if I was doing this while alexandria already has function for that
12:37:52
shka_
pjb: true, but i just need to compare floats in unit test, so I will just that since i know precision beforehand
13:04:39
dim
SBCL through buildapp gives me Fatal SIMPLE-ERROR: Compilation failed: PGLOADER.COPY also uses the following packages: (PGLOADER.PGSQL) ; CCL says nothing about it, and SBCL in SLIME loads pgloader just fine
13:05:23
phoe
In the new definition, you do not use the PGLOADER.SQL package, but it was used in the previous definition.
13:07:55
dim
I have a source type that's named after the PostgreSQL COPY format, and also a CL implementation of the COPY protocol with error handling
13:12:18
dim
https://github.com/dimitri/pgloader/blob/master/src/package.lisp --- improvements ideas welcome of course
13:28:14
borodust
hmm, i generally should be able to load systems via asdf while being in other packages rather than :cl-user, right?
13:29:46
borodust
on sbcl 1.4.0 i'm getting rather weird behavior: if i'm in package that doesn't import anything (not even :cl), asdf fails to load some files that contains macros and at the top of the file i use 'in-package
13:30:07
borodust
when i change 'in-package to 'cl:in-package (fully qualified symbol name) it works correctly
13:31:16
borodust
so, generally, speaking, i always should use cl:in-package rather than in-package, correct?
13:33:18
pjb
papachan: in lisp you can interpret a form, only knowing whether the symbols are macros or functions!
13:34:22
pjb
papachan: if all your first symbols are fbound to functions, then (modulus (! (1- (length seq)))) means call the function LENGTH in the value of the variable SEQ, then call the function 1- on the result, then call the function ! on the result, then call the function modulus on the result.
13:34:43
pjb
papachan: but if one of those symbols is bound to a macro, then we can only interpret the subexpressions depending on the macros!
13:39:03
pjb
papachan: now, what function is called depend, and can be mostly determined only at run-time.
13:39:16
pjb
papachan: if length is CL:LENGTH, then it's the length function defined in the hyperspec.
13:39:50
pjb
papachan: otherwise, if a function with the same name is defined in the same compilation unit (basically the same file), then it can be this exact same function. (perhaps even inlined).
13:40:32
pjb
for functions in the same compilation unit, it is assuming it is not declaimed notinline. If declaimed notinline, then it's determined at run-time.
13:47:20
dim
hehe, I was supposed to spend some days in the Bordeaux area this week… it's a 3h ride train away…
13:51:25
beach
rme: My favorite coauthor is very likely coming to my house for lunch on Wednesday. Would you care to join us?
13:56:21
beach
We typically eat soon after 12, but you can come early if you would like to hang out.
14:21:30
beach
It is in Marbella in Spain, yes. But there will be lots more and lots cooler people there.
14:29:32
flip214
phoe: again, this SETF depends on the value *package* when it is called, not _where_ it is called from.
14:30:40
flip214
during runtime *package* won't tell you which function/package/system/library etc. the caller comes from.
14:31:10
flip214
you could use TRIVIAL-BACKTRACE and look at the package of the function symbol in the parent frame, though.
14:40:20
phoe
As long as a) someone writes a new standard, b) it gains enough popularity and adoption.
14:42:25
Shinmera
CL happened because several big players decided they /wanted/ to collaborate and implement a common lisp
14:42:45
jmercouris
Are Common Lisp companies today relatively more poor, or more wealthy than in the past?
14:42:48
phoe
The language defined by it is extensible enough to not need new standards. Usually new standards happen when some new syntax is needed.
14:42:59
jmercouris
I'm leaning towards more poor since it seems there would not be momentum or money to redefine the standard
14:43:24
jmercouris
phoe: Yeah, definitely, I remember the first time I asked about this beach explained it so
14:44:17
jmercouris
and now we have lots of lisp packages that are incompatible with different implementations :D
14:44:32
jmercouris
is this becuase of edge cases, or incomplete implementations, or because of implementation specific features?
14:45:23
jmercouris
so basically, the standard should probably be expanded, but it is too expensive to do so?
14:46:11
phoe
Shinmera: people come and go, and all people who encounter Lisp have two questions, eventually
14:47:37
jmercouris
if you are annoyed by the repetitiveness of questions, why not make an extension to your chatbot that persists this conversation and reproduces it when it gets brought up again
14:49:02
Shinmera
Look man I've done this dance. People aren't happy with the answers we give them. It always devolves into an endless, tedious argument about nothing that wastes everyone's time.
14:50:43
phoe
someone write a blog post related to 2) that describes everything that could be described
14:51:34
fe[nl]ix
nydel: you can use this script to setup the libfixposix repository and install it: https://github.com/sionescu/iolib/blob/master/install-repo.bash
14:55:32
loke
Could anyone try to git clone maxima from this addres for me? It hangs when I try and I want to know if it's just me:
14:58:18
easye
loke: sf.net was "upgrading servers" in the past couple days from what I ambiently inferred.
15:01:46
easye
ACTION still updates the MacPorts math/maxima/Portfile every time he updates lang/sbcl
15:02:07
loke
I consider my workstations (usually 3 differnt machines) to be my backups, so I only use a single remote repository (usually github, but also a personal server as well as Keybase)
15:03:54
easye
<https://git.code.sf.net/p/maxima/code> --> 2018-02-24 15:03:32 ERROR 404: Not Found.
15:22:34
borodust
is there a way to force all those symbols generated to be in a certain package? is switching in and out of a package with in-package the only solution?
15:23:10
Bike
defstruct makes symbols based on the value of *package* when the defstruct is expanded
15:23:42
borodust
yup, when you include it takes all parent slots and generates accessors for them :|
15:25:07
Shinmera
You can copy the fdefinition over to your preferred symbol and fmakunbound the old ones.
15:59:19
pjb
It shows you that you perfectly control where defstruct makes symbols, based on the value of *package*, including the :include generated symbols, as Bike said.
16:03:03
borodust
turning everything into class is possible, but i prefere less radical ways if possible :)
16:03:27
borodust
if you are interested, here's the form in question: https://github.com/rpav/cl-autowrap/blob/master/autowrap/sffi.lisp#L1015-L1022
16:27:41
borodust
oh, heh, adding in-package form helped (not gonna use this approach anyway, just an experiment)
16:33:43
borodust
actually, i would, but that would be inserted and inverted in the different place, sorry ;p
16:41:57
loke
Nouv: All CL's are pretty much the same in terms of what they support. They all implement the same satndard.
16:48:09
fourier
Nouv: there are some differences between implementation - compilation time, included features/additional APIs which are not in standard etc; sbcl though looks the most popular implementation nowadays
16:52:19
Nouv
I don't know what to search for though, like common lisp api doesn't show anything relevant, sbcl documentation shows me mostly differences between sbcl and the standard
16:53:19
phoe
If you open CLHS, there are dictionary pages that list all symbols relevant to that dictionary's topic.
16:54:02
whoman
Nouv: true.. what about 'common lisp tutorials'? i found that gigamonkeys helped me the most.
17:11:32
rumbler31
Nouv: when you are in your repl, (apropos "thing") will show you all symbols, functions, and things with that name
17:11:50
rumbler31
so if you want to explore a library or your own code, you can discover what has been loaded into the image
18:43:23
Xach
Shinmera: your export of FORMATTER causes clashes in cepl, because it has (:use :cl :documentation-utils) and there's a clash with formatter. Do you feel like this is something to fix on the cepl side?
19:09:53
Xach
stylewarning: fyi: https://bitbucket.org/tarballs_are_good/algebraic-data-library/issues/1/undefined-function-nul-problem
19:26:04
Xach
i wonder if it would be advisable to have poison pill symbols exported from packages not meant to be inherited
19:30:21
Bike
if you shadow it you can't write in that package without a redefinition tho. better pick something more useless... /// say
19:37:42
stacksmith
Greetings. Is there a clever idiom for not expanding a symbol if its value is null inside a quasiquote, but skipping it altogether? Or do I need to abandon quasiquote and build a list by hand?
19:38:44
Bike
`(a ,@(when whatever (list whatever)) b) = (append '(a) (when whatever (list whatever)) '(b))
19:40:01
phoe
inside a backquote, if foo is null, it will disappear; otherwise, it'll be spliced into the list.
19:40:32
phoe
you can add your own conditionals by replacing FOO with (BAR-P FOO) for any BAR-P of your liking.
19:47:00
drmeister
What latex fonts/emphasis are acceptable for software names like SLIME, Clasp, SBCL, Jupyter for ELS submissions?
19:48:49
phoe
I only was advised by beach to annotate them with hyperlinks to websites that annotate these softwares.
19:55:36
aeth
It's otherwise impossible to tell the content of a YouTube link before clicking, which is a huge problem.
19:56:01
whoman
phoe your red flag should go up when someone unfamiliar joins and instantly posts a youtube link
19:58:03
whoman
pjb: just wanted to ask, whats your most 'proud' code on your repo? i want to browse and be inspired, vicariously
19:58:41
whoman
aeth: oh so was the time of plato, aristotle, ... wearing togas and chiseling some pillars
19:58:47
pjb
whoman: well, there are several parts. It would depend on what you're looking for. You may have a look at the cl-stepper.
19:59:49
pjb
Yeah, when you start receiving advertisements in your dreams, it really deteriorates from then.
20:02:55
whoman
hm whats all this code for anyway, pjb is it just libs of all your stuff for things ?
20:10:29
aeth
Heavy duty? Meanwhile, I don't even have a presentable file in my code. I'll have nice, clean code for the first 1/3 or 1/2 and then messy ugly hacks written years ago in the bottom half.
20:29:18
comborico1611
Is a property list considered a hash table? If not, what feature is it missing to make it so?
20:30:27
comborico1611
I suppose I never got that far into hashes, then. I was only aware of the keyword-value relationship, not anything other than that. Thank you.
20:30:47
aeth
whoman: ((foo = 1/3) or (foo = 1/2)) and ((1 - foo) = 1/2) => (foo = 1/2); no logical contradiction.
20:32:45
aeth
There are three things that roughly do the same thing. plist, alist, and hash-table. plists and alists are very similar (just different ways of handling the same concept in a list form), but hash-tables are a proper data structure of their own, not made up of conses like the list-based ones.
20:34:18
Shinmera
aeth: Colleen can do title lookup for URLs automatically, but I don't know if this channel would like that.
20:34:59
_death
doubt it's a good idea.. many of the links are clhs links where the title is also provided
20:35:34
aeth
alists are ((key-1 . value-1) (key-2 . value-2) ...) and plists are (:key-1 value-1 :key-2 value-2 ...) and hash tables use some unknown, implementation-specific data format that is probably more efficient for large number of items. How large that number of items is varies. It could be 5 or so. It could be dozens. It depends on the implementation.
20:36:33
aeth
It might also depend on the access pattern. Maybe alists or plists will always be more efficient than hash-tables' maphash if you're just iterating over them. You'd have to benchmark.
20:38:25
aeth
Shinmera: I agree with _death. Although it could still be useful just for places with ambiguous URLs like YouTube. There are lots of on-topic Lisp videos on YouTube that I wouldn't click on because I simply don't know what that video is.
21:47:42
borei
if i want to force compiler to use integer of fixed size will it be correct form - (integer 0 16) - im expecting that var will be unsigend integer with max 2^^16 -1 ?
21:50:31
dim
it's possible to provide one's own read table, with some tweaking, and implement the *quote* nil behaviour from before
22:03:42
dim
(or (find-symbol "MAKE-DEFAULT-CSV-READER" pkg) (find-symbol "MAKE-DEFAULT-CSV-DISPATCH-TABLE" pkg)) ; I don't much like having to do that
22:09:37
dim
so I need to either call (cl-csv:read-csv stream :table ...) or (cl-csv:read-csv stream :csv-reader ...), so now I have that test too
22:12:57
dim
because I don't know when current git is going to make it to QL, and I'm already bitten by the problem in my dev environment (which I could fix, but) and I don't want pgloader users to have to deal with anything like that