Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-17 Thread Will Jukes
I went ahead and added some info on the difference between Racket and Python appends to https://github.com/racket/racket/wiki/Python-to-Racket . Sorry to whoever for the salvo of poorly documented revisions. On Sun, Feb 17, 2019 at 12:21 AM David Van Horn wrote: > I've updated the docs to get

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread David Van Horn
I've updated the docs to get to the point faster with some early examples. http://dvanhorn.github.io/ralist/ David On Sat, Feb 16, 2019 at 5:21 PM John Clements wrote: > I struggled with whether to send that message… I saw the name, “random > access lists”, thought, “hmm, I wonder what that

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread 'John Clements' via Racket Users
I struggled with whether to send that message… I saw the name, “random access lists”, thought, “hmm, I wonder what that would like”, and clicked on the link. I wound up reading a bit about whether I should use (first impresssion) superficial or in-depth contracts, and ran out of steam pretty

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread David Van Horn
There are several examples for every function provided by the ralist library. (And it's almost verbatim what's in the Racket reference for pairs and lists.) But... I can add some early examples. No problem. David On Sat, Feb 16, 2019, 4:00 PM John Clements wrote: > The pointer to RaLists

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread 'John Clements' via Racket Users
The pointer to RaLists would be much more enticing if we could convince David Van Horn to begin his documentation with a couple of small examples…. John > On Feb 13, 2019, at 14:35, Stephen De Gabrielle > wrote: > > Thanks > > I should note that anyone with a GitHub account can edit >

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-13 Thread Stephen De Gabrielle
Thanks I should note that anyone with a GitHub account can edit https://github.com/racket/racket/wiki/Python-to-Racket S. On Wed, 13 Feb 2019 at 21:26, Matthias Felleisen wrote: > > Not until there’s demand. I think we do see demand for Python transfers. > > > > > On Feb 13, 2019, at 3:11 PM,

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-13 Thread Stephen De Gabrielle
Should there be similar pages for Javascript, Java,C#, C/C++, Ruby, PHP, Visual Basic, Scratch and Haskell? S. On Wed, Feb 13, 2019 at 8:03 PM Stephen De Gabrielle < spdegabrie...@gmail.com> wrote: > I created a DRAFT page on the Racket GitHub wiki: >

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-13 Thread Stephen De Gabrielle
I created a DRAFT page on the Racket GitHub wiki: https://github.com/racket/racket/wiki/Python-to-Racket It links to a 'Choosing a data structure' page https://github.com/racket/racket/wiki/Choosing-a-data-structure - this just as copy of the table created by Jens Axel Søgaard at:

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-11 Thread 韋嘉誠
For anyone creating such a web page for Python to Racket specifically, there is probably a great deal of inspiration, and reminders of stumbling blocks, to be found in Arne Babenhauserheide's https://www.draketo.de/py2guile book (available online for free) about going from Python to Guile Scheme.

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-04 Thread Matthias Felleisen
Great. Let’s include this link in Alex’s write up as an example of a concrete comparison. Even if such simple benchmarks don’t reflect daily, end-to-end programs, they can help people by dispelling some prejudices. Thanks — Matthias > On Feb 4, 2019, at 11:56 AM, Gustavo Massaccesi wrote:

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-04 Thread Gustavo Massaccesi
For some reason, the Racket vs Python performance is a question that arise from time to time in Hacke News (like 2 or 3 times per year). Last time I asked if it was possible to add a direct comparison in The Computer Language Benchmarks Game and the owner/maintainer added that page. The results

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-03 Thread Matthias Felleisen
Agreed! > On Feb 3, 2019, at 4:43 PM, Robby Findler wrote: > > It seems like a great addition to the performance section of the guide. > > Robby > > On Sun, Feb 3, 2019 at 3:35 PM Matthias Felleisen > wrote: > > 1. I think this is a great start for a

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-03 Thread Robby Findler
It seems like a great addition to the performance section of the guide. Robby On Sun, Feb 3, 2019 at 3:35 PM Matthias Felleisen wrote: > > 1. I think this is a great start for a generic introduction to data > structures. Someone should integrate Jens’s short table: > > >

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-03 Thread Matthias Felleisen
1. I think this is a great start for a generic introduction to data structures. Someone should integrate Jens’s short table: https://stackoverflow.com/questions/27584416/in-racket-what-is-the-advantage-of-lists-over-vectors/27589146#27589146

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-03 Thread Robby Findler
This is very nice! Robby On Sat, Feb 2, 2019 at 10:37 PM Alex Harsanyi wrote: > > I put together some notes about available data structures in Racket, with > some performance considerations. It needs more work, but perhaps it can be > used as a starting point and it can be added to the Racket

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-03 Thread Jens Axel Søgaard
FWIW here is an overview over data structures in Racket: https://stackoverflow.com/questions/27584416/in-racket-what-is-the-advantage-of-lists-over-vectors/27589146#27589146 /Jens Axel Den søn. 3. feb. 2019 kl. 05.37 skrev Alex Harsanyi : > > I put together some notes about available data

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Alex Harsanyi
I put together some notes about available data structures in Racket, with some performance considerations. It needs more work, but perhaps it can be used as a starting point and it can be added to the Racket wiki, if/when others consider it adequate:

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Matthias Felleisen
Racket needs *you*. Please. The proper approach is to have short pages for different language immigration groups: Python and R come to mind as obvious examples but I am sure there are others. What I mean is we need help and *you* can help. Let me explain it with the Python example: 1.

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Philip McGrath
I am certain people coming from Python are confused by this, since I was bitten by this very difference when I had to write some Python for the first time in a while. (What do you mean append has side-effects?!?) -Philip On Sat, Feb 2, 2019 at 10:30 AM Robby Findler wrote: > On Sat, Feb 2,

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Robby Findler
On Sat, Feb 2, 2019 at 9:23 AM George Neuner wrote: > > > On 2/2/2019 9:38 AM, Robby Findler wrote: > > Lists seem like a common pitfall here, due to the overlap in > > terminology but not functionality/performance. Maybe the right thing > > is to add a library to data/ that is the python list

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread George Neuner
On 2/2/2019 9:38 AM, Robby Findler wrote: Lists seem like a common pitfall here, due to the overlap in terminology but not functionality/performance. Maybe the right thing is to add a library to data/ that is the python list data structure and point to it from the list documentation? The

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Sam Tobin-Hochstadt
I agree with that 100%. On Sat, Feb 2, 2019, 9:46 AM Robby Findler Oh, right! Mentioning python in the list docs seems like it might help. > > Robby > > On Sat, Feb 2, 2019 at 8:45 AM Sam Tobin-Hochstadt > wrote: > >> Fortunately there are already libraries with good performance on these >>

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Robby Findler
Oh, right! Mentioning python in the list docs seems like it might help. Robby On Sat, Feb 2, 2019 at 8:45 AM Sam Tobin-Hochstadt wrote: > Fortunately there are already libraries with good performance on these > operations for Racket, so we could point to the data/ralist library, > for example.

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Sam Tobin-Hochstadt
Fortunately there are already libraries with good performance on these operations for Racket, so we could point to the data/ralist library, for example. Sam On Sat, Feb 2, 2019 at 9:38 AM Robby Findler wrote: > > Lists seem like a common pitfall here, due to the overlap in terminology but >

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Robby Findler
Lists seem like a common pitfall here, due to the overlap in terminology but not functionality/performance. Maybe the right thing is to add a library to data/ that is the python list data structure and point to it from the list documentation? Robby On Sat, Feb 2, 2019 at 12:28 AM Alex Harsanyi

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Thomas F. Burdick
On February 2, 2019 7:28:12 AM GMT+01:00, Alex Harsanyi wrote: >Someone asked recently for help on Reddit[1] with a Racket performance >issue. >The problem was they they were constructing a large list by appending >many >short lists repeatedly; their code was calling `(set! result (append

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Neil Van Dyke
Alex Harsanyi wrote on 2/2/19 1:28 AM: One improvement that I can think of is to add a performance description to each function that operates on the basic data structures (lists, vectors, hash-tables) Before complete coverage, perhaps two first steps: * Try to think of the minority of

[racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-01 Thread Alex Harsanyi
Someone asked recently for help on Reddit[1] with a Racket performance issue. The problem was they they were constructing a large list by appending many short lists repeatedly; their code was calling `(set! result (append result shortList))` in a loop and this was slow (unsurprisingly.) While