ChanServ changed the topic of #racket to: The Racket Programming Language -- https://racket-lang.org/ -- https://racket.discourse.group/ -- http://pasterack.org -- logged at https://libera.irclog.whitequark.org/racket/ -- This is the right place to ask for help with DrRacket. Remember to wait around for an answer!
notzmv has quit [Ping timeout: 276 seconds]
notzmv has joined #racket
samph has joined #racket
spdegabrielle has quit [Quit: Connection closed for inactivity]
Tuplanolla has quit [Quit: Leaving.]
Origin has quit [Quit: Leaving]
Origin has joined #racket
terrorjack45 has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack45 has joined #racket
runrin has quit [Quit: leaving]
runrin has joined #racket
skapata has quit [Remote host closed the connection]
divya has quit [Quit: ZNC 1.9.0 - https://znc.in]
notzmv has quit [Ping timeout: 265 seconds]
divya has joined #racket
notzmv has joined #racket
runrin has quit [Remote host closed the connection]
runrin has joined #racket
tnt2 has joined #racket
tnt1 has quit [Ping timeout: 265 seconds]
tnt2 is now known as tnt1
shawnw has quit [Ping timeout: 265 seconds]
Tuplanolla has joined #racket
edrx has joined #racket
<edrx> I'm a newbie with racket and schemes and I was trying to understand what happens in drracket when we use "#lang slideshow" and then we run "(circle 10)"...
<edrx> then I fell into several different rabbit holes
<edrx> if I run just "circle" racket says "#<procedure:circle>"
<edrx> what are the fields of a procedure object? does it have something that says in which file it was defined?
<edrx> (btw, I git-cloned https://github.com/racket/racket and https://github.com/racket/drracket and grepped the sources but I couldn't find where "circle" is defined - I am probably not searching in the right way...)
<bremner> edrx: according to docs.racket-lang.org, it's defined by pict (and a few other places, but I think this is the pict one)
<edrx> looking!
<bremner> "raco doc circle" should bring up the same search without network access
<edrx> found it!
<edrx> (find-racketfile "pkgs/pict-lib/pict/private/utils.rkt" "(define (circle size")
<edrx> in pkgs/pict-lib/pict/private/utils.rkt
<edrx> how do I translate this to racket?
<edrx> (require 'pict)
<bremner> (require pict)
<edrx> perfect! =)
<edrx> how do I translate this to racket and geiser?
<edrx> (load #P"~/quicklisp/setup.lisp")
<edrx> (ql:quickload :slynk)
<edrx> (slynk:create-server :port 56789 :dont-close t)
<edrx> when I run Maxima and I run load("startsly.lisp") it runs that...
<bremner> I'm not familiar with quicklisp at all, and it's been years since I used geiser. I generally prefer racket-mode, although it has less fancy REPL support.
<edrx> ok...
<bremner> maybe if you can say what you are trying to accomplish?
<bremner> since maxima is not related to racket...
<edrx> if I just run Maxima I can get a primitive SBCL REPL by running "to_lisp();"
<bremner> oh. I just use slime for that.
<bremner> I'm sure there is a more direct way with geiser as well.
<edrx> I can get a much better repl if make Maxima load Swank, make Swank listen in a port, and then I make Sly connect to that Swank
<edrx> oops, Slynk, not Swank
<edrx> I am guessing that if I do something similar with geiser and racket I will be able to navigate the sources and inspect objects in a better way
<edrx> or at least I will have two ways to do that... one from a racket repl and one from geiser
<edrx> I am more familiar with that way of doing things that with racket-mode
<bremner> what is it that the existing geiser repl does not provide for you?
<edrx> the "," things
<edrx> like ",ap require"
<edrx> I don't know how to run them from geiser
<bremner> sounds like you might want to look at "xrepl"
<bremner> if I run (require xrepl) in the racket-mode repl (or elsewhere I imagine), it enables a bunch of , commands.
<edrx> for example?
<bremner> well. "a bunch" might be an overstatement. ,describe and ,apropos for example
skapata has joined #racket
<edrx> bremner: that's one of the things that I was looking for! thanks! =)
<edrx> how do I translate ",describe pict" to a sexp?
<edrx> I don't know how comma commands are parsed
<bremner> me neither. I did notice a comment in the documentation that things like ,exit worked even if/when the exit function was not visible in the current module
<edrx> ok!
<edrx> unrelated: if I run just this,
<edrx> (require pict)
<edrx> (circle 10)
<edrx> the output is "#<pict>". in other languages I know how to change the tostring method of a class of objects, but in racket not yet...
<edrx> and I was trying to understand how in certaing cases a pict object tells the repl that it should be shown as an image, not as text
<edrx> i couldn't find the details of how that is implemented
<edrx> in common lisp I use "defmethod print-object" - http://anggtwu.net/LISP/tostring1.lisp.html
<edrx> this is an advanced question... I am asking because, I don't know... maybe you have an example ready =)
notzmv has quit [Ping timeout: 265 seconds]
Everything has joined #racket
<edrx> btw, in emacs structs aren't very well documented... I can run this - (find-estruct (package-get-descriptor 'magit)) - to inspect a package-desc structure, and the output is: https://i.ibb.co/fxJwdy2/sshot.png
<edrx> I had to make that find-estruct thing myself and it is a quick hack
Everything has quit [Read error: Connection reset by peer]
<edrx> reading this: file:///usr/share/doc/racket/reference/createclass.html?q=class#%28form._%28%28lib._racket%2Fprivate%2Fclass-internal..rkt%29._class%29%29
<bremner> edrx: If I wanted to know more about image display, I would consult the racket-mode sources
<bremner> edrx: keep in mind that most of the values you encounter will not be related to the object system
<bremner> (much like most emacs values are not eieio related)
<edrx> bremner: do you know how to display an image in racket-mode?
<bremner> edrx: it just happens in the REPL
<edrx> I grepped for "image" in a clone of the racket-mode repository
<bremner> maybe look for "pict"
<edrx> AHAAA
<edrx> works, but I use a black background, so this
<edrx> (require pict)
<edrx> (circle 10)
notzmv has joined #racket
<bremner> (circle 100 #:border-color "white")
<edrx> gave me an invisible circle!
<bremner> (just went through the same invisible circle thing)
<edrx> PERFECT!!!! Thanks!!!
edrx has quit [Ping timeout: 248 seconds]
ecraven has quit [Quit: quit]
ecraven has joined #racket
szkl has quit [Quit: Connection closed for inactivity]
ormaaj has quit [Read error: Connection reset by peer]
ormaaj has joined #racket
shawnw has joined #racket
shawnw_ has joined #racket
shawnw has quit [Ping timeout: 246 seconds]
haskal1 is now known as haskal
spdegabrielle has joined #racket
Everything has joined #racket
<spdegabrielle> Qi 5 release party 🎉 January 17, 2025 18:00 UTC https://racket.discourse.group/t/qi-5-release-party/3461
macabro has quit [Read error: Connection reset by peer]
runrin has quit [Ping timeout: 244 seconds]
runrin has joined #racket
ormaaj has quit [Read error: Connection reset by peer]
ormaaj has joined #racket
runrin has quit [Ping timeout: 265 seconds]
Everything has quit [Quit: leaving]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #racket
gnomon has quit [Quit: leaving]