The easiest way is probably providing a binding for #%datum that rejects them
Is https://github.com/Bogdanp/setup-racket the canonical way of making Racket available in github actions?
Is there a nice way to attach a contract to a compile-time binding that will be extracted with syntax-local-value
, or do I need to manually check and raise errors for contract violations?
ehrm, expr/c
could be of help, unless you want to use that information on compile time, expr/c
wraps an expression in a checker
I need the check to happen during compile time.
ah i thought about adding “unless you want it at compile time” my bad
Yup, especially now that raco pkg new will generate a Github Action config using this action instead of Travis in the next release: https://github.com/racket/racket/issues/3485\|https://github.com/racket/racket/issues/3485
Yes. In fact I updated the README for travis-racket
yesterday and again today: https://github.com/greghendershott/travis-racket
And linked to that GitHub action.
I also updated a half dozen of my own projects to make that switch, and had a really good experience.
@kellysmith12.21 Something like (define-syntax id (with-contract id #:result contract-expr init-expr))
??
In other words I think define/contract
expands into (define _ (with-contract _))
. You could write out (define-syntax _ (with-contract _))
by hand if you do this rarely. Or if you do this often you could define your own define-syntax/contract
that expands into that. If I am understanding what you want, and also not being wrong in general, which often happens. :smile:
I wonder why Racket uses Slack instead of Discord.. Although Discord is traditionally geared towards gaming communities, it has recently found a liking among all sorts of communities that want some sort of “real-time” communication channel. At this point, I think I am in more non-gaming communities on Discord rather than gaming communities. Discord is often see as a “free” alternative to Slack since Discord will never delete messages (in Discord, you only have to pay to play around with Emojis or something? Not sure, but this is also on a per-person basis, not based on the number of people in the chat itself), but it is every bit as good (and in many cases better, since you have things like voice channels if someone wants to use them as well). I would recommend a move to Discord, since that will help preserve the knowledge of Racket ! But this is up to the leaders of the community here.
Cool!
There is a Racket space on Discord, and some of the people here are on Slack and Discord. I only just learned about Discord fairly recently myself. At work (AccuWeather), we use Slack a lot, so it’s easy for me to see when something new pops up in Slack’s Racket workspace. Discord is in a different window. And then I do a lot of work in Scala, and that community tends to use Gitter, so that’s yet another window. And then I have to remember to check the traditional mailing lists, since things happen there too.
My main objection to Slack is that old messages become hidden fairly quickly unless you sign up for a plan that is quite costly.
The community on the Discord server is a little different from the community here. There is some overlap in members, but a lot of students find their way into the Discord so the help channel there gets a lot more homework questions.
There are a few schemers from irc that prefer discord over Slack so they are on that server too.
I totally forgot about IRC. Every time I check IRC there’s no one on.
This is very cool!
I’m just trying to ensure that, when a certain macro gets used, it’s being passed an identifier bound to a certain type of value for use with syntax-local-value
.
I was toying with a sudoku solver and thought about this paper.
Where is this, please?
Successfully stored password for <http://chat.freenode.net\|chat.freenode.net>. You will now be reconnected to IRC.
Could not join #racket on '<http://chat.freenode.net\|chat.freenode.net>': err_needreggednick
Anyone know what’s going wrong here? Used !storepass
to register nickname and join the #racket channel on freenode
Yea, I use Matrix clients (Element in my case) in order to access all the IRC channels that I like, but I am still new to it, so I am having a hard time doing registering and everything. @gknauth for both gitter and IRC channels, you can use Matrix. I use http://app.element.io\|app.element.io as my Matrix Node client
Can’t access the Freenode IRC for Racket yet, but it does make sense that nobody is using it very much, it is somewhat non-friendly to new users, which is why I would recommend Discord
There is a Racket community on Discord already? What’s it called? Why isn’t it mentioned here btw then:
Personally I think Slack should be done away with completely, since it is not at all conducive to a free community like us, the loss of knowledge is too great
Thanks — I switched over my first project to using it today and it worked out well.
What’s the meaning of :scales: ?
I guess it’s about balance, right? :scales: is a balance I guess… Is this an AVL btw? Could have used this in my last assignment lol
Looks like a red-black tree :wink:
Ah, it’s from the OOPSLA paper. I read it halfway and didn’t finish it.
Oh, we didn’t learn about red-black trees yet, but from a quick glance on Wikipedia: > The <https://en.wikipedia.org/wiki/AVL_tree|AVL tree> is another structure supporting O(log _n_) search, insertion, and removal. AVL trees can be colored red-black, thus are a subset of RB trees.
If you are interested in data structures, check out Okasaki’s short paper on implementing red black trees in a functional setting. https://course.ccs.neu.edu/cs5010f17/Inheritance/jfp99redblack.pdf
I seem to see the name Okasaki a lot here, is this person involved with Racket development or similar?
He wrote a very nice book on functional data structures, which has influenced a lot of data structure libraries in various languages. It really made the point that you don’t need mutation in many data structures.
Chris Okasaki: Were the inventors of red-black trees simply stupid? Me: this could be spicy. Chris Okasaki: No. Me: aw
I can’t seem to get an invite link for the discord to work, but I’ll try tagging @spdegabrielle and if it’s not too late for him he can drop an invite link in the thread.
Okasaki’s presentation of rebalancing after insertion is very clever, but deletion doesn’t yield so easily. Check out Blelloch, Ferizovic, and Sun’s work based on a single specialized operation, join
, followed by common derived operations, including insert
, delete
, merge
. Very elegant. https://cs.uwaterloo.ca/~plragde/flaneries/FDS/Sets_and_Maps.html