badkins has quit [Remote host closed the connection]
badkins has joined #racket
ng0 has quit [Ping timeout: 256 seconds]
ng0 has joined #racket
notzmv has joined #racket
vraid has quit [Ping timeout: 252 seconds]
jao has quit [Remote host closed the connection]
Falacer has joined #racket
pera has quit [Quit: leaving]
Falacer has quit [Ping timeout: 245 seconds]
ng0 has quit [Quit: Alexa, when is the end of world?]
badkins has quit [Remote host closed the connection]
badkins has joined #racket
Falacer has joined #racket
orivej has quit [Ping timeout: 245 seconds]
Falacer_ has joined #racket
Falacer has quit [Ping timeout: 250 seconds]
Falacer_ has quit [Ping timeout: 245 seconds]
ubLIX has quit [Quit: ubLIX]
efm has quit [Ping timeout: 246 seconds]
efm has joined #racket
FernandoBasso has joined #racket
FernandoBasso has quit [Remote host closed the connection]
Fernando-Basso has quit [Ping timeout: 246 seconds]
efm has quit [Remote host closed the connection]
efm has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Ping timeout: 250 seconds]
Falacer has joined #racket
ZombieChicken has quit [Ping timeout: 256 seconds]
Falacer has quit [Ping timeout: 255 seconds]
ZombieChicken has joined #racket
xuanrui has joined #racket
FreeFull has quit []
dddddd has quit [Remote host closed the connection]
xuanrui has quit [Remote host closed the connection]
Falacer has joined #racket
Diagon has joined #racket
Diagon has quit [Remote host closed the connection]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
pierpal has quit [Quit: Poof]
pierpal has joined #racket
jao has joined #racket
Falacer has quit [Ping timeout: 246 seconds]
Falacer has joined #racket
jao has quit [Ping timeout: 255 seconds]
ZombieChicken has quit [Ping timeout: 256 seconds]
ZombieChicken has joined #racket
Falacer has quit [Ping timeout: 252 seconds]
endformationage has quit [Quit: WeeChat 2.4]
sauvin has joined #racket
Falacer has joined #racket
orivej has joined #racket
ZombieChicken has quit [Ping timeout: 256 seconds]
ZombieChicken has joined #racket
Falacer has quit [Ping timeout: 245 seconds]
buyfn has joined #racket
orivej has quit [Ping timeout: 245 seconds]
buyfn has quit [Quit: buyfn]
badkins has joined #racket
badkins has quit [Ping timeout: 250 seconds]
buyfn has joined #racket
Falacer has joined #racket
buyfn has quit [Quit: buyfn]
buyfn has joined #racket
Falacer has quit [Ping timeout: 245 seconds]
Fare has quit [Ping timeout: 252 seconds]
widp_ has quit [Ping timeout: 246 seconds]
Fare has joined #racket
widp_ has joined #racket
Fare has quit [Ping timeout: 245 seconds]
widp_ has quit [Ping timeout: 272 seconds]
buyfn has quit [Quit: buyfn]
Arcaelyx has quit [Ping timeout: 245 seconds]
ng0 has joined #racket
keep_learning_M has quit [Quit: This computer has gone to sleep]
Falacer has joined #racket
keep_learning_M has joined #racket
vraid has joined #racket
widp_ has joined #racket
keep_learning_M has quit [Client Quit]
orivej has joined #racket
pie__ has quit [Remote host closed the connection]
pie__ has joined #racket
catonano has quit [Quit: catonano]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #racket
ZombieChicken has quit [Ping timeout: 256 seconds]
Fare has joined #racket
Falacer has quit [Quit: leaving]
dddddd has joined #racket
<jboy>
In an xexpr, how do I set a boolean attribute (such as required in <input type="text" required>)?
<jboy>
I've tried `(input ([type "text"] [required #t])) but that fails. Just [required] on its own also doesn't work.
<jboy>
I suppose as a workaround I can just use [required "true"], that seems to be accepted by the browser.
lavaflow_ has quit [Ping timeout: 246 seconds]
<jboy>
(Perhaps this is a reason to use sxml rather than xexprs, which would answer another of my questions: why one should prefer one over the other.)
jao has joined #racket
amz3 has joined #racket
catonano has joined #racket
cantstanya has quit [Remote host closed the connection]
<lexi-lambda>
jboy: I think <input type="text" required> is valid HTML but not valid XML/XHTML, and I think xexprs are really designed to represent XML.
jao has quit [Ping timeout: 252 seconds]
q9929t has joined #racket
q9929t has quit [Quit: q9929t]
lavaflow_ has joined #racket
Fare has quit [Ping timeout: 246 seconds]
lispmacs has joined #racket
razzy has joined #racket
<razzy>
hi, umh, why is racket list imutable?
<razzy>
or considered "immutable"
<vraid>
you can never add or remove elements to an existing list
<razzy>
is it a fact?
<razzy>
disclaimer, i do not know racket
<razzy>
vraid: i have seen many shenanigans, i would be suprised only a little if it is true
<bremner>
razzy: are you asking for a defence of immutable datastructures and "functional programming"?
buyfn has joined #racket
Fare has joined #racket
<lexi-lambda>
razzy: Yes, it is genuinely not possible in Racket to change the contents of an existing list.
<razzy>
bremner: so it is coucious effort to make purely immutable way the easiest way for programmer. to promote pure functions
<dzoe>
razzy: if the list is immutable, adding/removing an item from it is extremely cheap - as internally it can just move one pair
<dzoe>
razzy: Think about that car/cdr (first/rest) paradigm when removing and think about prepending using cons - you never need to modify existing list
<dzoe>
(Although in my opinion, you can behave like you are actually modifying it - it is very natural actually)
<razzy>
dzoe: i am confused now. dzoe what you are describing is mutable list, yes?
<dzoe>
Nope, immutable list.
selimcan has joined #racket
<dzoe>
Try (define a '(1 2 3)) and then get (cdr a) or (define b (cons 0 a)) - both operations are O(1) because internally there is no need to copy anything
Fare has quit [Ping timeout: 255 seconds]
pierpal has quit [Read error: Connection reset by peer]
<dzoe>
I think there is a chapter/section on constructing lists in HtDP - maybe look it up. Nice reading.
<razzy>
can anyone say dzoe is right?
<bremner>
right about what? that cons and cdr are O(1)? yes, that is correct
selimcan has quit [Remote host closed the connection]
<dzoe>
This is very basic stuff - but actually I am having a hard time explaining this to students :-/
<bremner>
dzoe: I find re-use easier to understand.
<friscosam>
Also with immutable lists length can be O(1) instead of O(n) [not sure if Racket implements lists that way]
<bremner>
i.e. (cons 'a lst) and (cons 'b lst) can share lst
<bremner>
friscosam: sssh, students will be asking for penalty marks back ;)
<friscosam>
haha
<bremner>
dzoe: I mean, I find it easier for students to understand because I can draw a picture
<dzoe>
Yep, re-use helps with explaining why mutating is a bad idea
<dzoe>
True that. The beginning of semester is mostly about drawing linked lists on the whiteboard.
<razzy>
i am confused about names
<vraid>
razzy: what is the point of us answering if you don't accept the answers?
<dzoe>
Btw, where di soegaard disappear? I still owe him a big thanks for that pdf-dc% hints he gave me ...
<dzoe>
*did
pierpal has joined #racket
<razzy>
vraid: i am saying that i do not understand yet. what dzoe describing i would consider mutable list, because it is easily changable without ther consequences
<dzoe>
razzy: Look carefully - I am not changing anything, I am defining a new one.
<dzoe>
razzy: As bremner said - it is basically about re-use.
<dzoe>
razzy: (define a '(1 2 3)) (define b (cons 0 a)) -- both a and b are normal immutable lists, a with 3 elements, b with 4 elements
<razzy>
dzoe: so cons-ing is perfectly OK?
<razzy>
with immutable lists?
<dzoe>
Yep
<razzy>
i see now
<razzy>
can racket do easy massive paraelism?
<dzoe>
Depends on what do you mean by "easy".
<dzoe>
If you are talking about pure computation than yes, the futures can do a lot.
<dzoe>
With places you can scale even to multiple machines, but you may find it hard to grasp at first glance.
orivej has quit [Ping timeout: 250 seconds]
pierpal has quit [Read error: Connection reset by peer]
<dzoe>
Is there a function in racket for finding modular multiplicative inverse? As there is (gcd), I would assume Bezout's coefficients are there as a byproduct somewhere ...
pierpal has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 246 seconds]
emacsomancer has joined #racket
Fare has joined #racket
Sgeo_ has joined #racket
<samth>
friscosam: racket makes list? O(1) but not length
pierpal has joined #racket
Sgeo has quit [Ping timeout: 272 seconds]
pera has joined #racket
<Duns_Scrotus>
how does it make list? O(1), does cons check its second argument
selimcan has joined #racket
orivej has joined #racket
<samth>
pairs have a bit in the header tracking that
eddof13 has quit [Ping timeout: 252 seconds]
Fare has quit [Ping timeout: 272 seconds]
selimcan has quit [Remote host closed the connection]
dan_f has joined #racket
endformationage has quit [Ping timeout: 246 seconds]
dan_f has quit [Client Quit]
soegaard has joined #racket
dan_f has joined #racket
ym555 has joined #racket
FreeFull has joined #racket
widp_ has joined #racket
dan_f has quit [Quit: dan_f]
dan_f has joined #racket
dan_f has quit [Client Quit]
orivej has quit [Ping timeout: 268 seconds]
dan_f has joined #racket
ZombieChicken has joined #racket
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
Sgeo has joined #racket
catonano has quit [Remote host closed the connection]
efm has quit [Remote host closed the connection]
efm has joined #racket
Sgeo_ has quit [Ping timeout: 272 seconds]
dan_f has quit [Quit: dan_f]
vraid has joined #racket
dan_f has joined #racket
dan_f has quit [Client Quit]
dan_f has joined #racket
dan_f has quit [Quit: dan_f]
mSSM has joined #racket
<mSSM>
How do you scale drracket UI up? The font right above the text windows (which gives the file name on the left, and where the Check Syntax, Run, Stop buttons are) is very very tiny
<mSSM>
I tried with GDK_DPI_SCALE, which scales the File, Edit, View, etc menus up, but leaves everything else small
<soegaard>
mSSM: Have you looked in preferences?
<soegaard>
If yes, then what's your OS?
<mSSM>
soegaard: Arch Linux
<soegaard>
hidpi screen?
<mSSM>
There is nothing in the preferences. The text size is only affecting the text window
<mSSM>
soegaard: yes
<mSSM>
Well
<mSSM>
It's a 34" 5120x2160
<mSSM>
So technically not high dpi
<zenspider>
I don't think there's a knob in drracket for this...
<soegaard>
Linux - it's been too long. If no one has an idea - try asking the same question on Slack.
<mSSM>
The weird thing is that `GDK_DPI_SCALE=2 drracket` does not affect the text inside drracket
<mSSM>
It just scales the drop down menus up which belong to gtk
dan_f has joined #racket
<soegaard>
Sounds like a bug.
<soegaard>
Maybe.
<zenspider>
mSSM: are you pretty set on using drracket? Personally, I prefer emacs + racket-mode. Might work better for you.
<mSSM>
Yeah, I am thinking about setting up vim-slime
<zenspider>
yeah. it's nice for newbies... but I find it pretty clunky
<soegaard>
Start with DrRacket. Then maybe experiment with racket-mode.
<zenspider>
I've even added some tweaks to racket-mode to make it feel a bit more like drracket... clears the repl on each run, etc.
<soegaard>
vim-slime has (as far as I know) no where near the features as the others.
<mSSM>
That'd require me to learn emacs, which is a bit too much intellectual overhead for me right now
<zenspider>
mSSM: definitely file a bug w/ screenshots and details as to your setup
<mSSM>
oki
<soegaard>
FWIW I still use DrRacket for everything Racket related.
<soegaard>
Otherwise I use Sublime and/or Emacs.
<zenspider>
mSSM: you might be surprised. A lot of vim users are moving over to spacemacs or just emacs+evil (a vim mode)
<greghendershott>
mSSM: I'm kind of a Linux nub but on Ubuntu with Gnome I use gnome-tweak-tools to set text scale to e.g. 1.50 and it adjusts DrRacket like other apps.
<greghendershott>
mSSM: Whereas the overall scaling I have at 100%. So, the GUI elements are a bit oddly small, but the text is readable.
<greghendershott>
It's not ideal, not as coherent as on macOS or Win but it's OK for me, until I can figure out what to do instead.
<greghendershott>
Supposedly Wayland will be the answer to all HiDPI and multi-monitor problems... someday. idk
dog-this-is has joined #racket
<dog-this-is>
Hi, Does anyone here have any experience with building automatic GUI object editors based on class definitions (or similar)?
<mSSM>
greghendershott: Yeah, just tried that. That's what GDK_SCALE=1.5 drracket does
<mSSM>
greghendershott: It just scales up everything. Buttons and text are slightly bigger/better, but still oddly small relative to the rest
<mSSM>
This strikes me as an issue with the specific implementation of drracket though
<greghendershott>
Oh I thought you'd said the text itself was not bigger.
<mSSM>
Yeah, with GDK_DPI_SCALE
<zenspider>
too many knobs :P
<mSSM>
Note the difference: GDK_SCALE <> GDK_DPI_SCALE
dan_f has quit [Quit: dan_f]
<mSSM>
looks like drracket is hardcoded vis a vis the dpi
<greghendershott>
Oh OK. I thought you'd just made a typo. :) org/gnome/desktop/interface/text-scaling-factor is the setting that makes DrR text bigger, for me with Gnome. How that comes through to DrR, idk.
<mSSM>
Yeah, pretty sure that that text-scaling-factor is exactly GDK_SCALE
<mSSM>
At least the results I am observing are indistinguishable
<mSSM>
Anyways, thank y'all
<greghendershott>
I've been using Ubuntu on raw hardware for about 6 days now, so, I will definitely defer to you the Arch user. :D
<mSSM>
I might give spacemacs a shot
<mSSM>
Looks spacey
<mSSM>
greghendershott: Haha, I have no idea what I am doing. Just bits and bobs I remember
<greghendershott>
At least with GUI emacs you can set the base font size and everything will be exactly the way you want.
<friscosam>
samth: that make sense. list? could be used a ton with the contract system I imagine.
<mSSM>
A big issue I have with wrapping my head around racket is discoverability: I don't quite understand what kinds of arguments I can pass to functions.
<zenspider>
for me, I go to my local doco, search "slider", pick "slider%", and can immediately see vert-margin
<zenspider>
for me, it's at file:///MyApplications/dev/lisp/Racket/doc/gui/slider_.html?q=slider
<soegaard>
It's not always as easy though.
<zenspider>
yeah. for the OO stuff, you might have to walk up
<soegaard>
Gui components often inherit properties from more abstract components.
<soegaard>
You read my mind.
<zenspider>
tho in this case, that's just control% ? which doesn't seem to do much on its own
<friscosam>
see also: javadoc
endformationage has joined #racket
<zenspider>
with some exceptions where the phds are blind to their own obtuse language... I've found racket's documentation system to be some of the best. esp that it is locally generated (fast and always there, even search). I wish there was better support for cmdline/editor doco... but racket-mode handles it pretty well
<mSSM>
Does racket have something like clojure's source? I am learning a bit here and there and that's the first thing they mention
<zenspider>
what do you mean?
<mSSM>
You execute (source myfun) and it prints the definition of myfun
<zenspider>
oh! I dunno. racket-mode lets you jump to a definition. There might be repl support tho. I haven't looked
<mSSM>
zenspider: re doc: have a look at rust's doc. I think they did a very good job with it.
<soegaard>
No. But you get something else in DrRacket.
<zenspider>
mSSM: I couldn't disagree with you more there. rust doco was bitrotted and horrible last time I tried anything
<soegaard>
If you have an the name (an identifier) in your program and want to know it's definition, then click the "Check Syntax" icon (the one with a check mark in the upper, right corner).
<zenspider>
NOT local, NOT up to date, NOT readable, generated reams of interface crap that could have been one line. etc.
<soegaard>
Then right click on the identifier, and choose ... something... binding.
<soegaard>
The source is not available at runtime.
<zenspider>
hrm. the racket repl has ,describe to show the doco ... but I don't see one that shows the source
<mSSM>
zenspider: When was the last time you tried it?
<zenspider>
less than a year?
<zenspider>
possibly longer, but less than two for sure.
efm has quit [Remote host closed the connection]
<zenspider>
I'm definitely biased tho. I hated everything about that language. The API, doco, tooling, etc.
efm has joined #racket
<zenspider>
it rubbed me the wrong way every step of the way.
<mSSM>
:(
<zenspider>
as obtuse as I find haskell sometimes, it was a veritable breeze in comparison. much more productive. I just wish they'd fix their tooling
<zenspider>
anyhow... I want to address your racket issues, not my rust issues :P
<mSSM>
fair enough :D
<zenspider>
so I have the base of that file: url above bookmarked... so when I have any question about racket, I switch to my browser, hit cmd-5, search, and I'm well on my way.
<zenspider>
I've even created a 1-off web browser app that is just for that purpose
<soegaard>
cmd-l, d is enough for me :-)
<zenspider>
and honestly, the doco is so good (mostly) that it usually stops right there... other than the OO part where you might have to go up... tho I just saw that the sidebar has all the inherited properties and methods at the bottom, so searching just the initial page should find everything
<mSSM>
raco docs fires it up
<zenspider>
yeah. I just bookmarked that first page that raco docs brings up
<zenspider>
soegaard: cmd-l, d ?
<zenspider>
in drracket?
<soegaard>
No, in chrome.
<soegaard>
d in the adress bar autocompletes docs.racket-lang.rorg
<zenspider>
aah. gotcha.
<zenspider>
I would say. the ONE thing I dislike about the local doco is that they don't have links up to the global doco. which makes me quickly searching something locally but sharing it on here a bit of a pain
ubLIX has joined #racket
<soegaard>
I usually use the global ones. Sometimes I discover interesting packages that I haven't installed locally.
<zenspider>
I work offline and in a cafe w/ questionable network speeds more often than not
<zenspider>
but totally... the discoverablity there is nice
acarrico has quit [Ping timeout: 252 seconds]
eddof13 has joined #racket
lispmacs has quit [Remote host closed the connection]
efm has quit [Remote host closed the connection]
efm has joined #racket
acarrico has joined #racket
dog-this-is has quit [Remote host closed the connection]
badkins has quit [Remote host closed the connection]
Fernando-Basso has quit [Remote host closed the connection]
soegaard has quit [Quit: soegaard]
efm has quit [Remote host closed the connection]
efm has joined #racket
<dzoe>
s455wang: ah, didn't know about that one - I just used my implementation from some time ago (again). Thanks, will look into it.