Cena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #commonlisp
Fare has joined #commonlisp
zacque has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
zacque has joined #commonlisp
robin_ has joined #commonlisp
robin has quit [Ping timeout: 240 seconds]
v88m has quit [Ping timeout: 256 seconds]
s-liao has quit [Quit: Client closed]
s-liao has joined #commonlisp
phantomics has joined #commonlisp
robin_ is now known as robin
<hashfunc1818>
is there a built-in hash function in common lisp? like sha1 or sha256?
<yitzi>
Some implementations include their own extensions for sha256, etc. If you need implementation independent support see ironclad.
<semz>
There is sxhash, but Common Lisp doesn't have cryptographic hashes.
s-liao has quit [Ping timeout: 256 seconds]
<hashfunc1818>
yitzi: ok thanks.
<hashfunc1818>
semz: yup that'll do for the time being
<hashfunc1818>
semz: thanks
epony has joined #commonlisp
Volt_ has quit [Quit: ]
s-liao has joined #commonlisp
Cena has joined #commonlisp
Cena has quit [Client Quit]
s-liao has quit [Ping timeout: 256 seconds]
Cena has joined #commonlisp
Cena has quit [Client Quit]
Cena has joined #commonlisp
Cena has quit [Client Quit]
Cena has joined #commonlisp
Cena has quit [Client Quit]
NotThatRPG_away has quit [Ping timeout: 256 seconds]
wmblathe_ has joined #commonlisp
wmblathers has quit [Read error: Connection reset by peer]
wmblathe_ is now known as wmblathers
Oladon has joined #commonlisp
fitzsim has joined #commonlisp
dirtcastle has quit [Read error: Connection reset by peer]
ym has quit [Remote host closed the connection]
dirtcastle has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
cjb has quit [Ping timeout: 260 seconds]
Bike has quit [Quit: Connection closed]
<beach>
Good morning everyone!
s-liao has joined #commonlisp
<hashfunc1818>
is there a standard idiom for a loop with a trivial test condition?
<beach>
(loop until <test> ...) or (loop while <test> ...)
<hashfunc1818>
ah ok thanks
<hashfunc1818>
i'm always not-to-eager to use the loop functionality tho
<beach>
I am sorry to hear that.
s-liao has quit [Quit: Client closed]
<hashfunc1818>
it's almost like whenever i use it, i feel like i'm doing something wrong
s-liao has joined #commonlisp
<beach>
I am very sorry to hear that.
<beach>
Maybe the best solution here is to change the way you feel when you use it.
<hashfunc1818>
hahah
<hashfunc1818>
by feeling, i mean an intuition that i can't quite put a finger on, that's telling me that i should be using recursion?
<hashfunc1818>
idk
<beach>
In Common Lisp, recursion is mainly used for tree-like structures where it would be very messy to iterate and where the depth of the recursion is limited, typically to log(n).
<beach>
Recursion is also good for macro functions where performance impacts compile time only and where the structure (i.e., code) is naturally recursive.
semz_ has joined #commonlisp
<beach>
Recursion could also be used for numeric intervals where you need to divide it in two halves in each recursive call. The call structure is then tree-like even though there is no data structure.
hashfunc1818 has left #commonlisp [ERC (IRC client for Emacs 25.2.2)]
<SR-71>
Seriously
Cena has joined #commonlisp
Cena has quit [Client Quit]
ec has quit [Ping timeout: 240 seconds]
<beach>
"Seriously" what?
<SR-71>
The recursion joke
semz_ is now known as semz
Oladon has quit [Quit: Leaving.]
Catie has quit [Quit: sQuit]
Fare has quit [Ping timeout: 256 seconds]
Cena has joined #commonlisp
Cena has quit [Client Quit]
<epony>
the recursion joke is that recursion jokes are implementing in recursion jokes, cause that's easy to optimise
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
Fare has joined #commonlisp
<White_Flame>
I was just about to complain about posting a reddit link which is just a link to the content, instead of the content itself ;)
<beach>
That must be why I didn't see the joke, and what the link pointed to gave me no desire to continue.
anticomputer_ is now known as anticomputer
azimut_ has joined #commonlisp
aartaka has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
zacque has quit [Ping timeout: 272 seconds]
<SR-71>
How do you guys stay motivated throughout your personal projects?
<White_Flame>
constantly move to another project :-P
Cymew has joined #commonlisp
<SR-71>
That would be a lot of dead projects.
<kakuhen>
i have plenty of dead projects... but this time I will surely finish one of them....
<beach>
SR-71: Personally, I am guilt-driven and it works great for me. I announce a project to the world, and then I am too ashamed to abandon it, so I keep going.
<White_Flame>
SR-71: you just have to revisit them, not always cycle to _new_ projects
<SR-71>
beach: lol
<neominimum>
I try to let go of the tension caused by attending to the end goal too much. I find I have more focus and enjoyment when I'm not looking too far into the path ahead. You can only think about one thing at a time so don't spend impractical amounts of time thinking about things that aren't immediately actionable.
<beach>
SR-71: Actually, that's not so much "motivated" as "forced to continue".
<neominimum>
I'm just coding to code, so I'm not ashamed about how many past projects I have (incomplete or not) I don't even keep count.
<SR-71>
beach: Oh, I might just try that.
<beach>
It doesn't work for everyone, but it does for me.
<White_Flame>
yeah, slot yourself in a conference to present a project, then you'll get it done :)
<SR-71>
White_Flame: That would be too embarrassing..lol
<SR-71>
beach: I usually spend a lot of time reading code than actually writing code.
<White_Flame>
the majority of time in coding is not spent writing code
<SR-71>
White_Flame: Majority of the time is spent staring at the ceiling thinking.
<SR-71>
And the rest reading.
Cena has joined #commonlisp
<SR-71>
And a small fraction actually writing code.
Cena has quit [Client Quit]
<SR-71>
It's just, I want to actually complete one of my projects. And motivation is hard to come by lately.
<White_Flame>
then replace motivation with discipline ;)
<SR-71>
That's true.
shka has joined #commonlisp
Cymew has quit [Ping timeout: 272 seconds]
<SR-71>
So, what are you guys working on lately?
treflip has joined #commonlisp
<White_Flame>
personally, my forward chaining algo has cracked the nut of linear memory usage, and I'm figuring out how to integrate real backchaining into it
zacque has joined #commonlisp
<beach>
minion: Please tell SR-71 about SICL.
<minion>
SR-71: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
<White_Flame>
(that, and I'm doing a bunch of data movement/transformation stuff for "real work")
<SR-71>
minion: That's cooool
<minion>
what is?
<SR-71>
SICL
<White_Flame>
(shh, nobody tell SR-71 that minion is a bot)
<SR-71>
lol
<beach>
minion: Thanks!
<minion>
np
<beach>
minion: Are you a bot?
<minion>
Are you a bot: I can't be expected to work when CLiki doesn't respond to me, can I?
<beach>
Aww!
<neominimum>
SR-71: Last couple of days I have been rewriting parts of my primitive asynchronous message passing runtime to make it non consing.
<SR-71>
neominimum: Did you publish your code on github?
<neominimum>
I have nothing published as of yet, but I have been considering it for this project as I'd like to get some feedback from anyone interested about the implementation. Although there is no time frame currently as I need to get it where I'm happy to release the code.
<neominimum>
*get it to a stage
mepy has quit [Ping timeout: 240 seconds]
s-liao has quit [Quit: Client closed]
spiaggia has joined #commonlisp
<SR-71>
White_Flame: You seems to be well versed on AI, Can you recommend a good resource for learning NLP?
<White_Flame>
no, I've not really found a NP architecture or technique that I'm happy with yet
<White_Flame>
*NLP
<White_Flame>
but prolog had tons of the basics
<SR-71>
White_Flame: I was just interested in writing my own chat bot.
<spiaggia>
A grammar checker would be good to have. For English and French to start with.
scymtym has quit [Read error: Connection reset by peer]
Brucio-61 has quit [Read error: Connection reset by peer]
scymtym has joined #commonlisp
treflip has quit [Ping timeout: 256 seconds]
hashfunc50e has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
<edgar-rft>
natural languages need new grammars to simplify things
<spiaggia>
I agree. Some grammars are made to get a complete structure of a sentence, but that's often overkill for grammar checking. For instance.
s-liao has joined #commonlisp
Josh_2 has joined #commonlisp
<hashfunc50e>
how can i make this custom _absolute_ sort by its position in the cond, and not by its position in the list?
<hashfunc50e>
(sort '(howdy yo hi sup) (lambda (x y) (declare (ignore y)) (cond ((eq x 'yo) x) ((eq x 'hi) x)))) => (HI YO HOWDY SUP)
<hashfunc50e>
(sort '(howdy hi yo sup) (lambda (x y) (declare (ignore y)) (cond ((eq x 'yo) x) ((eq x 'hi) x)))) => (YO HI HOWDY SUP)
<spiaggia>
I have no idea what that means and I don't understand the examples
<White_Flame>
you have equal elements according to your predicate, there's no absolute order between those
<White_Flame>
also, I don't think yuo can know which is going to be X vs Y
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<spiaggia>
And of course, SORT is destructive so should not be used on literal data.
mogan90 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Cena has joined #commonlisp
Cena has quit [Client Quit]
spiaggia has quit [Quit: ERC (IRC client for Emacs 26.3)]
<lisp123>
Is there a implementation of CL on Windows (excluding Portacle's genius) that I can run without installation and unlikely to be detected by Corporate IT
<lisp123>
Not sure if I should risk silently installing CL at work (it will never get approved since I'm not in the IT dept)
<hashfunc50e>
White_Flame: how do i specify absolute ordering in CL?
<White_Flame>
with your predicate
<White_Flame>
your current one returns the same boolean result for HI/YO and HOWDY/SUP
<White_Flame>
making those equivalent
<White_Flame>
and you have no idea what's in Y
<White_Flame>
HI or YO could be in htere
<hashfunc50e>
White_Flame: i see
<White_Flame>
the whole thing is pretty whacked, to be honest. I don't think my assessment is even correct, given that Y is ignored
<pjb>
lisp123: do you have access to ssh? or to http?
<pjb>
lisp123: there's no need to run locally.
<hashfunc50e>
White_Flame: you don't like the idea?
<pjb>
lisp123: or you can run it in the browser.
<White_Flame>
hashfunc50e: I don't really know what your idea is.
<White_Flame>
but using that lambda as a sort predicate really doesn't make sense
Inline has joined #commonlisp
<lisp123>
http / ssh, I'm worried they will catch on at some point if they monitor traffic. I already got pulled up once before for a security breach (to be fair, I was 100% at fault)
<hashfunc50e>
White_Flame: the lambda is just temporary until more complex logic is needed
<White_Flame>
because parameters of (HI LO), (LO HI), (HI SUP), etc are all indistinguishable
<White_Flame>
and it's blind luck that it even puts those 2 in front, as it could just have easily had YO, HI as only ever appearing in Y
<White_Flame>
you need to actually, you know, _compare_ the two arguments ;)
<hashfunc50e>
White_Flame: essentially i'm trying to convey that YO always has a higher precedence than any other symbol
<lisp123>
portacle technically works, I have ways to get it into my computer, but I heard somewhere SBCL might get flagged for executable memory
<White_Flame>
but you don't compare it against the other symbols
s-liao has quit [Quit: Client closed]
<hashfunc50e>
White_Flame: i see, yes. i understand. thanks for the help
<White_Flame>
and it has the same precedence as HI
<pjb>
lisp123: https and ssh are encrypted. They won't know what you do, only with what host you do it, and how big it is.
<lisp123>
I will try clisp first, but that cl on linux idea seems like it could also work pretty well, since its all in the browser
<lisp123>
cant imagine anyone detecting js running a lisp
<pjb>
It's just some javascript in your browser.
<lisp123>
exactly
<random-nick>
wouldn't it be better to use sbcl since it's faster and so more efficient?
rotateq has joined #commonlisp
mgl has joined #commonlisp
<hashfunc50e>
White_Flame: i suppose this will have to do for now:
<hashfunc50e>
(sort '(sup yo hi) (lambda (x y) (cond ((eq x 'yo) x) ((eq x 'hi) (unless (eq y 'YO) x))))) => (YO HI SUP)
<hashfunc50e>
(sort '(sup hi yo) (lambda (x y) (cond ((eq x 'yo) x) ((eq x 'hi) (unless (eq y 'YO) x))))) => (YO HI SUP)
<lisp123>
random-nick: I work in a bank now, so if I ever get caught I could get fired
<White_Flame>
hashfunc50e: I still don't really get the strategy
<beach>
hashfunc50e: Please do not sort literal data.
<White_Flame>
(that, too)
<rotateq>
beach: You mean cause SORT is destructive?
<beach>
Yes.
<beach>
hashfunc50e: Also, the predicate is supposed to return a generalized Boolean, so why do you return an element instead. You might as well just return T.
<White_Flame>
or chain an OR clause together, since it's all boolean
<hashfunc50e>
White_Flame: i can't find/think of the mathematical concept. but i guess the closest thing i can relate to it is essentially assigning an absolute value to a symbol
<White_Flame>
right
<White_Flame>
or position within a refernce list
<White_Flame>
(which is just a computed version of the same thing)
<rotateq>
There was once a time I thought there is also NSORT, like REVERSE vs NREVERSE, maybe due to hysterical raisins.
Fare has quit [Ping timeout: 240 seconds]
<edgar-rft>
CL needs NSETF
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
<hashfunc50e>
White_Flame: beach: alright thanks for the help
<beach>
Good luck.
hashfunc50e has quit [Remote host closed the connection]
admich has joined #commonlisp
MajorBiscuit has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
azimut_ has quit [Remote host closed the connection]
azimut has joined #commonlisp
<mfiano>
Hmm, I need a bit of help with the 'graph' graph theory library: https://eschulte.github.io/graph/ and graph theory in general.
<jackdaniel>
graph theory is full of interesting problems and clever solutions to them :)
<mfiano>
I have a directed graph with edges A->B and B->A, and I want to find the shortest path from A to A, which is obviously NIL because you are already there, and using the SHORTEST-PATH function returns that indeed, however, I want to find an actual path, even if it means leaving the node and coming back to it.
igemnace has joined #commonlisp
<beach>
So you mean the shortest path of length at least 1.
<beach>
?
<mfiano>
Yes, I am wondering if this library has something of the sort. This is the only library I know of that has other functions I need. cl-graph does not, and is also buggy/unmaintained.
<beach>
For every successor of A, compute the shortest path to A. Take the shortest of them all and add 1.
<mfiano>
I got everything except the "add 1" part.
<beach>
To the length of the shortest of them all.
<beach>
But maybe you don't need the length. Just the path.
<mfiano>
I need the path A->B->A
<beach>
Then prefix the path from X to A by A -> X.
<mfiano>
That is all
<beach>
Then B is a successor of A, so compute the shortest path from B to A. That is B -> A.
<beach>
Then add the prefix A -> B, and you have A -> B -> A.
<mfiano>
Ok that makes sense. Thank you.
<beach>
Sure.
<mfiano>
Now I have a real problem.
<beach>
I figured as much.
<mfiano>
As part of my test suite I am ensuring that the graph has a single component; that is, the graph is strongly-connected.
<mfiano>
But I need to ensure it is connected with this new constraint.
<mfiano>
So graph:strongly-connected-components is not going to do anymore.
<beach>
What new constraint is that?
<mfiano>
well graph:strongly-connected-components returns a list of lists. If that list is of length 1, the graph is strongly-connected, which I am using to test if my algorithm has all of the direct paths needed.
<mfiano>
Well maybe it is okay, actually.
<mfiano>
I need to think a bit more.
<mfiano>
Thanks for your help.
<beach>
I see neither a constraint nor a change of the connectedness.
pranavats has joined #commonlisp
<mfiano>
You are correct. I was confusing myself with another problem I have.
<mfiano>
As long as the graph is strongly connected, your solution will work.
<beach>
It will work even if it is not.
<mfiano>
Perfect, thank you.
<beach>
Sure.
<mfiano>
How so?
<mfiano>
There must be a path from B to A.
<mfiano>
IF it is not strongly connected, there may not be.
<beach>
If there isn't then it will return no result with is correct.
<mfiano>
Ok sure, the constraint I have is that it must always return a result, so I must have a strongly connected graph.
<beach>
Whether the graph is strongly connected or not, my technique will return a path of length at least 1 from A to A if such a path exists.
<beach>
That is just not true.
<beach>
You can have a vertex D with no successors, but still have a path A -> B -> C -> A.
<mfiano>
I must have a path from every node to every other node. That is one of the constraints in my underlying algorithm.
<beach>
That is the very definition of strongly connected.
<mfiano>
Right. So given two nodes A and A. I require that it returns a path of at least length 1. I think we are saying the same thing though. You said your algorithm will return a path "if such a path exists". I am saying, it will always exist because of the strong connectedness.
Inline has quit [Quit: Leaving]
<mfiano>
I will say, that this library seems very wrong, at least at its documentation level.
treflip has joined #commonlisp
<mfiano>
There are no successors or predecessors functions. There is a "neighbors" function, that is documented as "Return all nodes which share an edge with NODE in GRAPH.". This seems to behave like a successors function when the graph is directed...it never returns predecessors.
s-liao has joined #commonlisp
mgl has quit [Quit: Client closed]
Cena has joined #commonlisp
Cena has quit [Client Quit]
morganw has joined #commonlisp
Brucio-61 has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
admich has quit [Ping timeout: 256 seconds]
lisp123 has joined #commonlisp
semz has quit [Remote host closed the connection]
semz has joined #commonlisp
s-liao has quit [Quit: Client closed]
admich has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
s-liao has joined #commonlisp
cosimone has joined #commonlisp
s-liao has quit [Quit: Client closed]
razetime has joined #commonlisp
kevingal has joined #commonlisp
kevingal has quit [Ping timeout: 240 seconds]
kevingal has joined #commonlisp
lottaquestions has quit [Quit: Konversation terminated!]
mogan90 has quit [Remote host closed the connection]
mogan90 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
dirtcastle has quit [Remote host closed the connection]
mogan90 has quit [Ping timeout: 272 seconds]
Cena has joined #commonlisp
Cena has quit [Client Quit]
tyson2 has joined #commonlisp
mgl has joined #commonlisp
mrcom has quit [Quit: Leaving]
Cena has joined #commonlisp
eugercek has joined #commonlisp
Bike has joined #commonlisp
dirtcastle has joined #commonlisp
jeffrey has joined #commonlisp
s-liao has joined #commonlisp
razetime has quit [Ping timeout: 256 seconds]
razetime has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
mogan90 has joined #commonlisp
attila_lendvai has quit [Ping timeout: 256 seconds]
zacque has quit [Quit: Goodbye :D]
treflip has quit [Quit: ERC (IRC client for Emacs 27.2)]