I need a free LAMP hosting and a iMac

2024-07-29 Thread Benjamin via Python-list
Hi, For several months I have searched free web hosing in Google, but have not find a satisfying result now. Any body know some good LAMP free web hosting? And, I have lost job since 2018, my macbook has only 2 intel core, I want to buy a new iMac for person programming, but I have only little

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-02 Thread Dennis Lee Bieber
On Thu, 2 Mar 2023 12:45:50 +1100, Chris Angelico declaimed the following: > >As have all CPUs since; it's the only way to implement locks (push the >locking all the way down to the CPU level). > Xerox Sigma (circa 1970): Modify and Test (byte/halfword/word) Granted, that was a

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread Jon Ribbens via Python-list
On 2023-03-02, Chris Angelico wrote: > On Thu, 2 Mar 2023 at 08:01, <2qdxy4rzwzuui...@potatochowder.com> wrote: >> On 2023-03-01 at 14:35:35 -0500, >> avi.e.gr...@gmail.com wrote: >> > What would have happened if all processors had been required to have >> > some low level instruction that effecti

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread Chris Angelico
On Thu, 2 Mar 2023 at 13:02, Weatherby,Gerard wrote: > > So I guess we know what would have happened. > Yep. It's not what I was talking about, but it's also a very important concurrency management feature. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread Weatherby,Gerard
So I guess we know what would have happened. Get Outlook for iOS<https://aka.ms/o0ukef> From: Python-list on behalf of Chris Angelico Sent: Wednesday, March 1, 2023 8:45:50 PM To: python-list@python.org Subject: Re: Look free ID genertion (was: Is there

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread Chris Angelico
On Thu, 2 Mar 2023 at 08:01, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2023-03-01 at 14:35:35 -0500, > avi.e.gr...@gmail.com wrote: > > > What would have happened if all processors had been required to have > > some low level instruction that effectively did something in an atomic > > way

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread 2QdxY4RzWzUUiLuE
On 2023-03-01 at 14:35:35 -0500, avi.e.gr...@gmail.com wrote: > What would have happened if all processors had been required to have > some low level instruction that effectively did something in an atomic > way that allowed a way for anyone using any language running on that > machine a way to do

Re: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread Chris Angelico
le purpose of a use in locks. That's not lock-free :) The only way that it works is because it's locked against other threads doing the same job. Lock-free ID generation means that: 1) Two threads can request IDs simultaneously and will not block each other 2) No two "request an ID&qu

RE: Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread avi.e.gross
very directly using the atomic operation directly. -Original Message- From: Python-list On Behalf Of Dieter Maurer Sent: Wednesday, March 1, 2023 1:43 PM To: Chris Angelico Cc: python-list@python.org Subject: Look free ID genertion (was: Is there a more efficient threading lock?) Chris

Look free ID genertion (was: Is there a more efficient threading lock?)

2023-03-01 Thread Dieter Maurer
Chris Angelico wrote at 2023-3-1 12:58 +1100: > ... > The >atomicity would be more useful in that context as it would give >lock-free ID generation, which doesn't work in Python. I have seen `itertools.count` for that. This works because its `__next__` is implemented in "C&q

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-26 Thread Mohsen Owzar
a program in Malab a GUI for solving > > >>>>> Sudoku puzzles, which worked not so bad. > > >>>>> Now I try to write this GUI with Python with PyQt5 or TKinter. > > >>>>> First question is: > > >>>&g

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-23 Thread Mohsen Owzar
gt;>>>> Now I try to write this GUI with Python with PyQt5 or TKinter. > >>>>> First question is: > >>>>> Is there any free OCR software, packages or code in Python, which I can > >>>>> use to recognize the given digits and their po

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread DFS
ten a program in Malab a GUI for solving Sudoku puzzles, which worked not so bad. Now I try to write this GUI with Python with PyQt5 or TKinter. First question is: Is there any free OCR software, packages or code in Python, which I can use to recognize the given digits and their positions in the p

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread Mohsen Owzar
ago I've written a program in Malab a GUI for solving Sudoku > >>> puzzles, which worked not so bad. > >>> Now I try to write this GUI with Python with PyQt5 or TKinter. > >>> First question is: > >>> Is there any free OCR software, packages

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread DFS
with Python with PyQt5 or TKinter. First question is: Is there any free OCR software, packages or code in Python, which I can use to recognize the given digits and their positions in the puzzle square. Second: Because, I can not attach a picture to this post, I try to describe my picture of m

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread Roland Mueller via Python-list
st question is: > Is there any free OCR software, packages or code in Python, which I can > use to recognize the given digits and their positions in the puzzle square. > to my knowledge there is no Python package for OCR. Using a free OCR package that has a command line interface one could

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread Igor Korot
o I've written a program in Malab a GUI for solving Sudoku > puzzles, which worked not so bad. > > > Now I try to write this GUI with Python with PyQt5 or TKinter. > > > First question is: > > > Is there any free OCR software, packages or code in Python, which I >

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread Mohsen Owzar
is GUI with Python with PyQt5 or TKinter. > > First question is: > > Is there any free OCR software, packages or code in Python, which I can use > > to recognize the given digits and their positions in the puzzle square. > > Second: > > Because, I can not attach a pic

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread DFS
On 9/21/2021 4:36 AM, Mohsen Owzar wrote: Hi Guys Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles, which worked not so bad. Now I try to write this GUI with Python with PyQt5 or TKinter. First question is: Is there any free OCR software, packages or code in P

Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread Mohsen Owzar
Hi Guys Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles, which worked not so bad. Now I try to write this GUI with Python with PyQt5 or TKinter. First question is: Is there any free OCR software, packages or code in Python, which I can use to recognize the

EuroPython 2021: Free tickets for Python Core Developers

2021-06-25 Thread Marc-Andre Lemburg
In 2019, we have set up the Guido van Rossum Core Developer Grant, to make it easy for Python Core Developers to attend EuroPython, but also to give something back to the core team and add a perk to make core development more attractive. If you are a core developer, please check our grant page for

byexample: free, open source tool to find snippets of code in your docs and execute them as regression tests

2021-05-03 Thread Martin Di Paola
Hi everyone, I would like to share a free, open source tool with you that I've been developing in the last few years. You'll be probably familiar with things like this in the Python documentation: ``` >>> 1 + 3 4 ``` byexample will find those snippets, it will exec

Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-13 Thread Russell via Python-list
Jach Feng wrote: > Is there any reason a student/beginner learn Python now start from Python2? > > --Jach Only if you want a job porting python2 to python3. Python 2.x is officially End Of Life. -- rust 0x68caecc97f6a90122e51c0692c88d9cb6b58a3dc -- https://mail.python.org/mailman/listinfo/p

Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-06 Thread Jach Feng
//cscx.org/add1 > * Compute the factorial of a number: https://cscx.org/factorial > * Compute the GCD of two numbers: https://cscx.org/gcd > * Solve the change-making problem: https://cscx.org/cash > > The website has a tutorial section covering Python's basics. > > I

Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-06 Thread Rudy Matela
On Fri, Apr 02, 2021 at 05:00:40AM +1100, Chris Angelico wrote: > On Fri, Apr 2, 2021 at 2:14 AM Rudy Matela wrote: > > Computer Science by Example https://cscx.org/ is a collection of short > > programming exercises. The site can automatically grade students' > > solutions and it accepts submiss

Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-01 Thread Chris Angelico
On Fri, Apr 2, 2021 at 2:14 AM Rudy Matela wrote: > > Hello python-list members, > > I would like to announce the following educational project: > > Computer Science by Example https://cscx.org/ is a collection of short > programming exercises. The site can automatically grade students' > solutio

[ANN] Free Python tutorial with exercises, cscx.org

2021-04-01 Thread Rudy Matela
://cscx.org/gcd * Solve the change-making problem: https://cscx.org/cash The website has a tutorial section covering Python's basics. I tried to make the content easy to use by instructors/lecturers, feel free to use this with your students. The backend of the website is open source and you

Kids Python 101 free learning materials

2021-02-07 Thread Kids Python
Hello there, I have developed free learning materials for young kids (targeting 8+ kids) to learn Python from scratch on https://kidspython.com lately. I put lots of efforts on simplifying the course materials, providing plenty of good examples and sufficient exercises for kids to practice

Re: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab

2020-08-16 Thread Turritopsis Dohrnii Teo En Ming
Noted with thanks. I will contact the script authors. On 2020-08-17 07:16, Cameron Simpson wrote: On 16Aug2020 17:41, Turritopsis Dohrnii Teo En Ming wrote: Subject: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab The best thing

Re: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab

2020-08-16 Thread Cameron Simpson
On 16Aug2020 17:41, Turritopsis Dohrnii Teo En Ming wrote: >Subject: I discovered a bug in the no-ip dynamic dns free hostname >auto renewal/confirmation script written by loblab The best thing to do here is to submit this as an issue here: https://github.com/loblab/noip-renew/

I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab

2020-08-16 Thread Turritopsis Dohrnii Teo En Ming
Subject: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab Good day from Singapore, Programming code troubleshooting person: Mr. Turritopsis Dohrnii Teo En Ming (Targeted Individual) Country: Singapore Date: 15 to 16 August 2020

David Beazley's Practical Python Course Now Open & Free

2020-05-29 Thread Abdur-Rahmaan Janhangeer
Greetings, A Great Py Course: https://dabeaz-course.github.io/practical-python/ David Beazley is a celebrated python dev, previously he was a lecturer in compiler theory. His practical py course is: "A no-nonsense treatment of Python that has been actively taught to more than 400 in-person gro

Re: Springer released free ebooks (epub and pdf)

2020-04-19 Thread Souvik Dutta
Thanks(for posting) those help. On Sun, 19 Apr, 2020, 4:37 am DL Neil via Python-list, < python-list@python.org> wrote: > Springer (publisher) has released a bunch of eBook versions of Python > text-books, free to download (.PDF and/or .EPUB), in support of COVID-19 > stay-at-home

Springer released free ebooks (epub and pdf)

2020-04-18 Thread DL Neil via Python-list
Springer (publisher) has released a bunch of eBook versions of Python text-books, free to download (.PDF and/or .EPUB), in support of COVID-19 stay-at-homes. This sub-list features texts for all 'levels' of mastery, and published between 2014 and 2019/20. They tend to be 'sol

My Python programming book for kids is free for 48 hours

2020-02-02 Thread Kent Tong
Hi, If you're interested, please get it for free at: https://www.amazon.com/Yes-Kids-can-learn-Python-ebook/dp/B084CY2L43/ref=sr_1_3 This is a set of training materials I used to successfully teach Python to kids as little as 10 years old. The online learning environment are freely avai

Obtain all the content from https://free-ss.site/ by pycurl/requests.

2019-09-22 Thread Hongyi Zhao
Hi, I try to obtain the content from https://free-ss.site/ by pycurl/requests. But it seems that the above tools cannot get all of the content as the stuff obtained by the firefox. Is is possible to get all of the content just as the results via firefox for this website by using pycurl

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-21 Thread Leonardo Giordani
A couple of people asked the link to the post I mentioned, sorry I forgot to add it http://www.thedigitalcatonline.com/blog/2017/07/21/refactoring-with-test-in-python-a-practical-example/ This is just a very simple exercise in refactoring, but I believe it's a good starting point for people who

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-21 Thread Leonardo Giordani
Akkana, yes that is a good idea, even though I expected the LeanPub output to be already the correct one. I'll check with them. Thanks for reading the book, you actually gave me an idea: writing something about adding tests to a project *after* the code has been written. I already wrote a post

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-20 Thread Akkana Peck
> On 20/03/19 7:18 AM, Leonardo Giordani wrote: > > Ha ha ha, yes I get it! =) I'm sorry, that depends entirely on the LeanPub > > processing chain (I believe, I'll have a look just to be sure). I hope the > > book will be useful even with this little issue. Thanks for reading it! DL Neil writes

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-19 Thread DL Neil
On 20/03/19 7:18 AM, Leonardo Giordani wrote: Ha ha ha, yes I get it! =) I'm sorry, that depends entirely on the LeanPub processing chain (I believe, I'll have a look just to be sure). I hope the book will be useful even with this little issue. Thanks for reading it! To be fair, that was one

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-19 Thread Leonardo Giordani
Ha ha ha, yes I get it! =) I'm sorry, that depends entirely on the LeanPub processing chain (I believe, I'll have a look just to be sure). I hope the book will be useful even with this little issue. Thanks for reading it! -- https://mail.python.org/mailman/listinfo/python-list

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-19 Thread Philippe Dixon
ail.com wrote: > > > > Hi all, > > > > I published on Leanpub a free book, "Clean Architectures in Python". > It's a humble attempt to organise and expand some posts I published on my > blog in the last years. > > > > You can find it here: ht

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-19 Thread DL Neil
On 17/03/19 12:29 AM, giordani.leona...@gmail.com wrote: I published on Leanpub a free book, "Clean Architectures in Python". It's a humble attempt to organise and expand some posts I published on my blog in the last years. You can find it here: https://leanpub.com/clean-architec

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-18 Thread Arup Rakshit
Hello, Thanks for writing this great book. I joined python community just couple of weeks. Thanks, Arup Rakshit a...@zeit.io > On 16-Mar-2019, at 4:59 PM, giordani.leona...@gmail.com wrote: > > Hi all, > > I published on Leanpub a free book, "Clean Architecture

I wrote a free book about TDD and clean architecture in Python

2019-03-18 Thread giordani . leonardo
Hi all, I published on Leanpub a free book, "Clean Architectures in Python". It's a humble attempt to organise and expand some posts I published on my blog in the last years. You can find it here: https://leanpub.com/clean-architectures-in-python The main content is divided in

Re: Python-List is a tyrannical, one-party dictatorship that hates free speech!

2018-07-17 Thread MGHSM
ObXkcd: https://xkcd.com/1357/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Ways to make a free variable local to a function?

2018-04-15 Thread Yubin Ruan
On 2018-04-15 13:31, Kirill Balunov wrote: > > > 2018-04-15 10:58 GMT+03:00 Yubin Ruan : > > [this is a bit late...] > > Did you really have any benchmark for it? I know what you are doing but it > seems to be a pre-mature optimization. If this really is the case, then we > can

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-28 Thread Rick Johnson
On Wednesday, March 28, 2018 at 2:25:42 AM UTC-5, Gregory Ewing wrote: > Rick Johnson wrote: > > The only difference is when you want to make a call from a > > _reference_, which, as you and i well know, is not the > > most common way func/meths are called (these are rare). > > No, but it's the ca

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-28 Thread Chris Angelico
On Thu, Mar 29, 2018 at 12:28 AM, Steven D'Aprano wrote: > On Tue, 27 Mar 2018 11:34:17 +1100, Chris Angelico wrote: > >> Question: How do you get a reference to a Ruby function? Or are they not >> first-class objects? > > https://stackoverflow.com/questions/4294485/how-do-i-reference-a-function-

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-28 Thread Steven D'Aprano
On Tue, 27 Mar 2018 11:34:17 +1100, Chris Angelico wrote: > Question: How do you get a reference to a Ruby function? Or are they not > first-class objects? https://stackoverflow.com/questions/4294485/how-do-i-reference-a-function- in-ruby Especially this answer, which is worth reading: https://

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-28 Thread Gregory Ewing
Rick Johnson wrote: The only difference is when you want to make a call from a _reference_, which, as you and i well know, is not the most common way func/meths are called (these are rare). No, but it's the case we're talking about here. If functions don't behave the same way in all circumstanc

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Wed, Mar 28, 2018 at 1:22 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 6:55:23 PM UTC-5, Steven D'Aprano wrote: >> On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: > [...] >> > Since when did utilizing a method to request a specific >> > value become some sort of magic? >> >>

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 6:55:23 PM UTC-5, Steven D'Aprano wrote: > On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: [...] > > Since when did utilizing a method to request a specific > > value become some sort of magic? > > Since it requires a special method that has super powers no > m

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Steven D'Aprano
On Tue, 27 Mar 2018 09:28:34 -0700, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote: [...] > > Cool, so Greg was right: you can't get a reference to a method or > > function. You need magic to simulate it. > > Since when did utilizing a method to request a

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 4:47:05 PM UTC-5, Gregory Ewing wrote: > Rick Johnson wrote: > > rb> Object.method("print_name").call("Meathead") > > Yes, but the point is that you have to have to use a different > syntax to call it. This is like having to say > > f.__call__(arg) > > in Pytho

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Gregory Ewing
Rick Johnson wrote: rb> Object.method("print_name").call("Meathead") Yes, but the point is that you have to have to use a different syntax to call it. This is like having to say f.__call__(arg) in Python instead of just f(arg) -- Greg -- https://mail.python.org/mailman/listinfo/py

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Gregory Ewing
Chris Angelico wrote: Ahh, that explains it. Great. So how do you build higher-order functions? Or don't you? You don't, exactly. You have to pass around objects with a method to invoke when you want to "call" them. Ruby has a code-block syntax that helps with this somewhat, but I don't think

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 11:35:31 AM UTC-5, Chris Angelico wrote: > Why are you suggesting that this is magic? _You_ are the one who leveled the accusation that Ruby's methodology for fetching a function reference (a la): Object.method(meth-name-here) is "magic". I'm merely requesting t

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Wed, Mar 28, 2018 at 3:28 AM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote: > [...] >> Cool, so Greg was right: you can't get a reference to a >> method or function. You need magic to simulate it. > > Since when did utilizing a method to request a s

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 8:46:54 AM UTC-5, Chris Angelico wrote: [...] > Cool, so Greg was right: you can't get a reference to a > method or function. You need magic to simulate it. Since when did utilizing a method to request a specific value become some sort of magic? Do you consider this

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 11:00 PM, Rick Johnson wrote: > On Tuesday, March 27, 2018 at 1:55:01 AM UTC-5, Gregory Ewing wrote: >> Chris Angelico wrote: >> > Question: How do you get a reference to a Ruby function? Or are they >> > not first-class objects? >> >> They're not first-class. So, you can't

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 3:24:48 AM UTC-5, Steven D'Aprano wrote: > On Mon, 26 Mar 2018 11:37:35 -0700, Rick Johnson wrote: > Printing a string and calling a function is obfuscated code? Deary me. When the programmer can't be bothered to invent names more descriptive than `a` and `b`, why ye

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Rick Johnson
On Tuesday, March 27, 2018 at 1:55:01 AM UTC-5, Gregory Ewing wrote: > Chris Angelico wrote: > > Question: How do you get a reference to a Ruby function? Or are they > > not first-class objects? > > They're not first-class. So, you can't. If Chris means: "how do you get a reference to a Ruby funct

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Steven D'Aprano
On Mon, 26 Mar 2018 11:37:35 -0700, Rick Johnson wrote: > On Monday, March 26, 2018 at 5:46:03 AM UTC-5, Steven D'Aprano wrote: >> Rick, you're supposedly familiar with Ruby. And yet, you didn't notice >> that your supposed "fix" didn't touch any executable code, all it did >> was modify the strin

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Stephen Hansen
On Mon, Mar 26, 2018, at 2:19 PM, Rick Johnson wrote: >Sure, the behavior that Steven > uncovered is odd, but it could be that Maz harbors a strong > disliking for undisciplined pupils, and thus, he designed > and placed this little trap in the hopes the pain it induced > might encourage the petula

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-27 Thread Chris Angelico
On Tue, Mar 27, 2018 at 5:54 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> Question: How do you get a reference to a Ruby function? Or are they >> not first-class objects? > > > They're not first-class. So, you can't. > Ahh, that explains it. Great. So how do you build higher-order funct

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Gregory Ewing
Chris Angelico wrote: Question: How do you get a reference to a Ruby function? Or are they not first-class objects? They're not first-class. So, you can't. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Gregory Ewing
Ned Batchelder wrote: "Ranting Rick" isn't trying to enlighten, educate, or learn. He's trying to rile people up, and he is good at it. I don't think he's even trying, it just come naturally to him. Rick rants the way wind blows and water wets. -- Greg -- https://mail.python.org/mailman/listi

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Rick Johnson
On Monday, March 26, 2018 at 6:11:31 PM UTC-5, Python wrote: > On Mon, Mar 26, 2018 at 02:19:12PM -0700, Rick Johnson wrote: [...] > > Hmm. If "syntax parser rules" could prevent poorly > > formatted code, then there'd be no need for style guides. > > It may be telling that my team has minimal styl

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Chris Angelico
On Tue, Mar 27, 2018 at 10:10 AM, Python wrote: > Ruby touts itself as being a simple language with elegant syntax. > This thread is my only exposure to it to date, but what I've seen here > is, frankly, the exact opposite of that. You should not need a map to > distinguish function calls from va

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Ned Batchelder
On 3/26/18 7:10 PM, Python wrote: Humans are already good enough at making mistakes that they require no additional encouragement, such as what is provided by allowing such syntactical horrors. Agreed. And that's why we must respect and follow the code styling wisdom which has been passed down b

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Mon, Mar 26, 2018 at 02:19:12PM -0700, Rick Johnson wrote: > On Monday, March 26, 2018 at 3:09:38 PM UTC-5, Python wrote: > > On Mon, Mar 26, 2018 at 11:37:35AM -0700, Rick Johnson wrote: > [...] > > > Ruby followed the rules. > > > But you didn't. > > > > Nonsense... Your language's syntax pars

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Rick Johnson
On Monday, March 26, 2018 at 3:09:38 PM UTC-5, Python wrote: > On Mon, Mar 26, 2018 at 11:37:35AM -0700, Rick Johnson wrote: [...] > > Ruby followed the rules. > > But you didn't. > > Nonsense... Your language's syntax parser is what defines > the rules. All of the expressions Stephen wrote did not

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Mon, Mar 26, 2018 at 11:37:35AM -0700, Rick Johnson wrote: > > Because of this "fix", the printed strings no longer match > > the code being executed, but the strange, inconsistent > > behaviour still occurs. > > The supposed "inconsistent behavior" here has absolutely > nothing to do with Ruby

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Chris Angelico
On Tue, Mar 27, 2018 at 5:37 AM, Rick Johnson wrote: > The supposed "inconsistent behavior" here has absolutely > nothing to do with Ruby, no, it's all on _you_. _YOU_ are > the one who created a non-sensical function with a single > char name; and _YOU_ are the one who placed a call to that > fun

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Mon, Mar 26, 2018 at 10:43:32AM +, Steven D'Aprano wrote: > The kicker is that out of these four legal, parenthesis-free ways of > calling function a, *three* of them interpret the expression as: > > call a with no arguments > then add b using the binary plus o

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Sun, Mar 25, 2018 at 10:33:49AM -0700, Rick Johnson wrote: > > [steve@ando ruby]$ ruby ws-example.rb > > a + b => 7 > > a+b => 7 > > a+ b => 7 > > a +b => 3 > > > > Here's the source code: > > > > # --- cut --- > > def a(x=4) > > x+2 > > end > > > > b = 1 > > print "a + b => ", (a + b),

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Rick Johnson
On Monday, March 26, 2018 at 5:46:03 AM UTC-5, Steven D'Aprano wrote: > Rick, you're supposedly familiar with Ruby. And yet, you > didn't notice that your supposed "fix" didn't touch any > executable code, all it did was modify the strings being > printed. Because the goal was to *UN-OBFUSCATE* th

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Steven D'Aprano
he code I used before (see below) defines a function called "a", then prints four ways of calling that function that differ only in whitespace. For example: print "a + b => ", (a + b), "\n" prints the string "a + b", then calls a and adds b usi

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-25 Thread Rick Johnson
On Sunday, March 25, 2018 at 5:57:28 PM UTC-5, Steven D'Aprano wrote: > [supposed "fix" to the sample script snipped] > > You know Rick, every time I start to think that talking to > you like an adult might result in a productive and > intelligent conversation, you pull a stunt like this. Once >

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-25 Thread Steven D'Aprano
>> the defence about parens-free function calls, how is this for >> "consistency" in Ruby? >> >> [steve@ando ruby]$ ruby ws-example.rb a + b => 7 >> a+b => 7 >> a+ b => 7 >> a +b => 3 >> >> Here's the source code: &g

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-25 Thread Rick Johnson
On Sunday, March 25, 2018 at 9:11:35 AM UTC-5, Steven D'Aprano wrote: > On Sun, 25 Mar 2018 04:49:21 -0700, Rick Johnson wrote: [...] > I never said anything about not allowing it. But since > you've gone on the defence about parens-free function > calls, how is this for

Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-25 Thread Steven D'Aprano
On Sun, 25 Mar 2018 04:49:21 -0700, Rick Johnson wrote: >> - with no arguments, using the parenthesis-free syntax, >> Ruby automagically forwards the same arguments to the (single) >> parent; > > Which is merely a natural result of Ruby's function/method

Re: Ways to make a free variable local to a function?

2018-03-06 Thread Chris Angelico
On Tue, Mar 6, 2018 at 8:02 PM, Kirill Balunov wrote: > > > 2018-03-05 17:34 GMT+03:00 Chris Angelico : >> >> In theory, the CPython bytecode compiler (don't know about other >> Python implementations) could just add these as constants. They'd then >> be bound at either compile time or function de

Re: Ways to make a free variable local to a function?

2018-03-06 Thread Kirill Balunov
2018-03-05 21:44 GMT+03:00 Terry Reedy : > Yes, what we really want for this sort of thing are unrebindable local > constants. A simple syntax change could do it. > > def func_local_1(numb; int = int, float = float, range = range): > > The binding after ';' belong in the header because they sho

Re: Ways to make a free variable local to a function?

2018-03-06 Thread Wolfgang Maier
On 03/05/2018 07:44 PM, Terry Reedy wrote: On 3/5/2018 9:34 AM, Chris Angelico wrote: On Tue, Mar 6, 2018 at 12:52 AM, Terry Reedy wrote: On 3/5/2018 7:12 AM, Kirill Balunov wrote: # 1. By passing through local variable's default values def func_local_1(numb, _int = int, _float = floa

Re: Ways to make a free variable local to a function?

2018-03-06 Thread Kirill Balunov
2018-03-05 17:34 GMT+03:00 Chris Angelico : > In theory, the CPython bytecode compiler (don't know about other > Python implementations) could just add these as constants. They'd then > be bound at either compile time or function definition time (by > default the former, I think, but the latter wo

Re: Ways to make a free variable local to a function?

2018-03-05 Thread Terry Reedy
On 3/5/2018 9:34 AM, Chris Angelico wrote: On Tue, Mar 6, 2018 at 12:52 AM, Terry Reedy wrote: On 3/5/2018 7:12 AM, Kirill Balunov wrote: # 1. By passing through local variable's default values def func_local_1(numb, _int = int, _float = float, _range = range): You are not required t

Re: Ways to make a free variable local to a function?

2018-03-05 Thread Chris Angelico
On Tue, Mar 6, 2018 at 12:52 AM, Terry Reedy wrote: > On 3/5/2018 7:12 AM, Kirill Balunov wrote: >> # 1. By passing through local variable's default values >> >> def func_local_1(numb, _int = int, _float = float, _range = range): > > > You are not required to mangle the names. > > def func_lo

Re: Ways to make a free variable local to a function?

2018-03-05 Thread Terry Reedy
On 3/5/2018 7:12 AM, Kirill Balunov wrote: Hi, At the moment, in order to slightly speed up the function in Python, free variables are passed as local variables to the function, thereby getting rid of extra look ups. For example, for the following function, I especially do not use list

Ways to make a free variable local to a function?

2018-03-05 Thread Kirill Balunov
Hi, At the moment, in order to slightly speed up the function in Python, free variables are passed as local variables to the function, thereby getting rid of extra look ups. For example, for the following function, I especially do not use list comprehension) and therefore maybe it's not the

Re: Help to debug my free library

2018-01-31 Thread Rustom Mody
On Thursday, February 1, 2018 at 1:11:50 AM UTC+5:30, Victor Porton wrote: > wxjmfauth wrote: > > > Le mercredi 31 janvier 2018 20:13:06 UTC+1, Chris Angelico a écrit : > >> On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: > >> > LibComCom is a C library which passes a string as stdin of an O

Re: Help to debug my free library

2018-01-31 Thread Victor Porton
Dennis Lee Bieber wrote: > On Wed, 31 Jan 2018 20:58:56 +0200, Victor Porton > declaimed the following: > >>LibComCom is a C library which passes a string as stdin of an OS command >>and stores its stdout in another string. >> >>I wrote this library recently: >>https://github.com/vporton/libcomc

Re: Help to debug my free library

2018-01-31 Thread Chris Angelico
On Thu, Feb 1, 2018 at 9:31 AM, alister via Python-list wrote: > On Thu, 01 Feb 2018 06:48:03 +1100, Chris Angelico wrote: > >> On Thu, Feb 1, 2018 at 6:41 AM, Victor Porton wrote: >>> wxjmfa...@gmail.com wrote: >>> Le mercredi 31 janvier 2018 20:13:06 UTC+1, Chris Angelico a écrit : > O

Re: Help to debug my free library

2018-01-31 Thread alister via Python-list
On Thu, 01 Feb 2018 06:48:03 +1100, Chris Angelico wrote: > On Thu, Feb 1, 2018 at 6:41 AM, Victor Porton wrote: >> wxjmfa...@gmail.com wrote: >> >>> Le mercredi 31 janvier 2018 20:13:06 UTC+1, Chris Angelico a écrit : On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: > LibComC

Re: Help to debug my free library

2018-01-31 Thread breamoreboy
stating that the Python 3 Flexible String Representation is buggy, to the extent that Python 3.6.2 is unusable on Windows. Strangely he cannot produce a shred of evidence to support his case so feel free to ignore him. -- Kindest regards. Mark Lawrence. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help to debug my free library

2018-01-31 Thread Chris Angelico
On Thu, Feb 1, 2018 at 6:41 AM, Victor Porton wrote: > wxjmfa...@gmail.com wrote: > >> Le mercredi 31 janvier 2018 20:13:06 UTC+1, Chris Angelico a écrit : >>> On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: >>> > LibComCom is a C library which passes a string as stdin of an OS >>> > command

Re: Help to debug my free library

2018-01-31 Thread Chris Angelico
On Thu, Feb 1, 2018 at 6:26 AM, Victor Porton wrote: > Chris Angelico wrote: > >> On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: >>> LibComCom is a C library which passes a string as stdin of an OS command >>> and stores its stdout in another string. >> >> Something like the built-in subpro

Re: Help to debug my free library

2018-01-31 Thread Victor Porton
wxjmfa...@gmail.com wrote: > Le mercredi 31 janvier 2018 20:13:06 UTC+1, Chris Angelico a écrit : >> On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: >> > LibComCom is a C library which passes a string as stdin of an OS >> > command and stores its stdout in another string. >> >> Something li

Re: Help to debug my free library

2018-01-31 Thread Victor Porton
Chris Angelico wrote: > On Thu, Feb 1, 2018 at 5:58 AM, Victor Porton wrote: >> LibComCom is a C library which passes a string as stdin of an OS command >> and stores its stdout in another string. > > Something like the built-in subprocess module does? I was going to write: "It seems that subpr

  1   2   3   4   5   6   7   8   9   10   >