SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
ArthurStrong has quit [Quit: leaving]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
jellie has quit [Ping timeout: 256 seconds]
<narimiran>
complete beginner here. can i make `cond` to see outside variables? e.g. `cond [(< n 2) sum]`, where `n` and `sum` are arguments of a function where that `cond` is in
<bremner>
narimiran: that's the default
<narimiran>
oh, the problem was in `else` branch where i redefined `n`
<narimiran>
i guess i could use `let` instead of `define` in the `else` branch?
<bremner>
define doesn't sound like elisp
<bremner>
oh sorry, wrong channel!
<narimiran>
:)
<bremner>
yes, let sounds reasonable
<bremner>
or local if you prefer to keep using define
<srandon111>
bremner, what kind of cycles?
<srandon111>
i mean in what contexts other than graphs it is used ? bremner
<srandon111>
also why not simply getting a list of adjancies for each node??
<narimiran>
thanks bremner!
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
<bremner>
srandon111: sometimes cyclic data structures are useful. E.g. for implementing recursion in an interpreter.
<bremner>
as far as adjacency lists goes, the key point is about binding of names. You can try it with let and letrec and see why they don't work
sword865 has quit [Quit: Connection closed for inactivity]
jellie has joined #racket
keep_learning has quit [Quit: This computer has gone to sleep]
efm has joined #racket
samlamamma has joined #racket
<srandon111>
bremner, i can't understand... i mean also why is it called "shared" and what is something similar in other languages?
<srandon111>
i mean so that maybe i can understand?
<srandon111>
also bremner if a language does not support recursion i think it will likely not support cyclic data structures
<srandon111>
bremner, also what do you mean by "as far as adjancency lists goes" ... that they can work withouut shared?
<srandon111>
or that they still need "shared" ?
<samth>
srandon111: very few other languages have a feature like `shared`
<samlamamma>
What is this shared thing?
<samth>
rudybot: init racket
<samth>
rudybot: require (racket/shared)
<rudybot>
samth: your sandbox is ready
<rudybot>
samth: you'll also need to require racket/set yourself, as sandboxes are not shared
<samth>
rudybot: (require (racket/shared))
<rudybot>
samth: error: eval:1:9: racket/shared: not a require sub-form <NEWLINE> in: (racket/shared)
<bremner>
srandon111: most languages don't make much effort to avoid recursion
<bremner>
sorry, to avoid mutation
<bremner>
srandon111: yeah, my example of writing an interpreter is probably too niche.
easyAnalyst has quit [Quit: Leaving]
SGASAU has quit [Ping timeout: 250 seconds]
msiism has joined #racket
jellie has joined #racket
<samth>
note that `shared` will use mutation where appropriate. it's really just that most languages don't have a little language feature for making circular data easy to construct
<bremner>
yeah. I guess "avoiding mutation" is not really right, more like "controlling mutation"
<msiism>
Is there a certain policy concerning backward compatibility in Racket? I've just read https://racket-lang.org/new-name.html, which says Racket tools generally still support older Scheme standards. That's nice. But what about Racket itself?
<samth>
msiism: we work very hard to maintain backwards compatibility. programs that previously worked on Racket continue to work, with few exceptions.
<msiism>
Ok, that sounds good.
<msiism>
samth: Is this codified in some way? Like, some projects introduce no breaking changes within the same major version number. Or they provide x years of long-term support for every major version they put out and such.
<srandon111>
bremner, i stilll don't get why i can't create a graph with an adjancency matrix
<srandon111>
like a hashmap
<srandon111>
every key is a node
<srandon111>
and every value is a list of connected nodes
<srandon111>
what's wrong with this? bremner
<samth>
srandon111: you certainly can, but you need to work out the node->number mapping in your head, or do something like `shared`
<bremner>
that ^
<bremner>
i.e. your solution has an extra layer of indirection
<samth>
msiism: Racket doesn't provide long-term support for old versions, but in general we try very hard to avoid backward-incompatible changes at all.
<msiism>
samth: Ok, thanks.
<bremner>
srandon111: your method is perfectly fine for most algorithms working explicitely with graphs. But when performance matters, it can be desirable to have the data structure use pointers/references for edges
<jshap>
there's no way in racket to wrap a string onto the next line without having a newline in it, right? the equiv of: (string-append \n "I am still" \n "on one line")
<jshap>
but without the explicit string-append
<jshap>
... wait can you really just have a backslash?
<jshap>
wow that was easy
msiism has quit [Ping timeout: 256 seconds]
msiism has joined #racket
efm has quit [Ping timeout: 264 seconds]
endformationage has joined #racket
efm has joined #racket
isposdef has joined #racket
Fare has joined #racket
edmoore has quit [Ping timeout: 272 seconds]
edmoore has joined #racket
SGASAU has joined #racket
hoek has quit [Ping timeout: 272 seconds]
aidalgol has quit [Ping timeout: 250 seconds]
tazjin has quit [Ping timeout: 272 seconds]
hoek has joined #racket
tazjin has joined #racket
ephemera_ has quit [Quit: No Ping reply in 180 seconds.]
conjunctive has quit [Ping timeout: 265 seconds]
ephemera_ has joined #racket
conjunctive has joined #racket
jellie has quit [Ping timeout: 265 seconds]
jellie has joined #racket
rmnull has joined #racket
msiism has left #racket [#racket]
teardown has quit [Read error: Connection reset by peer]
teardown has joined #racket
Fare has quit [Ping timeout: 260 seconds]
Fare has joined #racket
sauvin has quit [Read error: Connection reset by peer]
izh_ has joined #racket
samlamamma has quit [Ping timeout: 240 seconds]
true-grue has joined #racket
nebunez has joined #racket
acarrico has joined #racket
parsley936 has quit [Remote host closed the connection]
corpix has quit [Quit: corpix]
corpix has joined #racket
efm has quit [Read error: Connection reset by peer]
izh_ has quit [Quit: Leaving]
pilne has joined #racket
narimiran has quit [Ping timeout: 256 seconds]
aidalgol has joined #racket
nebunez has quit [Ping timeout: 256 seconds]
nikita` has joined #racket
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #racket
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
jellie has quit [Ping timeout: 264 seconds]
efm has joined #racket
efm has quit [Client Quit]
true-grue has quit [Read error: Connection reset by peer]