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.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
wxie has quit [Ping timeout: 250 seconds]
<aeth> gilberth: what were Lispers doing 20 years ago?
<gilberth> aeth: Spelling :) without regard to paren balance?
<gilberth> aeth: On #lisp that is.
<aeth> apparently in some old systems, ] closed all open parentheses
<aeth> probably more like 30 or even 40 years ago, though
<gilberth> Would a :-] smiley then save us?
<gilberth> No, I would not, since it is :-) and not (-:. So we talk about too much closing parens.
akoana has left #lisp ["Leaving"]
<gilberth> it, even. *sigh*
<gilberth> So we need "[".
<aeth> The problem is getting into a semantically invalid state. I'm guessing you get there by having more ")"s than "("s
<gilberth> Well, a "[" could save us. :-)
<gilberth> Oops.
fizz_ed has joined #lisp
<aeth> Sounds harder to implement
Achylles has quit [Remote host closed the connection]
<gilberth> Yes, I guess you would need some AI to pick the right ")" to match.
<aeth> "AI". Everything's AI
<gilberth> It's AI until you understand how it works.
<aeth> what makes the rules systems of compilers in general not AI? the fact that it works?
<gilberth> Like: Is a chess programm still AI?
<aeth> well that's AI in the game sense
<aeth> the only place where AI doesn't have to be cutting edge to keep the label
<gilberth> It's alpha-beta search and not much more.
<aeth> But describe a modern compiler to someone in the 1950s and I'm sure it would sound like AI
<Bike> maybe you should stick with the more important parens argument
<gilberth> Perhaps.
<Josh_2> Which parens is more important this one ( or this one )?
<Bike> the left one
<aeth> Josh_2: don't make me choose favorites
<Josh_2> xD
<gilberth> I will not discriminate one paren over the other.
<gilberth> There must be a third gender to be PC. How would we spell that? Perhaps we choose "|" to be fair.
Bike has left #lisp [#lisp]
<aeth> Josh_2: alone, a parenthesis is useless, but together, the parentheses have unlimited power
fizz_ed has quit [Ping timeout: 245 seconds]
<gilberth> aeth: This is just like humans do. A couple is way more powerful than a single person.
akater has quit [Remote host closed the connection]
akater has joined #lisp
<gilberth> So which paren is female and which is male? Suggestions?
<aeth> gilberth: the relationship between parentheses is strictly professional, so I'm not sure why you'd gender them
<Josh_2> aeth: idk you can use some pairs of ( ) to produce lots of pairs of ( )
<Josh_2> sounds like they breed them
<gilberth> aeth: My marriage also is strictly professional, mind you.
<gilberth> Josh_2: :) :( to balance.
<no-defun-allowed> gilberth: it's a bit early to be applying gender roles now, isn't it?
<aeth> Josh_2: parens are cloned, since they're all identical. (eq #\( #\() or is that not always true? It doesn't have to be
<Josh_2> Its never too early
<gilberth> Yes, ( and ) give birth to s-exprs. That's great!
ym555 has quit [Ping timeout: 245 seconds]
<aeth> hmm, actually, on implementations where (eq #\( #\() is always true and (eq #\) #\)) is always true, technically there are only two parens, and when we see many they are just referring to the same thing. "(())" only has one of each paren, it's just that each shows up twice.
<gilberth> Since, we're idle. I see "(" as female and ")" as male. Don't ask me why that is.
<Josh_2> I have never gendered a paren xD
<aeth> gilberth: Is your native language one that assigns grammatical gender to objects?
<gilberth> aeth: Yes. It is. My native language is German. And a table for instance is female grammatically.
<gilberth> No.
<gilberth> Male actually. Sorry.
<aeth> So if we're going by grammatical gender, "parenthesis" comes from the Latin "parenthesis" which comes from the Ancient Greek "παρένθεσις", which Wiktionary tells me is female. https://en.wiktionary.org/wiki/%CF%80%CE%B1%CF%81%CE%AD%CE%BD%CE%B8%CE%B5%CF%83%CE%B9%CF%82#Ancient_Greek
<gilberth> But a door would be female.
<gilberth> aeth: Yes, parens are female.
<aeth> "left parenthesis" and "right parenthesis" are just providing an adjective to the noun, so it would take the gender-matching declension
<aeth> So both would be female
<gilberth> But don't get me started on the current trend to gender our language and confuse grammatical sex with actual sex.
<aeth> There aren't many translations but it tends to be female here: https://en.wiktionary.org/wiki/parenthesis#Translations
<gilberth> aeth: They both are. I was just imagining things. And to me the "(" is female and the ")" is male. Perhaps because "(" gives birth. Don't ask me.
<aeth> Interestingly, Romance languages seem to be split as to if they kept the Greek (and Latin) female gender or not.
<aeth> male in Spanish and Portuguese, female in French and Italian.
<gilberth> aeth: Well, Spanish and Portuguese and Italian and French are just Latin.
<_death> in hebrew it's male
<aeth> gilberth: By the way, I brought up grammatical gender initially because I don't think that a contemporary monolingual English speaker would even think about assigning gender to parens
<Josh_2> Like me
<gilberth> aeth: Sure. English borrowed that from Norwegian.
<aeth> although if I had to be arbitrary, I'd guess they're both female
<gilberth> In English an object always is "it" not "she" or "he".
<t58> I strangly can also see ( being female and ) being male, alot like cables
<t58> *strangely
* White_Flame throws a boat at gilberth
<gilberth> cables? Why cables?
<t58> you know like how you get a male and female end
<White_Flame> there's lots of common usage of he/she to inanimate objects, when they're really important
<aeth> gilberth: That will get more difficult if we actually have strong artificial intelligence. We wouldn't be able to refer to the AI as "it"
<White_Flame> aeth: we refer to animals as "it", and they're alive
* t58 refers to animals as dinner
Lord_of_Life_ has joined #lisp
<aeth> White_Flame: We refer to cows with "it". We refer to our cats and dogs by their gender.
<gilberth> t58: Sure, but "dinner" is no gender.
<White_Flame> but in any case, that's an interesting perspective on parens
<Josh_2> xD
<aeth> Or at least we refer to cats by what we assume their gender is.
<no-defun-allowed> White_Flame, aeth: more specifically, we refer to animals as "it" when we don't know their gender, and with proper pronouns when we do.
<t58> gilberth: it's not yet
<Josh_2> xe/xer lel
<aeth> no-defun-allowed: and even that goes too far for humans, so we usually work around that by saying e.g. singular "they" when the gender is unknown
<gilberth> We refer to them, when we care.
<no-defun-allowed> you do this with people too, but usually you use "they" because it's less dehumanising
<aeth> no-defun-allowed: Since "it" is inherently offensive to a human
<t58> also if give AI's a human face and voice then there gender will depend on that
<aeth> An AI would also be offended by "it"
smasta has joined #lisp
<White_Flame> aeth: no reason it would. but this is also wildly offtopic :)
Lord_of_Life has quit [Ping timeout: 246 seconds]
<aeth> t58: Yes, I think an AI's gender will probably be interface-based. It will have female and male faces, like e.g. Siri, except actually an AI
<Josh_2> xD
Lord_of_Life_ is now known as Lord_of_Life
<t58> well some humans like being called it ;)
<gilberth> *Sigh* How cares if this is off-topic. If somebody complains, we move and be set.
<gilberth> Who, even.
<Josh_2> This is lisp related, its about which paren is most important
<no-defun-allowed> exactly
<White_Flame> lisp has high paren-gender equality
<gilberth> Josh_2: Both are.
<aeth> you can't have a ( without a ) and that equality is enforced at the language level
<gilberth> Exactly.
<White_Flame> (let ((girl-power (list #\( \( \( \())) ... )
<White_Flame> erm, with more #s
<_death> and then, as pjb says, lisp has no parens
<aeth> White_Flame: to you the "(" in "(" and "\"(\"" and "#\(" are the same. To the compiler, that's not the case
<gilberth> aeth: Like I love my wife and we as a couple are more than both of us alone. That is what parens do.
<White_Flame> aeth: in that case, there are no parens, only lists
smasta has quit [Ping timeout: 245 seconds]
<White_Flame> lists have element slots, not bounding parentheses
<White_Flame> only source code has parentheses
<_death> and lisp has no lists ;)
<aeth> White_Flame: depends on what time
<aeth> White_Flame: at read time there are parens
<aeth> those parens go away after that, except when printing
<White_Flame> _death: yes, they have cons slots :)
<gilberth> Gentlemen, we are talking about external representation.
<gilberth> Anyhow for me the "(" still is female, because she gives birth to a new s-expr. ")" cannot do that. ")" can only pay the bills.
<t58> I can't help but feel the above is the basis for lisp rule 34
<Josh_2> oof
<gilberth> What is rule 34?
<Josh_2> OOF
<aeth> do not google that
<Josh_2> well now hes gonna do it
<t58> at not with safe search off
karlosz has joined #lisp
<t58> *at least
<Josh_2> yes look up the urban dictionary definition with safe search on
<gilberth> aeth: Will I turn blind?
karlosz has quit [Client Quit]
<aeth> gilberth: nsfw
<t58> Only if thoughts about lisp redirect your blood flow somewhere else...
<Josh_2> ;)
<gilberth> aeth: I do not work. Thanks!
<aeth> would Lisp parentheses rule 34 be on-topic in /r/LispMemes if properly marked as NSFW?
<Josh_2> i hope so xD
pankajgodbole has joined #lisp
karlosz has joined #lisp
<Josh_2> oof
<_death> also doubled them for good measure
<aeth> it looks like every "(" became "))"
<aeth> that's how non-Lispers see Lisp
<_death> but then try M-x eval-expression (let ((d (make-display-table))) (aset d 40 (vector 32)) (aset d 41 (vector 32)) (set-window-display-table nil d)) RET
<gilberth> Folks, I attend to my little elk. If you want to know and care like I feel, see: https://66.media.tumblr.com/82f9b4c9c50a3d4bac3ca15e52d91f42/tumblr_pnu7tjdKTF1rmpiddo1_1280.jpg
ebrasca has joined #lisp
<gilberth> Good night to everybody.
<Josh_2> gnight
<gilberth> [Spot the little bunny there, that is my elk.]
<gilberth> Josh_2: Thanks. Many thanks.
emaczen has quit [Remote host closed the connection]
asarch has joined #lisp
karlosz has quit [Quit: karlosz]
smasta has joined #lisp
smasta has quit [Ping timeout: 255 seconds]
jeosol has joined #lisp
<jeosol> morning guys
jasom has quit [Ping timeout: 264 seconds]
dale has quit [Quit: dale]
<t58> it's a nice 3:07am here
<Josh_2> 310 oof
asarch has quit [Quit: Leaving]
karlosz has joined #lisp
<no-defun-allowed> aeth: yea sure post that
techquila has quit [Remote host closed the connection]
<no-defun-allowed> there are no rules on /r/lispmemes other than a. it has to be funny b. it has to do with lisp and c. use a user flair pls
techquila has joined #lisp
karlosz has quit [Quit: karlosz]
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
rumbler31 has joined #lisp
karlosz has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
makomo has quit [Ping timeout: 250 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
pankajgodbole has quit [Ping timeout: 246 seconds]
karlosz has quit [Quit: karlosz]
dddddd has quit [Remote host closed the connection]
d4ryus has quit [Ping timeout: 250 seconds]
patlv has quit [Quit: patlv]
igemnace has quit [Quit: WeeChat 2.4]
jsatk has quit [Ping timeout: 258 seconds]
t58 has quit [Quit: Night All]
d4ryus has joined #lisp
postit has quit [Ping timeout: 258 seconds]
jsatk has joined #lisp
jsatk has quit [Max SendQ exceeded]
jsatk has joined #lisp
postit has joined #lisp
dale has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 245 seconds]
rumbler31 has joined #lisp
<loke> I just participated in a thread on Mastodon where I was shown an example of old PDP-8 (at least it was claimed it was PDP-8) Lisp code.
<loke> Anyway, the code had this: (RPLACD (QUOTE XSY) (QUOTE (EXPR (LAMBDA (X) ....))))
<loke> Doing an RPLACD on a quoted symbol?
<loke> Is that some complicated way of doing a DEFUN?
smasta has joined #lisp
<no-defun-allowed> could be to do with the plist maybe
<loke> Hmm, right. Didn't some old lisps define a function by setting a plist on the symbol?
<loke> So that might be setting the EXPR propoerty on the symbol,m which may be defining it as a function
libertyprime has quit [Ping timeout: 250 seconds]
libertyprime has joined #lisp
<jeosol> Has anyone experienced SBCL hanging when loading a very project with many files/libraries? I seem to get this after a updating SBCL and recompiling all the files makes it choke up. Repeating the loading process does resolve the issue
<jeosol> after killing the session and reloading
<jgkamat> I haven't seen that, but I would imagine that could be a bug (especially since you updated recently)
<pjb> loke: in LISP 1.5, symbols are implemented as cons cells indeed. Basically, their symbol-plist, with keys such as APNAME for the symbol-name, etc.
<loke> pjb: So there was no DEFUN?
<pjb> So what this rplacd is doing, is to putting an EXPR key on the symbol-plist, which is the fbinding of the symbol.
<pjb> Nope. macros will be invented only in 1964!
<pjb> When loading a program, you had DEFINE or LABEL cards, but there was no "interactive" or "run-time" defun until a tad later.
<pjb> I guess you could write a FEXPR (some kind of macro), to define a defun, but AFAIR, it wasn't predefined in LISP 1.5.
<loke> Thank you. That makes sense.
<jeosol> jgkamat: I have experience it on previous versions
libertyprime has quit [Ping timeout: 250 seconds]
<jeosol> for reference: This is the library I am trying to load: https://www.youtube.com/watch?v=sgdiRh-alfQ
<jeosol> Usually, after updates, I get the issue I describe as the whole library/packages are compiled
libertyprime has joined #lisp
<jeosol> jgkmat: Maybe it's due to the size of the application. Not sure how compilation works in SBCL
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
caltelt_ has joined #lisp
ealfonso has quit [Remote host closed the connection]
<PuercoPop> jeosol: it hands or it crashes?
makomo has joined #lisp
<PuercoPop> From Slime crashes can seem as hangs. You have to check the inferior lisp buffer
<PuercoPop> s/hands/hangs
<PuercoPop> I've run out of heap space running djula tests due to it invoking the compiler, so it doesn't seem like a stretch that loading libraries _may_ result in the compiler generating enough garbage to run out of heap space before the GC can run. Though I haven't heard of that happening to anyone
<jeosol> PuercoPop: I meant hangs
<jgkamat> jeosol: you're trying to load a video?
<jeosol> Usually, I usually wait to see if it will do anything after it hangs, but nothing happens and repeat the other files.
<jeosol> jgkamat: Not a view, that link shows the visualization of the git repo of the common lisp code. Not sure if it is too many files that's causing the issue,
<jeosol> but from PuercoPop's point, it may be the case.
<jeosol> PuercoPop: I must admit, I didn't check the inferior lisp buffer in detail. Will remember to this. But I have experience this issue each time I upgrade SBCL, so there could be something wrong.
<jeosol> PuercoPop, jgkamat: thanks
rumbler31 has quit [Remote host closed the connection]
beach has joined #lisp
<beach> Good morning everyone!
<loke> Hello beach!
esrse has joined #lisp
<jeosol> morning beach!
<MichaelRaskin> Good morning
sauvin has joined #lisp
<makomo> morning
frodef has joined #lisp
Inline has quit [Quit: Leaving]
caltelt_ has quit [Ping timeout: 245 seconds]
libertyprime has quit [Ping timeout: 245 seconds]
seok2 has joined #lisp
<seok2> I ended up just writing java script in strings, ditching parenscript
<seok2> Anyone do the same?
<no-defun-allowed> Every day we stray further from the light.
JohnMS_WORK has joined #lisp
<beach> Heh.
<seok2> ;)
<no-defun-allowed> I would probably have more problems writing JS then writing in half of Common Lisp, as I barely know the former.
ltriant has quit [Quit: leaving]
<seok2> Wish browsers support lisp :)
<MichaelRaskin> Debugging Parenscript output does require understanding the JS model of world — addition is pure JS addition, not an emulation of Lisp addition
<MichaelRaskin> seok2: I hope that inspecting data drawn in browser canvas becomes illegal in EU before WebAssembly becomes the default way of deployment…
<MichaelRaskin> (Because just using browser as a completely opaque VM for WebAssembly rendering to canvas is just too sad)
seok2 has quit [Ping timeout: 255 seconds]
<MichaelRaskin> (Inspecting the canvas details is quite useful to render any readable text, but currently this is only used for browser/system fingerprinting)
themsay has joined #lisp
mingus has joined #lisp
dale has quit [Quit: dale]
Ukari has quit [Ping timeout: 250 seconds]
Ukari has joined #lisp
<no-defun-allowed> I would much prefer if HTML used s-expressions, and a Scheme system was used instead of JavaScript as the creation myths for the latter go. The only scripting should be to add and modify new nodes in the page, and to grab and parse other files on the same server.
<no-defun-allowed> Pointy haired bosses and their XML and Java, respectively, would not find such a system appealing though.
jprajzne has joined #lisp
themsay has quit [Read error: Connection reset by peer]
vlatkoB has joined #lisp
MightyJoe has quit [Quit: No Ping reply in 180 seconds.]
MichaelRaskin has quit [Quit: MichaelRaskin]
cyraxjoe has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
nowhereman has joined #lisp
orivej has joined #lisp
igemnace has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
nowhereman has quit [Ping timeout: 258 seconds]
smasta has joined #lisp
<aeth> no-defun-allowed: XML maps to s-expressions pretty well (of course, more verbosely) with one ambiguity, which is whether to do <foo bar="baz"></foo> or <foo><bar>baz</bar></foo>. Of course, HTML adds the complication of being way too permissive of mistakes.
smasta has quit [Ping timeout: 246 seconds]
igemnace has quit [Remote host closed the connection]
<no-defun-allowed> indeed
bgardner has quit [Ping timeout: 245 seconds]
wigust has joined #lisp
__jrjsmrtn__ has joined #lisp
Krystof has quit [Remote host closed the connection]
beach has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
bgardner has joined #lisp
<pjb> aeth: sexps are also ambiguous, (foo (bar baz) tralala) is (bar baz) a sub expression, or an attribute list for foo?
wigust- has quit [Ping timeout: 245 seconds]
<pjb> (foo (bar baz quux moo) tralala) could also be written as (foo (bar baz) (quux moo) tralala)
Krystof has joined #lisp
igemnace has joined #lisp
knicklux has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 245 seconds]
igemnace has quit [Remote host closed the connection]
hhdave has joined #lisp
angavrilov has joined #lisp
mange has joined #lisp
froggey has quit [Ping timeout: 245 seconds]
froggey has joined #lisp
<aeth> pjb: I meant that the ambiguity is in s-expression to XML mapping there. without <foo bar="baz"> it's perfectly clear that your s-expression (foo (bar baz) tralala) would be <foo> <bar> baz </bar> tralala </foo>
scymtym has joined #lisp
<aeth> I know what you mean, though. Designing what goes before &body in a macro can be tricky because there's so many ways to do it.
libertyprime has joined #lisp
<p_l> obviously attributes are symbol-plists ;)
techquila has quit [Ping timeout: 268 seconds]
glv has joined #lisp
<no-defun-allowed> Can we make methods that specialise on condition types?
<shka__> yes
<shka__> but not types
<shka__> classes
angavrilov has quit [Remote host closed the connection]
gilberth has quit [Ping timeout: 264 seconds]
m00natic has joined #lisp
<no-defun-allowed> Right, thanks.
varjag has joined #lisp
angavrilov has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
dddddd has joined #lisp
<jackdaniel> uh oh, (class-of (+ 3.4 #C(1 2))) ;-> #<The BUILT-IN-CLASS SI:COMPLEX-FLOAT>
<jackdaniel> now only the whole rest numeric tower cases left to implement :)
<no-defun-allowed> jackdaniel: nicely done!
<jackdaniel> actually it is a C-flavoured mess right now
<jackdaniel> but thanks!
<no-defun-allowed> still, it's done and it sounds very valuable but tricky to implement so that's still pretty great
Josh_2 has quit [Ping timeout: 245 seconds]
<jackdaniel> "done" is overstatement; but I agree, it will be useful
<no-defun-allowed> fair, you're not done, but it's more completed than before you started
Josh_2 has joined #lisp
<shka__> jackdaniel: complex ratios?
<jackdaniel> floats, ratio is like 1/3
<jackdaniel> as a separate type baked by `float _Complex` from C
igemnace has joined #lisp
<jackdaniel> (and double, long double too)
<jackdaniel> (internally speaking, from numeric tower perspective this is still complex)
<White_Flame> in both implications of the term
<jackdaniel> heh
sz0 has joined #lisp
heisig has joined #lisp
nowhereman has joined #lisp
heisig has quit [Ping timeout: 255 seconds]
nowhereman has quit [Ping timeout: 250 seconds]
nowhere_man has joined #lisp
gilberth has joined #lisp
<shka__> good, now you can do some electric engineering calculations in ECL
<shka__> very useful
__jrjsmrtn__ has quit [Read error: Connection reset by peer]
<jackdaniel> actually it is a work sponsored by Rigetti in order to port quilc to ECL (quantum compiler in CL)
ym555 has joined #lisp
<jackdaniel> shka__: also, keep in mind that ECL does work with (complex float) type, it is just not optimized
<jackdaniel> otherwise it wouldn't be a conforming Common Lisp implementation
<shka__> aaaah, i see
nowhere_man has quit [Ping timeout: 245 seconds]
<shka__> this is extreamly useful in multitude of scientific domains
kajo has joined #lisp
brocco has joined #lisp
ym555 has quit [Quit: leaving...]
ggole has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
cydf has joined #lisp
cydf has left #lisp [#lisp]
nowhere_man has joined #lisp
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 245 seconds]
Lycurgus has joined #lisp
nowhereman has quit [Ping timeout: 245 seconds]
mange has quit [Remote host closed the connection]
jmercouris has joined #lisp
Bike has joined #lisp
Xach has quit [Ping timeout: 255 seconds]
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lycurgus has quit [Quit: Exeunt]
amerlyq has joined #lisp
moei has joined #lisp
Lord_of_Life has joined #lisp
patlv has joined #lisp
Xach has joined #lisp
patlv has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
esrse has quit [Ping timeout: 246 seconds]
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
warweasle has joined #lisp
ski has joined #lisp
<warweasle> I gamedeved last night.
<Josh_2> How'd that go?
<warweasle> Good. I am having issues with my Aim Offsets when I run. It adds the aiming animations on top of the running animations and is causing his arms to move over his head.
<Josh_2> Its a feature not a bug
<warweasle> Whoops I Just realized this is #lisp and not #gamedev.
<warweasle> I use #gamedev as my accountability group. It's let me create a solid habit.
<jackdaniel> can anyone confirm that #c(pi 1.2) goes belly up on all implementations? if so, is it a correct behavior?
<Josh_2> jackdaniel: dies for me as well
<jackdaniel> pi not of type real, but when type is checked it is very real to me (float of this or that kind)
<Josh_2> pi is not real
<warweasle> SBCL: Pi is not a type real.
<jackdaniel> error is that pi is not real*
<White_Flame> it's a symbol, not a real
<makomo> "#C reads a following object, which must be a list of length two whose elements are both reals."
<White_Flame> #c(#.pi 1.2) does work
<makomo> so the error should be correct
milanj has joined #lisp
<White_Flame> same issue as array literals
<jackdaniel> alright, thank you
ebrasca has quit [Remote host closed the connection]
m00natic has quit [Remote host closed the connection]
Ukari has quit [Remote host closed the connection]
frodef has quit [Ping timeout: 245 seconds]
Ukari has joined #lisp
patlv has joined #lisp
Ukari has quit [Remote host closed the connection]
Inline has joined #lisp
patlv has quit [Ping timeout: 245 seconds]
Ukari has joined #lisp
Ukari has quit [Ping timeout: 250 seconds]
Ukari has joined #lisp
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
t58 has joined #lisp
heisig has joined #lisp
<pjb> jackdaniel: compare '(pi . 1.2) with (cons pi 1.2)
<pjb> jackdaniel: don't forget (complex pi 1.2)
<pjb> jackdaniel: similarly: #(pi 1.2) (vector 1.2) '(pi 1.2) (list 1.2) etc.
scymtym has quit [Ping timeout: 268 seconds]
<jackdaniel> yes, I understood the first time
frodef has joined #lisp
<pjb> jackdaniel: above, the explanation was about types. But that's not the point. The point is to be careful about literal vs. constructors.
Demosthenex has quit [Quit: leaving]
gigetoo has quit [Ping timeout: 250 seconds]
ismay has joined #lisp
lucasb has joined #lisp
gigetoo has joined #lisp
ismay has quit [Remote host closed the connection]
<jmercouris> what would be a good way to structure a loop such that it returns the first value that is acceptable?
<minion> jmercouris, memo from PuercoPop: ASDF is not portable. At least not in the sense that the document appears to be is using it. Look up portable in the CLHS glossary
<minion> jmercouris, memo from PuercoPop: speaking of databases in CL. Have you seen? I haven't used it but from skimming the code it seems at least like a serious effort. https://github.com/kraison/vivace-graph-v3
<jmercouris> I could use a loop while and collect with an if
FreeBirdLjj has joined #lisp
scymtym has joined #lisp
<Bike> (loop ...bla bla bla... when (acceptablep thing) do (return thing))?
<jmercouris> Bike: yeah something like that
<jmercouris> I was just thinking of a better way to use the macro
<dlowe> jmercouris: I would just use find-if
<jmercouris> it's not a list of elements
milanj has quit [Quit: This computer has gone to sleep]
<Bike> well, that's how i'd write it
<jmercouris> actually its a function that I call, and I want to keep calling it until it gives me a value that I like, and then return that value
<Bike> don't see any reason to fuck around with collect and stuff if you just want a value
<jmercouris> there is no reason, I just didn't know any better
<jmercouris> which is why I asked
<dlowe> oh. yeah. (loop for thing = (call-function) when (acceptablep thing) do (return thing)) is it
<Bike> right
frodef has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 244 seconds]
heisig has quit [Remote host closed the connection]
<jmercouris> PuercoPop: I have seen it, but not throughougly investigated it, the lack of documentation threw me for a loop at the time, though these days, it does not phase me :D
<jmercouris> so return is a function somehow within the loop body that works as a break?
<jmercouris> or is it just part of the macro?
<jmercouris> I can only imagine how painful it must have been to implement the loop macro
<dlowe> clhs return
<dlowe> clhs block
<jmercouris> ah!
<jmercouris> return can return from blocks
<jmercouris> why is it that within functions we must specify return-from X
<dlowe> they're not named nil
<jmercouris> when it is simply just a block, why can't we just write return "8"
<jmercouris> I see
<jmercouris> so you can only use return on blocks that are not named
<dlowe> many forms have implicit nil blocks
<jmercouris> I learned something today :D
<jmercouris> every day, a little bit better at CL
<dlowe> I honestly don't know why RETURN wouldn't work on the innermost block, but there we go
gigetoo has joined #lisp
<gilberth> dlowe: It does.
<dlowe> well, it does, but the innermost block named NIL
<dlowe> not just the innermost block named anything
<gilberth> ?
<Josh_2> You can use :when and :return
<Josh_2> to break out of a loop without making ur own block
<jmercouris> it's not :when
<jmercouris> its just when
<Bike> they both work.
<Josh_2> Its personal choice
<jmercouris> oh I see
<Bike> but yes, i forgot there's a RETURN loop keyword.
<jmercouris> right, the eternal flamewar
<Josh_2> there is the :return keyword :
<Josh_2> oops
<gilberth> This is off topic: But what the language spokenin Kaliningrad? Russian? Or something else?
patlv has joined #lisp
<Bike> russian, i think
<Bike> cos after WWII the germans were forcibly expelled
orivej has quit [Ping timeout: 245 seconds]
<gilberth> Bike: Right. The Germans all left.
<jmercouris> the answer is Russian
<gilberth> OK. So it is Russian, which is fine, since I know some.
<gilberth> 3>
<Xach> please ask in #kaliningrad next time.
<jmercouris> yes, let's keep it on topic guys
<jmercouris> lest we waken the spirit of Daniel!
<Josh_2> Yes lets talk about why :when is better than just when
<gilberth> Xach: Sorry, but #lisp is much more knowledgeable.
<Josh_2> maybe try lispcafe next time
<Xach> gilberth: that unfortunately does not make it suitable
<jmercouris> the Lisp mafia strikes again
<gilberth> It does.
<pjb> jmercouris: (loop thereis)
<gilberth> Sorry, guys.
<Josh_2> off to the gulags
<pjb> jmercouris: (loop for i from 0 thereis (when (< 10 i) i)) #| --> 11 |#
<gilberth> Josh_2: Again?
<Josh_2> yeh
<jmercouris> pjb: yes, but it is not a list, it is a function I have to invoke
<pjb> jmercouris: you need a predicate that returns the object if you want to get the object.
<pjb> here the function is (< 10 .)
<gilberth> Josh_2: That's mean.
<dlowe> woah. TIL
<jmercouris> so (loop for i = (funcallxy) thereis (when (ok? i) i))
<Bike> didn't know thereis returned the value
<pjb> (loop for i from 0 thereis (digit-char-p (code-char i))) #| --> 0 |#
<dlowe> mind blown. Thanks pjb!
<pjb> Bike: it does. Usually we have NIL or T, but it returns the generalized boolean as well.
<pjb> Josh_2: don't use an imagebin to paste code!
<Josh_2> I wasn't pasting code
<jmercouris> has anyone ever managed to master the loop macro in its entirety?
<Xach> jmercouris: I think you might mean that as a joke, but I'd like you to know both how stressful and hurtful it is that a person persistently makes false accusations along those lines. Especially someone who seems to have mental problems and who does not live especially far from me.
<Josh_2> welll I sorta was but I woulda used a pastebin if it wasn't just to simply demonstrate
<pjb> this is code!
<pjb> or text.
<Josh_2> ur code
<Josh_2> *dabs*
<Josh_2> Who is Daniel
<Josh_2> :O
<jmercouris> Xach: I definitely meant it as a joke. I find the article so preposterous that I can't help but find it funny. Anyways, with this new information that you've brought to light, I can understand why it would upset you, so I will not bring it up again. Sorry!
<Josh_2> oof
<Xach> I generally ignore it, so it's painful when it creeps in through other ways.
edgar-rft has quit [Quit: Leaving]
atgreen has quit [Ping timeout: 246 seconds]
Zaab1t has joined #lisp
beach has joined #lisp
dale has quit [Quit: dale]
gxt has joined #lisp
rippa has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
gigetoo has quit [Ping timeout: 245 seconds]
gxt has quit [Ping timeout: 246 seconds]
<warweasle> I might be late to this conversation but (realp pi) => T
<warweasle> But #C(pi 0) fails becuase it is not a type real.
<warweasle> I am confused. Why wouldn't pi be real? It's not complex.
<grewal> compare (realp pi) and (realp 'pi)
gigetoo has joined #lisp
<warweasle> So #C(..) thinks it's a symbol?
<grewal> Or better yet, compare '(pi) with (list pi)
<warweasle> OK. So it's seeing it as a symbol.
<nirved> (complex pi 0)
<warweasle> (apply #'complex '(pi 0))
optikalmouse has joined #lisp
<warweasle> vs (apply #'complex `(,pi 0))
<warweasle> Thanks for explaining it.
LiamH has joined #lisp
<pjb> warweasle: if you insist on the literal: #C(#.pi #.(exp 1.0l0)) -> #C(3.141592653589793D0 2.718281828459045D0)
mathrick has quit [Ping timeout: 250 seconds]
<pjb> warweasle: how do you implement #C? (set-dispatch-macro-character #\# #\C (lambda (stream ch arg) (declare (ignore ch)) (assert (null arg)) (apply (function complex) (read stream))))
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<pjb> warweasle: note: no eval!
frodef has joined #lisp
optikalmouse has left #lisp [#lisp]
Josh_2 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
shka_ has joined #lisp
jmercouris has quit [Ping timeout: 250 seconds]
mathrick has joined #lisp
frodef has quit [Ping timeout: 244 seconds]
dale has joined #lisp
<shka_> hello
<shka_> i just added documentation for streaming algorithms, constructive comments are welcome https://sirherrbatka.github.io/cl-data-structures/l_8.html#4404603616007106200
orivej has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
Demosthenex has joined #lisp
hhdave has quit [Ping timeout: 245 seconds]
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
atgreen has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
hthunnissen has joined #lisp
vms14 has joined #lisp
keep_learning has quit [Remote host closed the connection]
<margaritamike> What is the equivalent of ctypes from Python but in the SBCL world?
<Bike> cffi, probably
<akater> My print-object method depends on some method b that, in turn, depends on a global variable *g*. (let (*g*) (b ..)) does affect return value of b but printing itself is insensitive to the value of *g* unless set with setq. What could be wrong? I'm inexperienced with global variables.
<Bike> When you say "global" you mean *g* has a defvar or defparameter somewhere, yes?
<akater> Bike: yes
<Bike> Could you paste some code in a pastebin service? "depends on" could mean a few different things.
lumm has joined #lisp
glv has quit [Quit: Leaving]
<margaritamike> is cffi quite useful?
adip has joined #lisp
<akater> Bike: https://pastebin.com/YVV3Ukax --- body is b, *do-cleanup-go-tags* is *g*. funcall-if is a macro that is hopefully clear.
jgodbou has joined #lisp
<Bike> margaritamike: if you wa nt to interface with c libraries, sure.
<Bike> I don't think interfacing with C is quite as common here as it is in python, but it's still done.
<Bike> akater: is (funcall-if x y ...) = (when x (funcall y ...))?
<Bike> wait, actually.
<Bike> Are you doing like (let ((*do-cleanup-go-tags* whatever)) something-that-returns-object) and then looking at the returned object in the repl?
hthunnissen is now known as hugotty
<akater> Bike: Yes, I try (let ..) in the REPL.
<akater> Bike: re: funcall-if (defmacro funcall-if (c f &rest args) `(if ,c (funcall ,f ,@args) (values ,@args)))
<Bike> Right. So the problem here is that by the time the repl prints the object, the (let ...) form has already been exited.
<Bike> Try an explicit print call, like (let ((*do-cleanup-go-tags* whatever)) (print object))
<akater> BTW, it works on its own in an org src block!
<Bike> I don't know what that means.
<akater> Bike: I got it, thank you.
<Bike> do you see the expected print output now?
<akater> Bike: Yes. The object is printed as expected. (And the representation is then printed as before.)
<Bike> ok, great.
<Xach> I would like a switch I could flip on or off to warn me if I write ":initarg foo" instead of ":initarg :foo"
<Bike> so yeah the only conceptual thing here is that the repl prints your object _after_ the entire form has executed. so any bindings you do won't be in place.
<Xach> I know the value of the former but when I write it it is 99% an error
<Bike> yeah, that sounds nice.
grewal has quit [Remote host closed the connection]
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
hiroaki has joined #lisp
<akater> My mistake, there's no difference in org. Bike: Org src blocks provide notebook-style evaluation for Emacs. Here's a screenshot: https://ibb.co/QrH408g
FreeBirdLjj has joined #lisp
scymtym has quit [Ping timeout: 268 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
grewal has joined #lisp
datajerk has quit [Ping timeout: 244 seconds]
ealfonso has joined #lisp
JetJej has joined #lisp
kajo has joined #lisp
catchme has joined #lisp
milanj has joined #lisp
ebrasca has joined #lisp
<ealfonso> is there a way to list all the currently open file handles in SBCL? my lisp long-running program is unable to start new subprocesses because of "Cannot select(2) on 1281: above FD_SETSIZE limit."
datajerk has joined #lisp
<Xach> ealfonso: on linux, you can check the /proc filesystem
<Xach> and there are many other options
<ealfonso> Xach thanks. I used "ls -l /proc/$(pidof stumpwm)/fd/*" to see a lot of open socket connections, probably a bug in my lisp program not closing usocket servers. I don't know if I can close them externally or if I need a way to list and kill them from inside lisp.
<Xach> ealfonso: not sure, sorry
<ealfonso> Xach thanks
tyler569 has left #lisp [#lisp]
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
sauvin has quit [Ping timeout: 245 seconds]
gxt has joined #lisp
<ealfonso> may not relevant to lisp or usocket, but I was able to gdb attach to the process and "call (int)close($FD)" for each open socket listed by /proc/<pid>/fd/*
<dlowe> ealfonso: you could also have just closed the first few hundred integers above 2
<dlowe> in your lisp image
<p_l> ealfonso: for usocket fd's, call shutdown() on them
nanoz has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
cyraxjoe has quit [Ping timeout: 245 seconds]
cyraxjoe has joined #lisp
ggole has quit [Quit: Leaving]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
milanj has quit [Quit: This computer has gone to sleep]
Zaab1t has quit [Quit: bye bye friends]
torbo has joined #lisp
techquila has joined #lisp
edgar-rft has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
libertyprime has joined #lisp
FreeBirdLjj has joined #lisp
Bobbejahn has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
torbo has quit [Remote host closed the connection]
lavaflow has quit [Ping timeout: 245 seconds]
lavaflow has joined #lisp
vlatkoB has quit [Remote host closed the connection]
libertyprime has quit [Ping timeout: 268 seconds]
techquila has quit [Remote host closed the connection]
libertyprime has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
nowhereman has joined #lisp
FreeBirdLjj has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
<aeth> Some languages have subtype definition. Hypothetically it would just be this, right? (defmacro defsubtype (name parent lambda-list &body body) `(progn (deftype ,name ,lambda-list ,@body) (unless (subtypep ',name ',parent) (error "Type ~A isn't a subtype of ~A." ',name ',parent)) ',name))
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<aeth> Not quite that simple, of course, since that error checking will only work when lambda-list is empty in the definition
<Bike> i have never heard of "subtype definition"
<Bike> what languages are you thinking of here
<aeth> Someone in another channel was doing an Ada implementation so I looked that up
<aeth> The type system seems *very* similar. It even has mod 24 as a type!
<Bike> i don't see anything about subtypes
<Bike> wait nvm
<aeth> subtype Working_Hours is Hours range 0 .. 12;
<Bike> yeah i guess that's the code you wrote
<aeth> So I was thinking about e.g. (defsubtype foo (integer 0 32) () `(integer 0 42)) failing but (defsubtype foo (integer 0 42) () `(integer 0 32)) working
<aeth> (the parent doesn't have to be named in this macro, probably does in Ada)
datajerk has quit [Ping timeout: 255 seconds]
<aeth> I'd say the main difference is that member types in CL are (afaik) unordered so you wouldn't be able to do a defsubtype of a range :monday to :friday, you'd have to do `(member :monday :tuesday :wednesday :thursday :friday)
<Bike> they are unordered, yes
milanj has joined #lisp
Arcaelyx has joined #lisp
<aeth> subtypep does seem to work with types with * so I think defsubtype could be extended to work even with more complicated type lambda-lists as long as (1) the parent is a symbol and (2) the argument count matches. I suppose it would replace ',name with '(,name * * * * ...) where the generated *s tail matches the length of the lambda-list.
orivej has quit [Ping timeout: 246 seconds]
emaczen has joined #lisp
<Bike> uh, no.
<Xach> Ha! I'm now in the situation of having too many open files, and I am on a system without a /proc
<Xach> I guess I will use lsof
<Bike> they're like, lambda lists. you can put &rest in there and stuff.
<Bike> also how the arguments are used is totally up to the body so * might not be sensible. like (mod *) isn't allowed.
<Bike> but this whole thing is just for an assertion anyway so it doesn't seem like a big deal
<aeth> Bike: yes, afaik, the only point of defining a subtype is to verify that it is a subtype when defining a type... at least, the concept in CL would be that way
<aeth> Bike: should there be a mini-language that says how to test its subtypep relationship?
<Bike> does this not strike you as kind of overcomplicated and ridiculous
<aeth> Well, I guess that's what happens when I try to see if an Ada concept is also doable in CL.
lucasb has joined #lisp
Bobbejahn has quit [Ping timeout: 250 seconds]
angavrilov has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jprajzne has quit [Quit: jprajzne]
paul0 has joined #lisp
jprajzne has joined #lisp
paul0 has quit [Read error: Connection reset by peer]
nanoz has quit [Ping timeout: 245 seconds]
shka_ has quit [Ping timeout: 246 seconds]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
spoeplau has joined #lisp
nowhereman has quit [Ping timeout: 258 seconds]
jmercouris has joined #lisp
<jmercouris> how to take a string "(print \"fish\")" and eval it?
<jmercouris> I know how to do (eval '(print "fish")), but not how to do it with a string
<no-defun-allowed> (eval (read-from-string "(cons 1 2)"))
<jmercouris> thank you
<jmercouris> I tried just read... without thinking
<no-defun-allowed> (with-input-from-string (s "(cons 1 2)") (read s)) == (read-from-string "(cons 1 2)")
aindilis has quit [Ping timeout: 246 seconds]
scymtym has joined #lisp
<jmercouris> yes
<jmercouris> thanks for the tip
cyraxjoe has quit [Ping timeout: 246 seconds]
cyraxjoe has joined #lisp
vms14 has quit [Quit: WeeChat 2.3]
varjag has joined #lisp
orivej has joined #lisp
frodef has joined #lisp
milanj has quit [Ping timeout: 245 seconds]
amerlyq has quit [Quit: amerlyq]
FreeBirdLjj has joined #lisp
ltriant has joined #lisp
hevalkinch has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
karlosz has joined #lisp
frodef has quit [Ping timeout: 255 seconds]
karlosz has quit [Remote host closed the connection]
emaczen has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 246 seconds]
gilberth has left #lisp [#lisp]
Bike has quit []
hiroaki has quit [Ping timeout: 250 seconds]
varjag has quit [Ping timeout: 255 seconds]
hevalkinch has quit [Quit: Leaving.]
<catchme> Is it OK to use `defun` inside callback function?
<catchme> callback from C lib
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 264 seconds]
spoeplau has quit [Ping timeout: 245 seconds]
lumm has quit [Remote host closed the connection]
Aruseus has joined #lisp
jmercouris has quit [Remote host closed the connection]
JetJej has quit [Read error: Connection reset by peer]
t58 has quit [Quit: (quit)]
atgreen has quit [Ping timeout: 245 seconds]
libertyprime has quit [Remote host closed the connection]
<no-defun-allowed> it isn't ok to use nested defuns anywhere
<no-defun-allowed> *that isn't the toplevel, sorry
<no-defun-allowed> well, nested is anywhere other than the toplevel so i don't need the correction but no you should use FLET or LABELS
moei has quit [Quit: Leaving...]
wigust has quit [Remote host closed the connection]
wigust has joined #lisp
svillemot has quit [Ping timeout: 255 seconds]
<Xach> no-defun-allowed there!
svillemot has joined #lisp
LiamH has quit [Quit: Leaving.]
j-r has joined #lisp
Bike has joined #lisp
<no-defun-allowed> (dunno why they made nested DEFINE allowed in scheme, it looks weird against lexical scoping IMO)
FreeBirdLjj has joined #lisp
keep_learning has joined #lisp
FreeBirdLjj has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 250 seconds]
libertyprime has joined #lisp
FreeBirdLjj has joined #lisp
igemnace has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
atgreen has joined #lisp
ebrasca has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
_whitelogger has joined #lisp
akoana has joined #lisp
<LdBeth> cause it's usually implemented as a warpper to set!
<LdBeth> and a tiny implementation is encouraged as a feature