Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2021-12-19 Thread Nadeem Abdul Hamid
In other Google groups that I'm on, when I view the group, the links in the
left bar read "Conversations", "Members", "About", "My membership
settings". But in the Racket Users, there isn't a link to the "Members"
list.

On Sun, Dec 19, 2021 at 5:24 PM Sage Gerard  wrote:

> Looks like I scoped invitation powers to group managers, not members.
> Checking on this.
>
>
> Sent from ProtonMail mobile
>
>
>
>  Original Message 
> On Dec 19, 2021, 4:17 PM, Nadeem Abdul Hamid < nad...@acm.org> wrote:
>
>
> I don't have any special privileges... when I view the Google group, I
> don't see a "Members" page at all and no where to invite anyone else. All I
> can access is a link "My membership settings".
>
> --- nadeem
>
>
> On Sun, Dec 19, 2021 at 3:49 PM Robby Findler 
> wrote:
>
>> When I follow the link at the bottom of one of these messages, click on
>> members, I see an "add members" button and clicking on it gives me a place
>> to add email addresses. I didn't actually add email addresses to the list
>> and try to add them, and I might have already had special privileges on
>> this list so that might not have been the most useful test.
>>
>> Robby
>>
>>
>> On Sun, Dec 19, 2021 at 11:32 AM Sage Gerard  wrote:
>>
>>> Alright, thanks to all of you for the quick replies. As of this writing,
>>> the list has been reconfigured to create an explicit perimeter between the
>>> non-members and members. The public can no longer let themselves in.
>>>
>>> Not totally out of the woods yet.
>>>
>>>1. Someone please confirm if you can invite others using Members
>>>page -> "Add Member". If not, then please follow up with me.
>>>2. This model can be compromised by someone going rogue and inviting
>>>a bunch of spammers. I'm expecting that our communal trust is high enough
>>>to make this unlikely.
>>>
>>> Considering the risk profile seems less scary, disregard request to
>>> delete my emails. :)
>>> On 12/18/21 3:02 PM, Matthias Felleisen wrote:
>>>
>>>
>>> +2! And many thanks. (I was personally spared this spam until very
>>> recently. No clue why)
>>>
>>> — Matthias
>>>
>>>
>>>
>>>
>>> On Dec 18, 2021, at 2:55 PM, Robby Findler 
>>> wrote:
>>>
>>> +1! Thank you.
>>>
>>> Robby
>>>
>>> On Sat, Dec 18, 2021 at 1:43 PM Matthew Flatt 
>>> wrote:
>>>
>>>> The "members" option sounds right to me. Thanks for tracking down a way
>>>> to improve the situation!
>>>>
>>>> At Sat, 18 Dec 2021 19:35:23 +, Sage Gerard wrote:
>>>> > Core team,
>>>> >
>>>> > Sam asked me to issue bans for a troublesome spammer. I've done so,
>>>> even
>>>> > just today. I understand I need quorum for larger decisions. This is
>>>> why
>>>> > I have not yet reconfigured the list to permanently stop the spammer.
>>>> > After researching the problem further, I need your urgent attention.
>>>> >
>>>> > I found that the spam messages sometimes link to other Google group
>>>> > posts affected by the spammer. A recent trail leads to a
>>>> > comp.lang.python Google message in 2017. I suspect that email
>>>> addresses
>>>> > are scraped in unmoderated lists that freely hand out membership.
>>>> After
>>>> > checking the list settings, I found that this is one of those lists. I
>>>> > hypothesize that our email addresses are being scraped and
>>>> > cross-referenced for use in other unmoderated lists.
>>>> >
>>>> > It's one thing to flatly complain about a spammer on this list, and
>>>> > another to willingly maintain a transmission vector. We need to stop
>>>> > automatically handing out group membership with our current settings.
>>>> We
>>>> > can have  issue list memberships. I need you all to fill in
>>>> the
>>>> > blank with "moderators" or "members." I'll translate the settings
>>>> > accordingly.
>>>> >
>>>> > Given the holidays, I respect your time. Please reciprocate with
>>>> respect
>>>> > for the urgency this problem creates. I will revoke my own m

Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2021-12-19 Thread Nadeem Abdul Hamid
I don't have any special privileges... when I view the Google group, I
don't see a "Members" page at all and no where to invite anyone else. All I
can access is a link "My membership settings".

--- nadeem


On Sun, Dec 19, 2021 at 3:49 PM Robby Findler 
wrote:

> When I follow the link at the bottom of one of these messages, click on
> members, I see an "add members" button and clicking on it gives me a place
> to add email addresses. I didn't actually add email addresses to the list
> and try to add them, and I might have already had special privileges on
> this list so that might not have been the most useful test.
>
> Robby
>
>
> On Sun, Dec 19, 2021 at 11:32 AM Sage Gerard  wrote:
>
>> Alright, thanks to all of you for the quick replies. As of this writing,
>> the list has been reconfigured to create an explicit perimeter between the
>> non-members and members. The public can no longer let themselves in.
>>
>> Not totally out of the woods yet.
>>
>>1. Someone please confirm if you can invite others using Members page
>>-> "Add Member". If not, then please follow up with me.
>>2. This model can be compromised by someone going rogue and inviting
>>a bunch of spammers. I'm expecting that our communal trust is high enough
>>to make this unlikely.
>>
>> Considering the risk profile seems less scary, disregard request to
>> delete my emails. :)
>> On 12/18/21 3:02 PM, Matthias Felleisen wrote:
>>
>>
>> +2! And many thanks. (I was personally spared this spam until very
>> recently. No clue why)
>>
>> — Matthias
>>
>>
>>
>>
>> On Dec 18, 2021, at 2:55 PM, Robby Findler 
>> wrote:
>>
>> +1! Thank you.
>>
>> Robby
>>
>> On Sat, Dec 18, 2021 at 1:43 PM Matthew Flatt  wrote:
>>
>>> The "members" option sounds right to me. Thanks for tracking down a way
>>> to improve the situation!
>>>
>>> At Sat, 18 Dec 2021 19:35:23 +, Sage Gerard wrote:
>>> > Core team,
>>> >
>>> > Sam asked me to issue bans for a troublesome spammer. I've done so,
>>> even
>>> > just today. I understand I need quorum for larger decisions. This is
>>> why
>>> > I have not yet reconfigured the list to permanently stop the spammer.
>>> > After researching the problem further, I need your urgent attention.
>>> >
>>> > I found that the spam messages sometimes link to other Google group
>>> > posts affected by the spammer. A recent trail leads to a
>>> > comp.lang.python Google message in 2017. I suspect that email addresses
>>> > are scraped in unmoderated lists that freely hand out membership. After
>>> > checking the list settings, I found that this is one of those lists. I
>>> > hypothesize that our email addresses are being scraped and
>>> > cross-referenced for use in other unmoderated lists.
>>> >
>>> > It's one thing to flatly complain about a spammer on this list, and
>>> > another to willingly maintain a transmission vector. We need to stop
>>> > automatically handing out group membership with our current settings.
>>> We
>>> > can have  issue list memberships. I need you all to fill in the
>>> > blank with "moderators" or "members." I'll translate the settings
>>> > accordingly.
>>> >
>>> > Given the holidays, I respect your time. Please reciprocate with
>>> respect
>>> > for the urgency this problem creates. I will revoke my own mailing list
>>> > privileges and membership in three weeks, on January 8th, 2022. I will
>>> > leave the settings however they read at the time to prevent
>>> > interruption, and request that own messages then be deleted to limit
>>> the
>>> > role my email address plays for the spammer.
>>> >
>>> > I am not volunteering to moderate membership applications, and I am not
>>> > commenting on how to verify the impact of possible email leaks. Between
>>> > the Discourse move and (majority?) perspective towards email, I'm not
>>> > sure how I would be useful doing either. If my opinion holds weight,
>>> I'd
>>> > advise the answer be "members" so that any available moderators can
>>> > focus on rule breakers while the community grows at a self-directed
>>> speed.
>>> >
>>> > Let me know, and thank you.
>>> >
>>> >
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "Racket Users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an
>>> > email to racket-users+unsubscr...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> >
>>> https://groups.google.com/d/msgid/racket-users/5fa6a8bb-88e4-37c6-f0b9-2ed372bc
>>> > e8fe%40sagegerard.com.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to racket-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/racket-users/20211218124300.343%40sirmail.smtps.cs.utah.edu
>>> .
>>>
>>
>> --
>> You received this message because you 

[racket-users] How to get Scribble evaluator to print examples using alternate constructor name

2021-02-15 Thread Nadeem Abdul Hamid
The following Scribble source:

#lang scribble/manual
@(require scribble/example teachpack/2htdp/scribblings/img-eval)
@(define guide-eval (make-img-eval)) ; from
teachpack/2htdp/scribblings/img-eval
@examples[#:eval guide-eval (make-posn (+ 1 1) (+ 2 2))]


Produces this text for the (HTML) output:



*Example:> (make-posn (+ 1 1) (+ 2 2))(posn 2 4)*

How do I get it to show (*make-posn* 2 4) instead of (posn 2 4)?

Thanks,
--- nadeem



--- nadeem

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABB5Xb8KWWDLWHzs3bB-o-oH68Y5af2YtPPuCn4f3utP5%2BdagA%40mail.gmail.com.


Re: [racket-users] [racket users] make-posn question

2019-08-06 Thread Nadeem Abdul Hamid
Probably
(require lang/posn)
--- nadeem


On Tue, Aug 6, 2019 at 1:19 PM Kevin Forchione  wrote:

> Hi guys,
> I love working with the 2htdp/universe and 2htdp/image packages. But
> polygon requires posts (and some of the other functions do too).
> 2htdp/image doesn’t include a definition. What’s the best library to
> require for these? I tried making my own struct and was surprised that the
> function didn’t like it. Apparently it wants a specific post?
>
> Kevin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/D69DC921-5529-49DF-9F60-ACA4FC317191%40gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABB5Xb95bfzX58AwVk6ybj8jGJxe9tohbwkooiTTqTC_AHjHkw%40mail.gmail.com.


Re: [racket-users] No scroll ability in DrRacket v6.12

2018-03-25 Thread Nadeem Abdul Hamid
I had a student in class the other day also complaining about sluggish
scrolling in DrRacket (while all other applications work fine), but I think
he was using 6.11 on Mac OS X.
--- nadeem

On Sun, Mar 25, 2018 at 1:20 PM, Stephen Smith 
wrote:

> Hi All,
>
> I'm not sure if it just happened after installing 6.12 but after working
> on a program of some length I noticed I can't scroll any windows in
> DrRacket with the scroll wheel (grabbing a scrollbar works). Even the Help
> -> About DrRacket window won't scroll.
>
> I'm using an external Microsoft mouse with a scroll wheel. Enabled my
> touchpad to see if it would work, but it barely works - I have to really
> exaggerate a scroll gesture to get the screen to nudge even just a little.
>
> All my other applications are scrolling as expected, just DrRacket not
> working. I did an uninstall-reinstall but same behaviour.
>
> On a Windows 10 machine.
>
> Anyone else having this issue?
>
> Stephen.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] How to control display of objects in *SL

2017-11-06 Thread Nadeem Abdul Hamid
How do you control the way objects of a class are printed out in
BSL/ISL/etc.? I tried implementing the 'printable' interface but all that
shows up in BSL is
   (instantiate (class ...) ...)

Here's what I tried:

;;; thingy.rkt   ===

#lang racket

(provide make-thingy)

(define (make-thingy i)
  (new thingy%))

(define thingy%
  (class* object% (printable<%>)
(super-new)

(define/public (custom-print out quote-depth)
  (fprintf out "foo"))

(define/public (custom-write out)
  (fprintf out "foo" ))

(define/public (custom-display out)
  (fprintf out "foo" 

;;; if you run just this and type (new thingy%) it displays   foo


;;; thingy-bsl.rkt   ===
;;; BSL language level

(require "thingy.rkt")
(make-thingy 0)

;;; this shows(instantiate (class ...) ...)   instead of foo

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Macro confusion with syntax-parse

2017-10-20 Thread Nadeem Abdul Hamid
I'm working on a macro that I'd like to work similar to the 'big-bang'
macro of 2htdp/universe with its various clauses, but something's going on
that I don't understand. At the bottom of this email is some code for a
very simple macro, 'calc', that is not what I'm working on, but exhibits
the puzzling behavior. Here, I'm trying to have an expression like
  (calc (add 5 6) (add 10 9))
expand to a block of some other expressions. Just like the behavior of
big-bang, I'd like to raise an error if (add ...) is used in a context
other than as a clause of 'calc'. But I also don't want it to get confused
with another definition of 'add' in the user code.

With the code below, when run as is, it does what I want - the (calc ...)
expressions - one a top-level expression and the one in (define A (calc
...)) both expand to a (quoted) s-expression (just for debugging purposes),
namely:

'(begin
   (printf "~a~n" (+ 4 5))
   (printf "~a~n" (+ 9 10)))

But, if you uncomment the last two lines, which introduces another
definition of 'add', then the first expression still produces the same as
above, but the expansion of the 'A' expression is just   '(begin). It seems
like the syntax-parse is no longer matching correctly against the (~literal
add).

Actually, 'big-bang' also suffers from this same problem -- if you do
(big-bang 0 (on-tick ...)) as a top-level expression in a file with a
definition of (define on-tick add1), it works fine. But if you put the
'big-bang' inside a define:   (define X (big-bang 0 (on-tick ...))) and
don't change anything else it complains about the on-tick "... keyword
being used as a variable..."

Why does this happen and is there a way to get around this problem -- i.e.
have the behavior of the program below be exactly the same whether there is
a 'define' around the macro use or not?

Thanks very much for any insight!

--- nadeem



;;;
#lang racket

(module calc racket
  (provide calc add)

  (require (for-syntax syntax/parse))

  (define-for-syntax out-of-context (lambda (stx) (raise-syntax-error #f
"used out of context" stx)))
  (define-syntax add out-of-context)

  (define-for-syntax (process-clauses clauses)
(syntax-parse clauses
[(((~literal add) x y) cs ...) #`((printf "~a~n" (+ x y ))
  #,@(process-clauses #'(cs ...) ))]
[(c cs ...) (process-clauses #'(cs ...))]   ; skip unexpected
clauses for now
[_ #'()]))

  (define-syntax (calc stx)
(syntax-parse stx
  [(calc c ...)
   (let ([adds (process-clauses #'(c ...))])
 #`'(begin #,@adds))])))


(require 'calc)

; (expression 1)
(calc (add 4 5)
  (sub 10 7)
  (add 9 10))

; (expression 2)
(define A
  (calc (add 4 5)
(sub 10 7)
(add 9 10)))
A  ; see what A ends up being

; uncomment these to see different output from the preceding expressions:
;(define (add x) (add1 x))
;(add 6)

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
Nice, thank you!

On Mon, Jul 10, 2017 at 10:56 PM, Alex Knauth <alexan...@knauth.org> wrote:

>
> On Jul 11, 2017, at 12:38 AM, Nadeem Abdul Hamid <nad...@acm.org> wrote:
>
> ... though a syntactic solution combining for and match would probably
>> be better.
>>
>
> Yes, please!...
> Look, python can do it:
>
> >>> [(x, z) for (x, y, z) in [(1, 2, 3), (4, 5, 6), (7, 8, 9), ('a', 'b',
> 'c')]]
> [(1, 3), (4, 6), (7, 9), ('a', 'c')]
>
> :-)
>
>
> You can do this with the Generic Bind package [1]. It's goal is to allow
> you to use patterns like this in any binding form that accepts generic
> binding instances, including an extended version of for/list.
>
> raco pkg install generic-bind
>
> #lang racket
> (require generic-bind)
> (~for/list ([($list x y z) '((1 2 3) (4 5 6) (7 8 9) (a b c))])
>   (list x z))
> ;'((1 3) (4 6) (7 9) (a c))
>
> If you want to use the name `for/list` without the `~`, you can require
> `generic-bind/as-rkt-names` instead.
>
> #lang racket
> (require generic-bind/as-rkt-names)
>
> (for/list ([($list x y z) '((1 2 3) (4 5 6) (7 8 9) (a b c))])
>   (list x z))
> ;'((1 3) (4 6) (7 9) (a c))
>
> It also allows arbitrary match patterns using the `$` form, so `($ (list x
> y z))` would work the same way.
>
> [1]: https://docs.racket-lang.org/generic-bind/index.html
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
>
> ... though a syntactic solution combining for and match would probably
> be better.
>

Yes, please!...
Look, python can do it:

>>> [(x, z) for (x, y, z) in [(1, 2, 3), (4, 5, 6), (7, 8, 9), ('a', 'b',
'c')]]
[(1, 3), (4, 6), (7, 9), ('a', 'c')]

:-)

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
I'm looking for a general solution. Basically, I thought binding multiple
id's would have achieved what this does:

> (for/list ([t '((1 2 3) (4 5 6) (7 8 9) (a b c))])
(match-define (list x y z) t)
(list x z))
'((1 3) (4 6) (7 9) (a c))

The way the documentation for `for` is worded [3], I thought if I could get
the list of lists coerced into a being a sequence of multiple values, then
the same thing could be achieved with:

> (for/list ([(x y z)  (??? '((1 2 3) (4 5 6) (7 8 9) (a b c))])
(list x z))

It looks like I would need a transpose-type operation before `apply`ing
in-parallel, because this works,

> (for/list ([(x y z) (in-parallel '(1 4 7 a) '(2 5 8 b) '(3 6 9 c))])
(list x z))
'((1 3) (4 6) (7 9) (a c))


[3] http://docs.racket-lang.org/reference/for.html : "...a location is
created for each id to hold the values of each element; the sequence
produced by a seq-expr must return as many values for each iteration as
corresponding ids."




On Mon, Jul 10, 2017 at 9:46 PM, Jon Zeppieri <zeppi...@gmail.com> wrote:

> On Mon, Jul 10, 2017 at 11:40 PM, Nadeem Abdul Hamid <nad...@acm.org>
> wrote:
> > Given a list of pairs, I'm trying to iterate through the list and bind
> the
> > first and second elements of each pair to x and y, respectively, in each
> > iteration.
> >
> > For example, hash sets are a multiple-valued sequence[1], so this:
> >(for/list ([(x y) #hash((1 . 2) (3 . 4))]) x)
> > produces:
> >(list 1 3)
> >
> > i.e. here x gets bound to 1 in the first iteration and 3 in the second. I
> > would like something analogous for a list of pairs, i.e. replacing #hash
> > with ' :
> >(for/list ([(x y) '((1 . 2) (3 . 4))]) x)
> >  except that lists are a by default a single-valued sequence[2].
> >
> >
>
> in-dict will work for lists of pairs, like the ones in this example
> (and it will work for hashes, as well), but it won't work for lists of
> lists, like the examples in your previous message. Are lists of pairs
> all you need to handle, or do you need something more general?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
Given a list of pairs, I'm trying to iterate through the list and bind the
first and second elements of each pair to x and y, respectively, in each
iteration.

For example, hash sets are a multiple-valued sequence[1], so this:
   (for/list ([(x y) #hash((1 . 2) (3 . 4))]) x)
produces:
   (list 1 3)

i.e. here x gets bound to 1 in the first iteration and 3 in the second. I
would like something analogous for a list of pairs, i.e. replacing #hash
with ' :
   (for/list ([(x y) '((1 . 2) (3 . 4))]) x)
 except that lists are a by default a single-valued sequence[2].


[1]
http://docs.racket-lang.org/guide/for.html?q=multiple-valued%20sequence#%28part._.Multiple-.Valued_.Sequences%29

[2] third paragraph in http://docs.racket-lang.org/reference/pairs.html


On Mon, Jul 10, 2017 at 9:32 PM, Jon Zeppieri <zeppi...@gmail.com> wrote:

> On Mon, Jul 10, 2017 at 11:02 PM, Nadeem Abdul Hamid <nad...@acm.org>
> wrote:
> > How come this:
> >(for/list ([(x y) (in-parallel '(1 2) '(3 4))]) x)
> > produces
> >   '(1 2)
> > instead of
> >   '(1 3)
> > ?
>
> You're creating a list of the x values. In the first iteration x is 1,
> and in the second it's 2. So the result is '(1 2). You won't see 3 in
> the result, because it will be bound to y, not x, in the first
> iteration.
>
> > Whereas,
> >   (sequence-ref (in-parallel '(1 2) '(3 4)) 0)
> > produces
> >   1
> >   3
> > as I would expect, but am I doing something wrong with for/list?
>
>
> Here, you're getting the first element of the sequence which is (values 1
> 3).
>
> >
> > In general, how might one convert a list of tuples into a multiple-valued
> > sequence? i.e. ideally I'd like to be able to just match:
> >   (for/list ([(x y) '((1 2) (3 4))])  x)
> > and have it produce
> >'(1 3)
>
> I'm not sure exactly what you're looking for, since I can't quite
> square your description ("multiple-values sequence") with your example
> result -- '(1 3). If that is the result you're looking for, you could
> use
>
>   (map first  '((1 2) (3 4)))
>
> If you want to go from  '((1 2) (3 4)) to '((1 3) (2 4)), you could do
>
>   (apply map list '((1 2) (3 4)))
>
> And if you really do want a sequence of multiple values, you could use
>
>   (apply in-parallel '((1 2) (3 4)))
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
How come this:
   (for/list ([(x y) (in-parallel '(1 2) '(3 4))]) x)
produces
  '(1 2)
instead of
  '(1 3)
?

Whereas,
  (sequence-ref (in-parallel '(1 2) '(3 4)) 0)
produces
  1
  3
as I would expect, but am I doing something wrong with for/list?

In general, how might one convert a list of tuples into a multiple-valued
sequence? i.e. ideally I'd like to be able to just match:
  (for/list ([(x y) '((1 2) (3 4))])  x)
and have it produce
   '(1 3)
.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] F1 question

2015-07-06 Thread Nadeem Abdul Hamid
There might be a Fn or Func key on your keyboard (maybe along the
bottom row, near the Ctrl, Alt, etc. keys) that you need to hold down
as you press the F1 key; otherwise it treats the key as some Windows
shortcut.

On Mon, Jul 6, 2015 at 7:22 PM, P J Moy pjm...@gmail.com wrote:

 Hello. In DrRacket, whenever I place the cursor on a keyword and press F1,
 the W8.1 help screen/system comes up (with absolutely useless Windows
 documentation.) (I've searched for an hlp file, and nothing.

 Any ideas on what is wrong? Any help would be appreciated. Tx.

 --
 You received this message because you are subscribed to the Google Groups
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.