Shop OBEX P1 Docs P2 Docs Learn Events
Lament - Page 10 — Parallax Forums

Lament

17810121315

Comments

  • Heater.Heater. Posts: 21,230
    edited 2014-01-05 01:48
    pik33,

    Interesting stuff.

    I do agree that the Pi does not quite reach the goal of being as simple from the get go as the old 8 biters, like that Atari. Still, a lot of kids seem to be getting on with just fine.

    I would not say those old machines had an OS. Many of them fired up into BASIC which had rudimentary commands to save things to cassette tape for example.

    I also would not say that I have "overweight" libraries on my Pi. They are as big as they need to be to do what they have to do.
  • pik33pik33 Posts: 2,366
    edited 2014-01-05 05:38
    The 8-bit Atari has a real OS, with vectorized device drivers and independent of Basic.

    Long time ago I had an 8-bit Atari and RS-232 printer. I interfaced the printer with Atari joystick port - it was 2-directional port so I can used this as an output. Then I wrote a driver in asm and set "P:" device vector to it. Then all A-8bit programs could print with this printer using standard printer device calls.

    There are some predefined devices like "P:" and "Dn" but you can redefine them as described above. You can define your devices with unused letters, so there is an Ethernet device, realtime clock device, hard disk device, which was written by enthusiasts and all of them can be used by Atari programs with its standars OS calls. This is a simple, beautiful OS concept. And there is a DOS on top of it. The DOS defines filesystem and high level file operations. The Basic can run on top of it, so it has access to all DOS functions, or it can be used without it, and it then it can load and save from the cassette.
    Overweighted libraries... when I want to do something with 8-bit Atari, for example play a sound, I simply can write "SOUND a,b,c,d". If I need some more advanced sound,I can use some POKE x,y. When I want to make a sound with my PC, I have to import some library like SDL, then initialize it, then write a callback function... why??? And SDL is one of the simplest things available on PC... Or the Pi.
    I want to do something like this:
    mode 1024,768,60 fullscreen
    color 100,50,10
    plot 100,100
    draw 200,200
    circle 100,100,50
    soundfile 1, "d:sound.wav"
    play(1,1,100)
    

    Then I can say this machine is encouraging young people to program...
  • David BetzDavid Betz Posts: 14,516
    edited 2014-01-05 06:31
    pik33 wrote: »
    I want to do something like this:
    mode 1024,768,60 fullscreen
    color 100,50,10
    plot 100,100
    draw 200,200
    circle 100,100,50
    soundfile 1, "d:sound.wav"
    play(1,1,100)
    

    Then I can say this machine is encouraging young people to program...
    Doesn't OBC's Propeller Mini Computer have at least some of these features?
  • Heater.Heater. Posts: 21,230
    edited 2014-01-05 08:02
    pik33,

    Like you I do sometimes hanker for simpler times. Turn on machine, start typing code, run it. Done. And I do agree that was a wonderful way to get kids excited about the possibilities of computers when computers first became "personal". It was not not just kids either, my father was retired when he bought himself a TRS-80 and started to learn to program in BASIC back in the 1980's

    Of course such a system could be put together with a device like the Pi All that it needs is to replace the shell with "simple programming language of your choice" and have it drop straight into that on boot up. It would then be great to be abe to break out into to a more substantial linux system when you have learned a thing or two and start to push the boundaries of that language.

    I had thought that is the direction the Pi software would go but it's not quite there yet.
  • pik33pik33 Posts: 2,366
    edited 2014-01-05 09:04
    I am learning a Pi while waiting for the P2. We should think about making a P2 board "like a Pi". Instead of making a Linux for it, we can make it a Spin (Forth is much too exotic) machine programmable without any PC. Attach it to the keyboard and the monitor, boot it, got a prompt, program, run, play.

    P1 is simply too weak for this; to make something usable with P1, more of them have to be used. Like a Hive. And then the cost is too big and too expensive thing cannot become popular. The success of the Pi is its low price.

    The Pi is a good beast now, when it is reverse engineered and most of its GPU assembler is known, so making a "Basic like" machine from it is possible now, but the advantage of the Propeller2 is simple: 8 cogs and easy multiprocessing. You can write cognew in spin and there it is, your procedure is going in another cog. I haven't seen any other environment where multiprocessing is as simple as in the Propeller; I did a multiprocessing on the PC so I know the difference.
  • Heater.Heater. Posts: 21,230
    edited 2014-01-05 09:35
    pik33,

    Your vision of a "Turn it on and program in Spin" self hosted, stand alone machine is exactly what Chip has been dreaming of for some years. I'm sure that is why there is an emphasis on the graphics capability of the P2. Knowing Chip I would not be surprised if he wrote a Spin compiler for it in PASM.

    There are others around with similar visions, for example the Espruino ARM board that can be programmed in JavaScript directly and the MicroPython board which does the same for Python. I think they are great but one still needs a terminal or terminal program to interact with them. Hmmm...thinks "May be I should put together a VGA VT100 terminal on a P1 to do that so we can ditch the PC".

    You are spot on about the Props multi-processing.

    Edit: Not that I do know Chip exactly, but you know what I mean.
  • TubularTubular Posts: 4,702
    edited 2014-01-05 17:43
    pik33 wrote: »
    I am learning a Pi while waiting for the P2. We should think about making a P2 board "like a Pi". Instead of making a Linux for it, we can make it a Spin (Forth is much too exotic) machine programmable without any PC. Attach it to the keyboard and the monitor, boot it, got a prompt, program, run, play.

    Pik33, didn't I read somewhere you had a DE2-115? Have you had a chance to run the P2 emulation on it?

    It's very worthwhile and a whole lot of fun to program
  • pik33pik33 Posts: 2,366
    edited 2014-01-05 23:11
    I have no Propplug. If there is a way to program emulated P2 without it I will try this.. but no sooner than in February. I have too much work to do now and DE2-115, Pi and Quickstart are now lying here packed in antistatic boxes and waiting until I finish all these computations I have to do and pass all exams I have to pass.
  • rjo__rjo__ Posts: 2,114
    edited 2014-01-06 12:00
    Chip,

    Not exactly a double blind experiment… but I had exactly 2.3oz of 90proof, mixed with apple cider. This produced a very warm, fuzzy feeling. I then went back to your simple NTSC example and
    again tried to make it multi-threaded. No luck.

    Today, I lament my decision.

    Rich
  • John AbshierJohn Abshier Posts: 1,116
    edited 2014-05-16 14:00
    First post edited.

    John Abshier
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-05-16 17:15
    First post edited.

    John Abshier

    Almost a year to the day and still they are talking about it :) ...... :(:(:(
  • koehlerkoehler Posts: 598
    edited 2014-05-16 17:18
    I was going to post something like that, however I wasn't sure if it would be seen as an attack on Chip, which isn't fair.

    This is why the hated Project Managers are a necessary evil.

    We are now on the second iteration of the P2 since we hit the 5W debacle.

    And for a 'feature' that wasn't pushed for by actual customers (that means revenue generating ones).

    So much for the stated promise of focusing on the now, and looking to the future revisions for "+" feature inclusion.

    Much longer and the P2 will beat Duke Nukem for longest sequel development in history :)
  • David BetzDavid Betz Posts: 14,516
    edited 2014-05-16 17:31
    Almost a year to the day and still they are talking about it :) ...... :(:(:(
    I'm just crossing my fingers that my favorite instruction makes the cut. Just think how useful the "LISPEX" instruction will be. It will compile and execute Lisp code at the SRC address and return the result in the DST register all in a single clock!
  • RossHRossH Posts: 5,462
    edited 2014-05-16 18:17
    David Betz wrote: »
    I'm just crossing my fingers that my favorite instruction makes the cut. Just think how useful the "LISPEXEC" instruction will be. It will compile and execute Lisp code at the SRC address and return the result in the DST register all in a single clock!

    Yes, that would be great!

    I'm still holding out for a HALTP instruction. This instruction would set the DST register to 1 if the program at the SRC address would ever terminate if executed, or 0 if that program would run forever. I'm not sure even Chip could do this in one clock cycle, but as long as it was any finite number it would still be pretty useful.

    Ross.
  • potatoheadpotatohead Posts: 10,261
    edited 2014-05-16 18:37
    What second iteration?
  • Heater.Heater. Posts: 21,230
    edited 2014-05-16 19:45
    @Ross,

    Cool.

    HALTP would be very useful to newbies for checking their programs for crashes and hangs.

    But how would we use HALTP? I don't seem to be able to get this subroutine to work in my simulator.
    HALTING     HALTP  RESULT, #HALTING WR    ' Write 1 if the subroutine HALTING ...
                                              ' ... returns else 0
                JNZ    #HALTING               ' Loop if 1 (terminate)
    HALTING_RET RET
    
    
    RESULT  LONG  0
    

    @David,

    Also cool.

    But shouldn't "LISPEX" be "EVAL".

    Of course I'd rather EVAL worked on JavaScript source. Newbies would handle it more easily.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-05-16 19:56
    Heater. wrote: »
    @David,

    Also cool.

    But shouldn't "LISPEX" be "EVAL".

    Of course I'd rather EVAL worked on JavaScript source. Newbies would handle it more easily.
    That's why it's called LISPEV. Maybe Chip will add your JSEV instruction as well. Or maybe we could use the CCCC bits to select the language and even support Forth and Spin!

    Edit: By the way, while I agree that JavaScript is a much more powerful language than people give it credit for being, it's also a kind of ugly language in some respects. Probably we should consider bringing back Apple's Dylan language.
  • RossHRossH Posts: 5,462
    edited 2014-05-16 20:09
    Heater. wrote: »
    But how would we use HALTP? I don't seem to be able to get this program to work in my simulator.

    You're using it correctly - you're just not waiting long enough. Chip is still trying to figure out exactly how many clock cycles this instruction actually takes.

    Ross.
  • Heater.Heater. Posts: 21,230
    edited 2014-05-16 20:10
    David,
    ...it's also a kind of ugly language in some respects.
    Ooops, language war alert !

    Ugly? Please do elaborate over here:
    http://forums.parallax.com/showthread.php/152201-The-Official-JavaScript-Religious-War-Thread.

    Seriously.
  • Heater.Heater. Posts: 21,230
    edited 2014-05-16 20:16
    Ross,
    You're using it correctly - you're just not waiting long enough.
    Sure I am. My simulator runs very fast. It's been evolved over millions of years, it's very compact as well, I have it balanced on the top of my neck.

    So, I simulated a run till the end of time and still got the wrong answer:)

    No mater how I implement HALTP I can't get that subroutine to work. But I trust in Chip, he's a smart guy and will make a better job of it.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-05-16 20:29
    Heater. wrote: »
    David,

    Ooops, language war alert !

    Ugly? Please do elaborate over here:
    http://forums.parallax.com/showthread.php/152201-The-Official-JavaScript-Religious-War-Thread.

    Seriously.
    I'm afraid I don't have the energey for language wars. I take back my statement. JavaScript is the most elegant language ever concieved. So is every other language except BF. Darn! There I am starting a language again. Ugh.
  • RossHRossH Posts: 5,462
    edited 2014-05-16 20:29
    Heater. wrote: »
    No mater how I implement HALTP I can't get that subroutine to work. But I trust in Chip, he's a smart guy and will make a better job of it.

    It's the power consumption of the HALTP instruction that really worries me. I mean, having a working HALTP instruction is all well and good (and if anyone can do it then Chip can) - but would anyone really buy such a chip if it needed a whopping 5W?

    I think not!

    Ross.
  • potatoheadpotatohead Posts: 10,261
    edited 2014-05-16 20:33
    Well the power draw is one worry, but so is the probability drain! Transcendent execution units literally consume a bit of the deterministic future to deliver a result now! Run 'em too much, and the chaos balance shifts, creating excessive and difficult to resolve future problems!

    I swear, there should be a complete, temporal ban on even thinking about it.
  • Heater.Heater. Posts: 21,230
    edited 2014-05-16 20:40
    @David,
    I'm afraid I don't have the energey for language wars.
    No worries, you don't need any energy. Just lob your "js is ugly" hand grenade into the fox hole and retreat:)

    @Ross,
    I think your HALTP instruction idea is a stroke a genius.

    You see, what you have done is transform a problem normally stated in terms of software (programs) and as a part of Computer Science into a simple hardware problem that the engineers can fix:)

    Future generations of CS students will forever thank you for removing that topic from the syllabus.
  • Heater.Heater. Posts: 21,230
    edited 2014-05-16 20:43
    potatohead,

    Doesn't SNAPCNT correct for the chaos balance shifts?


  • potatoheadpotatohead Posts: 10,261
    edited 2014-05-16 20:44
    Only at the cost of future determinism!

    The more you think about it, the more you need it and the more you need it, the more you use it and the more you use it the more you need to think about it...
  • RossHRossH Posts: 5,462
    edited 2014-05-16 20:45
    potatohead wrote: »
    Well the power draw is one worry, but so is the probability drain! Transcendent execution units literally consume a bit of the deterministic future to deliver a result now! Run 'em too much, and the chaos balance shifts, creating excessive and difficult to resolve future problems!

    Yes, this is definitely a drawback of HALTP - If we draw down on future determinism now, we are actually increasing the entropy of the future universe faster - effectively shortening the life of the universe as a result.

    In fact, I've just done a quick calculation, and if Parallax sells as many of these new chip as they are currently forecasting, the universe would effectively end around 2017.

    Still - think of all the cool stuff we could do in the meantime! "Live for today" is my motto!
  • potatoheadpotatohead Posts: 10,261
    edited 2014-05-16 20:47
    Indeed!

    You guys Douglas Adams fans by chance?

    Of course, the naysayers would argue it's an awful big universe, and it's expanding. Never mind the little detail of the mere fabric of it expanding, just that it's BIGGER! To them, it means wait long enough and the problems just go away. Literally!
  • RossHRossH Posts: 5,462
    edited 2014-05-16 20:52
    potatohead wrote: »

    You guys Douglas Adams fans by chance?
    Of course!
    potatohead wrote: »
    Of course, the naysayers would argue it's an awful big universe, and it's expanding. Never mind the little detail of the mere fabric of it expanding, just that it's BIGGER! To them, it means wait long enough and the problems just go away. Literally!
    Meh! The size of the universe isn't everything - it's what you do with it that counts!

    Ross.
  • Heater.Heater. Posts: 21,230
    edited 2014-05-16 21:01
    @potatohead,

    Yep, ever since the first episode of H2G2 on BBC Radio 4 in 1978. If you have not heard that radio series try and find a copy some place.

    @Ross,

    What if we borrowed the determinism from some parallel universe instead of the future of this one?

    With such entropy reduction techniques we could extend the life of this universe indefinitely. Or at least until the P2 is released.
Sign In or Register to comment.