jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
Jesin has joined #lisp
akoana has left #lisp ["Leaving"]
nicktick has joined #lisp
charles` has quit [Ping timeout: 264 seconds]
specbot has quit [Remote host closed the connection]
specbot has joined #lisp
specbot has quit [Read error: Connection reset by peer]
loke[m] has quit [Ping timeout: 246 seconds]
specbot has joined #lisp
loke[m] has joined #lisp
minion has quit [Disconnected by services]
minion has joined #lisp
copec has quit [Ping timeout: 246 seconds]
madand_ has joined #lisp
Kingsy has quit [Ping timeout: 245 seconds]
madand has quit [Ping timeout: 245 seconds]
dmiles[m] has quit [Ping timeout: 246 seconds]
copec has joined #lisp
quanta[m] has quit [Ping timeout: 246 seconds]
jdormit has quit [Ping timeout: 246 seconds]
torbo has joined #lisp
Kingsy has joined #lisp
<torbo> Is the runtime of the length function when called on a string in Common Lisp/SBCL (O 1) or (O n), where n is the number of characters in the string?
rtypo has quit [Ping timeout: 245 seconds]
<Bike> almost certainly constant time.
dmiles[m] has joined #lisp
<torbo> Wonderful, thank you.
<Bike> there's no formal guarantee or anything, but every lisp implementation i know of implements strings (and arrays generally) as contiguous memory blocks like you'd expect
<torbo> Right, I'm wondering whether the size of the contiguous memory block is something that's tracked, or does SBCL have to iterate through it until it gets to the end to find out how big it is.
rumbler31 has joined #lisp
jdormit has joined #lisp
quanta[m] has joined #lisp
Kingsy has quit [Changing host]
Kingsy has joined #lisp
gzj has joined #lisp
louis771 has quit [Quit: My M1 has gone to sleep. ZZZzzz…]
warweasle has quit [Quit: rcirc on GNU Emacs 26.1]
iamFIREcracker has joined #lisp
iamFIREc1 has quit [Ping timeout: 264 seconds]
<torbo> A small benchmark indicates it is constant time.
bitmapper has quit [Quit: Connection closed for inactivity]
ewd has quit [Ping timeout: 264 seconds]
<Bike> i mean, and the size is tracked, yes
<Bike> technically an implementation could not do this, and instead use null termination or something, but that's pretty unlikely
<Bike> not least because you can throw #\Nul into the middle of strings
pillton has joined #lisp
jonatack_ has joined #lisp
jonatack has quit [Ping timeout: 264 seconds]
mindCrime has joined #lisp
<torbo> Yes, thanks.
jonatack_ has quit [Ping timeout: 246 seconds]
jonatack_ has joined #lisp
Feldman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeosol has quit [Quit: Connection closed]
gitgood has quit [Read error: Connection reset by peer]
jonatack_ has quit [Read error: Connection reset by peer]
rumbler31 has quit [Remote host closed the connection]
jeosol has joined #lisp
wxie has joined #lisp
skapata has quit [Remote host closed the connection]
ech has quit [Ping timeout: 268 seconds]
loke[m] has quit [Ping timeout: 240 seconds]
susam has quit [Ping timeout: 240 seconds]
kaisyu[m] has quit [Ping timeout: 240 seconds]
ms[m] has quit [Ping timeout: 240 seconds]
quanta[m] has quit [Ping timeout: 240 seconds]
MrtnDk[m] has quit [Ping timeout: 258 seconds]
cloudy[m] has quit [Ping timeout: 244 seconds]
infra_red[m] has quit [Ping timeout: 244 seconds]
katco has quit [Ping timeout: 240 seconds]
theothornhill[m] has quit [Ping timeout: 240 seconds]
deselby has quit [Ping timeout: 240 seconds]
even4void[m] has quit [Ping timeout: 240 seconds]
ThaEwat has quit [Ping timeout: 272 seconds]
ey[m] has quit [Ping timeout: 258 seconds]
kreyren has quit [Ping timeout: 240 seconds]
jdormit has quit [Ping timeout: 244 seconds]
Gnuxie[m] has quit [Ping timeout: 240 seconds]
acolarh has quit [Ping timeout: 245 seconds]
amk has quit [Ping timeout: 246 seconds]
charles` has joined #lisp
amk has joined #lisp
niac has joined #lisp
gitgood has joined #lisp
Josh_2 has quit [Read error: Connection reset by peer]
Josh_2 has joined #lisp
iskander has quit [Ping timeout: 265 seconds]
ukari has quit [Remote host closed the connection]
loke[m] has joined #lisp
ukari has joined #lisp
acolarh has joined #lisp
asdflkj has quit [Ping timeout: 245 seconds]
iskander has joined #lisp
phantomics has quit [Quit: Ex-Chat]
semz has quit [Ping timeout: 240 seconds]
Sheilong has quit []
kaisyu[m] has joined #lisp
susam has joined #lisp
cloudy[m] has joined #lisp
theothornhill[m] has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
MrtnDk[m] has joined #lisp
jdormit has joined #lisp
ms[m] has joined #lisp
zaquest has quit [Remote host closed the connection]
iamFIREcracker has quit [Read error: Connection reset by peer]
iamFIREcracker has joined #lisp
ey[m] has joined #lisp
gitgoood has joined #lisp
deselby has joined #lisp
kreyren has joined #lisp
Gnuxie[m] has joined #lisp
gitgood has quit [Read error: Connection reset by peer]
quanta[m] has joined #lisp
ThaEwat has joined #lisp
katco has joined #lisp
Oladon has joined #lisp
even4void[m] has joined #lisp
hineios has quit [Ping timeout: 260 seconds]
hineios has joined #lisp
infra_red[m] has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Tordek has joined #lisp
zaquest has joined #lisp
torbo has quit [Remote host closed the connection]
Tordek has quit [Quit: Lost terminal]
Tordek has joined #lisp
notzmv- has joined #lisp
notzmv has quit [Ping timeout: 246 seconds]
kaiwulf has joined #lisp
notzmv- is now known as notzmv
wxie has quit [Ping timeout: 260 seconds]
rumbler31 has joined #lisp
gitgoood has quit [Read error: Connection reset by peer]
rumbler31 has quit [Ping timeout: 264 seconds]
DateMasamune2000 has joined #lisp
DateMasamune2000 has quit [Client Quit]
<jasom> Technically Nul is not one of the standard characters so an implementation could fail to support embedded Nul characters
<Bike> i didn't mention that since that makes the scenario more fanciful. also if there is a character it would have to support putting that character in a string
mindCrime has quit [Ping timeout: 264 seconds]
charles` has quit [Ping timeout: 246 seconds]
Alfr is now known as Guest17738
Guest17738 has quit [Killed (egan.freenode.net (Nickname regained by services))]
Alfr has joined #lisp
cartwright has quit [Remote host closed the connection]
<beach> Good morning everyone!
cartwright has joined #lisp
rwcom60280385034 has quit [Ping timeout: 265 seconds]
bitmapper has joined #lisp
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
<easye> Mornin' Beach. How's the ELS submission coming?
aartaka has joined #lisp
Bike has quit [Quit: leaving]
<beach> Fine. It's almost done I think.
<easye> Great!
gzj has quit [Remote host closed the connection]
<beach> ... in case someone is interested.
<beach> easye: What are you working on these days?
<easye> Unfortunately (?) just "work": Ravenpack.
<easye> Right now I'm mucking around with getting JSOWN to output UTF-8 characters.
<beach> Well, Ravenpack is better than most I would think.
<easye> ABCL could really use a release that optimizes loading times: the new implementation of loading things in abcl-1.8.0 slowed things down by a factor of 2x-3x.
<easye> I am very happy to writing Common Lisp for Ravenpack.
<beach> Sure.
<easye> And can one really call it "work" if it is for a CL shop?
<beach> If not, I can't say I have "worked" much at all, ever.
<beach> So I would call it "work".
<easye> Oh, you "work" harder than most from what I can tell...
<edgar-rft> if you don't call it work then you won't get paid I assume
<beach> easye: Thanks (I guess).
<easye> edgar-rft: I suppose that is one valorization of "work".
<easye> beach: it was meant as a straight-ahead, non ironic, compliment
<beach> easye: Yes, I know. I just don't know whether it is good to work a lot (and not get much done) or work less (for the same amount of work).
<easye> The steady tortoise beats the lazy hare.
<easye> I think plugging away some fixed amount every workday is the right approach.
<beach> In the past I often had students who complained about mediocre grades on some homework, saying they put in a lot of work. But I told them, it's the result that counts, not how tired you are.
<easye> Hmm, school. Kinda different from "work" for me, but it was so long ago.
xristos_ is now known as xristos
xristos has quit [Changing host]
xristos has joined #lisp
rozenglass has quit [Remote host closed the connection]
_whitelogger has joined #lisp
Lycurgus has joined #lisp
fitzsim has quit [Ping timeout: 246 seconds]
kaiwulf has quit [Ping timeout: 272 seconds]
Oladon has quit [Quit: Leaving.]
luni has joined #lisp
wxie has joined #lisp
jrm has quit [Quit: ciao]
jrm has joined #lisp
contrapunctus has joined #lisp
Lycurgus has quit [Quit: Exeunt]
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
narimiran has joined #lisp
sauvin has joined #lisp
maier has joined #lisp
yonkunas has quit [Quit: Connection closed for inactivity]
maier has quit [Client Quit]
Nilby has joined #lisp
maier has joined #lisp
perrier-jouet has quit [Quit: WeeChat 3.0.1]
waleee-cl has quit [Quit: Connection closed for inactivity]
pve has joined #lisp
surabax has joined #lisp
MadestMadness_ has quit [Ping timeout: 240 seconds]
louis771 has joined #lisp
FennecCode has joined #lisp
bitmapper has quit [Quit: Connection closed for inactivity]
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
attila_lendvai has joined #lisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.1)]
scymtym has quit [Remote host closed the connection]
elflng has quit [Ping timeout: 264 seconds]
ebrasca has joined #lisp
CrazyEddy has quit [Remote host closed the connection]
<White_Flame> so when using ql libs that pull in .so/.dynlib, are there tools or best practices on how to get an actual executable that doesn't die on startup on another machine without a bunch of stuff natively installed?
<White_Flame> zlib and openssl seem to be major culprits here, by way of a webserver
zupss has joined #lisp
<White_Flame> but who knows what else might be lurking
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
thonkpod_ has quit [Ping timeout: 240 seconds]
thonkpod_ has joined #lisp
contrapunctus has joined #lisp
Papillon has joined #lisp
<moon-child> White_Flame: bundle all the libs you need. You should be able to use strace (or similar) to see everything that gets loaded
<White_Flame> as I've not done this before, is it common across OSes to search for dynamic libraries in the executable's directory?
<moon-child> no. Windows does it, other OSes do not
<moon-child> you need to set LD_LIBRARY_PATH
<moon-child> (or possible you can set rpath in the executable)
<White_Flame> LD_LIBRARY_PATH is used on OSX as well?
<moon-child> DYLD_LIBRARY_PATH there I think
<White_Flame> thanks, will do some fiddling
casual_friday_ has joined #lisp
casual_friday has quit [Ping timeout: 264 seconds]
Papillon has quit [Quit: Connection closed]
<moon-child> also if you put the libs in a separate dir from the executable (which is imo cleaner), the variable to set on windows is PATH
shka_ has joined #lisp
kreyren has quit [Changing host]
kreyren has joined #lisp
kreyren has joined #lisp
anticrisis has quit [Read error: Connection reset by peer]
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
scoofy has quit [Ping timeout: 276 seconds]
luni has quit [Quit: Connection closed]
heisig has joined #lisp
random-nick has joined #lisp
karlosz has quit [Quit: karlosz]
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
ljavorsk has joined #lisp
contrapunctus has joined #lisp
Necktwi has quit [Ping timeout: 256 seconds]
Necktwi has joined #lisp
jonatack_ has joined #lisp
scoofy has joined #lisp
paulj has quit [Remote host closed the connection]
Necktwi has quit [Ping timeout: 245 seconds]
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 268 seconds]
pranavats has joined #lisp
nicktick has quit [Ping timeout: 260 seconds]
kam1 has joined #lisp
kam1 has quit [Ping timeout: 264 seconds]
jonatack_ has quit [Quit: jonatack_]
jonatack has joined #lisp
harlchen[m] has joined #lisp
rogersm has joined #lisp
varjag has joined #lisp
Juonu has joined #lisp
scymtym has joined #lisp
scymtym has quit [Remote host closed the connection]
scymtym has joined #lisp
Feldman has joined #lisp
Cymew has joined #lisp
elflng has joined #lisp
madage has quit [Ping timeout: 268 seconds]
v3ga has quit [Ping timeout: 240 seconds]
v3ga has joined #lisp
madage has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
wxie has quit [Ping timeout: 246 seconds]
VincentVega has joined #lisp
galex-713 has joined #lisp
vegansbane6963 has quit [Quit: The Lounge - https://thelounge.chat]
niac has quit [Ping timeout: 245 seconds]
Sheilong has joined #lisp
frgo has quit [Remote host closed the connection]
perrier-jouet has joined #lisp
frgo has joined #lisp
rtypo has joined #lisp
attila_lendvai has quit [Ping timeout: 260 seconds]
vegansbane6963 has joined #lisp
VincentVega has quit [Ping timeout: 240 seconds]
CrazyEddy has joined #lisp
ech has joined #lisp
kevingal has joined #lisp
narimiran has quit [Quit: leaving]
rozenglass has joined #lisp
jprajzne has quit [Ping timeout: 246 seconds]
sm2n has quit [Ping timeout: 256 seconds]
jeosol has quit [Quit: Connection closed]
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 260 seconds]
jprajzne has joined #lisp
sm2n has joined #lisp
niac has joined #lisp
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #lisp
Feldman has quit [Quit: Textual IRC Client: www.textualapp.com]
cosimone has joined #lisp
asdflkj has joined #lisp
rtypo has quit [Ping timeout: 256 seconds]
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #lisp
niac has quit [Ping timeout: 246 seconds]
niac has joined #lisp
skapata has joined #lisp
iskander- has joined #lisp
iskander- has quit [Client Quit]
iskander has quit [Ping timeout: 246 seconds]
gitgood has joined #lisp
iskander has joined #lisp
theruran has quit [Quit: Connection closed for inactivity]
Lycurgus has joined #lisp
jonatack has quit [Ping timeout: 265 seconds]
rgherdt has quit [Ping timeout: 258 seconds]
rumbler31 has joined #lisp
Lycurgus has quit [Quit: Exeunt]
rumbler31 has quit [Ping timeout: 245 seconds]
xantoz has joined #lisp
ukari has quit [Remote host closed the connection]
gitgood has quit [Read error: Connection reset by peer]
ukari has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
Bike has joined #lisp
ljavorsk has quit [Ping timeout: 260 seconds]
iamFIREcracker has quit [Ping timeout: 245 seconds]
jeosol has joined #lisp
villanella has joined #lisp
iskander has quit [Ping timeout: 256 seconds]
iamFIREcracker has joined #lisp
yonkunas has joined #lisp
theruran has joined #lisp
villanella has quit [Ping timeout: 260 seconds]
warweasle has joined #lisp
mrchampion has quit [Ping timeout: 260 seconds]
rgherdt has joined #lisp
cosimone has quit [Quit: cosimone]
gitgood has joined #lisp
rtypo has joined #lisp
mrchampion has joined #lisp
charles` has joined #lisp
Noisytoot has joined #lisp
rgherdt has quit [Ping timeout: 240 seconds]
bitmapper has joined #lisp
cosimone has joined #lisp
gitgood has quit [Read error: Connection reset by peer]
gigetoo has quit [Ping timeout: 260 seconds]
gitgood has joined #lisp
gigetoo has joined #lisp
rogersm has quit [Quit: Leaving...]
Necktwi has joined #lisp
cosimone has quit [Quit: cosimone]
sjl has joined #lisp
hiroaki_ has quit [Ping timeout: 260 seconds]
frost-lab has quit [Quit: Connection closed]
caret has joined #lisp
totoro2021 has quit [Ping timeout: 240 seconds]
totoro2021 has joined #lisp
hiroaki_ has joined #lisp
fitzsim has joined #lisp
fitzsim has quit [Remote host closed the connection]
fitzsim has joined #lisp
jonatack has joined #lisp
maier has quit [Ping timeout: 265 seconds]
niac has quit [Ping timeout: 256 seconds]
<Josh_2> Afternoon
gitgoood has joined #lisp
<warweasle> Josh_2: Morn'n.
<Josh_2> Whats the go to way to update already dumped lisp images? Do you normally just tell users there is a new version and get them to swap them out? Surely they could just update their running image?
gitgood has quit [Read error: Connection reset by peer]
<Josh_2> I dont want to tell a user that they have to keep changing out their lisp image, I'd rather they just ran a script and it updated itself while running, I'm sure someone has done this before
iskander has joined #lisp
<etimmons> Josh_2: I don't know of any way to switch images while running. But if you distributed fasls you could load those into a running image to "patch" it.
<_death> some system definition facilities have rudimentary support in terms of "patches"
<Josh_2> sorry I wasn't clear enough, I don't mean swap images, thats equivalent to just getting and starting a new binary
<Josh_2> thats what I'm trying to avoid
sz0 has quit [Quit: Connection closed for inactivity]
<Nilby> Updating from code is fairly easy, but can have problems. Most Lisp's can't update the image and keep running said code.
<Josh_2> Right, main loops etc would have to be restarted
<phoe> if you need to replace those main loops, that is
<Josh_2> Ofcourse
<phoe> most of the time you don't
<Nilby> I used to update my running web app all time, but from code not the image.
<etimmons> White_Flame: If you're going to distribute a MacOS binary that depends on libssl, I'd recommend using the OS provided libs instead of the ones from Homebrew.
<phoe> you could also architect your image in a way that allows it to check for updates before running everything
<Josh_2> Nilby: yes thats what I mean
<etimmons> White_Flame: IIRC, Homebrew's openssl doesn't integrate with the system keychain to get certificates and such.
<phoe> s/everything/the main loop/
<phoe> etimmons: AFAIK libcrypto.dylib fails on modern macos/apple silicon because it has an unversioned API and Apple decided to make this a breaking change
<Josh_2> phoe: that could work because the program is user facing and could just receive a command to update which would stop and restart it
<Nilby> I would just reload with asdf, and the next time it got a request it would run the new code.
<phoe> Josh_2: sure, that would work
<White_Flame> etimmons: I only pulled libs from quicklisp
<White_Flame> hmm, actually, I need to confirm that. This isn't my box
<Josh_2> I also want to be able to hotload code straight into my running image, so that modules can be added/removed from my project as the user chooses
<Josh_2> I guess that this can be done by distributing fasls?
<phoe> Josh_2: yes
<etimmons> phoe: There's a patch to fix it in https://github.com/cl-plus-ssl/cl-plus-ssl/pull/115. You can also work around it until the PR is merged by loading the versioned dylib yourself and pushing :cl+ssl-foreign-libs-already-loaded to *features*
<Josh_2> Okay cool beans. I've know very little about fasls files, I guess It's time to change that
nicktick has joined #lisp
<phoe> etimmons: thanks, TIL!
madand_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
<etimmons> White_Flame: your pastebin has /usr/local/opt/openssl/lib/libcrypto.dylib as the path it's trying to load. I think that's the Homebrew path
<White_Flame> hmm, so at startup sbcl doesn't search the library path for dylibs, but rather just hits the exact same path that was used when the image was saved?
<White_Flame> *exact same pathname
<etimmons> Nothing wrong with that per se, but if you're going to share it with people that don't have Homebrew installed, I think they'll have a not-so-great time when that lib looks for trusted certs where Homebrew installs them
madand has joined #lisp
<etimmons> Not quite
<etimmons> SBCL remembers the string that was used to load the lib
<White_Flame> right, it should do the "right thing"
<White_Flame> so i wonder where all that resolution happens
<etimmons> So if you load the foreign lib "libssl.so" then it'll search again on startup. But if you give an absolute path, it'll try using that path exactly
<White_Flame> I don't give any paths. This is just ql library usage
<White_Flame> so whatever cl+ssl or whichever dependency is loading that determines how the load happens
<etimmons> Of course, you could tweak that on dump by modifying SBCL's list of foreign libs
<etimmons> cl+ssl uses many hardcoded paths on Darwin: https://github.com/cl-plus-ssl/cl-plus-ssl/blob/master/src/reload.lisp#L44
<etimmons> s/paths/absolute paths/
<White_Flame> yikes
<White_Flame> but yeah, this isn't the first time that macos is insufficient in its defaults
<etimmons> If you want more control over which is used, look at my message to phoe about loading the dylib manually
marcoxa has joined #lisp
<White_Flame> yep
<White_Flame> thanks, this info helps a lot
<etimmons> No worries! libssl is always a bit of a difficult library due to potential integration with OS keychains and such
theBlackDragon has quit [Remote host closed the connection]
<etimmons> Another solution for other libraries is to statically link them into the runtime (assuming you have static libraries and the license allows such a thing)
<White_Flame> yeah, I wish that was more the norm
<etimmons> I do that quite frequently with SBCL on Linux. I assume it's not much more challenging on MacOS
<White_Flame> however, as you bring up the user's keychain issue, that certainly is intimately tied to what's going on in the deployed OS, and not just carried-along algos
<White_Flame> *deployment machine's OS
<etimmons> yep
<White_Flame> hmm, as this is basically a localhost-only application, I probably should be looking to see if clack et al can be built without https dependencies instead
lisp-machine has joined #lisp
<etimmons> Are you using Hunchentoot as the underlying webserver? If so, push :hunchentoot-no-ssl to features before loading it.
<marcoxa> bye guys
marcoxa has quit [Quit: Train to catch]
theBlackDragon has joined #lisp
gitgoood has quit [Read error: Connection reset by peer]
charles` has quit [Ping timeout: 256 seconds]
tinhatcat has joined #lisp
<White_Flame> etimmons: yep, that's it
villanella has joined #lisp
ech has quit [Ping timeout: 268 seconds]
cage_ has joined #lisp
ech has joined #lisp
rumbler31 has joined #lisp
notzmv has quit [Ping timeout: 264 seconds]
heisig has quit [Ping timeout: 256 seconds]
rumbler31 has quit [Remote host closed the connection]
engblom has quit [Read error: Connection reset by peer]
engblom has joined #lisp
rgherdt has joined #lisp
charles` has joined #lisp
Nilby has quit [Ping timeout: 260 seconds]
<Xach> fun fact: i have had some weird errors when doing that, and the root cause was that different *features* contexts still used the same cached fasl
charles` has quit [Ping timeout: 245 seconds]
Oddity- has joined #lisp
villanella has quit [Remote host closed the connection]
Oddity has quit [Ping timeout: 264 seconds]
gitgood has joined #lisp
iskander- has joined #lisp
iskander has quit [Ping timeout: 256 seconds]
srandon111 has joined #lisp
iekfkk has joined #lisp
<iekfkk> t and nil,() is like t and f, so when a func returns its binary value t and f
lisp-machine has quit [Ping timeout: 276 seconds]
<iekfkk> so confusion between f and nil
<iekfkk> ??
<White_Flame> Xach: a make.sh that does rm -rf ~/.cache/common-lisp covers a great many compile-time sins :-P
<beach> iekfkk: There is no such thing as f.
<iekfkk> yup lisp is beauty
<White_Flame> iekfkk: there is NIL and non-NIL as the boolean values in CL
<beach> iekfkk: What is it that you are confused about?
frgo has quit []
<iekfkk> returns r binary unlike python,ruby t,f,nil
<iekfkk> (if non-nil 3 4) err
<beach> iekfkk: It is quite hard to understand what you are trying to say.
<White_Flame> (if nil 3 4) => 4
<iekfkk> function returns r trinary in python- t,f,nil
<White_Flame> (if 'anything-else 3 4) => 3
<iekfkk> White_Flame: u said non-nil i was surprised for a sec
<White_Flame> well, that is the definition. It's sort of like C where anything non-zero is true, and zero is false (might not be correct to the C standard, but that's what's functionally done)
<White_Flame> only false is defined. everything else is true
<iekfkk> is nil same as () for function returns
<White_Flame> nil is the same as () always
<beach> iekfkk: The reader turns () into NIL.
<White_Flame> they're 2 different names for the same object in memory
mindCrime has joined #lisp
phantomics has joined #lisp
<iekfkk> can i previous line scroll in sbcl C-p uparrow don't complete history
orivej has joined #lisp
<beach> iekfkk: Most people use SLIME.
iskander has joined #lisp
<White_Flame> afair, readline isn't used at the plain terminal due to licensing incompatibilities
iskander- has quit [Ping timeout: 264 seconds]
waleee-cl has joined #lisp
<jasom> iekfkk: even if you don't use emacs as your editor, it's good to use SLIME as your REPL. I developed lisp that way for many years.
iskander- has joined #lisp
<iekfkk> kk
iskander has quit [Ping timeout: 260 seconds]
<_death> there was also that rlwrap hack, if you insist
caret has quit [Quit: Bye Felicia]
karlosz has joined #lisp
iskander has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
iskander- has quit [Ping timeout: 260 seconds]
rogersm has joined #lisp
<iekfkk> (defvar t 3) doesn't work
<iekfkk> it seems t is reserved for true... so it can't be defined , is it?
<jasom> iekfkk: "t" is the true value, redefining it isn't allowed.
<iekfkk> but t is a very "generic" variable name like x
<jasom> iekfkk: it's also idiomatic to define dynamic variables (similar to globals in other languages) with asterisks on the side *like-this*
<jasom> and (defvar *t* 3) certainly works
<iekfkk> what about inside function is t is local
<iekfkk> so we can't use *t* in func
<White_Flame> for LET, function parameters, etc, you can't use T either as a local variable name
<jasom> iekfkk: there's 25 other letters you can use
<White_Flame> or be more descriptive in your names
<jasom> it's mildly annoying when writing parametric functinos where t is conventionally used, but otherwise not a big deal
<White_Flame> collide neutrinos to create functinos
<White_Flame> (I make that typo all the time, too :) )
<iekfkk> why t is used in parametric functions?
<jasom> iekfkk: according to wikipedia it comes from kinematics where the equations are parameterized on time
<iekfkk> ahh math ok of course math was what i was thinking especially matrix A,B vs a,b small letters CL doesn't differentiate
<_death> you can use t.. more specifically, temperature:t, time:t, temporary:t, etc.
ewd has joined #lisp
<White_Flame> yeah, if you manually shadow cl:t (or don't :use cl)
<jasom> _death: right but for math it often is just "people use t in this equation and it only stands for an abstract value" that's the only time I'm ever bothered by not having t available
<jasom> and even then it hasn't bothered me enough to shadow cl:t so obviously not that big a deal
scymtym has joined #lisp
<_death> jasom: luckily we programmers learned to put more effort into names :)
<iekfkk> hey (defvar c:x 2) err
notzmv has joined #lisp
<iekfkk> they fooled me saying vars can use any character in their names
<jasom> iekfkk: ":" is the package separator if you want to have a variable that contains ":" in the name you need to quote it e.g. |C:X| or c\:x
* White_Flame greps for "stupid" in his codebase and gets hundreds of lines of very ... verbosely named variable names & functions
<_death> c|:|x could also work ;)
<jasom> oops wrong link
<jasom> clhs 2.1.4
<jasom> ^^ that's the right one
<jasom> anything that's a "terminating macro char" can't be used unquoted as part of a symbol (and therefore as a variable name)
<jasom> anything that's a "non-terminating macro char" (i.e. just #) cannot be used unqouted at the begining of a token
<jasom> so foo#bar is okay but not #foobar
<jasom> clhs 2.3.5
_jrjsmrtn has joined #lisp
<jasom> And that one explains why c:x doesn't work. It looks for "X" in the "C" package.
peasynt has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
__jrjsmrtn__ has quit [Ping timeout: 260 seconds]
villanella has joined #lisp
<iekfkk> whats shadow cl:t mean
<iekfkk> i gueess cl is a pkg and t is true
<iekfkk> and t is aliased to cl:t
<iekfkk> smart guess
hendursaga has joined #lisp
<jasom> iekfkk: yesl when I said you can't use "T" as a variable name, I actually lied. variables are named by symbols, not strings. COMMON-LISP:T is not allowed, but MY-PACKAGE:T *is* allowed. When you import most symbols from another package, but exclude a few, that's called "shadowing"
<jasom> and "CL" is an alias (called a nickname) for the COMMON-LISP package.
rumbler31 has joined #lisp
<jasom> that being said, be kind to anybody who might read your code down the line, and don't shadow T. It will only confuse them.
<iekfkk> it'd be smart to have T for true instead and case-sensitiveness
hendursa1 has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Ping timeout: 245 seconds]
jprajzne has quit [Ping timeout: 256 seconds]
<jasom> you can use readtables to get case-sensitivity, but that is rarely used, and when I've seen it used usually case is inverted so "t" would be true and "T" would be free for use. If you do case preserving rather than case inverting your code looks like (DEFUN foo (bar baz &REST r) (LET (b) (CAR baz)))
<White_Flame> iekfkk: also, #clschool is another channel that focuses on beginner answers. Complete answers are normally found here :)
anticrisis has joined #lisp
sauvin has quit [Remote host closed the connection]
jprajzne has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
iekfkk has quit [Ping timeout: 276 seconds]
akoana has joined #lisp
maier has joined #lisp
frgo has joined #lisp
luni has joined #lisp
luni has joined #lisp
luni has quit [Changing host]
jonatack_ has joined #lisp
jonatack has quit [Ping timeout: 260 seconds]
charles` has joined #lisp
villanella has quit [Ping timeout: 240 seconds]
villanella has joined #lisp
villanella has quit [Remote host closed the connection]
maier has quit [Ping timeout: 276 seconds]
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
rogersm has quit [Quit: Leaving...]
Cymew has quit [Quit: Konversation terminated!]
louis771 has quit [Quit: My M1 has gone to sleep. ZZZzzz…]
asdflkj has quit [Ping timeout: 260 seconds]
asdflkj has joined #lisp
louis771 has joined #lisp
gigetoo has quit [Ping timeout: 260 seconds]
shka_ has quit [Quit: Konversation terminated!]
<jmercouris> is there some other way to get the second value other than (nth-value 1 ...)?
<jmercouris> like something like (second-value ...)
<mfiano> (multiple-value-bind (first-value second-value) values (declare (ignore first-value)) second-value)
louis771 has quit [Quit: Textual IRC Client: www.textualapp.com]
<jmercouris> Yeah, I know that
<jmercouris> I'm looking for something like (second ..)
<jmercouris> something very concise
<mfiano> Then you'll have to write it
<jmercouris> OK, thanks
gigetoo has joined #lisp
jonatack_ has quit [Quit: jonatack_]
<White_Flame> (second (multiple-value-list (func....))) appears to be non-consing in sbcl when optimizations are cranked
jonatack has joined #lisp
<White_Flame> but it does generate over a hundred bytes of asm
luni has quit [Quit: Connection closed]
<White_Flame> oops, nevermind, there's the call to LIST ;)
hiroaki_ has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 264 seconds]
hiroaki has joined #lisp
hiroaki_ has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 26.1]
casual_friday has joined #lisp
casual_friday_ has quit [Ping timeout: 246 seconds]
hiroaki_ has quit [Ping timeout: 246 seconds]
galex-713 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
ewd has quit [Ping timeout: 256 seconds]
ukari has quit [Remote host closed the connection]
bitmapper has quit [Quit: Connection closed for inactivity]
ukari has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
hiroaki_ has joined #lisp
bitmapper has joined #lisp
iskander has quit [Quit: bye]
matryoshka` has joined #lisp
matryoshka has quit [Read error: Connection reset by peer]
VincentVega has joined #lisp
<VincentVega> Do compilers optimize away asserts on low safety levels? Or under some other conditions? I am thinking of replacing an assert with a when + error, because I want to signal a specific condition and not just simple-error, but it's in a somewhat intense place, so I am a bit unsure if I should do that. Tips?
galex-713 has joined #lisp
davisr has joined #lisp
<_death> (i) assert is not optimized away (ii) you can give assert a condition to signal
<Alfr> Maybe if the compiler can prove that it's always true, but otherwise it need to be checked.
<Alfr> *needs
<White_Flame> you can always make your own compile-time decision whether or not to include checks with macros
<Alfr> Oh ... and it has to be side-effect free.
<Alfr> It's assert not check-type, got a bit confused there.
<White_Flame> I've made a bunch of this sort of thing where the flag can be compile-time off, runtime selectable, and depending on the flag's value per-situation checked
<VincentVega> _death: gee, skimmed the page for it 3 times, only now I see that it's datum, thanks!
iskander has joined #lisp
cage_ has quit [Quit: Leaving]
iskander has quit [Client Quit]
jeosol has quit [Quit: Connection closed]
<VincentVega> White_Flame: Yeah, I see, writing my own macros works too!
iskander has joined #lisp
<VincentVega> White_Flame: where do you keep the flag and how do you set it?
<VincentVega> *flags
<White_Flame> often in a sb-ext:defglobal
<White_Flame> defvar if not available
<White_Flame> set it from the repl before recompilation to change between compile-time & runtime
<White_Flame> set it anytime to enable/disable runtime options if that's compiled in
<VincentVega> Gotcha. Was hoping for maybe some sort of an asdf-level thing on system-load, but I guess this works too.
<White_Flame> I've built way too many things to count, that ended up already being in, or eventually created in, asdf or alexandria :-P
<White_Flame> but yeah, for this sort of thing we tend to have tons of debug tests that are either too huge on the logs to be readable, or too heavy on inner loops to keep on all the time, so flexibility is nice
<VincentVega> Sure. Thanks for sharing btw : )
<White_Flame> np
ebrasca has quit [Remote host closed the connection]
kevingal has quit [Remote host closed the connection]
<phoe> _death: "you can give assert a condition to signal" an actual condition? isn't it just an error with a customizable report?
gitgoood has joined #lisp
gitgood has quit [Read error: Connection reset by peer]
<phoe> seems like it is; the spec mentions an error of type ERROR
aartaka_d has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
pankajsg has quit [Ping timeout: 245 seconds]
<_death> clhs 9.1.2.1
Lord_of_Life has quit [Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine]
Lord_of_Life has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
matryoshka` has quit [Ping timeout: 240 seconds]
kaiwulf has joined #lisp
<phoe> !
<White_Flame> I think you mean p? #scheme is that way ->
<phoe> yes, I am in the wrong
<phoe> (assert ... () 'type-error :datum 42 :expected-type 'string) works as intended
<White_Flame> (argh, ?, not !)
ljavorsk has joined #lisp
<mfiano> Actually, the Norvig/Pitman LUV slides recommend using ?/! if you are to be consistent in your naming.
surabax has quit [Quit: Leaving]
iskander has quit [Quit: bye]
iskander has joined #lisp
hiroaki_ has quit [Ping timeout: 272 seconds]
matryoshka has joined #lisp
hiroaki_ has joined #lisp
akoana has quit [Quit: leaving]
hiroaki has quit [Ping timeout: 246 seconds]
hiroaki_ has quit [Ping timeout: 272 seconds]
hiroaki has joined #lisp
hiroaki1 has joined #lisp
hiroaki has quit [Ping timeout: 260 seconds]
rgherdt has quit [Ping timeout: 264 seconds]
hiroaki_ has joined #lisp
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
iamFIREc1 has joined #lisp
iamFIREcracker has quit [Ping timeout: 256 seconds]
jonatack has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Ping timeout: 276 seconds]
hiroaki_ has quit [Ping timeout: 272 seconds]
notzmv has quit [Read error: Connection reset by peer]
gitgoood has quit [Read error: Connection reset by peer]
random-nick has quit [Ping timeout: 256 seconds]
pve has quit [Quit: leaving]
Lycurgus has joined #lisp