libera/#commonlisp - IRC Chatlog
Search
17:05:40
scymtym
boeg: this is not second climacs but it demonstrates some of the things that can be done by using the Lisp reader instead of regex-based analysis: https://techfak.de/~jmoringe/style-check.html . or see https://techfak.de/~jmoringe/eclector-cst-toy-2.ogv , https://techfak.de/~jmoringe/eclector-context-completion.ogv for a deeper analysis, in emacs but based on the same approach
18:11:31
aeth
I'd prefer CHECK-TYPE to ASSERT if it can be expressed as a type in a reasonable way (so e.g. not a SATISFIES type).
18:12:04
aeth
For list length, maybe ASSERT is the most straightforward, but for vector length, a CHECK-TYPE is the most readable and concise.
19:41:53
rumbler31
sorry for the noob question, but I want to return a specific value from a loop once it is complete
19:45:12
rumbler31
oh man. I forgot about that I keep thinking about return in loops as the return verb and forgetting that function call
19:49:27
jebes
everything is meant to tie together, there isn't arbitary differences like statements vs expressions
20:01:02
pjb
rumbler31: that means that loop doesn't return. return returns. If you want to return from a loop you must combine loop and return.
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