jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
dino_tutter has quit [Ping timeout: 246 seconds]
donleo has quit [Ping timeout: 264 seconds]
Inline has joined #commonlisp
notzmv has quit [Ping timeout: 255 seconds]
dnhester has quit [Ping timeout: 255 seconds]
shka has quit [Ping timeout: 255 seconds]
<thuna`> Figured it out, sheesh. *OUTPUT-TRANSLATIONS* has the initial compile directory, so all compilations end up checking that location, and when that location doesn't exist TRUENAME etc. ends up signalling an error. If you do ASDF/OUTPUT-TRANSLATIONS/DISABLE-OUTPUT-TRANSLATIONS, that fixes the problem.
<Inline> yes
<Inline> it's .cache/common-lisp/blah usualyy
<holycow> neat. thuna`, what are you trying to do with stumpwm? i use it as well, just curious
<thuna`> holycow: Just trying to get it to work at all
<holycow> oh interesting. you can compile but not get it to run?
<thuna`> holycow: No, I can get it to run, but I'm compiling it through gentoo's emerge which compiles it in a temporary directory so all asdf/ql/load-module calls were broken
<Inline> (asdf:initialize-output-translations
<Inline> `(:output-translations
<Inline> #.(let ((wild-subdir
<Inline> (make-pathname :directory '(:relative :wild-inferiors)))
<Inline> (wild-file
<Inline> (make-pathname :name :wild :version :wild :type :wild)))
<Inline> `((:root ,wild-subdir ,wild-file)
<Inline> (:user-cache ,wild-subdir ,wild-file)))
<Inline> :inherit-configuration))
<Inline> it's all wild
<holycow> lol
<Inline> very wild
<Inline> lol
tyson2 has quit [Remote host closed the connection]
<thuna`> Only after realizing I could do TRACE from within the image did I make any progress at all. Praise be!
<Inline> so each thing gets reflected in the user cache dir
tyson2 has joined #commonlisp
<Inline> i think it took a few days until i realized the above passage somehow
<Inline> reading the asdf page gave some hints but was not the full answer
<thuna`> It's quite mean too; the function is in a variable and the variable is funcalled, so that was essentially the last thing I checked
<Inline> eh
<Inline> most symbols have a symbol-function slot
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<thuna`> I'm talking about (setf *variable* 'foo)
<thuna`> Well, I'm done for the day. Bye o/
<Inline> bye
thuna` has quit [Remote host closed the connection]
dra has quit [Ping timeout: 256 seconds]
NotThatRPG has joined #commonlisp
dnhester has joined #commonlisp
NotThatRPG has quit [Client Quit]
dnhester has quit [Ping timeout: 264 seconds]
Inline has quit [Quit: Leaving]
tyson2 has quit [Remote host closed the connection]
jonatack has joined #commonlisp
dnhester has joined #commonlisp
alcor has quit [Remote host closed the connection]
dnhester has quit [Ping timeout: 268 seconds]
dtman34 has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
dtman34 has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 264 seconds]
bilegeek__ has joined #commonlisp
bilegeek has quit [Ping timeout: 256 seconds]
dnhester has joined #commonlisp
bilegeek__ has quit [Ping timeout: 260 seconds]
dnhester has quit [Ping timeout: 264 seconds]
NotThatRPG has joined #commonlisp
Inline has joined #commonlisp
bilegeek__ has joined #commonlisp
dnhester has joined #commonlisp
dnhester has quit [Ping timeout: 264 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 264 seconds]
Lord_of_Life_ is now known as Lord_of_Life
mm007emko has quit [Remote host closed the connection]
mm007emko has joined #commonlisp
akoana has quit [Quit: leaving]
tyson2 has joined #commonlisp
occ has joined #commonlisp
notzmv has joined #commonlisp
Inline has quit [Quit: Leaving]
tyson2 has quit [Remote host closed the connection]
ymir has joined #commonlisp
random-nick has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
FragmentedCurve has joined #commonlisp
occ has quit [Ping timeout: 260 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
dnhester has joined #commonlisp
dnhester has quit [Ping timeout: 255 seconds]
istewart has quit [Quit: Konversation terminated!]
istewart has joined #commonlisp
dnhester has joined #commonlisp
josrr has quit [Remote host closed the connection]
dnhester has quit [Ping timeout: 264 seconds]
occ has joined #commonlisp
occ has quit [Ping timeout: 272 seconds]
occ has joined #commonlisp
bilegeek__ has quit [Quit: Leaving]
ymir has quit [Ping timeout: 256 seconds]
rtypo has quit [Ping timeout: 264 seconds]
igemnace has joined #commonlisp
traidare has joined #commonlisp
dnhester has joined #commonlisp
dnhester has quit [Ping timeout: 272 seconds]
chomwitt has quit [Ping timeout: 240 seconds]
kenran has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
Guest99 has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
occ has quit [Read error: Connection reset by peer]
Guest99 has quit [Quit: Textual IRC Client: www.textualapp.com]
dcb has quit [Quit: Connection closed for inactivity]
dcb has joined #commonlisp
wacki has joined #commonlisp
azimut has quit [Ping timeout: 260 seconds]
dnhester has joined #commonlisp
dnhester has quit [Ping timeout: 264 seconds]
traidare has quit [Ping timeout: 264 seconds]
traidare has joined #commonlisp
shka has joined #commonlisp
dnhester has joined #commonlisp
pve has joined #commonlisp
alcor has joined #commonlisp
rgherdt has joined #commonlisp
<chsasank> what is the equivalent of tail recursion in CL?
<beach> What do you mean by "equivalent"?
<chsasank> a construct where I can 'rewrite' variables
<beach> Tail recursion is the same in any language, but the Common Lisp standard does not guarantee that tail recursion (or tail calls in general) is optimized.
<chsasank> sort of this in C: for (int i = 0; i < n; i++) max = a[i] > max? a[i] : max
<beach> You can do the same in Common Lisp with LOOP.
<chsasank> ok, use setf?
<beach> You can do that, sure. That's the equivalent of = in C.
<chsasank> yes but don't wanna do that unless I have to
<beach> How about you tell us what you want to do, and we'll see whether we can help.
<chsasank> context: I am writing a compiler in CL. Wrote an interpreter first.
Bubblegumdrop_ has joined #commonlisp
<chsasank> Now writing a compiler that just generates common lisp functions directly
<aeth> you may want TAGBODY and GO
<aeth> if you're working at the low level
<beach> chsasank: I meant what are you trying to do for which you want to rewrite variables? And why do you want to avoid SETF?
<chsasank> I'll checkout tagbody/go - sounds pretty much what I want
Bubblegumdrop has quit [Ping timeout: 272 seconds]
<aeth> but you can't avoid SETF/SETQ if you do
<chsasank> so if I use setf now, that's another construct I have to lower further
<aeth> you may be able to play around with LAMBDAs to avoid setting
<aeth> LET is conceptually built on top of LAMBDA
<beach> By the way, your C example is in no way an example of tail recursion.
<chsasank> yeah it's kinda the same thing IMO
<aeth> ,(let ((x 42) (y 43)) (values x y)) ,((lambda (x y) (values x y)) 42 43)
<ixelp> (let ((x 42) (y 43)) (values x y)) => 42; 43, and then ((lambda (x y) (values x y)) 42 43) => 42; 43
<chsasank> I have been documenting what I am doing here: https://chsasank.com/llama.lisp/dev/compiler.html#immediate-goal-compile-to-lisp
<ixelp> Compiler and Runtime | Llama.lisp
<chsasank> I am trying to minimize the 'names' and
<chsasank> 'language constructs'
<chsasank> because I will need to lower this further to assembly later
<chsasank> a subset of common lisp right now is sort of like my IR
<beach> SETF gets expanded to SETQ, and that's trivial in assembler.
<chsasank> I mean for me setf and setq are the same because I will just parse setf directly
<beach> So why do you want to avoid it if it is trivial?
<chsasank> yeah I guess you're right
<chsasank> just add setf I guess
<chsasank> but then I am not functional no more :(
<aeth> if you want to be functional, you need to think in lambdas
<beach> Your C example was not functional either, so it is hard to understand what you want.
<chsasank> ok lemme make my objective clear: name as less as possible (that includes variables in lambdas)
<chsasank> In my language there are no variables
<aeth> well, you can just generate it in a macro and name it (gensym) and that doesn't really count
<aeth> whether you're SETFing it or having it as a variable in a lambda
<White_Flame> is there a description of your language somewhere?
<chsasank> what I am implementing is `comp` or composition
<chsasank> White_Flame: yes, it's in this paper: https://dl.acm.org/doi/pdf/10.1145/359576.359579
<aeth> if it's the same language as brought up in #scheme it's Backus's FP
<White_Flame> ah
<aeth> appears to be so based on the links
<chsasank> yes it's the same
<aeth> but functional programming ultimately has to become imperative at some point because you're running it on real hardware that works that way
<chsasank> correct it's unavoidable
<White_Flame> unless you just translate it into functional-style CL
<White_Flame> and let the CL compiler take care of it all :-P
<chsasank> but trying to minimize as much as possible
<aeth> and (gensym)s are really not much different than when you have to get down to registers eventually (though CL can do this entirely for you)
<chsasank> White_Flame: I want to get this to run on GPUs. CL doesn't support GPUs
<White_Flame> languages in generally really don't support GPUs. But there's people doing cool GPU stuff with CL
<chsasank> what is gensym
<chsasank> ah creating temporary variable
<chsasank> I mean temp symbol
<aeth> chsasank: yes, you say you don't like lambda because you don't want to name things, but e.g. ,(macrolet ((foo () (let ((g (gensym))) `(lambda (,g) (+ ,g ,g))))) (funcall (foo) 42))
<ixelp> (macrolet ((foo () (let ((g (gensym))) `(lambda (,g) (+ ,g ,g))))) (funcall (foo) 42)) => 84
<chsasank> let is pseudo banned :P
<aeth> the LET is at a different time
<chsasank> I am not able to honestly explain myself better
<aeth> maybe this is clearer: ,(let ((g (gensym))) (eval `((lambda (,g) (+ ,g ,g)) 42)))
<ixelp> (let ((g (gensym))) (eval `((lambda (,g) (+ ,g ,g)) 42))) => 84
<aeth> except you're writing your own eval
defaultxr has quit [Quit: bbiab]
<chsasank> got it let is at compile time
<chsasank> there is reduce btw
<chsasank> that's how I implement comp during interpretation
<chsasank> but that requires to have lambda again :(
<aeth> there are two equivalent approaches that I'm aware of... you can build everything on top of tagbody+go (CL) or on top of lambda (Scheme)... these are equivalent because you can implement a lambda first
<chsasank> hey wait I think I know what to do
<chsasank> I know my functions at compile time
donleo has joined #commonlisp
<chsasank> ok I am confused
X-Scale has joined #commonlisp
<aeth> well, not entirely equivalent because the closures here evaluate to 9 8 7 6 5 4 3 2 1 0 in Scheme but 10 10s in CL... ,(do ((x 0 (+ x 1)) (l '() (cons (lambda () x) l))) ((>= x 10) l))
<ixelp> (do ((x 0 (+ x 1)) (l '() (cons[...]) => (#<COMPILED-LEXICAL-CLOSURE #x1440F31E> #<COMPILED-LEXICAL-CLOSURE #x1440F346> #<COMPILED-LEXICAL-CLOSURE #x1440F36E> #<COMPILED-LEXICAL-CLOSURE #x1440F396> #<COMPILED-LEXICAL-CLOSURE #x1440F3BE> #<COMPILED-LEXICAL-CLOSURE #x1440F3E6> #<COMPILED-LEXICAL-CLOSURE #x1440F40E> #<COMPILED-LEXICAL-CLOSURE #x1440F436> #<COMPILED-LEXICAL-CLOSURE #x1440F45E> #<COMPILED-LEXICAL-CLOSURE #x1440F486>)
<aeth> before someone brings that up
<aeth> e.g. ,(funcall (cadr (do ((x 0 (+ x 1)) (l '() (cons (lambda () x) l))) ((>= x 10) l))))
<ixelp> (funcall (cadr (do ((x 0 (+ x 1)) (l '() (cons (lambda () x) l))) ((>= x 10) l)))) => 10
<aeth> this is entirely irrelevant, but this is IRC so if you don't bring up the exception to a generalization, you get poked about it within 16 hours
<chsasank> aeth: have a look at this file: (defun alpha (fn)
dcb has quit [Quit: Connection closed for inactivity]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
<aeth> first of all, I love the yak shave that the repo name implies this is
<chsasank> In my code gen, I assumed in means input to a code-gen. For example, check this out: (defun add () '(+ (first inp) (second inp)))
<chsasank> aeth: didn't get what you mean
<ixelp> yak shaving - Wiktionary, the free dictionary
<aeth> you set out to do one thing and before you know it you're writing a language. The most famous of these is probably TeX.
<chsasank> haha sure
Bubblegumdrop_ is now known as Bubblegumdrop
<chsasank> that's pretty much how things have been progressing so far
<aeth> what's inp, a global?
<chsasank> no, it's actually assigned by 'runtime'
<aeth> in CL, lexically scoped variables always have *earmuffs*
<aeth> s/lexically/dynamically/
<aeth> exactly the opposite of what I say sometimes when it's late
<aeth> chsasank: so alpha calls f on all elements of the array? conceptually, that's just map in CL, isn't it?
<chsasank> yes it's the same more or less
<chsasank> so I had to create intermediate variable to send input to list
<chsasank> I didn't like that, but I guess I can't do better
<aeth> it looks like it could be something like `(mapcar (lambda (*input*) ,(code-gen fn)) *input*) with no need to define the intermediate xi like the loop based approach
<chsasank> having lambda is same as let
<chsasank> (I have no closures etc)
<chsasank> I added let here because I want to make it very explicit so that I can work on it later
<aeth> so the quasiquoted stuff are your language? easier to do something like mapcar than try to implement loop
<aeth> or dolist
<aeth> you could do a dolist
<aeth> if you're generating a language, you should define a package in defpackage that has (:use) instead of (:use #:cl) because it's undefined behavior to not include a (:use) line at all and it might implicitly use CL if you don't include a (:use) line...
<chsasank> right now I am using common lisp as my IR
<aeth> then when you're generating it you can make it something like your-language:nth or your-language:let so you don't confuse it with cl:nth or cl:let and when you actually use the final result, that can choose to in-package that package instead of CL. But you'll want to (:import-from #:cl #:defpackage #:function #:in-package #:nil #:quote)
<chsasank> once I write compiler to common lisp, idea is to explicitly make them my IR
<chsasank> like you say here
<aeth> so you can define packages and enter packages without worrying about which ones use CL or not, and because #'foo is (cl:function foo) and because 'foo is (cl:quote foo) and because '() is nil so those three symbols are special
<aeth> but you want to make a LET even if your final language never directly uses it except for gensyms that you generate in CL itself
<aeth> it just makes things so much easier
<aeth> LET and LET*
<aeth> and, yes, the GPU gives you enough to define your own LET and LET*
<chsasank> what I am doing is: instead of compiling to x86, I am compiling to common lisp to get started
<chsasank> I am thinking carefully about all the CL stuff I am using right now
<chsasank> so that I can actually replace that with x86 code
<aeth> what I mean is, what you want is something like this: ,(defpackage #:your-language (:use) (:import-from #:cl #:defpackage #:function #:in-package #:nil #:quote) (:export #| your stuff here |#))
<ixelp> (defpackage #:your-language (:use) (:import-from #:cl #:defpackage #:function #:in-package #:nil #:quote) (:export #| your stuff here |#)) => #<Package "YOUR-LANGUAGE">
<chsasank> sure but I am no where close to packaging rn
<aeth> it's not really packaging (those are ASDF systems), it's just namespacing
<aeth> so you know what's real CL and what's fake-CL
<chsasank> yeah understood
<chsasank> hey this is real CL!
<chsasank> I am generating *CL*
<aeth> where your-language:let (again, even if your-language is in turn an intermediate language that the final language has no access to!) is distinguished from cl:let
<aeth> well, you don't intend to generate CL at the very end because you want to compile it
<aeth> if you want to, temporarily, use cl:let then you can make your-language:let the same as cl:let temporarily
<chsasank> I am hoping this exercise of compiling to common lisp will enable to design the intermediate representation
<aeth> the intermediate representation can be a not-CL
<aeth> that is to say, you can have a LET and a LET* if you want
<chsasank> I don't want to have :P
<aeth> your final language won't, no, but we're talking about an intermediate one
<aeth> where LET and LET* are conceptually just scopes
<aeth> scopes of variables that you want to be entirely implicit, but still there
<chsasank> correct I wanna keep it implicit until the last step
<aeth> basically you can have CL:GENSYM generate intermediate implicit variables that go to YOUR-INTERMEDIATE-LANGUAGE:LET* which is what your language that doesn't have named variables is generated to actually use under the hood
<ixelp> From function level semantics to program transformation and optimization | SpringerLink
<chsasank> cl:gensym is a good idea
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
<chsasank> see section 5 in the paper
<aeth> your intermediate language is going to want to have a LET* because that's going to more or less map to the intermediate or assembly language that you generate from that LET* except LET* has the addition of scopes, which is useful, because things out of scope just plain can't be seen
<aeth> nested scopes even
<chsasank> sort of like SSA hmmmm
<aeth> exactly like SSA... the things bound in a low-level LET* are SSA IDs
<aeth> so you can name them
<aeth> for instance, if you're iterating, you can ,(gensym "I")
<ixelp> (gensym "I") => #:I1
<aeth> and now you kind of know what's going on if you ever have to look at the generated Lispy IL
<chsasank> got it! got it!
<aeth> though technically I don't bind SSA IDs in my LET/LET*, I bind an object that will later be given a numeric ID, and that also contains associated type information because SPIR-V has that most of the time.
monospod has joined #commonlisp
<aeth> though technically, language types may be richer than SPIR-V types so that's something else that may need to be part of that object... but this sort of thing just grows from the simplest implementation as things are encountered and I haven't gotten that far
d4ryus has quit [Ping timeout: 264 seconds]
Mon_Ouie has quit [Ping timeout: 264 seconds]
<chsasank> I am just using (setf inp (code-gen inp)) for now and completing this step.
<chsasank> I think this is probably the most important thing for my IR
<chsasank> I need to think more
Mon_Ouie has joined #commonlisp
dino_tutter has joined #commonlisp
occ has joined #commonlisp
<Mon_Ouie> So speaking of generating SPIR-V from CL… what are ways that a compiler for an internal DSL in CL can access source info to generate debug symbols? (both the location of a form + actual source as a string)
dnhester has quit [Ping timeout: 264 seconds]
mzan has joined #commonlisp
<paulapatience> beah: "those implementations" (plural) near the end of the WSCL issue
dnhester has joined #commonlisp
dnhester has quit [Ping timeout: 256 seconds]
random-nick has joined #commonlisp
<paulapatience> beach rather
<beach> Thanks!
igemnace has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
<beach> Mon_Ouie: The way I do it for SICL is that I wrap the input stream in a Gray stream that and then I use Eclector to produce CSTs instead of S-expressions. And the CSTs contain the entire file as a list of strings, and the start and end position of the expression read.
<beach> Mon_Ouie: Then, I propagate that source information to ASTs, and to intermediate representation.
dnhester has joined #commonlisp
<beach> Mon_Ouie: So it doesn't really matter what the initial source is; it could be code in a DSL. When there is an error, or when you want to set a breakpoint, it is all in terms of the initial source location.
dnhester has quit [Remote host closed the connection]
dnhester has joined #commonlisp
<beach> ... so it looks like this: http://metamodular.com/sicl-debugging.png
igemnace has joined #commonlisp
<beach> There are currently many stack entries without source information, because I sometimes forget places to propagate source information. I will fix that in the future.
<chsasank> If I can disassemble in SBCL, can I do assemble in SBCL too? https://www.reddit.com/r/Common_Lisp/comments/sli7fc/could_someone_explain_this_compiled_sbcl_code/
<ixelp> Could someone explain this compiled SBCL code? : Common_Lisp
Inline has joined #commonlisp
<paulapatience> chsasank: You name your language llama.lisp then use the .cl extension instead of .lisp for source files?
<chsasank> hehe, I should do .lisp sure
random-jellyfish has joined #commonlisp
<chsasank> done :)
<paulapatience> When you say assemble, you mean you want SBCL to compile assembly to x86?
<paulapatience> Or just compile Lisp code
<chsasank> hehe yes, you know my problem 😅
<random-jellyfish> what's the easiest way to run a shell command from inside common lisp? google and stack overflow don't seem to give very clear answers
<chsasank> assemble to x86, yes
<paulapatience> But what is your source language, assembly instructions or Lisp code?
<chsasank> finally I can help someone. random-jellyfish: this seems to be it https://www.sbcl.org/manual/#sb_002dposix
<ixelp> SBCL 2.4.2 User Manual
<paulapatience> random-jellyfish: uiop:run-program
<paulapatience> sb-posix is for calling POSIX functions
<chsasank> ok :(. I am still a noob :(
<random-jellyfish> (uiop:run-program '("ls" "-l") :output t) - I was not giving it the :output arg and it wasn't displaying anything
<random-jellyfish> is there any way to do pipes?
<paulapatience> chsasank: If your source is assembly instructions, you can use Cluster
<paulapatience> random-jellyfish: Yes, check use uiop:launch-program
<paulapatience> And then see the :stream parameter
<chsasank> paulapatience: link pls
<ixelp> GitHub - robert-strandh/Cluster: Assembler with input in the form of standard instances
<paulapatience> I linked it yesterday
<chsasank> got it thanks, google isn't finding it
semarie has quit [Quit: WeeChat 4.2.1]
semarie has joined #commonlisp
infos has joined #commonlisp
mm007emko has quit [Ping timeout: 272 seconds]
mm007emko has joined #commonlisp
pfdietz has quit [Quit: Client closed]
nij- has joined #commonlisp
waleee has joined #commonlisp
semarie has quit [Quit: WeeChat 4.2.1]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
semarie has joined #commonlisp
pfdietz has joined #commonlisp
Oddity has quit [Ping timeout: 256 seconds]
<Mon_Ouie> beach: I don't really understand what that "wrapping the input stream" step look like. If I have a CL macro like (define-dsl-function …), how would that macro be given access to the CST instead of just the S-expression?
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<beach> Well, my solution probably doesn't work for your case.
<beach> Wrapping the input stream means defining a Gray stream that encapsulates the original stream. But the rest depends on a different reader (Eclector) being used, so you probably can't use that technique.
josrr has joined #commonlisp
<Mon_Ouie> Right, just to clarify my goal is to have a regular lisp program (where I compile code interactively through slime, or load files through ASDF, etc.) with a few forms that define functions in my DSL where I'd like to get source information
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
thollief has joined #commonlisp
chomwitt has joined #commonlisp
Inline has quit [Ping timeout: 264 seconds]
Inline has joined #commonlisp
kevingal has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
azimut has joined #commonlisp
<younder> Finally got a parenscript addon to select a row in a html table and go to the link. What a nightmare to get it to work!
random-jellyfish has quit [Ping timeout: 272 seconds]
mm007emko has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
holycow has quit [Remote host closed the connection]
FragmentedCurve_ has joined #commonlisp
FragmentedCurve_ has quit [Remote host closed the connection]
FragmentedCurve has quit [Read error: Connection reset by peer]
rtypo has joined #commonlisp
FragmentedCurve has joined #commonlisp
mm007emko has joined #commonlisp
rendar has quit [Ping timeout: 260 seconds]
zaymington has joined #commonlisp
infos has left #commonlisp [#commonlisp]
monospod has quit [Remote host closed the connection]
dcb has joined #commonlisp
<NotThatRPG> Mon_Ouie: Your Lisp implementation may have an API (which may or may not be exported) that enables you to record source information. Allegro has this, and If I recall correctly SBCL does, too. I don't know about CCL, but I wouldn't be surprised
d4ryus has joined #commonlisp
X-Scale has quit [Quit: Client closed]
<Mon_Ouie> Yeah, I found a very hacky way of doing most of what I want with SBCL — the main issue is I only found a way to get the source location for functions
<Mon_Ouie> So for now I'm using unexported SBCL functionality to define a function with the same source location as the input of the macro, and accessing the source location of those functions afterwards
Renfield has quit [Quit: Leaving]
<Mon_Ouie> https://plaster.tymoon.eu/view/4170#4170 is what I'm doing for now
triffid has quit [Quit: triffid]
chomwitt has quit [Ping timeout: 255 seconds]
<gilberth> For my CLEX as well as for noffi, I use this <http://clim.rocks/systems/compiler-warn/compiler-warn.lisp> Unfortunatly this is for CCL only. But the idea is to invoke the compiler specific error reporting function to pinpoint the source of an error. When used with SLIME, this error message is then highlighted as any other.
tyson2 has quit [Remote host closed the connection]
<gilberth> I'd really like to see ports to other Lisp, especially SBCL. For SBCL I was not persistent enough to find my way around its sources.
<gilberth> I also have a function to carry over source location information from one form to another, which might also be useful in a DSL to indicate that some piece of code you made came from that and that source form.
<Mon_Ouie> For getting errors with the correct source location during macroexpansion or something else? In the former case, there's `trivial-with-current-source-form' library that works with SBCL and clasp
occ has quit [Read error: Connection reset by peer]
<Mon_Ouie> In my case I don't just need conditions signaled with the correct location, I need the actual location (e.g. file name and line number) to create debug symbols
<gilberth> This doesn't allow you though to report the source form, location and text. It's meant for a compiler from a DSL to Lisp by means of a macro.
thuna` has joined #commonlisp
<gilberth> Mon_Ouie: ok, then you need something more detailed. With CCL that source-note is a struct with the filename and start and end file-position. And source text if available. But you're with SBCL.
hineios2 has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.2.1]
dnhester has quit [Ping timeout: 264 seconds]
<gilberth> Mon_Ouie: I looked a bit at SBCL. Within a macro (let ((sb-c::*current-path* (sb-c::get-source-path (cadr form)))) (sb-c::compiler-warn "hey, hey")) would make SLIME point to that subform. This path of SBCL however is not a file position. Still, this somehow is transported to SlIME, so the answer how to get at a line number would be with SWANK. A starting point.
<beach> gilberth: In the comment to COMPILER-WARN, did you use "eventually" to mean "possibly"?
<gilberth> s/(cadr form)/form/ My experiment was: <https://termbin.com/f01n> Say c-c c-c on that DEFUN FOO and "(hey)" will be underlined. So the information is there someplace.
<gilberth> beach: What I meant was "in the end of the day". That is when all this information has travelled all the way out of my function, through the compiler to the IDE.
<beach> OK.
<gilberth> It's quite nice for a DSL. I'll update that for SBCL now that I figured out how.
<gilberth> It's also handy for not too complicated macros. Suppose a CASE-like macro and the macro has something to say about a particular clause, it could point to that clause.
<gilberth> beach: Eventually is possibly a false friend, indeed. But not in this case. But thanks for noticing!
<Mon_Ouie> I think your let is the same or very similar to sb-ext:with-current-source-form, if you want to avoid using one more unexported symbol
<beach> gilberth: Just checking.
<gilberth> Mon_Ouie: I'll have a look.
<gilberth> And SWANK must somehow be able to map this context or path to buffer positions.
parens-user has joined #commonlisp
gorignak has joined #commonlisp
<parens-user> hello lispers this is my first time using irc is there anything i should keep in mind in #commonlisp ? rules or something.
<beach> parens-user: Use plaster.tymoon.edu for more than one line of code, for instance.
<beach> But the line can be long. :)
<beach> parens-user: Also try to stay on topic.
<parens-user> thanks
<beach> parens-user: Are you a new Common Lisp user? If so, you should know that this channel is not really meant for newbie questions, although they are tolerated, especially if it is otherwise quiet. A better channel for those is #clschool.
dnhester has joined #commonlisp
<beach> parens-user: And if you paste some code, we take it as a request for remarks, so you should expect to be told about style issues and such.
<beach> parens-user: Oh, and welcome! :)
<parens-user> Ive been using cl for about a year I can find help for noobish questions most of the time
<beach> Great!
<Mon_Ouie> gilberth: Looking at it right now, swank/source-path-parser seems to be where that logic is, but it seems you do have to know what file/buffer is being compiled to know what file to look up
<parens-user> I'm a student and there really isn't anyone that knows or interested in cl around me so I wanted to find some cl people
<gilberth> Mon_Ouie: That's the easy part. *compile-file-truename*
<beach> parens-user: You found them!
Inline has quit [Quit: Leaving]
dnhester has quit [Ping timeout: 264 seconds]
Inline has joined #commonlisp
<beach> parens-user: Where are you a student?
<beach> parens-user: Don't feel you have to answer if you don't want to.
<gilberth> Mon_Ouie: Though, what do we see when compiling just one form with c-c c-c. Buffer may not be saved yet. /me scratches head.
<Mon_Ouie> Just tried it, at least on my machine it's actually saved as a file, so I think that would actually work
<Mon_Ouie> Slime sets *compile-file-truename* to something like /tmp/slimeXXXX
<gilberth> Ok.
<gilberth> But would the line numbers then be meaningful to you? You wanted line numbers, didn't you?
<Mon_Ouie> Well, SPIR-V wants line numbers within whatever you put in the source code that's embedded in the bytecode as debug instructions
<parens-user> its my 3rd year of computer engineering but the uni name is not really relevant
<beach> parens-user: Sure.
<Mon_Ouie> So if I only embed the form that was compiled I think that will be good enough for me, though maybe suboptimal
<parens-user> is "name: " a convention or is there a reply mechanism
<beach> That's a convention.
<beach> And your IRC client will probably complete like that.
<bike> swank takes care of sbcl source paths in swank/source-path-parser.lisp. it is pretty involved.
<beach> parens-user: Like if I start a line with "paren" and then hit C-i or TAB, it completes to "parens-user: ".
<gilberth> Mon_Ouie: That's curious. SWANK manages to set things up with CCL so that the file positions that I get when I c-c c-c are actual buffer positions and thus would match the file provided it was saved. But I guess, with c-c c-k or COMPILE-FILE you will be fine.
<beach> parens-user: Oh, and the channel is logged as the channel topic shows.
<Inline> yes
<beach> Inline: ?
<parens-user> beach: thank you
<Inline> it is logged
<beach> Ah! :)
<Inline> lol :)
dnhester has joined #commonlisp
<gilberth> Inline, paren-user: See, this is why addressing with <nick>: is useful. :-)
wbooze has joined #commonlisp
<beach> It is also useful if you want to search the logs.
<wbooze> exactly
<beach> parens-user: If you are not too far from Vienna, you might consider going to the European Lisp Symposium in early May. Many of the people who hang out here will be present.
tyson2 has joined #commonlisp
notzmv has quit [Ping timeout: 264 seconds]
<beach> Oops! Time to go fix dinner for my (admittedly small) family.
kenran has quit [Remote host closed the connection]
<parens-user> beach: yeah I saw that symposium, seems good. bon appetit.
Mon_Ouie has quit [Quit: WeeChat 4.2.1]
cage has joined #commonlisp
dnhester has quit [Ping timeout: 272 seconds]
tyson2 has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
tasty has quit [Quit: bye bye!]
tasty has joined #commonlisp
tasty has quit [Changing host]
tasty has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
dnhester has joined #commonlisp
<paulapatience> parens-user: Also, beach meant plaster.tymoon.eu, not edu
dnhester has quit [Ping timeout: 268 seconds]
dnhester has joined #commonlisp
justache has quit [Ping timeout: 256 seconds]
justache has joined #commonlisp
dnhester has quit [Ping timeout: 264 seconds]
tyson2 has quit [Read error: Connection reset by peer]
ymir has joined #commonlisp
dnhester has joined #commonlisp
dnhester has quit [Ping timeout: 260 seconds]
ebrasca has quit [Remote host closed the connection]
robin_ has joined #commonlisp
kevingal has quit [Ping timeout: 256 seconds]
robin has quit [Ping timeout: 260 seconds]
rbcarleton has joined #commonlisp
zaymington has quit [Remote host closed the connection]
zaymington has joined #commonlisp
dnhester has joined #commonlisp
dnhester has quit [Remote host closed the connection]
dnhester has joined #commonlisp
tyson2 has joined #commonlisp
azimut has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
azimut has joined #commonlisp
tfeb has joined #commonlisp
thonkpod_ has quit [Ping timeout: 268 seconds]
thonkpod_ has joined #commonlisp
tfeb has quit [Client Quit]
Inline has quit [Ping timeout: 252 seconds]
wbooze has quit [Ping timeout: 264 seconds]
Inline has joined #commonlisp
notzmv has joined #commonlisp
wbooze has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
kevingal has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
thollief has quit [Ping timeout: 246 seconds]
pranavats has joined #commonlisp
thollief has joined #commonlisp
ymir has quit [Ping timeout: 260 seconds]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
Oddity has joined #commonlisp
pranavats has joined #commonlisp
ymir has joined #commonlisp
cmack has quit [Ping timeout: 256 seconds]
chomwitt has joined #commonlisp
kevingal has quit [Ping timeout: 268 seconds]
kevingal has joined #commonlisp
traidare has quit [Ping timeout: 264 seconds]
thuna` has quit [Remote host closed the connection]
thuna` has joined #commonlisp
mgl has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.2]
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
dra has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]
rbcarleton has quit [Remote host closed the connection]
rbcarleton has joined #commonlisp
waleee has joined #commonlisp
Mon_Ouie has joined #commonlisp
parens-user has quit [Quit: WeeChat 2.8]
thollief has quit [Quit: Leaving]
nij- has joined #commonlisp
istewart has joined #commonlisp
ymir has quit [Remote host closed the connection]
ymir has joined #commonlisp
Inline has quit [Ping timeout: 268 seconds]
wbooze has quit [Ping timeout: 268 seconds]
justache has quit [Quit: ZNC 1.8.2 - https://znc.in]
pve has quit [Quit: leaving]
thuna` has quit [Ping timeout: 252 seconds]
amb007 has quit [Ping timeout: 268 seconds]
justache has joined #commonlisp
chsasank has quit [Ping timeout: 255 seconds]
Inline has joined #commonlisp
wbooze has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
chomwitt has quit [Ping timeout: 272 seconds]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
fristed has joined #commonlisp
ymir has quit [Remote host closed the connection]
ymir has joined #commonlisp
waleee has quit [Ping timeout: 255 seconds]
mgl has quit [Ping timeout: 255 seconds]
chsasank has joined #commonlisp
dra has quit [Quit: Leaving]
ymir_ has joined #commonlisp
ymir has quit [Ping timeout: 252 seconds]
ymir_ has quit [Remote host closed the connection]
ymir_ has joined #commonlisp
ymir_ has quit [Remote host closed the connection]
ymir_ has joined #commonlisp
akoana has joined #commonlisp
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
dino_tutter has quit [Ping timeout: 255 seconds]
donleo has quit [Ping timeout: 264 seconds]
shka has quit [Ping timeout: 264 seconds]
alcor has quit [Remote host closed the connection]
rgherdt has quit [Remote host closed the connection]