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
ubLIX has quit [Quit: ubLIX]
dustyweb has quit [Ping timeout: 258 seconds]
vraid has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 248 seconds]
libertyprime has joined #racket
cpup has quit [Quit: Breaking stuff]
kd7ixo has quit [Quit: Lost terminal]
kd7ixo has joined #racket
dddddd has quit [Remote host closed the connection]
FreeFull has quit []
YuGiOhJCJ has joined #racket
cantstanya has joined #racket
_whitelogger has joined #racket
dbmikus has joined #racket
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #racket
lose has joined #racket
loses has joined #racket
loses has quit [Remote host closed the connection]
n_blownapart has joined #racket
n_blownapart is now known as crestfallen
jao has quit [Ping timeout: 258 seconds]
orivej has joined #racket
orivej has quit [Ping timeout: 248 seconds]
endformationage has quit [Ping timeout: 258 seconds]
crestfallen has quit [Quit: Leaving]
sauvin has joined #racket
nicolasman2 has quit [Quit: The Lounge - https://thelounge.chat]
awkravchuk has joined #racket
wehlutyk has joined #racket
dmiles has quit [Ping timeout: 272 seconds]
<awkravchuk> Hey guys. I was wondering how to properly use FFI in Typed Racket. I have quite a large external C library to use, so it will be difficult to require/typed all of function declarations in client code. I've tried to write the glue code in #lang typed/racket, but type checker gives me "type name `->' is unbound" error, which I have no idea how to get around. Any advice?
wehlutyk has quit [Quit: wehlutyk]
dbmikus has quit [Remote host closed the connection]
dmiles has joined #racket
<lexi-lambda> awkravchuk: To my knowledge, the only way to use the FFI with Typed Racket is to write the FFI bindings in `#lang racket`, then import them into typed code using `require/typed`.
<awkravchuk> lexi-lambda: Oh, okay, thanks. That's sad, if you need tens or so FFI functions, the require/typed clause will become awfully large :(
jcowan has quit [Quit: Connection closed for inactivity]
manualcrank has quit [Quit: WeeChat 1.9.1]
dubst3pp4 has joined #racket
lavaflow_ has quit [Ping timeout: 258 seconds]
lavaflow_ has joined #racket
ZombieChicken has quit [Disconnected by services]
forgottenwizard has joined #racket
forgottenwizard is now known as ZombieChicken
wehlutyk has joined #racket
wehlutyk has quit [Remote host closed the connection]
wehlutyk has joined #racket
YuGiOhJCJ has quit [Remote host closed the connection]
YuGiOhJCJ has joined #racket
orivej has joined #racket
soegaard has joined #racket
enderby has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 244 seconds]
orivej has joined #racket
moldybits has quit [Quit: WeeChat 2.4]
moldybits has joined #racket
<J_Arcane> well, this is odd. I have a web app. That app had a static route that served an HTML file. I decided to rewrite the HTML in Racket as an xexpr, turn that into a string, and serve that instead.
<J_Arcane> only, when I do that, the Javascript stopped working.
<J_Arcane> wat
dubst3pp4 has quit [Quit: Bye]
wehlutyk has quit [Quit: wehlutyk]
<tonyg> J_Arcane: I bet it's a quoting issue of some kind. The browser does a bunch of grungy stuff to let pages be sloppy in ways xexprs don't
<soegaard> Ah! So the original JavaScript could be at fault.
evhan has quit [Read error: Connection reset by peer]
<J_Arcane> dunno. The HTML it serves up looks identical, but it for some reason isn't loading the Elm script. It requests it, and gets it, but it's not loading it.
evhan has joined #racket
ubLIX has joined #racket
evhan has quit [Read error: Connection reset by peer]
evhan has joined #racket
dustyweb has joined #racket
<tonyg> Curious. ... ISTR the xexpr->string conversion treats xexprs like XML, not HTML, so inserts various closing tags where they aren't wanted in an HTML context
<tonyg> perhaps that could be a source of problems. e.g. </img>, </link>
<tonyg> J_Arcane: try using empty-tag-shorthand and html-empty-tags, https://docs.racket-lang.org/xml/index.html?q=empty%20tag#%28def._%28%28lib._xml%2Fmain..rkt%29._html-empty-tags%29%29
<tonyg> J_Arcane: Or, use Greg Hendershott's nice display-xexpr from the markdown package, https://docs.racket-lang.org/markdown/index.html?q=display-xexpr#%28def._%28%28lib._markdown%2Fdisplay-xexpr..rkt%29._display-xexpr%29%29
evhan has quit [Quit: De IRC non curat rex...]
evhan has joined #racket
akaWolf has quit [Ping timeout: 252 seconds]
akaWolf has joined #racket
vraid has joined #racket
<J_Arcane> tonyg: unfortunately neither of those work for me. The former makes no difference, and the latter is too large of a dependency. :( I suspect though it has something to do with the order the scripts are being loaded in, though why that should be different in this case I dunno. Maybe I need to move around the script tags.
<tonyg> J_Arcane: have you done a fine diff between the two outputs?
<tonyg> it's also odd that using empty-tag-shorthand didn't change anything! maybe you don't have any such void tags in your document
<J_Arcane> The script tag that doesn't seem to be loading uses closing tags in both the original HTML and the output for me at least.
<tonyg> browsers can be triggered into quirks mode by various other things on the page
<tonyg> i guess
<tonyg> if you have the two outputs, you can use git diff --color-words='(\\w+)|.' --no-index FILE1 FILE2 to get a finegrained overview of what changed
<tonyg> hm was it *racket* serving the static page previously? if not, check to make sure the headers are equivalent. e.g. content-type etc
<J_Arcane> yeah.
dddddd has joined #racket
<J_Arcane> tonyg: OK this is something I hadn't noticed. The body and the script tags in it are the same between my string-xexpr output, but in the original HTML, the meta and link tags in the head all don't have a closing slash at all.
<J_Arcane> ie. <meta ...>, instead of <meta ... />
<tonyg> that could be it, yeah. do you have an html5 doctype?
<tonyg> if not, add one perhaps -- it could be enough to let the parser recognise those forms of void tag
<tonyg> without an html5 doctype i think it's dicey to use the <link/> form
<J_Arcane> DOCTYPE is just "html"
<tonyg> as in #"<!DOCTYPE html>" ?
<tonyg> that's an html5 one
<J_Arcane> yeah
<tonyg> hmm.
<J_Arcane> it would probably be helpful if I linked the actual code I suppose: https://glitch.com/edit/#!/elm-on-racket
<tonyg> found it
<tonyg> you want Elm.Main but have Elm.main
<tonyg> :)
<tonyg> J_Arcane: ^
<J_Arcane> ...
<J_Arcane> šŸ¤¦ā€ā™€ļø
<tonyg> haha ComPUtERs ARe gREAt
<J_Arcane> why is it 90% of the time these magic weird bugs are actually just some weird typo somewhere I've missed a dozen times ?
<tonyg> oh yeah. web programming
<tonyg> it's remarkable how resistant racket programming is to that kind of failure actually
<J_Arcane> Yeah. It is interesting in that, for a dynamic language, I find I rarely run into the kinds of spooky edge cases I do in even other Lisps like Clojure
<tonyg> maybe it's a kind of cultural homogeneousness
<tonyg> like in js you'll get foo_bar, fooBar, FooBar, FOO_BAR
<tonyg> in racket you'll likely get foo-bar
<J_Arcane> also, consistent syntax and convention really does help with avoiding these kinds of errors, yeah.
<tonyg> (it took a "console.log('yo', window)" plus farting around in the object inspector to notice the case difference btw. i didn't do it just by visual inspection)
<tonyg> (glitch is pretty cool!)
<J_Arcane> yeah. I think I tried looking in the elm.js code
<J_Arcane> but that's so huge and long and weird sicne it's both compiled JS and also contains the whole runtime, that it wasn't really helpful
<tonyg> the inspector showed basically "{ Main |> : ... }" so I could focus on just that one entry
<J_Arcane> Yeah. That somehow didn't occur to me. I was thinking maybe that elm.js just wasn't loading at all
<tonyg> yeah me too
<tonyg> it's nice that finally the inspector tools in ordinary browsers are better than printf
<J_Arcane> heh, yeah.
<J_Arcane> though I rarely am working in pure JS so I don't always get to take advantage of it
<tonyg> yeah. it's also a bit frustrating in comparison to smalltalk tooling. still. (of course ;-) )
dmiles has quit [Read error: Connection reset by peer]
<J_Arcane> Hmm. I would move the CSS to Racket as well, but it seems the css-expr library depends on "base" which is too big for a Glitch container. :/
<J_Arcane> at least quite often it seems when I install a package with "base" it just installs all of main-distribution and next thing you know my container is out of space again
<tonyg> i've had that experience too
<tonyg> it'd be a lot of work to more finely factor base
<tonyg> (my contexts have been docker containers, and running on tiny mips machines on openwrt)
<tonyg> i ended up giving up on the tiny mips machines, and just accepting that docker images are bloaty
<J_Arcane> yeah. Glitch projects get 194mb of disk space, and no more. And in general start breaking in mystical ways if you even get close to that limit
<J_Arcane> this isn't a problem for Node/JS stuff, because it cheats. :D
<J_Arcane> They use pnpm with a shared package cache across containers, so that your npm deps don't count against disk space
<tonyg> Long ago I wondered whether it'd be possible to hack up the racket require mechanism to load directly from http into RAM
<tonyg> istr that it wasn't easily doable
<tonyg> too C-level, too deep
<tonyg> which is a drag, because python gets to play in places like that
<tonyg> even python :)
davidl has quit [Ping timeout: 258 seconds]
dmiles has joined #racket
soegaard has quit [Quit: soegaard]
acarrico has joined #racket
<J_Arcane> maybe when chez happens. :D
<tonyg> yeah that could be an interesting point of intercession
dmiles has quit [Read error: Connection reset by peer]
clacke_movim has left #racket [#racket]
dmiles has joined #racket
<J_Arcane> though security wise, even in the days of TLS and HTTPS everywhere, I'm not sure I'd want to run arbitrary code over the wire like that. XD
clacke_movim has joined #racket
jgcarvalho has joined #racket
ricekrispie2 has joined #racket
ricekrispie has quit [Ping timeout: 268 seconds]
* tonyg imagines an info.rkt field for sha512 digests of required packages
dmiles has quit [Read error: Connection reset by peer]
soegaard has joined #racket
soegaard has quit [Client Quit]
orivej has quit [Ping timeout: 248 seconds]
miskatonic has joined #racket
dmiles has joined #racket
jao has joined #racket
jao is now known as Guest63322
dmiles has quit [Read error: Connection reset by peer]
orivej has joined #racket
dmiles has joined #racket
dustyweb has quit [Ping timeout: 252 seconds]
rubic88 has joined #racket
efm has quit [Ping timeout: 272 seconds]
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
ubLIX has quit [Quit: ubLIX]
iclon_ has joined #racket
casaca has quit [Ping timeout: 248 seconds]
iclon__ has quit [Ping timeout: 258 seconds]
zipper has joined #racket
casaca has joined #racket
dustyweb has joined #racket
soegaard has joined #racket
cpup has quit [Quit: Breaking stuff]
casaca has quit [Ping timeout: 272 seconds]
casaca has joined #racket
<soegaard> I am looking at https://12factor.net/ which describes one methodology of building web-apps.
endformationage has joined #racket
zipper has quit [Ping timeout: 248 seconds]
<soegaard> Does it describe common practise?
casaca has quit [Ping timeout: 245 seconds]
casaca has joined #racket
vraid has quit [Quit: Leaving]
jgcarvalho has quit [Ping timeout: 244 seconds]
cpup has joined #racket
efm has joined #racket
manualcrank has joined #racket
Guest63322 has quit [Ping timeout: 248 seconds]
jgcarvalho has joined #racket
soegaard has quit [Quit: soegaard]
casaca has quit [Ping timeout: 272 seconds]
casaca has joined #racket
casaca has quit [Ping timeout: 248 seconds]
q9929t has joined #racket
casaca has joined #racket
soegaard has joined #racket
dan_f has joined #racket
casaca has quit [Ping timeout: 268 seconds]
zipper has joined #racket
<zipper> soegaard: Hello are you online?
<soegaard> yes
<zipper> So my issue with racket is that a brew upgrade moved me to racket 7.3
<zipper> While everything seems to depend on racket 7.2
<zipper> Somehow breaks spacemacs racket setup
<soegaard> Okay - I think that's a brew related problem then.
pera has joined #racket
<soegaard> The recommended way of installing Racket on macOS is to use the installers from download.racket-lang.org
casaca has joined #racket
<soegaard> I don't know how many uses Racket via brew - so it could be a bug in the brew updater.
<zipper> hmm
<awkravchuk> zipper: don't know if that helps, but I got racket 7.3 working in spacemacs on Linux just fine
<zipper> and that will make raco available in my path?
<zipper> awkravchuk it definitely helps
<zipper> It's something to do with racket being (un)avaible
<soegaard> zipper: I learned a trick the other day:
<zipper> What does what I get from download.racket-lang.org give me exactly? Is it that drracket gui thing?
<soegaard> You can the path to Racket 7.3 to, say, /etc/paths.d/racket
<soegaard> then when you open a new terminal the racket tools will be in the path.
<soegaard> Right now the contents of /etc/paths.d/racket is /Applications/Racket\ v6.2/bin/ (so I never got around to installing 7.3)
<soegaard> There are two installers: The full one and the minimal one.
<soegaard> The full one installs all packages (prebuilt) and documentation for all packages in the standard distribution (includes DrRacket).
<soegaard> The minimimal one installs racket and enough libraries such that raco can fetch and install any packages you want to add later.
casaca has quit [Ping timeout: 248 seconds]
<zipper> soegaard: What I installed via homebrew was minimal-racket
<soegaard> Unless you are installing on a server, I suggest using the full one.
<soegaard> Much less trouble in the long run.
<soegaard> Also: Give this issue a thumbs up: https://github.com/racket/racket-lang-org/issues/67
<dustyweb> hi there
<dustyweb> I'm getting
<dustyweb> ; /home/cwebber/devel/goblinoid/goblinoid/actor-lib/aktor.rkt:15:27: syntax/loc: missing ellipsis with pattern variable in template
<dustyweb> ; at: method-sym
<dustyweb> but
<dustyweb> I'm not really sure why
<dustyweb> it looks like it should make sense to me
<dustyweb> oh wait.
<dustyweb> I see
<dustyweb> of course :P
<zipper> The reason I like minimal installations is that I get to learn more about the language
<zipper> Let me try this first and see how it goes https://download.racket-lang.org/
<soegaard> zipper: That's a good reason. Another way to do the same is to use #lang racket/base in each file.
casaca has joined #racket
<soegaard> That forces you to explicitly require the needed modules.
<zipper> But I'm behind on some work so I have no time to be exploring racket's set up
_apg has joined #racket
efm has quit [Remote host closed the connection]
<J_Arcane> soegaard: I guess that 12 factor article is roughly agreeable, but also so vague it's hard to disagree with much of it anyway
<J_Arcane> It more or less describes how I've worked though, and I would say that where different jobs have compromised on some of them, those were usually painpoints in my dev experience
<soegaard> J_Arcane: Thanks for the feedback. I am in the planning stages of building a "real" web-app - and a lot has happened since the last time (10+ years ago).
<J_Arcane> quite a lot of it is already more or less going to be covered automatically if you use the right tools, though of course if you don't know those tools it might be a bit befuddling to know where to look
<J_Arcane> hence specifics might've been nice. There's bits of the ideal pipeline I still don't know because other people handled those bits for me and I never had to bother
efm has joined #racket
<soegaard> It is the big picture stuff I am looking at right now.
<soegaard> It is tricky to choose a scalable setup that at the same time is simple to work on.
<J_Arcane> yeah.
zipper has quit [Quit: WeeChat 2.4]
<J_Arcane> I think the big thing that helps with scalability is actually the "stateless" part: when backend state is entirely contained in a shared robust DB, then scalability can be as simple as just "start another server", and the various cloud architectures can handle that stuff automatically
<J_Arcane> I think this is part of why functional is finally catching on in the web space, because this kind of architecture is practical now.
casaca has quit [Ping timeout: 248 seconds]
casaca has joined #racket
sleepnap has joined #racket
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
zipper has joined #racket
<zipper> Hello soegaard did you say that you're on osx?
<zipper> So installing that doesn't make it available in my PATH
<zipper> doesn't add it to my PATH
<zipper> It puts it in /Applications
<zipper> I could directly add the path to the bin to my PATH but that isn't ideal at all
awkravchuk has quit [Quit: Leaving.]
dustyweb has quit [Ping timeout: 272 seconds]
selimcan has joined #racket
zipper has quit [Quit: WeeChat 2.4]
sleepnap has quit [Quit: Leaving.]
FreeFull has joined #racket
ubLIX has joined #racket
sauvin has quit [Ping timeout: 272 seconds]
jgcarvalho has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 258 seconds]
efm has quit [Ping timeout: 258 seconds]
efm has joined #racket
efm has quit [Client Quit]
dan_f has quit [Quit: dan_f]
casaca has quit [Ping timeout: 252 seconds]
vraid has joined #racket
casaca has joined #racket
zipper has joined #racket
iclon_ has quit [Ping timeout: 248 seconds]
rubic88 has quit [Remote host closed the connection]
rubic88 has joined #racket
pera has quit [Ping timeout: 258 seconds]
soegaard has quit [Quit: soegaard]
casaca has quit [Ping timeout: 258 seconds]
q9929t has quit [Remote host closed the connection]
q9929t has joined #racket
casaca has joined #racket
pera has joined #racket
soegaard has joined #racket
<soegaard> zipper: Still there?
<soegaard> J_Arcane: I'll try the stateless approach.
<zipper> soegaard: Yeah I just did what works quick
<zipper> I added /Applications/.../bin to my PATH
<zipper> but that's janky as hell
<soegaard> The installers install in /Applications/... as you found out.
<soegaard> Now you can either change the PATH manually.
<zipper> Yeah but what's in Applications isn't in PATH
<zipper> Anyway, what does any/c mean? or where can I read about it?
<soegaard> No, you have to do that yourself (there are many of us that have multiple versions installed).
<zipper> "Now you can either change the PATH manually." or?
<zipper> Ah I see
<soegaard> One way to add the path to PATH is to use /etc/paths.d/
<zipper> Racket 7.3 breaks my spacemacs REPL badly
<soegaard> In the file /etc/paths.d/racket
<soegaard> I have:
<J_Arcane> soegaard: another factor of course is the frontend/backend split. When the backend plumbing is no longer coupled directly to the UI code, it makes it a lot easier to write stateless servers.
<soegaard> slash Applications/Racket\ v6.2/bin/
<soegaard> When a terminal is started it adds the paths in the files in /etc/paths.d to PATH.
<soegaard> J_Arcane: I need to experiment with stateless to see how everything fits.
<soegaard> One thing I need to grasp is how to handle sessions.
<soegaard> zipper: any/c is a contract (the /c) stands for contract (I think)
<soegaard> so any/c used as an input contract means any value is accepted
sleepnap has joined #racket
<soegaard> Maybe "selfdescribing cookies" is the way to go?
<J_Arcane> soegaard: the two approaches I've seen there is a combination of cookie+Authorization headers, or else using something like Redis to store temporary session states.
<J_Arcane> But I think the former is more common these days yeah
<zipper> soegaard: Where can I read more about said contracts?
<zipper> abs the any?
<zipper> *and the any
<soegaard> zipper: I think The Guide has a section on contracts.
<soegaard> J_Arcane: I am a bit confused about Redis. I know it is an in memory key/value database.
<soegaard> Read/write to it is therefore fast.
<soegaard> But ... if the load balancer sends the client request to a different web server - then Redis is not on the same machine.
<J_Arcane> soegaard: yeah. That's basically it. The key is that it's a *distributed* key/value store, meaning it can manage multiple instances as needed for load
<zipper> soegaard: That is a lot of reading
<soegaard> Ah!
<J_Arcane> you run Redis on AWS or what have you, like you would your SQL DB
<J_Arcane> and then clever Amazon stuff I don't understand takes care of load balancing and stuff
notzmv has joined #racket
<soegaard> So I basically run a Redis process all the machines that have the web servers.
<J_Arcane> or at least, that was the experience for me as a lone developer. :D I'm not in the Ops field, so usually someone else does the clever parts
<soegaard> I am looking at Digital Ocean.
<J_Arcane> soegaard: nah, the Redis runs on its own machines, as a separate service, that your other servers connect to and share
<soegaard> So network access is needed for each lookup?
<J_Arcane> Just like your SQL server
<J_Arcane> yeah.
casaca has quit [Ping timeout: 272 seconds]
<soegaard> Maybe I should Redis on the "nice to have eventually" pile. And simply use the db until I need something better?
<J_Arcane> I mean you could set it up local to the same machine as well, for smaller services that's probably fine, but if you want the Redis store to be shared by multiple services or for better load balancing, you'll have it on ElastiCache or some such
<J_Arcane> Yeah, you probably won't need Redis.
casaca has joined #racket
<soegaard> I am considering this setup:
<soegaard> The client sends a request to web site.
<soegaard> Nginx receives the incoming request.
<soegaard> Nginx handles static requests.
<soegaard> Other requests are forwarded to web1, web2, etc which are Racket web-servers.
<soegaard> All state is in Postgres db.
<soegaard> I am wondering whether it is worth to use the Racket webserver in a stateless setup.
<soegaard> One could use scgi instead.
<soegaard> (I think)
efm has joined #racket
<J_Arcane> My preferred setup on the job are usually something like this: Backend: REST API server for data requests to a Postgres db and static routes as well, with Nginx as a proxy to provide some automatic caching and security. Frontend: single-page app in some compile-to-JS functional/reactive language that handles the UI and gets and saves data through the REST API.
zipper has quit [Ping timeout: 258 seconds]
<J_Arcane> This all goes in a Github repo linked to a CI service for at least automatic testing, and if you're willing to do the legwork, automated deployment as well.
<soegaard> rudybot: later tell zipper https://www.youtube.com/watch?v=gXTbMPVFP1M
<rudybot> soegaard: I asked `MemoServ' to forward the message to zipper.
zipper has joined #racket
<soegaard> J_Arcane: So the client app directly talks to the db (via NGinx) ?
<J_Arcane> Well, not directly exactly. That's the purpose of the REST API. The REST server provides GET/POST/PUT/DELETE/etc. HTTP routes that are essentially like "commands"; then the backend's job is mainly translating that into SQL requests.
<soegaard> Okay - makes better sense :-)
<J_Arcane> You never want to be making SQL requests directly from user-facing/-supplied data, because injection attacks, so the backend is like your middleman with the DB, while also hopefully providing a nicer API for your front end, which can just make normal HTTP requests
<J_Arcane> I can call something like "GET /api/messages/23" from the frontend, backend goes OK, does "SELECT * FROM messages WHERE id = 23", and returns a JSON payload of my message for the frontend to render how it likes
<soegaard> I'd better read up on REST too.
<J_Arcane> yeah, that is definitely a key point to look into.
<J_Arcane> I can also point you to some sample apps in a few languages that might be helpful for getting your head around the architecture
<soegaard> That would be great.
<J_Arcane> if you're familiar with Clojure, I designed this one myself to be as approachable as possible to new consultants: https://github.com/jarcane/clojurice
<soegaard> I'll make some dinner and then take a look.
<soegaard> There is an *awful* lot of concepts/frameworks/buzzwords in web development now. Pointers on where to start are appreceiated.
<J_Arcane> I'm also working on a Glitch project working with Spin in Racket as a backend, and Elm for the frontend. I'll most likely link once the frontend's a little more finished.
ym555 has joined #racket
<J_Arcane> Yeah. :D I was lucky, sort of, in that I started my professional career in Clojure, where at least I only had to learn one language for the whole stack. XD
<soegaard> The volume of JavaScript frameworks is staggering.
<J_Arcane> yeah. though to be honest, at this point, the community has more or less kind of centered around React
<J_Arcane> If you know React on the frontend, and Express on the backend, that's enough to get you a job just about anywhere. Anything else gets ... fuzzier.
<soegaard> I have toyed with React, but know nothing about Express.
orivej has joined #racket
<J_Arcane> I don't know Express well either. Even working with React frontends, my backends have rarely if ever been in Node
<soegaard> I briefly thought about using something different than Racket on the backend - but Racket is what I know best.
<J_Arcane> Yeah. I've only ever done old-school server-side rendered stuff in Racket, and only a little.
<J_Arcane> The tools available for something like a modern REST framework are all technically there but ... it'd take a lot of manual wiring to get there, and I'm lazy.
<J_Arcane> Something like Spin is a start, but sadly not really supported exactly anymore either.
<soegaard> Spin?
<J_Arcane> Declarative-ish REST API library for Racket, reminds me a bit of Compojure in the CLJ world
dustyweb has joined #racket
<J_Arcane> Still missing quite a few batteries by comparison to Clojure stuff, but it has been useful for basic stuff
<soegaard> Okay - it goes in the "things to try" list.
<soegaard> Thanks for your feedback. Lots of stuff to consider.
<J_Arcane> Happy to help. :)
selimcan has quit [Ping timeout: 272 seconds]
jcowan has joined #racket
selimcan has joined #racket
dan_f has joined #racket
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #racket
ym555 has quit [Quit: leaving...]
rubic88 has quit [Remote host closed the connection]
rubic88 has joined #racket
tilpner has quit [Quit: WeeChat 2.4]
tilpner has joined #racket
rubic has joined #racket
rubic88 has quit [Ping timeout: 248 seconds]
<greghendershott> Although I haven't used it for real PostgREST is a neat idea http://postgrest.org/en/v5.2/
* soegaard reads
<greghendershott> If you feel you need a REST API between your web app and your db.
<greghendershott> I'm not sure I agree with J_Arcane that the main reason to want that, is to avoid injection attacks.
<greghendershott> I think using e.g. Racket's `db` library correctly is adequate for that.
<greghendershott> I think the main reason for wanting a REST API is to support e.g. a native mobile app, or to support third parties, etc.
<greghendershott> But as with most things, I guess "it depends" is the ultimate answer :)
<greghendershott> IIRC PostgREST is implemented in Haskell FWIW
<soegaard> I think the "injection attack" was meant to say that "directly from client to db" is a bad idea.
<soegaard> It's a pretty nifty idea, PostgREST.
ubLIX has quit [Ping timeout: 248 seconds]
ubLIX has joined #racket
rubic has quit [Remote host closed the connection]
rubic has joined #racket
ZombieChicken has left #racket ["WeeChat 2.4"]
rubic has quit [Remote host closed the connection]
rubic has joined #racket
soegaard has quit [Quit: soegaard]
casaca has quit [Quit: leaving]
zipper has quit [Ping timeout: 268 seconds]
zipper has joined #racket
<J_Arcane> Here we go. A very basic Racket+Elm example using Spin: https://glitch.com/~elm-on-racket
orivej has quit [Ping timeout: 248 seconds]
rubic has quit [Remote host closed the connection]
<zipper> Hello, did you guys see my question?
<greghendershott> zipper: I saw soegaard answer your questions, and even ask MemoServ to send you this link when you came back online: https://www.youtube.com/watch?v=gXTbMPVFP1M
zipper has quit [Ping timeout: 252 seconds]
urbanslug has joined #racket
<urbanslug> Not about contracts
urbanslug is now known as zipper
<zipper> I have like the worst internet connection
<zipper> I had a question about a list of strings say
<zipper> Say I have (define f "Name") (define s "Other") how do I build a list of f and s without using the verbose (list f s) syntax? '(f s) doesn't work
<bremner> zipper: check for "quasiquote"
<bremner> rudybot: (define f
<rudybot> bremner: <martinklepsch> Iā€™m just wondering `(define-values (s o i e) (racket-subprocess #f #f (current-error-port) fdt))`
<bremner> rudybot: (define f "Name")
<rudybot> bremner: your sandbox is ready
<rudybot> bremner: Done.
<bremner> rudybot: (define s "Other")
<rudybot> bremner: Done.
<bremner> rudybot: `(,@f ,@s)
<rudybot> bremner: error: unquote-splicing: contract violation <NEWLINE> expected: list? <NEWLINE> given: "Name"
<bremner> oops
<bremner> rudybot: `(,f ,s)
<rudybot> bremner: ; Value: '("Name" "Other")
selimcan has quit [Remote host closed the connection]
zipper has quit [Ping timeout: 248 seconds]
sleepnap has quit [Quit: Leaving.]
dan_f has quit [Quit: dan_f]