Results 1 to 2 of 2

Thread: Seed7

  1. #1
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152

    Seed7

    Aurel first mentioned Seed7.

    http://seed7.sourceforge.net/

    It is based on the 1984 doctoral thesis of Thomas Mertes.

    http://seed7.sourceforge.net/links.htm

    I couldn't get it to work then.

    I forget why.

    Maybe there wasn't a Windows installer.

    There is now.

    From one of the examples,

    http://seed7.sourceforge.net/algorith/math.htm#compute_pi_bailey_borwein_plouffe

    it pops out 10,000 digits of pi instantly.

    (Actually, even on my computer, it pops out 50,000 digits almost instantly.)

    (The interpreter is called, "hi".)

    ' code -----------------------------------------------------------------------------------------------------------------------
    
    $ include "seed7_05.s7i";
      include "bigint.s7i";
      include "bigrat.s7i";
    
    # In 1997, David H. Bailey, Peter Borwein and Simon Plouffe published a
    # paper (Bailey, 1997) on a new formula for PI as an infinite series:
    
    # PI = sum_n_from_0_to_inf(16 ** (-n) *
    #      (4 / (8 * n + 1) - 2 / (8 * n + 4) - 1 / (8 * n + 5) - 1 / (8 * n + 6)))
    
    const func bigRational: compute_pi_bailey_borwein_plouffe is func
      result
        var bigRational: sum is 0_ / 1_;
      local
        var integer: n is 0;
        var bigInteger: k is 0_;
      begin
        for n range 0 to 825 do
          k := bigInteger conv n;
          sum +:= 1_ / 16_ ** n *
              (4_ / (8_ * k + 1_) - 2_ / (8_ * k + 4_) - 1_ / (8_ * k + 5_) - 1_ / (8_ * k + 6_));
        end for;
      end func;
    
     const proc: main is func
       begin
         writeln(compute_pi_bailey_borwein_plouffe digits 10000);
       end func;
     
     ' output ---------------------------------------------------------------------------------------------------------------------
    
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    C:\Program Files\Technology Lighthouse\PromptPal>cd "c:\users\root\desktop\seed
    
    c:\Users\root\Desktop\seed>hi borwein
    HI INTERPRETER Version 4.5.8824  Copyright (c) 1990-2011 Thomas Mertes
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105
    55964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259
    03600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952
    24737190702179860943702770539217176293176752384674818467669405132000568127145263560827785771342757789609173637178721468440901224953430146549585371050792279689258923542019956112129
    02196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766
    91473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989289664405317859226231528596600256731310641816824744046325349471794864721
    41303753470013872688197033766793463890336152452786491973190066683635714536040378390783498091800592441598339770172380726830191641791093439147930889898773944857201942551480321289108
    91131401408534894943881161652086874083733141709717213246116709799162668763476669816984862732555417654329217257396260232310975710396110783316493100831976203371493673685259802276812
    77999290241460155530910740992754591569223360109308560092559913024692642743151624311716247753408066004532802953082505619993275111853855438532668858622461815170698170412074539547971
    47598540290893525978218918616111721651005039611623953297462166520538751933653706570220212837908874632276051620715407186625287414950085421592059552279974940874025246247382424113241
    48351044174241705156599516463319670849758243361936524393823451735628191477508911693968412931985533255475674368531817009185171286296721793064830265021160353877759893013496894635647
    59005451060782021625451662218603246465563133646277495595018819095163852891618622652397537921214172419955994144630116563139981887190366070175713131951531572024578975484106731650832
    96782604590554881415186958751466346065046899342251314714168114257334192485657405779663481928290558219356677283052099973077898258337289559095363481713220544072665136121190956712059
    55673202857898116294058286118729494459448819657356727740098633688228007295867645778050953500340168470459116795530495804390882098268043772810043825006479143446796230478065699521842
    72834955039305468763165364880320656819350734190587866984593101304962478430288308697972462580331217917094524481671830231963983497883430713963541990708788370818843451738812888707605
    22079042951594476998027375096033529096577730553293289493470814685470109034763600543428814256263149822354275524625485000799550761706822708475112349972289852641473053332228496926596
    08888988207065003770146555597623765726347313000446846395213964881663405580344095903524512338980811019782294686557509041335815306610997015555004508509985561864475174127954319390637
    81082207735875478108812924783309404518143921194272020468453023329432537615634166073835357499580842920446732466654196972846040359929979917398623672440409491982669650724339228015991
    13548598436414490497572765776619050856687025469370503195146114399707065240788999554289474146507061846431701265557278486372261785005008493659320442561028205224229901581379246179937
    94440655480202104605647189394975828290891882609191335520917327131973643353910759689532727151914423324710534759280696917533938242630835147238164601441940702377466811081112487481297
    29756923169037153828727443110426938385069131205148176193356500898144057613439260880331963763919125125838814191565325977056947556443983053777538956109757445253541717951907330252896
    85975679080965342171505756945195918547003733668521477166407118999449477914004898605303235526330040431674594268367036877880559857039269238876871699692530020282574558925933907425693
    85094604088107703634484901291941402802114118941862145209075974396249074900842142532732085899751065408326388602322057377787163850367925306052555065143315880386520411389898714675677
    87426321351720046319620466542842931776398511384031927276122946382056434303179933323260049249647029843092561916554249177693926527538230849815162493405334767771374242458853920345392
    26750573116535582950337957490422227316756803680858586727241616903993575692118765269786455243179046481033808551454125220083697664054405923375295975308459647520627395801363257862994
    08942682146766574431342184944933990726450348093635633435758168452324324301789731221142799354263617910872310017694328279340423513500874527198031856603316939246669423584590862120410
    78297550549259541164586138527240112477332043949953714252889258920854566083176254241589500779250088313465737289425640836841431338852463629352280891158315695253981800511835564915389
    49293356777792280198756501355456303441092608958898979605930498456422581948724256078002487134247581373216306743850377525444160645149202662300187102258417246586174678598470410844530
    14052380852152317551354438889474337790094920126101439188723327382594737275316365075074096220515661689776055923450363885459955283151120149340681660894834190598510768432535049422316
    60526720016937753469133196498455225482198562207595678910030061115860708697258534249927574751608284168141535846684406042829949767803221183241597316386140014691928027011420243772271
    73648808355326732895179468340999939896312921589532173167440855950454364108098756835009350367867781132319398843782386491075150779872108701550948917555122007245145691724194279807750
    55669347031953134926468288432942523047733320106615493178845233982833509649752805465472635430684253320823466626511215559721293455478067387609463874458977890745504191964669348292842
    30260044100483073773706194542477435277789055754427991052823200711029732937332716039374716908983555290362363412643617761152940378769953046220521601103386179730235697558332681953577
    65197762644402674416393034323733764725504187269688585937546380764423951382665546651274996270241022714649340072357028413097140352518961952453378161909504462373675055908031182017823
    52559483267339882977288468720946101969699449561864473242937882298326878929610037766867201770786109804910625338134957929363897379663483199803801315700415144917426849482796227841247
    30394675271077391416545026221002087586552437875419616419880963276345335424860055025923173839058579633877005238560835417522169232003899736000143605248921384290252832039775223642589
    66345331452485802355417651498811672851429189565237821826227811673496778892425572148843244688387847623886503433557278857449078834696948782137312897408179710170813945082204774763536
    21766779298909774828928347415305783935909438184094637470725356998839335780992538302676032884762442668317855713109013334284606844134678688254473734488596328507331533628973366846640
    25444106856451875796321168426977667410373763113687855022165678548373564402998049982185079682986972623549434668835985609384305982175154450119482050396807679374742756937071915377617
    65278336444984092690264435444137092100867164589202090663503523918832813555711265281279322887879579184386759110232315346492885177714147270041742333301506793364650862068159606053150
    93886142399666034814142532238778009657966341871157922193197808417218842782607775426660202963411232015081321635175201891939815662174184021001297176039217014320258950394018464696240
    85654253276181670616816213898039575238968679954842720867577787119862271537261512188105734327153457536941365646956242869063115935123223295840333969604315402442755342365910602074040
    50748397247634701011496265887547821451096921653318511929624272180126735244930250628703152791133158927284905830510764782940796327176038490107438491288776654647047043494957366001636
    64309461662208253919787899654304730479772166302477489676712164788277209405435352530694608467773555540845871920501834460403322276547898820294069576872476348708997457351199256950797
    42498259410574902017227161999570295533546279011171493848671714078464523475143739160893482361435401492814909980812034174268149259533103242512274053369199469497705756908975930943062
    25490973710303355313773633980221987550563348221851285915518717846145200370894653328606379426021281784481624251344370189454827255272833325074566071621780504623536908403723408872884
    97541631945854911029522488731082478599029955315393648467026718388925282095249602468652342433878352001925760949737913436904947050789243866536145037712365188020251649515259333542168
    67595552893344941863953995308067815650798292196403257484053717929067886873607785488485472530521283000221867914501019299152127032879528658926425387260790884850570858410289823052400
    71414099435738899703200736439704143933358802902895918263930430038194040997374057461761304147247367420669138935554938026442092069745834637016486122871722842083386922553901911931781
    42829989056007336426199509560944546537745778127107088482945262135958214731938340870450014590030976561200370764928727934512262704531403349335358043610293522110875358865064794447849
    05976027890689397234446612053009593476238099368892880159177763285754011511904080008022590130803034564257183261481374417046220825199616717020364567901376029576556957857552786145690
    56844150879058751159016834912842960302945915478261851919907507974827781278477941628353244198269009500383362387435079250065585008716836222296618272165745220833775329185596502705368
    39421469515682960658870079777426941949538608670515197254041517505492021038612080241210222394652844905213193370083705073910125461047569978201393940886678154870814912785352865698998
    24693711750937799577233926942029996219690255828810623953215939631741507363204855667440231961014714754695186368232616201139889909560002529540236369564594619473274223733150820116852
    85963531763490586024958057802715162275718911033641686067479590594361938893763082808286360279197934428326709451899559247928135826829109299467406203899175910217809092117254804686599
    8855069220865021673727754317623676208768813324133565774426442712230520738388133874785422896589625358835333935515041614581378089845028799699706121045651217431
    
    c:\Users\root\Desktop\seed>
    
    Last edited by danbaron; 25-11-2011 at 13:08.
    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  2. #2
    Yes language is very good.
    I can say that i like syntax and OOP as option.
    I also ask once author why finally create windows version which
    you can run as normal windows exe and not always use
    command prompt.
    He tell me that he is not interested to much ????
    Big minus is you cannot load any kind of GUI... ???

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •