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
nullniverse has quit [Remote host closed the connection]
nullniverse has joined #lisp
<Odin-> I don't think that name is usually used, but in JavaScript the term fundamentally means using callbacks from a central control loop.
<fiddlerwoaroof> asdf_asdf_asdf: we probably need more context, but if you want an event loop there are libraries like cl-async
<Odin-> I'm not quite sure what that has to do with Windows' console interface, but I haven't dealt with that ... ever, so that may be my ignorance talking.
<fiddlerwoaroof> However, I suspect that you're misunderstanding how output in common lisp works
<fiddlerwoaroof> By default, it's not like the browser where you position your words in a two-dimensional space.
<fiddlerwoaroof> It's like a typewriter: every call to (format) or (princ) or related functions starts where the last one left off
pierpal has joined #lisp
<fiddlerwoaroof> There are things like cl-charms that give a more webpage-like behavior, if that's what you want
<drdo> There's also IOLib
nirved has quit [Quit: Leaving]
<asdf_asdf_asdf> OK. How shift letter "a" 10px position in right not using this: (defun a() (princ " ") (princ " ") ... (princ "a"))?
<Odin-> You don't.
charh has quit [Read error: Connection reset by peer]
Kaisyu has joined #lisp
<Odin-> The JavaScript system to the console is, appropriately enough, console.
charh has joined #lisp
charh has quit [Read error: Connection reset by peer]
<Odin-> Each console has different ways to do fancy positioning.
<Odin-> And I think CMD.COM has some pretty drastic differences from the VT100-derived interfaces common in the Unix world.
<Odin-> (Also, is it cmd.exe now? I haven't touched on this stuff since the DOS days.)
<asdf_asdf_asdf> I have windows console. And ... I want put letter "a" into position x,y. E.g. x=50, y = 100 using Common Lisp. Probably simple script.
<asdf_asdf_asdf> Yes, cmd.exe.
charh has joined #lisp
<p_l> to do it "right" you would need to read about Windows Console API, then link to it using FFI and call appropriate functions
<Odin-> Well ... I don't know what the situation is on Windows, but doing that kind of thing portably is infamously tricky.
<p_l> or do it the ugly way and print with spaces
charh has quit [Read error: Connection reset by peer]
<p_l> (cl-charms can actually do it for you when coupled with windows-capable ncurses library iirc)
<fiddlerwoaroof> or if you use bash in WSL
<asdf_asdf_asdf> Thanks, so how call function API cmd.exe using Common Lisp. I not want use external packages and libraries. I want standard package Common LIsp. I use SBCL.
<Odin-> asdf_asdf_asdf: One thing to remember about writing JavaScript in the browser is that it has an astonishingly extensive support library for doing stuff with the web, far in excess of what comes with any other programming language.
robotoad has quit [Quit: robotoad]
<fiddlerwoaroof> Yeah, the way you're thinking is not how consoles like cmd.exe work
<asdf_asdf_asdf> So if cmd not, that how call empty window in Windows?
<asdf_asdf_asdf> And in this window put letter "a" on position x, y?
<fiddlerwoaroof> asdf_asdf_asdf: Common Lisp (and python, etc.) aren't really designed to make that easy
<Odin-> There is an API, but that API is part of the _console_, not the programming language.
<fiddlerwoaroof> Does the windows console support pixel offsets? or is it just a grid of characters?
<asdf_asdf_asdf> Probably grid of characters. So i want call window and put letter "a" on position x, y. How do?
<Odin-> The console probably doesn't, but it wouldn't surprise me if they still had DOS-era escapes to CGA and EGA modes...
<fiddlerwoaroof> asdf_asdf_asdf: one thing you can do is, if the screen size is 80x25, print out 2000 characters with the desired characters in the right places
<fiddlerwoaroof> What sort of program are you trying to write, though? This question sounds like you're trying to solve some problem that you aren't telling us about
<fiddlerwoaroof> e.g. it's an XY Problem https://en.wikipedia.org/wiki/XY_problem
robotoad has joined #lisp
<asdf_asdf_asdf> OK. I want offset letter "a" for example 10px in right. In JavaScript i would write this: document.addEventListener('keydown', function () { myobj.style.left = pos+'px'; }, false);.
<Odin-> So you're looking to move the letter around based on input?
<asdf_asdf_asdf> And after press keydown my shape "square" shift place.
xvx has quit [Quit: xvx]
<asdf_asdf_asdf> Odin-, thereabout.
oni-on-ion has quit [Ping timeout: 252 seconds]
<White_Flame> for terminal output, you can look at VT codes, ANSI codes, platform-specific cursor commands, a ncurses library, etc
<White_Flame> all of it is basically sending out magic characters that the terminal interprets
<White_Flame> but in most cases, you're plotting characters at the cursor, and moving the cursor. There is no active scene graph like what the browser supports in the DOM
<Odin-> asdf_asdf_asdf: https://docs.microsoft.com/en-us/windows/console/ is the documentation for the Windows Console APIs.
<Odin-> White_Flame: Have Microsoft started supporting escape sequences?
<White_Flame> I remember ANSI.SYS from back in the DOS days
<White_Flame> I really have no idea what the specifics are nowadays
<Odin-> Yeah, but I think they dropped that in NT.
<p_l> Windows 10 in recent enough version (1803?) has new Console API designed for interaction with more termios-like programs
<Odin-> For how much Unix is a horrifying accumulation of "it kinda works, go with it", Windows manages to outpace it on that front by a staggering amount.
<White_Flame> looks like the API linked above does drill down into a notion of ScreenBuffers which hold a 2d array of chars & attributes that you can set, as opposed to just sending magic bytes via an I/O stream
<asdf_asdf_asdf> How Lisp communicate with Windows API?
<Odin-> asdf_asdf_asdf: Intermittently.
<p_l> White_Flame: because unlike serial terminal, you interact with what is essentially a text-oriented gui window
<White_Flame> asdf_asdf_asdf: Lisp grew up as an all-encompassing environment. Connecting to platform specifics outside is a more intermediate/advanced topic that doesn't sound that appropriate yet
<asdf_asdf_asdf> How connect my script with GUI empty window in Windows? This question, which I don't know probabaly.
<Odin-> White_Flame: The magic bytes thing is really a byproduct of Unix treating just about _everything_ as a sequence of bytes with hardly any structure.
<White_Flame> asdf_asdf_asdf: sort of like asking "How can the browser communicate with Windows API?" It would require plugins and whatnot
<White_Flame> in the Lisp world, and most programmign languages, it's FFI (foreign function interface) which marshalls datatypes between languages and differing call semantics
<White_Flame> however, there are existing bindings for tk, gtk, etc+ etc
<asdf_asdf_asdf> Sorry for questions.
<White_Flame> and of course, hosting a httpd to put your GUI in a web browser
<White_Flame> but stuff is going to trend towards platform-independent systems, not hitting Win APIs or Linux syscalls or whatever directly
Oladon has joined #lisp
<Odin-> asdf_asdf_asdf: The questions are fine, but sometimes the answers can be hard. :)
<Odin-> White_Flame: Using the web and JavaScript as a GUI always reminds me of the NeWS design.
<White_Flame> Odin-: it's my most commonly used lisp GUI
<Odin-> PostScript for GUI, backend in anything.
<p_l> Odin-: except NeWS was much better designed for that :)
<White_Flame> asdf_asdf_asdf: https://cliki.net/GUI
Oladon has quit [Read error: Connection reset by peer]
<Odin-> p_l: It was actually designed _for_ that, rather than falling accidentally into it, so, yeah, obviously. :p
<White_Flame> asdf_asdf_asdf: I haven't used any of those, but you might find something familiar in there. wxwidgets and gtk might be some of the more up to date toolkits
<p_l> Odin-: and had good bidirectional communication path as well as options for memory mapping :)
<White_Flame> and clim is a lisp-native GUI
<Odin-> p_l: To continue a theme, for as much as Windows is a horrifying aggregation of historical mishaps and madness, the web is just ... yigh.
<White_Flame> it's not that bad if you expect and up to date browser and ignore everything else
<p_l> Odin-: windows... has a lot of that. And a lot more of "we need to support utterly idiotic programmers worldwide"
<White_Flame> it has really nice font rendering and is truly declarative, which is nice
Oladon has joined #lisp
<Odin-> I'm not dissing any of it.
<p_l> White_Flame: then you end up on a job in 2013 where the target platform is IE7 on XP
<White_Flame> it's about the most dynamic GUI environment I've used
<White_Flame> but yeah, warts galore :)
<fiddlerwoaroof> honestly, GUI anything is pretty horrible today
<Odin-> Dive into Unix systems and they are a _mess_.
<White_Flame> p_l: up to date _standards_ I shoudl say ;)
<fiddlerwoaroof> You get to choose between GUIs jammed into a format designed for writing documents (e.g. web applications) or various piles of hacks that use OS apis
<White_Flame> newer html/css has finally implemented actual GUI-style layout grids and other non-document-flow things
<fiddlerwoaroof> And then all the nice systems (e.g. display postscript) have either died or need quite a bit of work to run natively anywhere besides linux
<Odin-> fiddlerwoaroof: With the added horror that with all the GUI-related stuff they've been adding, it's hardly usable for documents anymore. 8)
<p_l> White_Flame: in the code for that project I found random scripts downloaded from Geocities targeting Netscape 4 and IE4 ....
<White_Flame> heh
<fiddlerwoaroof> Yeah, but CSS grid and flexbox follow the javascript maxim of "never standardize a feature without at least one major footgun"
<p_l> Odin-: sometimes people get hit with stuff that is heavy on the W3C document-oriented standards... and it's "huh, you can publish things like that???"
<fiddlerwoaroof> They make certain things really easy and other things impossible
<p_l> fiddlerwoaroof: fun fact - you can't implement modern HTML without JS
<fiddlerwoaroof> Because of web components?
<fiddlerwoaroof> All this being said, CAPI is the least bad cross-platform gui library I've seen
<Odin-> Is there a specific reason, or is it because the specs are so ridiculously intertwined?
<fiddlerwoaroof> If you're willing to pay $$$$ to use it
<p_l> Odin-: significant portions of the stuff are defined in terms of JS
<fiddlerwoaroof> Odin-: well, the web component standards allow javascript to define the behavior of HTML elements
<Odin-> HTML being specified in terms of DOM, which is basically specced in JavaScript, et cetera.
<fiddlerwoaroof> The DOM api (at least the older bits of it) are reasonably cross-platform
<Odin-> Sure, but it's specced around JavaScript.
<White_Flame> purely visual behavior is more and more shoved into CSS nowdays
<fiddlerwoaroof> CSS is actually pretty nice
<p_l> idea is
<p_l> practice... isn't
<Odin-> Yeah, and CSS acts on the DOM.
asdf_asdf_asdf has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<White_Flame> regarding CAPI, has anybody bothered reimplementing it for non-lw?
<White_Flame> if it really is a better model, that would be expected
<Odin-> History says otherwise, frankly.
<fiddlerwoaroof> It's not exactly a better model
<fiddlerwoaroof> It's just implemented in terms of the native os guis and it's easy to abstract over
<jcowan> The Web is perfectly usable for documents. 90% of my interactions with it are with the document web.
Kundry_Wag has quit [Ping timeout: 246 seconds]
<Odin-> Something like the web model would be a good solution. You know, if it was properly designed for the role, with proper communications channels available right from the start. *cough*
<fiddlerwoaroof> Yeah, as a "better man page", the web is pretty great
<fiddlerwoaroof> And, for all its fault, CSS isn't horrible
<p_l> White_Flame: the issue is that project like CAPI requires significant time investment to handle not just the 80% that one needs for current project
<p_l> and on multiple platforms
<fiddlerwoaroof> Does anyone happen to know why lispworks and allegro both abandoned CLIM?
<White_Flame> maybe because it was never really truly finished?
<fiddlerwoaroof> but they put a bunch of work into CAPI and Common Graphics
<Odin-> jcowan: I was exaggerating for effect, although I'd also note that HTML doesn't seem to be anyone's choice of authoring format.
<p_l> it was finished, but it kinda lost client's interest
<Odin-> Vendor distinction?
lnostdal has quit [Read error: Connection reset by peer]
<p_l> that is, CLIM is very interesting system but also totally alien to pretty much all systems (curiously enough it might look the least weird in classic X11 environment and among software from such era)
<p_l> and what clients wanted was native-like GUIs
<Odin-> CLIM is designed for people who are used to living inside the REPL.
<White_Flame> from what little I've heard of it, CLIM might be more akin to HTML than anything else
<Odin-> Is what it's always looked like to me.
<White_Flame> given that the objects it renders are more "live" from a programmign perspective
<Odin-> Speaking of the web as a GUI paradigm.
<Odin-> GitHub's Atom.
lnostdal has joined #lisp
<p_l> Odin-: which IMO is pretty good example of how bad web as GUI is ;)
<p_l> VSCode is an example of what can you do if the people you send to chisel in shit are masterclass
<Odin-> p_l: I was surprised by how usable it seems to be as an editor, but holy crap is that thing insane in so many ways.
<p_l> Odin-: VSCode or Atom?
<p_l> I remember trying Atom for the first time
<Odin-> Atom.
<p_l> brought me a ton of laughter due to how unusable it was due to performance issues
<p_l> another "great" example of an application that could really use another medium - Slack
<p_l> hell, JavaFX might have been much better idea
<Odin-> Yeah, see, I ran it on an Core i7 with 32G RAM.
<Odin-> :)
<p_l> C2D T5200 at the time, I think
<Odin-> Approximately 300 MiB of memory in order to run an editor, though.
<Odin-> And I know people who use Atom who ten years ago mentioned memory use as a reason not to use emacs.
<p_l> Odin-: Atom is less egregious than Slack, but I'd still consider it part of EGACS class :)
<Odin-> EGACS?
<p_l> Eight Gigabytes And Constantly Swapping
<Odin-> lol
<Odin-> Yeah, true.
dale has quit [Quit: dale]
xificurC has joined #lisp
* jcowan laughs
<White_Flame> I think that any new GUI system should also offer backends for VNC server and web-hosted
<jcowan> I am an `ex` troglodyte, to be sure
<White_Flame> hmm, nah, VNC is kind of redundant, as something still needs to convert GUI elements ot pixels
<White_Flame> but web-based would be nice for remote GUI use at an application level
<fiddlerwoaroof> Oh, maybe Pharo Smalltalk's morphic system could be good if they stopped pretending to be a vm
<fiddlerwoaroof> (i.e. drop the fake desktop and integrate the host-sytems windowing
<fiddlerwoaroof> Anyways, I'm hoping to eventually making a native-ish mac backend for clim
<White_Flame> yeah, I did a couple of fake desktop multi-window systems in my early programming, and it is Not A Good Idea™
<fiddlerwoaroof> The screenshots I've seen of Ambrai smalltalk looked beautiful
* Odin- keeps coming back to the REPL and emacs as hands-on the best UIs he's used.
<Odin-> But I'm just crazy that way.
<fiddlerwoaroof> For the moment.
<Odin-> Well, there was that year I was running BeOS.
<fiddlerwoaroof> The little experiments I've done with mcclim are enough to convince me that it would be much nicer than emacs
<fiddlerwoaroof> Hmm, I bet Racket has a nice gui library
<fiddlerwoaroof> DrRacket is implemented in a cross-platform layer, I believe
<LdBeth> GTK
<LdBeth> which I just dont really like
<fiddlerwoaroof> No, it uses native apis
<fiddlerwoaroof> Cocoa on mac, etc.
<White_Flame> ugh, reading the CAPI docs, they specifically declare coordinates are integers. That's not a good sign
Mr-Potter has quit [Read error: Connection reset by peer]
<LdBeth> well, you can't divide into pixels
<White_Flame> yes you can, especially when dealing with rotated/transformed placements and vector drawing objects
jochens has joined #lisp
<LdBeth> Thst's the issue of anti aliasing, i guess
<White_Flame> and simple line drawing
<White_Flame> it really sucks when line segment endpoints are always snapped to integers
<White_Flame> even without antialiasing
<White_Flame> you get that PSX-style distortion of everythign
<fiddlerwoaroof> Isn't that assuming that the grid is fairly low resolution?
<White_Flame> if you can see pixels, it's an issue
ryan_vw has joined #lisp
charh has joined #lisp
rumbler31 has joined #lisp
<fiddlerwoaroof> Are the coordinates specified to be pixels? I haven't really looked at the drawing apis
<White_Flame> the more I think about GUIs, the more I just want to defer all the fiddly bits to HTML. It takes care of transforming anything, animating anything, antialiasing anything, and tries to make it fast.
<White_Flame> and has nice font support and text flowing
<White_Flame> so certainly it's a black box that can have a better abstraction added on top
jochens has quit [Ping timeout: 252 seconds]
<fiddlerwoaroof> I dunno, the layout models are pretty horrible
<White_Flame> those can be abstracted
<White_Flame> whiel still taking advantage of combining text/gfx/flow when needed
<fiddlerwoaroof> Sure, but at some point you're just standing on top of a teetering pile of junk
<LdBeth> And they do typesetting from CSS and HTML
rumbler31 has quit [Ping timeout: 246 seconds]
<White_Flame> fiddlerwoaroof: it's not a stability issue, and it does pull off dynamic layout better than anything else in terms of flexibility and options
<fiddlerwoaroof> Maybe on non-mac platforms
<White_Flame> is firefox/chrome unstable on mac?
<fiddlerwoaroof> It's not stability, strictly speaking, it's that you need 16GB of memory to run a modern web browser
elderK has joined #lisp
<White_Flame> with lots of tabs, yes, but that's the cost of having truly flexible, dynamic, fast (for what it does), and high quality layout/text/vector rendering
<White_Flame> without _me_ having to implement it :)
<p_l> White_Flame: pretty sure the underlying APIs CAPI uses also use integers
<White_Flame> (at the pixel or raw layout level)
<Odin-> High quality is debatable.
<fiddlerwoaroof> Know, it's the cost of implementing things like privilege separation 5 or six times between the application and the cpu
<fiddlerwoaroof> Also, on macs at least, you can't see the pixels
<Odin-> Wasn't the rendering stuff on contemporary macs built on top of PDF in some fashion?
<fiddlerwoaroof> ... I can't type: Chrome's memory usage is the cost of the nested runtimes that come between your web app (each of which looks however it wants to, with no regard for what the user wants it to look like) and the cpu
<fiddlerwoaroof> Odin-: Yeah, Quartz is based on PDF
<fiddlerwoaroof> So, the drawing is resolution-independent
<Odin-> Funny how PostScript is _still_ underneath the best GUIs we have...
<Odin-> Almost like they did something right there. :p
<fiddlerwoaroof> I'm not sure that's exactly true
<p_l> PDF uses different, though related, drawing model from PostScript
<LdBeth> ^ PS is not PDF
<p_l> you can get pretty much same features using cairo
<fiddlerwoaroof> Yeah, Apple didn't want to license display postscript, if I remember correctly
<Odin-> Hm. I was under the impression it used the same drawing model, but dropped the Turing-completeness.
<White_Flame> Odin-: I need to look into display postscript and how it dealt with dynamic changes. I have done a lot of postscript as a programming language and static 2d printing, however
<Odin-> But I may well have been wrong.
<p_l> fiddlerwoaroof: they found the cost too high back in the yellowbox era, then later they dropped yellowbox after having redone the graphics layer anyway
<p_l> White_Flame: NeWS and DPS are two different beasts, though
<White_Flame> and regarding memory footprint, certainly using blink/gecko/etc should be lighter than the full browser
<p_l> and DPS afaik was much inferior
<White_Flame> ok
<Odin-> White_Flame: Not by too much. The web platform isn't particularly modular.
<White_Flame> it would be without the JS library
<White_Flame> and all the browser extension/caching stuff
<LdBeth> In the old days when the bandwidth was low they preferred to transmit drawing algorithms rather data structures to drawing clients
<p_l> White_Flame: you can't build gecko/blink without JS
<White_Flame> hmm, ok
<White_Flame> haven't gone down that route yet
<fiddlerwoaroof> White_Flame: maybe if you excluded javascript you could reduce the footprint, but spinning up a simple webkit app takes like 4G memory
<Odin-> White_Flame: Yeah, but the rendering is entirely dependent on DOM, which is deeply linked with JS, so you can't really get it out of there.
<fiddlerwoaroof> It's basically why electron is soo horrible
<p_l> fiddlerwoaroof: electron pretty much launches a whole chrome
<p_l> and if you are shitty dev (*ahem*Slack*ahem*) you spin multiple chromes
<Odin-> Electron is fine if you have three times the memory you have anything to do with.
<fiddlerwoaroof> Yeah, but when I've experimented to just launch a simple web-view, the memory cost was still pretty high
<fiddlerwoaroof> it's been a while, but I pygtk app that contains a webkit pane took 1-4G memory last I checked
<fiddlerwoaroof> Similarly too for Cocoa with a webview
[X-Scale] has joined #lisp
X-Scale has quit [Ping timeout: 252 seconds]
[X-Scale] is now known as X-Scale
<White_Flame> that seems awfully whacked, given that my current FFs & chromiums that are open with lots of stuff are "only" taking a few GBs each
<Odin-> It was in the hundreds of megabytes last time I tried it.
pierpal has quit [Remote host closed the connection]
<White_Flame> right, that sounds a little more in the right ballpar
<White_Flame> +k
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<White_Flame> my running tor browser, which presumably keeps everything in RAM as to not leave traces between identities, is taking 588MB
xificurC has joined #lisp
slyrus1 has quit [Remote host closed the connection]
<LdBeth> GG
milanj has quit [Quit: This computer has gone to sleep]
shaunxcode has joined #lisp
nanoz has joined #lisp
shaunxcode has quit [Remote host closed the connection]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
elfmacs has joined #lisp
SaganMan has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
lnostdal has quit [Ping timeout: 268 seconds]
griddle has joined #lisp
<jcowan> speculative question: what could be done that cannot be (beautifully) done now if dynamic variables were first-class?
esrse has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
esrse has quit [Ping timeout: 260 seconds]
<aeth> jcowan: Do you mean what does CL do with dynamically scoped variables that couldn't otherwise be done in a nice way?
<jcowan> No. I mean that if dynamically bindable objects were first-class rather than being attached permanently to indefinite-scope variables, what could be achieved with this relaxation?
<jcowan> The question is hypothetical
<LdBeth> Nothing
<LdBeth> What static scope do is simply make lisp behaves more close to call bye value lambda calculus
<aeth> ah, sorry, couldn't parse that.
<jcowan> Do you mean that you can't think of anything (neither can I) or that you can show that first-class status would not add either power or expressivity?
<LdBeth> you can use something like gensym to aviod name collision
<LdBeth> and building a more expressive call by name lambda calculus is possible with dynamics scoped lisp, i.e. INTERLISP
terpri has quit [Ping timeout: 252 seconds]
<LdBeth> it just about adding a thing layer of abstraction.
<Bike> jcowan: you can get that by passing around symbols and using symbol-value and progv
<Bike> and nobody does it
<LdBeth> I think the main contribution is it enables to take advantages of some modern compiler techniques
<jcowan> I guess you could proclaim a gensym special with eval
<Bike> you don't need to declare it special at all
<jcowan> clhs progv
parjanya has joined #lisp
dddddd has quit [Read error: Connection reset by peer]
<LdBeth> So people don’t have to spend time on making dynamic scoped language fast
robotoad has quit [Quit: robotoad]
<jcowan> as is the match-if function in https://norvig.com/paip/patmatch.lisp
<jcowan> CLtL says "progv is particularly useful for writing interpreters for languages embedded in Lisp", but presumably this is only true if those language use dynamic binding.
<Bike> or match-if, i gess
parjanya has quit [Read error: Connection reset by peer]
<White_Flame> I don't understand why compile is considered more valid than eval for runtime-generated sexprs
<LdBeth> Because not all implementations compiles when eval
<White_Flame> but still, "eval is bad" doesn't seem to be performance-related
<jcowan> https://codegolf.stackexchange.com/questions/53250/optimizing-ski-compiler is a compiler for SKI machine specifications; the CL version uses progv.
<LdBeth> Eval is good
<White_Flame> obviously, the article is using COMPILE's sexpr->executable facility as its primary feature, which is generally equivalent to EVAL in "wrongness"
<White_Flame> right, I've used eval when building runtime functionality from sexprs
<elderK> Moin all
<LdBeth> Or, reflection is good
<LdBeth> elderK: morning
<jcowan> White_Flame: +1
<LdBeth> But ad hoc is usually considered bad
<jcowan> claiming that `compile` evades the evil of eval is flimsy
robotoad has joined #lisp
<LdBeth> <freenode_jco "claiming that `compile` evades t"> jcowan: you can use closure to avoid compile at run time
scottj has left #lisp [#lisp]
<White_Flame> example?
igemnace has quit [Quit: WeeChat 2.3]
<LdBeth> (lambda (x) (lambda () (something (funcall x)))) etc
<White_Flame> um, what?
<LdBeth> The returned closure is compiled in
<White_Flame> it's not compiled from a sexpr form
<White_Flame> it's all compile-time source code
<LdBeth> Sufficient for languages without eval
<White_Flame> uhhhh
<White_Flame> you're given a query at runtime. You want to compile it to an expression.
<White_Flame> something that will run as natively as compile-time provided source code
<White_Flame> closures won't help
igemnace has joined #lisp
<LdBeth> White_Flame: that’s like... you want to compile a file and of course one cannot avoid doing actual compilation
<LdBeth> Though I mean construct ad hoc functions at runtime
<White_Flame> yeah, if you just mean CPS with your closure above, that's something I've done before
earl-ducaine has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<White_Flame> construct an expression from a set of pre-baked lambdas
<pillton> Expression or closure?
<White_Flame> I mean trace through an AST for an expression, linking up pre-compiled lambdas together with CPS to yield a basic executable form of it
<pillton> If only (compile nil (lambda () ...)) did something.
<White_Flame> right, the above linked "eval is bad" to the same thing that compile does, in turning data into executables
<White_Flame> then an idea of only using closures was presented, but doesn't do the same thing
<LdBeth> Well it’s just happened to be calling a lisp compiler to compile sexps but the principle is the same as calling a C program translate SQL strings to a more compact form
<White_Flame> only if it ends up generating machine code
<White_Flame> depends on if the specific principle distinguishes between software interpreters and compilers :)
<copec> It would be cool to have a distribution of typical results per language...like get the students to all implement one of the problems at the end of an algorithms course or something
<LdBeth> Ah, yes
<LdBeth> And it is interesting to see how the divergence finally get unified
<LdBeth> Does anyone interested in porting a CL to MMIX?
elfmacs has quit [Ping timeout: 272 seconds]
<elderK> Guys, I need help naming something :)
<elderK> I'm writing my own binary-structure kinda thing. Mostly for fun, but also because I found some deficiencies in other ones.
<elderK> Anyway, you have some "binary type", which is like a primitive type that can be extracted or read.
<elderK> Hahahaha
<elderK> I wish
<LdBeth> binary header?
<elderK> Anywho, The "primitive type" could be anything, say, u128/be or whatever. I want to have a generic function that computes the "lisp type" of that primitive. So, if I had say, u32, I'd get (unsigned-byte 32)
<elderK> I thought of native-type->lisp-type
<elderK> But that's kind of a shit name
<LdBeth> Binary header encode
<elderK> ?
<elderK> It's not a header, though. It's just some primitive type that can be extracted. LIke an integer or float say.
<LdBeth> numeric class type
<elderK> It could be a string :P
<LdBeth> GG
<elderK> :P Good game? heh
<LdBeth> So any lisp object can by type?
<LdBeth> Cool
<elderK> I think you misunderstand me.
nanoz has quit [Ping timeout: 268 seconds]
<LdBeth> Ah, you say it can be a string, so I thought it can have some other structure as type
<elderK> You can define "binary structures" that will be parsed from disk, say. Like in PCL. Structures have slots that are other "binary structures" or say, "primitive types." These primitive types are things you define - like u32, u16, whatever. PCL does not generate any type information for the "slots." I will. So, given some "primitive type" (not a Lisp type), I need to generate a "Lisp Type."
<elderK> So, an on-disk primitive type of say, uint32 would be mapped to (unsigned-byte 32)
<elderK> What the mapping is, and how to read / write "primitive types" is set by a macro, define-binary-type, to use PCL's name.
<elderK> Maybe just effective-slot-type will do.
<elderK> Another question, is like, what's the deal with error reporting / validation from within macros? say, I want to ensure that someone uses the macros correctly.
edgar-rft has quit [Quit: Leaving]
<pillton> The term, macro, is short for macro function. You can signal errors in macro functions if you like. It is probably best to do so.
<LdBeth> About the other question, unfortunately you have to handwrite checking and error reporting, however it might be time to adopt @beach ‘s concrete-syntax-tree lib which has parser utilities for common macro constructions
<elderK> Thanks :)
Roy_Fokker has quit [Read error: Connection reset by peer]
Bike has quit [Quit: Lost terminal]
vlatkoB has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
shaunxcode has joined #lisp
nullniverse has quit [Ping timeout: 244 seconds]
<aeth> Use check-type, assert, ctypecase/etypecase, ccase/ecase, etc. Even in macros.
<aeth> Also destructuring-bind. That will catch a bunch of syntax errors that you can't express directly in the macro's lambda-list
<aeth> something like this: (dolist (sublist list) (destructuring-bind (foo bar &key baz quux) sublist ...))
<aeth> (obviously it doesn't have to be dolist)
shaunxcode has quit [Ping timeout: 268 seconds]
esrse has joined #lisp
buhman has joined #lisp
<beach> Good morning everyone!
shka_ has joined #lisp
<LdBeth> Good morning
<shka_> LdBeth: good morning
igemnace has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
<zigpaw> morning :)
mingus has quit [Ping timeout: 268 seconds]
pjb has quit [Ping timeout: 252 seconds]
kilimanjaro has quit [Ping timeout: 250 seconds]
rme has quit [Ping timeout: 250 seconds]
jhei has quit [Ping timeout: 250 seconds]
drdo_ has joined #lisp
rme has joined #lisp
Patternmaster has quit [Ping timeout: 260 seconds]
PuercoPop has quit [Ping timeout: 250 seconds]
Kevslinger has quit [Ping timeout: 250 seconds]
mgsk has quit [Ping timeout: 250 seconds]
igemnace has joined #lisp
mgsk has joined #lisp
tfb has quit [Ping timeout: 250 seconds]
splittist has quit [Ping timeout: 250 seconds]
kilimanjaro has joined #lisp
cyraxjoe has quit [Ping timeout: 260 seconds]
PuercoPop has joined #lisp
jhei has joined #lisp
splittist has joined #lisp
dlowe has quit [Ping timeout: 276 seconds]
tfb has joined #lisp
drdo has quit [Ping timeout: 260 seconds]
drdo_ is now known as drdo
cyraxjoe has joined #lisp
dlowe has joined #lisp
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
Inline has quit [Quit: Leaving]
<elderK> Wow, having error checking is kind of hard :D
<elderK> aeth: Any good way to make sure something appears only once in a list?
<shka_> remove-duplicates
<elderK> I'd prefer to say, hey, you can't have this multiple times.
<elderK> Than just, strip out things.
<shka_> walk on list, fill the hashtable while check if element already exist
<shka_> or declare new type with new predicate that does just that and check-type
<shka_> got to go
<shka_> see ya
<LdBeth> There is supposed to have library for these
<White_Flame> if you want to go slow & naive, for each element check (= (count item list) 1)
dale_ has joined #lisp
dale_ is now known as dale
shka_ has quit [Ping timeout: 244 seconds]
elfmacs has joined #lisp
_death has quit [Ping timeout: 246 seconds]
ryan_vw has quit [Ping timeout: 272 seconds]
jack_rabbit_ has joined #lisp
sauvin has joined #lisp
oni-on-ion has joined #lisp
<elderK> Hmm. I'm trying to unquote several levels. It's weird. Saying something like ,,something results in an expansion of ,whatever
<elderK> Rather than just whatever.
jack_rabbit_ is now known as jack_rabbit
<fiddlerwoaroof> elderK: yeah, it can be a bit tricky figuring out where to put the quotes
<fiddlerwoaroof> It's generally a good idea to avoid nested quasiquotation.
<fiddlerwoaroof> One trick that often helps is have your first level of quasiquotation call functions that do the actual parsing/construction of forms.
Elephant454 has left #lisp ["ERC (IRC client for Emacs 26.1)"]
<fiddlerwoaroof> e.g. here I've split the generation of the resulting expression across several functions and let bindings: https://github.com/fiddlerwoaroof/fwoar.lisputils/blob/master/fwoar.lisputils.lisp#L131
JohnMS_WORK has joined #lisp
anewuser has joined #lisp
<elderK> I don't think the way I'm trying this is really working out. I defined a generic function to like, handle the validation and expansion of certain "forms" in my ... macro
<elderK> So if I had a (:reader (something something) body of somethings)
<elderK> A method, expand-specifier would be executed, keyed on the :reader. It'd check the form was sane, then generate the appropriate expansion
ryan_vw has joined #lisp
shka_ has joined #lisp
Zaab1t has joined #lisp
SaganMan has joined #lisp
<SaganMan> Morning beach
<elderK> :( So hard to stay below 80 margin
<shka_> elderK: not THAT hard
<fiddlerwoaroof> hmm, using generic functions inside macros is a bit subtle
scymtym has quit [Ping timeout: 246 seconds]
<fiddlerwoaroof> It works really well, but I've always been a bit concerned about the implications of this bit of the standard: "defmethod is not required to perform any compile-time side effects. In particular, the methods are not installed for invocation during compilation."
<fiddlerwoaroof> clhs defmethod
<fiddlerwoaroof> I believe this essentially means that your defmethods need to be in a different compilation unit from the use sites of the generic function, if you want your code to be portable
<jackdaniel> fiddlerwoaroof: won't putting defmethod in eval-when help?
rumbler31 has joined #lisp
<fiddlerwoaroof> I'm not really sure.
<trittweiler> fiddlerwoaroof, It's just the same as using functions in a macro
<fiddlerwoaroof> I guess that's right, given that defun has a similar statement
rumbler31 has quit [Ping timeout: 250 seconds]
milanj has joined #lisp
ggole has joined #lisp
beach has quit [Ping timeout: 252 seconds]
<no-defun-allowed> why does SBCL have `&rest args` in the lambda list for POSITION? it's not there in the clhs.
robotoad has quit [Quit: robotoad]
<no-defun-allowed> my guess is it eats keywords it doesn't accept, it's present in some other functions too
beach has joined #lisp
ryan_vw has quit [Ping timeout: 250 seconds]
<jackdaniel> it doesn't, try to pass such keyword
<jackdaniel> these lambda lists are congruent
<no-defun-allowed> fair enought then
<jackdaniel> having '&rest args &key …' is useful, when you want to pass args further without extra consing
<no-defun-allowed> right
<jackdaniel> (apply internal-position args)
<no-defun-allowed> so... rest and args will be taken from the same keywords?
<jackdaniel> try it and see (aka tias)
<no-defun-allowed> haha, alright
<no-defun-allowed> yup
<no-defun-allowed> now i realised using lambdas as arguments to a CLOS thing was a Bad Idea and multiple dispatch would have worked better
<no-defun-allowed> or something like that. either way i'm wading through funcalls to fix it now :')
<jackdaniel> you may want to look into filtered-functions (library written by Pascal Costanza)
<shka_> yeah, CLOS is rather useful tool
<shka_> by rather i mean extreamly
Zaab1t has quit [Quit: bye bye friends]
scymtym has joined #lisp
<no-defun-allowed> yep
angavrilov has joined #lisp
frgo has quit [Remote host closed the connection]
beach has quit [Ping timeout: 264 seconds]
nirved has joined #lisp
elfmacs has quit [Ping timeout: 252 seconds]
jochens has joined #lisp
hiroaki has joined #lisp
another-user has joined #lisp
beach has joined #lisp
varjag has joined #lisp
SaganMan has quit [Ping timeout: 246 seconds]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
bendersteed has joined #lisp
<elderK> :( Man I know what I want to do, and what I want to generate. But I'm having a really hard time doing it in a way that I feel comfortable with
hhdave has joined #lisp
<elderK> Out of curiosity, if a macro is exported from a package, and uses some functions that are defined in that package but not exported, will it still expand correctly if you import that macro into another package?
<elderK> Like, the macro is imported. But the things the macro relies on, are "internal" to the package we're importing from.
SaganMan has joined #lisp
<elderK> I get the feeling it is. I'm pretty sure I read somewhere that the stuff that's in effect at the time the macro was defined, is what is used when it is expanded.
<jackdaniel> elderK: it will work just fine
<no-defun-allowed> nice, my code looks better now, thanks CLOS
<elderK> Is it okay to expand to a (progn) in a macro expansion, if say, something is optional and you don't want to include it?
<jackdaniel> you may expand to progn, to nil, to t, it will all work just fine
<elderK> Like say, the macro proper makes a bunch of calls to helper functions, to actually generate expansions. But maybe one such helper detects that an optional element of the macro isn't present. Ah, thanks jackdaniel.
<elderK> So, expanding to nil is okay.
<elderK> Neat.
<elderK> :D
Mr-Potter has joined #lisp
<no-defun-allowed> whatever you can think of you can expand to
wanz has joined #lisp
<fiddlerwoaroof> elderK: expanding to (macrolet (...) ...body) is a pretty useful trick
<no-defun-allowed> with-hash-table-iterator looks nice, but can i use it in a closure?
<elderK> fiddlerwoaroof: Why is that useful? :)
<no-defun-allowed> my reading of the clhs says "no using it outside the dynamic extent" which i think is outside that part of the stack, so "no" but idk
<no-defun-allowed> It Worked Fine In SBCL too
<fiddlerwoaroof> For a lot of places where you would walk the body like a tree, you can just use macrolet to define a local macro that handles the car of the subform you're interested in
<fiddlerwoaroof> And then CL's macroexpander will walk the tree for you.
<shka_> symbol-macrolet is also useful in the same way
<shka_> what you can even do is to generate both flet form and symbol-macrolet that will expand into call
<shka_> you can do quite a lot this way!
<fiddlerwoaroof> Yeah, and turn a nice lisp-2 into an annoying lisp-1
<no-defun-allowed> haha
<shka_> fiddlerwoaroof: not quite
hiroaki has quit [Ping timeout: 272 seconds]
<shka_> it is still lisp-2
heisig has joined #lisp
<fiddlerwoaroof> No, you've just written a compiler for a lisp-1 :)
<shka_> how so?
<fiddlerwoaroof> Macros are mini-compilers
<fiddlerwoaroof> hmm, I guess that's not exactly right
<fiddlerwoaroof> because the forms you don't generate a symbol-macrolet for don't turn into function variables
<shka_> it is not completly different from with-accesors to be honest
<fiddlerwoaroof> yeah
<shka_> i have for instance something i call lazy-let
<shka_> that is macro that expands into let over labels over symbol-macrolet
<shka_> trick is that symbol-macrolet maps to labels, labels ensure that let is initialized and let form store actual value
<elderK> fiddlerwoaroof: I'm not sure I really understand at this point. But it sounds very useful.
<elderK> Gosh, I wonder how long it will take until I feel comfortable :( I guess I'll finish what I'm working on now, it'll probably be pretty horrible. But at least then, I can get feedback and iterate on it
ogamita has joined #lisp
<fiddlerwoaroof> It took me a while to get used to CL
eschatologist has quit [Ping timeout: 264 seconds]
ogamita has quit [Ping timeout: 240 seconds]
elfmacs has joined #lisp
orivej has joined #lisp
ogamita has joined #lisp
makomo has joined #lisp
ogamita has quit [Quit: ERC (IRC client for Emacs 26.1)]
ogamita has joined #lisp
rumbler31 has joined #lisp
emdeesee has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Ping timeout: 260 seconds]
frgo has quit [Remote host closed the connection]
<elderK> Going to take a walk. Hopefully it'll help some things digest :)
frgo has joined #lisp
<elderK> BBL :)
<dim> elderK: well I would say that the point about macrolet usage in macros is pretty advanced stuff, maybe the call-with- trick is a better way to get starting with macros
<oni-on-ion> i am wondering to myself why lisp-1 would be annoying where lisp-2 is nice, because who names functions and variables the same without introducing obfuscation? and is that actually a more frequent requirement than working with functions without special [fun]calls?
<elderK> dim: I'm not sure if what I'm trying to make is considered "more than what a newcomer could do" or not D:
<elderK> Life would be made a lot easier if I used alexandria, but I would like to stick to the core language for now.
<elderK> Anyway, BBL :)
<elderK> Oh, and happy Thursday.
<elderK> :D
<dim> well if you're having to use macros, it qualifies at more than what a newcomer is expected to play with I would gather
<oni-on-ion> ah yes, CL standard and its dependencies on so much non-CL externally.
<fiddlerwoaroof> oni-on-ion: honestly, something like (swap (list) (list* (cadr list) (car list) (cddr list))) reads just fine
<fiddlerwoaroof> For it mirrors noun/verb ambiguity which generally isn't a cause of misunderstanding
<oni-on-ion> fiddlerwoaroof: yep, i've no problem with it
igemnace has quit [Quit: WeeChat 2.3]
<oni-on-ion> but it seems like not a practical ability to have on purpose
jochens has quit [Remote host closed the connection]
<fiddlerwoaroof> A lisp-2 gets an extra bit of error checking
<fiddlerwoaroof> The compiler can check the symbol's function cell to see if a function has been defined
<oni-on-ion> i asked schemers "why is t #t and not t?" and they say "because you might want to call a variable t" . cringe
<oni-on-ion> fiddlerwoaroof: ahhh, i see =)
jochens has joined #lisp
<aeth> oni-on-ion: Implement <insert formula from physics here> and you probably want to use the variable name t
<fiddlerwoaroof> Also, there's plenty of ways to avoid funcall: FLET/LABELS or write a bunch of combinators that take functions and return lambdas
<aeth> oni-on-ion: And even worse, if it's from mathematics closely related to physics, it is just t, it isn't time
<fiddlerwoaroof> The latter can be really clean
<oni-on-ion> aeth: thats a real reason? i use t all the time. but there are other letters. it feels like you could be suggesting "why not have a (varcall x)" then !
frgo has quit [Ping timeout: 268 seconds]
<fiddlerwoaroof> e.g. (funcall (over (juxt #'car #'cadr)) '((1 2 3) (2 3 4))) ;; => '((1 2) (2 3))
<oni-on-ion> or; why are functions especially-accessed instead of variables ? what if it were the other way around?
<oni-on-ion> fiddlerwoaroof: flet/labels - good point
<aeth> oni-on-ion: It's more like if a language used both "pi" and the actual greek letter "π" to mean something unrelated to the constant. I mean, sure, you could call 3.1415... something else, but the clearest name is probably pi.
elfmacs has quit [Ping timeout: 240 seconds]
<aeth> alexandria:lerp uses v but literally all material everywhere else will use t here: https://gitlab.common-lisp.net/alexandria/alexandria/blob/e5c54bc30b0887c237bde2827036d17315f88737/numbers.lisp#L89-100
<fiddlerwoaroof> Anyways, I can say that everytime I write javacript or clojure, I miss lisp-2s
jochens has quit [Ping timeout: 246 seconds]
<aeth> oni-on-ion: t is basically the one place where Scheme has an advantage over CL against name collisions (usually Scheme's the language with the problem there)
<fiddlerwoaroof> Also, a lisp-1 needs a hygenic macrosystem more than a lisp-2, especially if it doesn't also have something like packages
<fiddlerwoaroof> And I've always found "hygenic" macrosystems to be unbearably complicated.
esrse has quit [Ping timeout: 252 seconds]
bendersteed has quit [Read error: Connection reset by peer]
<LdBeth> Because you don’t know pat match
Kaisyu has quit [Quit: Connection closed for inactivity]
<fiddlerwoaroof> I do, I use to work with one of the racket core contributors
NB0X-Matt-CA has quit [Ping timeout: 268 seconds]
<LdBeth> Then you should notice PLT’s macro operates on the “syntax” which automatically provides error checking
NB0X-Matt-CA has joined #lisp
<LdBeth> And also information preserving
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
eschatologist has joined #lisp
<p_l> quarrels regarding which is better/necessary/whatever are older than dirt now
fikka has quit [Ping timeout: 240 seconds]
frgo has joined #lisp
jochens has joined #lisp
frgo has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
JohnMS has joined #lisp
Mr-Potter has quit [Ping timeout: 268 seconds]
JohnMS_WORK has quit [Ping timeout: 272 seconds]
shrdlu68 has joined #lisp
frodef has joined #lisp
<makomo> hello
m00natic has joined #lisp
oni-on-ion has quit [Quit: WeeChat 1.9.1]
xkapastel has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
frgo has joined #lisp
<ski> minion: progv?
<minion> progv: PROGV is a testament to the success of synthetic methamphetamines in the rearing and education of the inveterately brain-damaged contributors to the X3J13 standardisation proceedings
frgo has quit [Ping timeout: 244 seconds]
rumbler31 has joined #lisp
<shka_> that's harsh
<ski> a bit
pierpal has joined #lisp
SaganMan has quit [Ping timeout: 276 seconds]
makomo has quit [Ping timeout: 245 seconds]
rumbler31 has quit [Ping timeout: 252 seconds]
<elderK> Back attack!
frgo has joined #lisp
v0|d has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
frgo has quit [Remote host closed the connection]
<ogamita> Yes, harsh. At least for the California side of the comitee. They learned to use LSD creatively there. To wit, Steve Jobs, etc.
fikka has joined #lisp
frgo has joined #lisp
Zaab1t has joined #lisp
makomo has joined #lisp
Mr-Potter has joined #lisp
wanz has quit [Quit: wanz]
milanj has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
sbenitezb has joined #lisp
sbenitezb has quit [Client Quit]
SaganMan has joined #lisp
larsb has joined #lisp
<larsb> I saw someone called Walex writing about MDL (Muddle) in #lisp.
<larsb> Also dlowe and billstcllair.
<larsb> Just wanted to say we do have Muddle running on ITS on a PDP-10 emulator. Come over to #PDP-10 if you want to know more.
larsb has left #lisp [#lisp]
beach has quit [Ping timeout: 252 seconds]
beach has joined #lisp
robdog has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 260 seconds]
<jcowan> Wow
<jcowan> A more principled Scheme answer would be "Scheme doesn't restrict which identifiers can be lexically bound."
fikka has joined #lisp
rumbler31 has joined #lisp
elfmacs has joined #lisp
confusedwanderer has joined #lisp
rumbler31 has quit [Ping timeout: 252 seconds]
<jebes> looked up progv
<jebes> til...
<jebes> how does ecl and abcl stack up against sbcl/ccl? I've heard ecl talked about favourably here.
<jebes> i've used abcl for interfacing with selenium personally. It seemed quite good
<jackdaniel> jebes: sbcl/ccl are way faster than ecl/abcl
<jackdaniel> but ecl may be used to deploy your library as a shared library (and use it from i.e C application as i.e my-library.so)
<jebes> jackdaniel: so if i was writing a high performance game/code base, the benefit of ecl's c integration might be outweighed by its speed?
<jackdaniel> abcl is good with interacting with java
<jackdaniel> it depends how much you put on CL side
<jackdaniel> also in ECL you may inline C code (like you inline assembly in C code)
Zaab1t has joined #lisp
<jackdaniel> integration-wise ECL is capable of working with android apps (via jni)
<jebes> well, i'll write a simple game to experiment and see which i like
<jackdaniel> you may check out eql5-android for many examples
<jebes> jackdaniel: that may be of use for my freelancing side gigs
<jebes> thanks
<jackdaniel> I'd advise writing portably and measuring things later
<jackdaniel> datapoints: ecl is slow with gf dispatch, we plan to work on it after the upcoming release
<jcowan> Does anyone know how to find the "all issues" page in the clhs, or even if there is such a page? Dr. Google not helpful.
<jackdaniel> it's compilation time is relatively slow
<jebes> how slow
<jebes> are we talking ghc or template heavy c++ with gcc
<jackdaniel> ecl can't save the image (so you don't have save-lisp-and-die, you compile software from files)
<jackdaniel> I don't know how fast / slow is ghc or c++ with gcc. compilation time penalty comes from invoking gcc
<jebes> ah makes sense
<jebes> i'll start with sblc and write portably then
<jackdaniel> it is OK to me, especially that you can cache fas files (asdf does that)
<jackdaniel> good idea
<jebes> but for now, 12 hours of C#
<jackdaniel> you may be interested in talking with dto and borodust on #lispgames (there are others who work with games and lisp, but I know that both worked with multiple cl implementations)
<jebes> joined, thanks
<jebes> i guess i should investigate cffi more
<jackdaniel> make no mistake, reading cffi manual is very useful
<jackdaniel> other place to learn are cffi tests
<jebes> how hard is it to reduce consing in lisp? Is it possible to get it to 0 or close to zero?
<jebes> I know PAIP covered it a bit
<jebes> but my copy is someone elses now
<jackdaniel> it depends on what you work on. paip is available for free on github now
<jackdaniel> released this year
<jebes> oh shit
<jebes> i'll have to re-read it then
anewuser has quit [Ping timeout: 252 seconds]
<borodust> hi jebes, yes, it is possible to make tight game loops non-consing, aeth is one of the masters of such art
<jackdaniel> (one more datapoint: statically-linked application built with ecl when stripped may fit in ~5MB)
<borodust> last time i tried ecl was much slower than sbcl/ccl for my grossly unoptimized games, but aeth had very important suggestion i didn't try out yet that might improve ecl performance - for some reason by default cffi defines very slow method of calling foreign code for ecl
<borodust> i still need to check out that option, but didn't have time to yet
<jackdaniel> you refer to static ffi in ecl
<borodust> well, it was :dffi vs something i don't remember name for
<jackdaniel> it is indeed around 80x faster, but to make it default I need to work a little on passing original pointer declarations
<jackdaniel> (right now cffi, when you declare something to return (char *), passes (void *) downstream to the implementation, what doesn't really work when you compile with C compiler)
<borodust> 80x is quite significant ;p especially for games
<jackdaniel> but lately (a few months ago I think) I've managed to make vaarg calls work OK, so it should be already faster with default being :dlopen now)
<borodust> games, that uses foreign stuff, wich is quite often
<borodust> almost hundred percent, if take cl-opengl into account
<jackdaniel> nope, dlopen is not default yet, probably because of pointers still not being carried correctly
<jackdaniel> either way, this is fixable
<jackdaniel> we just need to talk to drmeister to clone me so I can work on it ^_^
<borodust> jackdaniel: thanks much for the hard work :) gonna check performance a bit later
<borodust> ;p
<jackdaniel> you need to modify cffi::*cffi-ecl-method* to :sffi *before* compilation
<borodust> yup, thanks, i'll try that out
<jackdaniel> but it is not guaranteed to work if you have functions in there which return pointers to something else than void
<jackdaniel> sorry, not :sffi but :c/c++
<borodust> well, that's unfortunate, but we will see :) i think it's all :pointer down the road, which i guess is translated to void* anyway
<drmeister> Hey folks - the talk I gave at the llvm-dev meeting a couple of weeks is up.
<ogamita> jebes: it is a wrong goal to avoid consing.
<ogamita> jebes: for one thing, it is not specified how much consing an implementation may do. So you can find that a set of functions in CL don't cons on one implementation, but cons on another.
<ogamita> jebes: this means that such an "optimization" cannot be portable.
<ogamita> jebes: Then, the main problem is that consing and garbage collecting are not costly operations. It's like fork in unix: they're over optimized by lisp implementations.
<borodust> ogamita: when building games (or end product in general), we don't care about portability often, because we have a privilige to choose an implementation we want to build end-user executable with :)
<ogamita> jebes: So minimising consing means minimising one of the fastest operations of a lisp system, and replacing them by slower operations!
<borodust> that's why we can use sb-cga for example
<ogamita> This is #lisp, not #lispgames
<borodust> ogamita: jebes asked that in the context of making games, if i read correctly
<jebes> indeed i did
<jackdaniel> games written in lisp fit the channel topic perfectly
<ogamita> I'm answering in the context of #lisp, sorry.
<jebes> but ogamita is right for initial testing
<jebes> premature optimization and all that
<jebes> might as well right in assembly :)
<jebes> (which i do like...)
<ogamita> jebes: you may have a look at http://cliki.net/Performance, there are some links about making Lisp faster than C.
jmercouris has joined #lisp
<borodust> jebes: you can write assembly in lisp! ;p see sb-cga which i already mentioned, but please don't :D prematur... well, you know
<jebes> thank you
<jebes> borodust: oh no, this is a terrible power
<jmercouris> is creating a bunch of defgenerics an implication to the users who extend a class that they should probably implement those methods if no default implementation exists?
<ogamita> jebes: one good trick, is to use pre-allocated objects (eg vectors), and upgraded arrays for things like double-float that would require boxing (a kind of consing).
<ogamita> Well don't write assembly in lisp ; GENERATE assembly!
<ogamita> Take a lisp expression, and write a specific compiler generating optimized assembly, knowing your context.
<borodust> jebes: e.g. assembly-in-lisp (sbcl-specific) https://github.com/nikodemus/sb-cga/blob/master/ports/sbcl.lisp#L137-L145
<jebes> i love it
<jebes> it feels so blasphemous
<borodust> we do too :)
<jmercouris> I'm starting to question my usage of SBCL
<ogamita> Yes, the problem with sbcl, is that so many programmers using sbcl don't care about conforming or portability. Of course quicklisp only tests compiling with sbcl. So if you use sbcl, even if you try, you're bound to use sbcl specific libraries and APIs…
milanj has quit [Quit: This computer has gone to sleep]
<jebes> when i write normal non insanity driven lisp, i like to test on multiple implemtatios
<jmercouris> the only solution is to pull in as few dependencies as possible
Bike has joined #lisp
<jmercouris> or those that claim to use ONLY Lisp
<jebes> jmercouris: even then, implementations differ
<borodust> ogamita: well, sb-cga has code for other implementations which makes it portable, it's just helluva lot slower on other ones
<jmercouris> using sbcl specific extensions and making your code non portable should be IMO a crime, unless absolutely necessary
<jebes> jmercouris: for libraries, perhaps
<makomo> jmercouris: i'm thinking the same thing hah. "restricting" yourself to portable CL sometimes feels like you're missing out :D
<makomo> lots of awesome/insane stuff to make use of
<jebes> for applications, it doesn't really matter
<jmercouris> jebes: OR DOES IT?
eschatologist has quit [Ping timeout: 240 seconds]
<jebes> i mean, yes
<jmercouris> if there is enough inertia, sbcl-ext effectively changes the spec of Lisp
<jmercouris> because people will basically RELY on SBCL existing and being ported to their platform
<jmercouris> and yet, is SBCL ported to every platform? no
<jebes> i do not want to fall into a haskell like ghc-the-one-true-compiler
<jmercouris> are there Lisps ported to platforms that SBCL is not? yes
<jmercouris> makomo: yes, everything has a price
<jackdaniel> 1. official ql policy is that library works at least on two implementations; 2. portability libraries are commonly used (bt for instance)
<jackdaniel> so situation is not as dire as you try to paint it
nicksmaddog has joined #lisp
<jmercouris> who is "you"? I don't think anyone has painted a dire situation here
<jackdaniel> " < jmercouris> the only solution is to pull in as few dependencies as possible" sounds super-dramatic to me
<jmercouris> well, it is true, is it not?
<jebes> i personally think that's in general, good practice
<jebes> but only because npm does the oppsite
<jackdaniel> it isn't true that it is the only solution (if you talk about portability)
<jebes> and is a dumpster fire
<ogamita> jackdaniel: well, one problem is that there's no declaration of the supported targets for portability libraries and for cffi libraries.
<ogamita> if asdf had such declarations, you could compute the intersection of the supporter targets for all your dependencies. (and find often, that you only have one or two implementations in there…)
pierpal has quit [Quit: Poof]
<ogamita> s/ter/ted/
<shrdlu68> I like to take a look a look at the pgloader issues page because it reminds me of the actual issues I'd run into if I chose to write some tool in CL.
pierpal has joined #lisp
<ogamita> shrdlu68: it's not much better if you write in C.
eschatologist has joined #lisp
<shrdlu68> It puts things in perspective. What _really_ matters.
<shrdlu68> When you're trying to actually achieve something in the real world.
<jebes> holy shit
<jebes> thank you so much for saying that project
<ogamita> Nowadays, you have to choose between C89, C99, C11, C18. Between gcc, clang, icc, msvc, etc; Various version of gcc with different features (and pressed by clang, it obviously adds new useful features all the time now).
<jebes> i needed this for an ecommerce project
<ogamita> And I don't even talk about libraries!
<jackdaniel> jebes: you may talk to dim who is the author of pgloader
<jmercouris> personal anecdote: I had mixed success with pgloader
<jmercouris> I was trying to go from sqlite --> pg
<jmercouris> though YMMV depending on how you've set-up your data and whether you are using mysql etc etc
<jebes> i just need the continous migration portions
<jmercouris> you can generate continuous migrations with other libraries, that are even ORMs
wanz has joined #lisp
<jmercouris> for example, Crane
<jebes> think we need a better cliki
<jackdaniel> weren't ORMs a cancer of the database world? :-)
<jebes> or i need to get better with google
<jebes> yeah i'd like to aboid orms
<jmercouris> jackdaniel: Short answer no, long answer, no.
<jackdaniel> correct answer: yes
<jmercouris> ORMs are fantastic, drop into SQL only when you need to
<jmercouris> I guess this will be a religious debate, and lettuce agree to disagree
<jebes> hrm, jmercouris i think its more of a functional vs procedural issue
<jebes> procedural code does really well with orms
<jebes> functional code loses some of its functional-ness
<jmercouris> All code does really well with ORMs has nothing to do with whether it is functional, it serves as a nice abstraction
<jmercouris> I don't want to imagine what the underlying tables look like, I don't care, I am only working with objects
<jebes> well that's a really silly way to do things
<jmercouris> however, I don't want to get drawn into this conversation, I have work to do
<jebes> okay
<jebes> as do i
<jebes> i use EF at work and like how it does things
<jebes> i just wish we didn't use it how we used it
dddddd has joined #lisp
<ogamita> Basically, SQL is for RELATIONAL databases. RELATIONAL databases are a good mathematical way to represent data and query it easily. But it is not the way real data in the real world is structured. In the real world, your healthcare file is not stored in tables with the healfcare file of all the other patients. In the real world, it's in a folder and you bring it with you, as an instance of person, to the next instance of doctor, to
<ogamita> access it.
<ogamita> So basically, what ORM show, is that you should throw away SQL and RDBMS, and get yourself an OODBMS.
<ogamita> The other problem that this denotes too, is how (the code of) applications are distributed amongst systems.
<pfdietz> It's data as viewed by a large organization, not by a customer. As a customer, you don't care that your data fits (perhaps poorly) into tables with other customers.
<ogamita> With a RDBMS, you'd have most of the logic of your application in stored procedures. With OODBMS, it's in methods of objects. But you need a OODBMS that can store objects with their methods in the database, and run those methods on any processing CPU that access it!
<p_l> ogamita: sounds like you're talking of GemStone/S
<ogamita> As you can see, quite a mess. By the way, java (and applets) could be used that way. But there are no such system in use. The web ate java and applets, digested it, and threw it away, replacing it with ecmascript. (so called "javascript").
<ogamita> note to self: make a CL implementation embedded in browsers, named commonjava.
<ogamita> p_l: yes.
<jebes> i like mumps
<ogamita> But my point is that even OODBMS have difficulties because of this running of methods in the processing CPU.
<pfdietz> Let's name more programming languages after diseases.
<ogamita> Or not. After all, with mobile applications, you often have this model where only the UI is on the mobile, the processing is done on the backend thru the web API.
<ogamita> pfdietz: I've got a lisp<->java thingy named listeria ;-)
<pfdietz> Excellent!
<p_l> ogamita: lisp<->java? in what way? :)
<ogamita> Now, perhaps you could do something usable, by hooking Common Lisp as stored procedure language in Postgresql.
<ogamita> p_l: it's to run lisp program eg. in ecl on Android, and interact with java over a socket to do the UI in Android.
<ogamita> It hasn't been published yet.
<p_l> why not use JNI and possibly ring buffers (especially if shared data structure could be done)?
<jebes> the obvious solution is to write a database in lisp
<ogamita> well, you'd have to use libecl in that case. I feel safer with a separate process and sockets.
<jebes> and run everything on the blockchain
<ogamita> :-)
<p_l> jebes: s/on the blockchain/in a way that won't work/ ;)
<p_l> merkle-tree-logged databases exist without the idiocies of blockchains :)
<jebes> yeah but you don't get that vc dosh
<p_l> jebes: that's why some of them did play on the blockchain meme
<p_l> but it gets you idiots who read a header "R3 Corda used in finance..." and immediately look for "FEDCOIN" to invest into ;)
<jebes> i do not feel comfortable being grouped in with people that use blockchain unironically
<p_l> jebes: ... that says good things about you? :)
FreeBirdLjj has joined #lisp
<jebes> my usage is fueled by greed and connin silly vc's
hhdave has quit [Ping timeout: 268 seconds]
Roy_Fokker has joined #lisp
DGASAU has joined #lisp
<elderK> Well, after a few hours, here is my first "shot" at a set of macros: https://pastebin.com/wHu3kSu3
<elderK> :) Advice / constructive feedback is welcomed.
<elderK> (Also, I would have used Lisp-paste but it seems to be discontinued?)
<jebes> lpaste is usually what i use
warweasle has joined #lisp
<elderK> Cool :) I'll use that from now on
<elderK> hmm, lpaste seems to be down :(
<jackdaniel> elderK: your loop in if-let – isn't it a no-op?
<jackdaniel> that is - doesn't it reconstruct the original list from bindings?
<jackdaniel> (loop for (a b) in '((1 2) (3 4)) collect `(,a ,b)) ;-> ((1 2) (3 4))
<elderK> Yes, it does but it destructures. So, doesn't that ensure each "binding" has the correct form?
<jackdaniel> ah, that was your intention
<jackdaniel> let should ensure that too, no?
<elderK> Good point.
<elderK> :D
<elderK> Thank you :)
<jackdaniel> also I would expect evaluation to stop after first form which is not satisfied
<jackdaniel> not that you evaluate all expressions and check bindings if all are non-nil
robdog has joined #lisp
<elderK> I don't follow?
<elderK> Oh, I see. The mapcar.
<jackdaniel> (let ((a (foo-with-side-effects)) (b (bar-with-side-effects))) (if (and a b) … …))
<elderK> It'll execute for all of them, even when the first of them was falsey.
<elderK> Nice catch
rumbler31 has joined #lisp
<jackdaniel> same applies to when-let
<elderK> I didn't think of that :)
elfmacs has quit [Ping timeout: 252 seconds]
<elderK> I wonder how you'd do that. You could recursively expand it, or I guess you could have something like (and (setf ... ...) ...)
<elderK> I should check out Alexandria's source to learn from it :)
<jackdaniel> there are two ways, either nested let (recursive expansion) or a block/return-from combo
<elderK> On my walk, I was wondering how destructuring-bind was implemented.
<elderK> jackdaniel: Interesting. I'll have to read up on block.
<jackdaniel> (well, maybe more, I could think of two on the spot
<jackdaniel> )
<elderK> Would you establish a bunch of names, then set them one after another?
<jackdaniel> (block nil (let ((a (or nil (return 42))))))
<pfdietz> Or just bind to them.
<pfdietz> But you can find out, using MACROEXPAND. Each implementation may do it differently.
<jackdaniel> binding (or ,form (return-from my-gensymmed-block nil)) should do the trick
<elderK> What would it look like for a couple bindings? :D
<elderK> :) I'll definitely read through some of Alexandria, hopefully I can understand it.
shrdlu68 has quit [Quit: WeeChat 2.2]
<jackdaniel> (let ((a (or ,form (return-from bam nil)) (b (or ,form2 (return-from bam nil))) …)
<elderK> That might help me learn what I need to, to build what I want to build :)
<jackdaniel> but I'd check alexandria indeed
<elderK> Oh, clever.
<elderK> :D
<jackdaniel> it seems that alexandria executes are initial forms
<elderK> :) I guess I'll give this another shot tomorrow.
<jackdaniel> so it does exactly what you have suggested (and something I find non-intuitive)
<elderK> 0400 now :D Probably time to start working on sleep.
<jackdaniel> good night
<elderK> Goodnight jackdaniel :) Thank you for your feedback.
<jackdaniel> sure
<jackdaniel> ah, alexandria reserves when-let* for doing it one-by-one (there is no if-let* though)
<jackdaniel> good to know
Inline has joined #lisp
JohnMS has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
cage_ has joined #lisp
ogamita has quit [Ping timeout: 260 seconds]
ogamita has joined #lisp
<makomo> jackdaniel: hm interesting. what would the semantics of IF-LET* be though? if one of the variables is NIL, what exactly can you expect to be bound within the ELSE?
DGASAU has quit [Ping timeout: 250 seconds]
<makomo> i suppose WHEN-LET* is acceptable because there's really no ELSE. it's just "ok, never mind then"
<jackdaniel> I usually use else clause in if-let as if no bindings were estabilished
Kundry_Wag has joined #lisp
SaganMan has quit [Quit: gotta go]
rumbler31 has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 245 seconds]
nokdoot has joined #lisp
anewuser has joined #lisp
Guest24308 has quit [Ping timeout: 250 seconds]
milanj has joined #lisp
nullniverse has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
heisig has quit [Ping timeout: 268 seconds]
nullniverse has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
<cage_> drmeister, just watched your talk: your work is impressive
<shka_> cage_: there is a new one or is that one from google talks?
<beach> shka_: LLVM
<beach> New one.
<shka_> oooh
<shka_> i need to see it!
<cage_> shka_, the new one, I guess
<shka_> yes, i found this one already
<shka_> but thank you :-)
<cage_> very well :)
<cage_> you're welcome :)
fikka has quit [Ping timeout: 250 seconds]
<cage_> the questions part is missing, unfortunately
<shka_> that sucks
<shka_> but!
<cage_> :/
DGASAU has joined #lisp
<shka_> drmeister is doing truely amazing stuff
fikka has joined #lisp
<cage_> i agree :)
<shka_> and each time he is presenting his work, I think: "wow, this person is working on saving the world!" :D
Kundry_Wag has joined #lisp
<shka_> and he really has good charisma on scene
<dim> +1 to both
<makomo> +1 from me as well, just watching the talk. great work drmeister, very inspiring! :-)
fikka has quit [Ping timeout: 244 seconds]
Odin- has quit [Quit: Foo.]
Kundry_Wag has quit [Ping timeout: 250 seconds]
sjl_ has joined #lisp
<cage_> moreover i like the fact that cleavir is in the game too, i am always happy when i can see the results of an useful collaboration
DGASAU has quit [Ping timeout: 250 seconds]
<makomo> cage_: agreed! this is a very awesome and exciting time for CL -- Clasp, SICL, Mezzano, etc.
DGASAU has joined #lisp
<shka_> sadly i am not long enough to say how things are changing long term
<shka_> *long enough in lisp
<shka_> would love to hear some veteran ;-)
arbv has quit [Quit: ZNC - https://znc.in]
eschatologist has quit [Ping timeout: 240 seconds]
DGASAU has quit [Read error: Connection reset by peer]
eschatologist has joined #lisp
arbv has joined #lisp
<makomo> hah, the irs tax forms joke! :D
DGASAU has joined #lisp
<cage_> :-D
<makomo> he used it in his google talk as well :-)
<shka_> well, it is funny because it is true
<shka_> man
<shka_> there is a loooooooooad of work that was done
<cage_> i wish we could use clasp (or ECL, why not?) to target webassembly, unfortunately i am not the person that is able to do that
<cage_> but i would give some money for a crowfunding
fikka has joined #lisp
<jmercouris> to which stream can I print so that (print "fish") only returns fish instead of also printing to standard out?
<shka_> jmercouris: (format nil "fish")
<jmercouris> shka_: thanks!
<Xach> that is only for format, though
<Xach> nil does not mean the same thing to other printing functions
<jmercouris> Yes, what I actually want to do is call print-object, and have it only return the string, and not to standard out as well
<shka_> yes, importnat point
<Xach> if you aren't sure what might be involved in the output process, a string-stream can produce more reliable results
<makomo> jmercouris: also take a look at WITH-OUTPUT-TO-STRING
<Xach> jmercouris: princ-to-string or prin1-to-string are some other things that can help there.
<jmercouris> Xach: yes, that does seem to help, let me try that thanks
<jmercouris> yes, finally no longer polluting my repl!
<dim> I like with-output-to-string, in my head it's doing all the optimisation that you get when switching to a StringBuilder API in other languages
ogamita has quit [Read error: Connection reset by peer]
<jmercouris> here's another question, how can I implement print-object, where it doesn't show quotes?
josh5tone has quit [Read error: Connection reset by peer]
<makomo> jmercouris: what do you mean by "show quotes"?
<jmercouris> I'll show you in a gist, one moment
<Xach> if you return a string, the string will start and end with a quote character.
<Xach> when it is printed readably.
<makomo> jmercouris: try ~a
<Xach> ~s prints readably, ~a does not.
robotoad has joined #lisp
<Bike> that print-object is kind of problematic
<Bike> if you try to read it back you'll just get a string, not a buffer
<jmercouris> I'm trying to just make a string
<Bike> and there's nothing to like, indicate that it is a buffer.
<jmercouris> I want a generic way to get a string representation of an object for printing ina list
<Xach> print-object is not a good way to get a string. make your own generic function if you want to ditch the general concept behind print-object.
<Xach> like, object-string or something.
<jmercouris> ok
<jmercouris> then I will have to reimplement it as well for all normal data types like strings, numbers, etc
<jmercouris> but fair enough, if I must, then I must
<Xach> jmercouris: no, because you can have a generic method that defers to print-object.
DGASAU has quit [Ping timeout: 264 seconds]
<jmercouris> Xach: I thought defgeneric just created prototypes, and no actual implementation
<jmercouris> can you make an abstract implementation? like what (defmethod object-string (object object) ...)?
<Xach> "generic" in the sense that it handles many of the cases
DGASAU has joined #lisp
nokdoot has quit [Quit: Leaving]
<Xach> jmercouris: yes. it is shorthand for (object t)
<Xach> (defmethod object-string ((object t)) (princ-to-string object))
<Xach> or STRINGIFY, or NAME, or whatever.
<Xach> the point is more that PRINT-OBJECT has the weight of expectations that you should not discard lightly
<Xach> one of those expectations is that the object you read back from print-object is the same as what it printed, or there's an error (via the #<foo> unreadable object syntax)
<Xach> now, within your own world you can of course do whatever you like! but it is usually better to knowingly break the rules than unknowingly
<makomo> jmercouris: in what kind of context will you be using your "OBJECT-STRING" though? if you know you'll be printing buffers, can't you directly just print (name buffer)? if you don't know you'll be printing buffers, of what use is just printing its name (i.e. you won't know whether it's a buffer or not)?
<jmercouris> makomo: I don't know the object type I will be printing in advance
<jmercouris> Xach: You've made a very valid argument, I will do the implementation that way
v0|d has quit [Ping timeout: 260 seconds]
<jmercouris> makomo: I pass a list of objects to a minibuffer for rendering completions, how they are rendered depends upon the object
<pfdietz> Strictly speaking "similar", not "same".
<makomo> jmercouris: so does that mean you'll print buffers as something like 'BUFFER "foo"', to signify that they're buffers? would the unreadable object syntax suffice for that then (or do you want to customize it because you don't like how it looks)?
<pfdietz> clhs
<specbot> Similarity of Literal Objects: http://www.lispworks.com/reference/HyperSpec/Body/03_bdb.htm
<Xach> it's all similar to the clam
DGASAU has quit [Remote host closed the connection]
<jmercouris> makomo: I will be printing them as so www.asdf.com
<jmercouris> no quotes, nothing
another-user has left #lisp ["ERC (IRC client for Emacs 26.1)"]
<pfdietz> There's something categorical about the relationship between equality, copying, hashing, and printing/reading.
Kundry_Wag has joined #lisp
<makomo> jmercouris: and when you select that completion, what is inserted? the string "www.asdf.com"?
<jmercouris> no, the object representing that string
<makomo> aha, i see
DGASAU has joined #lisp
<jmercouris> Xach: Also, thank you for your help
Kundry_Wag has quit [Ping timeout: 245 seconds]
jack_rabbit has quit [Ping timeout: 250 seconds]
wanz has quit [Quit: wanz]
wanz has joined #lisp
jochens has quit []
irdr has quit [Ping timeout: 246 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
irdr has joined #lisp
bheesham has quit [Quit: WeeChat 1.4]
bheesham has joined #lisp
elderK has quit [Quit: Connection closed for inactivity]
frodef has quit [Ping timeout: 245 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
anewuser has quit [Read error: Connection reset by peer]
jochens has joined #lisp
rumbler31 has joined #lisp
matzy_ has joined #lisp
rumbler31 has quit [Ping timeout: 252 seconds]
kyby64 has joined #lisp
kyby64 has quit [Client Quit]
jmercouris has quit [Remote host closed the connection]
<Xach> i live to serve
dddddd has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
jxy has quit [Quit: leaving]
wanz has quit [Quit: wanz]
dddddd has joined #lisp
wanz has joined #lisp
broccolistem has joined #lisp
nanoz has joined #lisp
nanoz has quit [Remote host closed the connection]
broccolistem has quit [Client Quit]
jochens has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
sunshavi has joined #lisp
makomo has quit [Ping timeout: 268 seconds]
wusticality has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
ggole has quit [Quit: ggole]
jochens has joined #lisp
jxy has joined #lisp
eMBee has quit [Ping timeout: 246 seconds]
jochens has quit [Ping timeout: 268 seconds]
eMBee has joined #lisp
cylb has joined #lisp
<jcowan> That page invokes a definition of type similarity but doesnt AFAICT define it.
<jcowan> (
DGASAU has quit [Ping timeout: 260 seconds]
<Bike> clhs
<specbot> Similarity of Literal Objects: http://www.lispworks.com/reference/HyperSpec/Body/03_bdb.htm
<Bike> for the actual array element types?
frgo has quit [Remote host closed the connection]
anamorphic has joined #lisp
anamorphic has quit [Client Quit]
anamorphic has joined #lisp
frgo has joined #lisp
cpape has quit [Ping timeout: 252 seconds]
frgo has quit [Ping timeout: 244 seconds]
notzmv has quit [Quit: WeeChat 2.3]
m00natic has quit [Remote host closed the connection]
wanz has quit [Quit: wanz]
notzmv has joined #lisp
eschatologist has quit [Quit: ZNC 1.7.1+deb2 - https://znc.in]
eschatologist has joined #lisp
<anamorphic> Is it legit to define a function with its package qualification? e.g. (defun foo:bar () ...)?
lnostdal has joined #lisp
rippa has joined #lisp
<Bike> sure.
FreeBirdLjj has quit [Remote host closed the connection]
LiamH has joined #lisp
frgo has joined #lisp
<pjb> anamorphic: defun doesn't care where the symbol naming the function comes from. The only forbidden symbols for function names are those in the CL package.
<jcowan> Bike: yes
<jcowan> is type character similar to type standard-character, e.g.?
<Bike> i suppose it should say actual array type specifier
<pjb> jcowan: depends on the implementation.
<Bike> jcowan is talking about the definition of "similarity" for types, which is deffo undefined.
<Bike> and a different question from whether the types are equivalent
<jcowan> and since the definition of array similarity depends on it, it too is undefined.
<anamorphic> That makes sense... thanks. I guess if you want foo:cons, you'd have to have package created with (:shadow #:cons) ahead of time
<pjb> (defun type-equalp (a b) (and (subtypep a b) (subtypep b a))) #| more or less |# (type-equalp 'character 'base-char) #| --> t ; t |# in this ccl.
rumbler31 has joined #lisp
<Bike> pjb. similarity. like in compiled files.
frgo has quit [Ping timeout: 272 seconds]
<pjb> Well then it's easy: types are not first class objects, so they cannot be saved to compiled files or loaded.
rumbler31 has quit [Remote host closed the connection]
frgo has joined #lisp
* pjb will be back later.
<Bike> do you just not read what people are saying
astalla has joined #lisp
<Bike> jcowan says the definition of array similarity depends on the definition of type similarity. there is no latter. Problem.
makomo has joined #lisp
frgo has quit [Ping timeout: 268 seconds]
<Xach> anamorphic: NO
v0|d has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
lyf[kde] has joined #lisp
<lyf[kde]> The Seasoned Schemer finally arrived!
SaganMan has joined #lisp
bheesham has quit [Quit: WeeChat 1.4]
nly has joined #lisp
frodef has joined #lisp
DGASAU has joined #lisp
frodef has quit [Read error: No route to host]
Essadon has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
hiroaki has joined #lisp
lyf[kde] has quit [Read error: Connection reset by peer]
anamorphic has quit [Quit: anamorphic]
sjl_ has quit [Quit: WeeChat 2.3-dev]
dtornabene has joined #lisp
anamorphic has joined #lisp
makomo has quit [Ping timeout: 252 seconds]
<dtornabene> are there any roswell users here atm?
sjl_ has joined #lisp
cage_ has quit [Quit: Leaving]
vlatkoB has quit [Remote host closed the connection]
varjag has joined #lisp
rozenglass has joined #lisp
v0|d has quit [Ping timeout: 240 seconds]
v0|d has joined #lisp
makomo has joined #lisp
anamorphic has quit [Quit: anamorphic]
anamorphic has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
hiroaki has quit [Ping timeout: 240 seconds]
rozenglass has quit [Remote host closed the connection]
DGASAU has quit [Remote host closed the connection]
rpg has joined #lisp
pierpal has quit [Ping timeout: 252 seconds]
rozenglass has joined #lisp
frodef has joined #lisp
drewes has joined #lisp
<LdBeth> I used to be :P
<no-defun-allowed> Don't need it tbh
Jesin has quit [Quit: Leaving]
fikka has joined #lisp
wusticality has quit [Ping timeout: 268 seconds]
confusedwanderer has quit [Quit: confusedwanderer]
xkapastel has quit [Quit: Connection closed for inactivity]
longshi has joined #lisp
<anamorphic> dtornabene: I'm using it
<dtornabene> anamorphic: thanks for the direct address i had missed this
<dtornabene> its the third time I've tried to install it and I hit different bugs each time, decided to just move on
<anamorphic> Oh what troubles did you encounter?
drewes has quit [Quit: Textual IRC Client: www.textualapp.com]
<dtornabene> I get along just fine with emacs and quicklisp, I just wanted to check out lem
<anamorphic> You don't need roswell for lem, but if you do it will create a few commands for you to start it from the command line more easily
<dtornabene> anamorphic: hold on I'll grab you a paste
<dtornabene> anamorphic: oh!
<dtornabene> whats the preferred paste here btw?
<dtornabene> *paste site
confusedwanderer has joined #lisp
<anamorphic> I dont think there's a preferece
<dtornabene> I guess its not right to say that the *roswell* install failed, it was actually choking on the lem install
<dtornabene> I managed to get it installed via a deb -> dpkg
Jesin has joined #lisp
rumbler31 has joined #lisp
confusedwanderer has quit [Quit: confusedwanderer]
rumbler31 has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<anamorphic> Yeah doesn't really have much of a hint on what went wrong there
<dtornabene> nope
<anamorphic> dtornabene: from inside lisp, try (ql:quickload "lem" :verbose t)
<dtornabene> i've been awake for almost a day at this point so I wasn't super motivated to try and chase it down, that and this being the third time, and that it was a lark
<dtornabene> anamorphic: thank you!
<dtornabene> anamorphic: trying now
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<anamorphic> or (ql:quickload "lem-ncurses" :verbose t) IIRC you load a specific backend
rpg has joined #lisp
<dtornabene> yeah I'm getting "not found" on both of those
eschatologist_ has joined #lisp
Jesin has quit [Quit: Leaving]
anamorphic has quit [Quit: anamorphic]
eschatologist has quit [Ping timeout: 240 seconds]
Jesin has joined #lisp
anamorphic has joined #lisp
rpg has quit [Client Quit]
Zaab1t has quit [Quit: bye bye friends]
<anamorphic> dtornabene: perhaps try (ql:register-local-projects) and then try loading it
wusticality has joined #lisp
nly has quit [Read error: Connection reset by peer]
nlyy has joined #lisp
<dtornabene> anamorphic: nothing there either, haven't used that function before, I'm assuming that it means I'd need to already have a version cached in local projects before I "register" it?
<anamorphic> Yeah, so under ~/.roswell/local-projects, do you see a path structure like: cxxxr/lem ?
nlyy has quit [Read error: Connection reset by peer]
nly has joined #lisp
<dtornabene> oh!
<dtornabene> i had nuked the roswell install
<dtornabene> i'm reinstalling it now
<dtornabene> I was assuming you meant via my normal "system" quicklisp
<anamorphic> So lem does not build for you regardless of roswell?
<dtornabene> I mean, I hadn't tried to build it outside of the 'ros install cxxxr/lem' process
grumble has quit [Quit: Well, would you look at the time. I've almost missed my ambiguous, non-existent appointment that I have scheduled just when I start to lose interest in my current conversation.]
<dtornabene> i hadn't seen any instructions or even the option to do that on github
<anamorphic> Ah OK. If you're not using roswell, just cd into ~/.quicklisp/local-projects and git clone https://github.com/cxxxr/lem
<dtornabene> sweet, this I can do
<anamorphic> Then in Lisp, try (ql:quickload "lem-ncurses")
<dtornabene> after firing "register-local-projects", yes?
<anamorphic> I'm not sure you need that everytime, but sure
<dtornabene> oh shit its building......
<dtornabene> ack!
<dtornabene> "Symbol "MOUSEMASK" not found in CL-CHARMS/LOW-LEVEL package
<anamorphic> Hmm can you past the whole thing? Do you have the ncurses headers installed? On debian/ubuntu you need apt install libncurses5-dev I think
<dtornabene> love that debian split packaging, investigating now
grumble has joined #lisp
<dtornabene> I also have libncurses5-dev installed
quipa has joined #lisp
<anamorphic> I'll try a new git fetch locally and see what happens. Maybe it dosn't build on master right now
<dtornabene> whats strange is I can get cl-charms to load just fine via quicklisp
Bike_ has joined #lisp
Bike has quit [Disconnected by services]
Bike_ is now known as Bike
v0|d has quit [Read error: Connection reset by peer]
<anamorphic> Yeah
<anamorphic> lem has (charms/ll:mousemask ...) which seems ok
<anamorphic> Are you using cl-charms-20180228?
v0|d has joined #lisp
<anamorphic> I think you can check by looking in ~/.quicklisp/lisp/quicklisp/dists/quicklisp/software/ ..
<anamorphic> .
<dtornabene> ah, nope!
astalla has quit [Ping timeout: 268 seconds]
<anamorphic> Different version or not there?
<dtornabene> i'm using something a year and half out of date
<dtornabene> wow
<anamorphic> dtornabene: try (ql:update-dist "quicklisp") to get the latest
<dtornabene> oh yes
<anamorphic> dtornabene: I sense victory is close
<dtornabene> anamorphic: btw thanks for taking all this time, its very much appreciated
<anamorphic> np. lem is so much fun
<dtornabene> a little embarrassed that everything was so out of date, shows how little CL I've been writing
longshi has quit [Ping timeout: 252 seconds]
<anamorphic> I discoved I'm using February's still
<dtornabene> and it loaded!!!!!
<dtornabene> huzzah!
<anamorphic> dtornabene: fyi, it redefines the CL-USER:ED, so (ed "foo.lisp") will start lem
<dtornabene> so, I'm assuming since I'm in a repl at the moment, to use it I have to back out of the repl, and load a file with it from the commandline
<dtornabene> ahhhhh
<dtornabene> gotcha
<anamorphic> Once your in lem though. you're still in the CL that you started it from, so you can just switch to using lem's slime-like repl
<dtornabene> well I'm in, and there are errors on the screen, looks like slime is mad at lem, or something
<dtornabene> but I'm not super worried about it
<dtornabene> so all the keybindings are set to emacs style out of the gate huh
<dtornabene> cool
<dtornabene> wow I can't wait to dig through the source on this
quipa has quit [Remote host closed the connection]
quipa has joined #lisp
<dtornabene> anamorphic: this is *awesome*
<anamorphic> Port your favourite emacs mode :)
pierpal has quit [Read error: Connection reset by peer]
<dtornabene> anamorphic: is it reading all of the modes I have installed for my system emacs?
pierpal has joined #lisp
<dtornabene> because it looks like thats what its doing
<anamorphic> No, it doesn't depend on emacs at all
<dtornabene> so I just M-X 'd and tab completed and its listing a bunch of modes
<dtornabene> so those were installed with lem then
<anamorphic> Yeah
<dtornabene> well thats damn cool
<dtornabene> man this was so worth it
<dtornabene> literally every key chord I've tried has worked my goodness
<dtornabene> anamorphic: thanks again I'm exhausted so I'm going to crash now, how wonderful to be able to crash and just wake up and get to work
<dtornabene> happy hacking all
<anamorphic> No problem. Have a good one
angavrilov has quit [Remote host closed the connection]
dtornabene has quit [Quit: Leaving]
<pfdietz> pwd
jmercouris has joined #lisp
varjag has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 245 seconds]
<quipa> Hello, does someone know of a implementation of pi-calculus based language in lisp / scheme?
fikka has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
nicksmaddog has quit [Quit: Leaving]
<anamorphic> Oh interesting... a calculus of channels and messages
jmercouris has quit [Remote host closed the connection]
fe[nl]ix has quit [Read error: Connection reset by peer]
fe[nl]ix has joined #lisp
Blkt has joined #lisp
<jcowan> Yes, pi is to Erlang/Go/etc. as lambda is to Lisp
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #lisp
<jcowan> When would you write a method for NO-APPLICABLE-METHOD?
<jasom> jcowan: when you have default behavior
<jasom> jcowan: e.g. perhaps you have a method to convert an object to html representation; there could be a default method that puts a stub value in
<jasom> logging an unexpected missing method without breaking the control flow is another possible use, though I think the condition system is probably better for that.
<jcowan> Oh, of course, methodNotUnderstood.
<jcowan> In ST that would be defined in a particular class, but of course generic function methods don't belong to a class, so I never thought about it.
<jcowan> Two duh questions in one day, I'm slipping
<jasom> jcowan: no CLOS and ST are so similar in many ways, but when they are different they are almost completely backwards from each other.
<Bike> if you implemented something more like smalltalk in MOP you could define a no-applicable-method method on your generic function class to delegate to method-not-understood
<jcowan> I was kind of surprised that the gf argument to n-a-m is of type t rather than type gf, but it's nice, it means it can be called when an ordinary function with type declarations fails the declarations, if an implementation wants to
<dim> wow a backtrace with 12455 frames in it
<dim> Control stack exhausted, I can believe it
funnel has quit [Ping timeout: 268 seconds]
funnel has joined #lisp
<dim> seems like it's a print pretty with *print-circle* or something
<jcowan> wonderful Abstract Heresies blog post, GvR vs. the JVM on tail recursion: http://funcall.blogspot.com/2011/03/tail-recursion-and-debugging.html
<LdBeth> quipa: well you have to deal with some system level programming or emulate some aspects of an OS
<quipa> LdBeth: hum ok, why would that be an issue if I am using scheme to implement a pi-calculus?
milanj has joined #lisp
<LdBeth> <freenode_qui "LdBeth: hum ok, why would that b"> quipa: it’s possible with emulating scheduling and context switching from Scheme
<LdBeth> And both CL and Scheme are not specialized on these
<LdBeth> So modeling pi calculus is fine but after all high performance might not be expected
<LdBeth> I think at least someone have done a working implementation in Racket
<quipa> Fine with me for now, just wanted to see if I could learn / understand it coming from Scheme
<quipa> Basically I was trying to compile Pict programming language which from what I can see is written in OCaml and it got me thinking if it can be done in OCaml surely it can be done in Scheme / Lisp
<quipa> Pict from what I understand has a kernel based in pi-calculus
<quipa> kernel language*
frodef has quit [Ping timeout: 244 seconds]
scymtym has joined #lisp
Elephant454 has joined #lisp
v0|d has quit [Ping timeout: 250 seconds]
pierpal has quit [Read error: Connection reset by peer]
<aeth> What do people generally do for macros that break the default SLIME indentation?
<anamorphic> I think there's an emacs variable that you can use to specify indentation rules
<anamorphic> That's what I did, I think
<jasom> aeth: you can usually define your lambda-list such that slime gets it right.
<jasom> aeth: for really wacky ones (e.g. loop) manual indentation may be the best bet.
<anamorphic> replacing &rest with &body fixes most of my own mistakes
cylb has quit [Ping timeout: 260 seconds]
<aeth> jasom: Where SLIME fails is usually custom lambda lists, or in macros that behave similarly to FLET.
cpape has joined #lisp
<aeth> jasom: It will also fail completely in mini-languages because it will treat everything internal to it like a function
<aeth> (well, if it has s-expressions at all, but let's not talk about trying to indent loop)
<aeth> In particular, with custom lambda lists Emacs fails to match the &key and &optional (and probably &rest) indentation that it uses for DEFUN/etc.
<aeth> By "similarly to FLET" I mean this: ((name lambda-list body) (name lambda-list body) ...)
pierpal has joined #lisp
<aeth> In particular, I actually have my own custom version of FLET now and manual indentation does not play nice with paredit.
frgo has joined #lisp
anamorphic has quit [Quit: anamorphic]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
anamorphic has joined #lisp
<dim> so I think I just solved a huge problem in pgloader that I didn't know how to reproduce (until tonigth where I had an ssh connection to a box where it happened)... and it turns out (setf *print-circle* t) would save the day and avoid the crash.
frgo has quit [Ping timeout: 244 seconds]
<Xach> :::)
<Colleen> Unknown command. Possible matches: 8, set, say, mop, get, time, tell, roll, help, deny,
pierpal has quit [Ping timeout: 246 seconds]
<dim> Xach: I might have abused recursive data structures, but to my defense, that simplifies walking from anywhere so much and for such a small cost that I'm happy to do it that way
jochens has joined #lisp
jochens has quit [Ping timeout: 245 seconds]
argoneus has quit [Quit: No Ping reply in 180 seconds.]
pierpal has joined #lisp
argoneus has joined #lisp
<jasom> dim: I hung the slime repl by doing the following in the repl: (let ((*print-circle* t)) (print something-circular))
Mr-Potter has quit [Quit: Leaving]
<jasom> print, of course, returns the object that was printed, which gets printed by the repl after unwinding the dynamic binding of *print-circle* :(
matzy_ has quit [Ping timeout: 256 seconds]
<no-defun-allowed> Same happens in most terminal repls too, but it prints out the elements of the list infinitely.
Jesin has quit [Quit: Leaving]