lexi-lambda changed the topic of #racket to: Racket v7.1 has been released: http://blog.racket-lang.org/2018/10/racket-v7-1.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
<bremner> there yah go.
cobax has joined #racket
acarrico has joined #racket
ziyourenxiang has joined #racket
joebobjoe has joined #racket
[X-Scale] has joined #racket
<joebobjoe> it would be cool if racket regular expressions were actually regular
<joebobjoe> like rust's
<joebobjoe> that would be cool
X-Scale has quit [Ping timeout: 250 seconds]
[X-Scale] is now known as X-Scale
<lexi-lambda> joebobjoe: What do you mean?
Arcaelyx has joined #racket
joebobjoe has quit [Ping timeout: 250 seconds]
<Arcaelyx> How should I go about writing JSON data to a JSON file? It doesn't seem so clear cut from the docs.
<lexi-lambda> Arcaelyx: (call-with-output-file* "path/to/file.json" (lambda (out) (write-json some-jsexpr-value out)))
<lexi-lambda> Or, alternately, just (with-output-to-file "path/to/file.json" (lambda () (write-json some-jsexpr-value))).
[X-Scale] has joined #racket
X-Scale has quit [Ping timeout: 250 seconds]
[X-Scale] is now known as X-Scale
pie___ has joined #racket
pie__ has quit [Remote host closed the connection]
joebobjoe has joined #racket
joebobjoe has quit [Ping timeout: 250 seconds]
dustyweb has quit [Ping timeout: 246 seconds]
<Arcaelyx> lexi-lambda: Tyvm.
<Arcaelyx> That's through the use of the json module right?
<lexi-lambda> Yes.
ubLIX has quit [Quit: ubLIX]
<Arcaelyx> lexi-lambda: Cool, thank you. The racket module for call-with-output-file is racket/filesystem?
ng0_ has joined #racket
<lexi-lambda> Arcaelyx: No, it’s in racket/base. You can find that out by using the documentation search: http://docs.racket-lang.org/search/index.html?q=call-with-output-file
<Arcaelyx> Ah, thank you.
ng0 has quit [Ping timeout: 256 seconds]
joebobjoe has joined #racket
joebobjoe has quit [Ping timeout: 250 seconds]
<tautologico> Perl-style regexes usually include notation extensions that make the expressions denote languages that are not regular, according to formal language theory
joebobjoe has joined #racket
joebobjoe has quit [Ping timeout: 250 seconds]
<jcowan> It's really only the backrefs that make the language not regular. Everything else is just syntactic sugar.
<tautologico> yes, most expressions do denote regular languages
g00s has joined #racket
dddddd has quit [Remote host closed the connection]
pie__ has joined #racket
rnmhdn has joined #racket
mahmudov has quit [Ping timeout: 240 seconds]
pie___ has quit [Ping timeout: 268 seconds]
pierpal has quit [Read error: Connection reset by peer]
rnmhdn has quit [Ping timeout: 250 seconds]
endformationage has quit [Quit: WeeChat 2.3]
rnmhdn has joined #racket
orivej has joined #racket
adolby has joined #racket
dan_f has quit [Quit: dan_f]
g00s has quit [Quit: Textual IRC Client: www.textualapp.com]
buyfn has joined #racket
jao has quit [Ping timeout: 250 seconds]
pera has quit [Ping timeout: 246 seconds]
buyfn has quit [Quit: buyfn]
iyzsong has joined #racket
buyfn has joined #racket
pierpal has joined #racket
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #racket
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #racket
rnmhdn has quit [Ping timeout: 240 seconds]
iyzsong has quit [Ping timeout: 246 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #racket
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #racket
pierpal has quit [Ping timeout: 268 seconds]
YuGiOhJCJ has joined #racket
dan_f has joined #racket
dan_f has quit [Quit: dan_f]
pierpal has joined #racket
pierpal has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 268 seconds]
pierpal has joined #racket
longshi has joined #racket
pierpal has quit [Ping timeout: 244 seconds]
joebobjoe has joined #racket
pierpal has joined #racket
joebobjoe has quit [Ping timeout: 240 seconds]
pierpal has quit [Ping timeout: 250 seconds]
pierpal has joined #racket
rnmhdn has joined #racket
Lowl3v3l has joined #racket
pierpal has quit [Ping timeout: 246 seconds]
buyfn has quit [Quit: buyfn]
pierpal has joined #racket
pierpal has quit [Ping timeout: 246 seconds]
buyfn has joined #racket
pierpal has joined #racket
pierpal has quit [Ping timeout: 240 seconds]
pierpal has joined #racket
<rnmhdn> what is an identifier?
<rnmhdn> I can't find anything that is an identifier.
<rnmhdn> (identifier? x) -> #t
pierpal has quit [Ping timeout: 246 seconds]
pierpal has joined #racket
jcowan has quit [Quit: Connection closed for inactivity]
longshi has quit [Quit: WeeChat 2.3]
buyfn has quit [Quit: buyfn]
ng0_ is now known as ng0
orivej has joined #racket
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
ubLIX has joined #racket
pierpal has quit [Read error: Connection reset by peer]
Lowl3v3l has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 250 seconds]
rnmhdn has quit [Ping timeout: 250 seconds]
ZombieChicken has quit [Ping timeout: 256 seconds]
JStoker has quit [Ping timeout: 250 seconds]
<rain1> https://docs.racket-lang.org/reference/stxops.html?q=identifier%3F#%28def._%28%28lib._racket%2Fprivate%2Fstx..rkt%29._identifier~3f%29%29
JStoker has joined #racket
jao has joined #racket
JStoker has quit [Read error: Connection reset by peer]
JStoker has joined #racket
mjanssen has left #racket [#racket]
JStoker has quit [Ping timeout: 252 seconds]
Sgeo has joined #racket
Sgeo_ has quit [Ping timeout: 246 seconds]
dddddd has joined #racket
acarrico has quit [Ping timeout: 268 seconds]
ubLIX has quit [Quit: ubLIX]
jao has quit [Ping timeout: 250 seconds]
pierpal has joined #racket
rnmhdn has joined #racket
endformationage has joined #racket
rnmhdn has quit [Ping timeout: 268 seconds]
rnmhdn has joined #racket
orivej has joined #racket
acarrico has joined #racket
ziyourenxiang has quit [Ping timeout: 268 seconds]
pera has joined #racket
endformationage has quit [Ping timeout: 250 seconds]
fmnt has joined #racket
fmnt has left #racket [#racket]
dustyweb has joined #racket
endformationage has joined #racket
rnmhdn has quit [Ping timeout: 246 seconds]
acarrico has quit [Ping timeout: 250 seconds]
jao has joined #racket
audriu has joined #racket
endformationage has quit [Ping timeout: 250 seconds]
dan_f has joined #racket
rnmhdn has joined #racket
rnmhdn has quit [Quit: WeeChat 2.3]
audriu has quit [Quit: Leaving]
endformationage has joined #racket
orivej has quit [Ping timeout: 246 seconds]
dan_f has quit [Quit: dan_f]
jcowan has joined #racket
<lf94> Anyone know of a lamba calculus interpreter that lets you experiment with call-by-value, call-by-name, etc?
<lf94> I am doing some personal study.
pierpal has quit [Ping timeout: 268 seconds]
JStoker has joined #racket
orivej has joined #racket
badkins_ has quit [Remote host closed the connection]
<cobax> lf94: do you know about call-by-push-value? maybe there is an implementation of that concept, which would give you what you want.
<lf94> very happy
mahmudov has joined #racket
<cobax> lf94: looks right on, thanks for sharing the link
<lf94> I know right?
hjek has joined #racket
<lf94> This morning I figured out how to cycle through an n-sized list. I was pretty proud of myself.
<lf94> 5 (transformationFunction) (a b c d e)
<lf94> The beginning number (churchhill encoding) must match the size of the "list" passed in
<lf94> Then you have your cycle function:
<lf94> t l.(rest l) (t (head l))
<lf94> So one iteration: (b c d e) (TransformedA)
<lf94> and you get the picture
<lf94> (Earlier I shouldve wrote: 5 ((cycleFunction)(transformationFunction)) (list)
<lf94> It is so mind shattering how simple everything can be
<cobax> lf94: also check out levy : http://plzoo.andrej.com/language/levy.html
<lf94> The same function can even be used for trees, I'm pretty sure
<lf94> (I will be 100% sure later :))
<lf94> cobax: Nice. One question, and this is something I was stuck on this morning. general recursion (fixpoint operator) <- how do you stop the recursion?
<lf94> Shouldn't it eval forever
<lf94> I'm sure there is a way
<lf94> But it is definitely not obvious
<cobax> lf94: I'm not sure. maybe you could jump to the continuation before the recursive operator was invoked?
badkins has joined #racket
<lf94> Not sure what you mean
<lf94> But this is why I went another route: explicitly defining how many "iterations" I need for something
<lf94> i.e. 5 ....
<lf94> If someone "passes" a list structure, it is not unreasonable to know the size
pierpal has joined #racket
<lf94> I guess the next cool thing to do: create a function to count a list size, and use this count to run a function that many time.
<lf94> (length list) ((cycle)(transform)) (list)
<lf94> Is call-by-push-value very new?
<lf94> This Paul Levy person is beyond me
orivej has quit [Ping timeout: 246 seconds]
<lf94> How do you become this intelligent
<cobax> indeed
pierpal has quit [Quit: Poof]
pierpal has joined #racket
<lf94> Hm, call-by-push-value seems...to introduce too much
<lf94> I think call-by-need is nice
hjek has quit [Read error: Connection reset by peer]
evdubs has quit [Remote host closed the connection]
evdubs has joined #racket
hjek has joined #racket
sauvin has quit [Read error: Connection reset by peer]
ea7ababe has joined #racket
sauvin has joined #racket
ubLIX has joined #racket
ea7ababe has quit [Quit: ERC (IRC client for Emacs 26.1)]
orivej has joined #racket
<rain1> i have a macro theory question.. what flaws or disadvantages does syntactic closures have? is there some place they fall short
<rain1> I think I found the answer
<rain1> >The distinction between the binding table and the compile-time environment is important for a purely “syntactic” view of binding, where a term can be expanded, manipulated, transferred to a new context, and then expanded again. Some approaches to macros, such as syntactic closures (Bawden and Rees 1988) and explicit renaming (Clinger 1991), tangle the binding and environment facets of expansion so that
<rain1> terms cannot be manipulated with the same flexibility.
ubLIX has quit [Quit: ubLIX]
<rain1> i can't really visualize an example of that though
<rain1> so im not 100% sure what it maens
endformationage has quit [Quit: WeeChat 2.3]
ubLIX has joined #racket
hjek has quit [Quit: Leaving.]
<jcowan> rain1: All I can say is that Will Clinger told me that he listened to Bawden and Rees themselves arguing about the correct semantics of a particular sc-macro, and that's why Larceny has syntax-case and explicit renaming but not syntactic closures.
<jcowan> Personally I think syntax-rules, possibly supplemented by syntax parameters, is quite enough to go on with. If I want to write a whole compiler, I'll write it in Scheme, not in a macro language.
<rain1> I love syntax rules but there are times where i want to use scheme procedures in my macros
joebobjoe has joined #racket
YuGiOhJCJ has joined #racket