sorawee
2021-4-27 07:05:09

Here’s the definition of sequence-append


sorawee
2021-4-27 07:05:13

(define (sequence-append . l) (if (null? l) empty-stream (if (andmap stream? l) (apply stream-append l) (apply in-sequences l))))


notjack
2021-4-27 07:07:13

weird


notjack
2021-4-27 07:07:21

why use in-sequences?


notjack
2021-4-27 07:07:25

at all, I mean


markus.pfeiffer
2021-4-27 08:07:36

mhm; does raco not support ssh:// git urls?


sschwarzer
2021-4-27 09:25:20

As far as I know it doesn’t. There’s a remotely related ticket ( https://github.com/racket/racket/issues/3747 ), which could probably be extended with a git+ssh protocol identifier.


phoe
2021-4-27 12:36:44

hey hi hello - I have a small charity announcement from this year’s European Lisp Symposium, is this channel a good place to post it?


sorawee
2021-4-27 12:42:02

If it’s Lisp related, that should be fine!


spdegabrielle
2021-4-27 12:58:35

If you are calling for contributors and accept Racket you might also consider https://github.com/pmatos/racket-news/issues/new\|https://github.com/pmatos/racket-news/issues/new


robbert.gurdeepsingh
2021-4-27 14:01:20

Is there a way to get a fresh name in a redex judgement form?


robbert.gurdeepsingh
2021-4-27 14:05:12

[(types (var_0 T_0 (var_i int Γ)) exp T_r) ----------------------------------------------------------------------------------- "T-Mapper" (atypes Γ (mapper (→ T_0 T_r) (func var_i var_0 exp)) (→ (countable c T_0) (countable c T_r)))] ; c is fresh


samth
2021-4-27 14:16:39

@robbert.gurdeepsingh You can use a where clause with unquote and variable-not-in


philip.mcgrath
2021-4-27 14:28:02

I found it worked well for Racket to launch a subprocess to run the Python part and just communicate in JSON over standard IO: https://bitbucket.org/digitalricoeur/pydrnlp/src/master/\|https://bitbucket.org/digitalricoeur/pydrnlp/src/master/


philip.mcgrath
2021-4-27 14:30:06

The Julia language achieves a tighter integration by using libpython via FFI, as I understand it. A downside is that buggy Python C extensions are now running in your main process’s address space.


robbert.gurdeepsingh
2021-4-27 14:49:01

That works, thanks @samth


phoe
2021-4-27 15:32:41

OK, thanks; I’m actually not calling for contributors, but see the actual announcement post that I’ll make in a second


phoe
2021-4-27 15:33:42

A message from this year’s European Lisp Symposium organizers:

During this year’s ELS, we will be selling prints and hosting an auction of the original of The Y Combinator Codex, a 42cm x 240cm calligraphy piece. All proceeds from this endeavour, sans printing and shipping costs, will be spread across several Lisp foundations - including SFC, which seems to collect money for Racket.

(Edit: crossposted to /r/Racket as well.)

There’s photos at https://www.reddit.com/r/LispMemes/comments/l5f4n9/the_y_combinator_codex_but_its_actually/ and a small-res scan:


ronsider2
2021-4-27 20:16:04

@ronsider2 has joined the channel


notjack
2021-4-27 21:51:00

I’m working on adding sorted collections to rebellion, including sorted sets, maps, range sets, and range maps. They’ll come in both mutable and (persistent) immutable flavors. Draft pull request here: https://github.com/jackfirth/rebellion/pull/501


cris2000.espinoza677
2021-4-27 22:06:31

Is there a way to use apply on a Procedure type in typed racket? My main issue is that the contract complains about arity, but I handle that above the cast I tried to do. (cast f (-> Sexp * Sexp)) had a function that only took two arguments, I know that would be a compatible signature


jjsimpso
2021-4-28 00:07:51

Is there a simple way to set a timeout on a tcp-connect? Unlike a port, I don’t see any functions that return a synchronizable event so that I can use sync/timeout.


jjsimpso
2021-4-28 00:33:21

I guess I can spawn a thread to do the tcp-connect and do a sync/timeout on the thread. That wouldn’t be too bad.


jjsimpso
2021-4-28 00:35:03

The OS also times the connection out eventually, so I may just rely on that for now.


camoy
2021-4-28 00:43:53

It would be nice to get some of these into the data collection (there’s already some mutable dictionary implementations there right now). I was actually planning to send a PR for an immutable ordered dictionary soon because I had the same need.


samth
2021-4-28 01:00:07

There’s the ddict and dset implementations already, which are useful in many of the same cases


samth
2021-4-28 01:01:32

There’s not a way to do this, because there’s no way to know what number of arguments the function actually expects


cris2000.espinoza677
2021-4-28 01:02:59

alright, I guess I can see why not, a bummer honestly but I could fix it with a union on all the functions I had to use.

Thanks for confirming!


samth
2021-4-28 01:03:51

In general it’s hard to do dynamic checks on functions


samth
2021-4-28 01:04:13

So it’s often better to choose a somewhat different architecture than a union of function types


cris2000.espinoza677
2021-4-28 01:04:29

I see.


jaz
2021-4-28 01:06:00

yeah, this approach has been suggested before: https://groups.google.com/g/racket-users/c/ZYtXG8X28B8/m/_gnr1A3eSYcJ