[racket-users] Re: Arcs and lines being half-drawn

2015-03-26 Thread chia kang ren
Here is a clearer photo. In the original (and working) graphical editor you can select the entities to highlight them in red. The entities are weirdly cut off. The top left arc is cut off in the middle! Have since commented out (define draw-line ..), but the problem still persists. -- You rece

Re: [racket-users] Re: Arcs and lines being half-drawn

2015-03-26 Thread Matthias Felleisen
Could you point to the complete code base? Thanks -- Matthias On Mar 26, 2015, at 9:38 AM, chia kang ren wrote: > Here is a clearer photo. In the original (and working) graphical editor you > can select the entities to highlight them in red. The entities are weirdly > cut off. The top left

[racket-users] Re: Why are SQLITE queries so slow?

2015-03-26 Thread Renaud
Thanks a lot George, for this insightful reply. Your idea about FFI explaining 95% of the overhead looks good... but i wonder: in this case, shouldn't we also see a high cost in bind-prepared-statement alone? (sorry for my sketchy english) Thanks again, Renaud -- You received this message b

Re: [racket-users] Re: Arcs and lines being half-drawn

2015-03-26 Thread chia kang ren
http://pasterack.org/pastes/75790 http://pasterack.org/pastes/11360 http://pasterack.org/pastes/10455 -- 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-user

[racket-users] pict/code with other languages

2015-03-26 Thread Jack Firth
I'd like to typeset some Javascript code in a way similar to what pict/code allows, but the naive approach of (code someFunc(someArg, someOtherArg)) doesn't quite work because of the reader adding whitespace in various places. pict/code seems to be purely oriented towards working with racket cod

Re: [racket-users] Custom repl UI widgets

2015-03-26 Thread Matthew Flatt
At Wed, 25 Mar 2015 17:08:56 -0700 (PDT), Steve Olsen wrote: > I was wondering if anybody could show me an example of a very simple > snip% that maybe drew a circle and had some sort of click interaction > that I could work off of. I'll add the enclosed example to the documentation. -- You recei

Re: [racket-users] pict/code with other languages

2015-03-26 Thread Vincent St-Amour
I use the `java-lexer` package to typeset JavaScript code: https://github.com/stamourv/java-lexer To turn those into picts, you can use `codeblock->pict` from `unstable/gui/scribble`. Vincent At Thu, 26 Mar 2015 09:45:50 -0700 (PDT), Jack Firth wrote: > > I'd like to typeset some Javascri

[racket-users] Re: pict/code with other languages

2015-03-26 Thread Jack Firth
Fantastic, thank you. Sidenote - I had to (require java-lexer) instead of (require java/code) like the readme says. -- 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

Re: [racket-users] Re: Why are SQLITE queries so slow?

2015-03-26 Thread Renaud
You're all forgiven since, 1/ there's nothing to forgive, and 2/ you're of great help with such precise and thorough answers. I still don't know how to speed up my code, but i've learnt a lot. Big thanks to you George, again. -- You received this message because you are subscribed to the Googl

Re: [racket-users] Why are SQLITE queries so slow?

2015-03-26 Thread Jens Axel Søgaard
How did you time the queries? /Jens Axel 2015-03-25 15:03 GMT+01:00 Renaud : > Hi, > > I'm new to Racket, and i would like to know why sqlite queries are so slow in > my test program. > > This program imports some data from a text file into a simple sqlite DB. It > takes 35s with the INSERT qu

Re: [racket-users] Why are SQLITE queries so slow?

2015-03-26 Thread Renaud
Le jeudi 26 mars 2015 19:21:11 UTC+1, Jens Axel Søgaard a écrit : > How did you time the queries? > > /Jens Axel > > > 2015-03-25 15:03 GMT+01:00 Renaud : > > Hi, > > > > I'm new to Racket, and i would like to know why sqlite queries are so slow > > in my test program. > > > > This program impo

Re: [racket-users] Why are SQLITE queries so slow?

2015-03-26 Thread Jens Axel Søgaard
Did you subtract the startup cost of Racket to get the time of the queries? /Jens Axel 2015-03-26 19:29 GMT+01:00 Renaud : > Le jeudi 26 mars 2015 19:21:11 UTC+1, Jens Axel Søgaard a écrit : >> How did you time the queries? >> >> /Jens Axel >> >> >> 2015-03-25 15:03 GMT+01:00 Renaud : >> > Hi, >

Re: [racket-users] Why are SQLITE queries so slow?

2015-03-26 Thread Renaud
Le jeudi 26 mars 2015 19:37:19 UTC+1, Jens Axel Søgaard a écrit : > Did you subtract the startup cost of Racket to get the time of the queries? > > /Jens Axel I subtracted the two timings, which should get rid of everything but the query time, and gives about 30s for raket vs. about 5s for perl

Re: [racket-users] Re: pict/code with other languages

2015-03-26 Thread Vincent St-Amour
Good catch! I just pushed a fix. Thanks! Vincent At Thu, 26 Mar 2015 10:38:53 -0700 (PDT), Jack Firth wrote: > > Fantastic, thank you. Sidenote - I had to (require java-lexer) instead of > (require java/code) like the readme says. > > -- > You received this message because you are subscrib

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jay McCarthy
This is so awesome. Jay On Wed, Mar 25, 2015 at 9:55 PM, Jon Zeppieri wrote: > I recently uploaded Gregor, a date and time library, to the package server. > > Features: > > - representations for and generic operations on: > - dates > - times (as in, time-of-day) > - datetimes (combined dat

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-26 Thread Laurent
That's also what I understand, and I find this philosophy pretty appealing too, for what it's worth. However it still worries me as this sounds a like "I'm not wearing shoes because the problem is not your feet but the pavement; What we need is a pavement that makes it possible to walk without sho

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-26 Thread Konrad Hinsen
Laurent writes: > Furthermore, files and github are not chosen by Racket, so I don't > personally mind that much using a few external tools if Racket > can't do it itself (I'd still rather have Racket do it itself of > course; I want a Racket machine). What's more, whether `raco` is I'd go on

Re: [racket-users] the Racket manifesto

2015-03-26 Thread Konrad Hinsen
Matthias Felleisen writes: > Neil, I wrote this paper _because_ academia perceives Racket as a cult. Wow. I must be missing something interesting. Is there some tutorial on the Rites of Racket? ;-) I am in academia, but quite remote from the Racket hotspots both thematically and geographicall

Re: [racket-users] the Racket manifesto

2015-03-26 Thread Matthias Felleisen
On Mar 26, 2015, at 7:42 AM, Konrad Hinsen wrote: > In my opinion, it would be interesting to develop a pedagogical > approach to the language development theme in the form of tutorials, > books, or presentations. Maybe even a "teaching language" with a > simplified version of syntax/parse. The g

Re: [racket-users] the Racket manifesto

2015-03-26 Thread Matthias Felleisen
On Mar 26, 2015, at 7:42 AM, Konrad Hinsen wrote: > I must be missing something interesting. Is there some tutorial on the Rites > of Racket? ;-) I meant to address this one but a separate message is better anyway. Here we go: 0. open drracket 1. type "(" 2. hit 3. stare at the two space

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-26 Thread Greg Hendershott
I didn't understand the manifesto as saying Racket should try to be a lisp machine or OS (we already have Emacs for that :)) or that all external tools are bad (despite what I wrote quickly; sorry). Instead I understood it to mean, let's minimize gratuitous tools that do stuff that would be more na

Re: [racket-users] Why are SQLITE queries so slow?

2015-03-26 Thread George Neuner
On 3/25/2015 10:03 AM, Renaud wrote: I'm new to Racket, and i would like to know why sqlite queries are so slow in my test program. This program imports some data from a text file into a simple sqlite DB. It takes 35s with the INSERT queries and 5-6s without them. I've done the same thing wit

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-26 Thread Matthias Felleisen
Thanks for sending this, again. I was writing a response very much along these lines when your post came in. 1. No, we cannot and will not replace all tools. Quite the opposite, I foresee a future in which we will produce many more tools. [Your effort will make me think twice before I write a

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Vincent St-Amour
This is really cool! Do you have plans for operations on durations? Vincent At Wed, 25 Mar 2015 21:55:31 -0400, Jon Zeppieri wrote: > > I recently uploaded Gregor, a date and time library, to the package server. > > Features: > > - representations for and generic operations on: > - dates

Re: [racket-users] the Racket manifesto

2015-03-26 Thread Konrad Hinsen
Matthias Felleisen writes: > Here we go: > > 0. open drracket > 1. type "(" > 2. hit > 3. stare at the two spaces of indentation in sheer amazement > 4. relax, type ")" > > Smile. Now you're a Racketeer. Thanks - now I feel enlightened! > A web site is an ad. As is a research pa

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-26 Thread Laurent
Thanks, that clarifies the point. The manifesto maybe puts it too strictly indeed. On Thu, Mar 26, 2015 at 1:58 PM, Matthias Felleisen wrote: > > Thanks for sending this, again. I was writing a response very > much along these lines when your post came in. > > 1. No, we cannot and will not repla

Re: [racket-users] the Racket manifesto

2015-03-26 Thread Matthias Felleisen
[I am sorry for replying again on this sub-thread, but your first statement makes me very sad and the second one points out a serious flaw in our web prose.] On Mar 26, 2015, at 11:02 AM, Konrad Hinsen wrote: >> A web site is an ad. > > As is a research paper. It's the audience that differs

Re: [racket-users] Re: Why are SQLITE queries so slow?

2015-03-26 Thread George Neuner
On 3/26/2015 10:16 AM, Renaud wrote: Thanks a lot George, for this insightful reply. Your idea about FFI explaining 95% of the overhead looks good... but i wonder: in this case, shouldn't we also see a high cost in bind-prepared-statement alone? Hi Renaud, I'm not sure exactly what you are

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread 'John Clements' via users-redirect
On Mar 25, 2015, at 6:55 PM, Jon Zeppieri wrote: > I recently uploaded Gregor, a date and time library, to the package server. Can I use this instead of SRFI 19? That would be wonderful. John Clements > > Features: > > - representations for and generic operations on: > - dates > - times

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
On Thu, Mar 26, 2015 at 3:56 PM, John Clements wrote: > > On Mar 25, 2015, at 6:55 PM, Jon Zeppieri wrote: > >> I recently uploaded Gregor, a date and time library, to the package server. > > Can I use this instead of SRFI 19? That would be wonderful. > > John Clements Please do, and let me know

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Vincent St-Amour
At Thu, 26 Mar 2015 14:30:28 -0400, Jon Zeppieri wrote: > > On Thu, Mar 26, 2015 at 10:51 AM, Vincent St-Amour > wrote: > > This is really cool! > > > > Do you have plans for operations on durations? > > > > Vincent > > More vague thoughts than plans. > > So-- there's a useful distinction (tha

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
On Thu, Mar 26, 2015 at 4:57 PM, Vincent St-Amour wrote: > At Thu, 26 Mar 2015 14:30:28 -0400, > Jon Zeppieri wrote: >> [ snip] > Since, IIUC, periods need to be "anchored" to a specific point in time, > that would make them a bit more heavyweight to create. I could see > durations being nice fo

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Robby Findler
On Thu, Mar 26, 2015 at 4:13 PM, Jon Zeppieri wrote: > You > can carry around a bucket that says "5 years, 3 weeks, and 40 hours," > but the precise number of seconds inside the bucket is indeterminate > until you pour it over a date-provider. (No, not a great metaphor.) I have a feeling I'm goin

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
On Thu, Mar 26, 2015 at 5:27 PM, Robby Findler wrote: > On Thu, Mar 26, 2015 at 4:13 PM, Jon Zeppieri wrote: >> You >> can carry around a bucket that says "5 years, 3 weeks, and 40 hours," >> but the precise number of seconds inside the bucket is indeterminate >> until you pour it over a date-pro

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
On Thu, Mar 26, 2015 at 5:30 PM, Jon Zeppieri wrote: > > 3 weeks and 40 hours will always have a fixed number of seconds... And this is because Gregor isn't faithful to UTC, of course. Otherwise, this wouldn't be true. -- You received this message because you are subscribed to the Google Groups

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Robby Findler
On Thu, Mar 26, 2015 at 4:31 PM, Jon Zeppieri wrote: > On Thu, Mar 26, 2015 at 5:30 PM, Jon Zeppieri wrote: >> >> 3 weeks and 40 hours will always have a fixed number of seconds... > > And this is because Gregor isn't faithful to UTC, of course. > Otherwise, this wouldn't be true. Right; I notic

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jens Axel Søgaard
2015-03-26 22:30 GMT+01:00 Jon Zeppieri : > On Thu, Mar 26, 2015 at 5:27 PM, Robby Findler >> Would 3 weeks and 40 hours always be a precise number of >> seconds? >> >> Robby What about leap seconds? /Jens Axel -- You received this message because you are subscribed to the Google Groups "Rac

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Greg Hendershott
>> - Assuming that "periods" are useful, what operations on them do we >> want? Arithmetic, probably; maybe the `period->nanoseconds` function I >> just mentioned; maybe convenience functions based on the current time >> (e.g., `ago`, `from-now`). Anything else? 1. For scheduling apps people often

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
Yeah, these are really good ideas. Thanks! - Jon On Mar 26, 2015, at 5:55 PM, Greg Hendershott wrote: >>> - Assuming that "periods" are useful, what operations on them do we >>> want? Arithmetic, probably; maybe the `period->nanoseconds` function I >>> just mentioned; maybe convenience function

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jay Kominek
On Thu, Mar 26, 2015 at 2:57 PM, Vincent St-Amour wrote: > At Thu, 26 Mar 2015 14:30:28 -0400, Jon Zeppieri wrote: >> >> On Thu, Mar 26, 2015 at 10:51 AM, Vincent St-Amour >> wrote: >> - Is a "duration" data structure, distinct from some number of >> nanoseconds, useful? In Joda it seems largely

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
Gregor shares the near-universal disdain for UTC exhibited by operating systems and date/time libraries alike. Seriously, though: Gregor doesn't keep UTC time, so there are no leap seconds. I mentioned in the docs that if there's a real demand for UTC, I'll implement it. - Jon > On Mar 26,

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
On Thu, Mar 26, 2015 at 10:51 AM, Vincent St-Amour wrote: > This is really cool! > > Do you have plans for operations on durations? > > Vincent More vague thoughts than plans. So-- there's a useful distinction (that comes out of Joda-Time) between a duration, which is directly convertible to som

Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-26 Thread Daniel Prager
One area where a notion of Project comes in handy is with cross-file refactoring. E.g. Right now I am in the midst of renaming a #:keyword and resorting to grep to find dependencies in other files. Is there a smarter existing way of doing this kind of thing in DrRacket? Or is this a use-case for f

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Neil Van Dyke
BTW, the ISO 8601 standard (I don't mean the trivial "ISO 8601 date/time format" everybody knows) has done a lot on concepts you might want to look at. Beware that ISO 8601 is big, and there is some baffling stuff included, but you can't always tell what is important. One thing I can tell you

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
I've used a library like this before [https://github.com/jeremyw/stamp], and realized that there were two things I didn't like about it: (1) potential ambiguity in the (user-)chosen exemplar date/time and (2) my tendency to mistake the exemplar date for an actual piece of data in the program. Go's

[racket-users] adapting workflow to `raco pkg install --clone ...`

2015-03-26 Thread Matthew Butterick
I'm confused about how local package development is supposed to work with `raco pkg install --clone`. This is turning into a deterrent to diagnosing & fixing bugs, and an encouragement to post issues so others can fix them. In the dark ages, one would a) fork the main Racket repo on GitHub, b) w

Re: [racket-users] adapting workflow to `raco pkg install --clone ...`

2015-03-26 Thread Sam Tobin-Hochstadt
On Thu, Mar 26, 2015 at 9:52 PM, Matthew Butterick wrote: > I'm confused about how local package development is supposed to work with > `raco pkg install --clone`. This is turning into a deterrent to diagnosing & > fixing bugs, and an encouragement to post issues so others can fix them. > > In t

Re: [racket-users] adapting workflow to `raco pkg install --clone ...`

2015-03-26 Thread Matthew Flatt
Unless it was just a typo in your e-mail message, you wanted "path=typed-racket" instead of "path-typed-racket" (i.e., an "=" instead of "-"). Instead, though, I recommend that you start with "typed-racket" installed the usual way, and then use raco pkg update --clone typed-racket Afterward, c

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Jon Zeppieri
Yeah... I've debated several times whether to shell out the 138 Swiss francs for a copy. There is a bit of support for the week-based calendar in Gregor (->iso-week, ->iso-wyear, and ->iso-wday are defined on date-provider), but the I've never actually used the week-based calendar, which makes it