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
efm has quit [Ping timeout: 244 seconds]
phoenixdarkdirk has quit [Quit: Textual IRC Client: www.textualapp.com]
pera has joined #racket
<lexi-lambda> zenspider: Use the gregor package.
efm has joined #racket
keep_learning has joined #racket
jao has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
efm has quit [Ping timeout: 258 seconds]
jao has joined #racket
ym555 has joined #racket
juanfra has quit [Ping timeout: 246 seconds]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
ng0 has quit [Quit: Alexa, when is the end of world?]
dyl_ is now known as dyl
FreeFull has quit []
ubLIX has quit [Quit: ubLIX]
pera has quit [Ping timeout: 255 seconds]
dbmikus has quit [Ping timeout: 255 seconds]
pera has joined #racket
pera has quit [Ping timeout: 250 seconds]
sebastianlin has joined #racket
notzmv has joined #racket
pera has joined #racket
<lf94> Can you do structured types in regular lisp/scheme?
<lf94> Yeah, I'm not a lisp/scheme user, but I want to be one day.
<sebastianlin> normally people uses assoc lists
<sebastianlin> if you mean https://en.wikipedia.org/wiki/Structured_type (or something similar) by the term "structured type"
<sebastianlin> but different lisps have their own way of *actually* defining those things; assoc list is one way to do it when there's none available
<aeth> lf94: Do you mean something like this? https://srfi.schemers.org/srfi-9/srfi-9.html
sagax has joined #racket
ym555 has quit [Quit: leaving...]
<lf94> sebastianlin, exactly.
<lf94> record types look good too
<lf94> they are conceptually the same as using assoc lists tho, yes?
<sebastianlin> almost, i would say
<sebastianlin> combine a "tag" with an assoc list you'll get one implementation of record types
<sebastianlin> assoc lists are more like key-value maps, actually
<aeth> Conceptually you could even implement numbers with lists. '() is 0, '(()) is 1, '(() (())) is 2, etc.
<lf94> Why the distinction of pair vs list in any lang?
<lf94> sebastianlin, what do you mean combine a tag? What's a tag?
<lf94> I'm looking at gambit/gerbil. Damn, very clean language.
<colelyman> lf94: If I understand correctly, in Scheme a pair is just a special case of a list where the next element being pointed to is atomic, instead of being another list
<nisstyre> colelyman: it's called an improper list
<colelyman> nisstyre: but is still a list, right? Thus there is no distinction between pairs and lists
<jcowan> Lists are either the empty list (a unique object) or are made of pairs whose cdr component is either another pair or the empty list.
<lf94> I just wonder why language design calls for a distinction
pera has quit [Read error: Connection reset by peer]
<lf94> I understand, one is supposed to be an atomic type, and one not
<jcowan> Improper lists are basically just a side effect of the way lists are made out of pairs. Most of the time they are a corner case, though there are a few uses of them
<lf94> But you can still have these semantics...
<jcowan> () is atomic, pairs and lists are not
<jcowan> lists aren't actually a datatype, just a conventional way of using pairs.
<lf94> Oh that is great to know
<lf94> So when you add to a list
<lf94> in theory you are adding to a pair
<lf94> err
<lf94> creating a new pair
<jcowan> yes
<lf94> that holds, say, 3 instead of 2 elements now
<lf94> cool cool
<jcowan> the list (a b c) is implemented as (a . (b . (c . ())))
<lf94> Like this is all super basic stuff for anyone, I've just never really got to ask some lang peeps :)
* jcowan nods
<lf94> For me I was imagining the other way around
<lf94> But this makes more sense
<lf94> lists are pairs, but pairs cannot be lists...
<lf94> Actually I guess they...can?
<lf94> [a [b [c [] ] ] ]
<lf94> The issue with this is: not homogenous
<lf94> homogeneous
<jcowan> the pair (a . ()) is the list (a)
<lf94> I know I know
<lf94> I'm talking about trying to "make it work" vice versa
<jcowan> no, lists are not homogeneous in Lisp (or at least they don't have to be)
<lf94> in reverse: construct a pair type out of lists
<lf94> but lists being homogeneous is a nice property
<lf94> and pairs are explicitly (element . ())
<lf94> So I see now why the distinction exists and why it's important
<lf94> If your lang supports heterogenous lists you can do it
<lf94> But unfortunately it'll also be possible to create "bad" lists
<lf94> [a b [c []]]
<lf94> vs (a b . (c . ())), which is incorrect in lisp/scheme
<lf94> and incorrect by the definition of a pair
<lf94> <lf94> But unfortunately it'll also be possible to create "bad" lists <- I mean bad pairs.
<sebastianlin> lf94: e.g. if you have two record types with common fields you sometimes might want to discriminate them
<sebastianlin> something like '(type1 . ((:field1 . value1) (:field2 . value2))) '(type2 . ((:field1 . value3) (:field2 . value4))) etc.
<sebastianlin> the tag need not to be actual symbols though
DGASAU has quit [Read error: Connection reset by peer]
<lf94> ah yes
<lf94> sebastianlin, to me, this is just an assoc list with another assoc list.
<lf94> Does scheme use nominal or structural typing
<lf94> When comparing types
<lf94> (Note: I'm not even sure you can compare types.)
<lf94> (Note2: All my questions stem from reading this https://cons.io/guide/intro.html)
DGASAU has joined #racket
libertyprime has quit [Ping timeout: 240 seconds]
<aeth> afaik, all Scheme has as far as types go are a bunch of predicates like "pair?" (in quotes to make the punctuation clear)
<sebastianlin> well, if you're gonna roll your own `defstruct` then the answer is probably "both"
<sebastianlin> R5RS (and before) scheme does not specify any kind of way of defining structs
DGASAU has quit [Read error: Connection reset by peer]
pie__ has joined #racket
pie___ has quit [Ping timeout: 250 seconds]
DGASAU has joined #racket
sebastianlin has quit [Ping timeout: 256 seconds]
bctnry has joined #racket
<lf94> lisp/scheme is so beautiful.
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
DGASAU has quit [Read error: Connection reset by peer]
bctnry has quit [Read error: Connection reset by peer]
_apg has joined #racket
DGASAU has joined #racket
jao has quit [Ping timeout: 250 seconds]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
DGASAU has quit [Ping timeout: 259 seconds]
bctnry has joined #racket
sebastianlin has joined #racket
DGASAU has joined #racket
_whitelogger has joined #racket
bctnry has quit [Read error: Connection reset by peer]
dbmikus has joined #racket
endformationage has quit [Quit: WeeChat 2.3]
dbmikus has quit [Quit: WeeChat 2.3]
sauvin has joined #racket
soegaard has joined #racket
soegaard has quit [Quit: soegaard]
`micro has joined #racket
sebastianlin has quit [Quit: Page closed]
soegaard has joined #racket
Nomenclatura has joined #racket
Arcaelyx has quit [Ping timeout: 244 seconds]
jao has joined #racket
lavaflow has quit [Ping timeout: 268 seconds]
Arcaelyx has joined #racket
soegaard has quit [Quit: soegaard]
soegaard has joined #racket
soegaard has quit [Client Quit]
dddddd has joined #racket
_apg has quit [Ping timeout: 258 seconds]
soegaard has joined #racket
YuGiOhJCJ has joined #racket
ng0 has joined #racket
sagax has quit [Quit: Konversation terminated!]
sagax has joined #racket
Nomenclatura has quit [Remote host closed the connection]
lavaflow has joined #racket
soegaard has quit [Quit: soegaard]
<jboy> wow, gerbil scheme docs are looking better and better
lavaflow has quit [Ping timeout: 246 seconds]
lavaflow has joined #racket
integralyogin has quit [Remote host closed the connection]
Raycat has joined #racket
cemerick has quit []
cemerick has joined #racket
aeth has quit [Ping timeout: 245 seconds]
aeth has joined #racket
q9929t has joined #racket
widp_ has quit [Quit: WeeChat 2.1]
q9929t has quit [Quit: q9929t]
widp_ has joined #racket
orivej has quit [Ping timeout: 250 seconds]
<lf94> are...functions...monadic?
<lf94> I had this thought last night while trying to sleep
<lf94> func1(func2)(func3)(func4)
<lf94> func1(func2)(func3)(func4)()
<lf94> func1 passes state to func2, and so on
<lf94> and it can "short circuit", executing nothing for the rest of the "chain" by returning empty functions
endformationage has joined #racket
<lf94> r5rs vs r7rs
<lf94> what does r7rs have over r5?
<lf94> I'm looking at learning r7, but r5 seems more ubiquitous
soegaard has joined #racket
badkins_ has quit [Remote host closed the connection]
<dTal> you're going about sleep the wrong way
<lf94> heh
<s455wang> This is continuation passing style, isn't it?
<lf94> lambda calculus and lisp/scheme have been interesting things to think about for me
<lf94> "continuation passing style" must be monadic then, yes?
<amz3> lf94: r7rs small is like r5rs, r7rs large is like r6rs
<lf94> The idea of having a super small set of symbols to construct an infinitely complex system is amazing to me.
<lf94> And from what I see, lisp/scheme is an efficient "rendition" of lambda calculus
<lf94> it maps nicely to a turing machine
<lf94> Instead of using Church numerals, use real numbers that map to what the turing machine (cpu) uses
<lf94> I wish lisp was bignum by default
<lf94> lisp/scheme
<lf94> I know it is for integers
<lf94> My biggest gripe with lisp/scheme though is no static checker.
<lf94> I think the solution to this is to write "runtime types", and write a separate program that takes this program as input and checks everything
<lf94> (I probably just described racket...)
<lf94> and then you can configure your runtime types to do nothing at all, so at runtime, your code is fast
<lf94> are maybe run some regexp/deletion script to erase them
<lf94> writing scheme with types also written in scheme is one of my goals, and I see racket already does this, but I'd like to try on my own
<s455wang> I don't think you can check runtime types in general
<lf94> obviously it'd have to have a certain syntax
<s455wang> In the way you described
<lf94> but the syntax would just be a scheme AST
<lf94> right
<lf94> typed racket is probably _exactly_ what I'm looking for
<lf94> But it'd be nice to have it written in r5 or r7 shceme
<lf94> To be more ubiquitous
<lf94> and future proof
<s455wang> Typed Racket is all static and there's no runtime cost except for typed/untyped boundaries
lavaflow has quit [Ping timeout: 255 seconds]
efm has joined #racket
<s455wang> you can read up on the paper for it, and sometimes the author(s) are in this channel
<bremner> I dunno about "all static", since union types allow arbitrarily loose typing
<bremner> but I admit I missed the context.
orivej has joined #racket
<nisstyre> bremner: probably mean the type information is lost during the type checking phases
Raycat has quit [Remote host closed the connection]
<jcowan> lf94: Chicken has optional typing
<lf94> jcowan, but is typing just regular scheme or something special?
<jcowan> Type declarations are ignored by the interpreter but the compiler treats them specially.
notzmv has quit [Ping timeout: 255 seconds]
<jcowan> In addition, very few Schemes don't have bignums nowadays, except for Picrin, TinyScheme/S7 (which is meant specifically for embedding into C), and some toy Schemes.
<bremner> aren't bignums part of the various scheme standards?
<jcowan> R5RS and R7RS-small, no; R6RS and R7RS-large, yes.
efm has quit [Read error: Connection reset by peer]
<bremner> huh.
<bremner> next you'll be making TCO optional ;)
<jcowan> The Scheme numeric tower can be factored into 4 binary facets: exactness-preserving (aka bignums), ratios, inexacts, complex numbers. See https://bitbucket.org/cowan/r7rs-wg1-infra/src/default/NumericTower.md
efm has joined #racket
ng0_ has joined #racket
ng0 has quit [Remote host closed the connection]
q9929t has joined #racket
ng0_ is now known as ng0
q9929t has quit [Quit: q9929t]
BSLANG has quit [Quit: %Good bye!%]
BSLANG has joined #racket
lavaflow has joined #racket
badkins_ has joined #racket
nckx has quit [Quit: Updating my GNU Guix server — https://guix.info]
nckx has joined #racket
soegaard has quit [Quit: soegaard]
ym555 has joined #racket
nckx has quit [Quit: Updating my GNU Guix server — https://guix.info]
nckx has joined #racket
<lf94> What's the main difference between r5 and r7?
<lf94> And should I use r7 anyway over r5?
<bremner> r7 is 2 better. s;cnr
nckx has quit [Quit: Updating my GNU Guix server — https://guix.info]
FreeFull has joined #racket
nckx has joined #racket
badkins_ has quit [Ping timeout: 245 seconds]
selimcan has joined #racket
badkins_ has joined #racket
<lf94> lol
<bremner> I hesitate to give a serious answer because jcowan is really an R7 expert, and I only use racket, not RxRS
* greghendershott makes the obligatory Spinal Tap R11 joke
soegaard has joined #racket
<lf94> I hope he chips in then
ubLIX has joined #racket
sauvin has quit [Remote host closed the connection]
libertyprime has joined #racket
<jcowan> lf94: R7RS-small is 99% backward compatible with R5RS, adds a reasonable number of things: libraries, exception raising and catching, records, bytevectors, some I/O extensions, a few more standard syntax keywords, vector and string counterparts of all R5RS list procedures, and some other bits and bobs.
selimcan has quit [Ping timeout: 246 seconds]
nckx has quit [Quit: Updating my GNU Guix server — https://guix.info]
<lf94> jcowan, gotchya. Definitely going with r7 then.
nckx has joined #racket
ym555 has quit [Ping timeout: 255 seconds]
<jcowan> Before you settle on a specific implementaton of Scheme, you should read http://wingolog.org/archives/2013/01/07/an-opinionated-guide-to-scheme-implementations including the comments.
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #racket
selimcan has joined #racket
ubLIX has quit [Quit: ubLIX]
ng0 has quit [Remote host closed the connection]
ng0 has joined #racket
soegaard has quit [Quit: soegaard]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
badkins_ has quit [Ping timeout: 245 seconds]
soegaard has joined #racket
ym555 has joined #racket
evdubs has quit [Remote host closed the connection]
evdubs has joined #racket
ubLIX has joined #racket
ym555 has quit [Ping timeout: 268 seconds]
<Duns_Scrotus> the IDE seems like a pretty small reason to use racket
<Duns_Scrotus> also that post predates free chez
ym555 has joined #racket
<Duns_Scrotus> racket and chez have tab completion in the CLI repl, somehow drracket doesn't have t ab completion (!!)
ym555 has quit [Quit: leaving...]
Fernando-Basso has joined #racket
<evdubs> Duns_Scrotus, have you tried Ctrl+/ ?
<Duns_Scrotus> in drracket?
<evdubs> yes
<Duns_Scrotus> whatever that's doing, it isn't cmopletion
<efm> thank you jcowan that was worth reading
johnjay has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 244 seconds]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #racket
efm has quit [Ping timeout: 246 seconds]
DGASAU has quit [Read error: Connection reset by peer]
ym555 has joined #racket
YuGiOhJCJ has joined #racket
badkins_ has joined #racket
selimcan has quit [Ping timeout: 244 seconds]
soegaard has quit [Quit: soegaard]
ubLIX has quit [Quit: ubLIX]
Fernando-Basso has quit [Remote host closed the connection]
<nisstyre> Duns_Scrotus: the reason I like DrRacket so much is the tight integration with the REPL and the editor. Especially things like how it lets you do online expansion or whatever it's called
<nisstyre> Duns_Scrotus: don't you need to install xrepl, which includes GNU readline?
<nisstyre> I'm fairly sure the stock racket repl does not include that because it would violate the license or something
efm has joined #racket
<Duns_Scrotus> the racket repl that you run in the commandline does have completion
<nisstyre> without xrepl it kinda sucks
<bremner> xrepl is the default now, I believe
<nisstyre> ah okay
<nisstyre> it used to be that you had to install it
<nisstyre> I still have it in my .racketrc
<bremner> using editline to avoid license problems, iirc