Tobbi has quit [Remote host closed the connection]
<White_Flame> yeah, VECTOR-PUSH might have had a number of keyword parameters to do stuff like that, but many of the simpler or lower level standard functions are pretty specific in their use
<White_Flame> perhaps to keep them fast back in the day
varjagg has quit [Ping timeout: 240 seconds]
<throwprans|prans> White_Flame: I see, thanks.
dxtr has quit [Quit: Lost terminal]
openthesky has joined #lisp
<mgsk> What's the appropriate method of removing a sublist from a list? i.e. `(remove '(1 2 3) '((1 2 3) (4 5 6)))` => ((4 5 6))
<throwprans|prans> mgsk: (remove '(1 2 3) '((1 2 3) (4 5 6)) :test #'equal)
<White_Flame> add :test #'equal
<throwprans|prans> Beat you to it ;)
* mgsk should've read the doc more carefully
<mgsk> cheers
<White_Flame> I think the test by default is just #'eql
<White_Flame> (throwprans|prans I eplained more ;))
<White_Flame> *explained
<pfdietz> That is correct in almost all cases in Common Lisp.
<throwprans|prans> The spec is silent about it.
<throwprans|prans> huh!
<White_Flame> no, one of the general information sections says that tests on sequences default to #'eql or something
<throwprans|prans> That makes sense.
<throwprans|prans> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node141.html and elements are tested for being eql to that item. (A test other than eql can be specified by the :test or :test-not keyword.
<throwprans|prans> I think that is the one you were referring to?
fluke` has joined #lisp
<pfdietz> Also, look up "Same" in the glossary.
<pfdietz> "Since eq is used only rarely in this specification, eql is the default predicate when none is mentioned explicitly."
krwq has joined #lisp
varjagg has joined #lisp
lroca has joined #lisp
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
varjagg has quit [Ping timeout: 264 seconds]
FareTower has quit [Ping timeout: 248 seconds]
nirved has quit [Quit: Leaving]
fikka has quit [Ping timeout: 248 seconds]
openthesky has quit [Ping timeout: 264 seconds]
markong has quit [Ping timeout: 240 seconds]
qjube has quit [Quit: qjube]
dddddd has joined #lisp
pierpa_ has quit [Quit: Page closed]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
<_death> EQ is used only for GETF and friends
<pfdietz> It's also used in CATCH and THROW.
<_death> right
drewc_ has quit [Ping timeout: 248 seconds]
throwprans|prans has quit [Ping timeout: 260 seconds]
Folkol has quit [Quit: Textual IRC Client: www.textualapp.com]
Folkol has joined #lisp
Oladon has joined #lisp
drewc_ has joined #lisp
EvilTofu has joined #lisp
<EvilTofu> Hello! Are there any coding conventions for lisp?
mukuge has joined #lisp
<mukuge> Hi. Can I ask a beginner question here?
<EvilTofu> Should I name functions (potato->make-fries)?
<rme> eviltofu: you can read https://google.github.io/styleguide/lispguide.xml for some ideas
<rme> I'm not a fan of the foo->bar kind of names myself, but I've seen people use it.
<rme> mukuge: ask away
<White_Flame> mukuge: there's #clnoobs, which could be more appropriate. There's a LOT of specifics generally discussed here
<White_Flame> eviltofu: if you have potato->make-fries vs yam->make-fries or whatever, it would make sense to have (defmethod make-fries (...) ...) and dispatch on the type of parameter
<mukuge> Thanks rme and white_Flame. I'll ask my question at #clnoobs this time.
mukuge has left #lisp [#lisp]
EvilTofu has quit [Quit: eviltofu]
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
philosaur has quit [Quit: philosaur]
philosaur has joined #lisp
osune` has joined #lisp
osune has quit [Ping timeout: 265 seconds]
d4ryus2 has joined #lisp
ykoda has joined #lisp
d4ryus1 has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #lisp
internet_cafe has quit [Quit: ...]
_whitelogger_ has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
leo_song has quit [Ping timeout: 240 seconds]
leo_song has joined #lisp
Riviera- has joined #lisp
larme has joined #lisp
zymurgy has joined #lisp
itruslove has joined #lisp
lroca has quit [Quit: lroca]
<aeth> White_Flame: You don't dispatch on type with defmethod. There's a difference between class and type. This is mostly noticable when you try to do something with an array.
<White_Flame> yes, correct. I hop between too many languages :-P
<aeth> (And there is at least one library that lets you dispatch on types.)
marusich has quit [Quit: Leaving]
broccolistem has quit [Ping timeout: 264 seconds]
osune`` has joined #lisp
damke_ has joined #lisp
marusich has joined #lisp
osune` has quit [Ping timeout: 248 seconds]
osune`` has quit [Read error: Connection reset by peer]
damke has quit [Ping timeout: 264 seconds]
ahungry has joined #lisp
fikka has joined #lisp
nika has joined #lisp
erikc has quit []
fikka has quit [Ping timeout: 265 seconds]
openthesky has joined #lisp
openthesky has quit [Changing host]
openthesky has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
turkja has joined #lisp
broccolistem has joined #lisp
jarwin has joined #lisp
patche has joined #lisp
jarwin is now known as Jarwin
jcowan has joined #lisp
<jcowan> does anyone have a sense of the relative speed of chez and sbcl?
<aeth> jcowan: SBCL is in the language benchmark game (roughly around the speed of Java there) so if someone who knows how to write Chez well wants to, that might give some data
<jcowan> ta
greaser|q has quit [Changing host]
greaser|q has joined #lisp
<aeth> I think Racket's the only Scheme there (well, Racket is only sort of Scheme)
greaser|q is now known as GreaseMonkey
* jcowan nods
<jcowan> I am wondering if it is worth porting shen to chez
<jcowan> there is a port to Scheme, but it only works on chibi and gauche, which are Scheme bytecode interpreters without JIT
<beach> Good morning everyone!
patche is now known as sebbot
al-damiri has quit [Quit: Connection closed for inactivity]
<beach> jcowan: Maybe people in #scheme have an opinion.
<jcowan> asked in #chez, nobody knows there right now
openthesky has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
openthesky has joined #lisp
FreeBirdLjj has joined #lisp
samsungtv has quit []
dtornabene has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
cyraxjoe has quit [Remote host closed the connection]
Jarwin has quit [Ping timeout: 264 seconds]
marusich has quit [Ping timeout: 264 seconds]
marusich has joined #lisp
marusich has quit [Ping timeout: 265 seconds]
marusich has joined #lisp
loli has quit [Read error: Connection reset by peer]
loli has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
schoppenhauer has quit [Ping timeout: 256 seconds]
schoppenhauer has joined #lisp
brendyn has joined #lisp
fikka has joined #lisp
aanand` has quit [Ping timeout: 256 seconds]
openthesky has quit [Ping timeout: 265 seconds]
damke_ has quit [Ping timeout: 264 seconds]
openthesky has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
aristippus has quit [Ping timeout: 260 seconds]
gravicappa has joined #lisp
aristippus has joined #lisp
asarch has quit [Quit: Leaving]
prometheus_falli has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
prometheus_falli has joined #lisp
FreeBirdLjj has joined #lisp
ahungry has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
openthesky has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
sebbot has quit [Ping timeout: 260 seconds]
jcowan has quit [Ping timeout: 268 seconds]
orivej_ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
Oladon has quit [Quit: Leaving.]
patche has joined #lisp
aristipp1s has joined #lisp
aristippus has quit [Ping timeout: 240 seconds]
damke_ has quit [Ping timeout: 264 seconds]
jcowan has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
JuanDaugherty has quit [Quit: Ex Chat]
orivej has joined #lisp
dddddd has quit [Ping timeout: 268 seconds]
rippa has joined #lisp
panji has joined #lisp
quazimodo has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 240 seconds]
LocaMocha has joined #lisp
orivej has joined #lisp
neuri8 has joined #lisp
neuri8 has quit [Client Quit]
neuri8 has joined #lisp
ahungry has joined #lisp
neuri8 has quit [Client Quit]
neuri8 has joined #lisp
jcowan has quit [Ping timeout: 268 seconds]
jcowan has joined #lisp
fikka has joined #lisp
Bike has quit [Quit: Lost terminal]
fikka has quit [Ping timeout: 240 seconds]
neuri8 has quit [Quit: L]
attila_lendvai has joined #lisp
neuri8 has joined #lisp
knobo has joined #lisp
panji has left #lisp [#lisp]
orivej has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
orivej has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
_whitelogger has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
eviltofu has joined #lisp
<eviltofu> oh there’s a noob channel?
<eviltofu> This noob is moving over.
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
ahungry has quit [Remote host closed the connection]
fikka has joined #lisp
<eviltofu> The reason I asked is because I have several CLOS classes which I use HAS-xxx to describe them. Has-identity, Has-tags, Has-connections, etc. Then I use composition. So sometimes it gets a bit confusing to use has-identity-identity for accessing a slot.
<eviltofu> I’ll go read the guide now
<beach> I think that's an obsolete convention...
<beach> i.e. to prefix the slot accessor with the name of the class.
<eviltofu> What is the current convention?
<beach> It looks really strange when you do that in subclasses, for instance (sheet-children pane)
<beach> I think it is preferable to have more packages instead, and just don't use the prefix.
<eviltofu> I put my classes in their own package.
<eviltofu> So I should just remove Has-xxx to make it xxx.
<beach> Also, the HAS- convention looks strange. A person would be what? has-name-and-address-and-telephone-number-and-social-security-number?
<eviltofu> Those classes aren’t really used.
<beach> Why do you create classes that aren't used?
<eviltofu> For example when I create a network node class (defclass node (has-identity has-connections has-properties) … )
fikka has quit [Ping timeout: 260 seconds]
<beach> Oh, I see.
<beach> We usually call those xxx-mixin. Like identity-mixin, connections-mixin, etc.
<eviltofu> ooooh
<eviltofu> then the methods which support that class are identify-mixin-xxx ?
<beach> I don't think so.
<eviltofu> ok so common sense names then
<beach> IDENTITY is strange because you have to shadow it so that it would be the Common Lisp symbol.
<eviltofu> oh so generics and then speciliase in methods
<beach> Otherwise...
<eviltofu> I’d change it to identifiable
<beach> (defclass identity-mixin ((... :reader identity)))
<beach> No, just shadow the symbol.
orivej has joined #lisp
jarwin has joined #lisp
jarwin is now known as Jarwin
<eviltofu> ok will have to look up what shadowing does
<beach> (defpackage my-stuff (:use #:common-lisp) (:shadow #:identity) (:export #:identity ....))
<beach> It means that there is a symbol named IDENTITY in the MY-STUFF package and that symbol is distinct from COMMON-LISP:IDENTITY.
damke_ has quit [Ping timeout: 264 seconds]
<eviltofu> so to use the CL identity I can use CL:IDENTITY?
<beach> Yes.
fluke` has quit [Ping timeout: 248 seconds]
koltrasten has joined #lisp
koltrasten has left #lisp ["User left"]
prometheus_falli has quit [Ping timeout: 272 seconds]
mishoo_ has joined #lisp
Jarwin has quit [Quit: WeeChat 1.9.1]
Jarwin has joined #lisp
FareTower has joined #lisp
Jarwin is now known as Jarwin
pilfink has joined #lisp
<fiddlerwoaroof> I just realized that I can use (eval-when (:load-toplevel) ...) to make fasls that automatically load their dependencies
<fiddlerwoaroof> e.g. something like: https://pastebin.com/N12ViT8T
<fiddlerwoaroof> Is the latest lisppaste code available somewhere?
<phoe> fiddlerwoaroof: I think #common-lisp.net will be able to answer best
quazimodo has joined #lisp
randomstrangerb has quit [Ping timeout: 240 seconds]
<fiddlerwoaroof> I guess this eval-when trick isn't very useful, since most lisps don't have a stable fasl format, but it could be useful if you want to ship an application with a bunch of dynamically loaded modules: you'd build a base image with only your application in it and then use that image to compile all the modules to fasl files and put them in a well-known location, you could avoid putting all the module dependencies in your .asd
randomstrangerb has joined #lisp
eviltofu has quit [Quit: eviltofu]
Jarwin has quit [Quit: WeeChat 1.9.1]
d4ryus2 is now known as d4ryus
damke_ has joined #lisp
prometheus_falli has joined #lisp
quazimodo has quit [Ping timeout: 265 seconds]
eviltofu has joined #lisp
eviltofu has quit [Client Quit]
<FareTower> fiddlerwoaroof, that's what compile-bundle-op is for.
<FareTower> or monolithic-compile-bundle-op
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
<fiddlerwoaroof> cool
<fiddlerwoaroof> I've always been a little intimidated by ASDF's documentation
<fiddlerwoaroof> But, I've slowly been learning my way around it :)
<pjb> Yes, documentations are often intimidating. That's why it's better to avoid them altogether.
<fiddlerwoaroof> Yeah, I usually just read the code when I want to figure out how to use a library
<fiddlerwoaroof> I'll occasionally look at a readme and/or a sample application, but I find it's often easier to look at code and/or docstrings in emacs than it is to try to understand the library's documentaiton
<Shinmera> I have the exact opposite experience.
<Shinmera> Trying to understand what other people's code is supposed to achieve is far from trivial for almost anything.
jfb4 has quit [Ping timeout: 268 seconds]
jfb4 has joined #lisp
damke has quit [Read error: Connection reset by peer]
damke has joined #lisp
rippa has quit [Read error: Connection reset by peer]
rippa has joined #lisp
wxie has joined #lisp
whoman has quit [Remote host closed the connection]
whoman has joined #lisp
shka has joined #lisp
gravicappa has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
dtornabene has quit [Remote host closed the connection]
whoman has quit [Remote host closed the connection]
whoman has joined #lisp
FareTower has quit [Ping timeout: 240 seconds]
alexmlw has quit [Remote host closed the connection]
alexmlw has joined #lisp
arbv has quit [Ping timeout: 248 seconds]
benny has quit [Ping timeout: 248 seconds]
kushal has quit [Ping timeout: 248 seconds]
arbv has joined #lisp
orivej has quit [Read error: Connection reset by peer]
hjudt has quit [Ping timeout: 248 seconds]
benny has joined #lisp
kushal has joined #lisp
hjudt has joined #lisp
kushal is now known as Guest40978
orivej has joined #lisp
fikka has joined #lisp
FreeBirdLjj has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
orivej has quit [Read error: Connection reset by peer]
orivej has joined #lisp
versatile has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #lisp
Fare has joined #lisp
versatile is now known as Murii
Fare has quit [Remote host closed the connection]
sebbot has quit [Quit: Lost terminal]
orivej has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
Fare has joined #lisp
nsrahmad has joined #lisp
h3r3tek has joined #lisp
Fare has quit [Remote host closed the connection]
jfb4 has quit [Ping timeout: 240 seconds]
jfb4 has joined #lisp
Fare has joined #lisp
h3r3tek has quit [Ping timeout: 246 seconds]
h3r3tek has joined #lisp
markong has joined #lisp
Fare has quit [Ping timeout: 264 seconds]
wxie has quit [Remote host closed the connection]
orivej has joined #lisp
r___ has joined #lisp
pilfink has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
h3r3tek has quit [Remote host closed the connection]
Guest40978 is now known as kushal
kushal has quit [Changing host]
kushal has joined #lisp
gigetoo has quit [Ping timeout: 248 seconds]
gigetoo has joined #lisp
wxie has joined #lisp
wxie has quit [Remote host closed the connection]
fluke` has joined #lisp
varjagg has joined #lisp
nsrahmad has quit [Quit: Leaving]
milanj has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
smurfrobot has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
EvW has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
thorondor[m] has quit [Quit: idle on matrix for more than 30 days]
Ellusionist has joined #lisp
fikka has joined #lisp
dahs81[m] has left #lisp ["Kicked by @appservice-irc:matrix.org : idle on matrix for more than 30 days"]
fikka has quit [Ping timeout: 248 seconds]
random-nick has quit [Quit: quit]
<r___> anyone has an idea on how to tell if a thread in sbcl is in the debugger?
<r___> I see the function sb-thread:symbol-value-in-thread and the variable sb-debug:*in-the-debugger*
<phoe> r___: you could theoretically try interrupting it with (lambda () (symbol-value 'sb-debug:*in-the-debugger*))
<phoe> if you want to risk interrupting threads, that is... which *might* be feasible if it's in the debugger anyway
<r___> But in trying to use it on a thread which executes a division by zero & is in the debugger, I get an error indicating that the symbol has no thread local value
<phoe> then this variable wasn't set, it seems.
<phoe> sounds like a #sbcl issue.
wxie has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
shka has quit [Quit: Konversation terminated!]
random-nick has joined #lisp
jstypo has quit [Remote host closed the connection]
damke_ has joined #lisp
<r___> right. I'm looking to see if someone knows (or has experienced this situation) under what conditions this variable is set & how is my understanding of it & of the function to test it in the context of a given thread is wrong
flowerdts has joined #lisp
<flowerdts> hey guys I was wondering if there is a way to have a (case) with multiple keys? My code is here https://pastebin.com/KZQBNcTe It's supposed to be a wine expert System :)
nirved has joined #lisp
Sovereign_Bleak has quit [Quit: idle on matrix for more than 30 days]
EvilAngel1 has quit [Quit: idle on matrix for more than 30 days]
<oleo> sbcl does not promote globals to thread-local
<fiddlerwoaroof> flowerdts: you should format your code, it's really difficult to read unformatted lisp code
<flowerdts> I though this was formatted O.O
l04m33[m] has quit [Quit: idle on matrix for more than 30 days]
<fiddlerwoaroof> It's pretty good, although your case statement isn't formatted quite right
<oleo> symbol-value-in-thread
<r___> oleo: would you know how I could test if a given thread is in the debugger?
<fiddlerwoaroof> Anyways, there isn't a multiply-keyed case statement in lisp
<flowerdts> oh, so how should it be? and how could I run a case on a list with features? :)
<oleo> global special values are visible across all threads;
<oleo> bindings (e.g. using LET) are local to the thread;
<oleo> threads do not inherit dynamic bindings from the parent thread
damke_ has quit [Ping timeout: 246 seconds]
nowhere_man has quit [Ping timeout: 260 seconds]
<fiddlerwoaroof> flowerdts: case uses EQL to compare the key to the various case clauses, so there's no way to use case unless you're using a type that works appropriately with EQL
<fiddlerwoaroof> flowerdts: however, alexandria has destructuring-case that looks like it might do what you need
<fiddlerwoaroof> Do you have quicklisp setup?
<flowerdts> I use clisp to compile in console
fluke` has quit [Read error: Connection reset by peer]
<flowerdts> I can't use Alexandria (this project is for school)
<oleo> Variable Value Availability
<oleo> read that in the sbcl manual
<oleo> The value of a variable may be unavailable to the debugger in portions of the program where Lisp says that the variable is defined. If a variable value is not available, the debugger will not let you read or write that variable. With one exception, the debugger will never display an incorrect value for a variable. Rather than displaying incorrect values, the debugger tells you the value is unavailable.
<flowerdts> I guess my only option is splitting with if/else and nesting case/s
fluke` has joined #lisp
<r___> oleo: thanks. will go check it out
nowhere_man has joined #lisp
<fiddlerwoaroof> flowerdts: well, one thing you could do is put the output in a hash-table with :test #'EQUAL and then printing the result of getting a list from the hash table
<flowerdts> great idea, I will look into that
<fiddlerwoaroof> e.g. your case statement would turn into something like (format t "~% ~a" (gethash (list color grapes) *choices*))
<flowerdts> and how would I build that hash? :)
<pjb> Same, using gethash.
<pjb> it's an _accessor_!
froggey has quit [Ping timeout: 248 seconds]
<flowerdts> isn't there something like sethash ?
<flowerdts> (setq (gethash (list color grapes) choice)) ?
<fiddlerwoaroof> You use setf
enick_394 has quit [Quit: idle on matrix for more than 30 days]
<fiddlerwoaroof> (setf (gethash key hash-table) value)
<flowerdts> (setf (gethash (list color grapes) wines))
<fiddlerwoaroof> Yeah, although you need a value at the end of the setf form
<fiddlerwoaroof> you might read this chapter of pcl to familiarize yourself with the way lisp accessors work: http://www.gigamonkeys.com/book/variables.html
<flowerdts> so wines is the name of the hash and then a value to represent the choice?
<fiddlerwoaroof> Basically
<fiddlerwoaroof> This is explained in the section of that web page beginning "generalized assignment"
gravicappa has joined #lisp
knobo has quit [Ping timeout: 265 seconds]
froggey has joined #lisp
<flowerdts> https://pastebin.com/t9kYxzk7 this is returning NIL :/
<fiddlerwoaroof> You have to tell make-hash-table not to use #'eql when looking up a key
<fiddlerwoaroof> so, it's (make-hash-table :test #'equal)
wxie has quit [Remote host closed the connection]
astronavt[m] has quit [Quit: idle on matrix for more than 30 days]
wxie has joined #lisp
<flowerdts> it works! Thank you very much :)
r___ has quit [Ping timeout: 260 seconds]
trigt[m] has left #lisp ["Kicked by @appservice-irc:matrix.org : idle on matrix for more than 30 days"]
narendraj9 has joined #lisp
<fiddlerwoaroof> great!
wxie has quit [Ping timeout: 268 seconds]
tomlukeywood has joined #lisp
<fiddlerwoaroof> A mac app in pure lisp, with a tiny ffi shim: https://github.com/fiddlerwoaroof/objc-lisp-bridge/blob/master/demo-app.lisp
<fiddlerwoaroof> (I couldn't figure out how to pass a couple structs by value)
<Shinmera> Passing structs by value requires cffi-libffi, so you need a C library anyway.
<fiddlerwoaroof> Yeah, I tried that route, but didn't feel like figuring out a couple issues I ran into
varjagg has quit [Remote host closed the connection]
<fiddlerwoaroof> Anyways, I need to sleep
varjagg has joined #lisp
josemanuel has joined #lisp
marcux has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
marcux has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Folkol has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
Bike has joined #lisp
Folkol has quit [Client Quit]
EvW has quit [Ping timeout: 265 seconds]
Folkol has joined #lisp
Tobbi has joined #lisp
EvW1 has joined #lisp
<tomlukeywood> this :initial-contents complains about being of incorrect size
<tomlukeywood> am i going insane or is this array not of correct size???
fluke` has quit [Ping timeout: 252 seconds]
<tomlukeywood> ah.. that makes sense ty
<pjb> tomlukeywood: lisp uses row-major indexing. cf. array-row-major-index
nowhere_man has quit [Remote host closed the connection]
<pjb> Almost all languages use it; Fortran uses col-major indexing.
nowhere_man has joined #lisp
varjagg has quit [Ping timeout: 240 seconds]
<Shinmera> Matlab and Fortran are the only two major languages I know of that use column-major.
<tomlukeywood> when i define (defconstant dead " ") and then use dead in a list
<tomlukeywood> it just evaluates to dead and not " ". why is this?
<Bike> you mean in like '(dead)?
<Bike> the quote suppresses evaluation
<jcowan> Julia also uses column-major, because it uses so many Fortran packages
<tomlukeywood> like here https://hastebin.com/onoviwicah.lisp
<tomlukeywood> dont know why my editor has that weird tabbing...
<Bike> right, it's quoted.
<tomlukeywood> oh so i need to unquote
<Shinmera> The quote does not "make a list". It returns a literal, which happens to be a list.
<Shinmera> You create a list with LIST
<Bike> well, actually, i'd just do ":initial-element dead" instead.
<Bike> they maybe set the few alive elements
<Bike> up to you of course
<jcowan> R is also column-major, probably for the same reason
<Shinmera> jcowan: Ah, good to know.
<tomlukeywood> ok but just for future knowledge how do would i do this?
<Bike> (list (list dead dead dead alive ...) ...)
<tomlukeywood> ok ty
brendyn has quit [Ping timeout: 265 seconds]
nowhere_man has quit [Remote host closed the connection]
milanj has joined #lisp
nowhere_man has joined #lisp
tomlukeywood has left #lisp [#lisp]
Karl_Dscc has joined #lisp
damke_ has joined #lisp
heurist`_ has joined #lisp
EvW1 has quit [Ping timeout: 246 seconds]
heurist` has quit [Ping timeout: 264 seconds]
varjagg has joined #lisp
dddddd has joined #lisp
scymtym has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
narendraj9 has quit [Ping timeout: 246 seconds]
varjagg has quit [Ping timeout: 255 seconds]
nowhere_man has joined #lisp
fikka has joined #lisp
whoman has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 260 seconds]
<pjb> Bike: if you show (list (list …)) for :initial-contents, you should mention to the naive newbie that this allocates a cons-based copy of all the data at run-time. It would be better to (setf (aref m 0 0) dead (aref m 0 1) dead …) (possibly writting a macro to do it nicely).
<Bike> i already suggested seetting things manually
<pjb> Oh, ok. Sorry.
serviteur has joined #lisp
serviteur has quit [Remote host closed the connection]
<pjb> And then it's ok for the newbies to do their own stuff and learn from it.
marcux has joined #lisp
Murii has quit [Quit: WeeChat 1.4]
narendraj9 has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
Ellusionist has quit [Ping timeout: 248 seconds]
milanj has quit [Quit: This computer has gone to sleep]
<dmiles> hrrm i wonder how bad it'd be if i left (class-of :kw) returning #<BUILT-IN-CLASS KEYWORD>
<dmiles> instead of builtin class SYMBOL
<Shinmera> The real question is why in the world you would make a distinction to begin with
<Shinmera> Keywords are just symbols.
<dmiles> in my impl.. i wrap the result of (type-of :KW)
<dmiles> which is KEYWORD
<dmiles> i guess it would mater for generic functions
flowerdts has quit [Quit: Page closed]
<dmiles> of course they the class named KEYWORD is a subclass of class named SYMBOL so it wont hurt
<dmiles> also the distinction is in my impl of keywords they are constantp and the symbol-package, symbol-vlaue and symbol-function all go to the same code
<Shinmera> If you unintern a keyword, would it still have the keyword class?
<Shinmera> I'm guessing in your case yes, which would be pretty bad.
<dmiles> ah i should find out if otehr lisps have my errant behavour in this case
<Shinmera> Does type-of even have to return KEYWORD for keywords?
<Shinmera> clhs type-of
<Shinmera> Doesn't seem to require this.
<dmiles> it is just popular that everyone does it
<Shinmera> Well, either way, I don't think it makes sense to have a class for keywords.
<Shinmera> As the "keywordness" is encoded in the symbol-package of a symbol.
<Shinmera> Duplicating that information with a class just makes things iffy.
<dmiles> ah yes.. indeed (symbol-package ..) is the decider for keywordp
narendraj9 has quit [Ping timeout: 265 seconds]
eSVG has quit [Ping timeout: 276 seconds]
<dmiles> (work impl return SYMBOL for type-of :P)
marcux has quit [Ping timeout: 255 seconds]
alexmlw1 has joined #lisp
alexmlw has quit [Ping timeout: 248 seconds]
alexmlw1 is now known as alexmlw
alexmlw has quit [Quit: alexmlw]
alexmlw has joined #lisp
knicklux has joined #lisp
knicklux has quit [Remote host closed the connection]
knicklux has joined #lisp
randomstrangerb has quit [Ping timeout: 240 seconds]
randomstrangerb has joined #lisp
asarch has joined #lisp
narendraj9 has joined #lisp
EvW has joined #lisp
turkja has quit [Ping timeout: 248 seconds]
asarch has quit [Quit: Leaving]
fikka has joined #lisp
narendraj9 has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
varjagg has joined #lisp
narendraj9 has joined #lisp
random-nick has quit [Remote host closed the connection]
nika has quit [Quit: Leaving...]
alexmlw has quit [Quit: alexmlw]
fikka has quit [Ping timeout: 248 seconds]
versatile has joined #lisp
knicklux has quit [Quit: Leaving]
mn3m has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
dxtr has joined #lisp
randomstrangerb has quit [Ping timeout: 268 seconds]
randomstrangerb has joined #lisp
AntiSpamMeta has quit [Remote host closed the connection]
narendraj9 has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
mn3m has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 256 seconds]
knobo has joined #lisp
AntiSpamMeta has joined #lisp
<sigjuice> any suggestions for shorter SLIME key bindings?
JuanDaugherty has joined #lisp
knobo has quit [Ping timeout: 240 seconds]
knobo has joined #lisp
<phoe> sigjuice: give us some examples, shorter than what?
<sigjuice> like the ones in the Documentation menu or the Cross Reference menu. C-c C-d C-d etc.
jmercouris has joined #lisp
<jmercouris> I've inserted a break into my code, is there anyway I can inspect the value of variables at that point?
<jmercouris> For example, my break is within a let binding, can I see what the values assigned to those bindings are?
fikka has joined #lisp
<jmercouris> seems that I needed "optimize debug 3" at the top
kenster has joined #lisp
<kenster> I'm livestreaming some programming in 20 minutes, 10AM pacific time. Join me! Unfortunately more C++ than lisp though. https://www.youtube.com/watch?v=2NkqJidhJto
Jarwin has joined #lisp
Posterdati has quit [Remote host closed the connection]
<Shinmera> jmercouris: You can also use C-u C-c C-c to compile a function with max debug.
<jmercouris> Shinmera: Ok, thank you
fikka has quit [Ping timeout: 248 seconds]
<jmercouris> Shinmera: I can't find out what that's mapped to because immediately C-h k returns on C-u
<jmercouris> Do you happen to know the function name?
<Shinmera> It's slime-compile-defun, same as C-c C-c. C-u acts as "prefix argument"
Oladon has quit [Quit: Leaving.]
Posterdati has joined #lisp
<jmercouris> Ok, right, I forgot about prefix arguments as a concept
<Shinmera> It is an obscure emacs feature
<jmercouris> Well, idk, feels like it comes up all the time, e.g. C-u 70 ; for example
<sigjuice> jmercouris btw. you can probably also use F1 k instead of C-h k
<jmercouris> it's just that I never really think about it
<jmercouris> sigjuice: I would but the F keys on my keyboards all behave differently so I tend to avoid them
<jmercouris> thanks for the tip though
Jarwin is now known as Jarwin
Posterdati has quit [Ping timeout: 265 seconds]
scymtym has quit [Ping timeout: 246 seconds]
<jmercouris> Shinmera: You work a lot with CFFI, how do I know if a particular function is provided by a .so, is there a way to tell?
<Shinmera> You get a warning if you compile a defcfun and it doesn't exist.
<jmercouris> The reason I ask is because I've written a cffi:defcfun, and I'm not sure that the function even exists as I am getting non sensical data from evaluation
<jmercouris> Shinmera: During compilation time it will load the shared library and make sure it exists?
<sigjuice> jmercouris yes, F keys are not straightforward. e.g. on my Mac, I use a utility to provide different F key behaviors for different apps.
<Shinmera> It'll only load it if you tell it to load it.
Ven`` has joined #lisp
<Shinmera> jmercouris: Calling an undefined function will error
<jmercouris> Shinmera: I load it in my init.lisp, then I have another definition in a file loaded afterwards, therefore if I slime-load-system it, I would expect this to signal an error?
<jmercouris> Shinmera: Okay, so if I am invoking it, it also is more proof that it exists
<Shinmera> Yes.
<jmercouris> Since I do not get a restart or anything
<Shinmera> It's more likely that you've got the types wrong, or are sending wrong values.
<jmercouris> Possibly
<jmercouris> I asked ysterday if somebody would mind looking, could you look?
<jmercouris> it is just one definition
<Shinmera> With what library?
<jmercouris> Library is webkit
<jmercouris> webkitgtk+ to be specific
<Shinmera> Okey
<jmercouris> I have all the information in a gist
<jmercouris> I grep'd the source for all of the types/etc
<jmercouris> This is where I'm using it: https://gist.github.com/c25ebc01515acf239460c991a3534fbe
<jmercouris> And finally, this is the example of C code doing what I'm trying to do: https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-run-javascript-finish
<jmercouris> if you only look at one thing, it is the first thing I am most unsure of
<Shinmera> webkit_web_view_run_javascript_finish seems to take three args in the example
<Shinmera> your code only has two
<jmercouris> Shinmera: That's true, that's overridden in cl-webkit
<jmercouris> one moment please
<Shinmera> Ah, yeah, expected something like that
<Shinmera> Alright so what's wrong with this? I can't really try this myself to see what's going on.
<jmercouris> So I have some basic questions: does the JSCore implementation make sense based on what you see?
<Shinmera> You mean your lisp snippet or?
<jmercouris> Yeah my lisp snippet
<jmercouris> The first gist
<Shinmera> I guess. You don't check if what you're getting is actually a string or not.
<jmercouris> That's okay with me, as I know it should be a string based on the JS I'm running
<Shinmera> Other than that it seems like a correct translation. What you're doing won't give you a lisp string yet though.
scymtym has joined #lisp
<jmercouris> Yeah, I also had a foreign-string-to-lisp line in there
Posterdati has joined #lisp
<Shinmera> That's not gonna work
<jmercouris> but it was complaining that ^A was not a valid SAP
<Shinmera> You need to use their routines to convert it to UTF8 first as they do in that example
<jmercouris> I was afraid you would say that
osune has joined #lisp
<Shinmera> JS strings are usually implemented as chains of actual strings to make concatenation fast and crazy shit like that.
<jmercouris> I just thought it might be in UTF-16 based on something I read earlier
<jmercouris> okay, so if the structure could be very random, it makes sense that they have written a utility for conversion of js strings specificallly
<Shinmera> should just be a bit more code and not really much overhead, so I don't know why this is such a big deal
<jmercouris> well, not random, but yeah
<jmercouris> Well, it's not a big deal, I'm just very unsure about my skills with CFFI, and I don't like introducing more unknowns
<Shinmera> Once you have a pointer to the UTF8 string you can just foreign-string-to-lisp.
<Shinmera> Heh
<Shinmera> I know that feeling :)
<Shinmera> Implementing native sound interfaces was a lot of not knowing what the hell is going on
<jmercouris> Lol I imagine there isn't just a plethora of documentation
<jmercouris> It's probably what it felt like programming in the 80s
<Shinmera> There were docs (at least) but for Windows it was a clusterfuck and for Mac it was incomprehensible
<Shinmera> In a surprising twist, Linux was actually sane and simple (at least ALSA & Pulse, haven't tried JACK or OSS)
<jmercouris> Oh, how the times have changed
mo` has joined #lisp
milanj has joined #lisp
<mo`> I want to execute emacs in stumpwm and get the results. is this feasible using something like swank ? if not what could be a better approach?
<jmercouris> What code are you writing that necesitates emacs as an execution environment? Anything possible in elisp is also possible in cl
<mo`> jmercouris: for example I want to get the current playing track in emms. stuff like this. is this feasible or should I use something else like shared memory ?
<Shinmera> Swank does have eval-in-emacs, but I don't know if it returns a result.
<Shinmera> And if it does how exactly it converts values.
<mo`> Shinmera: it does returns inside Emacs but doesn't work in stumpwm mode line
<mo`> Shinmera: eval-in-emacs only works when I eval from Emacs
<Shinmera> if I remember correctly eval-in-emacs requires a slime variable to be changed to allow it to work. And you need to actually connect to stump through slime, of course.
<mo`> Shinmera: yeah I did that
<Shinmera> Well then I don't know.
<mo`> I'm not sure why but when I eval some emacs code in the mode line nothing show up
<mo`> Shinmera: if using swank is not an option how would you do this ?
knobo has quit [Read error: No route to host]
<mo`> _death: cool thanks I would have preferred doing this with a more elegant solution
<_death> this is the elegant solution, since it seems you want to talk to the same emacs instance from multiple processes
knobo has joined #lisp
<mo`> _death: cool thanks
damke has joined #lisp
qjube has joined #lisp
randomstrangerb has quit [Ping timeout: 265 seconds]
randomstrangerb has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
narendraj9 has joined #lisp
fittestbits has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
fittestbits has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
raynold has quit [Quit: Connection closed for inactivity]
Ellusionist has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fiddlerwoaroof> Are there any emacs packages for refactoring common lisp?
<Shinmera> There's various slime-who-* functions to find uses.
<Shinmera> That's about the closest you're gonna get to refactoring tools.
safe has joined #lisp
jstypo has joined #lisp
jmercouris has quit [Remote host closed the connection]
gravicappa has quit [Remote host closed the connection]
jmercouris has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
DominatedConverg has joined #lisp
fittestbits has left #lisp [#lisp]
krwq is now known as Guest54593
Ellusionist has quit [Ping timeout: 260 seconds]
mo` has quit [Read error: Connection reset by peer]
knobo has quit [Ping timeout: 256 seconds]
DominatedConverg has quit [Ping timeout: 264 seconds]
EvW1 has joined #lisp
knobo has joined #lisp
asarch has joined #lisp
Khisanth has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
damke_ has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Jarwin has quit [Remote host closed the connection]
damke has quit [Ping timeout: 264 seconds]
fortitude_ has joined #lisp
damke has joined #lisp
Khisanth has joined #lisp
<jmercouris> Shinmera: I've confirmed that it is in fact producing a string because I implemented js-value-is-string like in their example
damke_ has quit [Ping timeout: 264 seconds]
damke__ has joined #lisp
<jmercouris> But when I run js-value-to-string-copy I don't get a pointer, I just get "[]" when I print it out and ^A when I try to pass it to JSStringGetMaximumUTF8CStringSize
DominatedConverg has joined #lisp
damke has quit [Ping timeout: 265 seconds]
<jmercouris> Ah, damnit, I had :string type for js-value-to-string-copy, it is a pointer it returns
<jmercouris> because it is a JS String, not a real string as we discussed earlier
Ven`` has joined #lisp
<Shinmera> Yea
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
DominatedConverg has quit [Ping timeout: 256 seconds]
<jmercouris> So now, I need a pointer to an address with space in front of it malloc'd how do I do this in CFFI?
<jmercouris> Basically I need to do: str_value = (gchar *)g_malloc (str_length);
Jesin has joined #lisp
<Shinmera> malloc is just cffi:foreign-alloc
<Shinmera> Which is the same as WITH-FOREIGN-OBJECT just without the cleanup
<jmercouris> Alright, that part I get now
<jmercouris> but how do I do something like xyz* fish; in cffi?
<jmercouris> sorry * in wrong place
<jmercouris> xyz *fish;
<Shinmera> You mean dereference the pointer?
<jmercouris> No, I mean a declaration of a pointer to some thing
<Shinmera> A pointer is just a pointer
<Shinmera> The type is just in your head.
<jmercouris> Okay fair enough, how can I make a pointer
<Shinmera> foreign-alloc returns a pointer
<Shinmera> Or a function that returns a pointer, well, returns a pointer
damke has joined #lisp
<jmercouris> Okay, so foreign-alloc allocates some memory, and gives a pointer to the address in memory in which it is allocated
<Shinmera> It just gives you a pointer to the beginning of the region it just allocated
<jmercouris> Right yeah
<jmercouris> foreign-alloc is asking for a type though
<Shinmera> That's just for the size
<Shinmera> In your case it would be :char and then however big it needs to be
<jmercouris> Okay, I see
<Shinmera> Once you have stuff in your memory region, you use cffi:mem-ref to dereference the pointer and convert the data it points to to some lisp value.
<jmercouris> and then I can pass this pointer to that function JSStringGetUTF8CString which will go ahead and populate tha tportion of memory with the string
<Shinmera> Yeah
<Shinmera> After that you can do (cffi:mem-ref ptr :string)
<jmercouris> Okay great, let me give it a try
<jmercouris> thanks
damke__ has quit [Ping timeout: 264 seconds]
<Shinmera> It took me quite a bit of time to wrangle my brain around how things work with CFFI vs C, so don't worry if you're confused at first.
<fiddlerwoaroof> doesn't cffi have some way of attaching type information to a pointer?
<Shinmera> fiddlerwoaroof: Would be news to me
<jmercouris> Yeah, I was never a good C programmer to begin with, so it's like a double challenge :D
<fiddlerwoaroof> I haven't used it much, but I got the impression that there's a way to have some sort of type-safety enforced on the CL-side
trocado has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
marusich has quit [Ping timeout: 260 seconds]
narendraj9 has quit [Ping timeout: 255 seconds]
marusich has joined #lisp
orivej has joined #lisp
ikopico has quit [Read error: Connection reset by peer]
Xal has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
Xal has joined #lisp
knobo has quit [Read error: No route to host]
orivej has quit [Ping timeout: 256 seconds]
drewc has joined #lisp
damke_ has joined #lisp
knobo has joined #lisp
drewc_ has quit [Ping timeout: 256 seconds]
damke has quit [Ping timeout: 264 seconds]
Oladon has joined #lisp
conceivably has joined #lisp
ym has joined #lisp
fikka has joined #lisp
<jmercouris> cffi:foreign-alloc returns some sort of SAP, is this a pointer that I can directly pass to another function, or do I have to do something like cffi:memref to it?
<Shinmera> It's a pointer
<jmercouris> Ok great
<jmercouris> I have some fantastic news then!
<jmercouris> I GOT IT TO WORK!!!
<jmercouris> I just tested it
<Shinmera> (typep (cffi:foreign-alloc :char) 'cffi:foreign-pointer) ;=> T
<jmercouris> Thanks a lot for your help, may I also list you in the credits or no?
<Shinmera> Also, as mentioned above, I'd rather advise you to use WITH-FOREIGN-OBJECT as that handles the deallocation on exit for you.
<Shinmera> jmercouris: Do what you want
<jmercouris> I know you did not literally contribute source code, but I would still be hitting my head against the wall otherwise
<jmercouris> K, just wanted to make sure it would not bother you
<Shinmera> I'm fairly open about my existence :^)
<jmercouris> Shinmera: I should probably do that, but there are far bigger memory leaks than this
fikka has quit [Ping timeout: 240 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jmercouris> This is like a pinhole next to the titanic iceberg that is the deallocation of destroyed webviews :D
<Shinmera> Well, still better to take care of that now, you know?
<jmercouris> Yeah
Ven`` has joined #lisp
sonologico has joined #lisp
safe has quit [Read error: Connection reset by peer]
marusich has quit [Ping timeout: 255 seconds]
osune has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 265 seconds]
marusich has joined #lisp
nowhere_man has joined #lisp
jfb4 has quit [Ping timeout: 256 seconds]
jfb4 has joined #lisp
EvW1 has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
jfb4 has quit [Ping timeout: 260 seconds]
<sigjuice> is / in package names some sort of convention? e.g. IOLIB/SOCKETS:SOCKET-ADDRESS-FAMILY
<jmercouris> sigjuice: I think it's for subsystem packages
<jmercouris> sigjuice: I could be wrong though
<sigjuice> what is a subsystem package?
jfb4 has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<trocado> ^_
<Shinmera> sigjuice: It's a convention in the sense that "some people like it"
shifty has joined #lisp
<sigjuice> Shinmera thanks. that is good to know.
trocado has quit [Ping timeout: 240 seconds]
damke has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
jfb4 has quit [Ping timeout: 265 seconds]
damke has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
marcux has joined #lisp
<jmercouris> sigjuice: Just kind of a related package that is part of a bigger system
<jmercouris> sigjuice: Probably tied to subsystems, just a guess here
damke_ has joined #lisp
<jmercouris> I'm saying because I have seen the convention of system x, then system x/y where x/y is a subsystem of x
jfb4 has joined #lisp
<sigjuice> Shinmera speaking of things people like: I was skimming through portacle/build/*.sh yesterday and discovered that bash function names can have - in them. So thanks for that too!
<Shinmera> Sure.
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Shinmera> I did take some care to make the build scripts clean, but it could be better still.
marcux has quit [Quit: Lost terminal]
orivej has quit [Ping timeout: 260 seconds]
marusich has quit [Ping timeout: 240 seconds]
marusich has joined #lisp
orivej has joined #lisp
Oladon has quit [Quit: Leaving.]
fikka has joined #lisp
kenster has quit [Ping timeout: 240 seconds]
Ven`` has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
orivej has quit [Read error: Connection reset by peer]
jfb4 has quit [Ping timeout: 265 seconds]
Zhivago has quit [Ping timeout: 255 seconds]
orivej has joined #lisp
jfb4 has joined #lisp
aeth has quit [Ping timeout: 268 seconds]
aeth has joined #lisp
brendyn has joined #lisp
orivej has quit [Read error: Connection reset by peer]
__main__ has quit [Ping timeout: 240 seconds]
jfb4 has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
patche has joined #lisp
patche is now known as sebbot
jfb4 has joined #lisp
marusich has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
marusich has joined #lisp
wg1024 has joined #lisp
versatile has quit [Quit: WeeChat 1.4]
hhdave has joined #lisp
pierpa has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
__main__ has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
orivej has joined #lisp
wg1024 has quit [Quit: Leaving.]
wg1024 has joined #lisp
mishoo_ has quit [Ping timeout: 240 seconds]
knobo has quit [Ping timeout: 248 seconds]
<fiddlerwoaroof> Shinmera: asdf now sort of enforces it, though, if you define multiple systems in the same file
<fiddlerwoaroof> I guess that's not "packages, though"
<fiddlerwoaroof> ...
<Shinmera> The only instance in which it enforces it is if you use the package-inferred-system stuff
<Shinmera> Which I'm not a fan of to begin with
mishoo_ has joined #lisp
knobo has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicdev has joined #lisp
esthlos has quit [Quit: ZNC 1.6.5 - http://znc.in]
nirved has quit [Quit: Leaving]
esthlos has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
<fiddlerwoaroof> If I put a license in my asd file, do I really need to include it in all the project files?
nowhere_man has quit [Remote host closed the connection]
<fiddlerwoaroof> I guess most licenses require something like a COPYING file.
nowhere_man has joined #lisp
<Shinmera> I'm no lawyer, etc, but I just include a LICENSE file that has the full text.
<Shinmera> Adding a license header in each file can be useful if you have differing licenses in your project
esthlos has quit [Remote host closed the connection]
esthlos has joined #lisp
<jcowan> COPYING is from the influence of the Gnu Project, but LICENSE is fine
Ellusionist has joined #lisp
<jmercouris> +1 on single license per repository, I think it is overkill to have it in each file
<jmercouris> if I have sections that have different licenses, I have an license id which links to a documents directory containing that other project's license
<jcowan> Usually what you want to put in each file is just the copyright notice and a pointer to a public copy of the license, since your file may get separated from the project.
<fiddlerwoaroof> I just sort of wish that the license metadata in the system was sufficient :)
<Shinmera> I mean
<jmercouris> If your file get's separated from the project it is up to the person copying to do their due diligence that the software is not licensed somewhere else
<Shinmera> the chances of you getting sued are practically nil so
<jcowan> Mini-rant: DO NOT bother updating the copyright date when you touch a file, much less as an annual ritual on all files. Nobody *cares* whether your project goes into the public domain in 90 or 92 years.
<Shinmera> and if the license note in the ASD is "not sufficient" you retain full copyright anyway, so if anything you'd be able to sue others for using your stuff.
<jmercouris> jcowan: You know though, that's a good question, how much modification constitutes a new copyright, if I change one line in a 10 line file, are the other 9 lines up for grabs from their original day of release?
<Shinmera> you put the license in your project clearly so that others are more secure in their rights
<jcowan> De minimis non curat lex.
<Shinmera> as in, it is clear to them that they may use your code
<jcowan> ("The law takes no account of trifles.)
<jmercouris> You are never ever giving away copyright, only permitting via a license, at least in the US
<Shinmera> jmercouris: In the US you can sign away your copyright.
<Shinmera> You cannot do that in the EU
<jmercouris> Shinmera: I meant via default
<jcowan> You *can* give away copyright; that's what a contributor license agreement generally does
<fiddlerwoaroof> Yeah, all employment contracts generally require that
<jmercouris> Okay let me put it this way
<fiddlerwoaroof> some of them even claim weekend projects.
<jcowan> The FSF, for example, keeps copyright on all its projects so that they have the right to sue in respect of any of them.
<jmercouris> Unless otherwise stated by the copyright holder they retain all copyright
<Shinmera> Yes
<jcowan> And while they have never sued anyone, they have most certainly threatened it.
<jcowan> fiddlerwoaroof: In California such contract terms are void
<jmercouris> The FSF are well intentioned, but I like them less as time goes on
__main__ has quit [Read error: Connection reset by peer]
<jcowan> jmercouris: Why in connection with this?
<jmercouris> jcowan: Why what? Can you please rephrase the question
<mgsk> Is it bad "form" to have nested defun's. Should I use flet/labels instead? Or just a matter of taste?
<jmercouris> mgsk: I don't think it's a big problem, though I've never seen someone do it in source code, I'm sure some have strong opinions
<rme> defun always makes global functions. if you want local functions, use flet/labels.
__main__ has joined #lisp
<rme> So, in a word, yes.
<rme> It is bad form.
<mgsk> Got ya. Is it possible to trace flet/labels?
hhdave has quit [Ping timeout: 240 seconds]
<fiddlerwoaroof> jcowan: the difficulty is that I'm pretty sure CA law requires that the side project be unrelated to your employer's line of work, so if you work for Google or some other company that does everything, the law doesn't really help (ianal, etc...)
<Shinmera> mgsk: No
<jmercouris> Well, my opinion about nested defuns changed a little bit :D
hhdave has joined #lisp
<jmercouris> seems to be much different behavior than other languages
<jcowan> I did work for Google in NY (but CA law was explicitly extended for this case)
<jmercouris> I would have expected a closure type behavior
<Shinmera> mgsk: Nested defuns are gross and I've never seen any reason to do it
knobo has quit [Ping timeout: 265 seconds]
<Shinmera> If you need to trace, well, make them not local.
<mgsk> Shinmera: I suppose I could just write a top-level defun for debugging and trace that, and move it out of the way when I'm done.
<aeth> fiddlerwoaroof: I personally use LICENSE.txt (because there are other valid format objects, e.g. LICENSE.md, which will make the file look better on source-viewing websites)
<Shinmera> mgsk: There's also good 'ol FORMAT
<mgsk> ?
<aeth> COPYING should imo be reserved for GNU licenses (mostly GPL variants)
<mgsk> oh for debugging
broccolistem has quit [Quit: WeeChat 2.1-dev]
<jcowan> fiddlerwoaroof: You're right about that
<jcowan> Any provision in an employment agreement which provides that an employee shall assign, or offer to assign, any of his or her rights in an invention to his or her employer shall not apply to an invention that the employee developed entirely on his or her own time without using the employer’s equipment, supplies, facilities, or trade secret information except for those inventions that either:
<jcowan> (1) Relate at the time of conception or reduction to practice of the invention to the employer’s business, or actual or demonstrably anticipated research or development of the employer; or
<jcowan> (2) Result from any work performed by the employee for his employer.
<jcowan> (b) To the extent a provision in an employment agreement purports to require an employee to assign an invention otherwise excluded from being required to be assigned under subdivision (a), the provision is against the public policy of this state and is unenforceable.
<rme> If a local function is big and complicated enough that you want to trace it, it's probably better for it to be a top-level function anyway so that you can test it individually.
<Shinmera> Please do not paste in here
<rme> That's what I typically find, anyway.
<Shinmera> especially not lawyerese
<jcowan> oops, lost (a) in the copy and paste, it should be at the beginning
__main__ has quit [Ping timeout: 265 seconds]
<Shinmera> jcowan: Use paste services if it's more than a line
<mgsk> rme: I can understand that
<jcowan> Shinmera: I'm operating with one hand today, or I would have typed it myself
<jcowan> But okay
* mgsk wonders what the other hand is doing
r___________ has joined #lisp
r___________ has quit [Client Quit]
wg1024 has left #lisp [#lisp]
<aeth> mgsk: If you want lots of helper functions, there are two options you should do. Use flet/labels or simply define a %foo %bar and %baz at the top level and the % is a hint to the reader that they're used locally
<aeth> If you're doing fancy things with them, it looks like you might want the latter style
<aeth> Both are equally valid, I've used both and I've seen other people use both.
r_______ has joined #lisp
<fiddlerwoaroof> I almost always end up breaking out flet/labels into toplevel funcitons
<Shinmera> I use local functions relatively sparingly because they still create large blocks of stuff
<aeth> flet/labels might give the compiler more information if you're not inlining them, though. e.g. SBCL will have "deleted unreachable code" warnings with labels if the internal function has branches that aren't used.
<aeth> But SBCL doesn't really go much deeper than deleting unused branches afaik
<aeth> Compilers could in theory do more
<jcowan> In particular, they can be compiled as local jumps-with-renames when in tail position, which is very nice
<jcowan> one of the cool applications of proper tail calling is state machines, where instead of having a variable encoding the state, you just tail-call the function which is the next state
<aeth> The advantage of %foos is that you can use it for multiple functions in the same file, which is more common than you think.
<aeth> jcowan: labels definitely seems very useful and interesting as a compilation target
<Shinmera> jcowan: We already have tagbody for state machines
<aeth> jcowan: as an alternative to tagbody
<jcowan> True, though it isn't as clean: you have to (in effect) tail-call a tag, you cannot call it if that's what you want
<Xach> I use labels state machines quite a bit. The driver is something like (setf state (funcall state next-input))
<mgsk> aeth | The advantage of %foos is that you can use it for multiple functions in the same file, which is more common than you think.
<aeth> The interesting thing about CL is that there's always 4 ways to do it
<mgsk> Can you say more about that? I don't follow
__main__ has joined #lisp
<jcowan> mgsk: About what?
<mgsk> Do you mean I might eventually like to have functionality from my label used outside of that label's scope? i.e. use it as a top-level function?
<mgsk> jcowan that was @ aeth
<aeth> mgsk: If you write a %foo, %bar, and %baz instead of using labels foo, bar, and baz, and otherwise treat them identically in the function foobar, then if you write a barfoo later on, you can simply use %foo and %baz in the same file, since they're local to the package and not local to the function
<aeth> Instead of copying and pasting
<mgsk> (although I didn't much follow what you had to say about the tail call stuff, jcowan :D)
<jcowan> I have seen this %-convention before, but isn't it redundant to just not exporting the function symbol?
<mgsk> aeth: of course if I found myself repeating things, then I would make it a more general defun.
broccolistem has joined #lisp
raynold has joined #lisp
<aeth> jcowan: Yes, but in CL you can do some-package::foo and access unexported symbols, so some-package::%foo is telling the user not to do that.
<mgsk> (if you're usin packaging)
<Shinmera> jcowan: Typically % signifies that the function might have more context that it needs, or requires additional intimate knowledge.
<jcowan> IOW they are both permissive controls
<jcowan> but one is a stronger control than another?
<Shinmera> jcowan: Rather than something that you might be able to call and is just internal.
mishoo_ has quit [Ping timeout: 260 seconds]
<aeth> cliki calls it: "low-level, fast, dangerous function, or Lisp system specific implementation of foo"
<fiddlerwoaroof> Xach: what does that look like? Every time I've tried that, sbcl optimizes a bunch of the state functions away
<aeth> But I've seen it used for things like e.g. helper functions for macros
<jcowan> That says %foo is "low-level, fast, dangerous function, or Lisp system specific implementation of foo". That makes more sense than just "internal".
<fiddlerwoaroof> Macrolet is pretty cool as a macroexpansion target too.
<jcowan> Local macros are something I would never use myself
<aeth> symbol-macrolet is used all of the time, although it's usually used indirectly via with-accessors
<jcowan> Yes, that's a special case
<aeth> It turns foo into (foo some-obj) automatically and saves a ton of typing and parentheses
<fiddlerwoaroof> I don't usually use them in normal code, but they're useful if you have a macro with a complicated syntax
<fiddlerwoaroof> e.g. something dsl-y
r_______ has quit [Ping timeout: 260 seconds]
<fiddlerwoaroof> you just expand to `(macrolet (...subforms) ,@body)
<aeth> You should use stuff like that with care, though. Advanced macro usage might not be inspectable with M-.
<fiddlerwoaroof> It is pretty inspectable with C-c M-e
<fiddlerwoaroof> The slime macrostepper is pretty amazing
<jcowan> I forget, are local macros allowed to be mutually recursive?
<fiddlerwoaroof> I think so: I'm pretty sure macroexpansion runs on the generated code until it stops changing
<aeth> Iirc cl-sdl2 in its event handling code does something in macros where it manually replaces certain things while walking through the source code in with-sdl-event. Actually, it's really c-let in one of the libraries it uses. But, anyway, (event ...) looks like it exists and it really doesn't, and it was painful to figure out what it was doing. No M-., no C-c M-e.
<aeth> That's the most annoying advanced macro usage I've seen.
<aeth> Looks like it's really an autowrap thing
<fiddlerwoaroof> One thing that's nice about racket is that its macros are designed to give a good debugging experience
<fiddlerwoaroof> I suspect something similar could be possible in CL, if there was a library for a consistent interface for things like source locations
bms_ has joined #lisp
<bms_> Hello. Is gitlab.common-lisp.net not working for anyone else? 502 error.
<mgsk> bms_: 502
<jmercouris> bms_: Also not working for me
<jmercouris> bms_: In the future you can: http://isitdownrightnow.com
damke has joined #lisp
Oladon has joined #lisp
<bms_> Okay, thanks.
trocado has joined #lisp
orivej has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 264 seconds]
randomstrangerb has quit [Ping timeout: 248 seconds]
varjagg has quit [Remote host closed the connection]
varjagg has joined #lisp
randomstrangerb has joined #lisp
orivej has joined #lisp
bms_ has quit [Quit: Leaving]
selwyn has joined #lisp
makomo has joined #lisp
Ellusionist has quit [Ping timeout: 248 seconds]
<raynold> Ahh it's a wonderful day
<jcowan> mgsk: https://www.lua.org/pil/6.3.html is a good example of a tail recursive state machine. It's in Lua, but should be readable.
bms_ has joined #lisp
<jcowan> "return foo()" is how you mark a tail call in Lua (I'm not sure why Lua doesn't just figure out where they are, but it doesn't)
<sigjuice> Should &foo be listed as a convention here? http://www.cliki.net/Naming+conventions
<phoe> sigjuice: naming conventions for what?
<phoe> &foo means that FOO is a lambda list keyword. and a list of these for portable code is constant.
<phoe> clhs lambda-list-keywords
<phoe> theoretically, implementations may extend this list; practically, your code won't use them anyway.
<phoe> unless you're willing to do really weird stuff with reader conditionals like #+awesomecl (defun foo (&amazing bar) (frob bar))
<sigjuice> &key etc. have special meaning according to the standard. earmuffs don't.
jfb4 has quit [Ping timeout: 240 seconds]
<phoe> yes, and therefore it's not really a naming convention per se.
<phoe> you don't name things with &foo.
<jcowan> But it is a convention; you can write (defparameter &foo 32) and then &foo is an ordinary variable
<p_l> sigjuice: earmuffs are social convention
<phoe> you use the existing set of &allow-other-keys, &aux, &body, &environment, &key, &optional, &rest, and &whole.
<phoe> jcowan: ew
<jcowan> I agree, but that's because it violates a (strong) convention, not because it violates a rule of CL
<phoe> in this case, yes, the convention says, for Naggum's sake don't do shit like this.
<mgsk> Cheers, jcowan. Reading
<jcowan> ergo it belongs in the list of conventions
<phoe> just like (defvar
argoneus has quit [Ping timeout: 272 seconds]
<phoe> (defvar |42| "dffsfd")
JuanDaugherty has quit [Ping timeout: 248 seconds]
<jcowan> Vile and disgustium
jfb4 has joined #lisp
<phoe> jcowan: correct. With a meaning of "don't use it in your naming".
argoneus has joined #lisp
reu has quit [Ping timeout: 255 seconds]
<sigjuice> &key is not a naming convention. It can't really use !key or something else that I feel like.
<sigjuice> nevermind. I think I have this backwords :p
JenElizabeth has joined #lisp
jstypo has quit [Read error: Connection reset by peer]
<mgsk> jcowan: tail call optimisation seems like such an obvious thing to do. I wonder why python doesn't do it. Maybe it's harder than it looks.
<mgsk> jcowan: also I don't see the importance of "state machine" in that article, but interesting nevertheless.
orivej_ has joined #lisp
orivej has quit [Read error: Connection reset by peer]
funnel has quit [Ping timeout: 255 seconds]
<phoe> mgsk: not always obvious.
<phoe> suppose that you want to see all stack frames for debugging purposes. suddenly, you can't TCO.
<mgsk> But what if you only write bug-free?
* jcowan laughs
hhdave has quit [Quit: hhdave]
quazimodo has joined #lisp
josemanuel has quit [Quit: leaving]
hhdave has joined #lisp
jstypo has joined #lisp
jfb4 has quit [Ping timeout: 240 seconds]
jfb4 has joined #lisp
reu has joined #lisp
Ellusionist has joined #lisp
shifty has quit [Ping timeout: 248 seconds]
<selwyn> is there anyone here who is working on gsll?