Xach 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>
random-nick has quit [Ping timeout: 245 seconds]
perrierjouet has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.3]
CptKirk has quit [Ping timeout: 256 seconds]
CptKirk has joined #commonlisp
gxt has quit [Ping timeout: 276 seconds]
ec has joined #commonlisp
gxt has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
hendursaga has joined #commonlisp
asarch has quit [Quit: Leaving]
frgo has joined #commonlisp
mitchconnor has joined #commonlisp
mitchconnor has quit [Client Quit]
frgo has quit [Ping timeout: 264 seconds]
tyson2 has quit [Ping timeout: 265 seconds]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
brettgilio has quit [Quit: Leaving...]
brettgilio has joined #commonlisp
brettgilio has quit [Remote host closed the connection]
ec has quit [Ping timeout: 276 seconds]
brettgilio has joined #commonlisp
brettgilio has quit [Client Quit]
brettgilio has joined #commonlisp
tyson2 has joined #commonlisp
<paule32> hello
<paule32> assume i have a class, and/or defun's
<paule32> now, i would like "extend" the class/defun
<paule32> with defclass, i can make super class, and derivated class that inherit from its parent
elderK has joined #commonlisp
<paule32> but i have some defun's that are other than the parent
<paule32> ehm objects
<mfiano> you what?
<paule32> now, i could use (defun (defun (defun ... )))
<mfiano> That makes no sense?
<paule32> hello mfiano
<mfiano> Hi
<paule32> what
<mfiano> (defun (defun (defun ...))) is invalid Common Lisp. I have no idea what you are asking.
<paule32> i mean, i could combine defun's
<mfiano> What does combine mean?
<paule32> (a (b (c ...)))
<paule32> where a is (defun a () )
<paule32> where b is (defun b () )
<mason> paule32: What, in plain language, do you want to accomplish?
<mason> Not in Lisp, in English.
<mfiano> That isn't combining defun's. That feeding the return value of one function into the input of another.
<paule32> mfiano: yes, that is what i would like
<paule32> mason: i thinking over, how to implement a simple test circuite program
<mfiano> You would like to call a function with the result of another? What is the problem?
<mason> paule32: If you describe that in more detail that might help. Both "test" and "circuit" aren't wholly clear to me as yet.
<paule32> mfiano: that not the problem, the problem (or the thinking) is: do i need classes, when i "add" components
<paule32> mason: a ic can have 2 or more inputs, and outputs
<mfiano> Classes are for storing state. Just like a closure but more convenient due to generic functions.
<paule32> these 2 inputs can connect internal with other gates
<mason> paule32: Are you saying you want to have custom methods based on a subclass?
<mason> paule32: Like, you have behaviour, and you want custom behaviour based on some criteria, but using the same name, or somesuch?
<paule32> i can't say it in detail, because i dont know what is better
<mfiano> Do you want to add components at runtime, or statically in code?
<paule32> i would like add components dynamically
<mfiano> Check out the library dynamic-mixins
<mfiano> I think this might be what you are after
<mfiano> It assumes familiarity with generic functions (defgeneric/defmethod), so read PCL if you aren't familiar with them.
<paule32> i am familar with oop at c++, pascal, but in lisp, i am a noob
<paule32> because lisp is simpler
<mfiano> paule32: Oh that is your first mistake.
<mfiano> paule32: I have seen you come here for years, and you haven't yet read PCL?
<paule32> ehm, no
<mfiano> That is a huge problem. CLOS is the core of CL.
<mfiano> minion: tell paule32 about PCL
<minion> paule32: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<paule32> ah the book
<paule32> yes
<paule32> i read it, ago
<mfiano> Then you know about OOP in Lisp
<paule32> but i havent time learn lisp in detail, because other projects
<mfiano> (defmethod, etc)
<mfiano> Sadly I don't know of any German resources for you if you didn't get enough from that book.
<paule32> the question tend to oop, but i am not sure, that i need oop
<paule32> mfiano: i start a project, to translate the LispWorks
<paule32> months ago
<mfiano> While CL is multi-paradigm, you can't really use CL without using OOP at least indirectly, since CLOS and the MOP are so intertwined into the language's design.
srhm has quit [Read error: Connection reset by peer]
<mfiano> Everything in CL is an instance of a class.
<mfiano> Even classes themselves :)
<paule32> i read all is s-expr
<paule32> so no read, that oop is the base
<mfiano> That is the textual representation and similar to the AST, yes. I am talking about runtime objects.
<paule32> ehm, dont think so, at the moment, please think in bootstrap
<mfiano> When you type (list 1 2 3), you are instantiating an instance of class LIST.
<paule32> where all is ground base
<paule32> ah
<paule32> yes
<mfiano> CLOS is built into everything
<paule32> sorry, i not involved with cl details
<paule32> for me, list is a function
<mfiano> It is a function that does what I said
srhm has joined #commonlisp
<paule32> that basis knowlegde is know by me
<paule32> but you can see, that i am twisted all, because i still use other paradigms like new c++
<paule32> sorry
<mfiano> If you want to do things at runtime, your best option is utilizing classes with the meta-object protocol.
<mfiano> This is what mixin libraries like dynamic-mixins, and stealth-mixin do
<mfiano> Yes, I understand. You don't come around here often. I think your main problem is just not spending enough time here and with the language in general.
<paule32> yes, but, see: you have a ic with 8 i/o ports, and the internal structure, i would like code it as educative part, so i can't use millions of classes for gates like and|xor ...
<mfiano> There isn't much reason to submit to C++ if you become familiar with CL.
<paule32> yes, indeed
<paule32> with classes, i mean instances
<paule32> this means, allocate memory, free it, ...
<mfiano> You can't expect to design and implement a sophisticated piece of software in any language without understanding that language in at least some detail. Otherwise it is going to look like spaghetti and probably not modular/extensible, one of your requirements.
<paule32> and defun is simple, it run its logic, and then get next part ...
<paule32> yes
<mfiano> With the MOP and defclass/defmethod, it's possible to programmatically create classes as needed as your program is running
<mfiano> and changing existing instances to be of those new classes, etc
<mfiano> Anything you can imagine.
<mfiano> Quite easily with CL
<mfiano> (change-class (make-instance 'some-class) (dynamically-create-new-class))
<paule32> ehm, yes, but MOP is in my eys simple extended CL, so CL is faster
<mfiano> For example
<mfiano> No.
<mfiano> The MOP isn't CL extended.
<paule32> hmm
<mfiano> CL is defined in terms of the MOP, or well, usually is.
<mfiano> CLOS is written using the MOP. CL is written using CLOS.
<mfiano> a CL implementation, that is.
<paule32> ok
<mfiano> The MOP is how you really get to make CL do what you want, no matter what you are designing.
<paule32> ic simulation
<paule32> the thing is not only the design
<paule32> the second thing is the run behavoir
<paule32> so, if you look to the electronics design, you come to paralellism
<paule32> power goes to the lowest barierr
<mfiano> I fear I am not explaining things clearly enough at this hour, or I am not understanding you well. I might request some help from some on-lookers :)
<mfiano> Because ic simulation is vague. That can be implemented an infinite number of ways.
Qwnavery has joined #commonlisp
<paule32> ok
<mfiano> I am thinking at a much lower level than you.
<paule32> then let us begin with a simple class circuit
<paule32> mfiano: yes, that seems be the problem
karlosz has quit [Quit: karlosz]
<mfiano> Ok, that only tells me: (defclass circuit (...) (...))
<paule32> ok, this class should be the super class of all circuits
<paule32> we need a name
<mfiano> Well, you have to ask yourself which state (if any) is different than the parent in the subclasses.
<mfiano> Is the state different, or only the behavior?
<paule32> there is no parent
<paule32> at the moment
<mfiano> As long as there is a superclass their are children, and this is the parent.
<paule32> only thinking over, what a circuit can have or do
<mfiano> there*
<paule32> ok
Psybur has quit [Remote host closed the connection]
<mfiano> My main question is why does there need to be subclasses of circuit at all?
<paule32> each of them have different design, name, functions, ...
<mfiano> I have this question because you didn't explain anything yet. So no need to answer if you have more explanation
<mfiano> Let me sketch something out quick
<paule32> ok
<mfiano> Do you understand all of this code?
<paule32> yes
<mfiano> With this, we don't need more than 1 function per circuit. Only 1 function per BEHAVIOR
<mfiano> Ok, let's use it as a base for any further implementation details you describe.
<paule32> thank you
waleee has quit [Ping timeout: 252 seconds]
<mfiano> I may be slow to respond. I urge you to stay connected to IRC and ask very detailed questions without assuming the reader knows about your problem domain. I for example, know very little of IC aside the basic like logic gates.
<paule32> ok, no problem
<paule32> so long we not cry us :)
tyson2 has quit [Remote host closed the connection]
akoana has left #commonlisp [Leaving]
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
<CptKirk> looking for a simple REST library
<CptKirk> I found drakma, but there seems to be a lot of manual parts that I don't really understand
taiju has quit [Ping timeout: 265 seconds]
paule32_ has joined #commonlisp
paule32__ has joined #commonlisp
paule32 has quit [Ping timeout: 246 seconds]
paule32_ has quit [Ping timeout: 252 seconds]
paule32 has joined #commonlisp
paule32__ has quit [Ping timeout: 252 seconds]
prxq has quit [Ping timeout: 265 seconds]
prxq_ has joined #commonlisp
scymtym has quit [Ping timeout: 265 seconds]
karlosz has joined #commonlisp
<beach> Good morning everyone!
taiju has joined #commonlisp
Lycurgus has joined #commonlisp
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
lisp123 has joined #commonlisp
selwyn has joined #commonlisp
doyougnu has quit [Ping timeout: 252 seconds]
lisp123 has quit [Ping timeout: 265 seconds]
Bike has quit [Quit: Lost terminal]
semz has quit [Ping timeout: 264 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 265 seconds]
semz has joined #commonlisp
lisp123_ has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
lisp123_ has quit [Quit: Leaving...]
<paule32> hello, what is wrong with this code: https://dpaste.com/5RX8SEKMD
<paule32> i get debugger error
rgherdt has joined #commonlisp
Nilby has joined #commonlisp
<White_Flame> a "debugger error" would indicate that the debugger itself is broken
<paule32> #<THREAD "main thread" RUNNING {10010B0523}>:
<paule32> unknown type specifier: ILLEGAL-FUNCTION-CALL
<White_Flame> what is it saying is an illegal function call?
<paule32> line 34 in paste ?
<White_Flame> oh, huh interesting
<White_Flame> in any case, you have (handler-case (( where the double open paren where an expression should be is a syntax error
<White_Flame> also, you're catching errors during execution of DEFVAR & DEFCLASS, usually not a source of runtime errors
<White_Flame> but that is handler-casing your double open paren
<paule32> common lisp sbcl
<mfiano> I really hope this bad style of how to write expressions is not due to refusal to use Emacs and paredit/smartparens
<White_Flame> you really don't want defvar/defclass/defanything to be wrapped in handler-cases, just let the compile time environment throw its own error handling at you
<White_Flame> and if you're just exploring how handler-case work, then use more idiomatic runtime errors, like math on non-numbers or something
<paule32> these are not user friendly
<White_Flame> the user is a programmer, and all information suitable for programmer ingestion is there
<White_Flame> but you're not allowing any stack trace or any additional information to be displayed in this code, so it's less friendly than the default debugger report
<paule32> however (handler-case ( code ) (condition-type ) ) i expect that is like try except end in delphi
<White_Flame> roughly speaking, yes
<White_Flame> and you are legitimately catching your paren error
<mfiano> ha
<paule32> i don't know where the mistake is
<mfiano> Yeah, this is very strange and likely not behaving as you'd expect, or as your users would expect.
<White_Flame> (handler-case ((
<White_Flame> double open paren (ignoring comments)
<mfiano> ((...)) is an invalid function call.
<White_Flame> your 3 forms are being taken as in (<function> <param> <param1>)
<mfiano> You can't just wrap multiple forms in an extra level of parentheses like that
<paule32> in paste line:4 (handler-case (
<White_Flame> the 3 being defvar/defclass/quit (if I'm reading right)
<mfiano> line 11 adds another (
<paule32> yes
<paule32> this for defvar
<White_Flame> you are also having DEF* forms as non-toplevel which might yield weird results
<mfiano> paule32: listen
<mfiano> line 4 is (handler-case (. line 11 is (....
<mfiano> combined that is handler-case ((...
<mfiano> that is invalid code!
<paule32> so, i can't catch syntax error's
<paule32> strange
<White_Flame> a single expression ((defvar ...) (defclass ..) (quit)), where the entire DEFVAR _expression_ is in the function position, and the other 2 expressions are taken as parameters to that mis-specified functino
<mfiano> not like that
<White_Flame> if this is supposed to be just for defvar, I have no idea what you're doing
<mfiano> You said you read PCL already years ago. I would consider reading it again.
frgo has joined #commonlisp
<White_Flame> syntax errors are for you the programmer to get hit with at compile-time, not to push off to your users at runtime
<paule32> yes
<paule32> but this is a simple statement
<White_Flame> (and technically this is not a syntax error, it parses as a syntactically valid expression, with a semantically invalid function)
<mfiano> statement?
<White_Flame> hence the illegal function call error, since the _expression (defvar *app-lang* de) is not a function itself
<paule32> if you see to javascript - there you can create a promise, and when the interpreter find a problem (syntax, type...) it prompt you why
<paule32> also i mean, you can customize the output
<White_Flame> also, why do you have (quit) in there?
<paule32> that sbcl to get back to the cli prompt
karlosz has quit [Ping timeout: 252 seconds]
<White_Flame> so you're not using slime?
<paule32> no
<White_Flame> are you using any sort of lisp-aware editor?
<paule32> no, notepad++
<White_Flame> why?
<White_Flame> emacs is a dynamic runtime system. working with non-integrated editors just makes tons more work for you
<paule32> lightweight, syntax highlight
jeosol has quit [Ping timeout: 252 seconds]
<White_Flame> erm, s/emacs/lisp/ :-P
<White_Flame> but you don't get the lisp environment
frgo has quit [Ping timeout: 260 seconds]
<paule32> i have the console
<paule32> and clisp sbcl
<White_Flame> and no way to integrate your editing/repl environment together with the running lisp image
<paule32> sure, but why, i familiar with fast typing the keyboard, not mouse and so on, notepad++ is faster as emacs for me
<paule32> multiple files open
<paule32> ...
<mfiano> paule32: Common Lisp is an interactive language. You can't just write code and compile it.
<mfiano> You are definitely on the wrong path
<White_Flame> because you don't get any features, like sldb, jumping to definitions, being able to easily expand stuff from the backtrace, have errors underline in your source code buffers, etc etc just for starters
<paule32> who says that i need it
<White_Flame> or even the ability to easily redefinine functions on the fly
<White_Flame> your debugging environment is crippled
<White_Flame> you need it to answer the basic questions you're asking here
<paule32> i using notepad++ for all things c,c++,pascal,php,asm,html,xml,js,lisp ...
<mfiano> All of those except Lisp are not image-based languages
<moon-child> js is
<moon-child> kinda
<mfiano> I wouldn't say it is
<White_Flame> the only place you get that is in the browser console, not in the editor
<Qwnavery> heeloo
<Qwnavery> howdy all
<moon-child> White_Flame: only because no one has designed an editor which knows how to speak to the image
<White_Flame> funny thing is that the javascript dev tools in the browser are probably the vaguely closest modern equivalent to what lisp machines did with live object on the display
<aeth> XML isn't an image-based language yet?
<aeth> I thought there was an extension for everything!
<moon-child> White_Flame: indeed
<Qwnavery> White_Flame: you give me a terrible idea. write a lisp ide as a web daemon
<Qwnavery> x_x
<moon-child> aeth: xml is a data format, you can do whatever you like
<moon-child> Qwnavery: jscl?
<Qwnavery> moon-child: good god it's not already a thing is it?
<aeth> and asm is, well, you can do whatever you want there, too
<paule32> stop
<moon-child> aeth: indeed
<White_Flame> (time (hammer))
<aeth> CLISP bytecode is an asm language from a certain point of view
<Qwnavery> moon-child: put that back in it's box or so help me
<paule32> i would like catch exception, not discuss emacs or so
<White_Flame> CPUs are just interpreters for a specific bytecode
Lycurgus has quit [Quit: Exeunt]
<White_Flame> *hardware interpreters
<moon-child> Qwnavery: there's an official w3c lisp that uses xml syntax
<moon-child> i thought it was a joke. It is not. Can't find the link now
<Qwnavery> moon-child: ._. that's so counter-intuitive
<Qwnavery> xml syntax..
* Qwnavery vomits
<moon-child> as erik naggum tells us: Robbery is not just another way of making a living, rape is not just another way of satisfying basic human needs, torture is not just another way of interrogation. And XML is not just another way of writing S-exps. There are some things in life that you do not do if you want to be a moral being
<mfiano> paule32: I don't think anyone can help you. You clearly do not understand Lisp if you are not using the interactive development features, nor do you understand code vs data given your initial problem. This can only be solved by going back to the fundamentals by reading some books.
<mfiano> I am giving up now.
<White_Flame> paule32: you are already handling a condition
<White_Flame> since your intended handler case was executed & printed your desired error message
<Qwnavery> moon-child: at least it lives up to the lisp law: if you've thought of it, it's probably already been half-baked by several independent lisp hackers
<White_Flame> (CL does not call them "exceptions", and they do not work like "exceptions" as they function without unwinding the stack, depending on how you register it)
<White_Flame> plus there's restarts and other things that exceptions can't do
seok- has quit [Read error: Connection reset by peer]
<White_Flame> but as far as (from what I can tell) catching an error from some broken code you have and printing it manually, you've got it
<moon-child> White_Flame: phoe implemented the condition system in java
<White_Flame> sure, turing completeness
<moon-child> Turing completeness means that, using java, you can devise an interpreter for a language which has conditions. Not that you can have conditions _in java, as part of the language_
<White_Flame> ah, cool
<White_Flame> I haven't used java in a long time, I know they've added a lot of meta functionality in the last 10 or so versions since I've touched it :-P
<moon-child> guy steele tried to get operator overloading into java 1.0. Decades later, it's still not there!
<mfiano> At least it's not "My way or the highway" anymore.
karlosz has joined #commonlisp
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
CptKirk has quit [Ping timeout: 256 seconds]
<hayley> Bracha's closure proposal seems a lot better than the one we got IMO.
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
<moon-child> closure proposal?
<beach> I was going to ask the same.
<hayley> This isn't #lispcafe, come to think of it. I'll look it up, but Gilad Bracha had another closure proposal for Java.
<hayley> http://www.javac.info/closures-v05.html It includes "real" function types like {int, String => Number throws IOException} rather than the current Java closures, which are limited by requiring you to have an appropriate interface type handy.
<moon-child> ahh. If one is to use java, it certainly seems like a good idea to have a type for functions
<moon-child> however also somewhat inconsistent--as there are otherwise no functions which are not methods (of some specific object, or static)
<moon-child> (I think a worthwhile inconsistency. No functions is dumb)
amb007 has quit [Ping timeout: 245 seconds]
shka has joined #commonlisp
amb007 has joined #commonlisp
<paule32> for month ago, i have learn, that global variables or global constants should be pre, and suffix with a asterisk sign: *foo*
<paule32> but when i do this now in sbcl, i get error, also: (defvar *foo* 1) result in error
<ecraven> this used to be used for *special* global variables, right? not necessarily all global ones?
<paule32> when i use (defvar foo 1) all well
<moon-child> ecraven: what non-special global variables are there? Obviously you should not put earmuffs on global functions
<ecraven> moon-child: not sure, are all global variables in CL automatically special?
<mfiano> All global non-constant variables are special.
<mfiano> However, the standard predates the convention
<White_Flame> paule32: constants should have +plus-signs+
<mfiano> So most-positive-fixnum etc are not
<moon-child> I was about to mention that
<moon-child> ._.
<mfiano> or well that's a constant, yeah
<mfiano> i'm going to bed now before i make anymore fool of myself
<paule32> mfiano: good dreams, thx for discuss
<White_Flame> sb-ext:defglobal would be a non-special global, as far as I understand the terminology, I think
<White_Flame> (obviously not standard)
<mfiano> White_Flame: Yep, but I would urge you to use global-vars instead
<paule32> so, global variables = *foo*, and constants +foo+ ?
<White_Flame> personally, I would love a thread-local-only declaration for performance in most of my usage
<White_Flame> paule32: yes
<paule32> thx
<mfiano> paule32: Yes, though they are only global if you treat them as such
<mfiano> They introduce a stack of multiple bindings
<paule32> the stack is limited ?
<White_Flame> almost every language has a stack of limited size
<mfiano> Only by your heap
<White_Flame> or I should say of fixed size
<paule32> White_Flame: yes, but i thought it is lisp :)
<White_Flame> oh right, the binding stack. the call stack is generally always fixed/limited
<paule32> does lisp use the gmp lib for such huge math number length?
<mfiano> No, but an implementation might
<mfiano> (SBCL does in a contrib module)
<mfiano> A CL implementation might run on a system without libc, so this is not something for the standard to decide on.
<mfiano> Look at Mezzano
<paule32> a little homework: given 11 questions, 4 students, what is the smallest class of students that can have a change of 8 right answers ?
Cymew has joined #commonlisp
<mfiano> Maybe ask in #lispcafe
<paule32> i don't know, if the formular: n/k = n! / (n - k)!
<paule32> n := 11
<paule32> k := 4
<mfiano> paule32: This is not the right place for such questions.
<mfiano> Keep it on topic
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
<moon-child> mfiano: a CL implementation might compile gmp _to_ lisp and run that way
<moon-child> :)
karlosz has quit [Ping timeout: 252 seconds]
gaqwas has joined #commonlisp
<beach> paule32: You really should take your problems to #clschool. You are generating a lot of irrelevant noise here.
robin has quit [Read error: Connection reset by peer]
robin has joined #commonlisp
<beach> paule32: You really should take your problems to #clschool. You are generating a lot of irrelevant noise here.
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
frgo has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
rotateq has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
karlosz has joined #commonlisp
karlosz has quit [Quit: karlosz]
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
elderK has quit [Quit: Connection closed for inactivity]
Nilby has quit [Ping timeout: 245 seconds]
cosimone has joined #commonlisp
attila_lendvai has quit [Ping timeout: 252 seconds]
scymtym has joined #commonlisp
jeosol has joined #commonlisp
dre has quit [Quit: Leaving]
scymtym has quit [Ping timeout: 245 seconds]
random-nick has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
Cymew has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<jeosol> Good morning all!
<jeosol> I have a question and may be someone has a better idea.
<jeosol> I am trying to do remote functions on a repl using swank-client by calling a function (e.g., function-on-remote) in the other repl session: see this paste for an example code : https://paste.ofcode.org/UYgfqiKavdGihZwbiWehcE
amb007 has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
<jeosol> How can I get away with compiling the caller without know function-on-remote? Why I need this, I am trying to reduce coupling between the codes. Not sure if that is clear
<jeosol> Summary, I have two repls running A and B. I want to send computations to be performed on B where the function above 'function-on-remote is defined.
<pjb> jeosol: so, without going thru emacs, right?
amb007 has quit [Read error: Connection reset by peer]
<jeosol> No, I am ok using emacs
amb007 has joined #commonlisp
<pjb> Isn't swank-client a CL module running in CL to connect to another CL running swank-server?
<jeosol> I want to be able to build and run A without knowing about that function. For now it works but I have to link in that function
<jeosol> pjb: yes, that is what it does
<jeosol> Pardon, if my question was not clear. It is one of reducing coupling
<jeosol> I want to be able to take a form from A (A has hunchentoot server) and then send that computation to B for evaluation
<pjb> So, something like (remove-eval *remote-host* expression) ?
<pjb> s/remove/remote/
<jeosol> yeah, yes, which the snippet does but it seems A needs to know about function-on-remote which is defined in B
<pjb> How else could it call it without knowing it?
<jeosol> I would prefer to keep A small by decoupling it so it's just the server while the other repl B is a large code base
<jeosol> pjb: good question, I am trying to cheat I guess
<jeosol> It's a fixed computation that is farmed out to B
<pjb> The only way would to define a protocol, sending a message, that would end in calling the remote function. But you'd need to have a mapping between messages and functions on the server, and that would still be coupling.
<pjb> The only question is what you consider the public API.
<pjb> The function name, or the message name??
<jeosol> For now, say an HTTP post, i extract the parameters and the pass that to B for evaluation
<pjb> If you use a remote-eval (kind of RPC), with the advantages linked to it, such as implicit wrapping and forwarding of arguments and results, then defining the API in terms of functions is natural. You can write API functions on the server if you want to hide the actual implementation function.
<jeosol> I have dedicated repls say B1, B2, B3, that each evaluate different functions, for a simple example, say B1 evaluates sin(x), and B2 evaluates cos(x) and B3 evaluates tan(x)
<pjb> There's not much difference between: (remote-eval *server* `(compute-result ,input)) and (send-message *server* `(compute-result ,input))
<pjb> jeosol: you may define a common API.
<jeosol> true
<jeosol> I guess I have to study that more, perhaps it's a better option. I would like to avoid the coupling if there is a way
<pjb> On each server you have a different function: (defun perform-computation (x) (sin x)) and the client can use this API (remote-eval *server* `(perform-computation ,input)) and getting different results from different servers.
<jeosol> yes, that's essentially what I am trying to achieve, works with the snippet so far, but I don't like the coupling
<pjb> Inside the server, you could code it as (defvar *compute-function*) (defun perform-computation (x) (funcall *compute-function* x)) (setf *compute-function* (function my-compute-function #|sin, cos, whatever|#))
<jeosol> pjb: thanks for brain storming this, good ideas
<jeosol> *brainstorming
<jeosol> above, did you say mean each server above?
<jeosol> ah I guess that's the different. For now, I am using one that mimicks (not exactly) a load balancer.
<jeosol> the one server takes all requests and then the farming is done based on the port which is part of the input received from the request
terrorjack has quit [Read error: Connection reset by peer]
frgo has quit [Remote host closed the connection]
frgo_ has joined #commonlisp
<pjb> jeosol: yes, each server would have a different (setf *compute-function* …) expression.
<pjb> jeosol: but they would have the common API function perform-computation.
<jeosol> pbj: thanks.
<jeosol> pjb: thanks. I see what you meant
<pjb> jeosol: now if the question is to fork out workers, there are other systems? Perhaps https://github.com/brown/swank-crew or https://cliki.net/distributed
<jeosol> So what I have now, is a function defined in the single server and then the port is what is different, and by that port, I have a mapping to the different functions but otherwise the arguments are same
<pjb> jeosol: for example, lfarm based on lparallel.
<jeosol> will check the link
Jach has joined #commonlisp
<pjb> (it's in quicklisp)
<pjb> jeosol: don't use only the port to identify the servers. Use the address and the port. Then you can distribute the server over other computers.
<jeosol> pjb: sorry, it's both, there is hostname and port
<pjb> I'm sure you have access to half a dozen computers, between servers, desktops, laptops, raspberri pi, android phones, etc,
<jeosol> but I am checking the links to see if there is a better name
<jeosol> I meant host ip address above
<jeosol> pjb: I was sloppy there, but you are correct
<jeosol> I am not sure if my original approach makes sence, but essentially, my end goal is that. If one user says to want to perform sin(x) computations, I have a repl running and decidated for that with my previous approach. Ideally, I want to start this repl like starting a container in AWS or GCP
<jeosol> and then if I get more sin(x) users, and the load on the one is more, I spin more and the server can distribute the work
<jeosol> Now, there is probably a better way to do all this. Ideally, I start those repls by hand. I looked into docker a bit, but the computations going into the container appears slow compared to repl (B) running natively
igemnace has quit [Remote host closed the connection]
<jeosol> might be an issue with my docker setup, but that is a secondary issue. I want to be able to distribute work with the client not knowing the work being sent out
<pjb> jeosol: have a look at lfarm.
<pjb> It seems to match what you want.
<jeosol> pjb: I'd look into lfarm. I think shka, phoe or someone recommended it when I describe a similar problem I was having
<jeosol> pbj: you read my mind. I just read the github page
<jeosol> I does match what I am trying to achieve
<pjb> You may have to add management of dynamically allocated server, and adding them to your lfarm.
<jeosol> it also seems to have a broadcast-task. I have have to use swank-client to execute (ql:quickload :system) on those remote repls to do an update after change code
<jeosol> pbj: that's something I think I will need. If I am able to achieve that on the CL side, better
<jeosol> I was testing with port ranges, say 50100-50150 dedicated to sin(x) type requests
<jeosol> I would prefer not to have these complicated could-based solutions if I can get away with it
<jeosol> pbj: your help with this is much appreciated. I owe you some beer if you drink, or something else if you don't, perhaps at the next ELS if I can make it
Qwnavery has quit [Quit: WeeChat 3.3]
scymtym has joined #commonlisp
selwyn has joined #commonlisp
ec has joined #commonlisp
<shka> pjb: sounds like me :P
santiago` has joined #commonlisp
terrorjack has joined #commonlisp
iamFIREc1 has joined #commonlisp
iamFIREcracker has quit [Ping timeout: 265 seconds]
scymtym_ has joined #commonlisp
scymtym has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
rotateq has quit [Ping timeout: 252 seconds]
scymtym_ has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
selwyn has quit [Read error: Connection reset by peer]
doyougnu has joined #commonlisp
Bike has joined #commonlisp
<jeosol> shka: Yeah, I was referring to you
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
<pjb> jeosol: I heard the next ELS was in Porto; I might go there. But we'll see the situation then.
<flip214> pjb: the 2022 one?
<flip214> Do you have a date for me, so that I can block the relevant days already?
<Duuqnd> I don't think the details have been announced yet
<beach> It is co-located with <Programming> so the dates may be announced.
<beach> March 21-25 for the entire <programming> conference.
<beach> So maybe 21-22 for ELS, I am guessing.
<flip214> beach: thanks a lot!
<beach> Sure.
<jeosol> pjb: interesting. Never been to that city
<jackdaniel> mm, sounds like some tasty alcohol :)
<pjb> jackdaniel: of course, while in Porto, binge on Porto!
<pjb>
<pjb>
<pjb> next time you go to Camembert, be sure to binge on Camembert cheese: https://www.google.com/maps/place/La+Maison+du+Camembert/@48.8927537,0.1546184,7016m/data=!3m1!1e3!4m13!1m7!3m6!1s0x47e1e5588ac14a37:0x40c14484fb82040!2s61120+Camembert!3b1!8m2!3d48.893622!4d0.177487!3m4!1s0x47e1eff6b26dbce1:0xa4025c1bd68ad3de!8m2!3d48.8937422!4d0.1774189
Psybur has joined #commonlisp
Posterdati has joined #commonlisp
<flip214> ... queue same joke about "Edam"
cosimone has quit [Remote host closed the connection]
waleee has joined #commonlisp
scymtym has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
Lycurgus has joined #commonlisp
attila_lendvai has joined #commonlisp
<paule32> hello
<jackdaniel> hey
selwyn has quit [Read error: Connection reset by peer]
<nick3000> Does anyone have any favorite libraries for plotting?
<nick3000> There are so many I'm trying to narrow it down without trying every single one.
<beach> nick3000: What kind of plotting?
<nick3000> Mostly 2D scatter plots
<beach> So basically dots in 2 dimensions?
<beach> Then I recommend McCLIM. It is very nice these days.
<nick3000> Okay I'll take a look at that.
<beach> If you fire up the listener, you can just draw dots to *standard-output* using the CLIM DRAW-POINT* function.
<_death> mcclim comes with scigraph, which can be used to plot.. there are many ways in which it can be improved, but if you just want to show a basic chart it seems to work
<beach> True. I forgot about scigraph.
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<Josh_2> Hi all
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
pve has joined #commonlisp
<Josh_2> I am trying to use the MOP to add a method to a generic function on creation of that class, what method should I be specializing to do this? I have tried putting it in the compute-slots method for my metaclass I need to get the class name of the class being made that is inheriting its behaviour from that metaclass
<beach> "that class"?
<Bike> why not initialize-instance?
<Bike> probably what i'd actually do is define my own defclass method that expands into a method definition, though
<Bike> defclass macro*
<Josh_2> Oh yeh that would work
<Josh_2> if I use my own defclass I can use the defmethod macro rather than add-method
<Josh_2> although it is pretty sweet just using a normal function to add a method
jealousmonk has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
<pjb> Josh_2: it's totally unrelated!
<pjb> Josh_2: with the CLOS, methods are attached to generic functions, not to classes.
<Josh_2> Yes
<Josh_2> I'm aware, but I'm trying to have the method added automatically when a class which uses my metaclass is created, not when an instance of that class is created
<pjb> defmethod expands to an add-method call.
<Josh_2> Yes
<pjb> In that case, you will want to call add-method in one of the methods of your metaclass.
<pjb> The point of having add-method/defmethod, is that the function can be called at run-time by other functions (or methods), while defmethod can be used at compilation-time as a toplevel form.
<pjb> They're really two API to the same functionality.
<Bike> Josh_2: to be clear, i meant you have (defmethod initialize-instance :after ((object metaclass) ...) (add-method ...)) so it's on class creation, not instance creation
<Bike> also you might want to think about how redefinition will work
<Josh_2> Yes I tried that
<Josh_2> I think I will just go with the defclass wrapper
<Josh_2> pjb: well I'm trying to have the method added at compilation time, so ima go with the macro with a defclass wrapper
Psybur has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
Psybur has joined #commonlisp
ec has joined #commonlisp
<saltrocklamp[m]> out of curiosity, why doesn't the SICL repo use git submodules for the dependencies, instead of cloning them in a script?
<saltrocklamp[m]> submodules are a lot easier to work with than in the past
<saltrocklamp[m]> ah, i answered my own question: because they're being installed to the user's quicklisp `local-projects` directory, not to the project local directory
<beach> Very likely because I have no idea how to use GIT submodules, and my main mission is not to be a GIT expert, but to implement Common Lisp. But what do you mean by "cloning them in a script"
santiago` has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
<beach> Oh, you mean the external dependencies?
santiago` has joined #commonlisp
<beach> saltrocklamp[m]: I did not do the README nor the script for cloning dependencies. Someone who wanted SICL to be usable to others did. But it is not usable to others (yet), so I am not working very hard to make that possible.
<saltrocklamp[m]> yes, the external dependencies. and fair enough!
<saltrocklamp[m]> working with submodules does require knowing some trivia about how they work, obviously it's your own project so you should do things as they work best for you, while it's still in "not usable to others" state
<saltrocklamp[m]> i'd be happy to help w/ the git stuff if you are ever interested
<beach> I'll keep that in mind. Thank you.
<beach> I guess I should set up a "steering committee" of people I know and trust to vote on suggestions like yours. There are so many suggestions that I myself don't see the consequences of, so I would need a small number of people to help.
jealousmonk has quit [Ping timeout: 240 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
santiago` has quit [Ping timeout: 245 seconds]
Psybur has quit [Read error: Connection reset by peer]
Psybur has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
santiago` has joined #commonlisp
jealousmonk has joined #commonlisp
ec has joined #commonlisp
mortemeur has joined #commonlisp
santiago` has quit [Ping timeout: 245 seconds]
doyougnu has quit [Remote host closed the connection]
santiago` has joined #commonlisp
Psybur has quit [Remote host closed the connection]
<shka> git submodules are kind of pain
<shka> but they address a real problem
<beach> And what problem is that?
<mortemeur> I am trying to work with a project on windows, and it requires cl+ssl, but I get this error: https://gist.github.com/mortemeur/669ae16bb1a3ca41e3bcefa4fe5ba8dc
<mortemeur> should I install openssl on windows?
cosimone has joined #commonlisp
jkordani has joined #commonlisp
<pjb> shka: indeed. Perhaps repo helps manage that?
<pjb> At least, repo has some explicit manifest file.
<saltrocklamp[m]> it lets you incorporate another git repo into your git repo, pinned to a specific commit. so the outer git repo actually tracks the pinned commits of the inner repos, so if you upgrade one of the inner repos you can commit that upgrade, and you can see the upgrade in the git diff. but you can still cd into the git repo and work on it like a normal git repo, e.g. make local changes and push them to some remote
<pjb> mortemeur: yes, cl+ssl is a FFI to openssl.
khrbt has quit [Ping timeout: 246 seconds]
<saltrocklamp[m]> so the two main use cases are: 1) pinning vendored/bundled dependencies and distributing them to people who want to build from source, without needing a `get-dependencies.sh` script like sicl has currently, and 2) working on a project with dependencies on other projects, but where you might want to make changes to the dependencies in the process of working on the top-level project
cosimone` has joined #commonlisp
<mortemeur> pjb: thank you
<beach> saltrocklamp[m]: Thanks for the summary. Very helpful.
cosimone has quit [Ping timeout: 245 seconds]
khrbt has joined #commonlisp
doyougnu has joined #commonlisp
<etimmons> beach: salt rock lamp : CLPM is another option (shameless self plug)
<etimmons> adding commits to dependencies is not as smooth as with submodules yet, but it is possible
<etimmons> Plus you can perform many dep management tasks straight from your REPL :)
<pjb> repo helps with commits and pushing on all the git repos it pulls. I've not tried it in this aspect, from the summary doc, it looked like this part was rather specialized to the needs of google though.
<etimmons> pjb: That's what they use to manage the Android code base, right?
<pjb> Yes.
<saltrocklamp[m]> i haven't heard of repo or clpm
<pjb> Note that repo can be used for other things.
<saltrocklamp[m]> got any links?
<pjb> Some links in this readme: https://github.com/informatimago/ergo
<etimmons> <https://www.clpm.dev/> with a tutorial in slide form at <https://www.clpm.dev/tutorial/tutorial.html>
<shka> what mortemeur said
<saltrocklamp[m]> clpm looks really nice!
Oladon has quit [Ping timeout: 250 seconds]
luis has quit [Ping timeout: 252 seconds]
<saltrocklamp[m]> does it integrate w/ roswell at all?
<saltrocklamp[m]> ah i see google repo is for managing a collection of git repos
<saltrocklamp[m]> also, hey! someone already wrapped libgit2 and i didn't realize https://github.com/russell/cl-git/
<saltrocklamp[m]> common-lisp-repo is no relation to google repo? they just share a name?
<etimmons> I don't use roswell, so I honestly don't know what roswell integration would look like.
<etimmons> But it can use roswell managed implementations
<etimmons> cl-git is kind of old and has manually generated bindings, so it's out of date wrt current libgit2 versions. That's a major reason I chose to not extend it. (I also didn't like the licensing situation)
<saltrocklamp[m]> noted. eric made a wrapper using their claw tool, but i don't think they intend to maintain it
<saltrocklamp[m]> > The lispified wrappers are very much in the experimentation phase, so I can't really recommend using it.
<saltrocklamp[m]> :)
<saltrocklamp[m]> oops, the :) was my addition
<etimmons> I think you're mixing up me and borodust. I don't think borodust has any intention to maintain those. I plan to maintain my bindings once I finish the lispified wrappers :)
<etimmons> (which also use claw)
<saltrocklamp[m]> oh, sorry! i did mix you up
luis has joined #commonlisp
<etimmons> The main reason I'm working on those wrappers is for CLPM, actually.
<saltrocklamp[m]> wait... i didn't realize who i was talking to :D
<borodust> saltrocklamp[m] etimmons: yup, exactly, steal it - i don't plan to keep them up to date
<saltrocklamp[m]> this cold has addled my brain
<saltrocklamp[m]> in any case, i'm not entirely sure how qlot does it, but the idea is that you can do `qlot exec cmd ...` and it sets things up to use your project-local systems instead of the global/system-wide ones
<saltrocklamp[m]> it looks like clpm is similar
<saltrocklamp[m]> i've struggled a bit getting qlot to work reliably so i'm happy to try switching. i am going through the clpm tutorial slides
<saltrocklamp[m]> i see you have `clpm bundle exec`
<etimmons> borodust: Thanks :) I'm also planning to steal your method of distributing the compiled lib in a separate project (but probably allow it to be turned off in case someone *really* wants to use their system libgit2 and knows the risks)
<etimmons> salt rock lamp: yep! that command is equivalent to `qlot exec`
<borodust> etimmons: no problemo, glad it helps)
mortemeur has quit [Read error: Connection reset by peer]
<saltrocklamp[m]> if you are looking to flesh out the repl interface, you might want to look at the julia package manager. my biggest complaint with it is that there's no standalone cli interface, but the repl interface is really interesting/powerful, and supports things like centrally-located "named" environments
<borodust> etimmons: i saw twitter discussion about static linking - minor note: libc often tightly coupled to kernel api, so it's not always safe to run newer things on oldish systems
<etimmons> salt rock lamp: I'll take a look at it! CLPM also supports centrally-located named environments (in addition to the project local ones)
<borodust> not sure about musl, like, what are their guarantees about compat with kernels
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<etimmons> borodust: I believe musl works all the way down to 2.6.something
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<etimmons> I think the biggest concern is syscalls changing. It's been pointed out to me that Linux is an anomaly in guaranteeing a stable syscall interface. Darwin and BSDs can apparently change them on a whim
<borodust> yup, that's why the note is minor - linking statically solves the problem only partially :)
<etimmons> So I'm only doing static executables for Linux at the moment
<etimmons> If a BSD user wants to use it, presumably they're comfortable with compiling things themselves :)
<pjb> etimmons: indeed, there's a movement of developpers targetting the linux syscalls directly instead of the posix libc…
<pjb> Given that some new useful linux syscalls don't make it into the posix API (or so slowly).
<etimmons> I can see the attraction of that, but man it must be a pain to implement appropriate fallbacks. Especially when the libc folks have done it already!
<shka> etimmons: also, this would work only for linux
<shka> on BSD/OSX system api is not stable
<etimmons> shka: Yep! I'm only doing static executables on Linux because of that.
<etimmons> I forget who originally pointed that out to me, but I'm glad they did. Saved me a lot of work and future pain and suffering
minion has quit [Remote host closed the connection]
charles_ has joined #commonlisp
minion has joined #commonlisp
iamFIREcracker has joined #commonlisp
pve_ has joined #commonlisp
markasoftware_ has joined #commonlisp
scymtym_ has joined #commonlisp
andreyorst_ has joined #commonlisp
Inline has joined #commonlisp
amb007 has quit [*.net *.split]
pve has quit [*.net *.split]
scymtym has quit [*.net *.split]
santiago` has quit [*.net *.split]
iamFIREc1 has quit [*.net *.split]
Jach has quit [*.net *.split]
robin has quit [*.net *.split]
shka has quit [*.net *.split]
semz has quit [*.net *.split]
perrierjouet has quit [*.net *.split]
dec0d3r has quit [*.net *.split]
santiagopim has quit [*.net *.split]
ahlk has quit [*.net *.split]
andreyorst has quit [*.net *.split]
hirez- has quit [*.net *.split]
specbot has quit [*.net *.split]
edgar-rft has quit [*.net *.split]
markasoftware has quit [*.net *.split]
char has quit [*.net *.split]
edgar-rft has joined #commonlisp
khrbt has quit [Ping timeout: 264 seconds]
dstein64 has quit [Excess Flood]
ahlk has joined #commonlisp
Jach has joined #commonlisp
amb007 has joined #commonlisp
robin has joined #commonlisp
semz has joined #commonlisp
dec0d3r has joined #commonlisp
hirez- has joined #commonlisp
specbot has joined #commonlisp
dstein64 has joined #commonlisp
doyougnu has quit [Read error: Connection reset by peer]
gaqwas has quit [Ping timeout: 265 seconds]
cage has joined #commonlisp
perrierjouet has joined #commonlisp
<saltrocklamp[m]> do i have this right? `proclaim`: global effect, it's not processed at compile time. `declaim`: global effect, and if it's a top-level form then it's processed at compile time. `declare`: allowed only in certain places of certain forms, local effect.
gaqwas has joined #commonlisp
hendursa1 has quit [Ping timeout: 276 seconds]
<Bike> essentially. keep in mind that declare expressions aren't actually forms and can't be evaluated.
khrbt has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
paule32_ has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 265 seconds]
X-Scale` is now known as X-Scale
paule32 has quit [Ping timeout: 265 seconds]
CrashTestDummy3 has quit [Ping timeout: 265 seconds]
shka has joined #commonlisp
hendursaga has joined #commonlisp
Psybur has joined #commonlisp
slyrus_ has joined #commonlisp
<saltrocklamp[m]> ok, makes sense
scymtym_ has quit [Ping timeout: 260 seconds]
flip214_ has joined #commonlisp
prxq has joined #commonlisp
childlikempress has joined #commonlisp
sjl_ has joined #commonlisp
jdz_ has joined #commonlisp
bldr_ has joined #commonlisp
Spawns_Carpeting has joined #commonlisp
<pjb> saltrocklamp[m]: of course, you can force a proclaim to be processed at compilation time, if you wrap it in an eval-when like declaim does.
<saltrocklamp[m]> ah, so that's how declaim works?
<jeosol> etimmons: I recall you have a tool for making static executabe - , do you have a link handy?
<pjb> (macroexpand-1 '(declaim (not-inline foo))) #| --> (progn (eval-when (:compile-toplevel) (ccl::compile-time-proclamation '((not-inline foo)) nil)) (eval-when (:load-toplevel :execute) (proclaim '(not-inline foo)))) ; t |#
SAL9000_ has joined #commonlisp
Faed has joined #commonlisp
<pjb> saltrocklamp[m]: yes.
andreyorst` has joined #commonlisp
<saltrocklamp[m]> cool, ty
Spawns_Carpetin- has quit [Ping timeout: 265 seconds]
Krystof has quit [Ping timeout: 265 seconds]
andreyorst_ has quit [Ping timeout: 265 seconds]
phadthai has quit [Ping timeout: 265 seconds]
SAL9000 has quit [Ping timeout: 265 seconds]
moon-child has quit [Ping timeout: 265 seconds]
flip214 has quit [Ping timeout: 265 seconds]
anddam has quit [Ping timeout: 265 seconds]
mfiano has quit [Ping timeout: 265 seconds]
bldr has quit [Ping timeout: 265 seconds]
Posterdati has quit [Ping timeout: 265 seconds]
prxq_ has quit [Ping timeout: 265 seconds]
Fade has quit [Ping timeout: 265 seconds]
sjl has quit [Ping timeout: 265 seconds]
jdz has quit [Read error: Connection reset by peer]
slyrus has quit [Ping timeout: 265 seconds]
pve_ has quit [Ping timeout: 265 seconds]
tux0r has quit [Ping timeout: 265 seconds]
_death has quit [Ping timeout: 265 seconds]
pve has joined #commonlisp
Posterdati has joined #commonlisp
mfiano has joined #commonlisp
tux0r has joined #commonlisp
SAL9000_ is now known as SAL9000
adeht has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
adeht is now known as _death
akoana has joined #commonlisp
mortemeur has joined #commonlisp
karlosz has joined #commonlisp
anddam has joined #commonlisp
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 252 seconds]
X-Scale` is now known as X-Scale
tyson2 has joined #commonlisp
lottaquestions has joined #commonlisp
<jeosol> etimmons: thanks
X-Scale has quit [Ping timeout: 250 seconds]
X-Scale` has joined #commonlisp
<jeosol> I remember seeing the article before and hence me compiling with the :sb-linkable-runtime option
<jeosol> so I get the sbcl.o file
X-Scale` is now known as X-Scale
Faed is now known as Fade
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
modula has joined #commonlisp
defaultxr has quit [Ping timeout: 265 seconds]
modula is now known as defaultxr
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
paule32_ has quit [Ping timeout: 260 seconds]
CptKirk has joined #commonlisp
<CptKirk> is there a way to use "lisp-mode" any time I open slime? I tried the basic versions I found from a simple search, but none seem to do the trick
aeth has quit [Ping timeout: 240 seconds]
<Bike> the mode is per-buffer. usually if you open a file with .lisp extension emacs will put it in the correct mode. what particularly are you having a problem with?
<CptKirk> I want to have emacs treat my slime buffer as though it were a lisp buffer
<CptKirk> so that I get newlines and highlighting and paredit, etc
<CptKirk> atm when I hit return in slime, it evaluates, no matter where my cursor is, and so I can't do newlines correctly
<Bike> you mean the repl buffer?
<CptKirk> eys
<Shinmera> etimmons: I made another big step for Forge https://twitter.com/Shinmera/status/1443652788916039687
<pve> CptKirk: you'll lose functionality
<Bike> hm, i don't know how to do that. paren matching gets a little weird with the > prompts and output and stuff
aeth has joined #commonlisp
<akater[m]> CptKirk: Consider enabling paredit-mode on its own.
<CptKirk> well then how do you recommend I configure 'slime-mode so that I can actually use it for more than just evaluating from another buffer?
<pjb> CptKirk: (add-hook 'lisp-mode 'paredit-mode)
<CptKirk> but that's in lisp-mode, not in slime mode
<pjb> CptKirk: you really don't want slime repl buffers to be lisp-mode. You want them to be slime-mode
hendursaga has quit [Ping timeout: 276 seconds]
<CptKirk> no I don't want them to be lisp-mode
<CptKirk> I want them to share the configuration with lisp-mode
<pjb> CptKirk: you can activate paredit-mode in slime repl buffers, but it would deactivate itself soon, as soon as a non balanced parenthesis is printed.
<pve> CptKirk: does enter in the repl window map to slime-repl-return?
cosimone` has quit [Ping timeout: 250 seconds]
<Bike> it's common to do any complicated code in another buffer rather than the repl
<pjb> (format t "~{~D) Menu Item.~%~}" '(1 2 3))
<akater[m]> I ended up writing ≈everything in Org blocks with poly-org. It provides repl-like experience. Apparently it's underappreciated.
<mfiano> CptKirk: S-RET
<pjb> CptKirk: Indeed, and using C-x C-e in the lisp-mode buffer to send the expression to slime.
hendursaga has joined #commonlisp
<pjb> CptKirk: or even slime-eval-last-expression-in-repl
<pjb> You can bind it eg. to A-e (add-hook 'lisp-mode 'my-lisp-key-binding-meat) (defun my-lisp-key-binding-meat() (interactive) (local-set-key (kbd "A-e") 'slime-eval-last-expression-in-repl))
<pjb> With that, you can send expressions from your lisp source to the repl.
lottaquestions has quit [Ping timeout: 268 seconds]
<copec> I was going to ask if there were a way to scroll through last input in place in the slime repl instead of scrolling the buffer
* copec looks up slime manual
<CptKirk> but if I use <S-ret> there's no alignment, etc
<mfiano> There is if you use aggressive-ident-mode
<copec> Do you all use the default emacs keybindings?
<mfiano> No
<pjb> copec: with a lot of added custom key bindings.
Skyfire has quit [Ping timeout: 260 seconds]
<mfiano> copec: C-A-r if IIRC
<mfiano> and C-A-s for forward
<mfiano> where A = M I suppose
<akater[m]> copec: I use a mixture of defaults and xah-fly-keys (with some personal things on top of x-f-k) which is modal but non-vi. And plenty of personal bindings independent of x-f-k.
<contrapunctus> copec: I've used Evil, god-mode, and now a mix of Boon and my own hydra keys. I also use the Space key as Ctrl, which would also be helpful to anyone using stock Emacs keys with a keyboard whose modifiers are not under the thumbs.
CptKirk has quit [Remote host closed the connection]
<copec> Apparently I've never used a keyboard where the modifiers are under my thumbs, emacs always makes me play twister with my fingers
<akater[m]> I have SPC-‹smth› act as C-‹smth› as well… in X, that is. Such behaviour is non-trivial to implement in Linux console (and I'm mostly in console).
Skyfire has joined #commonlisp
<akater[m]> What is also important, I use programmer-dvorak so `(` is within the reach of (the left) index finger, and needs no S-.
<Josh_2> Why do values in my slots sometimes end up as lists like (nil) and other times they are just nil? This is within my metaclass
<Josh_2> Kind of annoying
<Bike> how do you set them
<akater[m]> And I realised I just never press `)` but I never did anything with this, sadly.
<Josh_2> Using initargs Bike
<Josh_2> hmm is it the distinction between initform and initarg?
<Bike> so you have like, (make-instance class :foo nil :bar nil), but (foo instance) => nil while (bar instance) => (nil)?
<Bike> it's impossible to answer your question without more detail. the system doesn't just randomly make things into lists
<Josh_2> no no, in the class definition
<Josh_2> One sec
<Josh_2> like (defclas ... (<slots>) (:metaclass <my meta>) (:rate-limited-p nil)) etc
<Josh_2> Seems that the initform is not a list but if I set it with an initarg then the value becomes a list
<Bike> what initform?
<Bike> you didn't write any initforms.
<mfiano> I don't see an initform
lisp123 has joined #commonlisp
<Bike> is the problem rate-limited-p being (nil) where you expect it to be nil?
<Bike> because that's part of the defclass macro, as explaind here http://metamodular.com/CLOS-MOP/the-defclass-macro.html
<Bike> if you macroexpand the defclass form you'll probably see :rate-limited-p '(nil) in there
lottaquestions has joined #commonlisp
<Josh_2> Okay np
Nilby has joined #commonlisp
<lisp123> Does anybody have a link to the source code for CLiki? I saw it a while back but for the life of me can't find it again
<etimmons> Shinmera: Congrats! I have a question, but I'll ask it on Twitter
<Shinmera> Alright, though here works too :)
<mfiano> It's a CLF project, so it's on the CL foundation's gitlab site
<etimmons> Shinmera: ok. You said "The server will then compute the plan and send the necessary steps to the client to execute." But presumably the server can execute some of the steps as well, right?
<etimmons> Such as compile-file, and then just tell the client to load it ?
<Shinmera> I mean, it can insofar that it's a Lisp process, too. But that's really not the intended way of functioning.
<Shinmera> You could theoretically devise an executor that performs any necessary compile-file operations on a different client, if that's a concern.
<etimmons> Actually, maybe compile-file was a bad example since you want to ensure fasl compatibility
<etimmons> but I thought steps like downloading files wouldn't be performed by the client
<etimmons> But maybe you just don't consider that to be part of the plan
<Shinmera> The plan will require file transfer if the machine the client is on does not have the necessary file to perform the step.
<Shinmera> So for instance a file-step will have a dependency on an ensure-artefact-step which, well, ensures the file is present on the client's machine.
<Shinmera> The server has a registry where it tracks what artefacts are present on what machine, and when the client connects it has to specify what machine it resides on.
<etimmons> ok
<Shinmera> This also allows it to transfer back a file such as a fasl from a different machine.
<lisp123> mfiano: Thanks, found it
<etimmons> and let's say that file needs to be downloaded from the internet. Would the plan tell the client to load an HTTP client and then download it?
<Shinmera> No, it can't do that.
<Shinmera> All files need to be trackable by the server.
<Shinmera> So for instance all source files necessary for the compilation need to reside on the server's machine
<Shinmera> If a client is then missing a file, the server will send it over.
<etimmons> and how do you envision those source files getting to the server?
<Shinmera> I have not thought about that part much.
<Shinmera> For now the user will put them there in some way. Scanning for projects and such is completely undone and not thought about yet.
<etimmons> OK. I guess I just jumped straight to that because that's the part that's been on my mind the most :P
<Shinmera> Right.
<Shinmera> I'm sure you have some good ideas there
<Shinmera> What I'm thinking right now is that there might be a hook during the planning process that allows you to get in and intercept when there's an unresolved dependency, provide the sources, and then continue the plan somehow.
<Shinmera> Though the downloading and such would definitely be a separate module, rather than being part of the core.
<Shinmera> I imagine that's where you could come in :)
<etimmons> Still, very cool. I don't know if you're considering this as well, but if you've got this client/server architecture already you may be able to use the server as a remote fasl cache.
<Shinmera> I have not thought about it much, but sure.
<Shinmera> There's still a lot of missing pieces
<etimmons> Yeah, that's what I was thinking about part of the plan being executed server side. I can definitely see myself using this :)
<Shinmera> I'm not 100% decided yet, but I think my next step is going to be implementing a Lisp module to actually perform some lisp compilation and loading.
<Shinmera> etimmons: for that you can just spawn a client on the same machine as the server.
<Shinmera> you could also spawn a client in the same process as the server
tyson2 has joined #commonlisp
lottaquestions has quit [Ping timeout: 252 seconds]
<etimmons> Ahhhh so a single session may involve more than one client? and those subsidiary clients could be dumb workers (i.e., they never ask the server how to do something, the server just tells them what to do)
<Shinmera> yes
<etimmons> very cool
<etimmons> I missed that aspect of your vision earlier
<Nilby> Sometime I dream of a quality declaration for compilation like (trust 0) which will compile it in a totally isolated environment, and (trust 3) that will block compile it in the same image with full storage access.
<Shinmera> One of the primary goals for me is that you can say "load the client, ask it to load a system into my image, then remove the client" so you have a clean setup of that system to work with. This necessarily makes the clients extremely thin (I can't depend on any other libraries, for instance).
<Nilby> even though I dislike the whole vague quality number thing
<etimmons> Right, I am 100% onboard with that, which is why I was confused that it seemed like the client executed all steps.
rotateq has joined #commonlisp
<etimmons> But it makes total sense now if there are multiple clients participating in a session
<Shinmera> potentially, yeah.
<Shinmera> though I imagine the usual case for Lisp will still be single client.
<Shinmera> thank god for fast compile times :)
<etimmons> yeah, presumably single client is enough for most cases
<Shinmera> Another goal is to allow you to depend on C/++/etc libraries as well, which will make the build happen with Forge as well. And for those you very much do want parallelisation.
tyson2 has quit [Remote host closed the connection]
<etimmons> that's music to my ears. I love pure CL solutions, but sometimes you just need to reach for foreign libs. Having that be part of a unified build process would be amazing.
<Shinmera> Yeah
<Shinmera> Long way out though.
Inline has quit [Ping timeout: 260 seconds]
<etimmons> Do you have thoughts on how systems are declared yet?
<etimmons> Probably not, but figured I'd ask
<Shinmera> Nope!
<Shinmera> I'd like a mix of declarative and functional though.
cosimone has joined #commonlisp
<Shinmera> I think project definition is going to be the last thing I look at.
<etimmons> So no :defsystem-depends-on causing arbitrary code to be loaded by simply reading the definition?
minion has quit [Remote host closed the connection]
<Nilby> The bane of a tool I was writing was arbitrary code in ".asd"s
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<etimmons> Nilby: same same
specbot has quit [Ping timeout: 245 seconds]
madnificent_ has quit [Ping timeout: 252 seconds]
<Nilby> But I think it's totally reasonable to have to compute something during build. I just wish it was separated.
easye has quit [Ping timeout: 240 seconds]
okflo has quit [Ping timeout: 260 seconds]
Shinmera has quit [Read error: Connection reset by peer]
sterni has quit [Ping timeout: 264 seconds]
Colleen has quit [Ping timeout: 260 seconds]
Shinmera has joined #commonlisp
fe[nl]ix has quit [Ping timeout: 265 seconds]
specbot has joined #commonlisp
sterni has joined #commonlisp
<Shinmera> etimmons: that could potentially happen, but it would only be on the server itself.
minion has joined #commonlisp
fe[nl]ix has joined #commonlisp
<Shinmera> etimmons: I imagine that projects first define a list of modules they depend on (Lisp, C, whatever), which the server might not always load up front.
gxt has quit [Remote host closed the connection]
azimut has quit [Read error: Connection reset by peer]
ec has quit [Read error: Connection reset by peer]
azimut has joined #commonlisp
gxt has joined #commonlisp
okflo has joined #commonlisp
madnificent has joined #commonlisp
<etimmons> Fair enough. I'm excited to follow this progress :)
lisp123 has quit [Remote host closed the connection]
<etimmons> And happy to spitball dependency management ideas whenever it makes sense
lisp123 has joined #commonlisp
ec has joined #commonlisp
<Shinmera> Yeah
<Shinmera> I'm still mostly busy with Kandria, so I have this on the backburner right now.
<Nilby> I'm optimistic that you guys will materialize an awesome new ways of building.
lisp123 has quit [Ping timeout: 252 seconds]
elderK has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has quit [Read error: Connection reset by peer]
scymtym has joined #commonlisp
minion has joined #commonlisp
specbot has joined #commonlisp
<Shinmera> I'm materialising some way of building, whether it'll be awesome or not remains to be seen :)
<etimmons> I'm honestly surprised at how much you've gotten done with Kandria on the front burner.
<Shinmera> a lot of it was adjacent enough to kandria that I could use some of the time for it.
<Shinmera> Forge, too, I have the excuse of "this is going to be important for modding" so it's still something I can invest some Kandria time into.
<Nilby> I'm sure it will be. It won't be hard to be awesomer than asdf.
<Shinmera> I feel like that's both disingenuous to ASDF's accomplishments and to what we're doing :u
<etimmons> Speaking of Kandria, that reminds me I need to boot into Windows to give it a try... It's sluggish on my Linux partition and it wouldn't surprise me if my rather esoteric setup is to blame.
<Shinmera> etimmons: If you hit F10 in the game, does anything obvious jump out from the diagnostics it displays?
mmk2410 has quit [Quit: ZNC - https://znc.in]
<Nilby> Shinmera: You're right. It is much harder than all that. I know asdf's accomplishments because of what a large footprint uiop has to have.
doyougnu has joined #commonlisp
mmk2410 has joined #commonlisp
phadthai has joined #commonlisp
<Nilby> The whole building issue is greatly hampered by not having a comprehensive portable wrapper around operating systems and implementations.
<etimmons> Shinmera: Nothing really jumps out at me other than that FPS is not consistent and it doesn't seem to be due to GC.
<Nilby> I only minimize it because I can now after many years stand on a house of cards trash heap that does os/implementation junk for me.
<Shinmera> Well, that's where another advantage of etimmons' and I's approach comes in: by having the builder decoupled in a process, you don't have to worry about being portable at all.
<Shinmera> etimmons: Are you running on Intel graphics?
<etimmons> yes
<Shinmera> ah. that'll do it :)
<etimmons> ha, ok. Looks like I got to get my laptop's discrete card working under Linux again...
<Shinmera> intel graphics are going to chug, especially older models.
<Shinmera> I should figure out how to optimise it, because I don't think it should be as bad as it is, but I could so far not determine why.
<Nilby> can confirm Intel graphics makes nearly every game sluggish
<Nilby> I can barely express my rage at graphics drivers, shader compilers, and really graphics hardware companies
<etimmons> Nilby: UIOP has too large a footprint, IMO. I also think it should be more decoupled from ASDF than it is, but it's hard to put that genie back in the bottle at this point.
<Shinmera> While that's true Kandria still shouldn't be as demanding as it is.
<Shinmera> etimmons: agreed.
<Shinmera> etimmons: though I feel it's another consequence of the coupled approach.
<Nilby> but actual retro games didn't have such good lighting :)
andreyorst` is now known as andreyorst
kevingal has joined #commonlisp
<Shinmera> That may be true, but it doesn't mean it can't be optimised, either.
Lord_of_Life has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
Lord_of_Life has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
cosimone has quit [Remote host closed the connection]
Krystof has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
pve has quit [Quit: leaving]
childlikempress is now known as moon-child
Colleen has joined #commonlisp
<jcowan> Nilby: Simple answer: don't use graphics. Stick to text as God and Gutenberg intended.
notzmv has quit [Ping timeout: 250 seconds]
selwyn has quit [Quit: Leaving]
notzmv has joined #commonlisp
utis has joined #commonlisp
shka has quit [Ping timeout: 252 seconds]
<rotateq> Nilby: we had discussed some format magic yesterday evening, you would have liked it :) iirc you know much about that too
tyson2 has joined #commonlisp
<Nilby> Since I don't have the skill, I'm stuck making boring text games, so maybe I should make an "escape from format", or "format battle" game.
<rotateq> it was about how using the ~b directive to format a number in a way like "0000 0110 1111 0001"
<Nilby> Interesting. I'm reading it. pjb is a format ninja too.
<rotateq> he's a few years ahead of me with experience :)
<rotateq> There nearly could be written a little book just about format magic. ^^
<Nilby> I somewhat perversely like writing format strings, but I admit the meaning of reading things like "~{~<~%~1,80:;~a~> ~}" and "~{~@[~a~^ ~]~^~}" doesn't immediately jump out.
<rotateq> yes
<rotateq> it must be practiced to read and write those
gaqwas has quit [Ping timeout: 246 seconds]
<Nilby> Nor can I explain why I like writing format, but not so much APL or perl.
<rotateq> okay to perl I can't say anything
<rotateq> APL fits well to me too :)
<rotateq> Nilby: hm the first control string you gave does a formatting upto 80 columns, or what?
<rotateq> unfortunately i should sleep soon
<Nilby> rotateq: Yes. You win the guess the format string of the day!
notzmv has quit [Read error: Connection reset by peer]
<rotateq> but i don't know from memory the ~< directive. ~{ was for iterating
<rotateq> and ~[ was for decisions
<Nilby> "~<" is start-logical-block for pretty printing, but can also be used for text justification.
<rotateq> don't worry, I'll practice piece by piece
notzmv has joined #commonlisp
<rotateq> the goto capability can be useful
<rotateq> but how correctly using ~/ I'm still not sure
<rotateq> sleep well :)
<Nilby> rotateq: You too. I use ~/ for printing my own string type.
<rotateq> i'll comeback to it if it fits
rotateq has quit [Quit: ERC (IRC client for Emacs 27.2)]
beach` has joined #commonlisp
frgo_ has quit [Remote host closed the connection]
igemnace has joined #commonlisp
frgo has joined #commonlisp
beach has quit [Ping timeout: 252 seconds]
sm2n has quit [Read error: Connection reset by peer]
kevingal has quit [Remote host closed the connection]
sm2n has joined #commonlisp
<pjb> Nilby: you should write a format control string parser and explainer.
rgherdt has quit [Ping timeout: 264 seconds]
<saltrocklamp[m]> i'd love that
<saltrocklamp[m]> something like https://regex101.com/ but for lisp format strings
<pjb> Hey, I find this POC code defining a lispy set equivalent to specifiers: https://termbin.com/drsp
<pjb> saltrocklamp[m]: ideone.com let you run random CL code, so you can try out FORMAT.
<saltrocklamp[m]> well yeah i can do that in my repl too :) the "explainer" in the top right is what i had in mind
<Nilby> pjb: I think one could do an expansion into function calls, but explaining what it's supposed to do or mean is advanced AI that's beyond me and/or might need a very extensive training set.
<pjb> saltrocklamp[m]: oh right.
<pjb> (formatter "~{~A~^, ~}") #| --> #<Anonymous Function #x30202CED9CFF> |#
<pjb> it's a macro. macroexpand it, and see what your implementation does.
<pjb> in ccl, it calls (ccl::do-sub-format-0 *standard-output* "~{~A~^, ~}" ' ((1 2 3))) #| 1, 2, 3 --> nil |# which is not very explicative.
<pjb> But some other implementation may expand to something more interesting.
<Nilby> If I was an educator I might work on it, but for now it's easier to do like saltrocklamp[m] and use my faulty built-in one.
<Nilby> It might be useful though if translating CL into other languages.
<pjb> or as a tool like cdecl, to explain complex format-control strings.
<pjb> for example, it could expand to an expression using my fmt operators in the above termbin.
<saltrocklamp[m]> yeah i like little "calculator" or "explainer" tools
<saltrocklamp[m]> i'm bookmarking the c declaration one
lisp123 has joined #commonlisp
<Nilby> pjb: Those fmt operators make me think that it it could natural consequence of a format implementation designed in such a way.
lisp123 has quit [Ping timeout: 252 seconds]
* Nilby is reading SICL's format compiler
elderK has quit [Quit: Connection closed for inactivity]
<pjb> Nilby: exactly.
random-nick has quit [Ping timeout: 252 seconds]