freenode/#lisp - IRC Chatlog
Search
9:27:51
asarch
If I had: '(:|beer| 10 :|pizza| 4 :|tacos| 8) how could I converted to: (:beer 10 :pizza 4 :tacos 8)?
9:29:49
asarch
If that would be stored in food, doing a (getf food :|pizza|) would gives me only the value
9:30:38
no-defun-allowed
What did you use to generate that list? I am guessing some parser took every key and did (intern <key> '#:keyword)
9:30:48
beach
asarch: I think we are saying, don't create a symbol with lower-case letters in the first place.
9:31:52
asarch
That's the result of a query with CL-DBI: (dbi:fetch-all (dbi:execute (dbi:prepare *connection* "SELECT * FROM somewhere WHERE flag = ? OR updated_at > ?") (list 0 "2011-11-01")))
9:32:03
no-defun-allowed
Does cl-json do that? No, that generates alists and converts to upper kebab-case by default -- oh okay.
9:33:03
White_Flame
or probably easier but less robust would be (read-from-string (symbol-name key))
9:33:51
no-defun-allowed
An interesting result format. (n.b. I think you should stash the prepared statement somewhere, if it hasn't been folded in for the example.)
9:34:37
White_Flame
but yeah, I agree with beach. The canonical names are :|beer| etc, use that syntax
9:35:05
White_Flame
if the names all of a sudden have other cases, for some reason, or you need to re-assert into the database that those came from, you need to use the same key
9:38:53
asarch
Here in México Dell is selling this https://pasteboard.co/JVwoB5Y.jpg at the ridiculous prices of ~$1,000 USD. It would be great instead of a "normal" laptop, right?
9:40:09
asarch
I usually do with the A method, that's why I have all these functions getting data from the list with (getf food :pizza)
9:44:27
asarch
One last question: how do you get automatically the keys (:|beer| 10 :|pizza| 4 :|tacos| 8)?
9:49:17
silasfox
(mapcar #'upcase-keyword '(:|beer| 10 :|pizza| 4 :|tacos| 8)) => (:beer 10 :pizza 4 :tacos 8)
9:52:20
beach
silasfox: In particular, if the value is a keyword, that should perhaps not be altered.
9:54:09
beach
Furthermore, INTERN takes a "package designator", so you can say (intern ... "KEYWORD")
9:54:54
White_Flame
yeah, i always forget about package designators and always just grab a package quickly
10:01:07
White_Flame
beach: actually, I think it started off as more a performance thing. (find-package ...) is a function call but (symbol-package ..) just reads a slot from a read-time-interned symbol ;)
10:01:29
White_Flame
(as in, nitpicky cycles that don't really matter but dangit this is more direct :) )
10:13:49
beach
White_Flame, on the other hand, SYMBOL-PACKAGE may very well be a generic function in some implementations, and everyone knows how slow a call to a generic function can be. :)
10:48:56
fiddlerwoaroof
Rather than figure out how to interface with my OS, I've discovered it's relatively simple to write a VNC server that serves a framebuffer over the "network"
10:50:30
fiddlerwoaroof
And when I say "write a VNC server", I mean "fix a code sample I found online"
10:51:35
fiddlerwoaroof
Now, I just need to figure out how to teach McCLIM how to write to this server
10:57:11
scymtym
fiddlerwoaroof: for a McCLIM backend, you have to decide on the frame management model: should the VNC server expose some sort of virtual desktop with multiple windows ("frames" in CLIM terminology) and window management or should the VNC server correspond to a single window and always show the content of that window?
10:59:10
scymtym
this is an example of the former, that is multiple frames with decorations, etc. in a browser tab: https://techfak.de/~jmoringe/mcclim-broadway-7.ogv
11:02:57
fiddlerwoaroof
That's a cool demo, the issue I always have is the "window in window" paradigm there always feels a bit odd
11:15:47
scymtym
fiddlerwoaroof: yes, there is a websocket connection that sends input events from the javascript client to the server and sends display commands from the server to the javascript client
11:44:28
lukego
silasfox: did you just write an irc message that included newlines and indentation? is that possible? <mind-blown.gif>
12:29:23
SAL9000
lukego: "newlines" in IRC come through as multiple messages, and more than 3-4 such lines usually cause the server to rate-limit you
13:09:50
jmercouris
the questions will be created by the user to determine if a piece of text is logically sound
13:12:08
jackdaniel
it is the full automatization - you don't need to read the document to browse it
13:14:35
splittist
jmercouris: as sm2n says, this is sort of the opposite of what I understand an expert system is
13:14:41
sm2n
I don't think using automated nlp is a good idea... it suffers from similar issues as the misinformation generating processes
13:16:15
sm2n
I think the general idea is decent though, say you have a document open, maybe you could have a "pane" or something that displays a formalized logical inference tree, in natural deduction form or something
13:17:24
sm2n
https://en.wikipedia.org/wiki/Natural_deduction , though you don't need the fancy deduction
13:18:50
jmercouris
I don't think someone susceptible to 'fake news' will have the rigor to complete such an exercise
13:19:12
splittist
I'm not seeing how computers help here. Take this text: "The LaTeX sources were converted to html using the latex2html program. We fixed many of the glitches by hand, but may have missed some. When in doubt, check your copy of the original paperbound version." What is supposed to happen when I'm browsing that?
13:19:45
jmercouris
LaTeX sources were converted to html using the latex2html -> latex2html converts latex to html
13:21:50
splittist
Hmm. If I'm reading an article that says "All men are mortal. Socrates is a man. Therefore global warming is [insert conclusion here]" a big red cross appears saying "incorrect inference"?
13:23:26
sm2n
at least, that is my take, error prone automated processes should augment human reasoning, not replace it
13:35:09
jackdaniel
I am saying that I see plenty of buzzwords that are not ontopic on this channel and could be categorized as a deceptive marketing
13:40:10
jackdaniel
no, I am saying that "I see plenty of buzzwords that are not ontopic on this channel and could be categorized as a deceptive marketing"; I'll put an emphasis on the offtopic aspect of that statement
14:47:49
VincentVega
With a macro's lambda list &key, is it possible to identify the order in which the keys were supplied?
15:02:05
phoe
every Lisp implementation does know exactly what you send, because it can make it available if you pass &rest
16:03:03
Josh_2
What crazy thing are we gonna talk about today? How about the performance of CL? jk jk
16:31:14
contrapunctus
Anyone here use redshank? It sounds quite cool but I've not heard much about it.
16:33:11
contrapunctus
It's a bunch of commands for performing some common insertions and modifications in CL code.
16:43:47
ck_
I have used it sometimes in the past, yes. Some functions more than others, mostly the moderately simple stuff like extract-defun
16:44:43
ck_
it didn't feel like a significant improvement over manually (par-)editing; maybe I didn't spend enough time with it
16:53:03
mfiano
You can find him in our gamedev channel, #bufferswap if you need him immediately though.
17:19:10
Josh_2
I guess I will just redumping this image with chirp as a dependency, see if that works
17:26:05
jmercouris
I've noticed when loading my own code which depends on other libraries, slime compilation will report their warnings, any way to get rid of those?
17:26:26
jmercouris
I'm not interested in stuff like: Unknown location: redefinition: redefining CL-PREVALENCE:GET-ID in DEFGENERIC
17:33:44
Josh_2
Shinmera: when using (complete-authentication <pin>) pin is supposed to be the url returned by initiate-authentication?
17:37:28
Nilby
jmercouris: My advice is always wrong, so you definitely shouldn't do this: https://plaster.tymoon.eu/view/2380#2380
17:49:57
Nilby
(ql:system-apropos "") | wc -l ⇒ 4491 , so that might take a while. My systems have no unintentional warnings
17:57:37
shka_
so you can https://github.com/sirherrbatka/vellum/blob/1315f04382547f938f4569f2b99ba038e93f75b6/run-tests.lisp#L11
18:17:54
Nilby
I still have a CL twitter client with a TUI back from when you had to send your password in cleartext over http, but then I never looked a twitter again.
18:59:38
Josh_2
Shinmera: the fun (statuses/update-with-media ..) says it takes either a pathname, usb-8 array or a base64 encoded string (in the docstring), I have just given it a usb-8 array and I get the error "Wanted one of (FUNCTION FILE-STREAM STREAM PATHNAME)."
20:18:38
contrapunctus
Uh, what's going on here :\ (ql:quickload :mcclim) => System "mcclim" not found 🤔
20:21:10
contrapunctus
phoe: yup, tried that. Although rather suspiciously, it said "1 dist to check"
20:23:12
Shinmera
Josh_2: oAuth tokens don't expire unless they're manually revoked. You have to actually save the info though.
20:23:49
mfiano
First check (ql:where-is-system :alexandria) to see if Quicklisp even has it downloaded
20:25:08
contrapunctus
mfiano: nil 🤔 but I have a /home/anon/quicklisp/dists/quicklisp/archives/alexandria-20200925-git.tgz
20:26:09
Bike
do you have cl-asdf or anything installed? maybe your global asdf configuration is something odd now