mario.luis.guimaraes
2019-2-27 09:48:38

Good day! Is there any pure variant of Racket, or plans to add controlled effects into Racket?


mark.warren
2019-2-27 10:17:19

Hi, is this a valid use of hash-update! or is it not recommended (hash-update! hsh chunk (λ (val) (+ val 1)) (λ () 0)) It adds any key that is looked for and initialises it to 0, but also immediately adds 1.


mario.luis.guimaraes
2019-2-27 11:17:16

Is there a Racket development roadmap?


githree
2019-2-27 11:29:56

@mario.luis.guimaraes for these type of questions you will have to wait for US to wake up. Also consider asking it on mailing list.


mario.luis.guimaraes
2019-2-27 11:31:08

Yep, I now they are still sleeping :smile:. How do you think the core guys pay more attention to the mailing list?


githree
2019-2-27 11:35:21

Simply, some (like Matthias) are not even on Slack, from the core team only Sam seems to be regular, others reply mostly when mentioned


githree
2019-2-27 11:36:21

As a rule of thumb if you are trying to get quick answer to current problem Slack is better, when things get more complex mailing list is a way to go, that’s my experience at least.


soegaard2
2019-2-27 11:47:16

soegaard2
2019-2-27 11:47:35

Follow ups are on the blog: http://blog.racket-lang.org/


soegaard2
2019-2-27 11:48:34

mario.luis.guimaraes
2019-2-27 11:59:34

Thank you people


a.nastaev
2019-2-27 13:32:32

Hello, I’m just started the HTDP2 book and I really love it, but sometimes I’m having hard times to figure out what exactly do I have to accomplish in exercises. Could someone please point me out to a right direction for the Exercise 9:

Exercise 9. Add the following line to the definitions area of DrRacket:
(define in ...)

Then create an expression that converts the value of in to a positive number. For a String, it determines how long the String is; for an Image, it uses the area; for a Number, it decrements the number by 1, unless it is already 0 or negative; for #true it uses 10 and for #false 20.

my solutions for the each case: ;String (define in "hello") (if (string? in) (string-length in) false) ;Number (define in 5) (if (number? in) (if (>= in 0) (- in 1) false) false) ;Image (define in (rectangle 10 20 "solid" "blue")) (if (image? in) (* (image-width in) (image-height in)) false)

The concern I have is about last sentence of the problem statement: for #true it uses 10 and for #false 20.

Does that mean that I need to replace all booleans to numbers? And if YES, what’s the point? I guess it is really simple and I’m over complicating things, but I’m confused.

I would really really appreciate for any help and I’m sorry if it is a wrong place to post my problem.

Thanks a lot in advance!


plragde
2019-2-27 15:01:14

I believe that the question is asking for a single expression, not one for each type.


plragde
2019-2-27 15:02:54

Your expression for Number works for all cases where ‘in’ is a number. Similarly, your expression for Boolean (or subexpression of the full answer) should work for all cases where ‘in’ is a Boolean value. It’s the same idea.


samth
2019-2-27 15:04:04

@mario.luis.guimaraes I don’t think anyone is working on limited effects for Racket


mario.luis.guimaraes
2019-2-27 15:06:34

@samth I did not mean controlled in the sense of having some limitation, but controlled in the sense that the compiler’s type system tracks which effects each function does (like Haskell’s IO or better Purescript’s Eff)


plragde
2019-2-27 15:06:36

@a.nastaev The exercise doesn’t say what the result should be if none of the cases hold (if ‘in’ is not one of these four types). You chose ‘false’, which is a reasonable choice. The point of the exercise is just to give you practice in working with predicates and complex conditional expressions.


a.nastaev
2019-2-27 15:08:19

@plragde Thank you so much! Let me digest everything what you said and I’ll get back to you shortly! Thanks again! I really appreciate your time!


samth
2019-2-27 15:09:11

There is not a unified Racket roadmap, only the stuff everyone is working on at the moment


mario.luis.guimaraes
2019-2-27 15:10:25

So what is the closest to the “roadmap” ? The list of issues and PRs on https://github.com/racket/racket ?


plragde
2019-2-27 15:12:32

@a.nastaev You’re welcome! You should ask lots of questions. Self-study is great but it’s too easy to get stuck or spend too long being confused.


a.nastaev
2019-2-27 15:15:14

@plragde Thank you so much again! Looks like I will ask tons of questions.


samth
2019-2-27 15:15:45

@mario.luis.guimaraes there really isn’t a roadmap


mario.luis.guimaraes
2019-2-27 15:16:54

@samth Yes, I understood, so “the stuff everyone is working on” is it the list of issues and PRs on https://github.com/racket/racket ?


samth
2019-2-27 15:17:11

no, it mostly isn’t


mario.luis.guimaraes
2019-2-27 15:17:56

@samth is it listed somewhere publicly?


samth
2019-2-27 15:18:38

no, what I’m trying to say is that there is not an organized plan for what people are working on


mario.luis.guimaraes
2019-2-27 15:19:33

ok …


samth
2019-2-27 15:20:20

and if you want to know, say, what people working on Typed Racket are doing then you can ask people like me or @ben or @pnwamk and for other parts of Racket you can talk to other people


mario.luis.guimaraes
2019-2-27 15:23:27

Thanks


githree
2019-2-27 15:28:43

@mario.luis.guimaraes you may find the following helpful to identify people to ask about specific features: https://github.com/racket/racket/wiki/Release-repo-managers


mario.luis.guimaraes
2019-2-27 15:29:50

@githree This list is really useful. Thanks


pocmatos
2019-2-27 15:42:52

@mario.luis.guimaraes The roadmap is: “One #lang to rule them all…”


mario.luis.guimaraes
2019-2-27 15:43:40

Ahah, or perhaps “Many #lang to rule them all.. ”


rokitna
2019-2-27 16:05:06

@rokitna has joined the channel


notjack
2019-2-27 16:28:16

"…and in the transformer environment bind them"


greg
2019-2-27 18:48:14

@mark.warren https://racket.slack.com/archives/C09L257PY/p1551262639034000 It looks like your question, about actually writing code in Racket, got overlooked due to more research-in-case-someday-I-might-use-Racket stuff. How you’re using hash-update! there looks fine to me! Note that you could use simply 0 instead of (λ () 0) for the default. Also (λ (val) (+ val 1) is the same as just add1. So the whole thing could be (hash-update! hsh chunk add1 0). But the way you wrote it is good, too. Maybe better. Depends on your team/audience.


mark.warren
2019-2-28 07:35:19

@greg Thanks Greg, I thought the question had got a bit swamped, but great answer, cheers.