samth changed the topic of #racket to: Racket v7.3 has been released: https://blog.racket-lang.org/2019/05/racket-v7-3.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
sleepnap has left #racket [#racket]
mSSM has quit [Ping timeout: 272 seconds]
Jeanne-Kamikaze has quit [Remote host closed the connection]
Fernando-Basso has quit [Remote host closed the connection]
jcowan has joined #racket
orivej has quit [Ping timeout: 272 seconds]
Sgeo_ has joined #racket
Sgeo__ has quit [Ping timeout: 245 seconds]
iyzsong has joined #racket
selimcan has joined #racket
demond has joined #racket
demond has left #racket ["++++++++++++++"]
ng0 has quit [Ping timeout: 256 seconds]
<selimcan> (port->string (get-pure-port (string->url url) "User-agent: Mozilla/5.0 (compatible; Foobot/1.1; +http://www.example.com/bot.html)"))
<selimcan> A noob question: is that ^ the right way to specify the user-agent ?
<selimcan> I want to scrape a website, and want to put my contact details just in case
ubLIX has quit [Quit: ubLIX]
<selimcan> (port->string (get-pure-port (string->url url) '("User-agent: Mozilla/5.0 (compatible; Foobot/1.1; +http://www.example.com/bot.html)"))) i.e.
dddddd has quit [Remote host closed the connection]
<greghendershott> selimcan: That should work. Headers for the net/url functions are supplied as a list of strings, each of which is formatted like you did.
<selimcan> thanks greghendershott !
<greghendershott> selimcan: BTW the net/url are fine, I grew up with Racket, using those. But see also net/http-client, which is newer.
<greghendershott> You might prefer using `http-sendrecv!` https://docs.racket-lang.org/net/http-client.html#(def._((lib._net%2Fhttp-client..rkt)._http-conn-sendrecv!))
<greghendershott> For one thing, it takes a uri as string or bytes (no need to do string->url).
<greghendershott> For another, it returns the response status, headers, and "body" as three values.
<greghendershott> (If you're using get-pure-port, you don't care about the status and headers.)
<greghendershott> (But if you someday wanted get-impure-port, then you'd need to parse out the three parts. Which isn't super hard, but is easier to do correctly with `http-sendrecv!`)
<selimcan> I see
<greghendershott> I don't mean to detour you, if get-pure-port is working fine and all you need.
<greghendershott> Just pointing out another option, someday/maybe.
<selimcan> On the contrary, that info is much appreciated
<greghendershott> If the net/http-client docs seem a little opaque (maybe it needs more examples) then my main advice is http-sendrecv! is the one thing to look at first. :)
<greghendershott> If you want to connect to a host, do one request/response, disconnect -- much like the net/url functions -- that is the easy button.
<greghendershott> (The rest is of interest for keeping the conn open, doing multi reqs, etc.)
<greghendershott> net/url ~= HTTP 1.0, and net/http-client ~= take advantage more of HTTP 1.1. roughly.
mr_yogurt has joined #racket
<selimcan> The rest will come handy once I learn more about the internet/web protocols themselves :)
FreeFull has quit []
libertyprime has joined #racket
keep_learning_M has joined #racket
selimcan has quit [Remote host closed the connection]
jao has quit [Ping timeout: 248 seconds]
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #racket
notzmv has joined #racket
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #racket
orivej has joined #racket
moldybits has quit [Quit: WeeChat 2.4]
moldybits has joined #racket
iyzsong has quit [Ping timeout: 250 seconds]
ym555 has quit [Ping timeout: 272 seconds]
pera has quit [Quit: leaving]
_whitelogger has joined #racket
_whitelogger has joined #racket
_whitelogger has joined #racket
ym555 has joined #racket
endformationage has quit [Quit: WeeChat 2.4]
sauvin has joined #racket
vraid has quit [Ping timeout: 258 seconds]
Arcaelyx has quit [Ping timeout: 246 seconds]
_whitelogger has joined #racket
iyzsong has joined #racket
ym555 has quit [Ping timeout: 245 seconds]
YuGiOhJCJ has joined #racket
selimcan has joined #racket
mSSM has joined #racket
selimcan has quit [Remote host closed the connection]
manualcrank has quit [Quit: WeeChat 1.9.1]
m1dnight_ has quit [Quit: WeeChat 2.4]
libertyprime has quit [Ping timeout: 258 seconds]
m1dnight_ has joined #racket
libertyprime has joined #racket
orivej has joined #racket
orivej has quit [Ping timeout: 246 seconds]
dddddd has joined #racket
dimitarvp has joined #racket
dimitarvp has quit [Client Quit]
orivej has joined #racket
orivej has quit [Ping timeout: 244 seconds]
Fernando-Basso has joined #racket
orivej has joined #racket
Sgeo_ has quit [Read error: Connection reset by peer]
Sgeo_ has joined #racket
iyzsong has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 258 seconds]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
soegaard has joined #racket
jao has joined #racket
jao is now known as Guest34562
ZombieChicken has quit [Remote host closed the connection]
diip has joined #racket
orivej has joined #racket
orivej has quit [Ping timeout: 248 seconds]
Guest34562 is now known as jao
soegaard has quit [Quit: soegaard]
rubic88 has quit [Remote host closed the connection]
efm has joined #racket
lavaflow has quit [Ping timeout: 258 seconds]
Fernando-Basso has quit [Remote host closed the connection]
Fernando-Basso has joined #racket
FreeFull has joined #racket
notzmv has quit [Read error: Connection reset by peer]
soegaard has joined #racket
SenasOzys has joined #racket
jao has quit [Ping timeout: 272 seconds]
libertyprime has quit [Remote host closed the connection]
endformationage has joined #racket
Arcaelyx has joined #racket
soegaard has quit [Quit: soegaard]
ng0 has joined #racket
sleepnap has joined #racket
ricekrispie2 has joined #racket
ricekrispie has quit [Ping timeout: 245 seconds]
soegaard has joined #racket
mfiano has quit [Ping timeout: 272 seconds]
mfiano has joined #racket
sleepnap has quit [Quit: Leaving.]
dddddd has quit [Quit: Hasta otra..]
dddddd has joined #racket
synthmeat has joined #racket
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Sgeo_ has quit [Read error: Connection reset by peer]
Sgeo_ has joined #racket
ubLIX has joined #racket
<diip> hi
<diip> I recently installed minimal-racket on a smallish arm machine
<diip> is there any way to use the gui on arm? what libraries would I need
<diip> I could not find a "draw" library for arm
<diip> but this post seems to point to Dr racket running on arm https://ericclack.blogspot.com/2015/11/racket-on-raspberry-pi.html
<soegaard> Good question.
<soegaard> Eric, the blog post author, writes that he used "Unix source + built packages.".
<diip> yes, but "draw" for unix has only x86-64
selimcan has joined #racket
<diip> and I can't really afford to install the full implementation
<soegaard> I have never used Racket on Arm, so I haven't got a better idea, than to wait and see if another Arm user shows up.
<soegaard> If none shows, try asking again in the Slack channel.
<selimcan> ... or mailing list
<diip> how do I know if an arm user shows up? would he see a previous question?
<diip> Thanks for the link
<diip> will look into those
<soegaard> But I don't know how many looks at the log.
<soegaard> Here Slack is better - new users can see old conversations immediately.
<technomancy> =(
q9929t has joined #racket
q9929t has quit [Client Quit]
jao has joined #racket
clacke_movim has left #racket [#racket]
synthmeat has left #racket ["WeeChat 2.4"]
clacke_movim has joined #racket
dmiles has quit [Ping timeout: 252 seconds]
<diip> I am having anothre mild problem with Drracket
<diip> The shortcuts for "revert" and "switch focus" don't seem to work on mine...
<diip> I managed to remap revert to something else
<diip> but I can't seem to remap "switch-focus" using any of the examples on this page https://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html
dmiles has joined #racket
<soegaard> @diip In the menu "Edit" choose the menu item "Keybindings".
<diip> menu-bind worked for Revert but doesn't seem to work for the "switch-focus"
<soegaard> Then choose "Show Active Keybindings..."
Sgeo__ has joined #racket
<soegaard> Search for, say, switch
<diip> It says C-f6 but that does not work
<soegaard> try focus instead
<soegaard> it seems the command is shift-focus not switch-focus
<soegaard> Oh! I misread the docs, it too says shift-focus.
<soegaard> Try alt-rab instead
<diip> rab?
<soegaard> tab
<diip> not working either
Fernando-Basso has quit [Remote host closed the connection]
<soegaard> what is shown, when you search for focus in the active bindings?
Sgeo_ has quit [Ping timeout: 268 seconds]
<diip> shift-focus(c:f6)
<diip> unhide search and toggle focus (f3)
<soegaard> I normally use cmd-d and cmd-e
<soegaard> Try searching for "Definitions" and then see what "Show Definitions" is bound to.
<diip> yes, maybe I'll just use those, I got revert to work which is what is important. Thanks
<diip> there is no "show definitions"
<diip> "hide definition" (c:d) ... That works
<soegaard> May Show Definitions / Hide Definitions appear only when the definitions windows is hidden/shown.
<soegaard> May -> Maybe
soegaard has quit [Quit: soegaard]
ym555 has joined #racket
selimcan has quit [Remote host closed the connection]
vraid has joined #racket
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #racket
SenasOzys has quit [Remote host closed the connection]
jsomedon has joined #racket
soegaard has joined #racket
jsomedon has quit [Quit: jsomedon]
manualcrank has joined #racket
Jeanne-Kamikaze has joined #racket
ubLIX has quit [Quit: ubLIX]
lavaflow has joined #racket
selimcan has joined #racket
ubLIX has joined #racket
casaca has quit [Remote host closed the connection]
casaca has joined #racket
lavaflow has quit [Ping timeout: 272 seconds]
selimcan has quit [Remote host closed the connection]
orivej has joined #racket
ym555_ has joined #racket
ym555 has quit [Ping timeout: 268 seconds]
rubic88 has joined #racket
ym555_ is now known as ym555
soegaard has quit [Quit: soegaard]
ym555 has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 246 seconds]
ym555 has joined #racket
ubLIX has quit [Quit: ubLIX]
efm has quit [Ping timeout: 268 seconds]
ng0 has quit [Quit: Alexa, when is the end of world?]
efm has joined #racket
ym555 has quit [Read error: Connection reset by peer]
ym555 has joined #racket
ZombieChicken has joined #racket
lavaflow has joined #racket
lavaflow has quit [Ping timeout: 244 seconds]
casaca has quit [Ping timeout: 272 seconds]
casaca has joined #racket