[racket-users] interesting reproducible DrR core dump

2017-09-23 Thread 'John Clements' via users-redirect
I haven’t finished (or really even started) minimizing this yet, but I’m 
getting a reproducible core dump in DrRacket when running one of my grading 
scripts. It seems to be related to the top level; specifically, to trigger the 
crash, I have to run in DrRacket and then call a particular top-level function. 
Putting the call to the function inside the module doesn’t trigger the crash. 
Also, the crash log suggests that it’s crashing in a call to "cwd_check + 82 
(file.c:4963)”.

Anyhow, this is strictly preliminary; the problem currently involves a tangled 
web of dozens of files, so I’m just posting this (and the attached crash log) 
in case something jumps right out. I’ll try to narrow this down today or 
tomorrow.

Best,

John Clements



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


crash-log
Description: Binary data


Re: [racket-users] repeated code in interactions of scribble

2017-09-23 Thread Ben Greenman
You can re-use helper functions by running the different example blocks
with the same evaluator (example below).

I don't know how to hyperlink one interaction to another.

- - -

#lang scribble/manual
@require[scribble/example]

@(define my-eval (make-base-eval))

Beginning.

@examples[#:eval my-eval
  (define (plus2 n)
(+ 2 n))
  (plus2 0)
  (plus2 1)
]

Intermission.

@examples[#:eval my-eval
  (define (plus4 n)
(plus2 (plus2 n)))
  (plus4 0)
]

Conclusion.

-- 
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] tabular text display

2017-09-23 Thread Laurent
> > Awesome! You’ve saved me hours.
>
> One simple thing: could you add the tags “tabular” and maybe also “format”
> or “text”? I’m afraid that in its current form, I wouldn’t have found this
> package when searching for it.
>

Done!
Any other comments or suggestions welcome of course.

-- 
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] Re: Inside Racket Seminar 7. Alexis King on Hackett

2017-09-23 Thread Jay McCarthy
The archived version is here ---
https://www.youtube.com/watch?v=3xFWcNarb3Q --- if you'd like to watch
it!

Jay

On Thu, Sep 21, 2017 at 7:32 PM, Jay McCarthy  wrote:
> Reminder: This is tomorrow!
>
> On Wed, Sep 6, 2017 at 6:07 AM, Jay McCarthy  wrote:
>> On September 22nd at 3:30pm Eastern time, please join us for the
>> seventh Inside Racket Seminar where Alexis King will give us a
>> walk-through of the Hackett programming language implementation.
>>
>> As before, it will be on Google Hangouts on Air with Alexis walking
>> through the code and giving an explanation of how it all hooks
>> together. This is not a tutorial on Racket or on the library, but a
>> kind of oral history and explanation of the software and how it works.
>> Our hope is that this will increase the ability of others to build and
>> maintain similar software as we share this kind of expertise in a way
>> that doesn't fit our existing distribution mechanisms (research
>> papers, RacketCon talks, documentation, etc.)
>>
>> Link to the stream:
>> https://www.youtube.com/watch?v=3xFWcNarb3Q
>>
>> I hope that you are able to attend and send your own questions as we go 
>> through.
>>
>> I have linked some related reading on the Wiki page:
>>
>> https://github.com/racket/racket/wiki/Inside-Racket-Seminar-7.-Alexis-King-on-Hackett
>>
>> Please feel free to send questions beforehand, on this thread or to me
>> personally. We will archive the video for later viewing, etc.
>>
>> As it turns out, Alexis will also be speaking at RacketCon this year
>> in a shorter form, so you may consider this a kind of preview for what
>> is to come there. Check out the rest of the speakers and find
>> registrations details here:
>>
>> http://con.racket-lang.org
>>
>> See you all soon!
>>
>> --
>> -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
>> -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
>> -=[ Moses 1:33: And worlds without number have I created; ]=-
>
>
>
> --
> -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
> -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
> -=[ Moses 1:33: And worlds without number have I created; ]=-



-- 
-=[ Jay McCarthy   http://jeapostrophe.github.io]=-
-=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
-=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
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] tabular text display

2017-09-23 Thread 'John Clements' via users-redirect

> On Sep 23, 2017, at 12:24, 'John Clements' via users-redirect 
>  wrote:
> 
>> 
>> On Sep 23, 2017, at 12:02, Laurent  wrote:
>> 
>> Okay, I made a stand-alone package called 'text-table', uploaded on the pkg 
>> server.
>> 
>> Readme here: https://github.com/Metaxal/text-table/blob/master/README.md
>> 
>> Needs more doc, but it should be rather self-explanatory, in particular if 
>> you try 'racket -l text-table' to see the output of the main example.
> 
> Awesome! You’ve saved me hours.

One simple thing: could you add the tags “tabular” and maybe also “format” or 
“text”? I’m afraid that in its current form, I wouldn’t have found this package 
when searching for it.

John

> 
> (Translation: Darn! Now I have to get real work done rather than yak-shaving 
> on this sub-project…)
> 
> Thanks again!
> 
> John
> 
>> 
>> On Fri, Sep 22, 2017 at 9:50 AM, Laurent  wrote:
>> There's something like that buried in my bazaar package, maybe it's 
>> sufficient for your needs:
>> https://github.com/Metaxal/bazaar/blob/master/text-table.rkt
>> 
>> The main submodule prints the examples.
>> 
>> It provides two ways to output tables. The first one 'table->string' is the 
>> simplest one and the example outputs:
>> 
>>  a │   b │c │  d │ e │  f │  g │h
>> ——
>> 123 │ 456 │   77 │ 54 │ 1 │ 5646547987 │ 41 │1
>> ——
>> 111 │  22 │  │ 44 │ 5 │  6 │  7 │ 
>> 
>> The second one is more tweakable but more complicated and the example 
>> produces:
>> ╔╦╦╦╗
>> ║i   ║║f1  ║f2  ║
>> ╠╬╬╬╣
>> ╠╬╬╬╣
>> ║a   ║║b   ║c   ║
>> ╠╬╬╬╣
>> ║x   ║║y   ║z   ║
>> ╚╩╩╩╝
>> 
>> If I had time I would merge the two and make it both simple and tweakable...
>> 
>> On Fri, Sep 22, 2017 at 7:07 AM, 'John Clements' via users-redirect 
>>  wrote:
>> 
>>> On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
>>> 
>>> `raco pkg show` implements something very close that you could turn
>>> into a library
>>> 
>>> https://github.com/racket/racket/blob/master/racket/collects/pkg/private/show.rkt#L102
>> 
>> Ah! Nice!
>> 
>> John
>> 
>>> 
>>> On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
>>>  wrote:
 Before I go re-inventing the wheel, I want to ask you folks: has anyone 
 written a library that prints out tabular data in a textual format?
 
 E.G: given
 
 ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
 
 returns
 
 "
 --
 | a  | bcd  | ef |
 | gh | hhu.thnt | t  |
 ———
 “
 
 (sorry about the horrible damage that Apple Mail inflicts upon this 
 message.)
 
 … in the style of postgresql and similar display engines?
 
 It’s easy to write one of these, but if someone else has done it, it will 
 probably have nice bells and whistles that mine won’t.
 
 John
 
 
 
 
 
 
 
 --
 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.
>>> 
>>> 
>>> 
>>> --
>>> -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
>>> -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
>>> -=[ Moses 1:33: And worlds without number have I created; ]=-
>>> 
>>> --
>>> 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.
>> 
>> 
> 
> 
> 
> -- 
> 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] tabular text display

2017-09-23 Thread 'John Clements' via users-redirect

> On Sep 23, 2017, at 12:02, Laurent  wrote:
> 
> Okay, I made a stand-alone package called 'text-table', uploaded on the pkg 
> server.
> 
> Readme here: https://github.com/Metaxal/text-table/blob/master/README.md
> 
> Needs more doc, but it should be rather self-explanatory, in particular if 
> you try 'racket -l text-table' to see the output of the main example.

Awesome! You’ve saved me hours.

(Translation: Darn! Now I have to get real work done rather than yak-shaving on 
this sub-project…)

Thanks again!

John

> 
> On Fri, Sep 22, 2017 at 9:50 AM, Laurent  wrote:
> There's something like that buried in my bazaar package, maybe it's 
> sufficient for your needs:
> https://github.com/Metaxal/bazaar/blob/master/text-table.rkt
> 
> The main submodule prints the examples.
> 
> It provides two ways to output tables. The first one 'table->string' is the 
> simplest one and the example outputs:
> 
>   a │   b │c │  d │ e │  f │  g │h
> ——
> 123 │ 456 │   77 │ 54 │ 1 │ 5646547987 │ 41 │1
> ——
> 111 │  22 │  │ 44 │ 5 │  6 │  7 │ 
> 
> The second one is more tweakable but more complicated and the example 
> produces:
> ╔╦╦╦╗
> ║i   ║║f1  ║f2  ║
> ╠╬╬╬╣
> ╠╬╬╬╣
> ║a   ║║b   ║c   ║
> ╠╬╬╬╣
> ║x   ║║y   ║z   ║
> ╚╩╩╩╝
> 
> If I had time I would merge the two and make it both simple and tweakable...
> 
> On Fri, Sep 22, 2017 at 7:07 AM, 'John Clements' via users-redirect 
>  wrote:
> 
> > On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
> >
> > `raco pkg show` implements something very close that you could turn
> > into a library
> >
> > https://github.com/racket/racket/blob/master/racket/collects/pkg/private/show.rkt#L102
> 
> Ah! Nice!
> 
> John
> 
> >
> > On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
> >  wrote:
> >> Before I go re-inventing the wheel, I want to ask you folks: has anyone 
> >> written a library that prints out tabular data in a textual format?
> >>
> >> E.G: given
> >>
> >> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
> >>
> >> returns
> >>
> >> "
> >> --
> >> | a  | bcd  | ef |
> >> | gh | hhu.thnt | t  |
> >> ———
> >> “
> >>
> >> (sorry about the horrible damage that Apple Mail inflicts upon this 
> >> message.)
> >>
> >> … in the style of postgresql and similar display engines?
> >>
> >> It’s easy to write one of these, but if someone else has done it, it will 
> >> probably have nice bells and whistles that mine won’t.
> >>
> >> John
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> 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.
> >
> >
> >
> > --
> > -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
> > -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
> > -=[ Moses 1:33: And worlds without number have I created; ]=-
> >
> > --
> > 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.
> 
> 



-- 
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] tabular text display

2017-09-23 Thread Laurent
Okay, I made a stand-alone package called 'text-table', uploaded on the pkg
server.

Readme here: https://github.com/Metaxal/text-table/blob/master/README.md

Needs more doc, but it should be rather self-explanatory, in particular if
you try 'racket -l text-table' to see the output of the main example.

On Fri, Sep 22, 2017 at 9:50 AM, Laurent  wrote:

> There's something like that buried in my bazaar package, maybe it's
> sufficient for your needs:
> https://github.com/Metaxal/bazaar/blob/master/text-table.rkt
>
> The main submodule prints the examples.
>
> It provides two ways to output tables. The first one 'table->string' is
> the simplest one and the example outputs:
>
>   a │   b │c │  d │ e │  f │  g │h
> ——
> 123 │ 456 │   77 │ 54 │ 1 │ 5646547987 │ 41 │1
> ——
> 111 │  22 │  │ 44 │ 5 │  6 │  7 │ 
>
> The second one is more tweakable but more complicated and the example
> produces:
> ╔╦╦╦╗
> ║i   ║║f1  ║f2  ║
> ╠╬╬╬╣
> ╠╬╬╬╣
> ║a   ║║b   ║c   ║
> ╠╬╬╬╣
> ║x   ║║y   ║z   ║
> ╚╩╩╩╝
>
> If I had time I would merge the two and make it both simple and
> tweakable...
>
> On Fri, Sep 22, 2017 at 7:07 AM, 'John Clements' via users-redirect <
> us...@plt-scheme.org> wrote:
>
>>
>> > On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
>> >
>> > `raco pkg show` implements something very close that you could turn
>> > into a library
>> >
>> > https://github.com/racket/racket/blob/master/racket/collects
>> /pkg/private/show.rkt#L102
>>
>> Ah! Nice!
>>
>> John
>>
>> >
>> > On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
>> >  wrote:
>> >> Before I go re-inventing the wheel, I want to ask you folks: has
>> anyone written a library that prints out tabular data in a textual format?
>> >>
>> >> E.G: given
>> >>
>> >> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
>> >>
>> >> returns
>> >>
>> >> "
>> >> --
>> >> | a  | bcd  | ef |
>> >> | gh | hhu.thnt | t  |
>> >> ———
>> >> “
>> >>
>> >> (sorry about the horrible damage that Apple Mail inflicts upon this
>> message.)
>> >>
>> >> … in the style of postgresql and similar display engines?
>> >>
>> >> It’s easy to write one of these, but if someone else has done it, it
>> will probably have nice bells and whistles that mine won’t.
>> >>
>> >> John
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> 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.
>> >
>> >
>> >
>> > --
>> > -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
>> > -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
>> > -=[ Moses 1:33: And worlds without number have I created; ]=-
>> >
>> > --
>> > 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.
>>
>
>

-- 
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] 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 barely 
familiar with the underlying `racket/draw`, but I can reproduce the same result 
with this more low-level code:

(define target (make-bitmap 400 400))
(define dc (new bitmap-dc% [bitmap target]))
(make-object image-snip% target)

(send dc set-pen "blue" 1 'solid)
(send dc set-smoothing 'aligned)
(send dc draw-ellipse 0 0 400 400)

At first glance it is not hardware-related since I get the same result in 
different computers with different processors and graphic cards, one where the 
last gtk3 libraries are probably not installed and the another one where I call 
drracket with `PLT_GTK2` enabled.

Interestingly, the artifact disappears if I apply `make-screen-bitmap` instead 
of `make-bitmap` in the first line.

I wonder whether this kind of artifact or the code that triggers it may have 
something to do with the issue discussed here:

https://groups.google.com/forum/#!topic/racket-users/6dIb242Ve8s

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