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
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

[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] Re: Strange gray lines in DrRacket editor

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

[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