jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<dmiles> but the idea of having the offline chemsim was for speed
<jeosol> I have access to a physics simulator in my case, a wrapper written in CL (SBCL).
<dmiles> in your case you'd probalb ydo what the chemistry people did.. set up ways of letting cyc perform the experiemnts and get results back
<dmiles> i am sure if iyt wroks in SBCL you can make it work in ABCL to
<jeosol> The closest analogy for my use case, if having to place N fire stations in a city and the tool/agent comes up with optimized locations and associated explainability. E.g., place on at location X because of population density, access to highways, previous fire cases, etc
<jeosol> but not the Cyc functionality right?
<dmiles> oh well there are several steps in "porting" your app to ccy
<jeosol> Yeah, I can get that part wrapped up in ABCL
* dmiles wroite up what "porting to CYC means" sinc eit snot about code but about removing yourself from the workflow
<jeosol> -> working with ABCL. There are no specific SBCL features as I recall, but I never compiled in any other implementation
<dmiles> only the first level of bullets.. i jsut pasted stuff in to give exmaples..
<dmiles> though eventually at the bottem the simulator no long exists and CYC is doing it :P
<jeosol> It will take me sometime to learn everything. Also, I need to know prolog well for this right?
krwq has quit [Remote host closed the connection]
<jeosol> I would like to test and setup a small problem for my understanding.
<dmiles> knowing prolog does help me write CycL yeah
<jeosol> I will check ebay for some good book. Any recommendations?
<dmiles> " having to place N fire stations in a city and the tool/agent comes up with optimized locations and associated explainability." is a good exmaple
<dmiles> where your representation is at least shared
<dmiles> the problem is described in cycl etc
<dmiles> CycL = Cyc's internal KR&R Language
<dmiles> So this way its explainations are understandanle
<dmiles> where scenarios and hacked as KB assert/retract
<dmiles> where scenarios *are* defined as KB assert/retract
<dmiles> Oh but no Prolog nescsary
<dmiles> it just that some of my external modules are writtne in Prolog instead of CycL
shifty has joined #lisp
<jeosol> Thanks dmiles. Knowledge representation is something I want to understand
saravia has joined #lisp
<jeosol> so that book will be useful. I saw high-order logic on Cyc's wiki page, so figured I need to do some background reading.
gabbiel has joined #lisp
<gabbiel> can methods be defined under lexical bindings?
learning_ has quit [Ping timeout: 246 seconds]
<aeth> flet but for methods?
learning has joined #lisp
<gabbiel> yes
<aindilis> jeosol: if you're interested in Cyc, I'm going to be doing a tutorial on it on IRC sometime in the next few months, if you'd like to participate I can notify you ahead of time
<jeosol> Yes, I am very interested.
<aindilis> great, if you want, pm me your email, otherwise I will just try to reach you here
<jeosol> I have archived the books and papers dmiles linked above and will working through the KRR book above
<aindilis> yeah that's a great book
<aindilis> very thorough
<jeosol> Yeah, I looked at the Cyc wiki page, it mentions terms I don't quite get yet, so I'll need a book to understand those terminologies.
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
<remexre> anyone know how to add additional supported types to cl-kanren? I would expect it would just be overridding equalp and unify-impl, but that seems insufficient
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
Insanity_ has quit [Quit: Connection closed for inactivity]
semz has quit [Ping timeout: 264 seconds]
awolven has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
t58 has quit [Quit: Leaving]
igemnace has joined #lisp
gabbiel has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
orivej has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #lisp
saravia has quit [Remote host closed the connection]
Nomenclatura has quit [Remote host closed the connection]
karlosz has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
leb has joined #lisp
learning has quit [Remote host closed the connection]
esrse has joined #lisp
Fare has quit [Quit: Leaving]
MrBismuth has quit [Read error: Connection reset by peer]
Blukunfando has joined #lisp
leb has quit []
seok has joined #lisp
<seok> anybody using parenscript?
abhixec has joined #lisp
<remexre> is there a good way to track down a bug tracker for a quicklisp package?
<remexre> wait, never mind, it's in the readme lol
<aeth> remexre: the source repository for everything is in https://github.com/quicklisp/quicklisp-projects
<aeth> but a good project should probably put it in the README and even in the .asd file.
<aeth> The ASDF system definition lets you say homepage, bug-tracker, and source-control
<remexre> huh, ok; I was confused because the project didn't show up on google and the homepage was quickdocs
<remexre> but it turns out my ctrl-f skills were just weak :P
<remexre> looks like :bug-tracker is there in the asd file, though, yeah
sjl has joined #lisp
leb has joined #lisp
<beach> Good morning everyone!
<jeosol> Good morning beach. Bien venue
Blukunfando has quit [Ping timeout: 252 seconds]
tjmaynes has joined #lisp
<beach> Thanks!
tjmaynes has quit [Remote host closed the connection]
leb has quit []
<jeosol> Still here since you left earlier. Had a lengthy useful session with dmiles regarding Cyc.
<beach> I saw it.
<jeosol> I should be here more often. Gotten a lot of useful resources and ideas to get me started.
<beach> Yes, there are many smart and knowledgeable people hanging out in #lisp.
MrBismuth has joined #lisp
<LdBeth> beach: what's the mininal requirement for a buffer update protocal to work with incremental parsing?
<beach> LdBeth: Tough question.
<beach> I guess it must be possible to detect regions that may have been modified between two invocations of the parser.
<beach> But those regions don't have to be exact.
<beach> For example, Cluffer does it with the granularity of an entire line.
<beach> Then it depends on how fancy you want to be. For Cluffer, I made my life a bit harder in order to get more flexibility. For instance, I assume that there can be several simultaneous "views", with potentially different parers, into the same buffer, and that there can be an arbitrary number of modifications to the buffer between two parser invocations.
<LdBeth> beach: If multiple places has been edited during two invocations, is it possible to just send texts with positions?
<beach> What do you mean by "send"? I have not considered that possibility. In Cluffer, the views invoke a protocol function to see the contents of the buffer.
<LdBeth> beach: oh, I mean the possiblity of modifing an existed editor to communicate with parser backend
<beach> I have not considered that possibility. I suspect you would have to make some radical changes to the editor since most editors would not be written to accommodate such things efficiently.
dale has joined #lisp
<LdBeth> It is just I'm surprised to know that VSCode can support incremental parsing via http://tree-sitter.github.io/tree-sitter/ with almost no pain
<beach> Yes, well, there are several problems with such an approach if you want an editor for Common Lisp.
<beach> But maybe you want to parse some other kind of text.
<remexre> with quicklisp, what's the best way to accomodate a local fork? if I clone into local-projects, is that sufficient?
yoeljacobsen has joined #lisp
sindan has quit [Remote host closed the connection]
sindan has joined #lisp
bjorkintosh has quit [Quit: Leaving]
bjorkintosh has joined #lisp
<ck_> yes
leb has joined #lisp
ravenous_ has joined #lisp
gravicappa has joined #lisp
ravenous_ has quit [Ping timeout: 252 seconds]
<beach> LdBeth: What is it that you are thinking of doing?
<LdBeth> beach: it’s a tool integrates specification, documents, and program source code
<beach> And what editor are you planning to modify?
<LdBeth> Actually I have several candidates for operation model, but none of them has the desirable data structure
jeosol has quit [Remote host closed the connection]
<beach> So that confirms my suspicion that you may have to make significant modifications for it to work.
torbo has quit [Remote host closed the connection]
<beach> And what language is used for the program source code?
<LdBeth> It was planned to be Common Lisp, but some additional features should be added as some kinds of preprocessor and certain usages, especially some create affects to compilation has to be restricted
<LdBeth> But the output should be regular CL code accepted
<beach> I think I see.
<LdBeth> The addition could be a more sophisticated module system, a documentation markup, a #+ #- alternatives controlled by more than features
a7f4 has quit [Ping timeout: 246 seconds]
a7f4 has joined #lisp
yoeljacobsen has quit [Ping timeout: 258 seconds]
karlosz has quit [Quit: karlosz]
<remexre> is there an equivalent of scheme's assp in the CL standard?
<loke> What does it do?
<remexre> e.g. (assp #'evenp '((1 x) (2 y) (3 z))) => (2 y)
<loke> remexre: (remove-if-not #'evenp THE-LIST :key #'car)
<remexre> isn't that mutating? or is it just misleadingly named? :P
<loke> No, the mutating version is called DELETE
<remexre> also just found assoc-if, which looks like it does that
<remexre> huh, ok
<loke> assoc finds the first element. remove-if-not returns all elements that matches
<loke> It wasn't clear from your example what you wanted.
froggey has quit [Ping timeout: 245 seconds]
<remexre> er yeah, I just want/assp just returns the first
<loke> assoc it is then
<loke> Or FIND
<loke> FIND is more general.
<loke> (or FIND-IF in your case)
<remexre> I guess assoc-if to avoid having to specify a key function lol
froggey has joined #lisp
frodef has joined #lisp
<loke> remexre: Pretty much. I think this mix of functions is for historical reasons. There was a desire to be compatible with Maclisp/Interlisp/etc so in some cases you got slightly different functions that could be just one.
<remexre> i dunno, I'm kinda a fan of having a decent number of shorter aliases
<loke> first/car for example, or the three different ways of defining accessors
<remexre> I'm more peeved about the map/mapc/mapcar/etc family :P
<loke> remexre: Creating more aliases is easy enough :-)
<loke> remexre: No disagreement from me there.
orivej has joined #lisp
Inline has quit [Quit: Leaving]
<LdBeth> Nay
Oladon has quit [Quit: Leaving.]
<remexre> is it generally considered better style to do #'(lambda ...) or (lambda ...)?
<remexre> (As I understand it, the latter expands to the former?)
<loke> Yes
<loke> It's purely stylistic. I used to go with the former, but most lispers use the latter so I switched.
<remexre> okay, I've been using the latter to avoid the extra two characters :p CLHS mainly uses the former, so I just wanted to be sure that it wasn't frowned upon or anything
<loke> I've seen both. Bot the simple form definitely dominates
<loke> I think the thing that ticks most lispers off is the use of camelCasing and putting ) on its own line.
<loke> You show code that does that and no one will help you :-)
<remexre> lol
<loke> (defun SomeFunction (my_arg) ...)
<loke> it was painful just typing that
rople has joined #lisp
<remexre> heh
dddddd has quit [Remote host closed the connection]
rople has quit [Ping timeout: 245 seconds]
scymtym has quit [Remote host closed the connection]
ssake has joined #lisp
jeosol has joined #lisp
ggole has joined #lisp
nanoz has joined #lisp
jprajzne has joined #lisp
JohnMS_WORK has joined #lisp
<seok> which eql is used for (case ..)?
<seok> it does not seem to work with strings
<ck_> seok: "which eql"? Well, eql. You can macroexpand-1 it to find out yourself.
<seok> yeah, i found string-case on quicklisp
<seok> unfortunately alexandria's switch conflicts with parenscripts's switch
<beach> seok: Don't :USE packages other than COMMON-LISP for that reason.
<beach> seok: The code is much more clear if you use explicit package prefixes for symbols in packages other than the current one and the COMMON-LISP package.
<beach> seok: Otherwise, you would put too much of a burden on library authors. You would require them to make sure that not a single exported symbol they use must conflict with any other exported symbol in any other library.
<beach> seok: And of course, that would render the Common Lisp package system completely useless.
<beach> seok: Furthermore, by :USE-ing a package in a library, you might get into future trouble. When a new version of the package comes out, more symbols may be exported, and your code may break due to conflicts that didn't occur with the previous version.
<no-defun-allowed> I've usually considered Alexandria and split-sequence trivial and stable enough that using them poses no impact to clarity or burden to the reader, but if you must avoid prefixes, then use :import-from and be safe.
<beach> Still, you would need to know every exported symbol of the package you use, and something as general as Alexandria may contain lots of them. Otherwise, things can become very strange indeed. Consider a definition such as (defclass foo ((.... :reader bar))) You may very well get an error message saying that you attempt to define a method BAR on a generic function that takes more than one parameter.
<beach> ... if it so happens that you did not know that BAR was an exported symbol in the Alexandria, and it is defined to be a generic function.
<beach> Even if it has not function definition on it, you will get error messages referring to ALEXANDRIA:BAR, even though you defined it in your own package.
vlatkoB has joined #lisp
schweers has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
<beach> One more reason: Given the mediocre tools we have for refactoring, if you use explicit package prefixes, you can much more easily find all the occurrences of some symbol using tools such as `grep'.
<beach> So even in a project such as SICL, containing many packages, I don't even :USE other SICL packages, even though I am in perfect control of them.
<beach> I have found this practice to be a great help when I need to refactor code.
<beach> One more reason: If your memory starts getting worse, which is inevitable over time, if you look at a symbol without a package prefix in some code of yours, it is not obvious that you can remember where it was defined, so at the very least, you need to consult SYMBOL-PACKAGE to find out. But that breaks the "flow" when you are reading code. I am using "you" to mean "one", not you personally.
<beach> So my current practice is the result of having all the problems listed above at some point in time.
<remexre> Can I give a lambda an ftype? Didn't see any way to from a quick peek in clhs
lalitmee has joined #lisp
<beach> clhs ftype
<flip214> remexre: don't think so... ftype requires a function name. but you could use a gensym for the function name, then it's possible.
<beach> remexre: FTYPE is for the function namespace,
<flip214> depending on the implementation it might be "good enough" to specify the output type, eg. via (THE FIXNUM ...).
<remexre> I guess, is there any way to get sbcl to give my type warnings :)
<remexre> other whan (with-gensyms (name) `(flet (,name (...) (declare) ...) ,name)), I guess
<remexre> than*
<beach> remexre: You can use the FUNCTION type specifier.
leb has quit []
<remexre> and do (the (function ...) (lambda ...)) ?
<beach> That should work, yes.
<beach> Wait, no maybe not.
<beach> The FUNCTION type is strange.
<beach> Because it is not generally possible to determine the type of a function.
<beach> But I don't quite understand why people are so obsessed with types.
<beach> I guess it must be a habit from using other languages with a static type system.
<remexre> I'm dealing with some particularly weird types :)
<remexre> higher-order functions returning higher-order functions
<beach> Then even more reasons not to attempt to declare those types.
<remexre> they are compatible with a normal hindley-milner type system, I'm just noticing myself making lots of mistakes
hasebastian has joined #lisp
<beach> It is not easy to try to turn Common Lisp into ML or Haskell.
<remexre> fair
<remexre> like really I could probably get all the forcing-correct-usage I want by adding syntactic checking with a macro :P
<remexre> I guess (funcall (the (function (fixnum) t) (lambda () 1))) "asdf") does give me a warning though, at least
FennecCode has quit [Quit: ERC (IRC client for Emacs 26.2)]
<beach> remexre: Perhaps a silly question, but if static typing and compile-time reporting of type violations are such important features for you, why have you chosen to write your code in Common Lisp?
<remexre> SLIME is honestly a killer feature for me
<remexre> (well, slimv, but same difference)
<remexre> and I've been doing lisp for a couple months and this is actually the first time I've gone down the "okay I want ahead-of-time type warnings" road, so
* remexre shrugs
<LdBeth> z
<LdBeth> That's why people become multilingual
<remexre> yeah, I'm coming from a haskell/rust background; this lib needs to do stuff with MOP and stuff though, so I don't wanna do it as a polyglot library or anything
<LdBeth> o, well, typed racket has pretty good type inference
<remexre> though I did play around with ABCL on graalvm, and it only took like a week to be able to dynamically load C code and call it from lisp
<LdBeth> althought it's reeally SLOW for some reason
<remexre> there's a lot of weirdness with LLVM on GraalVM though
<remexre> yeah, in theory racket's getting a new, faster backend soon
<remexre> the main racket language I've messed with is Pie, which isn't production-grade at all
<remexre> if you type 1000000000 into the REPL, it allocates a few gigs of memory
<LdBeth> they find the new backend eats lots of mem and CPU
<remexre> darn
makomo has joined #lisp
<remexre> maybe they'll get (declare (optimize *)) or (declare (compilation-speed *))
<flip214> remexre: as you're a vim user, I'd like to tell you about vlime as well
<LdBeth> remexre: actually in CL you usually want to write the type as the argument name
<remexre> flip214: oh, does it do async? might switch to that tomorrow, even; bookmarking!
ravenous_ has joined #lisp
<remexre> LdBeth: like (defun foo ((x fixnum)))? I didn't think that worked
<LdBeth> so you intution check that when slime prompts arglist
<remexre> oh
<remexre> like (defun bar (pred list))
<LdBeth> remexre: no, it's like (defun foo (nat) ...)
<LdBeth> yes
<remexre> yeah, my types are like (function ((function (list) fixnum) fixnum) state) though :P
<LdBeth> higher order function has penality in CL
hasebastian has quit [Quit: Konversation terminated!]
makomo has quit [Ping timeout: 252 seconds]
phoenixjj has joined #lisp
<remexre> yeah, I'm porting code from a paper thou
makomo has joined #lisp
<remexre> though*
<LdBeth> if the type has certain schemes, you may encode the argments into a structure
<remexre> I've been using lots of deftypes for now
<LdBeth> and turn on typecheck on slots of structs
<remexre> like just specify a :type ? or is there something else?
orivej has quit [Ping timeout: 258 seconds]
<LdBeth> right
scymtym has joined #lisp
a7f4 has quit [Quit: leaving]
v0|d has quit [Ping timeout: 258 seconds]
superkumasan has quit [Ping timeout: 245 seconds]
Insanity_ has joined #lisp
gabbiel has joined #lisp
gabbiel has left #lisp [#lisp]
steiner has joined #lisp
steiner has quit [Remote host closed the connection]
hhdave has joined #lisp
lalitmee has quit [Ping timeout: 245 seconds]
igemnace has quit [Quit: WeeChat 2.5]
lalitmee has joined #lisp
cosimone has joined #lisp
igemnace has joined #lisp
phoenixjj has quit [Ping timeout: 260 seconds]
ravenous_ has quit [Ping timeout: 264 seconds]
Ricchi has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
<no-defun-allowed> Silly question: is it possible to pass a condition to another thread which presumably has a handler for that condition using bordeaux-threads?
<scymtym> no-defun-allowed: you could INTERRUPT-THREAD the other thread with (lambda () (signal CONDITION)). this has a semi-decent chance of working as long as the handler doesn't transfer control. if possible, i would go for a more traditional inter-thread communication solution, though
Lord_of_Life has joined #lisp
<no-defun-allowed> (bt:interrupt-thread <thread> (lambda () (error ...))) seems good, but the docstring suggests I better use that sparingly.
<scymtym> if you use ERROR to signal the condition, there will be a control transfer. that is the really unsafe part
dale has quit [Quit: My computer has gone to sleep]
<scymtym> for example, if the thread being interrupted is doing (with-open-file (stream …) …) which expands to something like (let ((stream (open …))) (unwind-protect … (when stream (close stream)))), it could be interrupted between completing the OPEN call and assigning the result to STREAM, so you would leak the stream when transferring control at that point, even if the UNWIND-PROTECT's clean-up code
<scymtym> is executed
<no-defun-allowed> Wait, (error) is different to (signal (make-condition 'simple-error ...))?
Cymew has joined #lisp
<scymtym> yes, SIGNALed conditions don't affect the "main" control flow if not handled. conditions signaled with ERROR do
<jackdaniel> preferably you'd have a dynamically bound variable *finish* and setf it in the interrupt. your thread would be responsible to probe it in safe points
<no-defun-allowed> Righteo.
<no-defun-allowed> That should work fine, since I'm already using a kind of message passing scheme. The control thread sends a message down the connection and waits on a condition variable, then a handler thread takes the response and dispatches on it, eventually notifying the control thread.
<flip214> no-defun-allowed: you could push such signals onto a queue and have the other thread process them serially, without interrupting them
<no-defun-allowed> Yeah.
cosimone has quit [Quit: Leaving]
lalitmee has quit [Ping timeout: 258 seconds]
Necktwi has quit [Ping timeout: 258 seconds]
Achylles has joined #lisp
hhdave has quit [Ping timeout: 244 seconds]
hhdave has joined #lisp
akoana has left #lisp ["Leaving"]
amerlyq has joined #lisp
kamog has joined #lisp
orivej has joined #lisp
gjvc has quit [Remote host closed the connection]
prxq has joined #lisp
esrse has quit [Ping timeout: 258 seconds]
elinow has joined #lisp
frgo has quit [Ping timeout: 258 seconds]
v88m has quit [Ping timeout: 244 seconds]
EvW1 has joined #lisp
v88m has joined #lisp
djeis[m] has quit [Remote host closed the connection]
munksgaard[m] has quit [Read error: Connection reset by peer]
keep-learning[m] has quit [Write error: Connection reset by peer]
katco has quit [Write error: Connection reset by peer]
malaclyps[m] has quit [Write error: Connection reset by peer]
Godel[m] has quit [Write error: Connection reset by peer]
dtw has quit [Read error: Connection reset by peer]
hiq[m] has quit [Remote host closed the connection]
nonlinear[m] has quit [Write error: Connection reset by peer]
no-defun-allowed has quit [Write error: Connection reset by peer]
sciamano has quit [Write error: Connection reset by peer]
LdBeth has quit [Remote host closed the connection]
eriix[m] has quit [Remote host closed the connection]
akanouras has quit [Remote host closed the connection]
liambrown has quit [Write error: Broken pipe]
Jachy has quit [Remote host closed the connection]
iarebatman has quit [Remote host closed the connection]
v88m has quit [Ping timeout: 244 seconds]
akanouras has joined #lisp
even4void has joined #lisp
<thijso> I'm playing around with creating a DHT in lisp. I've searched google, and the only one I found was 8 years old (locutus: https://github.com/tritchey/locutus). Any others out there? An annoyance when searching google is that LISP in the networking world also stands for "Locator/ID Separation Protocol", so some results are completely irrelevant...
ljavorsk has joined #lisp
even4void has quit [Client Quit]
even4void has joined #lisp
even4void has quit [Client Quit]
no-defun-allowed has joined #lisp
<no-defun-allowed> DHT -> distributed hash table?
<thijso> no-defun-allowed: yep
<thijso> specifically, the kademlia type
<no-defun-allowed> I have a project that implements something like a DHT, but I'm missing any kind of routing that lets a client get data from a server it's not connected to directly.
even4void has joined #lisp
even4void has quit [Remote host closed the connection]
<no-defun-allowed> Oh, I don't really understand the routing tricks involved in actual overlay networks, so I couldn't point you to any implementations of them, sorry.
even4void has joined #lisp
even4void has quit [Client Quit]
even4void has joined #lisp
even4void has quit [Client Quit]
hhdave has quit [Ping timeout: 245 seconds]
even4void has joined #lisp
v88m has joined #lisp
<no-defun-allowed> What I have isn't a DHT at all. Dammit.
frgo has joined #lisp
gareppa has joined #lisp
even4void has quit [Remote host closed the connection]
v88m has quit [Ping timeout: 276 seconds]
<no-defun-allowed> So, I'm reading the paper <http://www.scs.stanford.edu/~dm/home/papers/kpos.pdf>, and it doesn't describe how to go from node IDs to object IDs. Is the paper just about how to get to a node that has a close ID to the one you are looking for?
<no-defun-allowed> All I read about that is "Participating computers each have a node ID in the 160-bit key space. ⟨key,value⟩ pairs are stored on nodes with IDs “close” to the key for some notion of closeness."
even4void has joined #lisp
LdBeth has joined #lisp
dtw has joined #lisp
liambrown has joined #lisp
sciamano has joined #lisp
eriix[m] has joined #lisp
Godel[m] has joined #lisp
katco has joined #lisp
iarebatman has joined #lisp
Jachy has joined #lisp
djeis[m] has joined #lisp
nonlinear[m] has joined #lisp
malaclyps[m] has joined #lisp
keep-learning[m] has joined #lisp
munksgaard[m] has joined #lisp
hiq[m] has joined #lisp
even4void has quit [Remote host closed the connection]
even4void has joined #lisp
even4void has quit [Remote host closed the connection]
<no-defun-allowed> thijso: Thanks for pointing out the algorithm to me, it doesn't seem terribly hard to integrate with my work.
Josh_2 has quit [Remote host closed the connection]
EvW1 has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
Necktwi has joined #lisp
Necktwi has quit [Client Quit]
Necktwi has joined #lisp
Achylles has quit [Ping timeout: 252 seconds]
ebrasca has quit [Read error: No route to host]
xkapastel has joined #lisp
random-nick has joined #lisp
Achylles has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
lalitmee has joined #lisp
lucasb has joined #lisp
mpcjanssen has joined #lisp
lalitmee has left #lisp ["Leaving"]
<thijso> no-defun-allowed: the idea is that the system is robust, you send STORE rpcs to the x closest nodes to the object ID
<thijso> no-defun-allowed: so the data should be stored at multiple nodes
<thijso> no-defun-allowed: then the FIND-VALUE rpc retrieves it, and any nodes that have the data will return it (instead of giving a list of closer nodes, which the ones that don't have it do)
nanoz has quit [Ping timeout: 252 seconds]
schjetne has joined #lisp
wxie has joined #lisp
dddddd has joined #lisp
ljavorsk has quit [Ping timeout: 246 seconds]
schjetne has quit [Ping timeout: 245 seconds]
t58 has joined #lisp
yoeljacobsen has joined #lisp
wxie has quit [Remote host closed the connection]
seok13 has joined #lisp
<seok13> hello
seok13 has quit [Remote host closed the connection]
seok36 has joined #lisp
<seok36> is there any library to validate json?
<seok36> like json-p
gareppa has quit [Quit: Leaving]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
Inline has joined #lisp
<ck_> cl-json has a jsonp
<ck_> hmm, or used to have -- at least the documentation on common-lisp.net contains it
Insanity_ has quit [Quit: Connection closed for inactivity]
jeosol has quit [Remote host closed the connection]
davr0s_ has joined #lisp
davr0s has quit [Ping timeout: 244 seconds]
davr0s__ has quit [Ping timeout: 244 seconds]
davr0s has joined #lisp
nanoz has joined #lisp
<beach> I so wish people wouldn't describe what functionality they need in some Common Lisp software by referring to software they know in a different language.
<seok36> ck_: I use yason but the documentation seems to be down
<seok36> cl-json does seem to have jsonp Ill try that out
<thijso> Can I redefine a defun in one package from withing another package?
<thijso> *within
<seok36> sure
<beach> thijso: Functions don't belong to packages.
<thijso> context: I have a system that does stuff using rpc calls over udp, but for testing I want to simulate a bunch of stuff, skipping the udp calls themselves.
<beach> thijso: So as long as you use the right name, which is a symbol, you can redefine a function from anywhere.
<thijso> beach: so how would I do that? Just setf the full function name to some other function name?
<beach> thijso: So let me see if I understand...
awolven is now known as clothespin
<beach> thijso: So you have some function F, and you are not happy with how it is defined.
<beach> thijso: And, did I understand your last remark as your also having a function G, which is the right thing for F.
<beach> And now you want to change the definition of F so that G is called instead?
<beach> Because, if all you want is to redefine F, you can just do (defun F ...).
<thijso> Actually, yes, but since function G is in my test env, I just now did (defun <package_name>::F () .. and it seems to work
<thijso> Yeah, thanks
<beach> Sure.
<beach> Or you can do (setf (fdefinition 'F) (fdefinition 'G)) if you just want F to be the same function as G.
<beach> Again, with F and G being the correct symbols for naming those functions.
clothespin has quit [Ping timeout: 258 seconds]
libertyprime has quit [Quit: leaving]
jprajzne has quit [Quit: Leaving.]
schjetne has joined #lisp
<pjb> thijso: (defpackage "A" (:use) (:export "F")) (defpackage "B" (:use "CL")) (in-package "B") (defun a:f () 'foo) (in-package "CL-USER") (a:f) #| --> b::foo |#
cosimone has joined #lisp
<pjb> thijso: but instead of redefining stuff, you could just use a different package with your own functions.
prxq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
davr0s has quit [Remote host closed the connection]
davr0s_ has quit [Remote host closed the connection]
<thijso> Thanks, beach, pjb.
hhdave has joined #lisp
stepnem has quit [Ping timeout: 246 seconds]
stepnem_ has joined #lisp
jmercouris has joined #lisp
jmercouris has quit [Remote host closed the connection]
manualcrank has joined #lisp
rippa has joined #lisp
learning has joined #lisp
schjetne has quit [Ping timeout: 245 seconds]
nika has joined #lisp
Lycurgus has joined #lisp
Achylles has quit [Remote host closed the connection]
<Lycurgus> is there anything like a free version of allegro active objects, without the gui and windows systems stuff?
<Lycurgus> (I will see a response in the public log if it comes much later)
Achylles has joined #lisp
schweers has quit [Ping timeout: 264 seconds]
nika has quit [Ping timeout: 244 seconds]
orivej has quit [Ping timeout: 245 seconds]
nika has joined #lisp
yoja has joined #lisp
elinow has quit [Read error: Connection reset by peer]
<pjb> Lycurgus: Neither Google nor I know what allegro active objects are.
<Lycurgus> well perhaps you don't
yoeljacobsen has quit [Ping timeout: 244 seconds]
<Lycurgus> the first SE result is in reference to it's use with some atlassian product
<Lycurgus> that may be someone else's active objects
Lycurgus has quit [Quit: Exeunt]
learning has quit [Remote host closed the connection]
nika has quit [Quit: quit...]
Lycurgus has joined #lisp
<Lycurgus> nvm, equivocation on my part, realize I already have it and it's not an allegro product
Lycurgus has quit [Client Quit]
Lycurgus has joined #lisp
<Lycurgus> and ty, pjp
Lycurgus has quit [Remote host closed the connection]
frodef has quit [Ping timeout: 245 seconds]
Bike has joined #lisp
sahara3 has joined #lisp
<beach> sahara3: Please don't give links without also describing what they refer to.
<sahara3> ok
varjag has joined #lisp
learning has joined #lisp
hhdave has quit [Quit: hhdave]
<beach> So are you planning to tell us?
gioyik has joined #lisp
varjag has quit [Read error: Connection reset by peer]
<pjb> sahara3: don't confuse #lisp with #lispcafe
<beach> pjb: So far, sahara3 has not uttered one single thing that was on topic.
sahara3 has left #lisp [#lisp]
shifty has quit [Ping timeout: 252 seconds]
_leb has joined #lisp
Oladon has joined #lisp
C-Keen has quit [Quit: WeeChat 2.4]
Alexandre has joined #lisp
Alexandre has quit [Remote host closed the connection]
jeosol has joined #lisp
nanoz has quit [Ping timeout: 244 seconds]
orivej has joined #lisp
nanoz has joined #lisp
frodef has joined #lisp
frodef has quit [Ping timeout: 245 seconds]
torbo has joined #lisp
Lycurgus has joined #lisp
<Lycurgus> s/pjp/pjb/ ; I stopped it as soon as I saw the cross. Dunno if anything lisp related came later.
frgo_ has joined #lisp
frodef has joined #lisp
frgo has quit [Ping timeout: 264 seconds]
frgo_ has quit [Ping timeout: 245 seconds]
wilfredh has quit [Quit: Connection closed for inactivity]
iovec has joined #lisp
_leb has quit []
Krystof has quit [Ping timeout: 245 seconds]
schjetne has joined #lisp
leb has joined #lisp
leb has quit [Client Quit]
Lycurgus has quit [Quit: Exeunt]
schjetne has quit [Ping timeout: 264 seconds]
renzhi has joined #lisp
yoja has quit [Ping timeout: 245 seconds]
vyorkin has joined #lisp
Oladon has quit [Quit: Leaving.]
vlatkoB has quit [Remote host closed the connection]
Volt_ has quit [Quit: exit();]
schjetne has joined #lisp
schjetne has quit [Ping timeout: 264 seconds]
random-nick has quit [Ping timeout: 258 seconds]
nostoi has joined #lisp
mindCrime_ has joined #lisp
karlosz has joined #lisp
Oladon has joined #lisp
ravenous_ has joined #lisp
learning has quit [Remote host closed the connection]
nostoi has quit [Quit: Verlassend]
nostoi has joined #lisp
learning has joined #lisp
spoeplau has joined #lisp
khisanth_ has quit [Ping timeout: 244 seconds]
varjag has joined #lisp
dale has joined #lisp
cosimone has quit [Quit: Leaving]
Oladon has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
khisanth_ has joined #lisp
Oladon has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
karlosz has quit [Quit: karlosz]
nostoi has quit [Quit: Verlassend]
ikki has joined #lisp
learning has quit [Remote host closed the connection]
cosimone has joined #lisp
learning has joined #lisp
learning_ has joined #lisp
learning has quit [Ping timeout: 245 seconds]
ggole has quit [Quit: Leaving]
scymtym has quit [Ping timeout: 264 seconds]
gigetoo has quit [Ping timeout: 245 seconds]
gigetoo has joined #lisp
gravicappa has quit [Ping timeout: 258 seconds]
momozor has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<momozor> Hi, how do I load a system and invoke an external function at runtime?
<momozor> What I am thinking is this..
<momozor> (ql:quickload :system-blah)
<momozor> (:system-blah:foo)
<momozor> I can actually quickload a system at runtime, but cannot invoke the function via (system-blah:foo)
MrBusiness3 has joined #lisp
<pjb> momozor: that's because you are confusing systems with packages. systems may contain files that when loaded will define 0, 1 or more packages. Then names of the systems and of the packages are totally unrelated.
<pjb> momozor: said otherwise, read the doc!
<pjb> momozor: or, also, notice how quicklisp will diplay the name of the packages that are defined by a system while you are compiling it.
MrBismuth has quit [Ping timeout: 264 seconds]
spoeplau has quit [Ping timeout: 250 seconds]
<momozor> pjb: alright. thanks.
momozor has quit [Quit: Leaving]
amerlyq has quit [Quit: amerlyq]
iovec has quit [Quit: Connection closed for inactivity]
hiq[m] has quit [*.net *.split]
munksgaard[m] has quit [*.net *.split]
Jachy has quit [*.net *.split]
djeis[m] has quit [*.net *.split]
nonlinear[m] has quit [*.net *.split]
nanozz has joined #lisp
scymtym has joined #lisp
nanoz has quit [Ping timeout: 245 seconds]
djeis[m] has joined #lisp
nonlinear[m] has joined #lisp
hiq[m] has joined #lisp
munksgaard[m] has joined #lisp
whartung has quit [Ping timeout: 246 seconds]
Jachy has joined #lisp
Jachy has joined #lisp
nanozz has quit [Ping timeout: 245 seconds]
sonologico has joined #lisp
sonologico has quit [Remote host closed the connection]
varjag has quit [Ping timeout: 246 seconds]
sonologico has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<thijso> I feel like I'm missing something simple. I've been looking at docs too long maybe. So maybe someone here can shortcut my brain onto the right path. How can I convert hexadecimal into bitvectors (and vice versa)? I'm now looking at (format "~b" something) and then splitting that into characters to push on the bitvector somehow? That seems like the wrong way to go about it...
<moldybits> convert a hexadecimal? you mean the ascii characters? or do you mean going from a hexadecimal string to a number to a bitvector of that number?
<thijso> from a hex string to bitvector, so the second, I guess
<pjb> The only way to store to bit-vectors is (setf (aref bv index) 0) or (setf (aref bv index) 1)
<pjb> There are several ways to get a bit from an integer. There's logbitp, which returns an integer. There's ldb which can return a bit.
<pjb> So you can do: (let ((n (random 1000000))) (loop with bv = (make-array (integer-length n) :element-type 'bit) for i below (integer-length n) do (setf (aref bv i) (ldb (byte 1 i) n)) finally (return bv))) #| --> #*10101000111111110001 |#
<moldybits> and parse-int for parsing the hex to a number
<moldybits> parse-integer
<pjb> Finally, you can convert from hexadecimal to integer with parse-integer, indeed.
<pjb> (let ((n (random 1000000))) (let ((hex (format nil "~X" n))) (let ((n (parse-integer hex :radix 16.))) (loop with bv = (make-array (integer-length n) :element-type 'bit) for i below (integer-length n) do (setf (aref bv i) (ldb (byte 1 i) n)) finally (return bv))))) #| --> #*11101010001011011101 |#
<moldybits> s/16./16/
<pjb> Nope.
<moldybits> no?
<pjb> 16. is sixteen. 16 depends on *read-base*.
<moldybits> oh
<thijso> Thanks, pjb.
<moldybits> never seen that
<pjb> Yes, it's a funny thing with CL, integers can be written in base ten by suffixing them with a dot.
<moldybits> that's cool :p
<thijso> while one would think that a dot signifies a float or something like that
<thijso> interesting to know
sonologico has quit [Remote host closed the connection]
<pjb> They call it a DECIMAL point.
<thijso> Yeah, but usually it's used when it's *not* an integer
mindCrime_ has quit [Ping timeout: 244 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<thijso> Hmmm... that converts "d6" to #*01101011, and not #*10110110 as I would expect. The two digits are switched around.
Oladon has quit [Quit: Leaving.]
Krystof has joined #lisp
learning_ has quit [Remote host closed the connection]
<pjb> thijso: bit-vectors are indexed from 0 up from left to right. Just like any vector
<pjb> thijso: numbering of bits in integers is more logically performed from least significant bit up to most significant bit: n = Σ di * 2^i
<pjb> thijso: so perhaps you should revise your expecations.
learning has joined #lisp
<pjb> thijso: (this is writing numbers with the most significant digit first that is idiotic; in German, you SAY the units digit before the tens digit).
<pjb> thijso: now, if you really insist on storing the most significant bit in the least index of the bit vector, you can always add a (- n i) to the indexing.
<pjb> or rather (- (integer-length n) i)
<thijso> yeah, I was looking into that, thanks for the pointer.
<pjb> (- (integer-length n) i 1) actually if you (make-array (integer-length n) :element-type 'bit)
<pjb> or perhaps (- (array-dimension bv 0) i 1).
<saturn2> do you want the bits reversed or just the hex digits?
spoeplau has joined #lisp
<thijso> I want the bit vector to line up with the hex digits, so that would mean "d6" would be converted as #*10110110
<pjb> (let ((n #xd6)) (loop with bv = (make-array (integer-length n) :element-type 'bit) for i below (integer-length n) do (setf (aref bv (- (array-dimension bv 0) i 1)) (ldb (byte 1 i) n)) finally (return bv))) #| --> #*11010110 |#
<pjb> and this is what you would get, not the silly #*10110110
<pjb> If you want to decrease the index on hex digits, but increase it on bits, you will have a more complex formula.
<pjb> You can always use random-permutation too…
EvW has joined #lisp
hiroaki_ has joined #lisp
<pjb> For example, you can do: (let ((n #xd6)) (let ((hex (reverse (format nil "~X" n)))) (let ((n (parse-integer hex :radix 16.))) (loop with bv = (make-array (integer-length n) :element-type 'bit) for i below (integer-length n) do (setf (aref bv i) (ldb (byte 1 i) n)) finally (return bv))))) #| --> #*1011011 |#
<pjb> but notice we have then 7 bits :-)
<pjb> Or, you can do: (let ((n #xd6)) (let ((hex (reverse (format nil "~X" n)))) (let ((n (parse-integer hex :radix 16.))) (loop with bv = (make-array (* 4 (ceiling (integer-length n) 4)) :initial-element 0 :element-type 'bit) for i below (integer-length n) do (setf (aref bv i) (ldb (byte 1 i) n)) finally (return bv))))) #| --> #*10110110 |#
<thijso> Sorry, I had a typo in my stuff... of course d6 should be 1101 0110 and not 1011 0110
hiroaki has quit [Ping timeout: 246 seconds]
igemnace has quit [Ping timeout: 258 seconds]
<pjb> Don't be sorry, you can ask any dumb thing. CL can provide.
cosimone has quit [Quit: Leaving]
<thijso> Hah! I see that. But I am sorry, because the reversal of 0110 is of course 0110... still 6. D (i.e. 13) is not 1011, its 1101
<thijso> So it looked like I was asking for the weird complete reversal (but not really), while you already gave me the right one
jdz has quit [Ping timeout: 258 seconds]
cosimone has joined #lisp
jdz has joined #lisp
hiroaki_ has quit [Ping timeout: 245 seconds]
spoeplau has quit [Ping timeout: 258 seconds]
cosimone_ has joined #lisp
renzhi has quit [Ping timeout: 245 seconds]
cosimone has quit [Ping timeout: 250 seconds]
hiroaki_ has joined #lisp
vyorkin has quit [Remote host closed the connection]
<White_Flame> pjb: technically, it's a "radix point". only in common use & vernacular is it a decimal point
<White_Flame> and since CL doesn't have non-base10 radix fixed- or floating-point numbers, a radix point always implies decimal
cosimone_ has quit [Client Quit]
Achylles has quit [Remote host closed the connection]
learning_ has joined #lisp
learning has quit [Ping timeout: 246 seconds]
ltriant has joined #lisp
iovec has joined #lisp
karlosz has joined #lisp
karlosz has quit [Client Quit]
karlosz has joined #lisp
Cymew has quit [Ping timeout: 252 seconds]
Cymew has joined #lisp
aeth has quit [Ping timeout: 246 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
grumble has quit [Quit: 𝑽𝒆𝒍𝒐𝒄𝒊𝒓𝒂𝒑𝒕𝒐𝒓]
techquila has quit [Remote host closed the connection]
grumble has joined #lisp
t58 has quit [Quit: Night.]
ikki has quit [Ping timeout: 244 seconds]
EvW has quit [Ping timeout: 250 seconds]
karlosz has joined #lisp
karlosz has quit [Quit: karlosz]
dxtr has joined #lisp
poet has joined #lisp
leb has joined #lisp
frodef has quit [Ping timeout: 245 seconds]
Krystof has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
Oladon has joined #lisp
leb has quit []
manjaroi3 has joined #lisp
<fengshaun> is it possible to compile a CL program statically like e.g. go static binaries?
hiroaki_ has quit [Ping timeout: 258 seconds]
<fengshaun> or like c with musl
poet has quit [Ping timeout: 264 seconds]
<no-defun-allowed> You can use your implementation's image-dumping functionality to write out an image, but that would still have dynamic links to libc at least.
<no-defun-allowed> Maybe ECL can make static programs.
<fengshaun> thanks, I will check out ecl
<pjb> Compilation is always a "statical" transformation.
<pjb> But to make static libraries, yes ecl would be the go-to implementation.
<pjb> Now if you just want an executable, almost all implementation can generate an executable image. But not ecl. Ecl can only link into an elf binary. Which cannot be purely static, since it has to use libecl.so and libc.so
<pjb> (but then, executable images too, so…)
<pjb> Nowadays it's very hard to make a static binary…
<fengshaun> so looks like I need to install the runtime separately regardless
<White_Flame> python, bash, java, javascript, etc all get by without generally making an executable too
<fengshaun> yea, I'm aware
gabbiel has joined #lisp
<gabbiel> so is there really no flet/labels equivalent to methods?
superkumasan has joined #lisp
ebrasca has joined #lisp
Ricchi has quit [Remote host closed the connection]
<White_Flame> gabbiel: you could build on on top of gensym'd method names, so they'd only be locally accessed
<White_Flame> generic functions are intended to be runtime resolvable, though, so there's not going to be any consideration for compile-time method selection per call site
lucasb has quit [Quit: Connection closed for inactivity]
<gabbiel> i dont understand your second message