jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<oni-on-ion> Shinmera: encountered connection errors, can't get her on freenode =(
fikka has quit [Ping timeout: 272 seconds]
AroPar has quit [Quit: Leaving]
<oni-on-ion> hmm yes maiden is quite complex. why did you write it ?
lavaflow_ has quit [Ping timeout: 252 seconds]
<AeroNotix> If I'm using a macro to generate some symbols, how should I export them?
dale has quit [Quit: dale]
<oni-on-ion> can use EXPORT method right alongside their creation
<oni-on-ion> *function
<oni-on-ion> ,clhs export
<oni-on-ion> clhs export
<AeroNotix> oh dang, ok
<AeroNotix> thanks
<oni-on-ion> yeh but its possible to accomplish in other ways surely. dang tho, its not a good solution ?
<AeroNotix> oni-on-ion: no no I meant "dang I didn't realise export was a function on its own"
<oni-on-ion> ahh, ok ^_^
fikka has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
<AeroNotix> is anyone using sb-cover with rove?
<AeroNotix> or just sb-cover in general
emaczen has quit [Read error: Connection reset by peer]
<pfdietz> I've used sb-cover
<pfdietz> Also COVER
<AeroNotix> pfdietz: seems something with rove+sb-cover breaks.
fikka has joined #lisp
<pfdietz> A bug report would be great.
<AeroNotix> I'm trying to figure out if it is just something stupid I've done or not
lavaflow_ has joined #lisp
pierpal has joined #lisp
emaczen has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
<oni-on-ion> (loop for value being the hash-values of (irc:users *con*) using (hash-key key) do (print value)) ;; holy moses....!
fikka has quit [Ping timeout: 252 seconds]
pfdietz has quit [Ping timeout: 246 seconds]
<AeroNotix> oni-on-ion: which channel?
<oni-on-ion> just a private one, its logged in as "aleash" right now
megalography has joined #lisp
lavaflow_ has quit [Ping timeout: 245 seconds]
<oni-on-ion> putting it in #lispgames because i want to generate some amusing fake titles among other useful bits of musery
plathrop has quit [Ping timeout: 264 seconds]
plathrop has joined #lisp
stnutt has quit [Ping timeout: 264 seconds]
pfdietz has joined #lisp
stnutt has joined #lisp
fikka has joined #lisp
commanderkeen has joined #lisp
<commanderkeen> it's been a long time since i've touched common lisp. how do i access a variable defined via defvar from another package? say im package :stumpwm and I want to access *servers* in :swank. my initial thought was swank:*servers* but that doesnt work
<no-defun-allowed> did you export the symbol?
<oni-on-ion> that should work, whats the error ?
<no-defun-allowed> otherwise you might need to do `swank::*servers*`
<commanderkeen> oooh. double colon got me. thanks a bunch
<oni-on-ion> hm i dont have that defined here with just slime =) (no stumpwm)
<aeth> oni-on-ion: (alexandria:maphash-values #'print (irc:users *con*))
<commanderkeen> i was trying with single colon. double works as expected
lavaflow_ has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
<AeroNotix> commanderkeen: but that's because it's not exported. Single colon works when the symbol is exported from the package.
<AeroNotix> Double is for accessing unexported package symbols. Not recommended to build software around relying on unexported symbols.
makomo has quit [Ping timeout: 272 seconds]
<commanderkeen> AeroNotix: thanks for the info. i was just reading up on the difference. i just wanted get running swank servers from my window manager.
<no-defun-allowed> aeth: `(maphash (lambda (k v) (declare (ignore k)) (print v)) (irc:users *con*))`
<Shinmera> oni-on-ion: I created it because I wanted a general framework for chat systems, and that's what it is.
<no-defun-allowed> looks nice
pjb has quit [Ping timeout: 252 seconds]
<saturn2> anyone know the author of this? https://github.com/brown/city-hash
<aeth> no-defun-allowed: That's basically what maphash-values is.
<saturn2> it no longer compiles with the latest sbcl and i wonder if they still want to maintain it or if i should try to figure it out
lavaflow_ has quit [Ping timeout: 244 seconds]
<oni-on-ion> aeth: aha cool =)
<oni-on-ion> no-defun-allowed: oh i like that one.
<oni-on-ion> Shinmera: alright, just curious, it looks awesome. i will try to get it to connect later, playing with cl-irc right now
fikka has joined #lisp
SenasOzys has joined #lisp
<no-defun-allowed> cl-irc is fun
<no-defun-allowed> i hooked it up to a markov generator
<oni-on-ion> heheh =)
bsund has quit [Remote host closed the connection]
arduo has quit [Remote host closed the connection]
<oni-on-ion> for some reason though, the hooks don't get updated
arduo has joined #lisp
<oni-on-ion> ie. a privmsg hook added, then change the hook , still uses the "old" one. maybe there is a priority for "compiled" code? i've been using C-c C-c in slime and i think its doing something different than my usual C-x e
ym_ is now known as ym
<oni-on-ion> saturn2: not sure, have you tried to contact them through github ?
fikka has quit [Ping timeout: 272 seconds]
<oni-on-ion> i've just come across about 6 erlang irc bots , all from 6+ 8+ years ago =P
<oni-on-ion> (last commits)
dddddd has quit [Remote host closed the connection]
<AeroNotix> Ahhh no, it's a bug in sb-cover
<AeroNotix> it doesn't handle utf8 when it is in source code.
<saturn2> oni-on-ion: i just thought i'd check irc first but i'll do that next
<AeroNotix> rove has some fancy pants symbols showing test success/failure (tick/cross) which sb-cover chokes on
<oni-on-ion> from different packages ?
<AeroNotix> oni-on-ion: was that a question to me
<oni-on-ion> just wondering if symbol choking is because package conflict, idk
<AeroNotix> oni-on-ion: shit, bad choice of wording there from me
<AeroNotix> rove has some unicode chars within its source. It seemed sb-cover was choking on those
Bike has joined #lisp
<AeroNotix> hmm, I remvoed them from the rove source (to test), sb-cover worked, I've since replaced them and now it's not failing in the exact same way
<AeroNotix> I can't find any fasl files related to the source file I edited. HMM
fikka has joined #lisp
<oni-on-ion> ohh
<oni-on-ion> not sure where fasls go, they only are made when compiling ?
<AeroNotix> well, locate/find can't find a fasl for the file which had the unicode
fikka has quit [Ping timeout: 264 seconds]
<AeroNotix> anyway, looks like you can pass :external-format to sb-cover:report any way. That might help if I can see why it's not failing again
arduo has quit [Ping timeout: 240 seconds]
smokeink has joined #lisp
<AeroNotix> well, I've deleted the fasls and it's still not failing
fikka has joined #lisp
<AeroNotix> Ugh, is there a better coverage system than sb-cover then? Now I'm running in to a different issue.
<AeroNotix> It's spitting out weird warnings about lisp files it can't find but their names are lists of numbers like (3 3 3 2 2 1 2 3)
<AeroNotix> WARNING:
<AeroNotix> Error finding source location for source path (3 2 2 1 2 2 2 1 0
<AeroNotix> 1) in file /home/xeno/.quicklisp/dists/quicklisp/software/portable-threads-20180131-git/portable-threads.lisp
<AeroNotix> ah I have an idea
robotoad has quit [Quit: robotoad]
<AeroNotix> yeah, deleting the fasls, recompiling without sb-coverage enabled removes those warnings
fikka has quit [Ping timeout: 252 seconds]
lavaflow_ has joined #lisp
<saturn2> on further investigation it wasn't city-hash's fault but a different package, nibbles, and updating that fixed things
<oni-on-ion> whats coverage ?
<oni-on-ion> saturn2: good that it works =) how old was city-hash ?
<saturn2> city-hash was last updated in 2016
Oladon has joined #lisp
robotoad has joined #lisp
<AeroNotix> oni-on-ion: runs your code (e.g. your test suite) and outputs a set of files which highlight what parts of the code were actually ran. Helps figure out what code is left untested.
fikka has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
caltelt_ has joined #lisp
SenasOzys has quit [Remote host closed the connection]
potatonomicon has quit [Quit: blap]
SenasOzys has joined #lisp
Lycurgus has quit [Ping timeout: 246 seconds]
k-hos has joined #lisp
jack_rabbit has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
SenasOzys has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
jack_rabbit has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
dale has joined #lisp
fikka has joined #lisp
<beach> Good morning everyone!
<Oladon> Morning beach!
<oni-on-ion> AeroNotix: ah, test summary ?
smokeink has quit [Quit: Leaving]
<Oladon> Anyone play around with Weblocks recently?
fikka has quit [Ping timeout: 252 seconds]
<AeroNotix> oni-on-ion: no
pierpa has quit [Quit: Page closed]
<oni-on-ion> ohhh interesting! i dont understand the legend but that looks very useful.
<oni-on-ion> great website, thx for the link also
<AeroNotix> oni-on-ion: it shows in green what was ran, yellow where only one branch in a conditional was taken e.g. (if (some-predicate) (foo) (bar))
<AeroNotix> and various shades of red for if certain code didn't run at all
<oni-on-ion> and the predicates seem always green /
<AeroNotix> oni-on-ion: no, that page shows some predicates in yellow/red
<AeroNotix> It looks like it doesn't deal with how WHEN expands (always leading it to be yellow)
<oni-on-ion> oops i mixed up the colors yes
<oni-on-ion> ah
<AeroNotix> or maybe not, it's 5am here. I might be not thinking straight.
<AeroNotix> of course it can handle WHEN
johnjay has joined #lisp
<no-defun-allowed> morning beach
<no-defun-allowed> re a previous discussion on generational hypothesis: i read the gc handbook and it says older objects are often less mutated
<no-defun-allowed> still a remembered inter-gen set is necessary otherwise i'd be pulling a lot of data to keep no old->new pointers
jlarocco has quit [Ping timeout: 252 seconds]
<johnjay> what is the biggest lisp by installs, emacs, racket, sbcl, or allegro?
<aeth> Emacs by far. Does that make it a good idea to use? No.
<aeth> Emacs Lisp is for scripting an editor
<Xach> it is a pretty good choice for extending emacs.
<AeroNotix> johnjay: there's some metrics somewhere on the quicklisp blog about downloads by implementation. SBCL was far and away the most widely used implementation, at least as far as using quicklisp
<no-defun-allowed> yeah emacs isn't a great lisp for general purpose computing but it's certainly the most used
<oni-on-ion> emacs lisp is a fine lisp.
<no-defun-allowed> it's got a lot of stuff for string processing too
fikka has joined #lisp
<oni-on-ion> there is nothing really missing in elisp aside from performance and namespaces
<AeroNotix> it's absolutely garbage
<oni-on-ion> we can take python as a general purpose language
<oni-on-ion> why ?
<aeth> Basically everything I use in Common Lisp couldn't be ported to Emacs Lisp afaik.
<oni-on-ion> its a lot like CL
<johnjay> aeth: what do you edit CL in? emacs?
<aeth> Emacs Lisp is essentially a time capsule of an old pre-CL Lisp with some things ported from CL much later on
<no-defun-allowed> i don't think elisp has bignumx
<no-defun-allowed> *bignums
<AeroNotix> oni-on-ion: have you ever tried to actually write a big codebase with Elisp?
<AeroNotix> it's incredibly inconsistent, basic text handling functionality is baroque
<no-defun-allowed> still better than vimscript
<aeth> And a lot of it is about performance hacks based on how the interpreter behaves
<oni-on-ion> no-defun-allowed: it has bignums. it has GMP support
<aeth> johnjay: I'd say at least 90% of people use Emacs
<no-defun-allowed> (vimscript's other name is teco 2: vt100 boogaloo)
<oni-on-ion> AeroNotix: so that would be namespaces ? aside from that.
<aeth> johnjay: I use Emacs with SLIME
<oni-on-ion> heh
<Oladon> aeth: I am amused by your definition of "people" :)
<aeth> Oladon: Only CL programmers are people
<aeth> Oladon: Okay, I meant 'people here'
<AeroNotix> oni-on-ion: it's more than that.
<oni-on-ion> AeroNotix: i'm listening
<Oladon> aeth: :)
<no-defun-allowed> nice nice
<AeroNotix> oni-on-ion: it's 5am.
<AeroNotix> Just go write a large project with Elisp
<oni-on-ion> AeroNotix: alright.
<aeth> johnjay: I don't really like Emacs, though. I like its concept of being programmable in a Lisp and I like its key bindings.
fikka has quit [Ping timeout: 264 seconds]
<AeroNotix> lots of respect for people who maintain things like slime, magit etc
<aeth> I think pretty much every other editor is worse than GNU Emacs, especially for Common Lisp programming, but that doesn't make Emacs Lisp a good editor.
<oni-on-ion> yeh amen.
<aeth> s/Emacs Lisp a good editor/GNU Emacs a good editor/
<oni-on-ion> because you see it every day, just look at it noew
<oni-on-ion> new*
<aeth> Look at GNU Emacs new? I'd be looking at about 4 years before being comfortable in it. I can understand why people try to avoid it.
<oni-on-ion> when did you start using it?
<aeth> If anything needs an interactive gamified tutorial, it's GNU Emacs, but it can't because it's not capable enough.
<aeth> oni-on-ion: What editors are available? Especially years ago. ed, nano, vim, emacs, gedit, kate, etc.
<no-defun-allowed> teco
<oni-on-ion> i've been using it since hmm 1994 i guess, didnt really truly grasp as much as i do in the last couple years. (i took a hiatus from comp/tech before that)
<oni-on-ion> aeth: notepad++ ? =/
<aeth> Of these Unix editors, emacs might be the only editor that's both graphical and terminal-based.
<no-defun-allowed> oni-on-ion: delete this
<oni-on-ion> what is gamified tutorial? like jupyter ?
<oni-on-ion> o_o
<no-defun-allowed> New achievement: Closed Emacs
<oni-on-ion> interesting . i do that with life sometimes
<AeroNotix> aeth: there is an achievements package for emacs
fikka has joined #lisp
<no-defun-allowed> correction: https://bitbucket.org/gvol/emacs-achievements
<aeth> Emacs can't be sufficiently gamified because it is based entirely around text buffers.
<aeth> The tutorial is just a text buffer, not a special mode.
<no-defun-allowed> Achievement get: wrote an entire buffer without using E
Pixel_Outlaw has quit [Quit: Leaving]
<ym> Emacs/Elisp is great framework for rogulikes.
<aeth> no-defun-allowed: that's easy, write a brainfuck file without comments
<ym> s/rogu/rogue/
<no-defun-allowed> Achievement get: you blow your inferior-lisp's heap.
<aeth> I prefer rougelikes. The best is probably burgundy
<aeth> #x900020
kristof has joined #lisp
<Oladon> Is a rogulike the Japanese version of Nethack?
fikka has quit [Ping timeout: 252 seconds]
Bike has quit [Quit: Lost terminal]
<oni-on-ion> Oladon: Mystery Dungeon series
<kristof> minion: tell antonv "Wrong christophe!"
<johnjay> by the way why doesn't Lisp Operating System exist?
<johnjay> i've always wondered this.
<oni-on-ion> mezzano ?
<no-defun-allowed> no hardware support
<johnjay> so build a userland on top of linux
<ym> You can re-implement MIT CADR on FPGA.
<johnjay> call it The Lispix distro
<no-defun-allowed> a new CADR would be nice
<oni-on-ion> stumpwm + mcclim ?
<johnjay> Lispian. Lispdora. Lisptoo
<oni-on-ion> it has a decent Listener
<johnjay> mcclim looks like a good start. The Lisp Windows System
<ym> McCLIM still raw.
<no-defun-allowed> it should be lisp all the way down
<oni-on-ion> some use mcclim for their common lisp dev
<beach> johnjay: What makes you think that Lisp operating systems do not exist.
<beach> I am aware of 3.
<johnjay> well it has to be x86_64 at some point
<oni-on-ion> it is in a good state right now, mcclim
<johnjay> or ppc, mips, etc
fikka has joined #lisp
<no-defun-allowed> i have a dev build of my very own CrapOS in tarballs somewhere
<johnjay> beach: can you name one?
<ym> Or RISC-V.
<beach> Genera, Movitz, Mezzano.
<no-defun-allowed> it runs on i386 with no GC and there's a commodore 64 fork which has a faulty GC
<oni-on-ion> i agree that its better to build on linux kernel
<no-defun-allowed> that's a bit silly IMO
<no-defun-allowed> lisp<->lisp IPC would be terrible
<oni-on-ion> why? just send lisp forms on pipes or sockets
<beach> johnjay: So now you can stop wondering.
<no-defun-allowed> oni-on-ion: which requires serialisation and deserialisation. a real lispos could pass a pointer quite easily
<oni-on-ion> no-defun-allowed: oh true. and run a closure located on another process? >:)
<no-defun-allowed> also possible.
fikka has quit [Ping timeout: 246 seconds]
<johnjay> beach: indeed, i shall wonder no more
<ym> The only thing which stops me from implementing/porting LISP OS is Altera's proprietary bitstream format.
<Oladon> johnjay: I don't think beach was actually suggesting that you never wonder again, just that you don't wonder about that specific item anymore.
<ym> No too much difficult to reverse-engineer though.
* no-defun-allowed checks cadr specs
<johnjay> Oladon: yes that was the joke. maybe i was too dry...
<no-defun-allowed> hm, 22 address words x 32 data bits = 16mb memory space
<Oladon> johnjay: Or perhaps it's too late, and I should be abed. :)
<Oladon> G'night all!
<oni-on-ion> Oladon: heh. gn
<aeth> johnjay's right
<oni-on-ion> no-defun-allowed: why 22 ?!?!?!??!
<no-defun-allowed> i really don't know
jack_rabbit has quit [Ping timeout: 252 seconds]
<aeth> A Linux distro is just something with its own package repositories, possibly with its own package manager, too. (Most just use an existing one with custom repos, though.)
<oni-on-ion> well i need to know because i was designing a pretend computer using a count of 22 for something
<no-defun-allowed> here's some names you might be able to complain to: Thomas F Knight Jr, David Moon, Jack Holloway and Guy L Steele Jr
<oni-on-ion> a special reason for that number?
<johnjay> aeth: have you used NixOS? it supports atomic operations for package management
<aeth> I've been using Fedora since 2006. I stopped even trying out other distros in VMs probably 6 years ago.
<no-defun-allowed> iirc there's a J1 fpga processor which runs forth. add some tags and clean up the function stack and you're halfway to a lispm
<aeth> Nix seems wasteful to me
<ym> The original CADR was highly constrained with technical capabilities of that time. One can expand it any way.
<ym> major-kusanagi.svg
<johnjay> This mezzano already has Intel HD Audio support. nice
<oni-on-ion> was it guix that uses guile scheme for its stuff ?
<aeth> oni-on-ion: guix is a fork of nix afaik
<no-defun-allowed> i'd have a go at trying replace-string 22 32 but it might not work like that
fikka has joined #lisp
<oni-on-ion> aeth: ah, does it use guile ?
<aeth> Yes
<oni-on-ion> no-defun-allowed: where is the 22 from? cadr?
<no-defun-allowed> yes, that's the address width of the CADR
<oni-on-ion> kk. ty
<aeth> But GNU is politically opposed to "nonfree software" so you won't be able to easily run things like Steam on it. Well, you might be able to get around that with the Steam Flatpak. Drivers will be trickier. I guess you'd need to use an AMD GPU.
<no-defun-allowed> gnu doesn't go far enough
<aeth> Most people have some proprietary software that they want to run. That's one of the advantages of a "LispOS" running Android-style on top of the Linux kernel
<aeth> no-defun-allowed: because it's not anti-capitalist?
<no-defun-allowed> i was just about to say that, how dare you
<oni-on-ion> cadr machine == lisp machine ?
<no-defun-allowed> "the bourgeois will release sources for the ropes they are hung on"
<no-defun-allowed> according to the doc, the cadr machine is hardware to run lispm firmware but i say the cadr machine is a lisp machine
<aeth> Note that copyfarleft's added restrictions would make it neither open source nor free software
<no-defun-allowed> if you listen to gnu
<no-defun-allowed> also we need to make space cadet keyboard emulators
<oni-on-ion> no-defun-allowed: ok. says here that cadr machine is the microprocessor, and lisp machine is cadr machine plus microcode to interpret
<no-defun-allowed> yep
<oni-on-ion> kk
<oni-on-ion> keyboard emulator? on a tablet? =)
fikka has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 244 seconds]
<no-defun-allowed> in other words: 3d print the keycaps and make your own hall effect switches
<oni-on-ion> ahh cherry mx
<oni-on-ion> just thinking how loud my kbd is, got to upgrade soon. tmrw or next day
<no-defun-allowed> fuck that mechanical shit, you want magnets and sensors
Roy_Fokker has quit [Read error: Connection reset by peer]
<ym> Magnets?
<ym> Why not photo-sensors?
<beach> Perhaps it is time to get back on topic.
<no-defun-allowed> okay
<oni-on-ion> idk i dont use mechanical,i like the flat ones or even touch screens.
<oni-on-ion> there's a cadr emulator around ?
<johnjay> oni-on-ion: i think so yes
<johnjay> i haven't tried it
<no-defun-allowed> "works a treat")
<ym> It's also quite raw.
<aeth> If you wanted to make a LispOS on top of the Linux kernel you would need: (1) a package manager, (2) a terminal emulator, (3) a posix shell, (4) a Lisp shell, (5) a text editor, (6) a file manager (not everything is convenient in the terminal)
<aeth> You could just ship stumpwm as the default desktop
<aeth> stumpwm isn't very convenient on laptops, though, because there it's nice to have a bar for wifi/battery/volume/brightness
<johnjay> aeth: i thought i could see how to do a terminal emulator by looking at xfce-terminal's code. but it refers to vte which does the actual term emulation
<aeth> johnjay: most things in the C world are so hard that they just use libraries to do all of the real work
<no-defun-allowed> i broke the emulator and it's telling me someone can't use the elevator to get to the ninth floor
<johnjay> would there be architectural or performance differences between a LispOS on a linux and something like mezzano, that's lisp all the way down?
<aeth> e.g. there's like two libraries that do font rendering and they share a common core iirc
<no-defun-allowed> yes
<johnjay> hah, wow
<oni-on-ion> eh \wow@cadr emu
jack_rabbit has joined #lisp
<oni-on-ion> aeth: nahh exwm +emacs solves all those.
<oni-on-ion> just write a framebuffer backend =p
<aeth> johnjay: With Lisp on Linux you have a decision to make fairly early on. Do you put everything in one Lisp image or do you accept having 10x the memory use of the equivalent C application by running one Lisp image per thing?
<no-defun-allowed> nice, the cadr can multitask
<ym> There is wayland compositor in Common Lisp.
<ym> And EXWM+Emacs doesn't solve CPU backdoors.
<oni-on-ion> ah nice. get wayland going on a bare linux kernel, emacs loaded with exwm and slime connected to system, use eshell and yea
<oni-on-ion> cpu backdoors ?
<ym> CPU backdoors.
<aeth> ring -3
<beach> johnjay: Yes, they would be very different.
<no-defun-allowed> now try to write a driver in common lisp
<aeth> I wouldn't recommend making your own CPU, though. If that's your concern, just use RISC V.
<beach> no-defun-allowed: What would be the problem with that?
fikka has joined #lisp
<no-defun-allowed> it's not lisp all the way down and the "lisp machine" abstraction would end when the kernel starts
<beach> johnjay: This document http://metamodular.com/lispos.pdf is not about Mezzano, but it explains how different a Lisp OS could be.
<aeth> CPUs have a network effect. That's one of the reasons why Lisp on x86 quickly was faster than Lisp on LispMs even though 32 bits isn't really enough for Lisp imo (36-bit is good because of tags)
<oni-on-ion> put the kernel on a chip
<aeth> Even if you wanted 100% FOSH, RISC V will be faster and more feature complete than what you can design and make
<aeth> (well, a CPU implementing the RISC V instruction set, technically)
<aeth> oni-on-ion: you don't want a lot of logic in the microcode (or the circuits or whatever)
<aeth> oni-on-ion: Optimizing compilers on general purpose hardware is generally the way to go.
<aeth> Besides, people aren't going to update their hardware every 2 years these days, so updates will come much faster for software.
<oni-on-ion> yea? not special hardware?
<oni-on-ion> GPUs are quite general purpose
fikka has quit [Ping timeout: 240 seconds]
<aeth> oni-on-ion: You are probably not going to beat the performance of SBCL on x86-64 ever. It will optimize faster than you can with your Lisp-on-a-chip.
<oni-on-ion> what about lisp on gpu?
<oni-on-ion> sbcl errr ecl compiled to opencl
<oni-on-ion> =)
<aeth> (i.e. by the time you get to the level of performance SBCL is now, SBCL will have had dozens of revisions and x86-64 will get its annual 10% improvements)
ealfonso has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
<aeth> oni-on-ion: A Lisp on a GPU would be really fast at things like MAP, but not in general
<kristof> lamenting about computer architectures is this really weird control freak thing
<oni-on-ion> oh im not lamenting. im on really old hardware myself i couldnt care less
<kristof> for all the ugly architectures we've had and all the good ones in the dust bin (I think SPARC is beautiful), mass producing intel chips has resulted in a computing power explosion
<oni-on-ion> just curious \
<oni-on-ion> bitcoin mining
<kristof> that people rarely appreciate in the same way as if there house suddenly doubled in size every two months
<kristof> or their physical running speed
<ym> aeth, what that general purposes you are talking about?
<aeth> ym: a CL implementation
<ym> Oh.
<aeth> kristof: those days are behind us, though
<oni-on-ion> my phone is faster and way better gfx than my desktop and tablet probably combined
<aeth> We're basically now at the point where more cores are what we expect, not faster CPUs
<aeth> Especially on x86-64 desktop
<kristof> they were saying that in the 90s, too
<kristof> looks fine to me!
<aeth> kristof: Transistor count used to translate into single-threaded performance. Now we're at the point where that's essentially false
<aeth> Single-threaded performance is still going up a bit, but mostly due to cleverness (of the kind that causes Spectre/Meltdown)
<aeth> It's possible that a switch to a new material will temporarily bring back the trend.
<johnjay> aeth: the concept of process was just designed for computers with small memory/addressing?
<aeth> I suspect what we'll see is consumer CPU core counts dramatically increasing until that also hits a wall. (I wonder where that wall will be. 128? more?)
<ym> Why all this talks about performance if we still writing code by hands?
<oni-on-ion> hmm =)
<beach> johnjay: Pretty much. In some cases (like Unix), it was meant to emulate the raw machine so that old technology could be used for compilers and linkers.
<oni-on-ion> typing in little letters with our fingers and it explodes into essentially a heaven of information and entertainment and complexity and discovery, the computers multiply those key presses ...
caltelt_ has quit [Ping timeout: 272 seconds]
fikka has joined #lisp
<aeth> johnjay: beach is the resident expert on this sort of thing
<ym> I can't see a heaven. I can see overthinked specifications and constant reimplementations.
<johnjay> beach: i feel like im learning more in the last 5 minutes than 5 years of programming (!)
<aeth> johnjay: i.e. beach has a PhD and writes extensively about this
<beach> johnjay: Now, if you look at the OS literature, it is often presented as a security thing. It is true that running programs in separate address spaces gives a certain degree of security.
<johnjay> ahh, gotcha
<beach> johnjay: Though, attacks like overwriting the return address on the stack are hard to prevent.
<oni-on-ion> ym: yea its a fractalised mess. black magic and holograms
<beach> johnjay: Plus, there is a case of turning the implication arrow the wrong way. Security can be obtained with other means than processes, and processes are definitely overkill in other respects.
<beach> johnjay: In order to communicate between programs, you can't just pass a pointer. You have to serialize and unserialize everything.
dale has quit [Quit: dale]
<beach> johnjay: I know what you mean. #lisp has some smart and knowledgeable people, so people who have not come here before often learn a lot.
<johnjay> beach: did you write the document? it mentioned serialization
<beach> The one I gave you a link to? Yes, I did.
fikka has quit [Ping timeout: 252 seconds]
<AeroNotix> beach: how would you lispos handle having a single address space wrt security?
<AeroNotix> your*
<beach> Just don't give the programmer access to the raw address space.
<johnjay> ah ok. i think that's some kind of security flaw or something. link to a document with you real name.
<kristof> AeroNotix: You've read the paper he wrote on this, I thought
<johnjay> then repeat verbatim the opening remarks of it. XD
<AeroNotix> I did but it completely glosses over it
<beach> johnjay: What is a security flaw?
<johnjay> that's how it is in MSDOS, correct?
<johnjay> beach: just a little joke there. i was able to figure out you wrote the document from the way you spoke about it
<kristof> AeroNotix: Having tag bits for capabilities is not glossing over it :P
<beach> johnjay: Ah, OK. It is no secret.
<kristof> Capabilities is basically the right way to go for security, anyway
<johnjay> well since you wrote that document
<beach> johnjay: Lots of #lisp participants know each other quite well. We meet every year at ELS.
<johnjay> what do you think of mezzano w.r.t the points in it?
<kristof> Although I also like the idea of sandboxing code that might use raw addresses like C programs.
<johnjay> oh ok
<AeroNotix> kristof: ah, it's not referenced in the sections talking about the issues with a single address space
<beach> johnjay: I don't think froggey has the same considerations with Mezzano as I have in that document.
<johnjay> i haven't heard of mezzano before today but it appears to be all lisp. a lot of it is lisp that is emitting machine code though. -_-
<beach> johnjay: That would be quite normal.
<beach> johnjay: SBCL compiles to machine code.
<johnjay> right. i just thought it would be easier to have files of machine code
<johnjay> instead of a lisp file that is emitting machine code
<AeroNotix> kristof: I've read it now. Seems fraught with issues.
<kristof> Shoot
<AeroNotix> concurrency, incorrect permission bits
<aeth> johnjay: What Lispers generally do is they put things in s-expressions and then turn that into the desired output. You see this with asm, HTML, XML, JSON, CSS, JavaScript, GLSL, SQL, etc.
<aeth> Lispers want their s-expressions and macros
<johnjay> right
<kristof> AeroNotix: Really? You think incorrect permission bits are a valid concern even though it's the equivalent of bugs in a UNIX kernel?
<beach> Thanks kristof. I don't think I can handle arguing with AeroNotix about this.
<AeroNotix> beach: Why not?
<beach> I don't think I want to argue the meta-issue either.
<kristof> Life is too short
<kristof> AeroNotix: What's the concurrency issue?
<AeroNotix> Suit yourself. Not sure if you're offended by something I've said or done in the past. If so, just let me know in PM or whatever. Wouldn't like there to be beef
<AeroNotix> kristof: multiple threads of execution sharing the same pointer to some memory
<AeroNotix> read/writing it. I'd love to see an explanation of how concurrency is supposed to work in a system like this
<beach> AeroNotix: I am not offended. Just tired of repeating the same arguments over and over again, even though they are all spelled out in the document and in the OS literature.
<AeroNotix> beach: What about concurrency?
<beach> What about it?
<beach> We have threads in just about every Common Lisp implementation.
<kristof> AeroNotix: You were right about glossing over the essay since there was an entire section on concurrency.
<johnjay> beach: is SCIP a good book to get into lisp and/or scheme?
<johnjay> i use emacs lisp casually but that's about it
<AeroNotix> kristof: it literally just says "We have locks (...)"
<beach> johnjay: This channel is dedicated to Common Lisp. SICP is Scheme.
<no-defun-allowed> it's a good book but won't teach you common lisp
<beach> johnjay: Generally, #lisp will recommend PCL to people who already know some programming.
<johnjay> ok. idk if there's any good common lisp books?
<johnjay> i just know paul graham's one
<no-defun-allowed> a gentle introduction to symbolic computation has 80 pages of box diagrams
<AeroNotix> kristof: dealing with concurrency issues within a single program, with threads and locks is already tedious and requires careful testing. Imagine that being multiplied by additional external processes, some of whose code you may not be in control of.
<no-defun-allowed> it's the only one i have in hard copy (cause it was only $30, compared to SICP's $100)
<kristof> johnjay: You will be surprised to learn that Common Lisp has *more* "good" books than most other programming languages do. Combined, eevn.
<beach> johnjay: Practical Common Lisp, PAIP, On Lisp, OO programming in Common Lisp, Common Lisp recipes, etc, etc.
<oni-on-ion> kristof: yeah ? prolog has some good ones too i thought
<kristof> The past four (!) decades has produced an amazingly large amount of good books written in lisp.
<AeroNotix> kristof: it sounds like a good use-case of this single address space could be something akin to "plugins". You write code that plugs into a separate code base to read/write it's internal datastructures. Are the locks administered by the programmer writing the code which shares these pointers around?
<kristof> I've only read The Art of Prolog. That was a mind expanding, yes.
<aeth> johnjay: I'd recommend The Little Schemer before SICP. It's a simpler book. Yes, both are Scheme, but most of the concepts do translate. Both are probably the most relevant books written in Scheme for a CL programmer. The main thing you want to keep in mind if you're coming from Scheme is that tail recursion cannot be relied upon to be optimized in CL.
<oni-on-ion> also there is symbolic programming with lisp, book
<oni-on-ion> land of lisp i like =) =)
<aeth> (Okay, I've heard that another relevant Scheme book for a Lisper is Lisp in Small Pieces, but that's an advanced book for writing language implementations)
<no-defun-allowed> i've converted two haskell users using land of lisp
<no-defun-allowed> while waiting for the book to arrive, one played the song over microphone in every game we'd play so he probably liked it
fikka has joined #lisp
<kristof> AeroNotix: I don't want to sound dismissive but this sounds like an easy problem to me. The first observation is that Lisp is strongly typed, meaning you can only operate mutably on data structures using the correct accessing functions.
reverse_light has joined #lisp
<johnjay> land of lisp ah i remember that odd looking cover
<AeroNotix> kristof: sure, it's easy to create the tools to implement safe guards. Using them correctly however, is another matter.
Oladon has quit [Quit: Leaving.]
<kristof> The second is that "concurrent access" is well within the realm of a capability, right? So the underlying system can very easily make accesses guarded by lock granularity etc.
<AeroNotix> and adding another vector to use them incorrectly surely warrants a fresh look on what kind of safe guards are needed
<kristof> There are a lot of options, here. It's hardly "fraught with problems".
<johnjay> beach: thanks for the recommendations. it would be cool if i could learn enough to work on that mezzano thing. it looks amazing
<aeth> johnjay: land of lisp is a normal cover. all other covers are odd
<oni-on-ion> dont need a linux kernel if you need a VM to run the os =)
<kristof> AeroNotix: Well, the Lisp philosophy is that you should give people the tools to do things the right way, and you shouldn't worry about an imaginary person that is intent on doing them the wrong way.
<no-defun-allowed> i don't like this school assessment i'm doing right now very much.
<kristof> AeroNotix I already know that you know that but I think the reminder here is appropriate
<oni-on-ion> just tie in to the system that is running the vm.
<AeroNotix> kristof: it's not like a single address space is a thing unique feature only a LispOS could provide.
<kristof> It's not, and I'm not a person who's interested in a LispOS, actually.
<AeroNotix> I genuinely do wonder about adding yet another concurrency issue is a boon
<AeroNotix> add a whether in there*
<AeroNotix> 6.40 am I really should get to bed
<no-defun-allowed> this idiot called John Quest is supposed to be finding correlations between internet usage and fertility rates and also needs a bunch of other crap for some reason
<kristof> if you get rid of the arbitrary process boundary? I am willing to make that tradeoff.
fikka has quit [Ping timeout: 244 seconds]
<no-defun-allowed> i used native oberon a few times. it's very nice.
<johnjay> aeth: i'm wondering how hard it is to write a driver for say fat32 or intel HD audio bus. mezzano already has both of those
<AeroNotix> kristof: even then it's essentially saving on the serialization/deserialization of requests to improve execution times?
<beach> AeroNotix: Correct. The document in question does not introduce anything new. All of what is described there has been used in the past, tested, verified, etc. That is why it makes me so tired to have to explain it over and over again.
<dmiles> what would make prolgo really good is if it had all the types of common lisp
<kristof> AeroNotix: It's worse than that. Making byte boundaries the common interface is like making your programming language only accept strings.
<kristof> *byte streams
<AeroNotix> kristof: plenty of serialization formats come with code generators.
<aeth> AeroNotix: There's "LispOS" as in an OS written in Lisp and "LispOS" as in a proposal for what such an OS could look like.
<aeth> So yeah, a lot of the features in the latter aren't unique to Lisp
<AeroNotix> aeth: Sure, I just LispOS as a shorthand for a general set of operating systems like this
<beach> AeroNotix: Then you are not using it the way I do in the document.
<beach> I should rename it.
<beach> CLOSOS probably. Nice negative urban term.
<AeroNotix> CLOS would've been good itself
<AeroNotix> Common Lisp Operating System
<beach> Taken though.
<AeroNotix> Aye
<aeth> PCL was taken before PCL was written
<slyrus1> I thought that said PCL was broken before PCL was written
<aeth> AeroNotix: Personally, if I made an OS in Lisp I'd make it POSIX compatible and port a C compiler as one of the first steps (probably would actually need to port both GCC and LLVM these days). I'm sure everyone has their own design in mind.
<slyrus1> which is probably true
<AeroNotix> aeth: all I'd care about is whether or not the guts of the system used a non tedious language like C
<aeth> (My reasoning is pretty simple, I don't think anyone would run a desktop OS without a web browser, and it's probably easier to port Firefox than to write one.)
<kristof> AeroNotix: Sending everything in JSON helps, but how do I make thread B modify thread A's data structures using JSON?
<kristof> :P
<no-defun-allowed> >posix >lisp
<no-defun-allowed> choose one
<AeroNotix> kristof: in a single address space how do you make thread B modify thread A's data structure in a way that won't cause it to crash?
<aeth> no-defun-allowed: You need to build a layer that C can talk to. The only difference is that the C layer wouldn't be the bottom layer.
<no-defun-allowed> AeroNotix: using the same type safety and checks thread A has
<kristof> AeroNotix: That's a weird question. People let threads modify other thread's datastructures all the time: using well defined interfaces and shared type definitions.
<no-defun-allowed> you can't rplaca thread A's 2 for example
<aeth> Interestingly, I think this means that SBCL would also be able to be ported to the OS and SBCL might (okay, it will) outperform the host CL. That would be a bit awkward.
<beach> AeroNotix: It won't crash, but you might get error messages. If the programmer writes incorrect code, there is nothing I can do about it.
<no-defun-allowed> you don't say
jack_rabbit has quit [Ping timeout: 252 seconds]
<no-defun-allowed> beach: you need to add a DWIM function for your compiler
<beach> Thanks.
<AeroNotix> kristof: beach: I understand how the situations are similar. Intefaces must be used to guarantee safety/correctness in both cases, but in a single address space it has the difference of more "spooky action at a distance" type behaviours that multithreaded programs are prone to
<no-defun-allowed> also, more compile-type guessing isn't a bad idea imho
<johnjay> beach: would it be relatively straight forward to write a parser in lisp for C header files?
<no-defun-allowed> sbcl already tells you if it thinks your types are a bit odd
<beach> AeroNotix: You must be thinking of multi-threaded programs where the threads all share the same raw address space.
<beach> johnjay: It has been done several times. I think pjb has one.
<kristof> Off the top of my head:
<johnjay> i don't see pjb in here
<kristof> ..never mind
<AeroNotix> johnjay: he's in france. Probably still in bed at this time
<beach> johnjay: try his site informatimago.com I think it is.
<johnjay> my particular use case is i have a giant .h file that seems to be wrapped in one giant #ifdef ... else .. #endif
<beach> johnjay: I am sorry to hear that.
<johnjay> but the #else is in the middle of the file and i can't be sure what it matches to
<kristof> AeroNotix: I think there's something you might not be getting. The proposal is not "take our existing most-minimal, obvious operating system, and add all this flexibility to it that I might not need." There is not very much about UNIX that is obvious, like first principles or something.
<no-defun-allowed> i'm sure you can "break" the syntax of C so that it's very different with different defines
<kristof> The proposal is "question the abstractions that the operating system provides".
<no-defun-allowed> for example: pop some { and }s in #ifdefs
<johnjay> no-defun-allowed: i thought of something like that. like add 1 to an variable if a new #ifdef appears and subtract one when #endif appears. something like that.
<AeroNotix> kristof: I'll print out beach's paper and read it once more, then. Please don't get the idea I'm just shitting all over it from superior understanding. I just hear something like "single address space" and try to think how I would use it and how it could be misused.
<kristof> UNIX already imposes a baseline that all other users must adhere to. Dynamic linking must include symbol tables with offsets into machine code, for instance. Executables accept an array of c-string arguments. Etc.
<kristof> It's an entire paradigm unto itself.
<AeroNotix> Has there been any attempt of implementation for beach's paper?
<oni-on-ion> C is really the language of the unix machine
<no-defun-allowed> is it a microkernel if all your drivers are in functions which can be compiled quickly and can't execute dangerous code?
<AeroNotix> oni-on-ion: C really is the language of the PDP-11
<oni-on-ion> no-defun-allowed: sounds like a vm =)
<no-defun-allowed> AeroNotix: i think the idea was that all the concepts have been implemented before.
<oni-on-ion> AeroNotix: yea. but its current state is unix world
fikka has joined #lisp
<AeroNotix> ok
<oni-on-ion> no different than sexp language for lisp world, really
<no-defun-allowed> oni-on-ion: sounds like a safe compiler
<no-defun-allowed> squeak on bare metal was also an interesting experience
<aeth> AeroNotix: https://github.com/robert-strandh/SICL is a necessary prerequisite
emaczen has quit [Ping timeout: 252 seconds]
<aeth> and afaik "single address space" is why
<AeroNotix> this*
<kristof> AeroNotix: Some propositions that necessitate a paradigm shift: maybe operating system data should be strongly typed, i.e. it is not an interpretable set of bytes but rather a computational object in its own right
<oni-on-ion> hehe i wrote a little squeak plugin for 3d gfx engine tests and some basic multiplayer demo
<AeroNotix> kristof: at some point it must be an interpretable set of bytes. Somewhere on the machine
<oni-on-ion> we can just full screen stuff and pretend
<aeth> AeroNotix: but you wouldn't have access to it as that
<kristof> AeroNotix: This is as true as "at some point you must write to memory mapped hardware"
<aeth> AeroNotix: if anything it would be more secure
<kristof> AeroNotix: There shouldn't be one programming language, but maybe processes, or threads, or applications, or whatever should be able to freely share data with one another, and
jack_rabbit has joined #lisp
<AeroNotix> aeth: something must have access to it as that
fikka has quit [Ping timeout: 264 seconds]
<kristof> rather than the operating system catering to the *lowest* common denominator (C), it should cater to the highest common denominator, a strongly typed language with a garbage collector and whose objects carry their type information with them
jlarocco has joined #lisp
Lycurgus has joined #lisp
<kristof> Common Lisp is an extraordinarily good language in this regard. You can get dynamic duck typed languages pretty easily (like Javascript, using a-lists or association vectors of symbols) and you can still share data with statically typed languages
emaczen has joined #lisp
<kristof> which simply don't need to do the same type checks that Lisp does. The representation doesn't need to change at all between F# and Lisp.
<kristof> These Common Language Runtimes have been proposed for decades because they're really good ideas.
<beach> AeroNotix: I am working on it. SICL will be the basis for CLOSOS.
<kristof> (See what I did there? :P)
<aeth> kristof: Why shouldn't there be one programming language? I'd imagine that in such an environment everything would compile to CL
<oni-on-ion> jvm, clr, ...
<oni-on-ion> beach: yeah!! =)
<kristof> Even Symbolics Genera supported at least two different programming languages (Lisp Machine Lisp and Common Lisp)
smokeink has joined #lisp
<no-defun-allowed> also fortran, c, prolog and some more
<aeth> kristof: Only for backwards compatibility
<kristof> I think one of Guy Steele's most important contributions was getting people to understand that there are two things that people confuse: programs, which are abstract, mathematical constructs that "compute", and the languages we use to describe them
fikka has joined #lisp
<aeth> no-defun-allowed: You can compile Fortran to CL iirc
<kristof> What I'm saying by proposing that the operating system should have a baseline high level language is more like saying that everyone can write whatever programming language they want to target a system that has the denotational semantics of common lisp.
<no-defun-allowed> aeth: symbolics compiled everything to common lisp afaik
jack_rabbit has quit [Ping timeout: 252 seconds]
<kristof> aeth: Anyway, these are examples of "propositions" that would necessitate a total paradigm shift in conventional operating system design.
<AeroNotix> all very interesting but I must go to bed. Just turned 7am here.
<kristof> Goodnight
<no-defun-allowed> night kristof
<AeroNotix> night
<oni-on-ion> languages were for computers and they are becoming more for people
<aeth> kristof: I think it would be more like CLR or JVM, where it's not like you can program whatever language you want, but that there's an equivalent to Foo as Bar in the runtime.
<kristof> Hopefully I saved beach a headache or two.
<oni-on-ion> its fun to live in a logical digital world but the analog of change is why we code
<kristof> aeth: You can program whatever language you want on the CLR or JVM. They're just machines.
<beach> kristof: You definitely did. I admire your patience.
fikka has quit [Ping timeout: 252 seconds]
<kristof> beach: I hit the "paradigm shift" only recently, when I watched a presentation by a symbolics developer show off Genera. It all clicked, and suddenly I was very impressed.
<beach> Nice!
<oni-on-ion> sauce
<johnjay> guy steele sure has written in diverse areas. C, Java, common lisp
<beach> johnjay: A very smart guy.
<beach> And knowledgeable too.
graphene has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
<johnjay> i was browsing his wikipedia and i thought from java to lisp... to parallel C... this is all very broad
<kristof> You've got that backwards
graphene has joined #lisp
<no-defun-allowed> halfway from C to Lisp is a strange place
<kristof> It was from Lisp to Java. Well, to Pizza. Which is not quibbling, because Pizza was notable precisely for the things that were not in Java.
<aeth> kristof: What tends to happen in practice is that people program in conceptual ports that interoperate better on the common environment, such as F# on CLR instead of a port of ML or Haskell.
<kristof> aeth: In practice, sure. But F# is the way it is because of *C#* compatibility, not because of anything inherent in the CLR.
fikka has joined #lisp
<aeth> kristof: Mostly, yes, but it's probably also built with CLR performance in mind
<kristof> Can you name an example?
Inline has quit [Quit: Leaving]
<kristof> I happen to know F# very well, better than i know Common Lisp, so this is sort of my wheelhouse. :P
<aeth> kristof: I would suspect that C# compatibility is itself an example of that. The C# built-in things it interoperates with are probably well-optimized.
<aeth> (Possibly optimized to the point of "cheating", i.e. you wouldn't be able to do that.)
<kristof> The only example I can think of is that the CLR, unlike other garbage collected environments, distinguishes between heap allocated composite datatypes (classes) and stack allocated ones (structs). But that's still a CLR thing, not a C# thing.
<aeth> kristof: Since you program in a language with a modern type system... I wonder: What is the CL type system missing?
<kristof> Nothing.
<aeth> As in a Nothing type?
<kristof> It's statically typed languages that miss a *lot*.
fikka has quit [Ping timeout: 264 seconds]
<aeth> kristof: Well what I mean is, I've done some reading on various things that languages brag about in their type system and CL has a lot of direct equivalents, e.g. the maybe type appears to be (or null foo), although that obviously won't work on lists, symbols, or booleans.
<aeth> kristof: What can't be expressed well in CL and would it be worth trying to get it into implementations as an extension?
<kristof> You know people talk about type safe nullables a lot and they cause more pain than they're worth. The first issue of course is the syntactic overhead.
graphene has quit [Remote host closed the connection]
<aeth> kristof: but CL is itself a language where only lists, symbols, and booleans are nullable without (or null foo), at least afaik. And with booleans it really doesn't count because NIL *is* false.
<kristof> Every binding can be nil.
graphene has joined #lisp
<kristof> In fact what I think you mean to say is that "only lists, symbols, and booleans are not trivially nullable in Common Lisp"
<aeth> yes
fikka has joined #lisp
<kristof> The situation is trivially remedied by multiple values
fikka has quit [Read error: Connection reset by peer]
<aeth> Although if you give a type something (various ways, only CHECK-TYPE and maybe ASSERT being guaranteed) you do have to (or null foo) to permit nil
<kristof> aeth: You're starting from a certain axiom I think that underlies your messages
<aeth> s/give a type something/give a type to something/
<aeth> or maybe "give something a type"
<kristof> and I'm going to try to outline what it is so correct me if you think this is wrong
<kristof> "Everything has one type, and it is important to know what that type is."
<kristof> Types are important. But what statically typed languages think types are and what lisp, and mathematicians, think types are is totally different.
<aeth> kristof: No. I suspect I mix (implementation-optional) static typing and dynamic typing often enough in my CL that neither group would be happy.
<kristof> I think you should do whatever makes you happy :P
<kristof> aeth: Have you ever read this? https://groups.google.com/forum/#!msg/comp.lang.lisp/7nhbeh2NIuw/fD-PUkA1yBoJ
<p_l> kristof: I think comparing LML and Symbolics CL is a bit of a missm at least on later versions where I think ZL differed mostly in available library
<aeth> kristof: I have not
<kristof> It's a good read, I highly recommend it
<p_l> OTOH, pretty sure the Symbolics C, Fortran, Pascal and Ada compilers all used Lisp as intermediate stage
<p_l> don't think they actually targeted "the machine" direct
<kristof> Could you trivially pass lisp data into Ada?
<aeth> kristof: I do write CL sort of like what could be described as "gradually typed", but that's not really a good name for it because there are definitely places where I will never add type declarations or CHECK-TYPE or typed slots or whatever, especially in macros and "gradually typed" sort of implies that you start with T and eventually refine yourself into a Haskell program or something.
<p_l> kristof: I recall that it works with C, but haven't got access to Symbolics Ada
<kristof> aeth: Sure, I agree, and I would say that the people who repackaged lisp type systems and called it "gradual typing", pretending it was novel, do not intend to fully type their programs, either
<kristof> Because static typing is primarily about optimization, not correctness, and optimization is only important in certain places.
<aeth> kristof: Repackaged lisp type systems? I hope they included both the numerical tower and multiple kinds of floating point!
ealfonso has joined #lisp
<kristof> lol
fikka has joined #lisp
<kristof> aeth: I remember when Hack came out and they tried to pretend they had done something novel and I thought "this is already on SBCL"
<p_l> kristof: arguably Ada's type system is concerned with correctness, not speed (what with subtyping that touches halfway to CL's 'satisfies)
<kristof> That's true, and I can't think of any usable programming languages that come anywhere near Ada's type system.
<p_l> Don't some pascal descendants have slightly similar?
<kristof> I wouldn't know
kdas_ has joined #lisp
<p_l> also I guess some in the ML family and such might have it as extension or so
kushal has quit [Ping timeout: 256 seconds]
<aeth> kristof: this will give a compilation warning in SBCL (and it will compile BAR to always throw a SIMPLE-TYPE-ERROR). (with-compilation-unit () (defun foo (x) (+ x x)) (defun bar () (concatenate 'list (foo 42) "Hello")))
<aeth> And if you (setf sb-ext:*derive-function-types* t) then it will always happen, even outside of a compilation-unit or file.
<kristof> Lisp systems were responsible for a lot of the early research in type inference
fikka has quit [Ping timeout: 244 seconds]
<aeth> kristof: So types in CL can be useful for catching bugs early... and I didn't even statically type my example
<aeth> well, I didn't use type declarations
<aeth> SBCL statically typed it for me
<aeth> But I do have to tell it to sb-ext:*derive-function-types* to make full use of it because it violates the ANSI standard iirc
<aeth> (That variable tells it to assume that function types will not be redefined even when functions are redefined, which allows the compiler to make more assumptions.)
<kristof> aeth: That's good, but do you think you never would have caught that bug if you didn't have static typing there?
<p_l> I think it was more of undefined behaviour rather than ansi violation
<aeth> kristof: I would have caught it in the middle of executing the program. FOO and BAR might be very far apart, and that runtime error might happen rarely, or after a long time.
<kristof> You would have caught it in the middle of executing the *line*, not necessarily the whole program.
<kristof> This is what line coverage is good for
<aeth> I like it when things fail early, especially if it's running in a program that has to CFFI, which can make debugging less fun.
<kristof> line coverage also solves the problem of "I don't know when this might be triggered." Go on and trigger it yourself!
lavaflow_ has quit [Ping timeout: 272 seconds]
ldb has joined #lisp
<ldb> hola
<kristof> aeth: When I hear this argument for (completely, not gradually) statically typed languages, I like to compare it to spellcheckers
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kristof> I think there is a set of things that I would want to check for when I write an essay. I think spelling is a good one, and it's also an easy one. I think there are many more ipmortant things, though, than spellchecking.
<kristof> And moreover I don't use a spellchecker.
<kristof> (because I can spell. Except, apparently, the word "ipmortant")
<aeth> You should try flyspell-mode. :-p
<LdBeth> Then just do both
<aeth> I don't use a spellchecker on IRC, though.
<kristof> I don't use emacs!
<LdBeth> Only kids argues which one is better
<kristof> You missed 90% of the discussion :P
<aeth> If I don't know how to spell a word, I just type it into *scratch* as "foo", i.e. as a string, so flyspell-prog-mode catches it
<beach> Hello ldb.
<ldb> hello
<kristof> He or she specifically asked me "What do you thinks Lisp's type system is missing that other languages have", and I countered that it's other languages that should adopt Lisp's more general, more useful type system.
<LdBeth> Lisp can be say “untyped”
<beach> LdBeth: Don't go there, please.
<LdBeth> Okay
<no-defun-allowed> <LdBeth "Lisp can be say “untyped”"> No thanks LdBeth
<no-defun-allowed> We had bcpl and it died for good reason.
<no-defun-allowed> Maybe it was B actually
<LdBeth> Than Forth still survives
<no-defun-allowed> So does the Unabomber.
<p_l> Forth has other benefits
<no-defun-allowed> At least we think, no one probably knows.
<p_l> Bless, B, and BCPL all died
<kristof> aeth: Did you read that article? It's good food for thought.
<aeth> kristof: I'm still wondering what I'm missing in a typed slot, e.g. (defstruct foo (name nil :type (or null keyword))) ; it's unfortunate that :type, while optional in both, is respected in defstruct more than in defclass... I actually have a metaclass that enforces a type check portably on a slot
<ldb> Forth people regard it as a feature rather than bug
<kristof> aeth: Respected in what way?
igemnace has quit [Quit: WeeChat 2.2]
<aeth> kristof: SBCL on default optimization levels completely ignores :type in defclass
<aeth> When I want to rely on a type check, I use a metaclass that has a :checked-type arg that does this: https://gitlab.com/zombie-raptor/zombie-raptor/blob/e404e51d899b45808e6fc4b7af281861073892a1/util/util.lisp#L536-543
<kristof> aeth: Define "ignores"
<kristof> You mean like an ignored type declaration?
<aeth> kristof: Yes, where it does not check types and you can set it to whatever you want in a writer or in a constructor
<kristof> what about on higher safety levels?
beach has quit [Disconnected by services]
<aeth> I cannot assume that my users will use higher safety levels, especially because I am writing a game engine, where the focus will be on performance. But I do try to use the type system to ensure that I'll catch bad input as early as possible, and in Lisp rather than when feeding it to the CFFI (which is necessary for a 3D game, unfortunately)
Patzy has quit [Ping timeout: 268 seconds]
<kristof> Oh, I see what you mean
nirved has joined #lisp
<kristof> Yeah, I would have expected default safety and speed levels to warn on provably bad input
graphene has quit [Remote host closed the connection]
Patzy has joined #lisp
fikka has joined #lisp
graphene has joined #lisp
<kristof> In a game engine I would expect there to be a *lot* of type directed dispatch though, right?
<aeth> kristof: absolutely, and I think the rest do check except for CLISP, which hates types
<aeth> (re default safety)
<kristof> I would imagine there's a fair amount of difficulty when it comes to type propagation and CLOS but I don't want to speculate.
<aeth> kristof: directed dispatch?
<kristof> aeth: I mean ad hoc polymorphism
martinium has joined #lisp
<ldb> or dynamic dispatch
<aeth> kristof: Not at the moment. I'm still working on the optimized core (it's not really premature optimization, this is the stuff that's run 60 or 100 times a second in a hot loop at the core of everything else)
<kristof> I see
<kristof> Anyway this has been a stimulating exchange of ideas, but I have to go
<aeth> There are some higher order functions already, though. Where those make sense. I think at the moment that's input and scripting
<aeth> (Maybe it's not wise as far as performance goes to funcall items from an array for all of the input, but it's just too convenient.)
fikka has quit [Ping timeout: 264 seconds]
<aeth> (And I funcall 'foo, not #'foo, so I can have them recompiled. Not sure if that would hurt performance even more. But, again, a necessary evil.)
<aeth> kristof: bye
ealfonso has quit [Ping timeout: 252 seconds]
<kristof> aeth if you're worried about performance I'm actually quite surprised you funcall a symbol :P
<aeth> I suppose I can add a # in the build script?
<kristof> >.>
<ldb> kinda can't get why use explit funcall
Balooga_ has quit [Quit: Balooga_]
<aeth> ldb: Well, I guess an alternative to an array might be to make it a several hundred line CASE, but I doubt SBCL optimizes for that. Still might be faster, though.
<kristof> The correct thing to do is to define your own reader macro, or perhaps redefine #', so that in dev mode you get (quote foo), and in release mode (function foo)
fikka has joined #lisp
<aeth> ldb: This is for keyboard input, after all.
<aeth> In practice, though, I guess only a few input actions happen each tick, if any.
<kristof> You also have a two or three input delay for input.
<kristof> *three frame
fikka has quit [Ping timeout: 244 seconds]
<aeth> kristof: redefining #' might actually be the way to go, although I would have to make sure that anywhere where I have CHECK-TYPE or :TYPE etc I use (or symbol function)
<aeth> I suspect I already have type 'bugs' like that in my engine. I should probably define (or symbol function) as a type.
kristof has quit [Ping timeout: 245 seconds]
beach` has joined #lisp
<aeth> Is (or symbol function) the correct type for funcallable things here? I think MOP adds funcallable instances, but I don't think they'd be used in this context. It looks like adding symbol as a possibility adds one test, so it probably won't hurt performance in a noticable way.
shrdlu68 has joined #lisp
aindilis has quit [Ping timeout: 246 seconds]
vlatkoB has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
scymtym has quit [Ping timeout: 252 seconds]
shrdlu68 has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
ldb has quit [Ping timeout: 264 seconds]
lavaflow_ has joined #lisp
lavaflow_ has quit [Ping timeout: 245 seconds]
gpiero has joined #lisp
dented42 has joined #lisp
CatchMe has joined #lisp
martinium has quit [Ping timeout: 245 seconds]
aindilis has joined #lisp
CatchMe has quit [Quit: leaving]
graphene has quit [Remote host closed the connection]
pjb has joined #lisp
suskeyhose has quit [Remote host closed the connection]
graphene has joined #lisp
doubledup has joined #lisp
beach` has left #lisp ["ERC Version 5.3 (IRC client for Emacs)"]
varjag has joined #lisp
beach has joined #lisp
shrdlu68 has joined #lisp
doubledup has quit [Remote host closed the connection]
scymtym has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
schweers has joined #lisp
angavrilov has joined #lisp
laoguan has joined #lisp
jlarocco has quit [Ping timeout: 252 seconds]
laoguan has quit [Remote host closed the connection]
fikka has joined #lisp
<shka_> good morning
<shka_> i have a question regardin change-class
<shka_> is change-class guaranteed to change existing instance instead of allocating and returning new one?
<beach> Hello shka_.
<dim> writing C is a very good exercise into appreciating CL even more
<beach> Yes, identity is preserved.
<shka_> how is it possible?
<beach> The great technique of CS: indirection.
<shka_> oh
<shka_> ok
<shka_> i did not realize that cl objects are boxed
<beach> For example, in SICL, every standard object has a header and a "rack". The header contains a (pointer to a) class and a (pointer to a) rack.
wigust has quit [Ping timeout: 272 seconds]
<shka_> yeah, i remember this
givre has joined #lisp
<shka_> beach: thanks, it is all clear now
<beach> Sure.
shrdlu68 has quit [Ping timeout: 244 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
<aeth> shka_: everything's boxed except for things smaller than 64-bit (assuming a 64-bit implementation). That's probably single-float, fixnum, symbol, keyword, maybe character. Definitely implementation-dependent. Fixnum has tag bits, possibly just one (like in SBCL, which makes it a (signed-byte 63)). single-float is obviously half of the size so it definitely fits (for 64-bit implementations).
<shka_> aeth: floats?
<shka_> oh, right
<aeth> nd I'm absolutely guessing about symbol/keyword/character
<aeth> s/nd/and/
<j`ey> when (time..) on sbcl shows N bytes consed, I assume that's also talking about boxed things?
<shka_> aeth: well obviously, objects are not inlined
cuso4 has joined #lisp
<shka_> but it goes further then that as beach pointed out
<shka_> you don't have pointer to storage area, you have pointer to pointer to storage area :-)
<beach> Clearly, symbols must be allocated on the heap.
<beach> Though symbols would not need any indirection since you can't change the class of a symbol.
<beach> Nor can you update the SYMBOL class.
<beach> ... except in SICL you could. :)
shrdlu68 has joined #lisp
<beach> j`ey: Anything that needs heap allocation.
<givre> Hi, i'm trying to build a macro to pass a bunch of functions to a cond statement. I've tried the following to no avail : (defmacro find-element-with-multiple-strategies (value l (&body strategies)) `(cond ,@(find-element ,value ,l #'strategies)))
<beach> Wow, that doesn't make any sense.
<beach> First COND is a "form" not a "statement". Then, how do you pass a function to a COND form?
<beach> givre: I suggest you use a pastebin to show your code, but also what you expect from the expansion of your macro.
<beach> givre: It would also be very unusual to have &body wrapped in a sub-lambda-list the way you did.
<givre> beach: I want to unwrap the list of strategies to build a cond form containing all the functions
<givre> beach: yeah that's what i figured, i'm not really familiar with macros, i'm going to post the code on pastebin + expansion
<shka_> shrdlu68: hey, i took a look at your code
<shka_> shrdlu68: imho you should not use hash-table here
<shka_> some sort of trie would be probabbly better
<beach> givre: Also, when you do #'strategies, you are looking in the function namespace and not in the variable namespace.
<beach> givre: What is the nature of your STRATEGIES parameter?
<shka_> shrdlu68: like that ^^
makomo has joined #lisp
<shrdlu68> shka_: I've been thinking about that too. Using hash tables, at least as I currently use them, is untenable.
<shka_> yes, but luckly, you don't have to use hashtables
<shka_> i think that bit-trie i pasted above will work better
<shrdlu68> shka_: I'll give it a trie :)
<shka_> heh
<shka_> also, i don't like your use of bit-vectors
zfree has joined #lisp
<givre> beach: https://pastebin.com/iS9FqUHL strategies is a list of lambda functions
<aeth> How are symbols generally implemented? Is there a resource about this?
<shrdlu68> shka_: What did you make of sb-sprof's output? Hashtables apparently aren't the bottleneck.
<beach> givre: Then, why do you use #'strategies?
<shka_> well, they kinda are
<shka_> shrdlu68: i think that hashtable is indeed the main paint point here
<shrdlu68> shka_: I've also been thinking about implementing bit vectors in octet vectors with a little bit of overhead, but this is apparently exactly how SBCL does it.
<aeth> (The HyperSpec says that "the actual internal representation of symbols and their attributes is implementation-dependent", but there might be a common implementation technique.)
<beach> givre: ,@(find-element ...) will call the function FIND-ELEMENT and insert each element of the list that it returns.
<shrdlu68> shka_: Does it account for the supermassive performance difference between SBCL and other implementations?
<beach> givre: For what input to the macro do you expect that expansion.
<shka_> shrdlu68: you tried CCL, right?
<schweers> Do SBCL and CCL differ much in the amount of memory the code they produce uses?
<shrdlu68> shka_: Yes.
<schweers> I’m talking about large amounts of data on the heap
<shka_> shrdlu68: i can't check right now, but it is possible that CCL does not like bitvectors as keys in hashtable so much it generates to O(n) lookup
<shka_> *degenerates
<shrdlu68> I think so too.
<shka_> you can try to check it yourself
<shka_> simply populate hashtable with bitvectors measure time, populate hashtable with twice as many bitvectors, measure time again
<shka_> anyway, you are better of without hashtable
<shrdlu68> shka_: Thanks, I'll let you know how it goes.
<givre> beach: honestly don't understand all the meaning of #' right now, so would be able to tell you why. I'm trying to abstract away the use of a cond, I want to be able to search in an assoc list with multiple matching strategies (right now i'm splitting a mail adress and matching user login with the first part of the mail for instance)
<beach> givre: OK, but it is not going to be possible for you to write a macro unless you first know what ,@ does and what #' means.
<givre> beach: i do know that ,@ is splicing a list into a form afaik
<beach> givre: OK, so let me show you a simpler version of your macro:
<beach> givre: (defmacro foo (x) `(cond ,@(list 1 2 3 x)))
<beach> givre: What do you think the macroexpansion of (foo 234) is?
<beach> givre: You can try it out on the REPL if you like.
<beach> givre: But, you seem to think that it expands to (cond (list ...) (list ...) (list ...))
<beach> givre: Try (macroexpand-1 '(foo 234))
<givre> beach: ok, so i get an error because 234 is not a cons cell
<beach> I seriously doubt that.
<beach> You must have tried to call it rather than macroexpand it.
<givre> beach: sorry, i meant the cond clause is not a cons. Yeah that's what i did obviously. It expands to (cond 1 2 3 234)
<beach> So, why do you think your expansion will contain (find-element when mine doesn't contain (list?
<beach> givre: After all, the two macros have the same structure.
<givre> beach: I believed that placing the ,@ before a form instead of the parameter would splice differently, which is far fetched yeah
<beach> givre: Like I said, ,@ will evaluate the form that follows, in my case (list 1 2 3 x) and then splice the elements of the resulting list into the COND.
atgreen__ has joined #lisp
<givre> beach: ok, i get it
<beach> Good.
atgreen_ has quit [Ping timeout: 246 seconds]
<beach> givre: Now try this one (defun bar (car) (list car #'car))
<beach> Then evaluate (bar 234).
<beach> Do you see what #'car does in a function body?
graphene has quit [Remote host closed the connection]
<givre> beach: yes, it allows a function to be used as data
<beach> givre: So why do you expect #'strategies to refer to your parameter?
graphene has joined #lisp
<givre> givre: the find-element function is awaiting a function parameter, i passed it this way and then applied it in the body when i was not using the list
<beach> givre: I suggest you write a function that returns the list ((find-element 1 '(1 2 3) (lambda ...)) (find-element 1 '(1 2 3) (lambda ...))). Once you have that, you can stick a call to it after the ,@ in your macro body.
<givre> beach: ok, sounds good
<givre> beach: I guess for the #' I don't need to use it because my lambda will be #'ed in their list anyway right ?
<beach> Hard to say since you have not told us what the input to the macro is.
<beach> You said that it's a list of "lambda functions", but there is no such thing.
<beach> There are "functions" and "lambda expressions" (which are not functions, but code), so again, it depends.
<beach> Besides, you don't need #' in front of (lambda ...).
<givre> beach: ok
<beach> LAMBDA is a macro that expands to (function (lambda ....))
<givre> beach: ok, so at this moment, it's only a form that is yet to be evaluated, right ?
<givre> beach: which is why one can write ((lambda (a) (+ a 2) 2)
<givre> beach: missed a parens obviously
<no-defun-allowed> getting the parens right, you can use a lambda form as a function name
<givre> beach: ((lambda (a) (+ a 2)) 2)
<beach> givre: Here is a better example: Consider the macro (defmacro baz (x y) `(list ,x ,y))
<beach> givre: Now macroexpand (baz (lambda (x) x) (lambda (y) y))
<givre> beach: ok, this one I can understand without much concern i think
<beach> givre: Vs (baz #.(lambda (x) x) #.(lambda (y) y))
<beach> In the first case, you are passing lambda expression to the macro function, because macros do not evaluate its arguments.
<beach> In the second case, the reader will create functions for you and those will be passed to the macro function.
<givre> oddly enough, it evaluates to the same thing (with different references of course)
<beach> "different references"?
<beach> I asked you to macroexpand the calls.
<givre> oh, sure i ran the macro
cuso4 has quit [Ping timeout: 246 seconds]
<TMA> givre: to macroexpand is to call MACROEXPAND on the (quoted) form, not to _run_ it (possibly call MACROEXPAND-1 to look at one level of macroexpansion at time)
<beach> givre: So it is important to be precise about terminology.
<beach> Quote the forms.
<aeth> You usually want macroexpand-1 because macroexpand will leak implementation details as it keeps expanding well past the standard forms
<beach> (macroexpand-1 '(baz....))
<givre> beach: i'im trying to be precise, but it's quite different from what i'm used to :)
<givre> beach: ok, trying
<beach> So you have a lot to learn.
<beach> It is just amazing that you are trying to write a macro this early in your Common Lisp training.
<givre> beach: Ok, so one contains the lambda forms and the other functions
<beach> "lambda EXPRESSIONS"
<beach> givre: So with all this information, you should be able to write a better version. But I this is too basic for #lisp, so next time you need help, I suggest you visit #clschool instead of #lisp.
<shka_> beach: unfortunatly, macros are pictured as THE selling point of CL
<makomo> morning
<shka_> makomo: hello
<beach> shka_: Yes, that's unfortunate.
<beach> Hello makomo.
<makomo> hello
<givre> beach: i've been doing a bit of common-lisp for times to times over the past few years, but right now i've got the opportunity to write some POC at work and real code so here am I
<aeth> shka_: Ideally, other people's macros
<givre> beach: thanks !
<beach> Sure.
<givre> beach: I'll head to #clschool
<shka_> givre: there are multiple ways to implement such functionality, and macros have major drawbacks
<aeth> I recommend people stick to established patterns when learning how to write macros. DO-FOO, DEFINE-FOO, and WITH-FOO are all simple and are the vast majority of macros you'll probably see/write
<shka_> givre: many would argue for higher order functions instead
<givre> shka_: ok, i was about to ask for betters leads. higher order functions are something I can relate to a bit more indeed !
<shka_> cool
<luis> Sigh. highlight.js's Lisp coloring is so bad. Anybody want to fix it? :)
<givre> anyway, thanks a lot, i'm off implementing that !
<shka_> anyway, contrary to what many would say, you can spend whole day in CL without defining your own macro
<luis> shka_: months even!
<shka_> yes
<shka_> givre: anyway, relax and just write code instead of trying to generate everything
<shka_> it is better to approach this gradually
orivej has joined #lisp
<givre> shka_a: Sure ! I'll write this macro anyway since I invested time in it, then I'll stick to actually writing code.
<shka_> good luck!
<givre> shka_: thanks !
givre has left #lisp [#lisp]
<Demosthenex> so i have a simple http api to postgres project i'm doing, i'm considering threads to run requests in parallel. i have no global or shared variables, other than potentially postmodern's db connection and dexador's. i'm reading on bordeaux threads, any other suggested reading?
<Demosthenex> it'd be slick if there were a mapcar-threads
<makomo> Demosthenex: there's lparallel but i don't know much about it
<luis> Demosthenex: you'll love lparallel
<Demosthenex> ooo! sounds sweet
<shka_> lparallel is good
<shka_> Demosthenex: lparallel is thread pool, futures, some paralleized higher order functions, sync queues and some other stuff
<shka_> it is rather nice
<shka_> and fairly easy to use
esrse has joined #lisp
<shka_> and API is stable
<shka_> you should give it a try
<Demosthenex> indeed i will
<Demosthenex> i think this is a simple job and a good fit for parallelism... so i'll give it a go
<shka_> cool
<shka_> Demosthenex: i like to have event loop launching async jobs to lparallel
<shka_> it is easy architecture and usually works well
<makomo> i was scrolling through SBCL's sb-walker codewalker and stumbled upon this comment https://github.com/sbcl/sbcl/blob/master/src/pcl/walk.lisp#L393
<makomo> "Implementation x implements a Common Lisp macro as a special form."
<makomo> is this conforming behavior?
<makomo> implementing special forms as macros should be conforming afaik, but does the same hold for the reverse?
<beach> It is.
<beach> As long as the macro is available.
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<beach> "An implementation is free to implement a Common Lisp special operator as a macro. An implementation is free to implement any macro operator as a special operator, but only if an equivalent definition of the macro is also provided."
tankf33der has left #lisp [#lisp]
<makomo> beach: i see, thanks
<beach> Anytime.
<Demosthenex> shka_: give i know how many pages of data i'm downloading, i'm thinking of just using pmap
<Demosthenex> shka_: also weren't we discussing rate limits the other day?
<makomo> beach: so for the purposes of a code walker, one can just ignore the fact that a macro is implemented as a special operator when there will surely be an equivalent definition of the macro
<beach> makomo: Yes, that is exactly the point.
<makomo> beach: mhm. the "codewalker problem" is quite an interesting one, and i always wonder how useful would a codewalker within the standard be
<makomo> i suppose it would remove a lot of ugly hacks people have written over the year
<makomo> but i'm not sure how easy it would be to standardize such a thing
<makomo> years*
<beach> The standard won't change, but you can write one that is implementation-independent.
<pjb> makomo: or in a library, no need for a standard. The only thing, would be that implementation don't have macros that expand to non-standard special operators that don't have a macro expanding only to standard operators.
<beach> You "just" have to come up with the right protocol for it.
<pjb> makomo: only sbcl has (or had) one such special operator.
<makomo> i've watched michael raskin's talk on a portable codewalker, and from what i've seen, doing it portably isn't really possible
<pjb> beach: the implicit in "but only if an equivalent definition of the macro is also provided." is that this macro expands to standard special operators…
<makomo> beach: i suppose "implementation-independent" includes implementation-specific code
<beach> pjb: Or function calls.
<pjb> sure.
<beach> makomo: Exactly.
<pjb> Perhaps older implementations had more implementation specific special operators?
<beach> makomo: So for those parts, come up with a CLOS protocol so that implementations can configure it.
<makomo> beach: mhm, i get your idea, but it would still be nice if it could be done 100% portably
<beach> makomo: Then start by finding out why Raskin said what he did.
<makomo> i think i have a vague idea (i forgot much of the talk) -- it might have something to do with environments
<beach> Sounds plausible.
<beach> I mean, Cleavir basically *is* a code walker.
<makomo> but, reasons for it not being possible aside, i would still wish that it could be done portably
<beach> And that is exactly the difficulty adapting it to any implementation.
esrse has quit [Ping timeout: 246 seconds]
<makomo> oh, i see
<beach> The problem is that the implementation may call MACROEXPAND on a lexical environment.
<beach> So the lexical environment must be acceptable to the implementation.
<beach> Lunch time. I'll be back soon.
fikka has quit [Ping timeout: 252 seconds]
<makomo> beach: ok :-)
fikka has joined #lisp
<makomo> beach: reading your code walker specification that i just found -- good stuff! a minor typo: "and interpreter" https://github.com/robert-strandh/SICL/blob/master/Code/Cleavir/Code-walker/Specification/code-walker.text#L70
<makomo> beach: i think christophe's post was about "let over lambda", not "land of lksp" (assuming we're thinking of the same article) https://github.com/robert-strandh/SICL/blob/master/Code/Cleavir/Code-walker/Specification/code-walker.text#L15
<pjb> beach: I don't think a code walker should expand the standard special operator as macro ever.
<j`ey> what is a code-walker?
<jackdaniel> it is a macro which performs it's body argument analysis for some reason
<makomo> j`ey: a program that knows how to "interpret" common lisp code and that can tell you various stuff about it
<jackdaniel> since body contains code, such macro has to understand meaning of special forms, macros, functions, variables etc
<j`ey> ah
<makomo> "interpret" not in the sense of executing it, but in the sense of "walking" it and "figuring out what the code does"
<j`ey> analysing
<makomo> yeah, that would be a better word :D, jackdaniel got it
<jackdaniel> since code walking is non-trivial in common lisp it is hard to get right (hence it is rarely used in "normal" applications)
<beach> pjb: I think that's correct.
<beach> makomo: I had forgotten that I had written such a thing.
kooga has joined #lisp
<beach> pjb: Did I write something contrary to that?
<pjb> The code walker should not always try the macro first. If it's a special operator, it should call the user function with it, and let it interpret the special form.
<beach> Got it.
<beach> I definitely need to re-read that document.
ski has joined #lisp
<makomo> beach: ah :-). i suppose this text will eventually become part of the main SICL spec (the collection of tex/pdfs you maintain)?
<pjb> beach: now, there may be an option to do what you specified, but in general, I wouldn't use it.
<beach> Yes, I understand.
FreeBirdLjj has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<beach> makomo: Possibly. Since I couldn't remember having written it, it might have been forgotten.
<beach> Thanks.
<pjb> The thing is that such special operator macro will most certainly do implementation specific things, such as ignoring ignorable special operatorns (eg. THE). A code walker will usually want to be conforming and extract the semantics of the program in an implementation independent way.
<makomo> the thing about not trying macros first is also mentioned in the comments of sbcl's walker https://github.com/sbcl/sbcl/blob/master/src/pcl/walk.lisp#L389
FreeBirdLjj has quit [Ping timeout: 240 seconds]
lavaflow_ has joined #lisp
fikka has joined #lisp
froggey has quit [Ping timeout: 252 seconds]
<beach> Fixed. Thanks.
orivej has quit [Ping timeout: 240 seconds]
<makomo> beach: glad to help
orivej has joined #lisp
lavaflow_ has quit [Ping timeout: 252 seconds]
m00natic has joined #lisp
froggey has joined #lisp
<shka_> change-class is actually rather neat function to have
<shka_> i never used it before though
<dim> as with many things in CL I though it was somewhat overkill until I had a use for it ;-)
orivej has quit [Ping timeout: 264 seconds]
<shka_> dim: considering extra dereference you have to do...
<beach> makomo: Thanks. Fixed that one too. Now it is time for a break.
atgreen__ has quit [Ping timeout: 245 seconds]
<makomo> beach: ok
atgreen__ has joined #lisp
dddddd has joined #lisp
igemnace has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<jackdaniel> Xach: CG memos you've shared the other day by Alvy Ray Smith are true gems, thank you again for sharing the link
<jackdaniel> [ftr if anyone is interested: http://alvyray.com/Memos/MemosCG.htm]
fikka has joined #lisp
<Xach> jackdaniel: many years ago i ran a GIMP web forum and he joined and asked if gimp was making the mistake of being rectangle- and square-centric with regard to images and layers, and a few deveopers chimed in that those were the most natural and anyway image formats are all square, and who are you, anyway, old man
<Xach> jackdaniel: it was pretty embarrassing when i saw him in a pixar documentary and he was a founder
<Xach> he has been nothing but helpful ever since i learned of his work
<jackdaniel> truth to be told, orbitrary shapes/ transformations for various objects make my life certainly worse than it should be (mcclim-wise)
<jackdaniel> either way reading his introduction to splines is simply great
fikka has quit [Ping timeout: 245 seconds]
<Xach> right - his notion is to break free of tradition and ease - kind of like how gc frees you, even though making gc work is difficult
<jackdaniel> and it is just in time I've read it, because next biggish thing I want to add to mcclim are animations
<Xach> glad you found it useful!
lavaflow_ has joined #lisp
jxy has quit [Read error: Connection reset by peer]
jxy has joined #lisp
fikka has joined #lisp
lavaflow_ has quit [Ping timeout: 244 seconds]
fikka has quit [Ping timeout: 244 seconds]
zfree has quit [Remote host closed the connection]
zfree has joined #lisp
atgreen__ has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
orivej has joined #lisp
elfmacs has joined #lisp
zfree has quit [Quit: zfree]
_whitelogger has joined #lisp
<pjb> Xach: Lisa had rectangular pixels, if that's what you're asking about.
jkordani has joined #lisp
jkordani_ has joined #lisp
DataLinkDroid has quit [Ping timeout: 256 seconds]
jkordani has quit [Ping timeout: 246 seconds]
<oni-on-ion> jackdaniel: ohhh, nice link, ty
<oni-on-ion> aeth: are you still awake or up yet? what did you mean earlier when you said that funcall happens differently on 'foo than #'foo ? i think that might be part of a problem i ran into last nacth
<_death> Colleen: clhs funcall
<_death> meh
mindCrime has joined #lisp
Bike has joined #lisp
housel has quit [Read error: Connection reset by peer]
elfmacs has quit [Quit: WeeChat 2.2]
mindCrime has quit [Ping timeout: 264 seconds]
EvilTofu has joined #lisp
steiner has quit [Remote host closed the connection]
<EvilTofu> Moo. I've just downloaded CCL 1.11.1 from the Apple Mac App Store. HyperSpec look ups just give me a Map_Sym.txt file not found dialog. Is there a fix for this?
EvilTofu has quit [Quit: Leaving]
<oni-on-ion> never heard of that before. i myself use slime in emacs with HyperSpec downloaded from lispworks.com and the help lookups (C-c C-d h) are great
warweasle has joined #lisp
EvilTofu has joined #lisp
lavaflow_ has joined #lisp
<EvilTofu> Sorry was disconnected.
<oni-on-ion> aeth: ah it did solve my problem! i've got to learn the difference between #'foo and 'foo now.
<oni-on-ion> (or sometime later today=)
<pfdietz> "Because static typing is primarily about optimization, not correctness, and optimization is only important in certain places."
Inline has joined #lisp
<oni-on-ion> hm sauce ?
<pfdietz> I find one of the most important uses of type declarations is documentation.
<pfdietz> (was responding to much earlier comment)
Inline has quit [Read error: Connection reset by peer]
<oni-on-ion> for me, types help to design data structures, which helps to plot and plan - where most i guess use paper or their own heads
<oni-on-ion> i can see the potential algorithms based on the data structures
<oni-on-ion> rather than the other way around .
Inline has joined #lisp
Inline has quit [Read error: Connection reset by peer]
Inline has joined #lisp
EvilTofu has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
_whitelogger has joined #lisp
igemnace has quit [Quit: WeeChat 2.2]
steiner has joined #lisp
papachan has joined #lisp
mindCrime has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
eschulte has joined #lisp
minion has joined #lisp
specbot has joined #lisp
<beach> minion: Welcome back!
<minion> thanks!
<AeroNotix> ,clhs defmacro
<jackdaniel> spec defmacro
<jackdaniel> clhs defmacro
<AeroNotix> :/
<oni-on-ion> slime-highlights is really great. make changes anywhere, they are highlighted, C-c C-c to compile those
<jackdaniel> better
<oni-on-ion> i know beach is using something else, though =)
cage_ has joined #lisp
fikka has joined #lisp
steiner has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
papablo has joined #lisp
steiner has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #lisp
<oni-on-ion> could we use setf places in let forms? ie. (let (((slot-value h 'conn) (make-connection..))) ...)
<AeroNotix> mmmmm nice c2mop:funcallable-standard-object
<warweasle> multiple-value-setq?
<oni-on-ion> hmm =)
<warweasle> (Because I've never used it for anything ever)
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
fikka has joined #lisp
<trittweiler> oni-on-ion, search for LETF. It used to be provided on the Lisp machine. And implementation based on setf + unwind-protect is easy, but it doesn't really work well in multi-threading environment (contrarily to LET, both for lexical bindings (trivial) and dynamic bindings)
<oni-on-ion> "; Variable name is not a symbol: (SLOT-VALUE H :CONNECTION)." what !
<oni-on-ion> trittweiler: ohh,i thought that letf was for functions on just the right hand side only =)
<trittweiler> there's also an implementation of lets in Emacs' cl implementation. Probably can just take that. Or search comp.lang.lisp
<trittweiler> pardon the typos
<oni-on-ion> lets or let* or letf? letf been deprecated to cl-letf or cl-flet
<trittweiler> LETF
<oni-on-ion> ok
<oni-on-ion> i'll survive
fikka has quit [Ping timeout: 240 seconds]
atgreen has joined #lisp
igemnace has joined #lisp
housel has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
DGASAU has joined #lisp
LiamH has joined #lisp
rippa has joined #lisp
<oni-on-ion> is there a way to remove/destroy defmethod[s] ?
<Xach> oni-on-ion: yes. the easiest is with the slime inspector.
<schweers> I have a hopefully quick question. I don’t indend on doing this, partly because I don’t know how. I just want to know a) if it could be done, and b) whether that would be considered sane. Suppose I want to place very simple datastructures (for the sake of argument, lets say something like a defstruct) in a specific place in memory, like a memory mapped file or shared memory, or something similar. Can the MOP be us
<schweers> creation and usage of such objects?
<Xach> oni-on-ion: but the slime inspector uses fmakunbound with find-method underneath
ebrasca has joined #lisp
<oni-on-ion> Xach: oh! thats sounds alright. i will check out this slime inspector
<oni-on-ion> also my subconscious just told me there might be something called Clouseau
<Xach> oni-on-ion: if it's (defmethod frob ...) you would inspect the #'frob generic function, and slime shows a list of methods with options to remove
<Xach> sorry, it's remove-method
<Xach> not fmakunbound
<oni-on-ion> Xach: ahh! cool
fikka has joined #lisp
<Xach> oni-on-ion: yes, very cool and handy
<Xach> slime: a pit of delights
<oni-on-ion> Xach: cool seems to work nicely! (using (inspect .))
<oni-on-ion> yes =) =)
<ebrasca> beach: I am thinking if to port second climacs to mezzano.
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
<beach> ebrasca: You would have to wait. It is not yet operational.
<oni-on-ion> hey so. how come (slot-value h :conn) does not work, but (slot-value h 'conn) does -- when defclass slot was set to :initarg :conn ??
<beach> oni-on-ion: The :initarg has nothing to do with the slot name.
<oni-on-ion> may be a good time to get second climacs ready for ports =)
<Xach> oni-on-ion: the :initarg is the symbol used in make-instance, not the name of the slot.
<pjb> clhs remove-method
<pjb> oni-on-ion: ^
<oni-on-ion> beach: Xach: ohh. my bad. thanks =)
<oni-on-ion> pjb: ty! goal: never restart image
<Xach> Does anyone happen to have libcuda.so handy for linux/amd64?
atgreen has quit [Ping timeout: 252 seconds]
<pjb> oni-on-ion: (com.informatimago.common-lisp.interactive.interactive:uptime)
<jasom> Xach: yes, why?
smokeink has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
dented42 has joined #lisp
<Xach> jasom: I am trying to build a cuda library and i don't care if it really works, i would just like a (possibly non-working) .so to see if I can make progress.
trittweiler has quit [Ping timeout: 246 seconds]
fikka has quit [Ping timeout: 240 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<oni-on-ion> Xach: i also do
<oni-on-ion> pjb: Ql has no idea about that =P
<oni-on-ion> pjb: don't think i have your repo/dist if you've one
fikka has joined #lisp
fikka has quit [Read error: Connection reset by peer]
atgreen has joined #lisp
<pjb> mkdir -p ~/quicklisp/local-projects/com ; cd ~/quicklisp/local-projects/com ; git clone https://github.com/informatimago/lisp.git informatimago
<pjb> then (ql:quickload "com.informatimago.common-lisp")
<oni-on-ion> ok!
<pjb> But it counts only from the time loaded, so you have to insert this (ql:quickload "com.informatimago.common-lisp") in your rc file.
<oni-on-ion> oh i just quickload stuff as i need em
<pjb> Well, interactive stuff is always needed, at the REPL ;-)
<oni-on-ion> repository not found (git)
<oni-on-ion> true, im about to have a look inside when i get it cloned =)
<oni-on-ion> oh nvm dyslexic
<oni-on-ion> informatiMAgo
<pjb> copy and paste.
<oni-on-ion> cant
<pjb> ok.
<oni-on-ion> no mouse and also xterm keys are wonky
<oni-on-ion> oh my loads of packages
<oni-on-ion> i see much usefulness, i will be looking there often for things
<oni-on-ion> "uptime: 0 minutes, 28 seconds. "
fikka has joined #lisp
m00natic has quit [Read error: Connection reset by peer]
m00natic has joined #lisp
anewuser has joined #lisp
EvilTofu has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
dale__ has joined #lisp
dale__ is now known as dale
bradcomp has joined #lisp
scymtym has joined #lisp
EvilTofu has quit [Ping timeout: 252 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
papablo has quit [Remote host closed the connection]
m00natic has quit [Read error: Connection reset by peer]
m00natic has joined #lisp
orivej has quit [Ping timeout: 244 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 245 seconds]
pierpal has quit [Read error: Connection reset by peer]
EvilTofu has joined #lisp
<makomo> if i want to communicate that a slot should be initialized to the empty slot, should i use :initform () or :initform '()
<shka_> nil
fikka has joined #lisp
<makomo> shka_: i thought the consensus was not to use NIL in this case
<shka_> but it is sometimes better to simply not supply initform
<beach> To the empty list you mean?
<shka_> and check is slot-boundp
<makomo> beach: yes
<beach> '() definitely.
<shka_> beach: but why?
<makomo> shka_: in this case i want it to have a default value, instead of being unbound
<shka_> makomo: ok
<beach> shka_: () is used only in code for argument lists and such.
<shka_> and why not simply nil?
<shka_> that's what i do
<beach> shka_: NIL is either Boolean false or a default value.
<beach> '() is the empty list.
<shka_> uhm
<beach> shka_: I am sorry to hear that.
<shka_> well i use nil as default value
<makomo> shka_: operationally they're both the same, but this communicates the intent better
<shka_> so i guess that's fine?
<beach> shka_: But that's different from the empty list.
<shka_> so let's say that my type is (or null vector)
<shka_> then i should use nil
<beach> You shouldn't use NIL and then (push ...) for instance.
<shka_> but if my type is list i should use '()
<shka_> is that correct?
<beach> Yes.
<makomo> beach: i was about to ask that same thing. what about with '()?
<makomo> (the PUSH thing you brought up)
<beach> '() and PUSH go together well. :)
<shka_> it makes sense
<shka_> beach: ok, i see your logic
<makomo> beach: oh hm right, since PUSH modifies the slot itself
<makomo> not sure what i thought there for a second
<beach> Yes.
<pjb> and 'NIL is a symbol named "NIL".
<beach> Yeah, you can't modify NIL. :)
<beach> Oh, forgot that, yes.
<beach> 'NIL is the symbol.
fikka has quit [Ping timeout: 246 seconds]
<shka_> I think that in the case of slots, it is beneficial to supply :type option in order to be more explicit about your intents
pierpal has joined #lisp
<pjb> ((lambda () (when (or nil (string= 'NIL "NIL")) '())))
<beach> shka_: Sure, feel free.
<makomo> hm, but you should be able to use PUSH when your initform is NIL as well, right?
<makomo> it's bad style, but is it illegal?
<pjb> makomo: of course.
<makomo> right
<makomo> again, PUSH would modify the place that is the slot
<pjb> (mapcar (lambda (other-nil) (eq nil other-nil)) (list nil () 'nil '())) #| --> (t t t t) |#
<beach> makomo: Yes, semantically they are all the same.
<beach> makomo: They differ in the message they send to the person reading your code.
<makomo> mhm. misunderstood what you said there (thought you weren't talking from a style standpoint)
<beach> While we are on the subject....
<beach> (let (a b c) means a b c are "uninitialized" so the person reading your code expects them to be assigned to before being used.
<pjb> even if they're actually initialized to nil by default.
<beach> Right.
<beach> Otherwise, (let ((a nil) (b '()) (c 'nil)) are as above.
<makomo> mhm, makes sense. what about (let ((a) (b) (c)) ...) :-D
<shka_> that won't fly
<shka_> or compile
<beach> makomo: Those are basically useless.
<Bike> i think that also defaults them to nil?
<makomo> shka_: it does work
<makomo> Bike: yeah
<shka_> let me check
<pjb> There's notably the case of (let (a) (declare (integer a)) (setf a 42)) ; technically before the setf, reading A would be a bug, since we would read NIL as an integer!
<beach> shka_: what won't fly?
gpiero has quit [Remote host closed the connection]
<shka_> makomo: you are right
<shka_> imho it shouldn't :P
<makomo> i guess it's a bit weird but oh well
fikka has joined #lisp
<shka_> (let (a b c)
<pjb> But it does, because lexical variables cannot be unbound. and local dynamic bindings must shadow the outer dynamic binding.
<shka_> eh, ok
<shka_> good bye all
shka_ has quit [Quit: WeeChat 1.9.1]
<makomo> Shinmera: bye
<makomo> woops lol, he left too quickly
<makomo> wrong ping
EvilTofu has quit [Ping timeout: 252 seconds]
<pfdietz> pjb: that declaration would be bad, even if the NIL value is never read.
nika has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
<makomo> beach: we've discussed this before and you also mentioned it yesterday again -- using accessors internally instead of directly using slots. then, if one wants the client to actually use some of those accessors, one should export the respective symbols, right?
<beach> Right.
<makomo> beach: but what about when you want to export e.g. only the reader, and not the writer? this isn't really possible, is it?
<Bike> yeah, the initial value has to be of the type too.
<Bike> makomo: you can name the reader and writer different things.
<beach> makomo: You would have to give them different names.
<Bike> i've a few times had ":accessor %foo :reader foo", defined a special (setf foo), and then exported foo and not %foo
<beach> makomo: (%bla :initarg ... :reader foo :writer (setf bar))
<makomo> oh, good point, didn't think of that. what would be the canonical names then? %something?
<Xach> :writer (setf %foo)
<Xach> wait
<beach> Or what Bike suggests. :accessor foo :reader bar
<beach> Xach: That would kind of defeat the purpose.
spm_ has joined #lisp
<Xach> beach: sorry. i misread as :writer %foo, which can be confusing, because plain functions don't often use setf argument style.
<beach> Indeed.
<Xach> when i first tried separate :reader and :writer, i thought :writer foo would create (setf foo)
<Xach> this was so many moons ago!
<Xof> if you do that because you don't want users to mess with slots, you might also want to make sure that your initarg(s) isn't/aren't exported
<Xof> otherwise users will defeat your protections by using (reinitialize-instance object :%bla 3)
<beach> Xach: I am betting you are not alone.
<pjb> pfdietz: stylistically, it would be bad. But notice about arrays, that if no :initial-element or :initial-contents is given, the memory is not initialized so you could get mis-interpretation of the bits, and the standard only says: "don't do that".
<makomo> Xach: i thought that was the case as well, until now when beach mentioned it! :-)
<pjb> pfdietz: I'd say it's the same here.
<beach> Xof: Good point.
<Xof> except now I can't remember whether the initarg overrides an existing value in a slot
<beach> Xof: But then, they can always use slot-value.
<beach> Xof: It does.
<beach> I have used that technique myself. :)
<pfdietz> The standard pretty explicitly says the declaration has to be in effect right after the binding occurs, even without an explicit reference by the user. Look up bound declaration and declaration scope. Undefined behavior if not the right type.
<beach> I don't define a writer, and I use reinitialize-instance.
<Xach> heh
<beach> Xof: I had an interesting phone meeting with Didier Verna today about my solution (in SICL) to method combinations. He seems to think it is sound, so there might be a joint ELS paper submission at some point.
<Bike> pfdietz, pjb: clhs type says initial values of the variables have to be of the type. seems straightforward.
<spm_> I'm having a little trouble understanding how quoted lists get applied as default &key arguments. I thought the list would be passed fresh to each call of a function, but the list seems to persist across calls. Clearly wrong-thinking on my part, but I'm not entirely clear why.
<pjb> Bike: yes, but in (let (a) …) there's no explicit initial value.
rtypo has joined #lisp
<Xach> spm_: quoted lists shouldn't be modified. it should be treated as a constant.
<Xach> spm_: if you'd like fresh, use (list :value 0)
<pfdietz> The user has not given an explicit value, but the standard says what the value is. It's NIL.
<pfdietz> "3. At the moment the scope of the declaration is entered, the consequences are undefined if the value of the declared variable is not of the declared type. "
<spm_> Xach: Thanks. Yes, I figured out how to not have the problem, but am not clear regarding in-what scope the quoted list becomes defined, and what happens on subsequent calls to the function.
<pjb> spm_: the init-form is evaluated at call-time, only if no matching keyword argument pair is given.
<Bike> spm_: nothing to do with &key. you are editing quoted data, which is always undefined behavior.
<Xach> spm_: http://l1sp.org/cl/3.7.1 has some info
<pfdietz> "The scope of a bound declaration is the same as the lexical scope of the binding to which it applies; [...]"
<Xach> spm_: the quoted list is created during compilation
<pjb> spm_: so the question is whether you want the same list or a new list each time: https://pastebin.com/sz43meDi
<Xach> sbcl can be quite helpful with warnings about modifying quoted/literal data, but it doesn't catch everything
papachan has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
<phoe> minion and specbot are back
schweers has quit [Ping timeout: 250 seconds]
<spm_> pjb: Yes. new value each time was what I was after, and not what I was seeing. My thinking was that a new quoted list would be created each time the function was entered if it wasn't provided.
<spm_> Xach: interesting. I'm running SBCL and this one didn't seem to alert.
<pjb> spm_: in general, lisp tend to avoid unexplicit behavior. No copying behind your back.
<Xach> spm_: possibly because someone could pass a keyword and the warning wouldn't apply...not sure.
fikka has quit [Ping timeout: 272 seconds]
<pjb> (defun f (&key (x (error "You need to pass a :x argument!")) y) (list x y)) (f :y 42) #| ERROR: You need to pass a :x argument! |# (f :x 42) #| --> (42 nil) |#
<Xach> or maybe it's just too complicated to check
<spm_> Thanks for the assist. I need to do more reading on compile/init of functions as the "why" still isn't fully clear to me, but if the behavior of modified quoted literals is undefined, then I certainly ought not do that. :-)
<pjb> spm_: see section 3.4 Lambda Lists
<AeroNotix> log4cl + log4slime wow
X-Scale has joined #lisp
FreeBirdLjj has joined #lisp
Essadon has joined #lisp
fikka has joined #lisp
atgreen has quit [Ping timeout: 264 seconds]
Denommus has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
jkordani has joined #lisp
fikka has joined #lisp
jkordani_ has quit [Ping timeout: 272 seconds]
danielxvu has quit [Remote host closed the connection]
danielxvu has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
<spm_> pjb & Xach: Thanks both. Understand both what and why. Much appreciated.
pierpal has quit [Quit: Poof]
fikka has joined #lisp
lnostdal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
ym has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
varjag has joined #lisp
m00natic has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 264 seconds]
keppy has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
fikka has joined #lisp
orivej has joined #lisp
warweasle has quit [Quit: later]
keppy has quit [Remote host closed the connection]
ym has joined #lisp
suskeyhose has joined #lisp
shka_ has joined #lisp
<shka_> good evening
<beach> Hello shka_.
dyelar has quit [Remote host closed the connection]
<oni-on-ion> AeroNotix:
<oni-on-ion> ?
varjag has quit [Ping timeout: 250 seconds]
fikka has quit [Ping timeout: 245 seconds]
dyelar has joined #lisp
equwal has quit [Ping timeout: 252 seconds]
atgreen has joined #lisp
fikka has joined #lisp
kooga has quit [Quit: :]
<AeroNotix> oni-on-ion: what's up
SaganMan has quit [Read error: Connection reset by peer]
<oni-on-ion> what u say ur last msg
<AeroNotix> oni-on-ion: "log4cl + log4slime wow"?
fikka has quit [Ping timeout: 264 seconds]
<oni-on-ion> yes.
<AeroNotix> it's a logging package that integrates really nicely with SLIME.
<AeroNotix> take a look
<oni-on-ion> kk
sauvin has quit [Read error: Connection reset by peer]
<AeroNotix> each logger within a system/package/function highlights which logger it came from within the slime repl, which then exposes that logger as something you can interact with (forget what slime calls it, the C-c C-v TAB things) that you can then configure right within your REPL.
<AeroNotix> slime presentations are what they're called.
<oni-on-ion> ouu i see clos stuff
fikka has joined #lisp
<oni-on-ion> ah yes
<oni-on-ion> will need this ty for revealing it
<AeroNotix> np
epmor has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
steiner has quit [Remote host closed the connection]
epmor_ has joined #lisp
trittweiler has joined #lisp
smokeink has joined #lisp
varjag has joined #lisp
<epmor> Any good GUI cross platform frameworks for CL? I'm on windows
<beach> Sorry to hear that.
<epmor_> About Windows? :P
<makomo> lol :-)
<beach> Yes.
<epmor_> Hehe
<epmor> I tried mmclim but that doesn't work, just wondering if theres a small alternative
<beach> "doesn't work" is a bit vague.
<beach> Perhaps it can be fixed.
<oni-on-ion> qt or wx?
<jackdaniel> having mcclim work on windows requires Xserver run on windows and this is a tedious thing to make it work
<beach> You might want to ask in #clim about that.
<epmor> Already tried, it was after libssl32.dll and some other DLLs tht were difficult to get working on windows
<dim> jackdaniel: did you try with the Xserver embedded in https://mobaxterm.mobatek.net already?
<jackdaniel> dim: I've only verified, that it works on windows
<jackdaniel> I think I've used cygwin installer to get x11 working
<oni-on-ion> he is more so askin about xplat gui than how to get clim working on windows, imo
epmor has quit [Quit: leaving]
<jackdaniel> when I'm doing something on windows (usually testing in a VM) I grab cygwin, install emacs and operate from eshell
<jackdaniel> I suppose it is lame by windows standards, but I easily get confused how to get thigns working there
<jackdaniel> dim: this projects looks interesting, thanks for the link
<jackdaniel> s/this/these/
fikka has joined #lisp
lnostdal has joined #lisp
<dim> jackdaniel: it embeds a full Xwindow server so I think it might be useful for your tests, and also it comes with unix developer tools and an apt-get command, so, it might help…
<makomo> i need advice regarding a DSL. i've written it up here as a comment, with an example of the DSL below: http://plaster.tymoon.eu/view/917#917
<makomo> i didn't want to paste a wall of text into #lisp
<dim> I'm not sure how much you would improve towards a typical windows user, but if you manage to reduce your environement dependencies to a single app that'd not be too bad
<makomo> any suggestions welcome
<shka_> makomo: there is one trick that really helps when writing extendable macros
<shka_> namely fact that defmethod something (symbol (eql 'something))
fikka has quit [Ping timeout: 252 seconds]
<oni-on-ion> makomo: why (wait :for) , (wait-for ) ?
<makomo> oni-on-ion: it can take additional keywords, such as :on and :until
trittweiler has quit [Ping timeout: 240 seconds]
<makomo> just like VHDL's wait statement
<makomo> the point is to make it resemble VHDL as close as possible
<oni-on-ion> ah ok
<makomo> shka_: that's a good point, but it's not directly related to the issue i have
<shka_> makomo: anyway, there are multiple ways to handle this
<makomo> even if i did use methods for that (instead for example, FUNCALL-ing and creating the functions myself), i still need to use the process' body to create this function
<shka_> one option for instance is to minimize the usage of macros
<makomo> and the process' body isn't valid Lisp code right away. it requires some analysis to inject proper LETs and such
<shka_> turn <- into normal function
<shka_> turn wait into normal function
<makomo> shka_: right now it's a normal function. <- being a macro is just one proposed solution
<makomo> wait is also a normal function
<shka_> makomo: well, i like it this way :-)
gravicappa has joined #lisp
<makomo> well, i do too :-), but i need a way to walk the :process bodies and find all of the signals (<- **HERE** <expr>)
<makomo> the syntax is (<- <signal> <value>)
<makomo> i need to gather all of these <signal>s
<shka_> ok
<makomo> which are symbols at the point of defining the component
<shka_> what about :signals ?
<shka_> you have this already
<makomo> but since :process is arbitrary Lisp code, i want to properly walk it
<makomo> :signals are internal signals of the component. the thing i'm looking for is finding "drivers"
<makomo> a single process will drive zero or more of these internal signals
<makomo> if a process ever assigns to an internal signal, it counts as a driver for that signal
<makomo> and that's something i have to discover before starting the simulation
<shka_> ok, so <- is special, right?
<shka_> and by that i mean that it is core element of the system and therefore magical
<makomo> yeah. the fact that these are implemented as Lisp functions internally doesn't mean anything
<makomo> all of these are just this DSL's primitives
<shka_> including wait?
<shka_> i mean, can i have anything there that is not a primitive?
<makomo> well actually, i'm not so sure i can go about it that opaquely. the :process' body is arbitrary Lisp code
<makomo> yeah, you can use arbitrary Lisp code
<makomo> so, (when (rise clock) (<- a 1))
<makomo> for example
<shka_> ok
vlatkoB has quit [Remote host closed the connection]
<makomo> because this process attempts to assign to A (even if it never does so within an actual simulation), it counts as a driver for A
lavaflow_ is now known as lavaflow
<makomo> the problem is finding all of these "calls" to <-
<shka_> yes
<makomo> i'm not sure how to do that. either a code walker or making <- a macro and doing it at macroexpansion time (and also arranging for <- to be macroexpanded in the first place)
<shka_> makomo: side effects alowed?
<shka_> *allowed
<shka_> code walkers… don't even bother
<shka_> they are to hard to get things right
<makomo> shka_: they are, since there isn't really a way for me to restrict that. the DSL assumes that a :process' body will be "well behaved"
<shka_> what does it mean, though
<makomo> since the bodies are arbitrary Lisp code, you can do whatever you want
<shka_> ok
<makomo> you can crash the simulation by signaling an error for example
<shka_> so no evaluating
<makomo> but this is something i don't care about, because the alternative is writing my own language from scratch
<shka_> eh, ok
eschatologist has quit [Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in]
<makomo> no, it is evaluated and who knows what happens. the condition bubbles up the simulator and aborts it
<shka_> let me check my idea
<shka_> i may be on something
<makomo> i could also modify the simulator's internals within a process for example, which is also insane
<_death> using a code walker can make sense.. but even a dumb tree walker approximation may work for a POC
<makomo> i'm relying on the user of this DSL to not be an "idiot"
eschatologist has joined #lisp
<makomo> _death: eventually i want to introduce helper macros and such for patterns that arise in VHDL itself
<makomo> if these macros use <- under the hood, i need to know about it
fikka has joined #lisp
<makomo> so it's as complex as Common Lisp itself. that's why i need a code walker to do it properly
<_death> right.. I learned about agnostic-lizard during ELS, and the code looked nice, may want to check it out
<makomo> _death: i've heard about it as well (and skimmed the video), but didn't use it yet
<makomo> i want to see whether what others think about this design (i.e. does it make sense)
<makomo> and also, is the macroexpansion solution worth it
<shka_> eh
<makomo> s/whether//
<shka_> i had idea
cyraxjoe has quit [Remote host closed the connection]
<shka_> and kinda could work but it is ugly as hell
zigpaw has quit [Remote host closed the connection]
zigpaw has joined #lisp
<makomo> shka_: yeah?
<shka_> basicly build lambda form with whole body + macrolet for <- that basicly signals symbol passed as first argument, then call compile on it
<makomo> yeah, that's almost the same as the macroexpansion solution, except you avoid the manual call to COMPILE
lavaflow has quit [Read error: No route to host]
martinium has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
<shka_> yes
<shka_> and not really suitable
<shka_> sadly i think you will have to go with code walker
<makomo> shka_: i'll already have to do something like that for these internal signals though
<shka_> personally i would require user to supply list of signals
<makomo> see how there are no LETs within the process? it's implicit that the process can access the local :signals of the component
lavaflow has joined #lisp
<makomo> i'll have to "inject" these into this body before COMPILE-ing it
<makomo> shka_: yeah, that's an option, but then it puts burden on the user
<shka_> i know
<shka_> but then nothing can go wrong
<makomo> if you ever change the body of the process, you need to fix up that list too :(
<shka_> oh, wait
<shka_> there is yet another ugly option
<shka_> reader macro ;]
<makomo> ugh :-D. how?
spm_ has quit [Remote host closed the connection]
<makomo> shka_: another reason why i want the process' bodies to be arbitrary lisp code is for various reporting functionality and interaction with the simulator itself
<shka_> well, instead of (defcomponent you will be writtin something like #0(defcomponent
cage_ has quit [Quit: Leaving]
<shka_> and instead of (<- a 1) something like #1(<- a 1)
<makomo> for example, you could imagine a "debugging protocol" that a component could support and implement, that would allow one to debug the defined component
<shka_> well, not that
<shka_> because numbers are already taken
<shka_> but honestly, it does not seems to be a good idea
<pjb> #1(<- a 1) #| ERROR: Array index 1 out of bounds for #(<-) . |#
<shka_> pjb: yes
<pjb> the number in #( specify the length of the vector!
<shka_> yes
<shka_> as i said, numbers are already taken ;]
<makomo> mhm
<makomo> welp, ugly :-)
<shka_> makomo: don't do that, though, it is stupid
<makomo> yeah, i don't like it either
<shka_> i guess code walker it is
<makomo> *gulp*
<makomo> hm, but the code walker will probably yell at me if i try to walk the incomplete body (as its specified by the user), right?
<makomo> for example, calling (<- a 1) without A ever appearing anywhere
nika has quit [Quit: Leaving...]
<makomo> so i would have to generate the whole body before i can walk it (which isn't an issue, i think; just mentioning it)
<Xof> it depends what you want from it
<makomo> it's*
<makomo> Xof: do you know if sb-walker could list all of the function calls within a body?
<makomo> i turned to sb-walker first just because i read christophe's post about it
<Xof> well, for example, in (<- a 1), with a free, you don't know the answer yet
<makomo> ideally i would use something portable (although that's hard to achieve for a code walker), but as an initial iplementation, an internal code walker would do as well (sb-walker is the easiest to get)
<Xof> because a might be a symbol-macro for (foo b c)
<pfdietz> shka_: thank you for that. There's an issue in Waters' COVER package that might solve (how to get from macroexpanded code back a representation of the source code it came from, to produce useful output). COVER's solution is a bit of a hack that isn't compatible with some macros, like ITERATE.
<Xof> so, yes, it's more likely to be useful to walk a completeish form
<Bike> is there a spec or CDR or something for package local nicknames?
<makomo> Xof: right
<shka_> pfdietz: not sure what i did, but if i helped that's awesome
<pjb> Bike: there are several things. There's the documentation of Allegro.
<pfdietz> The link you just gave.
<shka_> ah
<shka_> ok
<shka_> anyway
fikka has joined #lisp
<shka_> it is ironic that it is easier nowadays to read lisp code from stream or string, use eclector.concrete-syntax-tree and walk that then actually deal with lists
<Xof> bah, no easy paste service these days
<Bike> i use pastebin for web and ix.io for term
<pjb> Xof: gists.github.com
dyelar has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 252 seconds]
<scymtym> Bike: it's a spec but there is also http://www.sbcl.org/manual/index.html#Package_002dLocal-Nicknames
<Bike> yeah, i'm looking at that too. hierarchical names aren't really what i'm going for
<scymtym> pfdietz: what does COVER use to represent the code?
epmor_ has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<pfdietz> Just sexprs. It also produces small structures that get stored in the compiled code (more properly, regenerated at load time using CL's mechanics for that so you aren't clobbering constants values) to record when parts are visited.
<pfdietz> These points are linked into a tree.
<shka_> what is COVER?
<pfdietz> Richard Waters' portable CL coverage package. It records what part of your code you've executed.
<shka_> oh
<shka_> this sounds useful
<pfdietz> SBCL has an internal coverage system, sb-cover, but it is of course not portable.
<shka_> is it in quicklisp?
<pfdietz> No.
<shka_> sb-cover... never used it
<shka_> i certainly should
<shka_> pfdietz: thanks!
<pfdietz> It should be, but I think there may be portability issues? Was thinking of uploading it to github anyway (I think it's off on an ancient CMU lisp archive site.)
<shka_> well, good software should not die!
fikka has quit [Ping timeout: 272 seconds]
<pfdietz> At one point I modified COVER for my own use to allow some extensions, like recording of coverage information in a file (so it could be combined from separate test runs) and checkpoint/rollback of coverage (useful for minimizing test cases under the constraint they still increase coverage.)
<scymtym> pfdietz: interesting. i would love to look at COVER's code
<scymtym> thanks
<pfdietz> Note that it doesn't instrument methods! It's visibly old school.
<pfdietz> (it can be extended to though)
<scymtym> eclector and concrete-syntax-tree would probably allow producing sb-cover-style annotated sources as output
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<pfdietz> I produce code as S-exprs, sometimes containing non-printable things.
Roy_Fokker has joined #lisp
lavaflow has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
dyelar has joined #lisp
Lycurgus has joined #lisp
johnjay has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 244 seconds]
pierpa has joined #lisp
<scymtym> ok, that's a different use case
<makomo> Xof: thanks, i'll check it out
<AeroNotix> shka_: I've just started using it. It's great. It has some rough edges, though
<AeroNotix> It requires that you compile your files with certain declaims active and then deactivate those declaims when you want to compile other files.
<aeth> oni-on-ion: #'foo is the function object foo, 'foo looks up foo so if foo is redefined the 'stale' object isn't used.
<AeroNotix> https://github.com/zkat/chanl anyone using this? Any qualms/issues/comments?
fikka has joined #lisp
<AeroNotix> alternatively, a recommendation for a Channels/CSP library that's well-tested
<aeth> oni-on-ion: (defun foo () (print "Hello")) (defun bar (f) (funcall f)) (let ((a (vector #'foo 'foo))) (bar (aref a 0)) (defun foo () (print "Goodbye")) (bar (aref a 0)) (bar (aref a 1)))
sunwukong has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
papachan has joined #lisp
fikka has joined #lisp
shka_ has quit [Ping timeout: 246 seconds]
<oni-on-ion> aeth: so #' kinda unfolds into a lambda ? ie the direct function value object?
<oni-on-ion> AeroNotix: i've used something similar in haskell
fikka has quit [Ping timeout: 252 seconds]
<aeth> oni-on-ion: I don't want to say something incorrect, and there are test cases I wrote where even #'foo uses the redefined function (at least in SBCL), such as directly binding #'foo in the let instead of placing it in a vector
<aeth> i.e. (defun foo () (print "Hello")) (defun bar (f) (funcall f)) (let ((f1 #'foo) (f2 'foo)) (bar f1) (defun foo () (print "Goodbye")) (bar f1) (bar f2))
<AeroNotix> oni-on-ion: well I want it it in CL :)
fikka has joined #lisp
<aeth> Is there a way to check that object foo implements a method for the generic function quux? More concretely, I have an unwind-protect that is supposed to clean up all of the foreign OpenGL data at the end of the program. This actually would be a good candidate for a generic (and performance is not absolutely an issue since it's run once, at the end).
<Bike> objects don't implement methods.
<Bike> You can look up whether a generic function has an applicable method for a given class.
<aeth> Bike: Sorry, that a method is defined for an object
<Bike> clhs compute-applicable-methods
<Bike> mop compute-applicable-methods-using-classes
johnjay has joined #lisp
<aeth> Bike: I think the user would probably be in for quite a surprise if (cleanup foo) failed because cleanup isn't defined for foo, and it probably would be a good thing to check for before starting instead of letting the user potentially leak memory upon closing the program. (A leak because the REPL will probably keep running.)
<Bike> hm.
<Bike> i'd usually like to avoid relying on that kind of introspection in the middle of a program, but that doesn't seem unreasonable.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<pierpa> why not define cleanup for t?
fikka has quit [Ping timeout: 246 seconds]
<Bike> because that method couldn't actually do any cleanup, not knowing anything about the object
<Bike> i assume.
<pierpa> cleanup for t would be a default, which of course does nothing
<Bike> Right, but then there's still a leak.
<aeth> pierpa: Even if I made it (error "You need a cleanup") instead of doing nothing, it would still be bad here.
<pierpa> ok. I have not followed the previous conversation, so I'm missing the context...
nirved has quit [Quit: Leaving]
<pierpa> nvm
<Bike> oh, and you should note that compute-applicable-methods is probably going to be pretty slow.
<oni-on-ion> AeroNotix: yes, i know. i assumed you asked because of what the library is for,not that just because its a lisp library.
<aeth> pierpa: This is a window object. It is, ideally, run in a with-window or something along those lines, that ultimately has an unwind-protect that calls (cleanup-gl-data gl-data)
<oni-on-ion> AeroNotix: so if you needed help with how it works and concepts behind it and whatever. no worries
<oni-on-ion> window run with with-window ? wwwwhat
<aeth> pierpa: That's an unnecessary dependency on my gl-data object for something that's incredibly general
<aeth> I could replace it with a cleanup generic, where there's a cleanup method implemented for gl-data. Then gl-data depends on window instead of window depending on gl-data
<pierpa> hmmm
<aeth> But if you pass in something else (vk-data?) that doesn't have CLEANUP, it will leak memory
<aeth> (This is for 3D games. You're always going to have foreign data to cleanup. The options are essentially OpenGL, Vulkan, DirectX, etc. And if one day you don't need to do this, you can just make it a no-op safely.)
scymtym has quit [Ping timeout: 250 seconds]
<AeroNotix> oni-on-ion: ...
<aeth> pierpa, Bike: Generally, I try to get an error early, when it's still entirely in CL, before the CFFI complicates things.
<aeth> I guess I could make it (defgeneric cleanup (object &key actually-do-something-p)) but that seems like a big hack
pfdietz has quit [Ping timeout: 244 seconds]
lavaflow has joined #lisp
gravicappa has quit [Ping timeout: 240 seconds]
laqq3 has quit [Quit: Leaving]
lavaflow has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
nckx has quit [Quit: Updating my GNU GuixSD server — gnu.org/s/guix]
fikka has quit [Ping timeout: 240 seconds]
aindilis has quit [Read error: Connection reset by peer]
nckx has joined #lisp
fikka has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 252 seconds]
scymtym has joined #lisp
bradcomp has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
jkordani_ has joined #lisp
fikka has joined #lisp
jkordani has quit [Ping timeout: 240 seconds]
pfdietz has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
mindCrime has quit [Ping timeout: 240 seconds]
LiamH has quit [Quit: Leaving.]
Bike has quit [Ping timeout: 252 seconds]
martinium has quit [Quit: Leaving]
<no-defun-allowed> Good morning everyone!
<oni-on-ion> hi gm
Denommus has quit [Ping timeout: 245 seconds]
razzy has quit [Ping timeout: 244 seconds]
Lycurgus has quit [Quit: Exeunt]
acolarh has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
lavaflow has joined #lisp
acolarh has joined #lisp
sunwukong has quit [Ping timeout: 252 seconds]
varjag has quit [Ping timeout: 244 seconds]
_whitelogger has joined #lisp
cgay has quit [Ping timeout: 245 seconds]
varjag has joined #lisp
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
varjag has quit [Ping timeout: 246 seconds]
cgay has joined #lisp
<drmeister> Folks, recently sbcl shebang scripts stopped working for me. I wonder if a kind soul with a few minutes could test something on their system.
<drmeister> I have sbcl 1.4.10 on macOS installed using brew.
<drmeister> The script and what I get on my system is below.
<oni-on-ion> i am at 1.4.11 debian and will try
<oni-on-ion> øeww
<drmeister> oni-on-ion: Thank you very much.
Bike has joined #lisp
<oni-on-ion> i have no mouse so i cannot copy that to a file, sorry
<oni-on-ion> it is too much to swithc workspace and type a few chars. had to do that with URL, sorry i am a bit disabled computer user =)
<Xach> drmeister: strange
<AeroNotix> drmeister: works here on linux+sbcl 1.4.10
<AeroNotix> drmeister: when you say "stop working" what's happening instead?
<j`ey> there is an error in the pastebin
<Bike> the paste has output
<Colleen> Bike: drmeister said 51 minutes, 39 seconds ago: It just occurred to me - we are also generating a lot of metadata when generating llvm-ir - I wonder if that is costing us a lot of compilation time.
<j`ey> what kind of metadata?
<Xach> drmeister: i will try with local 1.4.10
<AeroNotix> j`ey: derp, thanks
robotoad has quit [Quit: robotoad]
mkolenda has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
epmor_ has joined #lisp
mkolenda has joined #lisp
<drmeister> Hello - had to run an errand.
<drmeister> oni-on-ion: No problem - thank you for trying.
<drmeister> Ok - so something weird is going on on my end - I'll try re-brewing it.
ealfonso has joined #lisp
graphene has quit [Remote host closed the connection]
<no-defun-allowed> Hi drmeister
<drmeister> Hello no-defun-allowed
graphene has joined #lisp
<drmeister> Hmm, I upgraded to 1.4.11 and I noticed that the /usr/local/bin/sbcl was a symlink - so I switched to the direct path...
<drmeister> Still no love from shebang scripts? Am I going mad? Have my years of wild hedonism taken their toll on my mind and my ability to write and execute unix scripts?
<whartung> does sbcl work without the shebang? is shebang any different from sbcl with the code funneled in via stdin? Have you tried that?
<j`ey> what about adding --core ../path
DataLinkDroid has joined #lisp
lavaflow has quit [Ping timeout: 245 seconds]
lavaflow has joined #lisp
<drmeister> No - I still am a rockstar script writer.
<drmeister> sbcl does work without the shebang
fikka has quit [Ping timeout: 245 seconds]
pierpal has quit [Ping timeout: 245 seconds]
<jasom> drmeister: is ttt executable?
<oni-on-ion> no-defun-allowed: hows the lisp?? =)
<drmeister> Ok, mystery solved - brew is doing some crazy sheet
<oni-on-ion> drmeister: surely sbcl manual suggests exactly how you have it
<oni-on-ion> oh=)
igemnace has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
<whartung> so what was the problem?
aindilis has joined #lisp
kdas_ has quit [Remote host closed the connection]
<drmeister> brew puts a shell script that sets the SBCL_SOURCE_ROOT environment variable and then invokes sbcl
kushal has joined #lisp
<whartung> I guess you can’t shebang to a shebang? (I”ve never actually thought about it)
<drmeister> Neither have I - and if I had a virtual grey beard when it comes to scripting.
sz0 has quit [Quit: Connection closed for inactivity]
rumbler31 has quit [Ping timeout: 244 seconds]
gector has quit [Read error: Connection reset by peer]
<whartung> yea
<drmeister> (sigh) and I have a virtual... nevermind
gector has joined #lisp
<drmeister> Ok - well, thank you everyone - now I don't need to rewrite all of my sbcl scripts for profiling
<whartung> \o/
<jasom> drmeister: things like this have caused me to not rely on shebangs at all, but rather use here documents.
<whartung> “here documents"?
<drmeister> Yeah - "here documents"?
<drmeister> Oh - I see. Google for the win.
suskeyhose has quit [Ping timeout: 252 seconds]
<whartung> o
<whartung> instead of #!/path/to/sbcl you do /path/to/sbcl << END_LISP …
<drmeister> I was trying to be fancy and have one shebang script that did everything and then symlinked to the shebang script and it did different things based on what the first argument (program name) was.
<drmeister> Yep - I can kick that idea to the curb.
<jasom> drmeister: you can still do that with here scripts, and you can implement the multi-executable idea in either lisp or sh at your choice
<jasom> s/here scripts/here documents
<drmeister> Here's what I'm trying to accomplish. We use dtrace to profile clasp. I have a script called 'stacks.lisp' that checks the sb-ext:*posix-argv* arguments for the name....
<drmeister> I'll take a look at your link.