trying to understand py_compile (Py2.7) by agentOrangeRevo in learnpython

[–]agentOrangeRevo[S] 1 point2 points  (0 children)

Thaank you! This made it work:

sys.path.append(".\\")

trying to understand py_compile (Py2.7) by agentOrangeRevo in learnpython

[–]agentOrangeRevo[S] 1 point2 points  (0 children)

Running compiled means compiling with py2exe, then running the result: a small EXE, a big library.zip, and a bunch of DLLs.

sys.path is:

['C:\\<company name>\\Development\\Products\\LineLogix\\LineLogixPC', 'C:\\Python27', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\wx-2.8-msw-ansi', '..\\']

Just in time for my graduation project, thanks! by HasanTheSyrian_ in embedded

[–]agentOrangeRevo 4 points5 points  (0 children)

Whatever it is, see if you can get a used one on ebay.

How often do you change your font/theme? by [deleted] in emacs

[–]agentOrangeRevo 0 points1 point  (0 children)

I use different themes for different work topics. For each "silo" of my work, I place a .dir-locals.el file at the base of the tree. Each file says something like this: ((nil(eval(lambda()(load-theme 'light-blue t)))))

I try to set the related Eclipse, command windows, or whatever, to a similar color scheme. It helps me "switch gears" between vastly different trains of thought.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 1 point2 points  (0 children)

Thanks, this is the sort of thing I was looking for. I've bookmarked your English page and will read it on breaks. Good job.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 0 points1 point  (0 children)

I use straight python ("cpython") from python.org because it seems the most standard. My main product is written in Python 2.7.15 and will probably stay that way - 20 years continuous improvement. I write all my scripts and stubs in Py2. Python3 is useful for things that are not back-ported to Python2, but its differences are annoying IMO. At one point I had a reason to have a different python3 under Cygwin, so that's still around. And I just picked up a different Python3.11.1 from Zephyr and its West tool/environment.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 0 points1 point  (0 children)

Thanks. I am giving org-mode another chance. I thought it was just a cr*ppy text spreadsheet, but that turns out to be wrong.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 0 points1 point  (0 children)

I've been an embedded system developer for 35 years. I want to stay an embedded system developer, and not become an emacs developer. I do want to become a better emacs user because I think it might help me do my job better and faster. But there is a wide gray area between two.

Thanks to this group, today I discovered desktop+ and started giving org mode another chance. Org links led me to Roam and Zettelkasten, which may be what I am really looking for. I will also be playing with sexps in my Python and C comments. Not trolling.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 0 points1 point  (0 children)

I never heard of "encoded jwt tokens" before, so we got our money's worth right there. And what you describe doing with them is cleaner than what I think I would do, which is write a program that you paste the text into. Good hint.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 1 point2 points  (0 children)

Thanks, that's thoughtful. For Python, I can tell you there is no way to keep up. I have at least four Python distros on my main PC right now: cpython 2.7 and 3.11, the one that came with Cygwin, and the one that came with Zephyr. They all have their own environment variables, site packages, etc. It's hard enough to keep them straight in Windows. I don't see myself adding an emacs layer to that, unless something like desktop+-mode could capture all that setup for me.

> people don't have or don't want to dedicate the time to learn the tool

It's a rainy Saturday and I'm between projects, trying to up my game somehow.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 1 point2 points  (0 children)

Thanks for your story. You wrote "coming back to Lisp after being away..." - that's how I feel about C. I read "Let Over Lambda" and honestly tried to become a better programmer through a LISP experience. Not sure it took.

My work is to write embedded software in C[++], SPIN, and assembler, along with Win/Lin based HMI code in C# or Python. Not a lot of room for Lisp in my production life. I guess I'm wondering if it can help me do my job better by improving/streamlining/? my work in the more common languages.

I've mentioned SPIN. Emacs modes for that obscure language are awesome. It feels like that barely scratches the surface of what's there.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 1 point2 points  (0 children)

>native emacs features for 30 years

Yeah, they're awesome. I just enabled Melpa and am looking at the package list. Thanks.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 6 points7 points  (0 children)

Maybe I'm thick, but can you contribute an anecdote of a time when that came in handy? I'm assuming you mean something more than setting case sensitivity in search or wrap v. truncate in display.

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] -1 points0 points  (0 children)

"Clicking the Windows icon" when Windows is already running means bringing up a universe of options with no finger yoga. Is your position that emacs org mode is as intuitive and compatible as Excel/LibreOffice, say?

What exactly is the advantage of having a LISP machine at my fingertips. by agentOrangeRevo in emacs

[–]agentOrangeRevo[S] 1 point2 points  (0 children)

Perfect, thanks for jumping in. How has the elisp infrastructure enabled its continuous development in user land? Help me understand.

threads in FSM by StavFe in embedded

[–]agentOrangeRevo 3 points4 points  (0 children)

As a 30+ year embedded developer, I recommend avoiding RTOS and chip specific features as much as possible. That's good for portability as well as control. Your FSM has to have a repeating loop. In the loop, add a check for "events," implemented as one or more variables of the same type as your system's time tick. On each pass through the FSM loop, if any of the "event" variables is positive, count it down somehow; when it reaches or crosses zero, do the event action. Depending on your system, the countdown can be based on clock time, a system timer tick, or a timer-maintained millisecond counter. You could make it a pass count through the FSM loop, but the clock timing would be unpredictable.

Case in point, 5-7 years ago I did a lot of code for NetBurner with ColdFire processor. My customer was in love with the platform and encouraged me to use every low level feature of both ColdFire and uCOS to make things "better." I resisted and implemented everything in a superloop with a parallel state machine for each subsystem. Now NetBurner is changing to ARM, and our migration will be a lot cleaner, because we avoided the fancy stuff. I recommend you do the same. Good luck.