Xach changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook>
abrantesasf has joined #commonlisp
<kagevf> xaltsc: "clisp" is an implementation of Common Lisp - similar to SBCL, ABCL, ECL, and so on ; use "CL" to abbreviate "Common Lisp"
Alfr has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Guest-liao has joined #commonlisp
Lord_of_Life has joined #commonlisp
<lad> is there a way to hook into the eval function such that I can define my own special symbols?
<Bike> special symbols how?
<lad> I want these symbols to be able to self-evaluate: http://pastie.org/p/2HHTbH3yyf4oIqmamUs5rB
<Bike> (defconstant do 'do)
random-nick has quit [Ping timeout: 258 seconds]
<yitzi> Or make them keywords
<lad> I need to figure out how to get around Lthis ock on package COMMON-LISP violated when DO as a constant while in package COMMON-LISP-USER.
<lad> that's why i think i need my own eval/apply / mini lang
<Bike> that is a reader problem, not an eval problem
<Bike> also, an easily fixed one. don't make work for yourself
<yitzi> As I said, make them keywords.
<Bike> DO is a part of the standard CL package, so you can't define it as a constant. You can define your own package that uses the CL package but shadows DO, and then SOLFEGE:DO can be defined however
<Bike> or just make them keywords and save that work too
taiju has joined #commonlisp
<pjb> lad: you could shadow cl:do to use your-own:do instead.
<lad> pjb, Bike the shadow seems to work, thx. I don't want to use keywords i think
<pjb> (defpackage "LAD" (:use "CL") (:shadow "DO")) (in-package "LAD") (defconstant do 'do) (defmacro do (&rest stuff) `(cl:do ,@stuff))
<lad> http://pastie.org/p/5OfiqsD6UDmqoxakurCNy0 <- line 12 has an issue, what is a good way around this?
<lad> say i don't want to define constants, just bindings that I can use within a macro, for example
<pjb> don't define a function, define a macro that expands to a let form.
<pjb> Or to a set of defconstant…
<pjb> lad: also, the semantics of your first form is not defined.
<lad> pjb, would you mind elaborating a bit?
<pjb> Note: with let, they're not constant, so you can shadow them or rebind them: (with-solfege (setf do 42) (list do re mi)) #| --> (42 re mi) |#
<pjb> (with-solfege (let ((do re) (re mi) (mi fa)) (list do re mi))) #| --> (re mi fa) |#
<pjb> which may or may not be wanted.
<lad> pjb, i think those symbols should be able to be rebound since they are relative to a scale
<lad> i just want to be able to reference them without quoting
<pjb> If you want them globally, you can use symbol-macros.
<yitzi> lad: Why do you not want to do keywords? The deftype will just have `(member :do :di :re ...)`
<lad> pjb, that's pretty slick. i'll explore that.
<pjb> The advantage of symbol-macros is that they're lexical bindings, and you can shadow them in a let (let ((si 42)) (list la si do)) #| --> (la 42 do) |#
<pjb> with defconstant you couldn't do that.
<lad> yitzi, i don't want to use ":" everywhere. the solfege language doesn't use colons at all so I don't want them
<yitzi> ok
<lad> pjb, symbol-macros seems to be exactly what i need in this case. otherwise i'd have to do it via a macro-expanding-to-let form. very interesting, thank you
lad has quit [Quit: Leaving]
johnjay has quit [Ping timeout: 264 seconds]
johnjay has joined #commonlisp
cjb94216 has joined #commonlisp
cjb has quit [Ping timeout: 260 seconds]
cjb94216 is now known as cjb
akoana has left #commonlisp [#commonlisp]
prxq_ has joined #commonlisp
prxq has quit [Ping timeout: 264 seconds]
tyson2 has joined #commonlisp
zacque has joined #commonlisp
<zacque> Good morning #commonlisp =)
abrantesasf has quit [Remote host closed the connection]
<beach> Good morning everyone!
<beach> Hello zacque. Are you new here? I don't recognize your nick.
slyrus_ has quit [Quit: Leaving]
<zacque> beach: Hi beach, ah, yes, I'm entire new to IRC thing
<zacque> beach: But I've been learning CL for the past few months, that's why I'm here =D
<beach> I see. Welcome to #commonlisp.
nature has quit [Ping timeout: 258 seconds]
tyson2 has quit [Read error: Connection reset by peer]
waleee has quit [Ping timeout: 264 seconds]
<zacque> beach: Thanks a lot =D
slyrus has joined #commonlisp
Guest-liao has quit [Quit: Client closed]
jhi has quit [Ping timeout: 258 seconds]
dbotton has quit [Ping timeout: 258 seconds]
<jeosol> Good morning all!
<jeosol> morning beach, zacque
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
semz has quit [Ping timeout: 252 seconds]
<beach> Hello jeosol.
jhi has joined #commonlisp
dbotton has joined #commonlisp
<jeosol> beach: i am ok
azimut_ has joined #commonlisp
<jeosol> beach: btw, I noticed you extracted some statistics about # of :before, :after modifiers for one of you codebase. I was going to ask how you extracted those numbers
<jeosol> I think it came to around 1 per 1KLOC or something.
<jeosol> did you a script or other utility
azimut has quit [Ping timeout: 276 seconds]
semz has joined #commonlisp
<zacque> Hi jeosol =)
<beach> jeosol: Oh, I just did `git grep :before | wc -l' etc.
<jeosol> beach: i was thinking it was some command line utility
<jeosol> beach: thanks
<beach> Sure.
<jeosol> I am not sure if there are editors that can having such information
<beach> It might not be totally accurate, but it gives the order of magnitude.
<beach> Not that I know of.
<jeosol> I remember the days of using C++, one of the microsoft VC++ editor has some introspection
<jeosol> i still use just emacs + slime + paredit, serves me well
Bike has quit [Quit: sleep]
icer has joined #commonlisp
karlosz has joined #commonlisp
<beach> I use Emacs and SLIME, but I wish it served me better.
cjb has quit []
shka has joined #commonlisp
<beach> So binding a special variable using something like LET, as in (let ((*x* <form>)) ...) must be the same as (progv '(*x*) (list <form>) ...) right?
lisp123 has joined #commonlisp
<beach> If so, binding special variables using LET or similar is just some kind of syntactic sugar for PROGV.
<White_Flame> hmm, as LET binds in parallel, and PROGV binds in order, not sure that's exactly possible
<White_Flame> as far as the visibility goes when mixing lexicals & specials in a singular LET form
<beach> PROGV doesn't "bind in order", does it?
<beach> The VALUES argument is evaluated without binding the SYMBOLS.
<beach> But yes, you can't mix lexical and special bindings with PROGV.
<White_Flame> oh, PROGV evaluates its init values in order
<beach> What do you mean by that?
<White_Flame> just misreading the clhs
<beach> I see.
<White_Flame> I guess the init values are evaluated first, then the bindings are made, then forms are executed, though it's a bit hard to glean
<beach> Yes, the SYMBOLS and VALUES arguments are evaluated
karlosz has quit [Quit: karlosz]
Qwnavery has joined #commonlisp
icer has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
Guest-liao has joined #commonlisp
aeth has joined #commonlisp
Guest-liao has quit [Client Quit]
lisp123 has quit [Remote host closed the connection]
Guest-liao has joined #commonlisp
lisp123 has joined #commonlisp
Cymew has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 258 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
rotateq has joined #commonlisp
gaqwas has joined #commonlisp
frgo has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
lisp123 has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
kagevf has quit [Ping timeout: 268 seconds]
lisp123 has quit [Ping timeout: 265 seconds]
ec has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
wyrd has quit [Ping timeout: 276 seconds]
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
kagevf has joined #commonlisp
lukego has joined #commonlisp
<lukego> Hey anyone have an idea why static-vectors version 20210807-git - same version as in latest quicklisp - would be failing to build in a certain env with this error? The function (COMMON-LISP:SETF STATIC-DISPATCH::COMBINATION-FUNCTION) is undefined.
<lukego> seems weird especially since the error is preceded by this message: The function (COMMON-LISP:SETF STATIC-DISPATCH::COMBINATION-FUNCTION) is undefined.
<lukego> er, this message: ; processing (DEFUN (SETF COMBINATION-FUNCTION) ...
hendursa1 has joined #commonlisp
<jackdaniel> the word static seems to indicate, that the function may be expected at compilation time perhaps?
<jackdaniel> i.e something tries to call it from the macro and the functio ndefinition is not wrapped in eval-when
pve has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
<scymtym> lukego: is it really the combination of static-vectors and static-dispatch? i had those as completely separate in my mental model
heisig has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
<lukego> jackdaniel: yeah that's how it reads to me too, but it seems weird because it builds fine in other similar environments, same code on another SBCL and Linux userspace of a similar vintage...
<lukego> scymtym: oh, sorry, I see what you mean, no it's just static-dispatch and that's a typo/thinko
<lukego> maybe it's a different in the way compile-time and load-time are staged in this environment...
<scymtym> lukego: i see. i have no idea what the problem could be, though
<jackdaniel> and on both environments you've tried with same initial conditions? i.e an empty cache
<lukego> not really, I have a pretty loose understanding of how the environments are initialized in many ways, more moving parts than I can really account for. I'll try doing separate COMPILE-OP and LOAD-OP etc.
<lukego> the new failing case is when I try to add my dependencies to the upstream packaging of Quicklisp in NixOS/nixpkgs. I used a similar setup before and there I did some specific tweaks e.g. forcing packages to be loaded during packaging to realize various initialization steps...
attila_lendvai has quit [Read error: Connection reset by peer]
<lukego> but that wasn't due to Lisp weirdness so much as Nix weirdness i.e. package directories being migrated to read-only storage after build and not being able to generate artifacts there
<lukego> so this will be something else (but possibly related)
kevingal has joined #commonlisp
kevingal has quit [Remote host closed the connection]
amb007 has joined #commonlisp
<lukego> The good thing is that in this framework I probably have an easy way to apply local patches to projects and can start fixing things without quasi-permanently forking them and having them go stale on me
<jackdaniel> duct-tape heaven so to speak ,-)
xaotuk has quit [Quit: WeeChat 3.2]
icer has joined #commonlisp
winning-luser has quit [Quit: zzz]
<lukego> at least accumulating individual bits of duct-tape is at this point preferable to ~/quicklisp/local-projects/ being a completely ad-hoc and outdated mirror of half my dependencies :)
<lukego> ... or maybe not, we shall see!
<lukego> also this would be sharable because it turns out that other people are actively doing stuff with the Lisp packages in Nix land.
<lukego> "a problem shared is a problem halved" or what is it they say
<lukego> Is there a way to ask Quicklisp to only compile and not load?
wyrd has joined #commonlisp
aartaka has quit [Remote host closed the connection]
<jackdaniel> yes and no :) you may create a bundle with quicklisp (then dependencies will be also downloaded) into the destination folder
<jackdaniel> then you may call asdf's compilation operation
<jackdaniel> that said "only compile" may be a bit misleading - in order to compile foo that depends on bar, you need to first load bar
<jackdaniel> (i.e cl-jinx depends on alexandria and uses its function in macro expansions - i.e alexandria:parse-lambda-list)
<lukego> jackdaniel: thanks yeah that seems good enough for having a simple env to make bug reports from
<jackdaniel> bundles are such a useful feature
Guest-liao has quit [Ping timeout: 256 seconds]
<lukego> what do you use that for?
<jackdaniel> for source code distribution. instead of depending on quicklisp in CI you build a bundle artifact you may load with only asdf
<jackdaniel> ideally it would be that you don't require even asdf :)
<pve> can the bundle be loaded with LOAD?
<pve> oh
<jackdaniel> yes
<jackdaniel> s/yes/no, asdf:load-system/
<pve> right
<jackdaniel> also when you keep all deps in vcs then bundles are easier to compare and manage
lisp123 has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.3]
<lukego> Sounds nice. Generally I'm always looking for moar import/export of well-defined passive data. Often this seems to be hiding behind operational APIs. For example Quicklisp releases are defined by text files listing the source for each package - and CLPM too as I understand it - but these seem to be treated mostly as internal implementation details while for me it's the primary artifact of interest
lisp123 has quit [Ping timeout: 260 seconds]
Guest-liao has joined #commonlisp
<lukego> i.e. for me the really phenomenal thing about Quicklisp is that it defines a set of relatively up-to-date software versions that are known to actually work together. that's huge -- especially in that often the reason they work is that Xach has given authors a heads-up when they break. The fact that it also has a client to automatically install stuff is just a cherry on the top.
<lukego> I suppose that in Nix terms what's needed - and is cobbled together in various out-of-tree packages - is something similar to Bundles but exporting only metadata e.g. the list of packages, the list of dependencies between packages, the list of systems provided by each package, etc. Maybe exporting that could be a Quicklisp (or CLPM or ...) feature one day to cut down on ad-hoc wheel reinventing.
heisig has quit [Quit: Leaving]
<lukego> and bonus points I'd say if git url and commit/tag were provided when known
Qwnavery has joined #commonlisp
random-nick has joined #commonlisp
Qwnavery has quit [Client Quit]
Nilby has joined #commonlisp
<lukego> Sorry to spam, but here is my "duct-tape bliss" workaround to the static-vectors problem, quite satisfactory for the moment:
<lukego> postUnpack = ''
<lukego> -e '$a)' \
<lukego> '';
<lukego> sed -e '/^(in-package / a (eval-when (:compile-toplevel :load-toplevel :execute)' \
<lukego> -i $sourceRoot/src/combin.lisp
<lukego> i.e. just wrap one whole strategically chosen file in a new (eval-when ...)
<lukego> which is considerably less nasty when I add a comment linking to a proper bug report on github
<jackdaniel> yuck
<lukego> yum :-)
<lukego> I guess you always have to find your own tribe. This packaging setup already has a few very similar hacks to this so likely it represents my people :)
<lukego> in a perfect world I'd prefer something managed by Git but that seems like too much of a headache when you have hundreds of projects that each need to be forked separately
Guest-liao has quit [Ping timeout: 256 seconds]
<lukego> although now we come to the real yuck for me which is that it will take about 45 minutes to see if this works due to the serial nature of the package updating code
<jackdaniel> - does it work? ; - well, kind of. first you need to apply these 2 patches to compile it, then this binary patch to fix a miscompiled magic number - easy peasy
<jackdaniel> ah, and the host must feature libfoo 2.01 from 1999 (september release)
<jackdaniel> ... with this patch
<lukego> for me it's comforting to have one central file, in this case https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix, which declares all the obscure rules for installing a consistent set of working packages, including all their FFI dependencies and required patches due to bugs that need to be worked around and so on.
<lukego> so yes, you do have all those obscure rules as you describe, but you don't have to remember them because they are collected and automatically applied.
amb007 has quit [Read error: Connection reset by peer]
<jackdaniel> until you, what, change the package manager? ;) either way this seems to be only remotely related to lisp, sorry for interrupting
amb007 has joined #commonlisp
<lukego> and my BATNA here is to make a fork of static-dispatch, somehow redirect my builds to that instead of the Quicklisp default, and then feel guilty about not having any strategy for keeping that in sync with upstream
<Nilby> At least 3 OSs that I use seem to be held together by a lot of such duct tape "bliss" when you look under the hood.
<lukego> jackdaniel: I think it's a practical issue too, e.g. I don't get automatic updates of McCLIM on my machine, because I have an older version forked in ~/quicklisp/local-projects/, and I can't easily get rid of that because it contains a dirty hack that's needed to locate fonts on my machine that is too nasty to upstream
<lukego> so it would be an upgrade for me if my "distro" would automatically pull the latest mcclim and just automatically remember to apply my patch to that, or complain if it doesn't apply cleanly anymore.
<_death> maybe automatic updates are bad, with or without patches
<jackdaniel> maybe the problem is the dirty hack that is too nasty to upstream? ,)
tfb has joined #commonlisp
<Nilby> Not saying it's good, but even old Lisps you'd have to all apply-all-patches before getting a sane system.
<jackdaniel> speaking of fonts, cl-dejavu is available on quicklisp, so if anyone has some free time, then making McCLIM depend on that would be great
<jackdaniel> (instead of trying to locate fonts in god-knows-which-on-which-platform-where)
CrashTestDummy2 has joined #commonlisp
<scymtym> lukego: do you know whether this https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix#L226 and the next one are nix-specific? i can't immediately see why they would be
<lukego> jackdaniel: Sure, but fixing stuff often has to be asynchronous. Particularly on NixOS there is a genre of problem where a package has done things in a way that's not correct but that you can get away with on most distros - e.g. hard-coding a path into /usr/share/xxx and hoping that's where the data is - but that stuff all breaks once you get to NixOS. So it creates a burden on NixOS users to try and figure out the "right" way
<jackdaniel> lukego: I'm not preaching you to change your ways, I'm just saying that this looks damn ugly from sidelines
<lukego> I spent a whole bunch of energy trying to "fix" the expedient workarounds that Pharo Smalltalk does on NixOS and pretty much burned out on that to the point I don't want to even look at the environment again. I'm trying not to get into that situation with Lisp :)
CrashTestDummy3 has quit [Ping timeout: 268 seconds]
<lukego> I suppose there are different kinds of ugly. This is my preferred one. Central collection of nasty hacks that are applied automatically and systematically and can be shared with other users on that same basis.
<lukego> Here's the mcclim code btw: https://github.com/McCLIM/McCLIM/blob/master/Extensions/fonts/fontconfig.lisp#L18-L34. I just did what everyone else apparently does, added my own directory to the list, but my directory is "/nix/store/70rrm133w22d68lmx7gy3pzdp2xmjfar-dejavu-fonts-2.37" and that doesn't seem like something that should go upstream.
<lukego> So anyway if I successfully migrate from "random hacked forks in ~/quicklisp/local-projects/" to "random hacked patches in quicklisp-overrides.nix" then I'll at least be getting automatic updates again, both of the actual lisp packages and also crowdsourced expedient hacks from other nix users...
<lukego> and on the plus side, I'm not spending at least a whole day on this hacks-curating, and it seems like at the end I'll be able to make a pull request to nixpkgs to share the fruits of it with some small number of other people. I do like the idea of collaborative package-wrangling instead of doing everything in $HOME/
<lukego> scymtym: Good question. No idea, it would be nice to have comments on these. I guess at least 'git blame' should work.
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
<scymtym> lukego: i see, thanks. does nix require build steps to produce bit-level deterministic results?
<lukego> scymtym: This is the upstream Lisp tooling for Nix and I never really looked at it before this week, having used a downstream one called ql2nix for creating "bundles." I believe there is some asdf-level instrumentation going into the builds, something about caching, and possibly this causes problems that are specific to this environment and need such workarounds
<scymtym> lukego: ok
<lukego> Generally speaking Nix doesn't do bit-level determinism, though maybe that is a thing now as a more recent advancement. the Nix brand of determinism is just that it was built with the same commands from the same sources, applied recursively throughout all dependnecies including e.g. compiler and libc and so on. If the actual program is non-deterministic, e.g. writes a random number to a file, that's mostly ignored.
<_death> the nix introduction says "An important consequence is that operations like upgrading or uninstalling an application cannot break other applications, since these operations never “destructively” update or delete files that are used by other packages." but this can only be true if programs don't interact (anyway)
<lukego> I think that the CI might try building packages multiple times and checking for differences, but that would be more of a style-warning
random-nick has quit [Ping timeout: 258 seconds]
<scymtym> like reproducibility monitoring in Debian, i see
<lukego> _death: I'd rate that as "mostly true." If program A depends on program B then it will be pinned to one specific version of B, identified by sha256 hash. If another program depends on B, or B is installed as stand-alone, then those will be separate copies (potentially shared if they are identical.)
<scymtym> sorry, didn't mean to take the discussion further off-topic
<_death> lukego: I guess you mean "depend on" in a narrow way
<_death> lukego: when using a program, a user can feed it output from another program, for example
<_death> lukego: or it can "shell out" to some other program
<lukego> _death: I mean in the sense that it uses it to compile, or wants it in the $PATH at runtime, or in $LD_LIBRARY_PATH, etc. But not in the sense of e.g. both attached to the same X11 server and being copy-pasted between
<jackdaniel> OK, I'm as guilty as anyone, but let's cease offtopic. unless it is lisp-related please move i.e to #lispcafe
<_death> ok, sorry
<jackdaniel> thank you
heisig has joined #commonlisp
<lukego> This is actually Lisp related. This is the way I'm managing my Lisp dependencies, including "shell out" executables like openssl and z3. I declare them as dependencies and Nix generates a line like "export PATH=/nix/store/abcd1234-z3/bin:..." so that the Lisp process always shells out to precisely the command that was declared as a dependency, including its patches and which compiler was used and what compiler arguments and so on.
<jackdaniel> discussing inner workings of nix is not though; I sometimes eat when I code in common lisp but this doesn't render sandwitches ontopic
<lukego> I have a vague fantasy of integrating this a bit more with Lisp, e.g. for Nix to be able to build a set of stand-alone executables and shared libraries that correspond with Quicklisp, so that the Quicklisp client could automatically fetch known-good working versions of all of those things. Julia ecosystem seems to have this and it works surprisingly well.
<_death> I guess I brought it up because lukego's dejavu directory trouble
lukego has left #commonlisp [#commonlisp]
igemnace has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
ec has quit [Remote host closed the connection]
Guest-liao has joined #commonlisp
ec has joined #commonlisp
k60 has joined #commonlisp
k60 has quit [Client Quit]
k60 has joined #commonlisp
Guest-liao has quit [Quit: Client closed]
ec has quit [Ping timeout: 276 seconds]
heisig has quit [Ping timeout: 252 seconds]
ec has joined #commonlisp
heisig has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
icer has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
amk has quit [Remote host closed the connection]
amk has joined #commonlisp
aeth has quit [Ping timeout: 258 seconds]
icer has joined #commonlisp
waleee has joined #commonlisp
aeth has joined #commonlisp
k60 has left #commonlisp [#commonlisp]
Guest-liao has joined #commonlisp
tfb has quit [Quit: died]
Nilby has quit [Ping timeout: 264 seconds]
Guest25 has joined #commonlisp
Guest25 has left #commonlisp [#commonlisp]
attila_lendvai has joined #commonlisp
Bike has joined #commonlisp
ec has quit [Ping timeout: 276 seconds]
Bike is now known as and
and is now known as Bike
dec0d3r has quit [Remote host closed the connection]
ec has joined #commonlisp
waleee has quit [Ping timeout: 265 seconds]
waleee has joined #commonlisp
cosimone has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
ec has quit [Quit: ec]
jealousmonk has joined #commonlisp
andreyorst has left #commonlisp [WeeChat 3.2]
<stacksmith> Good morning
<beach> Hello stacksmith.
tyson2 has joined #commonlisp
<rotateq> hi stacksmith :)
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
nature has joined #commonlisp
rotateq has quit [Remote host closed the connection]
heisig has quit [Ping timeout: 258 seconds]
kevingal has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
amk has quit [Remote host closed the connection]
ASSISTENZA has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
ASSISTENZA has quit [Excess Flood]
amb007 has joined #commonlisp
rogersm has joined #commonlisp
icer has quit [Remote host closed the connection]
aartaka has joined #commonlisp
ASSISTENZA has joined #commonlisp
ASSISTENZA has quit [Excess Flood]
Guest-liao has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
prxq_ has quit [Ping timeout: 258 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
Catie has joined #commonlisp
zacque has quit [Quit: Goodbye :D]
igemnace has joined #commonlisp
<lisp123> Reading through Norvig & Pitman's Style Guide is such a treat
<minion> lisp123, memo from beach: What I call "concrete data type" is anything data type where there is essentially only one reasonable implementation. An abstract data type is defined entirely by the operations possible on its instance, without reference to its implementation.
<minion> lisp123, memo from beach: s/anything/any/
<lisp123> beach: Many thanks for that (thanks minion)
<beach> minion: Thanks!
<minion> np
cage has joined #commonlisp
rain3 has joined #commonlisp
kpoeck has joined #commonlisp
JeromeLon has joined #commonlisp
amk has joined #commonlisp
azimut_ has quit [Remote host closed the connection]
Spawns_Carpeting has joined #commonlisp
tyson2 has joined #commonlisp
azimut has joined #commonlisp
cosimone has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<kagevf> abstract : concrete .. sequence : list ...?
<Bike> sequence is an abstract type, sure
molson has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
knobo has joined #commonlisp
kpoeck has quit [Quit: Client closed]
<jmercouris> You know what
<jmercouris> You are right
<jmercouris> Sequence is an abstract type
<jmercouris> I never thought of that
knobo has quit [Quit: Client closed]
rain3 has quit [Ping timeout: 260 seconds]
kevingal has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
<jcowan> beach: I don't follow that definition of CDTs. It looks to me like fixnum is a CDT on your account and so is float, but bignum is an ADT and so is string.
<jcowan> Do you really mean that?
knobo has joined #commonlisp
Nilby has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
stack1 has joined #commonlisp
stack1 has quit [Client Quit]
random-nick has joined #commonlisp
stacksmith has quit [Quit: WeeChat 3.0.1]
peterhil has quit [Ping timeout: 260 seconds]
stacksmith has joined #commonlisp
wyrd has quit [Remote host closed the connection]
wyrd has joined #commonlisp
Spawns_Carpeting has quit [Ping timeout: 264 seconds]
cosimone has quit [Ping timeout: 264 seconds]
cosimone has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
aeth has quit [Ping timeout: 264 seconds]
aeth has joined #commonlisp
aeth has quit [Ping timeout: 265 seconds]
aeth has joined #commonlisp
tyson2 has joined #commonlisp
aeth has quit [Ping timeout: 264 seconds]
aeth has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
Oddity has joined #commonlisp
<lisp123> Is it okay to use the same package for my tests as my main package?
cage has quit [Quit: rcirc on GNU Emacs 27.1]
rogersm has quit [Quit: Leaving...]
<stacksmith> lisp123: if it's just for your own use, anything goes
nckx has quit [Quit: Updating my Guix System <https://guix.gnu.org>]
nckx has joined #commonlisp
knobo has quit [Quit: Client closed]
<lisp123> stacksmith: Thanks. An alternative I found is (do-symbols (s (find-package "my-package")) (shadowing-import (find-symbol (symbol-name s) "my-package")))
<lisp123> (If anybody thinks thats a bad idea for importing all internal symbols, let me know)
aeth has quit [Ping timeout: 258 seconds]
aeth has joined #commonlisp
<_death> you could have an implementation package that exports both symbols for external use and internally used symbols that you want to refer to in your tests.. then an external interface package can use it and export only the former symbols
<lisp123> _death: Thank you!! That is genius (and solves a problem I was facing with a brute force shadowing-import)
<White_Flame> personally, I think it's reasonable for tests to invasively use foo::bar to get at the internals of what it's testing
<White_Flame> I'm not sure that's a widely held opinion, though
<lisp123> White_Flame: Yeah, I have the same view. And I got tired of typing foo:: for every test
<_death> I think it's ok (and not just for testing, as long as you've control of both ends), but may get a bit verbose
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
peterhil has joined #commonlisp
<Nilby> It turns out I mostly test the external interface, but if not, it's foo:: and the essential multiple-cursors!
<shka> lisp123: i write my tests in the same package and i think that this is fine, but you gonna need separate asdf system for tests
aartaka has quit [Ping timeout: 265 seconds]
<lisp123> shka: Thanks, yes I have that. I've ended up keeping the test package separate and doing the above trick to import all the symbols into it
aartaka has joined #commonlisp
<shka> yeah, that also works,
<_death> Nilby: indeed.. I often use package inferred systems style, so I can test functionality of internal modules since they export their symbols as external interface for internal use
<shka> there are benefits of having separate package, but i simply don't bother
<shka> usually i run my tests in a clean lisp image anyway
<_death> Nilby: but I did use foo::bar recently, as I have a module for visualization that needs to specialize on some classes and obtain information from their instances, and I didn't want to export those symbols
<stacksmith> I try to keep things separate, but when it takes too much effort I remind myself that it is likely that no one else will ever see the crap I am making.
<Nilby> _death: I want to like package inferred systems, but I can't get myself to.
<Nilby> that "::" always works is programming freedom that many languages can't handle
<_death> they work very well for some (most) of my use cases.. though I did have one or two projects where a more coarse approach would've been better
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
<Nilby> Many package and systems 1-to-1, but some package and systems relationship status has to be: "It's complicated."
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 258 seconds]
peterhil has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
mrcom has quit [Read error: Connection reset by peer]
mrcom_ has quit [Ping timeout: 260 seconds]
mrcom has joined #commonlisp
gaqwas has quit [Ping timeout: 245 seconds]
gaqwas has joined #commonlisp
<kagevf> somebody on reddit posted about a "conduit" approach the other day ...
mrcom has quit [Read error: Connection reset by peer]
<kagevf> it was here: https://tfeb.github.io/ look under "Conduit packages for Common Lisp" .... might be useful for handling packages
dec0d3r has joined #commonlisp
lisp123 has joined #commonlisp
aartaka has quit [Ping timeout: 265 seconds]
papertanuki has joined #commonlisp
mrcom has joined #commonlisp
<papertanuki> Hi everyone! I have a quick CFFI question that I could't find on the documentation.
<Bike> what's up?
<papertanuki> How do you translate a C struct that contains an array (really a pointer, and a counter) of other structs?
<papertanuki> Ie: ```typedef struct Model {
<papertanuki> Matrix transform;
<papertanuki> int meshCount;
<papertanuki> Mesh *meshes;
<papertanuki> int materialCount;
<papertanuki> Material *materials;
<papertanuki> int *meshMaterial;
<papertanuki> // Animation data
<papertanuki> int boneCount;
<papertanuki> BoneInfo *bones;
<papertanuki> Transform *bindPose; ``
<Bike> please use a paste service if you have several lines of code
<Bike> anyway, i think you just need to put :pointer
<Bike> if you have a defcstruct for BoneInfo or whatnot, you can specify (:pointer bone-info) if you want, but i think cffi ignores the underlying types of pointers
<papertanuki> Sorry, first time using IRC.
<papertanuki> how's that different from (:struct bone-info) ?
<Bike> oh, you're right, (:pointer (:struct bone-info)) then
<Bike> but again it doesn't matter
lisp123 has quit [Ping timeout: 264 seconds]
<papertanuki> So when translating using `translate-from-foreign`, is there a way to get all of the bones in a lisp array?
shka has quit [Ping timeout: 258 seconds]
<Nilby> papertanuki: You can use mem-aref in a loop on "bones" and then with-foreign-slots or foreign-slot-value of the struct pointer get the data out. The CFFI manual has decent examples.
pve has quit [Quit: leaving]
cosimone has quit [Ping timeout: 260 seconds]
icer has joined #commonlisp
semz has quit [Quit: Leaving]
semz has joined #commonlisp
<papertanuki> Nilby: Thanks, I'll try that
paule32 has left #commonlisp [Leaving]
kevingal has joined #commonlisp
Spawns_Carpeting has joined #commonlisp
kevingal has quit [Remote host closed the connection]
mrcom_ has joined #commonlisp
spec has quit [Ping timeout: 265 seconds]
antoszka has quit [Ping timeout: 268 seconds]
akoana has joined #commonlisp
X-Scale has quit [Ping timeout: 265 seconds]
spec has joined #commonlisp
antoszka has joined #commonlisp
hexology has joined #commonlisp
X-Scale has joined #commonlisp
Guest-liao has joined #commonlisp