jackdaniel 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.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
zdm has quit [Client Quit]
zdm has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
_paul0 has joined #lisp
paul0 has quit [Read error: Connection reset by peer]
notzmv has joined #lisp
igemnace has joined #lisp
alexanderbarbosa has joined #lisp
lavaflow has quit [Ping timeout: 245 seconds]
igemnace has quit [Remote host closed the connection]
schjetne has quit [Ping timeout: 258 seconds]
karswell has quit [Read error: Connection reset by peer]
karswell has joined #lisp
lavaflow has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
libertyprime has joined #lisp
zdm has quit [Quit: Leaving]
davr0s_ has quit [Ping timeout: 246 seconds]
davr0s has quit [Ping timeout: 246 seconds]
Theo__ has joined #lisp
t58_ has quit [Quit: Night]
analogue has quit [Quit: Leaving]
analogue has joined #lisp
ravndal has quit [Remote host closed the connection]
zdm has joined #lisp
zdm has left #lisp [#lisp]
ravndal has joined #lisp
analogue has quit [Quit: Leaving]
analogue has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
semz has quit [Ping timeout: 264 seconds]
elderK has joined #lisp
nanoz has joined #lisp
fengshaun has quit [Ping timeout: 258 seconds]
semz has joined #lisp
awolven has joined #lisp
Jeanne-Kamikaze has quit [Ping timeout: 245 seconds]
schjetne has joined #lisp
nanoz has quit [Read error: Connection timed out]
analogue has quit [Quit: Leaving]
nanoz has joined #lisp
torbo has joined #lisp
dale has joined #lisp
makomo_ has joined #lisp
makomo has quit [Ping timeout: 244 seconds]
alexanderbarbosa has quit [Remote host closed the connection]
flazh has joined #lisp
schjetne has quit [Ping timeout: 268 seconds]
shifty has joined #lisp
igemnace has joined #lisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #lisp
shifty has quit [Ping timeout: 244 seconds]
igemnace has quit [Remote host closed the connection]
<beach> Good morning everyone!
<edgar-rft> oink
shifty has joined #lisp
igemnace has joined #lisp
sjl has joined #lisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #lisp
aeth has quit [Ping timeout: 244 seconds]
aeth has joined #lisp
aeth has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
aeth has joined #lisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #lisp
Theo__ has quit [Remote host closed the connection]
Theo__ has joined #lisp
torbo has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
fengshaun has joined #lisp
Nomenclatura has joined #lisp
zaquest has quit [Read error: Connection reset by peer]
zaquest has joined #lisp
nanoz has quit [Ping timeout: 245 seconds]
karswell has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
karswell has joined #lisp
karlosz has quit [Client Quit]
_Theo_ has joined #lisp
stepnem has quit [Ping timeout: 244 seconds]
Theo__ has quit [Ping timeout: 268 seconds]
karswell has quit [Ping timeout: 246 seconds]
permagreen has quit [Remote host closed the connection]
karlosz has joined #lisp
yoeljacobsen has quit [Ping timeout: 258 seconds]
gravicappa has joined #lisp
schjetne has joined #lisp
libertyprime has quit [Ping timeout: 268 seconds]
sindan has quit [Remote host closed the connection]
sindan has joined #lisp
<no-defun-allowed> drmeister: I have ABCL running as a Minecraft (Forge) mod, but I haven't a clue how any classes work, nor how to use Java or the Java FFI.
aeth has quit [Ping timeout: 258 seconds]
aeth has joined #lisp
makomo_ has quit [Ping timeout: 245 seconds]
<mstdnuser[m]> which lisp package should i use from https://wiki.debian.org/CommonLisp
<no-defun-allowed> apt install sbcl emacs
esrse has joined #lisp
<mstdnuser[m]> does it hav to be emacs?
<no-defun-allowed> if you don't hate yourself, yes
<mstdnuser[m]> I like atom tho
<mstdnuser[m]> I wanna use gui
<AndrewYoung> Emacs has a GUI.
<AndrewYoung> But mainly it has a nice debugger.
<AndrewYoung> Atom will work fine, but you won't have the built in debugger.
<beach> What "nice debugger" does Emacs have?
<AndrewYoung> slime or sly
<beach> Hmm.
<mstdnuser[m]> Atom probably has a debugger plugin
<AndrewYoung> Looks like it can use slime
shka_ has joined #lisp
schjetne has quit [Ping timeout: 268 seconds]
libertyprime has joined #lisp
<no-defun-allowed> well you can use Atom but I don't know if it has the SLIME inspector, debugger, all that jazz
<mstdnuser[m]> it's there right above.
<AndrewYoung> Yeah, the plugin looks like it is a work in progress, so some things might not work right.
<mstdnuser[m]> you got an ML room?
<mstdnuser[m]> that's fine ill help them test then
Inline__ has quit [Quit: Leaving]
<no-defun-allowed> ML?
<AndrewYoung> Do you mean Machine Learning or the ML programming language?
<mstdnuser[m]> the latter
<AndrewYoung> Searching /list, I found #CakeML
<AndrewYoung> I support ##lisp might be good.
<AndrewYoung> s/support/suppose/
dale has quit [Quit: My computer has gone to sleep]
vlatkoB has joined #lisp
karlosz has quit [Quit: karlosz]
Nomenclatura has quit [Quit: q]
orivej has quit [Ping timeout: 246 seconds]
<wooden> when asdf fails to load my project the backtrace in slime is all about asdf -- no links to the code of mine that actually failed to compile. is there a way to jump to the code that failed to load via asdf? the best i've found has been to go back to the sbcl repl and search the buffer up for "error", but sometimes there is no error.
manualcrank has quit [Quit: WeeChat 1.9.1]
SaganMan has joined #lisp
<beach> wooden: What does the error message say?
<beach> I assume there must be one since you have a backtrace.
Gnuxie[m] has joined #lisp
<flip214> in CFFI, is there a way to get automatic translator functions (from eg. an alist or a plist) to the foreign type?
<flip214> the examples for type translators all repeat the struct name and slots a few times
<pjb> flip214: yes. Write a library of such automatic translator functions, publish it, and then use ql:quickload to get it!
<flip214> pjb: thanks a lot, exactly the answer I've been waiting for.
karlosz has joined #lisp
<wooden> beach: it says that it failed compiling one of my source code files, but then every level of the stack is all about where asdf failed in *its* code
JohnMS_WORK has joined #lisp
<beach> And no indication of where the problem is? Hmm.
<beach> I understand your problem. Welcome to the mediocre tool support for free Common Lisp implementations.
<flip214> pjb: reading the source reveals that (cffi:defcstruct (name :conc-name my-struct-name-) ...) does 99% of what I need... why is that not in the documentation?
vydd has joined #lisp
vydd has joined #lisp
vydd has quit [Changing host]
shka_ has quit [Ping timeout: 258 seconds]
scymtym has quit [Ping timeout: 245 seconds]
flamebeard has joined #lisp
JohnMS_WORK has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
vydd has quit [Ping timeout: 245 seconds]
knicklux has joined #lisp
amerlyq has joined #lisp
jprajzne has joined #lisp
ltriant has quit [Quit: leaving]
nanoz has joined #lisp
karlosz has quit [Quit: karlosz]
gxt has quit [Ping timeout: 260 seconds]
vydd has joined #lisp
malm has quit [Ping timeout: 246 seconds]
malm has joined #lisp
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 244 seconds]
SN_ has joined #lisp
thijso has joined #lisp
red-dot has quit [Read error: Connection reset by peer]
SN_ is now known as red-dot
schjetne has joined #lisp
<thijso> Annoying! The machine I run IRC on has a sdd with I think a loose connection on the board where the cables are, so randomly it dies because the HD gets lost. Trying not to bump my desk too much...
<thijso> But good morning, everyone...
<sindan> I'm loading a value from a place that might not exist; in order to implement a defalu value, is there any practical problem to writing (or val 0) instead of (if val val 0), "val" being the expression that might be nil? The expression is long so it's best to not have to write it twice.
<sindan> s/defalu/default/
shifty has quit [Ping timeout: 244 seconds]
<beach> sindan: Semantically, you can write (or val 0), but you are sending the wrong message to the person reading your code.
<beach> The message you are sending is that val is a Boolean variable.
<beach> sindan: To send the right message, use (if (null val) 0 val).
<beach> That says "If val is NIL, by which I mean that it does not have the right value, then use 0 instead."
<beach> sindan: On the other hand, it would probably be better to use "unbound" to mean "not exist".
<beach> sindan: In which case, you would say (if (boundp val) val 0).
<beach> Er, (if (boundp 'val) val 0)
<beach> Sorry.
<sindan> beach: I agree it's not the best optimization; the program is only for myself, so I was trying to not copypaste the expression twice.
nanoz has quit [Ping timeout: 244 seconds]
<sindan> I can write a macro
<sindan> That way I only see the expression once.
<beach> That too. If you keep your program to yourself, you can write whatever you like.
scymtym has joined #lisp
<sindan> beach, thanks
jonatack has quit [Ping timeout: 250 seconds]
nanoz has joined #lisp
<beach> sindan: If val can be an arbitrary expression (and therefore not an unbound variable), you should bind it to a lexical variable to avoid multiple evaluations.
<beach> (let ((<temp> val)) (if (null <temp>) 0 <temp>)), something like that.
varjag has joined #lisp
<sindan> beach: ah yes, but rather use gensym if I'm going to use the macro in several places?
orivej has joined #lisp
<beach> Yes, by <temp> I basically meant a GENSYM.
Cymew has joined #lisp
flamebeard has quit []
shka_ has joined #lisp
Cymew has quit [Quit: Konversation terminated!]
Cymew has joined #lisp
makomo_ has joined #lisp
flamebeard has joined #lisp
hhdave has joined #lisp
awolven_ has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
awolven has quit [Ping timeout: 250 seconds]
schjetne has quit [Ping timeout: 258 seconds]
thijso has quit [Quit: leaving]
thijso has joined #lisp
thijso has quit [Client Quit]
ljavorsk__ has joined #lisp
jonatack has joined #lisp
jonatack has quit [Client Quit]
jonatack has joined #lisp
schjetne has joined #lisp
tourjin has joined #lisp
<tourjin> is slime a plugin of emacs?
<tourjin> and sliv is plugin of vim?
<tourjin> slimv
<shka_> tourjin: pretty much yeah
m00natic has joined #lisp
vydd has quit [Ping timeout: 245 seconds]
ggole has joined #lisp
gxt has joined #lisp
vydd has joined #lisp
vydd has joined #lisp
vydd has quit [Changing host]
defaultxr has quit [Ping timeout: 245 seconds]
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life has joined #lisp
nostoi has joined #lisp
nostoi has quit [Client Quit]
nostoi has joined #lisp
tourjin has quit [Ping timeout: 246 seconds]
stepnem has joined #lisp
AndrewYoung has quit [Remote host closed the connection]
orivej has joined #lisp
vydd has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 244 seconds]
vydd has joined #lisp
Cymew has joined #lisp
amerlyq has quit [Quit: amerlyq]
<flip214> minion: memo for tourjin: there's also vlime for vim
<minion> Remembered. I'll tell tourjin when he/she/it next speaks.
<flip214> does anyone have an example of sending a (vector (unsigned-byte 8) (*)) via CFFI to a function expecting a char*?
libertyprime has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 252 seconds]
nostoi has quit [Quit: Verlassend]
awolven_ has quit [Ping timeout: 246 seconds]
pjb has joined #lisp
t58 has joined #lisp
beach has quit [Ping timeout: 276 seconds]
libertyprime has joined #lisp
thijso has joined #lisp
thijso has quit [Client Quit]
thijso has joined #lisp
amerlyq has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
orivej has joined #lisp
vydd has quit [Remote host closed the connection]
vydd has joined #lisp
vydd has quit [Changing host]
vydd has joined #lisp
jonatack has quit [Ping timeout: 244 seconds]
beach has joined #lisp
aautcsh has quit [Quit: aautcsh]
ljavorsk__ has quit [Quit: I'm out, bye]
v88m has quit [Ping timeout: 244 seconds]
ljavorsk has joined #lisp
frgo has quit [Ping timeout: 244 seconds]
esrse has quit [Ping timeout: 245 seconds]
<Colleen> vydd: Shinmera said at 2017.06.21 05:32:57: Popular overall, or popular in Lisp?
<Shinmera> wow, blast from the past
<vydd> oh wow. so last time I visited was 2 years ago :\ Shinmera, if you still know what this was about, I'm happy to answer
<Shinmera> I don't.
<jackdaniel> I feel stagnant, it doesn't feel as if you haven't said anything for two years, hm
acolarh has quit [Ping timeout: 244 seconds]
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Like it? Visit #hydrairc on EFNet]
<vydd> weird. yeah, ok, I know I haven't been around, but 2 years is a lot. heh.
<drmeister> no-defun-allowed: So you have ABCL running as a Minecraft (Forge) mode but there's no documentation or any information on how to access the Java classes? What I would do starting in a situation like that is I would punch some trees and then take the wood and craft planks and sticks and use those to craft a wooden pick. Then you can mine for cobblestone and use that to craft a stone pick.
* drmeister could keep going
* drmeister usually spends his first night in Minecraft crying in a dark hole - trying to avoid zombies.
ljavorsk has quit [Quit: I'm out, bye]
ljavorsk has joined #lisp
frgo has joined #lisp
quazimodo has quit [Ping timeout: 244 seconds]
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
<no-defun-allowed> drmeister: Oh, ABCL is very, very well documented and I got myself through some examples.
<no-defun-allowed> But as a proprietary program, all the methods' names are obsfucated and you need a very big table of method names to translate your way out.
<no-defun-allowed> For most mods, this is no problem, because the toolchain has a post-processing step that consults that table and replaces all the methods, but ABCL doesn't benefit from this as its method lookups are done at runtime.
SaganMan has quit [Quit: WeeChat 1.6]
<no-defun-allowed> In #lispcafe we figured out where that table is and how to read it, and I was able to pull out a method (net.minecraft.client.Minecraft.getMinecraft) and call it using it.
<no-defun-allowed> So now I just have to figure out Forge, which doesn't have any nice documentation pages with a list of classes and methods, and instead wants you to rip out some bulky Java IDE to work things out.
<jackdaniel> I'm still waiting for a CL implementation written for a hardware built with mnecraft
kajo has quit [Ping timeout: 240 seconds]
<no-defun-allowed> "Compiling Common Lisp to Minecraft Redstone", a paper by the S-expressionists published in ELS 2029
<no-defun-allowed> The plan is to write a wrapper around java:jmethod (call it jmethod*) which performs this swizzling and I can work through a few Forge examples from there.
makomo_ has quit [Ping timeout: 244 seconds]
makomo_ has joined #lisp
<no-defun-allowed> drmeister: I advise you make charcoal early on, then make torches, so you can cry in a lit up hole at least.
dddddd has joined #lisp
aautcsh has joined #lisp
jonatack has joined #lisp
angavrilov has quit [Ping timeout: 245 seconds]
frgo_ has joined #lisp
ravenousmoose has joined #lisp
frgo_ has quit [Read error: Connection reset by peer]
frgo_ has joined #lisp
frgo has quit [Ping timeout: 245 seconds]
jonatack has quit [Quit: jonatack]
jonatack has joined #lisp
gjvc has quit [Quit: leaving]
gabiruh has joined #lisp
ravenousmoose has quit [Ping timeout: 250 seconds]
EvW1 has joined #lisp
dddddd has quit [Ping timeout: 244 seconds]
Bike has joined #lisp
dddddd has joined #lisp
angavrilov has joined #lisp
LiamH has joined #lisp
igemnace has joined #lisp
aautcsh has quit [Quit: aautcsh]
<moldybits> :p
ravenousmoose has joined #lisp
ravenousmoose has quit [Ping timeout: 264 seconds]
Demosthenex has quit [Ping timeout: 246 seconds]
Demosthenex has joined #lisp
astronavt___ is now known as astronavt
ljavorsk has quit [Ping timeout: 258 seconds]
acolarh has joined #lisp
HDurer has quit [Ping timeout: 246 seconds]
lucasb has joined #lisp
warweasle has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
aautcsh_ has joined #lisp
xantoz has quit [Remote host closed the connection]
xantoz has joined #lisp
cosimone has joined #lisp
dale has joined #lisp
jiny has joined #lisp
jiny is now known as tourjin
tourjin has quit [Client Quit]
frgo_ has quit [Remote host closed the connection]
tourjin has joined #lisp
<thijso> Jeeshh. I've just about kicked my minecraft addiction, guys. Stop talking about that in here.
<dlowe> are we talking about https://github.com/gmasching/sucle
<dlowe> as part of the forge installation process, they decompile your installed minecraft back into java code and then patch annotations into it. You're intended to read the code to find out what to tweak/override.
<dlowe> honestly, it's so complicated and difficult I'm amazed anyone writes a mod
<dlowe> (at least to get started)
EvW1 has quit [Remote host closed the connection]
EvW has joined #lisp
<tourjin> is there any preassigned style in emacs like dark mode? white screen hurts my eyes.
<minion> tourjin, memo from flip214: there's also vlime for vim
Inline has joined #lisp
<tourjin> actually every terms has white backgroud.
<dlowe> tourjin: Your question would probably be more quickly answered in #emacs
<tourjin> thanks
Cymew has quit [Ping timeout: 245 seconds]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
xkapastel has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
shifty has joined #lisp
user___ has joined #lisp
Cymew has joined #lisp
yoeljacobsen has joined #lisp
jeosol has quit [Ping timeout: 260 seconds]
<drmeister> no-defun-allowed: Please keep me up to date on your minecraft/common lisp exploration.
* drmeister is looking forward to a redstone lisp machine implementation.
PuercoPope has quit [Remote host closed the connection]
analogue has joined #lisp
shka_ has quit [Quit: WeeChat 1.9.1]
frgo has joined #lisp
vydd has quit [Ping timeout: 245 seconds]
akoana has joined #lisp
papachan has joined #lisp
Cymew has quit [Ping timeout: 245 seconds]
analogue has quit [Quit: Leaving]
Cymew has joined #lisp
Achylles has joined #lisp
v88m has joined #lisp
Cymew has quit [Ping timeout: 268 seconds]
schjetne has quit [Ping timeout: 268 seconds]
Achylles has quit [Remote host closed the connection]
Oladon_work has joined #lisp
davr0s has joined #lisp
davr0s_ has joined #lisp
Achylles has joined #lisp
rippa has joined #lisp
madand has joined #lisp
skidd0 has joined #lisp
Bike has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 245 seconds]
shifty has joined #lisp
jprajzne has quit [Quit: Leaving.]
flamebeard has quit []
amerlyq has quit [Quit: amerlyq]
Achylles has quit [Read error: Connection reset by peer]
amerlyq has joined #lisp
NickBusey8 has joined #lisp
NickBusey has quit [Ping timeout: 245 seconds]
smazga has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
amerlyq has quit [Quit: amerlyq]
Bike has joined #lisp
Cymew has joined #lisp
<thijso> If I do a (make-instance inside of a package, I shouldn't need to fully qualify the classname, right? I'm trying to indirectly instantiate a class, by doing (let ((class (intern (format nil "~a~a" classname suffix))) and then using that to (make-instance class ..
<thijso> But it's not working. If I print out some stuff it looks like the difference is that it works with <package>::<class> and not with just <class>
<Bike> depends on what you mean by "inside a package". that code will create the symbol with intern, so it'll be interned in whatever *package* is in place when intern is called.
<Bike> which might be different from the package in place when the code is compiled
<Bike> intern lets you explicitly specify a package for the new symbol, tho
<thijso> yeah, but it's all inside the same file which has an (in-package :bla) at the top...
<Bike> Right, that's what package the code will be COMPILED in
<thijso> Well, no, it's not the same file, but all files have that at the top...
<Bike> but if this is in a function or something, the package will be different at runtime.
<Bike> probably will be.
<thijso> hmmm
<thijso> So I should explicitly intern in the same package?
<thijso> Lemme try that
<Bike> Probably, yes. I don't understand the whole shape of your system though.
<thijso> right... so that was it.
<thijso> Thanks, Bike
nydel has joined #lisp
nydel has joined #lisp
nydel has quit [Changing host]
<Bike> glad to be of assistance
schjetne has joined #lisp
<Shinmera> you can also do `(let ((*package* #.*package*)) ...)` to bind the runtime package to the one used during compilation.
tourjin has quit [Remote host closed the connection]
vaporatorius has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
tourjin has joined #lisp
<flip214> minion: memo for vydd: thanks, but I'd hoped to _not_ touch the individual bytes - just push the address on
<minion> Remembered. I'll tell vydd when he/she/it next speaks.
vap1 has joined #lisp
vaporatorius has quit [Ping timeout: 246 seconds]
srji has quit [Quit: leaving]
gravicappa has quit [Ping timeout: 245 seconds]
kajo has joined #lisp
srji has joined #lisp
<flip214> minion: memo for vydd: cffi:with-pointer-to-vector-data looks good
<minion> Remembered. I'll tell vydd when he/she/it next speaks.
skidd0 has left #lisp ["WeeChat 2.5"]
hhdave has quit [Quit: hhdave]
slyrus has quit [Remote host closed the connection]
slyrus has joined #lisp
superkumasan has joined #lisp
papachan has quit [Quit: Leaving]
gxt has quit [Quit: WeeChat 2.5]
orivej has joined #lisp
gravicappa has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
defaultxr has joined #lisp
m00natic has quit [Remote host closed the connection]
mindCrime_ has joined #lisp
tourjin has quit [Ping timeout: 258 seconds]
glv has joined #lisp
Cymew has quit [Read error: Connection reset by peer]
kpoeck has quit [Remote host closed the connection]
tourjin has joined #lisp
manualcrank has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
orivej has quit [Ping timeout: 244 seconds]
yoeljacobsen has quit [Ping timeout: 245 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
gareppa has joined #lisp
gravicappa has quit [Ping timeout: 264 seconds]
red-dot has joined #lisp
Oladon_work has quit [Remote host closed the connection]
orivej has joined #lisp
tourjin has quit [Ping timeout: 268 seconds]
sjl_ has joined #lisp
dvdmuckle has quit [Quit: Bouncer Surgery]
dvdmuckle has joined #lisp
gareppa has quit [Quit: Leaving]
yoeljacobsen has joined #lisp
glv has quit [Remote host closed the connection]
jlarocco has joined #lisp
hiroaki has joined #lisp
yoeljacobsen has quit [Ping timeout: 245 seconds]
Aruseus has joined #lisp
Necktwi has joined #lisp
awolven has joined #lisp
<stylewarning> If I use COMPUTE-APPLICABLE-METHODS, how can i actually call the method?
Necktwi has quit [Client Quit]
<Bike> Which method? The effective method, or an individual method?
<stylewarning> Any of them; looks like I need METHOD-FUNCTION from the MOP
<Bike> Yes, you can take the method-function and then call it with a list of arguments and list of next methods.
<Bike> that'll get a bit tricky with :around methods
vydd has joined #lisp
vydd has quit [Changing host]
vydd has joined #lisp
vydd has quit [Ping timeout: 258 seconds]
nanoz has quit [Quit: Leaving]
fragamus has joined #lisp
Oladon_work has joined #lisp
<fragamus> can anyone point to some doc that sheds light on structure of clisp c code
sauvin has quit [Ping timeout: 268 seconds]
cosimone has quit [Quit: Leaving]
ravenousmoose has joined #lisp
user___ has quit [Ping timeout: 244 seconds]
ravenousmoose has quit [Ping timeout: 252 seconds]
jgerman has joined #lisp
EvW has joined #lisp
tourjin has joined #lisp
scymtym has joined #lisp
tourjin has quit [Read error: Connection reset by peer]
khrbt has joined #lisp
raghavgururajan has joined #lisp
raghavgururajan has quit [Read error: Connection reset by peer]
varjag has joined #lisp
yoeljacobsen has joined #lisp
gxt has joined #lisp
orivej has quit [Ping timeout: 244 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
yoeljacobsen has quit [Ping timeout: 245 seconds]
vydd has joined #lisp
vydd has joined #lisp
vydd has quit [Changing host]
vlatkoB has quit [Remote host closed the connection]
shka_ has joined #lisp
shangul has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
analogue has joined #lisp
defaultxr has quit [Quit: brb]
fragamus has quit [Ping timeout: 268 seconds]
shifty has quit [Ping timeout: 268 seconds]
ggole has quit [Quit: Leaving]
fragamus has joined #lisp
cosimone has joined #lisp
karlosz has joined #lisp
orivej has joined #lisp
fragamus has quit [Ping timeout: 244 seconds]
karlosz has quit [Quit: karlosz]
khisanth_ has quit [Ping timeout: 245 seconds]
_Theo_ has quit [Read error: Connection reset by peer]
madand has quit [Remote host closed the connection]
khisanth_ has joined #lisp
Aruseus has quit [Remote host closed the connection]
Aruseus has joined #lisp
shangul has quit [Remote host closed the connection]
fragamus has joined #lisp
shka_ has quit [Ping timeout: 246 seconds]
sameerynho has joined #lisp
analogue has quit [Ping timeout: 246 seconds]
orivej has quit [Read error: Connection reset by peer]
<sameerynho> hey folks, I'm using slime and swank with Emacs. When i use slime-connect to connect to swank server it just output connecting to .... and do nothing
<sameerynho> how can i debug this
orivej has joined #lisp
fragamus has quit [Ping timeout: 258 seconds]
Ven`` has joined #lisp
ralt has joined #lisp
fragamus has joined #lisp
karlosz has joined #lisp
karlosz_ has joined #lisp
skidd0 has joined #lisp
Lord_of_Life_ has joined #lisp
<skidd0> is there a `continue` like keyword for a loop body?
<Bike> no. generally you can just use conditionals, though.
<skidd0> okay that was what i was going to do while i waited for an answer
<skidd0> ty Bike
<Bike> like instead of (loop (if (foo) (continue)) ...), (loop (unless (foo) ...))
<ralt> I usually either rewrite my logic or use (block)
schjetne has quit [Quit: No Ping reply in 180 seconds.]
<ralt> like (loop (block continue (if (foo) (return-from continue) ...
<Bike> in really complicated cases you might want tagbody, but not often
Lord_of_Life has quit [Ping timeout: 246 seconds]
<skidd0> thanks guys
Lord_of_Life_ is now known as Lord_of_Life
<ralt> I like the "early return" pattern in other languages
<ralt> but I somehow end up avoiding it in lisp
schjetne has joined #lisp
karlosz has quit [Ping timeout: 250 seconds]
karlosz_ is now known as karlosz
<ralt> I think the name is "guard pattern"?
<ralt> "guard clause"
<ralt> according to google
hh47 has joined #lisp
karlosz has quit [Quit: karlosz]
<skidd0> is there a library for input sanitization? or is it rather simple to roll your own?
vydd has quit [Quit: Leaving]
<semz> what kind of input
<Bike> and what kind of sanitization, no?
<jgkamat> Hey, does anyone know a library or easy method to get a super simple hackable calculator in common lisp. Eg: "1 + 3 + 4" = 8. I'm trying to eventually make a dice roller, ie: 5 + 2d4 = 5 + roll(4) + roll(4).
<jgkamat> I would like to avoid doing any work like building a parser or whatever if possible, but ideally it would be nice to support parenthasis and subtraction and other stuff like that
<thijso> How does CL manage class cleanup? If I have a class that contains a slot for a usocket socket, and I connect and use it, do I need to explicitly close the connection before the class instance goes away? Seems like the proper thing to do, but how? I'm looking in CLHS, but can't find anything on class instance destruction...
karlosz has joined #lisp
<Bike> jgkamat: you're asking for a parser, aren't you?
<Bike> thijso: try looking at the finalizers in the trivial-garbage library, but I think you're supposed to use more reliable means
<jgkamat> Bike: yes that would work, but ideally I would like it to be pre-packaged (ie: I wouldn't have to come up with grammars and all). If you know a good parser that's easy to use I'll take that as well
<Bike> well it depends on what syntax you want, i mean
<thijso> Bike: you mean for closing a socket or in general?
bitmapper has joined #lisp
<thijso> regarding the 'supposed to use more reliable means' I mean
cosimone has quit [Quit: Leaving]
<Bike> thijso: yes, as in, you should close the socket more explicitly than leaving it for whenever the object holding the reference to it happens to be garbage collected
<Bike> more like with-open-file
EvW has quit [Ping timeout: 250 seconds]
<thijso> Thanks, that clears it up.
<makomo_> ralt: agreed, i miss that idiom as well -- it gets rid of the trivial cases early and prevents indentation of the general case
<thijso> So now I have a number of 'exit' points in my class where basically processing stops and the class instance can die, having filled it's purpose. Seems like I need to sprinkle usocket:close-socket calls around those then?
<skidd0> semz, Bike: user input strings. looking to sanitize for a SQL DB
<makomo_> jgkamat: do you really need that particular syntax? you could make a sexp-based calculator, so your original expression would look something like (+ 5 (d 2 4))
jgerman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jgkamat> I definitely will need infix unfortunately, the people using it are non-technical.
<ralt> thijso: with-connected-socket etc?
<jgkamat> I did find http://www.github.com/jech/cl-yacc/blob/master/calculator.lisp though, which will probably be my starting point unless I find something more convienent
awolven has quit [Ping timeout: 252 seconds]
<Bike> if you look for "common lisp infix" you'll probably find a few libraries
<Bike> might not allow the roll() syntax though
makomo_ has quit [Ping timeout: 244 seconds]
<jgkamat> er, the 'roll' is a stand-in for actually rolling dice. I'll take a look though
madand has joined #lisp
makomo_ has joined #lisp
awolven has joined #lisp
mindCrime_ has quit [Ping timeout: 268 seconds]
igemnace has quit [Quit: WeeChat 2.5]
bendersteed has joined #lisp
madand has quit [Remote host closed the connection]
EvW has joined #lisp
Aruseus has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 246 seconds]
jmercouris has joined #lisp
<jmercouris> how could I use Lisp to capture audio from a soundcard?
fragamus has quit [Ping timeout: 258 seconds]
<no-defun-allowed> stupidest way is to pipe bytes from arecord (or equivalent)
bendersteed has quit [Read error: Connection reset by peer]
bendersteed has joined #lisp
<jmercouris> let's say I'm on Linux using Alsa or whatever
<no-defun-allowed> then yeah, open arecord and read some bytes out
<jmercouris> is it as simple as opening a file stream at the device?
<no-defun-allowed> hmm, dunno, but arecord is like that, you just read samples from its stdout
<jmercouris> I'm not sure I like this layer of indirection
<no-defun-allowed> fair enough
madand has joined #lisp
<no-defun-allowed> I found also-alsa: https://github.com/varjagg/also-alsa
hh47 has quit [Quit: hh47]
<semz> skidd0: I don't have enough experience to meaningfully recommend a SQL library, but I've used clsql in the past. If I remember correctly it follows the common Lisp (hah) theme of working with ASTs rather than strings, which means most input sanitation issues are avoided and only occur when you finally move from AST to string in a library function.
awolven is now known as clothespin
<skidd0> i'm not sure how that avoids the SQLi issue. if you convert some input string from AST to string, can't the malicious string content make it through those transformations?
<skidd0> at any rate, plain-odbc supports paramaterized statements, which should be enough
<jmercouris> skidd0: not if it is properly sanitized
<skidd0> well
<skidd0> jmercouris: that's what i'm looking to do
<aeth> skidd0: I haven't generated SQL before, but I have recently generated HTML. No, the malicious string content cannot make it through the transformations as long as you use our own write-escaped-string instead of write-string or whatever
<jmercouris> no-defun-allowed: very cool, thank you
Bike has quit [Quit: Bike]
<skidd0> i see, thanks aeth
karlosz has quit [Quit: karlosz]
<aeth> skidd0: The hypothetical write-escaped-string doesn't do write-string or write-line, it iterates through every character and does write-char if it's safe, and otherwise writes a string representing an escape instead of the char.
<aeth> And if you need more sanitization than that, you could do that.
<skidd0> i should see what chars to watch for in SQLi
<jmercouris> I wonder how something like datafly handles this
<jmercouris> or rather shall I say SXQL
<semz> skidd0: "if you convert some input string from AST to string" << The AST is not a string, that's the point. The input string occurs as some part of the AST
keep_learning has quit [Remote host closed the connection]
<aeth> And if the AST contains strings, then those strings are the only danger points (unless you e.g. convert symbols to strings automatically) so you just write your own write-string
<skidd0> ^ see that's what i mean
<skidd0> semz: the 'input string' was, at some point, a string. then it got put into the AST, then somehow back out to string for the DB to hold
<semz> is the input string arbitrary (or restricted) SQL or just some parameter for a query?
<skidd0> i was confused how turning the string into data for the AST, by its nature, removed the worry of malicious input
<jmercouris> that's the thing, what if you write (theoretical) (select "drop table;" from xyz)?
<jmercouris> there still is the "drop table;" in there
<skidd0> ^
<jmercouris> using some DSL does not eliminate the issue of sanitizing SQL
<skidd0> semz: the input string is existing user-entered data
<skidd0> it 'should' be just some easy strings
<jmercouris> unless that library has some sort of protection
<skidd0> but never trust user input
<semz> The point is that the escaping happens ONCE, at the end.
<jmercouris> I would suggest pick up SXQL and see if you can generate some malicious statements
<jmercouris> I'm not sure if protections are in place or not
<semz> and in the library
<skidd0> well i've already figured out my answer to this question
<semz> whereas otherwise you have people munging strings everywhere and haphazardly escaping this and that
<skidd0> but i appreciate the disscusion and help
<semz> which is the cause of almost all injection issues
<skidd0> right. sanitize once
<skidd0> well, in one spot
jmercouris has quit [Remote host closed the connection]
<semz> Let's take the example from above: If you represent the query as, say, `(select ,user-input from xyz) , then no matter what user-input is, as long as the conversion to a query string happens through the (escaping) library function, there is no injection issue.
varjag has quit [Ping timeout: 268 seconds]
<semz> And since the conversion to a string must happen somewhere (ideally inside the lib), you only get injection issues if you go really out of your way to introduce them
<semz> by reimplementing the conversion wrong or something
<skidd0> right, this what i understood
<skidd0> and yet, i'm no closer to a simple escaping/sanitization library unless i want to write my own
<semz> Oh alright, it seemed like we were talking past each other so I reiterated
<skidd0> it's okay!
<skidd0> that's IRC :]
LiamH has quit [Quit: Leaving.]
<skidd0> maybe it'll help some lurker, too
sjl_ has quit [Quit: WeeChat 2.3-dev]
Oladon_work has quit [Ping timeout: 260 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
<ralt> skidd0: you should use prepared statements anyway
<skidd0> in combination with paramaterized ones, is what i've been told
<ralt> you're guaranteed to do sanitization wrong
<skidd0> welp that's demotivating
<ralt> databases know how to do this stuff, let them do it :)
<skidd0> uhhh..
<skidd0> SQLi is what happens when a database does the thing it knows how to do
<skidd0> with data from bad people
<ralt> prepared statements
<ralt> or parametized, yes
<skidd0> thought it was and, not or
bendersteed has quit [Read error: Connection reset by peer]
<ralt> prepared statements are pre-parametized, essentially
bendersteed has joined #lisp
<skidd0> ah good point
<ralt> a prepared statement is like compiling your parametized
<ralt> but anyway, this lets the db take care of sanitization
<ralt> side note: I love postmodern
srji has quit [Ping timeout: 245 seconds]
<skidd0> i like it as well. but sadly my current task requires interacting with an MS SQL Server DB
<ralt> I wish you the best
<skidd0> which i found plain-odbc handles well enough
<skidd0> thanks ralt
<thijso> ralt: with-connected-socket is probably smarter, but my calls to usocket are spread over multiple methods. Maybe I should rethink and not bother about reusing sockets for replies. It is UDP after all.
papachan has joined #lisp
<ralt> thijso: it sounds like you want to have a (defmethod close ()) on your class, and then have a (with-my-object ()) that handles opening/closing of the socket
<ralt> thijso: or you just pass a connected socket to your class, and handle its lifecycle out of your class
<ralt> e.g. (with-connect-socket (sock) (let ((obj (make-instance :socket sock)) ...
<ralt> either way, the with- pattern is what you need to manage the lifecycle
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #lisp
<thijso> Ah, thanks ralt, that's helpful. I'll have to rethink some stuff I see. But that's for tomorrow.
Ven`` has quit [Client Quit]
bitmapper has quit [Remote host closed the connection]
<thijso> And, regarding the escaping discussion: I concur: let the db do it. mysql has a function (`quote` I think?) that does it for you correctly.
bitmapper has joined #lisp
<thijso> Maybe check how DBD (perl lib) does it? Or some other flavor of the day...
srji has joined #lisp
bendersteed has quit [Read error: Connection reset by peer]
bitmapper has quit [Remote host closed the connection]
bendersteed has joined #lisp
bitmapper has joined #lisp
Bike has joined #lisp
jgerman has joined #lisp
sameerynho has quit [Ping timeout: 246 seconds]
bendersteed has quit [Read error: Connection reset by peer]
<ralt> skidd0: looks like plain-odbc supports parametized statements just fine (exec-query *con* "select * from test1 where x = ?" 1)
<skidd0> yes, it does
<ralt> and prepared statements
<skidd0> yes
<ralt> you're good to go then :)
<skidd0> :)
<ralt> you don't need any input sanitization
<ralt> what you _do_ need, however, is making sure your output is escaped
<ralt> (XSS, in the typical scenario)
papachan has quit [Quit: Leaving]
<skidd0> i see
<ralt> if an attacker wants to store <script>alert('I eat your cookies!')</script> in the db, let him
<ralt> just make sure it's output appropriately
<skidd0> jus tescape it on its way out
<skidd0> yeaa
<skidd0> fun stuff
schjetne has quit [Ping timeout: 245 seconds]
karlosz has joined #lisp
skidd0 has left #lisp ["WeeChat 2.5"]
<ralt> you will typically want a couple of functions like (escape-plain) (to escape all html), (escape-html) (to allow some html tags), etc
EvW1 has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
EvW1 is now known as EvW
bumbling-monkey has joined #lisp
bumbling-monkey has quit [Read error: Connection reset by peer]
clothespin has quit [Ping timeout: 246 seconds]
* edgar-rft wants (escape-from-hell)
<mrcode_> what's the right way to ensure macroexpansion inside of a macro? i'm having a problem with (defmacro macro1 (&body body) (foofn (quote ,body)) and the invocation (macro1 (other-macro args))
karlosz has quit [Quit: karlosz]
<mrcode_> the inner macro seems to not expand :/
<mrcode_> i suspect due to the (quote ...) part
<no-defun-allowed> (macroexpand body)
<no-defun-allowed> yeah, quoted data won't get macroexpanded
<mrcode_> uhm... face-meets-desk moment
<mrcode_> thx no-defun-allowed
<no-defun-allowed> ywlcm
<no-defun-allowed> it happens, don't put yourself down
<mrcode_> I was just using macroexpand on the top level macro to see what it expands to.. never thought of using it for more than debugging
<Bike> mrcode_: yes, quoted objects aren't macroexpanded
<mrcode_> glad I asked here as I was about to seriously considering code-walking approach
<mrcode_> s/considering/start considering/
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
xkapastel has joined #lisp
smazga has quit [Quit: leaving]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<White_Flame> mrcode: typically, you'd just do (defmacro outer (&body) `(inner ,@body)) and let the system recurse through the generated macroexpansion
<White_Flame> if there are macros in the body, then they need to simply be in an evaluated place in the generated code
<White_Flame> what goal are you trying to solve?
karlosz has joined #lisp
MightyJoe has quit [Ping timeout: 246 seconds]
karlosz has quit [Client Quit]
cyraxjoe has joined #lisp
awolven has joined #lisp
mindthelion has joined #lisp
techquila has quit [Ping timeout: 250 seconds]
ebrasca has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]