ng0 has quit [Quit: Alexa, when is the end of world?]
zipper has quit [Ping timeout: 245 seconds]
<J_Arcane>
just wondered if there was some script or something to symlink the /bins to some /local/bin or somewhere like it
<friscosam>
if I was real clever I'd have a shell snippet that would just add the highest version number of Racket found to the path
<J_Arcane>
yeah.
<J_Arcane>
I think what I used to do is always just rename the folder to plain "Racket" so I didn't have to redo it every time. XD
<friscosam>
I have 5 versions of Racket here and I probably only need 1 (or 2 in case I find some breakage) just because I'm too lazy to clear them off
zipper has joined #racket
Lowl3v3l has quit [Quit: Leaving.]
dustyweb has quit [Ping timeout: 276 seconds]
ZombieChicken has joined #racket
gnugnugnu has quit [Quit: WeeChat 2.5]
gnugnugnu has joined #racket
gnugnugnu has quit [Client Quit]
zipper has quit [Ping timeout: 245 seconds]
liberiga has quit [Ping timeout: 260 seconds]
zipper has joined #racket
badkins_ has joined #racket
zipper has quit [Client Quit]
badkins has quit [Ping timeout: 248 seconds]
badkins_ has quit [Ping timeout: 268 seconds]
mSSM has quit [Ping timeout: 258 seconds]
ketralnis has joined #racket
Diagon has joined #racket
ZombieChicken has quit [Quit: WeeChat 2.5]
ketralnis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ketralnis has joined #racket
bremner has quit [Quit: Coyote finally caught me]
bremner has joined #racket
ziyourenxiang_ has joined #racket
ubLIX has quit [Quit: ubLIX]
Sgeo__ has quit [Ping timeout: 258 seconds]
Diagon has quit [Quit: Leaving]
Sgeo has joined #racket
liberiga has joined #racket
<evdubs>
anyone have opinions on the following: i am building an api to connect to a stock broker and in my design i am thinking of having the request messages be objects and the response messages be structs
<evdubs>
request messages are objects for two primary reasons: they can all implement an interface which serializes the object and constructing them should be easier as they mostly have well defined defaults so construction just requires a few named fields rather than doing a struct initialization with all fields passed
<evdubs>
but i don't need that for the response messages
<evdubs>
is it stylistically weird to have an object/struct dichotomy for messages sent and received?
<evdubs>
i suppose there's no "harm" in having the response messages be objects, too, but it isn't necessary and structs seem simpler
<greghendershott>
evdubs: If that makes most sense to you, sure.
<greghendershott>
I would probably have both be plain structs. And just define a more-convenient "constructor" function, and serializer function, for each.
<evdubs>
maybe it's easier to enforce contracts on objects/classes so that i can make sure the data is "clean" when received by the client-side api?
<greghendershott>
But that's just me. I'm reluctant to add racket/class and get OOP-y unless it's compelling.
<greghendershott>
It might be. It depends on the API. If it has a distinct REST point or RPC call for each sort of request/response, I'd probably just put each in its own .rkt file.
<greghendershott>
Along with the ctor function and serializer function.
<evdubs>
greghendershott, one of the messages is the "new order" message which has, oh, about 100 or so different components
<greghendershott>
OTOH if the API is more "generic" with a lot of common stuff among all reqs/resps, maybe I'd centralize more.
<greghendershott>
Oh.
<evdubs>
but you're usually doing things like "send new order buy 100 GOOG limit 1139"
<greghendershott>
Yeah, if you're talking hundreds as opposed to dozens of reqs/resps, I might start thinking more OOP-y to DRY.
<evdubs>
or "send new order sell 100 GOOG stop limit 1130"
<evdubs>
type stuff
<evdubs>
where the class supports a ton of stuff and you sort of ad hoc fill in fields that are relevant - most of the message is unused every time you send it
<evdubs>
would choosing to go OOP with requests influence your decision to pick structs for responses?
<greghendershott>
Sure, that sounds like something where racket/class or racket/generic (or some hand-rolled syntax) might help reduce some boilerplate repetitious ceremonial stuff.
<greghendershott>
as for consistent struct or class for req vs. resp, that seems _nice_ but if you have a good reason not to, sure
<greghendershott>
Sorry if I'm being equivocal.
<greghendershott>
I'm kind of a fan of just trying stuff, living with it for awhile, and seeing if it makes sense.
<evdubs>
;) do you find enforcing contracts to be easier with classes - i have not implemented/applied a single contract to my racket code so i am clueless
<evdubs>
but i think i would like to make sure that "this is an int, that is a string", etc
<greghendershott>
I have pretty much zero mileage using racket/class except for a little of the GUI stuff that uses it.
<evdubs>
ok
<greghendershott>
I've hardly ever defined my own, much less added contracts.
<greghendershott>
I think contracts with equally well with stand-alone functions and class "methods", both.
<greghendershott>
But someone else with more experience with classes could better say for sure.
<greghendershott>
(To be clear, I don't think there's anything bad about racket/class. I just did a lot of OOP C++ so when I came to Racket I was more interested in trying other things.)
<evdubs>
for sure - i come from a java in school and out of school with c# and scala experience so i think i am thoroughly brain washed