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
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ng0 has quit [Quit: Alexa, when is the end of world?]
atweiden-air has quit [Quit: leaving]
iyzsong has joined #racket
efm has quit [Remote host closed the connection]
efm has joined #racket
efm has quit [Remote host closed the connection]
efm has joined #racket
sagax has quit [Ping timeout: 244 seconds]
iyzsong has quit [Read error: Connection reset by peer]
pera has quit [Ping timeout: 244 seconds]
JunjieZ has joined #racket
iyzsong has joined #racket
lockywolf has joined #racket
sword865 has joined #racket
<ZombieChicken> always fun to hit the little GC button in drracket and clear up 50+MB RAM
efm has quit [Remote host closed the connection]
efm has joined #racket
lockywolf_ has joined #racket
lockywolf has quit [Read error: Connection reset by peer]
JunjieZ has quit [Ping timeout: 248 seconds]
libertyprime has quit [Quit: leaving]
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 244 seconds]
pera has joined #racket
dustyweb has joined #racket
YuGiOhJCJ has joined #racket
YuGiOhJCJ has quit [Remote host closed the connection]
YuGiOhJCJ has joined #racket
lockywolf_ has joined #racket
lockywolf__ has quit [Read error: Connection reset by peer]
JunjieZ has joined #racket
lockywolf_ has quit [Ping timeout: 272 seconds]
efm has quit [Remote host closed the connection]
dustyweb has quit [Ping timeout: 264 seconds]
efm has joined #racket
lockywolf has joined #racket
lockywolf_ has joined #racket
lockywolf has quit [Ping timeout: 248 seconds]
efm has quit [Ping timeout: 268 seconds]
efm has joined #racket
libertyprime has joined #racket
jao has quit [Ping timeout: 245 seconds]
wreed has joined #racket
pera has quit [Ping timeout: 248 seconds]
<wreed> is it possible to start a racket repl from my c code? trying to create an iOS racket repl app. loooking a bit at https://docs.racket-lang.org/inside/embedding.html but its a little confusing
<wreed> (really my friend is looking into this but i wanted to help him)
lockywolf_ has quit [Ping timeout: 245 seconds]
lockywolf__ has joined #racket
liberiga has joined #racket
lockywolf_ has joined #racket
ohama has quit [Remote host closed the connection]
lockywolf__ has quit [Ping timeout: 244 seconds]
efm has quit [Ping timeout: 245 seconds]
lockywolf__ has joined #racket
pierpal has joined #racket
lockywolf_ has quit [Ping timeout: 245 seconds]
ohama has joined #racket
libertyprime has quit [Ping timeout: 258 seconds]
dddddd has quit [Remote host closed the connection]
lockywolf_ has joined #racket
lockywolf__ has quit [Ping timeout: 246 seconds]
lockywolf_ has quit [Remote host closed the connection]
lockywolf_ has joined #racket
englishm has quit [Excess Flood]
lavaflow has joined #racket
englishm has joined #racket
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 258 seconds]
<lavaflow> I'm working on a system that creates a tcp server and receives and executes s-expressions, returning the results.
<lavaflow> I don't want to use eval for this though because it kind of unnerves me and the namespace documentation was a bit daunting
<lavaflow> so instead I'm matching on the input, e.g.: [`(get-file-id ,filename) (get-file-id filename)]
<lavaflow> seems to work fine, but I'm not sure how I would match commands invoking a procedure that looks like this: (define (remove-files #:delete? [delete? #f] . file-ids) ... )
lockywolf__ has quit [Ping timeout: 245 seconds]
lockywolf__ has joined #racket
libertyprime has joined #racket
lockywolf__ has quit [Ping timeout: 272 seconds]
wreed has quit [Quit: Goodbye]
lockywolf__ has joined #racket
wreed has joined #racket
wreed has quit [Client Quit]
lockywolf_ has joined #racket
lockywolf__ has quit [Ping timeout: 272 seconds]
lockywolf_ has quit [Ping timeout: 245 seconds]
lockywolf has joined #racket
liberiga has quit [Ping timeout: 260 seconds]
lockywolf_ has joined #racket
endobson has joined #racket
lockywolf has quit [Ping timeout: 268 seconds]
lockywolf__ has joined #racket
lockywolf_ has quit [Ping timeout: 245 seconds]
lockywolf_ has joined #racket
lockywolf__ has quit [Ping timeout: 258 seconds]
lockywolf has joined #racket
lockywolf_ has quit [Ping timeout: 245 seconds]
lockywolf has quit [Ping timeout: 245 seconds]
endformationage has quit [Quit: WeeChat 2.5]
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
YuGiOhJCJ has quit [Remote host closed the connection]
YuGiOhJCJ has joined #racket
orivej has joined #racket
sagax has joined #racket
manualcrank has quit [Quit: WeeChat 1.9.1]
lockywolf has joined #racket
lockywolf has quit [Remote host closed the connection]
ubLIX has joined #racket
orivej has quit [Ping timeout: 268 seconds]
ng0 has joined #racket
YuGiOhJCJ has quit [Ping timeout: 260 seconds]
JunjieZ has quit [Read error: Connection reset by peer]
YuGiOhJCJ has joined #racket
vraid has joined #racket
orivej has joined #racket
<tonyg> lavaflow: you're doing something interesting there. You're implicitly defining some data structures that correspond to code running on your server - you're writing an interpreter!
<tonyg> If you don't want to go whole hog with this, and you don't care at all about security in any way, you might as well just use `eval`
<tonyg> Otherwise, feel free to choose a syntax for the language you're defining and map it to Racket's procedure call syntax any way you like
<tonyg> Concretely, if you're interested in parsing out function-call-like syntax, with keywords and optionals etc, I would investigate the use of match-expanders
<tonyg> https://docs.racket-lang.org/reference/match.html?q=def%20match%20exp#%28form._%28%28lib._racket%2Fmatch..rkt%29._define-match-expander%29%29
<tonyg> the idea is you'd write a collection of small procedures that, given a description of a function "prototype" and an input from the user, would analyze the input according to the prototype. Then you'd wrap that up in a match expander for nice sugar for you writing the interpreter
<tonyg> gtg
ZombieChicken has quit [Remote host closed the connection]
ubLIX has quit [Quit: ubLIX]
selimcan has joined #racket
YuGiOhJCJ has quit [Remote host closed the connection]
jmiven has joined #racket
mSSM has quit [Ping timeout: 272 seconds]
atweiden-air has joined #racket
<atweiden-air> is it possible to do something like this http://ix.io/1Tu1 in racket?
<bremner> atweiden-air: I don't know clojure, but do you maybe want classes?
* atweiden-air shrugs
<selimcan> I'm sure lexi-lambda can say more about this
<selimcan> I'm a humble newbie myself
<atweiden-air> selimcan: thanks
notzmv has quit [Ping timeout: 245 seconds]
dddddd has joined #racket
jao has joined #racket
Arcaelyx has joined #racket
davidl_ has quit [Read error: Connection reset by peer]
ubLIX has joined #racket
ubLX has joined #racket
dustyweb has joined #racket
ubLIX has quit [Ping timeout: 245 seconds]
Arcaelyx has quit [Quit: Arcaelyx]
ubLX has quit [Quit: ubLX]
mSSM has joined #racket
<atweiden-air> it's possible in elisp https://nullprogram.com/blog/2013/12/18/
dustyweb has quit [Remote host closed the connection]
dustyweb has joined #racket
badkins has quit [Remote host closed the connection]
endformationage has joined #racket
dustyweb has quit [Ping timeout: 250 seconds]
badkins has joined #racket
q9929t has joined #racket
mSSM has quit [Ping timeout: 272 seconds]
englishm has quit [Excess Flood]
englishm has joined #racket
sword865 has quit [Quit: Connection closed for inactivity]
thawesWork has joined #racket
vraid has quit [Quit: Leaving]
orivej has quit [Ping timeout: 272 seconds]
iyzsong has quit [Quit: ZNC 1.7.1 - https://znc.in]
mSSM has joined #racket
endobson has joined #racket
dustyweb has joined #racket
BitPuffin has joined #racket
<BitPuffin> Hey there
<BitPuffin> I'm trying to use read-syntax to get s-expressions with source location
<BitPuffin> to make a little compiler
<BitPuffin> but when I use (read-syntax "bla.g2", input-port) I seem to only get the offset into the file as the column and no line
<BitPuffin> so it shows like bla.g2::23
<BitPuffin> ah!
<BitPuffin> turns out I'm just not very smart
<BitPuffin> I just had to do (port-count-lines! port)
Sgeo has quit [Ping timeout: 268 seconds]
vraid has joined #racket
acarrico has joined #racket
badkins has quit [Ping timeout: 258 seconds]
sz0 has joined #racket
libertyprime has quit [Quit: leaving]
FreeFull has joined #racket
ziyourenxiang has quit [Ping timeout: 246 seconds]
orivej has joined #racket
badkins has joined #racket
pera has joined #racket
soegaard has joined #racket
orivej has quit [Ping timeout: 245 seconds]
lockywolf has joined #racket
lockywolf has quit [Remote host closed the connection]
lockywolf has joined #racket
ubLIX has joined #racket
orivej has joined #racket
manualcrank has joined #racket
efm has joined #racket
efm has quit [Client Quit]
ng0 has quit [Quit: Alexa, when is the end of world?]
mceier has quit [Ping timeout: 248 seconds]
mceier has joined #racket
pie_ has quit [Ping timeout: 264 seconds]
ng0 has joined #racket
<lavaflow> tonyg: thanks for the feedback
<lavaflow> I've dabbled in macro-expanders a bit before, I'll take a stab at using them for this
<lavaflow> although I'm thinking now that maybe using eval is the right choice. I just need to figure out how to create a good namespace to use for it
<lavaflow> I'd rather not permit all of racket/base, but (make-empty-namespace) seems to be *too* empty since I guess that doesn't include some macro that handles function application or something like that?
<lavaflow> or maybe racket/base is fine.. I need to figure out what all is in it.
<rain1> lavaflow: it's simple to make a basic interpreter for variables and function application: your interpreter function would recursively do this: symbol? x ==> lookup the value of x. list? x ==> (apply (interpret (car x)) (map interpret (cdr x)))
<lavaflow> hmm, I guess I don't need to match all the args explicitly at all do I
<rain1> the application of a procedure will perform arg matching
ng0 has quit [Write error: Connection reset by peer]
cantstanya has quit [Read error: Connection reset by peer]
<lavaflow> eventually I'd like to perform some of my own optimizations before evaling it, since for example `(reverse (tags jpg))` would normally do a sql query in tags, then reverse the result in sql, but if I can roll that reverse up into the sql query it's a lot more performant.
<lavaflow> but I could add in that step later I guess
<lavaflow> *then reverse the result in racket
cantstanya has joined #racket
ng0 has joined #racket
sauvin has quit [Read error: Connection reset by peer]
ng0 has quit [Quit: Alexa, when is the end of world?]
jao has quit [Ping timeout: 245 seconds]
ng0 has joined #racket
rclayton_ has joined #racket
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rushsteve1 has joined #racket
badkins has quit [Ping timeout: 272 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
selimcan has quit [Ping timeout: 245 seconds]
sagax has quit [Ping timeout: 272 seconds]
endformationage has quit [Read error: Connection reset by peer]
sagax has joined #racket
endformationage has joined #racket
thawesWork has quit [Ping timeout: 245 seconds]
pie_ has joined #racket
dumptruckman has joined #racket
badkins has joined #racket
<tonyg> lavaflow: yeah `eval` is definitely a security nightmare, plus as you say there's all the advantages you get of being able to do symbolic manipulations of the input when you have control over the whole language.
<tonyg> (and when it's a very restricted language)
<dzoe> What would be the "best" way to simulate recursion using custom-defined stacks?
<dzoe> While trying to parallelize an algorithm (merge sort actually), it turns out, that recursion allocates too much memory and that is not future-safe operation.
<dzoe> Currently I am pondering the possibility of simulating the recursion using vectors/fxvectors.
<dzoe> Problem is, I need to perform some work before each recursive call and _after_ as well.
<dzoe> (The latter part gives me headache right now)
jao has joined #racket
rclayton_ has quit [Remote host closed the connection]
liberiga has joined #racket
efm has joined #racket
ng0 has quit [Quit: Alexa, when is the end of world?]
ng0 has joined #racket
ubLIX has quit [Quit: ubLIX]
atweiden-air has quit [Quit: leaving]
<gluon> is there any easy way to get a datetime delta in gregor-lib? i mean subtracting two datetimes and getting the number of years, months, days, hours, etc between them?
<gluon> found it
<gluon> time-period-between
<gluon> or rather period-between
davidl has joined #racket
efm has quit [Ping timeout: 245 seconds]
pono has quit [Quit: WeeChat 1.7.1]
<gluon> hmm, this is weird
<gluon> > (require gregor)
<gluon> > (period-between (datetime 1970) (now) '(years months days hours minutes seconds))
<gluon> ; period-between: undefined;
<gluon> i double-checked on my installed package and period-between is provided
<soegaard> @gluon Use (require gregor/period)
<gluon> oh, i see, but why isn't require gregor enough in this case?
<gluon> thanks!
<gluon> ah it's a sub-module perhaps?
<soegaard> don't know - when I pointed at period-between in the docs it said gregor/period
<soegaard> maybe it was forgotten?
<gluon> ahh my bad, i was reading those same docks but missed that require was different for this functions
<gluon> working now :)
orivej has quit [Ping timeout: 245 seconds]
mSSM has quit [Ping timeout: 268 seconds]
Sgeo has joined #racket
ermo has quit [Quit: ZNC 1.7.3 - https://znc.in]
ermo has joined #racket
q9929t has quit [Remote host closed the connection]
q9929t has joined #racket
FreeFull has quit []
soegaard has quit [Quit: soegaard]
liberiga has quit [Ping timeout: 260 seconds]
ziyourenxiang has joined #racket