NEWS 461 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399
  1. Guile NEWS --- history of user-visible changes.
  2. Copyright (C) 1996-2016 Free Software Foundation, Inc.
  3. See the end for copying conditions.
  4. Please send Guile bug reports to bug-guile@gnu.org.
  5. Changes in 2.1.8 (changes since the 2.1.7 alpha release):
  6. * Notable changes
  7. ** Update to latest 2.0 changes
  8. Notable this includes the fix for CVE-2016-8606.
  9. ** GUILE_PROGS searches for versioned Guile
  10. The GUILE_PROGS autoconf macro can take a required version argument. As
  11. a new change, that version argument is additionally searched for as a
  12. suffix. For example, GUILE_PROGS(2.2) would look for guile-2.2,
  13. guile2.2, guile-2, guile2, and then guile. The found prefix is also
  14. applied to guild, guile-config, and the like. Thanks to Freja Nordsiek
  15. for this work.
  16. * Bug fixes
  17. ** Fix type inference when multiplying flonum with complex
  18. ** Fix build errors on macOS
  19. ** Fix make-polar signedness of zeros
  20. ** Fix backtraces in case-lambda with multiple cases
  21. ** Fix generic function dispatch with multiple arities
  22. ** Fix guild compile --to=cps
  23. ** Fix bogus strength reduction on (* -1 x)
  24. ** Relax some constraints for circular module dependencies
  25. ** Fix scm_with_guile for threads already known to libgc
  26. ** Better errors for keyword arguments missing values (foo #:bar)
  27. ** Various manual updates
  28. ** Use docstrings instead of comments for many core Guile functions
  29. ** Support truncate-file on string ports
  30. ** Getting output from R6RS string ports now truncates buffer
  31. ** Fix class-allocated GOOPS slots
  32. ** Fix tracing/breakpoints (broken in 2.2 since a long time!)
  33. ** `select' just returns instead of throwing exception on EINTR
  34. Previous changes in 2.1.x (changes since the 2.0.x series):
  35. * Notable changes
  36. ** Speed
  37. The biggest change in Guile 2.2 is a complete rewrite of its virtual
  38. machine and compiler internals. The result is faster startup time,
  39. better memory usage, and faster execution of user code. See the
  40. "Performance improvements" section below for more details.
  41. ** Better thread-safety
  42. This new release series takes the ABI-break opportunity to fix some
  43. interfaces that were difficult to use correctly from multiple threads.
  44. Notably, weak hash tables and ports are now transparently thread-safe.
  45. ** Better space-safety
  46. It used to be the case that, when calling a Scheme procedure, the
  47. procedure and arguments were always preserved against garbage
  48. collection. This is no longer the case; Guile is free to collect the
  49. procedure and arguments if they become unreachable, or to re-use their
  50. slots for other local variables. Guile still offers good-quality
  51. backtraces by determining the procedure being called from the
  52. instruction pointer instead of from the value in slot 0 of an
  53. application frame, and by using a live variable map that allows the
  54. debugger to know which locals are live at all points in a frame.
  55. ** Off-main-thread finalization
  56. Following Guile 2.0.6's change to invoke finalizers via asyncs, Guile
  57. 2.2 takes the additional step of invoking finalizers from a dedicated
  58. finalizer thread, if threads are enabled. This avoids concurrency
  59. issues between finalizers and application code, and also speeds up
  60. finalization. If your application's finalizers are not robust to the
  61. presence of threads, see "Foreign Objects" in the manual for information
  62. on how to disable automatic finalization and instead run finalizers
  63. manually.
  64. ** Better locale support in Guile scripts
  65. When Guile is invoked directly, either from the command line or via a
  66. hash-bang line (e.g. "#!/usr/bin/guile"), it now installs the current
  67. locale via a call to `(setlocale LC_ALL "")'. For users with a unicode
  68. locale, this makes all ports unicode-capable by default, without the
  69. need to call `setlocale' in your program. This behavior may be
  70. controlled via the GUILE_INSTALL_LOCALE environment variable; see the
  71. manual for more.
  72. ** Complete Emacs-compatible Elisp implementation
  73. Thanks to the work of BT Templeton, Guile's Elisp implementation is now
  74. fully Emacs-compatible, implementing all of Elisp's features and quirks
  75. in the same way as the editor we know and love.
  76. ** Dynamically expandable stacks
  77. Instead of allocating fixed stack sizes for running Scheme code, Guile
  78. now starts off each thread with only one page of stack, and expands and
  79. shrinks it dynamically as needed. Guile will throw an exception for
  80. stack overflows if growing the stack fails. It is also possible to
  81. impose a stack limit during the extent of a function call. See "Stack
  82. Overflow" in the manual, for more.
  83. This change allows users to write programs that use the stack as a data
  84. structure for pending computations, as it was meant to be, without
  85. reifying that data out to the heap. Where you would previously make a
  86. loop that collect its results in reverse order only to re-reverse them
  87. at the end, now you can just recurse without worrying about stack
  88. overflows.
  89. Using the stack also allows more code to be continuation-safe. For
  90. example, returning multiple times from a `map' procedure in Guile 2.0
  91. would change the value of previously returned result lists, because
  92. `map' built its result list in reverse order then used `reverse!' to
  93. return the proper result. Now in Guile 2.2, `map' is implemented using
  94. straightforward recursion, which eliminates this bug while maintaining
  95. good performance as well as good space complexity.
  96. ** Out-of-memory improvements
  97. Instead of aborting, failures to allocate memory will now raise an
  98. unwind-only `out-of-memory' exception, and cause the corresponding
  99. `catch' expression to run garbage collection in order to free up memory.
  100. ** GOOPS core reimplemented in Scheme
  101. Guile's object orientation system, GOOPS, has been mostly reimplemented
  102. in Scheme. This decreases its maintenance burden on the rest of Guile,
  103. while also makes it possible to implement new features in the future,
  104. such as method combinations or `eqv?' specializers.
  105. ** Better handling of GUILE_LOAD_COMPILED_PATH
  106. It used to be that Guile would stop at the first .go file it found in
  107. the GUILE_LOAD_COMPILED_PATH. If that file turned out to be out of
  108. date, then no .go file would be loaded. Now Guile will continue to
  109. search the path for a file which is both present and up-to-date, with
  110. respect to the .scm file.
  111. ** C99 required
  112. Following Emacs, you must use a C99-capable compiler when building
  113. Guile. In the future we also expect require C99 to use Guile's C
  114. interface, at least for `stdint' support.
  115. ** Lightweight pre-emptive threading primitives
  116. The compiler now inserts special "handle-interrupts" opcodes before each
  117. call, return, and loop back-edge. This allows the user to interrupt any
  118. computation and to accurately profile code using interrupts. It used to
  119. be that interrupts were run by calling a C function from the VM; now
  120. interrupt thunks are run directly from the VM. This allows interrupts
  121. to save a delimited continuation and, if the continuation was
  122. established from the same VM invocation (the usual restriction), that
  123. continuation can then be resumed. In this way users can implement
  124. lightweight pre-emptive threading facilities.
  125. ** with-dynamic-state in VM
  126. Similarly, `with-dynamic-state' no longer recurses out of the VM,
  127. allowing captured delimited continuations that include a
  128. `with-dynamic-state' invocation to be resumed. This is a precondition
  129. to allow lightweight threading libraries to establish a dynamic state
  130. per thread.
  131. ** cancel-thread uses asynchronous interrupts, not pthread_cancel
  132. See "Asyncs" in the manual, for more on asynchronous interrupts.
  133. * Performance improvements
  134. ** Faster programs via new virtual machine
  135. Guile now compiles programs to instructions for a new virtual machine.
  136. The new virtual machine's instructions can address their source and
  137. destination operands by "name" (slot). This makes access to named
  138. temporary values much faster than in Guile 2.0, and removes a lot of
  139. value-shuffling that the old virtual machine had to do. The end result
  140. is that loop-heavy code can be two or three times as fast with Guile 2.2
  141. as in 2.0. Your mileage may vary, of course; see "A Virtual Machine for
  142. Guile" in the manual for the nitties and the gritties.
  143. ** Better startup time, memory usage with ELF object file format
  144. Guile now uses the standard ELF format for its compiled code. (Guile
  145. has its own loader and linker, so this does not imply a dependency on
  146. any particular platform's ELF toolchain.) The benefit is that Guile is
  147. now able to statically allocate more data in the object files. ELF also
  148. enables more sharing of data between processes, and decreases startup
  149. time (about 40% faster than the already fast startup of the Guile 2.0
  150. series). Guile also uses DWARF for some of its debugging information.
  151. Much of the debugging information can be stripped from the object files
  152. as well. See "Object File Format" in the manual, for full details.
  153. ** Better optimizations via compiler rewrite
  154. Guile's compiler now uses a Continuation-Passing Style (CPS)
  155. intermediate language, allowing it to reason easily about temporary
  156. values and control flow. Examples of optimizations that this permits
  157. are optimal contification, optimal common subexpression elimination,
  158. dead code elimination, loop-invariant code motion, loop peeling, loop
  159. inversion, parallel moves with at most one temporary, allocation of
  160. stack slots using precise liveness information, unboxing of 64-bit
  161. integers and floating point values, and closure optimization. For more,
  162. see "Continuation-Passing Style" in the manual.
  163. ** Faster interpreter
  164. Combined with a number of optimizations to the interpreter itself,
  165. simply compiling `eval.scm' with the new compiler yields an interpreter
  166. that is consistently two or three times faster than the one in Guile
  167. 2.0.
  168. ** Allocation-free dynamic stack
  169. Guile now implements the dynamic stack with an actual stack instead of a
  170. list of heap objects, avoiding most allocation. This speeds up prompts,
  171. the `scm_dynwind_*' family of functions, fluids, and `dynamic-wind'.
  172. ** Optimized UTF-8 and Latin-1 ports, symbols, and strings
  173. Guile 2.2 is faster at reading and writing UTF-8 and Latin-1 strings
  174. from ports, and at converting symbols and strings to and from these
  175. encodings.
  176. ** Optimized hash functions
  177. Guile 2.2 now uses Bob Jenkins' `hashword2' (from his `lookup3.c') for
  178. its string hash, and Thomas Wang's integer hash function for `hashq' and
  179. `hashv'. These functions produce much better hash values across all
  180. available fixnum bits.
  181. ** Optimized generic array facility
  182. Thanks to work by Daniel Llorens, the generic array facility is much
  183. faster now, as it is internally better able to dispatch on the type of
  184. the underlying backing store.
  185. ** All ports are now buffered, can be targets of `setvbuf'
  186. See "Buffering" in the manual, for more. A port with a buffer size of 1
  187. is equivalent to an unbuffered port. Ports may set their default buffer
  188. sizes, and some ports (for example soft ports) are unbuffered by default
  189. for historical reasons.
  190. ** Mutexes are now faster under contention
  191. Guile implements its own mutexes, so that threads that are trying to
  192. acquire a mutex can be interrupted. These mutexes used to be quite
  193. inefficient when many threads were trying to acquire them, causing many
  194. spurious wakeups and contention. This has been fixed.
  195. * New interfaces
  196. ** New `cond-expand' feature: `guile-2.2'
  197. Use this feature if you need to check for Guile 2.2 from Scheme code.
  198. ** New predicate: `nil?'
  199. See "Nil" in the manual.
  200. ** New compiler modules
  201. Since the compiler was rewritten, there are new modules for the back-end
  202. of the compiler and the low-level loader and introspection interfaces.
  203. See the "Guile Implementation" chapter in the manual for all details.
  204. ** New functions: `scm_to_intptr_t', `scm_from_intptr_t'
  205. ** New functions: `scm_to_uintptr_t', `scm_from_uintptr_t'
  206. See "Integers" in the manual, for more.
  207. ** Add "tree" display mode for statprof.
  208. See the newly updated "Statprof" section of the manual, for more.
  209. ** Support for non-blocking I/O
  210. See "Non-Blocking I/O" in the manual, for more.
  211. ** Implement R6RS custom binary input/output ports
  212. See "Custom Ports" in the manual.
  213. ** Implement R6RS output-buffer-mode
  214. ** Implement R6RS bytevector->string, string->bytevector
  215. See "R6RS Transcoders" in the manual.
  216. ** `accept' now takes optional flags argument
  217. These flags can include `SOCK_NONBLOCK' and `SOCK_CLOEXEC', indicating
  218. options to apply to the returned socket, potentially removing the need
  219. for additional system calls to set these options. See "Network Sockets
  220. and Communication" in the manual, for more.
  221. ** Thread-safe atomic boxes (references)
  222. See "Atomics" in the manual.
  223. ** suspendable-continuation?
  224. This predicate returns true if the delimited continuation captured by
  225. aborting to a prompt would be able to be resumed. See "Prompt
  226. Primitives" in the manual for more.
  227. ** scm_c_prepare_to_wait_on_fd, scm_c_prepare_to_wait_on_cond,
  228. ** scm_c_wait_finished
  229. See "Interrupts" in the manual for more.
  230. ** File descriptor finalizers
  231. See "Ports and File Descriptors" in the manual.
  232. ** New inline functions: `scm_new_smob', `scm_new_double_smob'
  233. These can replace many uses of SCM_NEWSMOB, SCM_RETURN_NEWSMOB2, and the
  234. like. See XXX in the manual, for more.
  235. ** New low-level type accessors
  236. For more on `SCM_HAS_TYP7', `SCM_HAS_TYP7S', `SCM_HAS_TYP16', see XXX.
  237. `SCM_HEAP_OBJECT_P' is now an alias for the inscrutable `SCM_NIMP'.
  238. `SCM_UNPACK_POINTER' and `SCM_PACK_POINTER' are better-named versions of
  239. the old `SCM2PTR' and `PTR2SCM'. Also, `SCM_UNPACK_POINTER' yields a
  240. void*.
  241. ** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system
  242. ** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars'
  243. Use these instead of `scm_lfwrite'. See the new "Using Ports from C"
  244. section of the manual, for more.
  245. ** <standard-vtable>, standard-vtable-fields
  246. See "Structures" in the manual for more on these
  247. ** Convenience utilities for ports and strings.
  248. See XXX for more on `scm_from_port_string', `scm_from_port_stringn',
  249. `scm_to_port_string', and `scm_to_port_stringn'.
  250. ** New expressive PEG parser
  251. See "PEG Parsing" in the manual for more. Thanks to Michael Lucy for
  252. originally writing these, and to Noah Lavine for integration work.
  253. ** `make-stack' now also works on delimited continuations
  254. ** Better URI-reference support
  255. The `(web uri)' module now has interfaces for handling URI references,
  256. which might not have a scheme. The Location header of a web request or
  257. response is now a URI reference instead of a URI. Also,
  258. `request-absolute-uri' now has an optional default scheme argument. See
  259. "Web" in the manual for full details.
  260. ** formal-name->char, char->formal-name
  261. See "Characters", in the manual.
  262. * Incompatible changes
  263. ** ASCII is not ISO-8859-1
  264. In Guile 2.0, if a user set "ASCII" or "ANSI_X3.4-1968" as the encoding
  265. of a port, Guile would treat it as ISO-8859-1. While these encodings
  266. are the same for codepoints 0 to 127, ASCII does not extend past that
  267. range, whereas ISO-8859-1 goes up to 255. Guile 2.2 no longer treats
  268. ASCII as ISO-8859-1. This is likely to be a problem only if the user's
  269. locale is set to ASCII, and the user or a program writes non-ASCII
  270. codepoints to a port.
  271. ** Decoding errors do not advance the read pointer before erroring
  272. When the user sets a port's conversion strategy to "error", indicating
  273. that Guile should throw an error if it tries to read from a port whose
  274. incoming bytes are not valid for the port's encoding, it used to be that
  275. Guile would advance the read pointer past the bad bytes, and then throw
  276. an error. This would allow the following `read-char' invocation to
  277. proceed after the bad bytes. This behavior is incompatible with the
  278. final R6RS standard, and besides contravenes the user's intention to
  279. raise an error on bad input. Guile now raises an error without
  280. advancing the read pointer. To skip over a bad encoding, set the port
  281. conversion strategy to "substitute" and read a substitute character.
  282. ** Decoding errors with `substitute' strategy return U+FFFD
  283. It used to be that decoding errors with the `substitute' conversion
  284. strategy would replace the bad bytes with a `?' character. This has
  285. been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in
  286. accordance with the Unicode recommendations.
  287. ** API to define new port types from C has changed
  288. Guile's ports have been completely overhauled to allow Guile developers
  289. and eventually Guile users to write low-level input and output routines
  290. in Scheme. The new internals will eventually allow for user-space
  291. tasklets or green threads that suspend to a scheduler when they would
  292. cause blocking I/O, allowing users to write straightforward network
  293. services that parse their input and send their output as if it were
  294. blocking, while under the hood Guile can multiplex many active
  295. connections at once.
  296. At the same time, this change makes Guile's ports implementation much
  297. more maintainable, rationalizing the many legacy port internals and
  298. making sure that the abstractions between the user, Guile's core ports
  299. facility, and the port implementations result in a system that is as
  300. performant and expressive as possible.
  301. The interface to the user has no significant change, neither on the C
  302. side nor on the Scheme side. However this refactoring has changed the
  303. interface to the port implementor in an incompatible way. See the newly
  304. expanded "I/O Extensions" in the manual, for full details.
  305. *** Remove `scm_set_port_mark'
  306. Port mark functions have not been called since the switch to the BDW
  307. garbage collector.
  308. *** Remove `scm_set_port_equalp'
  309. Likewise port equal functions weren't being called. Given that ports
  310. have their own internal buffers, it doesn't make sense to hook them into
  311. equal? anyway.
  312. *** Remove `scm_set_port_free'
  313. It used to be that if an open port became unreachable, a special "free"
  314. function would be called instead of the "close" function. Now that the
  315. BDW-GC collector allows us to run arbitrary code in finalizers, we can
  316. simplify to just call "close" on the port and remove the separate free
  317. functions. Note that hooking into the garbage collector has some
  318. overhead. For that reason Guile exposes a new interface,
  319. `scm_set_port_needs_close_on_gc', allowing port implementations to
  320. indicate to Guile whether they need closing on GC or not.
  321. *** Remove `scm_set_port_end_input', `scm_set_port_flush'
  322. As buffering is handled by Guile itself, these functions which were to
  323. manage an implementation-side buffer are no longer needed.
  324. *** Change prototype of `scm_make_port_type'
  325. The `read' (renamed from `fill_input') and `write' functions now operate
  326. on bytevectors. Also the `mode_bits' argument now inplicitly includes
  327. SCM_OPN, so you don't need to include these.
  328. *** Change prototype of port `close' function
  329. The port close function now returns void.
  330. *** Port and port type data structures are now opaque
  331. Port type implementations should now use API to access port state.
  332. However, since the change to handle port buffering centrally, port type
  333. implementations rarely need to access unrelated port state.
  334. *** Port types are now `scm_t_port_type*', not a tc16 value
  335. `scm_make_port_type' now returns an opaque pointer, not a tc16.
  336. Relatedly, the limitation that there only be 256 port types has been
  337. lifted.
  338. ** String ports default to UTF-8
  339. Guile 2.0 would use the `%default-port-encoding' when creating string
  340. ports. This resulted in ports that could only accept a subset of valid
  341. characters, which was surprising to users. Now string ports default to
  342. the UTF-8 encoding. Sneaky users can still play encoding conversion
  343. games with string ports by explicitly setting the encoding of a port
  344. after it is open. See "Ports" in the manual for more.
  345. ** `scm_from_stringn' and `scm_to_stringn' encoding arguments are never NULL
  346. These functions now require a valid `encoding' argument, and will abort
  347. if given `NULL'.
  348. ** All r6rs ports are both textual and binary
  349. Because R6RS ports are a thin layer on top of Guile's ports, and Guile's
  350. ports are both textual and binary, Guile's R6RS ports are also both
  351. textual and binary, and thus both kinds have port transcoders. This is
  352. an incompatibility with respect to R6RS.
  353. ** Threading facilities moved to (ice-9 threads)
  354. It used to be that call-with-new-thread and other threading primitives
  355. were available in the default environment. This is no longer the case;
  356. they have been moved to (ice-9 threads) instead. Existing code will not
  357. break, however; we used the deprecation facility to signal a warning
  358. message while also providing these bindings in the root environment for
  359. the duration of the 2.2 series.
  360. ** SRFI-18 threads, mutexes, cond vars disjoint from Guile
  361. When we added support for the SRFI-18 threading library in Guile 2.0, we
  362. did so in a way that made SRFI-18 mutexes the same as Guile mutexes.
  363. This was a mistake. In Guile our goal is to provide basic,
  364. well-thought-out, well-implemented, minimal primitives, on top of which
  365. we can build a variety of opinionated frameworks. Incorporating SRFI-18
  366. functionality into core Guile caused us to bloat and slow down our core
  367. threading primitives. Worse, they became very hard to describe; they
  368. did many things, did them poorly, and all that they did was never
  369. adequately specified.
  370. For all of these reasons we have returned to a situation where SRFI-18
  371. concepts are implemented only in the `(srfi srfi-18)' module. This
  372. means that SRFI-18 threads are built on Guile threads, but aren't the
  373. same as Guile threads; calling Guile `thread?' on a thread no longer
  374. returns true.
  375. We realize this causes inconvenience to users who use both Guile
  376. threading interfaces and SRFI-18 interfaces, and we lament the change --
  377. but we are better off now. We hope the newly revised "Scheduling"
  378. section in the manual compensates for the headache.
  379. ** Remove `lock-mutex' "owner" argument
  380. Mutex owners are a SRFI-18 concept; use SRFI-18 mutexes instead.
  381. Relatedly, `scm_lock_mutex_timed' taking the owner argument is now
  382. deprecated; use `scm_timed_lock_mutex' instead.
  383. ** Remove `unlock-mutex' cond var and timeout arguments
  384. It used to be that `unlock-mutex' included `wait-condition-variable'
  385. functionality. This has been deprecated; use SRFI-18 if you want this
  386. behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed' is
  387. deprecated; use `scm_unlock_mutex' instead.
  388. ** Removed `unchecked-unlock' mutex flag
  389. This flag was introduced for internal use by SRFI-18; use SRFI-18
  390. mutexes if you need this behaviour.
  391. ** SRFI-18 mutexes no longer recursive
  392. Contrary to specification, SRFI-18 mutexes in Guile were recursive.
  393. This is no longer the case.
  394. ** Thread cleanup handlers removed
  395. The `set-thread-cleanup!' and `thread-cleanup' functions that were added
  396. in Guile 2.0 to support cleanup after thread cancellation are no longer
  397. needed, since threads can declare cleanup handlers via `dynamic-wind'.
  398. ** Only threads created by Guile are joinable
  399. `join-thread' used to work on "foreign" threads that were not created by
  400. Guile itself, though their join value was always `#f'. This is no
  401. longer the case; attempting to join a foreign thread will throw an
  402. error.
  403. ** Dynamic states capture values, not locations
  404. Dynamic states used to capture the locations of fluid-value
  405. associations. Capturing the current dynamic state then setting a fluid
  406. would result in a mutation of that captured state. Now capturing a
  407. dynamic state simply captures the current values, and calling
  408. `with-dynamic-state' copies those values into the Guile virtual machine
  409. instead of aliasing them in a way that could allow them to be mutated in
  410. place. This change allows Guile's fluid variables to be thread-safe.
  411. To capture the locations of a dynamic state, capture a
  412. `with-dynamic-state' invocation using partial continuations instead.
  413. ** Remove `frame-procedure'
  414. Several optimizations in Guile make `frame-procedure' an interface that
  415. we can no longer support. For background, `frame-procedure' used to
  416. return the value at slot 0 in a frame, which usually corresponds to the
  417. SCM value of the procedure being applied. However it could be that this
  418. slot is re-used for some other value, because the closure was not needed
  419. in the function. Such a re-use might even be for an untagged value, in
  420. which case treating slot 0 as a SCM value is quite dangerous. It's also
  421. possible that so-called "well-known" closures (closures whose callers
  422. are all known) are optimized in such a way that slot 0 is not a
  423. procedure but some optimized representation of the procedure's free
  424. variables. Instead, developers building debugging tools that would like
  425. access to `frame-procedure' are invited to look at the source for the
  426. `(system vm frame)' module for alternate interfaces, including the new
  427. `frame-procedure-name'.
  428. ** Remove `,procedure' REPL command
  429. Not all procedures have values, so it doesn't make sense to expose this
  430. interface to the user. Instead, the `,locals' REPL command will include
  431. the callee, if it is live.
  432. ** Remove `frame-local-ref', `frame-local-set!', `frame-num-locals'
  433. These procedures reference values in a frame on the stack. Since we now
  434. have unboxed values of different kinds, it is now necessary to specify
  435. the type when reference locals, and once this incompatible change needs
  436. to be made, we might as well make these interfaces private. See
  437. "Frames' in the manual, for more information on the replacements for
  438. these low-level interfaces.
  439. ** Vtable hierarchy changes
  440. In an attempt to make Guile's structure and record types integrate
  441. better with GOOPS by unifying the vtable hierarchy, `make-vtable-vtable'
  442. is now deprecated. Instead, users should just use `make-vtable' with
  443. appropriate arguments. See "Structures" in the manual for all of the
  444. details. As such, `record-type-vtable' and `%condition-type-vtable' now
  445. have a parent vtable and are no longer roots of the vtable hierarchy.
  446. ** Syntax parameters are a distinct type
  447. Guile 2.0's transitional implementation of `syntax-parameterize' was
  448. based on the `fluid-let-syntax' interface inherited from the psyntax
  449. expander. This interface allowed any binding to be dynamically rebound
  450. -- even bindings like `lambda'. This is no longer the case in Guile
  451. 2.2. Syntax parameters must be defined via `define-syntax-parameter',
  452. and only such bindings may be parameterized. See "Syntax Parameters" in
  453. the manual for more.
  454. ** Defined identifiers scoped in the current module
  455. Sometimes Guile's expander would attach incorrect module scoping
  456. information for top-level bindings made by an expansion. For example,
  457. given the following R6RS library:
  458. (library (defconst)
  459. (export defconst)
  460. (import (guile))
  461. (define-syntax-rule (defconst name val)
  462. (begin
  463. (define t val)
  464. (define-syntax-rule (name) t))))
  465. Attempting to use it would produce an error:
  466. (import (defconst))
  467. (defconst foo 42)
  468. (foo)
  469. =| Unbound variable: t
  470. It wasn't clear that we could fix this in Guile 2.0 without breaking
  471. someone's delicate macros, so the fix is only coming out now.
  472. ** Pseudo-hygienically rename macro-introduced bindings
  473. Bindings introduced by macros, like `t' in the `defconst' example above,
  474. are now given pseudo-fresh names. This allows
  475. (defconst foo 42)
  476. (defconst bar 37)
  477. to introduce different bindings for `t'. These pseudo-fresh names are
  478. made in such a way that if the macro is expanded again, for example as
  479. part of a simple recompilation, the introduced identifiers get the same
  480. pseudo-fresh names. See "Hygiene and the Top-Level" in the manual, for
  481. details.
  482. ** Fix literal matching for module-bound literals
  483. `syntax-rules' and `syntax-case' macros can take a set of "literals":
  484. bound or unbound keywords that the syntax matcher treats specially.
  485. Before, literals were always matched symbolically (by name). Now they
  486. are matched by binding. This allows literals to be reliably bound to
  487. values, renamed by imports or exports, et cetera. See "Syntax-rules
  488. Macros" in the manual for more on literals.
  489. ** Fix bug importing specific bindings with #:select
  490. It used to be that if #:select didn't find a binding in the public
  491. interface of a module, it would actually grovel in the module's
  492. unexported private bindings. This was not intended and is now fixed.
  493. ** Statically scoped module duplicate handlers
  494. It used to be that if a module did not specify a #:duplicates handler,
  495. when a name was first referenced in that module and multiple imported
  496. modules provide that name, the value of the
  497. `default-duplicate-binding-handlers' parameter would be used to resolve
  498. the duplicate bindings. We have changed so that instead a module
  499. defaults to the set of handlers described in the manual. If the module
  500. specifies #:duplicates, of course we use that. The
  501. `default-duplicate-binding-handlers' parameter now simply accesses the
  502. handlers of the current module, instead of some global value.
  503. ** Fix too-broad capture of dynamic stack by delimited continuations
  504. Guile was using explicit stacks to represent, for example, the chain of
  505. current exception handlers. This means that a delimited continuation
  506. that captured a "catch" expression would capture the whole stack of
  507. exception handlers, not just the exception handler added by the "catch".
  508. This led to strangeness when resuming the continuation in some other
  509. context like other threads; "throw" could see an invalid stack of
  510. exception handlers. This has been fixed by the addition of the new
  511. "fluid-ref*" procedure that can access older values of fluids; in this
  512. way the exception handler stack is now implicit. See "Fluids and
  513. Dynamic States" in the manual, for more on fluid-ref*.
  514. ** `dynamic-wind' doesn't check that guards are thunks
  515. Checking that the dynamic-wind out-guard procedure was actually a thunk
  516. before doing the wind was slow, unreliable, and not strictly needed.
  517. ** All deprecated code removed
  518. All code deprecated in Guile 2.0 has been removed. See older NEWS, and
  519. check that your programs can compile without linker warnings and run
  520. without runtime warnings. See "Deprecation" in the manual.
  521. ** Remove miscellaneous unused interfaces
  522. We have removed accidentally public, undocumented interfaces that we
  523. think are not used, and not useful. This includes `scm_markstream',
  524. `SCM_FLUSH_REGISTER_WINDOWS', `SCM_THREAD_SWITCHING_CODE', `SCM_FENCE',
  525. `scm_call_generic_0', `scm_call_generic_1', `scm_call_generic_2'
  526. `scm_call_generic_3', `scm_apply_generic', and `scm_program_source'.
  527. `scm_async_click' was renamed to `scm_async_tick', and `SCM_ASYNC_TICK'
  528. was made private (use `SCM_TICK' instead).
  529. ** Many internal compiler / VM changes
  530. As the compiler and virtual machine were re-written, there are many
  531. changes in the back-end of Guile to interfaces that were introduced in
  532. Guile 2.0. These changes are only only of interest if you wrote a
  533. language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
  534. the case, drop by the IRC channel to discuss the changes.
  535. ** Defining a SMOB or port type no longer mucks exports of `(oop goops)'
  536. It used to be that defining a SMOB or port type added an export to
  537. GOOPS, for the wrapper class of the smob type. This violated
  538. modularity, though, so we have removed this behavior.
  539. ** Bytecode replaces objcode as a target language
  540. One way in which people may have used details of Guile's runtime in
  541. Guile 2.0 is in compiling code to thunks for later invocation. Instead
  542. of compiling to objcode and then calling `make-program', now the way to
  543. do it is to compile to `bytecode' and then call `load-thunk-from-memory'
  544. from `(system vm loader)'.
  545. ** Weak pairs removed
  546. Weak pairs were not safe to access with `car' and `cdr', and so were
  547. removed.
  548. ** Weak alist vectors removed
  549. Use weak hash tables instead.
  550. ** Weak vectors may no longer be accessed via `vector-ref' et al
  551. Weak vectors may no longer be accessed with the vector interface. This
  552. was a source of bugs in the 2.0 Guile implementation, and a limitation
  553. on using vectors as building blocks for other abstractions. Vectors in
  554. Guile are now a concrete type; for an abstract interface, use the
  555. generic array facility (`array-ref' et al).
  556. ** scm_t_array_implementation removed
  557. This interface was introduced in 2.0 but never documented. It was a
  558. failed attempt to layer the array implementation that actually
  559. introduced too many layers, as it prevented the "vref" and "vset"
  560. members of scm_t_array_handle (called "ref" and "set" in 1.8, not
  561. present in 2.0) from specializing on array backing stores.
  562. Notably, the definition of scm_t_array_handle has now changed, to not
  563. include the (undocumented) "impl" member. We are sorry for any
  564. inconvenience this may cause.
  565. ** `scm_make' is now equivalent to Scheme `make'
  566. It used to be that `scm_make' only implemented a hard-wired object
  567. allocation and initialization protocol. This was because `scm_make' was
  568. used while GOOPS booted its own, more complete `make' implementation in
  569. Scheme. Now that we've re-implemented everything in Scheme, the C
  570. `scm_make' now dispatches directly to Scheme `make', which implements
  571. the full protocol. This change is incompatible in some ways, but on the
  572. whole is good news for GOOPS users.
  573. ** GOOPS slot definitions are now objects
  574. Slot definitions are now instances of a <slot> class, instead of being
  575. specially formatted lists. To most user code, this is transparent, as
  576. the slot definition accessors like `slot-definition-name' continue to
  577. work. However, code that for example uses `car' to get the name of a
  578. slot definition will need to be updated to use the accessors.
  579. ** Class slot changes
  580. Class objects no longer have a `default-slot-definition-class' slot,
  581. which was never used. They also no longer have slots for hashsets
  582. (`h0', `h1', and so on up to `h7'), which have been unused since Guile
  583. 2.0 and were not a great idea.
  584. There is a new class option, `#:static-slot-allocation?'. See the
  585. manual for details.
  586. ** Removal of internal, unintentionally exposed GOOPS C interfaces
  587. These include: `scm_sys_fast_slot_ref', `scm_sys_fast_slot_set_x'
  588. `scm_basic_basic_make_class', `scm_sys_compute_slots',
  589. `scm_sys_prep_layout_x' `scm_t_method', `SCM_METHOD',
  590. `scm_s_slot_set_x', `SCM_CLASS_CLASS_LAYOUT', `scm_si_slotdef_class',
  591. `scm_si_generic_function', `scm_si_specializers', `scm_si_procedure',
  592. `scm_si_formals', `scm_si_body', `scm_si_make_procedure',
  593. `SCM_CLASS_CLASS_LAYOUT', `SCM_INSTANCE_HASH', `SCM_SET_HASHSET', `union
  594. scm_t_debug_info', `scm_pure_generic_p', `SCM_PUREGENERICP',
  595. `SCM_VALIDATE_PUREGENERIC', `SCM_VTABLE_FLAG_GOOPS_PURE_GENERIC',
  596. `SCM_CLASSF_PURE_GENERIC', `scm_c_extend_primitive_generic',
  597. `scm_sys_initialize_object', `SCM_CLASS_CLASS_LAYOUT',
  598. `scm_si_redefined', `scm_si_direct_supers', `scm_si_direct_slots',
  599. `scm_si_direct_subclasses', `scm_si_direct_methods', `scm_si_cpl'
  600. `scm_si_slots', `scm_si_getters_n_setters', `SCM_N_CLASS_SLOTS',
  601. `SCM_OBJ_CLASS_REDEF', `SCM_INST', `SCM_ACCESSORS_OF',
  602. `scm_sys_allocate_instance', and `scm_sys_invalidate_class_x'.
  603. * New deprecations
  604. ** `SCM_FDES_RANDOM_P'
  605. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  606. ** `_IONBF', `_IOLBF', and `_IOFBF'
  607. Instead, use the symbol values `none', `line', or `block', respectively,
  608. as arguments to the `setvbuf' function.
  609. ** `SCM_FDES_RANDOM_P'
  610. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  611. ** Arbiters
  612. Arbiters were an experimental mutual exclusion facility from 20 years
  613. ago that didn't survive the test of time. Use mutexes or atomic boxes
  614. instead.
  615. ** User asyncs
  616. Guile had (and still has) "system asyncs", which are asynchronous
  617. interrupts, and also had this thing called "user asyncs", which was a
  618. trivial unused data structure. Now that we have deprecated the old
  619. `async', `async-mark', and `run-asyncs' procedures that comprised the
  620. "user async" facility, we have been able to clarify our documentation to
  621. only refer to "asyncs".
  622. ** Critical sections
  623. Critical sections have long been just a fancy way to lock a mutex and
  624. defer asynchronous interrupts. Instead of SCM_CRITICAL_SECTION_START,
  625. make sure you're in a "scm_dynwind_begin (0)" and use
  626. scm_dynwind_pthread_mutex_lock instead, possibly also with
  627. scm_dynwind_block_asyncs.
  628. ** `scm_make_mutex_with_flags'
  629. Use `scm_make_mutex_with_kind' instead. See "Mutexes and Condition
  630. Variables" in the manual, for more.
  631. ** Dynamic roots
  632. This was a facility that predated threads, was unused as far as we can
  633. tell, and was never documented. Still, a grep of your code for
  634. dynamic-root or dynamic_root would not be amiss.
  635. ** `make-dynamic-state'
  636. Use `current-dynamic-state' to get an immutable copy of the current
  637. fluid-value associations.
  638. ** `with-statprof' macro
  639. Use the `statprof' procedure instead.
  640. ** SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1, SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N
  641. ** SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn
  642. ** SCM_WTA_DISPATCH_1_SUBR
  643. These macros were used in dispatching primitive generics. They can be
  644. replaced by using C functions (the same name but in lower case), if
  645. needed, but this is a hairy part of Guile that perhaps you shouldn't be
  646. using.
  647. ** scm_compute_applicable_methods and scm_find_method
  648. Use `compute-applicable-methods' from Scheme instead.
  649. ** scm_no_applicable_method
  650. Fetch no-applicable-method from the GOOPS exports if you need it.
  651. ** scm_class_boolean, scm_class_char, scm_class_pair
  652. ** scm_class_procedure, scm_class_string, scm_class_symbol
  653. ** scm_class_primitive_generic, scm_class_vector, scm_class_null
  654. ** scm_class_real, scm_class_complex, scm_class_integer
  655. ** scm_class_fraction, scm_class_unknown, scm_class_top
  656. ** scm_class_object, scm_class_class, scm_class_applicable
  657. ** scm_class_applicable_struct, scm_class_applicable_struct_with_setter
  658. ** scm_class_generic, scm_class_generic_with_setter, scm_class_accessor
  659. ** scm_class_extended_generic, scm_class_extended_generic_with_setter
  660. ** scm_class_extended_accessor, scm_class_method
  661. ** scm_class_accessor_method, scm_class_procedure_class
  662. ** scm_class_applicable_struct_class, scm_class_number, scm_class_list
  663. ** scm_class_keyword, scm_class_port, scm_class_input_output_port
  664. ** scm_class_input_port, scm_class_output_port, scm_class_foreign_slot
  665. ** scm_class_self, scm_class_protected, scm_class_hidden
  666. ** scm_class_opaque, scm_class_read_only, scm_class_protected_hidden
  667. ** scm_class_protected_opaque, scm_class_protected_read_only
  668. ** scm_class_scm, scm_class_int, scm_class_float, scm_class_double
  669. ** scm_port_class, scm_smob_class
  670. These class exports are now deprecated. Instead, look up the ones you
  671. need from the GOOPS module, or use `scm_class_of' on particular values.
  672. ** scm_get_keyword
  673. Instead from Scheme use kw-arg-ref or real keyword arguments, and from C
  674. use `scm_c_bind_keyword_arguments'.
  675. ** scm_slot_ref_using_class, scm_slot_set_using_class_x
  676. ** scm_slot_bound_using_class_p, scm_slot_exists_using_class_p
  677. Instead use the normal `scm_slot_ref' and similar procedures.
  678. * Changes to the distribution
  679. ** Pre-built binary files in the tarball
  680. Building Guile from a tarball can now take advantage of a "prebuilt/"
  681. tree of prebuilt .go files. These compiled files are created when a
  682. tarball is made, and are used to speed up the build for users of
  683. official releases.
  684. These pre-built binaries are not necessary, however: they are not stored
  685. in revision control and can always be re-created from the source, given
  686. that Guile can bootstrap itself from its minimal bootstrap C
  687. interpreter. If you do not want to depend on these pre-built binaries,
  688. you can "make -C prebuilt clean" before building.
  689. If Guile doesn't pre-build binaries for your architecture and you would
  690. like support for your architecture, see prebuilt/Makefile.am for more
  691. information on how to add support.
  692. ** New minor version
  693. The "effective version" of Guile is now 2.2, which allows parallel
  694. installation with other effective versions (for example, the older Guile
  695. 2.0). See "Parallel Installations" in the manual for full details.
  696. Notably, the `pkg-config' file is now `guile-2.2'.
  697. ** Bump required libgc version to 7.2, released March 2012.
  698. ** The readline extension is now installed in the extensionsdir
  699. The shared library that implements Guile's readline extension is no
  700. longer installed to the libdir. This change should be transparent to
  701. users, but packagers may be interested.
  702. Changes in 2.0.14 (since 2.0.13):
  703. * Bug fixes
  704. ** Builds of .go files and of Guile itself are now bit-reproducible
  705. (<http://bugs.gnu.org/20272>)
  706. ** 'number->locale-string' and 'monetary-amount->locale-string' fixes
  707. (<http://bugs.gnu.org/24990>)
  708. ** (system base target) now recognizes "sh3" as a cross-compilation target
  709. ** Fix race condition in '00-repl-server.test'
  710. (<http://bugs.gnu.org/24769>)
  711. ** 'scandir' from (ice-9 ftw) no longer calls 'stat' for each entry
  712. ** Several documentation improvements
  713. Changes in 2.0.13 (since 2.0.12):
  714. * Security fixes
  715. ** CVE-2016-8606: REPL server now protects against HTTP inter-protocol
  716. attacks
  717. Guile 2.x provides a "REPL server" started by the '--listen'
  718. command-line option or equivalent API (see "REPL Servers" in the
  719. manual).
  720. The REPL server is vulnerable to the HTTP inter-protocol attack as
  721. described at
  722. <https://en.wikipedia.org/wiki/Inter-protocol_exploitation>, notably the
  723. HTML form protocol attack described at
  724. <https://www.jochentopf.com/hfpa/hfpa.pdf>. A "DNS rebinding attack"
  725. can be combined with this attack and allow an attacker to send arbitrary
  726. Guile code to the REPL server through web pages accessed by the
  727. developer, even though the REPL server is listening to a loopback device
  728. ("localhost"). This was demonstrated in an article entitled "How to
  729. steal any developer's local database" available at
  730. <http://bouk.co/blog/hacking-developers/>.
  731. The REPL server in Guile 2.0.13 now detects attempts to exploit this
  732. vulnerability. It immediately closes the connection when it receives a
  733. line that looks like an HTTP request.
  734. Nevertheless, we recommend binding the REPL server to a Unix-domain
  735. socket, for instance by running:
  736. guile --listen=/tmp/guile-socket
  737. ** CVE-2016-8605: 'mkdir' procedure no longer calls umask(2)
  738. (<http://bugs.gnu.org/24659>)
  739. When the second argument to the 'mkdir' procedure was omitted, it would
  740. call umask(0) followed by umask(previous_umask) and apply the umask to
  741. mode #o777.
  742. This was unnecessary and a security issue for multi-threaded
  743. applications: during a small window the process' umask was set to zero,
  744. so other threads calling mkdir(2) or open(2) could end up creating
  745. world-readable/writable/executable directories or files.
  746. * New interfaces
  747. ** mkstemp! takes optional "mode" argument
  748. See "File System" in the manual, for more.
  749. ** New 'scm_to_uintptr_t' and 'scm_from_uintptr_t' C functions
  750. * Bug fixes
  751. ** Fix optimizer bug when compiling fixpoint operator
  752. ** Fix build error on MinGW
  753. ** Update 'uname' implementation on MinGW
  754. ** 'port-encoding' and 'set-port-encoding!' ensure they are passed an
  755. open port
  756. ** (system base target) now recognizes Alpha as a cross-compilation target
  757. Changes in 2.0.12 (since 2.0.11):
  758. * Notable changes
  759. ** FFI: Add support for functions that set 'errno'
  760. When accessing POSIX functions from a system's libc via Guile's dynamic
  761. FFI, you commonly want to access the 'errno' variable to be able to
  762. produce useful diagnostic messages.
  763. This is now possible using 'pointer->procedure' or
  764. 'scm_pointer_to_procedure_with_errno'. See "Dynamic FFI" in the manual.
  765. ** The #!r6rs directive now influences read syntax
  766. The #!r6rs directive now changes the per-port reader options to make
  767. Guile's reader conform more closely to the R6RS syntax. In particular:
  768. - It makes the reader case sensitive.
  769. - It disables the recognition of keyword syntax in conflict with the
  770. R6RS (and R5RS).
  771. - It enables the `square-brackets', `hungry-eol-escapes' and
  772. `r6rs-hex-escapes' reader options.
  773. ** 'read' now accepts "\(" as equivalent to "("
  774. This is indented for use at the beginning of lines in multi-line strings
  775. to avoid confusing Emacs' lisp modes. Previously "\(" was an error.
  776. ** SRFI-14 character data set upgraded to Unicode 8.0.0
  777. ** SRFI-19 table of leap seconds updated
  778. ** 'string-hash', 'read-string', and 'write' have been optimized
  779. ** GOOPS bug fix for inherited accessor methods
  780. In the port of GOOPS to Guile 2.0, we introduced a bug related to
  781. accessor methods. The bug resulted in GOOPS assuming that a slot S in
  782. an object whose class is C would always be present in instances of all
  783. subclasses C, and allocated to the same struct index. This is not the
  784. case for multiple inheritance. This behavior has been fixed to be as it
  785. was in 1.8.
  786. One aspect of this change may cause confusion among users. Previously
  787. if you defined a class C:
  788. (use-modules (oop goops))
  789. (define-class C ()
  790. (a #:getter get-a))
  791. And now you define a subclass, intending to provide an #:init-value for
  792. the slot A:
  793. (define-class D (A)
  794. (a #:init-value 42))
  795. Really what you have done is define in D a new slot with the same name,
  796. overriding the existing slot. The problem comes in that before fixing
  797. this bug (but not in 1.8), the getter 'get-a' would succeed for
  798. instances of D, even though 'get-a' should only work for the slot 'a'
  799. that is defined on class C, not any other slot that happens to have the
  800. same name and be in a class with C as a superclass.
  801. It would be possible to "merge" the slot definitions on C and D, but
  802. that part of the meta-object protocol (`compute-slots' et al) is not
  803. fully implemented.
  804. Somewhat relatedly, GOOPS also had a fix around #:init-value on
  805. class-allocated slots. GOOPS was re-initializing the value of slots
  806. with #:class or #:each-subclass allocation every time instances of that
  807. class was allocated. This has been fixed.
  808. * New interfaces
  809. ** New SRFI-28 string formatting implementation
  810. See "SRFI-28" in the manual.
  811. ** New (ice-9 unicode) module
  812. See "Characters" in the manual.
  813. ** Web server
  814. The (web server) module now exports 'make-server-impl', 'server-impl?',
  815. and related procedures. Likewise, (web server http) exports 'http'.
  816. ** New procedures: 'string-utf8-length' and 'scm_c_string_utf8_length'
  817. See "Bytevectors as Strings" in the manual, for more.
  818. ** New 'EXIT_SUCCESS' and 'EXIT_FAILURE' Scheme variables
  819. See "Processes" in the manual.
  820. ** New C functions to disable automatic SMOB finalization
  821. The new 'scm_set_automatic_finalization_enabled' C function allows you
  822. to choose whether automatic object finalization should be enabled (as
  823. was the case until now, and still is by default.) This is meant for
  824. applications that are not thread-safe nor async-safe; such applications
  825. can disable automatic finalization and call the new 'scm_run_finalizers'
  826. function when appropriate.
  827. See the "Garbage Collecting Smobs" and "Smobs" sections in the manual.
  828. ** Cross-compilation to ARM
  829. More ARM cross-compilation targets are supported: "arm.*eb",
  830. "^aarch64.*be", and "aarch64".
  831. * New deprecation
  832. ** The undocumented and unused C function 'scm_string_hash' is now deprecated
  833. * Bugs fixed
  834. ** Compiler
  835. *** 'call-with-prompt' does not truncate multiple-value returns
  836. (<http://bugs.gnu.org/14347>)
  837. *** Use permissions of source file for compiled file
  838. (<http://bugs.gnu.org/18477>)
  839. *** Fix bug when inlining some functions with optional arguments
  840. (<http://bugs.gnu.org/17634>)
  841. *** Avoid quadratic expansion time in 'and' and 'or' macros
  842. (<http://bugs.gnu.org/17147>)
  843. *** Fix expander bug introduced when adding support for tail patterns
  844. (<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>)
  845. *** Handle ~p in 'format' warnings (<http://bugs.gnu.org/18299>)
  846. *** Fix bug that exposed `list' invocations to CSE
  847. (<http://bugs.gnu.org/21899>)
  848. *** Reduce eq? and eqv? over constants using equal?
  849. (<http://bugs.gnu.org/21855>)
  850. *** Skip invalid .go files found in GUILE_LOAD_COMPILED_PATH
  851. ** Threads
  852. *** Fix data races leading to corruption (<http://bugs.gnu.org/22152>)
  853. ** Memory management
  854. *** Fix race between SMOB marking and finalization
  855. (<http://bugs.gnu.org/19883>)
  856. ** Ports
  857. *** Fix port position handling on binary input ports
  858. (<http://bugs.gnu.org/20302>)
  859. *** Bytevector and custom binary ports to use ISO-8859-1
  860. (<http://bugs.gnu.org/20200>)
  861. *** Fix buffer overrun with unbuffered custom binary input ports
  862. (<http://bugs.gnu.org/19621>)
  863. *** Fix memory corruption that arose when using 'get-bytevector-n'
  864. (<http://bugs.gnu.org/17466>)
  865. ** System
  866. *** {get,set}sockopt now expect type 'int' for SO_SNDBUF/SO_RCVBUF
  867. *** 'system*' now available on MS-Windows
  868. *** 'open-pipe' now available on MS-Windows
  869. *** Better support for file names containing backslashes on Windows
  870. ** Web
  871. *** 'split-and-decode-uri-path' no longer decodes "+" to space
  872. *** HTTP: Support date strings with a leading space for hours
  873. (<http://bugs.gnu.org/23421>)
  874. *** HTTP: Accept empty reason phrases (<http://bugs.gnu.org/22273>)
  875. *** HTTP: 'Location' header can now contain URI references, not just
  876. absolute URIs
  877. *** HTTP: Improve chunked-mode support (<http://bugs.gnu.org/19939>)
  878. *** HTTP: 'open-socket-for-uri' now sets better OS buffering parameters
  879. (<http://bugs.gnu.org/15368>)
  880. ** Miscellaneous
  881. *** Fix 'atan' procedure when applied to complex numbers
  882. *** Fix Texinfo to HTML conversion for @itemize and @acronym
  883. (<http://bugs.gnu.org/21772>)
  884. *** 'bytevector-fill!' accepts fill arguments greater than 127
  885. (<http://bugs.gnu.org/19027>)
  886. *** 'bytevector-copy' correctly copies SRFI-4 homogeneous vectors
  887. (<http://bugs.gnu.org/18866>)
  888. *** 'strerror' no longer hangs when passed a non-integer argument
  889. (<http://bugs.gnu.org/18065>)
  890. *** 'scm_boot_guile' now gracefully handles argc == 0
  891. (<http://bugs.gnu.org/18680>)
  892. *** Fix 'SCM_SMOB_OBJECT_LOC' definition (<http://bugs.gnu.org/18495>)
  893. *** Fix bug where 'bit-count*' was not using its second argument
  894. *** SRFI-1 'length+' raises an error for non-lists and dotted lists
  895. (<http://bugs.gnu.org/17296>)
  896. *** Add documentation for SXPath (<http://bugs.gnu.org/19478>)
  897. Changes in 2.0.11 (since 2.0.10):
  898. This release fixes an embarrassing regression introduced in the C
  899. interface to SRFI-4 vectors. See
  900. <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00047.html>
  901. for details.
  902. Changes in 2.0.10 (since 2.0.9):
  903. * Notable changes
  904. ** New GDB extension to support Guile
  905. Guile now comes with an extension for GDB 7.8 or later (unreleased at
  906. the time of writing) that simplifies debugging of C code that uses
  907. Guile. See "GDB Support" in the manual.
  908. ** Improved integration between R6RS and native Guile exceptions
  909. R6RS exception handlers, established using 'with-exception-handler' or
  910. 'guard', are now able to catch native Guile exceptions, which are
  911. automatically converted into appropriate R6RS condition objects.
  912. ** Support for HTTP proxies
  913. Guile's built-in web client now honors the 'http_proxy' environment
  914. variable, as well as the new 'current-http-proxy' parameter. See
  915. "Web Client" in the manual for details.
  916. ** Lexical syntax improvements
  917. *** Support |...| symbol notation.
  918. Guile's core reader and printer now support the R7RS |...| notation
  919. for writing symbols with arbitrary characters, as a more portable and
  920. attractive alternative to Guile's native #{...}# notation. To enable
  921. this notation by default, put one or both of the following in your
  922. ~/.guile:
  923. (read-enable 'r7rs-symbols)
  924. (print-enable 'r7rs-symbols)
  925. *** Support '#true' and '#false' notation for booleans.
  926. The booleans '#t' and '#f' may now be written as '#true' and '#false'
  927. for improved readability, per R7RS.
  928. *** Recognize '#\escape' character name.
  929. The escape character '#\esc' may now be written as '#\escape', per R7RS.
  930. *** Accept "\|" in string literals.
  931. The pipe character may now be preceded by a backslash, per R7RS.
  932. ** Custom binary input ports now support 'setvbuf'.
  933. Until now, ports returned by 'make-custom-binary-input-port' were always
  934. full-buffered. Now, their buffering mode can be changed using 'setvbuf'.
  935. ** SRFI-4 predicates and length accessors no longer accept arrays.
  936. Given that the SRFI-4 accessors don't work for arrays, the fact that the
  937. predicates and length accessors returned true for arrays was a bug.
  938. ** GUILE_PROGS now supports specifying a minimum required version.
  939. The 'GUILE_PROGS' autoconf macro in guile.m4 now allows an optional
  940. argument to specify a minimum required Guile version. By default, it
  941. requires Guile >= 2.0. A micro version can also be specified, e.g.:
  942. GUILE_PROGS([2.0.10])
  943. ** Error reporting improvements
  944. *** Improved run-time error reporting in (ice-9 match).
  945. If no pattern matches in a 'match' form, the datum that failed to match
  946. is printed along with the location of the failed 'match' invocation.
  947. *** Print the faulty object upon invalid-keyword errors.
  948. *** Improved error reporting of procedures defined by define-inlinable.
  949. *** Improved error reporting for misplaced ellipses in macro definitions.
  950. *** Improved error checking in 'define-public' and 'module-add!'.
  951. *** Improved error when 'include' form with relative path is not in a file.
  952. ** Speed improvements
  953. *** 'scm_c_read' on ISO-8859-1 (e.g. binary) unbuffered ports is faster.
  954. *** New inline asm for VM fixnum multiply, for faster overflow checking.
  955. *** New inline asm for VM fixnum operations on ARM and 32-bit x86.
  956. *** 'positive?' and 'negative?' are now compiled to VM primitives.
  957. *** Numerical comparisons with more than 2 arguments are compiled to VM code.
  958. *** Several R6RS bitwise operators have been optimized.
  959. ** Miscellaneous
  960. *** Web: 'content-disposition' headers are now supported.
  961. *** Web: 'uri-encode' hexadecimal percent-encoding is now uppercase.
  962. *** Size argument to 'make-doubly-weak-hash-table' is now optional.
  963. *** Timeout for 'unlock-mutex' and SRFI-18 'mutex-unlock!' may now be #f.
  964. ** Gnulib update
  965. Guile's copy of Gnulib was updated to v0.1-92-g546ff82. The following
  966. modules were imported from Gnulib: copysign, fsync, isfinite, link,
  967. lstat, mkdir, mkstemp, readlink, rename, rmdir, and unistd.
  968. * New interfaces
  969. ** Cooperative REPL servers
  970. This new facility supports REPLs that run at specified times within an
  971. existing thread, for example in programs utilizing an event loop or in
  972. single-threaded programs. This allows for safe access and mutation of
  973. a program's data structures from the REPL without concern for thread
  974. synchronization. See "Cooperative REPL Servers" in the manual for
  975. details.
  976. ** SRFI-43 (Vector Library)
  977. Guile now includes SRFI-43, a comprehensive library of vector operations
  978. analogous to the SRFI-1 list library. See "SRFI-43" in the manual for
  979. details.
  980. ** SRFI-64 (A Scheme API for test suites)
  981. Guile now includes SRFI-64, a flexible framework for creating test
  982. suites. The reference implementation of SRFI-64 has also been updated
  983. to fully support earlier versions of Guile.
  984. ** SRFI-111 (Boxes)
  985. See "SRFI-111" in the manual.
  986. ** 'define-values'
  987. See "Binding multiple return values" in the manual.
  988. ** Custom ellipsis identifiers using 'with-ellipsis' or SRFI-46.
  989. Guile now allows macro definitions to use identifiers other than '...'
  990. as the ellipsis. This is convenient when writing macros that generate
  991. macro definitions. The desired ellipsis identifier can be given as the
  992. first operand to 'syntax-rules', as specified in SRFI-46 and R7RS, or by
  993. using the new 'with-ellipsis' special form in procedural macros. With
  994. this addition, Guile now fully supports SRFI-46.
  995. See "Specifying a Custom Ellipsis Identifier" and "Custom Ellipsis
  996. Identifiers for syntax-case Macros" in the manual for details.
  997. ** R7RS 'syntax-error'
  998. Guile now supports 'syntax-error', as specified by R7RS, allowing for
  999. improved compile-time error reporting from 'syntax-rules' macros. See
  1000. "Reporting Syntax Errors in Macros" in the manual for details.
  1001. ** New procedures to convert association lists into hash tables
  1002. Guile now includes the convenience procedures 'alist->hash-table',
  1003. 'alist->hashq-table', 'alist->hashv-table', and 'alist->hashx-table'.
  1004. See "Hash Table Reference" in the manual.
  1005. ** New predicates: 'exact-integer?' and 'scm_is_exact_integer'
  1006. See "Integers" in the manual.
  1007. ** 'weak-vector-length', 'weak-vector-ref', and 'weak-vector-set!'
  1008. These should now be used to access weak vectors, instead of
  1009. 'vector-length', 'vector-ref', and 'vector-set!'.
  1010. * Manual updates
  1011. ** Improve docs for 'eval-when'.
  1012. Each 'eval-when' condition is now explained in detail, including
  1013. 'expand' which was previously undocumented. (expand load eval) is now
  1014. the recommended set of conditions, instead of (compile load eval).
  1015. See "Eval When" in the manual, for details.
  1016. ** Update the section on SMOBs and memory management.
  1017. See "Defining New Types (Smobs)" in the manual.
  1018. ** Fixes
  1019. *** GOOPS: #:dsupers is the init keyword for the dsupers slot.
  1020. *** 'unfold-right' takes a tail, not a tail generator.
  1021. *** Clarify that 'append!' and 'reverse!' might not mutate.
  1022. *** Fix doc that incorrectly claimed (integer? +inf.0) => #t.
  1023. (http://bugs.gnu.org/16356)
  1024. *** Document that we support SRFI-62 (S-expression comments).
  1025. *** Document that we support SRFI-87 (=> in case clauses).
  1026. *** Document 'equal?' in the list of R6RS incompatibilities.
  1027. *** Remove outdated documentation of LTDL_LIBRARY_PATH.
  1028. *** Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.
  1029. *** Fix 'my-or' examples to use let-bound variable.
  1030. (http://bugs.gnu.org/14203)
  1031. * New deprecations
  1032. ** General 'uniform-vector' interface
  1033. This interface lacked both generality and specificity. The general
  1034. replacements are 'array-length', 'array-ref', and friends on the scheme
  1035. side, and the array handle interface on the C side. On the specific
  1036. side of things, there are the specific bytevector, SRFI-4, and bitvector
  1037. interfaces.
  1038. ** Use of the vector interface on arrays
  1039. ** 'vector-length', 'vector-ref', and 'vector-set!' on weak vectors
  1040. ** 'vector-length', 'vector-ref', and 'vector-set!' as primitive-generics
  1041. Making the vector interface operate only on a single representation will
  1042. allow future versions of Guile to compile loops involving vectors to
  1043. more efficient native code.
  1044. ** 'htons', 'htonl', 'ntohs', 'ntohl'
  1045. These procedures, like their C counterpart, were used to convert numbers
  1046. to/from network byte order, typically in conjunction with the
  1047. now-deprecated uniform vector API.
  1048. This functionality is now covered by the bytevector and binary I/O APIs.
  1049. See "Interpreting Bytevector Contents as Integers" in the manual.
  1050. ** 'gc-live-object-stats'
  1051. It hasn't worked in the whole 2.0 series. There is no replacement,
  1052. unfortunately.
  1053. ** 'scm_c_program_source'
  1054. This internal VM function was not meant to be public. Use
  1055. 'scm_procedure_source' instead.
  1056. * Build fixes
  1057. ** Fix build with Clang 3.4.
  1058. ** MinGW build fixes
  1059. *** Do not add $(EXEEXT) to guild or guile-tools.
  1060. *** tests: Use double quotes around shell arguments, for Windows.
  1061. *** tests: Don't rely on $TMPDIR and /tmp on Windows.
  1062. *** tests: Skip FFI tests that use `qsort' when it's not accessible.
  1063. *** tests: Remove symlink only when it exists.
  1064. *** tests: Don't rely on `scm_call_2' being visible.
  1065. ** Fix computation of LIBLOBJS so dependencies work properly.
  1066. (http://bugs.gnu.org/14193)
  1067. * Bug fixes
  1068. ** Web: Fix web client with methods other than GET.
  1069. (http://bugs.gnu.org/15908)
  1070. ** Web: Add Content-Length header for empty bodies.
  1071. ** Web: Accept "UTC" as the zone offset in date headers.
  1072. (http://bugs.gnu.org/14128)
  1073. ** Web: Don't throw if a response is longer than its Content-Length says.
  1074. ** Web: Write out HTTP Basic auth headers correctly.
  1075. (http://bugs.gnu.org/14370)
  1076. ** Web: Always print a path component in 'write-request-line'.
  1077. ** Fix 'define-public' from (ice-9 curried-definitions).
  1078. ** psyntax: toplevel variable definitions discard previous syntactic binding.
  1079. (http://bugs.gnu.org/11988)
  1080. ** Fix thread-unsafe lazy initializations.
  1081. ** Make (ice-9 popen) thread-safe.
  1082. (http://bugs.gnu.org/15683)
  1083. ** Make guardians thread-safe.
  1084. ** Make regexp_exec thread-safe.
  1085. (http://bugs.gnu.org/14404)
  1086. ** vm: Gracefully handle stack overflows.
  1087. (http://bugs.gnu.org/15065)
  1088. ** Fix 'rationalize'.
  1089. (http://bugs.gnu.org/14905)
  1090. ** Fix inline asm for VM fixnum operations on x32.
  1091. ** Fix 'SCM_SYSCALL' to really swallow EINTR.
  1092. ** Hide EINTR returns from 'accept'.
  1093. ** SRFI-19: Update the table of leap seconds.
  1094. ** Add missing files to the test-suite Makefile.
  1095. ** Make sure 'ftw' allows directory traversal when running as root.
  1096. ** Fix 'hash-for-each' for weak hash tables.
  1097. ** SRFI-18: Export 'current-thread'.
  1098. (http://bugs.gnu.org/16890)
  1099. ** Fix inlining of tail list to apply.
  1100. (http://bugs.gnu.org/15533)
  1101. ** Fix bug in remqueue in threads.c when removing last element.
  1102. ** Fix build when '>>' on negative integers is not arithmetic.
  1103. ** Fix 'bitwise-bit-count' for negative arguments.
  1104. (http://bugs.gnu.org/14864)
  1105. ** Fix VM 'ash' for right shifts by large amounts.
  1106. (http://bugs.gnu.org/14864)
  1107. ** Fix rounding in scm_i_divide2double for negative arguments.
  1108. ** Avoid lossy conversion from inum to double in numerical comparisons.
  1109. ** Fix numerical comparison of fractions to infinities.
  1110. ** Allow fl+ and fl* to accept zero arguments.
  1111. (http://bugs.gnu.org/14869)
  1112. ** flonum? returns false for complex number objects.
  1113. (http://bugs.gnu.org/14866)
  1114. ** flfinite? applied to a NaN returns false.
  1115. (http://bugs.gnu.org/14868)
  1116. ** Flonum operations always return flonums.
  1117. (http://bugs.gnu.org/14871)
  1118. ** min and max: NaNs beat infinities, per R6RS errata.
  1119. (http://bugs.gnu.org/14865)
  1120. ** Fix 'fxbit-count' for negative arguments.
  1121. ** 'gcd' and 'lcm' support inexact integer arguments.
  1122. (http://bugs.gnu.org/14870)
  1123. ** Fix R6RS 'fixnum-width'.
  1124. (http://bugs.gnu.org/14879)
  1125. ** tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
  1126. (http://bugs.gnu.org/14042)
  1127. ** Fix display of symbols containing backslashes.
  1128. (http://bugs.gnu.org/15033)
  1129. ** Fix truncated-print for uniform vectors.
  1130. ** Define `AF_UNIX' only when Unix-domain sockets are supported.
  1131. ** Decompiler: fix handling of empty 'case-lambda' expressions.
  1132. ** Fix handling of signed zeroes and infinities in 'numerator' and 'denominator'.
  1133. ** dereference-pointer: check for null pointer.
  1134. ** Optimizer: Numerical comparisons are not negatable, for correct NaN handling.
  1135. ** Compiler: Evaluate '-' and '/' in left-to-right order.
  1136. (for more robust floating-point arithmetic)
  1137. ** snarf.h: Declare static const function name vars as SCM_UNUSED.
  1138. ** chars.c: Remove duplicate 'const' specifiers.
  1139. ** Modify SCM_UNPACK type check to avoid warnings in clang.
  1140. ** Arrange so that 'file-encoding' does not truncate the encoding name.
  1141. (http://bugs.gnu.org/16463)
  1142. ** Improve error checking in bytevector->uint-list and bytevector->sint-list.
  1143. (http://bugs.gnu.org/15100)
  1144. ** Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum.
  1145. ** i18n: Fix null pointer dereference when locale info is missing.
  1146. ** Fix 'string-copy!' to work properly with overlapping src/dest.
  1147. ** Fix hashing of vectors to run in bounded time.
  1148. ** 'port-position' works on CBIPs that do not support 'set-port-position!'.
  1149. ** Custom binary input ports sanity-check the return value of 'read!'.
  1150. ** bdw-gc.h: Check SCM_USE_PTHREAD_THREADS using #if not #ifdef.
  1151. ** REPL Server: Don't establish a SIGINT handler.
  1152. ** REPL Server: Redirect warnings to client socket.
  1153. ** REPL Server: Improve robustness of 'stop-server-and-clients!'.
  1154. ** Add srfi-16, srfi-30, srfi-46, srfi-62, srfi-87 to %cond-expand-features.
  1155. ** Fix trap handlers to handle applicable structs.
  1156. (http://bugs.gnu.org/15691)
  1157. ** Fix optional end argument in `uniform-vector-read!'.
  1158. (http://bugs.gnu.org/15370)
  1159. ** Fix brainfuck->scheme compiler.
  1160. ** texinfo: Fix newline preservation in @example with lines beginning with @
  1161. ** C standards conformance improvements
  1162. Improvements and bug fixes were made to the C part of Guile's run-time
  1163. support (libguile).
  1164. *** Don't use the identifier 'noreturn'.
  1165. (http://bugs.gnu.org/15798)
  1166. *** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
  1167. *** Improve fallback implemention of SCM_SRS to avoid unspecified behavior.
  1168. *** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
  1169. *** Improve compliance with C standards regarding signed integer shifts.
  1170. *** Avoid signed overflow in random.c.
  1171. *** VM: Avoid signed overflows in 'add1' and 'sub1'.
  1172. *** VM: Avoid overflow in ASM_ADD when the result is most-positive-fixnum.
  1173. *** read: Avoid signed integer overflow in 'read_decimal_integer'.
  1174. Changes in 2.0.9 (since 2.0.7):
  1175. Note: 2.0.8 was a brown paper bag release that was never announced, but
  1176. some mirrors may have picked it up. Please do not use it.
  1177. * Notable changes
  1178. ** New keyword arguments for procedures that open files
  1179. The following procedures that open files now support keyword arguments
  1180. to request binary I/O or to specify the character encoding for text
  1181. files: `open-file', `open-input-file', `open-output-file',
  1182. `call-with-input-file', `call-with-output-file', `with-input-from-file',
  1183. `with-output-to-file', and `with-error-to-file'.
  1184. It is also now possible to specify whether Guile should scan files for
  1185. Emacs-style coding declarations. This scan was done by default in
  1186. versions 2.0.0 through 2.0.7, but now must be explicitly requested.
  1187. See "File Ports" in the manual for details.
  1188. ** Rewritten guile.m4
  1189. The `guile.m4' autoconf macros have been rewritten to use `guild' and
  1190. `pkg-config' instead of the deprecated `guile-config' (which itself
  1191. calls pkg-config).
  1192. There is also a new macro, `GUILE_PKG', which allows packages to select
  1193. the version of Guile that they want to compile against. See "Autoconf
  1194. Macros" in the manual, for more information.
  1195. ** Better Windows support
  1196. Guile now correctly identifies absolute paths on Windows (MinGW), and
  1197. creates files on that platform according to its path conventions. See
  1198. "File System" in the manual, for all details.
  1199. In addition, the new Gnulib imports provide `select' and `poll' on
  1200. Windows builds.
  1201. As an incompatible change, systems that are missing <sys/select.h> were
  1202. previously provided a public `scm_std_select' C function that defined a
  1203. version of `select', but unhappily it also provided its own incompatible
  1204. definitions for FD_SET, FD_ZERO, and other system interfaces. Guile
  1205. should not be setting these macros in public API, so this interface was
  1206. removed on those plaforms (basically only MinGW).
  1207. ** Numerics improvements
  1208. `number->string' now reliably outputs enough digits to produce the same
  1209. number when read back in. Previously, it mishandled subnormal numbers
  1210. (printing them as "#.#"), and failed to distinguish between some
  1211. distinct inexact numbers, e.g. 1.0 and (+ 1.0 (expt 2.0 -52)). These
  1212. problems had far-reaching implications, since the compiler uses
  1213. `number->string' to serialize numeric constants into .go files.
  1214. `sqrt' now produces exact rational results when possible, and handles
  1215. very large or very small numbers more robustly.
  1216. A number (ahem) of operations involving exact rationals have been
  1217. optimized, most notably `integer-expt' and `expt'.
  1218. `exact->inexact' now performs correct IEEE rounding.
  1219. ** New optimizations
  1220. There were a number of improvements to the partial evaluator, allowing
  1221. complete reduction of forms such as:
  1222. ((let ((_ 10)) (lambda () _)))
  1223. ((lambda _ _))
  1224. (apply (lambda _ _) 1 2 3 '(4))
  1225. (call-with-values (lambda () (values 1 2)) (lambda _ _))
  1226. `string-join' now handles huge lists efficiently.
  1227. `get-bytevector-some' now uses buffered input, which is much faster.
  1228. Finally, `array-ref', `array-set!' on arrays of rank 1 or 2 is now
  1229. faster, because it avoids building a rest list. Similarly, the
  1230. one-argument case of `array-for-each' and `array-map!' has been
  1231. optimized, and `array-copy!' and `array-fill!' are faster.
  1232. ** `peek-char' no longer consumes EOF
  1233. As required by the R5RS, if `peek-char' returns EOF, then the next read
  1234. will also return EOF. Previously `peek-char' would consume the EOF.
  1235. This makes a difference for terminal devices where it is possible to
  1236. read past an EOF.
  1237. ** Gnulib update
  1238. Guile's copy of Gnulib was updated to v0.0-7865-ga828bb2. The following
  1239. modules were imported from Gnulib: select, times, pipe-posix, fstat,
  1240. getlogin, poll, and c-strcase.
  1241. ** `include' resolves relative file names relative to including file
  1242. Given a relative file name, `include' will look for it relative to the
  1243. directory of the including file. This harmonizes the behavior of
  1244. `include' with that of `load'.
  1245. ** SLIB compatibility restored
  1246. Guile 2.0.8 is now compatible with SLIB. You will have to use a
  1247. development version of SLIB, however, until a new version of SLIB is
  1248. released.
  1249. ** Better ,trace REPL command
  1250. Sometimes the ,trace output for nested function calls could overflow the
  1251. terminal width, which wasn't useful. Now there is a limit to the amount
  1252. of space the prefix will take. See the documentation for ",trace" for
  1253. more information.
  1254. ** Better docstring syntax supported for `case-lambda'
  1255. Docstrings can now be placed immediately after the `case-lambda' or
  1256. `case-lambda*' keyword. See "Case-lambda" in the manual.
  1257. ** Improved handling of Unicode byte order marks
  1258. See "BOM Handling" in the manual for details.
  1259. ** Update predefined character sets to Unicode 6.2
  1260. ** GMP 4.2 or later required
  1261. Guile used to require GMP at least version 4.1 (released in May 2002),
  1262. and now requires at least version 4.2 (released in March 2006).
  1263. * Manual updates
  1264. ** Better SXML documentation
  1265. The documentation for SXML modules was much improved, though there is
  1266. still far to go. See "SXML" in manual.
  1267. ** Style updates
  1268. Use of "iff" was replaced with standard English. Keyword arguments are
  1269. now documented consistently, along with their default values.
  1270. ** An end to the generated-documentation experiment
  1271. When Guile 2.0 imported some modules from Guile-Lib, they came with a
  1272. system that generated documentation from docstrings and module
  1273. commentaries. This produced terrible documentation. We finally bit the
  1274. bullet and incorporated these modules into the main text, and will be
  1275. improving them manually over time, as is the case with SXML. Help is
  1276. appreciated.
  1277. ** New documentation
  1278. There is now documentation for `scm_array_type', and `scm_array_ref', as
  1279. well as for the new `array-length' / 'scm_c_array_length' /
  1280. `scm_array_length' functions. `array-in-bounds?' has better
  1281. documentation as well. The `program-arguments-alist' and
  1282. `program-lambda-list' functions are now documented, as well as `and=>',
  1283. `exit', and `quit'. The (system repl server) module is now documented
  1284. (see REPL Servers). Finally, the GOOPS class hierarchy diagram has been
  1285. regenerated for the web and print output formats.
  1286. * New deprecations
  1287. ** Deprecate generalized vector interface
  1288. The generalized vector interface, introduced in 1.8.0, is simply a
  1289. redundant, verbose interface to arrays of rank 1. `array-ref' and
  1290. similar functions are entirely sufficient. Thus,
  1291. `scm_generalized_vector_p', `scm_generalized_vector_length',
  1292. `scm_generalized_vector_ref', `scm_generalized_vector_set_x', and
  1293. `scm_generalized_vector_to_list' are now deprecated.
  1294. ** Deprecate SCM_CHAR_CODE_LIMIT and char-code-limit
  1295. These constants were defined to 256, which is not the highest codepoint
  1296. supported by Guile. Given that they were useless and incorrect, they
  1297. have been deprecated.
  1298. ** Deprecate `http-get*'
  1299. The new `#:streaming?' argument to `http-get' subsumes the functionality
  1300. of `http-get*' (introduced in 2.0.7). Also, the `#:extra-headers'
  1301. argument is deprecated in favor of `#:headers'.
  1302. ** Deprecate (ice-9 mapping)
  1303. This module, present in Guile since 1996 but never used or documented,
  1304. has never worked in Guile 2.0. It has now been deprecated and will be
  1305. removed in Guile 2.2.
  1306. ** Deprecate undocumented array-related C functions
  1307. These are `scm_array_fill_int', `scm_ra_eqp', `scm_ra_lessp',
  1308. `scm_ra_leqp', `scm_ra_grp', `scm_ra_greqp', `scm_ra_sum',
  1309. `scm_ra_product', `scm_ra_difference', `scm_ra_divide', and
  1310. `scm_array_identity'.
  1311. * New interfaces
  1312. ** SRFI-41 Streams
  1313. See "SRFI-41" in the manual.
  1314. ** SRFI-45 exports `promise?'
  1315. SRFI-45 now exports a `promise?' procedure that works with its promises.
  1316. Also, its promises now print more nicely.
  1317. ** New HTTP client procedures
  1318. See "Web Client" for documentation on the new `http-head', `http-post',
  1319. `http-put', `http-delete', `http-trace', and `http-options' procedures,
  1320. and also for more options to `http-get'.
  1321. ** Much more capable `xml->sxml'
  1322. See "Reading and Writing XML" for information on how the `xml->sxml'
  1323. parser deals with namespaces, processed entities, doctypes, and literal
  1324. strings. Incidentally, `current-ssax-error-port' is now a parameter
  1325. object.
  1326. ** New procedures for converting strings to and from bytevectors
  1327. See "Representing Strings as Bytes" for documention on the new `(ice-9
  1328. iconv)' module and its `bytevector->string' and `string->bytevector'
  1329. procedures.
  1330. ** Escape continuations with `call/ec' and `let/ec'
  1331. See "Prompt Primitives".
  1332. ** New procedures to read all characters from a port
  1333. See "Line/Delimited" in the manual for documentation on `read-string'
  1334. and `read-string!'.
  1335. ** New procedure `sendfile'
  1336. See "File System".
  1337. ** New procedure `unget-bytevector'
  1338. See "R6RS Binary Input".
  1339. ** New C helper: `scm_c_bind_keyword_arguments'
  1340. See "Keyword Procedures".
  1341. ** New command-line arguments: `--language' and `-C'
  1342. See "Command-line Options" in the manual.
  1343. ** New environment variables: `GUILE_STACK_SIZE', `GUILE_INSTALL_LOCALE'
  1344. See "Environment Variables".
  1345. ** New procedures for dealing with file names
  1346. See "File System" for documentation on `system-file-name-convention',
  1347. `file-name-separator?', `absolute-file-name?', and
  1348. `file-name-separator-string'.
  1349. ** `array-length', an array's first dimension
  1350. See "Array Procedures".
  1351. ** `hash-count', for hash tables
  1352. See "Hash Tables".
  1353. ** `round-ash', a bit-shifting operator that rounds on right-shift
  1354. See "Bitwise Operations".
  1355. ** New foreign types: `ssize_t', `ptrdiff_t'
  1356. See "Foreign Types".
  1357. ** New C helpers: `scm_from_ptrdiff_t', `scm_to_ptrdiff_t'
  1358. See "Integers".
  1359. ** Socket option `SO_REUSEPORT' now available from Scheme
  1360. If supported on the platform, `SO_REUSEPORT' is now available from
  1361. Scheme as well. See "Network Sockets and Communication".
  1362. ** `current-language' in default environment
  1363. Previously defined only in `(system base language)', `current-language'
  1364. is now defined in the default environment, and is used to determine the
  1365. language for the REPL, and for `compile-and-load'.
  1366. ** New procedure: `fluid->parameter'
  1367. See "Parameters", for information on how to convert a fluid to a
  1368. parameter.
  1369. ** New `print' REPL option
  1370. See "REPL Commands" in the manual for information on the new
  1371. user-customizable REPL printer.
  1372. ** New variable: %site-ccache-dir
  1373. The "Installing Site Packages" and "Build Config" manual sections now
  1374. refer to this variable to describe where users should install their
  1375. `.go' files.
  1376. * Build fixes
  1377. ** Fix compilation against libgc 7.3.
  1378. ** Fix cross-compilation of `c-tokenize.o'.
  1379. ** Fix warning when compiling against glibc 2.17.
  1380. ** Fix documentation build against Texinfo 5.0.
  1381. ** Fix building Guile from a directory with non-ASCII characters.
  1382. ** Fix native MinGW build.
  1383. ** Fix --disable-posix build.
  1384. ** Fix MinGW builds with networking, POSIX, and thread support.
  1385. * Bug fixes
  1386. ** Fix inexact number printer.
  1387. (http://bugs.gnu.org/13757)
  1388. ** Fix infinite loop when parsing optional-argument short options (SRFI-37).
  1389. (http://bugs.gnu.org/13176)
  1390. ** web: Support non-GMT date headers in the HTTP client.
  1391. (http://bugs.gnu.org/13544)
  1392. ** web: support IP-literal (IPv6 address) in Host header.
  1393. ** Avoid stack overflows with `par-map' and nested futures in general.
  1394. (http://bugs.gnu.org/13188)
  1395. ** Peek-char no longer consumes EOF.
  1396. (http://bugs.gnu.org/12216)
  1397. ** Avoid swallowing multiple EOFs in R6RS binary-input procedures.
  1398. ** A fork when multiple threads are running will now print a warning.
  1399. ** Allow for spurious wakeups from pthread_cond_wait.
  1400. (http://bugs.gnu.org/10641)
  1401. ** Warn and ignore module autoload failures.
  1402. (http://bugs.gnu.org/12202)
  1403. ** Use chmod portably in (system base compile).
  1404. (http://bugs.gnu.org/10474)
  1405. ** Fix response-body-port for HTTP responses without content-length.
  1406. (http://bugs.gnu.org/13857)
  1407. ** Allow case-lambda expressions with no clauses.
  1408. (http://bugs.gnu.org/9776)
  1409. ** Improve standards conformance of string->number.
  1410. (http://bugs.gnu.org/11887)
  1411. ** Support calls and tail-calls with more than 255 formals.
  1412. ** ,option evaluates its right-hand-side.
  1413. (http://bugs.gnu.org/13076)
  1414. ** Structs with tail arrays are not simple.
  1415. (http://bugs.gnu.org/12808)
  1416. ** Make `SCM_LONG_BIT' usable in preprocessor conditionals.
  1417. (http://bugs.gnu.org/13848)
  1418. ** Fix thread-unsafe lazy initializations.
  1419. ** Allow SMOB mark procedures to be called from parallel markers.
  1420. (http://bugs.gnu.org/13611)
  1421. ** Fix later-bindings-win logic in with-fluids.
  1422. (http://bugs.gnu.org/13843)
  1423. ** Fix duplicate removal of with-fluids.
  1424. (http://bugs.gnu.org/13838)
  1425. ** Support calling foreign functions of 10 arguments or more.
  1426. (http://bugs.gnu.org/13809)
  1427. ** Let reverse! accept arbitrary types as second argument.
  1428. (http://bugs.gnu.org/13835)
  1429. ** Recognize the `x86_64.*-gnux32' triplet.
  1430. ** Check whether a triplet's OS part specifies an ABI.
  1431. ** Recognize mips64* as having 32-bit pointers by default.
  1432. ** Use portable sed constructs.
  1433. (http://bugs.gnu.org/14042)
  1434. ** Remove language/glil/decompile-assembly.scm.
  1435. (http://bugs.gnu.org/10622)
  1436. ** Use O_BINARY in `copy-file', `load-objcode', `mkstemp'.
  1437. ** Use byte-oriented functions in `get-bytevector*'.
  1438. ** Fix abort when iconv swallows BOM from UTF-16 or UTF-32 stream.
  1439. ** Fix compilation of functions with more than 255 local variables.
  1440. ** Fix `getgroups' for when zero supplementary group IDs exist.
  1441. ** Allow (define-macro name (lambda ...)).
  1442. ** Various fixes to the (texinfo) modules.
  1443. ** guild: Gracefully handle failures to install the locale.
  1444. ** Fix format string warnings for ~!, ~|, ~/, ~q, ~Q, and ~^.
  1445. (http://bugs.gnu.org/13485)
  1446. ** Fix source annotation bug in psyntax 'expand-body'.
  1447. ** Ecmascript: Fix conversion to boolean for non-numbers.
  1448. ** Use case-insensitive comparisons for encoding names.
  1449. ** Add missing cond-expand feature identifiers.
  1450. ** A failure to find a module's file does not prevent future loading.
  1451. ** Many (oop goops save) fixes.
  1452. ** `http-get': don't shutdown write end of socket.
  1453. (http://bugs.gnu.org/13095)
  1454. ** Avoid signed integer overflow in scm_product.
  1455. ** http: read-response-body always returns bytevector or #f, never EOF.
  1456. ** web: Correctly detect "No route to host" conditions.
  1457. ** `system*': failure to execvp no longer leaks dangling processes.
  1458. (http://bugs.gnu.org/13166)
  1459. ** More sensible case-lambda* dispatch.
  1460. (http://bugs.gnu.org/12929)
  1461. ** Do not defer expansion of internal define-syntax forms.
  1462. (http://bugs.gnu.org/13509)
  1463. Changes in 2.0.7 (since 2.0.6):
  1464. * Notable changes
  1465. ** SRFI-105 curly infix expressions are supported
  1466. Curly infix expressions as described at
  1467. http://srfi.schemers.org/srfi-105/srfi-105.html are now supported by
  1468. Guile's reader. This allows users to write things like {a * {b + c}}
  1469. instead of (* a (+ b c)). SRFI-105 support is enabled by using the
  1470. `#!curly-infix' directive in source code, or the `curly-infix' reader
  1471. option. See the manual for details.
  1472. ** Reader options may now be per-port
  1473. Historically, `read-options' and related procedures would manipulate
  1474. global options, affecting the `read' procedure for all threads, and all
  1475. current uses of `read'.
  1476. Guile can now associate `read' options with specific ports, allowing
  1477. different ports to use different options. For instance, the
  1478. `#!fold-case' and `#!no-fold-case' reader directives have been
  1479. implemented, and their effect is to modify the current read options of
  1480. the current port only; similarly for `#!curly-infix'. Thus, it is
  1481. possible, for instance, to have one port reading case-sensitive code,
  1482. while another port reads case-insensitive code.
  1483. ** Futures may now be nested
  1484. Futures may now be nested: a future can itself spawn and then `touch'
  1485. other futures. In addition, any thread that touches a future that has
  1486. not completed now processes other futures while waiting for the touched
  1487. future to completed. This allows all threads to be kept busy, and was
  1488. made possible by the use of delimited continuations (see the manual for
  1489. details.)
  1490. Consequently, `par-map' and `par-for-each' have been rewritten and can
  1491. now use all cores.
  1492. ** `GUILE_LOAD_PATH' et al can now add directories to the end of the path
  1493. `GUILE_LOAD_PATH' and `GUILE_LOAD_COMPILED_PATH' can now be used to add
  1494. directories to both ends of the load path. If the special path
  1495. component `...' (ellipsis) is present in these environment variables,
  1496. then the default path is put in place of the ellipsis, otherwise the
  1497. default path is placed at the end. See "Environment Variables" in the
  1498. manual for details.
  1499. ** `load-in-vicinity' search for `.go' files in `%load-compiled-path'
  1500. Previously, `load-in-vicinity' would look for compiled files in the
  1501. auto-compilation cache, but not in `%load-compiled-path'. This is now
  1502. fixed. This affects `load', and the `-l' command-line flag. See
  1503. <http://bugs.gnu.org/12519> for details.
  1504. ** Extension search order fixed, and LD_LIBRARY_PATH preserved
  1505. Up to 2.0.6, Guile would modify the `LD_LIBRARY_PATH' environment
  1506. variable (or whichever is relevant for the host OS) to insert its own
  1507. default extension directories in the search path (using GNU libltdl
  1508. facilities was not possible here.) This approach was problematic in two
  1509. ways.
  1510. First, the `LD_LIBRARY_PATH' modification would be visible to
  1511. sub-processes, and would also affect future calls to `dlopen', which
  1512. could lead to subtle bugs in the application or sub-processes. Second,
  1513. when the installation prefix is /usr, the `LD_LIBRARY_PATH' modification
  1514. would typically end up inserting /usr/lib before /usr/local/lib in the
  1515. search path, which is often the opposite of system-wide settings such as
  1516. `ld.so.conf'.
  1517. Both issues have now been fixed.
  1518. ** `make-vtable-vtable' is now deprecated
  1519. Programs should instead use `make-vtable' and `<standard-vtable>'.
  1520. ** The `-Wduplicate-case-datum' and `-Wbad-case-datum' are enabled
  1521. These recently introduced warnings have been documented and are now
  1522. enabled by default when auto-compiling.
  1523. ** Optimize calls to `equal?' or `eqv?' with a constant argument
  1524. The compiler simplifies calls to `equal?' or `eqv?' with a constant
  1525. argument to use `eq?' instead, when applicable.
  1526. * Manual updates
  1527. ** SRFI-9 records now documented under "Compound Data Types"
  1528. The documentation of SRFI-9 record types has been moved in the "Compound
  1529. Data Types", next to Guile's other record APIs. A new section
  1530. introduces the various record APIs, and describes the trade-offs they
  1531. make. These changes were made in an attempt to better guide users
  1532. through the maze of records API, and to recommend SRFI-9 as the main
  1533. API.
  1534. The documentation of Guile's raw `struct' API has also been improved.
  1535. ** (ice-9 and-let-star) and (ice-9 curried-definitions) now documented
  1536. These modules were missing from the manual.
  1537. * New interfaces
  1538. ** New "functional record setters" as a GNU extension of SRFI-9
  1539. The (srfi srfi-9 gnu) module now provides three new macros to deal with
  1540. "updates" of immutable records: `define-immutable-record-type',
  1541. `set-field', and `set-fields'.
  1542. The first one allows record type "functional setters" to be defined;
  1543. such setters keep the record unchanged, and instead return a new record
  1544. with only one different field. The remaining macros provide the same
  1545. functionality, and also optimize updates of multiple or nested fields.
  1546. See the manual for details.
  1547. ** web: New `http-get*', `response-body-port', and `text-content-type?'
  1548. procedures
  1549. These procedures return a port from which to read the response's body.
  1550. Unlike `http-get' and `read-response-body', they allow the body to be
  1551. processed incrementally instead of being stored entirely in memory.
  1552. The `text-content-type?' predicate allows users to determine whether the
  1553. content type of a response is textual.
  1554. See the manual for details.
  1555. ** `string-split' accepts character sets and predicates
  1556. The `string-split' procedure can now be given a SRFI-14 character set or
  1557. a predicate, instead of just a character.
  1558. ** R6RS SRFI support
  1559. Previously, in R6RS modules, Guile incorrectly ignored components of
  1560. SRFI module names after the SRFI number, making it impossible to specify
  1561. sub-libraries. This release corrects this, bringing us into accordance
  1562. with SRFI 97.
  1563. ** `define-public' is no a longer curried definition by default
  1564. The (ice-9 curried-definitions) should be used for such uses. See the
  1565. manual for details.
  1566. * Build fixes
  1567. ** Remove reference to `scm_init_popen' when `fork' is unavailable
  1568. This fixes a MinGW build issue (http://bugs.gnu.org/12477).
  1569. ** Fix race between installing `guild' and the `guile-tools' symlink
  1570. * Bug fixes
  1571. ** Procedures returned by `eval' now have docstrings
  1572. (http://bugs.gnu.org/12173)
  1573. ** web client: correctly handle uri-query, etc. in relative URI headers
  1574. (http://bugs.gnu.org/12827)
  1575. ** Fix docs for R6RS `hashtable-copy'
  1576. ** R6RS `string-for-each' now accepts multiple string arguments
  1577. ** Fix out-of-range error in the compiler's CSE pass
  1578. (http://bugs.gnu.org/12883)
  1579. ** Add missing R6RS `open-file-input/output-port' procedure
  1580. ** Futures: Avoid creating the worker pool more than once
  1581. ** Fix invalid assertion about mutex ownership in threads.c
  1582. (http://bugs.gnu.org/12719)
  1583. ** Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'
  1584. ** The `scandir' procedure now uses `lstat' instead of `stat'
  1585. ** Fix `generalized-vector->list' indexing bug with shared arrays
  1586. (http://bugs.gnu.org/12465)
  1587. ** web: Change `http-get' to try all the addresses for the given URI
  1588. ** Implement `hash' for structs
  1589. (http://lists.gnu.org/archive/html/guile-devel/2012-10/msg00031.html)
  1590. ** `read' now adds source properties for data types beyond pairs
  1591. ** Improve error reporting in `append!'
  1592. ** In fold-matches, set regexp/notbol unless matching string start
  1593. ** Don't stat(2) and access(2) the .go location before using it
  1594. ** SRFI-19: use zero padding for hours in ISO 8601 format, not blanks
  1595. ** web: Fix uri-encoding for strings with no unreserved chars, and octets 0-15
  1596. ** More robust texinfo alias handling
  1597. ** Optimize `format' and `simple-format'
  1598. (http://bugs.gnu.org/12033)
  1599. ** Angle of -0.0 is pi, not zero
  1600. Changes in 2.0.6 (since 2.0.5):
  1601. * Notable changes
  1602. ** New optimization pass: common subexpression elimination (CSE)
  1603. Guile's optimizer will now run a CSE pass after partial evaluation.
  1604. This pass propagates static information about branches taken, bound
  1605. lexicals, and effects from an expression's dominators. It can replace
  1606. common subexpressions with their boolean values (potentially enabling
  1607. dead code elimination), equivalent bound lexicals, or it can elide them
  1608. entirely, depending on the context in which they are executed. This
  1609. pass is especially useful in removing duplicate type checks, such as
  1610. those produced by SRFI-9 record accessors.
  1611. ** Improvements to the partial evaluator
  1612. Peval can now hoist tests that are common to both branches of a
  1613. conditional into the test. This can help with long chains of
  1614. conditionals, such as those generated by the `match' macro. Peval can
  1615. now do simple beta-reductions of procedures with rest arguments. It
  1616. also avoids residualizing degenerate lexical aliases, even when full
  1617. inlining is not possible. Finally, peval now uses the effects analysis
  1618. introduced for the CSE pass. More precise effects analysis allows peval
  1619. to move more code.
  1620. ** Run finalizers asynchronously in asyncs
  1621. Finalizers are now run asynchronously, via an async. See Asyncs in the
  1622. manual. This allows Guile and user code to safely allocate memory while
  1623. holding a mutex.
  1624. ** Update SRFI-14 character sets to Unicode 6.1
  1625. Note that this update causes the Latin-1 characters `§' and `¶' to be
  1626. reclassified as punctuation. They were previously considered to be part
  1627. of `char-set:symbol'.
  1628. ** Better source information for datums
  1629. When the `positions' reader option is on, as it is by default, Guile's
  1630. reader will record source information for more kinds of datums.
  1631. ** Improved error and warning messages
  1632. `syntax-violation' errors now prefer `subform' for source info, with
  1633. `form' as fallback. Syntactic errors in `cond' and `case' now produce
  1634. better errors. `case' can now warn on duplicate datums, or datums that
  1635. cannot be usefully compared with `eqv?'. `-Warity-mismatch' now handles
  1636. applicable structs. `-Wformat' is more robust in the presence of
  1637. `gettext'. Finally, various exceptions thrown by the Web modules now
  1638. define appropriate exception printers.
  1639. ** A few important bug fixes in the HTTP modules.
  1640. Guile's web server framework now checks if an application returns a body
  1641. where it is not permitted, for example in response to a HEAD request,
  1642. and warn or truncate the response as appropriate. Bad requests now
  1643. cause a 400 Bad Request response to be printed before closing the port.
  1644. Finally, some date-printing and URL-parsing bugs were fixed.
  1645. ** Pretty-print improvements
  1646. When Guile needs to pretty-print Tree-IL, it will try to reconstruct
  1647. `cond', `or`, and other derived syntax forms from the primitive tree-IL
  1648. forms. It also uses the original names instead of the fresh unique
  1649. names, when it is unambiguous to do so. This can be seen in the output
  1650. of REPL commands like `,optimize'.
  1651. Also, the `pretty-print' procedure has a new keyword argument,
  1652. `#:max-expr-width'.
  1653. ** Fix memory leak involving applicable SMOBs
  1654. At some point in the 1.9.x series, Guile began leaking any applicable
  1655. SMOB that was actually applied. (There was a weak-key map from SMOB to
  1656. trampoline functions, where the value had a strong reference on the
  1657. key.) This has been fixed. There was much rejoicing!
  1658. ** Support for HTTP/1.1 chunked transfer coding
  1659. See "Transfer Codings" in the manual, for more.
  1660. ** Micro-optimizations
  1661. A pile of micro-optimizations: the `string-trim' function when called
  1662. with `char-set:whitespace'; the `(web http)' parsers; SMOB application;
  1663. conversion of raw UTF-8 and UTF-32 data to and from SCM strings; vlists
  1664. and vhashes; `read' when processing string literals.
  1665. ** Incompatible change to `scandir'
  1666. As was the original intention, `scandir' now runs the `select?'
  1667. procedure on all items, including subdirectories and the `.' and `..'
  1668. entries. It receives the basename of the file in question instead of
  1669. the full name. We apologize for this incompatible change to this
  1670. function introduced in the 2.0.4 release.
  1671. * Manual updates
  1672. The manual has been made much more consistent in its naming conventions
  1673. with regards to formal parameters of functions. Thanks to Bake Timmons.
  1674. * New interfaces
  1675. ** New C function: `scm_to_pointer'
  1676. ** New C inline functions: `scm_new_smob', `scm_new_double_smob'
  1677. ** (ice-9 format): Add ~h specifier for localized number output.
  1678. ** (web response): New procedure: `response-must-not-include-body?'
  1679. ** New predicate: 'supports-source-properties?'
  1680. ** New C helpers: `scm_c_values', `scm_c_nvalues'
  1681. ** Newly public inline C function: `scm_unget_byte'
  1682. ** (language tree-il): New functions: `tree-il=?', `tree-il-hash'
  1683. ** New fluid: `%default-port-conversion-strategy'
  1684. ** New syntax: `=>' within `case'
  1685. ** (web http): `make-chunked-input-port', `make-chunked-output-port'
  1686. ** (web http): `declare-opaque-header!'
  1687. Search the manual for these identifiers, for more information.
  1688. * New deprecations
  1689. ** `close-io-port' deprecated
  1690. Use `close-port'.
  1691. ** `scm_sym2var' deprecated
  1692. In most cases, replace with `scm_lookup' or `scm_module_variable'. Use
  1693. `scm_define' or `scm_module_ensure_local_variable' if the second
  1694. argument is nonzero. See "Accessing Modules from C" in the manual, for
  1695. full details.
  1696. ** Lookup closures deprecated
  1697. These were never documented. See "Module System Reflection" in the
  1698. manual for replacements.
  1699. * Build fixes
  1700. ** Fix compilation against uninstalled Guile on non-GNU platforms.
  1701. ** Fix `SCM_I_ERROR' definition for MinGW without networking.
  1702. ** Fix compilation with the Sun C compiler.
  1703. ** Fix check for `clock_gettime' on OpenBSD and some other systems.
  1704. ** Fix build with --enable-debug-malloc.
  1705. ** Honor $(program_transform_name) for the `guile-tools' symlink.
  1706. ** Fix cross-compilation of GOOPS-using code.
  1707. * Bug fixes
  1708. ** Fix use of unitialized stat buffer in search-path of absolute paths.
  1709. ** Avoid calling `freelocale' with a NULL argument.
  1710. ** Work around erroneous tr_TR locale in Darwin 8 in tests.
  1711. ** Fix `getaddrinfo' test for Darwin 8.
  1712. ** Use Gnulib's `regex' module for better regex portability.
  1713. ** `source-properties' and friends work on any object
  1714. ** Rewrite open-process in C, for robustness related to threads and fork
  1715. ** Fix <TAG>vector-length when applied to other uniform vector types
  1716. ** Fix escape-only prompt optimization (was disabled previously)
  1717. ** Fix a segfault when /dev/urandom is not accessible
  1718. ** Fix flush on soft ports, so that it actually runs.
  1719. ** Better compatibility of SRFI-9 records with core records
  1720. ** Fix and clarify documentation of `sorted?'.
  1721. ** Fix IEEE-754 endianness conversion in bytevectors.
  1722. ** Correct thunk check in the `wind' instruction.
  1723. ** Add @acronym support to texinfo modules
  1724. ** Fix docbook->texi for <ulink> without URL
  1725. ** Fix `setvbuf' to leave the line/column number unchanged.
  1726. ** Add missing public declaration for `scm_take_from_input_buffers'.
  1727. ** Fix relative file name canonicalization with empty %LOAD-PATH entries.
  1728. ** Import newer (ice-9 match) from Chibi-Scheme.
  1729. ** Fix unbound variables and unbound values in ECMAScript runtime.
  1730. ** Make SRFI-6 string ports Unicode-capable.
  1731. Changes in 2.0.5 (since 2.0.4):
  1732. This release fixes the binary interface information (SONAME) of
  1733. libguile, which was incorrect in 2.0.4. It does not contain other
  1734. changes.
  1735. Changes in 2.0.4 (since 2.0.3):
  1736. * Notable changes
  1737. ** Better debuggability for interpreted procedures.
  1738. Guile 2.0 came with a great debugging experience for compiled
  1739. procedures, but the story for interpreted procedures was terrible. Now,
  1740. at least, interpreted procedures have names, and the `arity' procedure
  1741. property is always correct (or, as correct as it can be, in the presence
  1742. of `case-lambda').
  1743. ** Support for cross-compilation.
  1744. One can now use a native Guile to cross-compile `.go' files for a
  1745. different architecture. See the documentation for `--target' in the
  1746. "Compilation" section of the manual, for information on how to use the
  1747. cross-compiler. See the "Cross building Guile" section of the README,
  1748. for more on how to cross-compile Guile itself.
  1749. ** The return of `local-eval'.
  1750. Back by popular demand, `the-environment' and `local-eval' allow the
  1751. user to capture a lexical environment, and then evaluate arbitrary
  1752. expressions in that context. There is also a new `local-compile'
  1753. command. See "Local Evaluation" in the manual, for more. Special
  1754. thanks to Mark Weaver for an initial implementation of this feature.
  1755. ** Fluids can now have default values.
  1756. Fluids are used for dynamic and thread-local binding. They have always
  1757. inherited their values from the context or thread that created them.
  1758. However, there was a case in which a new thread would enter Guile, and
  1759. the default values of all the fluids would be `#f' for that thread.
  1760. This has now been fixed so that `make-fluid' has an optional default
  1761. value for fluids in unrelated dynamic roots, which defaults to `#f'.
  1762. ** Garbage collector tuning.
  1763. The garbage collector has now been tuned to run more often under some
  1764. circumstances.
  1765. *** Unmanaged allocation
  1766. The new `scm_gc_register_allocation' function will notify the collector
  1767. of unmanaged allocation. This will cause the collector to run sooner.
  1768. Guile's `scm_malloc', `scm_calloc', and `scm_realloc' unmanaged
  1769. allocators eventually call this function. This leads to better
  1770. performance under steady-state unmanaged allocation.
  1771. *** Transient allocation
  1772. When the collector runs, it will try to record the total memory
  1773. footprint of a process, if the platform supports this information. If
  1774. the memory footprint is growing, the collector will run more frequently.
  1775. This reduces the increase of the resident size of a process in response
  1776. to a transient increase in allocation.
  1777. *** Management of threads, bignums
  1778. Creating a thread will allocate a fair amount of memory. Guile now does
  1779. some GC work (using `GC_collect_a_little') when allocating a thread.
  1780. This leads to a better memory footprint when creating many short-lived
  1781. threads.
  1782. Similarly, bignums can occupy a lot of memory. Guile now offers hooks
  1783. to enable custom GMP allocators that end up calling
  1784. `scm_gc_register_allocation'. These allocators are enabled by default
  1785. when running Guile from the command-line. To enable them in libraries,
  1786. set the `scm_install_gmp_memory_functions' variable to a nonzero value
  1787. before loading Guile.
  1788. ** SRFI-39 parameters are available by default.
  1789. Guile now includes support for parameters, as defined by SRFI-39, in the
  1790. default environment. See "Parameters" in the manual, for more
  1791. information. `current-input-port', `current-output-port', and
  1792. `current-error-port' are now parameters.
  1793. ** Add `current-warning-port'.
  1794. Guile now outputs warnings on a separate port, `current-warning-port',
  1795. initialized to the value that `current-error-port' has on startup.
  1796. ** Syntax parameters.
  1797. Following Racket's lead, Guile now supports syntax parameters. See
  1798. "Syntax parameters" in the manual, for more.
  1799. Also see Barzilay, Culpepper, and Flatt's 2011 SFP workshop paper,
  1800. "Keeping it Clean with syntax-parameterize".
  1801. ** Parse command-line arguments from the locale encoding.
  1802. Guile now attempts to parse command-line arguments using the user's
  1803. locale. However for backwards compatibility with other 2.0.x releases,
  1804. it does so without actually calling `setlocale'. Please report any bugs
  1805. in this facility to bug-guile@gnu.org.
  1806. ** One-armed conditionals: `when' and `unless'
  1807. Guile finally has `when' and `unless' in the default environment. Use
  1808. them whenever you would use an `if' with only one branch. See
  1809. "Conditionals" in the manual, for more.
  1810. ** `current-filename', `add-to-load-path'
  1811. There is a new form, `(current-filename)', which expands out to the
  1812. source file in which it occurs. Combined with the new
  1813. `add-to-load-path', this allows simple scripts to easily add nearby
  1814. directories to the load path. See "Load Paths" in the manual, for more.
  1815. ** `random-state-from-platform'
  1816. This procedure initializes a random seed using good random sources
  1817. available on your platform, such as /dev/urandom. See "Random Number
  1818. Generation" in the manual, for more.
  1819. ** Warn about unsupported `simple-format' options.
  1820. The `-Wformat' compilation option now reports unsupported format options
  1821. passed to `simple-format'.
  1822. ** Manual updates
  1823. Besides the sections already mentioned, the following manual sections
  1824. are new in this release: "Modules and the File System", "Module System
  1825. Reflection", "Syntax Transformer Helpers", and "Local Inclusion".
  1826. * New interfaces
  1827. ** (ice-9 session): `apropos-hook'
  1828. ** New print option: `escape-newlines', defaults to #t.
  1829. ** (ice-9 ftw): `file-system-fold', `file-system-tree', `scandir'
  1830. ** `scm_c_value_ref': access to multiple returned values from C
  1831. ** scm_call (a varargs version), scm_call_7, scm_call_8, scm_call_9
  1832. ** Some new syntax helpers in (system syntax)
  1833. Search the manual for these identifiers and modules, for more.
  1834. * Build fixes
  1835. ** FreeBSD build fixes.
  1836. ** OpenBSD compilation fixes.
  1837. ** Solaris 2.10 test suite fixes.
  1838. ** IA64 compilation fix.
  1839. ** MinGW build fixes.
  1840. ** Work around instruction reordering on SPARC and HPPA in the VM.
  1841. ** Gnulib updates: added `dirfd', `setenv' modules.
  1842. * Bug fixes
  1843. ** Add a deprecated alias for $expt.
  1844. ** Add an exception printer for `getaddrinfo-error'.
  1845. ** Add deprecated shim for `scm_display_error' with stack as first argument.
  1846. ** Add warnings for unsupported `simple-format' options.
  1847. ** Allow overlapping regions to be passed to `bytevector-copy!'.
  1848. ** Better function prologue disassembly
  1849. ** Compiler: fix miscompilation of (values foo ...) in some contexts.
  1850. ** Compiler: fix serialization of #nil-terminated lists.
  1851. ** Compiler: allow values bound in non-tail let expressions to be collected.
  1852. ** Deprecate SCM_ASRTGO.
  1853. ** Document invalidity of (begin) as expression; add back-compat shim.
  1854. ** Don't leak file descriptors when mmaping objcode.
  1855. ** Empty substrings no longer reference the original stringbuf.
  1856. ** FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.
  1857. ** FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
  1858. ** FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
  1859. ** FFI: Properly unpack small integer return values in closure call.
  1860. ** Fix R6RS `fold-left' so the accumulator is the first argument.
  1861. ** Fix bit-set*! bug from 2005.
  1862. ** Fix bug in `make-repl' when `lang' is actually a <language>.
  1863. ** Fix bugs related to mutation, the null string, and shared substrings.
  1864. ** Fix <dynwind> serialization.
  1865. ** Fix erroneous check in `set-procedure-properties!'.
  1866. ** Fix generalized-vector-{ref,set!} for slices.
  1867. ** Fix error messages involving definition forms.
  1868. ** Fix primitive-eval to return #<unspecified> for definitions.
  1869. ** HTTP: Extend handling of "Cache-Control" header.
  1870. ** HTTP: Fix qstring writing of cache-extension values
  1871. ** HTTP: Fix validators for various list-style headers.
  1872. ** HTTP: Permit non-date values for Expires header.
  1873. ** HTTP: `write-request-line' writes absolute paths, not absolute URIs.
  1874. ** Hack the port-column of current-output-port after printing a prompt.
  1875. ** Make sure `regexp-quote' tests use Unicode-capable string ports.
  1876. ** Peval: Fix bugs in the new optimizer.
  1877. ** Statistically unique marks and labels, for robust hygiene across sessions.
  1878. ** Web: Allow URIs with empty authorities, like "file:///etc/hosts".
  1879. ** `,language' at REPL sets the current-language fluid.
  1880. ** `primitive-load' returns the value(s) of the last expression.
  1881. ** `scm_from_stringn' always returns unique strings.
  1882. ** `scm_i_substring_copy' tries to narrow the substring.
  1883. ** i18n: Fix gc_malloc/free mismatch on non-GNU systems.
  1884. Changes in 2.0.3 (since 2.0.2):
  1885. * Speed improvements
  1886. ** Guile has a new optimizer, `peval'.
  1887. `Peval' is a partial evaluator that performs constant folding, dead code
  1888. elimination, copy propagation, and inlining. By default it runs on
  1889. every piece of code that Guile compiles, to fold computations that can
  1890. happen at compile-time, so they don't have to happen at runtime.
  1891. If we did our job right, the only impact you would see would be your
  1892. programs getting faster. But if you notice slowdowns or bloated code,
  1893. please send a mail to bug-guile@gnu.org with details.
  1894. Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
  1895. peval and its implementation.
  1896. You can see what peval does on a given piece of code by running the new
  1897. `,optimize' REPL meta-command, and comparing it to the output of
  1898. `,expand'. See "Compile Commands" in the manual, for more.
  1899. ** Fewer calls to `stat'.
  1900. Guile now stats only the .go file and the .scm file when loading a fresh
  1901. compiled file.
  1902. * Notable changes
  1903. ** New module: `(web client)', a simple synchronous web client.
  1904. See "Web Client" in the manual, for more.
  1905. ** Users can now install compiled `.go' files.
  1906. See "Installing Site Packages" in the manual.
  1907. ** Remove Front-Cover and Back-Cover text from the manual.
  1908. The manual is still under the GNU Free Documentation License, but no
  1909. longer has any invariant sections.
  1910. ** More helpful `guild help'.
  1911. `guild' is Guile's multi-tool, for use in shell scripting. Now it has a
  1912. nicer interface for querying the set of existing commands, and getting
  1913. help on those commands. Try it out and see!
  1914. ** New macro: `define-syntax-rule'
  1915. `define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
  1916. one clause. See "Syntax Rules" in the manual, for more.
  1917. ** The `,time' REPL meta-command now has more precision.
  1918. The output of this command now has microsecond precision, instead of
  1919. 10-millisecond precision.
  1920. ** `(ice-9 match)' can now match records.
  1921. See "Pattern Matching" in the manual, for more on matching records.
  1922. ** New module: `(language tree-il debug)'.
  1923. This module provides a tree-il verifier. This is useful for people that
  1924. generate tree-il, usually as part of a language compiler.
  1925. ** New functions: `scm_is_exact', `scm_is_inexact'.
  1926. These provide a nice C interface for Scheme's `exact?' and `inexact?',
  1927. respectively.
  1928. * Bugs fixed
  1929. See the git log (or the ChangeLog) for more details on these bugs.
  1930. ** Fix order of importing modules and resolving duplicates handlers.
  1931. ** Fix a number of bugs involving extended (merged) generics.
  1932. ** Fix invocation of merge-generics duplicate handler.
  1933. ** Fix write beyond array end in arrays.c.
  1934. ** Fix read beyond end of hashtable size array in hashtab.c.
  1935. ** (web http): Locale-independent parsing and serialization of dates.
  1936. ** Ensure presence of Host header in HTTP/1.1 requests.
  1937. ** Fix take-right and drop-right for improper lists.
  1938. ** Fix leak in get_current_locale().
  1939. ** Fix recursive define-inlinable expansions.
  1940. ** Check that srfi-1 procedure arguments are procedures.
  1941. ** Fix r6rs `map' for multiple returns.
  1942. ** Fix scm_tmpfile leak on POSIX platforms.
  1943. ** Fix a couple of leaks (objcode->bytecode, make-boot-program).
  1944. ** Fix guile-lib back-compatibility for module-stexi-documentation.
  1945. ** Fix --listen option to allow other ports.
  1946. ** Fix scm_to_latin1_stringn for substrings.
  1947. ** Fix compilation of untyped arrays of rank not 1.
  1948. ** Fix unparse-tree-il of <dynset>.
  1949. ** Fix reading of #||||#.
  1950. ** Fix segfault in GOOPS when class fields are redefined.
  1951. ** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
  1952. Changes in 2.0.2 (since 2.0.1):
  1953. * Notable changes
  1954. ** `guile-tools' renamed to `guild'
  1955. The new name is shorter. Its intended future use is for a CPAN-like
  1956. system for Guile wizards and journeyfolk to band together to share code;
  1957. hence the name. `guile-tools' is provided as a backward-compatible
  1958. symbolic link. See "Using Guile Tools" in the manual, for more.
  1959. ** New control operators: `shift' and `reset'
  1960. See "Shift and Reset" in the manual, for more information.
  1961. ** `while' as an expression
  1962. Previously the return value of `while' was unspecified. Now its
  1963. values are specified both in the case of normal termination, and via
  1964. termination by invoking `break', possibly with arguments. See "while
  1965. do" in the manual for more.
  1966. ** Disallow access to handles of weak hash tables
  1967. `hash-get-handle' and `hash-create-handle!' are no longer permitted to
  1968. be called on weak hash tables, because the fields in a weak handle could
  1969. be nulled out by the garbage collector at any time, but yet they are
  1970. otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
  1971. instead.
  1972. ** More precision for `get-internal-run-time', `get-internal-real-time'
  1973. On 64-bit systems which support POSIX clocks, Guile's internal timing
  1974. procedures offer nanosecond resolution instead of the 10-millisecond
  1975. resolution previously available. 32-bit systems now use 1-millisecond
  1976. timers.
  1977. ** Guile now measures time spent in GC
  1978. `gc-stats' now returns a meaningful value for `gc-time-taken'.
  1979. ** Add `gcprof'
  1980. The statprof profiler now exports a `gcprof' procedure, driven by the
  1981. `after-gc-hook', to see which parts of your program are causing GC. Let
  1982. us know if you find it useful.
  1983. ** `map', `for-each' and some others now implemented in Scheme
  1984. We would not mention this in NEWS, as it is not a user-visible change,
  1985. if it were not for one thing: `map' and `for-each' are no longer
  1986. primitive generics. Instead they are normal bindings, which can be
  1987. wrapped by normal generics. This fixes some modularity issues between
  1988. core `map', SRFI-1 `map', and GOOPS.
  1989. Also it's pretty cool that we can do this without a performance impact.
  1990. ** Add `scm_peek_byte_or_eof'.
  1991. This helper is like `scm_peek_char_or_eof', but for bytes instead of
  1992. full characters.
  1993. ** Implement #:stop-at-first-non-option option for getopt-long
  1994. See "getopt-long Reference" in the manual, for more information.
  1995. ** Improve R6RS conformance for conditions in the I/O libraries
  1996. The `(rnrs io simple)' module now raises the correct R6RS conditions in
  1997. error cases. `(rnrs io ports)' is also more correct now, though it is
  1998. still a work in progress.
  1999. ** All deprecated routines emit warnings
  2000. A few deprecated routines were lacking deprecation warnings. This has
  2001. been fixed now.
  2002. * Speed improvements
  2003. ** Constants in compiled code now share state better
  2004. Constants with shared state, like `("foo")' and `"foo"', now share state
  2005. as much as possible, in the entire compilation unit. This cuts compiled
  2006. `.go' file sizes in half, generally, and speeds startup.
  2007. ** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
  2008. These procedures are now twice as fast as they were.
  2009. ** UTF-8 ports to bypass `iconv' entirely
  2010. This reduces memory usage in a very common case.
  2011. ** Compiler speedups
  2012. The compiler is now about 40% faster. (Note that this is only the case
  2013. once the compiler is itself compiled, so the build still takes as long
  2014. as it did before.)
  2015. ** VM speed tuning
  2016. Some assertions that were mostly useful for sanity-checks on the
  2017. bytecode compiler are now off for both "regular" and "debug" engines.
  2018. This together with a fix to cache a TLS access and some other tweaks
  2019. improve the VM's performance by about 20%.
  2020. ** SRFI-1 list-set optimizations
  2021. lset-adjoin and lset-union now have fast paths for eq? sets.
  2022. ** `memq', `memv' optimizations
  2023. These procedures are now at least twice as fast than in 2.0.1.
  2024. * Deprecations
  2025. ** Deprecate scm_whash API
  2026. `scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
  2027. `SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
  2028. `scm_whash_insert' are now deprecated. Use the normal hash table API
  2029. instead.
  2030. ** Deprecate scm_struct_table
  2031. `SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
  2032. `SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
  2033. `scm_struct_table', and `scm_struct_create_handle' are now deprecated.
  2034. These routines formed part of the internals of the map between structs
  2035. and classes.
  2036. ** Deprecate scm_internal_dynamic_wind
  2037. The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
  2038. as the `scm_dynwind' API is better, and this API encourages users to
  2039. stuff SCM values into pointers.
  2040. ** Deprecate scm_immutable_cell, scm_immutable_double_cell
  2041. These routines are deprecated, as the GC_STUBBORN API doesn't do
  2042. anything any more.
  2043. * Manual updates
  2044. Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
  2045. ports)' documentation from the R6RS documentation. Thanks Andreas!
  2046. * Bugs fixed
  2047. ** Fix double-loading of script in -ds case
  2048. ** -x error message fix
  2049. ** iconveh-related cross-compilation fixes
  2050. ** Fix small integer return value packing on big endian machines.
  2051. ** Fix hash-set! in weak-value table from non-immediate to immediate
  2052. ** Fix call-with-input-file & relatives for multiple values
  2053. ** Fix `hash' for inf and nan
  2054. ** Fix libguile internal type errors caught by typing-strictness==2
  2055. ** Fix compile error in MinGW fstat socket detection
  2056. ** Fix generation of auto-compiled file names on MinGW
  2057. ** Fix multithreaded access to internal hash tables
  2058. ** Emit a 1-based line number in error messages
  2059. ** Fix define-module ordering
  2060. ** Fix several POSIX functions to use the locale encoding
  2061. ** Add type and range checks to the complex generalized vector accessors
  2062. ** Fix unaligned accesses for bytevectors of complex numbers
  2063. ** Fix '(a #{.} b)
  2064. ** Fix erroneous VM stack overflow for canceled threads
  2065. Changes in 2.0.1 (since 2.0.0):
  2066. * Notable changes
  2067. ** guile.m4 supports linking with rpath
  2068. The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
  2069. include appropriate directives to the linker to include libguile-2.0.so
  2070. in the runtime library lookup path.
  2071. ** `begin' expands macros in its body before other expressions
  2072. This enables support for programs like the following:
  2073. (begin
  2074. (define even?
  2075. (lambda (x)
  2076. (or (= x 0) (odd? (- x 1)))))
  2077. (define-syntax odd?
  2078. (syntax-rules ()
  2079. ((odd? x) (not (even? x)))))
  2080. (even? 10))
  2081. ** REPL reader usability enhancements
  2082. The REPL now flushes input after a read error, which should prevent one
  2083. error from causing other errors. The REPL also now interprets comments
  2084. as whitespace.
  2085. ** REPL output has configurable width
  2086. The REPL now defaults to output with the current terminal's width, in
  2087. columns. See "Debug Commands" in the manual for more information on
  2088. the ,width command.
  2089. ** Better C access to the module system
  2090. Guile now has convenient C accessors to look up variables or values in
  2091. modules and their public interfaces. See `scm_c_public_ref' and friends
  2092. in "Accessing Modules from C" in the manual.
  2093. ** Added `scm_call_5', `scm_call_6'
  2094. See "Fly Evaluation" in the manual.
  2095. ** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
  2096. See "Keyword Procedures" in the manual, for more. Note that
  2097. `scm_from_locale_keyword' should not be used when the name is a C string
  2098. constant.
  2099. ** R6RS unicode and string I/O work
  2100. Added efficient implementations of `get-string-n' and `get-string-n!'
  2101. for binary ports. Exported `current-input-port', `current-output-port'
  2102. and `current-error-port' from `(rnrs io ports)', and enhanced support
  2103. for transcoders.
  2104. ** Added `pointer->scm', `scm->pointer' to `(system foreign)'
  2105. These procedure are useful if one needs to pass and receive SCM values
  2106. to and from foreign functions. See "Foreign Variables" in the manual,
  2107. for more.
  2108. ** Added `heap-allocated-since-gc' to `(gc-stats)'
  2109. Also fixed the long-standing bug in the REPL `,stat' command.
  2110. ** Add `on-error' REPL option
  2111. This option controls what happens when an error occurs at the REPL, and
  2112. defaults to `debug', indicating that Guile should enter the debugger.
  2113. Other values include `report', which will simply print a backtrace
  2114. without entering the debugger. See "System Commands" in the manual.
  2115. ** Enforce immutability of string literals
  2116. Attempting to mutate a string literal now causes a runtime error.
  2117. ** Fix pthread redirection
  2118. Guile 2.0.0 shipped with headers that, if configured with pthread
  2119. support, would re-define `pthread_create', `pthread_join', and other API
  2120. to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
  2121. unintended, and not necessary: because threads must enter Guile with
  2122. `scm_with_guile', Guile can handle thread registration itself, without
  2123. needing to make the GC aware of all threads. This oversight has been
  2124. fixed.
  2125. ** `with-continuation-barrier' now unwinds on `quit'
  2126. A throw to `quit' in a continuation barrier will cause Guile to exit.
  2127. Before, it would do so before unwinding to the barrier, which would
  2128. prevent cleanup handlers from running. This has been fixed so that it
  2129. exits only after unwinding.
  2130. ** `string->pointer' and `pointer->string' have optional encoding arg
  2131. This allows users of the FFI to more easily deal in strings with
  2132. particular (non-locale) encodings, like "utf-8". See "Void Pointers and
  2133. Byte Access" in the manual, for more.
  2134. ** R6RS fixnum arithmetic optimizations
  2135. R6RS fixnum operations are are still slower than generic arithmetic,
  2136. however.
  2137. ** New procedure: `define-inlinable'
  2138. See "Inlinable Procedures" in the manual, for more.
  2139. ** New procedure: `exact-integer-sqrt'
  2140. See "Integer Operations" in the manual, for more.
  2141. ** "Extended read syntax" for symbols parses better
  2142. In #{foo}# symbols, backslashes are now treated as escapes, as the
  2143. symbol-printing code intended. Additionally, "\x" within #{foo}# is now
  2144. interpreted as starting an R6RS hex escape. This is backward compatible
  2145. because the symbol printer would never produce a "\x" before. The
  2146. printer also works better too.
  2147. ** Added `--fresh-auto-compile' option
  2148. This allows a user to invalidate the auto-compilation cache. It's
  2149. usually not needed. See "Compilation" in the manual, for a discussion.
  2150. * Manual updates
  2151. ** GOOPS documentation updates
  2152. ** New man page
  2153. Thanks to Mark Harig for improvements to guile.1.
  2154. ** SRFI-23 documented
  2155. The humble `error' SRFI now has an entry in the manual.
  2156. * New modules
  2157. ** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
  2158. ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
  2159. ** `(ice-9 command-line)', not documented yet
  2160. * Bugs fixed
  2161. ** Fixed `iconv_t' memory leak on close-port
  2162. ** Fixed some leaks with weak hash tables
  2163. ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
  2164. ** `after-gc-hook' works again
  2165. ** `define-record-type' now allowed in nested contexts
  2166. ** `exact-integer-sqrt' now handles large integers correctly
  2167. ** Fixed C extension examples in manual
  2168. ** `vhash-delete' honors HASH argument
  2169. ** Make `locale-digit-grouping' more robust
  2170. ** Default exception printer robustness fixes
  2171. ** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
  2172. ** `read' updates line/column numbers when reading SCSH block comments
  2173. ** Fix imports of multiple custom interfaces of same module
  2174. ** Fix encoding scanning for non-seekable ports
  2175. ** Fix `setter' when called with a non-setter generic
  2176. ** Fix f32 and f64 bytevectors to not accept rationals
  2177. ** Fix description of the R6RS `finite?' in manual
  2178. ** Quotient, remainder and modulo accept inexact integers again
  2179. ** Fix `continue' within `while' to take zero arguments
  2180. ** Fix alignment for structures in FFI
  2181. ** Fix port-filename of stdin, stdout, stderr to match the docs
  2182. ** Fix weak hash table-related bug in `define-wrapped-pointer-type'
  2183. ** Fix partial continuation application with pending procedure calls
  2184. ** scm_{to,from}_locale_string use current locale, not current ports
  2185. ** Fix thread cleanup, by using a pthread_key destructor
  2186. ** Fix `quit' at the REPL
  2187. ** Fix a failure to sync regs in vm bytevector ops
  2188. ** Fix (texinfo reflection) to handle nested structures like syntax patterns
  2189. ** Fix stexi->html double translation
  2190. ** Fix tree-il->scheme fix for <prompt>
  2191. ** Fix compilation of <prompt> in <fix> in single-value context
  2192. ** Fix race condition in ensure-writable-dir
  2193. ** Fix error message on ,disassemble "non-procedure"
  2194. ** Fix prompt and abort with the boot evaluator
  2195. ** Fix `procedure->pointer' for functions returning `void'
  2196. ** Fix error reporting in dynamic-pointer
  2197. ** Fix problems detecting coding: in block comments
  2198. ** Fix duplicate load-path and load-compiled-path in compilation environment
  2199. ** Add fallback read(2) suppport for .go files if mmap(2) unavailable
  2200. ** Fix c32vector-set!, c64vector-set!
  2201. ** Fix mistakenly deprecated read syntax for uniform complex vectors
  2202. ** Fix parsing of exact numbers with negative exponents
  2203. ** Ignore SIGPIPE in (system repl server)
  2204. ** Fix optional second arg to R6RS log function
  2205. ** Fix R6RS `assert' to return true value.
  2206. ** Fix fencepost error when seeking in bytevector input ports
  2207. ** Gracefully handle `setlocale' errors when starting the REPL
  2208. ** Improve support of the `--disable-posix' configure option
  2209. ** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
  2210. ** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
  2211. Changes in 2.0.0 (changes since the 1.8.x series):
  2212. * New modules (see the manual for details)
  2213. ** `(srfi srfi-18)', more sophisticated multithreading support
  2214. ** `(srfi srfi-27)', sources of random bits
  2215. ** `(srfi srfi-38)', External Representation for Data With Shared Structure
  2216. ** `(srfi srfi-42)', eager comprehensions
  2217. ** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
  2218. ** `(srfi srfi-67)', compare procedures
  2219. ** `(ice-9 i18n)', internationalization support
  2220. ** `(ice-9 futures)', fine-grain parallelism
  2221. ** `(rnrs bytevectors)', the R6RS bytevector API
  2222. ** `(rnrs io ports)', a subset of the R6RS I/O port API
  2223. ** `(system xref)', a cross-referencing facility (FIXME undocumented)
  2224. ** `(ice-9 vlist)', lists with constant-time random access; hash lists
  2225. ** `(system foreign)', foreign function interface
  2226. ** `(sxml match)', a pattern matcher for SXML
  2227. ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
  2228. ** `(system vm coverage)', a line-by-line code coverage library
  2229. ** `(web uri)', URI data type, parser, and unparser
  2230. ** `(web http)', HTTP header parsers and unparsers
  2231. ** `(web request)', HTTP request data type, reader, and writer
  2232. ** `(web response)', HTTP response data type, reader, and writer
  2233. ** `(web server)', Generic HTTP server
  2234. ** `(ice-9 poll)', a poll wrapper
  2235. ** `(web server http)', HTTP-over-TCP web server implementation
  2236. ** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
  2237. Guile's copy of Andrew K. Wright's `match' library has been replaced by
  2238. a compatible hygienic implementation by Alex Shinn. It is now
  2239. documented, see "Pattern Matching" in the manual.
  2240. Compared to Andrew K. Wright's `match', the new `match' lacks
  2241. `match-define', `match:error-control', `match:set-error-control',
  2242. `match:error', `match:set-error', and all structure-related procedures.
  2243. ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
  2244. The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
  2245. toolkit from Guile-Lib have been imported into Guile proper. See
  2246. "Standard Library" in the manual for more details.
  2247. ** Integration of lalr-scm, a parser generator
  2248. Guile has included Dominique Boucher's fine `lalr-scm' parser generator
  2249. as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
  2250. information.
  2251. * Changes to the stand-alone interpreter
  2252. ** Guile now can compile Scheme to bytecode for a custom virtual machine.
  2253. Compiled code loads much faster than Scheme source code, and runs around
  2254. 3 or 4 times as fast, generating much less garbage in the process.
  2255. ** Evaluating Scheme code does not use the C stack.
  2256. Besides when compiling Guile itself, Guile no longer uses a recursive C
  2257. function as an evaluator. This obviates the need to check the C stack
  2258. pointer for overflow. Continuations still capture the C stack, however.
  2259. ** New environment variables: GUILE_LOAD_COMPILED_PATH,
  2260. GUILE_SYSTEM_LOAD_COMPILED_PATH
  2261. GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
  2262. for source files. It is a different path, however, because compiled
  2263. files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
  2264. GUILE_SYSTEM_PATH.
  2265. ** New read-eval-print loop (REPL) implementation
  2266. Running Guile with no arguments drops the user into the new REPL. See
  2267. "Using Guile Interactively" in the manual, for more information.
  2268. ** Remove old Emacs interface
  2269. Guile had an unused `--emacs' command line argument that was supposed to
  2270. help when running Guile inside Emacs. This option has been removed, and
  2271. the helper functions `named-module-use!' and `load-emacs-interface' have
  2272. been deprecated.
  2273. ** Add `(system repl server)' module and `--listen' command-line argument
  2274. The `(system repl server)' module exposes procedures to listen on
  2275. sockets for connections, and serve REPLs to those clients. The --listen
  2276. command-line argument allows any Guile program to thus be remotely
  2277. debuggable.
  2278. See "Invoking Guile" for more information on `--listen'.
  2279. ** Command line additions
  2280. The guile binary now supports a new switch "-x", which can be used to
  2281. extend the list of filename extensions tried when loading files
  2282. (%load-extensions).
  2283. ** New reader options: `square-brackets', `r6rs-hex-escapes',
  2284. `hungry-eol-escapes'
  2285. The reader supports a new option (changeable via `read-options'),
  2286. `square-brackets', which instructs it to interpret square brackets as
  2287. parentheses. This option is on by default.
  2288. When the new `r6rs-hex-escapes' reader option is enabled, the reader
  2289. will recognize string escape sequences as defined in R6RS. R6RS string
  2290. escape sequences are incompatible with Guile's existing escapes, though,
  2291. so this option is off by default.
  2292. Additionally, Guile follows the R6RS newline escaping rules when the
  2293. `hungry-eol-escapes' option is enabled.
  2294. See "String Syntax" in the manual, for more information.
  2295. ** Function profiling and tracing at the REPL
  2296. The `,profile FORM' REPL meta-command can now be used to statistically
  2297. profile execution of a form, to see which functions are taking the most
  2298. time. See `,help profile' for more information.
  2299. Similarly, `,trace FORM' traces all function applications that occur
  2300. during the execution of `FORM'. See `,help trace' for more information.
  2301. ** Recursive debugging REPL on error
  2302. When Guile sees an error at the REPL, instead of saving the stack, Guile
  2303. will directly enter a recursive REPL in the dynamic context of the
  2304. error. See "Error Handling" in the manual, for more information.
  2305. A recursive REPL is the same as any other REPL, except that it
  2306. has been augmented with debugging information, so that one can inspect
  2307. the context of the error. The debugger has been integrated with the REPL
  2308. via a set of debugging meta-commands.
  2309. For example, one may access a backtrace with `,backtrace' (or
  2310. `,bt'). See "Interactive Debugging" in the manual, for more
  2311. information.
  2312. ** New `guile-tools' commands: `compile', `disassemble'
  2313. Pass the `--help' command-line option to these commands for more
  2314. information.
  2315. ** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
  2316. Users may now install Guile to nonstandard prefixes and just run
  2317. `/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
  2318. include `/path/to/lib'.
  2319. ** Guile's Emacs integration is now more keyboard-friendly
  2320. Backtraces may now be disclosed with the keyboard in addition to the
  2321. mouse.
  2322. ** Load path change: search in version-specific paths before site paths
  2323. When looking for a module, Guile now searches first in Guile's
  2324. version-specific path (the library path), *then* in the site dir. This
  2325. allows Guile's copy of SSAX to override any Guile-Lib copy the user has
  2326. installed. Also it should cut the number of `stat' system calls by half,
  2327. in the common case.
  2328. ** Value history in the REPL on by default
  2329. By default, the REPL will save computed values in variables like `$1',
  2330. `$2', and the like. There are programmatic and interactive interfaces to
  2331. control this. See "Value History" in the manual, for more information.
  2332. ** Readline tab completion for arguments
  2333. When readline is enabled, tab completion works for arguments too, not
  2334. just for the operator position.
  2335. ** Expression-oriented readline history
  2336. Guile's readline history now tries to operate on expressions instead of
  2337. input lines. Let us know what you think!
  2338. ** Interactive Guile follows GNU conventions
  2339. As recommended by the GPL, Guile now shows a brief copyright and
  2340. warranty disclaimer on startup, along with pointers to more information.
  2341. * Changes to Scheme functions and syntax
  2342. ** Support for R6RS libraries
  2343. The `library' and `import' forms from the latest Scheme report have been
  2344. added to Guile, in such a way that R6RS libraries share a namespace with
  2345. Guile modules. R6RS modules may import Guile modules, and are available
  2346. for Guile modules to import via use-modules and all the rest. See "R6RS
  2347. Libraries" in the manual for more information.
  2348. ** Implementations of R6RS libraries
  2349. Guile now has implementations for all of the libraries defined in the
  2350. R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
  2351. Standard Libraries" in the manual for a full list of libraries.
  2352. ** Partial R6RS compatibility
  2353. Guile now has enough support for R6RS to run a reasonably large subset
  2354. of R6RS programs.
  2355. Guile is not fully R6RS compatible. Many incompatibilities are simply
  2356. bugs, though some parts of Guile will remain R6RS-incompatible for the
  2357. foreseeable future. See "R6RS Incompatibilities" in the manual, for more
  2358. information.
  2359. Please contact bug-guile@gnu.org if you have found an issue not
  2360. mentioned in that compatibility list.
  2361. ** New implementation of `primitive-eval'
  2362. Guile's `primitive-eval' is now implemented in Scheme. Actually there is
  2363. still a C evaluator, used when building a fresh Guile to interpret the
  2364. compiler, so we can compile eval.scm. Thereafter all calls to
  2365. primitive-eval are implemented by VM-compiled code.
  2366. This allows all of Guile's procedures, be they interpreted or compiled,
  2367. to execute on the same stack, unifying multiple-value return semantics,
  2368. providing for proper tail recursion between interpreted and compiled
  2369. code, and simplifying debugging.
  2370. As part of this change, the evaluator no longer mutates the internal
  2371. representation of the code being evaluated in a thread-unsafe manner.
  2372. There are two negative aspects of this change, however. First, Guile
  2373. takes a lot longer to compile now. Also, there is less debugging
  2374. information available for debugging interpreted code. We hope to improve
  2375. both of these situations.
  2376. There are many changes to the internal C evalator interface, but all
  2377. public interfaces should be the same. See the ChangeLog for details. If
  2378. we have inadvertantly changed an interface that you were using, please
  2379. contact bug-guile@gnu.org.
  2380. ** Procedure removed: `the-environment'
  2381. This procedure was part of the interpreter's execution model, and does
  2382. not apply to the compiler.
  2383. ** No more `local-eval'
  2384. `local-eval' used to exist so that one could evaluate code in the
  2385. lexical context of a function. Since there is no way to get the lexical
  2386. environment any more, as that concept has no meaning for the compiler,
  2387. and a different meaning for the interpreter, we have removed the
  2388. function.
  2389. If you think you need `local-eval', you should probably implement your
  2390. own metacircular evaluator. It will probably be as fast as Guile's
  2391. anyway.
  2392. ** Scheme source files will now be compiled automatically.
  2393. If a compiled .go file corresponding to a .scm file is not found or is
  2394. not fresh, the .scm file will be compiled on the fly, and the resulting
  2395. .go file stored away. An advisory note will be printed on the console.
  2396. Note that this mechanism depends on the timestamp of the .go file being
  2397. newer than that of the .scm file; if the .scm or .go files are moved
  2398. after installation, care should be taken to preserve their original
  2399. timestamps.
  2400. Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
  2401. directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
  2402. will be created if needed.
  2403. To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
  2404. variable to 0, or pass --no-auto-compile on the Guile command line.
  2405. ** New POSIX procedures: `getrlimit' and `setrlimit'
  2406. Note however that the interface of these functions is likely to change
  2407. in the next prerelease.
  2408. ** New POSIX procedure: `getsid'
  2409. Scheme binding for the `getsid' C library call.
  2410. ** New POSIX procedure: `getaddrinfo'
  2411. Scheme binding for the `getaddrinfo' C library function.
  2412. ** Multicast socket options
  2413. Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
  2414. options. See "Network Sockets and Communication" in the manual, for
  2415. more information.
  2416. ** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
  2417. These socket procedures now take bytevectors as arguments, instead of
  2418. strings. There is some deprecated string support, however.
  2419. ** New GNU procedures: `setaffinity' and `getaffinity'.
  2420. See "Processes" in the manual, for more information.
  2421. ** New procedures: `compose', `negate', and `const'
  2422. See "Higher-Order Functions" in the manual, for more information.
  2423. ** New procedure in `(oops goops)': `method-formals'
  2424. ** New procedures in (ice-9 session): `add-value-help-handler!',
  2425. `remove-value-help-handler!', `add-name-help-handler!'
  2426. `remove-name-help-handler!', `procedure-arguments'
  2427. The value and name help handlers provide some minimal extensibility to
  2428. the help interface. Guile-lib's `(texinfo reflection)' uses them, for
  2429. example, to make stexinfo help documentation available. See those
  2430. procedures' docstrings for more information.
  2431. `procedure-arguments' describes the arguments that a procedure can take,
  2432. combining arity and formals. For example:
  2433. (procedure-arguments resolve-interface)
  2434. => ((required . (name)) (rest . args))
  2435. Additionally, `module-commentary' is now publically exported from
  2436. `(ice-9 session).
  2437. ** Removed: `procedure->memoizing-macro', `procedure->syntax'
  2438. These procedures created primitive fexprs for the old evaluator, and are
  2439. no longer supported. If you feel that you need these functions, you
  2440. probably need to write your own metacircular evaluator (which will
  2441. probably be as fast as Guile's, anyway).
  2442. ** New language: ECMAScript
  2443. Guile now ships with one other high-level language supported,
  2444. ECMAScript. The goal is to support all of version 3.1 of the standard,
  2445. but not all of the libraries are there yet. This support is not yet
  2446. documented; ask on the mailing list if you are interested.
  2447. ** New language: Brainfuck
  2448. Brainfuck is a toy language that closely models Turing machines. Guile's
  2449. brainfuck compiler is meant to be an example of implementing other
  2450. languages. See the manual for details, or
  2451. http://en.wikipedia.org/wiki/Brainfuck for more information about the
  2452. Brainfuck language itself.
  2453. ** New language: Elisp
  2454. Guile now has an experimental Emacs Lisp compiler and runtime. You can
  2455. now switch to Elisp at the repl: `,language elisp'. All kudos to Daniel
  2456. Kraft and Brian Templeton, and all bugs to bug-guile@gnu.org.
  2457. ** Better documentation infrastructure for macros
  2458. It is now possible to introspect on the type of a macro, e.g.
  2459. syntax-rules, identifier-syntax, etc, and extract information about that
  2460. macro, such as the syntax-rules patterns or the defmacro arguments.
  2461. `(texinfo reflection)' takes advantage of this to give better macro
  2462. documentation.
  2463. ** Support for arbitrary procedure metadata
  2464. Building on its support for docstrings, Guile now supports multiple
  2465. docstrings, adding them to the tail of a compiled procedure's
  2466. properties. For example:
  2467. (define (foo)
  2468. "one"
  2469. "two"
  2470. 3)
  2471. (procedure-properties foo)
  2472. => ((name . foo) (documentation . "one") (documentation . "two"))
  2473. Also, vectors of pairs are now treated as additional metadata entries:
  2474. (define (bar)
  2475. #((quz . #f) (docstring . "xyzzy"))
  2476. 3)
  2477. (procedure-properties bar)
  2478. => ((name . bar) (quz . #f) (docstring . "xyzzy"))
  2479. This allows arbitrary literals to be embedded as metadata in a compiled
  2480. procedure.
  2481. ** The psyntax expander now knows how to interpret the @ and @@ special
  2482. forms.
  2483. ** The psyntax expander is now hygienic with respect to modules.
  2484. Free variables in a macro are scoped in the module that the macro was
  2485. defined in, not in the module the macro is used in. For example, code
  2486. like this works now:
  2487. (define-module (foo) #:export (bar))
  2488. (define (helper x) ...)
  2489. (define-syntax bar
  2490. (syntax-rules () ((_ x) (helper x))))
  2491. (define-module (baz) #:use-module (foo))
  2492. (bar qux)
  2493. It used to be you had to export `helper' from `(foo)' as well.
  2494. Thankfully, this has been fixed.
  2495. ** Support for version information in Guile's `module' form
  2496. Guile modules now have a `#:version' field. See "R6RS Version
  2497. References", "General Information about Modules", "Using Guile Modules",
  2498. and "Creating Guile Modules" in the manual for more information.
  2499. ** Support for renaming bindings on module export
  2500. Wherever Guile accepts a symbol as an argument to specify a binding to
  2501. export, it now also accepts a pair of symbols, indicating that a binding
  2502. should be renamed on export. See "Creating Guile Modules" in the manual
  2503. for more information.
  2504. ** New procedure: `module-export-all!'
  2505. This procedure exports all current and future bindings from a module.
  2506. Use as `(module-export-all! (current-module))'.
  2507. ** New procedure `reload-module', and `,reload' REPL command
  2508. See "Module System Reflection" and "Module Commands" in the manual, for
  2509. more information.
  2510. ** `eval-case' has been deprecated, and replaced by `eval-when'.
  2511. The semantics of `eval-when' are easier to understand. See "Eval When"
  2512. in the manual, for more information.
  2513. ** Guile is now more strict about prohibiting definitions in expression
  2514. contexts.
  2515. Although previous versions of Guile accepted it, the following
  2516. expression is not valid, in R5RS or R6RS:
  2517. (if test (define foo 'bar) (define foo 'baz))
  2518. In this specific case, it would be better to do:
  2519. (define foo (if test 'bar 'baz))
  2520. It is possible to circumvent this restriction with e.g.
  2521. `(module-define! (current-module) 'foo 'baz)'. Contact the list if you
  2522. have any questions.
  2523. ** Support for `letrec*'
  2524. Guile now supports `letrec*', a recursive lexical binding operator in
  2525. which the identifiers are bound in order. See "Local Bindings" in the
  2526. manual, for more details.
  2527. ** Internal definitions now expand to `letrec*'
  2528. Following the R6RS, internal definitions now expand to letrec* instead
  2529. of letrec. The following program is invalid for R5RS, but valid for
  2530. R6RS:
  2531. (define (foo)
  2532. (define bar 10)
  2533. (define baz (+ bar 20))
  2534. baz)
  2535. ;; R5RS and Guile <= 1.8:
  2536. (foo) => Unbound variable: bar
  2537. ;; R6RS and Guile >= 2.0:
  2538. (foo) => 30
  2539. This change should not affect correct R5RS programs, or programs written
  2540. in earlier Guile dialects.
  2541. ** Macro expansion produces structures instead of s-expressions
  2542. In the olden days, macroexpanding an s-expression would yield another
  2543. s-expression. Though the lexical variables were renamed, expansions of
  2544. core forms like `if' and `begin' were still non-hygienic, as they relied
  2545. on the toplevel definitions of `if' et al being the conventional ones.
  2546. The solution is to expand to structures instead of s-expressions. There
  2547. is an `if' structure, a `begin' structure, a `toplevel-ref' structure,
  2548. etc. The expander already did this for compilation, producing Tree-IL
  2549. directly; it has been changed now to do so when expanding for the
  2550. evaluator as well.
  2551. ** Defmacros must now produce valid Scheme expressions.
  2552. It used to be that defmacros could unquote in Scheme values, as a way of
  2553. supporting partial evaluation, and avoiding some hygiene issues. For
  2554. example:
  2555. (define (helper x) ...)
  2556. (define-macro (foo bar)
  2557. `(,helper ,bar))
  2558. Assuming this macro is in the `(baz)' module, the direct translation of
  2559. this code would be:
  2560. (define (helper x) ...)
  2561. (define-macro (foo bar)
  2562. `((@@ (baz) helper) ,bar))
  2563. Of course, one could just use a hygienic macro instead:
  2564. (define-syntax foo
  2565. (syntax-rules ()
  2566. ((_ bar) (helper bar))))
  2567. ** Guile's psyntax now supports docstrings and internal definitions.
  2568. The following Scheme is not strictly legal:
  2569. (define (foo)
  2570. "bar"
  2571. (define (baz) ...)
  2572. (baz))
  2573. However its intent is fairly clear. Guile interprets "bar" to be the
  2574. docstring of `foo', and the definition of `baz' is still in definition
  2575. context.
  2576. ** Support for settable identifier syntax
  2577. Following the R6RS, "variable transformers" are settable
  2578. identifier-syntax. See "Identifier macros" in the manual, for more
  2579. information.
  2580. ** syntax-case treats `_' as a placeholder
  2581. Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
  2582. anything, and binds no pattern variables. Unlike the R6RS, Guile also
  2583. permits `_' to be in the literals list for a pattern.
  2584. ** Macros need to be defined before their first use.
  2585. It used to be that with lazy memoization, this might work:
  2586. (define (foo x)
  2587. (ref x))
  2588. (define-macro (ref x) x)
  2589. (foo 1) => 1
  2590. But now, the body of `foo' is interpreted to mean a call to the toplevel
  2591. `ref' function, instead of a macro expansion. The solution is to define
  2592. macros before code that uses them.
  2593. ** Functions needed by macros at expand-time need to be present at
  2594. expand-time.
  2595. For example, this code will work at the REPL:
  2596. (define (double-helper x) (* x x))
  2597. (define-macro (double-literal x) (double-helper x))
  2598. (double-literal 2) => 4
  2599. But it will not work when a file is compiled, because the definition of
  2600. `double-helper' is not present at expand-time. The solution is to wrap
  2601. the definition of `double-helper' in `eval-when':
  2602. (eval-when (load compile eval)
  2603. (define (double-helper x) (* x x)))
  2604. (define-macro (double-literal x) (double-helper x))
  2605. (double-literal 2) => 4
  2606. See the documentation for eval-when for more information.
  2607. ** `macroexpand' produces structures, not S-expressions.
  2608. Given the need to maintain referential transparency, both lexically and
  2609. modular, the result of expanding Scheme expressions is no longer itself
  2610. an s-expression. If you want a human-readable approximation of the
  2611. result of `macroexpand', call `tree-il->scheme' from `(language
  2612. tree-il)'.
  2613. ** Removed function: `macroexpand-1'
  2614. It is unclear how to implement `macroexpand-1' with syntax-case, though
  2615. PLT Scheme does prove that it is possible.
  2616. ** New reader macros: #' #` #, #,@
  2617. These macros translate, respectively, to `syntax', `quasisyntax',
  2618. `unsyntax', and `unsyntax-splicing'. See the R6RS for more information.
  2619. These reader macros may be overridden by `read-hash-extend'.
  2620. ** Incompatible change to #'
  2621. Guile did have a #' hash-extension, by default, which just returned the
  2622. subsequent datum: #'foo => foo. In the unlikely event that anyone
  2623. actually used this, this behavior may be reinstated via the
  2624. `read-hash-extend' mechanism.
  2625. ** `unquote' and `unquote-splicing' accept multiple expressions
  2626. As per the R6RS, these syntax operators can now accept any number of
  2627. expressions to unquote.
  2628. ** Scheme expresssions may be commented out with #;
  2629. #; comments out an entire expression. See SRFI-62 or the R6RS for more
  2630. information.
  2631. ** Prompts: Delimited, composable continuations
  2632. Guile now has prompts as part of its primitive language. See "Prompts"
  2633. in the manual, for more information.
  2634. Expressions entered in at the REPL, or from the command line, are
  2635. surrounded by a prompt with the default prompt tag.
  2636. ** `make-stack' with a tail-called procedural narrowing argument no longer
  2637. works (with compiled procedures)
  2638. It used to be the case that a captured stack could be narrowed to select
  2639. calls only up to or from a certain procedure, even if that procedure
  2640. already tail-called another procedure. This was because the debug
  2641. information from the original procedure was kept on the stack.
  2642. Now with the new compiler, the stack only contains active frames from
  2643. the current continuation. A narrow to a procedure that is not in the
  2644. stack will result in an empty stack. To fix this, narrow to a procedure
  2645. that is active in the current continuation, or narrow to a specific
  2646. number of stack frames.
  2647. ** Backtraces through compiled procedures only show procedures that are
  2648. active in the current continuation
  2649. Similarly to the previous issue, backtraces in compiled code may be
  2650. different from backtraces in interpreted code. There are no semantic
  2651. differences, however. Please mail bug-guile@gnu.org if you see any
  2652. deficiencies with Guile's backtraces.
  2653. ** `positions' reader option enabled by default
  2654. This change allows primitive-load without --auto-compile to also
  2655. propagate source information through the expander, for better errors and
  2656. to let macros know their source locations. The compiler was already
  2657. turning it on anyway.
  2658. ** New macro: `current-source-location'
  2659. The macro returns the current source location (to be documented).
  2660. ** syntax-rules and syntax-case macros now propagate source information
  2661. through to the expanded code
  2662. This should result in better backtraces.
  2663. ** The currying behavior of `define' has been removed.
  2664. Before, `(define ((f a) b) (* a b))' would translate to
  2665. (define f (lambda (a) (lambda (b) (* a b))))
  2666. Now a syntax error is signaled, as this syntax is not supported by
  2667. default. Use the `(ice-9 curried-definitions)' module to get back the
  2668. old behavior.
  2669. ** New procedure, `define!'
  2670. `define!' is a procedure that takes two arguments, a symbol and a value,
  2671. and binds the value to the symbol in the current module. It's useful to
  2672. programmatically make definitions in the current module, and is slightly
  2673. less verbose than `module-define!'.
  2674. ** All modules have names now
  2675. Before, you could have anonymous modules: modules without names. Now,
  2676. because of hygiene and macros, all modules have names. If a module was
  2677. created without a name, the first time `module-name' is called on it, a
  2678. fresh name will be lazily generated for it.
  2679. ** The module namespace is now separate from the value namespace
  2680. It was a little-known implementation detail of Guile's module system
  2681. that it was built on a single hierarchical namespace of values -- that
  2682. if there was a module named `(foo bar)', then in the module named
  2683. `(foo)' there was a binding from `bar' to the `(foo bar)' module.
  2684. This was a neat trick, but presented a number of problems. One problem
  2685. was that the bindings in a module were not apparent from the module
  2686. itself; perhaps the `(foo)' module had a private binding for `bar', and
  2687. then an external contributor defined `(foo bar)'. In the end there can
  2688. be only one binding, so one of the two will see the wrong thing, and
  2689. produce an obtuse error of unclear provenance.
  2690. Also, the public interface of a module was also bound in the value
  2691. namespace, as `%module-public-interface'. This was a hack from the early
  2692. days of Guile's modules.
  2693. Both of these warts have been fixed by the addition of fields in the
  2694. `module' data type. Access to modules and their interfaces from the
  2695. value namespace has been deprecated, and all accessors use the new
  2696. record accessors appropriately.
  2697. When Guile is built with support for deprecated code, as is the default,
  2698. the value namespace is still searched for modules and public interfaces,
  2699. and a deprecation warning is raised as appropriate.
  2700. Finally, to support lazy loading of modules as one used to be able to do
  2701. with module binder procedures, Guile now has submodule binders, called
  2702. if a given submodule is not found. See boot-9.scm for more information.
  2703. ** New procedures: module-ref-submodule, module-define-submodule,
  2704. nested-ref-module, nested-define-module!, local-ref-module,
  2705. local-define-module
  2706. These new accessors are like their bare variants, but operate on
  2707. namespaces instead of values.
  2708. ** The (app modules) module tree is officially deprecated
  2709. It used to be that one could access a module named `(foo bar)' via
  2710. `(nested-ref the-root-module '(app modules foo bar))'. The `(app
  2711. modules)' bit was a never-used and never-documented abstraction, and has
  2712. been deprecated. See the following mail for a full discussion:
  2713. http://lists.gnu.org/archive/html/guile-devel/2010-04/msg00168.html
  2714. The `%app' binding is also deprecated.
  2715. ** `module-filename' field and accessor
  2716. Modules now record the file in which they are defined. This field may be
  2717. accessed with the new `module-filename' procedure.
  2718. ** Modules load within a known environment
  2719. It takes a few procedure calls to define a module, and those procedure
  2720. calls need to be in scope. Now we ensure that the current module when
  2721. loading a module is one that has the needed bindings, instead of relying
  2722. on chance.
  2723. ** `load' is a macro (!) that resolves paths relative to source file dir
  2724. The familiar Schem `load' procedure is now a macro that captures the
  2725. name of the source file being expanded, and dispatches to the new
  2726. `load-in-vicinity'. Referencing `load' by bare name returns a closure
  2727. that embeds the current source file name.
  2728. This fix allows `load' of relative paths to be resolved with respect to
  2729. the location of the file that calls `load'.
  2730. ** Many syntax errors have different texts now
  2731. Syntax errors still throw to the `syntax-error' key, but the arguments
  2732. are often different now. Perhaps in the future, Guile will switch to
  2733. using standard SRFI-35 conditions.
  2734. ** Returning multiple values to compiled code will silently truncate the
  2735. values to the expected number
  2736. For example, the interpreter would raise an error evaluating the form,
  2737. `(+ (values 1 2) (values 3 4))', because it would see the operands as
  2738. being two compound "values" objects, to which `+' does not apply.
  2739. The compiler, on the other hand, receives multiple values on the stack,
  2740. not as a compound object. Given that it must check the number of values
  2741. anyway, if too many values are provided for a continuation, it chooses
  2742. to truncate those values, effectively evaluating `(+ 1 3)' instead.
  2743. The idea is that the semantics that the compiler implements is more
  2744. intuitive, and the use of the interpreter will fade out with time.
  2745. This behavior is allowed both by the R5RS and the R6RS.
  2746. ** Multiple values in compiled code are not represented by compound
  2747. objects
  2748. This change may manifest itself in the following situation:
  2749. (let ((val (foo))) (do-something) val)
  2750. In the interpreter, if `foo' returns multiple values, multiple values
  2751. are produced from the `let' expression. In the compiler, those values
  2752. are truncated to the first value, and that first value is returned. In
  2753. the compiler, if `foo' returns no values, an error will be raised, while
  2754. the interpreter would proceed.
  2755. Both of these behaviors are allowed by R5RS and R6RS. The compiler's
  2756. behavior is more correct, however. If you wish to preserve a potentially
  2757. multiply-valued return, you will need to set up a multiple-value
  2758. continuation, using `call-with-values'.
  2759. ** Defmacros are now implemented in terms of syntax-case.
  2760. The practical ramification of this is that the `defmacro?' predicate has
  2761. been removed, along with `defmacro-transformer', `macro-table',
  2762. `xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and
  2763. `defmacro:transformer'. This is because defmacros are simply macros. If
  2764. any of these procedures provided useful facilities to you, we encourage
  2765. you to contact the Guile developers.
  2766. ** Hygienic macros documented as the primary syntactic extension mechanism.
  2767. The macro documentation was finally fleshed out with some documentation
  2768. on `syntax-rules' and `syntax-case' macros, and other parts of the macro
  2769. expansion process. See "Macros" in the manual, for details.
  2770. ** psyntax is now the default expander
  2771. Scheme code is now expanded by default by the psyntax hygienic macro
  2772. expander. Expansion is performed completely before compilation or
  2773. interpretation.
  2774. Notably, syntax errors will be signalled before interpretation begins.
  2775. In the past, many syntax errors were only detected at runtime if the
  2776. code in question was memoized.
  2777. As part of its expansion, psyntax renames all lexically-bound
  2778. identifiers. Original identifier names are preserved and given to the
  2779. compiler, but the interpreter will see the renamed variables, e.g.,
  2780. `x432' instead of `x'.
  2781. Note that the psyntax that Guile uses is a fork, as Guile already had
  2782. modules before incompatible modules were added to psyntax -- about 10
  2783. years ago! Thus there are surely a number of bugs that have been fixed
  2784. in psyntax since then. If you find one, please notify bug-guile@gnu.org.
  2785. ** syntax-rules and syntax-case are available by default.
  2786. There is no longer any need to import the `(ice-9 syncase)' module
  2787. (which is now deprecated). The expander may be invoked directly via
  2788. `macroexpand', though it is normally searched for via the current module
  2789. transformer.
  2790. Also, the helper routines for syntax-case are available in the default
  2791. environment as well: `syntax->datum', `datum->syntax',
  2792. `bound-identifier=?', `free-identifier=?', `generate-temporaries',
  2793. `identifier?', and `syntax-violation'. See the R6RS for documentation.
  2794. ** Tail patterns in syntax-case
  2795. Guile has pulled in some more recent changes from the psyntax portable
  2796. syntax expander, to implement support for "tail patterns". Such patterns
  2797. are supported by syntax-rules and syntax-case. This allows a syntax-case
  2798. match clause to have ellipses, then a pattern at the end. For example:
  2799. (define-syntax case
  2800. (syntax-rules (else)
  2801. ((_ val match-clause ... (else e e* ...))
  2802. [...])))
  2803. Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
  2804. tail pattern for the else clause. Thanks to Andreas Rottmann for the
  2805. patch, and Kent Dybvig for the code.
  2806. ** Lexical bindings introduced by hygienic macros may not be referenced
  2807. by nonhygienic macros.
  2808. If a lexical binding is introduced by a hygienic macro, it may not be
  2809. referenced by a nonhygienic macro. For example, this works:
  2810. (let ()
  2811. (define-macro (bind-x val body)
  2812. `(let ((x ,val)) ,body))
  2813. (define-macro (ref x)
  2814. x)
  2815. (bind-x 10 (ref x)))
  2816. But this does not:
  2817. (let ()
  2818. (define-syntax bind-x
  2819. (syntax-rules ()
  2820. ((_ val body) (let ((x val)) body))))
  2821. (define-macro (ref x)
  2822. x)
  2823. (bind-x 10 (ref x)))
  2824. It is not normal to run into this situation with existing code. However,
  2825. if you have defmacros that expand to hygienic macros, it is possible to
  2826. run into situations like this. For example, if you have a defmacro that
  2827. generates a `while' expression, the `break' bound by the `while' may not
  2828. be visible within other parts of your defmacro. The solution is to port
  2829. from defmacros to syntax-rules or syntax-case.
  2830. ** Macros may no longer be referenced as first-class values.
  2831. In the past, you could evaluate e.g. `if', and get its macro value. Now,
  2832. expanding this form raises a syntax error.
  2833. Macros still /exist/ as first-class values, but they must be
  2834. /referenced/ via the module system, e.g. `(module-ref (current-module)
  2835. 'if)'.
  2836. ** Macros may now have docstrings.
  2837. `object-documentation' from `(ice-9 documentation)' may be used to
  2838. retrieve the docstring, once you have a macro value -- but see the above
  2839. note about first-class macros. Docstrings are associated with the syntax
  2840. transformer procedures.
  2841. ** `case-lambda' is now available in the default environment.
  2842. The binding in the default environment is equivalent to the one from the
  2843. `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
  2844. to maintain compatibility with Guile 1.8 and earlier.
  2845. ** Procedures may now have more than one arity.
  2846. This can be the case, for example, in case-lambda procedures. The
  2847. arities of compiled procedures may be accessed via procedures from the
  2848. `(system vm program)' module; see "Compiled Procedures", "Optional
  2849. Arguments", and "Case-lambda" in the manual.
  2850. ** Deprecate arity access via (procedure-properties proc 'arity)
  2851. Instead of accessing a procedure's arity as a property, use the new
  2852. `procedure-minimum-arity' function, which gives the most permissive
  2853. arity that the function has, in the same format as the old arity
  2854. accessor.
  2855. ** `lambda*' and `define*' are now available in the default environment
  2856. As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
  2857. compatibility purposes. No semantic change has been made (we hope).
  2858. Optional and keyword arguments now dispatch via special VM operations,
  2859. without the need to cons rest arguments, making them very fast.
  2860. ** New syntax: define-once
  2861. `define-once' is like Lisp's `defvar': it creates a toplevel binding,
  2862. but only if one does not exist already.
  2863. ** New function, `truncated-print', with `format' support
  2864. `(ice-9 pretty-print)' now exports `truncated-print', a printer that
  2865. will ensure that the output stays within a certain width, truncating the
  2866. output in what is hopefully an intelligent manner. See the manual for
  2867. more details.
  2868. There is a new `format' specifier, `~@y', for doing a truncated
  2869. print (as opposed to `~y', which does a pretty-print). See the `format'
  2870. documentation for more details.
  2871. ** Better pretty-printing
  2872. Indentation recognizes more special forms, like `syntax-case', and read
  2873. macros like `quote' are printed better.
  2874. ** Passing a number as the destination of `format' is deprecated
  2875. The `format' procedure in `(ice-9 format)' now emits a deprecation
  2876. warning if a number is passed as its first argument.
  2877. Also, it used to be that you could omit passing a port to `format', in
  2878. some cases. This still works, but has been formally deprecated.
  2879. ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
  2880. Guile now implements SRFI-4 vectors using bytevectors. Often when you
  2881. have a numeric vector, you end up wanting to write its bytes somewhere,
  2882. or have access to the underlying bytes, or read in bytes from somewhere
  2883. else. Bytevectors are very good at this sort of thing. But the SRFI-4
  2884. APIs are nicer to use when doing number-crunching, because they are
  2885. addressed by element and not by byte.
  2886. So as a compromise, Guile allows all bytevector functions to operate on
  2887. numeric vectors. They address the underlying bytes in the native
  2888. endianness, as one would expect.
  2889. Following the same reasoning, that it's just bytes underneath, Guile
  2890. also allows uniform vectors of a given type to be accessed as if they
  2891. were of any type. One can fill a u32vector, and access its elements with
  2892. u8vector-ref. One can use f64vector-ref on bytevectors. It's all the
  2893. same to Guile.
  2894. In this way, uniform numeric vectors may be written to and read from
  2895. input/output ports using the procedures that operate on bytevectors.
  2896. Calls to SRFI-4 accessors (ref and set functions) from Scheme are now
  2897. inlined to the VM instructions for bytevector access.
  2898. See "SRFI-4" in the manual, for more information.
  2899. ** Nonstandard SRFI-4 procedures now available from `(srfi srfi-4 gnu)'
  2900. Guile's `(srfi srfi-4)' now only exports those srfi-4 procedures that
  2901. are part of the standard. Complex uniform vectors and the
  2902. `any->FOOvector' family are now available only from `(srfi srfi-4 gnu)'.
  2903. Guile's default environment imports `(srfi srfi-4)', and probably should
  2904. import `(srfi srfi-4 gnu)' as well.
  2905. See "SRFI-4 Extensions" in the manual, for more information.
  2906. ** New syntax: include-from-path.
  2907. `include-from-path' is like `include', except it looks for its file in
  2908. the load path. It can be used to compile other files into a file.
  2909. ** New syntax: quasisyntax.
  2910. `quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
  2911. documentation for more information. Thanks to Andre van Tonder for the
  2912. implementation.
  2913. ** `*unspecified*' is identifier syntax
  2914. `*unspecified*' is no longer a variable, so it is optimized properly by
  2915. the compiler, and is not `set!'-able.
  2916. ** Changes and bugfixes in numerics code
  2917. *** Added six new sets of fast quotient and remainder operators
  2918. Added six new sets of fast quotient and remainder operator pairs with
  2919. different semantics than the R5RS operators. They support not only
  2920. integers, but all reals, including exact rationals and inexact
  2921. floating point numbers.
  2922. These procedures accept two real numbers N and D, where the divisor D
  2923. must be non-zero. Each set of operators computes an integer quotient
  2924. Q and a real remainder R such that N = Q*D + R and |R| < |D|. They
  2925. differ only in how N/D is rounded to produce Q.
  2926. `euclidean-quotient' returns the integer Q and `euclidean-remainder'
  2927. returns the real R such that N = Q*D + R and 0 <= R < |D|. `euclidean/'
  2928. returns both Q and R, and is more efficient than computing each
  2929. separately. Note that when D > 0, `euclidean-quotient' returns
  2930. floor(N/D), and when D < 0 it returns ceiling(N/D).
  2931. `centered-quotient', `centered-remainder', and `centered/' are similar
  2932. except that the range of remainders is -abs(D/2) <= R < abs(D/2), and
  2933. `centered-quotient' rounds N/D to the nearest integer. Note that these
  2934. operators are equivalent to the R6RS integer division operators `div',
  2935. `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.
  2936. `floor-quotient' and `floor-remainder' compute Q and R, respectively,
  2937. where Q has been rounded toward negative infinity. `floor/' returns
  2938. both Q and R, and is more efficient than computing each separately.
  2939. Note that when applied to integers, `floor-remainder' is equivalent to
  2940. the R5RS integer-only `modulo' operator. `ceiling-quotient',
  2941. `ceiling-remainder', and `ceiling/' are similar except that Q is
  2942. rounded toward positive infinity.
  2943. For `truncate-quotient', `truncate-remainder', and `truncate/', Q is
  2944. rounded toward zero. Note that when applied to integers,
  2945. `truncate-quotient' and `truncate-remainder' are equivalent to the
  2946. R5RS integer-only operators `quotient' and `remainder'.
  2947. For `round-quotient', `round-remainder', and `round/', Q is rounded to
  2948. the nearest integer, with ties going to the nearest even integer.
  2949. *** Complex number changes
  2950. Guile is now able to represent non-real complex numbers whose
  2951. imaginary part is an _inexact_ zero (0.0 or -0.0), per R6RS.
  2952. Previously, such numbers were immediately changed into inexact reals.
  2953. (real? 0.0+0.0i) now returns #f, per R6RS, although (zero? 0.0+0.0i)
  2954. still returns #t, per R6RS. (= 0 0.0+0.0i) and (= 0.0 0.0+0.0i) are
  2955. #t, but the same comparisons using `eqv?' or `equal?' are #f.
  2956. Like other non-real numbers, these complex numbers with inexact zero
  2957. imaginary part will raise exceptions is passed to procedures requiring
  2958. reals, such as `<', `>', `<=', `>=', `min', `max', `positive?',
  2959. `negative?', `inf?', `nan?', `finite?', etc.
  2960. **** `make-rectangular' changes
  2961. scm_make_rectangular `make-rectangular' now returns a real number only
  2962. if the imaginary part is an _exact_ 0. Previously, it would return a
  2963. real number if the imaginary part was an inexact zero.
  2964. scm_c_make_rectangular now always returns a non-real complex number,
  2965. even if the imaginary part is zero. Previously, it would return a
  2966. real number if the imaginary part was zero.
  2967. **** `make-polar' changes
  2968. scm_make_polar `make-polar' now returns a real number only if the
  2969. angle or magnitude is an _exact_ 0. If the magnitude is an exact 0,
  2970. it now returns an exact 0. Previously, it would return a real
  2971. number if the imaginary part was an inexact zero.
  2972. scm_c_make_polar now always returns a non-real complex number, even if
  2973. the imaginary part is 0.0. Previously, it would return a real number
  2974. if the imaginary part was 0.0.
  2975. **** `imag-part' changes
  2976. scm_imag_part `imag-part' now returns an exact 0 if applied to an
  2977. inexact real number. Previously it returned an inexact zero in this
  2978. case.
  2979. *** `eqv?' and `equal?' now compare numbers equivalently
  2980. scm_equal_p `equal?' now behaves equivalently to scm_eqv_p `eqv?' for
  2981. numeric values, per R5RS. Previously, equal? worked differently,
  2982. e.g. `(equal? 0.0 -0.0)' returned #t but `(eqv? 0.0 -0.0)' returned #f,
  2983. and `(equal? +nan.0 +nan.0)' returned #f but `(eqv? +nan.0 +nan.0)'
  2984. returned #t.
  2985. *** `(equal? +nan.0 +nan.0)' now returns #t
  2986. Previously, `(equal? +nan.0 +nan.0)' returned #f, although
  2987. `(let ((x +nan.0)) (equal? x x))' and `(eqv? +nan.0 +nan.0)'
  2988. both returned #t. R5RS requires that `equal?' behave like
  2989. `eqv?' when comparing numbers.
  2990. *** Change in handling products `*' involving exact 0
  2991. scm_product `*' now handles exact 0 differently. A product containing
  2992. an exact 0 now returns an exact 0 if and only if the other arguments
  2993. are all exact. An inexact zero is returned if and only if the other
  2994. arguments are all finite but not all exact. If an infinite or NaN
  2995. value is present, a NaN value is returned. Previously, any product
  2996. containing an exact 0 yielded an exact 0, regardless of the other
  2997. arguments.
  2998. *** `expt' and `integer-expt' changes when the base is 0
  2999. While `(expt 0 0)' is still 1, and `(expt 0 N)' for N > 0 is still
  3000. zero, `(expt 0 N)' for N < 0 is now a NaN value, and likewise for
  3001. integer-expt. This is more correct, and conforming to R6RS, but seems
  3002. to be incompatible with R5RS, which would return 0 for all non-zero
  3003. values of N.
  3004. *** `expt' and `integer-expt' are more generic, less strict
  3005. When raising to an exact non-negative integer exponent, `expt' and
  3006. `integer-expt' are now able to exponentiate any object that can be
  3007. multiplied using `*'. They can also raise an object to an exact
  3008. negative integer power if its reciprocal can be taken using `/'.
  3009. In order to allow this, the type of the first argument is no longer
  3010. checked when raising to an exact integer power. If the exponent is 0
  3011. or 1, the first parameter is not manipulated at all, and need not
  3012. even support multiplication.
  3013. *** Infinities are no longer integers, nor rationals
  3014. scm_integer_p `integer?' and scm_rational_p `rational?' now return #f
  3015. for infinities, per R6RS. Previously they returned #t for real
  3016. infinities. The real infinities and NaNs are still considered real by
  3017. scm_real `real?' however, per R6RS.
  3018. *** NaNs are no longer rationals
  3019. scm_rational_p `rational?' now returns #f for NaN values, per R6RS.
  3020. Previously it returned #t for real NaN values. They are still
  3021. considered real by scm_real `real?' however, per R6RS.
  3022. *** `inf?' and `nan?' now throw exceptions for non-reals
  3023. The domain of `inf?' and `nan?' is the real numbers. Guile now signals
  3024. an error when a non-real number or non-number is passed to these
  3025. procedures. (Note that NaNs _are_ considered numbers by scheme, despite
  3026. their name).
  3027. *** `rationalize' bugfixes and changes
  3028. Fixed bugs in scm_rationalize `rationalize'. Previously, it returned
  3029. exact integers unmodified, although that was incorrect if the epsilon
  3030. was at least 1 or inexact, e.g. (rationalize 4 1) should return 3 per
  3031. R5RS and R6RS, but previously it returned 4. It also now handles
  3032. cases involving infinities and NaNs properly, per R6RS.
  3033. *** Trigonometric functions now return exact numbers in some cases
  3034. scm_sin `sin', scm_cos `cos', scm_tan `tan', scm_asin `asin', scm_acos
  3035. `acos', scm_atan `atan', scm_sinh `sinh', scm_cosh `cosh', scm_tanh
  3036. `tanh', scm_sys_asinh `asinh', scm_sys_acosh `acosh', and
  3037. scm_sys_atanh `atanh' now return exact results in some cases.
  3038. *** New procedure: `finite?'
  3039. Add scm_finite_p `finite?' from R6RS to guile core, which returns #t
  3040. if and only if its argument is neither infinite nor a NaN. Note that
  3041. this is not the same as (not (inf? x)) or (not (infinite? x)), since
  3042. NaNs are neither finite nor infinite.
  3043. *** Improved exactness handling for complex number parsing
  3044. When parsing non-real complex numbers, exactness specifiers are now
  3045. applied to each component, as is done in PLT Scheme. For complex
  3046. numbers written in rectangular form, exactness specifiers are applied
  3047. to the real and imaginary parts before calling scm_make_rectangular.
  3048. For complex numbers written in polar form, exactness specifiers are
  3049. applied to the magnitude and angle before calling scm_make_polar.
  3050. Previously, exactness specifiers were applied to the number as a whole
  3051. _after_ calling scm_make_rectangular or scm_make_polar.
  3052. For example, (string->number "#i5.0+0i") now does the equivalent of:
  3053. (make-rectangular (exact->inexact 5.0) (exact->inexact 0))
  3054. which yields 5.0+0.0i. Previously it did the equivalent of:
  3055. (exact->inexact (make-rectangular 5.0 0))
  3056. which yielded 5.0.
  3057. ** Unicode characters
  3058. Unicode characters may be entered in octal format via e.g. `#\454', or
  3059. created via (integer->char 300). A hex external representation will
  3060. probably be introduced at some point.
  3061. ** Unicode strings
  3062. Internally, strings are now represented either in the `latin-1'
  3063. encoding, one byte per character, or in UTF-32, with four bytes per
  3064. character. Strings manage their own allocation, switching if needed.
  3065. Extended characters may be written in a literal string using the
  3066. hexadecimal escapes `\xXX', `\uXXXX', or `\UXXXXXX', for 8-bit, 16-bit,
  3067. or 24-bit codepoints, respectively, or entered directly in the native
  3068. encoding of the port on which the string is read.
  3069. ** Unicode symbols
  3070. One may now use U+03BB (GREEK SMALL LETTER LAMBDA) as an identifier.
  3071. ** Support for non-ASCII source code files
  3072. The default reader now handles source code files for some of the
  3073. non-ASCII character encodings, such as UTF-8. A non-ASCII source file
  3074. should have an encoding declaration near the top of the file. Also,
  3075. there is a new function, `file-encoding', that scans a port for a coding
  3076. declaration. See the section of the manual entitled, "Character Encoding
  3077. of Source Files".
  3078. The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
  3079. code. This use is now discouraged. Binary input and output is
  3080. currently supported by opening ports in the ISO-8859-1 locale.
  3081. ** Source files default to UTF-8.
  3082. If source files do not specify their encoding via a `coding:' block,
  3083. the default encoding is UTF-8, instead of being taken from the current
  3084. locale.
  3085. ** Interactive Guile installs the current locale.
  3086. Instead of leaving the user in the "C" locale, running the Guile REPL
  3087. installs the current locale. [FIXME xref?]
  3088. ** Support for locale transcoding when reading from and writing to ports
  3089. Ports now have an associated character encoding, and port read and write
  3090. operations do conversion to and from locales automatically. Ports also
  3091. have an associated strategy for how to deal with locale conversion
  3092. failures.
  3093. See the documentation in the manual for the four new support functions,
  3094. `set-port-encoding!', `port-encoding', `set-port-conversion-strategy!',
  3095. and `port-conversion-strategy'.
  3096. ** String and SRFI-13 functions can operate on Unicode strings
  3097. ** Unicode support for SRFI-14 character sets
  3098. The default character sets are no longer locale dependent and contain
  3099. characters from the whole Unicode range. There is a new predefined
  3100. character set, `char-set:designated', which contains all assigned
  3101. Unicode characters. There is a new debugging function, `%char-set-dump'.
  3102. ** Character functions operate on Unicode characters
  3103. `char-upcase' and `char-downcase' use default Unicode casing rules.
  3104. Character comparisons such as `char<?' and `char-ci<?' now sort based on
  3105. Unicode code points.
  3106. ** Global variables `scm_charnames' and `scm_charnums' are removed
  3107. These variables contained the names of control characters and were
  3108. used when writing characters. While these were global, they were
  3109. never intended to be public API. They have been replaced with private
  3110. functions.
  3111. ** EBCDIC support is removed
  3112. There was an EBCDIC compile flag that altered some of the character
  3113. processing. It appeared that full EBCDIC support was never completed
  3114. and was unmaintained.
  3115. ** Compile-time warnings
  3116. Guile can warn about potentially unbound free variables. Pass the
  3117. -Wunbound-variable on the `guile-tools compile' command line, or add
  3118. `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
  3119. invocation. Warnings are also enabled by default for expressions entered
  3120. at the REPL.
  3121. Guile can also warn when you pass the wrong number of arguments to a
  3122. procedure, with -Warity-mismatch, or `arity-mismatch' in the
  3123. `#:warnings' as above.
  3124. Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
  3125. warn about unused local or global (top-level) variables, and `-Wformat',
  3126. to check for various errors related to the `format' procedure.
  3127. ** A new `memoize-symbol' evaluator trap has been added.
  3128. This trap can be used for efficiently implementing a Scheme code
  3129. coverage.
  3130. ** Duplicate bindings among used modules are resolved lazily.
  3131. This slightly improves program startup times.
  3132. ** New thread cancellation and thread cleanup API
  3133. See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
  3134. ** New threads are in `(guile-user)' by default, not `(guile)'
  3135. It used to be that a new thread entering Guile would do so in the
  3136. `(guile)' module, unless this was the first time Guile was initialized,
  3137. in which case it was `(guile-user)'. This has been fixed to have all
  3138. new threads unknown to Guile default to `(guile-user)'.
  3139. ** New helpers: `print-exception', `set-exception-printer!'
  3140. These functions implement an extensible exception printer. Guile
  3141. registers printers for all of the exceptions it throws. Users may add
  3142. their own printers. There is also `scm_print_exception', for use by C
  3143. programs. Pleasantly, this allows SRFI-35 and R6RS exceptions to be
  3144. printed appropriately.
  3145. ** GOOPS dispatch in scheme
  3146. As an implementation detail, GOOPS dispatch is no longer implemented by
  3147. special evaluator bytecodes, but rather directly via a Scheme function
  3148. associated with an applicable struct. There is some VM support for the
  3149. underlying primitives, like `class-of'.
  3150. This change will in the future allow users to customize generic function
  3151. dispatch without incurring a performance penalty, and allow us to
  3152. implement method combinations.
  3153. ** Applicable struct support
  3154. One may now make structs from Scheme that may be applied as procedures.
  3155. To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
  3156. That struct will be the vtable of your applicable structs; instances of
  3157. that new struct are assumed to have the procedure in their first slot.
  3158. `<applicable-struct-vtable>' is like Common Lisp's
  3159. `funcallable-standard-class'. Likewise there is
  3160. `<applicable-struct-with-setter-vtable>', which looks for the setter in
  3161. the second slot. This needs to be better documented.
  3162. ** GOOPS cleanups.
  3163. GOOPS had a number of concepts that were relevant to the days of Tcl,
  3164. but not any more: operators and entities, mainly. These objects were
  3165. never documented, and it is unlikely that they were ever used. Operators
  3166. were a kind of generic specific to the Tcl support. Entities were
  3167. replaced by applicable structs, mentioned above.
  3168. ** New struct slot allocation: "hidden"
  3169. A hidden slot is readable and writable, but will not be initialized by a
  3170. call to make-struct. For example in your layout you would say "ph"
  3171. instead of "pw". Hidden slots are useful for adding new slots to a
  3172. vtable without breaking existing invocations to make-struct.
  3173. ** eqv? not a generic
  3174. One used to be able to extend `eqv?' as a primitive-generic, but no
  3175. more. Because `eqv?' is in the expansion of `case' (via `memv'), which
  3176. should be able to compile to static dispatch tables, it doesn't make
  3177. sense to allow extensions that would subvert this optimization.
  3178. ** `inet-ntop' and `inet-pton' are always available.
  3179. Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
  3180. there is no more need to use `inet-aton'/`inet-ntoa'. The latter
  3181. functions are deprecated.
  3182. ** `getopt-long' parsing errors throw to `quit', not `misc-error'
  3183. This change should inhibit backtraces on argument parsing errors.
  3184. `getopt-long' has been modified to print out the error that it throws
  3185. itself.
  3186. ** New primitive: `tmpfile'.
  3187. See "File System" in the manual.
  3188. ** Random generator state may be serialized to a datum
  3189. `random-state->datum' will serialize a random state to a datum, which
  3190. may be written out, read back in later, and revivified using
  3191. `datum->random-state'. See "Random" in the manual, for more details.
  3192. ** Fix random number generator on 64-bit platforms
  3193. There was a nasty bug on 64-bit platforms in which asking for a random
  3194. integer with a range between 2**32 and 2**64 caused a segfault. After
  3195. many embarrassing iterations, this was fixed.
  3196. ** Fast bit operations.
  3197. The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
  3198. have dedicated bytecodes. Guile is not just for symbolic computation,
  3199. it's for number crunching too.
  3200. ** Faster SRFI-9 record access
  3201. SRFI-9 records are now implemented directly on top of Guile's structs,
  3202. and their accessors are defined in such a way that normal call-sites
  3203. inline to special VM opcodes, while still allowing for the general case
  3204. (e.g. passing a record accessor to `apply').
  3205. ** R6RS block comment support
  3206. Guile now supports R6RS nested block comments. The start of a comment is
  3207. marked with `#|', and the end with `|#'.
  3208. ** `guile-2' cond-expand feature
  3209. To test if your code is running under Guile 2.0 (or its alpha releases),
  3210. test for the `guile-2' cond-expand feature. Like this:
  3211. (cond-expand (guile-2 (eval-when (compile)
  3212. ;; This must be evaluated at compile time.
  3213. (fluid-set! current-reader my-reader)))
  3214. (guile
  3215. ;; Earlier versions of Guile do not have a
  3216. ;; separate compilation phase.
  3217. (fluid-set! current-reader my-reader)))
  3218. ** New global variables: %load-compiled-path, %load-compiled-extensions
  3219. These are analogous to %load-path and %load-extensions.
  3220. ** New fluid: `%file-port-name-canonicalization'
  3221. This fluid parameterizes the file names that are associated with file
  3222. ports. If %file-port-name-canonicalization is 'absolute, then file names
  3223. are canonicalized to be absolute paths. If it is 'relative, then the
  3224. name is canonicalized, but any prefix corresponding to a member of
  3225. `%load-path' is stripped off. Otherwise the names are passed through
  3226. unchanged.
  3227. In addition, the `compile-file' and `compile-and-load' procedures bind
  3228. %file-port-name-canonicalization to their `#:canonicalization' keyword
  3229. argument, which defaults to 'relative. In this way, one might compile
  3230. "../module/ice-9/boot-9.scm", but the path that gets residualized into
  3231. the .go is "ice-9/boot-9.scm".
  3232. ** New procedure, `make-promise'
  3233. `(make-promise (lambda () foo))' is equivalent to `(delay foo)'.
  3234. ** `defined?' may accept a module as its second argument
  3235. Previously it only accepted internal structures from the evaluator.
  3236. ** New entry into %guile-build-info: `ccachedir'
  3237. ** Fix bug in `module-bound?'.
  3238. `module-bound?' was returning true if a module did have a local
  3239. variable, but one that was unbound, but another imported module bound
  3240. the variable. This was an error, and was fixed.
  3241. ** `(ice-9 syncase)' has been deprecated.
  3242. As syntax-case is available by default, importing `(ice-9 syncase)' has
  3243. no effect, and will trigger a deprecation warning.
  3244. ** New readline history functions
  3245. The (ice-9 readline) module now provides add-history, read-history,
  3246. write-history and clear-history, which wrap the corresponding GNU
  3247. History library functions.
  3248. ** Removed deprecated uniform array procedures:
  3249. dimensions->uniform-array, list->uniform-array, array-prototype
  3250. Instead, use make-typed-array, list->typed-array, or array-type,
  3251. respectively.
  3252. ** Deprecate the old `scm-style-repl'
  3253. The following bindings from boot-9 are now found in `(ice-9
  3254. scm-style-repl)': `scm-style-repl', `error-catching-loop',
  3255. `error-catching-repl', `bad-throw', `scm-repl-silent'
  3256. `assert-repl-silence', `repl-print-unspecified',
  3257. `assert-repl-print-unspecified', `scm-repl-verbose',
  3258. `assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
  3259. `default-pre-unwind-handler', `handle-system-error',
  3260. The following bindings have been deprecated, with no replacement:
  3261. `pre-unwind-handler-dispatch'.
  3262. The following bindings have been totally removed:
  3263. `before-signal-stack'.
  3264. Deprecated forwarding shims have been installed so that users that
  3265. expect these bindings in the main namespace will still work, but receive
  3266. a deprecation warning.
  3267. ** `set-batch-mode?!' replaced by `ensure-batch-mode!'
  3268. "Batch mode" is a flag used to tell a program that it is not running
  3269. interactively. One usually turns it on after a fork. It may not be
  3270. turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
  3271. because it is a better interface, as it can only turn on batch mode, not
  3272. turn it off.
  3273. ** Deprecate `save-stack', `the-last-stack'
  3274. It used to be that the way to debug programs in Guile was to capture the
  3275. stack at the time of error, drop back to the REPL, then debug that
  3276. stack. But this approach didn't compose, was tricky to get right in the
  3277. presence of threads, and was not very powerful.
  3278. So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
  3279. `(ice-9 save-stack)', with deprecated bindings left in the root module.
  3280. ** `top-repl' has its own module
  3281. The `top-repl' binding, called with Guile is run interactively, is now
  3282. is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
  3283. left in the default environment.
  3284. ** `display-error' takes a frame
  3285. The `display-error' / `scm_display_error' helper now takes a frame as an
  3286. argument instead of a stack. Stacks are still supported in deprecated
  3287. builds. Additionally, `display-error' will again source location
  3288. information for the error.
  3289. ** No more `(ice-9 debug)'
  3290. This module had some debugging helpers that are no longer applicable to
  3291. the current debugging model. Importing this module will produce a
  3292. deprecation warning. Users should contact bug-guile for support.
  3293. ** Remove obsolete debug-options
  3294. Removed `breakpoints', `trace', `procnames', `indent', `frames',
  3295. `maxdepth', and `debug' debug-options.
  3296. ** `backtrace' debug option on by default
  3297. Given that Guile 2.0 can always give you a backtrace, backtraces are now
  3298. on by default.
  3299. ** `turn-on-debugging' deprecated
  3300. ** Remove obsolete print-options
  3301. The `source' and `closure-hook' print options are obsolete, and have
  3302. been removed.
  3303. ** Remove obsolete read-options
  3304. The "elisp-strings" and "elisp-vectors" read options were unused and
  3305. obsolete, so they have been removed.
  3306. ** Remove eval-options and trap-options
  3307. Eval-options and trap-options are obsolete with the new VM and
  3308. evaluator.
  3309. ** Remove (ice-9 debugger) and (ice-9 debugging)
  3310. See "Traps" and "Interactive Debugging" in the manual, for information
  3311. on their replacements.
  3312. ** Remove the GDS Emacs integration
  3313. See "Using Guile in Emacs" in the manual, for info on how we think you
  3314. should use Guile with Emacs.
  3315. ** Deprecated: `lazy-catch'
  3316. `lazy-catch' was a form that captured the stack at the point of a
  3317. `throw', but the dynamic state at the point of the `catch'. It was a bit
  3318. crazy. Please change to use `catch', possibly with a throw-handler, or
  3319. `with-throw-handler'.
  3320. ** Deprecated: primitive properties
  3321. The `primitive-make-property', `primitive-property-set!',
  3322. `primitive-property-ref', and `primitive-property-del!' procedures were
  3323. crufty and only used to implement object properties, which has a new,
  3324. threadsafe implementation. Use object properties or weak hash tables
  3325. instead.
  3326. ** Deprecated `@bind' syntax
  3327. `@bind' was part of an older implementation of the Emacs Lisp language,
  3328. and is no longer used.
  3329. ** Miscellaneous other deprecations
  3330. `cuserid' has been deprecated, as it only returns 8 bytes of a user's
  3331. login. Use `(passwd:name (getpwuid (geteuid)))' instead.
  3332. Additionally, the procedures `apply-to-args', `has-suffix?', `scheme-file-suffix'
  3333. `get-option', `for-next-option', `display-usage-report',
  3334. `transform-usage-lambda', `collect', and `set-batch-mode?!' have all
  3335. been deprecated.
  3336. ** Add support for unbound fluids
  3337. See `make-unbound-fluid', `fluid-unset!', and `fluid-bound?' in the
  3338. manual.
  3339. ** Add `variable-unset!'
  3340. See "Variables" in the manual, for more details.
  3341. ** Last but not least, the `λ' macro can be used in lieu of `lambda'
  3342. * Changes to the C interface
  3343. ** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
  3344. The semantics of `scm_gc_malloc ()' have been changed, in a
  3345. backward-compatible way. A new allocation routine,
  3346. `scm_gc_malloc_pointerless ()', was added.
  3347. Libgc is a conservative GC, which we hope will make interaction with C
  3348. code easier and less error-prone.
  3349. ** New procedures: `scm_to_stringn', `scm_from_stringn'
  3350. ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,}
  3351. ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,}
  3352. These new procedures convert to and from string representations in
  3353. particular encodings.
  3354. Users should continue to use locale encoding for user input, user
  3355. output, or interacting with the C library.
  3356. Use the Latin-1 functions for ASCII, and for literals in source code.
  3357. Use UTF-8 functions for interaction with modern libraries which deal in
  3358. UTF-8, and UTF-32 for interaction with utf32-using libraries.
  3359. Otherwise, use scm_to_stringn or scm_from_stringn with a specific
  3360. encoding.
  3361. ** New type definitions for `scm_t_intptr' and friends.
  3362. `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
  3363. `SIZEOF_SCM_T_BITS', `scm_t_intptr' and `scm_t_uintptr' are now
  3364. available to C. Have fun!
  3365. ** The GH interface (deprecated in version 1.6, 2001) was removed.
  3366. ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
  3367. This makes these internal functions technically not callable from
  3368. application code.
  3369. ** Functions for handling `scm_option' now no longer require an argument
  3370. indicating length of the `scm_t_option' array.
  3371. ** Procedures-with-setters are now implemented using applicable structs
  3372. From a user's perspective this doesn't mean very much. But if, for some
  3373. odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
  3374. SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
  3375. is gone.
  3376. ** Remove old evaluator closures
  3377. There used to be ranges of typecodes allocated to interpreted data
  3378. structures, but that it no longer the case, given that interpreted
  3379. procedure are now just regular VM closures. As a result, there is a
  3380. newly free tc3, and a number of removed macros. See the ChangeLog for
  3381. details.
  3382. ** Primitive procedures are now VM trampoline procedures
  3383. It used to be that there were something like 12 different typecodes
  3384. allocated to primitive procedures, each with its own calling convention.
  3385. Now there is only one, the gsubr. This may affect user code if you were
  3386. defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The
  3387. solution is to switch to use scm_c_make_gsubr. This solution works well
  3388. both with the old 1.8 and with the current 1.9 branch.
  3389. Guile's old evaluator used to have special cases for applying "gsubrs",
  3390. primitive procedures with specified numbers of required, optional, and
  3391. rest arguments. Now, however, Guile represents gsubrs as normal VM
  3392. procedures, with appropriate bytecode to parse out the correct number of
  3393. arguments, including optional and rest arguments, and then with a
  3394. special bytecode to apply the gsubr.
  3395. This allows primitive procedures to appear on the VM stack, allowing
  3396. them to be accurately counted in profiles. Also they now have more
  3397. debugging information attached to them -- their number of arguments, for
  3398. example. In addition, the VM can completely inline the application
  3399. mechanics, allowing for faster primitive calls.
  3400. However there are some changes on the C level. There is no more
  3401. `scm_tc7_gsubr' or `scm_tcs_subrs' typecode for primitive procedures, as
  3402. they are just VM procedures. Likewise the macros `SCM_GSUBR_TYPE',
  3403. `SCM_GSUBR_MAKTYPE', `SCM_GSUBR_REQ', `SCM_GSUBR_OPT', and
  3404. `SCM_GSUBR_REST' are gone, as are `SCM_SUBR_META_INFO', `SCM_SUBR_PROPS'
  3405. `SCM_SET_SUBR_GENERIC_LOC', and `SCM_SUBR_ARITY_TO_TYPE'.
  3406. Perhaps more significantly, `scm_c_make_subr',
  3407. `scm_c_make_subr_with_generic', `scm_c_define_subr', and
  3408. `scm_c_define_subr_with_generic'. They all operated on subr typecodes,
  3409. and there are no more subr typecodes. Use the scm_c_make_gsubr family
  3410. instead.
  3411. Normal users of gsubrs should not be affected, though, as the
  3412. scm_c_make_gsubr family still is the correct way to create primitive
  3413. procedures.
  3414. ** Remove deprecated array C interfaces
  3415. Removed the deprecated array functions `scm_i_arrayp',
  3416. `scm_i_array_ndim', `scm_i_array_mem', `scm_i_array_v',
  3417. `scm_i_array_base', `scm_i_array_dims', and the deprecated macros
  3418. `SCM_ARRAYP', `SCM_ARRAY_NDIM', `SCM_ARRAY_CONTP', `SCM_ARRAY_MEM',
  3419. `SCM_ARRAY_V', `SCM_ARRAY_BASE', and `SCM_ARRAY_DIMS'.
  3420. ** Remove unused snarf macros
  3421. `SCM_DEFINE1', `SCM_PRIMITIVE_GENERIC_1', `SCM_PROC1, and `SCM_GPROC1'
  3422. are no more. Use SCM_DEFINE or SCM_PRIMITIVE_GENERIC instead.
  3423. ** New functions: `scm_call_n', `scm_c_run_hookn'
  3424. `scm_call_n' applies to apply a function to an array of arguments.
  3425. `scm_c_run_hookn' runs a hook with an array of arguments.
  3426. ** Some SMOB types changed to have static typecodes
  3427. Fluids, dynamic states, and hash tables used to be SMOB objects, but now
  3428. they have statically allocated tc7 typecodes.
  3429. ** Preparations for changing SMOB representation
  3430. If things go right, we'll be changing the SMOB representation soon. To
  3431. that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
  3432. the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
  3433. in the future. Code accessing SMOBs using SCM_CELL macros was never
  3434. correct, but until now things still worked. Users should be aware of
  3435. such changes.
  3436. ** Changed invocation mechanics of applicable SMOBs
  3437. Guile's old evaluator used to have special cases for applying SMOB
  3438. objects. Now, with the VM, when Guile sees a SMOB, it looks up a VM
  3439. trampoline procedure for it, and use the normal mechanics to apply the
  3440. trampoline. This simplifies procedure application in the normal,
  3441. non-SMOB case.
  3442. The upshot is that the mechanics used to apply a SMOB are different from
  3443. 1.8. Descriptors no longer have `apply_0', `apply_1', `apply_2', and
  3444. `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
  3445. deprecated. Just use the scm_call_0 family of procedures.
  3446. ** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
  3447. Though these SRFI support libraries did expose API, they encoded a
  3448. strange version string into their library names. That version was never
  3449. programmatically exported, so there was no way people could use the
  3450. libs.
  3451. This was a fortunate oversight, as it allows us to remove the need for
  3452. extra, needless shared libraries --- the C support code for SRFIs 4, 13,
  3453. and 14 was already in core --- and allow us to incrementally return the
  3454. SRFI implementation to Scheme.
  3455. ** New C function: scm_module_public_interface
  3456. This procedure corresponds to Scheme's `module-public-interface'.
  3457. ** Undeprecate `scm_the_root_module ()'
  3458. It's useful to be able to get the root module from C without doing a
  3459. full module lookup.
  3460. ** Inline vector allocation
  3461. Instead of having vectors point out into the heap for their data, their
  3462. data is now allocated inline to the vector object itself. The same is
  3463. true for bytevectors, by default, though there is an indirection
  3464. available which should allow for making a bytevector from an existing
  3465. memory region.
  3466. ** New struct constructors that don't involve making lists
  3467. `scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
  3468. constructors, respectively, for structs. You might find them useful.
  3469. ** Stack refactor
  3470. In Guile 1.8, there were debugging frames on the C stack. Now there is
  3471. no more need to explicitly mark the stack in this way, because Guile has
  3472. a VM stack that it knows how to walk, which simplifies the C API
  3473. considerably. See the ChangeLog for details; the relevant interface is
  3474. in libguile/stacks.h. The Scheme API has not been changed significantly.
  3475. ** Removal of Guile's primitive object system.
  3476. There were a number of pieces in `objects.[ch]' that tried to be a
  3477. minimal object system, but were never documented, and were quickly
  3478. obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
  3479. `scm_make_subclass_object', `scm_metaclass_standard', and like symbols
  3480. from objects.h are no more. In the very unlikely case in which these
  3481. were useful to you, we urge you to contact guile-devel.
  3482. ** No future.
  3483. Actually the future is still in the state that it was, is, and ever
  3484. shall be, Amen, except that `futures.c' and `futures.h' are no longer a
  3485. part of it. These files were experimental, never compiled, and would be
  3486. better implemented in Scheme anyway. In the future, that is.
  3487. ** Deprecate trampolines
  3488. There used to be C functions `scm_trampoline_0', `scm_trampoline_1', and
  3489. so on. The point was to do some precomputation on the type of the
  3490. procedure, then return a specialized "call" procedure. However this
  3491. optimization wasn't actually an optimization, so it is now deprecated.
  3492. Just use `scm_call_0', etc instead.
  3493. ** Deprecated `scm_badargsp'
  3494. This function is unused in Guile, but was part of its API.
  3495. ** Better support for Lisp `nil'.
  3496. The bit representation of `nil' has been tweaked so that it is now very
  3497. efficient to check e.g. if a value is equal to Scheme's end-of-list or
  3498. Lisp's nil. Additionally there are a heap of new, specific predicates
  3499. like scm_is_null_or_nil.
  3500. ** Better integration of Lisp `nil'.
  3501. `scm_is_boolean', `scm_is_false', and `scm_is_null' all return true now
  3502. for Lisp's `nil'. This shouldn't affect any Scheme code at this point,
  3503. but when we start to integrate more with Emacs, it is possible that we
  3504. break code that assumes that, for example, `(not x)' implies that `x' is
  3505. `eq?' to `#f'. This is not a common assumption. Refactoring affected
  3506. code to rely on properties instead of identities will improve code
  3507. correctness. See "Nil" in the manual, for more details.
  3508. ** Support for static allocation of strings, symbols, and subrs.
  3509. Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
  3510. much of their associated data as static variables, reducing Guile's
  3511. memory footprint.
  3512. ** `scm_stat' has an additional argument, `exception_on_error'
  3513. ** `scm_primitive_load_path' has an additional argument `exception_on_not_found'
  3514. ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
  3515. Previously they would use the `off_t' type, which is fragile since its
  3516. definition depends on the application's value for `_FILE_OFFSET_BITS'.
  3517. ** The `long_long' C type, deprecated in 1.8, has been removed
  3518. ** Removed deprecated uniform array procedures: scm_make_uve,
  3519. scm_array_prototype, scm_list_to_uniform_array,
  3520. scm_dimensions_to_uniform_array, scm_make_ra, scm_shap2ra, scm_cvref,
  3521. scm_ra_set_contp, scm_aind, scm_raprin1
  3522. These functions have been deprecated since early 2005.
  3523. * Changes to the distribution
  3524. ** Guile's license is now LGPLv3+
  3525. In other words the GNU Lesser General Public License, version 3 or
  3526. later (at the discretion of each person that chooses to redistribute
  3527. part of Guile).
  3528. ** AM_SILENT_RULES
  3529. Guile's build is visually quieter, due to the use of Automake 1.11's
  3530. AM_SILENT_RULES. Build as `make V=1' to see all of the output.
  3531. ** GOOPS documentation folded into Guile reference manual
  3532. GOOPS, Guile's object system, used to be documented in separate manuals.
  3533. This content is now included in Guile's manual directly.
  3534. ** `guile-config' will be deprecated in favor of `pkg-config'
  3535. `guile-config' has been rewritten to get its information from
  3536. `pkg-config', so this should be a transparent change. Note however that
  3537. guile.m4 has yet to be modified to call pkg-config instead of
  3538. guile-config.
  3539. ** Guile now provides `guile-2.0.pc' instead of `guile-1.8.pc'
  3540. Programs that use `pkg-config' to find Guile or one of its Autoconf
  3541. macros should now require `guile-2.0' instead of `guile-1.8'.
  3542. ** New installation directory: $(pkglibdir)/1.9/ccache
  3543. If $(libdir) is /usr/lib, for example, Guile will install its .go files
  3544. to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
  3545. ** Parallel installability fixes
  3546. Guile now installs its header files to a effective-version-specific
  3547. directory, and includes the effective version (e.g. 2.0) in the library
  3548. name (e.g. libguile-2.0.so).
  3549. This change should be transparent to users, who should detect Guile via
  3550. the guile.m4 macro, or the guile-2.0.pc pkg-config file. It will allow
  3551. parallel installs for multiple versions of Guile development
  3552. environments.
  3553. ** Dynamically loadable extensions may be placed in a Guile-specific path
  3554. Before, Guile only searched the system library paths for extensions
  3555. (e.g. /usr/lib), which meant that the names of Guile extensions had to
  3556. be globally unique. Installing them to a Guile-specific extensions
  3557. directory is cleaner. Use `pkg-config --variable=extensiondir
  3558. guile-2.0' to get the location of the extensions directory.
  3559. ** User Scheme code may be placed in a version-specific path
  3560. Before, there was only one way to install user Scheme code to a
  3561. version-specific Guile directory: install to Guile's own path,
  3562. e.g. /usr/share/guile/2.0. The site directory,
  3563. e.g. /usr/share/guile/site, was unversioned. This has been changed to
  3564. add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
  3565. searched before the global site directory.
  3566. ** New dependency: libgc
  3567. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
  3568. ** New dependency: GNU libunistring
  3569. See http://www.gnu.org/software/libunistring/, for more information. Our
  3570. Unicode support uses routines from libunistring.
  3571. ** New dependency: libffi
  3572. See http://sourceware.org/libffi/, for more information.
  3573. Changes in 1.8.8 (since 1.8.7)
  3574. * Bugs fixed
  3575. ** Fix possible buffer overruns when parsing numbers
  3576. ** Avoid clash with system setjmp/longjmp on IA64
  3577. ** Fix `wrong type arg' exceptions with IPv6 addresses
  3578. Changes in 1.8.7 (since 1.8.6)
  3579. * New modules (see the manual for details)
  3580. ** `(srfi srfi-98)', an interface to access environment variables
  3581. * Bugs fixed
  3582. ** Fix compilation with `--disable-deprecated'
  3583. ** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
  3584. ** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
  3585. ** Fix build problem when scm_t_timespec is different from struct timespec
  3586. ** Fix build when compiled with -Wundef -Werror
  3587. ** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
  3588. ** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
  3589. ** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
  3590. ** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
  3591. ** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
  3592. ** Fix reading of complex numbers where both parts are inexact decimals
  3593. ** Allow @ macro to work with (ice-9 syncase)
  3594. Previously, use of the @ macro in a module whose code is being
  3595. transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
  3596. Now it works as you would expect (giving the value of the specified
  3597. module binding).
  3598. ** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
  3599. Changes in 1.8.6 (since 1.8.5)
  3600. * New features (see the manual for details)
  3601. ** New convenience function `scm_c_symbol_length ()'
  3602. ** Single stepping through code from Emacs
  3603. When you use GDS to evaluate Scheme code from Emacs, you can now use
  3604. `C-u' to indicate that you want to single step through that code. See
  3605. `Evaluating Scheme Code' in the manual for more details.
  3606. ** New "guile(1)" man page!
  3607. * Changes to the distribution
  3608. ** Automake's `AM_MAINTAINER_MODE' is no longer used
  3609. Thus, the `--enable-maintainer-mode' configure option is no longer
  3610. available: Guile is now always configured in "maintainer mode".
  3611. ** `ChangeLog' files are no longer updated
  3612. Instead, changes are detailed in the version control system's logs. See
  3613. the top-level `ChangeLog' files for details.
  3614. * Bugs fixed
  3615. ** `symbol->string' now returns a read-only string, as per R5RS
  3616. ** Fix incorrect handling of the FLAGS argument of `fold-matches'
  3617. ** `guile-config link' now prints `-L$libdir' before `-lguile'
  3618. ** Fix memory corruption involving GOOPS' `class-redefinition'
  3619. ** Fix possible deadlock in `mutex-lock'
  3620. ** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
  3621. ** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
  3622. ** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
  3623. ** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
  3624. ** Fix misleading output from `(help rationalize)'
  3625. ** Fix build failure on Debian hppa architecture (bad stack growth detection)
  3626. ** Fix `gcd' when called with a single, negative argument.
  3627. ** Fix `Stack overflow' errors seen when building on some platforms
  3628. ** Fix bug when `scm_with_guile ()' was called several times from the
  3629. same thread
  3630. ** The handler of SRFI-34 `with-exception-handler' is now invoked in the
  3631. dynamic environment of the call to `raise'
  3632. ** Fix potential deadlock in `make-struct'
  3633. ** Fix compilation problem with libltdl from Libtool 2.2.x
  3634. ** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
  3635. Changes in 1.8.5 (since 1.8.4)
  3636. * Infrastructure changes
  3637. ** Guile repository switched from CVS to Git
  3638. The new repository can be accessed using
  3639. "git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
  3640. http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
  3641. ** Add support for `pkg-config'
  3642. See "Autoconf Support" in the manual for details.
  3643. * New modules (see the manual for details)
  3644. ** `(srfi srfi-88)'
  3645. * New features (see the manual for details)
  3646. ** New `postfix' read option, for SRFI-88 keyword syntax
  3647. ** Some I/O primitives have been inlined, which improves I/O performance
  3648. ** New object-based traps infrastructure
  3649. This is a GOOPS-based infrastructure that builds on Guile's low-level
  3650. evaluator trap calls and facilitates the development of debugging
  3651. features like single-stepping, breakpoints, tracing and profiling.
  3652. See the `Traps' node of the manual for details.
  3653. ** New support for working on Guile code from within Emacs
  3654. Guile now incorporates the `GDS' library (previously distributed
  3655. separately) for working on Guile code from within Emacs. See the
  3656. `Using Guile In Emacs' node of the manual for details.
  3657. * Bugs fixed
  3658. ** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
  3659. ** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
  3660. Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
  3661. would trigger an unbound variable error for `match:andmap'.
  3662. ** `(oop goops describe)' now properly provides the `describe' feature
  3663. ** Fixed `args-fold' from `(srfi srfi-37)'
  3664. Previously, parsing short option names of argument-less options would
  3665. lead to a stack overflow.
  3666. ** `(srfi srfi-35)' is now visible through `cond-expand'
  3667. ** Fixed type-checking for the second argument of `eval'
  3668. ** Fixed type-checking for SRFI-1 `partition'
  3669. ** Fixed `struct-ref' and `struct-set!' on "light structs"
  3670. ** Honor struct field access rights in GOOPS
  3671. ** Changed the storage strategy of source properties, which fixes a deadlock
  3672. ** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
  3673. ** Fixed build issue for GNU/Linux on IA64
  3674. ** Fixed build issues on NetBSD 1.6
  3675. ** Fixed build issue on Solaris 2.10 x86_64
  3676. ** Fixed build issue with DEC/Compaq/HP's compiler
  3677. ** Fixed `scm_from_complex_double' build issue on FreeBSD
  3678. ** Fixed `alloca' build issue on FreeBSD 6
  3679. ** Removed use of non-portable makefile constructs
  3680. ** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
  3681. ** Make sure all tests honor `$TMPDIR'
  3682. Changes in 1.8.4 (since 1.8.3)
  3683. * Bugs fixed
  3684. ** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
  3685. ** Fixed a segmentation fault which occurred when displaying the
  3686. backtrace of a stack with a promise object (made by `delay') in it.
  3687. ** Make `accept' leave guile mode while blocking
  3688. ** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
  3689. ** Fixed a build problem on AIX (use of func_data identifier)
  3690. ** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
  3691. called with an associator proc that returns neither a pair nor #f.
  3692. ** Secondary threads now always return a valid module for (current-module).
  3693. ** Avoid MacOS build problems caused by incorrect combination of "64"
  3694. system and library calls.
  3695. ** `guile-snarf' now honors `$TMPDIR'
  3696. ** `guile-config compile' now reports CPPFLAGS used at compile-time
  3697. ** Fixed build with Sun Studio (Solaris 9)
  3698. ** Fixed wrong-type-arg errors when creating zero length SRFI-4
  3699. uniform vectors on AIX.
  3700. ** Fixed a deadlock that occurs upon GC with multiple threads.
  3701. ** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
  3702. ** Fixed autotool-derived build problems on AIX 6.1.
  3703. ** Fixed NetBSD/alpha support
  3704. ** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
  3705. * New modules (see the manual for details)
  3706. ** `(srfi srfi-69)'
  3707. * Documentation fixes and improvements
  3708. ** Removed premature breakpoint documentation
  3709. The features described are not available in the series of 1.8.x
  3710. releases, so the documentation was misleading and has been removed.
  3711. ** More about Guile's default *random-state* variable
  3712. ** GOOPS: more about how to use `next-method'
  3713. * Changes to the distribution
  3714. ** Corrected a few files that referred incorrectly to the old GPL + special exception licence
  3715. In fact Guile since 1.8.0 has been licensed with the GNU Lesser
  3716. General Public License, and the few incorrect files have now been
  3717. fixed to agree with the rest of the Guile distribution.
  3718. ** Removed unnecessary extra copies of COPYING*
  3719. The distribution now contains a single COPYING.LESSER at its top level.
  3720. Changes in 1.8.3 (since 1.8.2)
  3721. * New modules (see the manual for details)
  3722. ** `(srfi srfi-35)'
  3723. ** `(srfi srfi-37)'
  3724. * Bugs fixed
  3725. ** The `(ice-9 slib)' module now works as expected
  3726. ** Expressions like "(set! 'x #t)" no longer yield a crash
  3727. ** Warnings about duplicate bindings now go to stderr
  3728. ** A memory leak in `make-socket-address' was fixed
  3729. ** Alignment issues (e.g., on SPARC) in network routines were fixed
  3730. ** A threading issue that showed up at least on NetBSD was fixed
  3731. ** Build problems on Solaris and IRIX fixed
  3732. * Implementation improvements
  3733. ** The reader is now faster, which reduces startup time
  3734. ** Procedures returned by `record-accessor' and `record-modifier' are faster
  3735. Changes in 1.8.2 (since 1.8.1):
  3736. * New procedures (see the manual for details)
  3737. ** set-program-arguments
  3738. ** make-vtable
  3739. * Incompatible changes
  3740. ** The body of a top-level `define' no longer sees the binding being created
  3741. In a top-level `define', the binding being created is no longer visible
  3742. from the `define' body. This breaks code like
  3743. "(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
  3744. unbound in the body. However, such code was not R5RS-compliant anyway,
  3745. per Section 5.2.1.
  3746. * Bugs fixed
  3747. ** Fractions were not `equal?' if stored in unreduced form.
  3748. (A subtle problem, since printing a value reduced it, making it work.)
  3749. ** srfi-60 `copy-bit' failed on 64-bit systems
  3750. ** "guile --use-srfi" option at the REPL can replace core functions
  3751. (Programs run with that option were ok, but in the interactive REPL
  3752. the core bindings got priority, preventing SRFI replacements or
  3753. extensions.)
  3754. ** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
  3755. ** `kill' on mingw throws an error for a PID other than oneself
  3756. ** Procedure names are attached to procedure-with-setters
  3757. ** Array read syntax works with negative lower bound
  3758. ** `array-in-bounds?' fix if an array has different lower bounds on each index
  3759. ** `*' returns exact 0 for "(* inexact 0)"
  3760. This follows what it always did for "(* 0 inexact)".
  3761. ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
  3762. ** SRFI-19: `date->julian-day' did not account for timezone offset
  3763. ** `ttyname' no longer crashes when passed a non-tty argument
  3764. ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
  3765. ** Small memory leaks have been fixed in `make-fluid' and `add-history'
  3766. ** GOOPS: Fixed a bug in `method-more-specific?'
  3767. ** Build problems on Solaris fixed
  3768. ** Build problems on HP-UX IA64 fixed
  3769. ** Build problems on MinGW fixed
  3770. Changes in 1.8.1 (since 1.8.0):
  3771. * LFS functions are now used to access 64-bit files on 32-bit systems.
  3772. * New procedures (see the manual for details)
  3773. ** primitive-_exit - [Scheme] the-root-module
  3774. ** scm_primitive__exit - [C]
  3775. ** make-completion-function - [Scheme] (ice-9 readline)
  3776. ** scm_c_locale_stringn_to_number - [C]
  3777. ** scm_srfi1_append_reverse [C]
  3778. ** scm_srfi1_append_reverse_x [C]
  3779. ** scm_log - [C]
  3780. ** scm_log10 - [C]
  3781. ** scm_exp - [C]
  3782. ** scm_sqrt - [C]
  3783. * Bugs fixed
  3784. ** Build problems have been fixed on MacOS, SunOS, and QNX.
  3785. ** `strftime' fix sign of %z timezone offset.
  3786. ** A one-dimensional array can now be 'equal?' to a vector.
  3787. ** Structures, records, and SRFI-9 records can now be compared with `equal?'.
  3788. ** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
  3789. ** `record-accessor' and `record-modifier' now have strict type checks.
  3790. Record accessor and modifier procedures now throw an error if the
  3791. record type of the record they're given is not the type expected.
  3792. (Previously accessors returned #f and modifiers silently did nothing).
  3793. ** It is now OK to use both autoload and use-modules on a given module.
  3794. ** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
  3795. Previously there was no checking on primatives like make-vector that
  3796. accept "one or two" arguments. Now there is.
  3797. ** The srfi-1 assoc function now calls its equality predicate properly.
  3798. Previously srfi-1 assoc would call the equality predicate with the key
  3799. last. According to the SRFI, the key should be first.
  3800. ** A bug in n-par-for-each and n-for-each-par-map has been fixed.
  3801. ** The array-set! procedure no longer segfaults when given a bit vector.
  3802. ** Bugs in make-shared-array have been fixed.
  3803. ** string<? and friends now follow char<? etc order on 8-bit chars.
  3804. ** The format procedure now handles inf and nan values for ~f correctly.
  3805. ** exact->inexact should no longer overflow when given certain large fractions.
  3806. ** srfi-9 accessor and modifier procedures now have strict record type checks.
  3807. This matches the srfi-9 specification.
  3808. ** (ice-9 ftw) procedures won't ignore different files with same inode number.
  3809. Previously the (ice-9 ftw) procedures would ignore any file that had
  3810. the same inode number as a file they had already seen, even if that
  3811. file was on a different device.
  3812. Changes in 1.8.0 (changes since the 1.6.x series):
  3813. * Changes to the distribution
  3814. ** Guile is now licensed with the GNU Lesser General Public License.
  3815. ** The manual is now licensed with the GNU Free Documentation License.
  3816. ** Guile now requires GNU MP (http://swox.com/gmp).
  3817. Guile now uses the GNU MP library for arbitrary precision arithmetic.
  3818. ** Guile now has separate private and public configuration headers.
  3819. That is, things like HAVE_STRING_H no longer leak from Guile's
  3820. headers.
  3821. ** Guile now provides and uses an "effective" version number.
  3822. Guile now provides scm_effective_version and effective-version
  3823. functions which return the "effective" version number. This is just
  3824. the normal full version string without the final micro-version number,
  3825. so the current effective-version is "1.8". The effective version
  3826. should remain unchanged during a stable series, and should be used for
  3827. items like the versioned share directory name
  3828. i.e. /usr/share/guile/1.8.
  3829. Providing an unchanging version number during a stable release for
  3830. things like the versioned share directory can be particularly
  3831. important for Guile "add-on" packages, since it provides a directory
  3832. that they can install to that won't be changed out from under them
  3833. with each micro release during a stable series.
  3834. ** Thread implementation has changed.
  3835. When you configure "--with-threads=null", you will get the usual
  3836. threading API (call-with-new-thread, make-mutex, etc), but you can't
  3837. actually create new threads. Also, "--with-threads=no" is now
  3838. equivalent to "--with-threads=null". This means that the thread API
  3839. is always present, although you might not be able to create new
  3840. threads.
  3841. When you configure "--with-threads=pthreads" or "--with-threads=yes",
  3842. you will get threads that are implemented with the portable POSIX
  3843. threads. These threads can run concurrently (unlike the previous
  3844. "coop" thread implementation), but need to cooperate for things like
  3845. the GC.
  3846. The default is "pthreads", unless your platform doesn't have pthreads,
  3847. in which case "null" threads are used.
  3848. See the manual for details, nodes "Initialization", "Multi-Threading",
  3849. "Blocking", and others.
  3850. ** There is the new notion of 'discouraged' features.
  3851. This is a milder form of deprecation.
  3852. Things that are discouraged should not be used in new code, but it is
  3853. OK to leave them in old code for now. When a discouraged feature is
  3854. used, no warning message is printed like there is for 'deprecated'
  3855. features. Also, things that are merely discouraged are nevertheless
  3856. implemented efficiently, while deprecated features can be very slow.
  3857. You can omit discouraged features from libguile by configuring it with
  3858. the '--disable-discouraged' option.
  3859. ** Deprecation warnings can be controlled at run-time.
  3860. (debug-enable 'warn-deprecated) switches them on and (debug-disable
  3861. 'warn-deprecated) switches them off.
  3862. ** Support for SRFI 61, extended cond syntax for multiple values has
  3863. been added.
  3864. This SRFI is always available.
  3865. ** Support for require-extension, SRFI-55, has been added.
  3866. The SRFI-55 special form `require-extension' has been added. It is
  3867. available at startup, and provides a portable way to load Scheme
  3868. extensions. SRFI-55 only requires support for one type of extension,
  3869. "srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
  3870. 13 14)).
  3871. ** New module (srfi srfi-26) provides support for `cut' and `cute'.
  3872. The (srfi srfi-26) module is an implementation of SRFI-26 which
  3873. provides the `cut' and `cute' syntax. These may be used to specialize
  3874. parameters without currying.
  3875. ** New module (srfi srfi-31)
  3876. This is an implementation of SRFI-31 which provides a special form
  3877. `rec' for recursive evaluation.
  3878. ** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
  3879. been merged with the core, making their functionality always
  3880. available.
  3881. The modules are still available, tho, and you could use them together
  3882. with a renaming import, for example.
  3883. ** Guile no longer includes its own version of libltdl.
  3884. The official version is good enough now.
  3885. ** The --enable-htmldoc option has been removed from 'configure'.
  3886. Support for translating the documentation into HTML is now always
  3887. provided. Use 'make html'.
  3888. ** New module (ice-9 serialize):
  3889. (serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
  3890. don't trust the thread safety of most of your program, but where you
  3891. have some section(s) of code which you consider can run in parallel to
  3892. other sections. See ice-9/serialize.scm for more information.
  3893. ** The configure option '--disable-arrays' has been removed.
  3894. Support for arrays and uniform numeric arrays is now always included
  3895. in Guile.
  3896. * Changes to the stand-alone interpreter
  3897. ** New command line option `-L'.
  3898. This option adds a directory to the front of the load path.
  3899. ** New command line option `--no-debug'.
  3900. Specifying `--no-debug' on the command line will keep the debugging
  3901. evaluator turned off, even for interactive sessions.
  3902. ** User-init file ~/.guile is now loaded with the debugging evaluator.
  3903. Previously, the normal evaluator would have been used. Using the
  3904. debugging evaluator gives better error messages.
  3905. ** The '-e' option now 'read's its argument.
  3906. This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
  3907. be used with '-e'. For example, you can now write a script like
  3908. #! /bin/sh
  3909. exec guile -e '(@ (demo) main)' -s "$0" "$@"
  3910. !#
  3911. (define-module (demo)
  3912. :export (main))
  3913. (define (main args)
  3914. (format #t "Demo: ~a~%" args))
  3915. * Changes to Scheme functions and syntax
  3916. ** Guardians have changed back to their original semantics
  3917. Guardians now behave like described in the paper by Dybvig et al. In
  3918. particular, they no longer make guarantees about the order in which
  3919. they return objects, and they can no longer be greedy.
  3920. They no longer drop cyclic data structures.
  3921. The C function scm_make_guardian has been changed incompatibly and no
  3922. longer takes the 'greedy_p' argument.
  3923. ** New function hashx-remove!
  3924. This function completes the set of 'hashx' functions.
  3925. ** The concept of dynamic roots has been factored into continuation
  3926. barriers and dynamic states.
  3927. Each thread has a current dynamic state that carries the values of the
  3928. fluids. You can create and copy dynamic states and use them as the
  3929. second argument for 'eval'. See "Fluids and Dynamic States" in the
  3930. manual.
  3931. To restrict the influence that captured continuations can have on the
  3932. control flow, you can errect continuation barriers. See "Continuation
  3933. Barriers" in the manual.
  3934. The function call-with-dynamic-root now essentially temporarily
  3935. installs a new dynamic state and errects a continuation barrier.
  3936. ** The default load path no longer includes "." at the end.
  3937. Automatically loading modules from the current directory should not
  3938. happen by default. If you want to allow it in a more controlled
  3939. manner, set the environment variable GUILE_LOAD_PATH or the Scheme
  3940. variable %load-path.
  3941. ** The uniform vector and array support has been overhauled.
  3942. It now complies with SRFI-4 and the weird prototype based uniform
  3943. array creation has been deprecated. See the manual for more details.
  3944. Some non-compatible changes have been made:
  3945. - characters can no longer be stored into byte arrays.
  3946. - strings and bit vectors are no longer considered to be uniform numeric
  3947. vectors.
  3948. - array-rank throws an error for non-arrays instead of returning zero.
  3949. - array-ref does no longer accept non-arrays when no indices are given.
  3950. There is the new notion of 'generalized vectors' and corresponding
  3951. procedures like 'generalized-vector-ref'. Generalized vectors include
  3952. strings, bitvectors, ordinary vectors, and uniform numeric vectors.
  3953. Arrays use generalized vectors as their storage, so that you still
  3954. have arrays of characters, bits, etc. However, uniform-array-read!
  3955. and uniform-array-write can no longer read/write strings and
  3956. bitvectors.
  3957. ** There is now support for copy-on-write substrings, mutation-sharing
  3958. substrings and read-only strings.
  3959. Three new procedures are related to this: substring/shared,
  3960. substring/copy, and substring/read-only. See the manual for more
  3961. information.
  3962. ** Backtraces will now highlight the value that caused the error.
  3963. By default, these values are enclosed in "{...}", such as in this
  3964. example:
  3965. guile> (car 'a)
  3966. Backtrace:
  3967. In current input:
  3968. 1: 0* [car {a}]
  3969. <unnamed port>:1:1: In procedure car in expression (car (quote a)):
  3970. <unnamed port>:1:1: Wrong type (expecting pair): a
  3971. ABORT: (wrong-type-arg)
  3972. The prefix and suffix used for highlighting can be set via the two new
  3973. printer options 'highlight-prefix' and 'highlight-suffix'. For
  3974. example, putting this into ~/.guile will output the bad value in bold
  3975. on an ANSI terminal:
  3976. (print-set! highlight-prefix "\x1b[1m")
  3977. (print-set! highlight-suffix "\x1b[22m")
  3978. ** 'gettext' support for internationalization has been added.
  3979. See the manual for details.
  3980. ** New syntax '@' and '@@':
  3981. You can now directly refer to variables exported from a module by
  3982. writing
  3983. (@ MODULE-NAME VARIABLE-NAME)
  3984. For example (@ (ice-9 pretty-print) pretty-print) will directly access
  3985. the pretty-print variable exported from the (ice-9 pretty-print)
  3986. module. You don't need to 'use' that module first. You can also use
  3987. '@' as a target of 'set!', as in (set! (@ mod var) val).
  3988. The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
  3989. but it can also access variables that have not been exported. It is
  3990. intended only for kluges and temporary fixes and for debugging, not
  3991. for ordinary code.
  3992. ** Keyword syntax has been made more disciplined.
  3993. Previously, the name of a keyword was read as a 'token' but printed as
  3994. a symbol. Now, it is read as a general Scheme datum which must be a
  3995. symbol.
  3996. Previously:
  3997. guile> #:12
  3998. #:#{12}#
  3999. guile> #:#{12}#
  4000. #:#{\#{12}\#}#
  4001. guile> #:(a b c)
  4002. #:#{}#
  4003. ERROR: In expression (a b c):
  4004. Unbound variable: a
  4005. guile> #: foo
  4006. #:#{}#
  4007. ERROR: Unbound variable: foo
  4008. Now:
  4009. guile> #:12
  4010. ERROR: Wrong type (expecting symbol): 12
  4011. guile> #:#{12}#
  4012. #:#{12}#
  4013. guile> #:(a b c)
  4014. ERROR: Wrong type (expecting symbol): (a b c)
  4015. guile> #: foo
  4016. #:foo
  4017. ** The printing of symbols that might look like keywords can be
  4018. controlled.
  4019. The new printer option 'quote-keywordish-symbols' controls how symbols
  4020. are printed that have a colon as their first or last character. The
  4021. default now is to only quote a symbol with #{...}# when the read
  4022. option 'keywords' is not '#f'. Thus:
  4023. guile> (define foo (string->symbol ":foo"))
  4024. guile> (read-set! keywords #f)
  4025. guile> foo
  4026. :foo
  4027. guile> (read-set! keywords 'prefix)
  4028. guile> foo
  4029. #{:foo}#
  4030. guile> (print-set! quote-keywordish-symbols #f)
  4031. guile> foo
  4032. :foo
  4033. ** 'while' now provides 'break' and 'continue'
  4034. break and continue were previously bound in a while loop, but not
  4035. documented, and continue didn't quite work properly. The undocumented
  4036. parameter to break which gave a return value for the while has been
  4037. dropped.
  4038. ** 'call-with-current-continuation' is now also available under the name
  4039. 'call/cc'.
  4040. ** The module system now checks for duplicate bindings.
  4041. The module system now can check for name conflicts among imported
  4042. bindings.
  4043. The behavior can be controlled by specifying one or more 'duplicates'
  4044. handlers. For example, to make Guile return an error for every name
  4045. collision, write:
  4046. (define-module (foo)
  4047. :use-module (bar)
  4048. :use-module (baz)
  4049. :duplicates check)
  4050. The new default behavior of the module system when a name collision
  4051. has been detected is to
  4052. 1. Give priority to bindings marked as a replacement.
  4053. 2. Issue a warning (different warning if overriding core binding).
  4054. 3. Give priority to the last encountered binding (this corresponds to
  4055. the old behavior).
  4056. If you want the old behavior back without replacements or warnings you
  4057. can add the line:
  4058. (default-duplicate-binding-handler 'last)
  4059. to your .guile init file.
  4060. ** New define-module option: :replace
  4061. :replace works as :export, but, in addition, marks the binding as a
  4062. replacement.
  4063. A typical example is `format' in (ice-9 format) which is a replacement
  4064. for the core binding `format'.
  4065. ** Adding prefixes to imported bindings in the module system
  4066. There is now a new :use-module option :prefix. It can be used to add
  4067. a prefix to all imported bindings.
  4068. (define-module (foo)
  4069. :use-module ((bar) :prefix bar:))
  4070. will import all bindings exported from bar, but rename them by adding
  4071. the prefix `bar:'.
  4072. ** Conflicting generic functions can be automatically merged.
  4073. When two imported bindings conflict and they are both generic
  4074. functions, the two functions can now be merged automatically. This is
  4075. activated with the 'duplicates' handler 'merge-generics'.
  4076. ** New function: effective-version
  4077. Returns the "effective" version number. This is just the normal full
  4078. version string without the final micro-version number. See "Changes
  4079. to the distribution" above.
  4080. ** New threading functions: parallel, letpar, par-map, and friends
  4081. These are convenient ways to run calculations in parallel in new
  4082. threads. See "Parallel forms" in the manual for details.
  4083. ** New function 'try-mutex'.
  4084. This function will attempt to lock a mutex but will return immediately
  4085. instead of blocking and indicate failure.
  4086. ** Waiting on a condition variable can have a timeout.
  4087. The function 'wait-condition-variable' now takes a third, optional
  4088. argument that specifies the point in time where the waiting should be
  4089. aborted.
  4090. ** New function 'broadcast-condition-variable'.
  4091. ** New functions 'all-threads' and 'current-thread'.
  4092. ** Signals and system asyncs work better with threads.
  4093. The function 'sigaction' now takes a fourth, optional, argument that
  4094. specifies the thread that the handler should run in. When the
  4095. argument is omitted, the handler will run in the thread that called
  4096. 'sigaction'.
  4097. Likewise, 'system-async-mark' takes a second, optional, argument that
  4098. specifies the thread that the async should run in. When it is
  4099. omitted, the async will run in the thread that called
  4100. 'system-async-mark'.
  4101. C code can use the new functions scm_sigaction_for_thread and
  4102. scm_system_async_mark_for_thread to pass the new thread argument.
  4103. When a thread blocks on a mutex, a condition variable or is waiting
  4104. for IO to be possible, it will still execute system asyncs. This can
  4105. be used to interrupt such a thread by making it execute a 'throw', for
  4106. example.
  4107. ** The function 'system-async' is deprecated.
  4108. You can now pass any zero-argument procedure to 'system-async-mark'.
  4109. The function 'system-async' will just return its argument unchanged
  4110. now.
  4111. ** New functions 'call-with-blocked-asyncs' and
  4112. 'call-with-unblocked-asyncs'
  4113. The expression (call-with-blocked-asyncs PROC) will call PROC and will
  4114. block execution of system asyncs for the current thread by one level
  4115. while PROC runs. Likewise, call-with-unblocked-asyncs will call a
  4116. procedure and will unblock the execution of system asyncs by one
  4117. level for the current thread.
  4118. Only system asyncs are affected by these functions.
  4119. ** The functions 'mask-signals' and 'unmask-signals' are deprecated.
  4120. Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
  4121. instead. Those functions are easier to use correctly and can be
  4122. nested.
  4123. ** New function 'unsetenv'.
  4124. ** New macro 'define-syntax-public'.
  4125. It works like 'define-syntax' and also exports the defined macro (but
  4126. only on top-level).
  4127. ** There is support for Infinity and NaNs.
  4128. Following PLT Scheme, Guile can now work with infinite numbers, and
  4129. 'not-a-numbers'.
  4130. There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
  4131. (negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
  4132. "+nan.0"). These numbers are inexact and have no exact counterpart.
  4133. Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
  4134. sign of the dividend. The infinities are integers, and they answer #t
  4135. for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
  4136. not '=' to itself, but '+nan.0' is 'eqv?' to itself.
  4137. For example
  4138. (/ 1 0.0)
  4139. => +inf.0
  4140. (/ 0 0.0)
  4141. => +nan.0
  4142. (/ 0)
  4143. ERROR: Numerical overflow
  4144. Two new predicates 'inf?' and 'nan?' can be used to test for the
  4145. special values.
  4146. ** Inexact zero can have a sign.
  4147. Guile can now distinguish between plus and minus inexact zero, if your
  4148. platform supports this, too. The two zeros are equal according to
  4149. '=', but not according to 'eqv?'. For example
  4150. (- 0.0)
  4151. => -0.0
  4152. (= 0.0 (- 0.0))
  4153. => #t
  4154. (eqv? 0.0 (- 0.0))
  4155. => #f
  4156. ** Guile now has exact rationals.
  4157. Guile can now represent fractions such as 1/3 exactly. Computing with
  4158. them is also done exactly, of course:
  4159. (* 1/3 3/2)
  4160. => 1/2
  4161. ** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
  4162. for exact arguments.
  4163. For example: (floor 2) now returns an exact 2 where in the past it
  4164. returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
  4165. ** inexact->exact no longer returns only integers.
  4166. Without exact rationals, the closest exact number was always an
  4167. integer, but now inexact->exact returns the fraction that is exactly
  4168. equal to a floating point number. For example:
  4169. (inexact->exact 1.234)
  4170. => 694680242521899/562949953421312
  4171. When you want the old behavior, use 'round' explicitly:
  4172. (inexact->exact (round 1.234))
  4173. => 1
  4174. ** New function 'rationalize'.
  4175. This function finds a simple fraction that is close to a given real
  4176. number. For example (and compare with inexact->exact above):
  4177. (rationalize (inexact->exact 1.234) 1/2000)
  4178. => 58/47
  4179. Note that, as required by R5RS, rationalize returns only then an exact
  4180. result when both its arguments are exact.
  4181. ** 'odd?' and 'even?' work also for inexact integers.
  4182. Previously, (odd? 1.0) would signal an error since only exact integers
  4183. were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
  4184. returns #f and (odd? 1.5) signals an error.
  4185. ** Guile now has uninterned symbols.
  4186. The new function 'make-symbol' will return an uninterned symbol. This
  4187. is a symbol that is unique and is guaranteed to remain unique.
  4188. However, uninterned symbols can not yet be read back in.
  4189. Use the new function 'symbol-interned?' to check whether a symbol is
  4190. interned or not.
  4191. ** pretty-print has more options.
  4192. The function pretty-print from the (ice-9 pretty-print) module can now
  4193. also be invoked with keyword arguments that control things like
  4194. maximum output width. See the manual for details.
  4195. ** Variables have no longer a special behavior for `equal?'.
  4196. Previously, comparing two variables with `equal?' would recursivly
  4197. compare their values. This is no longer done. Variables are now only
  4198. `equal?' if they are `eq?'.
  4199. ** `(begin)' is now valid.
  4200. You can now use an empty `begin' form. It will yield #<unspecified>
  4201. when evaluated and simply be ignored in a definition context.
  4202. ** Deprecated: procedure->macro
  4203. Change your code to use 'define-macro' or r5rs macros. Also, be aware
  4204. that macro expansion will not be done during evaluation, but prior to
  4205. evaluation.
  4206. ** Soft ports now allow a `char-ready?' procedure
  4207. The vector argument to `make-soft-port' can now have a length of
  4208. either 5 or 6. (Previously the length had to be 5.) The optional 6th
  4209. element is interpreted as an `input-waiting' thunk -- i.e. a thunk
  4210. that returns the number of characters that can be read immediately
  4211. without the soft port blocking.
  4212. ** Deprecated: undefine
  4213. There is no replacement for undefine.
  4214. ** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
  4215. have been discouraged.
  4216. They are relics from a time where a keyword like #:foo was used
  4217. directly as a Tcl option "-foo" and thus keywords were internally
  4218. stored as a symbol with a starting dash. We now store a symbol
  4219. without the dash.
  4220. Use symbol->keyword and keyword->symbol instead.
  4221. ** The `cheap' debug option is now obsolete
  4222. Evaluator trap calls are now unconditionally "cheap" - in other words,
  4223. they pass a debug object to the trap handler rather than a full
  4224. continuation. The trap handler code can capture a full continuation
  4225. by using `call-with-current-continuation' in the usual way, if it so
  4226. desires.
  4227. The `cheap' option is retained for now so as not to break existing
  4228. code which gets or sets it, but setting it now has no effect. It will
  4229. be removed in the next major Guile release.
  4230. ** Evaluator trap calls now support `tweaking'
  4231. `Tweaking' means that the trap handler code can modify the Scheme
  4232. expression that is about to be evaluated (in the case of an
  4233. enter-frame trap) or the value that is being returned (in the case of
  4234. an exit-frame trap). The trap handler code indicates that it wants to
  4235. do this by returning a pair whose car is the symbol 'instead and whose
  4236. cdr is the modified expression or return value.
  4237. * Changes to the C interface
  4238. ** The functions scm_hash_fn_remove_x and scm_hashx_remove_x no longer
  4239. take a 'delete' function argument.
  4240. This argument makes no sense since the delete function is used to
  4241. remove a pair from an alist, and this must not be configurable.
  4242. This is an incompatible change.
  4243. ** The GH interface is now subject to the deprecation mechanism
  4244. The GH interface has been deprecated for quite some time but now it is
  4245. actually removed from Guile when it is configured with
  4246. --disable-deprecated.
  4247. See the manual "Transitioning away from GH" for more information.
  4248. ** A new family of functions for converting between C values and
  4249. Scheme values has been added.
  4250. These functions follow a common naming scheme and are designed to be
  4251. easier to use, thread-safe and more future-proof than the older
  4252. alternatives.
  4253. - int scm_is_* (...)
  4254. These are predicates that return a C boolean: 1 or 0. Instead of
  4255. SCM_NFALSEP, you can now use scm_is_true, for example.
  4256. - <type> scm_to_<type> (SCM val, ...)
  4257. These are functions that convert a Scheme value into an appropriate
  4258. C value. For example, you can use scm_to_int to safely convert from
  4259. a SCM to an int.
  4260. - SCM scm_from_<type> (<type> val, ...)
  4261. These functions convert from a C type to a SCM value; for example,
  4262. scm_from_int for ints.
  4263. There is a huge number of these functions, for numbers, strings,
  4264. symbols, vectors, etc. They are documented in the reference manual in
  4265. the API section together with the types that they apply to.
  4266. ** New functions for dealing with complex numbers in C have been added.
  4267. The new functions are scm_c_make_rectangular, scm_c_make_polar,
  4268. scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
  4269. They work like scm_make_rectangular etc but take or return doubles
  4270. directly.
  4271. ** The function scm_make_complex has been discouraged.
  4272. Use scm_c_make_rectangular instead.
  4273. ** The INUM macros have been deprecated.
  4274. A lot of code uses these macros to do general integer conversions,
  4275. although the macros only work correctly with fixnums. Use the
  4276. following alternatives.
  4277. SCM_INUMP -> scm_is_integer or similar
  4278. SCM_NINUMP -> !scm_is_integer or similar
  4279. SCM_MAKINUM -> scm_from_int or similar
  4280. SCM_INUM -> scm_to_int or similar
  4281. SCM_VALIDATE_INUM_* -> Do not use these; scm_to_int, etc. will
  4282. do the validating for you.
  4283. ** The scm_num2<type> and scm_<type>2num functions and scm_make_real
  4284. have been discouraged.
  4285. Use the newer scm_to_<type> and scm_from_<type> functions instead for
  4286. new code. The functions have been discouraged since they don't fit
  4287. the naming scheme.
  4288. ** The 'boolean' macros SCM_FALSEP etc have been discouraged.
  4289. They have strange names, especially SCM_NFALSEP, and SCM_BOOLP
  4290. evaluates its argument twice. Use scm_is_true, etc. instead for new
  4291. code.
  4292. ** The macro SCM_EQ_P has been discouraged.
  4293. Use scm_is_eq for new code, which fits better into the naming
  4294. conventions.
  4295. ** The macros SCM_CONSP, SCM_NCONSP, SCM_NULLP, and SCM_NNULLP have
  4296. been discouraged.
  4297. Use the function scm_is_pair or scm_is_null instead.
  4298. ** The functions scm_round and scm_truncate have been deprecated and
  4299. are now available as scm_c_round and scm_c_truncate, respectively.
  4300. These functions occupy the names that scm_round_number and
  4301. scm_truncate_number should have.
  4302. ** The functions scm_c_string2str, scm_c_substring2str, and
  4303. scm_c_symbol2str have been deprecated.
  4304. Use scm_to_locale_stringbuf or similar instead, maybe together with
  4305. scm_substring.
  4306. ** New functions scm_c_make_string, scm_c_string_length,
  4307. scm_c_string_ref, scm_c_string_set_x, scm_c_substring,
  4308. scm_c_substring_shared, scm_c_substring_copy.
  4309. These are like scm_make_string, scm_length, etc. but are slightly
  4310. easier to use from C.
  4311. ** The macros SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_LENGTH,
  4312. SCM_SYMBOL_CHARS, and SCM_SYMBOL_LENGTH have been deprecated.
  4313. They export too many assumptions about the implementation of strings
  4314. and symbols that are no longer true in the presence of
  4315. mutation-sharing substrings and when Guile switches to some form of
  4316. Unicode.
  4317. When working with strings, it is often best to use the normal string
  4318. functions provided by Guile, such as scm_c_string_ref,
  4319. scm_c_string_set_x, scm_string_append, etc. Be sure to look in the
  4320. manual since many more such functions are now provided than
  4321. previously.
  4322. When you want to convert a SCM string to a C string, use the
  4323. scm_to_locale_string function or similar instead. For symbols, use
  4324. scm_symbol_to_string and then work with that string. Because of the
  4325. new string representation, scm_symbol_to_string does not need to copy
  4326. and is thus quite efficient.
  4327. ** Some string, symbol and keyword functions have been discouraged.
  4328. They don't fit into the uniform naming scheme and are not explicit
  4329. about the character encoding.
  4330. Replace according to the following table:
  4331. scm_allocate_string -> scm_c_make_string
  4332. scm_take_str -> scm_take_locale_stringn
  4333. scm_take0str -> scm_take_locale_string
  4334. scm_mem2string -> scm_from_locale_stringn
  4335. scm_str2string -> scm_from_locale_string
  4336. scm_makfrom0str -> scm_from_locale_string
  4337. scm_mem2symbol -> scm_from_locale_symboln
  4338. scm_mem2uninterned_symbol -> scm_from_locale_stringn + scm_make_symbol
  4339. scm_str2symbol -> scm_from_locale_symbol
  4340. SCM_SYMBOL_HASH -> scm_hashq
  4341. SCM_SYMBOL_INTERNED_P -> scm_symbol_interned_p
  4342. scm_c_make_keyword -> scm_from_locale_keyword
  4343. ** The functions scm_keyword_to_symbol and sym_symbol_to_keyword are
  4344. now also available to C code.
  4345. ** SCM_KEYWORDP and SCM_KEYWORDSYM have been deprecated.
  4346. Use scm_is_keyword and scm_keyword_to_symbol instead, but note that
  4347. the latter returns the true name of the keyword, not the 'dash name',
  4348. as SCM_KEYWORDSYM used to do.
  4349. ** A new way to access arrays in a thread-safe and efficient way has
  4350. been added.
  4351. See the manual, node "Accessing Arrays From C".
  4352. ** The old uniform vector and bitvector implementations have been
  4353. unceremoniously removed.
  4354. This implementation exposed the details of the tagging system of
  4355. Guile. Use the new C API explained in the manual in node "Uniform
  4356. Numeric Vectors" and "Bit Vectors", respectively.
  4357. The following macros are gone: SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
  4358. SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
  4359. SCM_SET_UVECTOR_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
  4360. SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
  4361. SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
  4362. SCM_SET_BITVECTOR_LENGTH, SCM_BITVEC_REF, SCM_BITVEC_SET,
  4363. SCM_BITVEC_CLR.
  4364. ** The macros dealing with vectors have been deprecated.
  4365. Use the new functions scm_is_vector, scm_vector_elements,
  4366. scm_vector_writable_elements, etc, or scm_is_simple_vector,
  4367. SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, etc instead. See the
  4368. manual for more details.
  4369. Deprecated are SCM_VECTORP, SCM_VELTS, SCM_VECTOR_MAX_LENGTH,
  4370. SCM_VECTOR_LENGTH, SCM_VECTOR_REF, SCM_VECTOR_SET, SCM_WRITABLE_VELTS.
  4371. The following macros have been removed: SCM_VECTOR_BASE,
  4372. SCM_SET_VECTOR_BASE, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
  4373. SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS.
  4374. ** Some C functions and macros related to arrays have been deprecated.
  4375. Migrate according to the following table:
  4376. scm_make_uve -> scm_make_typed_array, scm_make_u8vector etc.
  4377. scm_make_ra -> scm_make_array
  4378. scm_shap2ra -> scm_make_array
  4379. scm_cvref -> scm_c_generalized_vector_ref
  4380. scm_ra_set_contp -> do not use
  4381. scm_aind -> scm_array_handle_pos
  4382. scm_raprin1 -> scm_display or scm_write
  4383. SCM_ARRAYP -> scm_is_array
  4384. SCM_ARRAY_NDIM -> scm_c_array_rank
  4385. SCM_ARRAY_DIMS -> scm_array_handle_dims
  4386. SCM_ARRAY_CONTP -> do not use
  4387. SCM_ARRAY_MEM -> do not use
  4388. SCM_ARRAY_V -> scm_array_handle_elements or similar
  4389. SCM_ARRAY_BASE -> do not use
  4390. ** SCM_CELL_WORD_LOC has been deprecated.
  4391. Use the new macro SCM_CELL_OBJECT_LOC instead, which returns a pointer
  4392. to a SCM, as opposed to a pointer to a scm_t_bits.
  4393. This was done to allow the correct use of pointers into the Scheme
  4394. heap. Previously, the heap words were of type scm_t_bits and local
  4395. variables and function arguments were of type SCM, making it
  4396. non-standards-conformant to have a pointer that can point to both.
  4397. ** New macros SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, etc.
  4398. These macros should be used instead of SCM_CELL_WORD_2/3 to access the
  4399. second and third words of double smobs. Likewise for
  4400. SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3.
  4401. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
  4402. used to get and set the 16 exra bits in the zeroth word of a smob.
  4403. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
  4404. accesing the first immediate word of a smob as a SCM value, and there
  4405. is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
  4406. smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
  4407. ** New way to deal with non-local exits and re-entries.
  4408. There is a new set of functions that essentially do what
  4409. scm_internal_dynamic_wind does, but in a way that is more convenient
  4410. for C code in some situations. Here is a quick example of how to
  4411. prevent a potential memory leak:
  4412. void
  4413. foo ()
  4414. {
  4415. char *mem;
  4416. scm_dynwind_begin (0);
  4417. mem = scm_malloc (100);
  4418. scm_dynwind_unwind_handler (free, mem, SCM_F_WIND_EXPLICITLY);
  4419. /* MEM would leak if BAR throws an error.
  4420. SCM_DYNWIND_UNWIND_HANDLER frees it nevertheless.
  4421. */
  4422. bar ();
  4423. scm_dynwind_end ();
  4424. /* Because of SCM_F_WIND_EXPLICITLY, MEM will be freed by
  4425. SCM_DYNWIND_END as well.
  4426. */
  4427. }
  4428. For full documentation, see the node "Dynamic Wind" in the manual.
  4429. ** New function scm_dynwind_free
  4430. This function calls 'free' on a given pointer when a dynwind context
  4431. is left. Thus the call to scm_dynwind_unwind_handler above could be
  4432. replaced with simply scm_dynwind_free (mem).
  4433. ** New functions scm_c_call_with_blocked_asyncs and
  4434. scm_c_call_with_unblocked_asyncs
  4435. Like scm_call_with_blocked_asyncs etc. but for C functions.
  4436. ** New functions scm_dynwind_block_asyncs and scm_dynwind_unblock_asyncs
  4437. In addition to scm_c_call_with_blocked_asyncs you can now also use
  4438. scm_dynwind_block_asyncs in a 'dynwind context' (see above). Likewise for
  4439. scm_c_call_with_unblocked_asyncs and scm_dynwind_unblock_asyncs.
  4440. ** The macros SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
  4441. SCM_REALLOW_INTS have been deprecated.
  4442. They do no longer fulfill their original role of blocking signal
  4443. delivery. Depending on what you want to achieve, replace a pair of
  4444. SCM_DEFER_INTS and SCM_ALLOW_INTS with a dynwind context that locks a
  4445. mutex, blocks asyncs, or both. See node "Critical Sections" in the
  4446. manual.
  4447. ** The value 'scm_mask_ints' is no longer writable.
  4448. Previously, you could set scm_mask_ints directly. This is no longer
  4449. possible. Use scm_c_call_with_blocked_asyncs and
  4450. scm_c_call_with_unblocked_asyncs instead.
  4451. ** New way to temporarily set the current input, output or error ports
  4452. C code can now use scm_dynwind_current_<foo>_port in a 'dynwind
  4453. context' (see above). <foo> is one of "input", "output" or "error".
  4454. ** New way to temporarily set fluids
  4455. C code can now use scm_dynwind_fluid in a 'dynwind context' (see
  4456. above) to temporarily set the value of a fluid.
  4457. ** New types scm_t_intmax and scm_t_uintmax.
  4458. On platforms that have them, these types are identical to intmax_t and
  4459. uintmax_t, respectively. On other platforms, they are identical to
  4460. the largest integer types that Guile knows about.
  4461. ** The functions scm_unmemocopy and scm_unmemoize have been removed.
  4462. You should not have used them.
  4463. ** Many public #defines with generic names have been made private.
  4464. #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
  4465. private or renamed with a more suitable public name.
  4466. ** The macro SCM_TYP16S has been deprecated.
  4467. This macro is not intended for public use.
  4468. ** The macro SCM_SLOPPY_INEXACTP has been deprecated.
  4469. Use scm_is_true (scm_inexact_p (...)) instead.
  4470. ** The macro SCM_SLOPPY_REALP has been deprecated.
  4471. Use scm_is_real instead.
  4472. ** The macro SCM_SLOPPY_COMPLEXP has been deprecated.
  4473. Use scm_is_complex instead.
  4474. ** Some preprocessor defines have been deprecated.
  4475. These defines indicated whether a certain feature was present in Guile
  4476. or not. Going forward, assume that the features are always present.
  4477. The macros are: USE_THREADS, GUILE_ISELECT, READER_EXTENSIONS,
  4478. DEBUG_EXTENSIONS, DYNAMIC_LINKING.
  4479. The following macros have been removed completely: MEMOIZE_LOCALS,
  4480. SCM_RECKLESS, SCM_CAUTIOUS.
  4481. ** The preprocessor define STACK_DIRECTION has been deprecated.
  4482. There should be no need to know about the stack direction for ordinary
  4483. programs.
  4484. ** New function: scm_effective_version
  4485. Returns the "effective" version number. This is just the normal full
  4486. version string without the final micro-version number. See "Changes
  4487. to the distribution" above.
  4488. ** The function scm_call_with_new_thread has a new prototype.
  4489. Instead of taking a list with the thunk and handler, these two
  4490. arguments are now passed directly:
  4491. SCM scm_call_with_new_thread (SCM thunk, SCM handler);
  4492. This is an incompatible change.
  4493. ** New snarfer macro SCM_DEFINE_PUBLIC.
  4494. This is like SCM_DEFINE, but also calls scm_c_export for the defined
  4495. function in the init section.
  4496. ** The snarfer macro SCM_SNARF_INIT is now officially supported.
  4497. ** Garbage collector rewrite.
  4498. The garbage collector is cleaned up a lot, and now uses lazy
  4499. sweeping. This is reflected in the output of (gc-stats); since cells
  4500. are being freed when they are allocated, the cells-allocated field
  4501. stays roughly constant.
  4502. For malloc related triggers, the behavior is changed. It uses the same
  4503. heuristic as the cell-triggered collections. It may be tuned with the
  4504. environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage
  4505. for minimum yield of malloc related triggers. The default is 40.
  4506. GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
  4507. default is 200 kb.
  4508. Debugging operations for the freelist have been deprecated, along with
  4509. the C variables that control garbage collection. The environment
  4510. variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
  4511. GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
  4512. For understanding the memory usage of a GUILE program, the routine
  4513. gc-live-object-stats returns an alist containing the number of live
  4514. objects for every type.
  4515. ** The function scm_definedp has been renamed to scm_defined_p
  4516. The name scm_definedp is deprecated.
  4517. ** The struct scm_cell type has been renamed to scm_t_cell
  4518. This is in accordance to Guile's naming scheme for types. Note that
  4519. the name scm_cell is now used for a function that allocates and
  4520. initializes a new cell (see below).
  4521. ** New functions for memory management
  4522. A new set of functions for memory management has been added since the
  4523. old way (scm_must_malloc, scm_must_free, etc) was error prone and
  4524. indeed, Guile itself contained some long standing bugs that could
  4525. cause aborts in long running programs.
  4526. The new functions are more symmetrical and do not need cooperation
  4527. from smob free routines, among other improvements.
  4528. The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
  4529. scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
  4530. scm_gc_free, scm_gc_register_collectable_memory, and
  4531. scm_gc_unregister_collectable_memory. Refer to the manual for more
  4532. details and for upgrading instructions.
  4533. The old functions for memory management have been deprecated. They
  4534. are: scm_must_malloc, scm_must_realloc, scm_must_free,
  4535. scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
  4536. ** Declarations of exported features are marked with SCM_API.
  4537. Every declaration of a feature that belongs to the exported Guile API
  4538. has been marked by adding the macro "SCM_API" to the start of the
  4539. declaration. This macro can expand into different things, the most
  4540. common of which is just "extern" for Unix platforms. On Win32, it can
  4541. be used to control which symbols are exported from a DLL.
  4542. If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
  4543. will expand into "__declspec (dllimport) extern", which is needed for
  4544. linking to the Guile DLL in Windows.
  4545. There are also SCM_RL_IMPORT, SCM_SRFI1314_IMPORT, and
  4546. SCM_SRFI4_IMPORT, for the corresponding libraries.
  4547. ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
  4548. Use the new functions scm_cell and scm_double_cell instead. The old
  4549. macros had problems because with them allocation and initialization
  4550. was separated and the GC could sometimes observe half initialized
  4551. cells. Only careful coding by the user of SCM_NEWCELL and
  4552. SCM_NEWCELL2 could make this safe and efficient.
  4553. ** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
  4554. Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
  4555. instead.
  4556. ** SRCBRKP has been deprecated.
  4557. Use scm_c_source_property_breakpoint_p instead.
  4558. ** Deprecated: scm_makmacro
  4559. Change your code to use either scm_makmmacro or to define macros in
  4560. Scheme, using 'define-macro'.
  4561. ** New function scm_c_port_for_each.
  4562. This function is like scm_port_for_each but takes a pointer to a C
  4563. function as the callback instead of a SCM value.
  4564. ** The names scm_internal_select, scm_thread_sleep, and
  4565. scm_thread_usleep have been discouraged.
  4566. Use scm_std_select, scm_std_sleep, scm_std_usleep instead.
  4567. ** The GC can no longer be blocked.
  4568. The global flags scm_gc_heap_lock and scm_block_gc have been removed.
  4569. The GC can now run (partially) concurrently with other code and thus
  4570. blocking it is not well defined.
  4571. ** Many definitions have been removed that were previously deprecated.
  4572. scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify,
  4573. scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
  4574. scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2,
  4575. scm_tc16_allocated, SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
  4576. SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED,
  4577. scm_debug_newcell, scm_debug_newcell2, SCM_HUP_SIGNAL, SCM_INT_SIGNAL,
  4578. SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL,
  4579. SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG,
  4580. SCM_NUM_SIGS, scm_top_level_lookup_closure_var,
  4581. *top-level-lookup-closure*, scm_system_transformer, scm_eval_3,
  4582. scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP,
  4583. SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring,
  4584. scm_tc7_substring, sym_huh, SCM_VARVCELL, SCM_UDVARIABLEP,
  4585. SCM_DEFVARIABLEP, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
  4586. scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
  4587. SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
  4588. SCM_LENGTH_MAX, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
  4589. SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR,
  4590. scm_sym2vcell, scm_intern, scm_intern0, scm_sysintern, scm_sysintern0,
  4591. scm_sysintern0_no_module_lookup, scm_init_symbols_deprecated,
  4592. scm_vector_set_length_x, scm_contregs, scm_debug_info,
  4593. scm_debug_frame, SCM_DSIDEVAL, SCM_CONST_LONG, SCM_VCELL,
  4594. SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT,
  4595. SCM_HUGE_LENGTH, SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
  4596. SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
  4597. SCM_VALIDATE_RWSTRING, DIGITS, scm_small_istr2int, scm_istr2int,
  4598. scm_istr2flo, scm_istring2number, scm_istr2int, scm_istr2flo,
  4599. scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP,
  4600. SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
  4601. SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable,
  4602. SCM_CHARS, SCM_LENGTH, SCM_SET_STRING_CHARS, SCM_SET_STRING_LENGTH.
  4603. * Changes to bundled modules
  4604. ** (ice-9 debug)
  4605. Using the (ice-9 debug) module no longer automatically switches Guile
  4606. to use the debugging evaluator. If you want to switch to the
  4607. debugging evaluator (which is needed for backtrace information if you
  4608. hit an error), please add an explicit "(debug-enable 'debug)" to your
  4609. code just after the code to use (ice-9 debug).
  4610. Changes since Guile 1.4:
  4611. * Changes to the distribution
  4612. ** A top-level TODO file is included.
  4613. ** Guile now uses a versioning scheme similar to that of the Linux kernel.
  4614. Guile now always uses three numbers to represent the version,
  4615. i.e. "1.6.5". The first number, 1, is the major version number, the
  4616. second number, 6, is the minor version number, and the third number,
  4617. 5, is the micro version number. Changes in major version number
  4618. indicate major changes in Guile.
  4619. Minor version numbers that are even denote stable releases, and odd
  4620. minor version numbers denote development versions (which may be
  4621. unstable). The micro version number indicates a minor sub-revision of
  4622. a given MAJOR.MINOR release.
  4623. In keeping with the new scheme, (minor-version) and scm_minor_version
  4624. no longer return everything but the major version number. They now
  4625. just return the minor version number. Two new functions
  4626. (micro-version) and scm_micro_version have been added to report the
  4627. micro version number.
  4628. In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
  4629. ** New preprocessor definitions are available for checking versions.
  4630. version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
  4631. SCM_MICRO_VERSION to the appropriate integer values.
  4632. ** Guile now actively warns about deprecated features.
  4633. The new configure option `--enable-deprecated=LEVEL' and the
  4634. environment variable GUILE_WARN_DEPRECATED control this mechanism.
  4635. See INSTALL and README for more information.
  4636. ** Guile is much more likely to work on 64-bit architectures.
  4637. Guile now compiles and passes "make check" with only two UNRESOLVED GC
  4638. cases on Alpha and ia64 based machines now. Thanks to John Goerzen
  4639. for the use of a test machine, and thanks to Stefan Jahn for ia64
  4640. patches.
  4641. ** New functions: setitimer and getitimer.
  4642. These implement a fairly direct interface to the libc functions of the
  4643. same name.
  4644. ** The #. reader extension is now disabled by default.
  4645. For safety reasons, #. evaluation is disabled by default. To
  4646. re-enable it, set the fluid read-eval? to #t. For example:
  4647. (fluid-set! read-eval? #t)
  4648. but make sure you realize the potential security risks involved. With
  4649. read-eval? enabled, reading a data file from an untrusted source can
  4650. be dangerous.
  4651. ** New SRFI modules have been added:
  4652. SRFI-0 `cond-expand' is now supported in Guile, without requiring
  4653. using a module.
  4654. (srfi srfi-1) is a library containing many useful pair- and list-processing
  4655. procedures.
  4656. (srfi srfi-2) exports and-let*.
  4657. (srfi srfi-4) implements homogeneous numeric vector datatypes.
  4658. (srfi srfi-6) is a dummy module for now, since guile already provides
  4659. all of the srfi-6 procedures by default: open-input-string,
  4660. open-output-string, get-output-string.
  4661. (srfi srfi-8) exports receive.
  4662. (srfi srfi-9) exports define-record-type.
  4663. (srfi srfi-10) exports define-reader-ctor and implements the reader
  4664. extension #,().
  4665. (srfi srfi-11) exports let-values and let*-values.
  4666. (srfi srfi-13) implements the SRFI String Library.
  4667. (srfi srfi-14) implements the SRFI Character-Set Library.
  4668. (srfi srfi-17) implements setter and getter-with-setter and redefines
  4669. some accessor procedures as procedures with getters. (such as car,
  4670. cdr, vector-ref etc.)
  4671. (srfi srfi-19) implements the SRFI Time/Date Library.
  4672. ** New scripts / "executable modules"
  4673. Subdirectory "scripts" contains Scheme modules that are packaged to
  4674. also be executable as scripts. At this time, these scripts are available:
  4675. display-commentary
  4676. doc-snarf
  4677. generate-autoload
  4678. punify
  4679. read-scheme-source
  4680. use2dot
  4681. See README there for more info.
  4682. These scripts can be invoked from the shell with the new program
  4683. "guile-tools", which keeps track of installation directory for you.
  4684. For example:
  4685. $ guile-tools display-commentary srfi/*.scm
  4686. guile-tools is copied to the standard $bindir on "make install".
  4687. ** New module (ice-9 stack-catch):
  4688. stack-catch is like catch, but saves the current state of the stack in
  4689. the fluid the-last-stack. This fluid can be useful when using the
  4690. debugger and when re-throwing an error.
  4691. ** The module (ice-9 and-let*) has been renamed to (ice-9 and-let-star)
  4692. This has been done to prevent problems on lesser operating systems
  4693. that can't tolerate `*'s in file names. The exported macro continues
  4694. to be named `and-let*', of course.
  4695. On systems that support it, there is also a compatibility module named
  4696. (ice-9 and-let*). It will go away in the next release.
  4697. ** New modules (oop goops) etc.:
  4698. (oop goops)
  4699. (oop goops describe)
  4700. (oop goops save)
  4701. (oop goops active-slot)
  4702. (oop goops composite-slot)
  4703. The Guile Object Oriented Programming System (GOOPS) has been
  4704. integrated into Guile. For further information, consult the GOOPS
  4705. manual and tutorial in the `doc' directory.
  4706. ** New module (ice-9 rdelim).
  4707. This exports the following procedures which were previously defined
  4708. in the default environment:
  4709. read-line read-line! read-delimited read-delimited! %read-delimited!
  4710. %read-line write-line
  4711. For backwards compatibility the definitions are still imported into the
  4712. default environment in this version of Guile. However you should add:
  4713. (use-modules (ice-9 rdelim))
  4714. to any program which uses the definitions, since this may change in
  4715. future.
  4716. Alternatively, if guile-scsh is installed, the (scsh rdelim) module
  4717. can be used for similar functionality.
  4718. ** New module (ice-9 rw)
  4719. This is a subset of the (scsh rw) module from guile-scsh. Currently
  4720. it defines two procedures:
  4721. *** New function: read-string!/partial str [port_or_fdes [start [end]]]
  4722. Read characters from a port or file descriptor into a string STR.
  4723. A port must have an underlying file descriptor -- a so-called
  4724. fport. This procedure is scsh-compatible and can efficiently read
  4725. large strings.
  4726. *** New function: write-string/partial str [port_or_fdes [start [end]]]
  4727. Write characters from a string STR to a port or file descriptor.
  4728. A port must have an underlying file descriptor -- a so-called
  4729. fport. This procedure is mostly compatible and can efficiently
  4730. write large strings.
  4731. ** New module (ice-9 match)
  4732. This module includes Andrew K. Wright's pattern matcher. See
  4733. ice-9/match.scm for brief description or
  4734. http://www.star-lab.com/wright/code.html
  4735. for complete documentation.
  4736. ** New module (ice-9 buffered-input)
  4737. This module provides procedures to construct an input port from an
  4738. underlying source of input that reads and returns its input in chunks.
  4739. The underlying input source is a Scheme procedure, specified by the
  4740. caller, which the port invokes whenever it needs more input.
  4741. This is useful when building an input port whose back end is Readline
  4742. or a UI element such as the GtkEntry widget.
  4743. ** Documentation
  4744. The reference and tutorial documentation that was previously
  4745. distributed separately, as `guile-doc', is now included in the core
  4746. Guile distribution. The documentation consists of the following
  4747. manuals.
  4748. - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction
  4749. to using Guile.
  4750. - The Guile Reference Manual (guile.texi) contains (or is intended to
  4751. contain) reference documentation on all aspects of Guile.
  4752. - The GOOPS Manual (goops.texi) contains both tutorial-style and
  4753. reference documentation for using GOOPS, Guile's Object Oriented
  4754. Programming System.
  4755. - The Revised^5 Report on the Algorithmic Language Scheme
  4756. (r5rs.texi).
  4757. See the README file in the `doc' directory for more details.
  4758. ** There are a couple of examples in the examples/ directory now.
  4759. * Changes to the stand-alone interpreter
  4760. ** New command line option `--use-srfi'
  4761. Using this option, SRFI modules can be loaded on startup and be
  4762. available right from the beginning. This makes programming portable
  4763. Scheme programs easier.
  4764. The option `--use-srfi' expects a comma-separated list of numbers,
  4765. each representing a SRFI number to be loaded into the interpreter
  4766. before starting evaluating a script file or the REPL. Additionally,
  4767. the feature identifier for the loaded SRFIs is recognized by
  4768. `cond-expand' when using this option.
  4769. Example:
  4770. $ guile --use-srfi=8,13
  4771. guile> (receive (x z) (values 1 2) (+ 1 2))
  4772. 3
  4773. guile> (string-pad "bla" 20)
  4774. " bla"
  4775. ** Guile now always starts up in the `(guile-user)' module.
  4776. Previously, scripts executed via the `-s' option would run in the
  4777. `(guile)' module and the repl would run in the `(guile-user)' module.
  4778. Now every user action takes place in the `(guile-user)' module by
  4779. default.
  4780. * Changes to Scheme functions and syntax
  4781. ** Character classifiers work for non-ASCII characters.
  4782. The predicates `char-alphabetic?', `char-numeric?',
  4783. `char-whitespace?', `char-lower?', `char-upper?' and `char-is-both?'
  4784. no longer check whether their arguments are ASCII characters.
  4785. Previously, a character would only be considered alphabetic when it
  4786. was also ASCII, for example.
  4787. ** Previously deprecated Scheme functions have been removed:
  4788. tag - no replacement.
  4789. fseek - replaced by seek.
  4790. list* - replaced by cons*.
  4791. ** It's now possible to create modules with controlled environments
  4792. Example:
  4793. (use-modules (ice-9 safe))
  4794. (define m (make-safe-module))
  4795. ;;; m will now be a module containing only a safe subset of R5RS
  4796. (eval '(+ 1 2) m) --> 3
  4797. (eval 'load m) --> ERROR: Unbound variable: load
  4798. ** Evaluation of "()", the empty list, is now an error.
  4799. Previously, the expression "()" evaluated to the empty list. This has
  4800. been changed to signal a "missing expression" error. The correct way
  4801. to write the empty list as a literal constant is to use quote: "'()".
  4802. ** New concept of `Guile Extensions'.
  4803. A Guile Extension is just a ordinary shared library that can be linked
  4804. at run-time. We found it advantageous to give this simple concept a
  4805. dedicated name to distinguish the issues related to shared libraries
  4806. from the issues related to the module system.
  4807. *** New function: load-extension
  4808. Executing (load-extension lib init) is mostly equivalent to
  4809. (dynamic-call init (dynamic-link lib))
  4810. except when scm_register_extension has been called previously.
  4811. Whenever appropriate, you should use `load-extension' instead of
  4812. dynamic-link and dynamic-call.
  4813. *** New C function: scm_c_register_extension
  4814. This function registers a initialization function for use by
  4815. `load-extension'. Use it when you don't want specific extensions to
  4816. be loaded as shared libraries (for example on platforms that don't
  4817. support dynamic linking).
  4818. ** Auto-loading of compiled-code modules is deprecated.
  4819. Guile used to be able to automatically find and link a shared
  4820. library to satisfy requests for a module. For example, the module
  4821. `(foo bar)' could be implemented by placing a shared library named
  4822. "foo/libbar.so" (or with a different extension) in a directory on the
  4823. load path of Guile.
  4824. This has been found to be too tricky, and is no longer supported. The
  4825. shared libraries are now called "extensions". You should now write a
  4826. small Scheme file that calls `load-extension' to load the shared
  4827. library and initialize it explicitly.
  4828. The shared libraries themselves should be installed in the usual
  4829. places for shared libraries, with names like "libguile-foo-bar".
  4830. For example, place this into a file "foo/bar.scm"
  4831. (define-module (foo bar))
  4832. (load-extension "libguile-foo-bar" "foobar_init")
  4833. ** Backward incompatible change: eval EXP ENVIRONMENT-SPECIFIER
  4834. `eval' is now R5RS, that is it takes two arguments.
  4835. The second argument is an environment specifier, i.e. either
  4836. (scheme-report-environment 5)
  4837. (null-environment 5)
  4838. (interaction-environment)
  4839. or
  4840. any module.
  4841. ** The module system has been made more disciplined.
  4842. The function `eval' will save and restore the current module around
  4843. the evaluation of the specified expression. While this expression is
  4844. evaluated, `(current-module)' will now return the right module, which
  4845. is the module specified as the second argument to `eval'.
  4846. A consequence of this change is that `eval' is not particularly
  4847. useful when you want allow the evaluated code to change what module is
  4848. designated as the current module and have this change persist from one
  4849. call to `eval' to the next. The read-eval-print-loop is an example
  4850. where `eval' is now inadequate. To compensate, there is a new
  4851. function `primitive-eval' that does not take a module specifier and
  4852. that does not save/restore the current module. You should use this
  4853. function together with `set-current-module', `current-module', etc
  4854. when you want to have more control over the state that is carried from
  4855. one eval to the next.
  4856. Additionally, it has been made sure that forms that are evaluated at
  4857. the top level are always evaluated with respect to the current module.
  4858. Previously, subforms of top-level forms such as `begin', `case',
  4859. etc. did not respect changes to the current module although these
  4860. subforms are at the top-level as well.
  4861. To prevent strange behavior, the forms `define-module',
  4862. `use-modules', `use-syntax', and `export' have been restricted to only
  4863. work on the top level. The forms `define-public' and
  4864. `defmacro-public' only export the new binding on the top level. They
  4865. behave just like `define' and `defmacro', respectively, when they are
  4866. used in a lexical environment.
  4867. Also, `export' will no longer silently re-export bindings imported
  4868. from a used module. It will emit a `deprecation' warning and will
  4869. cease to perform any re-export in the next version. If you actually
  4870. want to re-export bindings, use the new `re-export' in place of
  4871. `export'. The new `re-export' will not make copies of variables when
  4872. rexporting them, as `export' did wrongly.
  4873. ** Module system now allows selection and renaming of imported bindings
  4874. Previously, when using `use-modules' or the `#:use-module' clause in
  4875. the `define-module' form, all the bindings (association of symbols to
  4876. values) for imported modules were added to the "current module" on an
  4877. as-is basis. This has been changed to allow finer control through two
  4878. new facilities: selection and renaming.
  4879. You can now select which of the imported module's bindings are to be
  4880. visible in the current module by using the `:select' clause. This
  4881. clause also can be used to rename individual bindings. For example:
  4882. ;; import all bindings no questions asked
  4883. (use-modules (ice-9 common-list))
  4884. ;; import four bindings, renaming two of them;
  4885. ;; the current module sees: every some zonk-y zonk-n
  4886. (use-modules ((ice-9 common-list)
  4887. :select (every some
  4888. (remove-if . zonk-y)
  4889. (remove-if-not . zonk-n))))
  4890. You can also programmatically rename all selected bindings using the
  4891. `:renamer' clause, which specifies a proc that takes a symbol and
  4892. returns another symbol. Because it is common practice to use a prefix,
  4893. we now provide the convenience procedure `symbol-prefix-proc'. For
  4894. example:
  4895. ;; import four bindings, renaming two of them specifically,
  4896. ;; and all four w/ prefix "CL:";
  4897. ;; the current module sees: CL:every CL:some CL:zonk-y CL:zonk-n
  4898. (use-modules ((ice-9 common-list)
  4899. :select (every some
  4900. (remove-if . zonk-y)
  4901. (remove-if-not . zonk-n))
  4902. :renamer (symbol-prefix-proc 'CL:)))
  4903. ;; import four bindings, renaming two of them specifically,
  4904. ;; and all four by upcasing.
  4905. ;; the current module sees: EVERY SOME ZONK-Y ZONK-N
  4906. (define (upcase-symbol sym)
  4907. (string->symbol (string-upcase (symbol->string sym))))
  4908. (use-modules ((ice-9 common-list)
  4909. :select (every some
  4910. (remove-if . zonk-y)
  4911. (remove-if-not . zonk-n))
  4912. :renamer upcase-symbol))
  4913. Note that programmatic renaming is done *after* individual renaming.
  4914. Also, the above examples show `use-modules', but the same facilities are
  4915. available for the `#:use-module' clause of `define-module'.
  4916. See manual for more info.
  4917. ** The semantics of guardians have changed.
  4918. The changes are for the most part compatible. An important criterion
  4919. was to keep the typical usage of guardians as simple as before, but to
  4920. make the semantics safer and (as a result) more useful.
  4921. *** All objects returned from guardians are now properly alive.
  4922. It is now guaranteed that any object referenced by an object returned
  4923. from a guardian is alive. It's now impossible for a guardian to
  4924. return a "contained" object before its "containing" object.
  4925. One incompatible (but probably not very important) change resulting
  4926. from this is that it is no longer possible to guard objects that
  4927. indirectly reference themselves (i.e. are parts of cycles). If you do
  4928. so accidentally, you'll get a warning.
  4929. *** There are now two types of guardians: greedy and sharing.
  4930. If you call (make-guardian #t) or just (make-guardian), you'll get a
  4931. greedy guardian, and for (make-guardian #f) a sharing guardian.
  4932. Greedy guardians are the default because they are more "defensive".
  4933. You can only greedily guard an object once. If you guard an object
  4934. more than once, once in a greedy guardian and the rest of times in
  4935. sharing guardians, then it is guaranteed that the object won't be
  4936. returned from sharing guardians as long as it is greedily guarded
  4937. and/or alive.
  4938. Guardians returned by calls to `make-guardian' can now take one more
  4939. optional parameter, which says whether to throw an error in case an
  4940. attempt is made to greedily guard an object that is already greedily
  4941. guarded. The default is true, i.e. throw an error. If the parameter
  4942. is false, the guardian invocation returns #t if guarding was
  4943. successful and #f if it wasn't.
  4944. Also, since greedy guarding is, in effect, a side-effecting operation
  4945. on objects, a new function is introduced: `destroy-guardian!'.
  4946. Invoking this function on a guardian renders it unoperative and, if
  4947. the guardian is greedy, clears the "greedily guarded" property of the
  4948. objects that were guarded by it, thus undoing the side effect.
  4949. Note that all this hair is hardly very important, since guardian
  4950. objects are usually permanent.
  4951. ** Continuations created by call-with-current-continuation now accept
  4952. any number of arguments, as required by R5RS.
  4953. ** New function `issue-deprecation-warning'
  4954. This function is used to display the deprecation messages that are
  4955. controlled by GUILE_WARN_DEPRECATION as explained in the README.
  4956. (define (id x)
  4957. (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
  4958. (identity x))
  4959. guile> (id 1)
  4960. ;; `id' is deprecated. Use `identity' instead.
  4961. 1
  4962. guile> (id 1)
  4963. 1
  4964. ** New syntax `begin-deprecated'
  4965. When deprecated features are included (as determined by the configure
  4966. option --enable-deprecated), `begin-deprecated' is identical to
  4967. `begin'. When deprecated features are excluded, it always evaluates
  4968. to `#f', ignoring the body forms.
  4969. ** New function `make-object-property'
  4970. This function returns a new `procedure with setter' P that can be used
  4971. to attach a property to objects. When calling P as
  4972. (set! (P obj) val)
  4973. where `obj' is any kind of object, it attaches `val' to `obj' in such
  4974. a way that it can be retrieved by calling P as
  4975. (P obj)
  4976. This function will replace procedure properties, symbol properties and
  4977. source properties eventually.
  4978. ** Module (ice-9 optargs) now uses keywords instead of `#&'.
  4979. Instead of #&optional, #&key, etc you should now use #:optional,
  4980. #:key, etc. Since #:optional is a keyword, you can write it as just
  4981. :optional when (read-set! keywords 'prefix) is active.
  4982. The old reader syntax `#&' is still supported, but deprecated. It
  4983. will be removed in the next release.
  4984. ** New define-module option: pure
  4985. Tells the module system not to include any bindings from the root
  4986. module.
  4987. Example:
  4988. (define-module (totally-empty-module)
  4989. :pure)
  4990. ** New define-module option: export NAME1 ...
  4991. Export names NAME1 ...
  4992. This option is required if you want to be able to export bindings from
  4993. a module which doesn't import one of `define-public' or `export'.
  4994. Example:
  4995. (define-module (foo)
  4996. :pure
  4997. :use-module (ice-9 r5rs)
  4998. :export (bar))
  4999. ;;; Note that we're pure R5RS below this point!
  5000. (define (bar)
  5001. ...)
  5002. ** New function: object->string OBJ
  5003. Return a Scheme string obtained by printing a given object.
  5004. ** New function: port? X
  5005. Returns a boolean indicating whether X is a port. Equivalent to
  5006. `(or (input-port? X) (output-port? X))'.
  5007. ** New function: file-port?
  5008. Determines whether a given object is a port that is related to a file.
  5009. ** New function: port-for-each proc
  5010. Apply PROC to each port in the Guile port table in turn. The return
  5011. value is unspecified. More specifically, PROC is applied exactly once
  5012. to every port that exists in the system at the time PORT-FOR-EACH is
  5013. invoked. Changes to the port table while PORT-FOR-EACH is running
  5014. have no effect as far as PORT-FOR-EACH is concerned.
  5015. ** New function: dup2 oldfd newfd
  5016. A simple wrapper for the `dup2' system call. Copies the file
  5017. descriptor OLDFD to descriptor number NEWFD, replacing the
  5018. previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
  5019. Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  5020. to move away ports which are using NEWFD. The return value is
  5021. unspecified.
  5022. ** New function: close-fdes fd
  5023. A simple wrapper for the `close' system call. Close file
  5024. descriptor FD, which must be an integer. Unlike close (*note
  5025. close: Ports and File Descriptors.), the file descriptor will be
  5026. closed even if a port is using it. The return value is
  5027. unspecified.
  5028. ** New function: crypt password salt
  5029. Encrypts `password' using the standard unix password encryption
  5030. algorithm.
  5031. ** New function: chroot path
  5032. Change the root directory of the running process to `path'.
  5033. ** New functions: getlogin, cuserid
  5034. Return the login name or the user name of the current effective user
  5035. id, respectively.
  5036. ** New functions: getpriority which who, setpriority which who prio
  5037. Get or set the priority of the running process.
  5038. ** New function: getpass prompt
  5039. Read a password from the terminal, first displaying `prompt' and
  5040. disabling echoing.
  5041. ** New function: flock file operation
  5042. Set/remove an advisory shared or exclusive lock on `file'.
  5043. ** New functions: sethostname name, gethostname
  5044. Set or get the hostname of the machine the current process is running
  5045. on.
  5046. ** New function: mkstemp! tmpl
  5047. mkstemp creates a new unique file in the file system and returns a
  5048. new buffered port open for reading and writing to the file. TMPL
  5049. is a string specifying where the file should be created: it must
  5050. end with `XXXXXX' and will be changed in place to return the name
  5051. of the temporary file.
  5052. ** New function: open-input-string string
  5053. Return an input string port which delivers the characters from
  5054. `string'. This procedure, together with `open-output-string' and
  5055. `get-output-string' implements SRFI-6.
  5056. ** New function: open-output-string
  5057. Return an output string port which collects all data written to it.
  5058. The data can then be retrieved by `get-output-string'.
  5059. ** New function: get-output-string
  5060. Return the contents of an output string port.
  5061. ** New function: identity
  5062. Return the argument.
  5063. ** socket, connect, accept etc., now have support for IPv6. IPv6 addresses
  5064. are represented in Scheme as integers with normal host byte ordering.
  5065. ** New function: inet-pton family address
  5066. Convert a printable string network address into an integer. Note that
  5067. unlike the C version of this function, the result is an integer with
  5068. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  5069. e.g.,
  5070. (inet-pton AF_INET "127.0.0.1") => 2130706433
  5071. (inet-pton AF_INET6 "::1") => 1
  5072. ** New function: inet-ntop family address
  5073. Convert an integer network address into a printable string. Note that
  5074. unlike the C version of this function, the input is an integer with
  5075. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  5076. e.g.,
  5077. (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  5078. (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  5079. ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  5080. ** Deprecated: id
  5081. Use `identity' instead.
  5082. ** Deprecated: -1+
  5083. Use `1-' instead.
  5084. ** Deprecated: return-it
  5085. Do without it.
  5086. ** Deprecated: string-character-length
  5087. Use `string-length' instead.
  5088. ** Deprecated: flags
  5089. Use `logior' instead.
  5090. ** Deprecated: close-all-ports-except.
  5091. This was intended for closing ports in a child process after a fork,
  5092. but it has the undesirable side effect of flushing buffers.
  5093. port-for-each is more flexible.
  5094. ** The (ice-9 popen) module now attempts to set up file descriptors in
  5095. the child process from the current Scheme ports, instead of using the
  5096. current values of file descriptors 0, 1, and 2 in the parent process.
  5097. ** Removed function: builtin-weak-bindings
  5098. There is no such concept as a weak binding any more.
  5099. ** Removed constants: bignum-radix, scm-line-incrementors
  5100. ** define-method: New syntax mandatory.
  5101. The new method syntax is now mandatory:
  5102. (define-method (NAME ARG-SPEC ...) BODY ...)
  5103. (define-method (NAME ARG-SPEC ... . REST-ARG) BODY ...)
  5104. ARG-SPEC ::= ARG-NAME | (ARG-NAME TYPE)
  5105. REST-ARG ::= ARG-NAME
  5106. If you have old code using the old syntax, import
  5107. (oop goops old-define-method) before (oop goops) as in:
  5108. (use-modules (oop goops old-define-method) (oop goops))
  5109. ** Deprecated function: builtin-variable
  5110. Removed function: builtin-bindings
  5111. There is no longer a distinction between builtin or other variables.
  5112. Use module system operations for all variables.
  5113. ** Lazy-catch handlers are no longer allowed to return.
  5114. That is, a call to `throw', `error', etc is now guaranteed to not
  5115. return.
  5116. ** Bugfixes for (ice-9 getopt-long)
  5117. This module is now tested using test-suite/tests/getopt-long.test.
  5118. The following bugs have been fixed:
  5119. *** Parsing for options that are specified to have `optional' args now checks
  5120. if the next element is an option instead of unconditionally taking it as the
  5121. option arg.
  5122. *** An error is now thrown for `--opt=val' when the option description
  5123. does not specify `(value #t)' or `(value optional)'. This condition used to
  5124. be accepted w/o error, contrary to the documentation.
  5125. *** The error message for unrecognized options is now more informative.
  5126. It used to be "not a record", an artifact of the implementation.
  5127. *** The error message for `--opt' terminating the arg list (no value), when
  5128. `(value #t)' is specified, is now more informative. It used to be "not enough
  5129. args".
  5130. *** "Clumped" single-char args now preserve trailing string, use it as arg.
  5131. The expansion used to be like so:
  5132. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "--xyz")
  5133. Note that the "5d" is dropped. Now it is like so:
  5134. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "5d" "--xyz")
  5135. This enables single-char options to have adjoining arguments as long as their
  5136. constituent characters are not potential single-char options.
  5137. ** (ice-9 session) procedure `arity' now works with (ice-9 optargs) `lambda*'
  5138. The `lambda*' and derivative forms in (ice-9 optargs) now set a procedure
  5139. property `arglist', which can be retrieved by `arity'. The result is that
  5140. `arity' can give more detailed information than before:
  5141. Before:
  5142. guile> (use-modules (ice-9 optargs))
  5143. guile> (define* (foo #:optional a b c) a)
  5144. guile> (arity foo)
  5145. 0 or more arguments in `lambda*:G0'.
  5146. After:
  5147. guile> (arity foo)
  5148. 3 optional arguments: `a', `b' and `c'.
  5149. guile> (define* (bar a b #:key c d #:allow-other-keys) a)
  5150. guile> (arity bar)
  5151. 2 required arguments: `a' and `b', 2 keyword arguments: `c'
  5152. and `d', other keywords allowed.
  5153. guile> (define* (baz a b #:optional c #:rest r) a)
  5154. guile> (arity baz)
  5155. 2 required arguments: `a' and `b', 1 optional argument: `c',
  5156. the rest in `r'.
  5157. * Changes to the C interface
  5158. ** Types have been renamed from scm_*_t to scm_t_*.
  5159. This has been done for POSIX sake. It reserves identifiers ending
  5160. with "_t". What a concept.
  5161. The old names are still available with status `deprecated'.
  5162. ** scm_t_bits (former scm_bits_t) is now a unsigned type.
  5163. ** Deprecated features have been removed.
  5164. *** Macros removed
  5165. SCM_INPORTP, SCM_OUTPORTP SCM_ICHRP, SCM_ICHR, SCM_MAKICHR
  5166. SCM_SETJMPBUF SCM_NSTRINGP SCM_NRWSTRINGP SCM_NVECTORP SCM_DOUBLE_CELLP
  5167. *** C Functions removed
  5168. scm_sysmissing scm_tag scm_tc16_flo scm_tc_flo
  5169. scm_fseek - replaced by scm_seek.
  5170. gc-thunk - replaced by after-gc-hook.
  5171. gh_int2scmb - replaced by gh_bool2scm.
  5172. scm_tc_dblr - replaced by scm_tc16_real.
  5173. scm_tc_dblc - replaced by scm_tc16_complex.
  5174. scm_list_star - replaced by scm_cons_star.
  5175. ** Deprecated: scm_makfromstr
  5176. Use scm_mem2string instead.
  5177. ** Deprecated: scm_make_shared_substring
  5178. Explicit shared substrings will disappear from Guile.
  5179. Instead, "normal" strings will be implemented using sharing
  5180. internally, combined with a copy-on-write strategy.
  5181. ** Deprecated: scm_read_only_string_p
  5182. The concept of read-only strings will disappear in next release of
  5183. Guile.
  5184. ** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
  5185. Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
  5186. ** New functions: scm_call_0, scm_call_1, scm_call_2, scm_call_3
  5187. Call a procedure with the indicated number of arguments. See "Fly
  5188. Evaluation" in the manual.
  5189. ** New functions: scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3
  5190. Call a procedure with the indicated number of arguments and a list of
  5191. further arguments. See "Fly Evaluation" in the manual.
  5192. ** New functions: scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5
  5193. Create a list of the given number of elements. See "List
  5194. Constructors" in the manual.
  5195. ** Renamed function: scm_listify has been replaced by scm_list_n.
  5196. ** Deprecated macros: SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4,
  5197. SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9.
  5198. Use functions scm_list_N instead.
  5199. ** New function: scm_c_read (SCM port, void *buffer, scm_sizet size)
  5200. Used by an application to read arbitrary number of bytes from a port.
  5201. Same semantics as libc read, except that scm_c_read only returns less
  5202. than SIZE bytes if at end-of-file.
  5203. Warning: Doesn't update port line and column counts!
  5204. ** New function: scm_c_write (SCM port, const void *ptr, scm_sizet size)
  5205. Used by an application to write arbitrary number of bytes to an SCM
  5206. port. Similar semantics as libc write. However, unlike libc
  5207. write, scm_c_write writes the requested number of bytes and has no
  5208. return value.
  5209. Warning: Doesn't update port line and column counts!
  5210. ** New function: scm_init_guile ()
  5211. In contrast to scm_boot_guile, scm_init_guile will return normally
  5212. after initializing Guile. It is not available on all systems, tho.
  5213. ** New functions: scm_str2symbol, scm_mem2symbol
  5214. The function scm_str2symbol takes a const char* pointing to a zero-terminated
  5215. field of characters and creates a scheme symbol object from that C string.
  5216. The function scm_mem2symbol takes a const char* and a number of characters and
  5217. creates a symbol from the characters in that memory area.
  5218. ** New functions: scm_primitive_make_property
  5219. scm_primitive_property_ref
  5220. scm_primitive_property_set_x
  5221. scm_primitive_property_del_x
  5222. These functions implement a new way to deal with object properties.
  5223. See libguile/properties.c for their documentation.
  5224. ** New function: scm_done_free (long size)
  5225. This function is the inverse of scm_done_malloc. Use it to report the
  5226. amount of smob memory you free. The previous method, which involved
  5227. calling scm_done_malloc with negative argument, was somewhat
  5228. unintuitive (and is still available, of course).
  5229. ** New function: scm_c_memq (SCM obj, SCM list)
  5230. This function provides a fast C level alternative for scm_memq for the case
  5231. that the list parameter is known to be a proper list. The function is a
  5232. replacement for scm_sloppy_memq, but is stricter in its requirements on its
  5233. list input parameter, since for anything else but a proper list the function's
  5234. behaviour is undefined - it may even crash or loop endlessly. Further, for
  5235. the case that the object is not found in the list, scm_c_memq returns #f which
  5236. is similar to scm_memq, but different from scm_sloppy_memq's behaviour.
  5237. ** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
  5238. scm_remember_upto_here
  5239. These functions replace the function scm_remember.
  5240. ** Deprecated function: scm_remember
  5241. Use one of the new functions scm_remember_upto_here_1,
  5242. scm_remember_upto_here_2 or scm_remember_upto_here instead.
  5243. ** New function: scm_allocate_string
  5244. This function replaces the function scm_makstr.
  5245. ** Deprecated function: scm_makstr
  5246. Use the new function scm_allocate_string instead.
  5247. ** New global variable scm_gc_running_p introduced.
  5248. Use this variable to find out if garbage collection is being executed. Up to
  5249. now applications have used scm_gc_heap_lock to test if garbage collection was
  5250. running, which also works because of the fact that up to know only the garbage
  5251. collector has set this variable. But, this is an implementation detail that
  5252. may change. Further, scm_gc_heap_lock is not set throughout gc, thus the use
  5253. of this variable is (and has been) not fully safe anyway.
  5254. ** New macros: SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH
  5255. Use these instead of SCM_LENGTH_MAX.
  5256. ** New macros: SCM_CONTINUATION_LENGTH, SCM_CCLO_LENGTH, SCM_STACK_LENGTH,
  5257. SCM_STRING_LENGTH, SCM_SYMBOL_LENGTH, SCM_UVECTOR_LENGTH,
  5258. SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
  5259. Use these instead of SCM_LENGTH.
  5260. ** New macros: SCM_SET_CONTINUATION_LENGTH, SCM_SET_STRING_LENGTH,
  5261. SCM_SET_SYMBOL_LENGTH, SCM_SET_VECTOR_LENGTH, SCM_SET_UVECTOR_LENGTH,
  5262. SCM_SET_BITVECTOR_LENGTH
  5263. Use these instead of SCM_SETLENGTH
  5264. ** New macros: SCM_STRING_CHARS, SCM_SYMBOL_CHARS, SCM_CCLO_BASE,
  5265. SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
  5266. SCM_ARRAY_MEM
  5267. Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
  5268. SCM_VELTS.
  5269. ** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
  5270. SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
  5271. SCM_SET_VECTOR_BASE
  5272. Use these instead of SCM_SETCHARS.
  5273. ** New macro: SCM_BITVECTOR_P
  5274. ** New macro: SCM_STRING_COERCE_0TERMINATION_X
  5275. Use instead of SCM_COERCE_SUBSTR.
  5276. ** New macros: SCM_DIR_OPEN_P, SCM_DIR_FLAG_OPEN
  5277. For directory objects, use these instead of SCM_OPDIRP and SCM_OPN.
  5278. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
  5279. SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
  5280. SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
  5281. SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP,
  5282. SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
  5283. SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
  5284. SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
  5285. SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
  5286. SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
  5287. SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
  5288. SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC,
  5289. SCM_OPDIRP, SCM_VALIDATE_OPDIR, SCM_WTA, RETURN_SCM_WTA, SCM_CONST_LONG,
  5290. SCM_WNA, SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
  5291. SCM_VALIDATE_NUMBER_DEF_COPY, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
  5292. SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_SETAND_CAR, SCM_SETOR_CAR
  5293. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
  5294. Use scm_memory_error instead of SCM_NALLOC.
  5295. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
  5296. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR.
  5297. Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP
  5298. Use a type specific accessor macro instead of SCM_CHARS/SCM_UCHARS.
  5299. Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
  5300. Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
  5301. Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
  5302. Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
  5303. Use SCM_STRINGP instead of SCM_RWSTRINGP.
  5304. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
  5305. Use SCM_STRING_CHARS instead of SCM_ROCHARS.
  5306. Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
  5307. Use a type specific setter macro instead of SCM_SETLENGTH.
  5308. Use a type specific setter macro instead of SCM_SETCHARS.
  5309. Use a type specific length macro instead of SCM_LENGTH_MAX.
  5310. Use SCM_GCMARKP instead of SCM_GC8MARKP.
  5311. Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
  5312. Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
  5313. Use SCM_TYP16 instead of SCM_GCTYP16.
  5314. Use SCM_CDR instead of SCM_GCCDR.
  5315. Use SCM_DIR_OPEN_P instead of SCM_OPDIRP.
  5316. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of SCM_WTA.
  5317. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of RETURN_SCM_WTA.
  5318. Use SCM_VCELL_INIT instead of SCM_CONST_LONG.
  5319. Use SCM_WRONG_NUM_ARGS instead of SCM_WNA.
  5320. Use SCM_CONSP instead of SCM_SLOPPY_CONSP.
  5321. Use !SCM_CONSP instead of SCM_SLOPPY_NCONSP.
  5322. ** Removed function: scm_struct_init
  5323. ** Removed variable: scm_symhash_dim
  5324. ** Renamed function: scm_make_cont has been replaced by
  5325. scm_make_continuation, which has a different interface.
  5326. ** Deprecated function: scm_call_catching_errors
  5327. Use scm_catch or scm_lazy_catch from throw.[ch] instead.
  5328. ** Deprecated function: scm_strhash
  5329. Use scm_string_hash instead.
  5330. ** Deprecated function: scm_vector_set_length_x
  5331. Instead, create a fresh vector of the desired size and copy the contents.
  5332. ** scm_gensym has changed prototype
  5333. scm_gensym now only takes one argument.
  5334. ** Deprecated type tags: scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
  5335. scm_tc7_lvector
  5336. There is now only a single symbol type scm_tc7_symbol.
  5337. The tag scm_tc7_lvector was not used anyway.
  5338. ** Deprecated function: scm_make_smob_type_mfpe, scm_set_smob_mfpe.
  5339. Use scm_make_smob_type and scm_set_smob_XXX instead.
  5340. ** New function scm_set_smob_apply.
  5341. This can be used to set an apply function to a smob type.
  5342. ** Deprecated function: scm_strprint_obj
  5343. Use scm_object_to_string instead.
  5344. ** Deprecated function: scm_wta
  5345. Use scm_wrong_type_arg, or another appropriate error signalling function
  5346. instead.
  5347. ** Explicit support for obarrays has been deprecated.
  5348. Use `scm_str2symbol' and the generic hashtable functions instead.
  5349. ** The concept of `vcells' has been deprecated.
  5350. The data type `variable' is now used exclusively. `Vcells' have been
  5351. a low-level concept so you are likely not affected by this change.
  5352. *** Deprecated functions: scm_sym2vcell, scm_sysintern,
  5353. scm_sysintern0, scm_symbol_value0, scm_intern, scm_intern0.
  5354. Use scm_c_define or scm_c_lookup instead, as appropriate.
  5355. *** New functions: scm_c_module_lookup, scm_c_lookup,
  5356. scm_c_module_define, scm_c_define, scm_module_lookup, scm_lookup,
  5357. scm_module_define, scm_define.
  5358. These functions work with variables instead of with vcells.
  5359. ** New functions for creating and defining `subr's and `gsubr's.
  5360. The new functions more clearly distinguish between creating a subr (or
  5361. gsubr) object and adding it to the current module.
  5362. These new functions are available: scm_c_make_subr, scm_c_define_subr,
  5363. scm_c_make_subr_with_generic, scm_c_define_subr_with_generic,
  5364. scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
  5365. scm_c_define_gsubr_with_generic.
  5366. ** Deprecated functions: scm_make_subr, scm_make_subr_opt,
  5367. scm_make_subr_with_generic, scm_make_gsubr,
  5368. scm_make_gsubr_with_generic.
  5369. Use the new ones from above instead.
  5370. ** C interface to the module system has changed.
  5371. While we suggest that you avoid as many explicit module system
  5372. operations from C as possible for the time being, the C interface has
  5373. been made more similar to the high-level Scheme module system.
  5374. *** New functions: scm_c_define_module, scm_c_use_module,
  5375. scm_c_export, scm_c_resolve_module.
  5376. They mostly work like their Scheme namesakes. scm_c_define_module
  5377. takes a function that is called a context where the new module is
  5378. current.
  5379. *** Deprecated functions: scm_the_root_module, scm_make_module,
  5380. scm_ensure_user_module, scm_load_scheme_module.
  5381. Use the new functions instead.
  5382. ** Renamed function: scm_internal_with_fluids becomes
  5383. scm_c_with_fluids.
  5384. scm_internal_with_fluids is available as a deprecated function.
  5385. ** New function: scm_c_with_fluid.
  5386. Just like scm_c_with_fluids, but takes one fluid and one value instead
  5387. of lists of same.
  5388. ** Deprecated typedefs: long_long, ulong_long.
  5389. They are of questionable utility and they pollute the global
  5390. namespace.
  5391. ** Deprecated typedef: scm_sizet
  5392. It is of questionable utility now that Guile requires ANSI C, and is
  5393. oddly named.
  5394. ** Deprecated typedefs: scm_port_rw_active, scm_port,
  5395. scm_ptob_descriptor, scm_debug_info, scm_debug_frame, scm_fport,
  5396. scm_option, scm_rstate, scm_rng, scm_array, scm_array_dim.
  5397. Made more compliant with the naming policy by adding a _t at the end.
  5398. ** Deprecated functions: scm_mkbig, scm_big2num, scm_adjbig,
  5399. scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl
  5400. With the exception of the mysterious scm_2ulong2big, they are still
  5401. available under new names (scm_i_mkbig etc). These functions are not
  5402. intended to be used in user code. You should avoid dealing with
  5403. bignums directly, and should deal with numbers in general (which can
  5404. be bignums).
  5405. ** Change in behavior: scm_num2long, scm_num2ulong
  5406. The scm_num2[u]long functions don't any longer accept an inexact
  5407. argument. This change in behavior is motivated by concordance with
  5408. R5RS: It is more common that a primitive doesn't want to accept an
  5409. inexact for an exact.
  5410. ** New functions: scm_short2num, scm_ushort2num, scm_int2num,
  5411. scm_uint2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
  5412. scm_num2ushort, scm_num2int, scm_num2uint, scm_num2ptrdiff,
  5413. scm_num2size.
  5414. These are conversion functions between the various ANSI C integral
  5415. types and Scheme numbers. NOTE: The scm_num2xxx functions don't
  5416. accept an inexact argument.
  5417. ** New functions: scm_float2num, scm_double2num,
  5418. scm_num2float, scm_num2double.
  5419. These are conversion functions between the two ANSI C float types and
  5420. Scheme numbers.
  5421. ** New number validation macros:
  5422. SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,INT,UINT}[_DEF]
  5423. See above.
  5424. ** New functions: scm_gc_protect_object, scm_gc_unprotect_object
  5425. These are just nicer-named old scm_protect_object and
  5426. scm_unprotect_object.
  5427. ** Deprecated functions: scm_protect_object, scm_unprotect_object
  5428. ** New functions: scm_gc_[un]register_root, scm_gc_[un]register_roots
  5429. These functions can be used to register pointers to locations that
  5430. hold SCM values.
  5431. ** Deprecated function: scm_create_hook.
  5432. Its sins are: misleading name, non-modularity and lack of general
  5433. usefulness.
  5434. Changes since Guile 1.3.4:
  5435. * Changes to the distribution
  5436. ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
  5437. We've changed the way we handle generated files in the Guile source
  5438. repository. As a result, the procedure for building trees obtained
  5439. from the nightly FTP snapshots or via CVS has changed:
  5440. - You must have appropriate versions of autoconf, automake, and
  5441. libtool installed on your system. See README for info on how to
  5442. obtain these programs.
  5443. - Before configuring the tree, you must first run the script
  5444. `autogen.sh' at the top of the source tree.
  5445. The Guile repository used to contain not only source files, written by
  5446. humans, but also some generated files, like configure scripts and
  5447. Makefile.in files. Even though the contents of these files could be
  5448. derived mechanically from other files present, we thought it would
  5449. make the tree easier to build if we checked them into CVS.
  5450. However, this approach means that minor differences between
  5451. developer's installed tools and habits affected the whole team.
  5452. So we have removed the generated files from the repository, and
  5453. added the autogen.sh script, which will reconstruct them
  5454. appropriately.
  5455. ** configure now has experimental options to remove support for certain
  5456. features:
  5457. --disable-arrays omit array and uniform array support
  5458. --disable-posix omit posix interfaces
  5459. --disable-networking omit networking interfaces
  5460. --disable-regex omit regular expression interfaces
  5461. These are likely to become separate modules some day.
  5462. ** New configure option --enable-debug-freelist
  5463. This enables a debugging version of SCM_NEWCELL(), and also registers
  5464. an extra primitive, the setter `gc-set-debug-check-freelist!'.
  5465. Configure with the --enable-debug-freelist option to enable
  5466. the gc-set-debug-check-freelist! primitive, and then use:
  5467. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  5468. (gc-set-debug-check-freelist! #f) # turn off checking
  5469. Checking of the freelist forces a traversal of the freelist and
  5470. a garbage collection before each allocation of a cell. This can
  5471. slow down the interpreter dramatically, so the setter should be used to
  5472. turn on this extra processing only when necessary.
  5473. ** New configure option --enable-debug-malloc
  5474. Include code for debugging of calls to scm_must_malloc/realloc/free.
  5475. Checks that
  5476. 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
  5477. 2. objects reallocated by scm_must_realloc has been allocated by
  5478. scm_must_malloc
  5479. 3. reallocated objects are reallocated with the same what string
  5480. But, most importantly, it records the number of allocated objects of
  5481. each kind. This is useful when searching for memory leaks.
  5482. A Guile compiled with this option provides the primitive
  5483. `malloc-stats' which returns an alist with pairs of kind and the
  5484. number of objects of that kind.
  5485. ** All includes are now referenced relative to the root directory
  5486. Since some users have had problems with mixups between Guile and
  5487. system headers, we have decided to always refer to Guile headers via
  5488. their parent directories. This essentially creates a "private name
  5489. space" for Guile headers. This means that the compiler only is given
  5490. -I options for the root build and root source directory.
  5491. ** Header files kw.h and genio.h have been removed.
  5492. ** The module (ice-9 getopt-gnu-style) has been removed.
  5493. ** New module (ice-9 documentation)
  5494. Implements the interface to documentation strings associated with
  5495. objects.
  5496. ** New module (ice-9 time)
  5497. Provides a macro `time', which displays execution time of a given form.
  5498. ** New module (ice-9 history)
  5499. Loading this module enables value history in the repl.
  5500. * Changes to the stand-alone interpreter
  5501. ** New command line option --debug
  5502. Start Guile with debugging evaluator and backtraces enabled.
  5503. This is useful when debugging your .guile init file or scripts.
  5504. ** New help facility
  5505. Usage: (help NAME) gives documentation about objects named NAME (a symbol)
  5506. (help REGEXP) ditto for objects with names matching REGEXP (a string)
  5507. (help 'NAME) gives documentation for NAME, even if it is not an object
  5508. (help ,EXPR) gives documentation for object returned by EXPR
  5509. (help (my module)) gives module commentary for `(my module)'
  5510. (help) gives this text
  5511. `help' searches among bindings exported from loaded modules, while
  5512. `apropos' searches among bindings visible from the "current" module.
  5513. Examples: (help help)
  5514. (help cons)
  5515. (help "output-string")
  5516. ** `help' and `apropos' now prints full module names
  5517. ** Dynamic linking now uses libltdl from the libtool package.
  5518. The old system dependent code for doing dynamic linking has been
  5519. replaced with calls to the libltdl functions which do all the hairy
  5520. details for us.
  5521. The major improvement is that you can now directly pass libtool
  5522. library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
  5523. will be able to do the best shared library job you can get, via
  5524. libltdl.
  5525. The way dynamic libraries are found has changed and is not really
  5526. portable across platforms, probably. It is therefore recommended to
  5527. use absolute filenames when possible.
  5528. If you pass a filename without an extension to `dynamic-link', it will
  5529. try a few appropriate ones. Thus, the most platform ignorant way is
  5530. to specify a name like "libfoo", without any directories and
  5531. extensions.
  5532. ** Guile COOP threads are now compatible with LinuxThreads
  5533. Previously, COOP threading wasn't possible in applications linked with
  5534. Linux POSIX threads due to their use of the stack pointer to find the
  5535. thread context. This has now been fixed with a workaround which uses
  5536. the pthreads to allocate the stack.
  5537. ** New primitives: `pkgdata-dir', `site-dir', `library-dir'
  5538. ** Positions of erring expression in scripts
  5539. With version 1.3.4, the location of the erring expression in Guile
  5540. scipts is no longer automatically reported. (This should have been
  5541. documented before the 1.3.4 release.)
  5542. You can get this information by enabling recording of positions of
  5543. source expressions and running the debugging evaluator. Put this at
  5544. the top of your script (or in your "site" file):
  5545. (read-enable 'positions)
  5546. (debug-enable 'debug)
  5547. ** Backtraces in scripts
  5548. It is now possible to get backtraces in scripts.
  5549. Put
  5550. (debug-enable 'debug 'backtrace)
  5551. at the top of the script.
  5552. (The first options enables the debugging evaluator.
  5553. The second enables backtraces.)
  5554. ** Part of module system symbol lookup now implemented in C
  5555. The eval closure of most modules is now implemented in C. Since this
  5556. was one of the bottlenecks for loading speed, Guile now loads code
  5557. substantially faster than before.
  5558. ** Attempting to get the value of an unbound variable now produces
  5559. an exception with a key of 'unbound-variable instead of 'misc-error.
  5560. ** The initial default output port is now unbuffered if it's using a
  5561. tty device. Previously in this situation it was line-buffered.
  5562. ** New hook: after-gc-hook
  5563. after-gc-hook takes over the role of gc-thunk. This hook is run at
  5564. the first SCM_TICK after a GC. (Thus, the code is run at the same
  5565. point during evaluation as signal handlers.)
  5566. Note that this hook should be used only for diagnostic and debugging
  5567. purposes. It is not certain that it will continue to be well-defined
  5568. when this hook is run in the future.
  5569. C programmers: Note the new C level hooks scm_before_gc_c_hook,
  5570. scm_before_sweep_c_hook, scm_after_gc_c_hook.
  5571. ** Improvements to garbage collector
  5572. Guile 1.4 has a new policy for triggering heap allocation and
  5573. determining the sizes of heap segments. It fixes a number of problems
  5574. in the old GC.
  5575. 1. The new policy can handle two separate pools of cells
  5576. (2-word/4-word) better. (The old policy would run wild, allocating
  5577. more and more memory for certain programs.)
  5578. 2. The old code would sometimes allocate far too much heap so that the
  5579. Guile process became gigantic. The new code avoids this.
  5580. 3. The old code would sometimes allocate too little so that few cells
  5581. were freed at GC so that, in turn, too much time was spent in GC.
  5582. 4. The old code would often trigger heap allocation several times in a
  5583. row. (The new scheme predicts how large the segments needs to be
  5584. in order not to need further allocation.)
  5585. All in all, the new GC policy will make larger applications more
  5586. efficient.
  5587. The new GC scheme also is prepared for POSIX threading. Threads can
  5588. allocate private pools of cells ("clusters") with just a single
  5589. function call. Allocation of single cells from such a cluster can
  5590. then proceed without any need of inter-thread synchronization.
  5591. ** New environment variables controlling GC parameters
  5592. GUILE_MAX_SEGMENT_SIZE Maximal segment size
  5593. (default = 2097000)
  5594. Allocation of 2-word cell heaps:
  5595. GUILE_INIT_SEGMENT_SIZE_1 Size of initial heap segment in bytes
  5596. (default = 360000)
  5597. GUILE_MIN_YIELD_1 Minimum number of freed cells at each
  5598. GC in percent of total heap size
  5599. (default = 40)
  5600. Allocation of 4-word cell heaps
  5601. (used for real numbers and misc other objects):
  5602. GUILE_INIT_SEGMENT_SIZE_2, GUILE_MIN_YIELD_2
  5603. (See entry "Way for application to customize GC parameters" under
  5604. section "Changes to the scm_ interface" below.)
  5605. ** Guile now implements reals using 4-word cells
  5606. This speeds up computation with reals. (They were earlier allocated
  5607. with `malloc'.) There is still some room for optimizations, however.
  5608. ** Some further steps toward POSIX thread support have been taken
  5609. *** Guile's critical sections (SCM_DEFER/ALLOW_INTS)
  5610. don't have much effect any longer, and many of them will be removed in
  5611. next release.
  5612. *** Signals
  5613. are only handled at the top of the evaluator loop, immediately after
  5614. I/O, and in scm_equalp.
  5615. *** The GC can allocate thread private pools of pairs.
  5616. * Changes to Scheme functions and syntax
  5617. ** close-input-port and close-output-port are now R5RS
  5618. These procedures have been turned into primitives and have R5RS behaviour.
  5619. ** New procedure: simple-format PORT MESSAGE ARG1 ...
  5620. (ice-9 boot) makes `format' an alias for `simple-format' until possibly
  5621. extended by the more sophisticated version in (ice-9 format)
  5622. (simple-format port message . args)
  5623. Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
  5624. MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,
  5625. the escapes are replaced with corresponding members of ARGS:
  5626. ~A formats using `display' and ~S formats using `write'.
  5627. If DESTINATION is #t, then use the `current-output-port',
  5628. if DESTINATION is #f, then return a string containing the formatted text.
  5629. Does not add a trailing newline."
  5630. ** string-ref: the second argument is no longer optional.
  5631. ** string, list->string: no longer accept strings in their arguments,
  5632. only characters, for compatibility with R5RS.
  5633. ** New procedure: port-closed? PORT
  5634. Returns #t if PORT is closed or #f if it is open.
  5635. ** Deprecated: list*
  5636. The list* functionality is now provided by cons* (SRFI-1 compliant)
  5637. ** New procedure: cons* ARG1 ARG2 ... ARGn
  5638. Like `list', but the last arg provides the tail of the constructed list,
  5639. returning (cons ARG1 (cons ARG2 (cons ... ARGn))).
  5640. Requires at least one argument. If given one argument, that argument
  5641. is returned as result.
  5642. This function is called `list*' in some other Schemes and in Common LISP.
  5643. ** Removed deprecated: serial-map, serial-array-copy!, serial-array-map!
  5644. ** New procedure: object-documentation OBJECT
  5645. Returns the documentation string associated with OBJECT. The
  5646. procedure uses a caching mechanism so that subsequent lookups are
  5647. faster.
  5648. Exported by (ice-9 documentation).
  5649. ** module-name now returns full names of modules
  5650. Previously, only the last part of the name was returned (`session' for
  5651. `(ice-9 session)'). Ex: `(ice-9 session)'.
  5652. * Changes to the gh_ interface
  5653. ** Deprecated: gh_int2scmb
  5654. Use gh_bool2scm instead.
  5655. * Changes to the scm_ interface
  5656. ** Guile primitives now carry docstrings!
  5657. Thanks to Greg Badros!
  5658. ** Guile primitives are defined in a new way: SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  5659. Now Guile primitives are defined using the SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  5660. macros and must contain a docstring that is extracted into foo.doc using a new
  5661. guile-doc-snarf script (that uses guile-doc-snarf.awk).
  5662. However, a major overhaul of these macros is scheduled for the next release of
  5663. guile.
  5664. ** Guile primitives use a new technique for validation of arguments
  5665. SCM_VALIDATE_* macros are defined to ease the redundancy and improve
  5666. the readability of argument checking.
  5667. ** All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
  5668. ** New macros: SCM_PACK, SCM_UNPACK
  5669. Compose/decompose an SCM value.
  5670. The SCM type is now treated as an abstract data type and may be defined as a
  5671. long, a void* or as a struct, depending on the architecture and compile time
  5672. options. This makes it easier to find several types of bugs, for example when
  5673. SCM values are treated as integers without conversion. Values of the SCM type
  5674. should be treated as "atomic" values. These macros are used when
  5675. composing/decomposing an SCM value, either because you want to access
  5676. individual bits, or because you want to treat it as an integer value.
  5677. E.g., in order to set bit 7 in an SCM value x, use the expression
  5678. SCM_PACK (SCM_UNPACK (x) | 0x80)
  5679. ** The name property of hooks is deprecated.
  5680. Thus, the use of SCM_HOOK_NAME and scm_make_hook_with_name is deprecated.
  5681. You can emulate this feature by using object properties.
  5682. ** Deprecated macros: SCM_INPORTP, SCM_OUTPORTP, SCM_CRDY, SCM_ICHRP,
  5683. SCM_ICHR, SCM_MAKICHR, SCM_SETJMPBUF, SCM_NSTRINGP, SCM_NRWSTRINGP,
  5684. SCM_NVECTORP
  5685. These macros will be removed in a future release of Guile.
  5686. ** The following types, functions and macros from numbers.h are deprecated:
  5687. scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL,
  5688. SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG
  5689. ** Port internals: the rw_random variable in the scm_port structure
  5690. must be set to non-zero in any random access port. In recent Guile
  5691. releases it was only set for bidirectional random-access ports.
  5692. ** Port internals: the seek ptob procedure is now responsible for
  5693. resetting the buffers if required. The change was made so that in the
  5694. special case of reading the current position (i.e., seek p 0 SEEK_CUR)
  5695. the fport and strport ptobs can avoid resetting the buffers,
  5696. in particular to avoid discarding unread chars. An existing port
  5697. type can be fixed by adding something like the following to the
  5698. beginning of the ptob seek procedure:
  5699. if (pt->rw_active == SCM_PORT_READ)
  5700. scm_end_input (object);
  5701. else if (pt->rw_active == SCM_PORT_WRITE)
  5702. ptob->flush (object);
  5703. although to actually avoid resetting the buffers and discard unread
  5704. chars requires further hacking that depends on the characteristics
  5705. of the ptob.
  5706. ** Deprecated functions: scm_fseek, scm_tag
  5707. These functions are no longer used and will be removed in a future version.
  5708. ** The scm_sysmissing procedure is no longer used in libguile.
  5709. Unless it turns out to be unexpectedly useful to somebody, it will be
  5710. removed in a future version.
  5711. ** The format of error message strings has changed
  5712. The two C procedures: scm_display_error and scm_error, as well as the
  5713. primitive `scm-error', now use scm_simple_format to do their work.
  5714. This means that the message strings of all code must be updated to use
  5715. ~A where %s was used before, and ~S where %S was used before.
  5716. During the period when there still are a lot of old Guiles out there,
  5717. you might want to support both old and new versions of Guile.
  5718. There are basically two methods to achieve this. Both methods use
  5719. autoconf. Put
  5720. AC_CHECK_FUNCS(scm_simple_format)
  5721. in your configure.in.
  5722. Method 1: Use the string concatenation features of ANSI C's
  5723. preprocessor.
  5724. In C:
  5725. #ifdef HAVE_SCM_SIMPLE_FORMAT
  5726. #define FMT_S "~S"
  5727. #else
  5728. #define FMT_S "%S"
  5729. #endif
  5730. Then represent each of your error messages using a preprocessor macro:
  5731. #define E_SPIDER_ERROR "There's a spider in your " ## FMT_S ## "!!!"
  5732. In Scheme:
  5733. (define fmt-s (if (defined? 'simple-format) "~S" "%S"))
  5734. (define make-message string-append)
  5735. (define e-spider-error (make-message "There's a spider in your " fmt-s "!!!"))
  5736. Method 2: Use the oldfmt function found in doc/oldfmt.c.
  5737. In C:
  5738. scm_misc_error ("picnic", scm_c_oldfmt0 ("There's a spider in your ~S!!!"),
  5739. ...);
  5740. In Scheme:
  5741. (scm-error 'misc-error "picnic" (oldfmt "There's a spider in your ~S!!!")
  5742. ...)
  5743. ** Deprecated: coop_mutex_init, coop_condition_variable_init
  5744. Don't use the functions coop_mutex_init and
  5745. coop_condition_variable_init. They will change.
  5746. Use scm_mutex_init and scm_cond_init instead.
  5747. ** New function: int scm_cond_timedwait (scm_cond_t *COND, scm_mutex_t *MUTEX, const struct timespec *ABSTIME)
  5748. `scm_cond_timedwait' atomically unlocks MUTEX and waits on
  5749. COND, as `scm_cond_wait' does, but it also bounds the duration
  5750. of the wait. If COND has not been signaled before time ABSTIME,
  5751. the mutex MUTEX is re-acquired and `scm_cond_timedwait'
  5752. returns the error code `ETIMEDOUT'.
  5753. The ABSTIME parameter specifies an absolute time, with the same
  5754. origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds
  5755. to 00:00:00 GMT, January 1, 1970.
  5756. ** New function: scm_cond_broadcast (scm_cond_t *COND)
  5757. `scm_cond_broadcast' restarts all the threads that are waiting
  5758. on the condition variable COND. Nothing happens if no threads are
  5759. waiting on COND.
  5760. ** New function: scm_key_create (scm_key_t *KEY, void (*destr_function) (void *))
  5761. `scm_key_create' allocates a new TSD key. The key is stored in
  5762. the location pointed to by KEY. There is no limit on the number
  5763. of keys allocated at a given time. The value initially associated
  5764. with the returned key is `NULL' in all currently executing threads.
  5765. The DESTR_FUNCTION argument, if not `NULL', specifies a destructor
  5766. function associated with the key. When a thread terminates,
  5767. DESTR_FUNCTION is called on the value associated with the key in
  5768. that thread. The DESTR_FUNCTION is not called if a key is deleted
  5769. with `scm_key_delete' or a value is changed with
  5770. `scm_setspecific'. The order in which destructor functions are
  5771. called at thread termination time is unspecified.
  5772. Destructors are not yet implemented.
  5773. ** New function: scm_setspecific (scm_key_t KEY, const void *POINTER)
  5774. `scm_setspecific' changes the value associated with KEY in the
  5775. calling thread, storing the given POINTER instead.
  5776. ** New function: scm_getspecific (scm_key_t KEY)
  5777. `scm_getspecific' returns the value currently associated with
  5778. KEY in the calling thread.
  5779. ** New function: scm_key_delete (scm_key_t KEY)
  5780. `scm_key_delete' deallocates a TSD key. It does not check
  5781. whether non-`NULL' values are associated with that key in the
  5782. currently executing threads, nor call the destructor function
  5783. associated with the key.
  5784. ** New function: scm_c_hook_init (scm_c_hook_t *HOOK, void *HOOK_DATA, scm_c_hook_type_t TYPE)
  5785. Initialize a C level hook HOOK with associated HOOK_DATA and type
  5786. TYPE. (See scm_c_hook_run ().)
  5787. ** New function: scm_c_hook_add (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA, int APPENDP)
  5788. Add hook function FUNC with associated FUNC_DATA to HOOK. If APPENDP
  5789. is true, add it last, otherwise first. The same FUNC can be added
  5790. multiple times if FUNC_DATA differ and vice versa.
  5791. ** New function: scm_c_hook_remove (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA)
  5792. Remove hook function FUNC with associated FUNC_DATA from HOOK. A
  5793. function is only removed if both FUNC and FUNC_DATA matches.
  5794. ** New function: void *scm_c_hook_run (scm_c_hook_t *HOOK, void *DATA)
  5795. Run hook HOOK passing DATA to the hook functions.
  5796. If TYPE is SCM_C_HOOK_NORMAL, all hook functions are run. The value
  5797. returned is undefined.
  5798. If TYPE is SCM_C_HOOK_OR, hook functions are run until a function
  5799. returns a non-NULL value. This value is returned as the result of
  5800. scm_c_hook_run. If all functions return NULL, NULL is returned.
  5801. If TYPE is SCM_C_HOOK_AND, hook functions are run until a function
  5802. returns a NULL value, and NULL is returned. If all functions returns
  5803. a non-NULL value, the last value is returned.
  5804. ** New C level GC hooks
  5805. Five new C level hooks has been added to the garbage collector.
  5806. scm_before_gc_c_hook
  5807. scm_after_gc_c_hook
  5808. are run before locking and after unlocking the heap. The system is
  5809. thus in a mode where evaluation can take place. (Except that
  5810. scm_before_gc_c_hook must not allocate new cells.)
  5811. scm_before_mark_c_hook
  5812. scm_before_sweep_c_hook
  5813. scm_after_sweep_c_hook
  5814. are run when the heap is locked. These are intended for extension of
  5815. the GC in a modular fashion. Examples are the weaks and guardians
  5816. modules.
  5817. ** Way for application to customize GC parameters
  5818. The application can set up other default values for the GC heap
  5819. allocation parameters
  5820. GUILE_INIT_HEAP_SIZE_1, GUILE_MIN_YIELD_1,
  5821. GUILE_INIT_HEAP_SIZE_2, GUILE_MIN_YIELD_2,
  5822. GUILE_MAX_SEGMENT_SIZE,
  5823. by setting
  5824. scm_default_init_heap_size_1, scm_default_min_yield_1,
  5825. scm_default_init_heap_size_2, scm_default_min_yield_2,
  5826. scm_default_max_segment_size
  5827. respectively before callong scm_boot_guile.
  5828. (See entry "New environment variables ..." in section
  5829. "Changes to the stand-alone interpreter" above.)
  5830. ** scm_protect_object/scm_unprotect_object now nest
  5831. This means that you can call scm_protect_object multiple times on an
  5832. object and count on the object being protected until
  5833. scm_unprotect_object has been call the same number of times.
  5834. The functions also have better time complexity.
  5835. Still, it is usually possible to structure the application in a way
  5836. that you don't need to use these functions. For example, if you use a
  5837. protected standard Guile list to keep track of live objects rather
  5838. than some custom data type, objects will die a natural death when they
  5839. are no longer needed.
  5840. ** Deprecated type tags: scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc
  5841. Guile does not provide the float representation for inexact real numbers any
  5842. more. Now, only doubles are used to represent inexact real numbers. Further,
  5843. the tag names scm_tc_dblr and scm_tc_dblc have been changed to scm_tc16_real
  5844. and scm_tc16_complex, respectively.
  5845. ** Removed deprecated type scm_smobfuns
  5846. ** Removed deprecated function scm_newsmob
  5847. ** Warning: scm_make_smob_type_mfpe might become deprecated in a future release
  5848. There is an ongoing discussion among the developers whether to
  5849. deprecate `scm_make_smob_type_mfpe' or not. Please use the current
  5850. standard interface (scm_make_smob_type, scm_set_smob_XXX) in new code
  5851. until this issue has been settled.
  5852. ** Removed deprecated type tag scm_tc16_kw
  5853. ** Added type tag scm_tc16_keyword
  5854. (This was introduced already in release 1.3.4 but was not documented
  5855. until now.)
  5856. ** gdb_print now prints "*** Guile not initialized ***" until Guile initialized
  5857. * Changes to system call interfaces:
  5858. ** The "select" procedure now tests port buffers for the ability to
  5859. provide input or accept output. Previously only the underlying file
  5860. descriptors were checked.
  5861. ** New variable PIPE_BUF: the maximum number of bytes that can be
  5862. atomically written to a pipe.
  5863. ** If a facility is not available on the system when Guile is
  5864. compiled, the corresponding primitive procedure will not be defined.
  5865. Previously it would have been defined but would throw a system-error
  5866. exception if called. Exception handlers which catch this case may
  5867. need minor modification: an error will be thrown with key
  5868. 'unbound-variable instead of 'system-error. Alternatively it's
  5869. now possible to use `defined?' to check whether the facility is
  5870. available.
  5871. ** Procedures which depend on the timezone should now give the correct
  5872. result on systems which cache the TZ environment variable, even if TZ
  5873. is changed without calling tzset.
  5874. * Changes to the networking interfaces:
  5875. ** New functions: htons, ntohs, htonl, ntohl: for converting short and
  5876. long integers between network and host format. For now, it's not
  5877. particularly convenient to do this kind of thing, but consider:
  5878. (define write-network-long
  5879. (lambda (value port)
  5880. (let ((v (make-uniform-vector 1 1 0)))
  5881. (uniform-vector-set! v 0 (htonl value))
  5882. (uniform-vector-write v port))))
  5883. (define read-network-long
  5884. (lambda (port)
  5885. (let ((v (make-uniform-vector 1 1 0)))
  5886. (uniform-vector-read! v port)
  5887. (ntohl (uniform-vector-ref v 0)))))
  5888. ** If inet-aton fails, it now throws an error with key 'misc-error
  5889. instead of 'system-error, since errno is not relevant.
  5890. ** Certain gethostbyname/gethostbyaddr failures now throw errors with
  5891. specific keys instead of 'system-error. The latter is inappropriate
  5892. since errno will not have been set. The keys are:
  5893. 'host-not-found, 'try-again, 'no-recovery and 'no-data.
  5894. ** sethostent, setnetent, setprotoent, setservent: now take an
  5895. optional argument STAYOPEN, which specifies whether the database
  5896. remains open after a database entry is accessed randomly (e.g., using
  5897. gethostbyname for the hosts database.) The default is #f. Previously
  5898. #t was always used.
  5899. Changes since Guile 1.3.2:
  5900. * Changes to the stand-alone interpreter
  5901. ** Debugger
  5902. An initial version of the Guile debugger written by Chris Hanson has
  5903. been added. The debugger is still under development but is included
  5904. in the distribution anyway since it is already quite useful.
  5905. Type
  5906. (debug)
  5907. after an error to enter the debugger. Type `help' inside the debugger
  5908. for a description of available commands.
  5909. If you prefer to have stack frames numbered and printed in
  5910. anti-chronological order and prefer up in the stack to be down on the
  5911. screen as is the case in gdb, you can put
  5912. (debug-enable 'backwards)
  5913. in your .guile startup file. (However, this means that Guile can't
  5914. use indentation to indicate stack level.)
  5915. The debugger is autoloaded into Guile at the first use.
  5916. ** Further enhancements to backtraces
  5917. There is a new debug option `width' which controls the maximum width
  5918. on the screen of printed stack frames. Fancy printing parameters
  5919. ("level" and "length" as in Common LISP) are adaptively adjusted for
  5920. each stack frame to give maximum information while still fitting
  5921. within the bounds. If the stack frame can't be made to fit by
  5922. adjusting parameters, it is simply cut off at the end. This is marked
  5923. with a `$'.
  5924. ** Some modules are now only loaded when the repl is started
  5925. The modules (ice-9 debug), (ice-9 session), (ice-9 threads) and (ice-9
  5926. regex) are now loaded into (guile-user) only if the repl has been
  5927. started. The effect is that the startup time for scripts has been
  5928. reduced to 30% of what it was previously.
  5929. Correctly written scripts load the modules they require at the top of
  5930. the file and should not be affected by this change.
  5931. ** Hooks are now represented as smobs
  5932. * Changes to Scheme functions and syntax
  5933. ** Readline support has changed again.
  5934. The old (readline-activator) module is gone. Use (ice-9 readline)
  5935. instead, which now contains all readline functionality. So the code
  5936. to activate readline is now
  5937. (use-modules (ice-9 readline))
  5938. (activate-readline)
  5939. This should work at any time, including from the guile prompt.
  5940. To avoid confusion about the terms of Guile's license, please only
  5941. enable readline for your personal use; please don't make it the
  5942. default for others. Here is why we make this rather odd-sounding
  5943. request:
  5944. Guile is normally licensed under a weakened form of the GNU General
  5945. Public License, which allows you to link code with Guile without
  5946. placing that code under the GPL. This exception is important to some
  5947. people.
  5948. However, since readline is distributed under the GNU General Public
  5949. License, when you link Guile with readline, either statically or
  5950. dynamically, you effectively change Guile's license to the strict GPL.
  5951. Whenever you link any strictly GPL'd code into Guile, uses of Guile
  5952. which are normally permitted become forbidden. This is a rather
  5953. non-obvious consequence of the licensing terms.
  5954. So, to make sure things remain clear, please let people choose for
  5955. themselves whether to link GPL'd libraries like readline with Guile.
  5956. ** regexp-substitute/global has changed slightly, but incompatibly.
  5957. If you include a function in the item list, the string of the match
  5958. object it receives is the same string passed to
  5959. regexp-substitute/global, not some suffix of that string.
  5960. Correspondingly, the match's positions are relative to the entire
  5961. string, not the suffix.
  5962. If the regexp can match the empty string, the way matches are chosen
  5963. from the string has changed. regexp-substitute/global recognizes the
  5964. same set of matches that list-matches does; see below.
  5965. ** New function: list-matches REGEXP STRING [FLAGS]
  5966. Return a list of match objects, one for every non-overlapping, maximal
  5967. match of REGEXP in STRING. The matches appear in left-to-right order.
  5968. list-matches only reports matches of the empty string if there are no
  5969. other matches which begin on, end at, or include the empty match's
  5970. position.
  5971. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  5972. ** New function: fold-matches REGEXP STRING INIT PROC [FLAGS]
  5973. For each match of REGEXP in STRING, apply PROC to the match object,
  5974. and the last value PROC returned, or INIT for the first call. Return
  5975. the last value returned by PROC. We apply PROC to the matches as they
  5976. appear from left to right.
  5977. This function recognizes matches according to the same criteria as
  5978. list-matches.
  5979. Thus, you could define list-matches like this:
  5980. (define (list-matches regexp string . flags)
  5981. (reverse! (apply fold-matches regexp string '() cons flags)))
  5982. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  5983. ** Hooks
  5984. *** New function: hook? OBJ
  5985. Return #t if OBJ is a hook, otherwise #f.
  5986. *** New function: make-hook-with-name NAME [ARITY]
  5987. Return a hook with name NAME and arity ARITY. The default value for
  5988. ARITY is 0. The only effect of NAME is that it will appear when the
  5989. hook object is printed to ease debugging.
  5990. *** New function: hook-empty? HOOK
  5991. Return #t if HOOK doesn't contain any procedures, otherwise #f.
  5992. *** New function: hook->list HOOK
  5993. Return a list of the procedures that are called when run-hook is
  5994. applied to HOOK.
  5995. ** `map' signals an error if its argument lists are not all the same length.
  5996. This is the behavior required by R5RS, so this change is really a bug
  5997. fix. But it seems to affect a lot of people's code, so we're
  5998. mentioning it here anyway.
  5999. ** Print-state handling has been made more transparent
  6000. Under certain circumstances, ports are represented as a port with an
  6001. associated print state. Earlier, this pair was represented as a pair
  6002. (see "Some magic has been added to the printer" below). It is now
  6003. indistinguishable (almost; see `get-print-state') from a port on the
  6004. user level.
  6005. *** New function: port-with-print-state OUTPUT-PORT PRINT-STATE
  6006. Return a new port with the associated print state PRINT-STATE.
  6007. *** New function: get-print-state OUTPUT-PORT
  6008. Return the print state associated with this port if it exists,
  6009. otherwise return #f.
  6010. *** New function: directory-stream? OBJECT
  6011. Returns true iff OBJECT is a directory stream --- the sort of object
  6012. returned by `opendir'.
  6013. ** New function: using-readline?
  6014. Return #t if readline is in use in the current repl.
  6015. ** structs will be removed in 1.4
  6016. Structs will be replaced in Guile 1.4. We will merge GOOPS into Guile
  6017. and use GOOPS objects as the fundamental record type.
  6018. * Changes to the scm_ interface
  6019. ** structs will be removed in 1.4
  6020. The entire current struct interface (struct.c, struct.h) will be
  6021. replaced in Guile 1.4. We will merge GOOPS into libguile and use
  6022. GOOPS objects as the fundamental record type.
  6023. ** The internal representation of subr's has changed
  6024. Instead of giving a hint to the subr name, the CAR field of the subr
  6025. now contains an index to a subr entry in scm_subr_table.
  6026. *** New variable: scm_subr_table
  6027. An array of subr entries. A subr entry contains the name, properties
  6028. and documentation associated with the subr. The properties and
  6029. documentation slots are not yet used.
  6030. ** A new scheme for "forwarding" calls to a builtin to a generic function
  6031. It is now possible to extend the functionality of some Guile
  6032. primitives by letting them defer a call to a GOOPS generic function on
  6033. argument mismatch. This means that there is no loss of efficiency in
  6034. normal evaluation.
  6035. Example:
  6036. (use-modules (oop goops)) ; Must be GOOPS version 0.2.
  6037. (define-method + ((x <string>) (y <string>))
  6038. (string-append x y))
  6039. + will still be as efficient as usual in numerical calculations, but
  6040. can also be used for concatenating strings.
  6041. Who will be the first one to extend Guile's numerical tower to
  6042. rationals? :) [OK, there a few other things to fix before this can
  6043. be made in a clean way.]
  6044. *** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
  6045. New macro: SCM_GPROC (CNAME, SNAME, REQ, OPT, VAR, CFUNC, GENERIC)
  6046. New macro: SCM_GPROC1 (CNAME, SNAME, TYPE, CFUNC, GENERIC)
  6047. These do the same job as SCM_PROC and SCM_PROC1, but they also define
  6048. a variable GENERIC which can be used by the dispatch macros below.
  6049. [This is experimental code which may change soon.]
  6050. *** New macros for forwarding control to a generic on arg type error
  6051. New macro: SCM_WTA_DISPATCH_1 (GENERIC, ARG1, POS, SUBR)
  6052. New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
  6053. These correspond to the scm_wta function call, and have the same
  6054. behaviour until the user has called the GOOPS primitive
  6055. `enable-primitive-generic!'. After that, these macros will apply the
  6056. generic function GENERIC to the argument(s) instead of calling
  6057. scm_wta.
  6058. [This is experimental code which may change soon.]
  6059. *** New macros for argument testing with generic dispatch
  6060. New macro: SCM_GASSERT1 (COND, GENERIC, ARG1, POS, SUBR)
  6061. New macro: SCM_GASSERT2 (COND, GENERIC, ARG1, ARG2, POS, SUBR)
  6062. These correspond to the SCM_ASSERT macro, but will defer control to
  6063. GENERIC on error after `enable-primitive-generic!' has been called.
  6064. [This is experimental code which may change soon.]
  6065. ** New function: SCM scm_eval_body (SCM body, SCM env)
  6066. Evaluates the body of a special form.
  6067. ** The internal representation of struct's has changed
  6068. Previously, four slots were allocated for the procedure(s) of entities
  6069. and operators. The motivation for this representation had to do with
  6070. the structure of the evaluator, the wish to support tail-recursive
  6071. generic functions, and efficiency. Since the generic function
  6072. dispatch mechanism has changed, there is no longer a need for such an
  6073. expensive representation, and the representation has been simplified.
  6074. This should not make any difference for most users.
  6075. ** GOOPS support has been cleaned up.
  6076. Some code has been moved from eval.c to objects.c and code in both of
  6077. these compilation units has been cleaned up and better structured.
  6078. *** New functions for applying generic functions
  6079. New function: SCM scm_apply_generic (GENERIC, ARGS)
  6080. New function: SCM scm_call_generic_0 (GENERIC)
  6081. New function: SCM scm_call_generic_1 (GENERIC, ARG1)
  6082. New function: SCM scm_call_generic_2 (GENERIC, ARG1, ARG2)
  6083. New function: SCM scm_call_generic_3 (GENERIC, ARG1, ARG2, ARG3)
  6084. ** Deprecated function: scm_make_named_hook
  6085. It is now replaced by:
  6086. ** New function: SCM scm_create_hook (const char *name, int arity)
  6087. Creates a hook in the same way as make-hook above but also
  6088. binds a variable named NAME to it.
  6089. This is the typical way of creating a hook from C code.
  6090. Currently, the variable is created in the "current" module.
  6091. This might change when we get the new module system.
  6092. [The behaviour is identical to scm_make_named_hook.]
  6093. Changes since Guile 1.3:
  6094. * Changes to mailing lists
  6095. ** Some of the Guile mailing lists have moved to sourceware.cygnus.com.
  6096. See the README file to find current addresses for all the Guile
  6097. mailing lists.
  6098. * Changes to the distribution
  6099. ** Readline support is no longer included with Guile by default.
  6100. Based on the different license terms of Guile and Readline, we
  6101. concluded that Guile should not *by default* cause the linking of
  6102. Readline into an application program. Readline support is now offered
  6103. as a separate module, which is linked into an application only when
  6104. you explicitly specify it.
  6105. Although Guile is GNU software, its distribution terms add a special
  6106. exception to the usual GNU General Public License (GPL). Guile's
  6107. license includes a clause that allows you to link Guile with non-free
  6108. programs. We add this exception so as not to put Guile at a
  6109. disadvantage vis-a-vis other extensibility packages that support other
  6110. languages.
  6111. In contrast, the GNU Readline library is distributed under the GNU
  6112. General Public License pure and simple. This means that you may not
  6113. link Readline, even dynamically, into an application unless it is
  6114. distributed under a free software license that is compatible the GPL.
  6115. Because of this difference in distribution terms, an application that
  6116. can use Guile may not be able to use Readline. Now users will be
  6117. explicitly offered two independent decisions about the use of these
  6118. two packages.
  6119. You can activate the readline support by issuing
  6120. (use-modules (readline-activator))
  6121. (activate-readline)
  6122. from your ".guile" file, for example.
  6123. * Changes to the stand-alone interpreter
  6124. ** All builtins now print as primitives.
  6125. Previously builtin procedures not belonging to the fundamental subr
  6126. types printed as #<compiled closure #<primitive-procedure gsubr-apply>>.
  6127. Now, they print as #<primitive-procedure NAME>.
  6128. ** Backtraces slightly more intelligible.
  6129. gsubr-apply and macro transformer application frames no longer appear
  6130. in backtraces.
  6131. * Changes to Scheme functions and syntax
  6132. ** Guile now correctly handles internal defines by rewriting them into
  6133. their equivalent letrec. Previously, internal defines would
  6134. incrementally add to the innermost environment, without checking
  6135. whether the restrictions specified in RnRS were met. This lead to the
  6136. correct behaviour when these restriction actually were met, but didn't
  6137. catch all illegal uses. Such an illegal use could lead to crashes of
  6138. the Guile interpreter or other unwanted results. An example of
  6139. incorrect internal defines that made Guile behave erratically:
  6140. (let ()
  6141. (define a 1)
  6142. (define (b) a)
  6143. (define c (1+ (b)))
  6144. (define d 3)
  6145. (b))
  6146. => 2
  6147. The problem with this example is that the definition of `c' uses the
  6148. value of `b' directly. This confuses the meoization machine of Guile
  6149. so that the second call of `b' (this time in a larger environment that
  6150. also contains bindings for `c' and `d') refers to the binding of `c'
  6151. instead of `a'. You could also make Guile crash with a variation on
  6152. this theme:
  6153. (define (foo flag)
  6154. (define a 1)
  6155. (define (b flag) (if flag a 1))
  6156. (define c (1+ (b flag)))
  6157. (define d 3)
  6158. (b #t))
  6159. (foo #f)
  6160. (foo #t)
  6161. From now on, Guile will issue an `Unbound variable: b' error message
  6162. for both examples.
  6163. ** Hooks
  6164. A hook contains a list of functions which should be called on
  6165. particular occasions in an existing program. Hooks are used for
  6166. customization.
  6167. A window manager might have a hook before-window-map-hook. The window
  6168. manager uses the function run-hooks to call all functions stored in
  6169. before-window-map-hook each time a window is mapped. The user can
  6170. store functions in the hook using add-hook!.
  6171. In Guile, hooks are first class objects.
  6172. *** New function: make-hook [N_ARGS]
  6173. Return a hook for hook functions which can take N_ARGS arguments.
  6174. The default value for N_ARGS is 0.
  6175. (See also scm_make_named_hook below.)
  6176. *** New function: add-hook! HOOK PROC [APPEND_P]
  6177. Put PROC at the beginning of the list of functions stored in HOOK.
  6178. If APPEND_P is supplied, and non-false, put PROC at the end instead.
  6179. PROC must be able to take the number of arguments specified when the
  6180. hook was created.
  6181. If PROC already exists in HOOK, then remove it first.
  6182. *** New function: remove-hook! HOOK PROC
  6183. Remove PROC from the list of functions in HOOK.
  6184. *** New function: reset-hook! HOOK
  6185. Clear the list of hook functions stored in HOOK.
  6186. *** New function: run-hook HOOK ARG1 ...
  6187. Run all hook functions stored in HOOK with arguments ARG1 ... .
  6188. The number of arguments supplied must correspond to the number given
  6189. when the hook was created.
  6190. ** The function `dynamic-link' now takes optional keyword arguments.
  6191. The only keyword argument that is currently defined is `:global
  6192. BOOL'. With it, you can control whether the shared library will be
  6193. linked in global mode or not. In global mode, the symbols from the
  6194. linked library can be used to resolve references from other
  6195. dynamically linked libraries. In non-global mode, the linked
  6196. library is essentially invisible and can only be accessed via
  6197. `dynamic-func', etc. The default is now to link in global mode.
  6198. Previously, the default has been non-global mode.
  6199. The `#:global' keyword is only effective on platforms that support
  6200. the dlopen family of functions.
  6201. ** New function `provided?'
  6202. - Function: provided? FEATURE
  6203. Return true iff FEATURE is supported by this installation of
  6204. Guile. FEATURE must be a symbol naming a feature; the global
  6205. variable `*features*' is a list of available features.
  6206. ** Changes to the module (ice-9 expect):
  6207. *** The expect-strings macro now matches `$' in a regular expression
  6208. only at a line-break or end-of-file by default. Previously it would
  6209. match the end of the string accumulated so far. The old behaviour
  6210. can be obtained by setting the variable `expect-strings-exec-flags'
  6211. to 0.
  6212. *** The expect-strings macro now uses a variable `expect-strings-exec-flags'
  6213. for the regexp-exec flags. If `regexp/noteol' is included, then `$'
  6214. in a regular expression will still match before a line-break or
  6215. end-of-file. The default is `regexp/noteol'.
  6216. *** The expect-strings macro now uses a variable
  6217. `expect-strings-compile-flags' for the flags to be supplied to
  6218. `make-regexp'. The default is `regexp/newline', which was previously
  6219. hard-coded.
  6220. *** The expect macro now supplies two arguments to a match procedure:
  6221. the current accumulated string and a flag to indicate whether
  6222. end-of-file has been reached. Previously only the string was supplied.
  6223. If end-of-file is reached, the match procedure will be called an
  6224. additional time with the same accumulated string as the previous call
  6225. but with the flag set.
  6226. ** New module (ice-9 format), implementing the Common Lisp `format' function.
  6227. This code, and the documentation for it that appears here, was
  6228. borrowed from SLIB, with minor adaptations for Guile.
  6229. - Function: format DESTINATION FORMAT-STRING . ARGUMENTS
  6230. An almost complete implementation of Common LISP format description
  6231. according to the CL reference book `Common LISP' from Guy L.
  6232. Steele, Digital Press. Backward compatible to most of the
  6233. available Scheme format implementations.
  6234. Returns `#t', `#f' or a string; has side effect of printing
  6235. according to FORMAT-STRING. If DESTINATION is `#t', the output is
  6236. to the current output port and `#t' is returned. If DESTINATION
  6237. is `#f', a formatted string is returned as the result of the call.
  6238. NEW: If DESTINATION is a string, DESTINATION is regarded as the
  6239. format string; FORMAT-STRING is then the first argument and the
  6240. output is returned as a string. If DESTINATION is a number, the
  6241. output is to the current error port if available by the
  6242. implementation. Otherwise DESTINATION must be an output port and
  6243. `#t' is returned.
  6244. FORMAT-STRING must be a string. In case of a formatting error
  6245. format returns `#f' and prints a message on the current output or
  6246. error port. Characters are output as if the string were output by
  6247. the `display' function with the exception of those prefixed by a
  6248. tilde (~). For a detailed description of the FORMAT-STRING syntax
  6249. please consult a Common LISP format reference manual. For a test
  6250. suite to verify this format implementation load `formatst.scm'.
  6251. Please send bug reports to `lutzeb@cs.tu-berlin.de'.
  6252. Note: `format' is not reentrant, i.e. only one `format'-call may
  6253. be executed at a time.
  6254. *** Format Specification (Format version 3.0)
  6255. Please consult a Common LISP format reference manual for a detailed
  6256. description of the format string syntax. For a demonstration of the
  6257. implemented directives see `formatst.scm'.
  6258. This implementation supports directive parameters and modifiers (`:'
  6259. and `@' characters). Multiple parameters must be separated by a comma
  6260. (`,'). Parameters can be numerical parameters (positive or negative),
  6261. character parameters (prefixed by a quote character (`''), variable
  6262. parameters (`v'), number of rest arguments parameter (`#'), empty and
  6263. default parameters. Directive characters are case independent. The
  6264. general form of a directive is:
  6265. DIRECTIVE ::= ~{DIRECTIVE-PARAMETER,}[:][@]DIRECTIVE-CHARACTER
  6266. DIRECTIVE-PARAMETER ::= [ [-|+]{0-9}+ | 'CHARACTER | v | # ]
  6267. *** Implemented CL Format Control Directives
  6268. Documentation syntax: Uppercase characters represent the
  6269. corresponding control directive characters. Lowercase characters
  6270. represent control directive parameter descriptions.
  6271. `~A'
  6272. Any (print as `display' does).
  6273. `~@A'
  6274. left pad.
  6275. `~MINCOL,COLINC,MINPAD,PADCHARA'
  6276. full padding.
  6277. `~S'
  6278. S-expression (print as `write' does).
  6279. `~@S'
  6280. left pad.
  6281. `~MINCOL,COLINC,MINPAD,PADCHARS'
  6282. full padding.
  6283. `~D'
  6284. Decimal.
  6285. `~@D'
  6286. print number sign always.
  6287. `~:D'
  6288. print comma separated.
  6289. `~MINCOL,PADCHAR,COMMACHARD'
  6290. padding.
  6291. `~X'
  6292. Hexadecimal.
  6293. `~@X'
  6294. print number sign always.
  6295. `~:X'
  6296. print comma separated.
  6297. `~MINCOL,PADCHAR,COMMACHARX'
  6298. padding.
  6299. `~O'
  6300. Octal.
  6301. `~@O'
  6302. print number sign always.
  6303. `~:O'
  6304. print comma separated.
  6305. `~MINCOL,PADCHAR,COMMACHARO'
  6306. padding.
  6307. `~B'
  6308. Binary.
  6309. `~@B'
  6310. print number sign always.
  6311. `~:B'
  6312. print comma separated.
  6313. `~MINCOL,PADCHAR,COMMACHARB'
  6314. padding.
  6315. `~NR'
  6316. Radix N.
  6317. `~N,MINCOL,PADCHAR,COMMACHARR'
  6318. padding.
  6319. `~@R'
  6320. print a number as a Roman numeral.
  6321. `~:@R'
  6322. print a number as an "old fashioned" Roman numeral.
  6323. `~:R'
  6324. print a number as an ordinal English number.
  6325. `~:@R'
  6326. print a number as a cardinal English number.
  6327. `~P'
  6328. Plural.
  6329. `~@P'
  6330. prints `y' and `ies'.
  6331. `~:P'
  6332. as `~P but jumps 1 argument backward.'
  6333. `~:@P'
  6334. as `~@P but jumps 1 argument backward.'
  6335. `~C'
  6336. Character.
  6337. `~@C'
  6338. prints a character as the reader can understand it (i.e. `#\'
  6339. prefixing).
  6340. `~:C'
  6341. prints a character as emacs does (eg. `^C' for ASCII 03).
  6342. `~F'
  6343. Fixed-format floating-point (prints a flonum like MMM.NNN).
  6344. `~WIDTH,DIGITS,SCALE,OVERFLOWCHAR,PADCHARF'
  6345. `~@F'
  6346. If the number is positive a plus sign is printed.
  6347. `~E'
  6348. Exponential floating-point (prints a flonum like MMM.NNN`E'EE).
  6349. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARE'
  6350. `~@E'
  6351. If the number is positive a plus sign is printed.
  6352. `~G'
  6353. General floating-point (prints a flonum either fixed or
  6354. exponential).
  6355. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARG'
  6356. `~@G'
  6357. If the number is positive a plus sign is printed.
  6358. `~$'
  6359. Dollars floating-point (prints a flonum in fixed with signs
  6360. separated).
  6361. `~DIGITS,SCALE,WIDTH,PADCHAR$'
  6362. `~@$'
  6363. If the number is positive a plus sign is printed.
  6364. `~:@$'
  6365. A sign is always printed and appears before the padding.
  6366. `~:$'
  6367. The sign appears before the padding.
  6368. `~%'
  6369. Newline.
  6370. `~N%'
  6371. print N newlines.
  6372. `~&'
  6373. print newline if not at the beginning of the output line.
  6374. `~N&'
  6375. prints `~&' and then N-1 newlines.
  6376. `~|'
  6377. Page Separator.
  6378. `~N|'
  6379. print N page separators.
  6380. `~~'
  6381. Tilde.
  6382. `~N~'
  6383. print N tildes.
  6384. `~'<newline>
  6385. Continuation Line.
  6386. `~:'<newline>
  6387. newline is ignored, white space left.
  6388. `~@'<newline>
  6389. newline is left, white space ignored.
  6390. `~T'
  6391. Tabulation.
  6392. `~@T'
  6393. relative tabulation.
  6394. `~COLNUM,COLINCT'
  6395. full tabulation.
  6396. `~?'
  6397. Indirection (expects indirect arguments as a list).
  6398. `~@?'
  6399. extracts indirect arguments from format arguments.
  6400. `~(STR~)'
  6401. Case conversion (converts by `string-downcase').
  6402. `~:(STR~)'
  6403. converts by `string-capitalize'.
  6404. `~@(STR~)'
  6405. converts by `string-capitalize-first'.
  6406. `~:@(STR~)'
  6407. converts by `string-upcase'.
  6408. `~*'
  6409. Argument Jumping (jumps 1 argument forward).
  6410. `~N*'
  6411. jumps N arguments forward.
  6412. `~:*'
  6413. jumps 1 argument backward.
  6414. `~N:*'
  6415. jumps N arguments backward.
  6416. `~@*'
  6417. jumps to the 0th argument.
  6418. `~N@*'
  6419. jumps to the Nth argument (beginning from 0)
  6420. `~[STR0~;STR1~;...~;STRN~]'
  6421. Conditional Expression (numerical clause conditional).
  6422. `~N['
  6423. take argument from N.
  6424. `~@['
  6425. true test conditional.
  6426. `~:['
  6427. if-else-then conditional.
  6428. `~;'
  6429. clause separator.
  6430. `~:;'
  6431. default clause follows.
  6432. `~{STR~}'
  6433. Iteration (args come from the next argument (a list)).
  6434. `~N{'
  6435. at most N iterations.
  6436. `~:{'
  6437. args from next arg (a list of lists).
  6438. `~@{'
  6439. args from the rest of arguments.
  6440. `~:@{'
  6441. args from the rest args (lists).
  6442. `~^'
  6443. Up and out.
  6444. `~N^'
  6445. aborts if N = 0
  6446. `~N,M^'
  6447. aborts if N = M
  6448. `~N,M,K^'
  6449. aborts if N <= M <= K
  6450. *** Not Implemented CL Format Control Directives
  6451. `~:A'
  6452. print `#f' as an empty list (see below).
  6453. `~:S'
  6454. print `#f' as an empty list (see below).
  6455. `~<~>'
  6456. Justification.
  6457. `~:^'
  6458. (sorry I don't understand its semantics completely)
  6459. *** Extended, Replaced and Additional Control Directives
  6460. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHD'
  6461. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHX'
  6462. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHO'
  6463. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHB'
  6464. `~N,MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHR'
  6465. COMMAWIDTH is the number of characters between two comma
  6466. characters.
  6467. `~I'
  6468. print a R4RS complex number as `~F~@Fi' with passed parameters for
  6469. `~F'.
  6470. `~Y'
  6471. Pretty print formatting of an argument for scheme code lists.
  6472. `~K'
  6473. Same as `~?.'
  6474. `~!'
  6475. Flushes the output if format DESTINATION is a port.
  6476. `~_'
  6477. Print a `#\space' character
  6478. `~N_'
  6479. print N `#\space' characters.
  6480. `~/'
  6481. Print a `#\tab' character
  6482. `~N/'
  6483. print N `#\tab' characters.
  6484. `~NC'
  6485. Takes N as an integer representation for a character. No arguments
  6486. are consumed. N is converted to a character by `integer->char'. N
  6487. must be a positive decimal number.
  6488. `~:S'
  6489. Print out readproof. Prints out internal objects represented as
  6490. `#<...>' as strings `"#<...>"' so that the format output can always
  6491. be processed by `read'.
  6492. `~:A'
  6493. Print out readproof. Prints out internal objects represented as
  6494. `#<...>' as strings `"#<...>"' so that the format output can always
  6495. be processed by `read'.
  6496. `~Q'
  6497. Prints information and a copyright notice on the format
  6498. implementation.
  6499. `~:Q'
  6500. prints format version.
  6501. `~F, ~E, ~G, ~$'
  6502. may also print number strings, i.e. passing a number as a string
  6503. and format it accordingly.
  6504. *** Configuration Variables
  6505. The format module exports some configuration variables to suit the
  6506. systems and users needs. There should be no modification necessary for
  6507. the configuration that comes with Guile. Format detects automatically
  6508. if the running scheme system implements floating point numbers and
  6509. complex numbers.
  6510. format:symbol-case-conv
  6511. Symbols are converted by `symbol->string' so the case type of the
  6512. printed symbols is implementation dependent.
  6513. `format:symbol-case-conv' is a one arg closure which is either
  6514. `#f' (no conversion), `string-upcase', `string-downcase' or
  6515. `string-capitalize'. (default `#f')
  6516. format:iobj-case-conv
  6517. As FORMAT:SYMBOL-CASE-CONV but applies for the representation of
  6518. implementation internal objects. (default `#f')
  6519. format:expch
  6520. The character prefixing the exponent value in `~E' printing.
  6521. (default `#\E')
  6522. *** Compatibility With Other Format Implementations
  6523. SLIB format 2.x:
  6524. See `format.doc'.
  6525. SLIB format 1.4:
  6526. Downward compatible except for padding support and `~A', `~S',
  6527. `~P', `~X' uppercase printing. SLIB format 1.4 uses C-style
  6528. `printf' padding support which is completely replaced by the CL
  6529. `format' padding style.
  6530. MIT C-Scheme 7.1:
  6531. Downward compatible except for `~', which is not documented
  6532. (ignores all characters inside the format string up to a newline
  6533. character). (7.1 implements `~a', `~s', ~NEWLINE, `~~', `~%',
  6534. numerical and variable parameters and `:/@' modifiers in the CL
  6535. sense).
  6536. Elk 1.5/2.0:
  6537. Downward compatible except for `~A' and `~S' which print in
  6538. uppercase. (Elk implements `~a', `~s', `~~', and `~%' (no
  6539. directive parameters or modifiers)).
  6540. Scheme->C 01nov91:
  6541. Downward compatible except for an optional destination parameter:
  6542. S2C accepts a format call without a destination which returns a
  6543. formatted string. This is equivalent to a #f destination in S2C.
  6544. (S2C implements `~a', `~s', `~c', `~%', and `~~' (no directive
  6545. parameters or modifiers)).
  6546. ** Changes to string-handling functions.
  6547. These functions were added to support the (ice-9 format) module, above.
  6548. *** New function: string-upcase STRING
  6549. *** New function: string-downcase STRING
  6550. These are non-destructive versions of the existing string-upcase! and
  6551. string-downcase! functions.
  6552. *** New function: string-capitalize! STRING
  6553. *** New function: string-capitalize STRING
  6554. These functions convert the first letter of each word in the string to
  6555. upper case. Thus:
  6556. (string-capitalize "howdy there")
  6557. => "Howdy There"
  6558. As with the other functions, string-capitalize! modifies the string in
  6559. place, while string-capitalize returns a modified copy of its argument.
  6560. *** New function: string-ci->symbol STRING
  6561. Return a symbol whose name is STRING, but having the same case as if
  6562. the symbol had be read by `read'.
  6563. Guile can be configured to be sensitive or insensitive to case
  6564. differences in Scheme identifiers. If Guile is case-insensitive, all
  6565. symbols are converted to lower case on input. The `string-ci->symbol'
  6566. function returns a symbol whose name in STRING, transformed as Guile
  6567. would if STRING were input.
  6568. *** New function: substring-move! STRING1 START END STRING2 START
  6569. Copy the substring of STRING1 from START (inclusive) to END
  6570. (exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
  6571. string, and the source and destination areas may overlap; in all
  6572. cases, the function behaves as if all the characters were copied
  6573. simultanously.
  6574. *** Extended functions: substring-move-left! substring-move-right!
  6575. These functions now correctly copy arbitrarily overlapping substrings;
  6576. they are both synonyms for substring-move!.
  6577. ** New module (ice-9 getopt-long), with the function `getopt-long'.
  6578. getopt-long is a function for parsing command-line arguments in a
  6579. manner consistent with other GNU programs.
  6580. (getopt-long ARGS GRAMMAR)
  6581. Parse the arguments ARGS according to the argument list grammar GRAMMAR.
  6582. ARGS should be a list of strings. Its first element should be the
  6583. name of the program; subsequent elements should be the arguments
  6584. that were passed to the program on the command line. The
  6585. `program-arguments' procedure returns a list of this form.
  6586. GRAMMAR is a list of the form:
  6587. ((OPTION (PROPERTY VALUE) ...) ...)
  6588. Each OPTION should be a symbol. `getopt-long' will accept a
  6589. command-line option named `--OPTION'.
  6590. Each option can have the following (PROPERTY VALUE) pairs:
  6591. (single-char CHAR) --- Accept `-CHAR' as a single-character
  6592. equivalent to `--OPTION'. This is how to specify traditional
  6593. Unix-style flags.
  6594. (required? BOOL) --- If BOOL is true, the option is required.
  6595. getopt-long will raise an error if it is not found in ARGS.
  6596. (value BOOL) --- If BOOL is #t, the option accepts a value; if
  6597. it is #f, it does not; and if it is the symbol
  6598. `optional', the option may appear in ARGS with or
  6599. without a value.
  6600. (predicate FUNC) --- If the option accepts a value (i.e. you
  6601. specified `(value #t)' for this option), then getopt
  6602. will apply FUNC to the value, and throw an exception
  6603. if it returns #f. FUNC should be a procedure which
  6604. accepts a string and returns a boolean value; you may
  6605. need to use quasiquotes to get it into GRAMMAR.
  6606. The (PROPERTY VALUE) pairs may occur in any order, but each
  6607. property may occur only once. By default, options do not have
  6608. single-character equivalents, are not required, and do not take
  6609. values.
  6610. In ARGS, single-character options may be combined, in the usual
  6611. Unix fashion: ("-x" "-y") is equivalent to ("-xy"). If an option
  6612. accepts values, then it must be the last option in the
  6613. combination; the value is the next argument. So, for example, using
  6614. the following grammar:
  6615. ((apples (single-char #\a))
  6616. (blimps (single-char #\b) (value #t))
  6617. (catalexis (single-char #\c) (value #t)))
  6618. the following argument lists would be acceptable:
  6619. ("-a" "-b" "bang" "-c" "couth") ("bang" and "couth" are the values
  6620. for "blimps" and "catalexis")
  6621. ("-ab" "bang" "-c" "couth") (same)
  6622. ("-ac" "couth" "-b" "bang") (same)
  6623. ("-abc" "couth" "bang") (an error, since `-b' is not the
  6624. last option in its combination)
  6625. If an option's value is optional, then `getopt-long' decides
  6626. whether it has a value by looking at what follows it in ARGS. If
  6627. the next element is a string, and it does not appear to be an
  6628. option itself, then that string is the option's value.
  6629. The value of a long option can appear as the next element in ARGS,
  6630. or it can follow the option name, separated by an `=' character.
  6631. Thus, using the same grammar as above, the following argument lists
  6632. are equivalent:
  6633. ("--apples" "Braeburn" "--blimps" "Goodyear")
  6634. ("--apples=Braeburn" "--blimps" "Goodyear")
  6635. ("--blimps" "Goodyear" "--apples=Braeburn")
  6636. If the option "--" appears in ARGS, argument parsing stops there;
  6637. subsequent arguments are returned as ordinary arguments, even if
  6638. they resemble options. So, in the argument list:
  6639. ("--apples" "Granny Smith" "--" "--blimp" "Goodyear")
  6640. `getopt-long' will recognize the `apples' option as having the
  6641. value "Granny Smith", but it will not recognize the `blimp'
  6642. option; it will return the strings "--blimp" and "Goodyear" as
  6643. ordinary argument strings.
  6644. The `getopt-long' function returns the parsed argument list as an
  6645. assocation list, mapping option names --- the symbols from GRAMMAR
  6646. --- onto their values, or #t if the option does not accept a value.
  6647. Unused options do not appear in the alist.
  6648. All arguments that are not the value of any option are returned
  6649. as a list, associated with the empty list.
  6650. `getopt-long' throws an exception if:
  6651. - it finds an unrecognized option in ARGS
  6652. - a required option is omitted
  6653. - an option that requires an argument doesn't get one
  6654. - an option that doesn't accept an argument does get one (this can
  6655. only happen using the long option `--opt=value' syntax)
  6656. - an option predicate fails
  6657. So, for example:
  6658. (define grammar
  6659. `((lockfile-dir (required? #t)
  6660. (value #t)
  6661. (single-char #\k)
  6662. (predicate ,file-is-directory?))
  6663. (verbose (required? #f)
  6664. (single-char #\v)
  6665. (value #f))
  6666. (x-includes (single-char #\x))
  6667. (rnet-server (single-char #\y)
  6668. (predicate ,string?))))
  6669. (getopt-long '("my-prog" "-vk" "/tmp" "foo1" "--x-includes=/usr/include"
  6670. "--rnet-server=lamprod" "--" "-fred" "foo2" "foo3")
  6671. grammar)
  6672. => ((() "foo1" "-fred" "foo2" "foo3")
  6673. (rnet-server . "lamprod")
  6674. (x-includes . "/usr/include")
  6675. (lockfile-dir . "/tmp")
  6676. (verbose . #t))
  6677. ** The (ice-9 getopt-gnu-style) module is obsolete; use (ice-9 getopt-long).
  6678. It will be removed in a few releases.
  6679. ** New syntax: lambda*
  6680. ** New syntax: define*
  6681. ** New syntax: define*-public
  6682. ** New syntax: defmacro*
  6683. ** New syntax: defmacro*-public
  6684. Guile now supports optional arguments.
  6685. `lambda*', `define*', `define*-public', `defmacro*' and
  6686. `defmacro*-public' are identical to the non-* versions except that
  6687. they use an extended type of parameter list that has the following BNF
  6688. syntax (parentheses are literal, square brackets indicate grouping,
  6689. and `*', `+' and `?' have the usual meaning):
  6690. ext-param-list ::= ( [identifier]* [#&optional [ext-var-decl]+]?
  6691. [#&key [ext-var-decl]+ [#&allow-other-keys]?]?
  6692. [[#&rest identifier]|[. identifier]]? ) | [identifier]
  6693. ext-var-decl ::= identifier | ( identifier expression )
  6694. The semantics are best illustrated with the following documentation
  6695. and examples for `lambda*':
  6696. lambda* args . body
  6697. lambda extended for optional and keyword arguments
  6698. lambda* creates a procedure that takes optional arguments. These
  6699. are specified by putting them inside brackets at the end of the
  6700. paramater list, but before any dotted rest argument. For example,
  6701. (lambda* (a b #&optional c d . e) '())
  6702. creates a procedure with fixed arguments a and b, optional arguments c
  6703. and d, and rest argument e. If the optional arguments are omitted
  6704. in a call, the variables for them are unbound in the procedure. This
  6705. can be checked with the bound? macro.
  6706. lambda* can also take keyword arguments. For example, a procedure
  6707. defined like this:
  6708. (lambda* (#&key xyzzy larch) '())
  6709. can be called with any of the argument lists (#:xyzzy 11)
  6710. (#:larch 13) (#:larch 42 #:xyzzy 19) (). Whichever arguments
  6711. are given as keywords are bound to values.
  6712. Optional and keyword arguments can also be given default values
  6713. which they take on when they are not present in a call, by giving a
  6714. two-item list in place of an optional argument, for example in:
  6715. (lambda* (foo #&optional (bar 42) #&key (baz 73)) (list foo bar baz))
  6716. foo is a fixed argument, bar is an optional argument with default
  6717. value 42, and baz is a keyword argument with default value 73.
  6718. Default value expressions are not evaluated unless they are needed
  6719. and until the procedure is called.
  6720. lambda* now supports two more special parameter list keywords.
  6721. lambda*-defined procedures now throw an error by default if a
  6722. keyword other than one of those specified is found in the actual
  6723. passed arguments. However, specifying #&allow-other-keys
  6724. immediately after the kyword argument declarations restores the
  6725. previous behavior of ignoring unknown keywords. lambda* also now
  6726. guarantees that if the same keyword is passed more than once, the
  6727. last one passed is the one that takes effect. For example,
  6728. ((lambda* (#&key (heads 0) (tails 0)) (display (list heads tails)))
  6729. #:heads 37 #:tails 42 #:heads 99)
  6730. would result in (99 47) being displayed.
  6731. #&rest is also now provided as a synonym for the dotted syntax rest
  6732. argument. The argument lists (a . b) and (a #&rest b) are equivalent in
  6733. all respects to lambda*. This is provided for more similarity to DSSSL,
  6734. MIT-Scheme and Kawa among others, as well as for refugees from other
  6735. Lisp dialects.
  6736. Further documentation may be found in the optargs.scm file itself.
  6737. The optional argument module also exports the macros `let-optional',
  6738. `let-optional*', `let-keywords', `let-keywords*' and `bound?'. These
  6739. are not documented here because they may be removed in the future, but
  6740. full documentation is still available in optargs.scm.
  6741. ** New syntax: and-let*
  6742. Guile now supports the `and-let*' form, described in the draft SRFI-2.
  6743. Syntax: (land* (<clause> ...) <body> ...)
  6744. Each <clause> should have one of the following forms:
  6745. (<variable> <expression>)
  6746. (<expression>)
  6747. <bound-variable>
  6748. Each <variable> or <bound-variable> should be an identifier. Each
  6749. <expression> should be a valid expression. The <body> should be a
  6750. possibly empty sequence of expressions, like the <body> of a
  6751. lambda form.
  6752. Semantics: A LAND* expression is evaluated by evaluating the
  6753. <expression> or <bound-variable> of each of the <clause>s from
  6754. left to right. The value of the first <expression> or
  6755. <bound-variable> that evaluates to a false value is returned; the
  6756. remaining <expression>s and <bound-variable>s are not evaluated.
  6757. The <body> forms are evaluated iff all the <expression>s and
  6758. <bound-variable>s evaluate to true values.
  6759. The <expression>s and the <body> are evaluated in an environment
  6760. binding each <variable> of the preceding (<variable> <expression>)
  6761. clauses to the value of the <expression>. Later bindings
  6762. shadow earlier bindings.
  6763. Guile's and-let* macro was contributed by Michael Livshin.
  6764. ** New sorting functions
  6765. *** New function: sorted? SEQUENCE LESS?
  6766. Returns `#t' when the sequence argument is in non-decreasing order
  6767. according to LESS? (that is, there is no adjacent pair `... x y
  6768. ...' for which `(less? y x)').
  6769. Returns `#f' when the sequence contains at least one out-of-order
  6770. pair. It is an error if the sequence is neither a list nor a
  6771. vector.
  6772. *** New function: merge LIST1 LIST2 LESS?
  6773. LIST1 and LIST2 are sorted lists.
  6774. Returns the sorted list of all elements in LIST1 and LIST2.
  6775. Assume that the elements a and b1 in LIST1 and b2 in LIST2 are "equal"
  6776. in the sense that (LESS? x y) --> #f for x, y in {a, b1, b2},
  6777. and that a < b1 in LIST1. Then a < b1 < b2 in the result.
  6778. (Here "<" should read "comes before".)
  6779. *** New procedure: merge! LIST1 LIST2 LESS?
  6780. Merges two lists, re-using the pairs of LIST1 and LIST2 to build
  6781. the result. If the code is compiled, and LESS? constructs no new
  6782. pairs, no pairs at all will be allocated. The first pair of the
  6783. result will be either the first pair of LIST1 or the first pair of
  6784. LIST2.
  6785. *** New function: sort SEQUENCE LESS?
  6786. Accepts either a list or a vector, and returns a new sequence
  6787. which is sorted. The new sequence is the same type as the input.
  6788. Always `(sorted? (sort sequence less?) less?)'. The original
  6789. sequence is not altered in any way. The new sequence shares its
  6790. elements with the old one; no elements are copied.
  6791. *** New procedure: sort! SEQUENCE LESS
  6792. Returns its sorted result in the original boxes. No new storage is
  6793. allocated at all. Proper usage: (set! slist (sort! slist <))
  6794. *** New function: stable-sort SEQUENCE LESS?
  6795. Similar to `sort' but stable. That is, if "equal" elements are
  6796. ordered a < b in the original sequence, they will have the same order
  6797. in the result.
  6798. *** New function: stable-sort! SEQUENCE LESS?
  6799. Similar to `sort!' but stable.
  6800. Uses temporary storage when sorting vectors.
  6801. *** New functions: sort-list, sort-list!
  6802. Added for compatibility with scsh.
  6803. ** New built-in random number support
  6804. *** New function: random N [STATE]
  6805. Accepts a positive integer or real N and returns a number of the
  6806. same type between zero (inclusive) and N (exclusive). The values
  6807. returned have a uniform distribution.
  6808. The optional argument STATE must be of the type produced by
  6809. `copy-random-state' or `seed->random-state'. It defaults to the value
  6810. of the variable `*random-state*'. This object is used to maintain the
  6811. state of the pseudo-random-number generator and is altered as a side
  6812. effect of the `random' operation.
  6813. *** New variable: *random-state*
  6814. Holds a data structure that encodes the internal state of the
  6815. random-number generator that `random' uses by default. The nature
  6816. of this data structure is implementation-dependent. It may be
  6817. printed out and successfully read back in, but may or may not
  6818. function correctly as a random-number state object in another
  6819. implementation.
  6820. *** New function: copy-random-state [STATE]
  6821. Returns a new object of type suitable for use as the value of the
  6822. variable `*random-state*' and as a second argument to `random'.
  6823. If argument STATE is given, a copy of it is returned. Otherwise a
  6824. copy of `*random-state*' is returned.
  6825. *** New function: seed->random-state SEED
  6826. Returns a new object of type suitable for use as the value of the
  6827. variable `*random-state*' and as a second argument to `random'.
  6828. SEED is a string or a number. A new state is generated and
  6829. initialized using SEED.
  6830. *** New function: random:uniform [STATE]
  6831. Returns an uniformly distributed inexact real random number in the
  6832. range between 0 and 1.
  6833. *** New procedure: random:solid-sphere! VECT [STATE]
  6834. Fills VECT with inexact real random numbers the sum of whose
  6835. squares is less than 1.0. Thinking of VECT as coordinates in
  6836. space of dimension N = `(vector-length VECT)', the coordinates are
  6837. uniformly distributed within the unit N-shere. The sum of the
  6838. squares of the numbers is returned. VECT can be either a vector
  6839. or a uniform vector of doubles.
  6840. *** New procedure: random:hollow-sphere! VECT [STATE]
  6841. Fills VECT with inexact real random numbers the sum of whose squares
  6842. is equal to 1.0. Thinking of VECT as coordinates in space of
  6843. dimension n = `(vector-length VECT)', the coordinates are uniformly
  6844. distributed over the surface of the unit n-shere. VECT can be either
  6845. a vector or a uniform vector of doubles.
  6846. *** New function: random:normal [STATE]
  6847. Returns an inexact real in a normal distribution with mean 0 and
  6848. standard deviation 1. For a normal distribution with mean M and
  6849. standard deviation D use `(+ M (* D (random:normal)))'.
  6850. *** New procedure: random:normal-vector! VECT [STATE]
  6851. Fills VECT with inexact real random numbers which are independent and
  6852. standard normally distributed (i.e., with mean 0 and variance 1).
  6853. VECT can be either a vector or a uniform vector of doubles.
  6854. *** New function: random:exp STATE
  6855. Returns an inexact real in an exponential distribution with mean 1.
  6856. For an exponential distribution with mean U use (* U (random:exp)).
  6857. ** The range of logand, logior, logxor, logtest, and logbit? have changed.
  6858. These functions now operate on numbers in the range of a C unsigned
  6859. long.
  6860. These functions used to operate on numbers in the range of a C signed
  6861. long; however, this seems inappropriate, because Guile integers don't
  6862. overflow.
  6863. ** New function: make-guardian
  6864. This is an implementation of guardians as described in
  6865. R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a
  6866. Generation-Based Garbage Collector" ACM SIGPLAN Conference on
  6867. Programming Language Design and Implementation, June 1993
  6868. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/guardians.ps.gz
  6869. ** New functions: delq1!, delv1!, delete1!
  6870. These procedures behave similar to delq! and friends but delete only
  6871. one object if at all.
  6872. ** New function: unread-string STRING PORT
  6873. Unread STRING to PORT, that is, push it back onto the port so that
  6874. next read operation will work on the pushed back characters.
  6875. ** unread-char can now be called multiple times
  6876. If unread-char is called multiple times, the unread characters will be
  6877. read again in last-in first-out order.
  6878. ** the procedures uniform-array-read! and uniform-array-write! now
  6879. work on any kind of port, not just ports which are open on a file.
  6880. ** Now 'l' in a port mode requests line buffering.
  6881. ** The procedure truncate-file now works on string ports as well
  6882. as file ports. If the size argument is omitted, the current
  6883. file position is used.
  6884. ** new procedure: seek PORT/FDES OFFSET WHENCE
  6885. The arguments are the same as for the old fseek procedure, but it
  6886. works on string ports as well as random-access file ports.
  6887. ** the fseek procedure now works on string ports, since it has been
  6888. redefined using seek.
  6889. ** the setvbuf procedure now uses a default size if mode is _IOFBF and
  6890. size is not supplied.
  6891. ** the newline procedure no longer flushes the port if it's not
  6892. line-buffered: previously it did if it was the current output port.
  6893. ** open-pipe and close-pipe are no longer primitive procedures, but
  6894. an emulation can be obtained using `(use-modules (ice-9 popen))'.
  6895. ** the freopen procedure has been removed.
  6896. ** new procedure: drain-input PORT
  6897. Drains PORT's read buffers (including any pushed-back characters)
  6898. and returns the contents as a single string.
  6899. ** New function: map-in-order PROC LIST1 LIST2 ...
  6900. Version of `map' which guarantees that the procedure is applied to the
  6901. lists in serial order.
  6902. ** Renamed `serial-array-copy!' and `serial-array-map!' to
  6903. `array-copy-in-order!' and `array-map-in-order!'. The old names are
  6904. now obsolete and will go away in release 1.5.
  6905. ** New syntax: collect BODY1 ...
  6906. Version of `begin' which returns a list of the results of the body
  6907. forms instead of the result of the last body form. In contrast to
  6908. `begin', `collect' allows an empty body.
  6909. ** New functions: read-history FILENAME, write-history FILENAME
  6910. Read/write command line history from/to file. Returns #t on success
  6911. and #f if an error occured.
  6912. ** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
  6913. These procedures return a list of definitions available in the specified
  6914. argument, a relative module reference. In the case of no argument,
  6915. `(current-module)' is now consulted for definitions to return, instead
  6916. of simply returning #f, the former behavior.
  6917. ** The #/ syntax for lists is no longer supported.
  6918. Earlier versions of Scheme accepted this syntax, but printed a
  6919. warning.
  6920. ** Guile no longer consults the SCHEME_LOAD_PATH environment variable.
  6921. Instead, you should set GUILE_LOAD_PATH to tell Guile where to find
  6922. modules.
  6923. * Changes to the gh_ interface
  6924. ** gh_scm2doubles
  6925. Now takes a second argument which is the result array. If this
  6926. pointer is NULL, a new array is malloced (the old behaviour).
  6927. ** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
  6928. gh_scm2shorts, gh_scm2longs, gh_scm2floats
  6929. New functions.
  6930. * Changes to the scm_ interface
  6931. ** Function: scm_make_named_hook (char* name, int n_args)
  6932. Creates a hook in the same way as make-hook above but also
  6933. binds a variable named NAME to it.
  6934. This is the typical way of creating a hook from C code.
  6935. Currently, the variable is created in the "current" module. This
  6936. might change when we get the new module system.
  6937. ** The smob interface
  6938. The interface for creating smobs has changed. For documentation, see
  6939. data-rep.info (made from guile-core/doc/data-rep.texi).
  6940. *** Deprecated function: SCM scm_newsmob (scm_smobfuns *)
  6941. >>> This function will be removed in 1.3.4. <<<
  6942. It is replaced by:
  6943. *** Function: SCM scm_make_smob_type (const char *name, scm_sizet size)
  6944. This function adds a new smob type, named NAME, with instance size
  6945. SIZE to the system. The return value is a tag that is used in
  6946. creating instances of the type. If SIZE is 0, then no memory will
  6947. be allocated when instances of the smob are created, and nothing
  6948. will be freed by the default free function.
  6949. *** Function: void scm_set_smob_mark (long tc, SCM (*mark) (SCM))
  6950. This function sets the smob marking procedure for the smob type
  6951. specified by the tag TC. TC is the tag returned by
  6952. `scm_make_smob_type'.
  6953. *** Function: void scm_set_smob_free (long tc, SCM (*mark) (SCM))
  6954. This function sets the smob freeing procedure for the smob type
  6955. specified by the tag TC. TC is the tag returned by
  6956. `scm_make_smob_type'.
  6957. *** Function: void scm_set_smob_print (tc, print)
  6958. - Function: void scm_set_smob_print (long tc,
  6959. scm_sizet (*print) (SCM,
  6960. SCM,
  6961. scm_print_state *))
  6962. This function sets the smob printing procedure for the smob type
  6963. specified by the tag TC. TC is the tag returned by
  6964. `scm_make_smob_type'.
  6965. *** Function: void scm_set_smob_equalp (long tc, SCM (*equalp) (SCM, SCM))
  6966. This function sets the smob equality-testing predicate for the
  6967. smob type specified by the tag TC. TC is the tag returned by
  6968. `scm_make_smob_type'.
  6969. *** Macro: void SCM_NEWSMOB (SCM var, long tc, void *data)
  6970. Make VALUE contain a smob instance of the type with type code TC and
  6971. smob data DATA. VALUE must be previously declared as C type `SCM'.
  6972. *** Macro: fn_returns SCM_RETURN_NEWSMOB (long tc, void *data)
  6973. This macro expands to a block of code that creates a smob instance
  6974. of the type with type code TC and smob data DATA, and returns that
  6975. `SCM' value. It should be the last piece of code in a block.
  6976. ** The interfaces for using I/O ports and implementing port types
  6977. (ptobs) have changed significantly. The new interface is based on
  6978. shared access to buffers and a new set of ptob procedures.
  6979. *** scm_newptob has been removed
  6980. It is replaced by:
  6981. *** Function: SCM scm_make_port_type (type_name, fill_buffer, write_flush)
  6982. - Function: SCM scm_make_port_type (char *type_name,
  6983. int (*fill_buffer) (SCM port),
  6984. void (*write_flush) (SCM port));
  6985. Similarly to the new smob interface, there is a set of function
  6986. setters by which the user can customize the behaviour of his port
  6987. type. See ports.h (scm_set_port_XXX).
  6988. ** scm_strport_to_string: New function: creates a new string from
  6989. a string port's buffer.
  6990. ** Plug in interface for random number generators
  6991. The variable `scm_the_rng' in random.c contains a value and three
  6992. function pointers which together define the current random number
  6993. generator being used by the Scheme level interface and the random
  6994. number library functions.
  6995. The user is free to replace the default generator with the generator
  6996. of his own choice.
  6997. *** Variable: size_t scm_the_rng.rstate_size
  6998. The size of the random state type used by the current RNG
  6999. measured in chars.
  7000. *** Function: unsigned long scm_the_rng.random_bits (scm_rstate *STATE)
  7001. Given the random STATE, return 32 random bits.
  7002. *** Function: void scm_the_rng.init_rstate (scm_rstate *STATE, chars *S, int N)
  7003. Seed random state STATE using string S of length N.
  7004. *** Function: scm_rstate *scm_the_rng.copy_rstate (scm_rstate *STATE)
  7005. Given random state STATE, return a malloced copy.
  7006. ** Default RNG
  7007. The default RNG is the MWC (Multiply With Carry) random number
  7008. generator described by George Marsaglia at the Department of
  7009. Statistics and Supercomputer Computations Research Institute, The
  7010. Florida State University (http://stat.fsu.edu/~geo).
  7011. It uses 64 bits, has a period of 4578426017172946943 (4.6e18), and
  7012. passes all tests in the DIEHARD test suite
  7013. (http://stat.fsu.edu/~geo/diehard.html). The generation of 32 bits
  7014. costs one multiply and one add on platforms which either supports long
  7015. longs (gcc does this on most systems) or have 64 bit longs. The cost
  7016. is four multiply on other systems but this can be optimized by writing
  7017. scm_i_uniform32 in assembler.
  7018. These functions are provided through the scm_the_rng interface for use
  7019. by libguile and the application.
  7020. *** Function: unsigned long scm_i_uniform32 (scm_i_rstate *STATE)
  7021. Given the random STATE, return 32 random bits.
  7022. Don't use this function directly. Instead go through the plugin
  7023. interface (see "Plug in interface" above).
  7024. *** Function: void scm_i_init_rstate (scm_i_rstate *STATE, char *SEED, int N)
  7025. Initialize STATE using SEED of length N.
  7026. *** Function: scm_i_rstate *scm_i_copy_rstate (scm_i_rstate *STATE)
  7027. Return a malloc:ed copy of STATE. This function can easily be re-used
  7028. in the interfaces to other RNGs.
  7029. ** Random number library functions
  7030. These functions use the current RNG through the scm_the_rng interface.
  7031. It might be a good idea to use these functions from your C code so
  7032. that only one random generator is used by all code in your program.
  7033. The default random state is stored in:
  7034. *** Variable: SCM scm_var_random_state
  7035. Contains the vcell of the Scheme variable "*random-state*" which is
  7036. used as default state by all random number functions in the Scheme
  7037. level interface.
  7038. Example:
  7039. double x = scm_c_uniform01 (SCM_RSTATE (SCM_CDR (scm_var_random_state)));
  7040. *** Function: scm_rstate *scm_c_default_rstate (void)
  7041. This is a convenience function which returns the value of
  7042. scm_var_random_state. An error message is generated if this value
  7043. isn't a random state.
  7044. *** Function: scm_rstate *scm_c_make_rstate (char *SEED, int LENGTH)
  7045. Make a new random state from the string SEED of length LENGTH.
  7046. It is generally not a good idea to use multiple random states in a
  7047. program. While subsequent random numbers generated from one random
  7048. state are guaranteed to be reasonably independent, there is no such
  7049. guarantee for numbers generated from different random states.
  7050. *** Macro: unsigned long scm_c_uniform32 (scm_rstate *STATE)
  7051. Return 32 random bits.
  7052. *** Function: double scm_c_uniform01 (scm_rstate *STATE)
  7053. Return a sample from the uniform(0,1) distribution.
  7054. *** Function: double scm_c_normal01 (scm_rstate *STATE)
  7055. Return a sample from the normal(0,1) distribution.
  7056. *** Function: double scm_c_exp1 (scm_rstate *STATE)
  7057. Return a sample from the exp(1) distribution.
  7058. *** Function: unsigned long scm_c_random (scm_rstate *STATE, unsigned long M)
  7059. Return a sample from the discrete uniform(0,M) distribution.
  7060. *** Function: SCM scm_c_random_bignum (scm_rstate *STATE, SCM M)
  7061. Return a sample from the discrete uniform(0,M) distribution.
  7062. M must be a bignum object. The returned value may be an INUM.
  7063. Changes in Guile 1.3 (released Monday, October 19, 1998):
  7064. * Changes to the distribution
  7065. ** We renamed the SCHEME_LOAD_PATH environment variable to GUILE_LOAD_PATH.
  7066. To avoid conflicts, programs should name environment variables after
  7067. themselves, except when there's a common practice establishing some
  7068. other convention.
  7069. For now, Guile supports both GUILE_LOAD_PATH and SCHEME_LOAD_PATH,
  7070. giving the former precedence, and printing a warning message if the
  7071. latter is set. Guile 1.4 will not recognize SCHEME_LOAD_PATH at all.
  7072. ** The header files related to multi-byte characters have been removed.
  7073. They were: libguile/extchrs.h and libguile/mbstrings.h. Any C code
  7074. which referred to these explicitly will probably need to be rewritten,
  7075. since the support for the variant string types has been removed; see
  7076. below.
  7077. ** The header files append.h and sequences.h have been removed. These
  7078. files implemented non-R4RS operations which would encourage
  7079. non-portable programming style and less easy-to-read code.
  7080. * Changes to the stand-alone interpreter
  7081. ** New procedures have been added to implement a "batch mode":
  7082. *** Function: batch-mode?
  7083. Returns a boolean indicating whether the interpreter is in batch
  7084. mode.
  7085. *** Function: set-batch-mode?! ARG
  7086. If ARG is true, switches the interpreter to batch mode. The `#f'
  7087. case has not been implemented.
  7088. ** Guile now provides full command-line editing, when run interactively.
  7089. To use this feature, you must have the readline library installed.
  7090. The Guile build process will notice it, and automatically include
  7091. support for it.
  7092. The readline library is available via anonymous FTP from any GNU
  7093. mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
  7094. ** the-last-stack is now a fluid.
  7095. * Changes to the procedure for linking libguile with your programs
  7096. ** You can now use the `guile-config' utility to build programs that use Guile.
  7097. Guile now includes a command-line utility called `guile-config', which
  7098. can provide information about how to compile and link programs that
  7099. use Guile.
  7100. *** `guile-config compile' prints any C compiler flags needed to use Guile.
  7101. You should include this command's output on the command line you use
  7102. to compile C or C++ code that #includes the Guile header files. It's
  7103. usually just a `-I' flag to help the compiler find the Guile headers.
  7104. *** `guile-config link' prints any linker flags necessary to link with Guile.
  7105. This command writes to its standard output a list of flags which you
  7106. must pass to the linker to link your code against the Guile library.
  7107. The flags include '-lguile' itself, any other libraries the Guile
  7108. library depends upon, and any `-L' flags needed to help the linker
  7109. find those libraries.
  7110. For example, here is a Makefile rule that builds a program named 'foo'
  7111. from the object files ${FOO_OBJECTS}, and links them against Guile:
  7112. foo: ${FOO_OBJECTS}
  7113. ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
  7114. Previous Guile releases recommended that you use autoconf to detect
  7115. which of a predefined set of libraries were present on your system.
  7116. It is more robust to use `guile-config', since it records exactly which
  7117. libraries the installed Guile library requires.
  7118. This was originally called `build-guile', but was renamed to
  7119. `guile-config' before Guile 1.3 was released, to be consistent with
  7120. the analogous script for the GTK+ GUI toolkit, which is called
  7121. `gtk-config'.
  7122. ** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
  7123. If you are using the GNU autoconf package to configure your program,
  7124. you can use the GUILE_FLAGS autoconf macro to call `guile-config'
  7125. (described above) and gather the necessary values for use in your
  7126. Makefiles.
  7127. The GUILE_FLAGS macro expands to configure script code which runs the
  7128. `guile-config' script, to find out where Guile's header files and
  7129. libraries are installed. It sets two variables, marked for
  7130. substitution, as by AC_SUBST.
  7131. GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
  7132. code that uses Guile header files. This is almost always just a
  7133. -I flag.
  7134. GUILE_LDFLAGS --- flags to pass to the linker to link a
  7135. program against Guile. This includes `-lguile' for the Guile
  7136. library itself, any libraries that Guile itself requires (like
  7137. -lqthreads), and so on. It may also include a -L flag to tell the
  7138. compiler where to find the libraries.
  7139. GUILE_FLAGS is defined in the file guile.m4, in the top-level
  7140. directory of the Guile distribution. You can copy it into your
  7141. package's aclocal.m4 file, and then use it in your configure.in file.
  7142. If you are using the `aclocal' program, distributed with GNU automake,
  7143. to maintain your aclocal.m4 file, the Guile installation process
  7144. installs guile.m4 where aclocal will find it. All you need to do is
  7145. use GUILE_FLAGS in your configure.in file, and then run `aclocal';
  7146. this will copy the definition of GUILE_FLAGS into your aclocal.m4
  7147. file.
  7148. * Changes to Scheme functions and syntax
  7149. ** Multi-byte strings have been removed, as have multi-byte and wide
  7150. ports. We felt that these were the wrong approach to
  7151. internationalization support.
  7152. ** New function: readline [PROMPT]
  7153. Read a line from the terminal, and allow the user to edit it,
  7154. prompting with PROMPT. READLINE provides a large set of Emacs-like
  7155. editing commands, lets the user recall previously typed lines, and
  7156. works on almost every kind of terminal, including dumb terminals.
  7157. READLINE assumes that the cursor is at the beginning of the line when
  7158. it is invoked. Thus, you can't print a prompt yourself, and then call
  7159. READLINE; you need to package up your prompt as a string, pass it to
  7160. the function, and let READLINE print the prompt itself. This is
  7161. because READLINE needs to know the prompt's screen width.
  7162. For Guile to provide this function, you must have the readline
  7163. library, version 2.1 or later, installed on your system. Readline is
  7164. available via anonymous FTP from prep.ai.mit.edu in pub/gnu, or from
  7165. any GNU mirror site.
  7166. See also ADD-HISTORY function.
  7167. ** New function: add-history STRING
  7168. Add STRING as the most recent line in the history used by the READLINE
  7169. command. READLINE does not add lines to the history itself; you must
  7170. call ADD-HISTORY to make previous input available to the user.
  7171. ** The behavior of the read-line function has changed.
  7172. This function now uses standard C library functions to read the line,
  7173. for speed. This means that it doesn not respect the value of
  7174. scm-line-incrementors; it assumes that lines are delimited with
  7175. #\newline.
  7176. (Note that this is read-line, the function that reads a line of text
  7177. from a port, not readline, the function that reads a line from a
  7178. terminal, providing full editing capabilities.)
  7179. ** New module (ice-9 getopt-gnu-style): Parse command-line arguments.
  7180. This module provides some simple argument parsing. It exports one
  7181. function:
  7182. Function: getopt-gnu-style ARG-LS
  7183. Parse a list of program arguments into an alist of option
  7184. descriptions.
  7185. Each item in the list of program arguments is examined to see if
  7186. it meets the syntax of a GNU long-named option. An argument like
  7187. `--MUMBLE' produces an element of the form (MUMBLE . #t) in the
  7188. returned alist, where MUMBLE is a keyword object with the same
  7189. name as the argument. An argument like `--MUMBLE=FROB' produces
  7190. an element of the form (MUMBLE . FROB), where FROB is a string.
  7191. As a special case, the returned alist also contains a pair whose
  7192. car is the symbol `rest'. The cdr of this pair is a list
  7193. containing all the items in the argument list that are not options
  7194. of the form mentioned above.
  7195. The argument `--' is treated specially: all items in the argument
  7196. list appearing after such an argument are not examined, and are
  7197. returned in the special `rest' list.
  7198. This function does not parse normal single-character switches.
  7199. You will need to parse them out of the `rest' list yourself.
  7200. ** The read syntax for byte vectors and short vectors has changed.
  7201. Instead of #bytes(...), write #y(...).
  7202. Instead of #short(...), write #h(...).
  7203. This may seem nutty, but, like the other uniform vectors, byte vectors
  7204. and short vectors want to have the same print and read syntax (and,
  7205. more basic, want to have read syntax!). Changing the read syntax to
  7206. use multiple characters after the hash sign breaks with the
  7207. conventions used in R5RS and the conventions used for the other
  7208. uniform vectors. It also introduces complexity in the current reader,
  7209. both on the C and Scheme levels. (The Right solution is probably to
  7210. change the syntax and prototypes for uniform vectors entirely.)
  7211. ** The new module (ice-9 session) provides useful interactive functions.
  7212. *** New procedure: (apropos REGEXP OPTION ...)
  7213. Display a list of top-level variables whose names match REGEXP, and
  7214. the modules they are imported from. Each OPTION should be one of the
  7215. following symbols:
  7216. value --- Show the value of each matching variable.
  7217. shadow --- Show bindings shadowed by subsequently imported modules.
  7218. full --- Same as both `shadow' and `value'.
  7219. For example:
  7220. guile> (apropos "trace" 'full)
  7221. debug: trace #<procedure trace args>
  7222. debug: untrace #<procedure untrace args>
  7223. the-scm-module: display-backtrace #<compiled-closure #<primitive-procedure gsubr-apply>>
  7224. the-scm-module: before-backtrace-hook ()
  7225. the-scm-module: backtrace #<primitive-procedure backtrace>
  7226. the-scm-module: after-backtrace-hook ()
  7227. the-scm-module: has-shown-backtrace-hint? #f
  7228. guile>
  7229. ** There are new functions and syntax for working with macros.
  7230. Guile implements macros as a special object type. Any variable whose
  7231. top-level binding is a macro object acts as a macro. The macro object
  7232. specifies how the expression should be transformed before evaluation.
  7233. *** Macro objects now print in a reasonable way, resembling procedures.
  7234. *** New function: (macro? OBJ)
  7235. True iff OBJ is a macro object.
  7236. *** New function: (primitive-macro? OBJ)
  7237. Like (macro? OBJ), but true only if OBJ is one of the Guile primitive
  7238. macro transformers, implemented in eval.c rather than Scheme code.
  7239. Why do we have this function?
  7240. - For symmetry with procedure? and primitive-procedure?,
  7241. - to allow custom print procedures to tell whether a macro is
  7242. primitive, and display it differently, and
  7243. - to allow compilers and user-written evaluators to distinguish
  7244. builtin special forms from user-defined ones, which could be
  7245. compiled.
  7246. *** New function: (macro-type OBJ)
  7247. Return a value indicating what kind of macro OBJ is. Possible return
  7248. values are:
  7249. The symbol `syntax' --- a macro created by procedure->syntax.
  7250. The symbol `macro' --- a macro created by procedure->macro.
  7251. The symbol `macro!' --- a macro created by procedure->memoizing-macro.
  7252. The boolean #f --- if OBJ is not a macro object.
  7253. *** New function: (macro-name MACRO)
  7254. Return the name of the macro object MACRO's procedure, as returned by
  7255. procedure-name.
  7256. *** New function: (macro-transformer MACRO)
  7257. Return the transformer procedure for MACRO.
  7258. *** New syntax: (use-syntax MODULE ... TRANSFORMER)
  7259. Specify a new macro expander to use in the current module. Each
  7260. MODULE is a module name, with the same meaning as in the `use-modules'
  7261. form; each named module's exported bindings are added to the current
  7262. top-level environment. TRANSFORMER is an expression evaluated in the
  7263. resulting environment which must yield a procedure to use as the
  7264. module's eval transformer: every expression evaluated in this module
  7265. is passed to this function, and the result passed to the Guile
  7266. interpreter.
  7267. *** macro-eval! is removed. Use local-eval instead.
  7268. ** Some magic has been added to the printer to better handle user
  7269. written printing routines (like record printers, closure printers).
  7270. The problem is that these user written routines must have access to
  7271. the current `print-state' to be able to handle fancy things like
  7272. detection of circular references. These print-states have to be
  7273. passed to the builtin printing routines (display, write, etc) to
  7274. properly continue the print chain.
  7275. We didn't want to change all existing print code so that it
  7276. explicitly passes thru a print state in addition to a port. Instead,
  7277. we extented the possible values that the builtin printing routines
  7278. accept as a `port'. In addition to a normal port, they now also take
  7279. a pair of a normal port and a print-state. Printing will go to the
  7280. port and the print-state will be used to control the detection of
  7281. circular references, etc. If the builtin function does not care for a
  7282. print-state, it is simply ignored.
  7283. User written callbacks are now called with such a pair as their
  7284. `port', but because every function now accepts this pair as a PORT
  7285. argument, you don't have to worry about that. In fact, it is probably
  7286. safest to not check for these pairs.
  7287. However, it is sometimes necessary to continue a print chain on a
  7288. different port, for example to get a intermediate string
  7289. representation of the printed value, mangle that string somehow, and
  7290. then to finally print the mangled string. Use the new function
  7291. inherit-print-state OLD-PORT NEW-PORT
  7292. for this. It constructs a new `port' that prints to NEW-PORT but
  7293. inherits the print-state of OLD-PORT.
  7294. ** struct-vtable-offset renamed to vtable-offset-user
  7295. ** New constants: vtable-index-layout, vtable-index-vtable, vtable-index-printer
  7296. ** There is now a third optional argument to make-vtable-vtable
  7297. (and fourth to make-struct) when constructing new types (vtables).
  7298. This argument initializes field vtable-index-printer of the vtable.
  7299. ** The detection of circular references has been extended to structs.
  7300. That is, a structure that -- in the process of being printed -- prints
  7301. itself does not lead to infinite recursion.
  7302. ** There is now some basic support for fluids. Please read
  7303. "libguile/fluid.h" to find out more. It is accessible from Scheme with
  7304. the following functions and macros:
  7305. Function: make-fluid
  7306. Create a new fluid object. Fluids are not special variables or
  7307. some other extension to the semantics of Scheme, but rather
  7308. ordinary Scheme objects. You can store them into variables (that
  7309. are still lexically scoped, of course) or into any other place you
  7310. like. Every fluid has a initial value of `#f'.
  7311. Function: fluid? OBJ
  7312. Test whether OBJ is a fluid.
  7313. Function: fluid-ref FLUID
  7314. Function: fluid-set! FLUID VAL
  7315. Access/modify the fluid FLUID. Modifications are only visible
  7316. within the current dynamic root (that includes threads).
  7317. Function: with-fluids* FLUIDS VALUES THUNK
  7318. FLUIDS is a list of fluids and VALUES a corresponding list of
  7319. values for these fluids. Before THUNK gets called the values are
  7320. installed in the fluids and the old values of the fluids are
  7321. saved in the VALUES list. When the flow of control leaves THUNK
  7322. or reenters it, the values get swapped again. You might think of
  7323. this as a `safe-fluid-excursion'. Note that the VALUES list is
  7324. modified by `with-fluids*'.
  7325. Macro: with-fluids ((FLUID VALUE) ...) FORM ...
  7326. The same as `with-fluids*' but with a different syntax. It looks
  7327. just like `let', but both FLUID and VALUE are evaluated. Remember,
  7328. fluids are not special variables but ordinary objects. FLUID
  7329. should evaluate to a fluid.
  7330. ** Changes to system call interfaces:
  7331. *** close-port, close-input-port and close-output-port now return a
  7332. boolean instead of an `unspecified' object. #t means that the port
  7333. was successfully closed, while #f means it was already closed. It is
  7334. also now possible for these procedures to raise an exception if an
  7335. error occurs (some errors from write can be delayed until close.)
  7336. *** the first argument to chmod, fcntl, ftell and fseek can now be a
  7337. file descriptor.
  7338. *** the third argument to fcntl is now optional.
  7339. *** the first argument to chown can now be a file descriptor or a port.
  7340. *** the argument to stat can now be a port.
  7341. *** The following new procedures have been added (most use scsh
  7342. interfaces):
  7343. *** procedure: close PORT/FD
  7344. Similar to close-port (*note close-port: Closing Ports.), but also
  7345. works on file descriptors. A side effect of closing a file
  7346. descriptor is that any ports using that file descriptor are moved
  7347. to a different file descriptor and have their revealed counts set
  7348. to zero.
  7349. *** procedure: port->fdes PORT
  7350. Returns the integer file descriptor underlying PORT. As a side
  7351. effect the revealed count of PORT is incremented.
  7352. *** procedure: fdes->ports FDES
  7353. Returns a list of existing ports which have FDES as an underlying
  7354. file descriptor, without changing their revealed counts.
  7355. *** procedure: fdes->inport FDES
  7356. Returns an existing input port which has FDES as its underlying
  7357. file descriptor, if one exists, and increments its revealed count.
  7358. Otherwise, returns a new input port with a revealed count of 1.
  7359. *** procedure: fdes->outport FDES
  7360. Returns an existing output port which has FDES as its underlying
  7361. file descriptor, if one exists, and increments its revealed count.
  7362. Otherwise, returns a new output port with a revealed count of 1.
  7363. The next group of procedures perform a `dup2' system call, if NEWFD
  7364. (an integer) is supplied, otherwise a `dup'. The file descriptor to be
  7365. duplicated can be supplied as an integer or contained in a port. The
  7366. type of value returned varies depending on which procedure is used.
  7367. All procedures also have the side effect when performing `dup2' that
  7368. any ports using NEWFD are moved to a different file descriptor and have
  7369. their revealed counts set to zero.
  7370. *** procedure: dup->fdes PORT/FD [NEWFD]
  7371. Returns an integer file descriptor.
  7372. *** procedure: dup->inport PORT/FD [NEWFD]
  7373. Returns a new input port using the new file descriptor.
  7374. *** procedure: dup->outport PORT/FD [NEWFD]
  7375. Returns a new output port using the new file descriptor.
  7376. *** procedure: dup PORT/FD [NEWFD]
  7377. Returns a new port if PORT/FD is a port, with the same mode as the
  7378. supplied port, otherwise returns an integer file descriptor.
  7379. *** procedure: dup->port PORT/FD MODE [NEWFD]
  7380. Returns a new port using the new file descriptor. MODE supplies a
  7381. mode string for the port (*note open-file: File Ports.).
  7382. *** procedure: setenv NAME VALUE
  7383. Modifies the environment of the current process, which is also the
  7384. default environment inherited by child processes.
  7385. If VALUE is `#f', then NAME is removed from the environment.
  7386. Otherwise, the string NAME=VALUE is added to the environment,
  7387. replacing any existing string with name matching NAME.
  7388. The return value is unspecified.
  7389. *** procedure: truncate-file OBJ SIZE
  7390. Truncates the file referred to by OBJ to at most SIZE bytes. OBJ
  7391. can be a string containing a file name or an integer file
  7392. descriptor or port open for output on the file. The underlying
  7393. system calls are `truncate' and `ftruncate'.
  7394. The return value is unspecified.
  7395. *** procedure: setvbuf PORT MODE [SIZE]
  7396. Set the buffering mode for PORT. MODE can be:
  7397. `_IONBF'
  7398. non-buffered
  7399. `_IOLBF'
  7400. line buffered
  7401. `_IOFBF'
  7402. block buffered, using a newly allocated buffer of SIZE bytes.
  7403. However if SIZE is zero or unspecified, the port will be made
  7404. non-buffered.
  7405. This procedure should not be used after I/O has been performed with
  7406. the port.
  7407. Ports are usually block buffered by default, with a default buffer
  7408. size. Procedures e.g., *Note open-file: File Ports, which accept a
  7409. mode string allow `0' to be added to request an unbuffered port.
  7410. *** procedure: fsync PORT/FD
  7411. Copies any unwritten data for the specified output file descriptor
  7412. to disk. If PORT/FD is a port, its buffer is flushed before the
  7413. underlying file descriptor is fsync'd. The return value is
  7414. unspecified.
  7415. *** procedure: open-fdes PATH FLAGS [MODES]
  7416. Similar to `open' but returns a file descriptor instead of a port.
  7417. *** procedure: execle PATH ENV [ARG] ...
  7418. Similar to `execl', but the environment of the new process is
  7419. specified by ENV, which must be a list of strings as returned by
  7420. the `environ' procedure.
  7421. This procedure is currently implemented using the `execve' system
  7422. call, but we call it `execle' because of its Scheme calling
  7423. interface.
  7424. *** procedure: strerror ERRNO
  7425. Returns the Unix error message corresponding to ERRNO, an integer.
  7426. *** procedure: primitive-exit [STATUS]
  7427. Terminate the current process without unwinding the Scheme stack.
  7428. This is would typically be useful after a fork. The exit status
  7429. is STATUS if supplied, otherwise zero.
  7430. *** procedure: times
  7431. Returns an object with information about real and processor time.
  7432. The following procedures accept such an object as an argument and
  7433. return a selected component:
  7434. `tms:clock'
  7435. The current real time, expressed as time units relative to an
  7436. arbitrary base.
  7437. `tms:utime'
  7438. The CPU time units used by the calling process.
  7439. `tms:stime'
  7440. The CPU time units used by the system on behalf of the
  7441. calling process.
  7442. `tms:cutime'
  7443. The CPU time units used by terminated child processes of the
  7444. calling process, whose status has been collected (e.g., using
  7445. `waitpid').
  7446. `tms:cstime'
  7447. Similarly, the CPU times units used by the system on behalf of
  7448. terminated child processes.
  7449. ** Removed: list-length
  7450. ** Removed: list-append, list-append!
  7451. ** Removed: list-reverse, list-reverse!
  7452. ** array-map renamed to array-map!
  7453. ** serial-array-map renamed to serial-array-map!
  7454. ** catch doesn't take #f as first argument any longer
  7455. Previously, it was possible to pass #f instead of a key to `catch'.
  7456. That would cause `catch' to pass a jump buffer object to the procedure
  7457. passed as second argument. The procedure could then use this jump
  7458. buffer objekt as an argument to throw.
  7459. This mechanism has been removed since its utility doesn't motivate the
  7460. extra complexity it introduces.
  7461. ** The `#/' notation for lists now provokes a warning message from Guile.
  7462. This syntax will be removed from Guile in the near future.
  7463. To disable the warning message, set the GUILE_HUSH environment
  7464. variable to any non-empty value.
  7465. ** The newline character now prints as `#\newline', following the
  7466. normal Scheme notation, not `#\nl'.
  7467. * Changes to the gh_ interface
  7468. ** The gh_enter function now takes care of loading the Guile startup files.
  7469. gh_enter works by calling scm_boot_guile; see the remarks below.
  7470. ** Function: void gh_write (SCM x)
  7471. Write the printed representation of the scheme object x to the current
  7472. output port. Corresponds to the scheme level `write'.
  7473. ** gh_list_length renamed to gh_length.
  7474. ** vector handling routines
  7475. Several major changes. In particular, gh_vector() now resembles
  7476. (vector ...) (with a caveat -- see manual), and gh_make_vector() now
  7477. exists and behaves like (make-vector ...). gh_vset() and gh_vref()
  7478. have been renamed gh_vector_set_x() and gh_vector_ref(). Some missing
  7479. vector-related gh_ functions have been implemented.
  7480. ** pair and list routines
  7481. Implemented several of the R4RS pair and list functions that were
  7482. missing.
  7483. ** gh_scm2doubles, gh_doubles2scm, gh_doubles2dvect
  7484. New function. Converts double arrays back and forth between Scheme
  7485. and C.
  7486. * Changes to the scm_ interface
  7487. ** The function scm_boot_guile now takes care of loading the startup files.
  7488. Guile's primary initialization function, scm_boot_guile, now takes
  7489. care of loading `boot-9.scm', in the `ice-9' module, to initialize
  7490. Guile, define the module system, and put together some standard
  7491. bindings. It also loads `init.scm', which is intended to hold
  7492. site-specific initialization code.
  7493. Since Guile cannot operate properly until boot-9.scm is loaded, there
  7494. is no reason to separate loading boot-9.scm from Guile's other
  7495. initialization processes.
  7496. This job used to be done by scm_compile_shell_switches, which didn't
  7497. make much sense; in particular, it meant that people using Guile for
  7498. non-shell-like applications had to jump through hoops to get Guile
  7499. initialized properly.
  7500. ** The function scm_compile_shell_switches no longer loads the startup files.
  7501. Now, Guile always loads the startup files, whenever it is initialized;
  7502. see the notes above for scm_boot_guile and scm_load_startup_files.
  7503. ** Function: scm_load_startup_files
  7504. This new function takes care of loading Guile's initialization file
  7505. (`boot-9.scm'), and the site initialization file, `init.scm'. Since
  7506. this is always called by the Guile initialization process, it's
  7507. probably not too useful to call this yourself, but it's there anyway.
  7508. ** The semantics of smob marking have changed slightly.
  7509. The smob marking function (the `mark' member of the scm_smobfuns
  7510. structure) is no longer responsible for setting the mark bit on the
  7511. smob. The generic smob handling code in the garbage collector will
  7512. set this bit. The mark function need only ensure that any other
  7513. objects the smob refers to get marked.
  7514. Note that this change means that the smob's GC8MARK bit is typically
  7515. already set upon entry to the mark function. Thus, marking functions
  7516. which look like this:
  7517. {
  7518. if (SCM_GC8MARKP (ptr))
  7519. return SCM_BOOL_F;
  7520. SCM_SETGC8MARK (ptr);
  7521. ... mark objects to which the smob refers ...
  7522. }
  7523. are now incorrect, since they will return early, and fail to mark any
  7524. other objects the smob refers to. Some code in the Guile library used
  7525. to work this way.
  7526. ** The semantics of the I/O port functions in scm_ptobfuns have changed.
  7527. If you have implemented your own I/O port type, by writing the
  7528. functions required by the scm_ptobfuns and then calling scm_newptob,
  7529. you will need to change your functions slightly.
  7530. The functions in a scm_ptobfuns structure now expect the port itself
  7531. as their argument; they used to expect the `stream' member of the
  7532. port's scm_port_table structure. This allows functions in an
  7533. scm_ptobfuns structure to easily access the port's cell (and any flags
  7534. it its CAR), and the port's scm_port_table structure.
  7535. Guile now passes the I/O port itself as the `port' argument in the
  7536. following scm_ptobfuns functions:
  7537. int (*free) (SCM port);
  7538. int (*fputc) (int, SCM port);
  7539. int (*fputs) (char *, SCM port);
  7540. scm_sizet (*fwrite) SCM_P ((char *ptr,
  7541. scm_sizet size,
  7542. scm_sizet nitems,
  7543. SCM port));
  7544. int (*fflush) (SCM port);
  7545. int (*fgetc) (SCM port);
  7546. int (*fclose) (SCM port);
  7547. The interfaces to the `mark', `print', `equalp', and `fgets' methods
  7548. are unchanged.
  7549. If you have existing code which defines its own port types, it is easy
  7550. to convert your code to the new interface; simply apply SCM_STREAM to
  7551. the port argument to yield the value you code used to expect.
  7552. Note that since both the port and the stream have the same type in the
  7553. C code --- they are both SCM values --- the C compiler will not remind
  7554. you if you forget to update your scm_ptobfuns functions.
  7555. ** Function: int scm_internal_select (int fds,
  7556. SELECT_TYPE *rfds,
  7557. SELECT_TYPE *wfds,
  7558. SELECT_TYPE *efds,
  7559. struct timeval *timeout);
  7560. This is a replacement for the `select' function provided by the OS.
  7561. It enables I/O blocking and sleeping to happen for one cooperative
  7562. thread without blocking other threads. It also avoids busy-loops in
  7563. these situations. It is intended that all I/O blocking and sleeping
  7564. will finally go through this function. Currently, this function is
  7565. only available on systems providing `gettimeofday' and `select'.
  7566. ** Function: SCM scm_internal_stack_catch (SCM tag,
  7567. scm_catch_body_t body,
  7568. void *body_data,
  7569. scm_catch_handler_t handler,
  7570. void *handler_data)
  7571. A new sibling to the other two C level `catch' functions
  7572. scm_internal_catch and scm_internal_lazy_catch. Use it if you want
  7573. the stack to be saved automatically into the variable `the-last-stack'
  7574. (scm_the_last_stack_var) on error. This is necessary if you want to
  7575. use advanced error reporting, such as calling scm_display_error and
  7576. scm_display_backtrace. (They both take a stack object as argument.)
  7577. ** Function: SCM scm_spawn_thread (scm_catch_body_t body,
  7578. void *body_data,
  7579. scm_catch_handler_t handler,
  7580. void *handler_data)
  7581. Spawns a new thread. It does a job similar to
  7582. scm_call_with_new_thread but takes arguments more suitable when
  7583. spawning threads from application C code.
  7584. ** The hook scm_error_callback has been removed. It was originally
  7585. intended as a way for the user to install his own error handler. But
  7586. that method works badly since it intervenes between throw and catch,
  7587. thereby changing the semantics of expressions like (catch #t ...).
  7588. The correct way to do it is to use one of the C level catch functions
  7589. in throw.c: scm_internal_catch/lazy_catch/stack_catch.
  7590. ** Removed functions:
  7591. scm_obj_length, scm_list_length, scm_list_append, scm_list_append_x,
  7592. scm_list_reverse, scm_list_reverse_x
  7593. ** New macros: SCM_LISTn where n is one of the integers 0-9.
  7594. These can be used for pretty list creation from C. The idea is taken
  7595. from Erick Gallesio's STk.
  7596. ** scm_array_map renamed to scm_array_map_x
  7597. ** mbstrings are now removed
  7598. This means that the type codes scm_tc7_mb_string and
  7599. scm_tc7_mb_substring has been removed.
  7600. ** scm_gen_putc, scm_gen_puts, scm_gen_write, and scm_gen_getc have changed.
  7601. Since we no longer support multi-byte strings, these I/O functions
  7602. have been simplified, and renamed. Here are their old names, and
  7603. their new names and arguments:
  7604. scm_gen_putc -> void scm_putc (int c, SCM port);
  7605. scm_gen_puts -> void scm_puts (char *s, SCM port);
  7606. scm_gen_write -> void scm_lfwrite (char *ptr, scm_sizet size, SCM port);
  7607. scm_gen_getc -> void scm_getc (SCM port);
  7608. ** The macros SCM_TYP7D and SCM_TYP7SD has been removed.
  7609. ** The macro SCM_TYP7S has taken the role of the old SCM_TYP7D
  7610. SCM_TYP7S now masks away the bit which distinguishes substrings from
  7611. strings.
  7612. ** scm_catch_body_t: Backward incompatible change!
  7613. Body functions to scm_internal_catch and friends do not any longer
  7614. take a second argument. This is because it is no longer possible to
  7615. pass a #f arg to catch.
  7616. ** Calls to scm_protect_object and scm_unprotect now nest properly.
  7617. The function scm_protect_object protects its argument from being freed
  7618. by the garbage collector. scm_unprotect_object removes that
  7619. protection.
  7620. These functions now nest properly. That is, for every object O, there
  7621. is a counter which scm_protect_object(O) increments and
  7622. scm_unprotect_object(O) decrements, if the counter is greater than
  7623. zero. Every object's counter is zero when it is first created. If an
  7624. object's counter is greater than zero, the garbage collector will not
  7625. reclaim its storage.
  7626. This allows you to use scm_protect_object in your code without
  7627. worrying that some other function you call will call
  7628. scm_unprotect_object, and allow it to be freed. Assuming that the
  7629. functions you call are well-behaved, and unprotect only those objects
  7630. they protect, you can follow the same rule and have confidence that
  7631. objects will be freed only at appropriate times.
  7632. Changes in Guile 1.2 (released Tuesday, June 24 1997):
  7633. * Changes to the distribution
  7634. ** Nightly snapshots are now available from ftp.red-bean.com.
  7635. The old server, ftp.cyclic.com, has been relinquished to its rightful
  7636. owner.
  7637. Nightly snapshots of the Guile development sources are now available via
  7638. anonymous FTP from ftp.red-bean.com, as /pub/guile/guile-snap.tar.gz.
  7639. Via the web, that's: ftp://ftp.red-bean.com/pub/guile/guile-snap.tar.gz
  7640. For getit, that's: ftp.red-bean.com:/pub/guile/guile-snap.tar.gz
  7641. ** To run Guile without installing it, the procedure has changed a bit.
  7642. If you used a separate build directory to compile Guile, you'll need
  7643. to include the build directory in SCHEME_LOAD_PATH, as well as the
  7644. source directory. See the `INSTALL' file for examples.
  7645. * Changes to the procedure for linking libguile with your programs
  7646. ** The standard Guile load path for Scheme code now includes
  7647. $(datadir)/guile (usually /usr/local/share/guile). This means that
  7648. you can install your own Scheme files there, and Guile will find them.
  7649. (Previous versions of Guile only checked a directory whose name
  7650. contained the Guile version number, so you had to re-install or move
  7651. your Scheme sources each time you installed a fresh version of Guile.)
  7652. The load path also includes $(datadir)/guile/site; we recommend
  7653. putting individual Scheme files there. If you want to install a
  7654. package with multiple source files, create a directory for them under
  7655. $(datadir)/guile.
  7656. ** Guile 1.2 will now use the Rx regular expression library, if it is
  7657. installed on your system. When you are linking libguile into your own
  7658. programs, this means you will have to link against -lguile, -lqt (if
  7659. you configured Guile with thread support), and -lrx.
  7660. If you are using autoconf to generate configuration scripts for your
  7661. application, the following lines should suffice to add the appropriate
  7662. libraries to your link command:
  7663. ### Find Rx, quickthreads and libguile.
  7664. AC_CHECK_LIB(rx, main)
  7665. AC_CHECK_LIB(qt, main)
  7666. AC_CHECK_LIB(guile, scm_shell)
  7667. The Guile 1.2 distribution does not contain sources for the Rx
  7668. library, as Guile 1.0 did. If you want to use Rx, you'll need to
  7669. retrieve it from a GNU FTP site and install it separately.
  7670. * Changes to Scheme functions and syntax
  7671. ** The dynamic linking features of Guile are now enabled by default.
  7672. You can disable them by giving the `--disable-dynamic-linking' option
  7673. to configure.
  7674. (dynamic-link FILENAME)
  7675. Find the object file denoted by FILENAME (a string) and link it
  7676. into the running Guile application. When everything works out,
  7677. return a Scheme object suitable for representing the linked object
  7678. file. Otherwise an error is thrown. How object files are
  7679. searched is system dependent.
  7680. (dynamic-object? VAL)
  7681. Determine whether VAL represents a dynamically linked object file.
  7682. (dynamic-unlink DYNOBJ)
  7683. Unlink the indicated object file from the application. DYNOBJ
  7684. should be one of the values returned by `dynamic-link'.
  7685. (dynamic-func FUNCTION DYNOBJ)
  7686. Search the C function indicated by FUNCTION (a string or symbol)
  7687. in DYNOBJ and return some Scheme object that can later be used
  7688. with `dynamic-call' to actually call this function. Right now,
  7689. these Scheme objects are formed by casting the address of the
  7690. function to `long' and converting this number to its Scheme
  7691. representation.
  7692. (dynamic-call FUNCTION DYNOBJ)
  7693. Call the C function indicated by FUNCTION and DYNOBJ. The
  7694. function is passed no arguments and its return value is ignored.
  7695. When FUNCTION is something returned by `dynamic-func', call that
  7696. function and ignore DYNOBJ. When FUNCTION is a string (or symbol,
  7697. etc.), look it up in DYNOBJ; this is equivalent to
  7698. (dynamic-call (dynamic-func FUNCTION DYNOBJ) #f)
  7699. Interrupts are deferred while the C function is executing (with
  7700. SCM_DEFER_INTS/SCM_ALLOW_INTS).
  7701. (dynamic-args-call FUNCTION DYNOBJ ARGS)
  7702. Call the C function indicated by FUNCTION and DYNOBJ, but pass it
  7703. some arguments and return its return value. The C function is
  7704. expected to take two arguments and return an `int', just like
  7705. `main':
  7706. int c_func (int argc, char **argv);
  7707. ARGS must be a list of strings and is converted into an array of
  7708. `char *'. The array is passed in ARGV and its size in ARGC. The
  7709. return value is converted to a Scheme number and returned from the
  7710. call to `dynamic-args-call'.
  7711. When dynamic linking is disabled or not supported on your system,
  7712. the above functions throw errors, but they are still available.
  7713. Here is a small example that works on GNU/Linux:
  7714. (define libc-obj (dynamic-link "libc.so"))
  7715. (dynamic-args-call 'rand libc-obj '())
  7716. See the file `libguile/DYNAMIC-LINKING' for additional comments.
  7717. ** The #/ syntax for module names is depreciated, and will be removed
  7718. in a future version of Guile. Instead of
  7719. #/foo/bar/baz
  7720. instead write
  7721. (foo bar baz)
  7722. The latter syntax is more consistent with existing Lisp practice.
  7723. ** Guile now does fancier printing of structures. Structures are the
  7724. underlying implementation for records, which in turn are used to
  7725. implement modules, so all of these object now print differently and in
  7726. a more informative way.
  7727. The Scheme printer will examine the builtin variable *struct-printer*
  7728. whenever it needs to print a structure object. When this variable is
  7729. not `#f' it is deemed to be a procedure and will be applied to the
  7730. structure object and the output port. When *struct-printer* is `#f'
  7731. or the procedure return `#f' the structure object will be printed in
  7732. the boring #<struct 80458270> form.
  7733. This hook is used by some routines in ice-9/boot-9.scm to implement
  7734. type specific printing routines. Please read the comments there about
  7735. "printing structs".
  7736. One of the more specific uses of structs are records. The printing
  7737. procedure that could be passed to MAKE-RECORD-TYPE is now actually
  7738. called. It should behave like a *struct-printer* procedure (described
  7739. above).
  7740. ** Guile now supports a new R4RS-compliant syntax for keywords. A
  7741. token of the form #:NAME, where NAME has the same syntax as a Scheme
  7742. symbol, is the external representation of the keyword named NAME.
  7743. Keyword objects print using this syntax as well, so values containing
  7744. keyword objects can be read back into Guile. When used in an
  7745. expression, keywords are self-quoting objects.
  7746. Guile suports this read syntax, and uses this print syntax, regardless
  7747. of the current setting of the `keyword' read option. The `keyword'
  7748. read option only controls whether Guile recognizes the `:NAME' syntax,
  7749. which is incompatible with R4RS. (R4RS says such token represent
  7750. symbols.)
  7751. ** Guile has regular expression support again. Guile 1.0 included
  7752. functions for matching regular expressions, based on the Rx library.
  7753. In Guile 1.1, the Guile/Rx interface was removed to simplify the
  7754. distribution, and thus Guile had no regular expression support. Guile
  7755. 1.2 again supports the most commonly used functions, and supports all
  7756. of SCSH's regular expression functions.
  7757. If your system does not include a POSIX regular expression library,
  7758. and you have not linked Guile with a third-party regexp library such as
  7759. Rx, these functions will not be available. You can tell whether your
  7760. Guile installation includes regular expression support by checking
  7761. whether the `*features*' list includes the `regex' symbol.
  7762. *** regexp functions
  7763. By default, Guile supports POSIX extended regular expressions. That
  7764. means that the characters `(', `)', `+' and `?' are special, and must
  7765. be escaped if you wish to match the literal characters.
  7766. This regular expression interface was modeled after that implemented
  7767. by SCSH, the Scheme Shell. It is intended to be upwardly compatible
  7768. with SCSH regular expressions.
  7769. **** Function: string-match PATTERN STR [START]
  7770. Compile the string PATTERN into a regular expression and compare
  7771. it with STR. The optional numeric argument START specifies the
  7772. position of STR at which to begin matching.
  7773. `string-match' returns a "match structure" which describes what,
  7774. if anything, was matched by the regular expression. *Note Match
  7775. Structures::. If STR does not match PATTERN at all,
  7776. `string-match' returns `#f'.
  7777. Each time `string-match' is called, it must compile its PATTERN
  7778. argument into a regular expression structure. This operation is
  7779. expensive, which makes `string-match' inefficient if the same regular
  7780. expression is used several times (for example, in a loop). For better
  7781. performance, you can compile a regular expression in advance and then
  7782. match strings against the compiled regexp.
  7783. **** Function: make-regexp STR [FLAGS]
  7784. Compile the regular expression described by STR, and return the
  7785. compiled regexp structure. If STR does not describe a legal
  7786. regular expression, `make-regexp' throws a
  7787. `regular-expression-syntax' error.
  7788. FLAGS may be the bitwise-or of one or more of the following:
  7789. **** Constant: regexp/extended
  7790. Use POSIX Extended Regular Expression syntax when interpreting
  7791. STR. If not set, POSIX Basic Regular Expression syntax is used.
  7792. If the FLAGS argument is omitted, we assume regexp/extended.
  7793. **** Constant: regexp/icase
  7794. Do not differentiate case. Subsequent searches using the
  7795. returned regular expression will be case insensitive.
  7796. **** Constant: regexp/newline
  7797. Match-any-character operators don't match a newline.
  7798. A non-matching list ([^...]) not containing a newline matches a
  7799. newline.
  7800. Match-beginning-of-line operator (^) matches the empty string
  7801. immediately after a newline, regardless of whether the FLAGS
  7802. passed to regexp-exec contain regexp/notbol.
  7803. Match-end-of-line operator ($) matches the empty string
  7804. immediately before a newline, regardless of whether the FLAGS
  7805. passed to regexp-exec contain regexp/noteol.
  7806. **** Function: regexp-exec REGEXP STR [START [FLAGS]]
  7807. Match the compiled regular expression REGEXP against `str'. If
  7808. the optional integer START argument is provided, begin matching
  7809. from that position in the string. Return a match structure
  7810. describing the results of the match, or `#f' if no match could be
  7811. found.
  7812. FLAGS may be the bitwise-or of one or more of the following:
  7813. **** Constant: regexp/notbol
  7814. The match-beginning-of-line operator always fails to match (but
  7815. see the compilation flag regexp/newline above) This flag may be
  7816. used when different portions of a string are passed to
  7817. regexp-exec and the beginning of the string should not be
  7818. interpreted as the beginning of the line.
  7819. **** Constant: regexp/noteol
  7820. The match-end-of-line operator always fails to match (but see the
  7821. compilation flag regexp/newline above)
  7822. **** Function: regexp? OBJ
  7823. Return `#t' if OBJ is a compiled regular expression, or `#f'
  7824. otherwise.
  7825. Regular expressions are commonly used to find patterns in one string
  7826. and replace them with the contents of another string.
  7827. **** Function: regexp-substitute PORT MATCH [ITEM...]
  7828. Write to the output port PORT selected contents of the match
  7829. structure MATCH. Each ITEM specifies what should be written, and
  7830. may be one of the following arguments:
  7831. * A string. String arguments are written out verbatim.
  7832. * An integer. The submatch with that number is written.
  7833. * The symbol `pre'. The portion of the matched string preceding
  7834. the regexp match is written.
  7835. * The symbol `post'. The portion of the matched string
  7836. following the regexp match is written.
  7837. PORT may be `#f', in which case nothing is written; instead,
  7838. `regexp-substitute' constructs a string from the specified ITEMs
  7839. and returns that.
  7840. **** Function: regexp-substitute/global PORT REGEXP TARGET [ITEM...]
  7841. Similar to `regexp-substitute', but can be used to perform global
  7842. substitutions on STR. Instead of taking a match structure as an
  7843. argument, `regexp-substitute/global' takes two string arguments: a
  7844. REGEXP string describing a regular expression, and a TARGET string
  7845. which should be matched against this regular expression.
  7846. Each ITEM behaves as in REGEXP-SUBSTITUTE, with the following
  7847. exceptions:
  7848. * A function may be supplied. When this function is called, it
  7849. will be passed one argument: a match structure for a given
  7850. regular expression match. It should return a string to be
  7851. written out to PORT.
  7852. * The `post' symbol causes `regexp-substitute/global' to recurse
  7853. on the unmatched portion of STR. This *must* be supplied in
  7854. order to perform global search-and-replace on STR; if it is
  7855. not present among the ITEMs, then `regexp-substitute/global'
  7856. will return after processing a single match.
  7857. *** Match Structures
  7858. A "match structure" is the object returned by `string-match' and
  7859. `regexp-exec'. It describes which portion of a string, if any, matched
  7860. the given regular expression. Match structures include: a reference to
  7861. the string that was checked for matches; the starting and ending
  7862. positions of the regexp match; and, if the regexp included any
  7863. parenthesized subexpressions, the starting and ending positions of each
  7864. submatch.
  7865. In each of the regexp match functions described below, the `match'
  7866. argument must be a match structure returned by a previous call to
  7867. `string-match' or `regexp-exec'. Most of these functions return some
  7868. information about the original target string that was matched against a
  7869. regular expression; we will call that string TARGET for easy reference.
  7870. **** Function: regexp-match? OBJ
  7871. Return `#t' if OBJ is a match structure returned by a previous
  7872. call to `regexp-exec', or `#f' otherwise.
  7873. **** Function: match:substring MATCH [N]
  7874. Return the portion of TARGET matched by subexpression number N.
  7875. Submatch 0 (the default) represents the entire regexp match. If
  7876. the regular expression as a whole matched, but the subexpression
  7877. number N did not match, return `#f'.
  7878. **** Function: match:start MATCH [N]
  7879. Return the starting position of submatch number N.
  7880. **** Function: match:end MATCH [N]
  7881. Return the ending position of submatch number N.
  7882. **** Function: match:prefix MATCH
  7883. Return the unmatched portion of TARGET preceding the regexp match.
  7884. **** Function: match:suffix MATCH
  7885. Return the unmatched portion of TARGET following the regexp match.
  7886. **** Function: match:count MATCH
  7887. Return the number of parenthesized subexpressions from MATCH.
  7888. Note that the entire regular expression match itself counts as a
  7889. subexpression, and failed submatches are included in the count.
  7890. **** Function: match:string MATCH
  7891. Return the original TARGET string.
  7892. *** Backslash Escapes
  7893. Sometimes you will want a regexp to match characters like `*' or `$'
  7894. exactly. For example, to check whether a particular string represents
  7895. a menu entry from an Info node, it would be useful to match it against
  7896. a regexp like `^* [^:]*::'. However, this won't work; because the
  7897. asterisk is a metacharacter, it won't match the `*' at the beginning of
  7898. the string. In this case, we want to make the first asterisk un-magic.
  7899. You can do this by preceding the metacharacter with a backslash
  7900. character `\'. (This is also called "quoting" the metacharacter, and
  7901. is known as a "backslash escape".) When Guile sees a backslash in a
  7902. regular expression, it considers the following glyph to be an ordinary
  7903. character, no matter what special meaning it would ordinarily have.
  7904. Therefore, we can make the above example work by changing the regexp to
  7905. `^\* [^:]*::'. The `\*' sequence tells the regular expression engine
  7906. to match only a single asterisk in the target string.
  7907. Since the backslash is itself a metacharacter, you may force a
  7908. regexp to match a backslash in the target string by preceding the
  7909. backslash with itself. For example, to find variable references in a
  7910. TeX program, you might want to find occurrences of the string `\let\'
  7911. followed by any number of alphabetic characters. The regular expression
  7912. `\\let\\[A-Za-z]*' would do this: the double backslashes in the regexp
  7913. each match a single backslash in the target string.
  7914. **** Function: regexp-quote STR
  7915. Quote each special character found in STR with a backslash, and
  7916. return the resulting string.
  7917. *Very important:* Using backslash escapes in Guile source code (as
  7918. in Emacs Lisp or C) can be tricky, because the backslash character has
  7919. special meaning for the Guile reader. For example, if Guile encounters
  7920. the character sequence `\n' in the middle of a string while processing
  7921. Scheme code, it replaces those characters with a newline character.
  7922. Similarly, the character sequence `\t' is replaced by a horizontal tab.
  7923. Several of these "escape sequences" are processed by the Guile reader
  7924. before your code is executed. Unrecognized escape sequences are
  7925. ignored: if the characters `\*' appear in a string, they will be
  7926. translated to the single character `*'.
  7927. This translation is obviously undesirable for regular expressions,
  7928. since we want to be able to include backslashes in a string in order to
  7929. escape regexp metacharacters. Therefore, to make sure that a backslash
  7930. is preserved in a string in your Guile program, you must use *two*
  7931. consecutive backslashes:
  7932. (define Info-menu-entry-pattern (make-regexp "^\\* [^:]*"))
  7933. The string in this example is preprocessed by the Guile reader before
  7934. any code is executed. The resulting argument to `make-regexp' is the
  7935. string `^\* [^:]*', which is what we really want.
  7936. This also means that in order to write a regular expression that
  7937. matches a single backslash character, the regular expression string in
  7938. the source code must include *four* backslashes. Each consecutive pair
  7939. of backslashes gets translated by the Guile reader to a single
  7940. backslash, and the resulting double-backslash is interpreted by the
  7941. regexp engine as matching a single backslash character. Hence:
  7942. (define tex-variable-pattern (make-regexp "\\\\let\\\\=[A-Za-z]*"))
  7943. The reason for the unwieldiness of this syntax is historical. Both
  7944. regular expression pattern matchers and Unix string processing systems
  7945. have traditionally used backslashes with the special meanings described
  7946. above. The POSIX regular expression specification and ANSI C standard
  7947. both require these semantics. Attempting to abandon either convention
  7948. would cause other kinds of compatibility problems, possibly more severe
  7949. ones. Therefore, without extending the Scheme reader to support
  7950. strings with different quoting conventions (an ungainly and confusing
  7951. extension when implemented in other languages), we must adhere to this
  7952. cumbersome escape syntax.
  7953. * Changes to the gh_ interface
  7954. * Changes to the scm_ interface
  7955. * Changes to system call interfaces:
  7956. ** The value returned by `raise' is now unspecified. It throws an exception
  7957. if an error occurs.
  7958. *** A new procedure `sigaction' can be used to install signal handlers
  7959. (sigaction signum [action] [flags])
  7960. signum is the signal number, which can be specified using the value
  7961. of SIGINT etc.
  7962. If action is omitted, sigaction returns a pair: the CAR is the current
  7963. signal hander, which will be either an integer with the value SIG_DFL
  7964. (default action) or SIG_IGN (ignore), or the Scheme procedure which
  7965. handles the signal, or #f if a non-Scheme procedure handles the
  7966. signal. The CDR contains the current sigaction flags for the handler.
  7967. If action is provided, it is installed as the new handler for signum.
  7968. action can be a Scheme procedure taking one argument, or the value of
  7969. SIG_DFL (default action) or SIG_IGN (ignore), or #f to restore
  7970. whatever signal handler was installed before sigaction was first used.
  7971. Flags can optionally be specified for the new handler (SA_RESTART is
  7972. always used if the system provides it, so need not be specified.) The
  7973. return value is a pair with information about the old handler as
  7974. described above.
  7975. This interface does not provide access to the "signal blocking"
  7976. facility. Maybe this is not needed, since the thread support may
  7977. provide solutions to the problem of consistent access to data
  7978. structures.
  7979. *** A new procedure `flush-all-ports' is equivalent to running
  7980. `force-output' on every port open for output.
  7981. ** Guile now provides information on how it was built, via the new
  7982. global variable, %guile-build-info. This variable records the values
  7983. of the standard GNU makefile directory variables as an assocation
  7984. list, mapping variable names (symbols) onto directory paths (strings).
  7985. For example, to find out where the Guile link libraries were
  7986. installed, you can say:
  7987. guile -c "(display (assq-ref %guile-build-info 'libdir)) (newline)"
  7988. * Changes to the scm_ interface
  7989. ** The new function scm_handle_by_message_noexit is just like the
  7990. existing scm_handle_by_message function, except that it doesn't call
  7991. exit to terminate the process. Instead, it prints a message and just
  7992. returns #f. This might be a more appropriate catch-all handler for
  7993. new dynamic roots and threads.
  7994. Changes in Guile 1.1 (released Friday, May 16 1997):
  7995. * Changes to the distribution.
  7996. The Guile 1.0 distribution has been split up into several smaller
  7997. pieces:
  7998. guile-core --- the Guile interpreter itself.
  7999. guile-tcltk --- the interface between the Guile interpreter and
  8000. Tcl/Tk; Tcl is an interpreter for a stringy language, and Tk
  8001. is a toolkit for building graphical user interfaces.
  8002. guile-rgx-ctax --- the interface between Guile and the Rx regular
  8003. expression matcher, and the translator for the Ctax
  8004. programming language. These are packaged together because the
  8005. Ctax translator uses Rx to parse Ctax source code.
  8006. This NEWS file describes the changes made to guile-core since the 1.0
  8007. release.
  8008. We no longer distribute the documentation, since it was either out of
  8009. date, or incomplete. As soon as we have current documentation, we
  8010. will distribute it.
  8011. * Changes to the stand-alone interpreter
  8012. ** guile now accepts command-line arguments compatible with SCSH, Olin
  8013. Shivers' Scheme Shell.
  8014. In general, arguments are evaluated from left to right, but there are
  8015. exceptions. The following switches stop argument processing, and
  8016. stash all remaining command-line arguments as the value returned by
  8017. the (command-line) function.
  8018. -s SCRIPT load Scheme source code from FILE, and exit
  8019. -c EXPR evalute Scheme expression EXPR, and exit
  8020. -- stop scanning arguments; run interactively
  8021. The switches below are processed as they are encountered.
  8022. -l FILE load Scheme source code from FILE
  8023. -e FUNCTION after reading script, apply FUNCTION to
  8024. command line arguments
  8025. -ds do -s script at this point
  8026. --emacs enable Emacs protocol (experimental)
  8027. -h, --help display this help and exit
  8028. -v, --version display version information and exit
  8029. \ read arguments from following script lines
  8030. So, for example, here is a Guile script named `ekko' (thanks, Olin)
  8031. which re-implements the traditional "echo" command:
  8032. #!/usr/local/bin/guile -s
  8033. !#
  8034. (define (main args)
  8035. (map (lambda (arg) (display arg) (display " "))
  8036. (cdr args))
  8037. (newline))
  8038. (main (command-line))
  8039. Suppose we invoke this script as follows:
  8040. ekko a speckled gecko
  8041. Through the magic of Unix script processing (triggered by the `#!'
  8042. token at the top of the file), /usr/local/bin/guile receives the
  8043. following list of command-line arguments:
  8044. ("-s" "./ekko" "a" "speckled" "gecko")
  8045. Unix inserts the name of the script after the argument specified on
  8046. the first line of the file (in this case, "-s"), and then follows that
  8047. with the arguments given to the script. Guile loads the script, which
  8048. defines the `main' function, and then applies it to the list of
  8049. remaining command-line arguments, ("a" "speckled" "gecko").
  8050. In Unix, the first line of a script file must take the following form:
  8051. #!INTERPRETER ARGUMENT
  8052. where INTERPRETER is the absolute filename of the interpreter
  8053. executable, and ARGUMENT is a single command-line argument to pass to
  8054. the interpreter.
  8055. You may only pass one argument to the interpreter, and its length is
  8056. limited. These restrictions can be annoying to work around, so Guile
  8057. provides a general mechanism (borrowed from, and compatible with,
  8058. SCSH) for circumventing them.
  8059. If the ARGUMENT in a Guile script is a single backslash character,
  8060. `\', Guile will open the script file, parse arguments from its second
  8061. and subsequent lines, and replace the `\' with them. So, for example,
  8062. here is another implementation of the `ekko' script:
  8063. #!/usr/local/bin/guile \
  8064. -e main -s
  8065. !#
  8066. (define (main args)
  8067. (for-each (lambda (arg) (display arg) (display " "))
  8068. (cdr args))
  8069. (newline))
  8070. If the user invokes this script as follows:
  8071. ekko a speckled gecko
  8072. Unix expands this into
  8073. /usr/local/bin/guile \ ekko a speckled gecko
  8074. When Guile sees the `\' argument, it replaces it with the arguments
  8075. read from the second line of the script, producing:
  8076. /usr/local/bin/guile -e main -s ekko a speckled gecko
  8077. This tells Guile to load the `ekko' script, and apply the function
  8078. `main' to the argument list ("a" "speckled" "gecko").
  8079. Here is how Guile parses the command-line arguments:
  8080. - Each space character terminates an argument. This means that two
  8081. spaces in a row introduce an empty-string argument.
  8082. - The tab character is not permitted (unless you quote it with the
  8083. backslash character, as described below), to avoid confusion.
  8084. - The newline character terminates the sequence of arguments, and will
  8085. also terminate a final non-empty argument. (However, a newline
  8086. following a space will not introduce a final empty-string argument;
  8087. it only terminates the argument list.)
  8088. - The backslash character is the escape character. It escapes
  8089. backslash, space, tab, and newline. The ANSI C escape sequences
  8090. like \n and \t are also supported. These produce argument
  8091. constituents; the two-character combination \n doesn't act like a
  8092. terminating newline. The escape sequence \NNN for exactly three
  8093. octal digits reads as the character whose ASCII code is NNN. As
  8094. above, characters produced this way are argument constituents.
  8095. Backslash followed by other characters is not allowed.
  8096. * Changes to the procedure for linking libguile with your programs
  8097. ** Guile now builds and installs a shared guile library, if your
  8098. system support shared libraries. (It still builds a static library on
  8099. all systems.) Guile automatically detects whether your system
  8100. supports shared libraries. To prevent Guile from buildisg shared
  8101. libraries, pass the `--disable-shared' flag to the configure script.
  8102. Guile takes longer to compile when it builds shared libraries, because
  8103. it must compile every file twice --- once to produce position-
  8104. independent object code, and once to produce normal object code.
  8105. ** The libthreads library has been merged into libguile.
  8106. To link a program against Guile, you now need only link against
  8107. -lguile and -lqt; -lthreads is no longer needed. If you are using
  8108. autoconf to generate configuration scripts for your application, the
  8109. following lines should suffice to add the appropriate libraries to
  8110. your link command:
  8111. ### Find quickthreads and libguile.
  8112. AC_CHECK_LIB(qt, main)
  8113. AC_CHECK_LIB(guile, scm_shell)
  8114. * Changes to Scheme functions
  8115. ** Guile Scheme's special syntax for keyword objects is now optional,
  8116. and disabled by default.
  8117. The syntax variation from R4RS made it difficult to port some
  8118. interesting packages to Guile. The routines which accepted keyword
  8119. arguments (mostly in the module system) have been modified to also
  8120. accept symbols whose names begin with `:'.
  8121. To change the keyword syntax, you must first import the (ice-9 debug)
  8122. module:
  8123. (use-modules (ice-9 debug))
  8124. Then you can enable the keyword syntax as follows:
  8125. (read-set! keywords 'prefix)
  8126. To disable keyword syntax, do this:
  8127. (read-set! keywords #f)
  8128. ** Many more primitive functions accept shared substrings as
  8129. arguments. In the past, these functions required normal, mutable
  8130. strings as arguments, although they never made use of this
  8131. restriction.
  8132. ** The uniform array functions now operate on byte vectors. These
  8133. functions are `array-fill!', `serial-array-copy!', `array-copy!',
  8134. `serial-array-map', `array-map', `array-for-each', and
  8135. `array-index-map!'.
  8136. ** The new functions `trace' and `untrace' implement simple debugging
  8137. support for Scheme functions.
  8138. The `trace' function accepts any number of procedures as arguments,
  8139. and tells the Guile interpreter to display each procedure's name and
  8140. arguments each time the procedure is invoked. When invoked with no
  8141. arguments, `trace' returns the list of procedures currently being
  8142. traced.
  8143. The `untrace' function accepts any number of procedures as arguments,
  8144. and tells the Guile interpreter not to trace them any more. When
  8145. invoked with no arguments, `untrace' untraces all curretly traced
  8146. procedures.
  8147. The tracing in Guile has an advantage over most other systems: we
  8148. don't create new procedure objects, but mark the procedure objects
  8149. themselves. This means that anonymous and internal procedures can be
  8150. traced.
  8151. ** The function `assert-repl-prompt' has been renamed to
  8152. `set-repl-prompt!'. It takes one argument, PROMPT.
  8153. - If PROMPT is #f, the Guile read-eval-print loop will not prompt.
  8154. - If PROMPT is a string, we use it as a prompt.
  8155. - If PROMPT is a procedure accepting no arguments, we call it, and
  8156. display the result as a prompt.
  8157. - Otherwise, we display "> ".
  8158. ** The new function `eval-string' reads Scheme expressions from a
  8159. string and evaluates them, returning the value of the last expression
  8160. in the string. If the string contains no expressions, it returns an
  8161. unspecified value.
  8162. ** The new function `thunk?' returns true iff its argument is a
  8163. procedure of zero arguments.
  8164. ** `defined?' is now a builtin function, instead of syntax. This
  8165. means that its argument should be quoted. It returns #t iff its
  8166. argument is bound in the current module.
  8167. ** The new syntax `use-modules' allows you to add new modules to your
  8168. environment without re-typing a complete `define-module' form. It
  8169. accepts any number of module names as arguments, and imports their
  8170. public bindings into the current module.
  8171. ** The new function (module-defined? NAME MODULE) returns true iff
  8172. NAME, a symbol, is defined in MODULE, a module object.
  8173. ** The new function `builtin-bindings' creates and returns a hash
  8174. table containing copies of all the root module's bindings.
  8175. ** The new function `builtin-weak-bindings' does the same as
  8176. `builtin-bindings', but creates a doubly-weak hash table.
  8177. ** The `equal?' function now considers variable objects to be
  8178. equivalent if they have the same name and the same value.
  8179. ** The new function `command-line' returns the command-line arguments
  8180. given to Guile, as a list of strings.
  8181. When using guile as a script interpreter, `command-line' returns the
  8182. script's arguments; those processed by the interpreter (like `-s' or
  8183. `-c') are omitted. (In other words, you get the normal, expected
  8184. behavior.) Any application that uses scm_shell to process its
  8185. command-line arguments gets this behavior as well.
  8186. ** The new function `load-user-init' looks for a file called `.guile'
  8187. in the user's home directory, and loads it if it exists. This is
  8188. mostly for use by the code generated by scm_compile_shell_switches,
  8189. but we thought it might also be useful in other circumstances.
  8190. ** The new function `log10' returns the base-10 logarithm of its
  8191. argument.
  8192. ** Changes to I/O functions
  8193. *** The functions `read', `primitive-load', `read-and-eval!', and
  8194. `primitive-load-path' no longer take optional arguments controlling
  8195. case insensitivity and a `#' parser.
  8196. Case sensitivity is now controlled by a read option called
  8197. `case-insensitive'. The user can add new `#' syntaxes with the
  8198. `read-hash-extend' function (see below).
  8199. *** The new function `read-hash-extend' allows the user to change the
  8200. syntax of Guile Scheme in a somewhat controlled way.
  8201. (read-hash-extend CHAR PROC)
  8202. When parsing S-expressions, if we read a `#' character followed by
  8203. the character CHAR, use PROC to parse an object from the stream.
  8204. If PROC is #f, remove any parsing procedure registered for CHAR.
  8205. The reader applies PROC to two arguments: CHAR and an input port.
  8206. *** The new functions read-delimited and read-delimited! provide a
  8207. general mechanism for doing delimited input on streams.
  8208. (read-delimited DELIMS [PORT HANDLE-DELIM])
  8209. Read until we encounter one of the characters in DELIMS (a string),
  8210. or end-of-file. PORT is the input port to read from; it defaults to
  8211. the current input port. The HANDLE-DELIM parameter determines how
  8212. the terminating character is handled; it should be one of the
  8213. following symbols:
  8214. 'trim omit delimiter from result
  8215. 'peek leave delimiter character in input stream
  8216. 'concat append delimiter character to returned value
  8217. 'split return a pair: (RESULT . TERMINATOR)
  8218. HANDLE-DELIM defaults to 'peek.
  8219. (read-delimited! DELIMS BUF [PORT HANDLE-DELIM START END])
  8220. A side-effecting variant of `read-delimited'.
  8221. The data is written into the string BUF at the indices in the
  8222. half-open interval [START, END); the default interval is the whole
  8223. string: START = 0 and END = (string-length BUF). The values of
  8224. START and END must specify a well-defined interval in BUF, i.e.
  8225. 0 <= START <= END <= (string-length BUF).
  8226. It returns NBYTES, the number of bytes read. If the buffer filled
  8227. up without a delimiter character being found, it returns #f. If the
  8228. port is at EOF when the read starts, it returns the EOF object.
  8229. If an integer is returned (i.e., the read is successfully terminated
  8230. by reading a delimiter character), then the HANDLE-DELIM parameter
  8231. determines how to handle the terminating character. It is described
  8232. above, and defaults to 'peek.
  8233. (The descriptions of these functions were borrowed from the SCSH
  8234. manual, by Olin Shivers and Brian Carlstrom.)
  8235. *** The `%read-delimited!' function is the primitive used to implement
  8236. `read-delimited' and `read-delimited!'.
  8237. (%read-delimited! DELIMS BUF GOBBLE? [PORT START END])
  8238. This returns a pair of values: (TERMINATOR . NUM-READ).
  8239. - TERMINATOR describes why the read was terminated. If it is a
  8240. character or the eof object, then that is the value that terminated
  8241. the read. If it is #f, the function filled the buffer without finding
  8242. a delimiting character.
  8243. - NUM-READ is the number of characters read into BUF.
  8244. If the read is successfully terminated by reading a delimiter
  8245. character, then the gobble? parameter determines what to do with the
  8246. terminating character. If true, the character is removed from the
  8247. input stream; if false, the character is left in the input stream
  8248. where a subsequent read operation will retrieve it. In either case,
  8249. the character is also the first value returned by the procedure call.
  8250. (The descriptions of this function was borrowed from the SCSH manual,
  8251. by Olin Shivers and Brian Carlstrom.)
  8252. *** The `read-line' and `read-line!' functions have changed; they now
  8253. trim the terminator by default; previously they appended it to the
  8254. returned string. For the old behavior, use (read-line PORT 'concat).
  8255. *** The functions `uniform-array-read!' and `uniform-array-write!' now
  8256. take new optional START and END arguments, specifying the region of
  8257. the array to read and write.
  8258. *** The `ungetc-char-ready?' function has been removed. We feel it's
  8259. inappropriate for an interface to expose implementation details this
  8260. way.
  8261. ** Changes to the Unix library and system call interface
  8262. *** The new fcntl function provides access to the Unix `fcntl' system
  8263. call.
  8264. (fcntl PORT COMMAND VALUE)
  8265. Apply COMMAND to PORT's file descriptor, with VALUE as an argument.
  8266. Values for COMMAND are:
  8267. F_DUPFD duplicate a file descriptor
  8268. F_GETFD read the descriptor's close-on-exec flag
  8269. F_SETFD set the descriptor's close-on-exec flag to VALUE
  8270. F_GETFL read the descriptor's flags, as set on open
  8271. F_SETFL set the descriptor's flags, as set on open to VALUE
  8272. F_GETOWN return the process ID of a socket's owner, for SIGIO
  8273. F_SETOWN set the process that owns a socket to VALUE, for SIGIO
  8274. FD_CLOEXEC not sure what this is
  8275. For details, see the documentation for the fcntl system call.
  8276. *** The arguments to `select' have changed, for compatibility with
  8277. SCSH. The TIMEOUT parameter may now be non-integral, yielding the
  8278. expected behavior. The MILLISECONDS parameter has been changed to
  8279. MICROSECONDS, to more closely resemble the underlying system call.
  8280. The RVEC, WVEC, and EVEC arguments can now be vectors; the type of the
  8281. corresponding return set will be the same.
  8282. *** The arguments to the `mknod' system call have changed. They are
  8283. now:
  8284. (mknod PATH TYPE PERMS DEV)
  8285. Create a new file (`node') in the file system. PATH is the name of
  8286. the file to create. TYPE is the kind of file to create; it should
  8287. be 'fifo, 'block-special, or 'char-special. PERMS specifies the
  8288. permission bits to give the newly created file. If TYPE is
  8289. 'block-special or 'char-special, DEV specifies which device the
  8290. special file refers to; its interpretation depends on the kind of
  8291. special file being created.
  8292. *** The `fork' function has been renamed to `primitive-fork', to avoid
  8293. clashing with various SCSH forks.
  8294. *** The `recv' and `recvfrom' functions have been renamed to `recv!'
  8295. and `recvfrom!'. They no longer accept a size for a second argument;
  8296. you must pass a string to hold the received value. They no longer
  8297. return the buffer. Instead, `recv' returns the length of the message
  8298. received, and `recvfrom' returns a pair containing the packet's length
  8299. and originating address.
  8300. *** The file descriptor datatype has been removed, as have the
  8301. `read-fd', `write-fd', `close', `lseek', and `dup' functions.
  8302. We plan to replace these functions with a SCSH-compatible interface.
  8303. *** The `create' function has been removed; it's just a special case
  8304. of `open'.
  8305. *** There are new functions to break down process termination status
  8306. values. In the descriptions below, STATUS is a value returned by
  8307. `waitpid'.
  8308. (status:exit-val STATUS)
  8309. If the child process exited normally, this function returns the exit
  8310. code for the child process (i.e., the value passed to exit, or
  8311. returned from main). If the child process did not exit normally,
  8312. this function returns #f.
  8313. (status:stop-sig STATUS)
  8314. If the child process was suspended by a signal, this function
  8315. returns the signal that suspended the child. Otherwise, it returns
  8316. #f.
  8317. (status:term-sig STATUS)
  8318. If the child process terminated abnormally, this function returns
  8319. the signal that terminated the child. Otherwise, this function
  8320. returns false.
  8321. POSIX promises that exactly one of these functions will return true on
  8322. a valid STATUS value.
  8323. These functions are compatible with SCSH.
  8324. *** There are new accessors and setters for the broken-out time vectors
  8325. returned by `localtime', `gmtime', and that ilk. They are:
  8326. Component Accessor Setter
  8327. ========================= ============ ============
  8328. seconds tm:sec set-tm:sec
  8329. minutes tm:min set-tm:min
  8330. hours tm:hour set-tm:hour
  8331. day of the month tm:mday set-tm:mday
  8332. month tm:mon set-tm:mon
  8333. year tm:year set-tm:year
  8334. day of the week tm:wday set-tm:wday
  8335. day in the year tm:yday set-tm:yday
  8336. daylight saving time tm:isdst set-tm:isdst
  8337. GMT offset, seconds tm:gmtoff set-tm:gmtoff
  8338. name of time zone tm:zone set-tm:zone
  8339. *** There are new accessors for the vectors returned by `uname',
  8340. describing the host system:
  8341. Component Accessor
  8342. ============================================== ================
  8343. name of the operating system implementation utsname:sysname
  8344. network name of this machine utsname:nodename
  8345. release level of the operating system utsname:release
  8346. version level of the operating system utsname:version
  8347. machine hardware platform utsname:machine
  8348. *** There are new accessors for the vectors returned by `getpw',
  8349. `getpwnam', `getpwuid', and `getpwent', describing entries from the
  8350. system's user database:
  8351. Component Accessor
  8352. ====================== =================
  8353. user name passwd:name
  8354. user password passwd:passwd
  8355. user id passwd:uid
  8356. group id passwd:gid
  8357. real name passwd:gecos
  8358. home directory passwd:dir
  8359. shell program passwd:shell
  8360. *** There are new accessors for the vectors returned by `getgr',
  8361. `getgrnam', `getgrgid', and `getgrent', describing entries from the
  8362. system's group database:
  8363. Component Accessor
  8364. ======================= ============
  8365. group name group:name
  8366. group password group:passwd
  8367. group id group:gid
  8368. group members group:mem
  8369. *** There are new accessors for the vectors returned by `gethost',
  8370. `gethostbyaddr', `gethostbyname', and `gethostent', describing
  8371. internet hosts:
  8372. Component Accessor
  8373. ========================= ===============
  8374. official name of host hostent:name
  8375. alias list hostent:aliases
  8376. host address type hostent:addrtype
  8377. length of address hostent:length
  8378. list of addresses hostent:addr-list
  8379. *** There are new accessors for the vectors returned by `getnet',
  8380. `getnetbyaddr', `getnetbyname', and `getnetent', describing internet
  8381. networks:
  8382. Component Accessor
  8383. ========================= ===============
  8384. official name of net netent:name
  8385. alias list netent:aliases
  8386. net number type netent:addrtype
  8387. net number netent:net
  8388. *** There are new accessors for the vectors returned by `getproto',
  8389. `getprotobyname', `getprotobynumber', and `getprotoent', describing
  8390. internet protocols:
  8391. Component Accessor
  8392. ========================= ===============
  8393. official protocol name protoent:name
  8394. alias list protoent:aliases
  8395. protocol number protoent:proto
  8396. *** There are new accessors for the vectors returned by `getserv',
  8397. `getservbyname', `getservbyport', and `getservent', describing
  8398. internet protocols:
  8399. Component Accessor
  8400. ========================= ===============
  8401. official service name servent:name
  8402. alias list servent:aliases
  8403. port number servent:port
  8404. protocol to use servent:proto
  8405. *** There are new accessors for the sockaddr structures returned by
  8406. `accept', `getsockname', `getpeername', `recvfrom!':
  8407. Component Accessor
  8408. ======================================== ===============
  8409. address format (`family') sockaddr:fam
  8410. path, for file domain addresses sockaddr:path
  8411. address, for internet domain addresses sockaddr:addr
  8412. TCP or UDP port, for internet sockaddr:port
  8413. *** The `getpwent', `getgrent', `gethostent', `getnetent',
  8414. `getprotoent', and `getservent' functions now return #f at the end of
  8415. the user database. (They used to throw an exception.)
  8416. Note that calling MUMBLEent function is equivalent to calling the
  8417. corresponding MUMBLE function with no arguments.
  8418. *** The `setpwent', `setgrent', `sethostent', `setnetent',
  8419. `setprotoent', and `setservent' routines now take no arguments.
  8420. *** The `gethost', `getproto', `getnet', and `getserv' functions now
  8421. provide more useful information when they throw an exception.
  8422. *** The `lnaof' function has been renamed to `inet-lnaof'.
  8423. *** Guile now claims to have the `current-time' feature.
  8424. *** The `mktime' function now takes an optional second argument ZONE,
  8425. giving the time zone to use for the conversion. ZONE should be a
  8426. string, in the same format as expected for the "TZ" environment variable.
  8427. *** The `strptime' function now returns a pair (TIME . COUNT), where
  8428. TIME is the parsed time as a vector, and COUNT is the number of
  8429. characters from the string left unparsed. This function used to
  8430. return the remaining characters as a string.
  8431. *** The `gettimeofday' function has replaced the old `time+ticks' function.
  8432. The return value is now (SECONDS . MICROSECONDS); the fractional
  8433. component is no longer expressed in "ticks".
  8434. *** The `ticks/sec' constant has been removed, in light of the above change.
  8435. * Changes to the gh_ interface
  8436. ** gh_eval_str() now returns an SCM object which is the result of the
  8437. evaluation
  8438. ** gh_scm2str() now copies the Scheme data to a caller-provided C
  8439. array
  8440. ** gh_scm2newstr() now makes a C array, copies the Scheme data to it,
  8441. and returns the array
  8442. ** gh_scm2str0() is gone: there is no need to distinguish
  8443. null-terminated from non-null-terminated, since gh_scm2newstr() allows
  8444. the user to interpret the data both ways.
  8445. * Changes to the scm_ interface
  8446. ** The new function scm_symbol_value0 provides an easy way to get a
  8447. symbol's value from C code:
  8448. SCM scm_symbol_value0 (char *NAME)
  8449. Return the value of the symbol named by the null-terminated string
  8450. NAME in the current module. If the symbol named NAME is unbound in
  8451. the current module, return SCM_UNDEFINED.
  8452. ** The new function scm_sysintern0 creates new top-level variables,
  8453. without assigning them a value.
  8454. SCM scm_sysintern0 (char *NAME)
  8455. Create a new Scheme top-level variable named NAME. NAME is a
  8456. null-terminated string. Return the variable's value cell.
  8457. ** The function scm_internal_catch is the guts of catch. It handles
  8458. all the mechanics of setting up a catch target, invoking the catch
  8459. body, and perhaps invoking the handler if the body does a throw.
  8460. The function is designed to be usable from C code, but is general
  8461. enough to implement all the semantics Guile Scheme expects from throw.
  8462. TAG is the catch tag. Typically, this is a symbol, but this function
  8463. doesn't actually care about that.
  8464. BODY is a pointer to a C function which runs the body of the catch;
  8465. this is the code you can throw from. We call it like this:
  8466. BODY (BODY_DATA, JMPBUF)
  8467. where:
  8468. BODY_DATA is just the BODY_DATA argument we received; we pass it
  8469. through to BODY as its first argument. The caller can make
  8470. BODY_DATA point to anything useful that BODY might need.
  8471. JMPBUF is the Scheme jmpbuf object corresponding to this catch,
  8472. which we have just created and initialized.
  8473. HANDLER is a pointer to a C function to deal with a throw to TAG,
  8474. should one occur. We call it like this:
  8475. HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
  8476. where
  8477. HANDLER_DATA is the HANDLER_DATA argument we recevied; it's the
  8478. same idea as BODY_DATA above.
  8479. THROWN_TAG is the tag that the user threw to; usually this is
  8480. TAG, but it could be something else if TAG was #t (i.e., a
  8481. catch-all), or the user threw to a jmpbuf.
  8482. THROW_ARGS is the list of arguments the user passed to the THROW
  8483. function.
  8484. BODY_DATA is just a pointer we pass through to BODY. HANDLER_DATA
  8485. is just a pointer we pass through to HANDLER. We don't actually
  8486. use either of those pointers otherwise ourselves. The idea is
  8487. that, if our caller wants to communicate something to BODY or
  8488. HANDLER, it can pass a pointer to it as MUMBLE_DATA, which BODY and
  8489. HANDLER can then use. Think of it as a way to make BODY and
  8490. HANDLER closures, not just functions; MUMBLE_DATA points to the
  8491. enclosed variables.
  8492. Of course, it's up to the caller to make sure that any data a
  8493. MUMBLE_DATA needs is protected from GC. A common way to do this is
  8494. to make MUMBLE_DATA a pointer to data stored in an automatic
  8495. structure variable; since the collector must scan the stack for
  8496. references anyway, this assures that any references in MUMBLE_DATA
  8497. will be found.
  8498. ** The new function scm_internal_lazy_catch is exactly like
  8499. scm_internal_catch, except:
  8500. - It does not unwind the stack (this is the major difference).
  8501. - If handler returns, its value is returned from the throw.
  8502. - BODY always receives #f as its JMPBUF argument (since there's no
  8503. jmpbuf associated with a lazy catch, because we don't unwind the
  8504. stack.)
  8505. ** scm_body_thunk is a new body function you can pass to
  8506. scm_internal_catch if you want the body to be like Scheme's `catch'
  8507. --- a thunk, or a function of one argument if the tag is #f.
  8508. BODY_DATA is a pointer to a scm_body_thunk_data structure, which
  8509. contains the Scheme procedure to invoke as the body, and the tag
  8510. we're catching. If the tag is #f, then we pass JMPBUF (created by
  8511. scm_internal_catch) to the body procedure; otherwise, the body gets
  8512. no arguments.
  8513. ** scm_handle_by_proc is a new handler function you can pass to
  8514. scm_internal_catch if you want the handler to act like Scheme's catch
  8515. --- call a procedure with the tag and the throw arguments.
  8516. If the user does a throw to this catch, this function runs a handler
  8517. procedure written in Scheme. HANDLER_DATA is a pointer to an SCM
  8518. variable holding the Scheme procedure object to invoke. It ought to
  8519. be a pointer to an automatic variable (i.e., one living on the stack),
  8520. or the procedure object should be otherwise protected from GC.
  8521. ** scm_handle_by_message is a new handler function to use with
  8522. `scm_internal_catch' if you want Guile to print a message and die.
  8523. It's useful for dealing with throws to uncaught keys at the top level.
  8524. HANDLER_DATA, if non-zero, is assumed to be a char * pointing to a
  8525. message header to print; if zero, we use "guile" instead. That
  8526. text is followed by a colon, then the message described by ARGS.
  8527. ** The return type of scm_boot_guile is now void; the function does
  8528. not return a value, and indeed, never returns at all.
  8529. ** The new function scm_shell makes it easy for user applications to
  8530. process command-line arguments in a way that is compatible with the
  8531. stand-alone guile interpreter (which is in turn compatible with SCSH,
  8532. the Scheme shell).
  8533. To use the scm_shell function, first initialize any guile modules
  8534. linked into your application, and then call scm_shell with the values
  8535. of ARGC and ARGV your `main' function received. scm_shell will add
  8536. any SCSH-style meta-arguments from the top of the script file to the
  8537. argument vector, and then process the command-line arguments. This
  8538. generally means loading a script file or starting up an interactive
  8539. command interpreter. For details, see "Changes to the stand-alone
  8540. interpreter" above.
  8541. ** The new functions scm_get_meta_args and scm_count_argv help you
  8542. implement the SCSH-style meta-argument, `\'.
  8543. char **scm_get_meta_args (int ARGC, char **ARGV)
  8544. If the second element of ARGV is a string consisting of a single
  8545. backslash character (i.e. "\\" in Scheme notation), open the file
  8546. named by the following argument, parse arguments from it, and return
  8547. the spliced command line. The returned array is terminated by a
  8548. null pointer.
  8549. For details of argument parsing, see above, under "guile now accepts
  8550. command-line arguments compatible with SCSH..."
  8551. int scm_count_argv (char **ARGV)
  8552. Count the arguments in ARGV, assuming it is terminated by a null
  8553. pointer.
  8554. For an example of how these functions might be used, see the source
  8555. code for the function scm_shell in libguile/script.c.
  8556. You will usually want to use scm_shell instead of calling this
  8557. function yourself.
  8558. ** The new function scm_compile_shell_switches turns an array of
  8559. command-line arguments into Scheme code to carry out the actions they
  8560. describe. Given ARGC and ARGV, it returns a Scheme expression to
  8561. evaluate, and calls scm_set_program_arguments to make any remaining
  8562. command-line arguments available to the Scheme code. For example,
  8563. given the following arguments:
  8564. -e main -s ekko a speckled gecko
  8565. scm_set_program_arguments will return the following expression:
  8566. (begin (load "ekko") (main (command-line)) (quit))
  8567. You will usually want to use scm_shell instead of calling this
  8568. function yourself.
  8569. ** The function scm_shell_usage prints a usage message appropriate for
  8570. an interpreter that uses scm_compile_shell_switches to handle its
  8571. command-line arguments.
  8572. void scm_shell_usage (int FATAL, char *MESSAGE)
  8573. Print a usage message to the standard error output. If MESSAGE is
  8574. non-zero, write it before the usage message, followed by a newline.
  8575. If FATAL is non-zero, exit the process, using FATAL as the
  8576. termination status. (If you want to be compatible with Guile,
  8577. always use 1 as the exit status when terminating due to command-line
  8578. usage problems.)
  8579. You will usually want to use scm_shell instead of calling this
  8580. function yourself.
  8581. ** scm_eval_0str now returns SCM_UNSPECIFIED if the string contains no
  8582. expressions. It used to return SCM_EOL. Earth-shattering.
  8583. ** The macros for declaring scheme objects in C code have been
  8584. rearranged slightly. They are now:
  8585. SCM_SYMBOL (C_NAME, SCHEME_NAME)
  8586. Declare a static SCM variable named C_NAME, and initialize it to
  8587. point to the Scheme symbol whose name is SCHEME_NAME. C_NAME should
  8588. be a C identifier, and SCHEME_NAME should be a C string.
  8589. SCM_GLOBAL_SYMBOL (C_NAME, SCHEME_NAME)
  8590. Just like SCM_SYMBOL, but make C_NAME globally visible.
  8591. SCM_VCELL (C_NAME, SCHEME_NAME)
  8592. Create a global variable at the Scheme level named SCHEME_NAME.
  8593. Declare a static SCM variable named C_NAME, and initialize it to
  8594. point to the Scheme variable's value cell.
  8595. SCM_GLOBAL_VCELL (C_NAME, SCHEME_NAME)
  8596. Just like SCM_VCELL, but make C_NAME globally visible.
  8597. The `guile-snarf' script writes initialization code for these macros
  8598. to its standard output, given C source code as input.
  8599. The SCM_GLOBAL macro is gone.
  8600. ** The scm_read_line and scm_read_line_x functions have been replaced
  8601. by Scheme code based on the %read-delimited! procedure (known to C
  8602. code as scm_read_delimited_x). See its description above for more
  8603. information.
  8604. ** The function scm_sys_open has been renamed to scm_open. It now
  8605. returns a port instead of an FD object.
  8606. * The dynamic linking support has changed. For more information, see
  8607. libguile/DYNAMIC-LINKING.
  8608. Guile 1.0b3
  8609. User-visible changes from Thursday, September 5, 1996 until Guile 1.0
  8610. (Sun 5 Jan 1997):
  8611. * Changes to the 'guile' program:
  8612. ** Guile now loads some new files when it starts up. Guile first
  8613. searches the load path for init.scm, and loads it if found. Then, if
  8614. Guile is not being used to execute a script, and the user's home
  8615. directory contains a file named `.guile', Guile loads that.
  8616. ** You can now use Guile as a shell script interpreter.
  8617. To paraphrase the SCSH manual:
  8618. When Unix tries to execute an executable file whose first two
  8619. characters are the `#!', it treats the file not as machine code to
  8620. be directly executed by the native processor, but as source code
  8621. to be executed by some interpreter. The interpreter to use is
  8622. specified immediately after the #! sequence on the first line of
  8623. the source file. The kernel reads in the name of the interpreter,
  8624. and executes that instead. It passes the interpreter the source
  8625. filename as its first argument, with the original arguments
  8626. following. Consult the Unix man page for the `exec' system call
  8627. for more information.
  8628. Now you can use Guile as an interpreter, using a mechanism which is a
  8629. compatible subset of that provided by SCSH.
  8630. Guile now recognizes a '-s' command line switch, whose argument is the
  8631. name of a file of Scheme code to load. It also treats the two
  8632. characters `#!' as the start of a comment, terminated by `!#'. Thus,
  8633. to make a file of Scheme code directly executable by Unix, insert the
  8634. following two lines at the top of the file:
  8635. #!/usr/local/bin/guile -s
  8636. !#
  8637. Guile treats the argument of the `-s' command-line switch as the name
  8638. of a file of Scheme code to load, and treats the sequence `#!' as the
  8639. start of a block comment, terminated by `!#'.
  8640. For example, here's a version of 'echo' written in Scheme:
  8641. #!/usr/local/bin/guile -s
  8642. !#
  8643. (let loop ((args (cdr (program-arguments))))
  8644. (if (pair? args)
  8645. (begin
  8646. (display (car args))
  8647. (if (pair? (cdr args))
  8648. (display " "))
  8649. (loop (cdr args)))))
  8650. (newline)
  8651. Why does `#!' start a block comment terminated by `!#', instead of the
  8652. end of the line? That is the notation SCSH uses, and although we
  8653. don't yet support the other SCSH features that motivate that choice,
  8654. we would like to be backward-compatible with any existing Guile
  8655. scripts once we do. Furthermore, if the path to Guile on your system
  8656. is too long for your kernel, you can start the script with this
  8657. horrible hack:
  8658. #!/bin/sh
  8659. exec /really/long/path/to/guile -s "$0" ${1+"$@"}
  8660. !#
  8661. Note that some very old Unix systems don't support the `#!' syntax.
  8662. ** You can now run Guile without installing it.
  8663. Previous versions of the interactive Guile interpreter (`guile')
  8664. couldn't start up unless Guile's Scheme library had been installed;
  8665. they used the value of the environment variable `SCHEME_LOAD_PATH'
  8666. later on in the startup process, but not to find the startup code
  8667. itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
  8668. code.
  8669. To run Guile without installing it, build it in the normal way, and
  8670. then set the environment variable `SCHEME_LOAD_PATH' to a
  8671. colon-separated list of directories, including the top-level directory
  8672. of the Guile sources. For example, if you unpacked Guile so that the
  8673. full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
  8674. you might say
  8675. export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
  8676. ** Guile's read-eval-print loop no longer prints #<unspecified>
  8677. results. If the user wants to see this, she can evaluate the
  8678. expression (assert-repl-print-unspecified #t), perhaps in her startup
  8679. file.
  8680. ** Guile no longer shows backtraces by default when an error occurs;
  8681. however, it does display a message saying how to get one, and how to
  8682. request that they be displayed by default. After an error, evaluate
  8683. (backtrace)
  8684. to see a backtrace, and
  8685. (debug-enable 'backtrace)
  8686. to see them by default.
  8687. * Changes to Guile Scheme:
  8688. ** Guile now distinguishes between #f and the empty list.
  8689. This is for compatibility with the IEEE standard, the (possibly)
  8690. upcoming Revised^5 Report on Scheme, and many extant Scheme
  8691. implementations.
  8692. Guile used to have #f and '() denote the same object, to make Scheme's
  8693. type system more compatible with Emacs Lisp's. However, the change
  8694. caused too much trouble for Scheme programmers, and we found another
  8695. way to reconcile Emacs Lisp with Scheme that didn't require this.
  8696. ** Guile's delq, delv, delete functions, and their destructive
  8697. counterparts, delq!, delv!, and delete!, now remove all matching
  8698. elements from the list, not just the first. This matches the behavior
  8699. of the corresponding Emacs Lisp functions, and (I believe) the Maclisp
  8700. functions which inspired them.
  8701. I recognize that this change may break code in subtle ways, but it
  8702. seems best to make the change before the FSF's first Guile release,
  8703. rather than after.
  8704. ** The compiled-library-path function has been deleted from libguile.
  8705. ** The facilities for loading Scheme source files have changed.
  8706. *** The variable %load-path now tells Guile which directories to search
  8707. for Scheme code. Its value is a list of strings, each of which names
  8708. a directory.
  8709. *** The variable %load-extensions now tells Guile which extensions to
  8710. try appending to a filename when searching the load path. Its value
  8711. is a list of strings. Its default value is ("" ".scm").
  8712. *** (%search-load-path FILENAME) searches the directories listed in the
  8713. value of the %load-path variable for a Scheme file named FILENAME,
  8714. with all the extensions listed in %load-extensions. If it finds a
  8715. match, then it returns its full filename. If FILENAME is absolute, it
  8716. returns it unchanged. Otherwise, it returns #f.
  8717. %search-load-path will not return matches that refer to directories.
  8718. *** (primitive-load FILENAME :optional CASE-INSENSITIVE-P SHARP)
  8719. uses %seach-load-path to find a file named FILENAME, and loads it if
  8720. it finds it. If it can't read FILENAME for any reason, it throws an
  8721. error.
  8722. The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
  8723. `read' function.
  8724. *** load uses the same searching semantics as primitive-load.
  8725. *** The functions %try-load, try-load-with-path, %load, load-with-path,
  8726. basic-try-load-with-path, basic-load-with-path, try-load-module-with-
  8727. path, and load-module-with-path have been deleted. The functions
  8728. above should serve their purposes.
  8729. *** If the value of the variable %load-hook is a procedure,
  8730. `primitive-load' applies its value to the name of the file being
  8731. loaded (without the load path directory name prepended). If its value
  8732. is #f, it is ignored. Otherwise, an error occurs.
  8733. This is mostly useful for printing load notification messages.
  8734. ** The function `eval!' is no longer accessible from the scheme level.
  8735. We can't allow operations which introduce glocs into the scheme level,
  8736. because Guile's type system can't handle these as data. Use `eval' or
  8737. `read-and-eval!' (see below) as replacement.
  8738. ** The new function read-and-eval! reads an expression from PORT,
  8739. evaluates it, and returns the result. This is more efficient than
  8740. simply calling `read' and `eval', since it is not necessary to make a
  8741. copy of the expression for the evaluator to munge.
  8742. Its optional arguments CASE_INSENSITIVE_P and SHARP are interpreted as
  8743. for the `read' function.
  8744. ** The function `int?' has been removed; its definition was identical
  8745. to that of `integer?'.
  8746. ** The functions `<?', `<?', `<=?', `=?', `>?', and `>=?'. Code should
  8747. use the R4RS names for these functions.
  8748. ** The function object-properties no longer returns the hash handle;
  8749. it simply returns the object's property list.
  8750. ** Many functions have been changed to throw errors, instead of
  8751. returning #f on failure. The point of providing exception handling in
  8752. the language is to simplify the logic of user code, but this is less
  8753. useful if Guile's primitives don't throw exceptions.
  8754. ** The function `fileno' has been renamed from `%fileno'.
  8755. ** The function primitive-mode->fdes returns #t or #f now, not 1 or 0.
  8756. * Changes to Guile's C interface:
  8757. ** The library's initialization procedure has been simplified.
  8758. scm_boot_guile now has the prototype:
  8759. void scm_boot_guile (int ARGC,
  8760. char **ARGV,
  8761. void (*main_func) (),
  8762. void *closure);
  8763. scm_boot_guile calls MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV.
  8764. MAIN_FUNC should do all the work of the program (initializing other
  8765. packages, reading user input, etc.) before returning. When MAIN_FUNC
  8766. returns, call exit (0); this function never returns. If you want some
  8767. other exit value, MAIN_FUNC may call exit itself.
  8768. scm_boot_guile arranges for program-arguments to return the strings
  8769. given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should call
  8770. scm_set_program_arguments with the final list, so Scheme code will
  8771. know which arguments have been processed.
  8772. scm_boot_guile establishes a catch-all catch handler which prints an
  8773. error message and exits the process. This means that Guile exits in a
  8774. coherent way when system errors occur and the user isn't prepared to
  8775. handle it. If the user doesn't like this behavior, they can establish
  8776. their own universal catcher in MAIN_FUNC to shadow this one.
  8777. Why must the caller do all the real work from MAIN_FUNC? The garbage
  8778. collector assumes that all local variables of type SCM will be above
  8779. scm_boot_guile's stack frame on the stack. If you try to manipulate
  8780. SCM values after this function returns, it's the luck of the draw
  8781. whether the GC will be able to find the objects you allocate. So,
  8782. scm_boot_guile function exits, rather than returning, to discourage
  8783. people from making that mistake.
  8784. The IN, OUT, and ERR arguments were removed; there are other
  8785. convenient ways to override these when desired.
  8786. The RESULT argument was deleted; this function should never return.
  8787. The BOOT_CMD argument was deleted; the MAIN_FUNC argument is more
  8788. general.
  8789. ** Guile's header files should no longer conflict with your system's
  8790. header files.
  8791. In order to compile code which #included <libguile.h>, previous
  8792. versions of Guile required you to add a directory containing all the
  8793. Guile header files to your #include path. This was a problem, since
  8794. Guile's header files have names which conflict with many systems'
  8795. header files.
  8796. Now only <libguile.h> need appear in your #include path; you must
  8797. refer to all Guile's other header files as <libguile/mumble.h>.
  8798. Guile's installation procedure puts libguile.h in $(includedir), and
  8799. the rest in $(includedir)/libguile.
  8800. ** Two new C functions, scm_protect_object and scm_unprotect_object,
  8801. have been added to the Guile library.
  8802. scm_protect_object (OBJ) protects OBJ from the garbage collector.
  8803. OBJ will not be freed, even if all other references are dropped,
  8804. until someone does scm_unprotect_object (OBJ). Both functions
  8805. return OBJ.
  8806. Note that calls to scm_protect_object do not nest. You can call
  8807. scm_protect_object any number of times on a given object, and the
  8808. next call to scm_unprotect_object will unprotect it completely.
  8809. Basically, scm_protect_object and scm_unprotect_object just
  8810. maintain a list of references to things. Since the GC knows about
  8811. this list, all objects it mentions stay alive. scm_protect_object
  8812. adds its argument to the list; scm_unprotect_object remove its
  8813. argument from the list.
  8814. ** scm_eval_0str now returns the value of the last expression
  8815. evaluated.
  8816. ** The new function scm_read_0str reads an s-expression from a
  8817. null-terminated string, and returns it.
  8818. ** The new function `scm_stdio_to_port' converts a STDIO file pointer
  8819. to a Scheme port object.
  8820. ** The new function `scm_set_program_arguments' allows C code to set
  8821. the value returned by the Scheme `program-arguments' function.
  8822. Older changes:
  8823. * Guile no longer includes sophisticated Tcl/Tk support.
  8824. The old Tcl/Tk support was unsatisfying to us, because it required the
  8825. user to link against the Tcl library, as well as Tk and Guile. The
  8826. interface was also un-lispy, in that it preserved Tcl/Tk's practice of
  8827. referring to widgets by names, rather than exporting widgets to Scheme
  8828. code as a special datatype.
  8829. In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
  8830. maintainers described some very interesting changes in progress to the
  8831. Tcl/Tk internals, which would facilitate clean interfaces between lone
  8832. Tk and other interpreters --- even for garbage-collected languages
  8833. like Scheme. They expected the new Tk to be publicly available in the
  8834. fall of 1996.
  8835. Since it seems that Guile might soon have a new, cleaner interface to
  8836. lone Tk, and that the old Guile/Tk glue code would probably need to be
  8837. completely rewritten, we (Jim Blandy and Richard Stallman) have
  8838. decided not to support the old code. We'll spend the time instead on
  8839. a good interface to the newer Tk, as soon as it is available.
  8840. Until then, gtcltk-lib provides trivial, low-maintenance functionality.
  8841. Copyright information:
  8842. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
  8843. Permission is granted to anyone to make or distribute verbatim copies
  8844. of this document as received, in any medium, provided that the
  8845. copyright notice and this permission notice are preserved,
  8846. thus giving the recipient permission to redistribute in turn.
  8847. Permission is granted to distribute modified versions
  8848. of this document, or of portions of it,
  8849. under the above conditions, provided also that they
  8850. carry prominent notices stating who last changed them.
  8851. Local variables:
  8852. mode: outline
  8853. paragraph-separate: "[ ]*$"
  8854. end: