Close

Hack Chat Transcript, Part 2

A event log for Parallax Update Hack Chat

Beyond the BASICs

lutetiumLutetium 08/28/2019 at 20:040 Comments

Chip Gracey12:29 PM
@IRC, no, SD boot would take longer. I'm talking about an 8-pin serial Flash.

IRC12:29 PM
[Kamilion] normal old SPI NOR, winbond 4-bit style.

IRC12:29 PM
[Kamilion] Gotcha.

Ken Gracey (Parallax)12:29 PM
Hey @Joshua Donelson so good to see you here. Initial languages most likely: Spin2, MicroPython. BlocklyProp not determined. C a possibility for our development (required to get Python). This sausage is still getting made, on the Forums, within Parallax and by all of you.

IRC12:30 PM
[Kamilion] yeah, right now micropython is running on top of a RISCV ISA simulator (and still rediculously fast)

IRC12:30 PM
[Kamilion] i think someone else was working on a native port as well

Jeff Martin (Parallax)12:30 PM
@Joshua - We are encouraged by all the forum interest in getting other languages implemented. MicroPython, Spin, C. We haven't decided yet when we'll implement Blockly and what language(s) it will generate.

pvoss12:31 PM
Yes, P1 reliably runs at -40C/-40F. I believe I had a P1 payload operating down to -50C once, but will need to check. The lipo batteries really die at these temps, so likely the P1 was not the issue when the payload stopped transmitting.

Chip Gracey12:31 PM
The P2 has deep debugging hooks, so I look forward to making a very fast Spin2 compiler (hit the key and your code is running 100ms later), with a really thorough and interactive debugger. The more you can quickly see and interact with your code, the better stuff you can make.

David Carrier12:31 PM
When start-up time is critical, it would be pretty easy to chain load from flash to an SD card, and do timing-critical initiation from flash, while the SD card code is booting in another cog.

JDat12:31 PM
to solve motor driver problem while booting, use external pullup or pulldown resistors. Yes it is assitional complexy to schematics, but safety first! On any MCU. P2 can work in two stage bootloading. Boot quickly minimal code from EEPROM and set-up safety. Then boot from SD card.

Joshua Donelson12:31 PM
@Ken Gracey (Parallax) Thanks, that is a great way to do it.

JDat12:31 PM
Like in good old P1 times.

IRC12:32 PM
[Kamilion] JDat: the start up delay comment was more about FPGAs requiring time to load the bitstream before being ready to rumble; just so we're crystal

James Newton12:32 PM
@JDat what happens is that users don't understand the need for bootup time and fail to include those pull resistors. Of course they should... but people don't always.

Joshua Donelson12:33 PM
@Jeff Martin (Parallax) Personally I like the text programming methods over the graphics style, so Spin, C, Python are all good with me. :)

Yann Guidon / YGDES12:33 PM
Antifuse or Flash-based FPGA (from ex-Actel) have no startup time problems :)

IRC12:33 PM
[Kamilion] yeah, my personal preference is using the micropython REPL to live-code

JDat12:33 PM
in FPGA/CPLD it can be solved with zero boot time models

Chip Gracey12:34 PM
Text programming is hard to beat, once you know what you're doing. It's amazing how much can be expressed compactly with 7-bit ASCII.

David Carrier12:34 PM
We have BLDC servo motor drive in our to-do list, so it could just be a matter of implementing our reference design and having the FET drivers connected straight to I/O pins.

Ken Gracey (Parallax)12:35 PM
Interested to know if all of you see Python for P2 as primarily intended for an educational audience, or for commercial product development? Of course, you may ask "but what other languages could I choose from?" But I ask primarily about the role of MicroPython and P2, based on what you know, think, prefer.

Kamilion12:35 PM

IRC12:35 PM
[Kamilion] kbIDE's been getting a lot better recently.

hologram7012:36 PM
I have lots of programs written in PropC ... will they run on P2 ?

IRC12:36 PM
[Kamilion] Generally, I'm happy with micropython as long as _thread is available. I use it heavily on the ESP32 and IMXRT1062

dyee-go-bears joined  the room.12:36 PM

Boian Mitov12:36 PM

IRC12:36 PM
[Kamilion] @hologram70: I think Catalina should be able to rebuild for P2 without much of an issue.

Boian Mitov12:37 PM
Would be interesting if the Propeller can be supported by Visuino ;-)

IRC12:37 PM
[Kamilion] it *CAN* be, of course, but is anyone willing to actually go define the blocks for it?

James Newton12:38 PM
I'm personally avoiding all thing Python. It strikes me as todays BASIC and I think it will (as BASIC did) mislead a lot of young programmers into poor practices / misunderstandings about what's actually going on inside. Y'all will laugh, but I think people who want to program for a living should learn from digital logic, to asm, to C, and then maybe JavaScript or some other commonly used language. People who will NOT be programmers and just want to dick around with code should use Python.

Jeff Martin (Parallax)12:38 PM
@hologram70 - Forum user ntosme2 indicated he's working on GCC for P2.

Boian Mitov12:38 PM
@James Newton +1

Boian Mitov12:38 PM
100% agree with you @James Newton

dyee-go-bears12:39 PM
I'm a fan of C programming using 7-bit ASCII. We saw a presentation from the PART team (Placer robotics) and they're doing their codng in C++. Just sayin', in case there's an argument for appealing to high school-level robotics programmer usage of P2.

IRC12:39 PM
[Kamilion] should be noted though, GCC's had huge flux since the 4.x/5.x era... It may take some time before GCC7/GCC8 patches have the bugs shaken out.

Ken Gracey (Parallax)12:39 PM
@James Newton that's me. NOT a programmer by function, but I feel incredibly productive with blocks, Python and BASIC.

mike.calyer12:39 PM
100 % disagree , python is useful

Jeff Martin (Parallax)12:39 PM
@James Newton - I think they'll always be a need for the right tool for the right job... and the right tool handler...

Boian Mitov12:40 PM
@Ken Gracey (Parallax) Curious if you have tried Visuino ?

JDat12:40 PM
Funny story with programming languages: I programmed SPIN code for barometric pressure sensor (up to 48 bit mathematic to compensate thermal error).

James Newton12:40 PM
Learning logic isn't as hard as it used to be, especialy with fantastic sites like:

http://nandgame.com/

JDat12:40 PM
One goy translated my spin code to python...

IRC12:40 PM
[Kamilion] @James Newton: Only thing that's really an issue with python is that they made one mistake: Not everything is an object. Perl figured that out long ago, python3's still stuck.

JDat12:40 PM
next guy translated python to arduino C/C++

James Newton12:40 PM
As I said, if your not going to be a programmer by trade, Python is fine. Just copy paste, adjust, and you can get "somthing" working quickly.

anfractuosity12:41 PM
what scripting languages do you prefer?

JDat12:41 PM
why da hech barometer stopped to work on arduino? :D

Ken Gracey (Parallax)12:41 PM
@Boian Mitov no, not yet. I'm going to look at Visuino and kbIDE after reading this, though.

James Newton12:41 PM
Perl and javascript are excellent.

anfractuosity12:41 PM
why is javascript excellent

Boian Mitov12:41 PM
JS is probably as good as it can get for scripting

James Newton12:41 PM
"everythings an object" (or almost everything).

pvoss12:42 PM
Personally I really like spin but Python is a great way to go for education market. All the engineering as cs students at Smith (where I teach) are learning Python these days. I really value having access to a local (non-cloud) compiler, even if it is simplistic. Currently I use the Propeller Tool in Windows and increasingly Propeller IDE with Ubuntu..

anfractuosity12:42 PM
hmm, not sure i get that, python has far more useful libraries implemented in it than JS imo

Jeff Martin (Parallax)12:42 PM
Chip - tell us some features of the P2 you're really excited about.

Chip Gracey12:42 PM
Of late, I got a drum kit from a musician friend here. It's a lot of fun to play drums. It really stretches your lymbic independence and you can experience new abilities wiring up in your brain over minutes and days. This is kind of how I see programming ought to be - really allowing new things to form up. It's a lot of fun. This video (maybe watch later) demonstrates the feeling of how I want P2 programming to be:

James Newton12:43 PM
I'm sad people moved away from Perl. Where else can you "open file or die" or "print "hello" if ready" or embed a regexp and really confuse yourself? LOL. I wish there was a micro version of JavaScript like microPython. Then there would be "one language to rule them all". ,o)

Chip Gracey12:44 PM
@jeff, new features that I'm enthused about.... All the ADC functions with SINC2 and SINC3 filtering, Goertzel input with SINC2, Scope pin modes, the CORDIC solver. All together, it's going to be a blast.

Yann Guidon / YGDES12:44 PM
microJS ? I'd use it :-D

Agreed. I miss Perl poetry

James Newton12:44 PM
So @Chip Gracey do you want to comment on WHY it took so long to finish P2? Impossibly difficult? Distractions? Depressions? Abducted by Aliens?

Yann Guidon / YGDES12:44 PM
CORDIC ? :)

Frank Buss12:44 PM
best language is APL, but only with the special APL keyboard

anfractuosity12:45 PM
haha

Joshua Donelson12:46 PM
Has to be alien abduction, only logical option :)

Chip Gracey12:46 PM
@james, it was a bit of everything. My dad asked me a few years ago if I'd like to just quit it. I had thought about it, but it kind of has been a force of its own. If all the work that's gone into could be made manifest in the physical, I think there'd be a spaceship.

James Newton12:46 PM
Sounds like the ADC stuff will allow the P2 to be a serious DSP tool?

Jeff Martin (Parallax)12:46 PM
I think the way of the future is real-time responsive programming. I mean, the users does something and gets immediate feedback (no crazy long compilation + downloading delay). Then, you can see the results of your actions and learn from them intrinsically. REPL systems are close to this, but I mean something with more visual feedback. Many great things have been invented by accident when something unexpected was noticed... the same kind of thing can occur if users had immediate feedback, always, while programming.

James Newton12:48 PM
@Chip Gracey I understand exactly how certain ideas / projects can become their own entities. Almost freestanding from the developer. Sometimes they become the villain of the story. I've been tortured by a few and had to escape. But I'm always drawn back eventually.

Jeff Martin (Parallax)12:48 PM
@Yann Guidon / YGDES - https://en.wikipedia.org/wiki/CORDIC

Boian Mitov12:48 PM
I personally believe that traditional coding will become obsolete, and replaced by dataflow based programming languages, but that's me... ;-)

Chip Gracey12:48 PM
@james, a lot of what's in the P2 is way beyond what I could ever come up with. People on the forum have had huge effects on the direction of the project.

James Newton12:49 PM
@Jeff Martin (Parallax) That's one of the things I love about digital logic: Poking it and seeing what happens instantly.

Yann Guidon / YGDES12:49 PM
Jeff : yes I know, it's awesome to have it :-) I try to understand https://en.wikipedia.org/wiki/BKM_algorithm

David Carrier12:49 PM
One of my favorite programming interfaces that I learned on was the HP graphing calculator, because each program was a file that could be opened and edited right there on the device, despite only having 32 KB of RAM.

Boian Mitov12:50 PM
Traditional programming languages are by definition not well suited for multicore, parallel processing of FPGA programming, since they tend to be sequential by nature

Jeff Martin (Parallax)12:51 PM
@James Newton - Yes! We need to make programming like that; like toys are to kids, where you can see all the parts and learn how it works by touching it, manipulating it, and it some cases, pulling it apart and reconfiguring it.

Chip Gracey12:51 PM
Yeah, there needs to be some new way of doing things. Jeff and I have been thinking about the matter for years. It's like we would recognize it if we saw it, but we can't invent it.

Jerry Hubbell joined  the room.12:51 PM

Boian Mitov12:51 PM
I mean... come on people... we still program the same way we did 200 years ago, when Ada Lovelace was coding for mechanical beats...

James Newton12:51 PM
@Chip Gracey Hey... can you do a quick ATAN2 on the P2? Might be good for reading the weird encoders on the Dexter robot.

Boian Mitov12:51 PM
Well.. take a look at Visuino ;-)

Yann Guidon / YGDES12:51 PM
interactive graphical programming : i've been dreaming about it for more than 20 years :-D

Boian Mitov12:51 PM
It is a new way of programming

Boian Mitov12:52 PM
@Yann Guidon / YGDES Visuino does it :-)

Ken Gracey (Parallax)12:52 PM
@Boian Mitov I don't know what a dataflow language is but will research. I like visual programming languages. The use of BlocklyProp for P1 has really helped many visualize the use of multiple cores graphically, letting them do impressive stuff. I've seen how much teachers (and we've taught 10K of them) achieve results quickly. Maybe we're not close to the hardware, but we're also not making products - more like learning to think programmatically. So, I'm a blockhead.

Boian Mitov12:52 PM
And OpenWire Studio if you are really into interactive :-)

Chip Gracey12:52 PM
@james, yes the CORDIC can do a 32-bit quality ATAN2, converting (X,Y) into (rho,theta).

Boian Mitov12:52 PM
Blocky is not dataflow

James Newton12:52 PM
@Jeff Martin (Parallax) I also have come to respect scratch (cough) I mean blockly, for it's ability to trigger a single block or a group and see what happens.

Boian Mitov12:52 PM
Blocky is traditional old school sequencial language

David Carrier12:53 PM
I program digital logic visually, every time I draw up a schematic, but the overhead seems to increase geometrically, as the design complexity increases linearly. Even still, I think schematic software is the best visual programming interface available.

Frank Buss12:53 PM
this is better than REPL, realtime interactive programming and evaluation:

Yann Guidon / YGDES12:53 PM
dataflow graph programming... i'd love to have a graphical interface to the compiler's Internal Representation, without all the language specific fluff

James Newton12:53 PM
@Chip Gracey We need a low(er) cost solution for a human interface device that isn't as fast as the FPGA but can still return the more than a million points per revolution on our encoders. To be used for a human input device for remote control.

Boian Mitov12:53 PM
Visuino does exactly this

Boian Mitov12:54 PM
You have it @Chip Gracey :-) Already done :-)

Boian Mitov12:54 PM
You design the data flow... and it knows how to program it for you, and how to optimize the code to the extreme :-)

Jeff Martin (Parallax)12:55 PM
@Frank Buss - Yes, Bret Victor is a great inspireror. I want to make some of his ideas a reality on the P2.

Jac Goudsmit12:55 PM
I like how Atmel Start works: you select which

Discussions