phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
Josh_2 has joined #lisp
rpg has joined #lisp
cosimone has joined #lisp
ym555 has joined #lisp
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
slac-in-the-box has quit [Ping timeout: 246 seconds]
asdf_asdf_asdf has joined #lisp
torbo has quit [Remote host closed the connection]
<asdf_asdf_asdf> Hi. Which instruction in Lisp do "function pointer" - https://en.wikipedia.org/wiki/Function_pointer? E.g.: "double (*func1)(double) = cm_to_inches;" - How it do?
libertyprime has joined #lisp
<Bike> use cffi
lavaflow has joined #lisp
pierpal has joined #lisp
lumm has quit [Quit: lumm]
<aeth> asdf_asdf_asdf: This sort of wrapping is seen as boring and is almost always automated in some way, e.g. XML/JSON spec parsing, grovel, cl-autowrap, claw, etc.
<aeth> It's possible that the only person who knows the answer is the author of such a tool, and that author will probably say "use my tool"
<no-defun-allowed> Um, maybe they mean they want a "pointer" to a function. How about #'foo for the function FOO?
<aeth> no-defun-allowed: no, asdf_asdf_asdf has been for days/weeks asking in here how to manually wrap WinAPI in a SBCL-specific way
zotan has quit [Ping timeout: 250 seconds]
zotan has joined #lisp
<no-defun-allowed> Oh.
lavaflow has quit [Ping timeout: 252 seconds]
<aeth> which is probably pretty close to asking how to manually compile by hand LLVM IR to x86-64 asm in #llvm
<aeth> (or, probably, more accurately, asking how to do that in ##c)
orivej has quit [Ping timeout: 252 seconds]
<aeth> asdf_asdf_asdf: If I were you I would just take the offer from borodust from last week. <borodust> lemme know what header you need a wrapper for and i can arrange it in 15 min or smth
<aeth> asdf_asdf_asdf: At the very least, you get to see what correct output looks like even if you don't do the whole thing automatically generated
zotan has quit [Ping timeout: 255 seconds]
zotan has joined #lisp
wxie has joined #lisp
mindCrime has quit [Ping timeout: 244 seconds]
<asdf_asdf_asdf> Thanks, but which function is equivalent to "double (*func1)(double) = cm_to_inches;"?
<asdf_asdf_asdf> Instruction "values", "declare", "proclaim"?
<Bike> none of those things are functions. you are asking a question that doesn't really make sense in context, like how much green weighs
<asdf_asdf_asdf> In my opinion is function which get "Function pointer".
<aeth> Do you mean function pointers for interfacing with C or are you asking about higher order functions or...?
<Bike> and foreign-pointer or whatever
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
meepdeew has joined #lisp
<asdf_asdf_asdf> I must pass (type-alien (pointer-to-callback)) to struct.
<asdf_asdf_asdf> (slot-name type-alien)
<asdf_asdf_asdf> Type-alien must be type alien, not lisp type probably.
<asdf_asdf_asdf> I don't call callback, only pass him to variable.
<asdf_asdf_asdf> get-lisp-obj-address
<asdf_asdf_asdf> And I must pass signature callback to variable.
<asdf_asdf_asdf> How pass signature to variable? Signature it for example: LRESULT (int int). I must pass it to variable. How it do?
<asdf_asdf_asdf> (setf (slot WNDCLASS 'lpfnWndProc) WindowProc)
meepdeew has quit [Ping timeout: 255 seconds]
<asdf_asdf_asdf> (lpfnWndProc ...) ; <-- What insert instead dots?
<asdf_asdf_asdf> I must pass: return type, arguments type.
<asdf_asdf_asdf> Because is it signature function.
meepdeew has joined #lisp
<oni-on-ion> difficult to understand
mindCrime has joined #lisp
meepdeew has quit [Ping timeout: 246 seconds]
dddddd has quit [Ping timeout: 245 seconds]
cyberoctopi has joined #lisp
<asdf_asdf_asdf> https://cpy.pt/9rxp7MN5 <-- I want it.
khisanth_ has quit [Ping timeout: 252 seconds]
<oni-on-ion> this does not work ?
mindCrime has quit [Read error: Connection reset by peer]
<asdf_asdf_asdf> This is for example.
mindCrime has joined #lisp
<oni-on-ion> (let ((x 0)) (setf x *func*) (funcall x 3)) ==> 5
<asdf_asdf_asdf> I have (define-alien-type nil (struct foo (lpfnWndProc ...))) If instead ... will be WindowProc I have error: "Undefined alien ...".
<asdf_asdf_asdf> "Undefined alien type ...".*
wxie has quit [Ping timeout: 252 seconds]
<asdf_asdf_asdf> Function pointer it have be.
Necktwi has quit [Ping timeout: 246 seconds]
<oni-on-ion> ok i dont have windows
keep_learning has joined #lisp
ym555 has quit [Quit: leaving...]
<asdf_asdf_asdf> oni-on-ion; how write it in Common Lisp: double (*func1)(double) = cm_to_inches;"?
<asdf_asdf_asdf> Which instructions?
Necktwi has joined #lisp
<oni-on-ion> all three of those links are full of inco
<oni-on-ion> info *
shangul has joined #lisp
<oni-on-ion> in lisp that is (let ((func1 cm_to_inches)) )
khisanth_ has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
lavaflow has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
<asdf_asdf_asdf> OK, thanks.
<oni-on-ion> yep
atgreen__ has quit [Remote host closed the connection]
atgreen__ has joined #lisp
lavaflow_ has joined #lisp
<beach> Good morning everyone!
lavaflow has quit [Ping timeout: 252 seconds]
akoana has joined #lisp
<pjb> asdf_asdf_asdf: by the way, yesterday I passed by a github providing Windows ABI for CL…
ludston has joined #lisp
caltelt has quit [Ping timeout: 268 seconds]
<aeth> pjb: Several people have provided several different links for that, and borodust offered to run his autowrapper. asdf_asdf_asdf seems to be ignoring all of that.
dddddd has joined #lisp
actuallybatman has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
akoana has left #lisp [#lisp]
jkordani has quit [Read error: Connection reset by peer]
adlai has quit [Ping timeout: 245 seconds]
adlai has joined #lisp
asarch has quit [Quit: Leaving]
Nomenclatura has joined #lisp
<Nomenclatura> I'm stupid.
<Josh_2> Why's that?
<Nomenclatura> I've been lazily trying to get into programming for a while... like French.... Sure I have learned some Frech and some programming but I dunno a single person who speaks Frech to practice with and I really dunno what to do with programming.
Bike has quit [Quit: Lost terminal]
<Josh_2> Common advice is to always "just make something"
<no-defun-allowed> Make a program to help you decide
<Nomenclatura> Sure, I can learn how to code a sqare and how to add numbers ordisplay a stupid hello world, but I dunnot what to actually do with that
<Nomenclatura> something enticing and useful...
<Nomenclatura> right
<Nomenclatura> "something"
<Josh_2> Find a problem you have and solve it?
<Nomenclatura> There is software already made for like everything
<Nomenclatura> there has never been a single problem I haven't solved with existing software or a wuick bash hack
<Nomenclatura> **quick
<Josh_2> Well I don't know then
anewuser has quit [Ping timeout: 246 seconds]
vlatkoB has joined #lisp
shangul has quit [Ping timeout: 255 seconds]
atgreen__ has quit [Ping timeout: 250 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
<oni-on-ion> seconded @ :just-make-something !
<Nomenclatura> "something"
<Josh_2> Ikr
<oni-on-ion> anything
<Josh_2> Build a website or something
<Nomenclatura> you know, when I was in school and we took those aptitude tests meant to guide you what you should study?
<oni-on-ion> the first thought that surfaces in your heart when you ask yourself "what should i make"
<Josh_2> the sky turn green
<Josh_2> damn
<Nomenclatura> I always got that I could do "anything"
<oni-on-ion> sounds corny or cheesy but honestly the heart knows
<Nomenclatura> not very guiding
<Josh_2> Flip a coin
<oni-on-ion> we can. being human is quite a powerful position
<oni-on-ion> being overwelmed with option and choice and variety and FOMO is something i am personally very familiar with
<Josh_2> FOMO?
<oni-on-ion> fear of missing out (new software, trends, anything)
<oni-on-ion> distractions
<Josh_2> oh right
<Nomenclatura> sure. thought building a website was a good idea but it feels such a waste of time when there is a lot of ggood web frameworks I could just use
<Nomenclatura> oni-on-ion: gotcha
<Nomenclatura> yes
<Josh_2> Yes, use a framework
<oni-on-ion> 2wk ago i just buckled down all my tools and gear and mindset and environment and went to work. feels great now. work is hard too dont let the rough spots break you down just climb over them
<beach> Nomenclatura: Here is a list of stuff you can work on: http://metamodular.com/Common-Lisp/suggested-projects.html
gabbiel has joined #lisp
<oni-on-ion> Nomenclatura, hehe yep, i had that mindset as well. there will *always* be something else to tempt us. but the key is to invest in the one thing, that makes all the difference; to put your time and sweat and effort and attention toward something is what makes it worth it. (took me a while to learn this)
<gabbiel> pjb: That save-place macro is good, but I was thinking, what if I want new to be nil?
<White_Flame> Nomenclatura: there are 2 ways of programming; Programming as a hobby, and programming to get something done
<Nomenclatura> I don't even like IT
<Josh_2> oof
<oni-on-ion> eh
<Nomenclatura> I like Linux...
<Nomenclatura> and IT feeds me
<White_Flame> programming as a hobby works because people intrinsically enjoy the act of programming, and the nested challenges it offers
<Nomenclatura> oh well, that's another subject
<White_Flame> but, if you don't really get any pleasure from programming for its own sake, then that's different
<White_Flame> you'll have to actually work at it, but then the question is for what purpose?
<White_Flame> getting something specific implemented would be such a purpose
<Nomenclatura> Not starving lol
<White_Flame> or career advancement or whatever
<LdBeth> GG
<White_Flame> if it's just a job for you, then have you gone through a CS degree?
<Nomenclatura> Guess some times you just have to hammer into things
<LdBeth> Another losing sanity
<White_Flame> it won't teach you actual pragmatics of programming, but is the magic paper into many programming jobs
<oni-on-ion> LdBeth hehe
<Nomenclatura> White_Flame: nah. Been in IT for like 10 years without one
<Nomenclatura> guess I'll just become a performance dancer or something
<White_Flame> but if you want to transition into programming specifically (not sure where the label "IT" has hits borderlines), that is a path
<Nomenclatura> oni-on-ion is right
<Nomenclatura> I appreciate programming, it's beautiful... so is Music and I am not trying to become Perlman
<Nomenclatura> maybe I shoukld just look away and look for something else to do
shangul has joined #lisp
<oni-on-ion> as soon as i get paid for something i like, i start to not like it
<LdBeth> oni-on-ion: sadness ahead
<White_Flame> as everybody gets more and more greedy, and interactions become less about value exchange and more about lock-in and obligatory monetary extraction, I like money less and less
<White_Flame> or at least, I like participation in economic systems less and less
<Nomenclatura> oni-on-ion: Right.But more because when you get paid for it they start to ask for a lot of other stuff such as admin paperwork, filling spreadsheets, studying boring ISOs and stuff
<edgar-rft> oni-on-ion: try getting paid for something you don't like from the beginning to avoid disappointment
<Josh_2> ^ xD
<Nomenclatura> *pro life-coaching* right there
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
ggole has joined #lisp
sauvin has joined #lisp
FreeBirdLjj has joined #lisp
crystalball has joined #lisp
dddddd has quit [Remote host closed the connection]
<oni-on-ion> edgar-rft, precisely =)
<oni-on-ion> LdBeth, ?
<LdBeth> Because get paid for doing something dislike won’t make ppl happy, either
<oni-on-ion> Nomenclatura, yes. i have really nothing else that is as interesting for a hobby ("spare time") as programming. so if i were programming as a job, i would probably play video games and watch movies instead =/
<oni-on-ion> LdBeth, i don't know... but i would not feel good to get paid *and* enjoy something
<LdBeth> Probably gettin paid for streaming video games but write programs instead would be more fun XD
<pjb> gabbiel: then use (place &optional (new nil newp)) and test newp instead of new.
<oni-on-ion> ehh. well here is my formula to sum it all up:
<pjb> (or ,new ,(car store-vars)) -> ,(if newp new (car store-vars))
MrDiamond has joined #lisp
<oni-on-ion> play points, work points. work a bunch, build up play points. play a lot, build up play points. need work points to work, need play points to play. now here is the trick to it. when you play too much and run out of play points, it becomes work. people start to get mad at their video game or headaches and social problems etc. now the same with too much work; it becomes play and does not get serious. need a delicate balance of both
<Nomenclatura> (gets ((oni-on-ion) yes) .thanks
* oni-on-ion should have put that into some CL syntax
<oni-on-ion> Nomenclatura, =) =)
<oni-on-ion> sry **"play a lot, build up work points". you know
<oni-on-ion> excersize and cleaning and difficult things like waiting in line counds as "work" (contribute to society in some form)
<oni-on-ion> anyway =)
Arcaelyx has quit [Ping timeout: 258 seconds]
<oni-on-ion> programming as it is right now, there are things i dont want to do (work) and things i want to do (play). it is a real-time balance adjustment. can't always do the fun stuff because then it turns to work (ie. defensive optimization, overdesign and adding problems just to solve them)
<oni-on-ion> (spending too much working, then i will start to configure emacs and change font colors and try to force more caffeine and frown more etc)
v88m has quit [Read error: Connection reset by peer]
<oni-on-ion> sorry for the non-CL speak. just realised i was spending 30min on reddit and feels like it turns into a chore. the laughs are over. back to work ! =)
v88m has joined #lisp
_whitelogger has joined #lisp
crystalball has quit []
crystalball has joined #lisp
dacoda has joined #lisp
pierpal has quit [Quit: Poof]
<aeth> Nomenclatura: if you want exciting software, you can try #lispgames stuff
pierpal has joined #lisp
asdf_asdf_asdf has quit [Quit: Page closed]
dacoda has quit [Ping timeout: 258 seconds]
gabbiel has quit [Ping timeout: 255 seconds]
crystalball has quit []
crystalball has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
crystalball has quit []
FreeBirdLjj has quit [Remote host closed the connection]
crystalball has joined #lisp
FreeBirdLjj has joined #lisp
crystalball has quit [Client Quit]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
crystalball has joined #lisp
FreeBirdLjj has quit [Ping timeout: 258 seconds]
crystalball has quit [Remote host closed the connection]
crystalball has joined #lisp
nowhere_man has joined #lisp
mindCrime has quit [Excess Flood]
mindCrime has joined #lisp
nowhereman has quit [Ping timeout: 258 seconds]
wxie has joined #lisp
crystalball has quit []
dale has quit [Quit: dale]
<Nomenclatura> aeth: thanks!
Nomenclatura has quit [Quit: q]
igemnace has quit [Quit: WeeChat 2.4]
cyberoctopi has quit [Ping timeout: 244 seconds]
nowhere_man has quit [Ping timeout: 244 seconds]
<shangul> Any OS with Lisp tools and a Lisp implementation as its shell? Emulating Lisp machines for example
cyberoctopi has joined #lisp
<beach> shangul: Look at Mezzano.
<beach> shangul: There is also Movitz, but I don't think it is being maintained. The author has declared that he wants to create a new version.
mindCrime has quit [Ping timeout: 245 seconds]
<beach> shangul: The author of Mezzano is froggey, and that of Movitz is frodef.
<beach> shangul: I am planning on as well, but it is not going to be imminent: http://metamodular.com/closos.pdf
<wxie> Does anyone have a copy of Movitz?
<shangul> I hope I can install it on my 4GB flash drive
<beach> wxie: I do, but I don't know how recent it is.
<shangul> oh no!
<shangul> "It requires a 64-bit x86 machine"
<beach> Movitz is for 32-bit machines, unless it has been updated since.
<shangul> How about building Mezzano for 32-bit machines?Is that possible?
<beach> shangul: Ask froggey. He is here now.
<shangul> but he is idling(probably)
<oni-on-ion> Lispstick
<beach> shangul: Then you'll just have to wait.
<shangul> right
<shangul> oni-on-ion, That's not an OS
Josh_2 has quit [Read error: Connection reset by peer]
<beach> Though if you read Tanenbaum & Bos "Modern Operating Systems", you will learn that Genera, Movitz, and Mezzano can't possibly exist, because according to that book, it is impossible to write an operating system in a language that requires automatic memory management.
<shangul> I just wanted to talk about this
<shangul> Surely the OS can't be entirely written in CL
<beach> *sigh*
<no-defun-allowed> It absolutely can.
<shangul> no-defun-allowed, without assembly and C?
<no-defun-allowed> Well, barring some assembler, but that's not gone in C OSes.
<shangul> of course I'm not an OS expert
<no-defun-allowed> C is just portable assembler, shangul.
<shangul> no-defun-allowed, go on
<beach> shangul: As no-defun-allowed points out, then an OS can't be written in C either.
<no-defun-allowed> beach: Real OS developers write their OS out of TTL logic chips.
<shangul> lol
<beach> Mhm.
<shangul> no-defun-allowed, what about transistors?
<no-defun-allowed> shangul: For microkernels, you have to fab your own.
<beach> shangul: It does not have to contain any assembler. There can be a code-generator module in the compiler that generates machine code directly, without using an assembler.
manualcrank has quit [Quit: WeeChat 1.9.1]
<no-defun-allowed> Alternatively, you could generate consing-free code for your CL runtime. The T Scheme system did this a fair bit for its own runtime.
cyberoctopi has quit [Ping timeout: 255 seconds]
<shangul> beach, Does such a thing exist?
<shangul> (except DOS compilers)
<beach> shangul: It depends on your definition of "assembler".
cyberoctopi has joined #lisp
<beach> shangul: Most Common Lisp compilers would have an intermediate representation that looks like a symbolic version of machine code. You may or may not call that "assembler".
<beach> shangul: Certainly, the compiler needs to contain knowledge about the processor instructions and such.
<no-defun-allowed> I should also add most C operating systems are written in invalid C technically: how do we get pointers to wherever (such as 0xb8000 for video memory) and what do we do without malloc, free, etc? There is no conforming C runtime or client code there.
<beach> no-defun-allowed: That's what I meant when I said that no operating system can be written in C.
<jackdaniel> doesn't that apply to CL as well?
<beach> Of course, yes.
<no-defun-allowed> Yes, but it's more of a comment on ridiculous constraints set by the authors.
<beach> The standards (C and Common Lisp) do not have anything in them that allows direct access to memory by conforming code.
<no-defun-allowed> ...of Modern Operating Systems. X3J13 isn't in the wrong.
<jackdaniel> I apparently misunderstood, I thought we are bashing C again ;-)
<no-defun-allowed> jackdaniel: Oh, C is a perfectly fine [Segmentation fault, core dumped]
<beach> No, just explaining to shangul that the constraint is uninteresting.
<aeth> if we must bash a language we should bash bash
<no-defun-allowed> bash is a stringly typed language
<MichaelRaskin> Bash is better than C. You have a chance to concatenates trings in bash and not leakmemory
kajo has joined #lisp
FreeBirdLjj has joined #lisp
<oni-on-ion> common statements from non-C devs
<oni-on-ion> pizza is aweful because one can choke and suffocate
<no-defun-allowed> Most pizzas aren't made of lead and have nails in them.
<jackdaniel> it is like in this meme: 'CL: "I feel sorry for you C!", C: "I don't think about you at all CL"'
<oni-on-ion> C is unix language -- dumping core is like stacktrace for a process. don't see how its like ebola
<oni-on-ion> n-d-a point is, foot shooting
<no-defun-allowed> oni-on-ion: http://simson.net/ref/ugh.pdf
<MichaelRaskin> It's fine when it does dump core, the problem is that it should have but does not
<jackdaniel> I know that I may have incited bash (sorry about that), but let's focus on the channel topic :)
<no-defun-allowed> "Ugh" is a good response to someone suggesting Unix is a good idea too.
<oni-on-ion> ah, i have no opinions on unix =) looks like a nice read though thx, downloaded
<oni-on-ion> MichaelRaskin, lisp functions raise exceptions all day
<jackdaniel> signal conditions to be exact
<beach> shangul: So let me put it this way, I don't think Mezzano contain any code in a language that is not Common Lisp.
<oni-on-ion> noted
<no-defun-allowed> Lisp conditions don't dump core.
<oni-on-ion> core dump == uncaught exception. whats the diff? system is not moving
<no-defun-allowed> Even if we go back to the CADR machine days, you got a debugger.
<jackdaniel> no-defun-allowed: conforming C does not either. I'm sure you saw LDB in sbcl at least once, and AVER twice or thrice ,p
<no-defun-allowed> Indeed I have.
<jackdaniel> let's focus on advancing Common Lisp world instead of patting ourself that we did chose better than C programmers ^_^
<jackdaniel> on the back°
FreeBirdLjj has quit [Ping timeout: 246 seconds]
<oni-on-ion> there is a lot to be said about these statements
<no-defun-allowed> There are more ways for a C program to dump core. Yeah, let's talk about something else.
<oni-on-ion> run in debugger is the same for anywhere, the world is all right =)
<no-defun-allowed> I read in a Smalltalk editor there was a command to move some selected code into a method and replace it with that method call. Is there such a thing in SLIME?
<oni-on-ion> CLOS can redefine signatures/interfaces on living instances
<oni-on-ion> could you elaborate or specify more detail on "replace it with that method call"
<no-defun-allowed> Say I have (defun f (x) (let ((y ......)) (g x y))), and I select the G call, which is actually more complex cause magic. Then it would ask me for a name, I write something like H, and it places (defun h (x y) (g x y)) before that defun.
<oni-on-ion> my first thought is 'paredit'
<oni-on-ion> refactoring magics
<oni-on-ion> also package called 'redshank'
<no-defun-allowed> There is also some simple closure analysis though, copy-paste can't tell what variables are closed by that form. (Let's not worry about macros for now.)
<oni-on-ion> yea, seems like http://www.foldr.org/~michaelw/emacs/redshank/ does some extra things for context
<oni-on-ion> but using paredit (et.al) i cannot recommend higher for the business of s-expressing
SyrupThinker has joined #lisp
cyberoctopi has quit [Ping timeout: 258 seconds]
mindCrime has joined #lisp
_whitelogger has joined #lisp
MrDiamond has quit [Quit: MrDiamond]
Necktwi has quit [Ping timeout: 258 seconds]
campy_fellow has quit [Ping timeout: 258 seconds]
nowhere_man has joined #lisp
campy_fellow has joined #lisp
mindCrime has quit [Ping timeout: 258 seconds]
shangul has quit [Ping timeout: 246 seconds]
froggey has quit [Ping timeout: 268 seconds]
froggey has joined #lisp
ravenousmoose has joined #lisp
shangul has joined #lisp
cyberoctopi has joined #lisp
zooey has quit [Ping timeout: 256 seconds]
karlosz has quit [Quit: karlosz]
cyberoctopi has quit [Remote host closed the connection]
cyberoctopi has joined #lisp
zooey has joined #lisp
_whitelogger has joined #lisp
campy_fellow has quit [Ping timeout: 244 seconds]
campy_fellow has joined #lisp
cyberoctopi has quit [Remote host closed the connection]
cyberoctopi has joined #lisp
datajerk has quit [Quit: ZNC 1.7.3 - https://znc.in]
random-nick has joined #lisp
crystalball has joined #lisp
powerbit has joined #lisp
rixard has joined #lisp
datajerk has joined #lisp
crystalball has quit []
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shifty has quit [Ping timeout: 246 seconds]
wigust has joined #lisp
cyberoctopi has quit [Ping timeout: 258 seconds]
wigust- has quit [Ping timeout: 258 seconds]
iskander has quit [Quit: Quit]
cyberoctopi has joined #lisp
cyberoctopi has quit [Ping timeout: 245 seconds]
<flip214> well, in vim it would be 'da(' for "delete this parenthesis", "{" to move outside the "paragraph" (ie. the current DEFUN), "p" to paste, and then a bit of typing to surround with the necessary (DEFUN h ()" stuff
iskander has joined #lisp
shangul has quit [Quit: sudo rm -rf /usr/*]
buffergn0me has quit [Ping timeout: 258 seconds]
kslt1 has joined #lisp
cyberoctopi has joined #lisp
wxie has quit [Ping timeout: 250 seconds]
cyberoctopi has quit [Ping timeout: 246 seconds]
cyberoctopi has joined #lisp
cyberoctopi has quit [Read error: Connection reset by peer]
jfb4 has joined #lisp
nowhere_man has quit [Ping timeout: 258 seconds]
dkmueller has joined #lisp
Necktwi has joined #lisp
pankajgodbole has joined #lisp
frodef has joined #lisp
jmarciano has quit [Remote host closed the connection]
atgreen__ has joined #lisp
crystalball has joined #lisp
crystalball has quit [Client Quit]
rixard has quit [Quit: (eq status leaving) T]
Inline has quit [Quit: Leaving]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
ravenousmoose has joined #lisp
Folkol has quit [Read error: Connection reset by peer]
troydm has joined #lisp
Folkol has joined #lisp
nopf has joined #lisp
cosimone has joined #lisp
scymtym has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
igemnace has joined #lisp
FreeBirdLjj has joined #lisp
crystalball has joined #lisp
shangul has joined #lisp
FreeBirdLjj has quit [Ping timeout: 258 seconds]
random-nick has quit [Ping timeout: 246 seconds]
ravenousmoose has joined #lisp
Bike has joined #lisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
libertyprime has quit [Ping timeout: 258 seconds]
lumm has joined #lisp
crystalball has quit []
wxie has joined #lisp
<LdBeth> Good evening
ym555 has joined #lisp
FreeBirdLjj has joined #lisp
dddddd has joined #lisp
random-nick has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
kslt1 has quit [Remote host closed the connection]
_whitelogger has joined #lisp
orivej has joined #lisp
igemnace has quit [Quit: WeeChat 2.4]
crystalball has joined #lisp
crystalball has quit [Client Quit]
shangul has quit [Ping timeout: 246 seconds]
shangul has joined #lisp
lumm has quit [Quit: lumm]
lumm has joined #lisp
lumm has quit [Client Quit]
lumm has joined #lisp
lumm_ has joined #lisp
lumm has quit [Ping timeout: 258 seconds]
lumm_ is now known as lumm
wxie has quit [Quit: wxie]
xuxuru has joined #lisp
q-u-a-n has joined #lisp
<shangul> What is "define"?
<shangul> a link please
<beach> There is no such thing in Common Lisp.
<shangul> I know
<shangul> What is it in other Lisps?
d4ryus has quit [Quit: WeeChat 2.4]
<beach> Well, #lisp is a channel dedicated to Common Lisp.
<beach> So the question might be more appropriate for ##lisp which is about Lisp in general.
<shangul> thanks
<edgar-rft> shangul: define sounds like #scheme
<shangul> edgar-rft, I've found it in the original lisp
Zaab1t has joined #lisp
<beach> shangul: There is no widely agreed-upon definition of "Lisp", so we avoid the issue by only dealing with Common Lisp, which *is* well defined.
<edgar-rft> shangul: then it's indeed a question for ##lisp
Zaab1t has quit [Client Quit]
<shangul> I've joined that channel and asked my question there
rdh has joined #lisp
varjag has joined #lisp
d4ryus has joined #lisp
nowhere_man has joined #lisp
pierpal has quit [Ping timeout: 258 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
t58 has joined #lisp
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 258 seconds]
ravenousmoose has joined #lisp
<shangul> Anyone has got a copy of Movitz?
<beach> Yes, I do.
<beach> But I haven't run it for some time.
<shangul> beach, I'll be thankful if you upload it somewhere and give me the link to download :)
rdh has quit [Ping timeout: 250 seconds]
<beach> Just ask frodef. He comes to #sicl regularly. Or send him email. I don't know how up-to-date my code is.
ym has joined #lisp
scymtym has quit [Ping timeout: 268 seconds]
<shangul> frodef, update project's page. has 404 links
<beach> Oh, he is here too.
<edgar-rft> shangul: I think https://gitlab.common-lisp.net/movitz is what you're looking for
<shangul> edgar-rft, I'm looking for a pre-build image
<edgar-rft> Sorry, I don't have a prebuild image, but here's a description how yow you can make one yourself https://trac.common-lisp.net/movitz/wiki/FromNothingToImage
<edgar-rft> But *sigh*, again dead source-code links. This seems indeed a thing only frodef can solve.
Arcaelyx has joined #lisp
v88m has quit [Ping timeout: 246 seconds]
rixard has joined #lisp
FreeBirdLjj has joined #lisp
ensat1 has joined #lisp
rixard has quit [Quit: (eq status leaving) T]
v88m has joined #lisp
Achylles has joined #lisp
cosimone has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ebrasca has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
cosimone has joined #lisp
cosimone has quit [Client Quit]
Josh_2 has joined #lisp
cosimone has joined #lisp
lemoinem has quit [Killed (adams.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
cosimone has quit [Client Quit]
jack_rabbit has quit [Read error: Connection timed out]
nckx has quit [Read error: Connection reset by peer]
nckx has joined #lisp
Achylles has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
nicdev has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
jack_rabbit has joined #lisp
cosimone has joined #lisp
v88m has quit [Ping timeout: 246 seconds]
dkmueller has quit [Quit: WeeChat 1.6]
shangul has quit [Ping timeout: 268 seconds]
ebrasca has quit [Remote host closed the connection]
varjag has quit [Ping timeout: 268 seconds]
SenasOzys has joined #lisp
femi has quit [Ping timeout: 255 seconds]
femi has joined #lisp
meepdeew has joined #lisp
gabbiel has joined #lisp
shangul has joined #lisp
v88m has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
femi has quit [Ping timeout: 246 seconds]
jack_rabbit has quit [Read error: Connection timed out]
femi has joined #lisp
hiroaki has joined #lisp
rumbler31 has joined #lisp
gabbiel has quit [Ping timeout: 255 seconds]
elinow has joined #lisp
gabbiel has joined #lisp
varjag has joined #lisp
rozenglass has joined #lisp
varjag has quit [Ping timeout: 258 seconds]
jack_rabbit has joined #lisp
pierpal has joined #lisp
jack_rabbit has quit [Excess Flood]
SenasOzys has quit [Ping timeout: 255 seconds]
Arcaelyx has quit [Ping timeout: 255 seconds]
femi has quit [Ping timeout: 244 seconds]
femi has joined #lisp
ensat1_ has joined #lisp
asarch has joined #lisp
ensat1 has quit [Ping timeout: 245 seconds]
ensat1_ has quit [Quit: leaving]
mindCrime has joined #lisp
jack_rabbit has joined #lisp
rdh has joined #lisp
rdh has quit [Remote host closed the connection]
manualcrank has joined #lisp
jack_rabbit has quit [Max SendQ exceeded]
<interruptinuse> hey #lisp, does anyone know of a way to use GNU readline with (read-line) (clisp, mainly)? if I use (read-line) in a REPL, it supports line editing, but doesn't in batch mode
<Josh_2> You want to read an entire file?
<interruptinuse> not really, look
<Josh_2> i'm looking
<interruptinuse> i'd like to use a sort of a DSL REPL from a lisp file
<asarch> Is it really bad to do (defclass my-window (glut:window) ...) and then (defmethod glut:display ((w my-window)) ...)?
<asarch> Is there any other way to (re-?) define glut:display?
<asarch> I've tried with (defmethod display ((w my-window)) ...) but the main process cannot use it
<interruptinuse> Josh_2: i don't need completions or whatnot, but clisp batch-mode (read-line) by itself doesn't support line editing, which would be comfy
<Josh_2> emacs and slime
<interruptinuse> okay, one more time
makomo has joined #lisp
<interruptinuse> file.lisp is a standalone program which has a small REPL of its own, and will likely be executed in batch mode as `clisp file.lisp`. it evaluates strings which are read by read-line. how can I use line editing with this setup?
v88m has quit [Ping timeout: 258 seconds]
<interruptinuse> my last resort atm is ffi-ing readline, which is not that bad, but i was wondering there's something built-in i could exploit
<interruptinuse> (readline = GNU line editing library, read-line = standard CL function)
rumbler31 has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<Bike> read-line itself doesn't have line editing, it's just waiting for your terminal, i think
<interruptinuse> well, there are two different behaviors of read-line
<interruptinuse> the first one is in batch mode, when you go `clisp file.lisp`, and it doesn't do anything except read stdin
<grewal> According to this, https://clisp.sourceforge.io/beta/impnotes/readline-mod.html, clisp has builtin support for calling readline
<Bike> interactive read-line isn't different. it's just waiting for an actual line to appear on stdin. i think.
Arcaelyx has joined #lisp
FreeBirdLjj has quit [Ping timeout: 258 seconds]
rumbler31 has joined #lisp
SenasOzys has joined #lisp
mindCrime has quit [Ping timeout: 258 seconds]
<interruptinuse> grewal: oh yeah
<interruptinuse> grewal: the readline package is exactly what i was looking for
meepdeew has quit [Remote host closed the connection]
SenasOzys has quit [Read error: Connection reset by peer]
nowhereman has quit [Ping timeout: 258 seconds]
meepdeew has joined #lisp
ravenousmoose has joined #lisp
eddof13 has joined #lisp
lumm has quit [Ping timeout: 252 seconds]
meepdeew has quit [Ping timeout: 252 seconds]
eddof13 has quit [Ping timeout: 244 seconds]
atgreen__ has quit [Remote host closed the connection]
atgreen__ has joined #lisp
lumm has joined #lisp
lumm has quit [Client Quit]
lumm has joined #lisp
lavaflow_ has quit [Ping timeout: 245 seconds]
meepdeew has joined #lisp
<pjb> interruptinuse: how do you perform interactive line editing in batch?
<pjb> interruptinuse: notice: man readline: readline - get a line from a user with editing
<pjb> "from a user" = interactive
<pjb> Then the description insists: "readline will read a line from the terminal and return it"
<pjb> "from the terminal" = interactive. There's no batch here. And in batch, there's no terminal!
meepdeew has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #lisp
<pjb> later, it says about bash: "The editing mode may be switched during interactive use by using the -o option to the set builtin command. "
t58 has quit [Quit: Leaving]
<pjb> Notice that they don't say that the editing mode may be switched during *batch* use. But explicitely during *interactive* use!
<pjb> Finally, where do you get keycodes from, when you're reading a file in batch?
Achylles has joined #lisp
meepdeew has joined #lisp
FreeBirdLjj has quit [Ping timeout: 258 seconds]
<interruptinuse> pjb: my understanding of clisp's "batch mode" phrase is that it means compiling or running files without a REPl
meepdeew has quit [Remote host closed the connection]
meepdeew has joined #lisp
<interruptinuse> so the answer to your question is "read from stdin with appropriate termios, hopefully with the help of readline, which makes that easier", which to my understanding isn't forbidden by laws of nature
<interruptinuse> interactivity isn't limited to the interpreter's REPL
<interruptinuse> (also, a bash script can read into a variable using readline with -e)
v88m has joined #lisp
<interruptinuse> (also also, what do you mean by "where do you get keycodes from"? you specify the interpreted file on the cmdline, so stdin is still available)
dkmueller has joined #lisp
rozenglass has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
lumm_ has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
lumm has quit [Ping timeout: 245 seconds]
lumm_ is now known as lumm
rumbler31 has quit [Ping timeout: 255 seconds]
gxt has quit [Ping timeout: 250 seconds]
lavaflow_ has joined #lisp
makomo has joined #lisp
nowhereman has joined #lisp
rumbler31 has joined #lisp
<pjb> interruptinuse: did you pass a -repl argument?
<pjb> interruptinuse: the point is that stdin in batch mode is not the terminal.
Lycurgus has joined #lisp
lumm has quit [Quit: lumm]
lumm has joined #lisp
shifty has joined #lisp
<pjb> and the error message is rather clear: $ clisp -norc -q -ansi -x '(read-line)'
<pjb>
<pjb> *** - READ: input stream #<INPUT STRING-INPUT-STREAM> has reached its end
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<pjb> Well I cannot test it, it looks like my clisp has been compiled without readline anyways.
<pjb> I guess you could just use rlwrap: rlwrap clisp -norc -q -ansi -x '(read-line *terminal-io*)'
<pjb> this works.
<gabbiel> pjb: thanks you're a real g
nanoz has quit [Ping timeout: 258 seconds]
elinow has quit [Ping timeout: 246 seconds]
<interruptinuse> pjb: nope, I didn't pass a -repl argument
<interruptinuse> m clisp's behavior differs between -x and passing a file, for what it's worth
<interruptinuse> my*
Lycurgus has quit [Quit: Exeunt]
McParen has joined #lisp
gabbiel has quit [Remote host closed the connection]
<pjb> interruptinuse: the best is to enfore readline using rlwrap.
<pjb> But be sure to use *terminal-io*, not *standard-input*.
cosimone has quit [Quit: WeeChat 2.3]
caltelt has joined #lisp
<interruptinuse> (read-line *terminal-io*) actually works without rlwrap in batch for me, not sure how portable that is
<interruptinuse> thanks to :readline in features i guess
<pjb> readline is not specified by CL.
<pjb> So if you want it, use rlwrap around any CL implementation.
<pjb> Or you can also re-implement readline using listen, peek-char and read-char.
xuxuru has quit [Quit: xuxuru]
<interruptinuse> pjb: i was going to go with using clisp's ffi readline module, but with having to configure it to disable completion (because common lisp completion doesn't make sense for a dsl)
meepdeew has quit [Remote host closed the connection]
<interruptinuse> but on second thought, actually offloading all that to rlwrap and running with -disable-readline might be easier and more portable
varjag has joined #lisp
<pjb> I would think. Also, you can configure an inputrc for your dsl
<pjb> That said, I don't understand why you want to do that in batch mode anyways. This is not how to use clisp interactively.
<pjb> You could generate an executable image.
meepdeew has joined #lisp
McParen has quit [Ping timeout: 258 seconds]
meepdeew has quit [Ping timeout: 245 seconds]
lumm_ has joined #lisp
elinow has joined #lisp
lumm has quit [Ping timeout: 248 seconds]
lumm_ is now known as lumm
defunkydrummer has joined #lisp
Inline has joined #lisp
karlosz has joined #lisp
karlosz has quit [Client Quit]
<asarch> If I have: (defparameter *pos* (make-instance 'point :x 0 :y 0 :z 0)), is there any shorthand for the C++ pos.x += delta;?
cosimone has joined #lisp
<asarch> (setf (x *pos*) (+ (x *pos*) delta)))
<asarch> ?
<makomo> asarch: incf
<Bike> (incf (x *pos*) delta)
<makomo> (incf <place> <amount>)
dale has joined #lisp
<Bike> if you want something other than +, you can use define-modify-macro, or alexandria comes with a few
<gjvc> what's a concise introduction to CLOS ?
<asarch> Thank you!
<asarch> Thank you very much! :-)
<defunkydrummer> gjc
shangul has quit [Ping timeout: 245 seconds]
sunset_NOVA has joined #lisp
<asarch> "Object-Oriented Programming in Common Lisp" by Sonja E. Keene gjvc
<gjvc> thank you asarch
<asarch> Also, chapters 16 and 17 of "Practical Common Lisp" by Peter Seibel: http://www.gigamonkeys.com/book/
<asarch> And, of course, this channel
dale_ has joined #lisp
<asarch> The most horny channel about CLOS :-P
dale has quit [Disconnected by services]
<asarch> JK :-P
dale_ is now known as dale
defunkydrummer has quit [Ping timeout: 258 seconds]
rumbler31 has quit [Ping timeout: 246 seconds]
dale_ has joined #lisp
dale has quit [Disconnected by services]
dale_ is now known as dale
asdf_asdf_asdf has joined #lisp
rumbler31 has joined #lisp
anamorphic has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cosimone has quit [Quit: WeeChat 2.3]
cosimone has joined #lisp
ravenousmoose has joined #lisp
hiroaki has quit [Ping timeout: 258 seconds]
_whitelogger has joined #lisp
khisanth_ has quit [Ping timeout: 245 seconds]
vlatkoB has quit [Remote host closed the connection]
anamorphic has quit [Ping timeout: 246 seconds]
eabarbosa has joined #lisp
makomo has quit [Ping timeout: 258 seconds]
dkmueller has quit [Quit: WeeChat 1.6]
dkmueller has joined #lisp
dkmueller has quit [Client Quit]
dkmueller has joined #lisp
dkmueller has quit [Client Quit]
dkmueller has joined #lisp
<gjvc> i'm going to review those chapters tonight
dkmueller has quit [Client Quit]
ggole has quit [Quit: Leaving]
dkmueller has joined #lisp
dkmueller has quit [Client Quit]
dkmueller has joined #lisp
mindCrime has joined #lisp
dkmueller has quit [Client Quit]
dkmueller has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
khisanth_ has joined #lisp
<asarch> How is better when you have an if-else with several lines of code? Is it (if (foop) (progn ...) (progn ...))?
<asarch> Because, for a single if, unles and when do the job, right?
<asarch> *unless
<Bike> i always use cond if i'd have to do if progn
<asarch> Well, this is a simply condition to initialize the OpenGL scene: if (antialias) { /* do the operations for anti-alias */ } else { /* do operations for a normal rendering */ }
mindCrime_ has joined #lisp
mindCrime has quit [Ping timeout: 246 seconds]
<Bike> still cond
<asarch> (cond (not (null antialias)) ...)
lumm has quit [Remote host closed the connection]
libertyprime has joined #lisp
eabarbosa has quit [Remote host closed the connection]
mindCrime_ has quit [Excess Flood]
mindCrime_ has joined #lisp
<nirved_> (not (null x)) is x
cosimone has quit [Quit: WeeChat 2.3]
<Bike> in an if condition yeah
notzmv has joined #lisp
sunset_NOVA has quit [Quit: Leaving]
<asarch> Yeah, that's Norvig way to: if (x) {...
<aeth> The only time you need not null or not not or whatever to get the actual value t is if you're storing the value.
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
<aeth> because a lot of the time the truthy value could be anything, including e.g. a database connection that disconnects in a finalizer (and you just added a reference if you store it)
Arcaelyx has joined #lisp
<asarch> I see
<asarch> Thank you
<asarch> (lunch-time :brb :beers)
<asarch> See you later guys :-)
asarch has quit [Quit: Leaving]
lumm has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
<stylewarning> (not (null x)) is good hygiene sometimes if x is some type (OR NULL S)
<stylewarning> yes it's equivalent to (if x ...) but I think sometimes the emphasis is good to bring you from the type (OR NULL X) to the type BOOLEAN.
<stylewarning> (you get used to it when you program in a strictly typed language for a little while, which I think is positively hygienic for Lisp code)
<asdf_asdf_asdf> (declare (type (integer 3)))
frodef has quit [Ping timeout: 258 seconds]
Achylles has quit [Ping timeout: 252 seconds]
lumm has quit [Quit: lumm]
lumm has joined #lisp
libertyprime has quit [Ping timeout: 246 seconds]
Achylles has joined #lisp
libertyprime has joined #lisp
dkmueller has quit [Quit: WeeChat 1.6]
<aeth> asdf_asdf_asdf: if that's a question, that means an integer that is at least 3, but it does nothing because you didn't actually declare any variable to be of that type like e.g. (let ((x 42)) (declare (type (integer 3) x)) x)
<aeth> the variable(s) go after (integer 3)
makomo has joined #lisp
<aeth> The syntax is a bit awkward. Most people with declaration-heavy code write (or use) macros to generate it
<asdf_asdf_asdf> aeth, OK. It was example.
lavaflow_ has quit [Ping timeout: 246 seconds]
papachan has joined #lisp
elinow has quit [Quit: Leaving]
papachan has quit [Client Quit]
_whitelogger has joined #lisp
defunkydrummer has joined #lisp
jfb4 has quit [Ping timeout: 252 seconds]
anamorphic has joined #lisp
moldybits` has quit [Quit: WeeChat 2.4]
dkmuelle1 has joined #lisp
asdf_asdf_asdf has quit [Quit: Page closed]
<defunkydrummer> hi anamorphic from texas
<defunkydrummer> thanks for the updates to IUP
rozenglass has joined #lisp
rozenglass has quit [Client Quit]
<dim> phoe: as you said you're interested in contributing to pgloader, I made myself a Pull Request rather than just pushing on master as I would usually do, so that you can review some CL refactoring of the code: https://github.com/dimitri/pgloader/pull/970
<dim> it's moving some copy/pasted parts into a generic function API with a common implementation, now that I have 3 copies of the same thing lying around
<dim> if you feel like reviewing that PR is useful for you, let me know, otherwise I'll just squash-merge it ;-)
moldybits has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
<phoe> dim: OK, will do that tomorrow
dkmuelle1 has quit [Quit: WeeChat 1.6]
<dim> as you see fit, there's no timing that I care very much about here, and it's only if you find it fun/interesting of course
<dim> I'm just trying to make it easier to step in the project ;-)
dkmuelle1 has joined #lisp
Lord_of_Life_ has joined #lisp
Oladon has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
random-nick has quit [Ping timeout: 258 seconds]
dkmuelle1 has quit [Quit: WeeChat 1.6]
dkmuelle1 has joined #lisp
Arcaelyx has quit [Ping timeout: 258 seconds]
dkmuelle1 has quit [Quit: WeeChat 1.6]