2020-05-01T00:00:03Z cantstanya quit (Remote host closed the connection)
2020-05-01T00:02:36Z cantstanya joined #lisp
2020-05-01T00:05:27Z Oladon quit (Quit: Leaving.)
2020-05-01T00:08:49Z hsaziz joined #lisp
2020-05-01T00:09:23Z mason joined #lisp
2020-05-01T00:13:58Z pjb joined #lisp
2020-05-01T00:24:14Z red-dot joined #lisp
2020-05-01T00:27:27Z buffergn0me quit (Ping timeout: 240 seconds)
2020-05-01T00:29:53Z hsaziz quit (Quit: hsaziz)
2020-05-01T00:33:16Z Necktwi joined #lisp
2020-05-01T00:35:01Z Necktwi_ quit (Ping timeout: 264 seconds)
2020-05-01T00:35:07Z karswell_ joined #lisp
2020-05-01T00:39:09Z zaquest quit (Quit: Leaving)
2020-05-01T00:43:17Z zaquest joined #lisp
2020-05-01T00:43:49Z karswell_ is now known as karswell
2020-05-01T00:45:33Z buffergn0me joined #lisp
2020-05-01T01:03:34Z bitmapper quit (Ping timeout: 246 seconds)
2020-05-01T01:08:02Z Jeanne-Kamikaze joined #lisp
2020-05-01T01:08:30Z Xach quit (Ping timeout: 260 seconds)
2020-05-01T01:08:37Z Xach joined #lisp
2020-05-01T01:13:17Z pjb quit (Ping timeout: 246 seconds)
2020-05-01T01:16:06Z MerlinTheWizard quit (Remote host closed the connection)
2020-05-01T01:16:26Z MerlinTheWizard joined #lisp
2020-05-01T01:40:56Z ArthurStrong quit (Quit: leaving)
2020-05-01T01:48:01Z karlosz quit (Quit: karlosz)
2020-05-01T01:50:27Z wxie joined #lisp
2020-05-01T01:54:40Z Aurora_iz_kosmos joined #lisp
2020-05-01T01:54:52Z Aurora_v_kosmose quit (Disconnected by services)
2020-05-01T01:54:58Z Aurora_iz_kosmos is now known as Aurora_v_kosmose
2020-05-01T02:02:19Z gko joined #lisp
2020-05-01T02:05:36Z nmg joined #lisp
2020-05-01T02:14:24Z pilne quit (Quit: Tis but a scratch)
2020-05-01T02:14:36Z Bike quit (Quit: Lost terminal)
2020-05-01T02:16:13Z monok joined #lisp
2020-05-01T02:17:53Z wxie1 joined #lisp
2020-05-01T02:18:28Z mono quit (Ping timeout: 246 seconds)
2020-05-01T02:19:45Z wxie quit (Ping timeout: 240 seconds)
2020-05-01T02:19:45Z wxie1 is now known as wxie
2020-05-01T02:20:06Z buffergn0me quit (Ping timeout: 240 seconds)
2020-05-01T02:27:02Z wxie quit (Read error: Connection reset by peer)
2020-05-01T02:29:14Z nmg` joined #lisp
2020-05-01T02:30:45Z nmg quit (Ping timeout: 240 seconds)
2020-05-01T02:35:35Z prefixt quit (Quit: Leaving)
2020-05-01T02:36:30Z karlosz joined #lisp
2020-05-01T02:41:52Z jruiz__ quit (Ping timeout: 258 seconds)
2020-05-01T02:45:50Z lxbarbos` joined #lisp
2020-05-01T02:46:11Z igemnace quit (Quit: WeeChat 2.8)
2020-05-01T02:50:25Z lxbarbosa quit (Ping timeout: 272 seconds)
2020-05-01T02:51:03Z turona quit (Ping timeout: 272 seconds)
2020-05-01T02:51:41Z turona joined #lisp
2020-05-01T02:55:48Z libertyprime joined #lisp
2020-05-01T03:01:56Z igemnace joined #lisp
2020-05-01T03:05:20Z buffergn0me joined #lisp
2020-05-01T03:11:03Z pjb joined #lisp
2020-05-01T03:12:13Z efm joined #lisp
2020-05-01T03:12:13Z efm quit (Remote host closed the connection)
2020-05-01T03:17:19Z lowryder quit (Ping timeout: 265 seconds)
2020-05-01T03:20:36Z lowryder joined #lisp
2020-05-01T03:22:12Z _jrjsmrtn joined #lisp
2020-05-01T03:22:44Z beach: Good morning everyone!
2020-05-01T03:23:00Z nmg` quit (Remote host closed the connection)
2020-05-01T03:24:13Z __jrjsmrtn__ quit (Ping timeout: 264 seconds)
2020-05-01T03:28:25Z lxbarbos` quit (Ping timeout: 272 seconds)
2020-05-01T03:40:24Z karayan joined #lisp
2020-05-01T03:44:15Z pjb quit (Ping timeout: 272 seconds)
2020-05-01T03:49:36Z toorevitimirp joined #lisp
2020-05-01T03:52:39Z slyrus__ joined #lisp
2020-05-01T03:55:04Z slyrus_ quit (Ping timeout: 246 seconds)
2020-05-01T03:59:03Z madage quit (Ping timeout: 240 seconds)
2020-05-01T03:59:15Z Jeanne-Kamikaze quit (Quit: Leaving)
2020-05-01T04:01:39Z madage joined #lisp
2020-05-01T04:01:57Z ayuce quit (Remote host closed the connection)
2020-05-01T04:10:44Z ayuce joined #lisp
2020-05-01T04:17:01Z vivit quit (Ping timeout: 264 seconds)
2020-05-01T04:17:26Z vivit joined #lisp
2020-05-01T04:27:58Z torbo quit (Remote host closed the connection)
2020-05-01T04:41:25Z narimiran joined #lisp
2020-05-01T04:43:43Z renzhi_ quit (Ping timeout: 246 seconds)
2020-05-01T04:50:16Z SGASAU quit (Remote host closed the connection)
2020-05-01T04:51:08Z SGASAU joined #lisp
2020-05-01T04:59:35Z Oladon joined #lisp
2020-05-01T05:02:12Z akoana left #lisp
2020-05-01T05:05:21Z buffergn0me quit (Quit: ERC (IRC client for Emacs 26.2))
2020-05-01T05:06:13Z boeg: good morning
2020-05-01T05:10:32Z krid quit (Ping timeout: 256 seconds)
2020-05-01T05:10:45Z MerlinTheWizard quit (Ping timeout: 240 seconds)
2020-05-01T05:14:37Z karswell quit (Remote host closed the connection)
2020-05-01T05:15:51Z karswell joined #lisp
2020-05-01T05:19:20Z patlv quit (Quit: patlv)
2020-05-01T05:20:11Z luckless quit (Remote host closed the connection)
2020-05-01T05:23:07Z boeg: I have been fighting this weird error I didn't understand anything about for hours, yesterday, and I guess what helped was getting some sleep, because when I looked at it now after waking up, it suddenly occurred, that maybe its not an error i have introduced in my code. Surely enough, trying to run a different project using the same libraries (caveman2 and mito), and the error is suddenly also there. The only thing I can
2020-05-01T05:23:07Z boeg: think of
2020-05-01T05:23:07Z boeg: having introduced the bug is that I did a quicklisp dist upgrade yesterday.
2020-05-01T05:23:31Z boeg: If any one wants to have a look and see if they can see what is going on, here is the backtrace: https://pastebin.com/9RyRaaFK
2020-05-01T05:24:16Z boeg: is it just a bug that has been introduced in the quicklisp version of uax-15-20200325-git, whatever that is?
2020-05-01T05:24:22Z vlatkoB joined #lisp
2020-05-01T05:24:56Z beach: boeg: Your error is that you are trying to read a stream with an encoding that does not correspond to the contents.
2020-05-01T05:25:40Z beach: Perhaps you are reading with an encoding of UTF-8 and the stream contains LATIN-1?
2020-05-01T05:25:49Z boeg: right, i see that, but i guess what i'm asking is, what can be the culprit? I haven't changed the code, what has changed is that i did a dist upgrade of quicklisp
2020-05-01T05:26:26Z boeg: to be honest, I have changed the code in project A which i was working on, but testing project B now, that i haven't touched for days before the dist upgrade, and it suddenly doesn't work there either
2020-05-01T05:26:34Z boeg: obviously, i can be mistaken
2020-05-01T05:27:35Z boeg: beach: also, i'm not reading anything. It's when I try to connect to postgres with mito. Its in there the error occurs
2020-05-01T05:27:41Z boeg: as far as I can see at least
2020-05-01T05:27:55Z boeg: maybe mito was updated
2020-05-01T05:28:15Z beach: boeg: Look at the backtrace...
2020-05-01T05:28:40Z beach: It says sb-impl::fd-stream-read-n-characters/ascii
2020-05-01T05:29:14Z boeg: so it expects UTF-8 but ascii is provided?
2020-05-01T05:29:16Z beach: And you are trying to read a character  which is not ascii.
2020-05-01T05:29:18Z boeg: as you mentioned?
2020-05-01T05:29:37Z beach: It expects ascii and you are giving it  which is not ascii.
2020-05-01T05:29:47Z boeg: let me have a look around the code for that
2020-05-01T05:29:51Z boeg: 2sec
2020-05-01T05:30:44Z beach: It appears that the file CompositionExclusions.txt contains characters that are not ASCII.
2020-05-01T05:30:56Z beach: boeg: I mean, look at the backtrace.
2020-05-01T05:31:04Z boeg: yeah
2020-05-01T05:31:08Z boeg: but its no my file
2020-05-01T05:31:10Z boeg: not*
2020-05-01T05:31:16Z beach: I can't help you with that.
2020-05-01T05:31:19Z boeg: i dunno what that is
2020-05-01T05:31:32Z beach: I am just telling you how to interpret the backtrace and the error.
2020-05-01T05:31:33Z boeg: I believe it has been introduced with the dist-upgrade, as i said
2020-05-01T05:31:38Z boeg: yeah, i udnerstand
2020-05-01T05:31:41Z boeg: and thank you for that!
2020-05-01T05:31:47Z beach: Sure.
2020-05-01T05:32:43Z boeg: beach: looking at the path /Users/cb/.roswell/lisp/quicklisp/dists/quicklisp/software/uax-15-20200325-git/data/CompositionExclusions.txt doesnt it look like its part of uax-15, the library?
2020-05-01T05:33:21Z beach: It does.
2020-05-01T05:33:40Z beach: If I were you, I would start by looking at that file to make sure it does contain non-ASCII characters.
2020-05-01T05:33:49Z boeg: yeah, good idea
2020-05-01T05:40:09Z boeg: beach: there was one other filed called DerivedNormalizationProps.txt with same error - if I just empty those two files, the error goes away, so its something in uax-15 that is wrong and was introduced to my system with the dist-upgrade
2020-05-01T05:40:30Z pjb joined #lisp
2020-05-01T05:41:28Z boeg: is my guess anyways
2020-05-01T05:41:35Z beach: I think I have supplied all the information I can for this problem. I don't use any of the software you seem to be using here, so I can't reproduce it.
2020-05-01T05:41:55Z boeg: no problem, just wanted to share my findings
2020-05-01T05:42:11Z beach: Sure.
2020-05-01T05:43:56Z MerlinTheWizard joined #lisp
2020-05-01T05:44:53Z boeg: Do you know of a way where I can figure out where the dependency of uax-15 lies in the chain of dependencies? It's not directly with mito, so it must be one of its dependencies, is my guess. So save for going through them by hand, do you know if quicklisp can be utilities to easily show what dependents on a specific library
2020-05-01T05:44:55Z boeg: ?
2020-05-01T05:45:13Z boeg: utilised*
2020-05-01T05:46:18Z beach: I am afraid I don't. But you should be able to look at the ASDF file(s) in the :DEPENDS-ON option.
2020-05-01T05:47:09Z boeg: yes indeed, thanks
2020-05-01T05:53:36Z boeg: ah, its postmodern that has a dependency on uax-15
2020-05-01T05:54:57Z adlai hopes nobody will get too insulted if (defun ql:yolo () (mapcar 'funcall '(ql:update-client ql:update-all-dists)))
2020-05-01T05:55:28Z beach: boeg: There is no particular reason that file should contain non-ascii characters. You may want to check that it has not been corrupted.
2020-05-01T05:56:07Z karayan quit (Ping timeout: 240 seconds)
2020-05-01T05:56:26Z boeg: right, yeah, i ws also thinking that if a "big" library like postmodern uses uax-15, and I have a bug in it, but htere is nothing on the issue tracker about it, which there isn't, it's probably localized to my system
2020-05-01T05:56:31Z karayan joined #lisp
2020-05-01T05:58:20Z milanj joined #lisp
2020-05-01T05:59:17Z Oladon quit (Quit: Leaving.)
2020-05-01T05:59:40Z nmg` joined #lisp
2020-05-01T06:00:02Z libertyprime quit (Remote host closed the connection)
2020-05-01T06:02:41Z milanj quit (Client Quit)
2020-05-01T06:03:50Z boeg: beach: nope, overwriting them with those found on the github repository doesn't work, same errors, only emptying the files (or writing something random utf-8) makes it work...
2020-05-01T06:05:32Z boeg: and if I empty them, and then add "fkdsjfk Ã" into it, and reload everything, the error is there again, so it seems its because there is some non-ascii in it. Or maybe there should be, but it gets loaded now by mistake?
2020-05-01T06:05:37Z Nilby: (setf sb-impl::*default-external-format* :utf-8) ?
2020-05-01T06:06:00Z gravicappa joined #lisp
2020-05-01T06:06:19Z Nilby: It has a "© 2016 Unicode®, Inc"
2020-05-01T06:06:23Z boeg: Nilby: can I just run that in slime before loading the packages?
2020-05-01T06:06:39Z boeg: Nilby: indeed, i see that, but i wonder why it errors now, and didn't before - does it get loaded by mistake?
2020-05-01T06:06:39Z Nilby: Probably?
2020-05-01T06:06:47Z phoe: boeg: what is your SBCL version?
2020-05-01T06:06:59Z boeg: phoe: 2sec
2020-05-01T06:07:00Z phoe: the newer ones have utf-8 set by default
2020-05-01T06:07:01Z Nilby: I've had to do that only on some version windows.
2020-05-01T06:07:07Z phoe: (lisp-implementation-version)
2020-05-01T06:07:38Z boeg: 2.0.2 via roswell
2020-05-01T06:08:15Z Nilby: I seem to have that prefixed by: #+(and sbcl win32) in my .lisprc
2020-05-01T06:08:20Z phoe: 2.0.3 and newer defaults to utf-8
2020-05-01T06:08:39Z boeg: maybe I should see about upgrading it
2020-05-01T06:11:01Z quazimodo quit (Ping timeout: 264 seconds)
2020-05-01T06:12:45Z hdasch quit (Ping timeout: 240 seconds)
2020-05-01T06:12:52Z hdasch joined #lisp
2020-05-01T06:13:43Z pjb quit (Ping timeout: 272 seconds)
2020-05-01T06:17:48Z quazimodo joined #lisp
2020-05-01T06:18:37Z _paul0 quit (Remote host closed the connection)
2020-05-01T06:18:42Z toorevitimirp quit (Ping timeout: 256 seconds)
2020-05-01T06:18:47Z boeg: seems to be it - upgrading to sbcl 2.0.2 seems to have fixed the problem with uax-15, so it seems that after me dist-upgrading quicklisp yesterday, something was changed that didn't work with sbcl 2.0.2 anymore. With sbcl 2.0.4, it works, it seems
2020-05-01T06:18:51Z boeg: thank you for your help, everybody
2020-05-01T06:18:57Z paul0 joined #lisp
2020-05-01T06:19:05Z boeg: upgrading to sbcl 2.0.4 seems to have fixed the problem*
2020-05-01T06:19:34Z theosvoitha joined #lisp
2020-05-01T06:47:46Z vivit quit (Ping timeout: 260 seconds)
2020-05-01T06:56:54Z lacroixboy_ quit (Ping timeout: 240 seconds)
2020-05-01T06:57:51Z lacroixboy joined #lisp
2020-05-01T06:58:57Z vivit joined #lisp
2020-05-01T07:04:09Z sz0 joined #lisp
2020-05-01T07:05:44Z orivej quit (Ping timeout: 256 seconds)
2020-05-01T07:09:07Z micro joined #lisp
2020-05-01T07:09:20Z duncan_ joined #lisp
2020-05-01T07:20:47Z MerlinTheWizard quit (Ping timeout: 240 seconds)
2020-05-01T07:20:56Z luckless joined #lisp
2020-05-01T07:23:11Z ggole joined #lisp
2020-05-01T07:25:19Z zooey quit (Remote host closed the connection)
2020-05-01T07:25:40Z zooey joined #lisp
2020-05-01T07:25:44Z cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
2020-05-01T07:25:54Z cyraxjoe joined #lisp
2020-05-01T07:26:32Z ayuce left #lisp
2020-05-01T07:27:18Z rgherdt joined #lisp
2020-05-01T07:39:18Z nmg`` joined #lisp
2020-05-01T07:40:26Z rgherdt quit (Quit: Leaving)
2020-05-01T07:41:10Z nmg` quit (Ping timeout: 246 seconds)
2020-05-01T07:46:08Z pve joined #lisp
2020-05-01T07:47:40Z SGASAU quit (Remote host closed the connection)
2020-05-01T07:48:22Z SGASAU joined #lisp
2020-05-01T07:49:45Z dddddd joined #lisp
2020-05-01T07:53:10Z vivit quit (Ping timeout: 256 seconds)
2020-05-01T07:55:31Z karayan quit (Ping timeout: 246 seconds)
2020-05-01T07:55:54Z karayan joined #lisp
2020-05-01T07:57:10Z duncan_ quit (Remote host closed the connection)
2020-05-01T08:03:03Z frgo_ joined #lisp
2020-05-01T08:03:06Z pjb joined #lisp
2020-05-01T08:03:22Z rwcom quit (Quit: Ping timeout (120 seconds))
2020-05-01T08:04:01Z rwcom joined #lisp
2020-05-01T08:05:15Z pve quit (Quit: leaving)
2020-05-01T08:06:08Z frgo_ quit (Remote host closed the connection)
2020-05-01T08:06:16Z rwcom quit (Client Quit)
2020-05-01T08:06:27Z frgo quit (Ping timeout: 272 seconds)
2020-05-01T08:06:47Z frgo joined #lisp
2020-05-01T08:16:26Z decent-username joined #lisp
2020-05-01T08:19:24Z drewc quit (Ping timeout: 265 seconds)
2020-05-01T08:20:48Z pve joined #lisp
2020-05-01T08:21:14Z elflng quit (Read error: No route to host)
2020-05-01T08:26:22Z elflng joined #lisp
2020-05-01T08:35:34Z ln^ joined #lisp
2020-05-01T08:36:01Z pjb quit (Ping timeout: 265 seconds)
2020-05-01T08:38:02Z rgherdt joined #lisp
2020-05-01T08:39:03Z drewc joined #lisp
2020-05-01T08:39:47Z epony quit (Quit: reconfiguration)
2020-05-01T08:40:09Z micro quit (Quit: Lost terminal)
2020-05-01T08:40:40Z micro joined #lisp
2020-05-01T08:44:29Z epony joined #lisp
2020-05-01T08:44:44Z ln^ quit (Quit: Leaving)
2020-05-01T08:45:05Z micro quit (Client Quit)
2020-05-01T08:45:07Z shka_ joined #lisp
2020-05-01T08:45:55Z epony quit (Max SendQ exceeded)
2020-05-01T08:46:22Z epony joined #lisp
2020-05-01T08:51:03Z sth_ joined #lisp
2020-05-01T08:52:05Z sth_: hey yall. i'm very new to lisp and kinda overwhelmed with how many implementations there are. for 2020, what's the best way to go about getting an environment set up that works well for Practical Common Lisp?
2020-05-01T08:52:13Z fourier joined #lisp
2020-05-01T08:52:20Z phoe: minion: tell sth_ about portacle
2020-05-01T08:52:20Z minion: sth_: portacle: Portacle is a complete IDE for Common Lisp that you can take with you on a USB stick https://shinmera.github.io/portacle/
2020-05-01T08:52:44Z phoe: a preconfigured distro of emacs + slime + sbcl + git
2020-05-01T08:53:10Z phoe: also contains the Quicklisp package manager if you want to download some Lisp code from the Internet.
2020-05-01T08:53:17Z boeg: indeed, it's the answer. Obviously, should come preconfigured with evil-mode, but other than that :)
2020-05-01T08:53:25Z boeg hides
2020-05-01T08:53:27Z phoe: let's not go into religious debates here
2020-05-01T08:53:34Z boeg: :P
2020-05-01T08:53:54Z Shinmera: boeg: you aren't the first to say that, but everyone that does tell me that is never ready to actually put in the work and submit a patch to actually include it.
2020-05-01T08:54:04Z Shinmera: so it stays not in.
2020-05-01T08:54:22Z boeg: Shinmera: indeed! :)
2020-05-01T08:54:43Z boeg: seems like the link has changed to https://portacle.github.io, regarding the link the minion posts
2020-05-01T08:54:57Z phoe: yes, but the redirect is there
2020-05-01T08:55:05Z boeg: indeed
2020-05-01T08:55:48Z jonatack_ joined #lisp
2020-05-01T08:56:01Z Shinmera is now annoyed
2020-05-01T08:56:06Z Shinmera: oh well, better turn to work.
2020-05-01T08:59:02Z jonatack quit (Ping timeout: 265 seconds)
2020-05-01T08:59:55Z sth_: cool thanks :)
2020-05-01T09:03:06Z sth_: evil mode is something i've heard a lot about and would probably appreciate, but i also want to actually learn emacs too so i've never bothered with it
2020-05-01T09:03:59Z ym quit (Remote host closed the connection)
2020-05-01T09:05:30Z SAL9000: sth_: my view on evil-mode -- basically, if you use emacs as more than just an editor, it'll get in the way of those things somewhat. There's been a lot of work on integrating e.g. org-mode into evil, but it's not the same. However, as an "Emacs-first" user I'm biased :-)
2020-05-01T09:05:45Z terpri quit (Remote host closed the connection)
2020-05-01T09:05:59Z sth_: that makes sense
2020-05-01T09:06:07Z terpri joined #lisp
2020-05-01T09:06:26Z boeg: for someone who prefers the vim way of giving commands, evil-mode is a blessing. However it doesn't stand too much in the way with regards to using emacs. It's mostly in the beginning, where you have to remember that if a feature is described in one way, you probably needs to figure out how to use it with evil, which is most likely another way. But other in that, I don't have any problems with it - i much prefer emacs + evil
2020-05-01T09:06:26Z boeg: to vim, and
2020-05-01T09:06:26Z boeg: I use emacs for everything. I'm in emacs now.
2020-05-01T09:06:26Z sth_: well im not interested in emacs as solely an editor so i probably wont bother
2020-05-01T09:06:57Z SAL9000: sth_: I wouldn't recommend starting out that way, at least. Give it a try at some point, as boeg said it might work for you. It's a very individual thing.
2020-05-01T09:07:02Z phoe: I've heard that slima for atom starts getting good
2020-05-01T09:07:07Z boeg: oh my god, i seem to have gotten a stroke while typing that...
2020-05-01T09:07:09Z phoe: that's an alternative
2020-05-01T09:07:12Z SAL9000: It helps if you're willing to put in the leg-work to customize emacs/evil to YOUR taste/needs.
2020-05-01T09:07:20Z sth_: ive been using vi/vim for over a decade but ive always been very envious of people who live in emacs
2020-05-01T09:07:35Z SAL9000: welcome to the dark side, we have cookies magit
2020-05-01T09:07:48Z boeg: sth_: i used vim for ~10 years before switching 100% to emacs + evil
2020-05-01T09:08:21Z boeg: but to make it work, as SAL9000 says, you need to want to spend the time configuring things, understanding things. It wont just work before most things are not evil-natives
2020-05-01T09:08:24Z doomlist3 joined #lisp
2020-05-01T09:08:33Z doomlist3: it's me
2020-05-01T09:08:43Z sth_: it's always just been an issue of pragmatism for me. i use vi because it's on the machines i administer
2020-05-01T09:08:51Z sth_: hmm ok
2020-05-01T09:09:01Z doomlist3: (list 2 3) is it the same as (quote (2 3)) the same as '(2 3)
2020-05-01T09:09:05Z SAL9000: sth_: are you doing remote admin (ssh)?
2020-05-01T09:09:13Z sth_: SAL9000: yeah for a lot of my work
2020-05-01T09:09:19Z SAL9000: consider Emacs' TRAMP.
2020-05-01T09:09:39Z beach: doomlist3: "is the same as" is ambiguous, and the answer is "no".
2020-05-01T09:09:43Z SAL9000: i.e. C-x C-f /ssh:user@host:file.py RET
2020-05-01T09:10:10Z sth_: SAL9000: cool
2020-05-01T09:10:15Z SAL9000: doomlist3: (list 2 3) constructs a new object every time, but '(2 3) or (quote 2 3) returns "the same" object -- constructed at read-time.
2020-05-01T09:10:38Z beach: SAL9000: You beat me to it.
2020-05-01T09:10:39Z beach: Thanks.
2020-05-01T09:10:56Z micro joined #lisp
2020-05-01T09:11:02Z SAL9000: sth_: there's some caveats -- unless they've fixed that bug already, watch out for editing as root remotely. In some cases it clobbers /dev/null with the bash history file...
2020-05-01T09:11:05Z SAL9000: beach: np :-)
2020-05-01T09:11:52Z boeg: sth_: also give eshell a try! although it cannot be used 100% as a shell replacement, it can be used for my usage most of the time, and then you have a emacs-shell with all that entails right in emacs. Its great! Check out these two articles about eshell: https://www.masteringemacs.org/article/complete-guide-mastering-eshell & http://www.howardism.org/Technical/Emacs/eshell-fun.html
2020-05-01T09:12:11Z luckless quit (Remote host closed the connection)
2020-05-01T09:12:16Z SAL9000: tbh I'm using eshell a lot more now that I'm stuck on Windoze for work
2020-05-01T09:12:21Z doomlist3: is quote and ' equivalent?
2020-05-01T09:12:24Z beach: doomlist3: To elaborate, when evaluated, the form (list 2 3) produces a fresh list with 2 CONS cells in it. When evaluated, the form (quote (2 3)) also returns a similar list, but it's the same list each time.
2020-05-01T09:12:36Z luckless joined #lisp
2020-05-01T09:12:40Z datajerk quit (Ping timeout: 256 seconds)
2020-05-01T09:12:54Z boeg: sth_: things it cannot be used for properly is for example some git output will not be shown correct, i find. However, for git, you'll probably want to use magit instead anyways
2020-05-01T09:12:56Z beach: doomlist3: ' is a "reader macro" so that when READ sees ', it returns the S-expression (quote )
2020-05-01T09:12:56Z SAL9000: doomlist3: not 100% equivalent, but for most purposes yes. You only need to care about that difference if you're implementing a LISP yourself and/or doing seriously advanced macrology.
2020-05-01T09:12:57Z phoe: doomlist3: yes, 'foo = (quote foo)
2020-05-01T09:13:08Z beach: phoe: Not true.
2020-05-01T09:13:21Z phoe: beach: oh! what's the difference?
2020-05-01T09:13:24Z beach: phoe: Only true in a context of evaluation.
2020-05-01T09:13:46Z beach: That is why I don't want the words "same as", "equivalent" etc.
2020-05-01T09:13:48Z SAL9000: ''foo vs '(quote foo) will evaluate differently on most lisps, iirc
2020-05-01T09:14:36Z phoe: SAL9000: huh, it's the same on Lisp, MIT Scheme, and Racket
2020-05-01T09:15:10Z phoe: beach: I don't understand "context of evaluation"; the reader macro processing is done at read time
2020-05-01T09:15:27Z SAL9000: maybe it was only in the context of a macro arg? but I remember sbcl giving me different things
2020-05-01T09:15:46Z fourier quit (Ping timeout: 240 seconds)
2020-05-01T09:16:09Z beach: phoe: (= (length "'foo") (length "(quote foo)"))
2020-05-01T09:16:25Z beach: ... would be an example of a context when they are not the same.
2020-05-01T09:16:35Z phoe: beach: oh, you mean *before* read-time - yes, they aren't the same as strings
2020-05-01T09:16:45Z beach: That is why the context is important.
2020-05-01T09:17:05Z sth_: thanks boeg i'll check it out. i'm kinda limited on time so i think i wanna mainly start getting the hang of lisp but emacs is definitely the next thing on my list of things to get better with
2020-05-01T09:17:05Z beach: That is why "the same as" "equivalent" are bad choices of words.
2020-05-01T09:17:28Z SAL9000: on the other hand, for a newbie lisper subtle quote vs quasiquote vs (quote) isn't that big of a deal
2020-05-01T09:17:51Z SAL9000: I'm assuming they aren't going to be writing code walkers or macroexpand any time soon
2020-05-01T09:18:15Z doomlist3: I will be in 2months when i finish gigamonkeys
2020-05-01T09:18:22Z boeg: sth_: I understand! There is no better place to get to know either. Emacs is a lisp environment, so you cannot go wrong, and although emacs is elisp, you still learn a lot of things in emacs and common lisp that you can use in eithr place
2020-05-01T09:18:46Z SAL9000: (require 'cl) ;; get some bits of cl in elisp :-)
2020-05-01T09:19:04Z SAL9000: (cl-loop for dialect in lisp do (message "go wild!"))
2020-05-01T09:22:19Z no-defun-allowed: Emacs behaves subtly differently to Common Lisp (such as, say, how the printer handles new lines), and it's not fun to be reading Common Lisp references while debugging Elisp problems.
2020-05-01T09:22:33Z milanj joined #lisp
2020-05-01T09:23:00Z doomlist3: no-defun-allowed: why don't you allow defun? is there a better alteernative in your opinion?
2020-05-01T09:23:41Z Grue`: flet/labels is obviously superior because no global state :)
2020-05-01T09:24:01Z no-defun-allowed: doomlist3: (setf (fdefinition '...) ...) ;; No, I just thought it was a funny name.
2020-05-01T09:24:22Z beach: doomlist3: It's just a name, but DEFGENERIC is often better. :)
2020-05-01T09:25:31Z no-defun-allowed: I can't disagree with beach's interpretation.
2020-05-01T09:26:18Z doomlist3: I didn't knew setf can be used to define functions, can you give an example
2020-05-01T09:26:47Z phoe: (setf (fdefinition 'foo) (lambda () 42))
2020-05-01T09:26:49Z luckless quit (Read error: Connection reset by peer)
2020-05-01T09:26:52Z no-defun-allowed: (setf (fdefinition 'the-more-you-know) (lambda () (write-line "The more you know")))
2020-05-01T09:27:04Z phoe: no-defun-allowed: ... isn't a valid function name unless escaped
2020-05-01T09:27:09Z luckless joined #lisp
2020-05-01T09:27:25Z no-defun-allowed: It's a lousy indication you put something there.
2020-05-01T09:28:08Z no-defun-allowed: (So far, I haven't been able to make the Lisp printer draw the text in 3d with a rainbow and star underneath, but that should suffice as an example.)
2020-05-01T09:29:54Z SAL9000: no-defun-allowed: http://www.martin-loetzsch.de/gtfl/
2020-05-01T09:30:43Z dale quit (Quit: My computer has gone to sleep)
2020-05-01T09:30:50Z datajerk joined #lisp
2020-05-01T09:31:25Z no-defun-allowed: "A Graphical Terminal For Lisp" Cool, but I think clim-listener beat the author to it.
2020-05-01T09:34:21Z beach: doomlist3: That's what happens when you do (DEFUN ...).
2020-05-01T09:39:23Z Grue`: https://i.imgur.com/1aFjoVU.jpg
2020-05-01T09:39:23Z heisig joined #lisp
2020-05-01T09:39:49Z karswell quit (Remote host closed the connection)
2020-05-01T09:40:05Z karswell_ joined #lisp
2020-05-01T09:42:53Z pjb joined #lisp
2020-05-01T09:43:54Z no-defun-allowed: Nice.
2020-05-01T09:48:33Z lnostdal joined #lisp
2020-05-01T09:49:10Z karswell_ quit (Read error: No route to host)
2020-05-01T09:49:25Z McParen joined #lisp
2020-05-01T09:51:35Z Grue` quit (Quit: ZNC 1.7.2 - https://znc.in)
2020-05-01T09:58:52Z SGASAU quit (Remote host closed the connection)
2020-05-01T09:58:53Z dxtr joined #lisp
2020-05-01T09:59:33Z SGASAU joined #lisp
2020-05-01T10:00:18Z Grue` joined #lisp
2020-05-01T10:00:51Z Grue`` joined #lisp
2020-05-01T10:04:43Z keep_learning quit (Quit: Leaving)
2020-05-01T10:04:46Z shifty quit (Ping timeout: 265 seconds)
2020-05-01T10:08:50Z doomlist3 quit (Ping timeout: 258 seconds)
2020-05-01T10:19:47Z doomlist3 joined #lisp
2020-05-01T10:22:50Z easye` joined #lisp
2020-05-01T10:23:18Z easye quit (Read error: Connection reset by peer)
2020-05-01T10:30:14Z random-nick joined #lisp
2020-05-01T10:30:38Z ffwacom joined #lisp
2020-05-01T10:34:07Z frgo quit (Remote host closed the connection)
2020-05-01T10:34:43Z frgo joined #lisp
2020-05-01T10:38:33Z ym555 joined #lisp
2020-05-01T10:39:05Z doomlist3: hey how to iterate using dolist over plist and list
2020-05-01T10:40:17Z ArthurStrong joined #lisp
2020-05-01T10:40:42Z beach: Don't use DOLIST
2020-05-01T10:40:57Z beach: (loop for element in list ...) for ordinary lists.
2020-05-01T10:41:10Z doomlist3: https://bpaste.net/WPCQ i read gigamonkeys chapter 3 database building
2020-05-01T10:41:43Z doomlist3: beach: i get u but just understanding my error
2020-05-01T10:43:25Z beach: What is your TAGBODY doing there?
2020-05-01T10:43:39Z beach: I need to see the source code.
2020-05-01T10:43:46Z phoe: beach: DOLIST expands into a TAGBODY.
2020-05-01T10:43:53Z beach: Right.
2020-05-01T10:43:53Z phoe: The FORMAT call doesn't have parentheses.
2020-05-01T10:44:02Z beach: Ah, I see it.
2020-05-01T10:44:05Z beach: You are right.
2020-05-01T10:44:17Z phoe: Therefore all four objects there are attempted to be interpreted as TAGBODY tags.
2020-05-01T10:44:21Z beach: Indeed.
2020-05-01T10:44:25Z doomlist3: print p-list
2020-05-01T10:44:30Z phoe: doomlist3: (dolist (n *db*) (format t "~a element~%" n))
2020-05-01T10:44:46Z doomlist3: phoe: that is what i did
2020-05-01T10:44:52Z beach: No.
2020-05-01T10:45:03Z beach: You forgot the parentheses around the FORMAT form.
2020-05-01T10:45:04Z phoe: no
2020-05-01T10:45:06Z phoe: you did
2020-05-01T10:45:09Z phoe: doomlist3: (dolist (n *db*) format t "~a element~%" n)
2020-05-01T10:45:41Z phoe: count the parentheses in both cases
2020-05-01T10:45:42Z beach: doomlist3: To invoke a function, like FORMAT, you need to stick the function name and its argument forms in a list.
2020-05-01T10:46:08Z doomlist3: ok
2020-05-01T10:46:59Z Ven`` joined #lisp
2020-05-01T10:47:20Z doomlist3: (loop for i in *db* (format t "~a element~%" i)) too shows error
2020-05-01T10:47:37Z phoe: (loop for i in *db* do (format ...))
2020-05-01T10:47:40Z beach: doomlist3: (loop for i in *db* DO (format t "~a element~%" i))
2020-05-01T10:49:01Z phoe: beach: I'd like your opinion on https://gitlab.common-lisp.net/alexandria/alexandria/-/issues/15
2020-05-01T10:49:24Z Grue`` quit (Ping timeout: 256 seconds)
2020-05-01T10:50:45Z beach: phoe: Looks good to me.
2020-05-01T10:50:49Z ym555_ joined #lisp
2020-05-01T10:50:58Z ym555 quit (Ping timeout: 260 seconds)
2020-05-01T10:51:16Z phoe: OK. I wonder how much code relies on ROTATE and SHUFFLE for side effects only - I can imagine it being the case for vectors. That code will need to be updated.
2020-05-01T10:52:11Z phoe: Xach: do you have any tools for checking such? I remember pfdietz used to scan all of Quicklisp in some way; I'll ask him when he comes online.
2020-05-01T10:53:33Z marcoxa joined #lisp
2020-05-01T10:54:18Z doomlist3: how to iterate over plist using format t
2020-05-01T10:55:07Z phoe: doomlist3: (loop for (key value) on '(:a 1 :b 2 :c 3) by #'cddr do (format t "~A: ~A~%" key value))
2020-05-01T10:55:41Z phoe: note that we bind two variables now, KEY and VALUE; note that we use ON instead of IN; and note that we use BY #'CDDR now to skip two elements on each iteration instead of just one
2020-05-01T10:57:20Z doomlist3: by #'cddr --> this syntax is really bad
2020-05-01T10:57:48Z Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-05-01T10:58:47Z phoe: why? BY is a standard LOOP keyword, and #'CDDR is standard syntax for named function objects
2020-05-01T10:59:39Z doomlist3: I am from python background
2020-05-01T10:59:50Z phoe: so it's not bad, it's new
2020-05-01T10:59:51Z beach: doomlist3: yes, we need a new Common Lisp standard to change that.
2020-05-01T10:59:57Z beach: *sigh*
2020-05-01T11:00:27Z adlai: another standard? but then you'd have four problems
2020-05-01T11:00:30Z marcoxa: doomlist3 will the following do
2020-05-01T11:01:01Z no-defun-allowed: I'm looking at making Postmodern work with byte arrays (bytea); why should (let ((array (make-array 10 :element-type '(unsigned-byte 8) :initial-element 10))) (postmodern:query (:select array))) produce a string?
2020-05-01T11:01:40Z marcoxa: [(key value) :on (list :a 1 :b 2) :by 'skip2] work for you?
2020-05-01T11:01:50Z phoe: no-defun-allowed: https://github.com/marijnh/Postmodern/issues/194
2020-05-01T11:01:54Z marcoxa: We can make CL do that for you :)
2020-05-01T11:02:19Z beach: marcoxa: I don't think that is helpful to a newbie.
2020-05-01T11:02:22Z phoe: marcoxa: I worry that if you introduce custom syntax for people who are just learning lisp then you have more than two problems
2020-05-01T11:02:35Z beach: What phoe said.
2020-05-01T11:02:42Z marcoxa: I know. I am just being an ass :) :) :)
2020-05-01T11:02:48Z no-defun-allowed: Bummer.
2020-05-01T11:02:48Z phoe: don't
2020-05-01T11:02:51Z marcoxa: Sorry :)
2020-05-01T11:02:56Z beach: Being an ass is also unhelpful to newbies.
2020-05-01T11:03:00Z phoe: ^
2020-05-01T11:03:38Z phoe: no-defun-allowed: basically, postmodern coerces everything to a string internally because of how it uses the postgres wire protocol; the issue is triaged and diagnosed as you can see in the issue comments, it needs to be implemented
2020-05-01T11:03:53Z no-defun-allowed: I see, for now I could kludge that and do (:SELECT (:TYPE BYTEA)).
2020-05-01T11:03:53Z phoe: sabrac might use some help with that
2020-05-01T11:03:58Z nika joined #lisp
2020-05-01T11:04:05Z marcoxa: Well. By mean of some reader-macro magic you CAN make the above work. It should tickle the newbie curiosity :)
2020-05-01T11:04:10Z phoe: yes, that's a workaround
2020-05-01T11:04:34Z no-defun-allowed: When I get a break, I might take a look then.
2020-05-01T11:04:35Z ym555_ quit (Ping timeout: 260 seconds)
2020-05-01T11:06:13Z sabrac: no-defun-allowed: The first issue is that cl is dynamically typed and a database is statically typed. If you are selecting not from a table, you can specify the type with ::
2020-05-01T11:07:35Z sabrac: If you are selecting from a table, you need to know what how column is typed. int2 does not equal int4. Etc.
2020-05-01T11:07:59Z sabrac: But yes, I could use help thinking through how to deal with binaries.
2020-05-01T11:12:14Z red-dot quit (Quit: Going offline, see ya! (www.adiirc.com))
2020-05-01T11:13:03Z Bike joined #lisp
2020-05-01T11:15:33Z no-defun-allowed: Sure, fair enough.
2020-05-01T11:16:32Z no-defun-allowed: I noticed a comment suggesting that the wire protocol for bytea was inefficient; do you have an opinion on that?
2020-05-01T11:17:54Z gargaml joined #lisp
2020-05-01T11:19:05Z karlosz quit (Quit: karlosz)
2020-05-01T11:19:11Z no-defun-allowed: I'm still on the fence on if I should store my binary data elsewhere. (I suppose I probably should, but I recall Heroku only has Postgres for free persistent storage.)
2020-05-01T11:20:16Z doomlist3 quit (Ping timeout: 246 seconds)
2020-05-01T11:22:15Z sabrac: no-defun-allowed: you planning on using the postgresql bytea hex format or escape format as the datatype inside the database?
2020-05-01T11:23:03Z no-defun-allowed: I don't know honestly.
2020-05-01T11:23:04Z Grue` quit (Ping timeout: 265 seconds)
2020-05-01T11:23:46Z sabrac: no-defun-allowed: generally recommended to use the hex format. See https://www.postgresql.org/docs/current/datatype-binary.html#id-1.5.7.12.9
2020-05-01T11:25:48Z no-defun-allowed: Okay. I've been poking at it from S-SQL which I think uses the escape format.
2020-05-01T11:26:18Z sabrac: Another thing to add to the list
2020-05-01T11:27:46Z Lord_of_Life_ joined #lisp
2020-05-01T11:30:04Z SGASAU quit (Remote host closed the connection)
2020-05-01T11:30:20Z Lycurgus joined #lisp
2020-05-01T11:30:22Z theosvoitha quit (Quit: Connection closed for inactivity)
2020-05-01T11:30:48Z Lord_of_Life quit (Ping timeout: 265 seconds)
2020-05-01T11:30:48Z Lord_of_Life_ is now known as Lord_of_Life
2020-05-01T11:31:07Z SGASAU joined #lisp
2020-05-01T11:31:11Z boeg: I'm trying to find out how to organize my, specifically; I have a package where things are written and read from a database, and things that need that, do it via that package. So I have a function to update a post, and it then validates the data provided, and persists the change if its valid, and if errors happens - either invalid data or persistence failed - it collects these errors, and returns two values, a boolean stating
2020-05-01T11:31:11Z boeg: success or
2020-05-01T11:31:11Z boeg: failure, and a list which in the case of failure will contains a list of errors like so: https://pastebin.com/zafsB9HR - is this a "good way" to architecture such a thing in common lisp, is there a better way/pattern to use?
2020-05-01T11:31:29Z boeg: organize my code*
2020-05-01T11:32:32Z boeg: i'm not sure that code actually works, I just freewheeled it in pastebin, but it carries the idea i'm playing with
2020-05-01T11:33:03Z scymtym_ joined #lisp
2020-05-01T11:35:18Z scymtym quit (Ping timeout: 256 seconds)
2020-05-01T11:39:07Z Ven`` joined #lisp
2020-05-01T11:40:28Z beach: boeg: You should use the condition system to signal errors.
2020-05-01T11:40:44Z beach: boeg: LET has an implicit PROGN, so no PROGN needed there.
2020-05-01T11:41:34Z beach: Why do you return a list of errors?
2020-05-01T11:44:14Z boeg: beach: yes, I had thought about the condition system, but I haven't gotten into the weeds of it yet, and didn't know if I could return multiple errors with it like I need. I didn't know about the implicit progn in let, thank you! I need to return a list of errors because the errors, one or more, have to be shown to the user with the form fields that has errors, like if a required field is empty, or contains invalid content in
2020-05-01T11:44:14Z boeg: another
2020-05-01T11:44:14Z boeg: way
2020-05-01T11:44:47Z boeg: so there can be many errors in the content and they need all be signaled to the caller so the caller can render them to the client
2020-05-01T11:44:55Z boeg: in the provided content/data*
2020-05-01T11:44:56Z phoe: boeg: in the end you can signal a single error object that contains, as a slot, a list of all things that are wrong with the post
2020-05-01T11:45:12Z phoe: I'd separate the validation logic from the control flow
2020-05-01T11:45:55Z boeg: phoe: do you by chance have something about this specifically in your book? :P
2020-05-01T11:46:28Z boeg: well, something you would think i could use for this to understand how to properly model it?
2020-05-01T11:46:46Z boeg: because that would be a good reason to read your book now instead of later, or at least parts of it :P
2020-05-01T11:46:53Z phoe: boeg: lemme write an example
2020-05-01T11:47:07Z phoe: boeg: this issue is orthogonal to my book, so I don't have much about it
2020-05-01T11:47:17Z boeg: alright, could be, thought i'd ask :D
2020-05-01T11:50:38Z phoe: https://plaster.tymoon.eu/view/1791#1791
2020-05-01T11:50:42Z boeg: thanks
2020-05-01T11:50:43Z phoe: I'd suggest such structure
2020-05-01T11:50:53Z phoe: it separates validation from control flow
2020-05-01T11:51:14Z phoe: and also uses the condition system, signaling a validation error if the data doesn't pass validation
2020-05-01T11:51:33Z phoe: and doesn't handle the mito error, allowing it to bubble up and be handled by the logic that calls UPDATE-POST
2020-05-01T11:53:10Z phoe: a handler-case that handles *ALL* conditions, like you had it, is a big anti-pattern in general
2020-05-01T11:53:42Z phoe: mito is allowed to signal a non-error condition as a part of its normal functioning, and your original code is going to treat it as if it was an error
2020-05-01T11:54:13Z boeg: alright, that makes a lot of sense, although I think i'd want the mito error to not bubble up to the caller - I want it to be abstracted away, so I can easily change the persistence-layer if needed. But I could handle the mito error in update-post and then signal another that tells the same story, but isn't specifically a mito error. What do you think?
2020-05-01T11:54:29Z boeg: another custem error*
2020-05-01T11:55:11Z rozenglass joined #lisp
2020-05-01T11:56:15Z phoe: boeg: you could encapsulate the error into your own error condition, sure
2020-05-01T11:56:16Z Inline joined #lisp
2020-05-01T11:56:40Z theosvoitha joined #lisp
2020-05-01T11:56:40Z phoe: though, for modularity, I'd add one more layer above UPDATE-POST that actually performs error handling
2020-05-01T11:56:58Z phoe: that's for fulfilling the single responsibility principle
2020-05-01T11:58:22Z bitmapper joined #lisp
2020-05-01T11:59:38Z boeg: when you say performs error handling, what do you mean? Because I'm just thinking that the layer above that function is the place that calls update-post and if error(s) occurs, it presents it to the user, no?
2020-05-01T12:00:17Z Grue` joined #lisp
2020-05-01T12:01:46Z boeg: I guess in the case of a mito-error, there could be a layer above that could try persisting the data again if it fails before signaling to the user that something is wrong
2020-05-01T12:02:22Z boeg: but for the validation errors, they just need to be signaled to the caller say they can be rendered to the user so the user can fix them
2020-05-01T12:02:30Z boeg: so they can be*
2020-05-01T12:03:23Z boeg: before signaling to the caller to rendering the persistence-error/mito-error to the user
2020-05-01T12:03:27Z boeg: **
2020-05-01T12:03:41Z boeg: render*
2020-05-01T12:04:03Z pjb: sabrac: sqlite is not statically typed.
2020-05-01T12:05:10Z SGASAU` joined #lisp
2020-05-01T12:05:19Z __lm__ joined #lisp
2020-05-01T12:05:34Z __lm__ quit (Remote host closed the connection)
2020-05-01T12:05:45Z SGASAU quit (Ping timeout: 258 seconds)
2020-05-01T12:06:01Z boeg: brb
2020-05-01T12:06:05Z phoe: sabrac: we're talking postgres here
2020-05-01T12:06:14Z phoe: boeg: https://plaster.tymoon.eu/view/1792#1792
2020-05-01T12:09:52Z bitmapper quit (Ping timeout: 256 seconds)
2020-05-01T12:12:36Z SGASAU` quit (Remote host closed the connection)
2020-05-01T12:12:41Z gxt quit (Remote host closed the connection)
2020-05-01T12:13:49Z SGASAU` joined #lisp
2020-05-01T12:14:03Z gxt joined #lisp
2020-05-01T12:15:11Z boeg: phoe: ah, so you meant to not mix the operation of validation and persisting, right? Makes sense, thank you!
2020-05-01T12:15:28Z boeg: well, obviously thats what you meant, it was just I who didn't understand :)
2020-05-01T12:15:58Z phoe: boeg: yes, these two are supposed to be separate; in general, it is worthwhile to separate parts of code that are pure and that have side effects, and that is just one practical example of that
2020-05-01T12:16:15Z boeg: indeed, thanks!
2020-05-01T12:16:57Z phoe: also now it is `update-posts` that controls the flow of this part of the code and decides whether it is okay to invoke `perform-update-posts` and therefore perform side effects
2020-05-01T12:17:25Z boeg: yes, i see that its a good way to organize it!
2020-05-01T12:17:25Z phoe: so we have three functions in effect: one for validation, one for side effects, and one that controls the program flow
2020-05-01T12:18:11Z phoe: and you will likely see similar structuring outside Lisp, too; it's a general programming pattern
2020-05-01T12:19:06Z boeg: Indeed! I wanted to ask - is it correct to the -p (for predicate) for stuff like a function that returns a bool for example in the above case of post-path-p that decides whether the path is valid?
2020-05-01T12:19:38Z boeg: as I understand it, thats the naming-scheme to use right? -p if multiple words (post-path), just "p" if it was "path" so "pathp", yes?
2020-05-01T12:19:47Z phoe: boeg: the naming scheme is correct
2020-05-01T12:19:51Z boeg: good!
2020-05-01T12:19:58Z phoe: in general, predicates answer "yes or no" questions
2020-05-01T12:20:02Z boeg: yes
2020-05-01T12:20:19Z phoe: so I wouldn't use that for `validate-post` because this function answers *what* is wrong with a post
2020-05-01T12:20:19Z boeg: thanks
2020-05-01T12:20:25Z phoe: since you need detailed information.
2020-05-01T12:20:35Z boeg: yes, good point!
2020-05-01T12:22:53Z Shinmera: Could also use check-post-valid, which signals different conditions depending on the problem.
2020-05-01T12:23:37Z phoe: Shinmera: the issue is that he needs not alter control flow of validate-post, he needs to go through all fields and collect the errors.
2020-05-01T12:23:55Z Shinmera: then just use cerror
2020-05-01T12:24:23Z SGASAU` quit (Quit: ERC (IRC client for Emacs 26.3))
2020-05-01T12:24:48Z phoe: Shinmera: that seems kinda backwards; cerror is going to either alter control flow or enter the debugger
2020-05-01T12:25:00Z SGASAU joined #lisp
2020-05-01T12:25:07Z phoe: or require a handler-bind with #'continue
2020-05-01T12:25:16Z Shinmera: ? obviously you gather the conditions in a handler
2020-05-01T12:25:20Z Shinmera: if that's what you want.
2020-05-01T12:26:08Z phoe: I understand that what is wanted here is a list of all things that are wrong with a post, e.g. ("post title is invalid" "post path is invalid" "attachments not recognized" ...) etc..
2020-05-01T12:26:27Z phoe: because that is then needed to be sent over the network and presented to the user in a frontend
2020-05-01T12:26:35Z Shinmera: Yeah, I do too.
2020-05-01T12:26:44Z boeg: indeed, thats the need
2020-05-01T12:27:53Z phoe: I think that pushing to a list in validate-post is going to be the most effective here; I don't know how to include the condition system and handlers here without bloating that code
2020-05-01T12:28:34Z Shinmera: You could also use a library like ratify to do things like this.
2020-05-01T12:29:40Z phoe learns about the existence of RATIFY
2020-05-01T12:30:02Z Shinmera: Typically validation is repeated in very similar ways all over. Using the condition system you can factor a validation out into a single function per 'validation type'. then just group a bunch of these checks into a validation function for an object
2020-05-01T12:30:14Z Shinmera: then, if you need to gather all of the errors, use a handler.
2020-05-01T12:30:39Z Shinmera: this allows you to reuse the checks in interactive sessions as well where the intent is not to redirect to a web frontend.
2020-05-01T12:30:46Z phoe: I am more and more convinced of the truth of the statement "there's Shinmeraware for that"
2020-05-01T12:31:07Z phoe: damn, that's a big library
2020-05-01T12:31:10Z Shinmera: and it won't lose you the stack trace.
2020-05-01T12:31:35Z Shinmera: I should rewrite it, I don't like its current design.
2020-05-01T12:31:40Z Shinmera: It's one of my very early libraries.
2020-05-01T12:32:06Z boeg: that's an interesting library
2020-05-01T12:32:23Z red-dot joined #lisp
2020-05-01T12:34:05Z boeg: although I think I should do it without that library for now until I've done this same thing in common lisp (as opposed to python where I do indeed use such a library because its a task repeated often, as you say, Shinmera) so many times that I myself discover the need of the library in the context of common lisp, so I actually get used to how to do it in common lisp without a library for now
2020-05-01T12:40:05Z nmg`` quit (Remote host closed the connection)
2020-05-01T12:41:05Z SGASAU quit (Remote host closed the connection)
2020-05-01T12:42:27Z SGASAU` joined #lisp
2020-05-01T12:42:47Z dlowe: for any problem, there exists solutions in pjbware, Shinmeraware, and hu.dwim
2020-05-01T12:43:26Z boeg: lol
2020-05-01T12:43:35Z phoe: and, possibly, fukamachiware
2020-05-01T12:44:01Z SGASAU` quit (Remote host closed the connection)
2020-05-01T12:44:39Z jackdaniel: hu.pjb.fukashrine
2020-05-01T12:45:09Z SGASAU` joined #lisp
2020-05-01T12:45:25Z phoe takes a brief break from #lisp
2020-05-01T12:46:20Z SGASAU` quit (Remote host closed the connection)
2020-05-01T12:50:34Z Lycurgus quit (Remote host closed the connection)
2020-05-01T12:51:09Z SGASAU` joined #lisp
2020-05-01T12:54:45Z karayan quit (Ping timeout: 240 seconds)
2020-05-01T12:55:15Z karayan joined #lisp
2020-05-01T12:58:36Z ineiros joined #lisp
2020-05-01T13:00:04Z ineiros quit (Client Quit)
2020-05-01T13:00:37Z ineiros joined #lisp
2020-05-01T13:00:53Z ineiros quit (Client Quit)
2020-05-01T13:01:55Z ineiros joined #lisp
2020-05-01T13:01:59Z gabiruh joined #lisp
2020-05-01T13:02:41Z phoe: oh bother
2020-05-01T13:02:49Z phoe: (restart-case ... (abort () :report)) is allowed
2020-05-01T13:04:05Z phoe: I am more and more tempted to say that keyword options to restart cases should have been provided in a distinct pair of parens
2020-05-01T13:05:07Z phoe: like, a restart case could be destructured against (name (&rest arguments) (&key report interactive test) &body body)
2020-05-01T13:05:14Z phoe: that would avoid the terribly awkward keyword parsing
2020-05-01T13:12:19Z Bike: how is that allowed?
2020-05-01T13:12:26Z Bike: oh, like, :report is the body?
2020-05-01T13:12:29Z Bike: that's perverse.
2020-05-01T13:12:30Z phoe: yes
2020-05-01T13:12:35Z phoe: perverse, but standard
2020-05-01T13:12:54Z Bike: mmh.
2020-05-01T13:12:55Z phoe: is this the only place in standard CL that violates the no-&REST-after-&KEY rule?
2020-05-01T13:16:03Z shka_: phoe: well, i suspect that you know better ;-)
2020-05-01T13:16:26Z phoe: shka_: I'm only somewhat sure about the macros in the condition system, not about the other ones
2020-05-01T13:18:58Z EvW joined #lisp
2020-05-01T13:21:07Z White_Flame: what's the proper grammatical term for a verb that is involved in a closure? "The variable is closed over"? "The variable is closured in"? etc
2020-05-01T13:21:15Z White_Flame: in an active etnse
2020-05-01T13:21:16Z White_Flame: tense
2020-05-01T13:21:30Z p_l: White_Flame: closed over
2020-05-01T13:21:33Z shka_: uhm
2020-05-01T13:21:45Z Inline quit (Ping timeout: 240 seconds)
2020-05-01T13:21:53Z p_l: or possibly enclosed
2020-05-01T13:21:53Z shka_: is it the correct direction though?
2020-05-01T13:22:04Z Bike: well, active voice would be "the function closes over the variable"
2020-05-01T13:22:15Z shka_: i thought that it is the function is closed over
2020-05-01T13:22:21Z shka_: and not variable is closed over
2020-05-01T13:22:32Z dlowe: the binding is closed over
2020-05-01T13:22:38Z shka_: riight
2020-05-01T13:22:45Z dlowe: so functions and variables
2020-05-01T13:22:48Z White_Flame: Ok, when talking about deciding whether the variable is local/private or does closurey things, as the subject of the sentence?
2020-05-01T13:23:02Z TCZ joined #lisp
2020-05-01T13:23:15Z White_Flame: and yeah, none of these seemed rigt
2020-05-01T13:23:33Z TCZ left #lisp
2020-05-01T13:23:37Z White_Flame: erm, none that I posted seemed right, as you're pointing out
2020-05-01T13:23:55Z shka_: White_Flame: variable may be included into closure lexical environment
2020-05-01T13:24:05Z shka_: which i suspect is at least more correct term
2020-05-01T13:24:14Z orivej joined #lisp
2020-05-01T13:24:46Z White_Flame: I think "is enclosed" is probably correct enough and concise. I do like it
2020-05-01T13:25:38Z phoe: oh bother
2020-05-01T13:25:40Z phoe: clhs restart-bind
2020-05-01T13:25:41Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/m_rst_bi.htm
2020-05-01T13:25:44Z shka_: this sounds good
2020-05-01T13:25:47Z phoe: are declarations allowed in there?
2020-05-01T13:25:55Z phoe: like, in forms?
2020-05-01T13:26:04Z White_Flame: thx
2020-05-01T13:26:12Z Bike: doesn't look like it. it says "implicit progn".
2020-05-01T13:26:30Z Bike: and there's no opportunity for any bound declarations.
2020-05-01T13:27:18Z phoe: right - SBCL accepts them there, but CCL doesn't
2020-05-01T13:27:48Z phoe: heh, the spec could really use an "implicit locally" glossary term sometimes
2020-05-01T13:27:59Z phoe puts it in the ideas-for-cltl4 jar
2020-05-01T13:28:00Z Bike: well, sbcl is wrong
2020-05-01T13:28:21Z Bike: looks like it's just part of a let. easy to fix, just replace ,@forms with (progn ,@forms)
2020-05-01T13:28:51Z phoe: yes
2020-05-01T13:29:04Z phoe: do I care enough to put a bugticket for that though...
2020-05-01T13:29:06Z phoe: sigh
2020-05-01T13:29:39Z Inline joined #lisp
2020-05-01T13:30:40Z phoe: one second though
2020-05-01T13:30:49Z phoe: a spurious DECLARE invokes undefined behaviour
2020-05-01T13:30:50Z jmercouris: I believe in you phoe
2020-05-01T13:30:54Z jmercouris: you can do it
2020-05-01T13:30:58Z phoe: so SBCL is allowed to do what it does
2020-05-01T13:31:19Z phoe: so no bugticket time
2020-05-01T13:31:35Z phoe: clhs declare
2020-05-01T13:31:35Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/s_declar.htm
2020-05-01T13:34:14Z phoe: oh well
2020-05-01T13:35:16Z jrx joined #lisp
2020-05-01T13:45:45Z rozenglass quit (Quit: WeeChat 2.3)
2020-05-01T13:46:02Z rozenglass joined #lisp
2020-05-01T13:46:54Z fourier joined #lisp
2020-05-01T13:47:40Z rozenglass quit (Client Quit)
2020-05-01T13:47:50Z pve: Hello everyone
2020-05-01T13:48:47Z pve: I'm working on a smalltalk-like "mini language" (in lisp) that I would like to put up on github, and now I'm wondering what I should call it.
2020-05-01T13:49:30Z pve: Since its syntax basically consists of lisp symbols and forms I was thinking "symbolic smalltalk", but would that be inappropriate?
2020-05-01T13:49:31Z Shinmera: smallertalk
2020-05-01T13:49:41Z pve: (it's not a real smalltalk system by any means)
2020-05-01T13:49:50Z pve: Shinmera: great suggestion
2020-05-01T13:49:57Z fourier: tinytalk
2020-05-01T13:50:10Z _death: thmalltalk
2020-05-01T13:50:15Z pve: hehe
2020-05-01T13:50:41Z dlowe: chitchat
2020-05-01T13:50:51Z pve: dlowe: that one crossed my mind already
2020-05-01T13:51:02Z dlowe: yakity
2020-05-01T13:51:02Z jrx: lisp flavored smalltalk
2020-05-01T13:51:54Z jrx: like this one : http://lfe.io/
2020-05-01T13:52:40Z jrx: "flavoured"
2020-05-01T13:54:33Z jrx: I see "Latest commit on 12 May 2019" on github page https://github.com/rvirding/lfe
2020-05-01T13:55:10Z jrx quit (Quit: ERC (IRC client for Emacs 26.3))
2020-05-01T13:57:20Z pve: i like "smaller" and "tiny" because they reflect the fact that it's something you embed in normal lisp code
2020-05-01T13:57:38Z shka_: commontalk ;-)
2020-05-01T13:57:52Z pve: really good suggestion too
2020-05-01T13:57:53Z Bike: lingua franca?
2020-05-01T13:58:44Z shka_: is (check-type something-p boolean) considered to be a pedantic or not?
2020-05-01T13:59:18Z phoe: yes
2020-05-01T13:59:23Z phoe: all Lisp data are booleans
2020-05-01T13:59:33Z phoe: generalized, but booleans
2020-05-01T13:59:53Z pve: Bike: perhaps a bit too dramatic :)
2020-05-01T14:00:02Z phoe: so limiting options to just (member t nil) may break existing code that passes e.g. 2 as a true value
2020-05-01T14:00:43Z shka_: eh, ok
2020-05-01T14:01:23Z jmercouris: can coerce to boolean?
2020-05-01T14:01:41Z phoe: (coerce x 'boolean) would be nice to have, but is undefined
2020-05-01T14:01:59Z jmercouris: shame
2020-05-01T14:02:03Z phoe: (define notnot (x) (not (not x))) is also commonly seen somewhere
2020-05-01T14:02:32Z dlowe: (if x t)?
2020-05-01T14:02:36Z jmercouris: that works
2020-05-01T14:02:39Z jmercouris: i know that one
2020-05-01T14:02:43Z shka_: i just want to say that i don't like this one bit
2020-05-01T14:02:48Z IRC-Source_21 joined #lisp
2020-05-01T14:02:50Z jmercouris: what about the other bit?
2020-05-01T14:02:54Z dlowe: shka_: ha ha
2020-05-01T14:03:12Z shka_: sbcl already accepts everything as boolean everywhere
2020-05-01T14:03:19Z shka_: so i will follow
2020-05-01T14:04:23Z phoe: as it should
2020-05-01T14:06:13Z phoe: nil is the only valse value in Lisp
2020-05-01T14:06:18Z jmercouris: false*
2020-05-01T14:06:22Z phoe: false, yes
2020-05-01T14:06:33Z shka_: eh, we have to accept difference of opinions on this subject
2020-05-01T14:06:43Z jmercouris: just in case someone in 2050 is reading this log and get's confused by the usage of the word valse
2020-05-01T14:06:49Z jmercouris: maybe valse means something in 2050
2020-05-01T14:06:53Z shka_: but as far as practical implications go, i agree
2020-05-01T14:07:04Z jmercouris: i don't mind the generalized boolean approach
2020-05-01T14:07:12Z dyelar quit (Quit: Leaving.)
2020-05-01T14:07:13Z jmercouris: it is very much inherited and implicit behavior from C I think
2020-05-01T14:07:30Z shka_: lisp didn't inherit anything from C
2020-05-01T14:07:33Z shka_: python did
2020-05-01T14:07:42Z jmercouris: lisp inherited things from C
2020-05-01T14:07:44Z shka_: so 0 casts to false
2020-05-01T14:07:56Z shka_: even though there are proper booleans
2020-05-01T14:08:03Z shka_: oh, and False casts to 0
2020-05-01T14:08:10Z shka_: this is as stupid as it gets
2020-05-01T14:08:18Z jmercouris: or maybe C inherited from lisp
2020-05-01T14:08:40Z shka_: ok, enough of ranting, back to programing
2020-05-01T14:09:26Z xkapastel joined #lisp
2020-05-01T14:10:22Z theosvoitha quit (Quit: Connection closed for inactivity)
2020-05-01T14:10:26Z Bike: checked the maclisp manual and the description of cond is in terms of generalized booleans (though it doesn't use the term), and it says this is "like the traditional LISP 1.5 cond"
2020-05-01T14:10:55Z phoe: generalized booleans saved us a ton of (not (eq ... nil))
2020-05-01T14:11:20Z phoe: or, alternatively, (eq ... t)
2020-05-01T14:11:27Z Grue`: nil as false is more pragmatic than Scheme's #f, but sometimes 0/empty string/empty array not being false or all objects being always true leads to ugly code
2020-05-01T14:11:53Z Bike: i guess i can just check the 1.5 manual
2020-05-01T14:12:03Z shka_: well, beach writes (when (not stuff) …) and is pretty explicit about this in his style guide
2020-05-01T14:12:34Z beach: I write (when (null stuff) ...) but I don't think I write (when (not stuff)...)
2020-05-01T14:12:45Z shka_: ok, ok
2020-05-01T14:12:48Z shka_: null stuff
2020-05-01T14:12:52Z shka_: even better
2020-05-01T14:12:55Z beach: That's VERY different.
2020-05-01T14:12:57Z shka_: yes
2020-05-01T14:13:01Z shka_: you are right
2020-05-01T14:13:04Z Bike: "Semantically, any S-expression that is not NIL will be regarded as truth [...]" yeah ok.
2020-05-01T14:13:35Z Bike: though it's stricter about some things, like it says EQ returns *T* or NIL, not just a generalized boolean
2020-05-01T14:15:30Z beach: shka_: Since NOT should take a Boolean value, (WHEN (NOT ) ...) would be entirely equivalent to (UNLESS ...)
2020-05-01T14:15:46Z shka_: beach: i understand, pardon my mistake
2020-05-01T14:15:53Z arbv quit (Quit: ZNC - https://znc.in)
2020-05-01T14:15:58Z beach: No problem.
2020-05-01T14:16:14Z arbv joined #lisp
2020-05-01T14:16:21Z jmercouris: why isn't it nullp?
2020-05-01T14:16:49Z beach: For hysterical raisins.
2020-05-01T14:16:54Z phoe: same why atom isn't atomp
2020-05-01T14:16:59Z phoe: also, Bike: https://github.com/sbcl/sbcl/commit/db24d4230e7d13439ba43ce017801eb8b2c317de
2020-05-01T14:17:13Z jmercouris: hysterical raisins?
2020-05-01T14:17:21Z beach: *sigh*
2020-05-01T14:17:21Z Bike: historical reasons
2020-05-01T14:17:24Z shka_: :D
2020-05-01T14:17:25Z phoe: translating from beachspeak: historical reasons
2020-05-01T14:17:32Z jmercouris: man those grapes
2020-05-01T14:17:34Z jmercouris: they are out of control
2020-05-01T14:17:47Z shka_: grapes of the hysteria
2020-05-01T14:18:08Z splittist: What else would a Professor from his town say?
2020-05-01T14:19:00Z beach: "raisins hystériques" probably
2020-05-01T14:20:11Z red-dot quit (Quit: Going offline, see ya! (www.adiirc.com))
2020-05-01T14:21:48Z shka_: this sounds like a french punk rock band name
2020-05-01T14:22:20Z jmercouris: this sounds like daft punk to me
2020-05-01T14:28:29Z sjl_ joined #lisp
2020-05-01T14:31:45Z fourier quit (Ping timeout: 240 seconds)
2020-05-01T14:32:18Z dyelar joined #lisp
2020-05-01T14:37:57Z corpix quit (Remote host closed the connection)
2020-05-01T14:38:12Z corpix joined #lisp
2020-05-01T14:42:13Z dyelar quit (Quit: Leaving.)
2020-05-01T14:42:20Z sabrac quit (Quit: Konversation terminated!)
2020-05-01T14:44:07Z gargaml quit (Ping timeout: 240 seconds)
2020-05-01T14:44:33Z gargaml joined #lisp
2020-05-01T14:44:49Z MerlinTheWizard joined #lisp
2020-05-01T14:49:54Z pve: Bike: I take it back, it's not necessarily too dramatic :)
2020-05-01T14:50:08Z pve: thank you all for your great suggestions
2020-05-01T14:58:36Z wsinatra joined #lisp
2020-05-01T14:59:56Z Aurora_v_kosmose quit (Remote host closed the connection)
2020-05-01T15:00:09Z red-dot joined #lisp
2020-05-01T15:00:35Z Aurora_v_kosmose joined #lisp
2020-05-01T15:00:37Z wsinatra quit (Client Quit)
2020-05-01T15:07:03Z efm joined #lisp
2020-05-01T15:09:00Z bitmapper joined #lisp
2020-05-01T15:09:15Z jackdaniel: histeryczne rodzynki?
2020-05-01T15:09:17Z jackdaniel: mmm
2020-05-01T15:12:58Z beach` joined #lisp
2020-05-01T15:13:39Z duncan_ joined #lisp
2020-05-01T15:14:26Z Inline quit (Ping timeout: 244 seconds)
2020-05-01T15:14:40Z beach quit (Disconnected by services)
2020-05-01T15:14:45Z beach` is now known as beach
2020-05-01T15:16:15Z constptr joined #lisp
2020-05-01T15:18:51Z vyorkin joined #lisp
2020-05-01T15:21:45Z borei quit (Ping timeout: 240 seconds)
2020-05-01T15:23:09Z v0|d quit (Remote host closed the connection)
2020-05-01T15:36:29Z gendl: Happy Mayday, everyone.
2020-05-01T15:36:41Z beach: Thanks. You too.
2020-05-01T15:36:50Z phoe: ^
2020-05-01T15:37:06Z Inline joined #lisp
2020-05-01T15:37:38Z red-dot quit (Quit: Going offline, see ya! (www.adiirc.com))
2020-05-01T15:38:17Z ahungry joined #lisp
2020-05-01T15:38:46Z EvW quit (Ping timeout: 240 seconds)
2020-05-01T15:39:20Z rozenglass joined #lisp
2020-05-01T15:47:19Z marcoxa quit (Ping timeout: 258 seconds)
2020-05-01T15:49:08Z red-dot joined #lisp
2020-05-01T15:52:30Z asarch joined #lisp
2020-05-01T15:52:44Z corpix quit (Remote host closed the connection)
2020-05-01T15:52:59Z corpix joined #lisp
2020-05-01T15:55:43Z duncan_ quit (Ping timeout: 246 seconds)
2020-05-01T15:58:45Z corpix quit (Remote host closed the connection)
2020-05-01T15:58:58Z corpix joined #lisp
2020-05-01T15:59:38Z Lycurgus joined #lisp
2020-05-01T16:00:07Z MerlinTheWizard quit (Ping timeout: 240 seconds)
2020-05-01T16:02:01Z lxbarbosa joined #lisp
2020-05-01T16:03:00Z corpix quit (Remote host closed the connection)
2020-05-01T16:03:11Z corpix joined #lisp
2020-05-01T16:09:42Z corpix quit (Remote host closed the connection)
2020-05-01T16:09:47Z MerlinTheWizard joined #lisp
2020-05-01T16:10:01Z corpix joined #lisp
2020-05-01T16:10:21Z rogersm joined #lisp
2020-05-01T16:10:35Z corpix quit (Remote host closed the connection)
2020-05-01T16:11:17Z corpix joined #lisp
2020-05-01T16:11:44Z phoe: In DEFCLASS, "slot-spec" means "slot specification", "slot specifier", or something completely different?
2020-05-01T16:12:36Z corpix quit (Remote host closed the connection)
2020-05-01T16:12:47Z scymtym__ joined #lisp
2020-05-01T16:13:20Z rogersm quit (Client Quit)
2020-05-01T16:13:34Z Bike: what do you mean "In DEFCLASS"
2020-05-01T16:13:36Z corpix joined #lisp
2020-05-01T16:13:43Z Bike: on CLHS there is "slot-specifier" in the grammar
2020-05-01T16:13:54Z scymtym_ quit (Ping timeout: 240 seconds)
2020-05-01T16:13:55Z phoe: oh wait
2020-05-01T16:13:58Z phoe: I meant in DEFINE-CONDITION
2020-05-01T16:14:03Z phoe: thanks, DEFCLASS clarifies that one
2020-05-01T16:15:15Z Bike: as we previously established, the define-condition grammar is weird and bad anyway
2020-05-01T16:15:20Z phoe: yes
2020-05-01T16:15:25Z phoe: I'm attempting to fix it a little bit now
2020-05-01T16:16:19Z phoe: ...why is a single symbol even legal as a condition slot specifier
2020-05-01T16:16:32Z efm quit (Read error: Connection reset by peer)
2020-05-01T16:16:36Z phoe: you cannot even portably access that slot
2020-05-01T16:17:40Z Bike: as we previously established, the define-condition grammar is weird and bad
2020-05-01T16:17:48Z phoe: point taken
2020-05-01T16:21:34Z even4void joined #lisp
2020-05-01T16:23:39Z even4void quit (Client Quit)
2020-05-01T16:27:47Z efm joined #lisp
2020-05-01T16:37:20Z luni joined #lisp
2020-05-01T16:39:53Z souron_the_evil quit (Quit: Leaving)
2020-05-01T16:40:55Z ljavorsk joined #lisp
2020-05-01T16:41:09Z fourier joined #lisp
2020-05-01T16:42:38Z Ven`` quit (Quit: Textual IRC Client: www.textualapp.com)
2020-05-01T16:44:15Z gko quit (Ping timeout: 240 seconds)
2020-05-01T16:46:59Z bitmapper: can i use defmacro in defmacro, i forget
2020-05-01T16:47:39Z Bike: you can expand to a defmacro, which is fine, or you can execute a defmacro which is technically legal but very weird to do.
2020-05-01T16:48:01Z bitmapper: i'm expanding to one
2020-05-01T16:48:05Z bitmapper: so, perfect
2020-05-01T16:48:47Z rgherdt quit (Remote host closed the connection)
2020-05-01T16:49:11Z rgherdt joined #lisp
2020-05-01T16:50:47Z phoe: yes, expanding into a defmacro is not too weird to do
2020-05-01T16:52:08Z fourier: 'programs generating programs generating programs'
2020-05-01T16:52:54Z phoe: I mean, DEFINE-FOO-DEFINER isn't unseen in the wild - and such expand into DEFMACROs usually
2020-05-01T16:55:38Z froggey: and it makes defmacro trivial to implement: (defmacro defmacro (name lambda-list &body body) `(defmacro ,name ,lambda-list ,@body))
2020-05-01T16:55:51Z bitmapper: lol
2020-05-01T16:55:54Z phoe: froggey: hold on for a moment
2020-05-01T16:56:13Z Grue`: it needs to be a quine
2020-05-01T16:56:28Z Grue`: expand into its own definition
2020-05-01T16:56:31Z phoe: https://github.com/sbcl/sbcl/blob/28ddc79abc9f119e3b0e0b5ec9b74222366303e5/src/code/list.lisp#L30
2020-05-01T16:56:34Z phoe: obviously
2020-05-01T16:56:45Z ljavorsk quit (Ping timeout: 240 seconds)
2020-05-01T16:58:26Z rpg joined #lisp
2020-05-01T16:58:44Z bitmapper: aren't those function wrappers around primitives?
2020-05-01T16:58:49Z bitmapper: or is some satanic magic happening
2020-05-01T16:59:01Z phoe: they are open-coded into primitives, yes
2020-05-01T16:59:27Z Grue`: i like how nobody knows what a certain comment means anymore, happens too often with old codebases
2020-05-01T16:59:45Z Inline quit (Ping timeout: 240 seconds)
2020-05-01T17:00:38Z shukryzablah joined #lisp
2020-05-01T17:05:00Z dddddd quit (Remote host closed the connection)
2020-05-01T17:08:37Z karayan quit (Ping timeout: 264 seconds)
2020-05-01T17:09:04Z karayan joined #lisp
2020-05-01T17:11:29Z shifty joined #lisp
2020-05-01T17:18:15Z karayan quit (Ping timeout: 240 seconds)
2020-05-01T17:18:53Z karayan joined #lisp
2020-05-01T17:19:24Z marcoxa joined #lisp
2020-05-01T17:21:50Z zmt01 joined #lisp
2020-05-01T17:24:27Z efm quit (Remote host closed the connection)
2020-05-01T17:24:34Z rozenglass quit (Ping timeout: 240 seconds)
2020-05-01T17:24:45Z zmt00 quit (Ping timeout: 240 seconds)
2020-05-01T17:24:50Z efm joined #lisp
2020-05-01T17:26:48Z lnostdal quit (Read error: Connection reset by peer)
2020-05-01T17:33:09Z marcoxa quit (Quit: ERC (IRC client for Emacs 25.3.1))
2020-05-01T17:34:53Z marcoxa joined #lisp
2020-05-01T17:38:58Z xlarsx joined #lisp
2020-05-01T17:43:35Z xlarsx quit (Ping timeout: 260 seconds)
2020-05-01T17:44:20Z xlarsx joined #lisp
2020-05-01T17:45:12Z narimiran quit (Remote host closed the connection)
2020-05-01T17:45:20Z xlarsx quit (Remote host closed the connection)
2020-05-01T17:48:42Z narimiran joined #lisp
2020-05-01T17:49:04Z rozenglass joined #lisp
2020-05-01T17:50:14Z jackdaniel: that's nothing, function names and comments in McCLIM's geometry module *were* written in german :)
2020-05-01T17:50:45Z phoe: take a look at clisp source code if you want lots of german
2020-05-01T17:55:47Z rozenglass quit (Quit: WeeChat 2.3)
2020-05-01T17:57:32Z jfrancis joined #lisp
2020-05-01T17:57:32Z jfrancis_ quit (Read error: Connection reset by peer)
2020-05-01T18:08:05Z xkapastel quit (Quit: Connection closed for inactivity)
2020-05-01T18:14:52Z karlosz joined #lisp
2020-05-01T18:17:32Z asarch: If I have: ((pizza . 4) (beer . 5) (tacos . 8)), how would I get quickly the value of beers?
2020-05-01T18:17:46Z Josh_2: assoc
2020-05-01T18:17:51Z stepnem quit (Read error: Connection reset by peer)
2020-05-01T18:18:15Z z147 joined #lisp
2020-05-01T18:18:37Z asarch: Thank you!
2020-05-01T18:18:38Z Josh_2: well (cdr (assoc 'beer ))
2020-05-01T18:18:46Z karayan quit (Ping timeout: 256 seconds)
2020-05-01T18:19:17Z karayan joined #lisp
2020-05-01T18:19:45Z fourier quit (Ping timeout: 240 seconds)
2020-05-01T18:20:24Z phoe: alexandria:assoc-value
2020-05-01T18:20:50Z stepnem joined #lisp
2020-05-01T18:20:59Z choegusung joined #lisp
2020-05-01T18:21:03Z choegusung quit (Client Quit)
2020-05-01T18:21:47Z IRC-Source_21 quit (Quit: Connection closed)
2020-05-01T18:21:55Z Grue`: cdadr is the quickest. but only if the entries are in this specific order
2020-05-01T18:22:14Z asarch: Thank you very guys! :-)
2020-05-01T18:25:35Z EvW1 joined #lisp
2020-05-01T18:25:59Z fourier joined #lisp
2020-05-01T18:26:33Z asarch: And what if: ((food (tacos . 8) (pizza . 3) (beer . 6))), how could I get the value of beers?
2020-05-01T18:26:40Z rozenglass joined #lisp
2020-05-01T18:26:50Z Bike: it's gonna be various combinations of car, cdr, and assoc.
2020-05-01T18:27:06Z jackdaniel: Grue`: if the entries are in this specific order and have this specific values, then typing "5" in repl should do ,-)
2020-05-01T18:27:10Z Bike: in this case probably assoc of cdr of first of first. but it depends on your data structure.
2020-05-01T18:27:13Z Bike: which we can't tell you about.
2020-05-01T18:27:26Z Bike: er, only one first
2020-05-01T18:28:59Z barthandelous joined #lisp
2020-05-01T18:29:24Z shangul joined #lisp
2020-05-01T18:30:04Z Lycurgus quit (Remote host closed the connection)
2020-05-01T18:30:21Z asarch: (assoc 'beer (cdr (car '((food (pizza . 4) (beer . 5) (tacos . 8))))))
2020-05-01T18:30:45Z z147 quit (Quit: z147)
2020-05-01T18:37:33Z ted_wroclaw joined #lisp
2020-05-01T18:38:13Z Inline joined #lisp
2020-05-01T18:44:17Z efm quit (Ping timeout: 256 seconds)
2020-05-01T18:44:24Z ahungry: assuming the assoc key 'food' is more relevant than whatever item is first in your data set, to get the value would likely be more clearly written as: (cdr (assoc 'beer (assoc 'food your-list-of-things-here)))
2020-05-01T18:44:27Z Fare joined #lisp
2020-05-01T18:44:50Z efm joined #lisp
2020-05-01T18:47:50Z ahungry: well, maybe a little off, I guess emacs cl-assoc doesn't quite map 1 to 1 with CL assoc, my bad
2020-05-01T18:51:09Z ahungry: yea, so adjust it similar to this and its an easy accessor for association lists: (assoc-cdr 'beer (assoc-cdr 'food food-menu)), where assoc-cdr is just a small function similar to: (defun assoc-cdr (k l) (cdr (assoc k l)))
2020-05-01T18:53:02Z eta quit (Ping timeout: 260 seconds)
2020-05-01T18:53:15Z fourier quit (Ping timeout: 240 seconds)
2020-05-01T18:54:36Z Fare: Somehow quicklisp won't find clx-truetype in ~/quicklisp/dists/quicklisp/software/clx-truetype-20160825-git -- how do I debug that?
2020-05-01T18:55:16Z efm quit (Remote host closed the connection)
2020-05-01T18:55:45Z karswell_ joined #lisp
2020-05-01T18:56:07Z phoe: Fare: might be related to https://github.com/quicklisp/quicklisp-projects/issues/1774
2020-05-01T18:56:17Z Fare: also, while downloading, I had to restart a lot of times because a package was downloaded with the wrong size
2020-05-01T18:56:54Z phoe: or are you using an older dist that still contains that system?
2020-05-01T18:57:13Z stepnem quit (Ping timeout: 264 seconds)
2020-05-01T18:57:38Z stepnem joined #lisp
2020-05-01T18:58:53Z efm joined #lisp
2020-05-01T18:59:18Z Fare: phoe: aha. I had updated my dist, but the source directory still existed from a previous dist.
2020-05-01T18:59:51Z Fare: when I did a (ql-dist::clean (ql-dist::dist "quicklisp")) it disappeared.
2020-05-01T19:00:00Z asarch: Or just (flet ((quantity (value) ....) (quantity 'beer'))
2020-05-01T19:00:16Z phoe: Fare: sounds like it "fixes" your problem, then
2020-05-01T19:00:39Z milanj quit (Quit: This computer has gone to sleep)
2020-05-01T19:00:40Z phoe: doesn't fix the fact that clx-truetype disappeared altogether, but should fix your dist structure
2020-05-01T19:01:23Z ChoHag joined #lisp
2020-05-01T19:02:05Z ChoHag: I know it begs the question "when would it even be called?" so does CLOS have the concept of automatic destructors?
2020-05-01T19:02:48Z lemoinem quit (Ping timeout: 244 seconds)
2020-05-01T19:02:56Z dlowe: they're called "finalizers"
2020-05-01T19:03:02Z eta joined #lisp
2020-05-01T19:03:08Z lemoinem joined #lisp
2020-05-01T19:03:12Z dlowe: and the answer is "not portably"
2020-05-01T19:03:24Z phoe: ChoHag: the first, incorrect answer is (ql:quickload :trivial-garbage)
2020-05-01T19:03:39Z phoe: the second, correct answer is "really, don't use finalizers"
2020-05-01T19:04:06Z dlowe: you really want to control when you release resources
2020-05-01T19:04:15Z ChoHag: No. I don't *want* to.
2020-05-01T19:04:39Z dlowe: then you will want to when you hit the error-prone nature of the idea
2020-05-01T19:04:49Z karswell_ quit (Remote host closed the connection)
2020-05-01T19:04:56Z ted_wroclaw quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-05-01T19:04:57Z ChoHag: I do every time I try and use it.
2020-05-01T19:05:02Z ChoHag: I want to like RAII.
2020-05-01T19:05:33Z Jesin quit (Quit: Leaving)
2020-05-01T19:05:45Z _death: huh, it seems hofstadter's copycat program is not too hard to port to modern common lisp, so far.. https://plaster.tymoon.eu/view/1794#1794
2020-05-01T19:05:48Z phoe: ChoHag: this sounds like initializing some resources with dynamic extent
2020-05-01T19:05:59Z phoe: which, in turn, sounds like a WITH-FOO macro
2020-05-01T19:06:11Z Fare: the correct answer is "Use Rust" ?
2020-05-01T19:06:24Z phoe: Fare: that's a weird answer to get on a Lisp channel
2020-05-01T19:06:31Z karswell_ joined #lisp
2020-05-01T19:06:33Z Inline: more rusty
2020-05-01T19:06:34Z Inline: lol
2020-05-01T19:06:38Z Fare: by which I mean "implement Rust in Lisp"?
2020-05-01T19:06:40Z dlowe: RAII (which I remain unsold on) requires definite lifetimes
2020-05-01T19:07:09Z dlowe: which you're not going to get via garbage collector
2020-05-01T19:07:16Z phoe: and definite lifetimes means that you can use a WITH-FOO macro to control resource releasing
2020-05-01T19:07:33Z dlowe: yes
2020-05-01T19:07:35Z Fare: isn't Lisp supposed to be every language?
2020-05-01T19:07:47Z Fare: I saw people implement parts of Rust in Racket.
2020-05-01T19:08:10Z phoe: (defmacro with-foo ((var) &body body) `(let ((,foo (make-foo))) (unwind-protect (progn, @body) (free-foo ,foo))))
2020-05-01T19:08:12Z dlowe: some things in the runtime are harder to mess with than others without creating a new runtime
2020-05-01T19:08:14Z ChoHag: Fare: Other way around.
2020-05-01T19:08:16Z phoe: adapt to your needs
2020-05-01T19:08:20Z vlatkoB quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
2020-05-01T19:08:43Z phoe: Fare: I don't know if Rust-style borrowers have ever been attempted in CL yet
2020-05-01T19:09:14Z Fare: ChoHag, you want to implement CL in Rust?
2020-05-01T19:09:22Z phoe: uh, s/foo/var/
2020-05-01T19:09:23Z ChoHag: No thanks.
2020-05-01T19:09:34Z Fare: Lisp can be every language, and every language can be Lisp!
2020-05-01T19:14:22Z rpg quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-05-01T19:14:35Z Jesin joined #lisp
2020-05-01T19:15:22Z barthandelous quit (Quit: barthandelous)
2020-05-01T19:16:21Z efm quit (Read error: Connection reset by peer)
2020-05-01T19:18:04Z jonatack_ quit (Read error: Connection reset by peer)
2020-05-01T19:18:15Z jonatack__ joined #lisp
2020-05-01T19:19:20Z jonatack__ quit (Client Quit)
2020-05-01T19:19:28Z efm joined #lisp
2020-05-01T19:19:39Z jonatack joined #lisp
2020-05-01T19:20:26Z Fare: "Guy Steele has been quoted as vaunting the programmability of Lisp’s syntax by saying: If you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases. Unhappily, if he were speaking about CL specifically, he would have had to add: but it can’t be the same as anyone else’s."
2020-05-01T19:20:53Z rpg joined #lisp
2020-05-01T19:21:48Z fourier joined #lisp
2020-05-01T19:22:12Z _death: seems your quotation is putting words into Guy Steele's mouth
2020-05-01T19:22:29Z Fare: _death, I need more nested quotes?
2020-05-01T19:22:52Z Fare: "Guy Steele has been quoted as vaunting the programmability of Lisp’s syntax by saying: «If you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases.» Unhappily, if he were speaking about CL specifically, he would have had to add: but it can’t be the same as anyone else’s." Better?
2020-05-01T19:23:13Z _death: now the dishonesty is clearer, yes
2020-05-01T19:24:06Z Fare: In the original, the Steele quote was in italic.
2020-05-01T19:24:15Z MerlinTheWizard quit (Ping timeout: 240 seconds)
2020-05-01T19:25:16Z Fare: How is that dishonest?
2020-05-01T19:26:04Z _death: because you have no idea what Guy Steele would have to add or not.. you just use his aura of authority to advance your own arguments
2020-05-01T19:26:10Z _death: or rather, claims
2020-05-01T19:27:02Z eta quit (Ping timeout: 260 seconds)
2020-05-01T19:27:29Z Fare: I'm shocked that my addendum is interpreted as being attributed to Steele or claiming his authority—--it undermines Steele as much as it reveres him.
2020-05-01T19:27:48Z Fare: That said, I should ask Steele next time he's in town.
2020-05-01T19:27:53Z dlowe: computer languages were a much simpler affair in the 80s
2020-05-01T19:28:02Z dlowe: there was much less of an ecosystem aspect
2020-05-01T19:28:04Z Fare: dlowe, indeed they were.
2020-05-01T19:28:31Z Fare: or rather, there was the ecosystem aspect, but at a smaller scale.
2020-05-01T19:29:19Z Fare: dlowe, I see that you maintain local-time.
2020-05-01T19:29:54Z dlowe: Fare: to some degree
2020-05-01T19:30:02Z vivit joined #lisp
2020-05-01T19:30:02Z vivit quit (Changing host)
2020-05-01T19:30:02Z vivit joined #lisp
2020-05-01T19:30:27Z Fare: the naggum document mentions allocating a large table of data and then other optimizations, and concludes that "this optimization is not implemented yet" or something, but it's unclear what is or isn't. Does local-time do that?
2020-05-01T19:31:14Z karlosz quit (Quit: karlosz)
2020-05-01T19:31:37Z phoe: Fare: the document mentions a fixnum space, which makes me wonder if Naggum worked with 64-bit machine words
2020-05-01T19:31:39Z dlowe: No. I realize that was most of the document, but I figured that computation was fast enough
2020-05-01T19:32:03Z dlowe: and so far no one has cared enough to add the speed/space tradeoff
2020-05-01T19:32:06Z ted_wroclaw joined #lisp
2020-05-01T19:32:51Z phoe: blah, I have less and less energy for writing this book; I already want to be done with it
2020-05-01T19:33:09Z phoe: glad that all that remains is writing the reference and stuffing the code on github
2020-05-01T19:37:28Z Fare: phoe, what does the book say / do?
2020-05-01T19:37:32Z shangul quit (Ping timeout: 256 seconds)
2020-05-01T19:38:38Z phoe: Fare: https://gist.github.com/phoe/5659f8e5d8ff85e99565de17e39e4449
2020-05-01T19:38:42Z SGASAU` quit (Remote host closed the connection)
2020-05-01T19:39:06Z phoe: tl;dr a book on the condition system. The abstract is at the beginning.
2020-05-01T19:39:24Z SGASAU` joined #lisp
2020-05-01T19:40:25Z shka_ quit (Ping timeout: 246 seconds)
2020-05-01T19:42:09Z aeth: Nested quotes? When you can just do this? '(GUY STEELE HAS BEEN QUOTED AS VAUNTING THE PROGRAMMABILITY OF |LISP'S| SYNTAX BY SAYING |:| (IF YOU ...))
2020-05-01T19:43:16Z Fare: aeth, wow, back in the 1970s
2020-05-01T19:43:30Z ChoHag: phoe: What does var do in that macro?
2020-05-01T19:43:50Z ChoHag: It's not used anywhere.
2020-05-01T19:43:58Z Fare: phoe, not sure your long discussion on dynamic variables should be the chapter 1 rather than an appendix
2020-05-01T19:44:03Z ChoHag: Also FWIW I'm unused to lisp macros - I'm approaching lisp from scheme.
2020-05-01T19:44:05Z karlosz joined #lisp
2020-05-01T19:44:13Z phoe: Fare: what do you mean, appendix
2020-05-01T19:44:18Z phoe: oh, I see
2020-05-01T19:44:42Z Fare: phoe, I don't know who is your intended audience, but I would pick a few proofreaders and listen to their feedback on how to organize the book.
2020-05-01T19:44:44Z phoe: I chose to put it there because people were getting confused about how dynavars work, especially people who aren't lispers.
2020-05-01T19:44:52Z Fare: "Dynamic variables? Ah, you mean the reader monad!"
2020-05-01T19:44:52Z phoe: Fare: sure.
2020-05-01T19:45:25Z phoe: ChoHag: I screwed up, the valid macro is (defmacro with-foo ((var) &body body) `(let ((,var (make-foo))) (unwind-protect (progn, @body) (free-foo ,var))))
2020-05-01T19:45:49Z ChoHag: Ah so var can be used within body?
2020-05-01T19:45:53Z phoe: correct
2020-05-01T19:45:56Z akoana joined #lisp
2020-05-01T19:46:11Z phoe: Fare: the target is beginner and intermediate Lisp programmers and intermediate non-Lisp programmers
2020-05-01T19:46:38Z phoe: the dynavar chapters are for the latter, since many languages simply don't provide dynavars and so even the concept is completely foreign for them.
2020-05-01T19:47:17Z phoe: and dynavars are the foundation of the whole handler and restart subsystems, so I don't think stashing the concept away to an appendix will do the book much good.
2020-05-01T19:49:10Z shukryzablah quit (Quit: ERC (IRC client for Emacs 26.3))
2020-05-01T19:49:28Z dlowe: phoe: (free-foo ,var) should probably be (ignore-error (free-foo ,var))
2020-05-01T19:49:36Z lxbarbosa quit (Remote host closed the connection)
2020-05-01T19:50:35Z ChoHag: phoe: Do dynamic variables differ substantially from perl's globals?
2020-05-01T19:50:50Z ChoHag: Or whatever it calls what local does.
2020-05-01T19:51:26Z red-dot quit (Quit: Going offline, see ya! (www.adiirc.com))
2020-05-01T19:51:43Z dlowe: actually, never mind. I misremembered a thing.
2020-05-01T19:51:53Z phoe: dlowe: wait a second, why
2020-05-01T19:52:08Z phoe: if you get an error freeing some resource, then that error must be meaningful for the programmer
2020-05-01T19:52:41Z dlowe: I had some vague recollection that having a non-local exit in a recovery was bad, but when I looked I saw no such thing.
2020-05-01T19:52:52Z ChoHag: Well presumably the expression normally evaluates to the result of body?
2020-05-01T19:52:55Z phoe: non-local exit? what do you mean?
2020-05-01T19:53:02Z MerlinTheWizard joined #lisp
2020-05-01T19:53:08Z dlowe: phoe: like another signal or a goto or a throw
2020-05-01T19:53:29Z dlowe: or invoking a restart
2020-05-01T19:53:39Z ChoHag: Also a good point - how *are* unexpected conditions in the unwinder 'supposed' to be handled?
2020-05-01T19:54:32Z phoe: ChoHag: that's not really the issue of the unwinder; if your freeing function signals an error, then it signals an error, and at some point it should be handled
2020-05-01T19:54:37Z MightyJoe joined #lisp
2020-05-01T19:54:49Z phoe: dlowe: I remember no such thing, the protecting forms can do whatever they want
2020-05-01T19:55:02Z cyraxjoe quit (Ping timeout: 256 seconds)
2020-05-01T19:55:04Z ChoHag: Hmm I should probably find out how CL does exceptions.
2020-05-01T19:55:07Z dlowe: phoe: how many times do I need to say I was mistaken.
2020-05-01T19:55:12Z phoe: welp, sorry
2020-05-01T19:55:20Z phoe: ChoHag: well that's what my book is about
2020-05-01T19:55:34Z ChoHag: I thought it was about dynamic variables?
2020-05-01T19:55:50Z phoe: its name is Common Lisp Condition System
2020-05-01T19:55:56Z ChoHag: Oh wow that scroll bar's actually quite small...
2020-05-01T19:55:57Z rozenglass quit (Quit: WeeChat 2.3)
2020-05-01T19:56:03Z phoe: which, in turn, is mostly about dynamic variables
2020-05-01T19:56:13Z phoe: and creative ways of using them
2020-05-01T19:56:28Z ChoHag: TOC would be nice.
2020-05-01T19:56:39Z pjb: dlowe: were you mistaken?
2020-05-01T19:56:58Z phoe: ChoHag: it's a markdown document, ToCs will be done when the book is finished.
2020-05-01T19:57:01Z phoe: and published.
2020-05-01T19:57:08Z phoe: it's still a WIP.
2020-05-01T19:57:20Z ChoHag: Just giving the gist of it?
2020-05-01T19:57:51Z phoe: just publishing an early version in hope I get some more proofreaders on it
2020-05-01T20:01:23Z ChoHag: Is there some concise description of what the condition system is/does before reading this for the details?
2020-05-01T20:01:39Z ChoHag: You make it sound like it's a common feature.
2020-05-01T20:02:15Z MightyJoe quit (Ping timeout: 240 seconds)
2020-05-01T20:02:33Z ChoHag: I like the idea of 'exceptions, but winding the stack UP'.
2020-05-01T20:03:15Z fourier quit (Ping timeout: 240 seconds)
2020-05-01T20:03:31Z phoe: ChoHag: the "Introduction" should give a brief glimpse of what it is
2020-05-01T20:04:21Z ChoHag: I'm just not a fan of "This book is supposed to be read in order" :(
2020-05-01T20:04:41Z cyraxjoe joined #lisp
2020-05-01T20:04:54Z phoe: I'm sorry; I have no idea how to make that book modular, since you need knowledge from the earlier chapters to understand later ones.
2020-05-01T20:05:15Z rwcom3 joined #lisp
2020-05-01T20:06:26Z Bike: even books that try to be modular still have internal dependencies
2020-05-01T20:06:42Z Bike: i guess you could do your technical book like Pale Fire. sounds innovative
2020-05-01T20:06:44Z ChoHag: Well I'll make a point to read it later. I've been thinking a lot about that side of things recently but taking a detour to actually learn lisp for real this time.
2020-05-01T20:07:26Z ahungry: phoe: typo in "Tom tends to call various people often and for various puroposes. "
2020-05-01T20:07:36Z phoe: ahungry: thanks, will fix.
2020-05-01T20:07:48Z phoe googles Pale Fire
2020-05-01T20:08:26Z Bike: well, the point is there's no particular order you have to read it in, though reading the individual sections linearly is probably a good idea
2020-05-01T20:09:34Z Bike: "Types and Programming Languages" does give a dependency graph of the chapters early on. i think a few other mathy books do that as well, but that's the one i remember
2020-05-01T20:09:46Z _death: you could make it hierarchical.. first the big picture, then more and more detailed reiterations
2020-05-01T20:09:49Z Bike: of coruse, this still establishes a _partial_ order, so technically,
2020-05-01T20:09:54Z ChoHag: Oh btw, as a general rule please try to give (a summarised version of) the expected result of any code samples.
2020-05-01T20:10:19Z Fare: phoe, some people understand the reader monad, or dependency injection, etc. You can appeal to their familiarity of it and/or to the fact that dynamic binding trivializes these things that are non-trivial in other languages.
2020-05-01T20:10:23Z ChoHag: It's one of the most frustrating things when reading documentation to see code and be expected to know what its output would be, given the API being documented.
2020-05-01T20:11:39Z MightyJoe joined #lisp
2020-05-01T20:11:42Z phoe: Fare: point taken, thank you. I'll do that.
2020-05-01T20:12:07Z phoe: ChoHag: I do that when I test things in the REPL. Or do you mean something else?
2020-05-01T20:12:50Z ChoHag: Mostly things that could be copy-pasted into a REPL, include in the book what the REPL would display.
2020-05-01T20:12:57Z phoe: ChoHag: I do that
2020-05-01T20:13:02Z ChoHag: Yes I've seen a few.
2020-05-01T20:13:06Z rumbler314 joined #lisp
2020-05-01T20:13:14Z cyraxjoe quit (Ping timeout: 256 seconds)
2020-05-01T20:13:57Z ChoHag: Maybe it's ubiquitous already, I don't know; I haven't read it in depth yet just a quick eyeball.
2020-05-01T20:14:19Z dale_ joined #lisp
2020-05-01T20:14:25Z dale_ is now known as dale
2020-05-01T20:14:40Z terpri quit (Remote host closed the connection)
2020-05-01T20:15:21Z terpri joined #lisp
2020-05-01T20:17:01Z phoe: okiedokie
2020-05-01T20:17:09Z gargaml quit (Quit: WeeChat 2.8)
2020-05-01T20:20:36Z shangul joined #lisp
2020-05-01T20:22:44Z cyraxjoe joined #lisp
2020-05-01T20:24:14Z MightyJoe quit (Ping timeout: 240 seconds)
2020-05-01T20:24:48Z eta joined #lisp
2020-05-01T20:29:24Z MightyJoe joined #lisp
2020-05-01T20:31:07Z cyraxjoe quit (Ping timeout: 260 seconds)
2020-05-01T20:33:07Z ted_wroclaw: phoe: I think it's great that someone is writing a lisp book. We need more of them.
2020-05-01T20:33:31Z phoe: ted_wroclaw: thanks, that's why I'm doing that
2020-05-01T20:33:35Z pve quit (Quit: leaving)
2020-05-01T20:33:41Z phoe: are you from Poland? your nickname sounds quite Polish
2020-05-01T20:33:51Z ted_wroclaw: I'm American, but I live in Wroclaw
2020-05-01T20:34:02Z phoe: oh! I see, amazing stuff
2020-05-01T20:34:09Z ted_wroclaw: you are polish?
2020-05-01T20:34:18Z phoe: yep, Kraków says hello
2020-05-01T20:34:26Z phoe: you can meet some Polish lispers on #lisp-pl if you want
2020-05-01T20:34:43Z ted_wroclaw: świetnie!
2020-05-01T20:35:25Z ted_wroclaw: but my Polish is limited to ordering tartar at the 1 eur bars
2020-05-01T20:35:27Z Josh_2: I have met polish lispers :O
2020-05-01T20:35:58Z SGASAU` quit (Remote host closed the connection)
2020-05-01T20:36:35Z narimiran quit (Quit: leaving)
2020-05-01T20:36:50Z SGASAU` joined #lisp
2020-05-01T20:41:13Z vladomiro joined #lisp
2020-05-01T20:42:13Z gravicappa quit (Ping timeout: 264 seconds)
2020-05-01T20:42:22Z shangul quit (Ping timeout: 246 seconds)
2020-05-01T20:44:54Z rpg quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-05-01T20:46:51Z McParen left #lisp
2020-05-01T20:47:00Z Fare: phoe, next time you go to Wawel castle, please take pictures of the armor room
2020-05-01T20:47:14Z phoe: Fare: I remember that one, you asked me previously about it
2020-05-01T20:48:43Z nika quit
2020-05-01T20:50:55Z cyraxjoe joined #lisp
2020-05-01T20:52:54Z MightyJoe quit (Ping timeout: 260 seconds)
2020-05-01T20:55:45Z jonatack_ joined #lisp
2020-05-01T20:58:58Z jonatack quit (Ping timeout: 260 seconds)
2020-05-01T20:59:01Z MightyJoe joined #lisp
2020-05-01T21:00:54Z cyraxjoe quit (Ping timeout: 260 seconds)
2020-05-01T21:01:31Z cyraxjoe joined #lisp
2020-05-01T21:01:58Z quazimodo quit (Ping timeout: 246 seconds)
2020-05-01T21:02:15Z quazimodo joined #lisp
2020-05-01T21:03:12Z ted_wroclaw quit (Quit: Textual IRC Client: www.textualapp.com)
2020-05-01T21:03:42Z MightyJoe quit (Ping timeout: 260 seconds)
2020-05-01T21:05:11Z eta quit (Ping timeout: 260 seconds)
2020-05-01T21:07:22Z Bourne quit (Ping timeout: 260 seconds)
2020-05-01T21:08:01Z ChoHag: How can I adapt the with-foo macro so that arguments can be passed to make-foo? I presume (defmacro with-foo ((a b c) &body d) ... (make-foo a b c) ... would work, but how do I just say 'pass any arguments as-is'?
2020-05-01T21:08:18Z ChoHag: In scheme I'd have something like '(var . opt)' and '(apply make-foo opt)'.
2020-05-01T21:08:26Z MerlinTheWizard quit (Remote host closed the connection)
2020-05-01T21:08:41Z eta joined #lisp
2020-05-01T21:08:46Z MerlinTheWizard joined #lisp
2020-05-01T21:09:03Z ChoHag: Then '(with-foo var-name 42 43 44)'.
2020-05-01T21:10:31Z ChoHag: Oh and a body and an extra level of () around the arguments but you get the idea.
2020-05-01T21:10:41Z phoe: (defmacro with-foo ((var &rest args) &body body) `(let ((,var (make-foo ,@args))) (unwind-protect (progn, @body) (free-foo ,var))))
2020-05-01T21:11:15Z ChoHag: Perfect thanks.
2020-05-01T21:11:31Z ChoHag: Macros look weird.
2020-05-01T21:11:44Z phoe: a macro is just a function that accepts Lisp data and spits out Lisp code
2020-05-01T21:12:09Z phoe: wait a second, I screwed it up
2020-05-01T21:12:17Z phoe: (defmacro with-foo ((var &rest args) &body body) `(let ((,var (make-foo ,@args))) (unwind-protect (progn ,@body) (free-foo ,var))))
2020-05-01T21:12:20Z phoe: there
2020-05-01T21:12:20Z Bourne joined #lisp
2020-05-01T21:12:49Z ChoHag: Oh yeah you had that in the previous one.
2020-05-01T21:13:13Z ChoHag: I can read macros, they just look weird.
2020-05-01T21:13:20Z phoe: (defmacro with-foo ((var &rest args) &body body) (list 'let (list (list var (list* 'make-foo args))) (list 'unwind-protect (list* 'progn body) (list 'free-foo var))))
2020-05-01T21:13:28Z phoe: there, have that instead
2020-05-01T21:13:36Z ChoHag: Oh for ...
2020-05-01T21:14:02Z ChoHag: Oh I see. God that's awful.
2020-05-01T21:15:04Z aeth: things like that are usually better with `
2020-05-01T21:15:08Z ggole quit (Quit: Leaving)
2020-05-01T21:15:09Z phoe: yes
2020-05-01T21:15:12Z ChoHag: Yeah... Why am I a programmer again?
2020-05-01T21:17:46Z jruiz joined #lisp
2020-05-01T21:18:49Z quazimodo quit (Ping timeout: 264 seconds)
2020-05-01T21:20:12Z quazimodo joined #lisp
2020-05-01T21:20:37Z aeth: Well, I mean, it's a simple pattern so you could always do (defmacro define-with (binding cleanup &body body) ...)
2020-05-01T21:21:01Z karayan quit (Remote host closed the connection)
2020-05-01T21:21:18Z aeth: well, something along those lines
2020-05-01T21:21:32Z aeth: Always go one level more meta
2020-05-01T21:21:42Z karayan joined #lisp
2020-05-01T21:21:46Z phoe: ah yes, the definer definer
2020-05-01T21:23:45Z MerlinTheWizard quit (Ping timeout: 240 seconds)
2020-05-01T21:24:01Z aeth: define-modify-macro
2020-05-01T21:24:08Z ChoHag: The wrap-line symbol on the right hand side of the screen is the sign to go up another metalevel.
2020-05-01T21:24:26Z aeth: define-modify-macro is the sort of high level you should be going for
2020-05-01T21:24:40Z aeth: (yes, it's not a definer definer, but it's a one liner sort of thing)
2020-05-01T21:25:56Z SGASAU` quit (Remote host closed the connection)
2020-05-01T21:26:37Z vivit quit (Ping timeout: 264 seconds)
2020-05-01T21:27:50Z Aurora_iz_kosmos joined #lisp
2020-05-01T21:29:25Z heisig quit (Quit: Leaving)
2020-05-01T21:29:27Z ahungry quit (Remote host closed the connection)
2020-05-01T21:29:54Z Aurora_v_kosmose quit (Quit: Пока, мир.)
2020-05-01T21:30:54Z rumbler314 quit (Ping timeout: 245 seconds)
2020-05-01T21:32:22Z MerlinTheWizard joined #lisp
2020-05-01T21:33:49Z asarch quit (Quit: Leaving)
2020-05-01T21:41:03Z Aishawhite joined #lisp
2020-05-01T21:43:18Z Aishawhite quit (Client Quit)
2020-05-01T21:44:25Z Inline: so a 'has-a' relationship in oop cl is realized by adding a mixin ?
2020-05-01T21:45:40Z shangul joined #lisp
2020-05-01T21:48:54Z shifty quit (Ping timeout: 260 seconds)
2020-05-01T21:53:43Z vivit joined #lisp
2020-05-01T21:53:43Z vivit quit (Changing host)
2020-05-01T21:53:43Z vivit joined #lisp
2020-05-01T21:54:09Z _death: no, it is realized by defining a slot.. a mixin lets you reuse implementation
2020-05-01T21:59:24Z jruiz: Inline: say you have an engine class and want to define a car class
2020-05-01T21:59:29Z jruiz: a car 'has' an engine, so you could do
2020-05-01T21:59:37Z jruiz: (defclass car () ((engine :initform (make-engine) :reader car-engine)))
2020-05-01T22:00:17Z jruiz: assuming you have an engine constructor, make-engine
2020-05-01T22:02:04Z vyorkin` joined #lisp
2020-05-01T22:02:34Z kark joined #lisp
2020-05-01T22:02:58Z vyorkin quit (Ping timeout: 260 seconds)
2020-05-01T22:03:53Z Inline: allright
2020-05-01T22:06:15Z MerlinTheWizard quit (Ping timeout: 240 seconds)
2020-05-01T22:06:42Z hsaziz joined #lisp
2020-05-01T22:07:31Z shangul quit (*.net *.split)
2020-05-01T22:07:31Z Bourne quit (*.net *.split)
2020-05-01T22:07:31Z elflng quit (*.net *.split)
2020-05-01T22:07:31Z lowryder quit (*.net *.split)
2020-05-01T22:07:31Z zaquest quit (*.net *.split)
2020-05-01T22:07:31Z Necktwi quit (*.net *.split)
2020-05-01T22:07:32Z ft quit (*.net *.split)
2020-05-01T22:07:32Z cross quit (*.net *.split)
2020-05-01T22:07:32Z davsebam1e quit (*.net *.split)
2020-05-01T22:07:32Z Josh_2 quit (*.net *.split)
2020-05-01T22:07:32Z niceplace quit (*.net *.split)
2020-05-01T22:07:32Z vaporatorius quit (*.net *.split)
2020-05-01T22:07:32Z froggey quit (*.net *.split)
2020-05-01T22:07:32Z azrazalea quit (*.net *.split)
2020-05-01T22:07:32Z OMGOMG quit (*.net *.split)
2020-05-01T22:07:32Z dilated_dinosaur quit (*.net *.split)
2020-05-01T22:07:32Z edgar-rft quit (*.net *.split)
2020-05-01T22:07:32Z trittweiler quit (*.net *.split)
2020-05-01T22:07:32Z q-u-a-n23 quit (*.net *.split)
2020-05-01T22:07:32Z cylb quit (*.net *.split)
2020-05-01T22:07:32Z eagleflo quit (*.net *.split)
2020-05-01T22:07:33Z shenghi quit (*.net *.split)
2020-05-01T22:07:33Z kark quit (*.net *.split)
2020-05-01T22:07:33Z vyorkin` quit (*.net *.split)
2020-05-01T22:07:33Z karayan quit (*.net *.split)
2020-05-01T22:07:33Z terpri quit (*.net *.split)
2020-05-01T22:07:33Z EvW1 quit (*.net *.split)
2020-05-01T22:07:33Z zmt01 quit (*.net *.split)
2020-05-01T22:07:33Z luni quit (*.net *.split)
2020-05-01T22:07:34Z westerns quit (*.net *.split)
2020-05-01T22:07:34Z roelj quit (*.net *.split)
2020-05-01T22:07:34Z ralt quit (*.net *.split)
2020-05-01T22:07:34Z xantoz quit (*.net *.split)
2020-05-01T22:07:34Z nchambers quit (*.net *.split)
2020-05-01T22:07:34Z HiRE quit (*.net *.split)
2020-05-01T22:07:34Z Grauwolf quit (*.net *.split)
2020-05-01T22:07:35Z _whitelogger quit (*.net *.split)
2020-05-01T22:07:35Z |3b| quit (*.net *.split)
2020-05-01T22:07:35Z CEnnis91 quit (*.net *.split)
2020-05-01T22:07:35Z ult quit (*.net *.split)
2020-05-01T22:07:35Z thonkpod quit (*.net *.split)
2020-05-01T22:07:43Z roelj joined #lisp
2020-05-01T22:07:45Z OMGOMG joined #lisp
2020-05-01T22:07:45Z froggey joined #lisp
2020-05-01T22:07:45Z elflng joined #lisp
2020-05-01T22:07:45Z davsebamse joined #lisp
2020-05-01T22:07:46Z westerns joined #lisp
2020-05-01T22:07:47Z trittweiler joined #lisp
2020-05-01T22:07:48Z karayan joined #lisp
2020-05-01T22:07:49Z vaporatorius joined #lisp
2020-05-01T22:07:49Z Grauwolf joined #lisp
2020-05-01T22:07:55Z q-u-a-n2 joined #lisp
2020-05-01T22:07:55Z shenghi joined #lisp
2020-05-01T22:07:56Z EvW joined #lisp
2020-05-01T22:08:00Z zaquest joined #lisp
2020-05-01T22:08:06Z zmt01 joined #lisp
2020-05-01T22:08:10Z xantoz joined #lisp
2020-05-01T22:08:13Z lowryder joined #lisp
2020-05-01T22:08:14Z vaporatorius quit (Changing host)
2020-05-01T22:08:14Z vaporatorius joined #lisp
2020-05-01T22:08:14Z Grauwolf quit (Changing host)
2020-05-01T22:08:14Z Grauwolf joined #lisp
2020-05-01T22:08:17Z thonkpod joined #lisp
2020-05-01T22:08:20Z edgar-rft joined #lisp
2020-05-01T22:08:22Z ralt joined #lisp
2020-05-01T22:08:25Z hsaziz quit (Read error: Connection reset by peer)
2020-05-01T22:08:34Z cross joined #lisp
2020-05-01T22:08:38Z jruiz: a mixin is like an aggregate class that is not expected to stand alone
2020-05-01T22:09:07Z CEnnis91 joined #lisp
2020-05-01T22:09:22Z CEnnis91 quit (Changing host)
2020-05-01T22:09:22Z CEnnis91 joined #lisp
2020-05-01T22:09:22Z CEnnis91 quit (Changing host)
2020-05-01T22:09:22Z CEnnis91 joined #lisp
2020-05-01T22:09:44Z Inline: afaik it just adds a slot
2020-05-01T22:09:46Z jruiz: like, you could have a lifecycle-mixin with methods like start, started-p, and stop
2020-05-01T22:09:50Z _whitelogger joined #lisp
2020-05-01T22:09:52Z drewc quit (Ping timeout: 244 seconds)
2020-05-01T22:10:10Z Josh_2 joined #lisp
2020-05-01T22:10:17Z Inline: or a few slots which are not thought to be part of the normal instance
2020-05-01T22:10:21Z azrazalea joined #lisp
2020-05-01T22:10:24Z terpri joined #lisp
2020-05-01T22:10:24Z niceplace joined #lisp
2020-05-01T22:10:40Z terpri quit (Remote host closed the connection)
2020-05-01T22:10:52Z vyorkin` joined #lisp
2020-05-01T22:10:56Z nchambers joined #lisp
2020-05-01T22:11:01Z |3b| joined #lisp
2020-05-01T22:11:06Z HiRE joined #lisp
2020-05-01T22:11:13Z terpri joined #lisp
2020-05-01T22:11:22Z jruiz: mixins generally customize or enhance the behavior of other classes
2020-05-01T22:11:59Z Inline: right so thru slot inheritance it can modify the slot too
2020-05-01T22:12:12Z Inline: hmmm
2020-05-01T22:12:43Z eagleflo joined #lisp
2020-05-01T22:12:43Z kark joined #lisp
2020-05-01T22:12:46Z ft joined #lisp
2020-05-01T22:12:52Z Necktwi joined #lisp
2020-05-01T22:12:57Z ult joined #lisp
2020-05-01T22:14:27Z drewc joined #lisp
2020-05-01T22:15:31Z aeth: in Common Lisp, cars are called automobiles :-)
2020-05-01T22:16:25Z jruiz: aeth: oh yes, good point
2020-05-01T22:17:59Z jruiz: (defclass automobile () ((engine :initform (make-engine) :reader automobile-engine)))
2020-05-01T22:18:16Z seok joined #lisp
2020-05-01T22:18:29Z seok: morning guys
2020-05-01T22:18:45Z MerlinTheWizard joined #lisp
2020-05-01T22:19:15Z seok: Is there some kind of data structure that uses datetime as index?
2020-05-01T22:19:20Z seok: something like pandas in python
2020-05-01T22:20:15Z torbo joined #lisp
2020-05-01T22:22:02Z sjl_ quit (Ping timeout: 256 seconds)
2020-05-01T22:22:54Z vivit quit (Ping timeout: 240 seconds)
2020-05-01T22:29:26Z hsaziz joined #lisp
2020-05-01T22:33:03Z frgo quit (Remote host closed the connection)
2020-05-01T22:33:03Z hsaziz quit (Client Quit)
2020-05-01T22:33:08Z Necktwi quit (Ping timeout: 256 seconds)
2020-05-01T22:33:19Z efm quit (Ping timeout: 246 seconds)
2020-05-01T22:33:26Z hsaziz joined #lisp
2020-05-01T22:33:34Z frgo joined #lisp
2020-05-01T22:34:53Z hsaziz quit (Client Quit)
2020-05-01T22:35:06Z torbo quit (Remote host closed the connection)
2020-05-01T22:35:14Z torbo joined #lisp
2020-05-01T22:35:37Z marcoxa quit (Remote host closed the connection)
2020-05-01T22:36:16Z markasoftware: so, uh, why is loop way fastert han dotimes in sbcl?
2020-05-01T22:36:47Z markasoftware: (let ((total 0)) (dotimes (i 16000000) (incf total i)) vs (loop with total = 0 for i from 0 below 16000000 do (incf total i) finally (return i))
2020-05-01T22:37:44Z markasoftware: *return total
2020-05-01T22:38:42Z Nilby quit (Read error: Connection reset by peer)
2020-05-01T22:39:24Z markasoftware: i guess i should just look at the macroexpand
2020-05-01T22:40:35Z saturn2: they produce almost the same disassembly for me
2020-05-01T22:41:16Z White_Flame: loop is a bit smaller than dolist for me as well (speed 3, safety 0 etc)
2020-05-01T22:41:21Z Bike: those both take about the same time for me.
2020-05-01T22:41:48Z Bike: also it varies by a not insubstantial fraction between runs.
2020-05-01T22:42:05Z markasoftware: i may have done something wrong
2020-05-01T22:42:11Z White_Flame: also, you should probably declare fixnum for such a test in case it's doing generic + calls
2020-05-01T22:43:08Z markasoftware: ah ok, the problem was when i didn't use let
2020-05-01T22:43:11Z ralt: so
2020-05-01T22:43:24Z markasoftware: so, just (setq total 0) then (dotimes (i 16000000) (incf total i))
2020-05-01T22:43:24Z ralt: I have a system with :build-operation :static-program-op
2020-05-01T22:43:35Z markasoftware: but then the same thing happens with loop. So it is about global vs local variables, probably something type related
2020-05-01T22:43:41Z Bike: markasoftware: in that case it will use dynamic variables, which probably will be much slower.
2020-05-01T22:43:42Z markasoftware: my apologies
2020-05-01T22:43:47Z Bike: markasoftware: sbcl should have warned you about this?
2020-05-01T22:43:51Z markasoftware: yess
2020-05-01T22:43:53Z vivit joined #lisp
2020-05-01T22:43:53Z vivit quit (Changing host)
2020-05-01T22:43:53Z vivit joined #lisp
2020-05-01T22:44:24Z saturn2: dynamic variables are always going to be slower even with a declared type
2020-05-01T22:44:25Z ralt: my sbcl 2.0.4 was compiled with sb-linkable-runtime, the system defsystem-depends-on on cffi-grovel, and I even have a static library (.a) built
2020-05-01T22:44:26Z markasoftware: why is setting a dynamic variable slow?
2020-05-01T22:44:46Z ralt: but the compilation is failing with (.text+0x24): undefined reference to `main'
2020-05-01T22:44:54Z Bike: setting a dynamic variable means setting a global spot such as part of the environment or thread local storage
2020-05-01T22:45:06Z Bike: whereas setting a lexical variable might be setting a register, or a stack location, or nothing
2020-05-01T22:45:44Z ralt: looking on reddit/cl-mpi, it sounds like just having a correctly compiled sbcl should be enough, but mine definitely has that done, so I'm a bit at a loss
2020-05-01T22:45:48Z White_Flame: there's generally a test to see if it's dynamically bound, and if not then the write goes to the global symbol-value slot
2020-05-01T22:46:27Z White_Flame: and incf is doing both a read & a write, both which need to perform that test
2020-05-01T22:46:39Z White_Flame: (likely, not verified)
2020-05-01T22:46:52Z markasoftware: huh, cool stuff
2020-05-01T22:46:55Z markasoftware: thanks!
2020-05-01T22:47:12Z saturn2: most optimizations can't be done because the dynamic variable might be changed by other code and might be bound on the stack or globally
2020-05-01T22:47:49Z White_Flame: if you didn't defvar the variable, then it even calls through a SET function
2020-05-01T22:48:55Z White_Flame: since there's many other declarations that could define how it's stored, and it'd have to figure that out at runtime
2020-05-01T22:49:07Z igemnace quit (Quit: WeeChat 2.8)
2020-05-01T22:49:23Z White_Flame: markasoftware: in any case, DISASSEMBLE is your frient
2020-05-01T22:49:34Z White_Flame: even if just to see the general gist & size of the generated code
2020-05-01T22:49:51Z White_Flame: and how many embedded function calls occur vs inline work
2020-05-01T22:49:55Z saturn2: sbcl lets you optimize that slightly by using defglobal, but it still can't optimize away any reads or writes since other code might depend on them
2020-05-01T22:51:17Z White_Flame: a write to a defglobal is a plain MOV QWORD PTR [location], val
2020-05-01T22:51:41Z White_Flame: (with optimizations cranked up)
2020-05-01T22:51:53Z axion: CCL and LW also have globals.
2020-05-01T22:52:28Z White_Flame: do any of them have thread-local-only declarations? sbcl doesn't
2020-05-01T22:52:51Z White_Flame: that would help microoptimize a lot of my use
2020-05-01T22:52:54Z axion: There's even a portability library, if you call 3 implementations "portable", and any others, falling back to a symbol macro.
2020-05-01T22:53:27Z torbo` joined #lisp
2020-05-01T22:53:36Z markasoftware: it's pretty fast if i do defvar instead of just setq
2020-05-01T22:53:47Z karayan quit (Ping timeout: 240 seconds)
2020-05-01T22:54:24Z White_Flame: yep, then it knows what you're talking about when you use the variable name
2020-05-01T22:54:38Z torbo quit (Ping timeout: 260 seconds)
2020-05-01T22:54:40Z White_Flame: instead of needing to be ultra generic with runtime tests
2020-05-01T22:54:40Z theseb joined #lisp
2020-05-01T22:55:22Z jonatack_ quit (Ping timeout: 246 seconds)
2020-05-01T22:56:12Z jonatack_ joined #lisp
2020-05-01T22:56:25Z theseb: Do macros simply lead to the reader making various text substitutions? I'm looking at simple macro examples and wondering..."Why can't those substitutions happen during the evaluation phase"?
2020-05-01T22:57:27Z theseb: e.g. I'm looking at a macro definition of "let"......it is a lambda expression....Could we effectively get "let" my coding it to equal the correct lambda expression w/o macros?
2020-05-01T22:57:29Z no-defun-allowed: Macroexpansion happens as a part of evaluation.
2020-05-01T22:58:16Z saturn2: i don't understand the question
2020-05-01T22:58:44Z torbo` quit (Remote host closed the connection)
2020-05-01T22:59:12Z torbo joined #lisp
2020-05-01T23:00:02Z xkapastel joined #lisp
2020-05-01T23:01:26Z _death: you are looking at a macro definition of "let" and finding a lambda expression?
2020-05-01T23:01:36Z _death: what lisp is this
2020-05-01T23:03:09Z vladomiro quit (Quit: Leaving)
2020-05-01T23:06:27Z MerlinTheWizard quit (Ping timeout: 240 seconds)
2020-05-01T23:07:54Z aeth: in theory (let ((a 42) (b 53) (c 64)) (values a b c)) is the same thing as ((lambda (a b c) (values a b c)) 42 53 64) although an implementation might choose a more efficient representation (for its particular architecture)
2020-05-01T23:08:31Z _death: (let ((&key 42)) &key)
2020-05-01T23:09:27Z aeth: _death: that can be solved by gensym
2020-05-01T23:09:55Z _death: (let ((&key 42)) (declare (special &key)) &key)
2020-05-01T23:09:56Z aeth: so it's really `((lambda (,a ,b ,c) (values ,a ,b ,c)) 42 53 64)
2020-05-01T23:10:13Z SGASAU joined #lisp
2020-05-01T23:10:31Z aeth: _death: that fails in SBCL
2020-05-01T23:10:42Z aeth: So my implementation could still work :-)
2020-05-01T23:11:01Z aeth: "Lock on package COMMON-LISP violated when declaring &KEY special while in package COMMON-LISP-USER."
2020-05-01T23:11:06Z _death: right
2020-05-01T23:11:46Z aeth: And, anyway, you'd only have to gensym the &key, &rest, etc.
2020-05-01T23:11:52Z _death: it cannot be solved by a gensym unless you walk the body
2020-05-01T23:12:05Z White_Flame: theseb: the macroexpansion is not part of the reader. It's the early part of the evaluator
2020-05-01T23:12:09Z aeth: _death: which an implementation is safe to do
2020-05-01T23:12:22Z aeth: _death: tree walkers are only problematic from our perspective, trying to write one that's not fragile. Implementations can cheat
2020-05-01T23:13:16Z decent-username quit (Ping timeout: 265 seconds)
2020-05-01T23:13:56Z _death: aeth: yeah.. I can't think of a theoretical limitation at the moment.. but theseb claims to have a concrete case
2020-05-01T23:14:37Z aeth: _death: (1) I'm not sure, since the line seems poorly phrased. (2) It could be a Scheme. Schemes love lambda.
2020-05-01T23:15:09Z aeth: (And a Scheme wouldn't need these workarounds)
2020-05-01T23:15:18Z _death: a scheme is offtopic
2020-05-01T23:15:50Z SGASAU quit (Remote host closed the connection)
2020-05-01T23:16:10Z _death: hence my question: what lisp is theseb talking about
2020-05-01T23:16:57Z SGASAU joined #lisp
2020-05-01T23:17:10Z aeth: it could be a pedagogical example, which probably wouldn't include handling complex edge cases like &key, and probably wouldn't care about performance, either
2020-05-01T23:18:23Z MerlinTheWizard joined #lisp
2020-05-01T23:18:44Z _death: in Common Lisp, LET is not a macro; it is a special operator (it's true that an implementation may provide a macro function for it as well)
2020-05-01T23:19:13Z Inline: let let let let let......
2020-05-01T23:19:46Z karswell_ quit (Read error: Connection reset by peer)
2020-05-01T23:19:58Z _death: so the answer to his question appears to be "yes"
2020-05-01T23:20:49Z aeth: and, anyway, even if the example let definition was Scheme, I don't see why it's off-topic because it also applies to CL and was asked in a CL context
2020-05-01T23:20:51Z ealfonso joined #lisp
2020-05-01T23:21:23Z aeth: but whether it was Scheme or just an example, you raise a valid complication for a naive implementation in CL.
2020-05-01T23:22:21Z aeth: Implementations could cheat in various ways that you can't, though, like with gensym, or even by having a lambda without the advanced lambda-list features.
2020-05-01T23:23:33Z aeth: (as e.g. %lambda)
2020-05-01T23:23:41Z _death: that's just saying LET can be implemented in some way
2020-05-01T23:24:11Z aeth: and, yeah, it can be implemented as a lambda expression, but doesn't have to be
2020-05-01T23:24:34Z aeth: And I think that's where the point of confusion is.
2020-05-01T23:24:43Z SGASAU quit (Ping timeout: 260 seconds)
2020-05-01T23:24:57Z aeth: Just because two things are equivalent, and the lambda is in some sense simpler, and you can define LET in terms of LAMBDA, doesn't mean that implementations actually do this, and they probably don't.
2020-05-01T23:25:25Z Inline: heh
2020-05-01T23:25:28Z Inline: lol
2020-05-01T23:25:55Z aeth: And unless the lambda is inline it's probably not the most efficient way to do it.
2020-05-01T23:26:59Z edgar-rft quit (Quit: Leaving)
2020-05-01T23:27:57Z aeth: So it really comes down to if the compiler is smart enough to inline such lambdas since they can't be declared inline.
2020-05-01T23:28:20Z aeth: And it still doesn't give you flet, labels, macrolet, or symbol-macrolet
2020-05-01T23:29:14Z random-nick quit (Ping timeout: 260 seconds)
2020-05-01T23:29:16Z aeth: Or even multiple-value-bind, since m-v-b inserts implicit NILs while multiple-value-call fails if something is too short.
2020-05-01T23:29:38Z Oladon joined #lisp
2020-05-01T23:29:42Z Lord_of_Life_ joined #lisp
2020-05-01T23:30:03Z aeth: (You could probably use &optional to get around that, but now you can't use a special %lambda that avoids the &rest, &optional, &key, etc., issue)
2020-05-01T23:30:39Z aeth: (I guess you could make an %lambda* that is always &optional)
2020-05-01T23:30:55Z edgar-rft joined #lisp
2020-05-01T23:31:44Z Lord_of_Life quit (Ping timeout: 256 seconds)
2020-05-01T23:32:31Z Lord_of_Life_ is now known as Lord_of_Life
2020-05-01T23:36:51Z theseb: _death, aeth: i wrote my own lisp + macro system....i guess it is scheme like....here is my let implementation ... https://pastebin.com/3a6CJ8f1
2020-05-01T23:37:13Z theseb: _death, aeth: somehow i forgot why macros are necessary
2020-05-01T23:37:24Z theseb: trying to retrain my brain
2020-05-01T23:38:04Z Xach: nothing is necessary but many things are handy
2020-05-01T23:39:26Z theseb: Xach: what is simplest macro that has funtionality that cannot be done w/o macro system? (for pedagogical reasons)
2020-05-01T23:40:09Z _death: a definition for such a macro was given here today
2020-05-01T23:40:31Z theseb: preferably one that uses , and ,@ for pedagogical reasons too
2020-05-01T23:40:36Z no-defun-allowed: (defmacro delay (thing) `(lambda () ,thing)) maybe
2020-05-01T23:40:39Z _death: [19:55] and it makes defmacro trivial to implement: (defmacro defmacro (name lambda-list &body body) `(defmacro ,name ,lambda-list ,@body))
2020-05-01T23:41:48Z theseb: i think i need to think on this more...i'm slow
2020-05-01T23:42:49Z _death: you can think of macros as a way to extend your interpreter..
2020-05-01T23:46:11Z jason_m quit (Ping timeout: 260 seconds)
2020-05-01T23:46:55Z _death: you can always integrate operators into your interpreter, but the point of macros is to allow ad-hoc extension without modification
2020-05-01T23:55:46Z aeth: most macros are just sugar, like having a LET defined in terms of LAMBDA instead of having to just use LAMBDA for everything
2020-05-01T23:56:36Z aeth: they can also be optimizations, though, since the function (infix '(1 + 1)) is possible just like the macro (infix (1 + 1)) or (infix 1 + 1) but the macro will do things at macroexpansion time instead of at runtime
2020-05-01T23:57:54Z aeth: with an interpreter it's not necessarily a performance win unless you do bytecode compilation, though
2020-05-01T23:58:39Z aeth: With a naive intrepreter, the macro will probably be slower than the function because there's some extra steps involved.
2020-05-01T23:58:42Z pjb: aeth: interpreters still have to do minimal compilation when you call compile.
2020-05-01T23:58:57Z pjb: aeth: most interpreter will only macroexpand once the macros, caching the result.
2020-05-01T23:59:08Z aeth: pjb: yes, but the context is writing a Lisp-like language in Common Lisp, not writing a Common Lisp
2020-05-01T23:59:18Z pjb: (I know of no interpreter that doesn't just expand everything at defun time).
2020-05-01T23:59:18Z aeth: (the context wasn't clear before)
2020-05-01T23:59:31Z pjb: aeth: in that case, you do however you want.
2020-05-02T00:00:03Z pjb: aeth: but I find easier to write interpreters, by writing a byte-code compiler and interpreting the byte code…
2020-05-02T00:00:19Z pjb: interpreting the source is crazy.
2020-05-02T00:00:33Z aeth: yes
2020-05-02T00:00:46Z aeth: Most interpreters are afaik either a register machine or a stack machine with bytecode as the thing that's interpreted.
2020-05-02T00:00:48Z pjb: It was an optimization on memory starved computers, and even, usually keywords were "byte-coded" anyways.
2020-05-02T00:01:02Z ayuce joined #lisp
2020-05-02T00:01:20Z jeosol joined #lisp
2020-05-02T00:04:11Z _death: I see "interpreter" in a very wide sense.. it is a program that takes an input :)
2020-05-02T00:04:39Z aeth: pjb: Even if you did source interpreting you could probably still do ahead-of-time macros by seeing macros as defining new primitives, I guess.
2020-05-02T00:04:40Z hsaziz joined #lisp
2020-05-02T00:05:35Z pilne joined #lisp
2020-05-02T00:05:54Z theseb: aeth: yes many macros are just sugar to generate lisp code automagically....the more interesting thing to me is that macros can make it appear you are giving lisp new abilities
2020-05-02T00:06:08Z aeth: infix macros are an example of that
2020-05-02T00:06:11Z aeth: (infix 1 + 1)
2020-05-02T00:06:22Z MerlinTheWizard quit (Ping timeout: 260 seconds)
2020-05-02T00:06:55Z aeth: Of course, that's boring, so I made a C++-style hello world in CL to demonstrate infix: https://gitlab.com/mbabich/lisp-hello-world
2020-05-02T00:07:26Z aeth: I even went further and made a reader macro #I(...) that translates to (infix ...)
2020-05-02T00:07:33Z karayan joined #lisp
2020-05-02T00:07:47Z aeth: With reader macros you could do true, full infix, though, and not just the s-expression hack
2020-05-02T00:10:07Z theseb: aeth: is this equivalent (defun infix (arg1 operator arg2) (operator arg1 arg2) ) ?
2020-05-02T00:10:21Z theseb: aeth: i just did it w/o macros?
2020-05-02T00:10:39Z theseb: aeth: then i can do (infix 3 * 7)
2020-05-02T00:10:52Z _death: aeth: it reminds me of an old hack.. https://gist.github.com/death/3673068498cbb6663010a67b0507319f
2020-05-02T00:12:03Z aeth: theseb: not quite, since my infix macro allows arbitrary length as long as they are the same operator (no attempt to teach it precedence) so you would necessarily have to cons up a list for that, either with &rest so you can do (infix 1 + 1 + 1) or with the syntax (infix '(1 + 1 + 1))
2020-05-02T00:12:20Z aeth: whereas the macro itself would just turn it into (+ 1 1 1) with no need to funcall/apply/whatever +
2020-05-02T00:12:58Z theseb: ok....thanks.
2020-05-02T00:13:04Z theseb: must be brain now
2020-05-02T00:13:07Z theseb quit (Quit: Leaving)
2020-05-02T00:15:36Z aeth: and iirc it's also recursive so (infix 1 + 1 + (2 * 3)) is possible.
2020-05-02T00:16:41Z Kevslinger quit (Quit: Connection closed for inactivity)
2020-05-02T00:20:13Z torbo quit (Remote host closed the connection)
2020-05-02T00:21:57Z kark quit (Quit: ZNC 1.7.5 - https://znc.in)
2020-05-02T00:27:44Z zaquest quit (Quit: Leaving)
2020-05-02T00:29:55Z hsaziz quit (Quit: hsaziz)
2020-05-02T00:30:05Z zaquest joined #lisp
2020-05-02T00:30:43Z red-dot joined #lisp
2020-05-02T00:33:19Z hsaziz joined #lisp
2020-05-02T00:33:35Z ahungry joined #lisp
2020-05-02T00:34:09Z hsaziz quit (Client Quit)
2020-05-02T00:36:56Z efm joined #lisp
2020-05-02T00:47:48Z Oladon quit (Quit: Leaving.)
2020-05-02T00:53:37Z lxbarbosa joined #lisp
2020-05-02T00:54:01Z lxbarbosa left #lisp
2020-05-02T00:54:44Z lxbarbosa joined #lisp
2020-05-02T00:57:13Z hsaziz joined #lisp
2020-05-02T00:57:16Z hsaziz quit (Client Quit)
2020-05-02T00:58:50Z jruiz quit (Ping timeout: 260 seconds)
2020-05-02T00:59:09Z rgherdt quit (Ping timeout: 272 seconds)
2020-05-02T01:00:04Z PuercoPope joined #lisp
2020-05-02T01:00:42Z PuercoPope is now known as PuercoPop
2020-05-02T01:02:44Z ayuce quit (Remote host closed the connection)
2020-05-02T01:05:14Z heeh joined #lisp
2020-05-02T01:05:18Z jruiz joined #lisp
2020-05-02T01:07:19Z bitmapper quit (Ping timeout: 246 seconds)
2020-05-02T01:07:56Z tessier joined #lisp
2020-05-02T01:07:57Z tessier quit (Changing host)
2020-05-02T01:07:57Z tessier joined #lisp
2020-05-02T01:15:47Z EvW quit (Ping timeout: 240 seconds)
2020-05-02T01:20:18Z lemoinem quit (Ping timeout: 260 seconds)
2020-05-02T01:20:32Z lemoinem joined #lisp
2020-05-02T01:24:29Z Inline quit (Ping timeout: 272 seconds)
2020-05-02T01:26:28Z asarch joined #lisp
2020-05-02T01:27:24Z renzhi_ joined #lisp
2020-05-02T01:27:52Z asarch: If (defparameter *values* '((food (pizza . 3) (beer . 5) (tacos . 8)))), the I can get the value of beers with: (cdr (assoc 'beer (cdr (car *values*))))
2020-05-02T01:28:03Z CrazyPython joined #lisp
2020-05-02T01:28:47Z asarch: But, what if (defparameter *values* '(("food" ("pizza" . "3") ("beer" . "5") ("tacos" . "8")))), how could I get that value?
2020-05-02T01:29:50Z asarch: (cdr (assoc "beer" (cdr (car *values*)))) => NIL
2020-05-02T01:31:06Z kark joined #lisp
2020-05-02T01:32:43Z madage quit (Ping timeout: 240 seconds)
2020-05-02T01:33:55Z no-defun-allowed: :test #'string=
2020-05-02T01:35:12Z asarch: (cdr (assoc "beer" (cdr (car *values*)) :test #'string=)) => "5"
2020-05-02T01:35:23Z asarch: Thank you!
2020-05-02T01:35:48Z madage joined #lisp
2020-05-02T01:39:08Z lxbarbosa quit (Remote host closed the connection)
2020-05-02T01:40:37Z iAmDecim joined #lisp
2020-05-02T01:44:50Z iAmDecim quit (Quit: WeeChat 2.7.1)
2020-05-02T01:47:48Z bleepcord joined #lisp
2020-05-02T01:49:47Z ayuce joined #lisp
2020-05-02T02:01:19Z ayuce quit (Remote host closed the connection)
2020-05-02T02:02:23Z efm quit (Remote host closed the connection)
2020-05-02T02:02:46Z efm joined #lisp
2020-05-02T02:02:58Z gko joined #lisp
2020-05-02T02:03:44Z slyrus_ joined #lisp
2020-05-02T02:03:45Z pjb quit (Ping timeout: 272 seconds)
2020-05-02T02:05:39Z bleepcord quit (Quit: WeeChat 2.8)
2020-05-02T02:06:12Z slyrus__ quit (Ping timeout: 256 seconds)
2020-05-02T02:15:14Z mono joined #lisp
2020-05-02T02:15:52Z jruiz quit (Ping timeout: 260 seconds)
2020-05-02T02:17:42Z monok quit (Ping timeout: 260 seconds)
2020-05-02T02:19:26Z dtman34 joined #lisp
2020-05-02T02:25:08Z pilne quit (Quit: I cna ytpe 300 wrods pre mniuet!!!)
2020-05-02T02:27:24Z dtman34 quit (Remote host closed the connection)
2020-05-02T02:27:39Z dtman34 joined #lisp
2020-05-02T02:27:56Z dtman34 quit (Remote host closed the connection)
2020-05-02T02:28:11Z Josh_2 quit (Ping timeout: 246 seconds)
2020-05-02T02:36:47Z CrazyPython quit
2020-05-02T02:37:23Z pjb joined #lisp
2020-05-02T02:49:59Z turona quit (Ping timeout: 272 seconds)
2020-05-02T02:51:00Z turona joined #lisp
2020-05-02T02:59:13Z heeh quit (Remote host closed the connection)
2020-05-02T03:17:20Z beach: Good morning everyone!
2020-05-02T03:31:42Z moon-child quit (Quit: ZNC 1.7.5 - https://znc.in)
2020-05-02T03:32:19Z westerns quit (Quit: Connection closed for inactivity)
2020-05-02T03:32:19Z beach: aeth: There is a case where LET can not be turned into a function form with a lambda expression as its operator. For example (let ((&rest 234)) (+ rest 345)) is not the same as ((lambda (&rest) (+ rest 345)) 234)
2020-05-02T03:33:11Z beach: aeth: And there are cases where it might be tough to inline the function, for example when there is an environment capture, like (let ((x 234)) (lambda (y) (+ x y)))
2020-05-02T03:33:43Z beach: aeth: I recommend you read up on how Common Lisp is compiled and how the run-time environment is represented.
2020-05-02T03:34:45Z pjb quit (Ping timeout: 265 seconds)
2020-05-02T03:35:57Z stepnem_ joined #lisp
2020-05-02T03:37:02Z moon-child joined #lisp
2020-05-02T03:37:06Z stepnem quit (Ping timeout: 256 seconds)
2020-05-02T03:39:52Z karayan quit (Ping timeout: 260 seconds)
2020-05-02T03:49:00Z Codaraxis quit (Remote host closed the connection)
2020-05-02T03:49:30Z Codaraxis joined #lisp
2020-05-02T03:51:45Z parjanya joined #lisp
2020-05-02T03:51:51Z parjanya quit (Remote host closed the connection)
2020-05-02T03:52:23Z parjanya joined #lisp
2020-05-02T03:53:42Z KDr22 joined #lisp
2020-05-02T03:54:58Z KDr21 quit (Ping timeout: 246 seconds)
2020-05-02T03:55:23Z MerlinTheWizard joined #lisp
2020-05-02T03:57:04Z EvW1 joined #lisp
2020-05-02T03:57:24Z westerns joined #lisp
2020-05-02T04:02:59Z parjanya left #lisp
2020-05-02T04:09:04Z karlosz quit (Quit: karlosz)
2020-05-02T04:09:23Z karlosz joined #lisp
2020-05-02T04:11:40Z gabiruh quit (Ping timeout: 256 seconds)
2020-05-02T04:11:45Z jruiz joined #lisp
2020-05-02T04:12:09Z pjb joined #lisp
2020-05-02T04:12:19Z ArthurStrong quit (Quit: leaving)
2020-05-02T04:16:19Z jruiz quit (Ping timeout: 246 seconds)
2020-05-02T04:20:49Z jruiz joined #lisp
2020-05-02T04:25:14Z shifty joined #lisp
2020-05-02T04:25:57Z MerlinTheWizard quit (Ping timeout: 260 seconds)
2020-05-02T04:29:59Z ayuce joined #lisp
2020-05-02T04:31:08Z MerlinTheWizard joined #lisp
2020-05-02T04:33:34Z renzhi_ quit (Ping timeout: 240 seconds)
2020-05-02T04:35:17Z EvW1 quit (Ping timeout: 260 seconds)
2020-05-02T04:40:03Z Oladon joined #lisp
2020-05-02T04:40:58Z Codaraxis quit (Remote host closed the connection)
2020-05-02T04:41:23Z Codaraxis joined #lisp
2020-05-02T04:43:39Z gabiruh joined #lisp
2020-05-02T04:46:32Z hsaziz joined #lisp
2020-05-02T04:47:15Z hsaziz quit (Client Quit)
2020-05-02T04:47:24Z vivit quit (Quit: WeeChat 1.9.1)
2020-05-02T04:51:38Z ayuce quit (Remote host closed the connection)
2020-05-02T04:54:13Z jruiz quit (Ping timeout: 264 seconds)
2020-05-02T04:58:02Z gabiruh quit (Ping timeout: 260 seconds)
2020-05-02T05:05:30Z Necktwi joined #lisp
2020-05-02T05:08:42Z Bike quit (Quit: Lost terminal)
2020-05-02T05:09:08Z gabiruh joined #lisp
2020-05-02T05:09:11Z slyrus__ joined #lisp
2020-05-02T05:09:42Z MerlinTheWizard quit (Ping timeout: 260 seconds)
2020-05-02T05:11:33Z slyrus_ quit (Ping timeout: 258 seconds)
2020-05-02T05:16:15Z pjb quit (Ping timeout: 265 seconds)
2020-05-02T05:18:42Z MerlinTheWizard joined #lisp
2020-05-02T05:19:42Z xkapastel quit (Quit: Connection closed for inactivity)
2020-05-02T05:26:51Z hsaziz joined #lisp
2020-05-02T05:27:43Z karayan joined #lisp
2020-05-02T05:29:50Z karayan quit (Read error: Connection reset by peer)
2020-05-02T05:30:47Z asarch: If I have: (let ((text "Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor\nincididunt ut labore et\ndolore magnaaliqua.")) ...), how could I remove all the '\n' from the string?
2020-05-02T05:31:06Z karayan joined #lisp
2020-05-02T05:31:47Z phoe: either cl-ppcre:regex-replace-all
2020-05-02T05:32:07Z phoe: or replace-all from https://lispcookbook.github.io/cl-cookbook/strings.html#manipulating-parts-of-a-string
2020-05-02T05:33:03Z asarch: Thank you!!
2020-05-02T05:33:11Z asarch: Thank you very much! :-)
2020-05-02T05:33:27Z markasoftware: does (remove) not work for \n?
2020-05-02T05:34:57Z phoe: oh
2020-05-02T05:35:08Z markasoftware: well i guess it depends on if they are literal "\n" or an actual newline
2020-05-02T05:35:10Z phoe: asarch: "\n" only has length 1
2020-05-02T05:35:22Z phoe: (length "\n") ;=> 1
2020-05-02T05:35:40Z phoe: you will want to escape the backslashes if you want to have actual backslashes in your strings
2020-05-02T05:35:50Z phoe: that is a source of bugs in Lisp strings
2020-05-02T05:36:08Z phoe: so, "Lorem ipsum\\ndolor sit amet\\nconsectetur ..."
2020-05-02T05:36:27Z phoe: markasoftware: remove doesn't work for multi-character sequences
2020-05-02T05:36:32Z markasoftware: Is there any reason to distinguish between functions and lists as datatypes, apart from performance? I.e, you could have a lisp where a function is just whenever you put a list, which represents a function body, at the beginning of a list?
2020-05-02T05:36:49Z phoe: markasoftware: what do you mean, functions and lists as datatypes
2020-05-02T05:37:01Z asarch: The code actually is for remove the '\r' of the end of the line
2020-05-02T05:37:05Z phoe: they're distinct types, and a function isn't really a datatype
2020-05-02T05:37:23Z phoe: asarch: ooh, clrf conversion
2020-05-02T05:37:52Z asarch: Where is that function?
2020-05-02T05:38:23Z phoe: asarch: which function?
2020-05-02T05:38:29Z asarch: clrf
2020-05-02T05:38:40Z phoe: uhhh, did I mention there is such a function
2020-05-02T05:38:46Z asarch: D'oh!
2020-05-02T05:38:48Z asarch: Sorry
2020-05-02T05:39:13Z asarch: The text inserted into the model has that end of line: '\r'
2020-05-02T05:39:35Z phoe: yes, that's Windows injecting its poison
2020-05-02T05:39:48Z phoe: also s/clrf/crlf/
2020-05-02T05:39:49Z Oladon quit (Quit: Leaving.)
2020-05-02T05:39:51Z asarch: I just want to remove them before insert them
2020-05-02T05:40:04Z Fare quit (Ping timeout: 256 seconds)
2020-05-02T05:40:30Z no-defun-allowed: markasoftware: Closures would require functions to carry around information other than their lambda forms.
2020-05-02T05:40:34Z asarch: Can I use cl-ppcre:regex-replace-all for that?
2020-05-02T05:40:40Z phoe: well then, replace all occurrences of (string #\Return) with ""
2020-05-02T05:40:41Z phoe: yes
2020-05-02T05:41:04Z asarch: Ok
2020-05-02T05:41:17Z asarch: Thank you very much once again :-)
2020-05-02T05:43:14Z beach: markasoftware: What would you put in a list to represent a function?
2020-05-02T05:43:29Z markasoftware: it's body, though no-defun-allowed makes a good point about closures
2020-05-02T05:43:41Z beach: OK.
2020-05-02T05:43:46Z markasoftware: and idk about lambda list either
2020-05-02T05:43:48Z phoe: but then you just have a list of symbols, lists, and everything
2020-05-02T05:43:59Z phoe: it's not code, you can't really execute it
2020-05-02T05:44:10Z markasoftware: the interpreter can execute it
2020-05-02T05:44:10Z karlosz quit (Quit: karlosz)
2020-05-02T05:44:22Z markasoftware: because at some point it's going to just be built-in functions
2020-05-02T05:44:37Z karlosz joined #lisp
2020-05-02T05:44:39Z beach: markasoftware: In a language like Common Lisp with closures, a function needs to be represedetn by two items: code and a static environment.
2020-05-02T05:45:11Z phoe: but there's either overhead associated with compilation or overhead associated with interpreting that form
2020-05-02T05:45:14Z beach: markasoftware: Closure conversion turns nested functions into global functions represented as such a pair.
2020-05-02T05:45:17Z karayan quit (Read error: Connection reset by peer)
2020-05-02T05:45:22Z phoe: neither will be faster than calling a pre-compiled function
2020-05-02T05:45:45Z markasoftware: yeah i agree, i understand the performance reasons for making functions their own format
2020-05-02T05:46:42Z phoe: also, if you simply splice function bodies inside, you will have trouble figuring out what is code and what is data
2020-05-02T05:47:19Z phoe: the distinction between (+ x y) and '(+ x y) is clear because of quoting
2020-05-02T05:47:23Z beach: markasoftware: But as long as you have those two components, the code part can be anything. For example, in SICL bootstrapping the code part is basically an instruction graph (HIR) that is interpreted by a HIR interpreter.
2020-05-02T05:48:47Z ahungry quit (Ping timeout: 260 seconds)
2020-05-02T05:48:55Z karayan joined #lisp
2020-05-02T05:53:28Z karayan quit (Read error: Connection reset by peer)
2020-05-02T05:53:54Z kamid quit (Quit: WeeChat 2.7.1)
2020-05-02T05:54:15Z karayan joined #lisp
2020-05-02T06:00:29Z aeth: beach: yes, that &rest is the same as _death's example of &key afaik
2020-05-02T06:00:42Z beach: Oh, I missed that. Sorry.
2020-05-02T06:00:52Z aeth: beach: your second example is a new point, though
2020-05-02T06:01:20Z aeth: I think the implementation would have to special case that, or accept a slight performance loss there
2020-05-02T06:02:12Z MerlinTheWizard quit (Ping timeout: 260 seconds)
2020-05-02T06:02:16Z vlatkoB joined #lisp
2020-05-02T06:02:21Z aeth: beach: I think the first example can be resolved by having a %lambda that doesn't recognize &rest, &key, &optional, &aux, etc., since we're talking about implementations implementing CL and they can cheat like that, but I'm not sure that would be worth it
2020-05-02T06:02:23Z beach: There is no special case. You "just" do an "escape analysis" to see whether there is a chance that the environment may be captured.
2020-05-02T06:03:34Z bacterio quit (Ping timeout: 260 seconds)
2020-05-02T06:06:41Z karayan quit (Read error: Connection reset by peer)
2020-05-02T06:07:12Z karayan joined #lisp
2020-05-02T06:08:33Z gravicappa joined #lisp
2020-05-02T06:09:23Z bacterio joined #lisp
2020-05-02T06:11:32Z karayan quit (Ping timeout: 260 seconds)
2020-05-02T06:12:24Z karayan joined #lisp
2020-05-02T06:17:30Z gabiruh quit (Quit: ZNC 1.7.5 - https://znc.in)
2020-05-02T06:17:47Z gabiruh joined #lisp
2020-05-02T06:18:57Z _paul0 joined #lisp
2020-05-02T06:21:56Z MerlinTheWizard joined #lisp
2020-05-02T06:22:09Z paul0 quit (Ping timeout: 272 seconds)
2020-05-02T06:27:14Z karayan quit (Read error: Connection reset by peer)
2020-05-02T06:27:50Z karayan joined #lisp
2020-05-02T06:27:53Z beach: aeth: If you make LET a special case, then you are either going to miss out on inlining other functions (subject to capture), or you are going to have duplicate code; one instance for LET and another on for other functions.
2020-05-02T06:28:10Z beach: In the latter case, you have a maintenance problem.
2020-05-02T06:28:28Z beach: In the former case, you have a performance problem.
2020-05-02T06:30:55Z phoe: it is nice to learn that Common Lisp has five ARITHMETIC-ERROR subtypes to account for five IEEE floating point exception types
2020-05-02T06:31:47Z karayan quit (Ping timeout: 240 seconds)
2020-05-02T06:32:36Z beach: aeth: One main trick in compiler design is to reduce special constructs to some general problem, provided of course that you then have a way of handling the general problem. An example is looping constructs. If you handle them specially, you are going to miss out on someone writing a loop using TAGBODY. So the trick here is to discover loops in the intermediate code, no matter the origin in source code, and then process those loops
2020-05-02T06:32:36Z beach: with some general technique.
2020-05-02T06:33:14Z karayan joined #lisp
2020-05-02T06:35:59Z beach: In this case, discovering loops in intermediate code is one of many techniques in "control-flow analysis" which is part of compiler design.
2020-05-02T06:36:24Z karayan quit (Read error: Connection reset by peer)
2020-05-02T06:36:35Z karayan joined #lisp
2020-05-02T06:37:02Z asarch: It seems that CL-DBI is actually inserting the '\r' into the model
2020-05-02T06:37:51Z beach: asarch: As people pointed out, C escapes like \r and \n don't mean the same thing in Common Lisp.
2020-05-02T06:38:13Z asarch: I mean, the #\r character
2020-05-02T06:38:48Z beach: asarch: Then that's just the character r, with no backslash.
2020-05-02T06:39:47Z asarch: "READ error during COMPILE-FILE: radix missing in #R"
2020-05-02T06:39:48Z beach: asarch: And if so, you do not want to remove it.
2020-05-02T06:39:57Z phoe: asarch: wait, what
2020-05-02T06:40:03Z phoe: what file are you trying to read
2020-05-02T06:40:03Z asarch: (replace #r *text*)
2020-05-02T06:40:04Z beach: asarch: Because you would remove all the r characters.
2020-05-02T06:40:12Z phoe: asarch: #r is invalid syntax
2020-05-02T06:40:25Z beach: asarch: Try to understand what you are being told.
2020-05-02T06:40:48Z asarch: Lorem ipsum dolor sit amet,\r
2020-05-02T06:41:01Z asarch: consectetur adipiscing elit,\r
2020-05-02T06:41:09Z beach: asarch: That is not Common Lisp syntax, or if it is, there is no backslash nor a return in that string.
2020-05-02T06:41:12Z asarch: Etc. All the \r at the end of lines
2020-05-02T06:41:19Z beach: asarch: STOP IT.
2020-05-02T06:41:30Z karayan quit (Ping timeout: 272 seconds)
2020-05-02T06:41:31Z beach: asarch: There is no such thing as \r in Common Lisp strings.
2020-05-02T06:41:41Z asarch: Wow!
2020-05-02T06:41:47Z phoe: beach: "Lorem ipsum dolor sit amet,\\r"
2020-05-02T06:41:49Z beach: asarch: I mean, there could be a backslash followed by the letter r.
2020-05-02T06:42:01Z phoe: I understand that this is what asarch is getting
2020-05-02T06:42:03Z saturn2: asarch: you want #\Return
2020-05-02T06:42:04Z beach: asarch: But then that is two letters.
2020-05-02T06:42:36Z karayan joined #lisp
2020-05-02T06:42:41Z beach: asarch: So do you have #\Return characters in your string, or do you have backslashes, or just `r's?
2020-05-02T06:42:48Z phoe: asarch: could you paste some of the REPL input/output that shows the strings being printed?
2020-05-02T06:42:58Z phoe: use a pastebin for that
2020-05-02T06:43:00Z asarch: The text data comes from a