phoe 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.4.14, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
robotoad has quit [Quit: robotoad]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
robotoad has joined #lisp
torbo has joined #lisp
Kundry_Wag has joined #lisp
JetJej has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 258 seconds]
Bike has joined #lisp
benkard has quit [Ping timeout: 258 seconds]
robotoad has quit [Ping timeout: 272 seconds]
dale has quit [Quit: dale]
benkard has joined #lisp
robotoad has joined #lisp
makomo has quit [Ping timeout: 268 seconds]
rozenglass has quit [Remote host closed the connection]
nowhere_man has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
edgar-rft has joined #lisp
benkard has quit [Ping timeout: 258 seconds]
hectorhonn has joined #lisp
bzp has joined #lisp
benkard has joined #lisp
<hectorhonn> morning everyone
pierpal has quit [Ping timeout: 246 seconds]
Kundry_Wag has joined #lisp
<LdBeth> Morning
orivej has joined #lisp
benkard has quit [Ping timeout: 246 seconds]
benkard has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
orivej has quit [Ping timeout: 245 seconds]
resttime has joined #lisp
undiscov1 has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
esrse has joined #lisp
benkard has quit [Ping timeout: 258 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
benkard has joined #lisp
Essadon has quit [Quit: Qutting]
jack_rabbit has joined #lisp
jack_rabbit has quit [Max SendQ exceeded]
jack_rabbit has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
Selwyn has joined #lisp
Lycurgus has joined #lisp
benkard has quit [Ping timeout: 272 seconds]
dddddd has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
bzp has quit [Ping timeout: 272 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
Oladon has joined #lisp
benkard has joined #lisp
<drmeister> jasom: Thank you - I've found a work around for the problem.
frgo has quit [Remote host closed the connection]
karlosz has joined #lisp
robotoad has quit [Quit: robotoad]
Selwyn has quit [Ping timeout: 268 seconds]
dale has joined #lisp
Kundry_Wag has joined #lisp
megalography has joined #lisp
robotoad has joined #lisp
Lycurgus has quit [Quit: Exeunt]
Kundry_Wag has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #lisp
robotoad has quit [Quit: robotoad]
robotoad has joined #lisp
<beach> Good morning everyone!
space_otter has joined #lisp
xrash has quit [Read error: Connection reset by peer]
<housel> morning beach
<housel> Does anybody know why the SBCL boinkmarks are no longer being run?
<housel> (I know it's been gone for a few years, but I wasn't paying attention at the time)
xkapastel has joined #lisp
pfdietz has quit [Quit: pfdietz]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
sauvin has joined #lisp
dale has quit [Quit: dale]
gravicappa has joined #lisp
torbo has quit [Remote host closed the connection]
Lycurgus has joined #lisp
Lycurgus has quit [Client Quit]
pierpal has joined #lisp
findiggle has joined #lisp
ebrasca has quit [Remote host closed the connection]
findiggle has quit [Remote host closed the connection]
findiggle has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
karlosz has quit [Ping timeout: 246 seconds]
robdog has joined #lisp
robdog has quit [Read error: Connection reset by peer]
robdog has joined #lisp
shifty has quit [Ping timeout: 258 seconds]
vms14 has joined #lisp
Bike has quit [Quit: Lost terminal]
Oladon has quit [Quit: Leaving.]
thodg has joined #lisp
karlosz has joined #lisp
sloanr has joined #lisp
rippa has joined #lisp
Kundry_Wag has joined #lisp
frodef has joined #lisp
Kundry_Wag has quit [Ping timeout: 250 seconds]
_whitelogger has quit [Ping timeout: 250 seconds]
_whitelogger has joined #lisp
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
robdog_ has joined #lisp
deadghost has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 260 seconds]
robdog has joined #lisp
themsay has quit [Remote host closed the connection]
themsay has joined #lisp
akoana has joined #lisp
robdog_ has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
scymtym has quit [Ping timeout: 268 seconds]
benkard has quit [Ping timeout: 240 seconds]
flazh has quit [Ping timeout: 240 seconds]
JohnMS_WORK has joined #lisp
space_otter has quit [Remote host closed the connection]
status402 has joined #lisp
makomo has joined #lisp
Kundry_Wag has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
robotoad has quit [Quit: robotoad]
Kundry_Wag has quit [Ping timeout: 246 seconds]
status402 has quit [Read error: Connection reset by peer]
status402 has joined #lisp
robotoad has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
phoe has joined #lisp
Kundry_Wag has joined #lisp
<makomo> morning
Inline has quit [Quit: Leaving]
<no-defun-allowed> morning, makomo
<makomo> \o
<no-defun-allowed> o/
xkapastel has quit [Quit: Connection closed for inactivity]
Kundry_Wag has quit [Ping timeout: 268 seconds]
scymtym has joined #lisp
<flip214> short question: (defgeneric foo (a &key b)) (defmethod foo (a &key b) (or (call-next-method) 1))
<flip214> in SBCL I get a warning that the latter doesn't use "b" -- does the spec mandate that keyword args are not relayed by C-N-M?
<flip214> I'd have hoped that the whole argument list gets passed on, not just the required parameters
<flip214> Is there a simpler way than &rest and apply to avoid duplicating the argument names?
<shka__> flip214: &rest will include also &key
shifty has joined #lisp
<shka__> as for call-next-method, IIRC it will forward all arguments
karlosz has quit [Quit: karlosz]
<scymtym> flip214: (call-next-method) without arguments passes all arguments but that doesn't count as "using" non-required parameters
<flip214> scymtym: ah, thanks. why doesn't it? it's "using" them, after all!
frgo has joined #lisp
ifitzpatrick has joined #lisp
<flip214> sounds like a bug to me, if I'm being honest
<scymtym> flip214: no, the unused thing, b, is a variable that is bound to the corresponding argument. the argument can be passed along just fine without being bound to a variable
<flip214> scymtym: so I'll just make a &rest and declare it unused, thanks.
<flip214> still, C-N-M _effectively_ makes use of the _values_ that are passed in, so it's not as if they'd be dropped anyway; and the method needs a &rest to become compatible, too...
<shka__> flip214: try to setf one of the arguments to some specific value, call-next-method and check what you are getting there
themsay has quit [Ping timeout: 246 seconds]
permagreen has quit [Remote host closed the connection]
permagreen has joined #lisp
Kundry_Wag has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
<marvin2> shka__, I watched Maybe Not video you posted yesteday. Rich is a smart guy, but I wish he'd learn a few basic things about the type systems he likes to rag on
<marvin2> he uses the type declaration of haskell's reverse (reverse :: [a] -> [a]) function as an example where the types don't "communicate anything" and is "almost information-free". but they actually tell quite a bit. it says that reverse always returns the same result when given the same input, and doesn't do anything that would alter some global state of the program, system or world
equwal has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
<marvin2> it also says that reverse is a function that takes a list of anything and returns a list of the same type, and also says that the function's logic cannot depend on what the list contains. so, it cannot for example sort the elements. it can only operate on the list's structure
rozenglass has joined #lisp
<marvin2> so there is actually a lot valuable information in that type signature
plugd has joined #lisp
Kundry_Wag has joined #lisp
<jdz> marvin2: What do you mean it cannot sort the elements?
<ogamita> Automatic Equivalence Checking for Assembly Implementations of Cryptography Lib. <https://www.cs.rutgers.edu/~santosh.nagarakatte/papers/cgo19-casmverify-preprint.pdf>
<lieven> jdz: it doesn't require the type a to implement the Ord typeclass so it can't use < or similar on them
<jdz> Well, what about a function drops every other element from the list?
<jdz> *that drops
Kundry_Wag has quit [Ping timeout: 258 seconds]
<marvin2> jdz, that would fall under "operating on the list's structure" I mentioned above. [a] -> [a] function can drop or reorder the elements, or duplicate them, but it cannot rely on element's value to do so. there's no way to inspect, compare, or fetch the value of `a'
orivej has joined #lisp
xenon- has joined #lisp
<beach> What's the best term for the opposite of "automatic memory management"?
<beach> "manual..."?
<beach> "explicit..."?
<jdz> Fair enough. But still reverse and drop_every_other_element have the same type signature although the effects of the functions are very different.
<shka__> manual i would say
<beach> OK
<splittist> I vote 'manual', too
<no-defun-allowed> Wikipedia calls it "manual" memory management if that's a source you would take advice from.
<beach> Thanks.
<jprajzne> automatic / manual vs explicit / implicit
<jprajzne> if you have similar dilemma again :)
<beach> Heh, thanks.
<marvin2> jdz, [a] -> [a] type doesn't capture that diffrence, correct. but that is different than saying that the type "doesn't communicate anything" and is "almost information-free"
<jdz> marvin2: Right.
makomo has joined #lisp
makomo has quit [Ping timeout: 258 seconds]
<hectorhonn> suppose i wrote a defun. i then use this function in several files. now, i want to add a new argument to the defun. how do i have the compiler tell me where are the places i have to update? (like in a Java IDE)
<phoe> M-x slime-who-calls
<hectorhonn> phoe: i see. thanks
Kundry_Wag has joined #lisp
<xenon-> hi
<xenon-> what is lisp's equivalent of python's [[x,y] for x in [1,2,3] for y in [10,20,30]]?
<beach> xenon-: I don't know Python, but maybe (loop for x in '(1 2 3) append (loop for y in '(10 20 30) collect (cons x y)))
<xenon-> [[x,y] for x in [1,2,3] for y in [5,6,7]] gives [[1, 5], [1, 6], [1, 7], [2, 5], [2, 6], [2, 7], [3, 5], [3, 6], [3, 7]]
<beach> Then my solution is right.
<splittist> hectorhonn: if you want to do it programmatically, you can use swank directly, which is probably something like (swank-backend:who-calls symbol)
<xenon-> beach yes, it works
Kundry_Wag has quit [Ping timeout: 244 seconds]
<xenon-> why is first keyword append, not collect?
<hectorhonn> splittist: that's probably... beyond me *sweats*
<hectorhonn> haha
<beach> xenon-: Because the inner loop returns a list in each iteration, and the lists it returns must be appended.
<beach> xenon-: Try replacing append with collect and you will see.
<xenon-> got it
vms14 has quit [Quit: Leaving]
<xenon-> can loop return a lazy list, or an iterator, or something similar?
orivej has quit [Ping timeout: 268 seconds]
robdog has quit [Remote host closed the connection]
<beach> LOOP can return anything you want, but there is no automatic mechanism for list iterators if that is what you are asking.
robdog has joined #lisp
<splittist> xenon-: for that sort of thing you can look at Series
plugd has quit [Ping timeout: 250 seconds]
JohnMS_WORK has quit [Ping timeout: 268 seconds]
<xenon-> I'll take a look
megalography has quit [Ping timeout: 250 seconds]
<splittist> xenon-: this is one place to look: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node347.html
megalography has joined #lisp
<xenon-> so I'd change append/collect with appropriate functions for constructing that data structure? and other than that, loop will remain the same?
Kaisyu has quit [Quit: Connection closed for inactivity]
<phoe> xenon-: (alexandria:map-product #'list '(1 2 3) '(5 6 7))
<phoe> that's the functional version from the alexandria library
<phoe> ;=> ((1 5) (1 6) (1 7) (2 5) (2 6) (2 7) (3 5) (3 6) (3 7))
robdog has quit [Ping timeout: 250 seconds]
resttime has quit [Ping timeout: 250 seconds]
<beach> xenon-: What do you hope to gain by returning an iterator or a lazy list?
<loke> In APL, the same is written as such: ,1 2 3 °., 5 6 7
<beach> xenon-: Either way, you would probably have to experiment and read the manual. Series are not much used.
<xenon-> beach, to reduce memory usage on huge lists
<ogamita> Use vectors instead of lists then. You'll cut the overhead by 2.
<loke> xenon-: Are you actually having memory pressure? Measure, and I'm sure you'll actually be surprised.
<xenon-> vectors still hold all the elements in memory though
<xenon-> they are viable alternative in some but not all cases
<loke> xenon-: What's you actual use case? I'm not saying there are _no_ use cases, but actually needing series is quite rare, and usualyl people use lazy collections because it's a hammer asome people like to use to screw in bolts and cut the dinner steak.
<shka__> show the code
<xenon-> loke, parsing huge files, that won't fit in the memory
<loke> xenon-: I've done that a lot, and I never needed lazy collections for it.
<loke> You have some kind of generator function (READ-LINE is one such generator) and then just loop over the results.
<shka__> xenon-: could you please show your code?
<xenon-> no, because it was not written yet. I am exploring my options before tackling it
<shka__> ok
robdog has joined #lisp
jack_rabbit has quit [Ping timeout: 268 seconds]
frodef has quit [Ping timeout: 250 seconds]
jack_rabbit has joined #lisp
<shka__> xenon-: i have system called cl-data-structures, i am also using it for processing large files that won't fit in the memory, but in my case they are almost always stupid CSV files
<shka__> anyway, that's how it looks (it is ugly, because it is throw away code) https://gist.github.com/sirherrbatka/6afc7d19f9ccf6d3dcaf3f74fc3ee58e
flamebeard has joined #lisp
<shka__> on-each is essentially like map, but lazy evaluated
robdog has quit [Ping timeout: 258 seconds]
heisig has joined #lisp
vaporatorius has joined #lisp
ifitzpatrick has quit [Remote host closed the connection]
<xenon-> shka__ interesting, thanks
JohnMS_WORK has joined #lisp
[CALEB] has joined #lisp
robdog has joined #lisp
Kundry_Wag has joined #lisp
[CALEB] has quit [Client Quit]
Kundry_Wag has quit [Ping timeout: 244 seconds]
status402 has quit [Read error: Connection reset by peer]
status402 has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
frodef has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
random-nick has joined #lisp
Kundry_Wag has joined #lisp
_whitelogger has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
dddddd has joined #lisp
zigpaw has quit [Remote host closed the connection]
esrse has quit [Quit: 안녕히계세요~]
pierpal has joined #lisp
pierpal has quit [Ping timeout: 246 seconds]
status402 has quit [Quit: status402]
ggole has joined #lisp
status402 has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
scymtym has joined #lisp
akoana has quit [Quit: Leaving]
akoana has joined #lisp
xenon- has quit [Quit: quit]
Zaab1t has joined #lisp
status402 has quit [Read error: Connection reset by peer]
status402_ has joined #lisp
status402_ has quit [Quit: status402_]
status402 has joined #lisp
status402 has quit [Read error: Connection reset by peer]
status402 has joined #lisp
flamebeard has quit []
status402 has quit [Read error: Connection reset by peer]
status402 has joined #lisp
pierpal has joined #lisp
marvin2 has quit [Ping timeout: 246 seconds]
hectorhonn has quit [Quit: Page closed]
pierpal has quit [Client Quit]
pierpal has joined #lisp
jsjolen has joined #lisp
iovec has joined #lisp
JohnMS has joined #lisp
akoana has left #lisp ["Leaving"]
JohnMS_WORK has quit [Ping timeout: 246 seconds]
m00natic has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
atgreen has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
thijso has joined #lisp
knicklux has joined #lisp
jsjolen has quit [Remote host closed the connection]
status402 has quit [Ping timeout: 250 seconds]
status402 has joined #lisp
pierpal has joined #lisp
PacKet7 has quit [Quit: Woosh!]
PacKetSlayer has joined #lisp
benkard has joined #lisp
status402 has quit [Quit: status402]
status402 has joined #lisp
vaporatorius has quit [Quit: Leaving]
Inline has joined #lisp
gxt has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
plugd has joined #lisp
LiamH has joined #lisp
heisig has quit [Quit: Leaving]
razzy has quit [Ping timeout: 246 seconds]
marvin2 has joined #lisp
jstypo has joined #lisp
FreeBirdLjj has joined #lisp
wxie has joined #lisp
zigpaw has joined #lisp
Bike has joined #lisp
<xantoz> what would be my lisp of choice for making stand-alone executables (linux) when size is at a premium? sbcl, which I usually favor, fails here.
<Xach> That's an interesting priority. Is there a specific size budget in mind?
JohnMS has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<xantoz> not really, but let's say single digit megabytes for now.
wxie has quit [Ping timeout: 246 seconds]
<dlowe> it's easily a priority on mobile
<dlowe> especially in countries not blessed with high speed internet
<xantoz> I don't have one particular application in mind, but rather a spectrum of them. One interesting might be to use a lisp executable inside a linux initrd.
<dlowe> xantoz: I think ecl has a good reputation on that scale
<dlowe> I mean, there's always lisp500 too :)
<xantoz> ECL I was aware of. lisp500 is news to me
<xantoz> how does clozure compare?
<dlowe> I think ccl is comparable to sbcl
<xantoz> ok, I had the impression it could do slightly smaller ones.
<dlowe> maybe, but not <10M
<xantoz> what would be useful is the ability to leave out things that aren't neccessary in the image. like eval, and compile if you don't use it
<dlowe> yes, this is not an uncommon idea
<dlowe> if you pay for such things, you can get them today
<thrig> Reduce Eliminate Prune Lisp
<xantoz> sad that there is no open source alternative :/
<dlowe> xantoz: there could be if you started one
<xantoz> dlowe: :)
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<xantoz> something like a self-extracting compressed executable could probably shave off quite a lot
<xantoz> although for an initrd you'd get that for free
<xantoz> but I guess I should look at ECL. and perhaps at some tiny lisp interpreters (although there I think you'll end up having size issues due to code in plain-text)
ebrasca has joined #lisp
<p_l> xantoz: SBCL goes 4 times smaller with compressed core or so
<thrig> so like 10 megs instead of 40?
<xantoz> that's a big improvement
<xantoz> is this something supported in sbcl today?
<p_l> yes
<p_l> it's been there for few years now
<xantoz> that's nice to know
<xantoz> (I obviously have been lisping way too little recently)
Selwyn has joined #lisp
warweasle has joined #lisp
orivej has joined #lisp
<frgo> Q: How would I define a type that defines a value that may either be a string or a keyword? Thx!!
<Xach> frgo: (deftype mything () '(or string keyword)) is one option
<frgo> Ah! Thanks. Silly me.
orivej has quit [Ping timeout: 250 seconds]
SaganMan has joined #lisp
hiroaki has joined #lisp
undiscovered has joined #lisp
jprajzne has quit [Quit: Leaving.]
status402 has quit [Quit: status402]
shifty has quit [Ping timeout: 268 seconds]
notzmv has quit [Quit: WeeChat 2.3]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<phoe> Is there any way to get a function name from a function object? I'm looking for a portability library that allows for this.
<phoe> (Or NIL if the function doesn't have a name.)
<Bike> clhs function-lambda-expression
<Colleen> Bike: drmeister said 8 hours, 32 minutes ago: I just realized there would be a problem with the way you used a global variable as a closure - it won't work for MPS. MPS needs to be able to update every pointer. Ask me tomorrow.
<Bike> it's kind of shit a lot of the time, though
notzmv has joined #lisp
froggey has quit [Ping timeout: 246 seconds]
robotoad has quit [Quit: robotoad]
knicklux has quit [Remote host closed the connection]
anamorphic has joined #lisp
vtomole has joined #lisp
jxy has joined #lisp
amerlyq has joined #lisp
undiscovered has quit [Ping timeout: 256 seconds]
LiamH has quit [Read error: Connection reset by peer]
undiscovered has joined #lisp
asarch has joined #lisp
orivej has joined #lisp
xkapastel has joined #lisp
LiamH has joined #lisp
LiamH has left #lisp [#lisp]
<asarch> Have you checked CL REPL for Android?
mrcom has quit [Read error: Connection reset by peer]
<asarch> It is great, isn't it?
<asarch> It uses the ECL implementation for the Lisp side, and Qt5/QML for the UI
Kundry_Wag has quit [Remote host closed the connection]
<jackdaniel> Polos did other cool demos in EQL5-Android project
Kundry_Wag has joined #lisp
robotoad has joined #lisp
<asarch> Polos?
<asarch> Let's look for it!
<jackdaniel> Paul Ruetz, author of EQL project
<asarch> CL REPL can even swank to the TCP:4005
<asarch> What is swank anyway?
FreeBirdLjj has quit [Remote host closed the connection]
<phoe> swank is the server that slime interacts with
<thrig> socket with automatic negotiation of uh
FreeBirdLjj has joined #lisp
orivej has quit [Ping timeout: 250 seconds]
mrcom has joined #lisp
<asarch> So, theoretically, I could swank the sever on the phone and then connect Emacs from the PC using that port through Slime?
<asarch> If yes, how?
<jackdaniel> asarch: afaik cl-repl does that
FreeBirdLjj has quit [Ping timeout: 250 seconds]
<jackdaniel> you enable it on tcp:4005 and then from emacs: M-x slime-connect
<jackdaniel> ip-address-of-your-phone 4005
froggey has joined #lisp
xuxuru has joined #lisp
JetJej has joined #lisp
rozenglass has quit [Remote host closed the connection]
frodef has quit [Ping timeout: 246 seconds]
mrcom has quit [Read error: Connection reset by peer]
xuxuru has quit [Ping timeout: 256 seconds]
frodef has joined #lisp
m00natic has quit [Ping timeout: 244 seconds]
fortitude has joined #lisp
hr0m has quit [Ping timeout: 252 seconds]
Lycurgus has joined #lisp
bexx has joined #lisp
hr0m has joined #lisp
Bike_ has joined #lisp
Kundry_Wag has quit [Read error: No route to host]
SaganMan has quit [Quit: WeeChat 1.6]
Bike has quit [Ping timeout: 256 seconds]
<Fade> join #antergos
<Fade> missend. apologies.
FreeBirdLjj has joined #lisp
rumbler31 has joined #lisp
heisig has joined #lisp
Bike_ is now known as Bike
FreeBirdLjj has quit [Ping timeout: 240 seconds]
marvin2 has quit [Ping timeout: 258 seconds]
rumbler31 has quit [Ping timeout: 240 seconds]
X-Scale has quit [Ping timeout: 240 seconds]
pchrist has quit [Quit: leaving]
pchrist has joined #lisp
heisig has quit [Quit: Leaving]
FreeBirdLjj has joined #lisp
Bike_ has joined #lisp
mrcom has joined #lisp
atgreen has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
Bike has quit [Ping timeout: 256 seconds]
plugd has quit [Quit: rcirc on GNU Emacs 26.1]
<asarch> Thank you!
<asarch> Thank you very much! :-)
Bike_ is now known as Bike
sjl has joined #lisp
Lycurgus has quit [Quit: Exeunt]
hhdave has joined #lisp
hhdave has quit [Client Quit]
anamorphic has quit [Quit: anamorphic]
anamorphic has joined #lisp
Selwyn has quit [Ping timeout: 250 seconds]
X-Scale has joined #lisp
sauvin has quit [Ping timeout: 245 seconds]
JetJej has quit [Quit: [Quit]]
m00natic has joined #lisp
rozenglass has joined #lisp
terpri has quit [Quit: Leaving]
<phoe> pjb: thanks.
benkard has quit [Ping timeout: 245 seconds]
rpg has joined #lisp
sloanr has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
resttime has joined #lisp
gravicappa has quit [Ping timeout: 268 seconds]
benkard has joined #lisp
Essadon has joined #lisp
actuallybatman has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
varjag has joined #lisp
ChoHag has joined #lisp
<phoe> I think I have somewhat finished my Petri net implementation. https://github.com/phoe/petri
PacKetSlayer has left #lisp ["Cya, losers!"]
<phoe> I have multithreading and CL-DOT integration. And also managed to do a few examples in the README.
<ChoHag> How can I get a random number between 0 and whatever the MAXINT of the underlying architecture is?
<phoe> pjb: I think you were interested in it when we talked about it back in the day.
<phoe> ChoHag: (random (1+ (most-positive-fixnum)))
<ChoHag> ie. depending on whether the architecture's native int is 32, 64 or $other bits wide, I want a variable containing that many random bits.
<phoe> I mean
<phoe> ChoHag: (random (1+ most-positive-fixnum))
<ChoHag> Does the (1+ most-positive-fixnum) not cause an internal variable to overflow and be upgraded to (whatever datatype holds bignums) in order to store the temporary (MAXINT+1) value passed to random?
Bike_ has joined #lisp
<ggole> fixnum isn't likely to be the native width
<ChoHag> Hmm. It's not. most-positive-fixnum is 64 bits but 0x3FFFFFFFFFFFFFFF.
<ggole> most-positive-word, maybe?
<phoe> it doesn't exist
<phoe> ChoHag: there's no internal variable in there
Bike has quit [Disconnected by services]
Bike_ is now known as Bike
<ChoHag> The number (1+ CL-USER> most-positive-word
<ChoHag> 18446744073709551615
<ChoHag> ffs.
<phoe> the compiler sees that (1+ most-positive-fixnum) is a constant and is able to pass it to an optimized version of RANDOM that accepts untagged numbers
atgreen has joined #lisp
<phoe> that's for sufficiently smart compilers of course.
<phoe> see line 8 - no bignums, a just a literal 64-bit value.
<sjl> (random (expt 2 (get-native-bits-for-current-platform))) and you'll need to write that last function yourself, there's no built-in way to do it
<sjl> or use CFFI to grovel for it or something
<ChoHag> I didn't know about disassemble. That's rather handy.
<sjl> Common Lisp tries pretty hard to insulate you from this kind of stuff. e.g. if you want 32-bit addition, the right way to do it is something like (defun +/32 (x y) (mod (+ x y) (expt 2 32))) and let the compiler take care of optimizing it, rather than declaring things as particular types and hoping for overflow with safety 0 or something.
<ChoHag> Sure, and mostly that's what I want, but in this case I want 'a random number' with no extra constraints and the most efficient way to do that (and then handle it) will be to use the machine's native datatype.
<pjb> phoe: thanks.
<ChoHag> Alternatively I could pick a number from 0-255 and limit myself to 8 bits (and not care about the hardware) but that will lose fidelity.
<sjl> The "most efficient way" probably isn't "using the number of bits a C program would use efficiently" though
<phoe> ChoHag: (random (expt 2 #+64-bit 64 #+32-bit 32 #+(not (or 64-bit 32-bit)) 0))
<sjl> e.g. if you're on a 64-bit machine and do (random (expt 2 64)) you'll get a random 64-bit number back, but in Common Lisp that'll (probably) be a bignum
<phoe> replace the 0 with an error of sorts
<fiddlerwoaroof> Has there been any work at modernizing logical pathnames?
<phoe> sjl: not necessarily
<sjl> phoe: hence the probably
<phoe> if you bind it to a variable that is declared to be a ub64 then it has a chance to be untagged
<sjl> Sure
<phoe> but then again, that's the compiler that does the lifting here
<fiddlerwoaroof> I really like the way they work, but the limitations on characters in filenames makes them only useful for filenames your program controls.
<fiddlerwoaroof> hmm, maybe this is a #sicl sort of topic
<jackdaniel> fiddlerwoaroof: I have started (nothing publicable right now) a test suite which bends some of requirements, this one included
<sjl> If you just want an efficient random number with as many bits as possible, (random (1+ most-positive-fixnum)) is probably what you want
<jackdaniel> when it is done I want to include it in ansi-test "beyond" test suite
<jackdaniel> so that would be a good starting point for standarizing such non-standard behavior
<jackdaniel> when / if I'm done with that I'd like to publish a CDR document and implement things accordingly in ECL
<ChoHag> Well this is certainly premature optimisation but it's an interesting thing to think about and if/when it turns out to be inefficient I can replace it later easily.
<fiddlerwoaroof> jackdaniel: So, the issue I'm having right now is that there's no way to use logical pathnames when there are two dots in a filename
<fiddlerwoaroof> Because the first dot divides the name from the type and the second dot splits the type from the version
<sjl> e.g. in 64-bit SBCL you'll get a 62-bit fixnum
<fiddlerwoaroof> e.g. #p"ql:fw-lp;fw-lu;fwoar.lisputils.asd"
ggole has quit [Quit: ggole]
<jackdaniel> fiddlerwoaroof: could you open a ticket on gitlab.common-lisp.net (ansi-test project) and list the problems there with description? I don't have opinions on many corner cases so far, but knowing them is a good step towards addressing them
<fiddlerwoaroof> In this case, I think I'm going to just rename everything, because I control everything
<fiddlerwoaroof> jackdaniel: cool, I think I have an account there
<jackdaniel> thank you :-)
<fiddlerwoaroof> I feel like this is a good opportunity for a closer2mop style project that provides a substitute CL package with "modernized" definitions
<fiddlerwoaroof> The criteria would be something like, everything in the standard works, but the definitions can also handle newer issues
<jackdaniel> fiddlerwoaroof: some things can't be addressed that way. first and foremost, logical pathanames are handled by implementation internals. second issue is that some things which are specified in the standard are not overly useful (i.e that all letters in logical pathname must be upcase)
<phoe> (defpackage #:illogical-pathnames ...)
<fiddlerwoaroof> Hmm, I don't think that's a problem
<fiddlerwoaroof> You just check the logical pathname to see if it's using non-standard features and, if it is, you use new code, otherwise you delegate to the implementation
<djeis[m]> That wouldn't work for the #p syntax.
anamorphic has quit [Quit: anamorphic]
FreeBirdLjj has quit [Remote host closed the connection]
<djeis[m]> But otherwise yea, in principle you could make your own kind of logical pathname and provide alternate definitions of everything involving pathnames to support your idea.
<sjl> huh, seems like SBCL is even smart enough to avoid bignums for (defun foo () (declare (optimize speed)) (+ most-negative-fixnum (random (+ 1 (- most-positive-fixnum most-negative-fixnum)))))
<jackdaniel> fiddlerwoaroof: uiop does the kind of "patching" you talk about (not for logical pathnames because of what djeis[m] said though)
<sjl> nice.
<sjl> if you *really* want that extra 1 random bit
anamorphic has joined #lisp
<Xach> i do
<jackdaniel> I'd much better like to see unified behavior between CL implementations (pipe dream maybe, but who knows)
<fiddlerwoaroof> I agree, but I think libraries like BORDEAUX-THREADS and USOCKET and CLOSER-MOP are useful
<jackdaniel> sure, I'm recommending and praising these libraries whenever I have occasion to
<jackdaniel> pathnames are different story, they could shine but they are often overlooked because they are underspecified (not only logical pathnames)
<fiddlerwoaroof> Yeah
<fiddlerwoaroof> The other feature I'd like is the ability to map a logical pathname to a remote resource
<Xach> Logical pathnames work well for a particular use-case - I think they are often harshly judged for not being suitable for other use-cases.
<pjb> fiddlerwoaroof: logical pathnames are ok. It's the implementation specific part that are defective. See: https://groups.google.com/d/msg/comp.lang.lisp/kA5KT4WNF8k/1CSM8Hla6xAJ
<fiddlerwoaroof> The main issue I have with them is that they limit the filename characters
<pjb> This is not an issue.
<jackdaniel> that is extension idea for ecl I have: virtual files (so you may put anything you want on the other side), they could be accessed via logical pathname
<pjb> They're LOGICAL names.
<Xach> fiddlerwoaroof: in my mind that is thinking about them backwards.
<pjb> Ie. just shortcuts.
<pjb> They're purely symbolic.
<fiddlerwoaroof> Xach: ?
<pjb> fiddlerwoaroof: the key are the pathname translations.
<fiddlerwoaroof> let's say I have a host foo
<pjb> this is where you map the symbolic logical pathname to actual pathnames, with all the filename characters or bytes you want.
<pjb> Nope.
<pjb> hostnames are uppercase.
<fiddlerwoaroof> whatever
<pjb> You cannot have a host "foo", only "FOO".
<pjb> If you use "foo", you enter implemenation specifid domain and kaboom!
<fiddlerwoaroof> mentally upcase
<Xach> fiddlerwoaroof: logical pathnames work well in a situation where you have abstract, logical pathnames embedded in your code, and it is a finite set, and you need to translate them to physical pathnames.
<fiddlerwoaroof> if I have a file called a.b.txt under foo, I can't refer to that file
<pjb> Nope.
<fiddlerwoaroof> #p"FOO:A.B.TXT" doesn't work
<pjb> I won't discuss implementation specific bullshit.
<pjb> #p"FOO:A.B.TXT" works perfectly well.
<pjb> Well, no, #p"FOO:A-B.TXT" works perfectly well.
<pjb> There are rules.
<Xach> They are not suitable for probing the filesystem to find unknown-to-the-application files.
<pjb> They're not made for that.
<pjb> logical-pathnames --> physical-pathnames <--> file system.
<fiddlerwoaroof> Xach: yeah, that's my issue
<pjb> There's no physical-pathname --> logical-pathname translation.
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
<Xach> It pictures a world where you have, say, 27 file references in your application, and you control how your application is deployed, and your application code, combined with a target system, and a list of translations, lets you run on the target without changing the pathnames embedded in your code.
<Xach> That's not a typical world for us now, but I think it's harsh to say "gee, logical pathnames suck" for not working the way you'd wish them to work these days.
<fiddlerwoaroof> That's not really what I'm doing, though
<Xach> fiddlerwoaroof: right - it's a complaint I've heard from some, though
<fiddlerwoaroof> I _like_ logical pathnames, I just want them to evolve a bit :)
random-nick has quit [Read error: Connection reset by peer]
<Xach> i also like logical pathnames and sometimes i even get to use them
<pjb> fiddlerwoaroof: there's an implementation of logical pathname in CL at https://github.com/informatimago/lisp/tree/master/future/vfs
<pjb> fiddlerwoaroof: you can take it and extend it to do whatever you want.
<Xach> "these solve a problem i don't have! boo!"
<fiddlerwoaroof> Recently I've been adding a line like :pathname #+devtime #p"projects:project-name;" #-devtime nil to my asds
<fiddlerwoaroof> It lets me just compile the system form with C-c C-c and then quickload the system
akoana has joined #lisp
<fiddlerwoaroof> But it still uses the default ASD pathname discovery mechanism when I don't have the feature set
akoana has left #lisp ["Leaving"]
<asarch> Where is the REPL for slime-connect?
matijja has joined #lisp
<asarch> I can swank from Emacs to the phone, and even Emacs says everything is fine
<asarch> However, I can't see the REPL for the connection
<asarch> Maybe I am doing something wrong
<fiddlerwoaroof> Try hitting C-c C-z from a lisp file
<fiddlerwoaroof> Usually the repl should just pop up.
<asarch> I get the local SBCL Lisp: "This is SBCL 1.4.14, an implementation of ANSI Common Lisp."
<fiddlerwoaroof> Hmm, do you have multiple connections open?
<asarch> No, I don't. However, I have multiple Emacs session
<fiddlerwoaroof> Try M-x slime-next-connection
<djeis[m]> Maybe the lisp doesn't have the repl contrib loaded?
<fiddlerwoaroof> Is there an *inferior-lisp* buffer for the remote?
<djeis[m]> Not sure why it wouldn't be...
akoana has joined #lisp
<fiddlerwoaroof> nevermind, there wouldn't be one
<asarch> Yeah, the remove (Emacs) has a *inferior-lisp*
<fiddlerwoaroof> I think swank, by default, only supports one repl
<fiddlerwoaroof> So, if you have a remote emacs connected with a repl, it might not work
MichaelRaskin has joined #lisp
<fiddlerwoaroof> the mrepl contrib might help here?
<asarch> How can I disable the local (SBCL) Lisp and use the remote Lisp connection?
<asarch> BRB, let me restart everything
asarch has quit [Quit: Leaving]
<thrig> please hold while we reboot universe
akoana has left #lisp [#lisp]
matijja has quit [Remote host closed the connection]
akoana has joined #lisp
random-nick has joined #lisp
shifty has joined #lisp
<dlowe> slime-connect instead of just slime
<dlowe> oh, never mind
anamorphic has quit [Quit: anamorphic]
anamorphic has joined #lisp
<ChoHag> I know of (do-all-symbols) but how do I get a list of all the symbols currently available?
<ChoHag> Obvious I could use do-all-symbols to build it but it seems to me there'd be a function to do that already.
<ChoHag> Also I don't know _how_ I'd do that, but I can figure that much out.
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<Bike> there is no built in function to do that. you can build it up with do-all-symbols.
<Bike> it's not often needed, is all.
<jackdaniel> I was about to type exactly that
<jackdaniel> (in fact I was 90% done :)
dale_ has joined #lisp
dale_ is now known as dale
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
knicklux has joined #lisp
<_death> you can also use loop for that
<fiddlerwoaroof> yeah (loop for foo being the external-symbols of :package) is really handy
nirved is now known as Guest11908
Guest11908 has quit [Killed (adams.freenode.net (Nickname regained by services))]
karlosz has joined #lisp
nirved has joined #lisp
vtomole has quit [Ping timeout: 256 seconds]
bexx has quit [Quit: Quit]
<phoe> (uiop:while-collecting (collect) (do-all-symbols (s) (collect s)))
orivej has quit [Read error: Connection reset by peer]
orivej has joined #lisp
rumbler31 has joined #lisp
knicklux has quit [Remote host closed the connection]
Bike_ has joined #lisp
Bike has quit [Ping timeout: 256 seconds]
tomaw_ has joined #lisp
Bike_ is now known as Bike
anewuser has joined #lisp
tomaw has quit [Read error: Connection reset by peer]
tomaw_ is now known as tomaw
Mr-Potter has joined #lisp
isBEKaml has joined #lisp
asarch has joined #lisp
<asarch> :-(
<asarch> There is no REPL in the Emacs session
<fiddlerwoaroof> Are you connected twice?
scymtym has quit [Ping timeout: 252 seconds]
Jesin has joined #lisp
<ChoHag> Can I evaluate a form and have the VM print the statements it executes as it executes them?
<Bike> are you talking about clisp specifically or something? What VM?
<ChoHag> No specific interpreter.
<phoe> clhs trace
<ChoHag> Currently I'm using sbcl via emacs but that shouldn't matter.
<phoe> ChoHag: use this to select the functions you want to trace.
<fiddlerwoaroof> sbcl compiles to native code
<fiddlerwoaroof> There's no VM involved
<Bike> it might be possible to force sbcl to use its interpreter and print forms as it does so, i'm not sure.
<Bike> the standard mechanism is
<Bike> clhs step
<Bike> but i've never gotten it to work
<Bike> and it's not quite what you're describing
<fiddlerwoaroof> I've had some limited success with step in code compiled DEBUG 3
<phoe> I got stepping to work
<phoe> as long as I compile it with DEBUG 3, yes
<ChoHag> Well whatever sbcl wants to call itself, VM or otherwise.
<fiddlerwoaroof> ChoHag: I don't really understand what you want to do
<phoe> also works for multiple functions and methods
<fiddlerwoaroof> Do you want to see the assembly that's being executed? or do you want to see the functions that are being executed?
<ChoHag> fiddlerwoaroof: Figure out which line my bug's on :)
<fiddlerwoaroof> TRACE is how you do the latter thing
<ChoHag> I want to see the lisp that's about to be/just was executed. I'm not interested in the machine code.
<phoe> if you get an error, you can examine the last frame - slime will point you to the form that triggered the error
<fiddlerwoaroof> In emacs, if you navigate to a frame in the debugger, you can hit v to go to source
<Bike> ChoHag: sbcl by default compiles your code, so any notion of individual forms or statements no longer exists by the time you run. so what you're asking for takes some special doing.
<fiddlerwoaroof> Or just hit enter to see the locals/etc.
<ChoHag> Yeah this is pretty much my first non-hello-world project in lisp. I have pretty much zero idea what I'm doing :)
<phoe> slime with SBCL remembers source locations by default though
mrcom has quit [Read error: Connection reset by peer]
<asarch> slime-connect is *before*, *after* or *instead* slime?
mrcom has joined #lisp
<fiddlerwoaroof> asarch: slime-connect replaces the slime command
<asarch> On a fresh Emacs session, slime-connect goes fine, however there is no REPL for the connection
<fiddlerwoaroof> to connect to a remote lisp, you do M-x slime-connect <CR> hostname.com <CR> port <CR>
<phoe> asarch: sounds like a slime-setup issue
<asarch> I get "Versions differ: 2.22 (slime) vs. 2.20 (swank). Continue? (y or n)"
<phoe> oh, you might want to fix that just in case
<phoe> what happens if you type Y in response to that query?
<asarch> I press 'y' and then I get "Connected. Let the hacking commense!"
<asarch> And all I have are the *scratch*, *Messages* and *slime-events* buffers
Bike_ has joined #lisp
Bike has quit [Disconnected by services]
Bike_ is now known as Bike
<asarch> These are the messages: http://paste.scsys.co.uk/582664
<phoe> this looks like standard swank protocol
<asarch> There is no inferior-lisp buffer
<fiddlerwoaroof> There won't be
<asarch> ?
<fiddlerwoaroof> that's the buffer for the local lisp process
<asarch> Ok, ok
* asarch takes notes...
<fiddlerwoaroof> try M-x slime-repl
<asarch> [No match+
<fiddlerwoaroof> Hmm, I wonder if there's something wrong with your slime setup
Selwyn has joined #lisp
<fiddlerwoaroof> How did you install slime in the emacs you're using?
<fiddlerwoaroof> But, first, I'd try upgrading the remote swank version, if possible.
<asarch> I have this small .emacs file: https://github.com/asarch/emacs/blob/master/.emacs
<fiddlerwoaroof> how did you install slime?
<fiddlerwoaroof> M-x package-install ?
Bike has quit [Ping timeout: 256 seconds]
<asarch> Yeah
<fiddlerwoaroof> I think this is generally the preferred way to install slime: https://github.com/quicklisp/quicklisp-slime-helper
<fiddlerwoaroof> Anyways, what's the value of slime-contribs
scymtym has joined #lisp
<asarch> [No match] :'-(
orivej has quit [Ping timeout: 246 seconds]
orivej_ has joined #lisp
<fiddlerwoaroof> in the *scratch* buffer, do slime-contribs <C-j>
<phoe> run ielm and evaluate slime-contribs
<phoe> ELISP> slime-contribs
Selwyn has quit [Ping timeout: 246 seconds]
<phoe> (slime-company slime-asdf slime-fancy slime-indentation slime-sbcl-exts slime-scratch)
<phoe> that's what it looks like for me
<fiddlerwoaroof> phoe: cool, I've always used the scratch buffer
<phoe> I prefer the REPL. (:
<asarch> slime-contribs: nill
<fiddlerwoaroof> Yeah, I didn't even know that that existed
<asarch> I mean, nil
<phoe> asarch: well, that's your problem
<phoe> you don't even have the slime REPL loaded
<phoe> setf slime-contribs to '(slime-fancy slime-indentation) and run (slime-setup) in your emacs file
<phoe> then run emacs again
<phoe> and you should be up and running
<fiddlerwoaroof> setq that is
<fiddlerwoaroof> interesting, elisp has setf too
<fiddlerwoaroof> Ignore me, I guess :)
<anamorphic> Did not know that
<phoe> elisp has adopted some CLisms
<asarch> I upgraded Slime from 2.22 to 2.23
<anamorphic> Just adopt CL for the Emacs' language at that point
<asarch> (setf slime-contribs '(slime-fancy slime-indentation)) (slime-setup) in ~/.emacs, right?
<fiddlerwoaroof> asarch: yeah, that should do it
<asarch> BINGO!!!
<asarch> THANK YOU!!!
<asarch> THANK YOU VERY MUCH GUYS!!!
<phoe> ha
<phoe> I stumbled upon that in the past - ended up with slime running, and so on, but no REPL
<phoe> and my slime-contribs were nil.
<asarch> ; SLIME 2.23
<phoe> you might want to have the full package, like I posted above - slime-company is really useful.
<asarch> EQL-USER> (+ 1 2)
<fiddlerwoaroof> My issue has been that slime-company is a bit fiddly to actually get it working
<asarch> ok, ok
<phoe> works very well in spacemacs for me, never had issues with it.
<fiddlerwoaroof> Yeah, it has to be loaded at the right time, otherwise slime-setup won't initialize it properly
<fiddlerwoaroof> Once it's loaded it works pretty well
<fiddlerwoaroof> Although sometimes the repl confuses it
Jesin has quit [Quit: Leaving]
<fiddlerwoaroof> My current annoyance is that there is some situation that causes eldoc messages to stop showing up
<asarch> So, now I am using "the Lisp" from my phone, right?
<fiddlerwoaroof> You should be
<asarch> YEAH!!!
<asarch> \o/
<asarch> This is very useful when you don't have any Lisp at work
<thrig> my coworkers would probably beat me up if I put some lisp into production
<fiddlerwoaroof> You can often get it in "on the edges"
<asarch> A Lisp just for you
<fiddlerwoaroof> e.g. write random little utilities in lisp that are for personal use
robdog has joined #lisp
<phoe> fiddlerwoaroof: C-c M-o
anamorphic has quit [Quit: anamorphic]
<phoe> whenever you enter and leave the debugger, the completions stop showing up
<phoe> the solution for me was to clear the REPL buffer
Jesin has joined #lisp
<asarch> Remember the old adagio: "Give any Common Lisp and I will move the world"
<fiddlerwoaroof> Hmm, I generally thought it was when there were unpaired " in the output
<asarch> *Give me
<thrig> don't think that quote has as much leverage as it once did
<asarch> JK ;-P
<fiddlerwoaroof> e.g. if I do (princ #\"), slime-company breaks
<phoe> fiddlerwoaroof: oh that's correct
<fiddlerwoaroof> One of the error messages does this
<fiddlerwoaroof> I believe it's the "no method for FOO" message
<fiddlerwoaroof> I just navigate to the relevant line and dd it
<fiddlerwoaroof> (evi-mode)
<phoe> fiddlerwoaroof: !
<phoe> thanks
mrcom has quit [Read error: Connection reset by peer]
phoe has quit [Remote host closed the connection]
anamorphic has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
<pjb> asarch: mine is smaller: 63 lines including comments.
CrazyEddy has quit [Read error: Connection reset by peer]
<pjb> asarch: of course, that's not counting all the emacs files I load from it! :-)
froggey has quit [Remote host closed the connection]
<pjb> asarch: the environment on Android is "funny".
thodg has quit [Ping timeout: 250 seconds]
froggey has joined #lisp
<ChoHag> Does lisp short-circuit conditionals?
<no-defun-allowed> Yes.
findiggle has quit [Remote host closed the connection]
<no-defun-allowed> (or t (princ "This won't get printed!"))
<ChoHag> ie. given '(if (or (foo) (bar)) ...)', if foo evaluates to true will bar not be evaluated at al;?
CrazyEddy has joined #lisp
<fiddlerwoaroof> yeah
<thrig> there have to be a few special operators for various reasons
<ChoHag> This would be a lot easier if I had any idea wtf I'm doing...
<sjl> clhs or
<thrig> there are books on this
<sjl> > If the evaluation of any form other than the last returns a primary value that is true, or immediately returns that value (but no additional values) without evaluating the remaining forms.
<fiddlerwoaroof> ChoHag: (macroexpand-1 '(or a b)) #| => (LET ((#:G596 A)) (IF #:G596 #:G596 B)) |#
<fiddlerwoaroof> OR is implemented as a macro that expands to IF
<fiddlerwoaroof> And you can tell from the expansion that it short-circuits
robotoad_ has joined #lisp
<sjl> The spec saying it short circuits is why you should trust that it will, not that a particular implementation happens to macroexpand it a certain way
<fiddlerwoaroof> Yeah
robotoad has quit [Ping timeout: 250 seconds]
<ChoHag> I tend to prefer the spec over the implementations.
jmercouris has joined #lisp
<jmercouris> good evening everyone
<pjb> gee
<jmercouris> I have an abstract question
<jmercouris> well, maybe not so much abstract as whatever
<pjb> You'll get an abstract answer.
<jmercouris> lol
<jmercouris> so I have some parenscript in my codebase
<jmercouris> for example, however, if in my package I did something like (:use :parenscript) I would shadow a bunch of CL
<thrig> some may also vote 42 as the answer
<pjb> Seems overly concrete…
<jmercouris> so the question is, how should I reason about this problem?
<jmercouris> should I put all of my parenscript in a separate package?
<pjb> That could be a good idea.
phoe has joined #lisp
<pjb> Or you can just qualify parenscript. It has a short nickname "PS".
<jmercouris> so in the above example line 3 should I have something like (in-package :parenscript-package) and then line 22 (in-package :next) ?
<jmercouris> well, I am always qualifying parenscript as can be seen above (ps:xyz) however I find it cumbersome
<fiddlerwoaroof> Or put it in its own system?
<pjb> And I see that you already use qualified symbols from ps, so why do you want to use it?
<|3b|> those functions look like mostly CL with a bit of PS
mrcom has joined #lisp
<|3b|> (next:define-parenstatic ... (cl:defun ... (cl:let ... (chain)))) doesn't save you much
<jmercouris> in its own system?
<fiddlerwoaroof> I should have said, put the parenscript in its own set of files
findiggle has joined #lisp
<fiddlerwoaroof> one option would be to give it its own ASDF system, but that might be overkill
<jmercouris> |3b|: ah, you are right, it would need to be able to differentiate
* |3b| wouldn't split it out until you are writing entire functions of PS code
<jmercouris> so I couldnt just use defun, because it wouldn't know whether cl:defun or ps:defun
<|3b|> right
<jmercouris> but I am writing entire functions of PS code
<jmercouris> anything you say as (define-parenscript...) is actually a macro that wraps (ps ...)
<|3b|> i mean things that compile to js functions
<|3b|> rather than CL functions that return a string that happens to be JS code
<jmercouris> well, define-parenscript most certainly compiles to JS functions
<jmercouris> I'm sorry, I mean define-parenstatic, not define-parenscript
<jmercouris> fiddlerwoaroof: I've thought about in its own set of files, but then I'm not quite sure how to access the parenscript functions from other files
hiroaki has quit [Ping timeout: 252 seconds]
<jmercouris> I've seen it done in lispkit, they are given a .paren extension, but I wasn't sure exactly what's going on
<jmercouris> this is kind of one of those non-problem problems, like there isn't inherently anything wrong with my set-up, I'm just tired of typing ps: before everything, and I can't just do a :use in the :next package or I'd shadow everything :\
<|3b|> alternately, just import a few common symbols like CHAIN
<|3b|> and see if you can get the ones you want without any conflicts
wilfredh has quit [Quit: Connection closed for inactivity]
Mr-Potter has quit [Quit: Leaving]
<jmercouris> however, here's the major problem I see with this approach, how do you pass arguments from Lisp to the parenscript?
<jmercouris> also would this even work with a compiled image? you'd have to load all of your parenscript compiled into memory somehow
<jmercouris> yet somehow not run the function setup-link-hints which would definitely fail on a compiled system
<asarch> Android + CL REPL: AI box to go
verisimilitude has left #lisp ["ERC Version 5.3 (IRC client for Emacs)"]
holycow has joined #lisp
asarch has quit [Ping timeout: 245 seconds]
jack_rabbit has quit [Ping timeout: 264 seconds]
Inline has quit [Read error: Connection reset by peer]
anamorphic has quit [Quit: anamorphic]
asarch has joined #lisp
<asarch> Are you sure of slime-company? Emacs complains about it cannot find the file
<fiddlerwoaroof> asarch: you have to install it via package-install
<fiddlerwoaroof> it's a separate package
<asarch> D'oh!
<asarch> Ok, ok
Selwyn has joined #lisp
<Fade> well, here's an interesting problem..
<Fade> if you have two packages, which both depend on cxml-stp
<asarch> ; pipelined request... (swank-repl:listener-eval "(+ 1 2)
<asarch> ?
<Fade> the first package loads fine, but the second one fails with an asdf/find-component:missing-component failure.
<asarch> The EQL-REPL doesn't evaluate (+ 1 2)
<Fade> "Component "cxml/dom" not found"
<asarch> Nevermind, it works!
<asarch> I need the hard copy of Slime User Manual
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Inline has joined #lisp
jmercouris has quit [Remote host closed the connection]
ChoHag has quit [Ping timeout: 245 seconds]
orivej_ has quit [Ping timeout: 246 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
Bike has joined #lisp
<stylewarning> I still very strongly dislike getting ASDF to look in the right places.
isBEKaml has quit [Quit: WeeChat 2.3]
random-nick has quit [Ping timeout: 246 seconds]
Kundry_Wag has joined #lisp
orivej has joined #lisp