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
dilated_dinosaur has quit [Ping timeout: 240 seconds]
tychoish has quit [Quit: ish]
tychoish has joined #lisp
torbo has joined #lisp
kaftejiman has quit [Remote host closed the connection]
akoana has joined #lisp
lnostdal has quit [Ping timeout: 240 seconds]
EvW has quit [Ping timeout: 240 seconds]
schmr has joined #lisp
schmr has left #lisp [#lisp]
ralt has quit [Quit: Connection closed for inactivity]
lnostdal has joined #lisp
FennecCode has quit [Quit: IRCNow and Forever!]
Josh_2 has quit [Remote host closed the connection]
iAmDecim has joined #lisp
maplambda has quit [Ping timeout: 256 seconds]
vutral has quit [Quit: Connection closed for inactivity]
stepnem_ has joined #lisp
stepnem has quit [Read error: Connection reset by peer]
<sjl> phoe: also trying to narrow down that hash table bug. Am I just losing my mind? This has to be a bug, right? https://paste.stevelosh.com/4f295a1ca1dc8cae4cdff172fd198fc2724f046d
space_otter has joined #lisp
<sjl> Aha, I figured it out. One of the ""'s is an array with a fill pointer.
mangoicedtea has quit [Quit: Leaving]
nicktick has quit [Ping timeout: 240 seconds]
Blukunfando has quit [Ping timeout: 240 seconds]
nicktick has joined #lisp
jesse1010 has quit [Ping timeout: 265 seconds]
takadasan has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
Bourne has joined #lisp
gaqwas has quit [Ping timeout: 256 seconds]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
dxtr has quit [Ping timeout: 244 seconds]
Oladon has joined #lisp
dxtr has joined #lisp
ebrasca has quit [Remote host closed the connection]
iAmDecim has quit [Ping timeout: 240 seconds]
libertyprime has joined #lisp
libertyprime has quit [Client Quit]
libertyprime has joined #lisp
Blukunfando has joined #lisp
Alfr_ has joined #lisp
Alfr__ has quit [Ping timeout: 244 seconds]
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
abhixec has quit [Ping timeout: 240 seconds]
iAmDecim has joined #lisp
Bike has quit [Quit: Lost terminal]
iAmDecim has quit [Ping timeout: 240 seconds]
<beach> Good morning everyone!
dpd88 has quit [Ping timeout: 244 seconds]
<markasoftware> hi!
brj has quit [Ping timeout: 240 seconds]
brj has joined #lisp
zooey has quit [Ping timeout: 240 seconds]
zooey has joined #lisp
IPmonger has joined #lisp
Bourne has quit [Ping timeout: 246 seconds]
Blukunfando has quit [Ping timeout: 258 seconds]
IPmonger has quit [Remote host closed the connection]
FennecCode has joined #lisp
IPmonger has joined #lisp
IPmonger has quit [Remote host closed the connection]
IPmonger has joined #lisp
IPmonger has quit [Remote host closed the connection]
Blukunfando has joined #lisp
shangul has joined #lisp
Oladon has quit [Quit: Leaving.]
Necktwi has quit [Ping timeout: 240 seconds]
iAmDecim has joined #lisp
Oladon has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
akoana has left #lisp ["Leaving"]
Necktwi has joined #lisp
gravicappa has joined #lisp
Blukunfando has quit [Ping timeout: 258 seconds]
narimiran has joined #lisp
lottaquestions_ has quit [Quit: Konversation terminated!]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
takadasan has quit [Quit: WeeChat 2.3]
torbo has quit [Remote host closed the connection]
shangul has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
duuqnd has joined #lisp
prite has quit [Ping timeout: 240 seconds]
prite has joined #lisp
rumbler31_ has quit [Ping timeout: 256 seconds]
tamurasan has joined #lisp
karlosz has quit [Quit: karlosz]
secbird has quit [Quit: leaving]
terpri_ has joined #lisp
bocaneri has joined #lisp
terpri has quit [Ping timeout: 240 seconds]
Blukunfando has joined #lisp
sonologico has quit [Remote host closed the connection]
prite has quit [Ping timeout: 264 seconds]
space_otter has quit [Remote host closed the connection]
space_otter has joined #lisp
Oladon has quit [Quit: Leaving.]
Blukunfando has quit []
madage has quit [Remote host closed the connection]
madage has joined #lisp
Blukunfando has joined #lisp
lnostdal has quit [Ping timeout: 258 seconds]
shka_ has joined #lisp
Blukunfando has quit [Read error: Connection reset by peer]
Blukunfando has joined #lisp
Alloc has quit [Ping timeout: 240 seconds]
Archenoth has quit [Read error: Connection reset by peer]
Alloc has joined #lisp
Archenoth has joined #lisp
Blukunfando has quit []
ggole has joined #lisp
edgar-rft has quit [Quit: Leaving]
Christ0p1er has joined #lisp
Blukunfando has joined #lisp
Christ0pher has quit [Ping timeout: 260 seconds]
pve has joined #lisp
Alloc has quit [Ping timeout: 258 seconds]
Alloc has joined #lisp
rogersm has joined #lisp
lnostdal has joined #lisp
Mawile has joined #lisp
Archenoth has quit [Ping timeout: 265 seconds]
rogersm has quit [Quit: Leaving...]
igemnace has quit [Remote host closed the connection]
Alloc has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 260 seconds]
shifty has quit [Ping timeout: 260 seconds]
Alloc has joined #lisp
Bourne has joined #lisp
schweers has joined #lisp
ralt has joined #lisp
Necktwi has quit [Ping timeout: 240 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
liberliver has quit [Quit: liberliver]
liberliver has joined #lisp
terpri has joined #lisp
iamFIREc1 has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
terpri_ has quit [Ping timeout: 260 seconds]
iamFIREcracker has quit [Ping timeout: 240 seconds]
edgar-rft has joined #lisp
space_otter has quit [Remote host closed the connection]
jonatack has quit [Quit: jonatack]
bilegeek has quit [Quit: Leaving]
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
iAmDecim has joined #lisp
dilated_dinosaur has joined #lisp
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
iAmDecim has quit [Ping timeout: 258 seconds]
shangul has joined #lisp
<phoe> oh goodness, OLM on Hacker News
edgar-rft has quit [Quit: Leaving]
Blukunfando has quit [Read error: Connection reset by peer]
banjiewen has quit [Read error: Connection reset by peer]
asedeno has quit [Read error: Connection reset by peer]
tfb has quit [Read error: Connection reset by peer]
frgo_ has joined #lisp
kilimanjaro has quit [Ping timeout: 244 seconds]
lispyone__ has quit [Ping timeout: 256 seconds]
mangul has joined #lisp
frgo has quit [Ping timeout: 244 seconds]
asedeno has joined #lisp
banjiewen has joined #lisp
shangul has quit [Ping timeout: 260 seconds]
lispyone__ has joined #lisp
kilimanjaro has joined #lisp
jerme_ has quit [Ping timeout: 265 seconds]
jerme_ has joined #lisp
mangul is now known as shangul
tfb has joined #lisp
Alloc has quit [Ping timeout: 258 seconds]
luckless_ has quit [Ping timeout: 240 seconds]
iamFIREc1 has quit [Quit: WeeChat 2.9]
ljavorsk has joined #lisp
iamFIREcracker has joined #lisp
Blukunfando has joined #lisp
gaqwas[m] has quit [Quit: Idle for 30+ days]
jonatack has joined #lisp
liamz[m] has quit [Quit: Idle for 30+ days]
Alloc has joined #lisp
edgar-rft has joined #lisp
dra has joined #lisp
cosimone has joined #lisp
orivej has joined #lisp
jesse1010 has joined #lisp
Necktwi has joined #lisp
libertyprime has quit [Remote host closed the connection]
VincentVega has joined #lisp
<VincentVega> mfiano: "But, that was from the ELisp side. Now, you can do so from CL code." That's cool, how do I do that?
<mfiano> VincentVega: It's not in master yet. You'll have to checkout the scratch/345-copy-to-repl-in-emacs branch, and check the documentation commit: https://github.com/joaotavora/sly/commit/a2db6d85c30d86a3c5968f723e61a86d2d6838c1
<VincentVega> mfiano: nice, will definetely check this out when it hits melpa
tumdum has joined #lisp
davepdot_ has joined #lisp
davepdotorg has quit [Ping timeout: 240 seconds]
frgo has joined #lisp
brj has quit [Ping timeout: 265 seconds]
patlv has joined #lisp
brj has joined #lisp
frgo_ has quit [Ping timeout: 240 seconds]
patlv_ has joined #lisp
patlv has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 258 seconds]
jonatack has quit [Read error: Connection reset by peer]
random-nick has joined #lisp
patlv_ has quit [Quit: Leaving]
VincentVega has quit [Remote host closed the connection]
retropikzel has joined #lisp
akoana has joined #lisp
nostoi has joined #lisp
<phoe> Online Lisp Meeting #7 starting in 15 minutes. https://www.twitch.tv/TwitchPlaysCommonLisp
treflip has joined #lisp
<luis> Is it possible to look up a (setf foo) function given a non-constant symbol foo?
<phoe> luis: (fdefinition (list 'setf foo))
<phoe> FUNCTION and SYMBOL-FUNCTION are gonna fail you because one is a specop and the other does not work on extended function designators
<phoe> I got bitten by it a few times
<luis> phoe: yep. thanks!
ghard has joined #lisp
<jackdaniel> if foo is known at read time, you may do something goofy like (function #.`(setf ,foo)) ; but yeah, fdefinition is the right thing to do here
EvW has joined #lisp
<jackdaniel> or, to increase the fun: #'#.`(setf ,foo) ;-) however the reader may not accept that
<phoe> jackdaniel: (funcall (compile nil `(lambda () #'(setf ,foo)))
<jackdaniel> that's nice too
<phoe> FUNCALL COMPILE is the only portable way to have a functional CALL-WITH-HANDLER or CALL-WITH-RESTART :(
yitzi has quit [Quit: yitzi]
orivej has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
grewal has joined #lisp
nostoi has quit [Quit: Verlassend]
bitmapper has quit [Ping timeout: 240 seconds]
stepnem_ has quit [Ping timeout: 240 seconds]
IPmonger has joined #lisp
IPmonger has quit [Remote host closed the connection]
wxie has joined #lisp
stepnem has joined #lisp
epony has quit [Quit: reconfigure brief]
epony has joined #lisp
iamFIREcracker has quit [Read error: Connection reset by peer]
davepdot_ has quit [Remote host closed the connection]
ldb has joined #lisp
davepdotorg has joined #lisp
<ldb> good evening
<beach> Hello ldb.
Blukunfando has quit [Ping timeout: 256 seconds]
ldb` has joined #lisp
ldb has quit [Read error: Connection reset by peer]
IPmonger has joined #lisp
tourjin has joined #lisp
coltkirk has joined #lisp
IPmonger has quit [Remote host closed the connection]
ldb`` has joined #lisp
<ldb``> p
* ldb`` guess I should continute to use irc client in a terminal
ldb` has quit [Ping timeout: 258 seconds]
yitzi has joined #lisp
prite has joined #lisp
ljavorsk has quit [Ping timeout: 256 seconds]
ldb`` has quit [Ping timeout: 258 seconds]
ldb`` has joined #lisp
iamFIREcracker has joined #lisp
ldb`` has quit [Client Quit]
gko_ has joined #lisp
wxie has quit [Remote host closed the connection]
wxie has joined #lisp
wsinatra has joined #lisp
<tourjin> why do I have a warning in (setq a 1)? * (print a)
<tourjin> 1
<tourjin> 1
<tourjin> ; in: SETQ A
<tourjin> * (setq a 1)
<tourjin> ; (SETQ A 1)
<tourjin> ;
<tourjin> ; caught WARNING:
<tourjin> ; undefined variable: COMMON-LISP-USER::A
<tourjin> ;
<tourjin> ; compilation unit finished
<tourjin> ; Undefined variable:
<tourjin> ; A
<tourjin> ; caught 1 WARNING condition
<tourjin> 1
<tourjin> *
<jackdaniel> please don't paste on the channel, use external services
<phoe> tourjin: ^
<jackdaniel> setq assigns a variable, defvar defines it
<tourjin> ok. i forgot the address.
<jackdaniel> (as defparameter does)
<phoe> toplevel SETQ is undefined behavior, use DEFVAR or DEFPARAMETER to define variables.
<phoe> tourjin: https://plaster.tymoon.eu/ is one
<tourjin> thank you.
hendursa1 has quit [Quit: hendursa1]
rixard has joined #lisp
hendursaga has joined #lisp
Kabriel has quit [Read error: Connection reset by peer]
jprajzne has quit [Remote host closed the connection]
jprajzne has joined #lisp
rixard_ has quit [Ping timeout: 240 seconds]
Kabriel has joined #lisp
jfb4 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
davepdot_ has joined #lisp
jfb4 has joined #lisp
Lord_of_Life has quit [Read error: Connection reset by peer]
Lord_of_Life has joined #lisp
<phoe> Techniques and Utilities for Farming Objects On The Net - https://www.youtube.com/watch?v=iXov5ukVVWI
davepdotorg has quit [Ping timeout: 240 seconds]
__jrjsmrtn__ has joined #lisp
_jrjsmrtn has quit [Ping timeout: 265 seconds]
<dim> hi! did someone by any chance have already written an SQL parser, ideally using esrap?
wxie has quit [Ping timeout: 240 seconds]
<dim> I find myself needed to pseudo-parse SQL in different contexts, from parsing PL/SQL; so sometimes it's just a query, sometimes it's a query in parentheses, and sometimes it finishes with a semicolon, but other times not, and deciding when to stop consuming what looks like part of the SQL query seems impossible without actually parsing SQL queries
shifty has joined #lisp
<jackdaniel> someone other than you had asked me about that, I'd say "maybe dim knows something" :-)
<dim> current problem is that I'm consuming a closing paren that is part of the surrounding context rather than the query
<dim> jackdaniel: ahah
dra has quit [Quit: Leaving]
<jackdaniel> you need to introduce different terms for each context, otherwise it will get messy I think
<jackdaniel> (and I think that esrap is a good tool to write that)
<dim> I believe parsing balanced parens is only possible if you know when to parse a literal or identifier expression that contains a paren (select 'foo' as "("; is valid SQL) ; but for that you need to know where to expect identifiers and literals, and then how to do that without writing the full blown SQL parser?!
<dim> jackdaniel: I'm back to playing with https://github.com/dimitri/plconvert ; being given a nice example of an Oracle package to parse
<dim> and the current parsing fails in many ways (mainly because the parser had only seen a limited amount of Oracle PL/SQL code before)
<dim> I know that at some point I will have to parse Oracle SQL statements in full and a compiler that rewrites them in SQL for Postgres, I didn't want *now* to be that time
<phoe> dim: there's also $$ to take into account
<dim> oh yeah, I know about that, it's worse than just $$, it's $x$ ... $x$ and you can name them the way you want and nest them, pgloader knows how to do that for SQL files parsing
<dim> lucky me, that's only in Postgres, and I'm parsing Oracle SQL now ;-)
<phoe> oh!
<phoe> I remember a postmodern bug related to that, https://github.com/marijnh/Postmodern/issues/222
<phoe> this involves a SQL parser from pgloader
<phoe> are you thinking of a different one?
<dim> I'm trying to think of a trick that allows me to parse SQL and stop before consuming that closing paren at the end of it, without having to recognise SQL in full...
<dim> phoe: yeah see https://github.com/dimitri/plconvert : compiler from Oracle PL/SQL to Postgres PL/pgSQL
<dim> at work I have colleagues who have to assist Oracle migrations to Postgres and handling huge PL code bases is part of the job
<jackdaniel> dim: is there somewhere a description of Oracle PL/SQL grammar?
<dim> I have this idea of writing a compiler for it, had it from a long time, so I have a good opportunity to make some progress now
<dim> jackdaniel: they have online documentation but well, I don't like using it, it's too big for its own good, I didn't find a comprehensive grammar
<jackdaniel> I can only say that after getting used to it working with esrap is pleasure
<jackdaniel> here is an example of c18 syntax reader: https://gitlab.common-lisp.net/ecl/ecrepl/-/blob/master/c18-syntax-reader.lisp scymtym improved it and wrote a preprocessor; so you probably should look in his repositories for more elaborate inspiration
<dim> maybe I need to write a SQL “skeleton” parser now, that recognize the structure (select <list of fields> from <list of source relations> where <expression> group by <list ...> order by <list> etc etc
bsd4me has joined #lisp
<dim> I might not have to dive into each level deep, but without that how can I decide that the last closing paren is part of the SQL or part of the surrounding FOR ... IN (<sql here>) LOOP ... END LOOP; statement?
fixing_auth_hold has joined #lisp
<jackdaniel> count parenthesis, I've been told that lispers are good at doing that :-)
<dim> jackdaniel: if you would click on the plconvert link you will see a quite advanced PL/SQL parser written in esrap already
<jackdaniel> ah, indeed, sorry
<dim> jackdaniel: parens may be used inside literals or identifiers, and then you want to skip them
<jackdaniel> right
<dim> so can I implement parens counting in a simple way without writing a full parser that knows where to expect literals and identifiers? ;-)
tourjin has quit [Ping timeout: 246 seconds]
lalilulelo has quit [Ping timeout: 260 seconds]
<dim> (my esrap fu isn't great by the way, so the existing PL/SQL parser isn't as good as it could be, but well, I spend like 3 days on it IIRC)
terpri_ has joined #lisp
terpri has quit [Ping timeout: 244 seconds]
<dim> someday I will have to implement the whole syntax described there I guess
<dim> didn't want today to be that day, but well, as much as I'm trying to avoid it, it seems I don't have that much of a choice
<dim> who would fancy writing that and putting the code in https://github.com/dimitri/plconvert/blob/master/src/parser/query.lisp ?
luna_is_here_ has quit [Ping timeout: 246 seconds]
<dim> the next very fun step in plconvert is to use our awesome Common Lisp pretty printing technology to output PLpgSQL code from the output of the parser/compiler, and that's easy, it's just a tree of structure instances ;-)
luna_is_here has joined #lisp
sjl_ has joined #lisp
jonatack has joined #lisp
terpri has joined #lisp
terpri_ has quit [Ping timeout: 258 seconds]
wsinatra_ has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
iAmDecim has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
Alloc has quit [Ping timeout: 258 seconds]
Alloc has joined #lisp
Oladon has joined #lisp
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
Bike has joined #lisp
<ralt> that looks... super simple
jonjitsu has joined #lisp
<jackdaniel> it is a form of assembly after all
<jackdaniel> if you are into wasm, this description seems nice https://evilmartians.com/chronicles/hands-on-webassembly-try-the-basics
theseb has joined #lisp
theseb has left #lisp ["Leaving"]
bsd4me has left #lisp ["Leaving"]
jon_ has joined #lisp
jonjitsu has quit [Ping timeout: 240 seconds]
Robdgreat has joined #lisp
Robdgreat has quit [Read error: Connection reset by peer]
rogersm has joined #lisp
Oladon has quit [Quit: Leaving.]
asarch has joined #lisp
<asarch> How do you create an anonymous scope? (a la C' { ... })?
<Bike> let
<phoe> progn
<phoe> oh, wait, you mean for variable binding?
<phoe> or for what else?
<mfiano> (block nil ...) :)
dead10cc has joined #lisp
shifty has quit [Ping timeout: 264 seconds]
coltkirk has quit [Ping timeout: 258 seconds]
bitmapper has joined #lisp
Robdgreat has joined #lisp
<phoe> (prog nil nil ...)
<Bike> seriously though it's let.
davepdot_ has joined #lisp
<Bike> in C, "scope" means name binding.
davepdotorg has quit [Ping timeout: 246 seconds]
<jackdaniel> ((lambda (…) ) …), so, basically, let :)
TMA has quit [Ping timeout: 240 seconds]
schweers has quit [Ping timeout: 260 seconds]
Alloc has quit [Ping timeout: 256 seconds]
rumbler31_ has joined #lisp
narimiran has quit [Ping timeout: 240 seconds]
dpd88 has joined #lisp
rogersm has quit [Quit: Leaving...]
dead10cc has quit [Quit: Konversation terminated!]
save-lisp-or-die has joined #lisp
zigpaw1 has quit [Ping timeout: 265 seconds]
zigpaw1 has joined #lisp
retropikzel has quit [Quit: Leaving]
tamurasan has quit [Quit: WeeChat 2.3]
retropikzel has joined #lisp
save-lisp-or-die has quit [Ping timeout: 260 seconds]
<jasom> dim: I'm booked for the next week, but it should be pretty straightforward if I get some free time in September. IIRC Oracle has very nice state-machine diagrams in their documentatin that translate straight to code
<jasom> esrap is nice, as long as you only ever need to parse strings. I've been known to just write recursive-descent parsers when I need to parse other things
Lord_of_Life_ has joined #lisp
<jasom> I'm also curious if asarch was actually referencing https://sourceforge.net/projects/cprime/ or if the "'" was a typo
Blukunfando has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<phoe> I read C' as C's
gko_ has quit [Ping timeout: 265 seconds]
<asarch> Yeah, sorry, my mistake. It should be: C's
* asarch whispers "damn HP keyboards..."
TMA has joined #lisp
Alloc has joined #lisp
<Bike> i don't think that changes the answer?
<phoe> nah, it doesn't
Cymew has quit [Ping timeout: 258 seconds]
nicktick has quit [Ping timeout: 240 seconds]
ggole has quit [Quit: Leaving]
Josh_2 has joined #lisp
mike212 has joined #lisp
lnostdal has quit [Ping timeout: 258 seconds]
karlosz has joined #lisp
Bourne has quit [Ping timeout: 246 seconds]
frgo has quit [Remote host closed the connection]
Inline has joined #lisp
frgo has joined #lisp
liberliver has quit [Ping timeout: 272 seconds]
liberliver has joined #lisp
jesseoff has quit [Read error: Connection reset by peer]
<Josh_2> Evening
liberliver has quit [Ping timeout: 272 seconds]
shangul has quit [Ping timeout: 240 seconds]
<Inline> evening
rippa has joined #lisp
liberliver has joined #lisp
liberliver has quit [Ping timeout: 244 seconds]
liberliver has joined #lisp
Jesin has quit [Quit: Leaving]
stepnem has quit [Ping timeout: 240 seconds]
stepnem has joined #lisp
liberliver has quit [Ping timeout: 260 seconds]
luckless has joined #lisp
brj has quit [Ping timeout: 246 seconds]
VincentVega has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
brj has joined #lisp
jw4 has joined #lisp
asarch has quit [Quit: Leaving]
liberliver has joined #lisp
Jesin has joined #lisp
Jesin has quit [Quit: Leaving]
yitzi has quit [Quit: yitzi]
<VincentVega> Is there a function which returns true on a proper list but not on a quoted thing (e.g. ''sym)? Instead of (and (consp x) (not (equal 'quote (car x))))
mseddon has joined #lisp
<White_Flame> so, true on (foo bar) and not on (quote bar)?
<White_Flame> they are both materially lists, and it is the car that distinguishes
<VincentVega> Oh, ok then
<White_Flame> there isn't a builtin for that test, at the very least
<VincentVega> I see. Thanks for the explanation!
<White_Flame> np
<copec> Out of curiosity, What are you looking at and/or thinking about VincentVega?
Jesin has joined #lisp
rogersm has joined #lisp
fixing_auth_hold is now known as lalilulelo
EvW1 has joined #lisp
bocaneri has quit [Read error: Connection reset by peer]
<VincentVega> copec: actually, I was wring a macro for a cond which prepends a function call on each condition (unless t or otherwise) and, if the car of the clause is a list, prepends a call to each of the element in the list.
<VincentVega> *prepends and or's all the calls
seok has joined #lisp
<copec> Ah, I was wondering why you would need that function you asked about, that makes sense
<seok> hello!
<copec> Hi! (although I'm the random fellow nobody knows that says hi from the back)
cosimone has quit [Quit: Quit.]
mike212 has left #lisp ["Leaving"]
<VincentVega> Something like (cond-fn fn ('(x y) z)) -> (cond (((or (fn x) (fn y)) z) which makes me think why don't I just generate mapcar into the resulting expansion instead of doing it beforhand
<seok> hi!
<phoe> heyyy
<phoe> uhhhh one second
rogersm has quit [Quit: Leaving...]
<phoe> why do you quote X Y? are they some sort of global arguments?
<phoe> also, isn't this just (some #'fn (list x y))?
<VincentVega> phoe: hi!
<VincentVega> phoe: well, I was thinking kind of like what case does
<White_Flame> I would use a keyword (cond-fn fn ((:special x y) x) ((normal-func param1 param2) ...))
<VincentVega> maybe I shouldn't do that
<White_Flame> intentionality is a good thing
<phoe> case?
<phoe> look at alexandria:switch
<phoe> it's cl:case but with specifiable test function.
<VincentVega> oh, cool
<VincentVega> lemme see what it does
<VincentVega> White_Flame: interesting
<phoe> (alexandria:switch ("foo" :test #'string= :key #'string-upcase) ("FOO" :good) (t :bad))
<VincentVega> phoe: yeah, switch looks like a thing to use here, thanks for this reference!
<phoe> '(x y) looks like something really weird
<phoe> ESPECIALLY if X and Y are some sorta local variables
<VincentVega> Nah, just symbols
<phoe> oh, huh
<jasom> VincentVega: ''foo is a proper list
jprajzne has quit [Quit: jprajzne]
<VincentVega> jasom: I was surprised to find that out, but now I know!
simendsjo has joined #lisp
seok has quit [Ping timeout: 245 seconds]
Necktwi has quit [Ping timeout: 256 seconds]
choegusung has joined #lisp
EvW1 has quit [Ping timeout: 240 seconds]
Necktwi has joined #lisp
izh_ has joined #lisp
seok has joined #lisp
<seok> so how many people actually use iterate or https://github.com/Shinmera/for/ instead of loop?
stepnem has quit [Ping timeout: 256 seconds]
simendsjo has quit [Ping timeout: 240 seconds]
stepnem has joined #lisp
cosimone has joined #lisp
mseddon has quit [Quit: Leaving]
<wsinatra> just good old fashioned loop here, for does look interesting though, a little easier to remember at a glance
<White_Flame> I've built up some individual tools for iterating over structures in various ways, but I use loop or recursion otherwise
<sjl_> I use loop in my libraries to minimize dependencies, iterate in my personal projects where I don't care as much
<seok> I feel loop is a bit too verbose for hash-tables
<seok> do you just write a helper macro for hashes?
<White_Flame> yeah, that's why I made a (defmacro do-hash ((k v table) &body body) ...)
<seok> I see
<White_Flame> I like the syntactic structure of dolist
<seok> I was happy with iterate until it conflicts with parenscript
<White_Flame> and extended that to other stuff, including mapcar's consing
<dim> jasom: thanks for your message! I'm getting started on transforming that state machine into an esrap rule set, but I will only get an hour here and there, so you might still be able to help when you get around to it ;-) also I'm only going for a partial parser at the moment, just to play with some files I've been given
gum has joined #lisp
<seok> sjl_ yeah that sounds sensible. don't you get confused using both though?
EvW has joined #lisp
shka_ has quit [Ping timeout: 265 seconds]
<jasom> dim: I enjoy writing parsers; it's mechanical enough that I find it meditative.
<dim> when you have a clean grammar, that might be so
<jasom> but it is time consuming and time is limited
<dim> in that case it seems okay though
<dim> what I'm most interested in is PL/SQL, SQL is just getting in the way
duuqnd has quit [Read error: Connection reset by peer]
<dim> the SQL compiler is going to be most interesting that said! do you like working on compilers?
duuqnd has joined #lisp
<jasom> I do, but need permission from work before working on compilers just because my work makes compilers. For something like SQL, it will probably be zero issue to get a sign-off.
seok has quit [Remote host closed the connection]
<VincentVega> seok: I switched to iterate when I had to run through a queue. loop was ok, but (generating node next (or (cl-heap:dequeue q) (terminate))) (while (next node)) was better. Custom clauses, too. I am digging it so far.
<sjl_> seok: not really. I've used both enough that I'm used to both at this point.
<dim> jasom: it's a compiler from Oracle PL/SQL to Postgres PL/pgSQL, and if we're feeling very brave including Oracle SQL into Postgres SQL
<dim> and then if people/contributor have a passion for the result we can envision a rewriting proxy for migration environments
<jasom> That would actually be useful at work; we have an oracle DB we are hoping to transition to pg. I still need to learn some more pg DBA stuff though like how backups and point-in-time restoration work.
narimiran has joined #lisp
<fe[nl]ix> jasom: what compiler do you work on ?
izh_ has quit [Quit: Leaving]
duuqnd has quit [Remote host closed the connection]
abhixec has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
yitzi has joined #lisp
wsinatra has quit [Quit: WeeChat 2.9]
narimiran has quit [Remote host closed the connection]
<jasom> fe[nl]ix: I don't, but others at my company do
wsinatra_ has quit [Ping timeout: 258 seconds]
<VincentVega> Guys, given a type specifier (retrieved from a slot definition in my case), how would I say if its a (simple-array string) or a (simple-array bool)? The closest thing I found was array-element-type, but I have a specifier, not an object.
<Bike> (and (subtypep ts '(simple-array string)) (subtypep '(simple-array string) ts))
<Bike> STRING almost certainly upgrades to T, by the way
<Bike> actually so does bool
<Bike> assuming you mean boolean
<VincentVega> Bike: that's the thing, subtypep isn't working here
<scymtym> ALEXANDRIA:TYPE= is almost a shorthand for what Bike said
<Bike> which is to say, (simple-array string) and (simple-array boolean) are the same type
<VincentVega> yeah, I mean boolean
<Bike> how is it not working
<VincentVega> one sec
<VincentVega> Bike: (and (subtypep '(simple-array boolean) '(simple-array string)) (subtypep '(simple-array string) '(simple-array boolean)))returns T, T
<Bike> yeah, they're the same type, like i said.
choegusung has quit [Quit: leaving]
<Bike> (upgraded-array-element-type 'string) => T on your implementation (and any real implementation), and ditto with boolean
<Bike> array element types are about the storage format. they're not a declaration of the kinds of values it ends up holding. at least in most contexts.
<VincentVega> Oh. Is there no way to get the exact specializer then, the one with which it was initially declared?
CrazyEddy has joined #lisp
<Bike> not if you're treating them as types, because they are the same type.
<Bike> if your type specifier is a list (SIMPLE-ARRAY something) you can just do (second ts), of course.
<VincentVega> Well, it could be deftyped, so not always a list.
<VincentVega> But, yeah, I see. Thanks for the clarification on this.
<White_Flame> if you used bitvectors instead of arrays of bools, you'll both save space and be more type distinguished
<Bike> it's something that trips people up a lot.
abhixec has quit [Ping timeout: 240 seconds]
<VincentVega> I don't necessarily need bitvectors, I just wanted to do different things based on different type spec in the slot. It's not a big problem though.
<VincentVega> Thanks for the pointer though, might come in handy in the future
<Bike> in general, since lisp is gradually and dynamically typed, having different behaviors based on declared types doesn't usually work
<VincentVega> Makes sense, yeah.
<VincentVega> Now that you said it, that is : )
sonologico has joined #lisp
<jasom> I'm always late to the party, but etypecase is usually good for dispatching on type as well VincentVega
<jasom> oh, nevermind it's just a literal type specifier
<VincentVega> Bike: And what if I needed this facility only at compile time, would it make any difference? Sorry, just have to make sure : )
<Bike> subtypep is always going to give the same results for those inputs, if that's what you mean
<jasom> VincentVega: I don't think there's a good way other than just destructuring the type specifier yourself
<VincentVega> Bike: Ok.
<VincentVega> jasom: how can I do destructuring?
Alloc has quit [Ping timeout: 260 seconds]
<VincentVega> jasom: I mean, given there are deftypes and all
Alloc has joined #lisp
<jasom> I don't think there's a portable way to expand deftypes
wsinatra_ has joined #lisp
<VincentVega> jasom: Oh well, can't have it all : ) Anyway, it's not such a big problem, rather just a temporary nuisance. Thanks, people!
shifty has joined #lisp
<jasom> there are definitely non-portable ways though, and someone may have made a portability shim for it.
<phoe> one sec
<phoe> there is a portalib for TYPEXPAND
<phoe> let me find it
<jasom> thanks phoe!
<phoe> yes, Bike's introspect-environment:typexpand
<VincentVega> phoe: is it part of some package?
<phoe> Bike: you might actually steal this code for i-i since it seems more complete
bilegeek has joined #lisp
<phoe> VincentVega: yes, (ql:quickload :introspect-environment)
<VincentVega> phoe: awesome, thanks!
kaftejiman has joined #lisp
IPmonger has joined #lisp
cosimone has quit [Quit: Quit.]
Necktwi has quit [Remote host closed the connection]
cosimone has joined #lisp
<kilimanjaro> what are the common alternatives to SXHASH? i would like SOME-FN which roughly satisfies (= (some-fn x) (some-fn y)) == (equalp x y)
IPmonger has quit [Remote host closed the connection]
<kilimanjaro> on SBCL at least, SXHASH seems to be optimized for performance and so will cause collisions for objects which a hash can't be computed quickly (e.g. vectors all seem to hash to the same value)
sm2n has quit [Quit: Leaving]
<Xach> Hmm, are you able to (ql:quickload "cl-mixed" :verbose t)?
Necktwi has joined #lisp
<kilimanjaro> Xach: yes
<Xach> Thanks. When I try, I get a CFFI library error. I'm not sure why.
hiroaki has joined #lisp
<Xach> kilimanjaro: are you using the latest quicklisp dist update?
<White_Flame> kilimanjaro: you could test for types that you want to be more specific on, and fall back to sxhash for the rest
<kilimanjaro> Xach: oh, sorry, I was not
<kilimanjaro> I just ran `(ql:update-dist "quicklisp")`
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<kilimanjaro> After that, I tried again, and it still worked
<phoe> Xach: what sorta error?
<kilimanjaro> White_Flame: sure
<Xach> phoe: Unable to load any of the alternatives: ("libmixed.dylib" "libmixed.so" "mac64-libmixed.dylib")
<Xach> the final dylib comes with the project, in static/
<Xach> kilimanjaro: what CL and version are you using?
<phoe> oh! maybe it is a mac-only thing
<Xach> phoe: no - i have this problem on my linux system also
<Xach> phoe: but i'm not sure why. i thought maybe the working mac version would add some insight.
<phoe> oh! I see
<kilimanjaro> SBCL 2.0.2
<Xach> kilimanjaro: thanks.
<phoe> works on sbcl 2.0.6 https://plaster.tymoon.eu/view/2031#2031
chiota has joined #lisp
chiota has quit [Client Quit]
<Xach> the static/ path is my cffi:*foreign-library-directories* too.
<Xach> why on earth does it not get found?
chiota has joined #lisp
chiota has quit [Client Quit]
VincentVega has quit [Remote host closed the connection]
<phoe> maybe it gets found but fails for whatever reason
VincentVega has joined #lisp
<kilimanjaro> White_Flame: i guess for a slow but reasonably general solution, I could serialize the object to a stream using cl-store or similar, and then compute a digest (e.g. md5) using ironclad
<White_Flame> so I presume you're doing tons of comparisons, where the hash cost is amortized well?
<Xach> ha! on the mac it fails because I was in a directory that had been deleted from under me, so the underlying error was with getcwd.
<Xach> i'm guessing the linux failure is due to something else. digging.
<dim> jasom: re your migration at work, have a look at pgbackrest for PITR and recovery
<kilimanjaro> White_Flame: yes
<White_Flame> another goofy idea, especially for the vectors, is to hash the first N bytes of the datastructure memory being referenced
<White_Flame> although for cons lists, that would be limited to just the car & cdr words
<White_Flame> but structs & vectors would benefit from that
gravicappa has quit [Ping timeout: 240 seconds]
jibanes has quit [Ping timeout: 240 seconds]
Necktwi has quit [Ping timeout: 264 seconds]
jibanes has joined #lisp
Necktwi has joined #lisp
abhixec has joined #lisp
<Josh_2> added dedicated threads for accepting and processing connections on my HTTP server and It's just slowed it down
<Josh_2> sad face
<Josh_2> trying to go from HTTP1.0 to 1.1 with persistent connections
<Xach> AHA
<phoe> Xach: !!!!!!!
<Xach> /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found
<Xach> as required by the static libmixed.so
<phoe> oh goodness
<Xach> not literally static, the one in static/
<Alfr_> kilimanjaro, probably won't work: (equalp 1d0 1) but the hashes for these numbers printed most likely will differ, similar problem (equalp #\a #\A) is true.
<Xach> i wish cffi bubbled that up somehow
<Xach> there's a comment in the source to that effect
ralt has quit [Quit: Connection closed for inactivity]
gaqwas has quit [Ping timeout: 265 seconds]
<phoe> can it bubble it up?
cosimone has quit [Quit: Quit.]
<phoe> I mean, does the dlopen syscall provide any information about what exactly blew up, or does it just set errno/retval to EIMDED and the programmer gotta figure out what went wrong?
<Xach> phoe: I'm not fully certain.
<Xach> i would bet on "yes"
* mfiano wonders which end of the question that bet is on
<fe[nl]ix> Shinmera probably compiled that on a very recent distribution, and Xach is running an old(er) one
<fe[nl]ix> for the same reason the officially distributed SBCL x86-64 binaries don't run on older distros
<fe[nl]ix> one lesson here could be that if you want to distribute binaries, better compile on a distro from 2-3 years ago like Ubuntu LTS or Debian stable/oldstable
<mfiano> Xach: It loads for me on SBCL 2.0.7, both dist version and HEAD, though has some warnings, and not just STYLE-WARNING, so probably needs to be fixed before inclusion anyway
jon_ has quit [Read error: Connection reset by peer]
jonjitsu has joined #lisp
Alloc has quit [Ping timeout: 260 seconds]
Alloc has joined #lisp
specbot has quit [Remote host closed the connection]
specbot has joined #lisp
Alloc has quit [Ping timeout: 260 seconds]
specbot has quit [Remote host closed the connection]
minion has quit [Disconnected by services]
minion has joined #lisp
Alloc has joined #lisp
sjl_ has quit [Ping timeout: 258 seconds]
jasom_test has joined #lisp
pve has quit [Quit: leaving]
jasom_test has quit [Quit: jasom_test]
torbo has joined #lisp
minion has quit [Remote host closed the connection]
minion has joined #lisp
specbot has joined #lisp
VincentVega has quit [Remote host closed the connection]
<jasom> kilimanjaro: the only good way I can think is to come up with a canonical serialization and hash that serialization. equalp has so many special-cases
<jasom> kilimanjaro: also note that equalp is potentially non-portabe with non-simple characters; I don't know what actual implementations do, but the spec leaves it up to the implementation
<jasom> I can think of reasonable implementations of equalp that would have differing behavior based upon the current locale, for example.
sonologico has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
bilegeek has quit [Quit: Leaving]
bitmapper has quit [Remote host closed the connection]
bitmapper has joined #lisp
<White_Flame> what is the rationale behind equalp ignoring string case?
<aeth> White_Flame: probably because the most generic thing is case insensitive equality, given that there are case-insensitive predicates in the language.
<aeth> the real problem is that there's not an equality one step less general than EQUALP
<White_Flame> but to have that wrapped into the only facility which steps structure slots & makes it much less useful
<White_Flame> right
<aeth> By naming conventions of case-sensitivity vs. case-insensitivity, the case-sensitive version of EQUALP would be called EQUAL=
<White_Flame> or that string sensitivity in comparisons isn't a dynamic binding
<aeth> And I wouldn't be too shocked if the name EQUAL= is why we don't have EQUAL= :-p
<aeth> Humans are biased by aesthetics.
<White_Flame> well, "=" is used for pseudo-numeric equivalence
<White_Flame> string= using the same stuff as char= which is the numeric equality of char codes
Necktwi has quit [Ping timeout: 265 seconds]
<White_Flame> (which is roughly used because of incomplete coverage blah blah)
<aeth> Yes, it wouldn't necessarily be EQUAL=, but there still would be an issue with naming it. I could definitely imagine postponing thinking about it for the next edition of the standard... which obviously never happened.
<aeth> This is, of course, about why it's logical, not about what actually happened. You'd have to ask someone who was involved, if there's no written record of it.
<White_Flame> but still, case-insensitive string comparison is not a deeper structural equality test; it's orthogonal
<White_Flame> yeah, that's why I ask here ;)
Necktwi has joined #lisp
elxbarbosa has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
<jasom> Reading CLtL2 it notes that Lisp Machien Lisp, equal is case-insensitive
IPmonger has joined #lisp
IPmonger has quit [Remote host closed the connection]
zigpaw1 has quit [Ping timeout: 260 seconds]
mangoicedtea has joined #lisp
elxbarbosa has quit [Ping timeout: 244 seconds]
nicktick has joined #lisp
iAmDecim has joined #lisp
jurov_ has joined #lisp
zigpaw1 has joined #lisp
Josh_2 has quit [Ping timeout: 240 seconds]
jurov has quit [Ping timeout: 256 seconds]
bilegeek has joined #lisp
stepnem has quit [Read error: Connection reset by peer]
jcowan has left #lisp [#lisp]
<Xach> mfiano: thanks. https://github.com/Shirakumo/cl-mixed/issues/4 has the evolution and near-resolution of the issue
stepnem has joined #lisp
orivej_ has joined #lisp
aap has quit [Ping timeout: 258 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
Jesin has quit [Quit: Leaving]
notzmv has quit [Remote host closed the connection]
aap has joined #lisp
jeosol has joined #lisp