Re: [racket-users] generate sentences

2017-02-25 Thread Luis Sanjuán
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

Re: [racket-users] Programming paradigms supported by Racket (according to wikipedia)

2017-02-16 Thread Luis Sanjuán
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

[racket-users] Re: Higher order function to append-map the application of a list of functions to a set of args?

2016-11-20 Thread Luis Sanjuán
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

[racket-users] Re: Higher order function to append-map the application of a list of functions to a set of args?

2016-11-20 Thread Luis Sanjuán
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: > > > > (defi

[racket-users] Re: htdp/bsl output reapeating decimals instead of fractions

2016-12-06 Thread Luis Sanjuán
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

[racket-users] Re: Newbie seeking advice

2016-12-20 Thread Luis Sanjuán
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

Re: [racket-users] Re: table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
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

Re: [racket-users] table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
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 <luisj.sanj...@gmail.com> wrote: > > > > Hi, phillip > > > > As far as I'm concerned, professional musician too, I wrote a little app, &

[racket-users] Re: table lookup shorthands?

2017-08-09 Thread Luis Sanjuán
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

Re: [racket-users] table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
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 <luisj.sanj...@gmail.com> wrote: > > > > Hi, phillip > > > > As far as I'm concerned, professional musician too, I wrote a little app, &

Re: [racket-users] table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
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 <luisj.sanj...@gmail.com> wrote: > > > > Hi, phillip > > > > As far as I'm concerned, professional musician too, I wrote a little app, &

[racket-users] table lookup shorthands?

2017-08-07 Thread Luis Sanjuán
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

[racket-users] table lookup shorthands?

2017-08-07 Thread Luis Sanjuán
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 ;;

[racket-users] Re: table lookup shorthands?

2017-08-07 Thread Luis Sanjuán
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 'Interval' Another one: In the signatu

Re: [racket-users] table lookup shorthands?

2017-08-16 Thread Luis Sanjuán
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 <luisj.sanj...@gmail.com> wrote: > > > > On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote: > > >> I've been basing it on the c

[racket-users] Re: Question: 2D data (Arrays?) in Universe Teachpack

2017-05-27 Thread Luis Sanjuán
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

[racket-users] Re: Question: 2D data (Arrays?) in Universe Teachpack

2017-05-27 Thread Luis Sanjuán
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

[racket-users] Re: Strange gray lines in DrRacket editor

2017-09-16 Thread Luis Sanjuán
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

[racket-users] tearing when rendering images on DrRacket under gtk2 and system text scaled (Unix platform)

2017-09-23 Thread Luis Sanjuán
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

[racket-users] Strange gray lines in DrRacket editor

2017-09-21 Thread Luis Sanjuán
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

[racket-users] Re: Strange gray lines in DrRacket editor

2017-09-11 Thread Luis Sanjuán
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

[racket-users] Racket PPA updated for v6.10

2017-08-27 Thread Luis Sanjuán
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,

Re: [racket-users] How to draw relative to screen size using worlds?

2017-11-06 Thread Luis Sanjuán
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

Re: [racket-users] How to draw relative to screen size using worlds?

2017-11-07 Thread Luis Sanjuán
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

Re: [racket-users] How to draw relative to screen size using worlds?

2017-11-07 Thread Luis Sanjuán
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

[racket-users] How to draw relative to screen size using worlds?

2017-11-06 Thread Luis Sanjuán
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

[racket-users] HtDP/2e, HtDP/3e

2018-01-20 Thread Luis Sanjuán
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] Racket open a terminal/command window

2019-01-01 Thread Luis Sanjuán
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

[racket-users] Racket open a terminal/command window

2019-01-01 Thread Luis Sanjuán
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

[racket-users] Task ,drracket problems solution

2019-01-28 Thread Luis Sanjuán
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

[racket-users] Struct subtype with default/fixed value of super-type

2019-03-16 Thread Luis Sanjuán
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

Re: [racket-users] From HtDP to Racket

2019-04-27 Thread Luis Sanjuán
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

[racket-users] From HtDP to Racket

2019-04-18 Thread Luis Sanjuán
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,

Re: [racket-users] From HtDP to Racket

2019-04-21 Thread Luis Sanjuán
> 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, ...).

[racket-users] Re: [racket users] module question

2019-08-07 Thread Luis Sanjuán
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,

[racket-users] Determining if 2 lists share a common element

2019-11-14 Thread Luis Sanjuán
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