libera/#commonlisp - IRC Chatlog
Search
20:19:57
rumbler31
day 4 part 2. the wording isn't clear but I think they are trying to say that there must be at least one pair that is only a pair, even if there are other matching digits of any length
20:24:08
nirved
looks quite clear to me: counting the repeating element, matching if there's a pair, ignoring otherwise
20:28:06
nirved
a more convolved solution would be to first transform the number to a run-length encoded sequence - i.e. list of (digit repetitions), and work on it
20:44:33
pjb
When you use the loop return, it doesn't execute the finally: (loop return 42 finally (return 33)) #| --> 42 |#
21:00:19
Josh_2
hmm, so I have a problem. I have a thread that is constantly listening for connections, accepting and processing them. How can I kill this thread without ending up with the "address-in-use" error when I attempt to restart the thread on the same ip and port?
21:32:51
Josh_2
usocket:socket-listen has both :reuseaddress and :reuse-address for some reason, but had them both set to t to no avail. Instead I just put the currently listening connection into my server object so I can shut it down when I shut down the server
22:43:52
aeth
no-defun-allowed: your 2-based indices are an interesting solution to the 0-based vs. 1-based controversy in computing
22:44:22
no-defun-allowed
aeth: 0 and 1 are both radical extremists, the true solution is for 1/2 to be the starting index for an array.
22:44:47
no-defun-allowed
And it's not like anything other than Matlab and Maxima use 1-based indexing.
22:44:56
aeth
no-defun-allowed: I like starting at -1 so you have a spare item in front just in case you want to use it.
22:45:41
aeth
no-defun-allowed: Quite a few things use 1-based, as diverse as Fortran (iirc) and Lua.
22:46:48
aeth
no-defun-allowed: If someone wrote your scientific computation program in 1974 and then retired in 1981 and died in 1987, who would dare touch it to try to rewrite it?
22:47:54
pfdietz
A lot of old COBOL is being slowly GCed as the companies running the programs eventually die. This can take a while.
22:51:43
edgar-rft
Lestat9: when microsoft started in a garage they didn't have enough money for Lisp, so they bought DOS instead
22:52:34
no-defun-allowed
ACTION would say mulisp is a Lisp implementation by Microsoft but it is not Common Lisp
22:53:06
Lestat9
I was teethed on a commodore 64 and in 1984 IBM didnt even have color yet so commodore4 was king...
22:53:50
Lestat9
I talked to a girl i dated back then and she reminded me she met me on my BBS i ran on my C64, and jokingly said that was the first internet... and then ui realized it was
23:17:07
jmercouris
how much do you have to change a block of code before it is no longer copyrightable?
23:17:31
jmercouris
I know this is a legal question, but there's a snippet in my codebase that no longer resembles the original implementation, is that still under copywrite?
23:17:55
grobe0ba
jmercouris: afaik, any modifications YOU make are your IP, and thus copyrightable by you.
23:18:30
pjb
jmercouris: the technical term is derived work. Notice how you can take a book, change every sentences of it, and still get a derived work. For example, when translating.
23:18:44
duuqnd
I mean, it's technically probably maybe still owned by the author but if it doesn't even resemble the original you're probably safe as long as you don't tell anyone.
23:19:03
pjb
jmercouris: so even if you rewrite the whole software, even in a different language for a different system, you could still fall under the derived work category and own all your profit to the original author.
23:20:03
jmercouris
I'll just leave the copyright notice in anyways, even though it does not seem relevant anymore
4:42:53
p0a
https://www.common-lisp.net/project/slime/doc/html/Evaluation.html#Evaluation says C-x C-e but it's not working
4:44:24
p0a
thanks for reminding me about compilation/evaluation being the same. I was confused for a moment
12:53:52
shka_
hello, I need a sbcl (I think?) tip, i defined type "extendable-vector" that requires type to be array, have a fill pointer and be adjustable
13:35:04
shka_
pfdietz: notice how test1 will give 2 notes about simple-array possibility while test2 will give 0 notes
13:35:52
shka_
i find it weird because SBCL does not have adjustable-arrays that are also simple-arrays
13:36:45
shka_
furthermore, adding (assert (array-has-fill-pointer-p vector)) in the test1 will also remove notes
13:37:28
Bike
shka_: you mean notes like "can't optimize because it's not a simple array"? I think if you expressly declare it's not a simple array those notes are suppressed
13:37:58
Bike
and sbcl might not be smart enough to use satisfies types to figure out array complexity
13:38:22
shka_
Bike: no, notes are about sbcl having to check if vector is a simple-array, however type in the SBCL at least means: not a simple-array
13:40:31
jackdaniel
it is undefined whether simple-arrays are adjustable, it is conforming for them not to be
13:41:23
jmercouris
anyone know of a project like backward-parenscript (https://github.com/bhyde/backward-parenscript) but is complete?
13:42:01
shka_
anyway, thanks all for the assistance, maybe sbcl will be able to figure out constraints based on satisfies
13:42:53
shka_
Xach: nah, it just says list conditions that implies that array is expressly adjustable
13:43:02
jmercouris
pjb: could you expand on that? have you used it to transform JS into parenscript?
13:43:19
jackdaniel
if it is not expressly adjustable, not yada yada and yada, then it is => simple-array
13:43:29
pjb
jmercouris: and without batteries included; yes, I used this a long time ago to turn JS into parenscript.
13:44:02
Xach
I was referencing this: The type of an array that is not displaced to another array, has no fill pointer, and is not expressly adjustable is a subtype of type simple-array.
13:44:27
jmercouris
perhaps it'll be a good starting point, and it will just require a bit of tweaking
13:44:28
jackdaniel
Xach: right, but it is not said, that array which is displaced or has a fill pointer or is expressly adjustable is *not* a subtype of type simple-array
13:48:47
jmercouris
does quicklisp download all of the software from its sources or is a copy made on some sort of quicklisp server?
13:49:44
jmercouris
so basically I imagine you would have just about every important CL project since then
13:50:53
jmercouris
Xach: is there a way to download every single repository available on quicklisp and to have them ready to be quickloaded even when offline?
13:51:24
Xach
jmercouris: sure. (map nil 'ql-dist:ensure-installed (ql-dist:provided-releases t)) iirc.
13:52:23
Xach
jmercouris: it will download and unpack archives but not load them into the running system.
14:27:55
jmercouris
what would have to change to allow multiple versions of the same library to be quickloaded?
14:28:32
jmercouris
something to change all of the symbols and provide some version specific accessor to them?
14:29:01
jmercouris
I'm just interested purely from an academic perspective, Ie have no need to do this practically
14:35:13
Bike
well, there'd have to be some way for them to bind symbols with the same name and package to different things. so either some kind of transparent package renaming or environments, probably.
14:35:18
pjb
jmercouris: the common resource are the package names, keywords, and global (special) CL variables.
14:39:01
beach
jmercouris: I didn't invent the term "environments". It is in the Common Lisp HyperSpec already.
14:39:18
beach
What I did was to turn them first-class, which the Common Lisp HyperSpec does not require.
14:40:03
beach
Lisp has a long history of spreading out the global environment everywhere in the system.
14:40:35
beach
No, but it would require the creators of Common Lisp systems to invent what I only just did.
14:41:19
jackdaniel
clhs was already enormous in scope when it was written (and I think they were running out of money); adding new features would be, well, unwise
14:41:27
beach
And I am guessing the creators of the standard did not want to burden the suppliers of Common Lisp systems with that extra requirement, especially since they didn't know how to make the feature efficient.
14:42:19
Bike
it's kind of hard to answer questions about why something wasn't invented earlier than it was.
14:42:25
jackdaniel
beach: yes, my point is that even for "normal" features that would be unwise, inventing new stuff even more so
14:42:37
beach
So, since the vendors were members of the committee that created Common Lisp, they did not consider making it mandatory.
14:42:48
jmercouris
Bike: sometimes yes, sometimes no. For example, why wasn't the light bulb invented in 1000BC? Because many pre-requisite technologies and knowledge was missing
14:43:32
beach
jmercouris: It isn't expensive if you do what I do. But previous proposals required a hash-table lookup for each function application. Whereas the tradition was to access a slot in the symbol.
14:46:03
beach
jmercouris: With my proposal, calling FDEFINITION or FBOUNDP with a non-constant argument still requires a hash-table lookup.
14:47:06
beach
A function call is just a few instructions, adding a O(1) lookup that may require hundreds of instructions and several memory accesses is out of the question.
14:48:08
beach
jmercouris: You have the pointer to the symbol. You access the function slot, then the entry point of the function. You set the arguments, and then do a CALL instruction.
14:49:57
beach
Notice that they allow for all the different global environments to be one and the same.
14:51:35
beach
jmercouris: What I did was just to have the function slot disembodied. So my call protocol looks the same with a small difference: You have a pointer to a cell. You access the contents of that cell (the function object), then the entry point of the function. You set the arguments, and then do a CALL instruction.
14:52:01
beach
jmercouris: They are not guaranteed to be the same, and SICL will likely be the first implementation in which they are not.
14:54:17
Bike
if you understand the method you'll understand that the number of environments doesn't affect the lookup speed.
14:54:18
jmercouris
won't we have to look for the correct symbol among all the environments using the disemodied function slot?
19:57:51
rdh
hello, i am coming back to clisp and hoping someone can help me out (i do not have to much exp with setting it up) but i have quicklisp installed and everytime i run (ql:quickload "cffi"), i get an error but when clisp offers a restart, taking the option "Retry finding system cffi after reinitializing the source-registry" cffi loads fine.
19:59:34
rdh
I do not understand what is going on. is this some thing I over looked setting up quicklisp or a bug with cffi.
20:04:11
jackdaniel
the problem is that asdf broke its api contract. you need to download upstream asdf and (load (compile-file /it/)) before loading quicklisp
20:10:42
minion
didi, memo from pjb: note that CL:ASSERT let you fix the problem: Try: (let ((list (list 1 2 3))) (assert (= 1 (length list)) (list) "should be a list of 1 element")) and select the restart that let you enter a new value for LIST.
20:11:48
jackdaniel
rdh: because they didn't release for a long time. there is also that asdf is just a program, nobody expects gcc to ship make with it
20:12:06
didi
pjb: Thanks, but in the case I was thinking, it should never happen; it's deep inside an algorithm; and there is no saving from sinking.
20:23:42
copec
Its bytecode progs are small, and even significantly faster then cpython when I did a bunch of testing with it like 10 years ago
20:29:43
jackdaniel
copec: zero, it was written from scratch. also ecl has two compilers (one is a bytecode, second is via C source code, the latter produces way faster code)
20:31:13
jackdaniel
when you call compile-file you may provide :c-file :data-file and :h-file arguments
20:33:37
copec
I was reading the other day that Haskell uses a C--, have you ever looked at that jackdaniel?
20:36:15
jackdaniel
if C-- were a traget of ECL compiler things like call/cc would be very much possible
20:36:59
copec
I just saw your mention of lisp in small pieces the other day, finally ordered a copy of that for myself
20:38:21
jackdaniel
if it can be implemented without it, then it could be implemented with it, sure ,) some structures are easier to implement with continuations. that said call/cc is not that much useful
20:38:41
jackdaniel
delimited continuations cover most of things you want to have (and are *much* easier to implement)
20:39:03
copec
I've only used call/cc for some educational dynamic programming, but never needed it for an application I was working on
20:39:14
jackdaniel
I've mentioned call/cc only to show limits of what compilation to C can achieve without hacks
20:41:37
jackdaniel
lisp in small pieces is a very valuable read if you are interested /how/ lisps could be implemented
20:42:09
jackdaniel
I've never read the dragon book, but from what I've heard half of it is about parsing
20:52:32
Bike
you can't do it for already-compiled reasons for what i imagine are similar reasons to ECL and C
20:53:30
phoe
Bike: I guess there could be a compiler switch that remembers IR representations for functions for later disassembly
20:54:56
phoe
I guess someone would want to use (disassemble #'foo :type :ir) real bad for this switch to become actually worth the time spent on implementing it
20:56:02
Bike
i only even look at llvm-ir when i'm debugging the compiler, which ideally is not something a user has to concern themselves with
20:57:41
Bike
for seeing if optimizations have been applied and other stuff, it would probably be clearest with the cleavir IR, but it's nonlinear so that's kind of tricky
21:02:49
Bike
copec: Yes, there's a cleavir.pdf that explains it, though the one in the documentation is a little outdated
21:05:31
Bike
beach is also in the middle of a major update to cleavir which will somewhat alter the IR
21:07:09
Bike
representation of handling of multiple return values and the dynamic environment, mainly
21:07:52
Bike
cleavir at the moment can't represent unwind-protect or special variable bindings so these have to be done through function calls. that will no longer be the case.
21:09:28
Bike
(unwind-protect protected forms...) macroexpands to (funwind-protect (lambda () protected) (lambda () forms...))
21:09:43
Bike
and funwind-protect is not compiled by cleavir. in clasp's case it's a C++ function using RAII.
22:07:22
stylewarning
Any thoughts on building a portable hash table library (that has a wider range of efficient custom hash functions), that isn't just a TRIVIAL-* library?
22:08:23
jmercouris
why not build a hashing library, and then a hash table library on top of your hashing library?
22:11:22
stylewarning
phoe: I've seen this; i consider it to be a bit of a cop-out solution. It solves the problem of portability (of some features: custom hash funs) but doesn't really care about efficiency, multithreadedness, etc
22:12:40
heisig
We also need a good hash table implementation for SICL, so there is some potential for collaboration :)
22:15:58
stylewarning
heisig: we have been abusing hash tables non-portably, and many of the hash tables are just sparse integer maps, so we thought we could implement a better one (famous last words) that works more efficiently and as flexibly as needed
22:17:04
stylewarning
(there's of course a separate question: is a hash table the right data structure for a sparse integer map? but that's neither here nor there. We also use tons of custom hash functions)
22:19:16
jmercouris
is hash table the right data structure for a sparse integer map... difficult question
22:19:41
stylewarning
another feature I've wanted is being able to specify key/value types for safety. Maybe that doesn't deserve to be in the hash table interface but almost all tables I create have concrete key and value types
22:19:59
stylewarning
and of course CL's HTs are designed with the opposite in mind: any kind of key and any kind of value
22:21:25
stylewarning
Why MAKE-ARRAY :element-type wasn't exactly designed for safety, and it has wackiness with upgraded types and whathaveyou, i think it's a nice design element
22:21:44
phoe
as verbose as Java is, it gets its type safety mostly right - and declaring types for hashtables is one thing that I enjoy in it
22:22:05
jmercouris
I actually really disliked that, it is a preference however, I understand it, I just didn't believe in it
22:22:48
Bike
treating it as a storage thing would be uh, weird. hash table implementation might put keys and values in the same vector...
22:23:20
stylewarning
jmercouris: so you much prefer that you supply a test function such that the hash function and test function form a reverse implication on the key types you have, and the value types are Whatever You Feel Like Whenever You Woke Up? ;)
22:23:30
phoe
even if it would be just for runtime checks, there is some value in runtime safety alone
22:23:49
jmercouris
stylewarning: the test function is only a mild implication, and it can span across types!
22:23:53
Bike
i'd say if you want safety you can define gethash+(setf gethash) analogues that have declared/checked types respectively. don't feel strongly about it though.
22:23:58
stylewarning
Bike: I'm saying I like the design element of specifying a type in the constructor, not that it directly has to do with storage. (:
22:24:11
stylewarning
jmercouris: types in Lisp are sets, and sets can be unioned, so it still is all the same
22:27:16
Bike
if you do it in the constructor and have gethash/(setf gethash) check the types there you're doing type checks based on a type only known at runtime which is gonna be a lot less performant.
22:29:20
phoe
so you seek a hashtable library which generates different code based on the compiler policy
22:29:28
Bike
unfortunately that's generally tied into impleemntation type inference stuff so it's not possible to deal with portably
22:29:42
phoe
your GETHASH might include typechecks on default safety levels and no runtime checks on (declare (optimize :yes))
22:29:56
Bike
...but if you do want to do this, maybe start with having a table library, and then we can make my shed
22:30:43
phoe
Bike: maybe that's doable portably; an implementation should be able to elide surplus checks, like, if it knows that a thing is a FOO then it doesn't need to check if it's a FOO anymore
22:33:13
Bike
maybe i should just write out a thing about why type-directed transformations might be nice but aren't very doable, since this keeps coming up
22:33:16
phoe
you'd need to try and expand into the code that will then, hopefully, be optimized by the compiler.
22:35:11
jmercouris
which means you should be able, in the worst case to kill the repl and inferior lisp
22:35:12
stylewarning
SLIME's request for input in some random buffer has caused issues in live presentations once
22:37:42
harovali
jmercouris: it's not frozen, right . Maybe it's slime in a loop which emacs cannot exit , and which eventually will exit itself
22:37:50
heisig
I see two ways to obtain typed hash tables: 1. A defstruct-like macro that generates the hash table, its type, and its accessors. 2. Painful, non-portable SBCL hacking.
22:41:34
stylewarning
heisig: i'm probably in favor of a portable intf+impl with painful SBCL hacking
22:44:57
heisig
So the portable interface would be something like (make-hash-table :key-type fixnum :value-type symbol :hash-function #'identity)?
22:45:09
phoe
stylewarning: this sounds exactly like the goal that this library that I linked above has
22:45:24
phoe
it already has some fallback stuff plus depends on implementation-defined stuff if an implementation supports these
22:46:04
phoe
mostly cause of (let ((fixnum 't) (symbol 'nil)) (make-hash-table :key-type fixnum :value-type symbol :hash-function #'identity))
22:47:24
stylewarning
heisig: tbh i'm not sure, i'll play around with an interface, maybe once I have a strawman we can mess around with it
22:50:48
jackdaniel
first I need to truly separate passes in ecl, then why not ,) however, is there any reason that having this will improve anything hash-table-access-wise?
22:52:05
phoe
a compiler will be able to warn if you try to use a non-fixnum key in the gethash, plus it'll know that the result will be (or null symbol)
22:56:33
jackdaniel
hash tables are fast *yet* slow for performance-crictical code (access-wise); the real question is that: is there any data to support thesis, that it would be worth the effort?
22:56:38
pjb
phoe: do you realize that you cannot put anything in the result of (let ((fixnum 't) (symbol 'nil)) (make-hash-table :key-type fixnum :value-type symbol :hash-function #'identity)) ?
23:10:32
phoe
it's just that shadowing CL:EQ makes me die a little inside due to the side effects of that
23:11:54
Xach
mfiano: was there a recent change to plain pngload? i reset my vcs cache and now it seems to be gone and completely replaced with pngload-fast.
23:12:07
Xach
I don't know if it's something that got jiggled around when I purged my cache or what.
23:12:42
jackdaniel
sure, it wasn't very bright though, I've personally never encountered a situation where I'd need such eq, (every (curry #'eq a) other-values) would suffice too
23:13:40
phoe
Xach: https://github.com/mfiano/pngload redirects to https://github.com/mfiano/pngload-fast
23:15:19
phoe
Xach: it seems that it got renamed completely, see https://github.com/HackerTheory/pngload/commits/master
23:15:20
Xach
There was some discussion a while ago about having them both available separately and I'm not sure what happened to break things now. whether it's a local issue or something that coincidentally happened at the same time.
23:26:16
mfiano
I was going to but you said you were going to merge the pngload-fast features into pngload with reader conditionals for implementations to have fallback support
23:27:23
mfiano
I prefer not thinking about either repo. They drain too much of my limited resources
23:41:19
harovali
does anyone know of some current tutorial or documentation to cl-pdf and cl-typesetting?
23:42:24
stylewarning
phoe: I have created the perfect overengineered macro for you: https://github.com/stylewarning/lisp-random/blob/master/associate.lisp
23:42:31
harovali
i'm reading https://github.com/mbattyani/cl-typesetting/blob/master/documentation/cl-pdf-doc.pdf which might be outdated
23:44:12
Xach
phoe: it is because of how i implemented portability. i would do it differently today.
23:45:12
Xach
mfiano: were the pngload-fast changes freshly pushed today also, even though the commits are old?
23:49:01
Xach
Ok. Well, I'm not sure how to account for what I'm seeing, but the missing pngload system breaks a bunch of stuff.
0:12:06
mfiano
Xach: The worst part is this same thing happened the last time you pinged me about it. I had this repository hard reset to a specific commit, and pushing a minor change fast-forwarded it. This is what I get for not paying attention.
0:15:55
mfiano
Repairing this is above my head right now, because I can't rebase or revert with merge commits in the tree
0:20:05
mfiano
I guess I can revert just my working tree and then make another commit. Simple enough idea. Let's see how it plays out
2:09:27
Xach
well, here are a bunch of update failures: https://gist.github.com/quicklisp/97e9df796326da8d0c75af75b91400d9
3:48:39
smokeink
(in clisp): (list :); => (:||) , is there any way to make this work in sbcl as well? illegal terminating character after a colon: #\)
3:49:51
no-defun-allowed
Yeah, I think CLISP is being lenient and you have to at least put :|| there.
3:53:03
smokeink
https://www.reddit.com/r/lisp/comments/72n6gy/the_nest_macro_ported_from_common_lisp_to_scheme/ ": as a universally accepted token denoting a self-evaluating keyword would be handy."
4:06:17
harovali
is it possible to see the coorect glyph in CL-PDF's pdf:draw-text with characters like #\U+00CD ?
4:07:40
no-defun-allowed
From memory, CL-PDF has the kerning information for some Adobe fonts, but only for the ASCII character set.
4:10:03
harovali
I think I should render those unicode strings in another library and compose that in cl-pdf, right? Is cl-typesetting that sort of library? Are there other nice options?
4:16:43
pjb
p0a: :: means you don't care whether the symbol named "BAR" is exported from the package named "FOO" or not.
4:16:58
pjb
p0a: : means that you want to get an error signaled if the symbol named "BAR" is NOT exported from the package named "FOO".
4:17:41
pjb
p0a: so basically, you should always use : and if an error occurs, it means you're messing with the internals of the package, and you should correct and limit yourself to the public, exported API.
4:18:02
smokeink
p0a: they both refer to the symbol named "BAR" from the package named "FOO" . if you want to use foo:bar then first you have to export 'bar
4:23:57
p0a
actually there's no .fasl files I'm super confused. It complains about "/home/emacs/Pictures/foo" but that string does no longer exist in my main.lisp project. I restarted the lisp image too
4:26:45
pjb
p0a: the .fasl files are stored by asdf in ~/.cache/common-lisp/. In general, you don't need to bother with them.
4:27:22
smokeink
HUNCHENTOOT:CREATE-FOLDER-DISPATCHER-AND-HANDLER is trying to access that folder, perhaps
4:28:06
pjb
p0a: CL distinguishes PATHNAMEs designating directories from pathnames designating files. #P"/home/emacs/Pictures/foo" designates a file named foo. #P"/home/emacs/Pictures/foo/" designates a directory named foo.
4:28:59
mfiano
i think you're trying to compile files rather than taking the iterative development approach
4:30:07
harovali
how do I create a new repl in slime if I accidentally closed it ? the inferior buffer is still there
4:35:33
pjb
smokeink: yes, sorry. This was a trick in clisp to read :foo in the keyword package. But for after :, you need to use :||.
5:28:53
p0a
But when I delete that line of code that starts the server in my main.lisp file, the asd file no longer starts the server
5:30:13
pjb
p0a: check your toplevel forms. I would advise avoiding starting things from lisp sources. Instead, define functions, and call them from the repl. Like main, or start-server, stop-server, etc.
5:32:36
p0a
but wouldn't C-c C-c'ing (in-package :project-alpha) get me in project-alpha? It still is in CL-USER> or is that just for the REPL?
5:35:42
no-defun-allowed
If you have it in a file, SLIME will evaluate/compile/&c everything after that definition in the specified package, but it won't affect the REPL.
5:36:32
no-defun-allowed
If you evaluate (in-package package-name) in the REPL, it will change the package there.
5:37:07
no-defun-allowed
And for the love of all things that are not Turing-complete to parse, please don't make a website using C++.
5:37:09
harovali
cl-typesetting has an example which has a sequence type specifier of 'unicode-string-type. I'm trying to compile this code in SBCL, and it seems not to have that name defined. I'm trying without success to figure out the SBCL equivalent. Would you please help me?
5:37:56
no-defun-allowed
harovali: I would use the specifier STRING, because SBCL has Unicode support, so you should be fine.
5:39:29
no-defun-allowed
smokeink: That is a bit of a simplification. *package* is a special variable, and can be bound to many packages by one thread.
5:41:15
smokeink
slime's background evaluation thread peeks at (in-package :package-name) in the source file, and then sets *package* accordingly, before evaling the sourcecode (if I'm not mistaken)
5:42:19
smokeink
pjb : I need help writing that reader macro for #\: https://paste.ofcode.org/sMLY3Awg6pPKtJhrBCRLzT
5:43:40
no-defun-allowed
From memory, the symbol reading stuff is called when there is no macro character to use, so that makes sense, though it doesn't help.
5:47:45
smokeink
I want a macro character that'll allow me to read : as a symbol, and will not break pkg:symbols or :symbols
5:47:53
loke
Apparently it was removed (there is a note about that in CLHS). I must have seen it in the ClTL2 book.
5:54:56
loke
Oh wait. there is more information here: http://www.lispworks.com/documentation/HyperSpec/Issues/iss216_w.htm
6:07:59
harovali
smokeink: no, I'm trying to render a unicode enabled truetype font in making a pdf document with cl-pdf and cl-typesetting
6:12:16
no-defun-allowed
harovali: Those would look like the AFM files in https://github.com/mbattyani/cl-pdf/tree/master/afm
6:14:28
pjb
smokeink: if you want to deal with (foo:) -> (foo:||) then you also need to add reader macro on all consituent characters, and parse foo too.
6:17:35
pjb
smokeink: you could change the test for next-char to something like: (or (find …) (not (nth-value 1 (get-macro-character next-char)))) for more generality, I guess.
6:19:14
pjb
or rather: (multiple-value-bind (rm nt) (get-macro-character next-char) (and rm (not nt)))
8:02:20
galdor
Xach: I was not even aware they were in quicklisp, I have not use them for so many years I do not even remember what they were for
8:03:39
galdor
by all means remove them, I'm pretty sure I never submitted them for inclusion, and I'm not even sure I still have the code
11:22:57
atgreen
asdf question... I am using a one-package-per-file style, and have packages user and db - but they have a circular dependency (they want to call functions exported by each other), and asdf doesn't like this. What's the best way to address this?
11:28:03
Shinmera
two choices: 1) don't use oppf, 2) factor out the circular deps into a third package both depend on.
11:28:24
galdor
there are similar issues in every language, excessive compartmentalization does not help
11:31:22
pjb
Put in package.lisp: (defpackage "A" (:use "CL") (:export "FA")) (defpackage "B" (:use "CL" "A") (:export "FB")) (eval-when (:compile-toplevel :load-toplevel :execute) (use-package "B" "A"))
11:32:21
pjb
and yes, you should avoid circular dependencies between the packages. But it's nice to know it's possible to have them if you need them.
11:35:56
atgreen
Ok, thanks for the tips. I do have a top-level package.lisp for the 'main' package, but everything else is oppf. See https://github.com/atgreen/red-light-green-light .
12:57:19
galdor
anyone interested about maintaining it is free to contact me to transfer the repository
13:52:14
untakenstupidnic
everyone who uses lisp is so enthusiastic about it, some say SBCL's generated code can run faster than C. but if there was such a great language from ancient times and was so mainstream, how did C++ survive?
13:54:08
untakenstupidnic
and why is it so rarely used and unlike C# and java, i don't see efforts to rewrite the whole world in it?
14:04:19
phoe
untakenstupidnic: one such thing is http://www.winestockwebdesign.com/Essays/Lisp_Curse.html
14:06:07
phoe
also opinion-based discussions from google, https://news.ycombinator.com/item?id=153812 and https://www.quora.com/Why-is-Lisp-not-as-popular-as-Python and https://softwareengineering.stackexchange.com/questions/60012/why-isnt-lisp-more-widespread
14:06:26
Shinmera
it's not about lisp, it's just a fundamental property that good things don't become dominant just because they're good, and vice versa that dominant things are not necessarily good.
14:06:27
beach
untakenstupidnic: You make an assumption that just isn't true, namely that people are rational and that they would prefer things just because they are good. If you look around, you will see that this is not the case.
14:07:18
phoe
also because DARPA stopped funding AI work in the 80s and instead started paying for C++ projects much more
14:09:28
phoe
also note that your question can be flipped over; if C++ is so popular and used by the some of the largest softwaremaking players in the world, how did $LANGUAGE_NAME survive
14:12:09
phoe
this is a surprisingly non-trivial question with complex and mostly incomplete answers that differ per every language you might insert in there
14:31:50
untakenstupidnic
phoe: thanks! one link was enough. also the C++ thing can be explained because of excessive bloat and that some people care for maintainablity. phoe: beach: Shinmera: but people say it was dominant and is the ultimate language, and people normally don't break the status que for making things worse.
14:32:56
untakenstupidnic
thanks for answering and if a question gets asked every day, ##C solves that with bots.
14:38:55
Shinmera
If a function dispatches based on type but nobody is around to see it, is it actually generic?
14:39:36
Shinmera
phoe: I feel like a canned bot answer won't really satisfy people that are genuinely looking for the answer, and won't stop people who're just trolling.
14:40:42
beach
I agree with Shinmera. I think we should take on the question each time, adapted to the exact question of course. It doesn't happen that often, and we get to show off our friendliness if the troll is not too bad.
14:42:20
phoe
Shinmera: no, why? one can ask minion about "popularity" to not need to google for these links again and again
14:43:51
minion
phoe: look at popularity: http://www.winestockwebdesign.com/Essays/Lisp_Curse.html and http://www.marktarver.com/bipolar.html and https://news.ycombinator.com/item?id=153812 and https://www.quora.com/Why-is-Lisp-not-as-popular-as-Python and https://softwareengineering.stackexchange.com/questions/60012/why-isnt-lisp-more-widespread
14:47:15
phoe
someone will if the libraries are used; do you plan on disappearing any time in the near future?
14:48:08
Shinmera
And even if I don't plan to it would be nice if I didn't have to maintain everything while I'm still around. That's a lot to ask for though, I know.
14:48:37
phoe
correct, maintenance is a burden in general, especially maintenance that no one pays you for
14:49:12
jebes
i'm currently unemployed (and probably for the forseeable future) and need some resume boosters, i'd love to help out where I can
14:49:59
Shinmera
Not sure lisp would boost that resume much, but maybe you can pawn it off as "open source work"
14:50:46
jebes
shinmera: the only jobs here are enterprise jobs and there's barely developers to begin with. I don't need much of a resume to get a job lmao
14:50:52
phoe
sure thing you can, working with other people on alive FOSS projects is a useful skill on its own regardless of the languages and technology used
14:55:37
phoe
Shinmera: I think the current README should have links to some of the videos you posted of it in action
14:56:56
Shinmera
phoe: Fair point. They're here for now. https://www.youtube.com/playlist?list=PLkDl6Irujx9Mh3BWdBmt4JtIrwYgihTWp
14:57:26
Shinmera
and doing this got me where I needed to be faster than if I needed to figure out how to make a usable GL backend with CLIM.
15:00:11
Shinmera
Alloy has a GL backend, and you can use it for that, yes. https://twitter.com/Shinmera/status/1203361882113036288
15:00:25
pfdietz
Unmaintained libraries are more useful if they're matured to a state where they need little or no maintenance.
15:01:15
pfdietz
Not referring to anything you have done in that comment, but I see libraries up on github from various sources that aren't fully baked.
15:01:33
Xach
pfdietz: the prove incident is interesting to me because prove is considered obsolete, but is still widely used, and although it didn't change, one of its active prerequisites did.
15:01:34
Shinmera
pfdietz: True enough. Sadly with most of my stuff I don't know if people are just not using them, or there's no bugs, or they just don't report them and give up.
15:02:13
pfdietz
I have been spending a little time recently trying to harden some public projects there.
15:02:26
Xach
Shinmera: i've found out about patches to my projects in weird indirect ways, when nobody bothered to tell me about them.
15:03:17
Xach
jebes: a prerequisite of prove changed and prove stopped building. prove is not maintained but is still used by a dozen+ projects.
15:03:36
Ampws
I wonder ... if common lisp is suitable for the study of computational neuroscience...It seems that MATLAB is always used in this subject...
15:03:45
Xach
prove itself kept building but a prerequisite introduced a new dependency that made other stuff break in certain circumstances.
15:04:07
pfdietz
Ampws: that would likely come down to availability of the necessary libraries and interfacing to other tools.
15:05:09
pfdietz
Xach: the issue was use of an unexported symbol, right? Curation for that in widely used systems would be useful.
15:05:37
jebes
you're welcome. Back in my day we had to write everything in assembly to run forth to run psuedo-lisp to control telescopes
15:05:46
Xach
pfdietz: oh yeah, that was part of it, and then there was another part that was another problem.
15:10:32
jebes
Ampws: out of curiousity what tech stacks do computational neuroscience use in matlab?
15:15:16
jebes
i do want to write a gpgpu system in lisp, unless anyone knows of one already in existence
15:23:18
phoe
nirved: https://www.reddit.com/r/lisp/comments/3r8pew/opencl_binding_for_common_lisp/ lists some
15:29:58
Shinmera
jebes: I'm the guy that writes everything himself and yes it is a bad idea if you want to be done in a timely fashion.
15:32:41
Xach
Shinmera: some article or blog about some lisp experience that mentions patching something in passing
15:54:02
Shinmera
jebes: If you're serious about helping out, feel free to stop by #shirakumo, the primary channel for project discussion around what I do.
17:02:07
neuro_sys
Why does 2.el behave differently than 1.el in terms of scope rules? https://gist.github.com/neuro-sys/b5ca549674f1968f1a61da9f07b38c3f (Although note, this is Elisp, was hoping people here are knowledgable about it too).
18:03:58
Shinmera
I suppose I'll instead try to automate the webpage rebuild with github's action stuff.
18:10:25
Shinmera
so, in theory, all I need to be able to do is to run sbcl to build that index, and then push the new index live.
19:08:43
galdor
is there an equivalent to STRING= for vectors ? i.e. something with :START, :END, :KEY, and :TEST
19:14:01
galdor
SEARCH works but MISMATCH will stop at the first element which fails the comparison so it's better
19:14:51
Shinmera
well search would also abort early since they couldn't match anyway due to the two sub regions not being long enough anymore for a match anyway.
19:26:48
phoe
I remember that I learned about its existence then forgot about it again like three times now
19:28:49
BirthdayboiJosh
I was just skimming over ANSI Common Lisp and saw mismatch, I didn't know it existed, and then this conversation happened 2 minutes after
19:29:10
travv0
it's pretty embarrassing how often i forget and am reminded of even commonly used functions
19:32:39
pfdietz
I was chagrined when I discovered an entire symbol I had overlooked when writing the ansi-tests: STANDARD
19:36:04
pfdietz
I mean, a user *could*. And if evaluated as a special in unsafe code, perhaps it gives some garbage that's not nil?
19:37:30
pfdietz
But simply using it as a special without a declaration... not conforming, but implementations will let you do that, often.
2:31:27
saravia
hello, ¿is posible write CSharp (Frameworks 4) binaries with portacle and common lisp language?
2:50:51
saravia
phoe, sorry but .net core is the same of C#, becose Lovesan/bike tell me ".net core and c++" but i need interoperate -> C# Frameworks 4, is posible doc?
2:53:18
saravia
my new job requires visual studio, but to me is more inspiration "interoperate with common lisp + portacle (Emacs) xD"
2:53:47
pjb
saravia: AFAIK, there is no CL compiler targetting .Net. Instead, you can write the core of your application in Common Lisp, running in a separate process, and communicating with the .Net environment thru socketsr.
2:55:36
pjb
saravia: you can compile and run from Visual Studion this little program: int main(){ system("emacs"); return 0;} // can't you?
3:39:09
Josh_2
if I'm using sly/slime, is there a function I can call to call the inspector on an instance of an object?