samth
2020-11-26 12:34:07

The easiest way is probably providing a binding for #%datum that rejects them


dvanhorn
2020-11-26 14:15:19

Is https://github.com/Bogdanp/setup-racket the canonical way of making Racket available in github actions?


kellysmith12.21
2020-11-26 14:18:16

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?


cris2000.espinoza677
2020-11-26 14:22:08

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


kellysmith12.21
2020-11-26 14:24:54

I need the check to happen during compile time.


cris2000.espinoza677
2020-11-26 15:51:02

ah i thought about adding “unless you want it at compile time” my bad


camoy
2020-11-26 16:15:26

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


greg
2020-11-26 17:41:17

Yes. In fact I updated the README for travis-racket yesterday and again today: https://github.com/greghendershott/travis-racket


greg
2020-11-26 17:41:48

And linked to that GitHub action.


greg
2020-11-26 17:42:41

I also updated a half dozen of my own projects to make that switch, and had a really good experience.


greg
2020-11-26 18:12:08

@kellysmith12.21 Something like (define-syntax id (with-contract id #:result contract-expr init-expr)) ??


greg
2020-11-26 18:22:26

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:


phanthero
2020-11-26 19:23:53

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.


soegaard2
2020-11-26 20:07:37

Cool!


gknauth
2020-11-26 20:24:02

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.


gknauth
2020-11-26 20:24:36

My main objection to Slack is that old messages become hidden fairly quickly unless you sign up for a plan that is quite costly.


samdphillips
2020-11-26 21:00:24

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.


samdphillips
2020-11-26 21:00:58

There are a few schemers from irc that prefer discord over Slack so they are on that server too.


gknauth
2020-11-26 21:01:37

I totally forgot about IRC. Every time I check IRC there’s no one on.


sorawee
2020-11-26 21:06:02

This is very cool!


kellysmith12.21
2020-11-26 21:07:39

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.


samdphillips
2020-11-26 21:15:57

I was toying with a sudoku solver and thought about this paper.


plragde
2020-11-26 21:19:55

Where is this, please?


phanthero
2020-11-26 21:36:25

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


phanthero
2020-11-26 21:38:42

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


phanthero
2020-11-26 21:39:42

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


phanthero
2020-11-26 21:40:37

There is a Racket community on Discord already? What’s it called? Why isn’t it mentioned here btw then:


phanthero
2020-11-26 21:41:01

phanthero
2020-11-26 21:41:52

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


dvanhorn
2020-11-26 21:51:24

Thanks — I switched over my first project to using it today and it worked out well.


soegaard2
2020-11-26 21:55:55

soegaard2
2020-11-26 21:56:54

What’s the meaning of :scales: ?


phanthero
2020-11-26 21:58:56

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


soegaard2
2020-11-26 21:59:35

Looks like a red-black tree :wink:


sorawee
2020-11-26 22:00:07

Ah, it’s from the OOPSLA paper. I read it halfway and didn’t finish it.


phanthero
2020-11-26 22:00:43

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.


soegaard2
2020-11-26 22:38:34

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


phanthero
2020-11-26 22:40:47

I seem to see the name Okasaki a lot here, is this person involved with Racket development or similar?


soegaard2
2020-11-26 22:42:28

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.



sorawee
2020-11-26 22:48:06

Chris Okasaki: Were the inventors of red-black trees simply stupid? Me: this could be spicy. Chris Okasaki: No. Me: aw


samdphillips
2020-11-26 23:27:08

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.


plragde
2020-11-27 02:21:55

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