As for the lists sub-problem, a for loop can do the job:
(for*/or ([x (in-list list-1)] [y (in-list list-2)]) (equal? x y))
Alternatively, since duplicated elements don't matter, you can check the
intersection:
(not (set-empty? (set-intersect list-1 list-2)))
--
You received this message beca
As Sorawee has said. To expand a bit.
First,
#lang modname
is a shorthand for:
(module a-name modname)
where a-name derives from the filename.
So, modules within are actually submodules.
On the other hand, the .. in the submod is a relative module path. The
symbol is borrowed, I believe, fr
Thanks for the point. It's a good one. I'm in the process of a new re-ordering
and rewriting. In the meantime I'm going to follow your suggestion of putting a
link at the end of each post. A link before the code may be misleading, though.
I want readers go through the code.
I should have explai
> On Apr 18, 2019, at 12:08 PM, Luis Sanjuán > wrote:
> >
> > The last month or so we all read some interesting posts about the
> convenience of examples or docs to facilitate the transition from other
> languages to Racket (from Python to Racket, from R to Racket, ...).
The last month or so we all read some interesting posts about the convenience
of examples or docs to facilitate the transition from other languages to Racket
(from Python to Racket, from R to Racket, ...). Then I thought about another
non-Racket languages that no one mention, if I recall well, f
Maybe #:auto/#:auto-value is what you want:
```
(struct fish (name [size #:auto])
#:auto-value 'big
#:transparent)
(struct shark fish (scares-people?) #:transparent)
(define white-shark (shark "The big white" #t))
```
--
You received this message because you are subscribed to the Google Gro
As Дмитрий points out the largest divisor of a number is the number itself.
Maybe you are looking for the second largest factor.
Anyway, people in this list won't help anyone do homework problems. If only
because we all here believe that instead of helping we would actually
preventing from lear
You've probably launched racket, the command line interface, instead of
DrRacket. Search for the latter on your OS.
--
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
You probably launch racket, the command line interface, instead of DrRacke.
Search for the latter on your OS.
--
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 ra
This is great news! I'm wondering whether there is more on the way apart from
HtDP/3e?
--
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...
Nice! Thanks for taking the argument seriously and implementing this so quickly.
--
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...@googleg
Conflicts may arise between 2htdp packages and racket/gui. If you still want to
stick to 2htdp awesome libraries you may try to require only what you need. But
this would force you to use racket/base instead of *SL, if only because you
also need to use `require` options not available in *SL as w
Hi, Matthias. I'm not sure about it either, but one situation where learners or
users might miss it is when they want to share their work. If their code
follows the design principles HtDP teaches, the world rendering will rely on a
single point of control, say the width and/or height of the scen
You probably need to get the dimensions of the screen with get-display-size
from racket/gui
It would be great to have primitives for that in 2htdp/universe.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and st
When gtk2 libraries are in use and the system text is scaled (in my case by a
1.25 factor) images rendered on DrRacket appear distorted, with blurred borders
or tearing as in this picture:
https://imagebin.ca/v/3bO6ry0vaXzL
It is an artifact. The circle was generated via `2htdp/image`. I'm bare
Hi again, Jaroslaw and everyone concerned.
I have investigated a bit further on this issue. This is a quick report of my
findings thus far. If I can provide more useful information, I'll do it in a
new post.
To summarize what I have found.
1. Artifacts are still there, though mitigated, even a
Hi, Jaroslaw
Something you could try/investigate is scaling per app on Windows. It seems
that last Windows releases allow something along those lines. I cannot verify
it, though:
http://news.kynosarges.org/2017/04/16/dpi-settings-in-windows-10-creators-update/
Another workaround that some user
Fair enough. But absence of artifacts in apps you are using right now doesn't
discard the same issue to show up in other apps. Google for 'display artifacts
dpi scaling' or something like that. You'll see that this kind of problem is
actually prevalent.
DrRacket (or underlying libraries) may a
I really think it is caused by your dpi. Maybe you are suffering from other
similar annoyances too like pixelated icons. Check with no scaling, if
things work fine, it is nothing related to DrRacket, and artifacts like
those you mention could appear on other apps too. You have still several
opt
Great! I'm sure Ubuntu users will be grateful.
--
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
On Wednesday, August 16, 2017 at 3:42:38 PM UTC+2, Alex Knauth wrote:
> > On Aug 8, 2017, at 10:42 AM, Luis Sanjuán wrote:
> >
> > On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote:
>
> >> I've been basing it on the chord-labeling algorithm in
On Monday, August 7, 2017 at 12:16:12 AM UTC+2, Jordan Johnson wrote:
> Hi all,
>
> I’m writing some music-related code for which I find myself using a lot of
> lookup tables, following the pattern of making an alist or hash table and
> then writing a function that consults the table. I wound up
On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote:
> > On Aug 8, 2017, at 8:15 AM, Luis Sanjuán wrote:
> >
> > Hi, phillip
> >
> > As far as I'm concerned, professional musician too, I wrote a little app,
> > just a prototype, using a si
On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote:
> > On Aug 8, 2017, at 8:15 AM, Luis Sanjuán wrote:
> >
> > Hi, phillip
> >
> > As far as I'm concerned, professional musician too, I wrote a little app,
> > just a prototype, using a si
On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote:
> > On Aug 8, 2017, at 8:15 AM, Luis Sanjuán wrote:
> >
> > Hi, phillip
> >
> > As far as I'm concerned, professional musician too, I wrote a little app,
> > just a prototype, using a si
Hi, phillip
As far as I'm concerned, professional musician too, I wrote a little app, just
a prototype, using a similar representation of pitch classes and intervals for
basic chord analysis. Since actual chords can be seen as sequences of
intervals, its analysis can be reduced to determine the
On Monday, August 7, 2017 at 6:39:58 PM UTC+2, Luis Sanjuán wrote:
> EDIT.
>
> In the description of the 'Interval' data type, replace 'notes' with
> 'pitch-classes'
>
> In the signature of the function `interval`, replace 'Nat' with
EDIT.
In the description of the 'Interval' data type, replace 'notes' with
'pitch-classes'
In the signature of the function `interval`, replace 'Nat' with 'Interval'
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this gr
I forgot to mention that, of course, you can rely on structs as Alex
recommends, I used just naturals to simplify the code.
--
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 a
Expanding on what Alex has already point out, you can do something like this:
;; PitchClass is one of
(define C 0)
(define C# 1)
(define D 2)
(define D# 3)
(define E 4)
(define F 5)
(define F# 6)
(define G 7)
(define G# 8)
(define A 9)
(define A# 10)
(define B 11)
;; Interval is Natural
;; number
On Saturday, May 27, 2017 at 4:00:09 PM UTC+2, A Mauer-Oats wrote:
> Does anyone use array data with the Universe teachpack?
>
> I thought it would be interesting to work with 2D data in an "advanced
> introductory" class. At least to the extent of being able to model classic
> board games like
On Saturday, May 27, 2017 at 4:00:09 PM UTC+2, A Mauer-Oats wrote:
> Does anyone use array data with the Universe teachpack?
>
> I thought it would be interesting to work with 2D data in an "advanced
> introductory" class. At least to the extent of being able to model classic
> board games like
On Thursday, February 23, 2017 at 11:50:30 AM UTC+1, Linh Chi Nguyen wrote:
> Wow, it's really a good curriculum.
> Just have to drop in to say something, im not doing this exercise for some
> course, there is no teacher.
>
>
> I was just massively sad and when i got up i need to do something th
On Sunday, February 12, 2017 at 11:19:06 PM UTC+1, Matthias Felleisen wrote:
> > On Feb 12, 2017, at 4:55 PM, Greg Trzeciak wrote:
> >
> > On Sunday, February 12, 2017 at 10:35:45 PM UTC+1, Matthias Felleisen wrote:
> >> Thanks. I assume you have seen my old web page with Don Q as my image :-)
>
On Tuesday, December 20, 2016 at 10:47:59 AM UTC+1, steve.lett777 wrote:
> I really want to learn programming but I am a slow learner. How do I know if
> I can achieve learning programming or not? Am I wasting my time trying?
>
> And after that one is answered, Which language should I learn progr
On Saturday, December 3, 2016 at 12:41:31 PM UTC+1, Fernando Basso wrote:
> I am doing this course:
>
> https://www.edx.org/xseries/how-code-systematic-program-design
>
> It uses the Basic Student Language and they use DrRacket, which is fine.
> Still, I happen to also use other editors, like vi
On Sunday, November 20, 2016 at 2:05:32 PM UTC+1, Luis Sanjuán wrote:
> On Tuesday, November 15, 2016 at 5:30:54 PM UTC+1, Brian Adkins wrote:
> > I'm working on a simple chess engine in Racket as a learning exercise. I
> > initially wrote this function:
> >
> >
On Tuesday, November 15, 2016 at 5:30:54 PM UTC+1, Brian Adkins wrote:
> I'm working on a simple chess engine in Racket as a learning exercise. I
> initially wrote this function:
>
> (define (valid-queen-moves board idx is-opposite-color?)
> (append (valid-bishop-moves board idx is-opposite-col
Ohne hast aber ohne rast;-) Congratulations and thanks for this great work!
Hope HtDC is the next huge step.
--
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 rac
39 matches
Mail list logo