Re: question about basics of creating a PROXY to MONITOR network activity

2021-04-10 Thread Christian Seberino
> > > a) your reverse proxy must be colocated with the service it fronts on the > same machine; > b) your network infrastructure transparently encrypts traffic between your > proxy and the service; or > c) your proxy must negotiate its own TLS connection(s) with the service. > Paul Thanks. I'm

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
>> Readability of programming languages was measured >> using an objective method, and Python was one of >> the most readable. Do you have a source for this? -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> In Lisp, your hammer is the list. > In, say, Java, your tool is classes and inheritance. And yet if Lisp or Java programmers were here they would say their languages //are// multi-paradigm too. For example, Lisp has the Common Lisp Object System (CLOS) and Java has the Vector class and so

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> Another point to consider is the ecosystem of your language. If you > install Python, then you get basic math, I/O, a GUI toolkit, network > libraries, ... In more "traditional" languages like C or Lisp, you get > math and I/O, period. For everything else you need to hunt down a > library.

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
Your iterative fib(x) code and comment was quite nice. -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> 1. Python mostly separates computation of values (expressions) from flow > control and name binding (statements). When the latter are mixed with > the former, most people restrict the mixing to a line or two. This is an interesting observation. I've heard people say the fact that Python

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> ChrisA You're definitely an expert programmer. -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> If "the Python way" seems simpler to you than "the Lisp way," > or iteration seems simpler to you than recursion, then so be it. Other > languages and other programmers are different. I think this is so true. I've had similar conversations with Lisp fans and it has confused me at times why

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
Some problems are well suited to recursion but perhaps //most// problems are better suited to iteration? Maybe the spread is 10% vs 90%? Therefore in general more often the Python way seems simpler than Lisp? -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
> Trying to maintain that recursive list of unclosed lists in your > brain is fun. It stretches the brain in interesting ways. I was > way into Lisp at one point, including writing several Lisp > interpreters (that simple structure makes Lisp very easy to > implement). But I never found Lisp code

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
On Thursday, August 6, 2020 at 10:52:00 AM UTC-5, Chris Angelico wrote: > The point of learning a > language isn't that you can take a piece of pre-existing code and > figure out what it'll do, step by step; the point is to be able to > encode your intentions in that language, and to read the code

How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
Python is my favorite language and the easiest to use in my opinion. Lisp has a far simpler grammar and syntax. A beginner I think could learn Lisp much faster than Python. Therefore, it seems like Lisp *should* be easier to work with and more readable. I don't feel like it is easier to use

Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-05-01 Thread Christian Seberino
Paul Thanks! I'm glad there is theory about my concern. I knew I wasn't the only one with that question. cs > > https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle > > Also: > > https://en.wikipedia.org/wiki/Expression_problem --

Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
> > a pattern like: > if : > elif : > > Thanks. I really like this simple yet powerful suggestion you made. See this... import new_code ... if foo: new_code.do_new_stuff(..) We can massively modify existing code by *ONLY* adding one import and a 2 line if snippet!!! Very nice! cs

Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
If you want to know, I'm trying to add metaprogramming (macros!) to a tiny Lisp interpreter I wrote. I'm hesitant to mess with all that nice debugged code to add this new stuff. -- https://mail.python.org/mailman/listinfo/python-list

Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
I have some code I'd like to extend without modifying it. I'm sure this is a common pattern. I wondered what the options were for "extending without modifying (much)". I'm aware one can import a module and add functions to decorators. Are there other ways? Thanks! chris --

Re: What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-15 Thread Christian Seberino
> Python vs Clojure's syntax difference is superficial compared to their > other differences, like the Clojure's immutable data structures and > having to deal with the JVM. Well there's ClojureScript to run this hypothetical Pythonic Lisp in the browser. > I also don't think it's really

Re: What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-15 Thread Christian Seberino
> I had to read this twice. It confused the hell out of me. Lol. Certainly didn't mean to be confusing! Hy bring Lisp to Python. I was more interested in making a Lisp that had trivial similarities to Python like using some of the same keywords. A related interested of mine is converting

What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-14 Thread Christian Seberino
Python is my goto main language. However, sometimes I'm tempted to play with a Lisp like language just for fun. Clojure looks pretty solid but its syntax is different than Python's. Since Lisp's make it so easy to modify the language, what about the idea of developing a few macros to make a

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
On Friday, June 14, 2019 at 1:42:17 PM UTC-5, Rob Gaddi wrote: > Condolences. TI is a world-leader in giving every eval board its own > complicated, proprietary digital interface, then not documenting it > because "You can just use the provided software" that hasn't been > updated since 2001

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
> Out of curiosity, what hardware? Texas Instruments ADS1675REF card -- https://mail.python.org/mailman/listinfo/python-list

Re: How control a GUI for an unrelated application from a Python script?

2019-06-14 Thread Christian Seberino
Thanks for all the help. I'll definitely try to bypass the GUI first if possible. This is on Windows 7 so maybe AutoIt will do the trick if can't avoid the GUI. Thanks again everyone. -- https://mail.python.org/mailman/listinfo/python-list

How control a GUI for an unrelated application from a Python script?

2019-06-13 Thread Christian Seberino
I have a third party GUI that manages some hardware. I want to control the hardware from a Python script. This seems to mean I need to somehow have Python code that imitates a human doing the necessary actions on the GUI (selecting menu options, pressing buttons, etc.) Is this possible /

Re: Why this curl command works in shell but NOT when I do subprocess.getoutput(["curl", .....]) ??

2019-02-16 Thread Christian Seberino
Nevermind...appears to get arguments like this you need to use subprocess.run rather than subprocess.getoutput (with capture_output = True). cs -- https://mail.python.org/mailman/listinfo/python-list

Why this curl command works in shell but NOT when I do subprocess.getoutput(["curl", .....]) ??

2019-02-16 Thread Christian Seberino
Why this curl command works in shell but NOT when I use subprocess as in below?. UL_URL = "https://auphonic.com/api/simple/productions.json; ul_output = subprocess.getoutput(["curl", "-X", "POST",

Re: Question about slight deviations when using integer division with large integers.

2018-12-31 Thread Christian Seberino
Thanks to all who helped. As was previously pointed out, many other languages use truncation rather than rounding for // division. Getting the behavior you want may be as easy as replacing // with the int() function >>> x = 9 ; y = 2 >>> x // y, -x // y, (-x) // y (4, -5, -5) >>> int(x /

Re: Question about slight deviations when using integer division with large integers.

2018-12-31 Thread Christian Seberino
to be like Java? On Sun, Dec 30, 2018 at 11:24 PM Cameron Simpson wrote: > On 30Dec2018 21:14, Christian Seberino wrote: > >What is simplest way to make both those > >prints give same values? Any slicker way > >than an if statement? > > If your post had an attachment, be

Question about slight deviations when using integer division with large integers.

2018-12-31 Thread Christian Seberino
Why are the following two similar prints slightly different and how fix? >>> x = 0x739ad43ed636 >>> print(x + (-x) // 2048) 127046758190683 >>> print(x - x // 2048) 127046758190684 I'm working in an area where such deviations matter. It would nice to understand what is happening. Any help

Re: Question about slight deviations when using integer division with large integers.

2018-12-30 Thread Christian Seberino
What is simplest way to make both those prints give same values? Any slicker way than an if statement? -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about slight deviations when using integer division with large integers.

2018-12-30 Thread Christian Seberino
Perhaps the "secret" is *not* do integer division with negative numbers? -- https://mail.python.org/mailman/listinfo/python-list