NEWS 530 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181
  1. Guile NEWS --- history of user-visible changes.
  2. Copyright (C) 1996-2022 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 3.0.8 (since 3.0.7)
  6. * Notable changes
  7. ** Cross-module inlining
  8. Although historically Guile has treated modules as glorified hash
  9. tables, most modules are actually _declarative_ -- they just define
  10. functions and variables and provide them for other modules to use, and
  11. don't manipulate modules as first-class objects. See "Declarative
  12. Modules" in the manual.
  13. Since version 3.0.0, Guile has taken advantage of declarative semantics
  14. to allow a top-level definition to be inlined within its uses in the
  15. same compilation unit, provided the binding is never assigned and
  16. defined exactly once. Guile 3.0.8 extends this to allow some
  17. exported declarative definitions to be inlined into other modules.
  18. This facility is mostly transparent to the user and is enabled at the
  19. default -O2 optimization level. "Small" definitions are available for
  20. cross-module inlining (-Oinlinable-exports, included at -O2). The
  21. actual inlining decision is performed by Guile's partial evaluation pass
  22. (-Ocross-module-inlining, included at -O2 also), subject to effort and
  23. size growth counters.
  24. Note however that as with macros, when a definition changes in module A,
  25. a separately compiled module B that uses that definition doesn't
  26. automatically get recompiled. This is a limitation in Guile that we
  27. would like to fix.
  28. As another limitation, cross-module inlining is only available for
  29. imports from modules which have already been compiled at -O2 (or
  30. otherwise with -Oinlinable-exports).
  31. When determining whether to enable this facility by default, we weighed
  32. the usability problems of stale inlined bindings against the benefit of
  33. allowing module boundaries to no longer be optimization boundaries, we
  34. ended up on the "let's do it!" side of the equation. However we welcome
  35. feedback from users as to what should be the default behavior, until
  36. such a time as we have a proper notion of when a compiled file is stale
  37. or not.
  38. ** Avoid the need for a custom GMP allocator
  39. In Guile 3.0.6, we fixed a longstanding bug in Guile's use of the
  40. library that Guile uses to implement bignums, GMP. See the Guile 3.0.6
  41. release notes. However this left us with a suboptimal Guile, in which
  42. each large integer had to have a finalizer. Finalizers take time and
  43. space, and so they limit allocation rate, causing bignum performance to
  44. drop. Though you could set an environment variable to go back to the
  45. older, faster behavior, it wasn't the default.
  46. In Guile 3.0.8 we fix this problem comprehensively by avoiding embedding
  47. GMP's mpz_t values in Guile bignums. Instead we embed the bignum bits
  48. digits directly, avoiding the need for finalizers or custom allocators.
  49. This removes the need for the GUILE_INSTALL_GMP_MEMORY_FUNCTIONS
  50. environment variable mentioned in the Guile 3.0.6 release notes. We
  51. also deprecate the scm_install_gmp_memory_functions variable.
  52. * New interfaces and functionality
  53. ** Typed vector copy functions in (srfi srfi-4 gnu)
  54. The functions `u8vector-copy' `s8vector-copy' `u16vector-copy'
  55. `s16vector-copy' `u32vector-copy' `s32vector-copy' `u64vector-copy'
  56. `s64vector-copy' `f32vector-copy' `f64vector-copy' `c32vector-copy'
  57. `c64vector-copy' `u8vector-copy!' `s8vector-copy!' `u16vector-copy!'
  58. `s16vector-copy!' `u32vector-copy!' `s32vector-copy!'
  59. `u64vector-copy!' `s64vector-copy!' `f32vector-copy!'
  60. `f64vector-copy!' `c32vector-copy!' `c64vector-copy!' have been
  61. added. See SRFI-4 - Guile extensions" in the manual.
  62. ** New function srfi-4-vector-type-size in (srfi srfi-4 gnu)
  63. See SRFI-4 - Guile extensions" in the manual.
  64. ** `bytevector-fill!' supports partial fill through optional arguments
  65. This is an extension to the r6rs procedure. See "Manipulating
  66. Bytevectors" in the manual.
  67. ** `vector-copy!' and `vector-copy' from (rnrs base) included in core
  68. Compared to the previous versions, these accept range arguments. See
  69. "Accessing and Modifying Vector Contents" in the manual.
  70. ** New function bitvector-copy
  71. See "Bit vectors" in the manual.
  72. ** (system foreign) supports C99 complex types
  73. The types `complex-float' and `complex-double' stand for C99 `float
  74. _Complex' and `double _Complex` respectively.
  75. * Other new optimizations
  76. ** Better optimization of "let" in right-hand-side of "letrec"
  77. ** Allow constant-folding for calls to "expt"
  78. Thanks to Maxime Devos.
  79. ** Add ,optimize-cps REPL meta-command
  80. This meta-command is like ,optimize, but at a lower level.
  81. ** Improve alias analysis in CSE
  82. ** Avoid argument-count checks for well-typed calls to known procedures
  83. This speeds up calls to lexically bound procedures.
  84. ** Avoid return-value-count checks for calls to known-return-arity procedures
  85. This new optimization, enabled at -O2, speeds up returns from calls to
  86. lexically bound procedures.
  87. * Build system changes
  88. ** Update Gnulib (bugs.gnu.org/49930)
  89. Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6.
  90. ** Compile libguile with -flto if available
  91. By default, if the compiler supports link-time optimization via the
  92. -flto flag, Guile will add it to CFLAGS. This results in a libguile
  93. that is approximately 15% smaller. Pass --disable-lto to configure to
  94. inhibit this behavior.
  95. ** Trim set of prebuilt .go files shipped in the tarball
  96. Guile includes built Scheme files in its tarball to speed up the build,
  97. for casual builders that are less concerned with reproducibility.
  98. However they took a lot of space and we have now trimmed these down to a
  99. more minimal set. As always, you can remove them and build entirely
  100. from source via a `make -C prebuilt clean`.
  101. * New deprecations
  102. ** Vector functions require vector arguments
  103. Passing arrays that are not vectors (arrays for which `(vector? array)'
  104. returns false) to functions `vector-move-left!', `vector-move-right!',
  105. `vector->list', and `vector-copy' is deprecated. Use `array-copy!',
  106. `array-copy', and `array->list' for such arguments.
  107. ** `scm_from_contiguous_typed_array' is deprecated
  108. This function was undocumented.
  109. ** Deprecate the "simple vector" concept
  110. This concept meant to indicate "vectors which aren't array slices".
  111. Deprecate scm_is_simple_vector; instead use scm_is_vector.
  112. ** Deprecate `scm_from_contiguous_typed_array'
  113. This function was added during the Guile 2.x series and was not
  114. documented and is no longer used in Guile itself.
  115. ** Deprecate internal contiguous array flag
  116. We still reserve space for the flag to preserve ABI but it has no
  117. effect. As such we also remove the internal SCM_I_ARRAY_CONTIGUOUS,
  118. SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG,
  119. SCM_I_ARRAY_CONTP preprocessor interfaces, as they were internal and
  120. there is no longer a sensible way of using them.
  121. ** Deprecate symbol properties
  122. Symbols used to have a "function slot" and a "property slot", inherited
  123. from Emacs Lisp and early Lisps, which one would access with
  124. 'symbol-pref', 'symbol-fref', 'symbol-pset!', and 'symbol-fset!'. These
  125. procedures have been discouraged in favor of object properties; they are
  126. now deprecated. This saves a few words of memory per symbol.
  127. * Bug fixes
  128. ** Fix compilation of (ash x N), where N is a literal, at -O1 and below
  129. ** Texinfo and XML parsers are now thread-safe (bugs.gnu.org/51264)
  130. ** Fix `filename-completion-function' in (ice-9 readline)
  131. ** Fix trace-calls-to-procedure (bugs.gnu.org/43102, bugs.gnu.org/48412)
  132. ** Fix bug in nftw function (bugs.gnu.org/44182)
  133. ** Fix optimization bug in CSE in eq-constant? if both branches same
  134. ** Fix readline initialization with invalid keymaps
  135. ** Fix crash when reading #nil (bugs.gnu.org/49305)
  136. ** Fix read error when reading #{}}#.
  137. ** Fix Darwin host detection in foreign-library facility.
  138. ** Fix unification of (x ...) patterns in `match'
  139. ** Fix scaling floats with leading zeroes in `format'
  140. ** Improve support for r7rs-style `(srfi N)' and r6rs-style `(srfi :N)
  141. module names (bugs.gnu.org/39601, bugs.gnu.org/40371)
  142. ** Add support for the ARC architecture (bugs.gnu.org/48816)
  143. ** Build fix for const strerror result (bugs.gnu.org/43987)
  144. ** Fix typos in SRFI documentation (bugs.gnu.org/50127)
  145. ** Fix bounds check in `recvfrom!' (bugs.gnu.org/45595)
  146. ** Add support for riscv32
  147. ** Limit `ash' to left-shift by 2^32 bits (bugs.gnu.org/48150)
  148. ** Fix type confusion in heap-numbers-equal? calls from VM
  149. Hearty thanks to Jakub Wojciech, Robin Green, Daniel Llorens, Matija
  150. Obid, RhodiumToad, Rob Browning, Maxime Devos, Aleix Conchillo Flaqué,
  151. Timothy Sample, d4ryus, Fabrice Fontaine, Taylan Kammer, Vineet Gupta,
  152. Philipp Klaus Krause, Arun Isaac, and Alex Shinn.
  153. Changes in 3.0.7 (since 3.0.6)
  154. * New interfaces and functionality
  155. ** More O_* POSIX constants are now defined in Scheme
  156. Guile now defines constants such as `O_NOFOLLOW', `O_CLOEXEC',
  157. `O_TMPFILE', and more on platforms that support them. These may be
  158. passed as arguments to procedures such as `open' and `open-fdes'.
  159. * Bug fixes
  160. ** Fix bugs introduced in 3.0.6 with Scheme `read` re-write
  161. ** Fix deadlock after `primitive-fork' (#41948)
  162. ** Fix duplicates handlers for interfaces that use interfaces (#43025)
  163. ** Fix compile-psyntax.scm for (language tree-il canonicalize) removal
  164. ** Fix prompt compilation bug (#48098)
  165. ** Fix R7RS include-library-declarations, cond-expand (#40252)
  166. ** Fix --enable-mini-gmp on FreeBSD and other targets
  167. ** Fix excessive compile times for vectors >16k elements long
  168. ** Fix use of literal tree-il as source language (#45131)
  169. ** Fix SRFI-64 test-end to not remove globally-installed test runner
  170. Changes in 3.0.6 (since 3.0.5)
  171. * Notable changes
  172. ** Reimplement dynamic library loading ("dlopening") without libltdl
  173. Guile used to load dynamic libraries with libltdl, a library provided by
  174. the Libtool project.
  175. Libltdl provided some compatibility benefits when loading shared
  176. libraries made with older toolchains on older operating systems.
  177. However, no system from the last 10 years or so appears to need such a
  178. thick compatibility layer.
  179. Besides being an unmaintained dependency of limited utility, libltdl
  180. also has the negative aspect that in its search for libraries to load,
  181. it could swallow useful errors for libraries that are found but not
  182. loadable, instead showing just errors for search path candidates that
  183. are not found.
  184. Guile now implements dynamic library loading directly in terms of the
  185. standard "dlopen" interface, providing a limited shim for platforms with
  186. similar functionality exposed under different names (MinGW).
  187. This change has a few practical impacts to Guile users. There is a new
  188. library search path variable, `GUILE_EXTENSIONS_PATH'. Also, errors when
  189. loading a library fails now have better errors. And Guile no longer has
  190. a libltdl dependency.
  191. Although Guile no longer uses libltdl, for backwards compatibility Guile
  192. still adds `LTDL_LIBRARY_PATH' to the loadable library search path, and
  193. includes ad-hoc logic to support uninstalled dynamically loadable
  194. libraries via also adding the ".libs" subdirectories of
  195. `LTDL_LIBRARY_PATH' elements. See "Foreign Libraries" in the
  196. documentation for a full discussion.
  197. ** Fix important incompatibility with GnuTLS
  198. Guile uses the GNU multi-precision (GMP) library to implement
  199. arbitrary-precision integers (bignums) and fractions. Usually Guile is
  200. built to dynamically link to libgmp. In this configuration, any other
  201. user of GMP in the process uses the same libgmp instance, with the same
  202. shared state.
  203. An important piece of shared state is the GMP allocator, responsible for
  204. allocating storage for the digits of large integers. For Guile it's
  205. most efficient to install libgc as the GMP allocator. That way Guile
  206. doesn't need to install finalizers, which have significant overhead, to
  207. free GMP values when Guile bignums are collected. Using libgc to
  208. allocate digits also allows Guile's GC to adequately measure the memory
  209. cost of these values.
  210. However, if the Guile process is linked to some other user of GMP, then
  211. probably the references from the other library to GMP values aren't
  212. visible to the garbage collector. In this case libgc could prematurely
  213. collect values from that other GMP user.
  214. This isn't theoretical, sadly: it happens for Guile-GnuTLS. GnuTLS uses
  215. GMP, and so does Guile. Since Guile 2.0.4, Guile has installed libgc as
  216. the GMP allocator, so since then, Guile-GnuTLS has been buggy.
  217. Therefore, the default is now to not install libgc as the GMP allocator.
  218. This may slow down some uses of bignums. If you know that your Guile
  219. program will never use a library that uses GMP, you can set the
  220. GUILE_INSTALL_GMP_MEMORY_FUNCTIONS=1 in your environment. Guile sets
  221. this environment variable when building Guile, for example. See
  222. "Environment Variables" in the manual, for more.
  223. In some future, Guile may switch to GMP's more low-level "MPN" API for
  224. working with bignums, which would allow us to regain the ability to use
  225. GC-managed digit storage in all configurations.
  226. ** New build option: --enable-mini-gmp
  227. For some users, it would be preferable to bundle a private copy of the
  228. GMP bignum library into Guile. Some users would like to avoid the extra
  229. dependency. Others would like to use libgc to manage GMP values, while
  230. not perturbing the GMP allocator for other GMP users.
  231. For these cases, Guile now has an --enable-mini-gmp configure option,
  232. which will use a stripped-down version of GMP, bundled with Guile. This
  233. code doesn't have all the algorithmic optimizations of full GMP, but
  234. implements the same API in a basic way. It can be more optimal in a
  235. Guile context, given that it can use libgc to allocate its data.
  236. Note that a build with --enable-mini-gmp is not ABI-compatible with a
  237. "stock" build, as functions that use GMP types (scm_to_mpz,
  238. scm_from_mpz) are not exported.
  239. Thanks to Niels Möller and other GMP developers for their mini-gmp
  240. implementation!
  241. ** New `read' implementation in Scheme
  242. Guile's `read' procedure has been rewritten in Scheme. Compared to the
  243. C reader (which still exists for bootstrapping reasons), the new
  244. implementation is more maintainable, more secure, more debuggable, all
  245. while faithfully reproducing all quirks from Guile's previous reader
  246. implemented in C. Also, the Scheme reader is finally compatible with
  247. suspendable ports, allowing REPL implementations to be built with
  248. lightweight concurrency packages such as the third-party "Fibers"
  249. library. Calls to `read' from Scheme as well as calls to `scm_read'
  250. from C use the new reader.
  251. The Scheme implementation is currently about 60% as fast as the
  252. now-inaccessible C implementation, and we hope to close the gap over
  253. time. Bug reports very welcome.
  254. ** Scheme compiler uses `read-syntax' for better debugging
  255. The new Scheme reader also shares implementation with the new
  256. `read-syntax' procedure, which annotates each datum with source location
  257. information. Guile's compiler can use this to provide better
  258. source-level debugging for Scheme programs. Note that this can slightly
  259. increase compiled file sizes, though this is mitigated by some assembler
  260. optimizations.
  261. ** Syntax objects record source locations
  262. When compiling a file that defines a macro, the output will usually
  263. include a number of syntax objects as literals. Previously, these
  264. literals had no source information; now they do. This should improve
  265. debugging.
  266. ** Optimized run-time relocations
  267. The code that patches references between statically-allocated Scheme
  268. data has been optimized to be about 30% shorter than before or so, which
  269. can significantly decrease compiled file size and run-time
  270. initialization latency.
  271. ** Optimized calls to known functions
  272. For calls where the callee is within the compilation unit, Guile can now
  273. skip the argument count check.
  274. ** Reduce code size for calls to module variables
  275. All calls to a given exported or private variable from a module now
  276. dispatch through the same trampoline function. This reduces code size.
  277. ** Updated Gnulib
  278. The Gnulib compatibility library has been updated, for the first time
  279. since 2017 or so. We expect no functional change but look forward to
  280. any bug reports.
  281. * New interfaces and functionality
  282. ** `call-with-port'
  283. See "Ports" in the manual.
  284. ** `call-with-input-bytevector', `call-with-output-bytevector'
  285. See "Bytevector Ports" in the manual.
  286. ** `GUILE_EXTENSIONS_PATH' environment variable.
  287. See "Environment Variables" in the manual.
  288. ** `mkdtemp' and `mkstemp'
  289. See "File System" in the manual. There is still `mkstemp!' but we
  290. recommend that new code uses `mkstemp', which does not mutate the
  291. contents of the "template" argument string. Instead for `mkstemp' you
  292. get the name of the newly-created file by calling `port-filename' on the
  293. returned port.
  294. ** `(system foreign-library)' module
  295. See the newly reorganized "Foreign Function Interface", for details.
  296. These new interfaces replace `dynamic-link', `dynamic-pointer' and
  297. similar, which will eventually be deprecated.
  298. ** `read-syntax'
  299. See "Annotated Scheme Read" in the manual.
  300. ** `quote-syntax'
  301. See "Syntax Case" in the manual.
  302. ** `syntax-sourcev'
  303. See "Syntax Transformer Helpers" in the manual.
  304. * Optimizations
  305. ** eof-object?
  306. ** R6RS vector-map, vector-for-each
  307. * Bug fixes
  308. ** Fix reverse-list->string docstring
  309. ** Fix R7RS "member" result when no item found
  310. ** Fix make-transcoded-port on input+output ports
  311. ** Fix (ice-9 ftw) on filesystems where inode values are meaningless
  312. ** Fix many bugs that prevented Guile from building on MinGW
  313. ** Fix many bugs that prevented Guile from building on MinGW64
  314. ** Fix many bugs that prevented Guile's test suite from running on MinGW
  315. ** Fix srfi-69 merge-hash
  316. ** Fix suspendable-ports implementation of get-bytevector-some!
  317. ** Fix overread in string-locale<?, string-locale-ci<?, and friends
  318. ** Fix handling of parameter lists to elisp defun to allow nil
  319. ** Fix closure-conversion bug for SCC with no free vars and one not-well-known function
  320. ** Fix error when < passed non-real value
  321. ** Fix bug in which exported and private names in a used module could alias each other
  322. ** Fix bug with slot options in redefinable GOOPS classes
  323. ** Fix bugs regarding port buffering for TLS connections in web client
  324. Thanks to Vasilij Schneidermann, Andrey Ivanov, Rob Browning, Erik
  325. Dominikus, Göran Weinholt, Michael Gran, Andrew Whatson, Ricardo
  326. G. Herdt, Jan Nieuwenhuizen, David Thompson, and abcdw.
  327. * New deprecations
  328. ** `dynamic-unlink'
  329. This function now has no effect; Guile will not unload dynamically
  330. linked modules, as that can destabilize the system.
  331. * Incompatible changes
  332. ** `call-with-output-string' closes port on normal exit
  333. This procedure used to leave the port open, even though there was no
  334. useful way to access it. Now we clean it up more promptly, disposing
  335. any possible associated iconv descriptor.
  336. Changes in 3.0.5 (since 3.0.4)
  337. * New interfaces and functionality
  338. ** O(1) compilation of `case' and related expressions
  339. Guile now optimizes chains of eq? comparisons to constants, resulting in
  340. O(1) dispatch time, regardless of the length of the chain. This
  341. optimization is also unlocked in many cases for `match' expressions with
  342. many similar clauses whose first differentiator are constants.
  343. ** New (ice-9 copy-tree) module
  344. This module includes the `copy-tree' procedure that was previously
  345. implemented in C and present in the default `(guile)' module. See
  346. "Copying" in the manual.
  347. ** New warning: use-before-definition
  348. This analysis, enabled at `-W1', issues warnings for programs that use
  349. top-level variables before they are defined.
  350. ** New warning: non-idempotent-definition
  351. This analysis, enabled at `-W1', issues warnings for programs that whose
  352. use of a variable is ambiguous. For example, in the program:
  353. (define saved-add +)
  354. (define + error)
  355. The intention would seem to be to "save" the value of the base `+'
  356. procedure, then override it locally. However if this program is ever
  357. loaded twice, then the second time it is loaded, `+' will be taken from
  358. the local binding instead of the import. Users that want this kind of
  359. behavior should either use lexical bindings instead of top-level
  360. bindings, or otherwise rename important clobbered bindings via modules.
  361. * New deprecations
  362. ** `copy-tree' in the default environment, and `scm_copy_tree' from C
  363. Import the `(ice-9 copy-tree)' module instead.
  364. ** `unbound-variable-analysis`, `macro-use-before-definition-analysis`
  365. These bindings from `(language tree-il analyze)' are replaced by the
  366. use-before-definition analysis, which powers a number of warnings. Use
  367. `make-use-before-definition-analysis', but note that these interfaces
  368. are quite intimate parts of the compiler!
  369. * Incompatible changes
  370. ** `copy' read-option removed
  371. This read option would include a copy of the source expression in the
  372. source-properties of each subexpression. This option has always been
  373. off by default and lost most of its use value with the switch to a
  374. compiler in Guile 2.0.
  375. Changes in 3.0.4 (since 3.0.3)
  376. This release fixes the SONAME of libguile-3.0.so, which was erroneously
  377. bumped in 3.0.3 compared to 3.0.2. Distributions are strongly
  378. encouraged to use 3.0.4 instead of 3.0.3.
  379. Thanks to Chris Vine for reporting the issue.
  380. Changes in 3.0.3 (since 3.0.2)
  381. * New interfaces and functionality
  382. ** New baseline compiler
  383. Guile's CPS-based compiler generates good code, but it takes time and
  384. memory to do so. For users that prioritize speed of compilation over
  385. speed of generated code, Guile now has a new baseline compiler that goes
  386. directly from the high-level Tree-IL to bytecode, skipping CPS and all
  387. of its optimizations. This compiler is used for `guild compile -O0',
  388. and generally runs around ten times as fast as the CPS compiler.
  389. *** New VM intrinsics to support baseline compiler
  390. See "Intrinsic Call Instructions" in the manual.
  391. *** Compiler support for warning and lowering passes
  392. *** Compiler support for choosing different compilation orders
  393. See "Compiler Tower" in the manual. The new per-language "compiler
  394. chooser" facility can choose different compilers based on optimization
  395. level.
  396. *** Better support for specifying optimization and warning levels
  397. The procedural compilation interfaces (`compile', `compile-file', and so
  398. on) now have #:optimization-level and #:warning-level keyword arguments,
  399. which default to corresponding `default-optimization-level' and
  400. `default-warning-level' parameters. You can still specify warning and
  401. optimization passes manually, but we think most users will find the
  402. higher-level interfaces more robust to use.
  403. ** Faster Guile build from source
  404. Guile now uses the baseline compiler for its bootstrap, when building
  405. the first Scheme compiler. Because the baseline compiler runs faster
  406. and includes less code than the CPS compiler, Guile takes less time to
  407. build.
  408. ** New 'pipeline' procedure in (ice-9 popen)
  409. The 'pipeline' procedure provides a simple way to spawn command pipeline
  410. as one would do in a shell.
  411. ** Refreshed bitvector facility
  412. See "Bit Vectors" in the manual, for more on all of these.
  413. *** New bitvector-count, bitvector-count-bits, bitvector-position
  414. procedures
  415. These replace the wonky "bit-count", "bit-count*", and "bit-position"
  416. procedures.
  417. *** New bitvector-bit-set?, bitvector-bit-clear? procedures
  418. These replace bitvector-ref. The reason to migrate is that it's an
  419. opportunity be more efficient in 3.0 (because the new procedures only
  420. work on true bitvectors, and not generic bit arrays), easier to read (no
  421. need for 'not' when checking for false bits), and more consistent with
  422. other bitvector procedures.
  423. *** New bitvector-set-bit!, bitvector-clear-bit! procedures
  424. These replace bitvector-set!, for similar reasons as the bitvector-ref
  425. replacement above.
  426. *** New bitvector-set-all-bits!, bitvector-clear-all-bits! procedures
  427. These replace bitvector-fill!.
  428. *** New bitvector-flip-all-bits! procedure
  429. This replaces bit-invert!.
  430. *** New bitvector-set-bits!, bitvector-clear-bits! procedures
  431. These replace the wonky "bit-set*!" procedure.
  432. * Bug fixes
  433. ** statprof reports the names of primitives
  434. Previously statprof would show strings like "anon #x1234" for primitives
  435. written in C.
  436. ** Compiler reduces 'equal?' when passed a character literal
  437. The compiler now properly reduces expressions such as (equal? c #\x) to
  438. (eq? c #\x). This was not the case in 3.0.2, which could lead to slower
  439. code, especially in 'match' expressions with many clauses with with
  440. character literals.
  441. ** JIT bugs on ARMv7 have been fixed
  442. (<https://bugs.gnu.org/40737>,
  443. <https://gitlab.com/wingo/lightening/-/issues/12>)
  444. ** 'http-get', 'http-post', etc. now honor #:verify-certificates?
  445. (<https://bugs.gnu.org/40486>)
  446. ** web: Accept URI host names consisting only of hex digits
  447. (<https://bugs.gnu.org/40582>)
  448. ** (web http) parser recognizes the CONNECT and PATCH methods
  449. ** Initial revealed count of file ports is now zero
  450. (<https://bugs.gnu.org/41204>)
  451. * New deprecations
  452. ** Old bitvector interfaces deprecated
  453. See "Bit Vectors" in the manual, for details on all of these
  454. replacements.
  455. *** bit-count, bit-position
  456. Use bitvector-count or bitvector-position instead.
  457. *** bitvector-ref
  458. Use 'bitvector-bit-set?' or 'bitvector-bit-clear?' instead.
  459. *** bitvector-set!
  460. Use 'bitvector-set-bit!' or 'bitvector-clear-bit!' instead.
  461. *** bitvector-fill!
  462. Use 'bitvector-set-all-bits!' or 'bitvector-clear-all-bits!' instead.
  463. *** bit-invert!
  464. Use 'bitvector-flip-all-bits! instead.
  465. *** bit-set*!
  466. Use 'bitvector-set-bits!' or 'bitvector-clear-bits!' instead.
  467. *** bit-count*
  468. Use 'bitvector-count-bits' instead, subtracting from 'bitvector-count'
  469. on the mask bitvector if you are counting unset bits.
  470. *** Accessing generic arrays using the bitvector procedures
  471. For the same efficiency reasons that use of 'vector-ref' on generic
  472. arrays was deprecated in Guile 2.0.10, using 'bitvector->list' and
  473. similar procedures on 1-dimensional boolean-typed arrays is now
  474. deprecated. Use 'array-ref' and similar procedures on arrays.
  475. *** scm_istr2bve
  476. This C-only procedure to parse a bitvector from a string should be
  477. replaced by calling `read' on a string port instead, if needed.
  478. Changes in 3.0.2 (since 3.0.1)
  479. * New interfaces and functionality
  480. ** New (srfi srfi-171) module
  481. This module implements "tranducers" as specified in
  482. <https://srfi.schemers.org/srfi-171/srfi-171.html>.
  483. Thanks to Linus Björnstam for this new API!
  484. ** SRFI-14 character data set upgraded to Unicode 13.0.0
  485. * Bug fixes
  486. ** Fix heap corruption when allocating structs
  487. (<https://bugs.gnu.org/39266>)
  488. This bug would cause random crashes; users are invited to upgrade.
  489. Thanks to rr (<https://rr-project.org/>) for being instrumental in
  490. finding this bug!
  491. ** Fix race condition between 'abort-to-prompt' and stack marking
  492. (<https://bugs.gnu.org/28211>)
  493. This bug could occasionally cause crashes in multi-threaded Guile
  494. programs using delimited continuations or exceptions.
  495. ** Ensure weak sets are occasionally vacuumed
  496. (<https://bugs.gnu.org/40194>)
  497. Previously, weak sets, which are used internally for interned symbols
  498. and for ports with SCM_PORT_TYPE_NEEDS_CLOSE_ON_GC, could grow seemingly
  499. indefinitely without being vacuumed.
  500. ** Interpret dynamic library name as literal file name first
  501. (<https://bugs.gnu.org/21076>)
  502. Until now, 'dynamic-link' would always append an extension, such as
  503. ".so", to the user-provided file names. Now, 'dynamic-link' first tries
  504. the file name literally, and only then falls back to adding the OS
  505. shared library file name extension.
  506. This allows users to refer to "libsomething.so.1.2.3" instead of
  507. "libsomething.so", the latter being usually provided by "-dev" packages
  508. of GNU/Linux distributions, unlike the former.
  509. ** <libguile.h> includes <libguile/hooks.h> again
  510. This fixes an omission in Guile 3.0.
  511. ** Fix fixpoint computation in compute-significant-bits
  512. (<https://bugs.gnu.org/38486>)
  513. ** Fix compilation '--without-threads'
  514. (<https://bugs.gnu.org/40075>)
  515. * New deprecations
  516. ** 'tmpnam' is now deprecated
  517. The 'tmpnam' function in the C library has been deprecated for years due
  518. to security concerns; the Scheme procedure 'tmpnam' is now deprecated as
  519. well, in favor of 'mkstemp!'. In addition, a new '--disable-tmpnam'
  520. option has been added to 'configure' for users who would like to disable
  521. it right away.
  522. Changes in 3.0.1 (since 3.0.0):
  523. * New interfaces and functionality
  524. ** Export constructor and predicate for '&quit-exception'
  525. The (ice-9 exceptions) module, new in 3.0.0, now exports
  526. 'quit-exception?' and 'make-quit-exception', which is consistent with
  527. other exception types.
  528. ** (texinfo plain-text) now exports '*line-width*' fluid
  529. The new '*line-width*' fluid allows users to specify the width of a line
  530. for the purposes of line wrapping. See "texinfo plain-text" in the
  531. manual.
  532. ** R7RS support recognizes the '.sld' extension
  533. The '.sld' is what the R7RS suggests as a source file name extension.
  534. It is now recognized when running "guile --r7rs", as well as
  535. the '.guile.sld' extension.
  536. * Bug fixes
  537. ** 'hash' correctly handles keywords, ports, hash tables, etc.
  538. (<https://bugs.gnu.org/39634>)
  539. It used to be that the 'hash' procedure would return the same value for
  540. all keyword objects, the same value for all hash tables, the same value
  541. for all input ports, etc.
  542. ** 'include' no longer rejects relative file names
  543. A bug in 3.0.0 would lead 'include' to error out when passed a relative
  544. file name.
  545. ** Reduce GC pressure when using bignums
  546. Guile no longer installs a finalizer on each bignum (large integer) it
  547. creates. This significantly improves speed and memory usage on
  548. applications that make heavy use of bignums, such as the compiler
  549. itself.
  550. ** Fix expansion of 'error' calls with a non-constant argument
  551. (<https://bugs.gnu.org/39509>)
  552. Calls to the 'error' primitive with a non-constant argument, as in
  553. (error message), would be incorrectly expanded by the compiler, leading
  554. to non-printable errors ("Error while printing exception").
  555. ** Improve source location information for top-level references
  556. (<https://bugs.gnu.org/38388>)
  557. Source location information, as is visible upon "unbound variable"
  558. errors, is now more accurate.
  559. ** Web client treats TLS "premature termination" error as EOF
  560. (<https://bugs.gnu.org/39800>)
  561. This allows 'http-request' from (web client) to gracefully handle
  562. servers that terminate connections abruptly after responding to a
  563. "Connection: close" request.
  564. ** Fix bug restoring a JIT continuation from the interpreter
  565. ** Export C symbols 'scm_sym_lambda', 'scm_sym_quote', etc. again
  566. Those C symbols were inadvertently made private in 3.0.0.
  567. ** Fix build on IA64 and on platforms where the stack grows upwards
  568. ** Fix JIT compilation on 64-bit Cygwin
  569. (<https://bugs.gnu.org/39118>)
  570. ** texinfo properly renders @acronym in plain text
  571. (<https://bugs.gnu.org/37846>)
  572. ** Compiler now optimizes (logior 0 INT)
  573. (<https://bugs.gnu.org/39573>)
  574. ** Fix Readline configure check for the sake of libedit
  575. This fixes builds on macOS against the system-provided libedit.
  576. ** Provided 'GUILE_PKG' Autoconf macro now detects Guile 3.0
  577. (<https://bugs.gnu.org/39437>)
  578. Changes in 3.0.0 (since the stable 2.2 series):
  579. * Notable changes
  580. ** Just-in-time code generation
  581. Guile programs now run up to 4 times faster, relative to Guile 2.2,
  582. thanks to just-in-time (JIT) native code generation. Notably, this
  583. brings the performance of "eval" as written in Scheme back to the level
  584. of "eval" written in C, as in the days of Guile 1.8.
  585. See "Just-In-Time Native Code" in the manual, for more information. JIT
  586. compilation will be enabled automatically and transparently. To disable
  587. JIT compilation, configure Guile with `--enable-jit=no' or
  588. `--disable-jit'. The default is `--enable-jit=auto', which enables the
  589. JIT if it is available. See `./configure --help' for more.
  590. JIT compilation is enabled by default on x86-64, i686, ARMv7, and
  591. AArch64 targets.
  592. ** Lower-level bytecode
  593. Relative to the virtual machine in Guile 2.2, Guile's VM instruction set
  594. is now more low-level. This allows it to express more advanced
  595. optimizations, for example type check elision or integer
  596. devirtualization, and makes the task of JIT code generation easier.
  597. Note that this change can mean that for a given function, the
  598. corresponding number of instructions in Guile 3.0 may be higher than
  599. Guile 2.2, which can lead to slowdowns when the function is interpreted.
  600. We hope that JIT compilation more than makes up for this slight
  601. slowdown.
  602. ** Interleaved internal definitions and expressions allowed
  603. It used to be that internal definitions had to precede all expressions
  604. in their bodies. This restriction has been relaxed. If an expression
  605. precedes an internal definition, it is treated as if it were a
  606. definition of an unreferenced variable. For example, the expression
  607. `(foo)' transforms to the equivalent of `(define _ (begin (foo) #f))',
  608. if it precedes other definitions.
  609. This change improves the readability of Guile programs, as it used to be
  610. that program indentation tended to increase needlessly to allow nested
  611. `let' and `letrec' to re-establish definition contexts after initial
  612. expressions, for example for type-checks on procedure arguments.
  613. ** Record unification
  614. Guile used to have a number of implementations of structured data types
  615. in the form of "records": a core facility, SRFI-9 (records), SRFI-35
  616. (condition types -- a form of records) and R6RS records. These
  617. facilities were not compatible, as they all were built in different
  618. ways. This had the unfortunate corollary that SRFI-35 conditions were
  619. not compatible with R6RS conditions. To fix this problem, we have now
  620. added the union of functionality from all of these record types into
  621. core records: single-inheritance subtyping, mutable and immutable
  622. fields, and so on. See "Records" in the manual, for full details.
  623. R6RS records, SRFI-9 records, and the SRFI-35 and R6RS exception types
  624. have been accordingly "rebased" on top of core records.
  625. ** Reimplementation of exceptions
  626. Since Guile's origins 25 years ago, `throw' and `catch' have been the
  627. primary exception-handling primitives. However these primitives have
  628. two problems. One is that it's hard to handle exceptions in a
  629. structured way using `catch'. Few people remember what the
  630. corresponding `key' and `args' are that an exception handler would see
  631. in response to a call to `error', for example. In practice, this
  632. results in more generic catch-all exception handling than one might
  633. like.
  634. The other problem is that `throw', `catch', and especially
  635. `with-throw-handler' are quite unlike what the rest of the Scheme world
  636. uses. R6RS and R7RS, for example, have mostly converged on
  637. SRFI-34-style `with-exception-handler' and `raise' primitives, and
  638. encourage the use of SRFI-35-style structured exception objects to
  639. describe the error. Guile's R6RS layer incorporates an adapter between
  640. `throw'/`catch' and structured exception handling, but it didn't apply
  641. to SRFI-34/SRFI-35, and we would have to duplicate it for R7RS.
  642. In light of these considerations, Guile has now changed to make
  643. `with-exception-handler' and `raise-exception' its primitives for
  644. exception handling and defined a hierarchy of R6RS-style exception types
  645. in its core. SRFI-34/35, R6RS, and the exception-handling components of
  646. SRFI-18 (threads) have been re-implemented in terms of this core
  647. functionality. There is also a a compatibility layer that makes it so
  648. that exceptions originating in `throw' can be handled by
  649. `with-exception-hander', and vice-versa for `raise-exception' and
  650. `catch'.
  651. Generally speaking, users will see no difference. The one significant
  652. difference is that users of SRFI-34 will see more exceptions flowing
  653. through their `with-exception-handler'/`guard' forms, because whereas
  654. before they would only see exceptions thrown by SRFI-34, now they will
  655. see exceptions thrown by R6RS, R7RS, or indeed `throw'.
  656. Guile's situation is transitional. Most exceptions are still signalled
  657. via `throw'. These will probably migrate over time to
  658. `raise-exception', while preserving compatibility of course.
  659. See "Exceptions" in the manual, for full details on the new API.
  660. ** `guard' no longer unwinds the stack for clause tests
  661. SRFI-34, and then R6RS and R7RS, defines a `guard' form that is a
  662. shorthand for `with-exception-handler'. The cond-like clauses for the
  663. exception handling are specified to run with the continuation of the
  664. `guard', while any re-propagation of the exception happens with the
  665. continuation of the original `raise'.
  666. In practice, this means that one needs full `call-with-continuation' to
  667. implement the specified semantics, to be able to unwind the stack to the
  668. cond clauses, then rewind if none match. This is not only quite
  669. expensive, it is also error-prone as one usually doesn't want to rewind
  670. dynamic-wind guards in an exceptional situation. Additionally, as
  671. continuations bind tightly to the current thread, it makes it impossible
  672. to migrate a subcomputation with a different thread if a `guard' is live
  673. on the stack, as is done in Fibers.
  674. Guile now works around these issues by running the test portion of the
  675. guard expressions within the original `raise' continuation, and only
  676. unwinding once a test matches. This is an incompatible semantic change
  677. but we think the situation is globally much better, and we expect that
  678. very few people will be affected by the change.
  679. ** Optimization of top-level bindings within a compilation unit
  680. At optimization level 2 and above, Guile's compiler is now allowed to
  681. inline top-level definitions within a compilation unit. See
  682. "Declarative Modules" in the manual, for full details. This change can
  683. improve the performance of programs with many small top-level
  684. definitions by quite a bit!
  685. At optimization level 3 and above, Guile will assume that any top-level
  686. binding in a declarative compilation unit that isn't exported from a
  687. module can be completely inlined into its uses. (Prior to this change,
  688. -O3 was the same as -O2.) Note that with this new
  689. `seal-private-bindings' pass, private declarative bindings are no longer
  690. available for access from the first-class module reflection API. The
  691. optimizations afforded by this pass can be useful when you need a speed
  692. boost, but having them enabled at optimization level 3 means they are
  693. not on by default, as they change Guile's behavior in ways that users
  694. might not expect.
  695. ** By default, GOOPS classes are not redefinable
  696. It used to be that all GOOPS classes were redefinable, at least in
  697. theory. This facility was supported by an indirection in all "struct"
  698. instances, even though only a subset of structs would need redefinition.
  699. We wanted to remove this indirection, in order to speed up Guile
  700. records, allow immutable Guile records to eventually be described by
  701. classes, and allow for some optimizations in core GOOPS classes that
  702. shouldn't be redefined anyway.
  703. Thus in GOOPS now there are classes that are redefinable and classes
  704. that aren't. By default, classes created with GOOPS are not
  705. redefinable. To make a class redefinable, it should be an instance of
  706. `<redefinable-class>'. See "Redefining a Class" in the manual for more
  707. information.
  708. ** Define top-level bindings for aux syntax: `else', `=>', `...', `_'
  709. These auxiliary syntax definitions are specified to be defined in the
  710. R6RS and the R7RS. They were previously unbound, even in the R6RS
  711. modules. This change is not anticipated to cause any incompatibility
  712. with existing Guile code, and improves things for R6RS and R7RS users.
  713. ** Conventional gettext alias is now `G_'
  714. Related to the last point, since the "Fix literal matching for
  715. module-bound literals" change in the 2.2 series, it was no longer
  716. possible to use the conventional `_' binding as an alias for `gettext',
  717. because a local `_' definition would prevent `_' from being recognized
  718. as auxiliary syntax for `match', `syntax-rules', and similar. The new
  719. recommended conventional alias for `gettext' is `G_'.
  720. ** Add --r6rs command-line option
  721. The new `install-r6rs!' procedure adapts Guile's defaults to be more
  722. R6RS-compatible. This procedure is called if the user passes `--r6rs'
  723. as a command-line argument. See "R6RS Incompatibilities" in the manual,
  724. for full details.
  725. ** Add support for R7RS
  726. Thanks to Göran Weinholt and OKUMURA Yuki, Guile now implements the R7RS
  727. modules. As the R7RS library syntax is a subset of R6RS, to use R7RS
  728. you just `(import (scheme base))' and off you go. As with R6RS also,
  729. there are some small lexical incompatibilities regarding hex escapes;
  730. see "R6RS Support" in the manual, for full details.
  731. Also as with R6RS, there is an `install-r7rs!' procedure and a `--r7rs'
  732. command-line option.
  733. ** Add #:re-export-and-replace argument to `define-module'
  734. This new keyword specifies a set of bindings to re-export, but also
  735. marks them as intended to replace core bindings. See "Creating Guile
  736. Modules" in the manual, for full details.
  737. Note to make this change, we had to change the way replacement flags are
  738. stored, to being associated with modules instead of individual variable
  739. objects. This means that users who #:re-export an imported binding that
  740. was already marked as #:replace by another module will now see warnings,
  741. as they need to use #:re-export-and-replace instead.
  742. ** `define-module' #:autoload no longer pulls in the whole module
  743. One of the ways that a module can use another is "autoloads". For
  744. example:
  745. (define-module (a) #:autoload (b) (make-b))
  746. In this example, module `(b)' will only be imported when the `make-b'
  747. identifier is referenced. However besides the imprecision about when a
  748. given binding is actually referenced, this mechanism used to cause the
  749. whole imported module to become available, not just the specified
  750. bindings. This has now been changed to only import the specified bindings.
  751. This is a backward-incompatible change. The fix is to mention all
  752. bindings of interest in the autoload clause. Feedback is welcome.
  753. ** Improve SRFI-43 vector-fill!
  754. SRFI-43 vector-fill! now has the same performance whether an optional
  755. range is provided or not, and is also provided in core. As a side
  756. effect, vector-fill! and vector_fill_x no longer work on non-vector
  757. rank-1 arrays. Such cases were handled incorrectly before; for example,
  758. prior to this change:
  759. (define a (make-vector 10 'x))
  760. (define b (make-shared-array a (lambda (i) (list (* 2 i))) 5))
  761. (vector-fill! b 'y)
  762. => #1(y y y x x)
  763. This is now an error. Instead, use array-fill!.
  764. ** `iota' in core and SRFI-1 `iota' are the same
  765. Previously, `iota' in core would not accept start and step arguments and
  766. would return an empty list for negative count. Now there is only one
  767. `iota' function with the extended semantics of SRFI-1. Note that as an
  768. incompatible change, core `iota' no longer accepts a negative count.
  769. ** Improved Transport Layer Security (TLS) support in (web client)
  770. `http-request', `http-get', and related procedures from (web client) are
  771. able to access content over TLS ("HTTPS") since Guile 2.2. However,
  772. that support lacked important facilities, which are now available.
  773. First, these procedures now have a #:verify-certificate? parameter to
  774. enable or disable the verification of X.509 server certificates. The
  775. new `x509-certificate-directory' SRFI-39 parameter specifies where X.509
  776. certificates are searched for. Second, HTTPS proxies are now supported
  777. (in addition to HTTP proxies) and the new `current-https-proxy'
  778. parameter controls that. See "Web Client" in the manual for details.
  779. * New deprecations
  780. ** scm_t_uint8, etc deprecated in favor of C99 stdint.h
  781. It used to be that Guile defined its own `scm_t_uint8' because C99
  782. `uint8_t' wasn't widely enough available. Now Guile finally made the
  783. change to use C99 types, both internally and in Guile's public headers.
  784. Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN
  785. and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t
  786. instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t,
  787. intptr_t, and uintptr_t.
  788. ** The two-argument form of `record-constructor'
  789. Calling `record-constructor' with two arguments (the record type and a
  790. list of field names) is deprecated. Instead, call with just one
  791. argument, and provide a wrapper around that constructor if needed.
  792. * Incompatible changes
  793. ** All deprecated code removed
  794. All code deprecated in Guile 2.2 has been removed. See older NEWS, and
  795. check that your programs can compile without linker warnings and run
  796. without runtime warnings. See "Deprecation" in the manual.
  797. In particular, the function `scm_generalized_vector_get_handle' which
  798. was deprecated in 2.0.9 but remained in 2.2, has now finally been
  799. removed. As a replacement, use `scm_array_get_handle' to get a handle
  800. and `scm_array_handle_rank' to check the rank.
  801. ** Remove "self" field from vtables and "redefined" field from classes
  802. These fields were used as part of the machinery for class redefinition
  803. and is no longer needed.
  804. ** VM hook manipulation simplified
  805. The low-level mechanism to instrument a running virtual machine for
  806. debugging and tracing has been simplified. See "VM Hooks" in the
  807. manual, for more.
  808. * Changes to the distribution
  809. ** New effective version
  810. The "effective version" of Guile is now 3.0, which allows parallel
  811. installation with other effective versions (for example, the older Guile
  812. 2.2). See "Parallel Installations" in the manual for full details.
  813. Notably, the `pkg-config' file is now `guile-3.0', and there are new
  814. `guile-3' and `guile-3.0' features for `cond-expand'.
  815. Changes in 2.2.6 (since 2.2.5):
  816. * Bug fixes
  817. ** Fix regression introduced in 2.2.5 that would break HTTP servers
  818. Guile 2.2.5 introduced a bug that would break the built-in HTTP server
  819. provided by the (web server) module. Specifically, HTTP servers would
  820. hang while reading requests. See <https://bugs.gnu.org/36350>.
  821. ** 'strftime' and 'strptime' honor the current locale encoding
  822. Until now these procedures would wrongfully assume that the locale
  823. encoding is always UTF-8. See <https://bugs.gnu.org/35920>.
  824. ** Re-export 'current-load-port'
  825. This procedure was erroneously removed in the 2.2 series but was still
  826. documented.
  827. ** Minor documentation mistakes were fixed
  828. Changes in 2.2.5 (since 2.2.4):
  829. * Notable improvements
  830. ** Greatly improved performance of bidirectional pipes.
  831. The performance of bidirectional pipes, as created using 'open-pipe' or
  832. 'open-pipe*' in OPEN_BOTH mode, has been greatly improved. When reading
  833. large blocks of binary data from a bidirectional pipe, the maximum
  834. bandwidth has been increased by a factor of ~10^3 in some cases.
  835. ** New 'get-bytevector-some!' I/O primitive.
  836. This new I/O primitive is similar to 'get-bytevector-some' from the
  837. R6RS, except that it writes its data to a user-specified range of
  838. indices in an existing bytevector. As a corollary, it is also now
  839. possible to specify a maximum number of bytes to read. Note that
  840. 'get-bytevector-some', and now 'get-bytevector-some!', are unique among
  841. Guile's I/O primitives in their support of efficient binary reads of
  842. potentially large blocks while also allowing for short reads, to avoid
  843. undesired blocking. Now these operations can be performed while also
  844. avoiding heap-allocation.
  845. 'get-bytevector-some!' is needed to efficiently implement the new
  846. bidirectional pipes, which are built upon R6RS custom binary
  847. input/output ports.
  848. ** get-bytevector-{n!,some,some!} now support suspendable I/O.
  849. Scheme implementations of 'get-bytevector-n!', 'get-bytevector-some',
  850. and 'get-bytevector-some!' have been added to (ice-9 suspendable-ports).
  851. As a result, these I/O operations now support suspendable I/O.
  852. * Compiler improvements
  853. ** guild compile: Add -Wshadowed-toplevel.
  854. Top-level definitions that shadow previous top-level definitions from
  855. the same compilation unit will now trigger a compile-time warning, if
  856. -Wshadowed-toplevel is enabled. It is enabled by default.
  857. ** guild compile: Add '-x' flag.
  858. Passing "-x EXT" to 'guild compile' will now cause EXT to be recognized
  859. as a valid source file name extension. For example, to compile R6RS
  860. code, you might want to pass "-x .sls" so that files ending in ".sls"
  861. can be found.
  862. * Miscellaneous improvements
  863. ** Bootstrap optimization
  864. eval.go and psyntax-pp.go are now built before the rest of the .go files
  865. so that they are processed by a fast macro expander. This saves time
  866. when using parallel builds.
  867. ** put-u8 now always writes a single byte, regardless of the port encoding.
  868. Previously, (put-u8 PORT OCTET) worked as expected only when writing to
  869. binary ports, i.e. those with port encoding "ISO-8859-1" a.k.a. Latin-1.
  870. Strictly speaking, this meets the requirements of the R6RS 'put-u8',
  871. which need only support binary ports. However, Guile in fact allows
  872. binary I/O to be performed on any port, and yet 'put-u8' behaved in a
  873. surprising way with other port encodings: it would perform a _textual_
  874. I/O operation, writing the character with Unicode scalar value OCTET.
  875. Now, 'put-u8' always writes a single byte with value OCTET, regardless
  876. of the port encoding.
  877. ** Optimize fixnum exact integer square roots.
  878. 'exact-integer-sqrt' now avoids heap allocation when applied to a
  879. fixnum. 'sqrt' now avoids heap allocation when applied to a fixnum
  880. that's a perfect square. Fewer heap allocations are now required when
  881. applying 'sqrt' to a square of an exact rational whose numerator or
  882. denominator are fixnums.
  883. ** scm_mkstrport: Optimize the POS -> BYTE_POS conversion.
  884. scm_mkstrport now avoids an unnecessary heap allocation and conversion
  885. to UTF-8, when STR is provided and POS is non-zero.
  886. ** SRFI-19: Support ~N in string->date.
  887. Support for the ~N escape, which allows fractions of a second to be
  888. parsed, is now supported in SRFI-19 'string->date'.
  889. ** SRFI-19: Update the leap second table.
  890. The leap on 1 January 2017 was added to SRFI-19's leap second table.
  891. ** stexi->shtml: Add support for @i, @math, @tie and @dots.
  892. stexi->shtml is now able to convert @i, @math, @tie and @dots to HTML.
  893. ** Define AT_SYMLINK_NOFOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH.
  894. AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH are now available
  895. from Scheme, if supported on the platform.
  896. ** Improvements to the 'time' macro from (ice-9 time).
  897. The 'time' macro now supports expressions that return multiple values.
  898. It has also been rewritten as a hygienic 'syntax-rules' macro.
  899. Previously, it was built using 'define-macro', and was therefore
  900. unhygienic. This is not merely an internal implementation detail, but
  901. is potentially relevant to any user of the 'time' macro, since it could
  902. lead to unintended variable capture and other problems.
  903. ** Clarify the documentation for 'nil?'.
  904. See commit b44f505f1571fc9c42e58982f161a9cfc81fb7f4.
  905. ** Clarify the manual's "Processes" section.
  906. See commit 8cdd3a0773930ca872a13aada7a1344f03bb382b.
  907. ** Avoid 'with-latin1-locale' in binary I/O tests.
  908. See commit 162a031e5f2c64cd23fcf069fb7b5071196f9527.
  909. ** Update user-visible copyright years.
  910. * Bug fixes
  911. ** Avoid regexp ranges in HTTP inter-protocol exploitation check.
  912. The regular expression used to check for HTTP inter-protocol
  913. exploitation attacks previously used a character range '0-9', whose
  914. meaning depends on the current locale. This has now been fixed.
  915. ** Fixes to the SRFI-19 time/date library.
  916. *** TAI-to-UTC conversion leaps at the wrong time.
  917. <https://bugs.gnu.org/21911>
  918. *** time-utc->date shows bogus zone-dependent leap second.
  919. <https://bugs.gnu.org/22034>
  920. *** Manual incorrectly describes Julian Date.
  921. <https://bugs.gnu.org/21902>
  922. *** date->string duff ISO 8601 negative years.
  923. <https://bugs.gnu.org/21903>
  924. *** date->string duff ISO 8601 format for non-4-digit years.
  925. <https://bugs.gnu.org/21904>
  926. *** julian-day->date negative input breakage.
  927. <https://bugs.gnu.org/21906>
  928. *** time-duration screws up negative durations.
  929. <https://bugs.gnu.org/26162>
  930. *** time-difference doesn't detect error of differing time types.
  931. <https://bugs.gnu.org/26163>
  932. ** Improve overflow checks in bytevector, string, and I/O operations.
  933. Several numerical computations, performed using primitive C arithmetic
  934. in Guile's core bytevector, string, and I/O operations, have been
  935. rewritten to avoid overflows.
  936. ** Fix type inferencing for 'nil?' and 'null?' predicates.
  937. Previously, the compiler would sometimes miscompile certain combinations
  938. of 'nil?' and 'null?' predicates present within the same top-level form.
  939. See <https://bugs.gnu.org/33036>.
  940. ** Fix 'atomic-box-compare-and-swap!'.
  941. Previously, 'atomic-box-compare-and-swap!' would sometimes spuriously
  942. fail on architectures based on Load-Linked/Store-Conditional (LL/SC)
  943. synchronication primitives (e.g. ARM, PowerPC, and MIPS) in a way that
  944. was undetectable by the caller. See <https://bugs.gnu.org/32786>.
  945. ** Make URI handling locale independent.
  946. Previously, procedures in (web uri) would misbehave in some locales
  947. including sv_SE. See <https://bugs.gnu.org/35785>.
  948. ** Strings, i18n: Limit the use of alloca to approximately 8 kilobytes.
  949. Previously, 'string-locale-ci=?', 'string-locale-ci<?',
  950. 'string-locale<?', 'string-locale-{downcase,upcase,titlecase}' and
  951. 'string-normalize-{nfd,nfc,nfkd,nfkc}' would overflow the C stack when
  952. applied to very large strings.
  953. ** Fix documentation of R6RS 'binary-port?' to reflect reality.
  954. Previously, the documentation incorrectly stated that 'binary-port?'
  955. always returns #t. In fact, it returns #t if and only if the port
  956. encoding is "ISO-8859-1". The documentation for 'binary-port?' and
  957. 'textual-port?' has been rewritten to reflect the current reality, and
  958. also to leave open the possibility of changing the behavior of these
  959. predicates in a future version of Guile.
  960. ** Avoid passing NULL to 'memcpy' and 'memcmp'.
  961. Previously, NULL was sometimes passed to 'memcpy' or 'memcmp' when the
  962. size argument was 0.
  963. ** Save and restore errno in the signal handler.
  964. Previously, Guile's synchronous C signal handler failed to save and
  965. restore 'errno', although it might change its value. This could
  966. potentially lead to spurious corruptions of 'errno' within threads
  967. interrupted by signals.
  968. ** scm_to_stringn: Avoid passing NULL to c_strcasecmp.
  969. <https://lists.gnu.org/archive/html/guile-user/2019-05/msg00070.html>
  970. ** r6rs-ports: Accept 'port-position' values greater than 2^32.
  971. <https://bugs.gnu.org/32161>
  972. ** r6rs-ports: 'put-bytevector' accepts 64-bit integers.
  973. Fixed in commit 741c45458da0831a12a4f8d729814bf9f2cb6571.
  974. ** Fix R6RS call-with-{input,output}-file to open textual ports.
  975. <https://bugs.gnu.org/32329>
  976. ** Update (ice-9 match) to include selected bug fixes from upstream.
  977. *** ice-9/match named match-let is not working
  978. <https://bugs.gnu.org/22925>
  979. ** open-process: Fix dup(2) and execvp(2) error handling.
  980. Fixed in commit 521f1ab4709217407496004019c00005d2a82f78.
  981. ** bytevectors: Support large indices in integer accessors.
  982. Fixed in commit b9cf3517efd4643670d970d2692bc7bede9a85e8.
  983. ** bytevectors: Fix list validation of *list->bytevector procedures.
  984. <https://bugs.gnu.org/32938>
  985. ** Gracefully handle huge shift counts in 'ash' and 'round-ash'.
  986. <https://bugs.gnu.org/32644>
  987. ** In 'ash' and 'round-ash', handle right shift count of LONG_MIN.
  988. <https://bugs.gnu.org/21901>
  989. ** Use 'scm_from_utf8_{string,symbol,keyword}' for C string literals.
  990. <https://bugs.gnu.org/33044>
  991. ** web: Add support for HTTP header continuation lines.
  992. Fixed in commit 73cde5ed7218a090ecee888870908af5445796f0.
  993. ** scm_seed_to_random_state: Support wide string arguments.
  994. <https://bugs.gnu.org/33044>
  995. ** Do not warn the user when 'madvise' returns ENOSYS.
  996. Fixed in commit 45e4ace6603e00b297e6542362273041aebe7305.
  997. ** Add 'texinfo' as a dependency in the README.
  998. Fixed in commit 1bbce71501198c3c7abdf07941f5cdc1434858c2.
  999. ** Don't mutate read-only string in ports test.
  1000. Fixed in commit 552f007e91a97f136aad1b22918688b61d03a4a3.
  1001. ** Remove redefinition of when & unless in snarf-check-and-output-texi.
  1002. Fixed in commit 1ba5d6f47a54dceee4452a1e7726d2635e5b3449.
  1003. ** Fix strftime when Guile is built without threading support.
  1004. Fixed in commit 139c702fc8b61fdeb813c3428fef3701ea8677f9.
  1005. ** Avoid leaking a file descriptor in test-unwind.
  1006. Fixed in commit 1437b76777e576b3d000e2f80c5ecdb33a74ac33.
  1007. ** Fix binary output on files created by mkstemp!.
  1008. Fixed in commit 78468baa118d316050a27e43250966e52ffd3d54.
  1009. ** Fix crypt-on-glibc test error.
  1010. Fixed in commit 27ffbfb0235de466016ea5a6421508f6548971b6.
  1011. ** Fix race when expanding syntax-parameterize and define-syntax-parameter.
  1012. <https://bugs.gnu.org/27476#102>
  1013. ** Add a fallback value for the locale-monetary-decimal-point.
  1014. Fixed in commit 9ba449643d4c2ac1d2174befca7d765af222bcc0.
  1015. ** Handle newlib C library's langinfo constant names.
  1016. Fixed in commit 92105d13ad1363b511214589b7d62d95304beb17.
  1017. ** Make locale monetary conversion tests be less strict on terminal whitespace.
  1018. Fixed in commit 2a3ccfb66714efc1c081ea6e921336f80b756d3c.
  1019. ** Disable test for current value of setitimer on Cygwin.
  1020. Fixed in commit 3a64c504caaf83e9faf2ec9b7d0e031e1a6a09b9.
  1021. ** Fix gc.test "after-gc-hook gets called" failures.
  1022. <https://bugs.gnu.org/31776#17>
  1023. ** Update iconv.m4 from gnulib, to fix an iconv leak during configure.
  1024. <https://lists.gnu.org/archive/html/guile-devel/2019-05/msg00011.html>
  1025. ** guild compile: Add missing newline in "unrecognized option" error message.
  1026. Fixed in commit 85c5bae4fd94f8686d26fd792b7c0f588c23bd94.
  1027. ** 'basename' now correctly handles "/" and "//".
  1028. Fixed in commit 36ad1d24b3d2c174a64c445502a36f19605dbd65.
  1029. ** Make srfi-71 visible through 'cond-expand'.
  1030. Fixed in commit 59a06d8392234fbec8b3605cec266a7a0a7b7a56.
  1031. Changes in 2.2.4 (since 2.2.3):
  1032. * New interfaces and functionality
  1033. ** SRFI-71 (Extended LET-syntax for multiple values)
  1034. Guile now includes SRFI-71, which extends let, let*, and letrec to
  1035. support assigning multiple values. See "SRFI-71" in the manual for
  1036. details.
  1037. ** (web client) export 'http-request' procedure
  1038. The 'http-request' procedure is the generalized procedure underneath
  1039. 'http-get', 'http-post', etc.
  1040. ** GDB support now registers the 'guile-backtrace' GDB command
  1041. The 'guile-backtrace' GDB command displays a backtrace of the VM stack
  1042. for the current thread.
  1043. ** Recognize RISC-V compilation targets in (system base target)
  1044. * Bug fixes
  1045. ** Fix stack-marking bug affecting multi-threaded programs
  1046. (<https://bugs.gnu.org/28211>)
  1047. ** Add missing SYNC_IP calls in the VM
  1048. These could cause multi-threaded code to crash.
  1049. ** Fix multi-threaded access to modules
  1050. (<https://bugs.gnu.org/30602>, <https://bugs.gnu.org/31879>,
  1051. and <https://bugs.gnu.org/31878>)
  1052. ** (ice-9 match) now has better documentation
  1053. ** 'get-bytevector-n' and 'get-bytevector-n!' can now read more than 4 GB
  1054. ** Fix cross-compilation support for elisp
  1055. ** Fix error reporting in 'load-thunk-from-memory'
  1056. ** Fix GOOPS 'instance?' to work on objects that aren't structs
  1057. (<https://bugs.gnu.org/31606>)
  1058. ** Fix type inference for bitwise logical operators
  1059. (<https://bugs.gnu.org/31474>)
  1060. ** Avoid inexact arithmetic in the type inferrer for 'sqrt'
  1061. ** Fix floating point unboxing regression in 2.2.3
  1062. (<https://bugs.gnu.org/30020>)
  1063. ** Fix eta-conversion edge cases in peval (<https://bugs.gnu.org/29520>)
  1064. ** Correctly interpret SRFI-18 timeout parameters
  1065. (<https://bugs.gnu.org/29704>)
  1066. ** 'select' returns empty sets upon EINTR and EAGAIN
  1067. (<https://bugs.gnu.org/30368>)
  1068. ** Restore pre-2.2.3 '%fresh-auto-compile' behavior
  1069. This reverts an incorrect fix for <https://bugs.gnu.org/29226>.
  1070. Changes in 2.2.3 (since 2.2.2):
  1071. * New interfaces and functionality
  1072. ** (web uri) module has better support for RFC 3986
  1073. The URI standard, RFC 3986, defines additional "relative-ref" and
  1074. "URI-reference" data types. Thanks to Daniel Hartwig, Guile's support
  1075. for these URI subtypes has been improved. See "Universal Resource
  1076. Identifiers" in the manual, for more.
  1077. ** `struct-ref/unboxed' and `struct-set!/unboxed'
  1078. These procedures should be used when accessing struct fields with type
  1079. `u' (unboxed). See "Structure Basics" in the manual, for full details.
  1080. ** Improved support for arrays with non-zero lower bounds
  1081. Thanks to work by Daniel Llorens, Guile no longer exhibits buggy
  1082. behavior in "sort" or "sort!" on arrays with non-zero lower dimension
  1083. bounds. Arrays with non-zero lower dimension bounds are now allowed for
  1084. array-slice-for-each, and truncated-print now supports bitvectors and
  1085. arrays with non-zero lower bounds. General arrays are now supported as
  1086. well for random:hollow-sphere!.
  1087. ** Add `uintptr_t' and `intptr_t' to FFI types.
  1088. See "Foreign Types" in the manual for full details.
  1089. * Compiler improvements
  1090. ** Improve speed of compiler backend for functions without loops
  1091. This is a marginal speed improvement, especially for code compiled with
  1092. optimization level "-O1" or below.
  1093. ** Disable slot pre-coloring for optimization level "-O1" or below
  1094. This improves the speed of the compiler backend.
  1095. ** Improve complexity of constant subexpression elimination pass
  1096. This is a large speed improvement when compiling large files with the
  1097. default "-O2" pass.
  1098. ** CPS conversion avoids generating return arity adapters if possible
  1099. In Guile, the expression in (define a EXP) may return 1 or more values.
  1100. This value elision in "value" context is implicit earlier in the Guile
  1101. compiler, in Tree-IL, but is made explicit in the CPS middle-end
  1102. language by the addition of the equivalent of explicit call-with-values
  1103. continuations that ignore additional values. However in many cases we
  1104. can avoid generating these extra continuations if we know that EXP is
  1105. single-valued, as is the case for example for constants or variable
  1106. references or the like.
  1107. Although these "arity-adapting continuations" would be removed by dead
  1108. code elimination at optimization level "-O2" or above, they were still
  1109. being needlessly generated in the first place. Guile now avoids
  1110. generating them, speeding up not only the optimizer at -O2 but also the
  1111. entire compiler pipeline at -O1 or below, as well as improving the
  1112. residual code at -O1 or below.
  1113. * New deprecations
  1114. ** Using `uri?' as a predicate on relative-refs deprecated
  1115. If you don't care whether the URI is a relative-ref or not, use
  1116. `uri-reference?'. If you do, use `uri-reference?' and `relative-ref?'.
  1117. In the future `uri?' will return a true value only for URIs that specify
  1118. a scheme.
  1119. ** Struct tail arrays deprecated
  1120. Guile's structures used to have a facility whereby each instance of a
  1121. vtable can contain a variable-length tail array of values. The length
  1122. of the tail array was stored in the structure. This facility was
  1123. originally intended to allow C code to expose raw C structures with
  1124. word-sized tail arrays to Scheme.
  1125. However, the tail array facility was confusing and doesn't work very
  1126. well. It was very rarely used, but it insinuates itself into all
  1127. invocations of `make-struct'. For this reason the clumsily-named
  1128. `make-struct/no-tail' procedure can actually be more elegant in actual
  1129. use, because it doesn't have a random `0' argument stuck in the middle.
  1130. Tail arrays also inhibit optimization by allowing instances to affect
  1131. their shapes. In the absence of tail arrays, all instances of a given
  1132. vtable have the same number and kinds of fields. This uniformity can be
  1133. exploited by the runtime and the optimizer. The presence of tail arrays
  1134. make some of these optimizations more difficult.
  1135. Finally, the tail array facility is ad-hoc and does not compose with the
  1136. rest of Guile. If a Guile user wants an array with user-specified
  1137. length, it's best to use a vector. It is more clear in the code, and
  1138. the standard optimization techniques will do a good job with it.
  1139. For all of these reasons, tail arrays are deprecated in Guile 2.2 and
  1140. will be removed from Guile 3.0. Likewise, `make-struct' /
  1141. `scm_make_struct' is deprecated in favor of `make-struct/no-tail' /
  1142. `scm_make_struct_no_tail'. Perhaps one day we will be able to reclaim
  1143. the `make-struct' name!
  1144. ** Struct "self" slots deprecated
  1145. It used to be that you could make a structure vtable that had "self"
  1146. slots. Instances of that vtable would have those slots initialized to
  1147. the instance itself. This can be useful in C code where you might have
  1148. a pointer to the data array, and want to get the `SCM' handle for the
  1149. structure. However this was a little used complication without any use
  1150. in Scheme code. To replace it, just use "p" slots and initialize the
  1151. slot values manually on initialization.
  1152. ** Struct fields with opaque ("o") protection deprecated
  1153. Struct fields are declared with a "protection", meaning read-only ('r'),
  1154. read-write ('w'), or opaque ('o'). There is also "hidden" ('h') which
  1155. is read-write but which isn't initialized by arguments passed to
  1156. `make-struct/no-tail', but that's a detail. Opaque struct fields were
  1157. used to allocate storage in a struct that could only be accessed by C.
  1158. This facility was very rarely used (unused in Guile itself) but now that
  1159. we are implementing more and more in Scheme, it is completely useless.
  1160. To enforce permissions on struct fields, instead layer on an abstraction
  1161. at a higher level, in the same way that immutable record fields are
  1162. simply those which don't have an accessor.
  1163. ** Using `struct-ref' and `struct-set!' on unboxed fields is deprecated
  1164. Use the new `struct-ref/unboxed' and `struct-set!/unboxed' instead.
  1165. * Bug fixes
  1166. ** guile.m4 now checks for Guile 2.2 by default
  1167. Before, it was still preferring Guile 2.0. It now also supports the
  1168. Guile 3.0 prereleases.
  1169. ** Fix setting breakpoints from the REPL
  1170. ** Allow GDB support to be used with GDB linked against Guile 2.0.
  1171. ** Fix deadlock in `readdir' on error.
  1172. ** Fix crash on ia64 during thread switches.
  1173. ** Fix bug inferring range of `logand' computations with negative numbers
  1174. ** Fix bug when issuing HTTP requests through proxies.
  1175. ** Refactor weak hash table implementation to be more robust
  1176. Guile 2.2's weak hash table implementation had three big problems. The
  1177. first was a bug causing these tables to leak memory when they would be
  1178. resized. The second was that the implementation was designed so that
  1179. tables should be visited by the mark phase of the garbage collector in
  1180. one big piece. This could cause the garbage collector to see too many
  1181. newly marked objects at once, causing inefficies in garbage collection.
  1182. Finally, the way in which lost weak references were ultimately removed
  1183. from weak tables caused a race between the finalizer threads and the
  1184. mutator threads, leading to unbounded excess space retention in
  1185. pathological cases. All of this problems have been fixed.
  1186. ** Allow garbage collection of revealed file ports
  1187. Guile can mark a file port as "revealed" if Scheme has been given access
  1188. to the file descriptor. In that case, the file descriptor will not be
  1189. closed when the port is garbage-collected. However we had a bug that
  1190. for revealed ports prevented the port from ever being garbage-collected,
  1191. leading to memory leaks of Guile's internal port buffers. This is now
  1192. fixed.
  1193. ** Fix put-bytevector, unget-bytevector with start == bytevector length
  1194. ** Enable GNU Readline 7.0's support for "bracketed paste".
  1195. Before, when pasting an expression that contained TAB characters into
  1196. Guile's REPL with GNU Readline support enabled, the pasted TAB
  1197. characters would trigger autocompletion in Readline. This was never
  1198. what you wanted. Guile now sets the new "bracketed-paste" option in GNU
  1199. Readline 7.0 to on by default, making readline treat pastes into the
  1200. terminal as atomic units without control characters. See "Readline
  1201. Options" in the manual for full details.
  1202. ** Fix time-monotonic from SRFI-19; broken in 2.2.1.
  1203. Changes in 2.2.2 (since 2.2.1):
  1204. * Bug fixes
  1205. ** Syntax objects are once more comparable with 'equal?'
  1206. The syntax object change in 2.2.1 had the unintended effect of making
  1207. syntax objects no longer comparable with equal?. This release restores
  1208. the previous behavior.
  1209. ** Restore libgc dependency
  1210. The change to throw exceptions when mutating literal constants partly
  1211. relied on an interface that was added to our garbage collector (BDW-GC)
  1212. after its 7.2 release. Guile 2.2.2 adds a workaround to allow Guile to
  1213. continue be used with libgc as old as 7.2.
  1214. ** SRFI-37 bug fix to not error on empty-string arguments.
  1215. Thanks to Thomas Danckaert for fixing this long-standing bug.
  1216. Changes in 2.2.1 (since 2.2.0):
  1217. * Notable changes
  1218. ** New sandboxed evaluation facility
  1219. Guile now has a way to execute untrusted code in a safe way. See
  1220. "Sandboxed Evaluation" in the manual for full details, including some
  1221. important notes on limitations on the sandbox's ability to prevent
  1222. resource exhaustion.
  1223. ** All literal constants are read-only
  1224. According to the Scheme language definition, it is an error to attempt
  1225. to mutate a "constant literal". A constant literal is data that is a
  1226. literal quoted part of a program. For example, all of these are errors:
  1227. (set-car! '(1 . 2) 42)
  1228. (append! '(1 2 3) '(4 5 6))
  1229. (vector-set! '#(a b c) 1 'B)
  1230. Guile takes advantage of this provision of Scheme to deduplicate shared
  1231. structure in constant literals within a compilation unit, and to
  1232. allocate constant data directly in the compiled object file. If the
  1233. data needs no relocation at run-time, as is the case for pairs or
  1234. vectors that only contain immediate values, then the data can actually
  1235. be shared between different Guile processes, using the operating
  1236. system's virtual memory facilities.
  1237. However, in Guile 2.2.0, constants that needed relocation were actually
  1238. mutable -- though (vector-set! '#(a b c) 1 'B) was an error, Guile
  1239. wouldn't actually cause an exception to be raised, silently allowing the
  1240. mutation. This could affect future users of this constant, or indeed of
  1241. any constant in the compilation unit that shared structure with the
  1242. original vector.
  1243. Additionally, attempting to mutate constant literals mapped in the
  1244. read-only section of files would actually cause a segmentation fault, as
  1245. the operating system prohibits writes to read-only memory. "Don't do
  1246. that" isn't a very nice solution :)
  1247. Both of these problems have been fixed. Any attempt to mutate a
  1248. constant literal will now raise an exception, whether the constant needs
  1249. relocation or not.
  1250. ** Syntax objects are now a distinct type
  1251. It used to be that syntax objects were represented as a tagged vector.
  1252. These values could be forged by users to break scoping abstractions,
  1253. preventing the implementation of sandboxing facilities in Guile. We are
  1254. as embarrassed about the previous situation as we pleased are about the
  1255. fact that we've fixed it.
  1256. Unfortunately, during the 2.2 stable series (or at least during part of
  1257. it), we need to support files compiled with Guile 2.2.0. These files
  1258. may contain macros that contain legacy syntax object constants. See the
  1259. discussion of "allow-legacy-syntax-objects?" in "Syntax Transformer
  1260. Helpers" in the manual for full details.
  1261. * Bug fixes
  1262. *** Fix snarfing with -ggdb3 (#25803)
  1263. *** Fix spurious snarf warnings for net_db.c
  1264. *** Output statprof flat display to correct port
  1265. *** Document guile-2.2 cond-expand feature
  1266. *** Add --with-bdw-gc for BSDs that use bdw-gc-threaded (see README)
  1267. *** Documentation typo fixes (#26188)
  1268. *** Fix SRFI-9 date->string bugs with ~N and ~F (#26261, #26260, #26259)
  1269. *** SRFI-19 current-time-monotonic returns time of right type (#26329)
  1270. *** Avoid causing GC when looking up exception handler
  1271. *** Increment objcode version, in a compatible way
  1272. *** Fix compile warning in (system base types)
  1273. *** Only run tests that require fork if it is provided
  1274. *** Speed up procedure-minimum-arity for fixed arity
  1275. *** REPL server tests catch ECONNABORTED
  1276. *** Avoid deprecated argument to setvbuf in (web client)
  1277. *** Remove non-existent 'open-connection-for-uri' export from (web client)
  1278. Changes in 2.2.0 (changes since the 2.0.x stable release series):
  1279. * Notable changes
  1280. ** Speed
  1281. The biggest change in Guile 2.2 is a complete rewrite of its virtual
  1282. machine and compiler internals. The result is faster startup time,
  1283. better memory usage, and faster execution of user code. See the
  1284. "Performance improvements" section below for more details.
  1285. ** Better thread-safety
  1286. This new release series takes the ABI-break opportunity to fix some
  1287. interfaces that were difficult to use correctly from multiple threads.
  1288. Notably, weak hash tables and ports are now transparently thread-safe.
  1289. See "Scheduling" in the manual, for updated documentation on threads and
  1290. communications primitives.
  1291. ** Better space-safety
  1292. It used to be the case that, when calling a Scheme procedure, the
  1293. procedure and arguments were always preserved against garbage
  1294. collection. This is no longer the case; Guile is free to collect the
  1295. procedure and arguments if they become unreachable, or to re-use their
  1296. slots for other local variables. Guile still offers good-quality
  1297. backtraces by determining the procedure being called from the
  1298. instruction pointer instead of from the value in slot 0 of an
  1299. application frame, and by using a live variable map that allows the
  1300. debugger to know which locals are live at all points in a frame.
  1301. ** Off-main-thread finalization
  1302. Following Guile 2.0.6's change to invoke finalizers via asyncs, Guile
  1303. 2.2 takes the additional step of invoking finalizers from a dedicated
  1304. finalizer thread, if threads are enabled. This avoids concurrency
  1305. issues between finalizers and application code, and also speeds up
  1306. finalization. If your application's finalizers are not robust to the
  1307. presence of threads, see "Foreign Objects" in the manual for information
  1308. on how to disable automatic finalization and instead run finalizers
  1309. manually.
  1310. ** Better locale support in Guile scripts
  1311. When Guile is invoked directly, either from the command line or via a
  1312. hash-bang line (e.g. "#!/usr/bin/guile"), it now installs the current
  1313. locale via a call to `(setlocale LC_ALL "")'. For users with a unicode
  1314. locale, this makes all ports unicode-capable by default, without the
  1315. need to call `setlocale' in your program. This behavior may be
  1316. controlled via the GUILE_INSTALL_LOCALE environment variable; see
  1317. "Environment Variables" in the manual, for more.
  1318. ** Complete Emacs-compatible Elisp implementation
  1319. Thanks to the work of Robin Templeton, Guile's Elisp implementation is
  1320. now fully Emacs-compatible, implementing all of Elisp's features and
  1321. quirks in the same way as the editor we know and love.
  1322. ** Dynamically expandable stacks
  1323. Instead of allocating fixed stack sizes for running Scheme code, Guile
  1324. now starts off each thread with only one page of stack, and expands and
  1325. shrinks it dynamically as needed. Guile will throw an exception for
  1326. stack overflows if growing the stack fails. It is also possible to
  1327. impose a stack limit during the extent of a function call. See "Stack
  1328. Overflow" in the manual, for more.
  1329. This change allows users to write programs that use the stack as a data
  1330. structure for pending computations, as it was meant to be, without
  1331. reifying that data out to the heap. Where you would previously make a
  1332. loop that collect its results in reverse order only to re-reverse them
  1333. at the end, now you can just recurse without worrying about stack
  1334. overflows.
  1335. Using the stack also allows more code to be continuation-safe. For
  1336. example, returning multiple times from a `map' procedure in Guile 2.0
  1337. would change the value of previously returned result lists, because
  1338. `map' built its result list in reverse order then used `reverse!' to
  1339. return the proper result. Now in Guile 2.2, `map' is implemented using
  1340. straightforward recursion, which eliminates this bug while maintaining
  1341. good performance as well as good space complexity.
  1342. ** Out-of-memory improvements
  1343. Instead of aborting, failures to allocate memory will now raise an
  1344. unwind-only `out-of-memory' exception, and cause the corresponding
  1345. `catch' expression to run garbage collection in order to free up memory.
  1346. ** GOOPS core reimplemented in Scheme
  1347. Guile's object orientation system, GOOPS, has been mostly reimplemented
  1348. in Scheme. This decreases its maintenance burden on the rest of Guile,
  1349. while also makes it possible to implement new features in the future,
  1350. such as method combinations or `eqv?' specializers.
  1351. ** Better handling of GUILE_LOAD_COMPILED_PATH
  1352. It used to be that Guile would stop at the first .go file it found in
  1353. the GUILE_LOAD_COMPILED_PATH. If that file turned out to be out of
  1354. date, then no .go file would be loaded. Now Guile will continue to
  1355. search the path for a file which is both present and up-to-date, with
  1356. respect to the .scm file.
  1357. ** C99 required
  1358. Following Emacs, you must use a C99-capable compiler when building
  1359. Guile. In the future we also expect require C99 to use Guile's C
  1360. interface, at least for `stdint' support.
  1361. ** Lightweight pre-emptive threading primitives
  1362. The compiler now inserts special "handle-interrupts" opcodes before each
  1363. call, return, and backwards jump target. This allows the user to
  1364. interrupt any computation and to accurately profile code using
  1365. interrupts. It used to be that interrupts were run by calling a C
  1366. function from the VM; now interrupt thunks are run directly from the VM.
  1367. This allows interrupts to save a delimited continuation and, if the
  1368. continuation was established from the same VM invocation (the usual
  1369. restriction), that continuation can then be resumed. In this way users
  1370. can implement lightweight pre-emptive threading facilities.
  1371. ** with-dynamic-state in VM
  1372. Similarly, `with-dynamic-state' no longer recurses out of the VM,
  1373. allowing captured delimited continuations that include a
  1374. `with-dynamic-state' invocation to be resumed. This is a precondition
  1375. to allow lightweight threading libraries to establish a dynamic state
  1376. per lightweight fiber.
  1377. * Performance improvements
  1378. ** Faster programs via new virtual machine
  1379. Guile now compiles programs to instructions for a new virtual machine.
  1380. The new virtual machine's instructions can address their source and
  1381. destination operands by "name" (slot). This makes access to named
  1382. temporary values much faster than in Guile 2.0, and removes a lot of
  1383. value-shuffling that the old virtual machine had to do. The end result
  1384. is that loop-heavy code can be two or three times as fast with Guile 2.2
  1385. as in 2.0. Your mileage may vary, of course; see "A Virtual Machine for
  1386. Guile" in the manual for the nitties and the gritties.
  1387. ** Better startup time, memory usage with ELF object file format
  1388. Guile now uses the standard ELF format for its compiled code. (Guile
  1389. has its own loader and linker, so this does not imply a dependency on
  1390. any particular platform's ELF toolchain.) The benefit is that Guile is
  1391. now able to statically allocate more data in the object files. ELF also
  1392. enables more sharing of data between processes, and decreases startup
  1393. time (about 40% faster than the already fast startup of the Guile 2.0
  1394. series). Guile also uses DWARF for some of its debugging information.
  1395. Much of the debugging information can be stripped from the object files
  1396. as well. See "Object File Format" in the manual, for full details.
  1397. ** Better optimizations via compiler rewrite
  1398. Guile's compiler now uses a Continuation-Passing Style (CPS)
  1399. intermediate language, allowing it to reason easily about temporary
  1400. values and control flow. Examples of optimizations that this permits
  1401. are optimal contification, optimal common subexpression elimination,
  1402. dead code elimination, loop-invariant code motion, loop peeling, loop
  1403. inversion, parallel moves with at most one temporary, allocation of
  1404. stack slots using precise liveness information, unboxing of 64-bit
  1405. integers and floating point values, and closure optimization. For more,
  1406. see "Continuation-Passing Style" in the manual.
  1407. ** Faster interpreter
  1408. Combined with a number of optimizations to the interpreter itself,
  1409. simply compiling `eval.scm' with the new compiler yields an interpreter
  1410. that is consistently two or three times faster than the one in Guile
  1411. 2.0.
  1412. ** Allocation-free dynamic stack
  1413. Guile now implements the dynamic stack with an actual stack instead of a
  1414. list of heap objects, avoiding most allocation. This speeds up prompts,
  1415. the `scm_dynwind_*' family of functions, fluids, and `dynamic-wind'.
  1416. ** Optimized UTF-8 and Latin-1 ports, symbols, and strings
  1417. Guile 2.2 is faster at reading and writing UTF-8 and Latin-1 strings
  1418. from ports, and at converting symbols and strings to and from these
  1419. encodings.
  1420. ** Optimized hash functions
  1421. Guile 2.2 now uses Bob Jenkins' `hashword2' (from his `lookup3.c') for
  1422. its string hash, and Thomas Wang's integer hash function for `hashq' and
  1423. `hashv'. These functions produce much better hash values across all
  1424. available fixnum bits.
  1425. ** Optimized generic array facility
  1426. Thanks to work by Daniel Llorens, the generic array facility is much
  1427. faster now, as it is internally better able to dispatch on the type of
  1428. the underlying backing store.
  1429. ** All ports are now buffered, can be targets of `setvbuf'
  1430. See "Buffering" in the manual, for more. A port with a buffer size of 1
  1431. is equivalent to an unbuffered port. Ports may set their default buffer
  1432. sizes, and some ports (for example soft ports) are unbuffered by default
  1433. for historical reasons.
  1434. ** Mutexes are now faster under contention
  1435. Guile implements its own mutexes, so that threads that are trying to
  1436. acquire a mutex can be interrupted. These mutexes used to be quite
  1437. inefficient when many threads were trying to acquire them, causing many
  1438. spurious wakeups and contention. This has been fixed.
  1439. * New interfaces
  1440. ** New `cond-expand' feature: `guile-2.2'
  1441. Use this feature if you need to check for Guile 2.2 from Scheme code.
  1442. ** New predicate: `nil?'
  1443. See "Nil" in the manual.
  1444. ** New compiler modules
  1445. Since the compiler was rewritten, there are new modules for the back-end
  1446. of the compiler and the low-level loader and introspection interfaces.
  1447. See the "Guile Implementation" chapter in the manual for all details.
  1448. ** Add "tree" display mode for statprof.
  1449. See the newly updated "Statprof" section of the manual, for more.
  1450. ** Support for non-blocking I/O
  1451. See "Non-Blocking I/O" in the manual, for more.
  1452. ** Implement R6RS custom binary input/output ports
  1453. See "Custom Ports" in the manual.
  1454. ** Implement R6RS output-buffer-mode
  1455. ** Implement R6RS bytevector->string, string->bytevector
  1456. See "R6RS Transcoders" in the manual.
  1457. ** `accept' now takes optional flags argument
  1458. These flags can include `SOCK_NONBLOCK' and `SOCK_CLOEXEC', indicating
  1459. options to apply to the returned socket, potentially removing the need
  1460. for additional system calls to set these options. See "Network Sockets
  1461. and Communication" in the manual, for more.
  1462. ** Thread-safe atomic boxes (references)
  1463. See "Atomics" in the manual.
  1464. ** Thread-local fluids
  1465. Guile now has support for fluids whose values are not captured by
  1466. `current-dynamic-state' and not inheritied by child threads, and thus
  1467. are local to the kernel thread they run on. See "Thread-Local
  1468. Variables" in the manual, for more.
  1469. ** suspendable-continuation?
  1470. This predicate returns true if the delimited continuation captured by
  1471. aborting to a prompt would be able to be resumed. See "Prompt
  1472. Primitives" in the manual for more.
  1473. ** scm_c_prepare_to_wait_on_fd, scm_c_prepare_to_wait_on_cond,
  1474. ** scm_c_wait_finished
  1475. See "Asyncs" in the manual for more.
  1476. ** File descriptor finalizers
  1477. See "Ports and File Descriptors" in the manual.
  1478. ** New inline functions: `scm_new_smob', `scm_new_double_smob'
  1479. These can replace many uses of SCM_NEWSMOB, SCM_RETURN_NEWSMOB2, and the
  1480. like. See XXX in the manual, for more.
  1481. ** New low-level type accessors
  1482. For more on `SCM_HAS_TYP7', `SCM_HAS_TYP7S', `SCM_HAS_TYP16', see XXX.
  1483. `SCM_HEAP_OBJECT_P' is now an alias for the inscrutable `SCM_NIMP'.
  1484. `SCM_UNPACK_POINTER' and `SCM_PACK_POINTER' are better-named versions of
  1485. the old `SCM2PTR' and `PTR2SCM'. Also, `SCM_UNPACK_POINTER' yields a
  1486. void*.
  1487. ** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system
  1488. ** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars'
  1489. Use these instead of `scm_lfwrite'. See the new "Using Ports from C"
  1490. section of the manual, for more.
  1491. ** <standard-vtable>, standard-vtable-fields
  1492. See "Structures" in the manual for more on these.
  1493. ** Convenience utilities for ports and strings.
  1494. See "Conversion to/from C" for more on `scm_from_port_string',
  1495. `scm_from_port_stringn', `scm_to_port_string', and
  1496. `scm_to_port_stringn'.
  1497. ** New expressive PEG parser
  1498. See "PEG Parsing" in the manual for more. Thanks to Michael Lucy for
  1499. originally writing these, and to Noah Lavine for integration work.
  1500. ** `make-stack' now also works on delimited continuations
  1501. ** Better URI-reference support
  1502. The `(web uri)' module now has interfaces for handling URI references,
  1503. which might not have a scheme. The Location header of a web request or
  1504. response is now a URI reference instead of a URI. Also,
  1505. `request-absolute-uri' now has an optional default scheme argument. See
  1506. "Web" in the manual for full details.
  1507. ** formal-name->char, char->formal-name
  1508. See "Characters", in the manual.
  1509. * Incompatible changes
  1510. ** ASCII is not ISO-8859-1
  1511. In Guile 2.0, if a user set "ASCII" or "ANSI_X3.4-1968" as the encoding
  1512. of a port, Guile would treat it as ISO-8859-1. While these encodings
  1513. are the same for codepoints 0 to 127, ASCII does not extend past that
  1514. range, whereas ISO-8859-1 goes up to 255. Guile 2.2 no longer treats
  1515. ASCII as ISO-8859-1. This is likely to be a problem only if the user's
  1516. locale is set to ASCII, and the user or a program writes non-ASCII
  1517. codepoints to a port.
  1518. ** Decoding errors do not advance the read pointer before erroring
  1519. When the user sets a port's conversion strategy to "error", indicating
  1520. that Guile should throw an error if it tries to read from a port whose
  1521. incoming bytes are not valid for the port's encoding, it used to be that
  1522. Guile would advance the read pointer past the bad bytes, and then throw
  1523. an error. This would allow the following `read-char' invocation to
  1524. proceed after the bad bytes. This behavior is incompatible with the
  1525. final R6RS standard, and besides contravenes the user's intention to
  1526. raise an error on bad input. Guile now raises an error without
  1527. advancing the read pointer. To skip over a bad encoding, set the port
  1528. conversion strategy to "substitute" and read a substitute character.
  1529. ** Decoding errors with `substitute' strategy return U+FFFD
  1530. It used to be that decoding errors with the `substitute' conversion
  1531. strategy would replace the bad bytes with a `?' character. This has
  1532. been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in
  1533. accordance with the Unicode recommendations.
  1534. ** API to define new port types from C has changed
  1535. Guile's ports have been completely overhauled to allow Guile developers
  1536. and eventually Guile users to write low-level input and output routines
  1537. in Scheme. The new internals will eventually allow for user-space
  1538. tasklets or green threads that suspend to a scheduler when they would
  1539. cause blocking I/O, allowing users to write straightforward network
  1540. services that parse their input and send their output as if it were
  1541. blocking, while under the hood Guile can multiplex many active
  1542. connections at once.
  1543. At the same time, this change makes Guile's ports implementation much
  1544. more maintainable, rationalizing the many legacy port internals and
  1545. making sure that the abstractions between the user, Guile's core ports
  1546. facility, and the port implementations result in a system that is as
  1547. performant and expressive as possible.
  1548. The interface to the user has no significant change, neither on the C
  1549. side nor on the Scheme side. However this refactoring has changed the
  1550. interface to the port implementor in an incompatible way. See the newly
  1551. expanded "I/O Extensions" in the manual, for full details.
  1552. *** Remove `scm_set_port_mark'
  1553. Port mark functions have not been called since the switch to the BDW
  1554. garbage collector.
  1555. *** Remove `scm_set_port_equalp'
  1556. Likewise port equal functions weren't being called. Given that ports
  1557. have their own internal buffers, it doesn't make sense to hook them into
  1558. equal? anyway.
  1559. *** Remove `scm_set_port_free'
  1560. It used to be that if an open port became unreachable, a special "free"
  1561. function would be called instead of the "close" function. Now that the
  1562. BDW-GC collector allows us to run arbitrary code in finalizers, we can
  1563. simplify to just call "close" on the port and remove the separate free
  1564. functions. Note that hooking into the garbage collector has some
  1565. overhead. For that reason Guile exposes a new interface,
  1566. `scm_set_port_needs_close_on_gc', allowing port implementations to
  1567. indicate to Guile whether they need closing on GC or not.
  1568. *** Remove `scm_set_port_end_input', `scm_set_port_flush'
  1569. As buffering is handled by Guile itself, these functions which were to
  1570. manage an implementation-side buffer are no longer needed.
  1571. *** Change prototype of `scm_make_port_type'
  1572. The `read' (renamed from `fill_input') and `write' functions now operate
  1573. on bytevectors. Also the `mode_bits' argument now inplicitly includes
  1574. SCM_OPN, so you don't need to include these.
  1575. *** Change prototype of port `close' function
  1576. The port close function now returns void.
  1577. *** Port and port type data structures are now opaque
  1578. Port type implementations should now use API to access port state.
  1579. However, since the change to handle port buffering centrally, port type
  1580. implementations rarely need to access unrelated port state.
  1581. *** Port types are now `scm_t_port_type*', not a tc16 value
  1582. `scm_make_port_type' now returns an opaque pointer, not a tc16.
  1583. Relatedly, the limitation that there only be 256 port types has been
  1584. lifted.
  1585. ** String ports default to UTF-8
  1586. Guile 2.0 would use the `%default-port-encoding' when creating string
  1587. ports. This resulted in ports that could only accept a subset of valid
  1588. characters, which was surprising to users. Now string ports default to
  1589. the UTF-8 encoding. Sneaky users can still play encoding conversion
  1590. games with string ports by explicitly setting the encoding of a port
  1591. after it is open. See "Ports" in the manual for more.
  1592. ** `scm_from_stringn' and `scm_to_stringn' encoding arguments are never NULL
  1593. These functions now require a valid `encoding' argument, and will abort
  1594. if given `NULL'.
  1595. ** All r6rs ports are both textual and binary
  1596. Because R6RS ports are a thin layer on top of Guile's ports, and Guile's
  1597. ports are both textual and binary, Guile's R6RS ports are also both
  1598. textual and binary, and thus both kinds have port transcoders. This is
  1599. an incompatibility with respect to R6RS.
  1600. ** Threading facilities moved to (ice-9 threads)
  1601. It used to be that call-with-new-thread and other threading primitives
  1602. were available in the default environment. This is no longer the case;
  1603. they have been moved to (ice-9 threads) instead. Existing code will not
  1604. break, however; we used the deprecation facility to signal a warning
  1605. message while also providing these bindings in the root environment for
  1606. the duration of the 2.2 series.
  1607. ** cancel-thread uses asynchronous interrupts, not pthread_cancel
  1608. See "Asyncs" in the manual, for more on asynchronous interrupts.
  1609. ** SRFI-18 threads, mutexes, cond vars disjoint from Guile
  1610. When we added support for the SRFI-18 threading library in Guile 2.0, we
  1611. did so in a way that made SRFI-18 mutexes the same as Guile mutexes.
  1612. This was a mistake. In Guile our goal is to provide basic,
  1613. well-thought-out, well-implemented, minimal primitives, on top of which
  1614. we can build a variety of opinionated frameworks. Incorporating SRFI-18
  1615. functionality into core Guile caused us to bloat and slow down our core
  1616. threading primitives. Worse, they became very hard to describe; they
  1617. did many things, did them poorly, and all that they did was never
  1618. adequately specified.
  1619. For all of these reasons we have returned to a situation where SRFI-18
  1620. concepts are implemented only in the `(srfi srfi-18)' module. This
  1621. means that SRFI-18 threads are built on Guile threads, but aren't the
  1622. same as Guile threads; calling Guile `thread?' on a thread no longer
  1623. returns true.
  1624. We realize this causes inconvenience to users who use both Guile
  1625. threading interfaces and SRFI-18 interfaces, and we lament the change --
  1626. but we are better off now. We hope the newly revised "Scheduling"
  1627. section in the manual compensates for the headache.
  1628. ** Remove `lock-mutex' "owner" argument
  1629. Mutex owners are a SRFI-18 concept; use SRFI-18 mutexes instead.
  1630. Relatedly, `scm_lock_mutex_timed' taking the owner argument is now
  1631. deprecated; use `scm_timed_lock_mutex' instead.
  1632. ** Remove `unlock-mutex' cond var and timeout arguments
  1633. It used to be that `unlock-mutex' included `wait-condition-variable'
  1634. functionality. This has been deprecated; use SRFI-18 if you want this
  1635. behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed' is
  1636. deprecated; use `scm_unlock_mutex' instead.
  1637. ** Removed `unchecked-unlock' mutex flag
  1638. This flag was introduced for internal use by SRFI-18; use SRFI-18
  1639. mutexes if you need this behaviour.
  1640. ** SRFI-18 mutexes no longer recursive
  1641. Contrary to specification, SRFI-18 mutexes in Guile were recursive.
  1642. This is no longer the case.
  1643. ** Thread cleanup handlers removed
  1644. The `set-thread-cleanup!' and `thread-cleanup' functions that were added
  1645. in Guile 2.0 to support cleanup after thread cancellation are no longer
  1646. needed, since threads can declare cleanup handlers via `dynamic-wind'.
  1647. ** Only threads created by Guile are joinable
  1648. `join-thread' used to work on "foreign" threads that were not created by
  1649. Guile itself, though their join value was always `#f'. This is no
  1650. longer the case; attempting to join a foreign thread will throw an
  1651. error.
  1652. ** Dynamic states capture values, not locations
  1653. Dynamic states used to capture the locations of fluid-value
  1654. associations. Capturing the current dynamic state then setting a fluid
  1655. would result in a mutation of that captured state. Now capturing a
  1656. dynamic state simply captures the current values, and calling
  1657. `with-dynamic-state' copies those values into the Guile virtual machine
  1658. instead of aliasing them in a way that could allow them to be mutated in
  1659. place. This change allows Guile's fluid variables to be thread-safe.
  1660. To capture the locations of a dynamic state, capture a
  1661. `with-dynamic-state' invocation using partial continuations instead.
  1662. ** Remove `frame-procedure'
  1663. Several optimizations in Guile make `frame-procedure' an interface that
  1664. we can no longer support. For background, `frame-procedure' used to
  1665. return the value at slot 0 in a frame, which usually corresponds to the
  1666. SCM value of the procedure being applied. However it could be that this
  1667. slot is re-used for some other value, because the closure was not needed
  1668. in the function. Such a re-use might even be for an untagged value, in
  1669. which case treating slot 0 as a SCM value is quite dangerous. It's also
  1670. possible that so-called "well-known" closures (closures whose callers
  1671. are all known) are optimized in such a way that slot 0 is not a
  1672. procedure but some optimized representation of the procedure's free
  1673. variables. Instead, developers building debugging tools that would like
  1674. access to `frame-procedure' are invited to look at the source for the
  1675. `(system vm frame)' module for alternate interfaces, including the new
  1676. `frame-procedure-name'.
  1677. ** Remove `,procedure' REPL command
  1678. Not all procedures have values, so it doesn't make sense to expose this
  1679. interface to the user. Instead, the `,locals' REPL command will include
  1680. the callee, if it is live.
  1681. ** Remove `frame-local-ref', `frame-local-set!', `frame-num-locals'
  1682. These procedures reference values in a frame on the stack. Since we now
  1683. have unboxed values of different kinds, it is now necessary to specify
  1684. the type when reference locals, and once this incompatible change needs
  1685. to be made, we might as well make these interfaces private. See
  1686. "Frames' in the manual, for more information on the replacements for
  1687. these low-level interfaces.
  1688. ** Vtable hierarchy changes
  1689. In an attempt to make Guile's structure and record types integrate
  1690. better with GOOPS by unifying the vtable hierarchy, `make-vtable-vtable'
  1691. is now deprecated. Instead, users should just use `make-vtable' with
  1692. appropriate arguments. See "Structures" in the manual for all of the
  1693. details. As such, `record-type-vtable' and `%condition-type-vtable' now
  1694. have a parent vtable and are no longer roots of the vtable hierarchy.
  1695. ** Syntax parameters are a distinct type
  1696. Guile 2.0's transitional implementation of `syntax-parameterize' was
  1697. based on the `fluid-let-syntax' interface inherited from the psyntax
  1698. expander. This interface allowed any binding to be dynamically rebound
  1699. -- even bindings like `lambda'. This is no longer the case in Guile
  1700. 2.2. Syntax parameters must be defined via `define-syntax-parameter',
  1701. and only such bindings may be parameterized. See "Syntax Parameters" in
  1702. the manual for more.
  1703. ** Defined identifiers scoped in the current module
  1704. Sometimes Guile's expander would attach incorrect module scoping
  1705. information for top-level bindings made by an expansion. For example,
  1706. given the following R6RS library:
  1707. (library (defconst)
  1708. (export defconst)
  1709. (import (guile))
  1710. (define-syntax-rule (defconst name val)
  1711. (begin
  1712. (define t val)
  1713. (define-syntax-rule (name) t))))
  1714. Attempting to use it would produce an error:
  1715. (import (defconst))
  1716. (defconst foo 42)
  1717. (foo)
  1718. =| Unbound variable: t
  1719. It wasn't clear that we could fix this in Guile 2.0 without breaking
  1720. someone's delicate macros, so the fix is only coming out now.
  1721. ** Pseudo-hygienically rename macro-introduced bindings
  1722. Bindings introduced by macros, like `t' in the `defconst' example above,
  1723. are now given pseudo-fresh names. This allows
  1724. (defconst foo 42)
  1725. (defconst bar 37)
  1726. to introduce different bindings for `t'. These pseudo-fresh names are
  1727. made in such a way that if the macro is expanded again, for example as
  1728. part of a simple recompilation, the introduced identifiers get the same
  1729. pseudo-fresh names. See "Hygiene and the Top-Level" in the manual, for
  1730. details.
  1731. ** Fix literal matching for module-bound literals
  1732. `syntax-rules' and `syntax-case' macros can take a set of "literals":
  1733. bound or unbound keywords that the syntax matcher treats specially.
  1734. Before, literals were always matched symbolically (by name). Now they
  1735. are matched by binding. This allows literals to be reliably bound to
  1736. values, renamed by imports or exports, et cetera. See "Syntax-rules
  1737. Macros" in the manual for more on literals.
  1738. ** Fix bug importing specific bindings with #:select
  1739. It used to be that if #:select didn't find a binding in the public
  1740. interface of a module, it would actually grovel in the module's
  1741. unexported private bindings. This was not intended and is now fixed.
  1742. ** Statically scoped module duplicate handlers
  1743. It used to be that if a module did not specify a #:duplicates handler,
  1744. when a name was first referenced in that module and multiple imported
  1745. modules provide that name, the value of the
  1746. `default-duplicate-binding-handlers' parameter would be used to resolve
  1747. the duplicate bindings. We have changed so that instead a module
  1748. defaults to the set of handlers described in the manual. If the module
  1749. specifies #:duplicates, of course we use that. The
  1750. `default-duplicate-binding-handlers' parameter now simply accesses the
  1751. handlers of the current module, instead of some global value.
  1752. ** Fix too-broad capture of dynamic stack by delimited continuations
  1753. Guile was using explicit stacks to represent, for example, the chain of
  1754. current exception handlers. This means that a delimited continuation
  1755. that captured a "catch" expression would capture the whole stack of
  1756. exception handlers, not just the exception handler added by the "catch".
  1757. This led to strangeness when resuming the continuation in some other
  1758. context like other threads; "throw" could see an invalid stack of
  1759. exception handlers. This has been fixed by the addition of the new
  1760. "fluid-ref*" procedure that can access older values of fluids; in this
  1761. way the exception handler stack is now implicit. See "Fluids and
  1762. Dynamic States" in the manual, for more on fluid-ref*.
  1763. ** `dynamic-wind' doesn't check that guards are thunks
  1764. Checking that the dynamic-wind out-guard procedure was actually a thunk
  1765. before doing the wind was slow, unreliable, and not strictly needed.
  1766. ** All deprecated code removed
  1767. All code deprecated in Guile 2.0 has been removed. See older NEWS, and
  1768. check that your programs can compile without linker warnings and run
  1769. without runtime warnings. See "Deprecation" in the manual.
  1770. In particular, the following functions, which were deprecated in 2.0.10
  1771. but not specifically mentioned earlier in this file, have been removed:
  1772. *** `uniform-vector-read!' and `uniform-vector-write' have been
  1773. removed. Use `get-bytevector-n!' and `put-bytevector' from (rnrs io
  1774. ports) instead.
  1775. ** Remove miscellaneous unused interfaces
  1776. We have removed accidentally public, undocumented interfaces that we
  1777. think are not used, and not useful. This includes `scm_markstream',
  1778. `SCM_FLUSH_REGISTER_WINDOWS', `SCM_THREAD_SWITCHING_CODE', `SCM_FENCE',
  1779. `scm_call_generic_0', `scm_call_generic_1', `scm_call_generic_2'
  1780. `scm_call_generic_3', `scm_apply_generic', and `scm_program_source'.
  1781. `scm_async_click' was renamed to `scm_async_tick', and `SCM_ASYNC_TICK'
  1782. was made private (use `SCM_TICK' instead).
  1783. ** Many internal compiler / VM changes
  1784. As the compiler and virtual machine were re-written, there are many
  1785. changes in the back-end of Guile to interfaces that were introduced in
  1786. Guile 2.0. These changes are only only of interest if you wrote a
  1787. language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
  1788. the case, drop by the IRC channel to discuss the changes.
  1789. ** Defining a SMOB or port type no longer mucks exports of `(oop goops)'
  1790. It used to be that defining a SMOB or port type added an export to
  1791. GOOPS, for the wrapper class of the smob type. This violated
  1792. modularity, though, so we have removed this behavior.
  1793. ** Bytecode replaces objcode as a target language
  1794. One way in which people may have used details of Guile's runtime in
  1795. Guile 2.0 is in compiling code to thunks for later invocation. Instead
  1796. of compiling to objcode and then calling `make-program', now the way to
  1797. do it is to compile to `bytecode' and then call `load-thunk-from-memory'
  1798. from `(system vm loader)'.
  1799. ** Weak pairs removed
  1800. Weak pairs were not safe to access with `car' and `cdr', and so were
  1801. removed.
  1802. ** Weak alist vectors removed
  1803. Use weak hash tables instead.
  1804. ** Weak vectors may no longer be accessed via `vector-ref' et al
  1805. Weak vectors may no longer be accessed with the vector interface. This
  1806. was a source of bugs in the 2.0 Guile implementation, and a limitation
  1807. on using vectors as building blocks for other abstractions. Vectors in
  1808. Guile are now a concrete type; for an abstract interface, use the
  1809. generic array facility (`array-ref' et al).
  1810. ** scm_t_array_implementation removed
  1811. This interface was introduced in 2.0 but never documented. It was a
  1812. failed attempt to layer the array implementation that actually
  1813. introduced too many layers, as it prevented the "vref" and "vset"
  1814. members of scm_t_array_handle (called "ref" and "set" in 1.8, not
  1815. present in 2.0) from specializing on array backing stores.
  1816. Notably, the definition of scm_t_array_handle has now changed, to not
  1817. include the (undocumented) "impl" member. We are sorry for any
  1818. inconvenience this may cause.
  1819. ** `scm_make' is now equivalent to Scheme `make'
  1820. It used to be that `scm_make' only implemented a hard-wired object
  1821. allocation and initialization protocol. This was because `scm_make' was
  1822. used while GOOPS booted its own, more complete `make' implementation in
  1823. Scheme. Now that we've re-implemented everything in Scheme, the C
  1824. `scm_make' now dispatches directly to Scheme `make', which implements
  1825. the full protocol. This change is incompatible in some ways, but on the
  1826. whole is good news for GOOPS users.
  1827. ** GOOPS slot definitions are now objects
  1828. Slot definitions are now instances of a <slot> class, instead of being
  1829. specially formatted lists. To most user code, this is transparent, as
  1830. the slot definition accessors like `slot-definition-name' continue to
  1831. work. However, code that for example uses `car' to get the name of a
  1832. slot definition will need to be updated to use the accessors.
  1833. ** Class slot changes
  1834. Class objects no longer have a `default-slot-definition-class' slot,
  1835. which was never used. They also no longer have slots for hashsets
  1836. (`h0', `h1', and so on up to `h7'), which have been unused since Guile
  1837. 2.0 and were not a great idea.
  1838. There is a new class option, `#:static-slot-allocation?'. See the
  1839. manual for details.
  1840. ** Removal of internal, unintentionally exposed GOOPS C interfaces
  1841. These include: `scm_sys_fast_slot_ref', `scm_sys_fast_slot_set_x'
  1842. `scm_basic_basic_make_class', `scm_sys_compute_slots',
  1843. `scm_sys_prep_layout_x' `scm_t_method', `SCM_METHOD',
  1844. `scm_s_slot_set_x', `SCM_CLASS_CLASS_LAYOUT', `scm_si_slotdef_class',
  1845. `scm_si_generic_function', `scm_si_specializers', `scm_si_procedure',
  1846. `scm_si_formals', `scm_si_body', `scm_si_make_procedure',
  1847. `SCM_CLASS_CLASS_LAYOUT', `SCM_INSTANCE_HASH', `SCM_SET_HASHSET', `union
  1848. scm_t_debug_info', `scm_pure_generic_p', `SCM_PUREGENERICP',
  1849. `SCM_VALIDATE_PUREGENERIC', `SCM_VTABLE_FLAG_GOOPS_PURE_GENERIC',
  1850. `SCM_CLASSF_PURE_GENERIC', `scm_c_extend_primitive_generic',
  1851. `scm_sys_initialize_object', `SCM_CLASS_CLASS_LAYOUT',
  1852. `scm_si_redefined', `scm_si_direct_supers', `scm_si_direct_slots',
  1853. `scm_si_direct_subclasses', `scm_si_direct_methods', `scm_si_cpl'
  1854. `scm_si_slots', `scm_si_getters_n_setters', `SCM_N_CLASS_SLOTS',
  1855. `SCM_OBJ_CLASS_REDEF', `SCM_INST', `SCM_ACCESSORS_OF',
  1856. `scm_sys_allocate_instance', and `scm_sys_invalidate_class_x'.
  1857. * New deprecations
  1858. ** `SCM_FDES_RANDOM_P'
  1859. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1860. ** `_IONBF', `_IOLBF', and `_IOFBF'
  1861. Instead, use the symbol values `none', `line', or `block', respectively,
  1862. as arguments to the `setvbuf' function.
  1863. ** `SCM_FDES_RANDOM_P'
  1864. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1865. ** Arbiters
  1866. Arbiters were an experimental mutual exclusion facility from 20 years
  1867. ago that didn't survive the test of time. Use mutexes or atomic boxes
  1868. instead.
  1869. ** User asyncs
  1870. Guile had (and still has) "system asyncs", which are asynchronous
  1871. interrupts, and also had this thing called "user asyncs", which was a
  1872. trivial unused data structure. Now that we have deprecated the old
  1873. `async', `async-mark', and `run-asyncs' procedures that comprised the
  1874. "user async" facility, we have been able to clarify our documentation to
  1875. only refer to "asyncs".
  1876. ** Critical sections
  1877. Critical sections have long been just a fancy way to lock a mutex and
  1878. defer asynchronous interrupts. Instead of SCM_CRITICAL_SECTION_START,
  1879. make sure you're in a "scm_dynwind_begin (0)" and use
  1880. scm_dynwind_pthread_mutex_lock instead, possibly also with
  1881. scm_dynwind_block_asyncs.
  1882. ** `scm_make_mutex_with_flags'
  1883. Use `scm_make_mutex_with_kind' instead. See "Mutexes and Condition
  1884. Variables" in the manual, for more.
  1885. ** Dynamic roots
  1886. This was a facility that predated threads, was unused as far as we can
  1887. tell, and was never documented. Still, a grep of your code for
  1888. dynamic-root or dynamic_root would not be amiss.
  1889. ** `make-dynamic-state'
  1890. Use `current-dynamic-state' to get an immutable copy of the current
  1891. fluid-value associations.
  1892. ** `with-statprof' macro
  1893. Use the `statprof' procedure instead.
  1894. ** SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1, SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N
  1895. ** SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn
  1896. ** SCM_WTA_DISPATCH_1_SUBR
  1897. These macros were used in dispatching primitive generics. They can be
  1898. replaced by using C functions (the same name but in lower case), if
  1899. needed, but this is a hairy part of Guile that perhaps you shouldn't be
  1900. using.
  1901. ** scm_compute_applicable_methods and scm_find_method
  1902. Use `compute-applicable-methods' from Scheme instead.
  1903. ** scm_no_applicable_method
  1904. Fetch no-applicable-method from the GOOPS exports if you need it.
  1905. ** scm_class_boolean, scm_class_char, scm_class_pair
  1906. ** scm_class_procedure, scm_class_string, scm_class_symbol
  1907. ** scm_class_primitive_generic, scm_class_vector, scm_class_null
  1908. ** scm_class_real, scm_class_complex, scm_class_integer
  1909. ** scm_class_fraction, scm_class_unknown, scm_class_top
  1910. ** scm_class_object, scm_class_class, scm_class_applicable
  1911. ** scm_class_applicable_struct, scm_class_applicable_struct_with_setter
  1912. ** scm_class_generic, scm_class_generic_with_setter, scm_class_accessor
  1913. ** scm_class_extended_generic, scm_class_extended_generic_with_setter
  1914. ** scm_class_extended_accessor, scm_class_method
  1915. ** scm_class_accessor_method, scm_class_procedure_class
  1916. ** scm_class_applicable_struct_class, scm_class_number, scm_class_list
  1917. ** scm_class_keyword, scm_class_port, scm_class_input_output_port
  1918. ** scm_class_input_port, scm_class_output_port, scm_class_foreign_slot
  1919. ** scm_class_self, scm_class_protected, scm_class_hidden
  1920. ** scm_class_opaque, scm_class_read_only, scm_class_protected_hidden
  1921. ** scm_class_protected_opaque, scm_class_protected_read_only
  1922. ** scm_class_scm, scm_class_int, scm_class_float, scm_class_double
  1923. ** scm_port_class, scm_smob_class
  1924. These class exports are now deprecated. Instead, look up the ones you
  1925. need from the GOOPS module, or use `scm_class_of' on particular values.
  1926. ** scm_get_keyword
  1927. Instead from Scheme use kw-arg-ref or real keyword arguments, and from C
  1928. use `scm_c_bind_keyword_arguments'.
  1929. ** scm_slot_ref_using_class, scm_slot_set_using_class_x
  1930. ** scm_slot_bound_using_class_p, scm_slot_exists_using_class_p
  1931. Instead use the normal `scm_slot_ref' and similar procedures.
  1932. * Changes to the distribution
  1933. ** Pre-built binary files in the tarball
  1934. Building Guile from a tarball can now take advantage of a "prebuilt/"
  1935. tree of prebuilt .go files. These compiled files are created when a
  1936. tarball is made, and are used to speed up the build for users of
  1937. official releases.
  1938. These pre-built binaries are not necessary, however: they are not stored
  1939. in revision control and can always be re-created from the source, given
  1940. that Guile can bootstrap itself from its minimal bootstrap C
  1941. interpreter. If you do not want to depend on these pre-built binaries,
  1942. you can "make -C prebuilt clean" before building.
  1943. ** New minor version
  1944. The "effective version" of Guile is now 2.2, which allows parallel
  1945. installation with other effective versions (for example, the older Guile
  1946. 2.0). See "Parallel Installations" in the manual for full details.
  1947. Notably, the `pkg-config' file is now `guile-2.2'.
  1948. ** Bump required libgc version to 7.2, released March 2012.
  1949. ** GUILE_PROGS searches for versioned Guile
  1950. The GUILE_PROGS autoconf macro can take a required version argument. As
  1951. a new change, that version argument is additionally searched for as a
  1952. suffix. For example, GUILE_PROGS(2.2) would look for guile-2.2,
  1953. guile2.2, guile-2, guile2, and then guile. The found prefix is also
  1954. applied to guild, guile-config, and the like. Thanks to Freja Nordsiek
  1955. for this work.
  1956. ** The readline extension is now installed in the extensionsdir
  1957. The shared library that implements Guile's readline extension is no
  1958. longer installed to the libdir. This change should be transparent to
  1959. users, but packagers may be interested.
  1960. Changes in 2.0.14 (since 2.0.13):
  1961. * Bug fixes
  1962. ** Builds of .go files and of Guile itself are now bit-reproducible
  1963. (<http://bugs.gnu.org/20272>)
  1964. ** 'number->locale-string' and 'monetary-amount->locale-string' fixes
  1965. (<http://bugs.gnu.org/24990>)
  1966. ** (system base target) now recognizes "sh3" as a cross-compilation target
  1967. ** Fix race condition in '00-repl-server.test'
  1968. (<http://bugs.gnu.org/24769>)
  1969. ** 'scandir' from (ice-9 ftw) no longer calls 'stat' for each entry
  1970. ** Several documentation improvements
  1971. Changes in 2.0.13 (since 2.0.12):
  1972. * Security fixes
  1973. ** CVE-2016-8606: REPL server now protects against HTTP inter-protocol
  1974. attacks
  1975. Guile 2.x provides a "REPL server" started by the '--listen'
  1976. command-line option or equivalent API (see "REPL Servers" in the
  1977. manual).
  1978. The REPL server is vulnerable to the HTTP inter-protocol attack as
  1979. described at
  1980. <https://en.wikipedia.org/wiki/Inter-protocol_exploitation>, notably the
  1981. HTML form protocol attack described at
  1982. <https://www.jochentopf.com/hfpa/hfpa.pdf>. A "DNS rebinding attack"
  1983. can be combined with this attack and allow an attacker to send arbitrary
  1984. Guile code to the REPL server through web pages accessed by the
  1985. developer, even though the REPL server is listening to a loopback device
  1986. ("localhost"). This was demonstrated in an article entitled "How to
  1987. steal any developer's local database" available at
  1988. <http://bouk.co/blog/hacking-developers/>.
  1989. The REPL server in Guile 2.0.13 now detects attempts to exploit this
  1990. vulnerability. It immediately closes the connection when it receives a
  1991. line that looks like an HTTP request.
  1992. Nevertheless, we recommend binding the REPL server to a Unix-domain
  1993. socket, for instance by running:
  1994. guile --listen=/tmp/guile-socket
  1995. ** CVE-2016-8605: 'mkdir' procedure no longer calls umask(2)
  1996. (<http://bugs.gnu.org/24659>)
  1997. When the second argument to the 'mkdir' procedure was omitted, it would
  1998. call umask(0) followed by umask(previous_umask) and apply the umask to
  1999. mode #o777.
  2000. This was unnecessary and a security issue for multi-threaded
  2001. applications: during a small window the process' umask was set to zero,
  2002. so other threads calling mkdir(2) or open(2) could end up creating
  2003. world-readable/writable/executable directories or files.
  2004. * New interfaces
  2005. ** mkstemp! takes optional "mode" argument
  2006. See "File System" in the manual, for more.
  2007. ** New 'scm_to_uintptr_t' and 'scm_from_uintptr_t' C functions
  2008. * Bug fixes
  2009. ** Fix optimizer bug when compiling fixpoint operator
  2010. ** Fix build error on MinGW
  2011. ** Update 'uname' implementation on MinGW
  2012. ** 'port-encoding' and 'set-port-encoding!' ensure they are passed an
  2013. open port
  2014. ** (system base target) now recognizes Alpha as a cross-compilation target
  2015. Changes in 2.0.12 (since 2.0.11):
  2016. * Notable changes
  2017. ** FFI: Add support for functions that set 'errno'
  2018. When accessing POSIX functions from a system's libc via Guile's dynamic
  2019. FFI, you commonly want to access the 'errno' variable to be able to
  2020. produce useful diagnostic messages.
  2021. This is now possible using 'pointer->procedure' or
  2022. 'scm_pointer_to_procedure_with_errno'. See "Dynamic FFI" in the manual.
  2023. ** The #!r6rs directive now influences read syntax
  2024. The #!r6rs directive now changes the per-port reader options to make
  2025. Guile's reader conform more closely to the R6RS syntax. In particular:
  2026. - It makes the reader case sensitive.
  2027. - It disables the recognition of keyword syntax in conflict with the
  2028. R6RS (and R5RS).
  2029. - It enables the `square-brackets', `hungry-eol-escapes' and
  2030. `r6rs-hex-escapes' reader options.
  2031. ** 'read' now accepts "\(" as equivalent to "("
  2032. This is indented for use at the beginning of lines in multi-line strings
  2033. to avoid confusing Emacs' lisp modes. Previously "\(" was an error.
  2034. ** SRFI-14 character data set upgraded to Unicode 8.0.0
  2035. ** SRFI-19 table of leap seconds updated
  2036. ** 'string-hash', 'read-string', and 'write' have been optimized
  2037. ** GOOPS bug fix for inherited accessor methods
  2038. In the port of GOOPS to Guile 2.0, we introduced a bug related to
  2039. accessor methods. The bug resulted in GOOPS assuming that a slot S in
  2040. an object whose class is C would always be present in instances of all
  2041. subclasses C, and allocated to the same struct index. This is not the
  2042. case for multiple inheritance. This behavior has been fixed to be as it
  2043. was in 1.8.
  2044. One aspect of this change may cause confusion among users. Previously
  2045. if you defined a class C:
  2046. (use-modules (oop goops))
  2047. (define-class C ()
  2048. (a #:getter get-a))
  2049. And now you define a subclass, intending to provide an #:init-value for
  2050. the slot A:
  2051. (define-class D (A)
  2052. (a #:init-value 42))
  2053. Really what you have done is define in D a new slot with the same name,
  2054. overriding the existing slot. The problem comes in that before fixing
  2055. this bug (but not in 1.8), the getter 'get-a' would succeed for
  2056. instances of D, even though 'get-a' should only work for the slot 'a'
  2057. that is defined on class C, not any other slot that happens to have the
  2058. same name and be in a class with C as a superclass.
  2059. It would be possible to "merge" the slot definitions on C and D, but
  2060. that part of the meta-object protocol (`compute-slots' et al) is not
  2061. fully implemented.
  2062. Somewhat relatedly, GOOPS also had a fix around #:init-value on
  2063. class-allocated slots. GOOPS was re-initializing the value of slots
  2064. with #:class or #:each-subclass allocation every time instances of that
  2065. class was allocated. This has been fixed.
  2066. * New interfaces
  2067. ** New SRFI-28 string formatting implementation
  2068. See "SRFI-28" in the manual.
  2069. ** New (ice-9 unicode) module
  2070. See "Characters" in the manual.
  2071. ** Web server
  2072. The (web server) module now exports 'make-server-impl', 'server-impl?',
  2073. and related procedures. Likewise, (web server http) exports 'http'.
  2074. ** New procedures: 'string-utf8-length' and 'scm_c_string_utf8_length'
  2075. See "Bytevectors as Strings" in the manual, for more.
  2076. ** New 'EXIT_SUCCESS' and 'EXIT_FAILURE' Scheme variables
  2077. See "Processes" in the manual.
  2078. ** New C functions to disable automatic SMOB finalization
  2079. The new 'scm_set_automatic_finalization_enabled' C function allows you
  2080. to choose whether automatic object finalization should be enabled (as
  2081. was the case until now, and still is by default.) This is meant for
  2082. applications that are not thread-safe nor async-safe; such applications
  2083. can disable automatic finalization and call the new 'scm_run_finalizers'
  2084. function when appropriate.
  2085. See the "Garbage Collecting Smobs" and "Smobs" sections in the manual.
  2086. ** Cross-compilation to ARM
  2087. More ARM cross-compilation targets are supported: "arm.*eb",
  2088. "^aarch64.*be", and "aarch64".
  2089. * New deprecation
  2090. ** The undocumented and unused C function 'scm_string_hash' is now deprecated
  2091. * Bugs fixed
  2092. ** Compiler
  2093. *** 'call-with-prompt' does not truncate multiple-value returns
  2094. (<http://bugs.gnu.org/14347>)
  2095. *** Use permissions of source file for compiled file
  2096. (<http://bugs.gnu.org/18477>)
  2097. *** Fix bug when inlining some functions with optional arguments
  2098. (<http://bugs.gnu.org/17634>)
  2099. *** Avoid quadratic expansion time in 'and' and 'or' macros
  2100. (<http://bugs.gnu.org/17147>)
  2101. *** Fix expander bug introduced when adding support for tail patterns
  2102. (<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>)
  2103. *** Handle ~p in 'format' warnings (<http://bugs.gnu.org/18299>)
  2104. *** Fix bug that exposed `list' invocations to CSE
  2105. (<http://bugs.gnu.org/21899>)
  2106. *** Reduce eq? and eqv? over constants using equal?
  2107. (<http://bugs.gnu.org/21855>)
  2108. *** Skip invalid .go files found in GUILE_LOAD_COMPILED_PATH
  2109. ** Threads
  2110. *** Fix data races leading to corruption (<http://bugs.gnu.org/22152>)
  2111. ** Memory management
  2112. *** Fix race between SMOB marking and finalization
  2113. (<http://bugs.gnu.org/19883>)
  2114. ** Ports
  2115. *** Fix port position handling on binary input ports
  2116. (<http://bugs.gnu.org/20302>)
  2117. *** Bytevector and custom binary ports to use ISO-8859-1
  2118. (<http://bugs.gnu.org/20200>)
  2119. *** Fix buffer overrun with unbuffered custom binary input ports
  2120. (<http://bugs.gnu.org/19621>)
  2121. *** Fix memory corruption that arose when using 'get-bytevector-n'
  2122. (<http://bugs.gnu.org/17466>)
  2123. ** System
  2124. *** {get,set}sockopt now expect type 'int' for SO_SNDBUF/SO_RCVBUF
  2125. *** 'system*' now available on MS-Windows
  2126. *** 'open-pipe' now available on MS-Windows
  2127. *** Better support for file names containing backslashes on Windows
  2128. ** Web
  2129. *** 'split-and-decode-uri-path' no longer decodes "+" to space
  2130. *** HTTP: Support date strings with a leading space for hours
  2131. (<http://bugs.gnu.org/23421>)
  2132. *** HTTP: Accept empty reason phrases (<http://bugs.gnu.org/22273>)
  2133. *** HTTP: 'Location' header can now contain URI references, not just
  2134. absolute URIs
  2135. *** HTTP: Improve chunked-mode support (<http://bugs.gnu.org/19939>)
  2136. *** HTTP: 'open-socket-for-uri' now sets better OS buffering parameters
  2137. (<http://bugs.gnu.org/15368>)
  2138. ** Miscellaneous
  2139. *** Fix 'atan' procedure when applied to complex numbers
  2140. *** Fix Texinfo to HTML conversion for @itemize and @acronym
  2141. (<http://bugs.gnu.org/21772>)
  2142. *** 'bytevector-fill!' accepts fill arguments greater than 127
  2143. (<http://bugs.gnu.org/19027>)
  2144. *** 'bytevector-copy' correctly copies SRFI-4 homogeneous vectors
  2145. (<http://bugs.gnu.org/18866>)
  2146. *** 'strerror' no longer hangs when passed a non-integer argument
  2147. (<http://bugs.gnu.org/18065>)
  2148. *** 'scm_boot_guile' now gracefully handles argc == 0
  2149. (<http://bugs.gnu.org/18680>)
  2150. *** Fix 'SCM_SMOB_OBJECT_LOC' definition (<http://bugs.gnu.org/18495>)
  2151. *** Fix bug where 'bit-count*' was not using its second argument
  2152. *** SRFI-1 'length+' raises an error for non-lists and dotted lists
  2153. (<http://bugs.gnu.org/17296>)
  2154. *** Add documentation for SXPath (<http://bugs.gnu.org/19478>)
  2155. Changes in 2.0.11 (since 2.0.10):
  2156. This release fixes an embarrassing regression introduced in the C
  2157. interface to SRFI-4 vectors. See
  2158. <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00047.html>
  2159. for details.
  2160. Changes in 2.0.10 (since 2.0.9):
  2161. * Notable changes
  2162. ** New GDB extension to support Guile
  2163. Guile now comes with an extension for GDB 7.8 or later (unreleased at
  2164. the time of writing) that simplifies debugging of C code that uses
  2165. Guile. See "GDB Support" in the manual.
  2166. ** Improved integration between R6RS and native Guile exceptions
  2167. R6RS exception handlers, established using 'with-exception-handler' or
  2168. 'guard', are now able to catch native Guile exceptions, which are
  2169. automatically converted into appropriate R6RS condition objects.
  2170. ** Support for HTTP proxies
  2171. Guile's built-in web client now honors the 'http_proxy' environment
  2172. variable, as well as the new 'current-http-proxy' parameter. See
  2173. "Web Client" in the manual for details.
  2174. ** Lexical syntax improvements
  2175. *** Support |...| symbol notation.
  2176. Guile's core reader and printer now support the R7RS |...| notation
  2177. for writing symbols with arbitrary characters, as a more portable and
  2178. attractive alternative to Guile's native #{...}# notation. To enable
  2179. this notation by default, put one or both of the following in your
  2180. ~/.guile:
  2181. (read-enable 'r7rs-symbols)
  2182. (print-enable 'r7rs-symbols)
  2183. *** Support '#true' and '#false' notation for booleans.
  2184. The booleans '#t' and '#f' may now be written as '#true' and '#false'
  2185. for improved readability, per R7RS.
  2186. *** Recognize '#\escape' character name.
  2187. The escape character '#\esc' may now be written as '#\escape', per R7RS.
  2188. *** Accept "\|" in string literals.
  2189. The pipe character may now be preceded by a backslash, per R7RS.
  2190. ** Custom binary input ports now support 'setvbuf'.
  2191. Until now, ports returned by 'make-custom-binary-input-port' were always
  2192. full-buffered. Now, their buffering mode can be changed using 'setvbuf'.
  2193. ** SRFI-4 predicates and length accessors no longer accept arrays.
  2194. Given that the SRFI-4 accessors don't work for arrays, the fact that the
  2195. predicates and length accessors returned true for arrays was a bug.
  2196. ** GUILE_PROGS now supports specifying a minimum required version.
  2197. The 'GUILE_PROGS' autoconf macro in guile.m4 now allows an optional
  2198. argument to specify a minimum required Guile version. By default, it
  2199. requires Guile >= 2.0. A micro version can also be specified, e.g.:
  2200. GUILE_PROGS([2.0.10])
  2201. ** Error reporting improvements
  2202. *** Improved run-time error reporting in (ice-9 match).
  2203. If no pattern matches in a 'match' form, the datum that failed to match
  2204. is printed along with the location of the failed 'match' invocation.
  2205. *** Print the faulty object upon invalid-keyword errors.
  2206. *** Improved error reporting of procedures defined by define-inlinable.
  2207. *** Improved error reporting for misplaced ellipses in macro definitions.
  2208. *** Improved error checking in 'define-public' and 'module-add!'.
  2209. *** Improved error when 'include' form with relative path is not in a file.
  2210. ** Speed improvements
  2211. *** 'scm_c_read' on ISO-8859-1 (e.g. binary) unbuffered ports is faster.
  2212. *** New inline asm for VM fixnum multiply, for faster overflow checking.
  2213. *** New inline asm for VM fixnum operations on ARM and 32-bit x86.
  2214. *** 'positive?' and 'negative?' are now compiled to VM primitives.
  2215. *** Numerical comparisons with more than 2 arguments are compiled to VM code.
  2216. *** Several R6RS bitwise operators have been optimized.
  2217. ** Miscellaneous
  2218. *** Web: 'content-disposition' headers are now supported.
  2219. *** Web: 'uri-encode' hexadecimal percent-encoding is now uppercase.
  2220. *** Size argument to 'make-doubly-weak-hash-table' is now optional.
  2221. *** Timeout for 'unlock-mutex' and SRFI-18 'mutex-unlock!' may now be #f.
  2222. ** Gnulib update
  2223. Guile's copy of Gnulib was updated to v0.1-92-g546ff82. The following
  2224. modules were imported from Gnulib: copysign, fsync, isfinite, link,
  2225. lstat, mkdir, mkstemp, readlink, rename, rmdir, and unistd.
  2226. * New interfaces
  2227. ** Cooperative REPL servers
  2228. This new facility supports REPLs that run at specified times within an
  2229. existing thread, for example in programs utilizing an event loop or in
  2230. single-threaded programs. This allows for safe access and mutation of
  2231. a program's data structures from the REPL without concern for thread
  2232. synchronization. See "Cooperative REPL Servers" in the manual for
  2233. details.
  2234. ** SRFI-43 (Vector Library)
  2235. Guile now includes SRFI-43, a comprehensive library of vector operations
  2236. analogous to the SRFI-1 list library. See "SRFI-43" in the manual for
  2237. details.
  2238. ** SRFI-64 (A Scheme API for test suites)
  2239. Guile now includes SRFI-64, a flexible framework for creating test
  2240. suites. The reference implementation of SRFI-64 has also been updated
  2241. to fully support earlier versions of Guile.
  2242. ** SRFI-111 (Boxes)
  2243. See "SRFI-111" in the manual.
  2244. ** 'define-values'
  2245. See "Binding multiple return values" in the manual.
  2246. ** Custom ellipsis identifiers using 'with-ellipsis' or SRFI-46.
  2247. Guile now allows macro definitions to use identifiers other than '...'
  2248. as the ellipsis. This is convenient when writing macros that generate
  2249. macro definitions. The desired ellipsis identifier can be given as the
  2250. first operand to 'syntax-rules', as specified in SRFI-46 and R7RS, or by
  2251. using the new 'with-ellipsis' special form in procedural macros. With
  2252. this addition, Guile now fully supports SRFI-46.
  2253. See "Specifying a Custom Ellipsis Identifier" and "Custom Ellipsis
  2254. Identifiers for syntax-case Macros" in the manual for details.
  2255. ** R7RS 'syntax-error'
  2256. Guile now supports 'syntax-error', as specified by R7RS, allowing for
  2257. improved compile-time error reporting from 'syntax-rules' macros. See
  2258. "Reporting Syntax Errors in Macros" in the manual for details.
  2259. ** New procedures to convert association lists into hash tables
  2260. Guile now includes the convenience procedures 'alist->hash-table',
  2261. 'alist->hashq-table', 'alist->hashv-table', and 'alist->hashx-table'.
  2262. See "Hash Table Reference" in the manual.
  2263. ** New predicates: 'exact-integer?' and 'scm_is_exact_integer'
  2264. See "Integers" in the manual.
  2265. ** 'weak-vector-length', 'weak-vector-ref', and 'weak-vector-set!'
  2266. These should now be used to access weak vectors, instead of
  2267. 'vector-length', 'vector-ref', and 'vector-set!'.
  2268. * Manual updates
  2269. ** Improve docs for 'eval-when'.
  2270. Each 'eval-when' condition is now explained in detail, including
  2271. 'expand' which was previously undocumented. (expand load eval) is now
  2272. the recommended set of conditions, instead of (compile load eval).
  2273. See "Eval When" in the manual, for details.
  2274. ** Update the section on SMOBs and memory management.
  2275. See "Defining New Types (Smobs)" in the manual.
  2276. ** Fixes
  2277. *** GOOPS: #:dsupers is the init keyword for the dsupers slot.
  2278. *** 'unfold-right' takes a tail, not a tail generator.
  2279. *** Clarify that 'append!' and 'reverse!' might not mutate.
  2280. *** Fix doc that incorrectly claimed (integer? +inf.0) => #t.
  2281. (http://bugs.gnu.org/16356)
  2282. *** Document that we support SRFI-62 (S-expression comments).
  2283. *** Document that we support SRFI-87 (=> in case clauses).
  2284. *** Document 'equal?' in the list of R6RS incompatibilities.
  2285. *** Remove outdated documentation of LTDL_LIBRARY_PATH.
  2286. *** Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.
  2287. *** Fix 'my-or' examples to use let-bound variable.
  2288. (http://bugs.gnu.org/14203)
  2289. * New deprecations
  2290. ** General 'uniform-vector' interface
  2291. This interface lacked both generality and specificity. The general
  2292. replacements are 'array-length', 'array-ref', and friends on the scheme
  2293. side, and the array handle interface on the C side. On the specific
  2294. side of things, there are the specific bytevector, SRFI-4, and bitvector
  2295. interfaces.
  2296. ** Use of the vector interface on arrays
  2297. ** 'vector-length', 'vector-ref', and 'vector-set!' on weak vectors
  2298. ** 'vector-length', 'vector-ref', and 'vector-set!' as primitive-generics
  2299. Making the vector interface operate only on a single representation will
  2300. allow future versions of Guile to compile loops involving vectors to
  2301. more efficient native code.
  2302. ** 'htons', 'htonl', 'ntohs', 'ntohl'
  2303. These procedures, like their C counterpart, were used to convert numbers
  2304. to/from network byte order, typically in conjunction with the
  2305. now-deprecated uniform vector API.
  2306. This functionality is now covered by the bytevector and binary I/O APIs.
  2307. See "Interpreting Bytevector Contents as Integers" in the manual.
  2308. ** 'gc-live-object-stats'
  2309. It hasn't worked in the whole 2.0 series. There is no replacement,
  2310. unfortunately.
  2311. ** 'scm_c_program_source'
  2312. This internal VM function was not meant to be public. Use
  2313. 'scm_procedure_source' instead.
  2314. * Build fixes
  2315. ** Fix build with Clang 3.4.
  2316. ** MinGW build fixes
  2317. *** Do not add $(EXEEXT) to guild or guile-tools.
  2318. *** tests: Use double quotes around shell arguments, for Windows.
  2319. *** tests: Don't rely on $TMPDIR and /tmp on Windows.
  2320. *** tests: Skip FFI tests that use `qsort' when it's not accessible.
  2321. *** tests: Remove symlink only when it exists.
  2322. *** tests: Don't rely on `scm_call_2' being visible.
  2323. ** Fix computation of LIBLOBJS so dependencies work properly.
  2324. (http://bugs.gnu.org/14193)
  2325. * Bug fixes
  2326. ** Web: Fix web client with methods other than GET.
  2327. (http://bugs.gnu.org/15908)
  2328. ** Web: Add Content-Length header for empty bodies.
  2329. ** Web: Accept "UTC" as the zone offset in date headers.
  2330. (http://bugs.gnu.org/14128)
  2331. ** Web: Don't throw if a response is longer than its Content-Length says.
  2332. ** Web: Write out HTTP Basic auth headers correctly.
  2333. (http://bugs.gnu.org/14370)
  2334. ** Web: Always print a path component in 'write-request-line'.
  2335. ** Fix 'define-public' from (ice-9 curried-definitions).
  2336. ** psyntax: toplevel variable definitions discard previous syntactic binding.
  2337. (http://bugs.gnu.org/11988)
  2338. ** Fix thread-unsafe lazy initializations.
  2339. ** Make (ice-9 popen) thread-safe.
  2340. (http://bugs.gnu.org/15683)
  2341. ** Make guardians thread-safe.
  2342. ** Make regexp_exec thread-safe.
  2343. (http://bugs.gnu.org/14404)
  2344. ** vm: Gracefully handle stack overflows.
  2345. (http://bugs.gnu.org/15065)
  2346. ** Fix 'rationalize'.
  2347. (http://bugs.gnu.org/14905)
  2348. ** Fix inline asm for VM fixnum operations on x32.
  2349. ** Fix 'SCM_SYSCALL' to really swallow EINTR.
  2350. ** Hide EINTR returns from 'accept'.
  2351. ** SRFI-19: Update the table of leap seconds.
  2352. ** Add missing files to the test-suite Makefile.
  2353. ** Make sure 'ftw' allows directory traversal when running as root.
  2354. ** Fix 'hash-for-each' for weak hash tables.
  2355. ** SRFI-18: Export 'current-thread'.
  2356. (http://bugs.gnu.org/16890)
  2357. ** Fix inlining of tail list to apply.
  2358. (http://bugs.gnu.org/15533)
  2359. ** Fix bug in remqueue in threads.c when removing last element.
  2360. ** Fix build when '>>' on negative integers is not arithmetic.
  2361. ** Fix 'bitwise-bit-count' for negative arguments.
  2362. (http://bugs.gnu.org/14864)
  2363. ** Fix VM 'ash' for right shifts by large amounts.
  2364. (http://bugs.gnu.org/14864)
  2365. ** Fix rounding in scm_i_divide2double for negative arguments.
  2366. ** Avoid lossy conversion from inum to double in numerical comparisons.
  2367. ** Fix numerical comparison of fractions to infinities.
  2368. ** Allow fl+ and fl* to accept zero arguments.
  2369. (http://bugs.gnu.org/14869)
  2370. ** flonum? returns false for complex number objects.
  2371. (http://bugs.gnu.org/14866)
  2372. ** flfinite? applied to a NaN returns false.
  2373. (http://bugs.gnu.org/14868)
  2374. ** Flonum operations always return flonums.
  2375. (http://bugs.gnu.org/14871)
  2376. ** min and max: NaNs beat infinities, per R6RS errata.
  2377. (http://bugs.gnu.org/14865)
  2378. ** Fix 'fxbit-count' for negative arguments.
  2379. ** 'gcd' and 'lcm' support inexact integer arguments.
  2380. (http://bugs.gnu.org/14870)
  2381. ** Fix R6RS 'fixnum-width'.
  2382. (http://bugs.gnu.org/14879)
  2383. ** tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
  2384. (http://bugs.gnu.org/14042)
  2385. ** Fix display of symbols containing backslashes.
  2386. (http://bugs.gnu.org/15033)
  2387. ** Fix truncated-print for uniform vectors.
  2388. ** Define `AF_UNIX' only when Unix-domain sockets are supported.
  2389. ** Decompiler: fix handling of empty 'case-lambda' expressions.
  2390. ** Fix handling of signed zeroes and infinities in 'numerator' and 'denominator'.
  2391. ** dereference-pointer: check for null pointer.
  2392. ** Optimizer: Numerical comparisons are not negatable, for correct NaN handling.
  2393. ** Compiler: Evaluate '-' and '/' in left-to-right order.
  2394. (for more robust floating-point arithmetic)
  2395. ** snarf.h: Declare static const function name vars as SCM_UNUSED.
  2396. ** chars.c: Remove duplicate 'const' specifiers.
  2397. ** Modify SCM_UNPACK type check to avoid warnings in clang.
  2398. ** Arrange so that 'file-encoding' does not truncate the encoding name.
  2399. (http://bugs.gnu.org/16463)
  2400. ** Improve error checking in bytevector->uint-list and bytevector->sint-list.
  2401. (http://bugs.gnu.org/15100)
  2402. ** Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum.
  2403. ** i18n: Fix null pointer dereference when locale info is missing.
  2404. ** Fix 'string-copy!' to work properly with overlapping src/dest.
  2405. ** Fix hashing of vectors to run in bounded time.
  2406. ** 'port-position' works on CBIPs that do not support 'set-port-position!'.
  2407. ** Custom binary input ports sanity-check the return value of 'read!'.
  2408. ** bdw-gc.h: Check SCM_USE_PTHREAD_THREADS using #if not #ifdef.
  2409. ** REPL Server: Don't establish a SIGINT handler.
  2410. ** REPL Server: Redirect warnings to client socket.
  2411. ** REPL Server: Improve robustness of 'stop-server-and-clients!'.
  2412. ** Add srfi-16, srfi-30, srfi-46, srfi-62, srfi-87 to %cond-expand-features.
  2413. ** Fix trap handlers to handle applicable structs.
  2414. (http://bugs.gnu.org/15691)
  2415. ** Fix optional end argument in `uniform-vector-read!'.
  2416. (http://bugs.gnu.org/15370)
  2417. ** Fix brainfuck->scheme compiler.
  2418. ** texinfo: Fix newline preservation in @example with lines beginning with @
  2419. ** C standards conformance improvements
  2420. Improvements and bug fixes were made to the C part of Guile's run-time
  2421. support (libguile).
  2422. *** Don't use the identifier 'noreturn'.
  2423. (http://bugs.gnu.org/15798)
  2424. *** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
  2425. *** Improve fallback implemention of SCM_SRS to avoid unspecified behavior.
  2426. *** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
  2427. *** Improve compliance with C standards regarding signed integer shifts.
  2428. *** Avoid signed overflow in random.c.
  2429. *** VM: Avoid signed overflows in 'add1' and 'sub1'.
  2430. *** VM: Avoid overflow in ASM_ADD when the result is most-positive-fixnum.
  2431. *** read: Avoid signed integer overflow in 'read_decimal_integer'.
  2432. Changes in 2.0.9 (since 2.0.7):
  2433. Note: 2.0.8 was a brown paper bag release that was never announced, but
  2434. some mirrors may have picked it up. Please do not use it.
  2435. * Notable changes
  2436. ** New keyword arguments for procedures that open files
  2437. The following procedures that open files now support keyword arguments
  2438. to request binary I/O or to specify the character encoding for text
  2439. files: `open-file', `open-input-file', `open-output-file',
  2440. `call-with-input-file', `call-with-output-file', `with-input-from-file',
  2441. `with-output-to-file', and `with-error-to-file'.
  2442. It is also now possible to specify whether Guile should scan files for
  2443. Emacs-style coding declarations. This scan was done by default in
  2444. versions 2.0.0 through 2.0.7, but now must be explicitly requested.
  2445. See "File Ports" in the manual for details.
  2446. ** Rewritten guile.m4
  2447. The `guile.m4' autoconf macros have been rewritten to use `guild' and
  2448. `pkg-config' instead of the deprecated `guile-config' (which itself
  2449. calls pkg-config).
  2450. There is also a new macro, `GUILE_PKG', which allows packages to select
  2451. the version of Guile that they want to compile against. See "Autoconf
  2452. Macros" in the manual, for more information.
  2453. ** Better Windows support
  2454. Guile now correctly identifies absolute paths on Windows (MinGW), and
  2455. creates files on that platform according to its path conventions. See
  2456. "File System" in the manual, for all details.
  2457. In addition, the new Gnulib imports provide `select' and `poll' on
  2458. Windows builds.
  2459. As an incompatible change, systems that are missing <sys/select.h> were
  2460. previously provided a public `scm_std_select' C function that defined a
  2461. version of `select', but unhappily it also provided its own incompatible
  2462. definitions for FD_SET, FD_ZERO, and other system interfaces. Guile
  2463. should not be setting these macros in public API, so this interface was
  2464. removed on those plaforms (basically only MinGW).
  2465. ** Numerics improvements
  2466. `number->string' now reliably outputs enough digits to produce the same
  2467. number when read back in. Previously, it mishandled subnormal numbers
  2468. (printing them as "#.#"), and failed to distinguish between some
  2469. distinct inexact numbers, e.g. 1.0 and (+ 1.0 (expt 2.0 -52)). These
  2470. problems had far-reaching implications, since the compiler uses
  2471. `number->string' to serialize numeric constants into .go files.
  2472. `sqrt' now produces exact rational results when possible, and handles
  2473. very large or very small numbers more robustly.
  2474. A number (ahem) of operations involving exact rationals have been
  2475. optimized, most notably `integer-expt' and `expt'.
  2476. `exact->inexact' now performs correct IEEE rounding.
  2477. ** New optimizations
  2478. There were a number of improvements to the partial evaluator, allowing
  2479. complete reduction of forms such as:
  2480. ((let ((_ 10)) (lambda () _)))
  2481. ((lambda _ _))
  2482. (apply (lambda _ _) 1 2 3 '(4))
  2483. (call-with-values (lambda () (values 1 2)) (lambda _ _))
  2484. `string-join' now handles huge lists efficiently.
  2485. `get-bytevector-some' now uses buffered input, which is much faster.
  2486. Finally, `array-ref', `array-set!' on arrays of rank 1 or 2 is now
  2487. faster, because it avoids building a rest list. Similarly, the
  2488. one-argument case of `array-for-each' and `array-map!' has been
  2489. optimized, and `array-copy!' and `array-fill!' are faster.
  2490. ** `peek-char' no longer consumes EOF
  2491. As required by the R5RS, if `peek-char' returns EOF, then the next read
  2492. will also return EOF. Previously `peek-char' would consume the EOF.
  2493. This makes a difference for terminal devices where it is possible to
  2494. read past an EOF.
  2495. ** Gnulib update
  2496. Guile's copy of Gnulib was updated to v0.0-7865-ga828bb2. The following
  2497. modules were imported from Gnulib: select, times, pipe-posix, fstat,
  2498. getlogin, poll, and c-strcase.
  2499. ** `include' resolves relative file names relative to including file
  2500. Given a relative file name, `include' will look for it relative to the
  2501. directory of the including file. This harmonizes the behavior of
  2502. `include' with that of `load'.
  2503. ** SLIB compatibility restored
  2504. Guile 2.0.8 is now compatible with SLIB. You will have to use a
  2505. development version of SLIB, however, until a new version of SLIB is
  2506. released.
  2507. ** Better ,trace REPL command
  2508. Sometimes the ,trace output for nested function calls could overflow the
  2509. terminal width, which wasn't useful. Now there is a limit to the amount
  2510. of space the prefix will take. See the documentation for ",trace" for
  2511. more information.
  2512. ** Better docstring syntax supported for `case-lambda'
  2513. Docstrings can now be placed immediately after the `case-lambda' or
  2514. `case-lambda*' keyword. See "Case-lambda" in the manual.
  2515. ** Improved handling of Unicode byte order marks
  2516. See "BOM Handling" in the manual for details.
  2517. ** Update predefined character sets to Unicode 6.2
  2518. ** GMP 4.2 or later required
  2519. Guile used to require GMP at least version 4.1 (released in May 2002),
  2520. and now requires at least version 4.2 (released in March 2006).
  2521. * Manual updates
  2522. ** Better SXML documentation
  2523. The documentation for SXML modules was much improved, though there is
  2524. still far to go. See "SXML" in manual.
  2525. ** Style updates
  2526. Use of "iff" was replaced with standard English. Keyword arguments are
  2527. now documented consistently, along with their default values.
  2528. ** An end to the generated-documentation experiment
  2529. When Guile 2.0 imported some modules from Guile-Lib, they came with a
  2530. system that generated documentation from docstrings and module
  2531. commentaries. This produced terrible documentation. We finally bit the
  2532. bullet and incorporated these modules into the main text, and will be
  2533. improving them manually over time, as is the case with SXML. Help is
  2534. appreciated.
  2535. ** New documentation
  2536. There is now documentation for `scm_array_type', and `scm_array_ref', as
  2537. well as for the new `array-length' / 'scm_c_array_length' /
  2538. `scm_array_length' functions. `array-in-bounds?' has better
  2539. documentation as well. The `program-arguments-alist' and
  2540. `program-lambda-list' functions are now documented, as well as `and=>',
  2541. `exit', and `quit'. The (system repl server) module is now documented
  2542. (see REPL Servers). Finally, the GOOPS class hierarchy diagram has been
  2543. regenerated for the web and print output formats.
  2544. * New deprecations
  2545. ** Deprecate generalized vector interface
  2546. The generalized vector interface, introduced in 1.8.0, is simply a
  2547. redundant, verbose interface to arrays of rank 1. `array-ref' and
  2548. similar functions are entirely sufficient. Thus,
  2549. `scm_generalized_vector_p', `scm_generalized_vector_length',
  2550. `scm_generalized_vector_ref', `scm_generalized_vector_set_x', and
  2551. `scm_generalized_vector_to_list' are now deprecated.
  2552. ** Deprecate SCM_CHAR_CODE_LIMIT and char-code-limit
  2553. These constants were defined to 256, which is not the highest codepoint
  2554. supported by Guile. Given that they were useless and incorrect, they
  2555. have been deprecated.
  2556. ** Deprecate `http-get*'
  2557. The new `#:streaming?' argument to `http-get' subsumes the functionality
  2558. of `http-get*' (introduced in 2.0.7). Also, the `#:extra-headers'
  2559. argument is deprecated in favor of `#:headers'.
  2560. ** Deprecate (ice-9 mapping)
  2561. This module, present in Guile since 1996 but never used or documented,
  2562. has never worked in Guile 2.0. It has now been deprecated and will be
  2563. removed in Guile 2.2.
  2564. ** Deprecate undocumented array-related C functions
  2565. These are `scm_array_fill_int', `scm_ra_eqp', `scm_ra_lessp',
  2566. `scm_ra_leqp', `scm_ra_grp', `scm_ra_greqp', `scm_ra_sum',
  2567. `scm_ra_product', `scm_ra_difference', `scm_ra_divide', and
  2568. `scm_array_identity'.
  2569. * New interfaces
  2570. ** SRFI-41 Streams
  2571. See "SRFI-41" in the manual.
  2572. ** SRFI-45 exports `promise?'
  2573. SRFI-45 now exports a `promise?' procedure that works with its promises.
  2574. Also, its promises now print more nicely.
  2575. ** New HTTP client procedures
  2576. See "Web Client" for documentation on the new `http-head', `http-post',
  2577. `http-put', `http-delete', `http-trace', and `http-options' procedures,
  2578. and also for more options to `http-get'.
  2579. ** Much more capable `xml->sxml'
  2580. See "Reading and Writing XML" for information on how the `xml->sxml'
  2581. parser deals with namespaces, processed entities, doctypes, and literal
  2582. strings. Incidentally, `current-ssax-error-port' is now a parameter
  2583. object.
  2584. ** New procedures for converting strings to and from bytevectors
  2585. See "Representing Strings as Bytes" for documention on the new `(ice-9
  2586. iconv)' module and its `bytevector->string' and `string->bytevector'
  2587. procedures.
  2588. ** Escape continuations with `call/ec' and `let/ec'
  2589. See "Prompt Primitives".
  2590. ** New procedures to read all characters from a port
  2591. See "Line/Delimited" in the manual for documentation on `read-string'
  2592. and `read-string!'.
  2593. ** New procedure `sendfile'
  2594. See "File System".
  2595. ** New procedure `unget-bytevector'
  2596. See "R6RS Binary Input".
  2597. ** New C helper: `scm_c_bind_keyword_arguments'
  2598. See "Keyword Procedures".
  2599. ** New command-line arguments: `--language' and `-C'
  2600. See "Command-line Options" in the manual.
  2601. ** New environment variables: `GUILE_STACK_SIZE', `GUILE_INSTALL_LOCALE'
  2602. See "Environment Variables".
  2603. ** New procedures for dealing with file names
  2604. See "File System" for documentation on `system-file-name-convention',
  2605. `file-name-separator?', `absolute-file-name?', and
  2606. `file-name-separator-string'.
  2607. ** `array-length', an array's first dimension
  2608. See "Array Procedures".
  2609. ** `hash-count', for hash tables
  2610. See "Hash Tables".
  2611. ** `round-ash', a bit-shifting operator that rounds on right-shift
  2612. See "Bitwise Operations".
  2613. ** New foreign types: `ssize_t', `ptrdiff_t'
  2614. See "Foreign Types".
  2615. ** New C helpers: `scm_from_ptrdiff_t', `scm_to_ptrdiff_t'
  2616. See "Integers".
  2617. ** Socket option `SO_REUSEPORT' now available from Scheme
  2618. If supported on the platform, `SO_REUSEPORT' is now available from
  2619. Scheme as well. See "Network Sockets and Communication".
  2620. ** `current-language' in default environment
  2621. Previously defined only in `(system base language)', `current-language'
  2622. is now defined in the default environment, and is used to determine the
  2623. language for the REPL, and for `compile-and-load'.
  2624. ** New procedure: `fluid->parameter'
  2625. See "Parameters", for information on how to convert a fluid to a
  2626. parameter.
  2627. ** New `print' REPL option
  2628. See "REPL Commands" in the manual for information on the new
  2629. user-customizable REPL printer.
  2630. ** New variable: %site-ccache-dir
  2631. The "Installing Site Packages" and "Build Config" manual sections now
  2632. refer to this variable to describe where users should install their
  2633. `.go' files.
  2634. * Build fixes
  2635. ** Fix compilation against libgc 7.3.
  2636. ** Fix cross-compilation of `c-tokenize.o'.
  2637. ** Fix warning when compiling against glibc 2.17.
  2638. ** Fix documentation build against Texinfo 5.0.
  2639. ** Fix building Guile from a directory with non-ASCII characters.
  2640. ** Fix native MinGW build.
  2641. ** Fix --disable-posix build.
  2642. ** Fix MinGW builds with networking, POSIX, and thread support.
  2643. * Bug fixes
  2644. ** Fix inexact number printer.
  2645. (http://bugs.gnu.org/13757)
  2646. ** Fix infinite loop when parsing optional-argument short options (SRFI-37).
  2647. (http://bugs.gnu.org/13176)
  2648. ** web: Support non-GMT date headers in the HTTP client.
  2649. (http://bugs.gnu.org/13544)
  2650. ** web: support IP-literal (IPv6 address) in Host header.
  2651. ** Avoid stack overflows with `par-map' and nested futures in general.
  2652. (http://bugs.gnu.org/13188)
  2653. ** Peek-char no longer consumes EOF.
  2654. (http://bugs.gnu.org/12216)
  2655. ** Avoid swallowing multiple EOFs in R6RS binary-input procedures.
  2656. ** A fork when multiple threads are running will now print a warning.
  2657. ** Allow for spurious wakeups from pthread_cond_wait.
  2658. (http://bugs.gnu.org/10641)
  2659. ** Warn and ignore module autoload failures.
  2660. (http://bugs.gnu.org/12202)
  2661. ** Use chmod portably in (system base compile).
  2662. (http://bugs.gnu.org/10474)
  2663. ** Fix response-body-port for HTTP responses without content-length.
  2664. (http://bugs.gnu.org/13857)
  2665. ** Allow case-lambda expressions with no clauses.
  2666. (http://bugs.gnu.org/9776)
  2667. ** Improve standards conformance of string->number.
  2668. (http://bugs.gnu.org/11887)
  2669. ** Support calls and tail-calls with more than 255 formals.
  2670. ** ,option evaluates its right-hand-side.
  2671. (http://bugs.gnu.org/13076)
  2672. ** Structs with tail arrays are not simple.
  2673. (http://bugs.gnu.org/12808)
  2674. ** Make `SCM_LONG_BIT' usable in preprocessor conditionals.
  2675. (http://bugs.gnu.org/13848)
  2676. ** Fix thread-unsafe lazy initializations.
  2677. ** Allow SMOB mark procedures to be called from parallel markers.
  2678. (http://bugs.gnu.org/13611)
  2679. ** Fix later-bindings-win logic in with-fluids.
  2680. (http://bugs.gnu.org/13843)
  2681. ** Fix duplicate removal of with-fluids.
  2682. (http://bugs.gnu.org/13838)
  2683. ** Support calling foreign functions of 10 arguments or more.
  2684. (http://bugs.gnu.org/13809)
  2685. ** Let reverse! accept arbitrary types as second argument.
  2686. (http://bugs.gnu.org/13835)
  2687. ** Recognize the `x86_64.*-gnux32' triplet.
  2688. ** Check whether a triplet's OS part specifies an ABI.
  2689. ** Recognize mips64* as having 32-bit pointers by default.
  2690. ** Use portable sed constructs.
  2691. (http://bugs.gnu.org/14042)
  2692. ** Remove language/glil/decompile-assembly.scm.
  2693. (http://bugs.gnu.org/10622)
  2694. ** Use O_BINARY in `copy-file', `load-objcode', `mkstemp'.
  2695. ** Use byte-oriented functions in `get-bytevector*'.
  2696. ** Fix abort when iconv swallows BOM from UTF-16 or UTF-32 stream.
  2697. ** Fix compilation of functions with more than 255 local variables.
  2698. ** Fix `getgroups' for when zero supplementary group IDs exist.
  2699. ** Allow (define-macro name (lambda ...)).
  2700. ** Various fixes to the (texinfo) modules.
  2701. ** guild: Gracefully handle failures to install the locale.
  2702. ** Fix format string warnings for ~!, ~|, ~/, ~q, ~Q, and ~^.
  2703. (http://bugs.gnu.org/13485)
  2704. ** Fix source annotation bug in psyntax 'expand-body'.
  2705. ** Ecmascript: Fix conversion to boolean for non-numbers.
  2706. ** Use case-insensitive comparisons for encoding names.
  2707. ** Add missing cond-expand feature identifiers.
  2708. ** A failure to find a module's file does not prevent future loading.
  2709. ** Many (oop goops save) fixes.
  2710. ** `http-get': don't shutdown write end of socket.
  2711. (http://bugs.gnu.org/13095)
  2712. ** Avoid signed integer overflow in scm_product.
  2713. ** http: read-response-body always returns bytevector or #f, never EOF.
  2714. ** web: Correctly detect "No route to host" conditions.
  2715. ** `system*': failure to execvp no longer leaks dangling processes.
  2716. (http://bugs.gnu.org/13166)
  2717. ** More sensible case-lambda* dispatch.
  2718. (http://bugs.gnu.org/12929)
  2719. ** Do not defer expansion of internal define-syntax forms.
  2720. (http://bugs.gnu.org/13509)
  2721. Changes in 2.0.7 (since 2.0.6):
  2722. * Notable changes
  2723. ** SRFI-105 curly infix expressions are supported
  2724. Curly infix expressions as described at
  2725. http://srfi.schemers.org/srfi-105/srfi-105.html are now supported by
  2726. Guile's reader. This allows users to write things like {a * {b + c}}
  2727. instead of (* a (+ b c)). SRFI-105 support is enabled by using the
  2728. `#!curly-infix' directive in source code, or the `curly-infix' reader
  2729. option. See the manual for details.
  2730. ** Reader options may now be per-port
  2731. Historically, `read-options' and related procedures would manipulate
  2732. global options, affecting the `read' procedure for all threads, and all
  2733. current uses of `read'.
  2734. Guile can now associate `read' options with specific ports, allowing
  2735. different ports to use different options. For instance, the
  2736. `#!fold-case' and `#!no-fold-case' reader directives have been
  2737. implemented, and their effect is to modify the current read options of
  2738. the current port only; similarly for `#!curly-infix'. Thus, it is
  2739. possible, for instance, to have one port reading case-sensitive code,
  2740. while another port reads case-insensitive code.
  2741. ** Futures may now be nested
  2742. Futures may now be nested: a future can itself spawn and then `touch'
  2743. other futures. In addition, any thread that touches a future that has
  2744. not completed now processes other futures while waiting for the touched
  2745. future to completed. This allows all threads to be kept busy, and was
  2746. made possible by the use of delimited continuations (see the manual for
  2747. details.)
  2748. Consequently, `par-map' and `par-for-each' have been rewritten and can
  2749. now use all cores.
  2750. ** `GUILE_LOAD_PATH' et al can now add directories to the end of the path
  2751. `GUILE_LOAD_PATH' and `GUILE_LOAD_COMPILED_PATH' can now be used to add
  2752. directories to both ends of the load path. If the special path
  2753. component `...' (ellipsis) is present in these environment variables,
  2754. then the default path is put in place of the ellipsis, otherwise the
  2755. default path is placed at the end. See "Environment Variables" in the
  2756. manual for details.
  2757. ** `load-in-vicinity' search for `.go' files in `%load-compiled-path'
  2758. Previously, `load-in-vicinity' would look for compiled files in the
  2759. auto-compilation cache, but not in `%load-compiled-path'. This is now
  2760. fixed. This affects `load', and the `-l' command-line flag. See
  2761. <http://bugs.gnu.org/12519> for details.
  2762. ** Extension search order fixed, and LD_LIBRARY_PATH preserved
  2763. Up to 2.0.6, Guile would modify the `LD_LIBRARY_PATH' environment
  2764. variable (or whichever is relevant for the host OS) to insert its own
  2765. default extension directories in the search path (using GNU libltdl
  2766. facilities was not possible here.) This approach was problematic in two
  2767. ways.
  2768. First, the `LD_LIBRARY_PATH' modification would be visible to
  2769. sub-processes, and would also affect future calls to `dlopen', which
  2770. could lead to subtle bugs in the application or sub-processes. Second,
  2771. when the installation prefix is /usr, the `LD_LIBRARY_PATH' modification
  2772. would typically end up inserting /usr/lib before /usr/local/lib in the
  2773. search path, which is often the opposite of system-wide settings such as
  2774. `ld.so.conf'.
  2775. Both issues have now been fixed.
  2776. ** `make-vtable-vtable' is now deprecated
  2777. Programs should instead use `make-vtable' and `<standard-vtable>'.
  2778. ** The `-Wduplicate-case-datum' and `-Wbad-case-datum' are enabled
  2779. These recently introduced warnings have been documented and are now
  2780. enabled by default when auto-compiling.
  2781. ** Optimize calls to `equal?' or `eqv?' with a constant argument
  2782. The compiler simplifies calls to `equal?' or `eqv?' with a constant
  2783. argument to use `eq?' instead, when applicable.
  2784. * Manual updates
  2785. ** SRFI-9 records now documented under "Compound Data Types"
  2786. The documentation of SRFI-9 record types has been moved in the "Compound
  2787. Data Types", next to Guile's other record APIs. A new section
  2788. introduces the various record APIs, and describes the trade-offs they
  2789. make. These changes were made in an attempt to better guide users
  2790. through the maze of records API, and to recommend SRFI-9 as the main
  2791. API.
  2792. The documentation of Guile's raw `struct' API has also been improved.
  2793. ** (ice-9 and-let-star) and (ice-9 curried-definitions) now documented
  2794. These modules were missing from the manual.
  2795. * New interfaces
  2796. ** New "functional record setters" as a GNU extension of SRFI-9
  2797. The (srfi srfi-9 gnu) module now provides three new macros to deal with
  2798. "updates" of immutable records: `define-immutable-record-type',
  2799. `set-field', and `set-fields'.
  2800. The first one allows record type "functional setters" to be defined;
  2801. such setters keep the record unchanged, and instead return a new record
  2802. with only one different field. The remaining macros provide the same
  2803. functionality, and also optimize updates of multiple or nested fields.
  2804. See the manual for details.
  2805. ** web: New `http-get*', `response-body-port', and `text-content-type?'
  2806. procedures
  2807. These procedures return a port from which to read the response's body.
  2808. Unlike `http-get' and `read-response-body', they allow the body to be
  2809. processed incrementally instead of being stored entirely in memory.
  2810. The `text-content-type?' predicate allows users to determine whether the
  2811. content type of a response is textual.
  2812. See the manual for details.
  2813. ** `string-split' accepts character sets and predicates
  2814. The `string-split' procedure can now be given a SRFI-14 character set or
  2815. a predicate, instead of just a character.
  2816. ** R6RS SRFI support
  2817. Previously, in R6RS modules, Guile incorrectly ignored components of
  2818. SRFI module names after the SRFI number, making it impossible to specify
  2819. sub-libraries. This release corrects this, bringing us into accordance
  2820. with SRFI 97.
  2821. ** `define-public' is no a longer curried definition by default
  2822. The (ice-9 curried-definitions) should be used for such uses. See the
  2823. manual for details.
  2824. * Build fixes
  2825. ** Remove reference to `scm_init_popen' when `fork' is unavailable
  2826. This fixes a MinGW build issue (http://bugs.gnu.org/12477).
  2827. ** Fix race between installing `guild' and the `guile-tools' symlink
  2828. * Bug fixes
  2829. ** Procedures returned by `eval' now have docstrings
  2830. (http://bugs.gnu.org/12173)
  2831. ** web client: correctly handle uri-query, etc. in relative URI headers
  2832. (http://bugs.gnu.org/12827)
  2833. ** Fix docs for R6RS `hashtable-copy'
  2834. ** R6RS `string-for-each' now accepts multiple string arguments
  2835. ** Fix out-of-range error in the compiler's CSE pass
  2836. (http://bugs.gnu.org/12883)
  2837. ** Add missing R6RS `open-file-input/output-port' procedure
  2838. ** Futures: Avoid creating the worker pool more than once
  2839. ** Fix invalid assertion about mutex ownership in threads.c
  2840. (http://bugs.gnu.org/12719)
  2841. ** Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'
  2842. ** The `scandir' procedure now uses `lstat' instead of `stat'
  2843. ** Fix `generalized-vector->list' indexing bug with shared arrays
  2844. (http://bugs.gnu.org/12465)
  2845. ** web: Change `http-get' to try all the addresses for the given URI
  2846. ** Implement `hash' for structs
  2847. (http://lists.gnu.org/archive/html/guile-devel/2012-10/msg00031.html)
  2848. ** `read' now adds source properties for data types beyond pairs
  2849. ** Improve error reporting in `append!'
  2850. ** In fold-matches, set regexp/notbol unless matching string start
  2851. ** Don't stat(2) and access(2) the .go location before using it
  2852. ** SRFI-19: use zero padding for hours in ISO 8601 format, not blanks
  2853. ** web: Fix uri-encoding for strings with no unreserved chars, and octets 0-15
  2854. ** More robust texinfo alias handling
  2855. ** Optimize `format' and `simple-format'
  2856. (http://bugs.gnu.org/12033)
  2857. ** Angle of -0.0 is pi, not zero
  2858. Changes in 2.0.6 (since 2.0.5):
  2859. * Notable changes
  2860. ** New optimization pass: common subexpression elimination (CSE)
  2861. Guile's optimizer will now run a CSE pass after partial evaluation.
  2862. This pass propagates static information about branches taken, bound
  2863. lexicals, and effects from an expression's dominators. It can replace
  2864. common subexpressions with their boolean values (potentially enabling
  2865. dead code elimination), equivalent bound lexicals, or it can elide them
  2866. entirely, depending on the context in which they are executed. This
  2867. pass is especially useful in removing duplicate type checks, such as
  2868. those produced by SRFI-9 record accessors.
  2869. ** Improvements to the partial evaluator
  2870. Peval can now hoist tests that are common to both branches of a
  2871. conditional into the test. This can help with long chains of
  2872. conditionals, such as those generated by the `match' macro. Peval can
  2873. now do simple beta-reductions of procedures with rest arguments. It
  2874. also avoids residualizing degenerate lexical aliases, even when full
  2875. inlining is not possible. Finally, peval now uses the effects analysis
  2876. introduced for the CSE pass. More precise effects analysis allows peval
  2877. to move more code.
  2878. ** Run finalizers asynchronously in asyncs
  2879. Finalizers are now run asynchronously, via an async. See Asyncs in the
  2880. manual. This allows Guile and user code to safely allocate memory while
  2881. holding a mutex.
  2882. ** Update SRFI-14 character sets to Unicode 6.1
  2883. Note that this update causes the Latin-1 characters `§' and `¶' to be
  2884. reclassified as punctuation. They were previously considered to be part
  2885. of `char-set:symbol'.
  2886. ** Better source information for datums
  2887. When the `positions' reader option is on, as it is by default, Guile's
  2888. reader will record source information for more kinds of datums.
  2889. ** Improved error and warning messages
  2890. `syntax-violation' errors now prefer `subform' for source info, with
  2891. `form' as fallback. Syntactic errors in `cond' and `case' now produce
  2892. better errors. `case' can now warn on duplicate datums, or datums that
  2893. cannot be usefully compared with `eqv?'. `-Warity-mismatch' now handles
  2894. applicable structs. `-Wformat' is more robust in the presence of
  2895. `gettext'. Finally, various exceptions thrown by the Web modules now
  2896. define appropriate exception printers.
  2897. ** A few important bug fixes in the HTTP modules.
  2898. Guile's web server framework now checks if an application returns a body
  2899. where it is not permitted, for example in response to a HEAD request,
  2900. and warn or truncate the response as appropriate. Bad requests now
  2901. cause a 400 Bad Request response to be printed before closing the port.
  2902. Finally, some date-printing and URL-parsing bugs were fixed.
  2903. ** Pretty-print improvements
  2904. When Guile needs to pretty-print Tree-IL, it will try to reconstruct
  2905. `cond', `or`, and other derived syntax forms from the primitive tree-IL
  2906. forms. It also uses the original names instead of the fresh unique
  2907. names, when it is unambiguous to do so. This can be seen in the output
  2908. of REPL commands like `,optimize'.
  2909. Also, the `pretty-print' procedure has a new keyword argument,
  2910. `#:max-expr-width'.
  2911. ** Fix memory leak involving applicable SMOBs
  2912. At some point in the 1.9.x series, Guile began leaking any applicable
  2913. SMOB that was actually applied. (There was a weak-key map from SMOB to
  2914. trampoline functions, where the value had a strong reference on the
  2915. key.) This has been fixed. There was much rejoicing!
  2916. ** Support for HTTP/1.1 chunked transfer coding
  2917. See "Transfer Codings" in the manual, for more.
  2918. ** Micro-optimizations
  2919. A pile of micro-optimizations: the `string-trim' function when called
  2920. with `char-set:whitespace'; the `(web http)' parsers; SMOB application;
  2921. conversion of raw UTF-8 and UTF-32 data to and from SCM strings; vlists
  2922. and vhashes; `read' when processing string literals.
  2923. ** Incompatible change to `scandir'
  2924. As was the original intention, `scandir' now runs the `select?'
  2925. procedure on all items, including subdirectories and the `.' and `..'
  2926. entries. It receives the basename of the file in question instead of
  2927. the full name. We apologize for this incompatible change to this
  2928. function introduced in the 2.0.4 release.
  2929. * Manual updates
  2930. The manual has been made much more consistent in its naming conventions
  2931. with regards to formal parameters of functions. Thanks to Bake Timmons.
  2932. * New interfaces
  2933. ** New C function: `scm_to_pointer'
  2934. ** New C inline functions: `scm_new_smob', `scm_new_double_smob'
  2935. ** (ice-9 format): Add ~h specifier for localized number output.
  2936. ** (web response): New procedure: `response-must-not-include-body?'
  2937. ** New predicate: 'supports-source-properties?'
  2938. ** New C helpers: `scm_c_values', `scm_c_nvalues'
  2939. ** Newly public inline C function: `scm_unget_byte'
  2940. ** (language tree-il): New functions: `tree-il=?', `tree-il-hash'
  2941. ** New fluid: `%default-port-conversion-strategy'
  2942. ** New syntax: `=>' within `case'
  2943. ** (web http): `make-chunked-input-port', `make-chunked-output-port'
  2944. ** (web http): `declare-opaque-header!'
  2945. Search the manual for these identifiers, for more information.
  2946. * New deprecations
  2947. ** `close-io-port' deprecated
  2948. Use `close-port'.
  2949. ** `scm_sym2var' deprecated
  2950. In most cases, replace with `scm_lookup' or `scm_module_variable'. Use
  2951. `scm_define' or `scm_module_ensure_local_variable' if the second
  2952. argument is nonzero. See "Accessing Modules from C" in the manual, for
  2953. full details.
  2954. ** Lookup closures deprecated
  2955. These were never documented. See "Module System Reflection" in the
  2956. manual for replacements.
  2957. * Build fixes
  2958. ** Fix compilation against uninstalled Guile on non-GNU platforms.
  2959. ** Fix `SCM_I_ERROR' definition for MinGW without networking.
  2960. ** Fix compilation with the Sun C compiler.
  2961. ** Fix check for `clock_gettime' on OpenBSD and some other systems.
  2962. ** Fix build with --enable-debug-malloc.
  2963. ** Honor $(program_transform_name) for the `guile-tools' symlink.
  2964. ** Fix cross-compilation of GOOPS-using code.
  2965. * Bug fixes
  2966. ** Fix use of unitialized stat buffer in search-path of absolute paths.
  2967. ** Avoid calling `freelocale' with a NULL argument.
  2968. ** Work around erroneous tr_TR locale in Darwin 8 in tests.
  2969. ** Fix `getaddrinfo' test for Darwin 8.
  2970. ** Use Gnulib's `regex' module for better regex portability.
  2971. ** `source-properties' and friends work on any object
  2972. ** Rewrite open-process in C, for robustness related to threads and fork
  2973. ** Fix <TAG>vector-length when applied to other uniform vector types
  2974. ** Fix escape-only prompt optimization (was disabled previously)
  2975. ** Fix a segfault when /dev/urandom is not accessible
  2976. ** Fix flush on soft ports, so that it actually runs.
  2977. ** Better compatibility of SRFI-9 records with core records
  2978. ** Fix and clarify documentation of `sorted?'.
  2979. ** Fix IEEE-754 endianness conversion in bytevectors.
  2980. ** Correct thunk check in the `wind' instruction.
  2981. ** Add @acronym support to texinfo modules
  2982. ** Fix docbook->texi for <ulink> without URL
  2983. ** Fix `setvbuf' to leave the line/column number unchanged.
  2984. ** Add missing public declaration for `scm_take_from_input_buffers'.
  2985. ** Fix relative file name canonicalization with empty %LOAD-PATH entries.
  2986. ** Import newer (ice-9 match) from Chibi-Scheme.
  2987. ** Fix unbound variables and unbound values in ECMAScript runtime.
  2988. ** Make SRFI-6 string ports Unicode-capable.
  2989. Changes in 2.0.5 (since 2.0.4):
  2990. This release fixes the binary interface information (SONAME) of
  2991. libguile, which was incorrect in 2.0.4. It does not contain other
  2992. changes.
  2993. Changes in 2.0.4 (since 2.0.3):
  2994. * Notable changes
  2995. ** Better debuggability for interpreted procedures.
  2996. Guile 2.0 came with a great debugging experience for compiled
  2997. procedures, but the story for interpreted procedures was terrible. Now,
  2998. at least, interpreted procedures have names, and the `arity' procedure
  2999. property is always correct (or, as correct as it can be, in the presence
  3000. of `case-lambda').
  3001. ** Support for cross-compilation.
  3002. One can now use a native Guile to cross-compile `.go' files for a
  3003. different architecture. See the documentation for `--target' in the
  3004. "Compilation" section of the manual, for information on how to use the
  3005. cross-compiler. See the "Cross building Guile" section of the README,
  3006. for more on how to cross-compile Guile itself.
  3007. ** The return of `local-eval'.
  3008. Back by popular demand, `the-environment' and `local-eval' allow the
  3009. user to capture a lexical environment, and then evaluate arbitrary
  3010. expressions in that context. There is also a new `local-compile'
  3011. command. See "Local Evaluation" in the manual, for more. Special
  3012. thanks to Mark Weaver for an initial implementation of this feature.
  3013. ** Fluids can now have default values.
  3014. Fluids are used for dynamic and thread-local binding. They have always
  3015. inherited their values from the context or thread that created them.
  3016. However, there was a case in which a new thread would enter Guile, and
  3017. the default values of all the fluids would be `#f' for that thread.
  3018. This has now been fixed so that `make-fluid' has an optional default
  3019. value for fluids in unrelated dynamic roots, which defaults to `#f'.
  3020. ** Garbage collector tuning.
  3021. The garbage collector has now been tuned to run more often under some
  3022. circumstances.
  3023. *** Unmanaged allocation
  3024. The new `scm_gc_register_allocation' function will notify the collector
  3025. of unmanaged allocation. This will cause the collector to run sooner.
  3026. Guile's `scm_malloc', `scm_calloc', and `scm_realloc' unmanaged
  3027. allocators eventually call this function. This leads to better
  3028. performance under steady-state unmanaged allocation.
  3029. *** Transient allocation
  3030. When the collector runs, it will try to record the total memory
  3031. footprint of a process, if the platform supports this information. If
  3032. the memory footprint is growing, the collector will run more frequently.
  3033. This reduces the increase of the resident size of a process in response
  3034. to a transient increase in allocation.
  3035. *** Management of threads, bignums
  3036. Creating a thread will allocate a fair amount of memory. Guile now does
  3037. some GC work (using `GC_collect_a_little') when allocating a thread.
  3038. This leads to a better memory footprint when creating many short-lived
  3039. threads.
  3040. Similarly, bignums can occupy a lot of memory. Guile now offers hooks
  3041. to enable custom GMP allocators that end up calling
  3042. `scm_gc_register_allocation'. These allocators are enabled by default
  3043. when running Guile from the command-line. To enable them in libraries,
  3044. set the `scm_install_gmp_memory_functions' variable to a nonzero value
  3045. before loading Guile.
  3046. ** SRFI-39 parameters are available by default.
  3047. Guile now includes support for parameters, as defined by SRFI-39, in the
  3048. default environment. See "Parameters" in the manual, for more
  3049. information. `current-input-port', `current-output-port', and
  3050. `current-error-port' are now parameters.
  3051. ** Add `current-warning-port'.
  3052. Guile now outputs warnings on a separate port, `current-warning-port',
  3053. initialized to the value that `current-error-port' has on startup.
  3054. ** Syntax parameters.
  3055. Following Racket's lead, Guile now supports syntax parameters. See
  3056. "Syntax parameters" in the manual, for more.
  3057. Also see Barzilay, Culpepper, and Flatt's 2011 SFP workshop paper,
  3058. "Keeping it Clean with syntax-parameterize".
  3059. ** Parse command-line arguments from the locale encoding.
  3060. Guile now attempts to parse command-line arguments using the user's
  3061. locale. However for backwards compatibility with other 2.0.x releases,
  3062. it does so without actually calling `setlocale'. Please report any bugs
  3063. in this facility to bug-guile@gnu.org.
  3064. ** One-armed conditionals: `when' and `unless'
  3065. Guile finally has `when' and `unless' in the default environment. Use
  3066. them whenever you would use an `if' with only one branch. See
  3067. "Conditionals" in the manual, for more.
  3068. ** `current-filename', `add-to-load-path'
  3069. There is a new form, `(current-filename)', which expands out to the
  3070. source file in which it occurs. Combined with the new
  3071. `add-to-load-path', this allows simple scripts to easily add nearby
  3072. directories to the load path. See "Load Paths" in the manual, for more.
  3073. ** `random-state-from-platform'
  3074. This procedure initializes a random seed using good random sources
  3075. available on your platform, such as /dev/urandom. See "Random Number
  3076. Generation" in the manual, for more.
  3077. ** Warn about unsupported `simple-format' options.
  3078. The `-Wformat' compilation option now reports unsupported format options
  3079. passed to `simple-format'.
  3080. ** Manual updates
  3081. Besides the sections already mentioned, the following manual sections
  3082. are new in this release: "Modules and the File System", "Module System
  3083. Reflection", "Syntax Transformer Helpers", and "Local Inclusion".
  3084. * New interfaces
  3085. ** (ice-9 session): `apropos-hook'
  3086. ** New print option: `escape-newlines', defaults to #t.
  3087. ** (ice-9 ftw): `file-system-fold', `file-system-tree', `scandir'
  3088. ** `scm_c_value_ref': access to multiple returned values from C
  3089. ** scm_call (a varargs version), scm_call_7, scm_call_8, scm_call_9
  3090. ** Some new syntax helpers in (system syntax)
  3091. Search the manual for these identifiers and modules, for more.
  3092. * Build fixes
  3093. ** FreeBSD build fixes.
  3094. ** OpenBSD compilation fixes.
  3095. ** Solaris 2.10 test suite fixes.
  3096. ** IA64 compilation fix.
  3097. ** MinGW build fixes.
  3098. ** Work around instruction reordering on SPARC and HPPA in the VM.
  3099. ** Gnulib updates: added `dirfd', `setenv' modules.
  3100. * Bug fixes
  3101. ** Add a deprecated alias for $expt.
  3102. ** Add an exception printer for `getaddrinfo-error'.
  3103. ** Add deprecated shim for `scm_display_error' with stack as first argument.
  3104. ** Add warnings for unsupported `simple-format' options.
  3105. ** Allow overlapping regions to be passed to `bytevector-copy!'.
  3106. ** Better function prologue disassembly
  3107. ** Compiler: fix miscompilation of (values foo ...) in some contexts.
  3108. ** Compiler: fix serialization of #nil-terminated lists.
  3109. ** Compiler: allow values bound in non-tail let expressions to be collected.
  3110. ** Deprecate SCM_ASRTGO.
  3111. ** Document invalidity of (begin) as expression; add back-compat shim.
  3112. ** Don't leak file descriptors when mmaping objcode.
  3113. ** Empty substrings no longer reference the original stringbuf.
  3114. ** FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.
  3115. ** FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
  3116. ** FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
  3117. ** FFI: Properly unpack small integer return values in closure call.
  3118. ** Fix R6RS `fold-left' so the accumulator is the first argument.
  3119. ** Fix bit-set*! bug from 2005.
  3120. ** Fix bug in `make-repl' when `lang' is actually a <language>.
  3121. ** Fix bugs related to mutation, the null string, and shared substrings.
  3122. ** Fix <dynwind> serialization.
  3123. ** Fix erroneous check in `set-procedure-properties!'.
  3124. ** Fix generalized-vector-{ref,set!} for slices.
  3125. ** Fix error messages involving definition forms.
  3126. ** Fix primitive-eval to return #<unspecified> for definitions.
  3127. ** HTTP: Extend handling of "Cache-Control" header.
  3128. ** HTTP: Fix qstring writing of cache-extension values
  3129. ** HTTP: Fix validators for various list-style headers.
  3130. ** HTTP: Permit non-date values for Expires header.
  3131. ** HTTP: `write-request-line' writes absolute paths, not absolute URIs.
  3132. ** Hack the port-column of current-output-port after printing a prompt.
  3133. ** Make sure `regexp-quote' tests use Unicode-capable string ports.
  3134. ** Peval: Fix bugs in the new optimizer.
  3135. ** Statistically unique marks and labels, for robust hygiene across sessions.
  3136. ** Web: Allow URIs with empty authorities, like "file:///etc/hosts".
  3137. ** `,language' at REPL sets the current-language fluid.
  3138. ** `primitive-load' returns the value(s) of the last expression.
  3139. ** `scm_from_stringn' always returns unique strings.
  3140. ** `scm_i_substring_copy' tries to narrow the substring.
  3141. ** i18n: Fix gc_malloc/free mismatch on non-GNU systems.
  3142. Changes in 2.0.3 (since 2.0.2):
  3143. * Speed improvements
  3144. ** Guile has a new optimizer, `peval'.
  3145. `Peval' is a partial evaluator that performs constant folding, dead code
  3146. elimination, copy propagation, and inlining. By default it runs on
  3147. every piece of code that Guile compiles, to fold computations that can
  3148. happen at compile-time, so they don't have to happen at runtime.
  3149. If we did our job right, the only impact you would see would be your
  3150. programs getting faster. But if you notice slowdowns or bloated code,
  3151. please send a mail to bug-guile@gnu.org with details.
  3152. Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
  3153. peval and its implementation.
  3154. You can see what peval does on a given piece of code by running the new
  3155. `,optimize' REPL meta-command, and comparing it to the output of
  3156. `,expand'. See "Compile Commands" in the manual, for more.
  3157. ** Fewer calls to `stat'.
  3158. Guile now stats only the .go file and the .scm file when loading a fresh
  3159. compiled file.
  3160. * Notable changes
  3161. ** New module: `(web client)', a simple synchronous web client.
  3162. See "Web Client" in the manual, for more.
  3163. ** Users can now install compiled `.go' files.
  3164. See "Installing Site Packages" in the manual.
  3165. ** Remove Front-Cover and Back-Cover text from the manual.
  3166. The manual is still under the GNU Free Documentation License, but no
  3167. longer has any invariant sections.
  3168. ** More helpful `guild help'.
  3169. `guild' is Guile's multi-tool, for use in shell scripting. Now it has a
  3170. nicer interface for querying the set of existing commands, and getting
  3171. help on those commands. Try it out and see!
  3172. ** New macro: `define-syntax-rule'
  3173. `define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
  3174. one clause. See "Syntax Rules" in the manual, for more.
  3175. ** The `,time' REPL meta-command now has more precision.
  3176. The output of this command now has microsecond precision, instead of
  3177. 10-millisecond precision.
  3178. ** `(ice-9 match)' can now match records.
  3179. See "Pattern Matching" in the manual, for more on matching records.
  3180. ** New module: `(language tree-il debug)'.
  3181. This module provides a tree-il verifier. This is useful for people that
  3182. generate tree-il, usually as part of a language compiler.
  3183. ** New functions: `scm_is_exact', `scm_is_inexact'.
  3184. These provide a nice C interface for Scheme's `exact?' and `inexact?',
  3185. respectively.
  3186. * Bugs fixed
  3187. See the git log (or the ChangeLog) for more details on these bugs.
  3188. ** Fix order of importing modules and resolving duplicates handlers.
  3189. ** Fix a number of bugs involving extended (merged) generics.
  3190. ** Fix invocation of merge-generics duplicate handler.
  3191. ** Fix write beyond array end in arrays.c.
  3192. ** Fix read beyond end of hashtable size array in hashtab.c.
  3193. ** (web http): Locale-independent parsing and serialization of dates.
  3194. ** Ensure presence of Host header in HTTP/1.1 requests.
  3195. ** Fix take-right and drop-right for improper lists.
  3196. ** Fix leak in get_current_locale().
  3197. ** Fix recursive define-inlinable expansions.
  3198. ** Check that srfi-1 procedure arguments are procedures.
  3199. ** Fix r6rs `map' for multiple returns.
  3200. ** Fix scm_tmpfile leak on POSIX platforms.
  3201. ** Fix a couple of leaks (objcode->bytecode, make-boot-program).
  3202. ** Fix guile-lib back-compatibility for module-stexi-documentation.
  3203. ** Fix --listen option to allow other ports.
  3204. ** Fix scm_to_latin1_stringn for substrings.
  3205. ** Fix compilation of untyped arrays of rank not 1.
  3206. ** Fix unparse-tree-il of <dynset>.
  3207. ** Fix reading of #||||#.
  3208. ** Fix segfault in GOOPS when class fields are redefined.
  3209. ** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
  3210. Changes in 2.0.2 (since 2.0.1):
  3211. * Notable changes
  3212. ** `guile-tools' renamed to `guild'
  3213. The new name is shorter. Its intended future use is for a CPAN-like
  3214. system for Guile wizards and journeyfolk to band together to share code;
  3215. hence the name. `guile-tools' is provided as a backward-compatible
  3216. symbolic link. See "Using Guile Tools" in the manual, for more.
  3217. ** New control operators: `shift' and `reset'
  3218. See "Shift and Reset" in the manual, for more information.
  3219. ** `while' as an expression
  3220. Previously the return value of `while' was unspecified. Now its
  3221. values are specified both in the case of normal termination, and via
  3222. termination by invoking `break', possibly with arguments. See "while
  3223. do" in the manual for more.
  3224. ** Disallow access to handles of weak hash tables
  3225. `hash-get-handle' and `hash-create-handle!' are no longer permitted to
  3226. be called on weak hash tables, because the fields in a weak handle could
  3227. be nulled out by the garbage collector at any time, but yet they are
  3228. otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
  3229. instead.
  3230. ** More precision for `get-internal-run-time', `get-internal-real-time'
  3231. On 64-bit systems which support POSIX clocks, Guile's internal timing
  3232. procedures offer nanosecond resolution instead of the 10-millisecond
  3233. resolution previously available. 32-bit systems now use 1-millisecond
  3234. timers.
  3235. ** Guile now measures time spent in GC
  3236. `gc-stats' now returns a meaningful value for `gc-time-taken'.
  3237. ** Add `gcprof'
  3238. The statprof profiler now exports a `gcprof' procedure, driven by the
  3239. `after-gc-hook', to see which parts of your program are causing GC. Let
  3240. us know if you find it useful.
  3241. ** `map', `for-each' and some others now implemented in Scheme
  3242. We would not mention this in NEWS, as it is not a user-visible change,
  3243. if it were not for one thing: `map' and `for-each' are no longer
  3244. primitive generics. Instead they are normal bindings, which can be
  3245. wrapped by normal generics. This fixes some modularity issues between
  3246. core `map', SRFI-1 `map', and GOOPS.
  3247. Also it's pretty cool that we can do this without a performance impact.
  3248. ** Add `scm_peek_byte_or_eof'.
  3249. This helper is like `scm_peek_char_or_eof', but for bytes instead of
  3250. full characters.
  3251. ** Implement #:stop-at-first-non-option option for getopt-long
  3252. See "getopt-long Reference" in the manual, for more information.
  3253. ** Improve R6RS conformance for conditions in the I/O libraries
  3254. The `(rnrs io simple)' module now raises the correct R6RS conditions in
  3255. error cases. `(rnrs io ports)' is also more correct now, though it is
  3256. still a work in progress.
  3257. ** All deprecated routines emit warnings
  3258. A few deprecated routines were lacking deprecation warnings. This has
  3259. been fixed now.
  3260. * Speed improvements
  3261. ** Constants in compiled code now share state better
  3262. Constants with shared state, like `("foo")' and `"foo"', now share state
  3263. as much as possible, in the entire compilation unit. This cuts compiled
  3264. `.go' file sizes in half, generally, and speeds startup.
  3265. ** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
  3266. These procedures are now twice as fast as they were.
  3267. ** UTF-8 ports to bypass `iconv' entirely
  3268. This reduces memory usage in a very common case.
  3269. ** Compiler speedups
  3270. The compiler is now about 40% faster. (Note that this is only the case
  3271. once the compiler is itself compiled, so the build still takes as long
  3272. as it did before.)
  3273. ** VM speed tuning
  3274. Some assertions that were mostly useful for sanity-checks on the
  3275. bytecode compiler are now off for both "regular" and "debug" engines.
  3276. This together with a fix to cache a TLS access and some other tweaks
  3277. improve the VM's performance by about 20%.
  3278. ** SRFI-1 list-set optimizations
  3279. lset-adjoin and lset-union now have fast paths for eq? sets.
  3280. ** `memq', `memv' optimizations
  3281. These procedures are now at least twice as fast than in 2.0.1.
  3282. * Deprecations
  3283. ** Deprecate scm_whash API
  3284. `scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
  3285. `SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
  3286. `scm_whash_insert' are now deprecated. Use the normal hash table API
  3287. instead.
  3288. ** Deprecate scm_struct_table
  3289. `SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
  3290. `SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
  3291. `scm_struct_table', and `scm_struct_create_handle' are now deprecated.
  3292. These routines formed part of the internals of the map between structs
  3293. and classes.
  3294. ** Deprecate scm_internal_dynamic_wind
  3295. The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
  3296. as the `scm_dynwind' API is better, and this API encourages users to
  3297. stuff SCM values into pointers.
  3298. ** Deprecate scm_immutable_cell, scm_immutable_double_cell
  3299. These routines are deprecated, as the GC_STUBBORN API doesn't do
  3300. anything any more.
  3301. * Manual updates
  3302. Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
  3303. ports)' documentation from the R6RS documentation. Thanks Andreas!
  3304. * Bugs fixed
  3305. ** Fix double-loading of script in -ds case
  3306. ** -x error message fix
  3307. ** iconveh-related cross-compilation fixes
  3308. ** Fix small integer return value packing on big endian machines.
  3309. ** Fix hash-set! in weak-value table from non-immediate to immediate
  3310. ** Fix call-with-input-file & relatives for multiple values
  3311. ** Fix `hash' for inf and nan
  3312. ** Fix libguile internal type errors caught by typing-strictness==2
  3313. ** Fix compile error in MinGW fstat socket detection
  3314. ** Fix generation of auto-compiled file names on MinGW
  3315. ** Fix multithreaded access to internal hash tables
  3316. ** Emit a 1-based line number in error messages
  3317. ** Fix define-module ordering
  3318. ** Fix several POSIX functions to use the locale encoding
  3319. ** Add type and range checks to the complex generalized vector accessors
  3320. ** Fix unaligned accesses for bytevectors of complex numbers
  3321. ** Fix '(a #{.} b)
  3322. ** Fix erroneous VM stack overflow for canceled threads
  3323. Changes in 2.0.1 (since 2.0.0):
  3324. * Notable changes
  3325. ** guile.m4 supports linking with rpath
  3326. The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
  3327. include appropriate directives to the linker to include libguile-2.0.so
  3328. in the runtime library lookup path.
  3329. ** `begin' expands macros in its body before other expressions
  3330. This enables support for programs like the following:
  3331. (begin
  3332. (define even?
  3333. (lambda (x)
  3334. (or (= x 0) (odd? (- x 1)))))
  3335. (define-syntax odd?
  3336. (syntax-rules ()
  3337. ((odd? x) (not (even? x)))))
  3338. (even? 10))
  3339. ** REPL reader usability enhancements
  3340. The REPL now flushes input after a read error, which should prevent one
  3341. error from causing other errors. The REPL also now interprets comments
  3342. as whitespace.
  3343. ** REPL output has configurable width
  3344. The REPL now defaults to output with the current terminal's width, in
  3345. columns. See "Debug Commands" in the manual for more information on
  3346. the ,width command.
  3347. ** Better C access to the module system
  3348. Guile now has convenient C accessors to look up variables or values in
  3349. modules and their public interfaces. See `scm_c_public_ref' and friends
  3350. in "Accessing Modules from C" in the manual.
  3351. ** Added `scm_call_5', `scm_call_6'
  3352. See "Fly Evaluation" in the manual.
  3353. ** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
  3354. See "Keyword Procedures" in the manual, for more. Note that
  3355. `scm_from_locale_keyword' should not be used when the name is a C string
  3356. constant.
  3357. ** R6RS unicode and string I/O work
  3358. Added efficient implementations of `get-string-n' and `get-string-n!'
  3359. for binary ports. Exported `current-input-port', `current-output-port'
  3360. and `current-error-port' from `(rnrs io ports)', and enhanced support
  3361. for transcoders.
  3362. ** Added `pointer->scm', `scm->pointer' to `(system foreign)'
  3363. These procedure are useful if one needs to pass and receive SCM values
  3364. to and from foreign functions. See "Foreign Variables" in the manual,
  3365. for more.
  3366. ** Added `heap-allocated-since-gc' to `(gc-stats)'
  3367. Also fixed the long-standing bug in the REPL `,stat' command.
  3368. ** Add `on-error' REPL option
  3369. This option controls what happens when an error occurs at the REPL, and
  3370. defaults to `debug', indicating that Guile should enter the debugger.
  3371. Other values include `report', which will simply print a backtrace
  3372. without entering the debugger. See "System Commands" in the manual.
  3373. ** Enforce immutability of string literals
  3374. Attempting to mutate a string literal now causes a runtime error.
  3375. ** Fix pthread redirection
  3376. Guile 2.0.0 shipped with headers that, if configured with pthread
  3377. support, would re-define `pthread_create', `pthread_join', and other API
  3378. to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
  3379. unintended, and not necessary: because threads must enter Guile with
  3380. `scm_with_guile', Guile can handle thread registration itself, without
  3381. needing to make the GC aware of all threads. This oversight has been
  3382. fixed.
  3383. ** `with-continuation-barrier' now unwinds on `quit'
  3384. A throw to `quit' in a continuation barrier will cause Guile to exit.
  3385. Before, it would do so before unwinding to the barrier, which would
  3386. prevent cleanup handlers from running. This has been fixed so that it
  3387. exits only after unwinding.
  3388. ** `string->pointer' and `pointer->string' have optional encoding arg
  3389. This allows users of the FFI to more easily deal in strings with
  3390. particular (non-locale) encodings, like "utf-8". See "Void Pointers and
  3391. Byte Access" in the manual, for more.
  3392. ** R6RS fixnum arithmetic optimizations
  3393. R6RS fixnum operations are are still slower than generic arithmetic,
  3394. however.
  3395. ** New procedure: `define-inlinable'
  3396. See "Inlinable Procedures" in the manual, for more.
  3397. ** New procedure: `exact-integer-sqrt'
  3398. See "Integer Operations" in the manual, for more.
  3399. ** "Extended read syntax" for symbols parses better
  3400. In #{foo}# symbols, backslashes are now treated as escapes, as the
  3401. symbol-printing code intended. Additionally, "\x" within #{foo}# is now
  3402. interpreted as starting an R6RS hex escape. This is backward compatible
  3403. because the symbol printer would never produce a "\x" before. The
  3404. printer also works better too.
  3405. ** Added `--fresh-auto-compile' option
  3406. This allows a user to invalidate the auto-compilation cache. It's
  3407. usually not needed. See "Compilation" in the manual, for a discussion.
  3408. * Manual updates
  3409. ** GOOPS documentation updates
  3410. ** New man page
  3411. Thanks to Mark Harig for improvements to guile.1.
  3412. ** SRFI-23 documented
  3413. The humble `error' SRFI now has an entry in the manual.
  3414. * New modules
  3415. ** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
  3416. ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
  3417. ** `(ice-9 command-line)', not documented yet
  3418. * Bugs fixed
  3419. ** Fixed `iconv_t' memory leak on close-port
  3420. ** Fixed some leaks with weak hash tables
  3421. ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
  3422. ** `after-gc-hook' works again
  3423. ** `define-record-type' now allowed in nested contexts
  3424. ** `exact-integer-sqrt' now handles large integers correctly
  3425. ** Fixed C extension examples in manual
  3426. ** `vhash-delete' honors HASH argument
  3427. ** Make `locale-digit-grouping' more robust
  3428. ** Default exception printer robustness fixes
  3429. ** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
  3430. ** `read' updates line/column numbers when reading SCSH block comments
  3431. ** Fix imports of multiple custom interfaces of same module
  3432. ** Fix encoding scanning for non-seekable ports
  3433. ** Fix `setter' when called with a non-setter generic
  3434. ** Fix f32 and f64 bytevectors to not accept rationals
  3435. ** Fix description of the R6RS `finite?' in manual
  3436. ** Quotient, remainder and modulo accept inexact integers again
  3437. ** Fix `continue' within `while' to take zero arguments
  3438. ** Fix alignment for structures in FFI
  3439. ** Fix port-filename of stdin, stdout, stderr to match the docs
  3440. ** Fix weak hash table-related bug in `define-wrapped-pointer-type'
  3441. ** Fix partial continuation application with pending procedure calls
  3442. ** scm_{to,from}_locale_string use current locale, not current ports
  3443. ** Fix thread cleanup, by using a pthread_key destructor
  3444. ** Fix `quit' at the REPL
  3445. ** Fix a failure to sync regs in vm bytevector ops
  3446. ** Fix (texinfo reflection) to handle nested structures like syntax patterns
  3447. ** Fix stexi->html double translation
  3448. ** Fix tree-il->scheme fix for <prompt>
  3449. ** Fix compilation of <prompt> in <fix> in single-value context
  3450. ** Fix race condition in ensure-writable-dir
  3451. ** Fix error message on ,disassemble "non-procedure"
  3452. ** Fix prompt and abort with the boot evaluator
  3453. ** Fix `procedure->pointer' for functions returning `void'
  3454. ** Fix error reporting in dynamic-pointer
  3455. ** Fix problems detecting coding: in block comments
  3456. ** Fix duplicate load-path and load-compiled-path in compilation environment
  3457. ** Add fallback read(2) suppport for .go files if mmap(2) unavailable
  3458. ** Fix c32vector-set!, c64vector-set!
  3459. ** Fix mistakenly deprecated read syntax for uniform complex vectors
  3460. ** Fix parsing of exact numbers with negative exponents
  3461. ** Ignore SIGPIPE in (system repl server)
  3462. ** Fix optional second arg to R6RS log function
  3463. ** Fix R6RS `assert' to return true value.
  3464. ** Fix fencepost error when seeking in bytevector input ports
  3465. ** Gracefully handle `setlocale' errors when starting the REPL
  3466. ** Improve support of the `--disable-posix' configure option
  3467. ** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
  3468. ** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
  3469. Changes in 2.0.0 (changes since the 1.8.x series):
  3470. * New modules (see the manual for details)
  3471. ** `(srfi srfi-18)', more sophisticated multithreading support
  3472. ** `(srfi srfi-27)', sources of random bits
  3473. ** `(srfi srfi-38)', External Representation for Data With Shared Structure
  3474. ** `(srfi srfi-42)', eager comprehensions
  3475. ** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
  3476. ** `(srfi srfi-67)', compare procedures
  3477. ** `(ice-9 i18n)', internationalization support
  3478. ** `(ice-9 futures)', fine-grain parallelism
  3479. ** `(rnrs bytevectors)', the R6RS bytevector API
  3480. ** `(rnrs io ports)', a subset of the R6RS I/O port API
  3481. ** `(system xref)', a cross-referencing facility (FIXME undocumented)
  3482. ** `(ice-9 vlist)', lists with constant-time random access; hash lists
  3483. ** `(system foreign)', foreign function interface
  3484. ** `(sxml match)', a pattern matcher for SXML
  3485. ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
  3486. ** `(system vm coverage)', a line-by-line code coverage library
  3487. ** `(web uri)', URI data type, parser, and unparser
  3488. ** `(web http)', HTTP header parsers and unparsers
  3489. ** `(web request)', HTTP request data type, reader, and writer
  3490. ** `(web response)', HTTP response data type, reader, and writer
  3491. ** `(web server)', Generic HTTP server
  3492. ** `(ice-9 poll)', a poll wrapper
  3493. ** `(web server http)', HTTP-over-TCP web server implementation
  3494. ** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
  3495. Guile's copy of Andrew K. Wright's `match' library has been replaced by
  3496. a compatible hygienic implementation by Alex Shinn. It is now
  3497. documented, see "Pattern Matching" in the manual.
  3498. Compared to Andrew K. Wright's `match', the new `match' lacks
  3499. `match-define', `match:error-control', `match:set-error-control',
  3500. `match:error', `match:set-error', and all structure-related procedures.
  3501. ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
  3502. The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
  3503. toolkit from Guile-Lib have been imported into Guile proper. See
  3504. "Standard Library" in the manual for more details.
  3505. ** Integration of lalr-scm, a parser generator
  3506. Guile has included Dominique Boucher's fine `lalr-scm' parser generator
  3507. as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
  3508. information.
  3509. * Changes to the stand-alone interpreter
  3510. ** Guile now can compile Scheme to bytecode for a custom virtual machine.
  3511. Compiled code loads much faster than Scheme source code, and runs around
  3512. 3 or 4 times as fast, generating much less garbage in the process.
  3513. ** Evaluating Scheme code does not use the C stack.
  3514. Besides when compiling Guile itself, Guile no longer uses a recursive C
  3515. function as an evaluator. This obviates the need to check the C stack
  3516. pointer for overflow. Continuations still capture the C stack, however.
  3517. ** New environment variables: GUILE_LOAD_COMPILED_PATH,
  3518. GUILE_SYSTEM_LOAD_COMPILED_PATH
  3519. GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
  3520. for source files. It is a different path, however, because compiled
  3521. files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
  3522. GUILE_SYSTEM_PATH.
  3523. ** New read-eval-print loop (REPL) implementation
  3524. Running Guile with no arguments drops the user into the new REPL. See
  3525. "Using Guile Interactively" in the manual, for more information.
  3526. ** Remove old Emacs interface
  3527. Guile had an unused `--emacs' command line argument that was supposed to
  3528. help when running Guile inside Emacs. This option has been removed, and
  3529. the helper functions `named-module-use!' and `load-emacs-interface' have
  3530. been deprecated.
  3531. ** Add `(system repl server)' module and `--listen' command-line argument
  3532. The `(system repl server)' module exposes procedures to listen on
  3533. sockets for connections, and serve REPLs to those clients. The --listen
  3534. command-line argument allows any Guile program to thus be remotely
  3535. debuggable.
  3536. See "Invoking Guile" for more information on `--listen'.
  3537. ** Command line additions
  3538. The guile binary now supports a new switch "-x", which can be used to
  3539. extend the list of filename extensions tried when loading files
  3540. (%load-extensions).
  3541. ** New reader options: `square-brackets', `r6rs-hex-escapes',
  3542. `hungry-eol-escapes'
  3543. The reader supports a new option (changeable via `read-options'),
  3544. `square-brackets', which instructs it to interpret square brackets as
  3545. parentheses. This option is on by default.
  3546. When the new `r6rs-hex-escapes' reader option is enabled, the reader
  3547. will recognize string escape sequences as defined in R6RS. R6RS string
  3548. escape sequences are incompatible with Guile's existing escapes, though,
  3549. so this option is off by default.
  3550. Additionally, Guile follows the R6RS newline escaping rules when the
  3551. `hungry-eol-escapes' option is enabled.
  3552. See "String Syntax" in the manual, for more information.
  3553. ** Function profiling and tracing at the REPL
  3554. The `,profile FORM' REPL meta-command can now be used to statistically
  3555. profile execution of a form, to see which functions are taking the most
  3556. time. See `,help profile' for more information.
  3557. Similarly, `,trace FORM' traces all function applications that occur
  3558. during the execution of `FORM'. See `,help trace' for more information.
  3559. ** Recursive debugging REPL on error
  3560. When Guile sees an error at the REPL, instead of saving the stack, Guile
  3561. will directly enter a recursive REPL in the dynamic context of the
  3562. error. See "Error Handling" in the manual, for more information.
  3563. A recursive REPL is the same as any other REPL, except that it
  3564. has been augmented with debugging information, so that one can inspect
  3565. the context of the error. The debugger has been integrated with the REPL
  3566. via a set of debugging meta-commands.
  3567. For example, one may access a backtrace with `,backtrace' (or
  3568. `,bt'). See "Interactive Debugging" in the manual, for more
  3569. information.
  3570. ** New `guile-tools' commands: `compile', `disassemble'
  3571. Pass the `--help' command-line option to these commands for more
  3572. information.
  3573. ** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
  3574. Users may now install Guile to nonstandard prefixes and just run
  3575. `/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
  3576. include `/path/to/lib'.
  3577. ** Guile's Emacs integration is now more keyboard-friendly
  3578. Backtraces may now be disclosed with the keyboard in addition to the
  3579. mouse.
  3580. ** Load path change: search in version-specific paths before site paths
  3581. When looking for a module, Guile now searches first in Guile's
  3582. version-specific path (the library path), *then* in the site dir. This
  3583. allows Guile's copy of SSAX to override any Guile-Lib copy the user has
  3584. installed. Also it should cut the number of `stat' system calls by half,
  3585. in the common case.
  3586. ** Value history in the REPL on by default
  3587. By default, the REPL will save computed values in variables like `$1',
  3588. `$2', and the like. There are programmatic and interactive interfaces to
  3589. control this. See "Value History" in the manual, for more information.
  3590. ** Readline tab completion for arguments
  3591. When readline is enabled, tab completion works for arguments too, not
  3592. just for the operator position.
  3593. ** Expression-oriented readline history
  3594. Guile's readline history now tries to operate on expressions instead of
  3595. input lines. Let us know what you think!
  3596. ** Interactive Guile follows GNU conventions
  3597. As recommended by the GPL, Guile now shows a brief copyright and
  3598. warranty disclaimer on startup, along with pointers to more information.
  3599. * Changes to Scheme functions and syntax
  3600. ** Support for R6RS libraries
  3601. The `library' and `import' forms from the latest Scheme report have been
  3602. added to Guile, in such a way that R6RS libraries share a namespace with
  3603. Guile modules. R6RS modules may import Guile modules, and are available
  3604. for Guile modules to import via use-modules and all the rest. See "R6RS
  3605. Libraries" in the manual for more information.
  3606. ** Implementations of R6RS libraries
  3607. Guile now has implementations for all of the libraries defined in the
  3608. R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
  3609. Standard Libraries" in the manual for a full list of libraries.
  3610. ** Partial R6RS compatibility
  3611. Guile now has enough support for R6RS to run a reasonably large subset
  3612. of R6RS programs.
  3613. Guile is not fully R6RS compatible. Many incompatibilities are simply
  3614. bugs, though some parts of Guile will remain R6RS-incompatible for the
  3615. foreseeable future. See "R6RS Incompatibilities" in the manual, for more
  3616. information.
  3617. Please contact bug-guile@gnu.org if you have found an issue not
  3618. mentioned in that compatibility list.
  3619. ** New implementation of `primitive-eval'
  3620. Guile's `primitive-eval' is now implemented in Scheme. Actually there is
  3621. still a C evaluator, used when building a fresh Guile to interpret the
  3622. compiler, so we can compile eval.scm. Thereafter all calls to
  3623. primitive-eval are implemented by VM-compiled code.
  3624. This allows all of Guile's procedures, be they interpreted or compiled,
  3625. to execute on the same stack, unifying multiple-value return semantics,
  3626. providing for proper tail recursion between interpreted and compiled
  3627. code, and simplifying debugging.
  3628. As part of this change, the evaluator no longer mutates the internal
  3629. representation of the code being evaluated in a thread-unsafe manner.
  3630. There are two negative aspects of this change, however. First, Guile
  3631. takes a lot longer to compile now. Also, there is less debugging
  3632. information available for debugging interpreted code. We hope to improve
  3633. both of these situations.
  3634. There are many changes to the internal C evalator interface, but all
  3635. public interfaces should be the same. See the ChangeLog for details. If
  3636. we have inadvertantly changed an interface that you were using, please
  3637. contact bug-guile@gnu.org.
  3638. ** Procedure removed: `the-environment'
  3639. This procedure was part of the interpreter's execution model, and does
  3640. not apply to the compiler.
  3641. ** No more `local-eval'
  3642. `local-eval' used to exist so that one could evaluate code in the
  3643. lexical context of a function. Since there is no way to get the lexical
  3644. environment any more, as that concept has no meaning for the compiler,
  3645. and a different meaning for the interpreter, we have removed the
  3646. function.
  3647. If you think you need `local-eval', you should probably implement your
  3648. own metacircular evaluator. It will probably be as fast as Guile's
  3649. anyway.
  3650. ** Scheme source files will now be compiled automatically.
  3651. If a compiled .go file corresponding to a .scm file is not found or is
  3652. not fresh, the .scm file will be compiled on the fly, and the resulting
  3653. .go file stored away. An advisory note will be printed on the console.
  3654. Note that this mechanism depends on the timestamp of the .go file being
  3655. newer than that of the .scm file; if the .scm or .go files are moved
  3656. after installation, care should be taken to preserve their original
  3657. timestamps.
  3658. Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
  3659. directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
  3660. will be created if needed.
  3661. To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
  3662. variable to 0, or pass --no-auto-compile on the Guile command line.
  3663. ** New POSIX procedures: `getrlimit' and `setrlimit'
  3664. Note however that the interface of these functions is likely to change
  3665. in the next prerelease.
  3666. ** New POSIX procedure: `getsid'
  3667. Scheme binding for the `getsid' C library call.
  3668. ** New POSIX procedure: `getaddrinfo'
  3669. Scheme binding for the `getaddrinfo' C library function.
  3670. ** Multicast socket options
  3671. Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
  3672. options. See "Network Sockets and Communication" in the manual, for
  3673. more information.
  3674. ** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
  3675. These socket procedures now take bytevectors as arguments, instead of
  3676. strings. There is some deprecated string support, however.
  3677. ** New GNU procedures: `setaffinity' and `getaffinity'.
  3678. See "Processes" in the manual, for more information.
  3679. ** New procedures: `compose', `negate', and `const'
  3680. See "Higher-Order Functions" in the manual, for more information.
  3681. ** New procedure in `(oops goops)': `method-formals'
  3682. ** New procedures in (ice-9 session): `add-value-help-handler!',
  3683. `remove-value-help-handler!', `add-name-help-handler!'
  3684. `remove-name-help-handler!', `procedure-arguments'
  3685. The value and name help handlers provide some minimal extensibility to
  3686. the help interface. Guile-lib's `(texinfo reflection)' uses them, for
  3687. example, to make stexinfo help documentation available. See those
  3688. procedures' docstrings for more information.
  3689. `procedure-arguments' describes the arguments that a procedure can take,
  3690. combining arity and formals. For example:
  3691. (procedure-arguments resolve-interface)
  3692. => ((required . (name)) (rest . args))
  3693. Additionally, `module-commentary' is now publically exported from
  3694. `(ice-9 session).
  3695. ** Removed: `procedure->memoizing-macro', `procedure->syntax'
  3696. These procedures created primitive fexprs for the old evaluator, and are
  3697. no longer supported. If you feel that you need these functions, you
  3698. probably need to write your own metacircular evaluator (which will
  3699. probably be as fast as Guile's, anyway).
  3700. ** New language: ECMAScript
  3701. Guile now ships with one other high-level language supported,
  3702. ECMAScript. The goal is to support all of version 3.1 of the standard,
  3703. but not all of the libraries are there yet. This support is not yet
  3704. documented; ask on the mailing list if you are interested.
  3705. ** New language: Brainfuck
  3706. Brainfuck is a toy language that closely models Turing machines. Guile's
  3707. brainfuck compiler is meant to be an example of implementing other
  3708. languages. See the manual for details, or
  3709. http://en.wikipedia.org/wiki/Brainfuck for more information about the
  3710. Brainfuck language itself.
  3711. ** New language: Elisp
  3712. Guile now has an experimental Emacs Lisp compiler and runtime. You can
  3713. now switch to Elisp at the repl: `,language elisp'. All kudos to Daniel
  3714. Kraft and Brian Templeton, and all bugs to bug-guile@gnu.org.
  3715. ** Better documentation infrastructure for macros
  3716. It is now possible to introspect on the type of a macro, e.g.
  3717. syntax-rules, identifier-syntax, etc, and extract information about that
  3718. macro, such as the syntax-rules patterns or the defmacro arguments.
  3719. `(texinfo reflection)' takes advantage of this to give better macro
  3720. documentation.
  3721. ** Support for arbitrary procedure metadata
  3722. Building on its support for docstrings, Guile now supports multiple
  3723. docstrings, adding them to the tail of a compiled procedure's
  3724. properties. For example:
  3725. (define (foo)
  3726. "one"
  3727. "two"
  3728. 3)
  3729. (procedure-properties foo)
  3730. => ((name . foo) (documentation . "one") (documentation . "two"))
  3731. Also, vectors of pairs are now treated as additional metadata entries:
  3732. (define (bar)
  3733. #((quz . #f) (docstring . "xyzzy"))
  3734. 3)
  3735. (procedure-properties bar)
  3736. => ((name . bar) (quz . #f) (docstring . "xyzzy"))
  3737. This allows arbitrary literals to be embedded as metadata in a compiled
  3738. procedure.
  3739. ** The psyntax expander now knows how to interpret the @ and @@ special
  3740. forms.
  3741. ** The psyntax expander is now hygienic with respect to modules.
  3742. Free variables in a macro are scoped in the module that the macro was
  3743. defined in, not in the module the macro is used in. For example, code
  3744. like this works now:
  3745. (define-module (foo) #:export (bar))
  3746. (define (helper x) ...)
  3747. (define-syntax bar
  3748. (syntax-rules () ((_ x) (helper x))))
  3749. (define-module (baz) #:use-module (foo))
  3750. (bar qux)
  3751. It used to be you had to export `helper' from `(foo)' as well.
  3752. Thankfully, this has been fixed.
  3753. ** Support for version information in Guile's `module' form
  3754. Guile modules now have a `#:version' field. See "R6RS Version
  3755. References", "General Information about Modules", "Using Guile Modules",
  3756. and "Creating Guile Modules" in the manual for more information.
  3757. ** Support for renaming bindings on module export
  3758. Wherever Guile accepts a symbol as an argument to specify a binding to
  3759. export, it now also accepts a pair of symbols, indicating that a binding
  3760. should be renamed on export. See "Creating Guile Modules" in the manual
  3761. for more information.
  3762. ** New procedure: `module-export-all!'
  3763. This procedure exports all current and future bindings from a module.
  3764. Use as `(module-export-all! (current-module))'.
  3765. ** New procedure `reload-module', and `,reload' REPL command
  3766. See "Module System Reflection" and "Module Commands" in the manual, for
  3767. more information.
  3768. ** `eval-case' has been deprecated, and replaced by `eval-when'.
  3769. The semantics of `eval-when' are easier to understand. See "Eval When"
  3770. in the manual, for more information.
  3771. ** Guile is now more strict about prohibiting definitions in expression
  3772. contexts.
  3773. Although previous versions of Guile accepted it, the following
  3774. expression is not valid, in R5RS or R6RS:
  3775. (if test (define foo 'bar) (define foo 'baz))
  3776. In this specific case, it would be better to do:
  3777. (define foo (if test 'bar 'baz))
  3778. It is possible to circumvent this restriction with e.g.
  3779. `(module-define! (current-module) 'foo 'baz)'. Contact the list if you
  3780. have any questions.
  3781. ** Support for `letrec*'
  3782. Guile now supports `letrec*', a recursive lexical binding operator in
  3783. which the identifiers are bound in order. See "Local Bindings" in the
  3784. manual, for more details.
  3785. ** Internal definitions now expand to `letrec*'
  3786. Following the R6RS, internal definitions now expand to letrec* instead
  3787. of letrec. The following program is invalid for R5RS, but valid for
  3788. R6RS:
  3789. (define (foo)
  3790. (define bar 10)
  3791. (define baz (+ bar 20))
  3792. baz)
  3793. ;; R5RS and Guile <= 1.8:
  3794. (foo) => Unbound variable: bar
  3795. ;; R6RS and Guile >= 2.0:
  3796. (foo) => 30
  3797. This change should not affect correct R5RS programs, or programs written
  3798. in earlier Guile dialects.
  3799. ** Macro expansion produces structures instead of s-expressions
  3800. In the olden days, macroexpanding an s-expression would yield another
  3801. s-expression. Though the lexical variables were renamed, expansions of
  3802. core forms like `if' and `begin' were still non-hygienic, as they relied
  3803. on the toplevel definitions of `if' et al being the conventional ones.
  3804. The solution is to expand to structures instead of s-expressions. There
  3805. is an `if' structure, a `begin' structure, a `toplevel-ref' structure,
  3806. etc. The expander already did this for compilation, producing Tree-IL
  3807. directly; it has been changed now to do so when expanding for the
  3808. evaluator as well.
  3809. ** Defmacros must now produce valid Scheme expressions.
  3810. It used to be that defmacros could unquote in Scheme values, as a way of
  3811. supporting partial evaluation, and avoiding some hygiene issues. For
  3812. example:
  3813. (define (helper x) ...)
  3814. (define-macro (foo bar)
  3815. `(,helper ,bar))
  3816. Assuming this macro is in the `(baz)' module, the direct translation of
  3817. this code would be:
  3818. (define (helper x) ...)
  3819. (define-macro (foo bar)
  3820. `((@@ (baz) helper) ,bar))
  3821. Of course, one could just use a hygienic macro instead:
  3822. (define-syntax foo
  3823. (syntax-rules ()
  3824. ((_ bar) (helper bar))))
  3825. ** Guile's psyntax now supports docstrings and internal definitions.
  3826. The following Scheme is not strictly legal:
  3827. (define (foo)
  3828. "bar"
  3829. (define (baz) ...)
  3830. (baz))
  3831. However its intent is fairly clear. Guile interprets "bar" to be the
  3832. docstring of `foo', and the definition of `baz' is still in definition
  3833. context.
  3834. ** Support for settable identifier syntax
  3835. Following the R6RS, "variable transformers" are settable
  3836. identifier-syntax. See "Identifier macros" in the manual, for more
  3837. information.
  3838. ** syntax-case treats `_' as a placeholder
  3839. Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
  3840. anything, and binds no pattern variables. Unlike the R6RS, Guile also
  3841. permits `_' to be in the literals list for a pattern.
  3842. ** Macros need to be defined before their first use.
  3843. It used to be that with lazy memoization, this might work:
  3844. (define (foo x)
  3845. (ref x))
  3846. (define-macro (ref x) x)
  3847. (foo 1) => 1
  3848. But now, the body of `foo' is interpreted to mean a call to the toplevel
  3849. `ref' function, instead of a macro expansion. The solution is to define
  3850. macros before code that uses them.
  3851. ** Functions needed by macros at expand-time need to be present at
  3852. expand-time.
  3853. For example, this code will work at the REPL:
  3854. (define (double-helper x) (* x x))
  3855. (define-macro (double-literal x) (double-helper x))
  3856. (double-literal 2) => 4
  3857. But it will not work when a file is compiled, because the definition of
  3858. `double-helper' is not present at expand-time. The solution is to wrap
  3859. the definition of `double-helper' in `eval-when':
  3860. (eval-when (load compile eval)
  3861. (define (double-helper x) (* x x)))
  3862. (define-macro (double-literal x) (double-helper x))
  3863. (double-literal 2) => 4
  3864. See the documentation for eval-when for more information.
  3865. ** `macroexpand' produces structures, not S-expressions.
  3866. Given the need to maintain referential transparency, both lexically and
  3867. modular, the result of expanding Scheme expressions is no longer itself
  3868. an s-expression. If you want a human-readable approximation of the
  3869. result of `macroexpand', call `tree-il->scheme' from `(language
  3870. tree-il)'.
  3871. ** Removed function: `macroexpand-1'
  3872. It is unclear how to implement `macroexpand-1' with syntax-case, though
  3873. PLT Scheme does prove that it is possible.
  3874. ** New reader macros: #' #` #, #,@
  3875. These macros translate, respectively, to `syntax', `quasisyntax',
  3876. `unsyntax', and `unsyntax-splicing'. See the R6RS for more information.
  3877. These reader macros may be overridden by `read-hash-extend'.
  3878. ** Incompatible change to #'
  3879. Guile did have a #' hash-extension, by default, which just returned the
  3880. subsequent datum: #'foo => foo. In the unlikely event that anyone
  3881. actually used this, this behavior may be reinstated via the
  3882. `read-hash-extend' mechanism.
  3883. ** `unquote' and `unquote-splicing' accept multiple expressions
  3884. As per the R6RS, these syntax operators can now accept any number of
  3885. expressions to unquote.
  3886. ** Scheme expresssions may be commented out with #;
  3887. #; comments out an entire expression. See SRFI-62 or the R6RS for more
  3888. information.
  3889. ** Prompts: Delimited, composable continuations
  3890. Guile now has prompts as part of its primitive language. See "Prompts"
  3891. in the manual, for more information.
  3892. Expressions entered in at the REPL, or from the command line, are
  3893. surrounded by a prompt with the default prompt tag.
  3894. ** `make-stack' with a tail-called procedural narrowing argument no longer
  3895. works (with compiled procedures)
  3896. It used to be the case that a captured stack could be narrowed to select
  3897. calls only up to or from a certain procedure, even if that procedure
  3898. already tail-called another procedure. This was because the debug
  3899. information from the original procedure was kept on the stack.
  3900. Now with the new compiler, the stack only contains active frames from
  3901. the current continuation. A narrow to a procedure that is not in the
  3902. stack will result in an empty stack. To fix this, narrow to a procedure
  3903. that is active in the current continuation, or narrow to a specific
  3904. number of stack frames.
  3905. ** Backtraces through compiled procedures only show procedures that are
  3906. active in the current continuation
  3907. Similarly to the previous issue, backtraces in compiled code may be
  3908. different from backtraces in interpreted code. There are no semantic
  3909. differences, however. Please mail bug-guile@gnu.org if you see any
  3910. deficiencies with Guile's backtraces.
  3911. ** `positions' reader option enabled by default
  3912. This change allows primitive-load without --auto-compile to also
  3913. propagate source information through the expander, for better errors and
  3914. to let macros know their source locations. The compiler was already
  3915. turning it on anyway.
  3916. ** New macro: `current-source-location'
  3917. The macro returns the current source location (to be documented).
  3918. ** syntax-rules and syntax-case macros now propagate source information
  3919. through to the expanded code
  3920. This should result in better backtraces.
  3921. ** The currying behavior of `define' has been removed.
  3922. Before, `(define ((f a) b) (* a b))' would translate to
  3923. (define f (lambda (a) (lambda (b) (* a b))))
  3924. Now a syntax error is signaled, as this syntax is not supported by
  3925. default. Use the `(ice-9 curried-definitions)' module to get back the
  3926. old behavior.
  3927. ** New procedure, `define!'
  3928. `define!' is a procedure that takes two arguments, a symbol and a value,
  3929. and binds the value to the symbol in the current module. It's useful to
  3930. programmatically make definitions in the current module, and is slightly
  3931. less verbose than `module-define!'.
  3932. ** All modules have names now
  3933. Before, you could have anonymous modules: modules without names. Now,
  3934. because of hygiene and macros, all modules have names. If a module was
  3935. created without a name, the first time `module-name' is called on it, a
  3936. fresh name will be lazily generated for it.
  3937. ** The module namespace is now separate from the value namespace
  3938. It was a little-known implementation detail of Guile's module system
  3939. that it was built on a single hierarchical namespace of values -- that
  3940. if there was a module named `(foo bar)', then in the module named
  3941. `(foo)' there was a binding from `bar' to the `(foo bar)' module.
  3942. This was a neat trick, but presented a number of problems. One problem
  3943. was that the bindings in a module were not apparent from the module
  3944. itself; perhaps the `(foo)' module had a private binding for `bar', and
  3945. then an external contributor defined `(foo bar)'. In the end there can
  3946. be only one binding, so one of the two will see the wrong thing, and
  3947. produce an obtuse error of unclear provenance.
  3948. Also, the public interface of a module was also bound in the value
  3949. namespace, as `%module-public-interface'. This was a hack from the early
  3950. days of Guile's modules.
  3951. Both of these warts have been fixed by the addition of fields in the
  3952. `module' data type. Access to modules and their interfaces from the
  3953. value namespace has been deprecated, and all accessors use the new
  3954. record accessors appropriately.
  3955. When Guile is built with support for deprecated code, as is the default,
  3956. the value namespace is still searched for modules and public interfaces,
  3957. and a deprecation warning is raised as appropriate.
  3958. Finally, to support lazy loading of modules as one used to be able to do
  3959. with module binder procedures, Guile now has submodule binders, called
  3960. if a given submodule is not found. See boot-9.scm for more information.
  3961. ** New procedures: module-ref-submodule, module-define-submodule,
  3962. nested-ref-module, nested-define-module!, local-ref-module,
  3963. local-define-module
  3964. These new accessors are like their bare variants, but operate on
  3965. namespaces instead of values.
  3966. ** The (app modules) module tree is officially deprecated
  3967. It used to be that one could access a module named `(foo bar)' via
  3968. `(nested-ref the-root-module '(app modules foo bar))'. The `(app
  3969. modules)' bit was a never-used and never-documented abstraction, and has
  3970. been deprecated. See the following mail for a full discussion:
  3971. http://lists.gnu.org/archive/html/guile-devel/2010-04/msg00168.html
  3972. The `%app' binding is also deprecated.
  3973. ** `module-filename' field and accessor
  3974. Modules now record the file in which they are defined. This field may be
  3975. accessed with the new `module-filename' procedure.
  3976. ** Modules load within a known environment
  3977. It takes a few procedure calls to define a module, and those procedure
  3978. calls need to be in scope. Now we ensure that the current module when
  3979. loading a module is one that has the needed bindings, instead of relying
  3980. on chance.
  3981. ** `load' is a macro (!) that resolves paths relative to source file dir
  3982. The familiar Schem `load' procedure is now a macro that captures the
  3983. name of the source file being expanded, and dispatches to the new
  3984. `load-in-vicinity'. Referencing `load' by bare name returns a closure
  3985. that embeds the current source file name.
  3986. This fix allows `load' of relative paths to be resolved with respect to
  3987. the location of the file that calls `load'.
  3988. ** Many syntax errors have different texts now
  3989. Syntax errors still throw to the `syntax-error' key, but the arguments
  3990. are often different now. Perhaps in the future, Guile will switch to
  3991. using standard SRFI-35 conditions.
  3992. ** Returning multiple values to compiled code will silently truncate the
  3993. values to the expected number
  3994. For example, the interpreter would raise an error evaluating the form,
  3995. `(+ (values 1 2) (values 3 4))', because it would see the operands as
  3996. being two compound "values" objects, to which `+' does not apply.
  3997. The compiler, on the other hand, receives multiple values on the stack,
  3998. not as a compound object. Given that it must check the number of values
  3999. anyway, if too many values are provided for a continuation, it chooses
  4000. to truncate those values, effectively evaluating `(+ 1 3)' instead.
  4001. The idea is that the semantics that the compiler implements is more
  4002. intuitive, and the use of the interpreter will fade out with time.
  4003. This behavior is allowed both by the R5RS and the R6RS.
  4004. ** Multiple values in compiled code are not represented by compound
  4005. objects
  4006. This change may manifest itself in the following situation:
  4007. (let ((val (foo))) (do-something) val)
  4008. In the interpreter, if `foo' returns multiple values, multiple values
  4009. are produced from the `let' expression. In the compiler, those values
  4010. are truncated to the first value, and that first value is returned. In
  4011. the compiler, if `foo' returns no values, an error will be raised, while
  4012. the interpreter would proceed.
  4013. Both of these behaviors are allowed by R5RS and R6RS. The compiler's
  4014. behavior is more correct, however. If you wish to preserve a potentially
  4015. multiply-valued return, you will need to set up a multiple-value
  4016. continuation, using `call-with-values'.
  4017. ** Defmacros are now implemented in terms of syntax-case.
  4018. The practical ramification of this is that the `defmacro?' predicate has
  4019. been removed, along with `defmacro-transformer', `macro-table',
  4020. `xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and
  4021. `defmacro:transformer'. This is because defmacros are simply macros. If
  4022. any of these procedures provided useful facilities to you, we encourage
  4023. you to contact the Guile developers.
  4024. ** Hygienic macros documented as the primary syntactic extension mechanism.
  4025. The macro documentation was finally fleshed out with some documentation
  4026. on `syntax-rules' and `syntax-case' macros, and other parts of the macro
  4027. expansion process. See "Macros" in the manual, for details.
  4028. ** psyntax is now the default expander
  4029. Scheme code is now expanded by default by the psyntax hygienic macro
  4030. expander. Expansion is performed completely before compilation or
  4031. interpretation.
  4032. Notably, syntax errors will be signalled before interpretation begins.
  4033. In the past, many syntax errors were only detected at runtime if the
  4034. code in question was memoized.
  4035. As part of its expansion, psyntax renames all lexically-bound
  4036. identifiers. Original identifier names are preserved and given to the
  4037. compiler, but the interpreter will see the renamed variables, e.g.,
  4038. `x432' instead of `x'.
  4039. Note that the psyntax that Guile uses is a fork, as Guile already had
  4040. modules before incompatible modules were added to psyntax -- about 10
  4041. years ago! Thus there are surely a number of bugs that have been fixed
  4042. in psyntax since then. If you find one, please notify bug-guile@gnu.org.
  4043. ** syntax-rules and syntax-case are available by default.
  4044. There is no longer any need to import the `(ice-9 syncase)' module
  4045. (which is now deprecated). The expander may be invoked directly via
  4046. `macroexpand', though it is normally searched for via the current module
  4047. transformer.
  4048. Also, the helper routines for syntax-case are available in the default
  4049. environment as well: `syntax->datum', `datum->syntax',
  4050. `bound-identifier=?', `free-identifier=?', `generate-temporaries',
  4051. `identifier?', and `syntax-violation'. See the R6RS for documentation.
  4052. ** Tail patterns in syntax-case
  4053. Guile has pulled in some more recent changes from the psyntax portable
  4054. syntax expander, to implement support for "tail patterns". Such patterns
  4055. are supported by syntax-rules and syntax-case. This allows a syntax-case
  4056. match clause to have ellipses, then a pattern at the end. For example:
  4057. (define-syntax case
  4058. (syntax-rules (else)
  4059. ((_ val match-clause ... (else e e* ...))
  4060. [...])))
  4061. Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
  4062. tail pattern for the else clause. Thanks to Andreas Rottmann for the
  4063. patch, and Kent Dybvig for the code.
  4064. ** Lexical bindings introduced by hygienic macros may not be referenced
  4065. by nonhygienic macros.
  4066. If a lexical binding is introduced by a hygienic macro, it may not be
  4067. referenced by a nonhygienic macro. For example, this works:
  4068. (let ()
  4069. (define-macro (bind-x val body)
  4070. `(let ((x ,val)) ,body))
  4071. (define-macro (ref x)
  4072. x)
  4073. (bind-x 10 (ref x)))
  4074. But this does not:
  4075. (let ()
  4076. (define-syntax bind-x
  4077. (syntax-rules ()
  4078. ((_ val body) (let ((x val)) body))))
  4079. (define-macro (ref x)
  4080. x)
  4081. (bind-x 10 (ref x)))
  4082. It is not normal to run into this situation with existing code. However,
  4083. if you have defmacros that expand to hygienic macros, it is possible to
  4084. run into situations like this. For example, if you have a defmacro that
  4085. generates a `while' expression, the `break' bound by the `while' may not
  4086. be visible within other parts of your defmacro. The solution is to port
  4087. from defmacros to syntax-rules or syntax-case.
  4088. ** Macros may no longer be referenced as first-class values.
  4089. In the past, you could evaluate e.g. `if', and get its macro value. Now,
  4090. expanding this form raises a syntax error.
  4091. Macros still /exist/ as first-class values, but they must be
  4092. /referenced/ via the module system, e.g. `(module-ref (current-module)
  4093. 'if)'.
  4094. ** Macros may now have docstrings.
  4095. `object-documentation' from `(ice-9 documentation)' may be used to
  4096. retrieve the docstring, once you have a macro value -- but see the above
  4097. note about first-class macros. Docstrings are associated with the syntax
  4098. transformer procedures.
  4099. ** `case-lambda' is now available in the default environment.
  4100. The binding in the default environment is equivalent to the one from the
  4101. `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
  4102. to maintain compatibility with Guile 1.8 and earlier.
  4103. ** Procedures may now have more than one arity.
  4104. This can be the case, for example, in case-lambda procedures. The
  4105. arities of compiled procedures may be accessed via procedures from the
  4106. `(system vm program)' module; see "Compiled Procedures", "Optional
  4107. Arguments", and "Case-lambda" in the manual.
  4108. ** Deprecate arity access via (procedure-properties proc 'arity)
  4109. Instead of accessing a procedure's arity as a property, use the new
  4110. `procedure-minimum-arity' function, which gives the most permissive
  4111. arity that the function has, in the same format as the old arity
  4112. accessor.
  4113. ** `lambda*' and `define*' are now available in the default environment
  4114. As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
  4115. compatibility purposes. No semantic change has been made (we hope).
  4116. Optional and keyword arguments now dispatch via special VM operations,
  4117. without the need to cons rest arguments, making them very fast.
  4118. ** New syntax: define-once
  4119. `define-once' is like Lisp's `defvar': it creates a toplevel binding,
  4120. but only if one does not exist already.
  4121. ** New function, `truncated-print', with `format' support
  4122. `(ice-9 pretty-print)' now exports `truncated-print', a printer that
  4123. will ensure that the output stays within a certain width, truncating the
  4124. output in what is hopefully an intelligent manner. See the manual for
  4125. more details.
  4126. There is a new `format' specifier, `~@y', for doing a truncated
  4127. print (as opposed to `~y', which does a pretty-print). See the `format'
  4128. documentation for more details.
  4129. ** Better pretty-printing
  4130. Indentation recognizes more special forms, like `syntax-case', and read
  4131. macros like `quote' are printed better.
  4132. ** Passing a number as the destination of `format' is deprecated
  4133. The `format' procedure in `(ice-9 format)' now emits a deprecation
  4134. warning if a number is passed as its first argument.
  4135. Also, it used to be that you could omit passing a port to `format', in
  4136. some cases. This still works, but has been formally deprecated.
  4137. ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
  4138. Guile now implements SRFI-4 vectors using bytevectors. Often when you
  4139. have a numeric vector, you end up wanting to write its bytes somewhere,
  4140. or have access to the underlying bytes, or read in bytes from somewhere
  4141. else. Bytevectors are very good at this sort of thing. But the SRFI-4
  4142. APIs are nicer to use when doing number-crunching, because they are
  4143. addressed by element and not by byte.
  4144. So as a compromise, Guile allows all bytevector functions to operate on
  4145. numeric vectors. They address the underlying bytes in the native
  4146. endianness, as one would expect.
  4147. Following the same reasoning, that it's just bytes underneath, Guile
  4148. also allows uniform vectors of a given type to be accessed as if they
  4149. were of any type. One can fill a u32vector, and access its elements with
  4150. u8vector-ref. One can use f64vector-ref on bytevectors. It's all the
  4151. same to Guile.
  4152. In this way, uniform numeric vectors may be written to and read from
  4153. input/output ports using the procedures that operate on bytevectors.
  4154. Calls to SRFI-4 accessors (ref and set functions) from Scheme are now
  4155. inlined to the VM instructions for bytevector access.
  4156. See "SRFI-4" in the manual, for more information.
  4157. ** Nonstandard SRFI-4 procedures now available from `(srfi srfi-4 gnu)'
  4158. Guile's `(srfi srfi-4)' now only exports those srfi-4 procedures that
  4159. are part of the standard. Complex uniform vectors and the
  4160. `any->FOOvector' family are now available only from `(srfi srfi-4 gnu)'.
  4161. Guile's default environment imports `(srfi srfi-4)', and probably should
  4162. import `(srfi srfi-4 gnu)' as well.
  4163. See "SRFI-4 Extensions" in the manual, for more information.
  4164. ** New syntax: include-from-path.
  4165. `include-from-path' is like `include', except it looks for its file in
  4166. the load path. It can be used to compile other files into a file.
  4167. ** New syntax: quasisyntax.
  4168. `quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
  4169. documentation for more information. Thanks to Andre van Tonder for the
  4170. implementation.
  4171. ** `*unspecified*' is identifier syntax
  4172. `*unspecified*' is no longer a variable, so it is optimized properly by
  4173. the compiler, and is not `set!'-able.
  4174. ** Changes and bugfixes in numerics code
  4175. *** Added six new sets of fast quotient and remainder operators
  4176. Added six new sets of fast quotient and remainder operator pairs with
  4177. different semantics than the R5RS operators. They support not only
  4178. integers, but all reals, including exact rationals and inexact
  4179. floating point numbers.
  4180. These procedures accept two real numbers N and D, where the divisor D
  4181. must be non-zero. Each set of operators computes an integer quotient
  4182. Q and a real remainder R such that N = Q*D + R and |R| < |D|. They
  4183. differ only in how N/D is rounded to produce Q.
  4184. `euclidean-quotient' returns the integer Q and `euclidean-remainder'
  4185. returns the real R such that N = Q*D + R and 0 <= R < |D|. `euclidean/'
  4186. returns both Q and R, and is more efficient than computing each
  4187. separately. Note that when D > 0, `euclidean-quotient' returns
  4188. floor(N/D), and when D < 0 it returns ceiling(N/D).
  4189. `centered-quotient', `centered-remainder', and `centered/' are similar
  4190. except that the range of remainders is -abs(D/2) <= R < abs(D/2), and
  4191. `centered-quotient' rounds N/D to the nearest integer. Note that these
  4192. operators are equivalent to the R6RS integer division operators `div',
  4193. `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.
  4194. `floor-quotient' and `floor-remainder' compute Q and R, respectively,
  4195. where Q has been rounded toward negative infinity. `floor/' returns
  4196. both Q and R, and is more efficient than computing each separately.
  4197. Note that when applied to integers, `floor-remainder' is equivalent to
  4198. the R5RS integer-only `modulo' operator. `ceiling-quotient',
  4199. `ceiling-remainder', and `ceiling/' are similar except that Q is
  4200. rounded toward positive infinity.
  4201. For `truncate-quotient', `truncate-remainder', and `truncate/', Q is
  4202. rounded toward zero. Note that when applied to integers,
  4203. `truncate-quotient' and `truncate-remainder' are equivalent to the
  4204. R5RS integer-only operators `quotient' and `remainder'.
  4205. For `round-quotient', `round-remainder', and `round/', Q is rounded to
  4206. the nearest integer, with ties going to the nearest even integer.
  4207. *** Complex number changes
  4208. Guile is now able to represent non-real complex numbers whose
  4209. imaginary part is an _inexact_ zero (0.0 or -0.0), per R6RS.
  4210. Previously, such numbers were immediately changed into inexact reals.
  4211. (real? 0.0+0.0i) now returns #f, per R6RS, although (zero? 0.0+0.0i)
  4212. still returns #t, per R6RS. (= 0 0.0+0.0i) and (= 0.0 0.0+0.0i) are
  4213. #t, but the same comparisons using `eqv?' or `equal?' are #f.
  4214. Like other non-real numbers, these complex numbers with inexact zero
  4215. imaginary part will raise exceptions is passed to procedures requiring
  4216. reals, such as `<', `>', `<=', `>=', `min', `max', `positive?',
  4217. `negative?', `inf?', `nan?', `finite?', etc.
  4218. **** `make-rectangular' changes
  4219. scm_make_rectangular `make-rectangular' now returns a real number only
  4220. if the imaginary part is an _exact_ 0. Previously, it would return a
  4221. real number if the imaginary part was an inexact zero.
  4222. scm_c_make_rectangular now always returns a non-real complex number,
  4223. even if the imaginary part is zero. Previously, it would return a
  4224. real number if the imaginary part was zero.
  4225. **** `make-polar' changes
  4226. scm_make_polar `make-polar' now returns a real number only if the
  4227. angle or magnitude is an _exact_ 0. If the magnitude is an exact 0,
  4228. it now returns an exact 0. Previously, it would return a real
  4229. number if the imaginary part was an inexact zero.
  4230. scm_c_make_polar now always returns a non-real complex number, even if
  4231. the imaginary part is 0.0. Previously, it would return a real number
  4232. if the imaginary part was 0.0.
  4233. **** `imag-part' changes
  4234. scm_imag_part `imag-part' now returns an exact 0 if applied to an
  4235. inexact real number. Previously it returned an inexact zero in this
  4236. case.
  4237. *** `eqv?' and `equal?' now compare numbers equivalently
  4238. scm_equal_p `equal?' now behaves equivalently to scm_eqv_p `eqv?' for
  4239. numeric values, per R5RS. Previously, equal? worked differently,
  4240. e.g. `(equal? 0.0 -0.0)' returned #t but `(eqv? 0.0 -0.0)' returned #f,
  4241. and `(equal? +nan.0 +nan.0)' returned #f but `(eqv? +nan.0 +nan.0)'
  4242. returned #t.
  4243. *** `(equal? +nan.0 +nan.0)' now returns #t
  4244. Previously, `(equal? +nan.0 +nan.0)' returned #f, although
  4245. `(let ((x +nan.0)) (equal? x x))' and `(eqv? +nan.0 +nan.0)'
  4246. both returned #t. R5RS requires that `equal?' behave like
  4247. `eqv?' when comparing numbers.
  4248. *** Change in handling products `*' involving exact 0
  4249. scm_product `*' now handles exact 0 differently. A product containing
  4250. an exact 0 now returns an exact 0 if and only if the other arguments
  4251. are all exact. An inexact zero is returned if and only if the other
  4252. arguments are all finite but not all exact. If an infinite or NaN
  4253. value is present, a NaN value is returned. Previously, any product
  4254. containing an exact 0 yielded an exact 0, regardless of the other
  4255. arguments.
  4256. *** `expt' and `integer-expt' changes when the base is 0
  4257. While `(expt 0 0)' is still 1, and `(expt 0 N)' for N > 0 is still
  4258. zero, `(expt 0 N)' for N < 0 is now a NaN value, and likewise for
  4259. integer-expt. This is more correct, and conforming to R6RS, but seems
  4260. to be incompatible with R5RS, which would return 0 for all non-zero
  4261. values of N.
  4262. *** `expt' and `integer-expt' are more generic, less strict
  4263. When raising to an exact non-negative integer exponent, `expt' and
  4264. `integer-expt' are now able to exponentiate any object that can be
  4265. multiplied using `*'. They can also raise an object to an exact
  4266. negative integer power if its reciprocal can be taken using `/'.
  4267. In order to allow this, the type of the first argument is no longer
  4268. checked when raising to an exact integer power. If the exponent is 0
  4269. or 1, the first parameter is not manipulated at all, and need not
  4270. even support multiplication.
  4271. *** Infinities are no longer integers, nor rationals
  4272. scm_integer_p `integer?' and scm_rational_p `rational?' now return #f
  4273. for infinities, per R6RS. Previously they returned #t for real
  4274. infinities. The real infinities and NaNs are still considered real by
  4275. scm_real `real?' however, per R6RS.
  4276. *** NaNs are no longer rationals
  4277. scm_rational_p `rational?' now returns #f for NaN values, per R6RS.
  4278. Previously it returned #t for real NaN values. They are still
  4279. considered real by scm_real `real?' however, per R6RS.
  4280. *** `inf?' and `nan?' now throw exceptions for non-reals
  4281. The domain of `inf?' and `nan?' is the real numbers. Guile now signals
  4282. an error when a non-real number or non-number is passed to these
  4283. procedures. (Note that NaNs _are_ considered numbers by scheme, despite
  4284. their name).
  4285. *** `rationalize' bugfixes and changes
  4286. Fixed bugs in scm_rationalize `rationalize'. Previously, it returned
  4287. exact integers unmodified, although that was incorrect if the epsilon
  4288. was at least 1 or inexact, e.g. (rationalize 4 1) should return 3 per
  4289. R5RS and R6RS, but previously it returned 4. It also now handles
  4290. cases involving infinities and NaNs properly, per R6RS.
  4291. *** Trigonometric functions now return exact numbers in some cases
  4292. scm_sin `sin', scm_cos `cos', scm_tan `tan', scm_asin `asin', scm_acos
  4293. `acos', scm_atan `atan', scm_sinh `sinh', scm_cosh `cosh', scm_tanh
  4294. `tanh', scm_sys_asinh `asinh', scm_sys_acosh `acosh', and
  4295. scm_sys_atanh `atanh' now return exact results in some cases.
  4296. *** New procedure: `finite?'
  4297. Add scm_finite_p `finite?' from R6RS to guile core, which returns #t
  4298. if and only if its argument is neither infinite nor a NaN. Note that
  4299. this is not the same as (not (inf? x)) or (not (infinite? x)), since
  4300. NaNs are neither finite nor infinite.
  4301. *** Improved exactness handling for complex number parsing
  4302. When parsing non-real complex numbers, exactness specifiers are now
  4303. applied to each component, as is done in PLT Scheme. For complex
  4304. numbers written in rectangular form, exactness specifiers are applied
  4305. to the real and imaginary parts before calling scm_make_rectangular.
  4306. For complex numbers written in polar form, exactness specifiers are
  4307. applied to the magnitude and angle before calling scm_make_polar.
  4308. Previously, exactness specifiers were applied to the number as a whole
  4309. _after_ calling scm_make_rectangular or scm_make_polar.
  4310. For example, (string->number "#i5.0+0i") now does the equivalent of:
  4311. (make-rectangular (exact->inexact 5.0) (exact->inexact 0))
  4312. which yields 5.0+0.0i. Previously it did the equivalent of:
  4313. (exact->inexact (make-rectangular 5.0 0))
  4314. which yielded 5.0.
  4315. ** Unicode characters
  4316. Unicode characters may be entered in octal format via e.g. `#\454', or
  4317. created via (integer->char 300). A hex external representation will
  4318. probably be introduced at some point.
  4319. ** Unicode strings
  4320. Internally, strings are now represented either in the `latin-1'
  4321. encoding, one byte per character, or in UTF-32, with four bytes per
  4322. character. Strings manage their own allocation, switching if needed.
  4323. Extended characters may be written in a literal string using the
  4324. hexadecimal escapes `\xXX', `\uXXXX', or `\UXXXXXX', for 8-bit, 16-bit,
  4325. or 24-bit codepoints, respectively, or entered directly in the native
  4326. encoding of the port on which the string is read.
  4327. ** Unicode symbols
  4328. One may now use U+03BB (GREEK SMALL LETTER LAMBDA) as an identifier.
  4329. ** Support for non-ASCII source code files
  4330. The default reader now handles source code files for some of the
  4331. non-ASCII character encodings, such as UTF-8. A non-ASCII source file
  4332. should have an encoding declaration near the top of the file. Also,
  4333. there is a new function, `file-encoding', that scans a port for a coding
  4334. declaration. See the section of the manual entitled, "Character Encoding
  4335. of Source Files".
  4336. The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
  4337. code. This use is now discouraged. Binary input and output is
  4338. currently supported by opening ports in the ISO-8859-1 locale.
  4339. ** Source files default to UTF-8.
  4340. If source files do not specify their encoding via a `coding:' block,
  4341. the default encoding is UTF-8, instead of being taken from the current
  4342. locale.
  4343. ** Interactive Guile installs the current locale.
  4344. Instead of leaving the user in the "C" locale, running the Guile REPL
  4345. installs the current locale. [FIXME xref?]
  4346. ** Support for locale transcoding when reading from and writing to ports
  4347. Ports now have an associated character encoding, and port read and write
  4348. operations do conversion to and from locales automatically. Ports also
  4349. have an associated strategy for how to deal with locale conversion
  4350. failures.
  4351. See the documentation in the manual for the four new support functions,
  4352. `set-port-encoding!', `port-encoding', `set-port-conversion-strategy!',
  4353. and `port-conversion-strategy'.
  4354. ** String and SRFI-13 functions can operate on Unicode strings
  4355. ** Unicode support for SRFI-14 character sets
  4356. The default character sets are no longer locale dependent and contain
  4357. characters from the whole Unicode range. There is a new predefined
  4358. character set, `char-set:designated', which contains all assigned
  4359. Unicode characters. There is a new debugging function, `%char-set-dump'.
  4360. ** Character functions operate on Unicode characters
  4361. `char-upcase' and `char-downcase' use default Unicode casing rules.
  4362. Character comparisons such as `char<?' and `char-ci<?' now sort based on
  4363. Unicode code points.
  4364. ** Global variables `scm_charnames' and `scm_charnums' are removed
  4365. These variables contained the names of control characters and were
  4366. used when writing characters. While these were global, they were
  4367. never intended to be public API. They have been replaced with private
  4368. functions.
  4369. ** EBCDIC support is removed
  4370. There was an EBCDIC compile flag that altered some of the character
  4371. processing. It appeared that full EBCDIC support was never completed
  4372. and was unmaintained.
  4373. ** Compile-time warnings
  4374. Guile can warn about potentially unbound free variables. Pass the
  4375. -Wunbound-variable on the `guile-tools compile' command line, or add
  4376. `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
  4377. invocation. Warnings are also enabled by default for expressions entered
  4378. at the REPL.
  4379. Guile can also warn when you pass the wrong number of arguments to a
  4380. procedure, with -Warity-mismatch, or `arity-mismatch' in the
  4381. `#:warnings' as above.
  4382. Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
  4383. warn about unused local or global (top-level) variables, and `-Wformat',
  4384. to check for various errors related to the `format' procedure.
  4385. ** A new `memoize-symbol' evaluator trap has been added.
  4386. This trap can be used for efficiently implementing a Scheme code
  4387. coverage.
  4388. ** Duplicate bindings among used modules are resolved lazily.
  4389. This slightly improves program startup times.
  4390. ** New thread cancellation and thread cleanup API
  4391. See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
  4392. ** New threads are in `(guile-user)' by default, not `(guile)'
  4393. It used to be that a new thread entering Guile would do so in the
  4394. `(guile)' module, unless this was the first time Guile was initialized,
  4395. in which case it was `(guile-user)'. This has been fixed to have all
  4396. new threads unknown to Guile default to `(guile-user)'.
  4397. ** New helpers: `print-exception', `set-exception-printer!'
  4398. These functions implement an extensible exception printer. Guile
  4399. registers printers for all of the exceptions it throws. Users may add
  4400. their own printers. There is also `scm_print_exception', for use by C
  4401. programs. Pleasantly, this allows SRFI-35 and R6RS exceptions to be
  4402. printed appropriately.
  4403. ** GOOPS dispatch in scheme
  4404. As an implementation detail, GOOPS dispatch is no longer implemented by
  4405. special evaluator bytecodes, but rather directly via a Scheme function
  4406. associated with an applicable struct. There is some VM support for the
  4407. underlying primitives, like `class-of'.
  4408. This change will in the future allow users to customize generic function
  4409. dispatch without incurring a performance penalty, and allow us to
  4410. implement method combinations.
  4411. ** Applicable struct support
  4412. One may now make structs from Scheme that may be applied as procedures.
  4413. To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
  4414. That struct will be the vtable of your applicable structs; instances of
  4415. that new struct are assumed to have the procedure in their first slot.
  4416. `<applicable-struct-vtable>' is like Common Lisp's
  4417. `funcallable-standard-class'. Likewise there is
  4418. `<applicable-struct-with-setter-vtable>', which looks for the setter in
  4419. the second slot. This needs to be better documented.
  4420. ** GOOPS cleanups.
  4421. GOOPS had a number of concepts that were relevant to the days of Tcl,
  4422. but not any more: operators and entities, mainly. These objects were
  4423. never documented, and it is unlikely that they were ever used. Operators
  4424. were a kind of generic specific to the Tcl support. Entities were
  4425. replaced by applicable structs, mentioned above.
  4426. ** New struct slot allocation: "hidden"
  4427. A hidden slot is readable and writable, but will not be initialized by a
  4428. call to make-struct. For example in your layout you would say "ph"
  4429. instead of "pw". Hidden slots are useful for adding new slots to a
  4430. vtable without breaking existing invocations to make-struct.
  4431. ** eqv? not a generic
  4432. One used to be able to extend `eqv?' as a primitive-generic, but no
  4433. more. Because `eqv?' is in the expansion of `case' (via `memv'), which
  4434. should be able to compile to static dispatch tables, it doesn't make
  4435. sense to allow extensions that would subvert this optimization.
  4436. ** `inet-ntop' and `inet-pton' are always available.
  4437. Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
  4438. there is no more need to use `inet-aton'/`inet-ntoa'. The latter
  4439. functions are deprecated.
  4440. ** `getopt-long' parsing errors throw to `quit', not `misc-error'
  4441. This change should inhibit backtraces on argument parsing errors.
  4442. `getopt-long' has been modified to print out the error that it throws
  4443. itself.
  4444. ** New primitive: `tmpfile'.
  4445. See "File System" in the manual.
  4446. ** Random generator state may be serialized to a datum
  4447. `random-state->datum' will serialize a random state to a datum, which
  4448. may be written out, read back in later, and revivified using
  4449. `datum->random-state'. See "Random" in the manual, for more details.
  4450. ** Fix random number generator on 64-bit platforms
  4451. There was a nasty bug on 64-bit platforms in which asking for a random
  4452. integer with a range between 2**32 and 2**64 caused a segfault. After
  4453. many embarrassing iterations, this was fixed.
  4454. ** Fast bit operations.
  4455. The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
  4456. have dedicated bytecodes. Guile is not just for symbolic computation,
  4457. it's for number crunching too.
  4458. ** Faster SRFI-9 record access
  4459. SRFI-9 records are now implemented directly on top of Guile's structs,
  4460. and their accessors are defined in such a way that normal call-sites
  4461. inline to special VM opcodes, while still allowing for the general case
  4462. (e.g. passing a record accessor to `apply').
  4463. ** R6RS block comment support
  4464. Guile now supports R6RS nested block comments. The start of a comment is
  4465. marked with `#|', and the end with `|#'.
  4466. ** `guile-2' cond-expand feature
  4467. To test if your code is running under Guile 2.0 (or its alpha releases),
  4468. test for the `guile-2' cond-expand feature. Like this:
  4469. (cond-expand (guile-2 (eval-when (compile)
  4470. ;; This must be evaluated at compile time.
  4471. (fluid-set! current-reader my-reader)))
  4472. (guile
  4473. ;; Earlier versions of Guile do not have a
  4474. ;; separate compilation phase.
  4475. (fluid-set! current-reader my-reader)))
  4476. ** New global variables: %load-compiled-path, %load-compiled-extensions
  4477. These are analogous to %load-path and %load-extensions.
  4478. ** New fluid: `%file-port-name-canonicalization'
  4479. This fluid parameterizes the file names that are associated with file
  4480. ports. If %file-port-name-canonicalization is 'absolute, then file names
  4481. are canonicalized to be absolute paths. If it is 'relative, then the
  4482. name is canonicalized, but any prefix corresponding to a member of
  4483. `%load-path' is stripped off. Otherwise the names are passed through
  4484. unchanged.
  4485. In addition, the `compile-file' and `compile-and-load' procedures bind
  4486. %file-port-name-canonicalization to their `#:canonicalization' keyword
  4487. argument, which defaults to 'relative. In this way, one might compile
  4488. "../module/ice-9/boot-9.scm", but the path that gets residualized into
  4489. the .go is "ice-9/boot-9.scm".
  4490. ** New procedure, `make-promise'
  4491. `(make-promise (lambda () foo))' is equivalent to `(delay foo)'.
  4492. ** `defined?' may accept a module as its second argument
  4493. Previously it only accepted internal structures from the evaluator.
  4494. ** New entry into %guile-build-info: `ccachedir'
  4495. ** Fix bug in `module-bound?'.
  4496. `module-bound?' was returning true if a module did have a local
  4497. variable, but one that was unbound, but another imported module bound
  4498. the variable. This was an error, and was fixed.
  4499. ** `(ice-9 syncase)' has been deprecated.
  4500. As syntax-case is available by default, importing `(ice-9 syncase)' has
  4501. no effect, and will trigger a deprecation warning.
  4502. ** New readline history functions
  4503. The (ice-9 readline) module now provides add-history, read-history,
  4504. write-history and clear-history, which wrap the corresponding GNU
  4505. History library functions.
  4506. ** Removed deprecated uniform array procedures:
  4507. dimensions->uniform-array, list->uniform-array, array-prototype
  4508. Instead, use make-typed-array, list->typed-array, or array-type,
  4509. respectively.
  4510. ** Deprecate the old `scm-style-repl'
  4511. The following bindings from boot-9 are now found in `(ice-9
  4512. scm-style-repl)': `scm-style-repl', `error-catching-loop',
  4513. `error-catching-repl', `bad-throw', `scm-repl-silent'
  4514. `assert-repl-silence', `repl-print-unspecified',
  4515. `assert-repl-print-unspecified', `scm-repl-verbose',
  4516. `assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
  4517. `default-pre-unwind-handler', `handle-system-error',
  4518. The following bindings have been deprecated, with no replacement:
  4519. `pre-unwind-handler-dispatch'.
  4520. The following bindings have been totally removed:
  4521. `before-signal-stack'.
  4522. Deprecated forwarding shims have been installed so that users that
  4523. expect these bindings in the main namespace will still work, but receive
  4524. a deprecation warning.
  4525. ** `set-batch-mode?!' replaced by `ensure-batch-mode!'
  4526. "Batch mode" is a flag used to tell a program that it is not running
  4527. interactively. One usually turns it on after a fork. It may not be
  4528. turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
  4529. because it is a better interface, as it can only turn on batch mode, not
  4530. turn it off.
  4531. ** Deprecate `save-stack', `the-last-stack'
  4532. It used to be that the way to debug programs in Guile was to capture the
  4533. stack at the time of error, drop back to the REPL, then debug that
  4534. stack. But this approach didn't compose, was tricky to get right in the
  4535. presence of threads, and was not very powerful.
  4536. So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
  4537. `(ice-9 save-stack)', with deprecated bindings left in the root module.
  4538. ** `top-repl' has its own module
  4539. The `top-repl' binding, called with Guile is run interactively, is now
  4540. is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
  4541. left in the default environment.
  4542. ** `display-error' takes a frame
  4543. The `display-error' / `scm_display_error' helper now takes a frame as an
  4544. argument instead of a stack. Stacks are still supported in deprecated
  4545. builds. Additionally, `display-error' will again source location
  4546. information for the error.
  4547. ** No more `(ice-9 debug)'
  4548. This module had some debugging helpers that are no longer applicable to
  4549. the current debugging model. Importing this module will produce a
  4550. deprecation warning. Users should contact bug-guile for support.
  4551. ** Remove obsolete debug-options
  4552. Removed `breakpoints', `trace', `procnames', `indent', `frames',
  4553. `maxdepth', and `debug' debug-options.
  4554. ** `backtrace' debug option on by default
  4555. Given that Guile 2.0 can always give you a backtrace, backtraces are now
  4556. on by default.
  4557. ** `turn-on-debugging' deprecated
  4558. ** Remove obsolete print-options
  4559. The `source' and `closure-hook' print options are obsolete, and have
  4560. been removed.
  4561. ** Remove obsolete read-options
  4562. The "elisp-strings" and "elisp-vectors" read options were unused and
  4563. obsolete, so they have been removed.
  4564. ** Remove eval-options and trap-options
  4565. Eval-options and trap-options are obsolete with the new VM and
  4566. evaluator.
  4567. ** Remove (ice-9 debugger) and (ice-9 debugging)
  4568. See "Traps" and "Interactive Debugging" in the manual, for information
  4569. on their replacements.
  4570. ** Remove the GDS Emacs integration
  4571. See "Using Guile in Emacs" in the manual, for info on how we think you
  4572. should use Guile with Emacs.
  4573. ** Deprecated: `lazy-catch'
  4574. `lazy-catch' was a form that captured the stack at the point of a
  4575. `throw', but the dynamic state at the point of the `catch'. It was a bit
  4576. crazy. Please change to use `catch', possibly with a throw-handler, or
  4577. `with-throw-handler'.
  4578. ** Deprecated: primitive properties
  4579. The `primitive-make-property', `primitive-property-set!',
  4580. `primitive-property-ref', and `primitive-property-del!' procedures were
  4581. crufty and only used to implement object properties, which has a new,
  4582. threadsafe implementation. Use object properties or weak hash tables
  4583. instead.
  4584. ** Deprecated `@bind' syntax
  4585. `@bind' was part of an older implementation of the Emacs Lisp language,
  4586. and is no longer used.
  4587. ** Miscellaneous other deprecations
  4588. `cuserid' has been deprecated, as it only returns 8 bytes of a user's
  4589. login. Use `(passwd:name (getpwuid (geteuid)))' instead.
  4590. Additionally, the procedures `apply-to-args', `has-suffix?', `scheme-file-suffix'
  4591. `get-option', `for-next-option', `display-usage-report',
  4592. `transform-usage-lambda', `collect', and `set-batch-mode?!' have all
  4593. been deprecated.
  4594. ** Add support for unbound fluids
  4595. See `make-unbound-fluid', `fluid-unset!', and `fluid-bound?' in the
  4596. manual.
  4597. ** Add `variable-unset!'
  4598. See "Variables" in the manual, for more details.
  4599. ** Last but not least, the `λ' macro can be used in lieu of `lambda'
  4600. * Changes to the C interface
  4601. ** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
  4602. The semantics of `scm_gc_malloc ()' have been changed, in a
  4603. backward-compatible way. A new allocation routine,
  4604. `scm_gc_malloc_pointerless ()', was added.
  4605. Libgc is a conservative GC, which we hope will make interaction with C
  4606. code easier and less error-prone.
  4607. ** New procedures: `scm_to_stringn', `scm_from_stringn'
  4608. ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,}
  4609. ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,}
  4610. These new procedures convert to and from string representations in
  4611. particular encodings.
  4612. Users should continue to use locale encoding for user input, user
  4613. output, or interacting with the C library.
  4614. Use the Latin-1 functions for ASCII, and for literals in source code.
  4615. Use UTF-8 functions for interaction with modern libraries which deal in
  4616. UTF-8, and UTF-32 for interaction with utf32-using libraries.
  4617. Otherwise, use scm_to_stringn or scm_from_stringn with a specific
  4618. encoding.
  4619. ** New type definitions for `scm_t_intptr' and friends.
  4620. `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
  4621. `SIZEOF_SCM_T_BITS', `scm_t_intptr' and `scm_t_uintptr' are now
  4622. available to C. Have fun!
  4623. ** The GH interface (deprecated in version 1.6, 2001) was removed.
  4624. ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
  4625. This makes these internal functions technically not callable from
  4626. application code.
  4627. ** Functions for handling `scm_option' now no longer require an argument
  4628. indicating length of the `scm_t_option' array.
  4629. ** Procedures-with-setters are now implemented using applicable structs
  4630. From a user's perspective this doesn't mean very much. But if, for some
  4631. odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
  4632. SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
  4633. is gone.
  4634. ** Remove old evaluator closures
  4635. There used to be ranges of typecodes allocated to interpreted data
  4636. structures, but that it no longer the case, given that interpreted
  4637. procedure are now just regular VM closures. As a result, there is a
  4638. newly free tc3, and a number of removed macros. See the ChangeLog for
  4639. details.
  4640. ** Primitive procedures are now VM trampoline procedures
  4641. It used to be that there were something like 12 different typecodes
  4642. allocated to primitive procedures, each with its own calling convention.
  4643. Now there is only one, the gsubr. This may affect user code if you were
  4644. defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The
  4645. solution is to switch to use scm_c_make_gsubr. This solution works well
  4646. both with the old 1.8 and with the current 1.9 branch.
  4647. Guile's old evaluator used to have special cases for applying "gsubrs",
  4648. primitive procedures with specified numbers of required, optional, and
  4649. rest arguments. Now, however, Guile represents gsubrs as normal VM
  4650. procedures, with appropriate bytecode to parse out the correct number of
  4651. arguments, including optional and rest arguments, and then with a
  4652. special bytecode to apply the gsubr.
  4653. This allows primitive procedures to appear on the VM stack, allowing
  4654. them to be accurately counted in profiles. Also they now have more
  4655. debugging information attached to them -- their number of arguments, for
  4656. example. In addition, the VM can completely inline the application
  4657. mechanics, allowing for faster primitive calls.
  4658. However there are some changes on the C level. There is no more
  4659. `scm_tc7_gsubr' or `scm_tcs_subrs' typecode for primitive procedures, as
  4660. they are just VM procedures. Likewise the macros `SCM_GSUBR_TYPE',
  4661. `SCM_GSUBR_MAKTYPE', `SCM_GSUBR_REQ', `SCM_GSUBR_OPT', and
  4662. `SCM_GSUBR_REST' are gone, as are `SCM_SUBR_META_INFO', `SCM_SUBR_PROPS'
  4663. `SCM_SET_SUBR_GENERIC_LOC', and `SCM_SUBR_ARITY_TO_TYPE'.
  4664. Perhaps more significantly, `scm_c_make_subr',
  4665. `scm_c_make_subr_with_generic', `scm_c_define_subr', and
  4666. `scm_c_define_subr_with_generic'. They all operated on subr typecodes,
  4667. and there are no more subr typecodes. Use the scm_c_make_gsubr family
  4668. instead.
  4669. Normal users of gsubrs should not be affected, though, as the
  4670. scm_c_make_gsubr family still is the correct way to create primitive
  4671. procedures.
  4672. ** Remove deprecated array C interfaces
  4673. Removed the deprecated array functions `scm_i_arrayp',
  4674. `scm_i_array_ndim', `scm_i_array_mem', `scm_i_array_v',
  4675. `scm_i_array_base', `scm_i_array_dims', and the deprecated macros
  4676. `SCM_ARRAYP', `SCM_ARRAY_NDIM', `SCM_ARRAY_CONTP', `SCM_ARRAY_MEM',
  4677. `SCM_ARRAY_V', `SCM_ARRAY_BASE', and `SCM_ARRAY_DIMS'.
  4678. ** Remove unused snarf macros
  4679. `SCM_DEFINE1', `SCM_PRIMITIVE_GENERIC_1', `SCM_PROC1, and `SCM_GPROC1'
  4680. are no more. Use SCM_DEFINE or SCM_PRIMITIVE_GENERIC instead.
  4681. ** New functions: `scm_call_n', `scm_c_run_hookn'
  4682. `scm_call_n' applies to apply a function to an array of arguments.
  4683. `scm_c_run_hookn' runs a hook with an array of arguments.
  4684. ** Some SMOB types changed to have static typecodes
  4685. Fluids, dynamic states, and hash tables used to be SMOB objects, but now
  4686. they have statically allocated tc7 typecodes.
  4687. ** Preparations for changing SMOB representation
  4688. If things go right, we'll be changing the SMOB representation soon. To
  4689. that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
  4690. the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
  4691. in the future. Code accessing SMOBs using SCM_CELL macros was never
  4692. correct, but until now things still worked. Users should be aware of
  4693. such changes.
  4694. ** Changed invocation mechanics of applicable SMOBs
  4695. Guile's old evaluator used to have special cases for applying SMOB
  4696. objects. Now, with the VM, when Guile sees a SMOB, it looks up a VM
  4697. trampoline procedure for it, and use the normal mechanics to apply the
  4698. trampoline. This simplifies procedure application in the normal,
  4699. non-SMOB case.
  4700. The upshot is that the mechanics used to apply a SMOB are different from
  4701. 1.8. Descriptors no longer have `apply_0', `apply_1', `apply_2', and
  4702. `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
  4703. deprecated. Just use the scm_call_0 family of procedures.
  4704. ** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
  4705. Though these SRFI support libraries did expose API, they encoded a
  4706. strange version string into their library names. That version was never
  4707. programmatically exported, so there was no way people could use the
  4708. libs.
  4709. This was a fortunate oversight, as it allows us to remove the need for
  4710. extra, needless shared libraries --- the C support code for SRFIs 4, 13,
  4711. and 14 was already in core --- and allow us to incrementally return the
  4712. SRFI implementation to Scheme.
  4713. ** New C function: scm_module_public_interface
  4714. This procedure corresponds to Scheme's `module-public-interface'.
  4715. ** Undeprecate `scm_the_root_module ()'
  4716. It's useful to be able to get the root module from C without doing a
  4717. full module lookup.
  4718. ** Inline vector allocation
  4719. Instead of having vectors point out into the heap for their data, their
  4720. data is now allocated inline to the vector object itself. The same is
  4721. true for bytevectors, by default, though there is an indirection
  4722. available which should allow for making a bytevector from an existing
  4723. memory region.
  4724. ** New struct constructors that don't involve making lists
  4725. `scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
  4726. constructors, respectively, for structs. You might find them useful.
  4727. ** Stack refactor
  4728. In Guile 1.8, there were debugging frames on the C stack. Now there is
  4729. no more need to explicitly mark the stack in this way, because Guile has
  4730. a VM stack that it knows how to walk, which simplifies the C API
  4731. considerably. See the ChangeLog for details; the relevant interface is
  4732. in libguile/stacks.h. The Scheme API has not been changed significantly.
  4733. ** Removal of Guile's primitive object system.
  4734. There were a number of pieces in `objects.[ch]' that tried to be a
  4735. minimal object system, but were never documented, and were quickly
  4736. obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
  4737. `scm_make_subclass_object', `scm_metaclass_standard', and like symbols
  4738. from objects.h are no more. In the very unlikely case in which these
  4739. were useful to you, we urge you to contact guile-devel.
  4740. ** No future.
  4741. Actually the future is still in the state that it was, is, and ever
  4742. shall be, Amen, except that `futures.c' and `futures.h' are no longer a
  4743. part of it. These files were experimental, never compiled, and would be
  4744. better implemented in Scheme anyway. In the future, that is.
  4745. ** Deprecate trampolines
  4746. There used to be C functions `scm_trampoline_0', `scm_trampoline_1', and
  4747. so on. The point was to do some precomputation on the type of the
  4748. procedure, then return a specialized "call" procedure. However this
  4749. optimization wasn't actually an optimization, so it is now deprecated.
  4750. Just use `scm_call_0', etc instead.
  4751. ** Deprecated `scm_badargsp'
  4752. This function is unused in Guile, but was part of its API.
  4753. ** Better support for Lisp `nil'.
  4754. The bit representation of `nil' has been tweaked so that it is now very
  4755. efficient to check e.g. if a value is equal to Scheme's end-of-list or
  4756. Lisp's nil. Additionally there are a heap of new, specific predicates
  4757. like scm_is_null_or_nil.
  4758. ** Better integration of Lisp `nil'.
  4759. `scm_is_boolean', `scm_is_false', and `scm_is_null' all return true now
  4760. for Lisp's `nil'. This shouldn't affect any Scheme code at this point,
  4761. but when we start to integrate more with Emacs, it is possible that we
  4762. break code that assumes that, for example, `(not x)' implies that `x' is
  4763. `eq?' to `#f'. This is not a common assumption. Refactoring affected
  4764. code to rely on properties instead of identities will improve code
  4765. correctness. See "Nil" in the manual, for more details.
  4766. ** Support for static allocation of strings, symbols, and subrs.
  4767. Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
  4768. much of their associated data as static variables, reducing Guile's
  4769. memory footprint.
  4770. ** `scm_stat' has an additional argument, `exception_on_error'
  4771. ** `scm_primitive_load_path' has an additional argument `exception_on_not_found'
  4772. ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
  4773. Previously they would use the `off_t' type, which is fragile since its
  4774. definition depends on the application's value for `_FILE_OFFSET_BITS'.
  4775. ** The `long_long' C type, deprecated in 1.8, has been removed
  4776. ** Removed deprecated uniform array procedures: scm_make_uve,
  4777. scm_array_prototype, scm_list_to_uniform_array,
  4778. scm_dimensions_to_uniform_array, scm_make_ra, scm_shap2ra, scm_cvref,
  4779. scm_ra_set_contp, scm_aind, scm_raprin1
  4780. These functions have been deprecated since early 2005.
  4781. * Changes to the distribution
  4782. ** Guile's license is now LGPLv3+
  4783. In other words the GNU Lesser General Public License, version 3 or
  4784. later (at the discretion of each person that chooses to redistribute
  4785. part of Guile).
  4786. ** AM_SILENT_RULES
  4787. Guile's build is visually quieter, due to the use of Automake 1.11's
  4788. AM_SILENT_RULES. Build as `make V=1' to see all of the output.
  4789. ** GOOPS documentation folded into Guile reference manual
  4790. GOOPS, Guile's object system, used to be documented in separate manuals.
  4791. This content is now included in Guile's manual directly.
  4792. ** `guile-config' will be deprecated in favor of `pkg-config'
  4793. `guile-config' has been rewritten to get its information from
  4794. `pkg-config', so this should be a transparent change. Note however that
  4795. guile.m4 has yet to be modified to call pkg-config instead of
  4796. guile-config.
  4797. ** Guile now provides `guile-2.0.pc' instead of `guile-1.8.pc'
  4798. Programs that use `pkg-config' to find Guile or one of its Autoconf
  4799. macros should now require `guile-2.0' instead of `guile-1.8'.
  4800. ** New installation directory: $(pkglibdir)/1.9/ccache
  4801. If $(libdir) is /usr/lib, for example, Guile will install its .go files
  4802. to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
  4803. ** Parallel installability fixes
  4804. Guile now installs its header files to a effective-version-specific
  4805. directory, and includes the effective version (e.g. 2.0) in the library
  4806. name (e.g. libguile-2.0.so).
  4807. This change should be transparent to users, who should detect Guile via
  4808. the guile.m4 macro, or the guile-2.0.pc pkg-config file. It will allow
  4809. parallel installs for multiple versions of Guile development
  4810. environments.
  4811. ** Dynamically loadable extensions may be placed in a Guile-specific path
  4812. Before, Guile only searched the system library paths for extensions
  4813. (e.g. /usr/lib), which meant that the names of Guile extensions had to
  4814. be globally unique. Installing them to a Guile-specific extensions
  4815. directory is cleaner. Use `pkg-config --variable=extensiondir
  4816. guile-2.0' to get the location of the extensions directory.
  4817. ** User Scheme code may be placed in a version-specific path
  4818. Before, there was only one way to install user Scheme code to a
  4819. version-specific Guile directory: install to Guile's own path,
  4820. e.g. /usr/share/guile/2.0. The site directory,
  4821. e.g. /usr/share/guile/site, was unversioned. This has been changed to
  4822. add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
  4823. searched before the global site directory.
  4824. ** New dependency: libgc
  4825. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
  4826. ** New dependency: GNU libunistring
  4827. See http://www.gnu.org/software/libunistring/, for more information. Our
  4828. Unicode support uses routines from libunistring.
  4829. ** New dependency: libffi
  4830. See http://sourceware.org/libffi/, for more information.
  4831. Changes in 1.8.8 (since 1.8.7)
  4832. * Bugs fixed
  4833. ** Fix possible buffer overruns when parsing numbers
  4834. ** Avoid clash with system setjmp/longjmp on IA64
  4835. ** Fix `wrong type arg' exceptions with IPv6 addresses
  4836. Changes in 1.8.7 (since 1.8.6)
  4837. * New modules (see the manual for details)
  4838. ** `(srfi srfi-98)', an interface to access environment variables
  4839. * Bugs fixed
  4840. ** Fix compilation with `--disable-deprecated'
  4841. ** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
  4842. ** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
  4843. ** Fix build problem when scm_t_timespec is different from struct timespec
  4844. ** Fix build when compiled with -Wundef -Werror
  4845. ** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
  4846. ** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
  4847. ** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
  4848. ** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
  4849. ** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
  4850. ** Fix reading of complex numbers where both parts are inexact decimals
  4851. ** Allow @ macro to work with (ice-9 syncase)
  4852. Previously, use of the @ macro in a module whose code is being
  4853. transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
  4854. Now it works as you would expect (giving the value of the specified
  4855. module binding).
  4856. ** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
  4857. Changes in 1.8.6 (since 1.8.5)
  4858. * New features (see the manual for details)
  4859. ** New convenience function `scm_c_symbol_length ()'
  4860. ** Single stepping through code from Emacs
  4861. When you use GDS to evaluate Scheme code from Emacs, you can now use
  4862. `C-u' to indicate that you want to single step through that code. See
  4863. `Evaluating Scheme Code' in the manual for more details.
  4864. ** New "guile(1)" man page!
  4865. * Changes to the distribution
  4866. ** Automake's `AM_MAINTAINER_MODE' is no longer used
  4867. Thus, the `--enable-maintainer-mode' configure option is no longer
  4868. available: Guile is now always configured in "maintainer mode".
  4869. ** `ChangeLog' files are no longer updated
  4870. Instead, changes are detailed in the version control system's logs. See
  4871. the top-level `ChangeLog' files for details.
  4872. * Bugs fixed
  4873. ** `symbol->string' now returns a read-only string, as per R5RS
  4874. ** Fix incorrect handling of the FLAGS argument of `fold-matches'
  4875. ** `guile-config link' now prints `-L$libdir' before `-lguile'
  4876. ** Fix memory corruption involving GOOPS' `class-redefinition'
  4877. ** Fix possible deadlock in `mutex-lock'
  4878. ** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
  4879. ** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
  4880. ** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
  4881. ** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
  4882. ** Fix misleading output from `(help rationalize)'
  4883. ** Fix build failure on Debian hppa architecture (bad stack growth detection)
  4884. ** Fix `gcd' when called with a single, negative argument.
  4885. ** Fix `Stack overflow' errors seen when building on some platforms
  4886. ** Fix bug when `scm_with_guile ()' was called several times from the
  4887. same thread
  4888. ** The handler of SRFI-34 `with-exception-handler' is now invoked in the
  4889. dynamic environment of the call to `raise'
  4890. ** Fix potential deadlock in `make-struct'
  4891. ** Fix compilation problem with libltdl from Libtool 2.2.x
  4892. ** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
  4893. Changes in 1.8.5 (since 1.8.4)
  4894. * Infrastructure changes
  4895. ** Guile repository switched from CVS to Git
  4896. The new repository can be accessed using
  4897. "git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
  4898. http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
  4899. ** Add support for `pkg-config'
  4900. See "Autoconf Support" in the manual for details.
  4901. * New modules (see the manual for details)
  4902. ** `(srfi srfi-88)'
  4903. * New features (see the manual for details)
  4904. ** New `postfix' read option, for SRFI-88 keyword syntax
  4905. ** Some I/O primitives have been inlined, which improves I/O performance
  4906. ** New object-based traps infrastructure
  4907. This is a GOOPS-based infrastructure that builds on Guile's low-level
  4908. evaluator trap calls and facilitates the development of debugging
  4909. features like single-stepping, breakpoints, tracing and profiling.
  4910. See the `Traps' node of the manual for details.
  4911. ** New support for working on Guile code from within Emacs
  4912. Guile now incorporates the `GDS' library (previously distributed
  4913. separately) for working on Guile code from within Emacs. See the
  4914. `Using Guile In Emacs' node of the manual for details.
  4915. * Bugs fixed
  4916. ** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
  4917. ** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
  4918. Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
  4919. would trigger an unbound variable error for `match:andmap'.
  4920. ** `(oop goops describe)' now properly provides the `describe' feature
  4921. ** Fixed `args-fold' from `(srfi srfi-37)'
  4922. Previously, parsing short option names of argument-less options would
  4923. lead to a stack overflow.
  4924. ** `(srfi srfi-35)' is now visible through `cond-expand'
  4925. ** Fixed type-checking for the second argument of `eval'
  4926. ** Fixed type-checking for SRFI-1 `partition'
  4927. ** Fixed `struct-ref' and `struct-set!' on "light structs"
  4928. ** Honor struct field access rights in GOOPS
  4929. ** Changed the storage strategy of source properties, which fixes a deadlock
  4930. ** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
  4931. ** Fixed build issue for GNU/Linux on IA64
  4932. ** Fixed build issues on NetBSD 1.6
  4933. ** Fixed build issue on Solaris 2.10 x86_64
  4934. ** Fixed build issue with DEC/Compaq/HP's compiler
  4935. ** Fixed `scm_from_complex_double' build issue on FreeBSD
  4936. ** Fixed `alloca' build issue on FreeBSD 6
  4937. ** Removed use of non-portable makefile constructs
  4938. ** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
  4939. ** Make sure all tests honor `$TMPDIR'
  4940. Changes in 1.8.4 (since 1.8.3)
  4941. * Bugs fixed
  4942. ** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
  4943. ** Fixed a segmentation fault which occurred when displaying the
  4944. backtrace of a stack with a promise object (made by `delay') in it.
  4945. ** Make `accept' leave guile mode while blocking
  4946. ** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
  4947. ** Fixed a build problem on AIX (use of func_data identifier)
  4948. ** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
  4949. called with an associator proc that returns neither a pair nor #f.
  4950. ** Secondary threads now always return a valid module for (current-module).
  4951. ** Avoid MacOS build problems caused by incorrect combination of "64"
  4952. system and library calls.
  4953. ** `guile-snarf' now honors `$TMPDIR'
  4954. ** `guile-config compile' now reports CPPFLAGS used at compile-time
  4955. ** Fixed build with Sun Studio (Solaris 9)
  4956. ** Fixed wrong-type-arg errors when creating zero length SRFI-4
  4957. uniform vectors on AIX.
  4958. ** Fixed a deadlock that occurs upon GC with multiple threads.
  4959. ** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
  4960. ** Fixed autotool-derived build problems on AIX 6.1.
  4961. ** Fixed NetBSD/alpha support
  4962. ** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
  4963. * New modules (see the manual for details)
  4964. ** `(srfi srfi-69)'
  4965. * Documentation fixes and improvements
  4966. ** Removed premature breakpoint documentation
  4967. The features described are not available in the series of 1.8.x
  4968. releases, so the documentation was misleading and has been removed.
  4969. ** More about Guile's default *random-state* variable
  4970. ** GOOPS: more about how to use `next-method'
  4971. * Changes to the distribution
  4972. ** Corrected a few files that referred incorrectly to the old GPL + special exception licence
  4973. In fact Guile since 1.8.0 has been licensed with the GNU Lesser
  4974. General Public License, and the few incorrect files have now been
  4975. fixed to agree with the rest of the Guile distribution.
  4976. ** Removed unnecessary extra copies of COPYING*
  4977. The distribution now contains a single COPYING.LESSER at its top level.
  4978. Changes in 1.8.3 (since 1.8.2)
  4979. * New modules (see the manual for details)
  4980. ** `(srfi srfi-35)'
  4981. ** `(srfi srfi-37)'
  4982. * Bugs fixed
  4983. ** The `(ice-9 slib)' module now works as expected
  4984. ** Expressions like "(set! 'x #t)" no longer yield a crash
  4985. ** Warnings about duplicate bindings now go to stderr
  4986. ** A memory leak in `make-socket-address' was fixed
  4987. ** Alignment issues (e.g., on SPARC) in network routines were fixed
  4988. ** A threading issue that showed up at least on NetBSD was fixed
  4989. ** Build problems on Solaris and IRIX fixed
  4990. * Implementation improvements
  4991. ** The reader is now faster, which reduces startup time
  4992. ** Procedures returned by `record-accessor' and `record-modifier' are faster
  4993. Changes in 1.8.2 (since 1.8.1):
  4994. * New procedures (see the manual for details)
  4995. ** set-program-arguments
  4996. ** make-vtable
  4997. * Incompatible changes
  4998. ** The body of a top-level `define' no longer sees the binding being created
  4999. In a top-level `define', the binding being created is no longer visible
  5000. from the `define' body. This breaks code like
  5001. "(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
  5002. unbound in the body. However, such code was not R5RS-compliant anyway,
  5003. per Section 5.2.1.
  5004. * Bugs fixed
  5005. ** Fractions were not `equal?' if stored in unreduced form.
  5006. (A subtle problem, since printing a value reduced it, making it work.)
  5007. ** srfi-60 `copy-bit' failed on 64-bit systems
  5008. ** "guile --use-srfi" option at the REPL can replace core functions
  5009. (Programs run with that option were ok, but in the interactive REPL
  5010. the core bindings got priority, preventing SRFI replacements or
  5011. extensions.)
  5012. ** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
  5013. ** `kill' on mingw throws an error for a PID other than oneself
  5014. ** Procedure names are attached to procedure-with-setters
  5015. ** Array read syntax works with negative lower bound
  5016. ** `array-in-bounds?' fix if an array has different lower bounds on each index
  5017. ** `*' returns exact 0 for "(* inexact 0)"
  5018. This follows what it always did for "(* 0 inexact)".
  5019. ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
  5020. ** SRFI-19: `date->julian-day' did not account for timezone offset
  5021. ** `ttyname' no longer crashes when passed a non-tty argument
  5022. ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
  5023. ** Small memory leaks have been fixed in `make-fluid' and `add-history'
  5024. ** GOOPS: Fixed a bug in `method-more-specific?'
  5025. ** Build problems on Solaris fixed
  5026. ** Build problems on HP-UX IA64 fixed
  5027. ** Build problems on MinGW fixed
  5028. Changes in 1.8.1 (since 1.8.0):
  5029. * LFS functions are now used to access 64-bit files on 32-bit systems.
  5030. * New procedures (see the manual for details)
  5031. ** primitive-_exit - [Scheme] the-root-module
  5032. ** scm_primitive__exit - [C]
  5033. ** make-completion-function - [Scheme] (ice-9 readline)
  5034. ** scm_c_locale_stringn_to_number - [C]
  5035. ** scm_srfi1_append_reverse [C]
  5036. ** scm_srfi1_append_reverse_x [C]
  5037. ** scm_log - [C]
  5038. ** scm_log10 - [C]
  5039. ** scm_exp - [C]
  5040. ** scm_sqrt - [C]
  5041. * Bugs fixed
  5042. ** Build problems have been fixed on MacOS, SunOS, and QNX.
  5043. ** `strftime' fix sign of %z timezone offset.
  5044. ** A one-dimensional array can now be 'equal?' to a vector.
  5045. ** Structures, records, and SRFI-9 records can now be compared with `equal?'.
  5046. ** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
  5047. ** `record-accessor' and `record-modifier' now have strict type checks.
  5048. Record accessor and modifier procedures now throw an error if the
  5049. record type of the record they're given is not the type expected.
  5050. (Previously accessors returned #f and modifiers silently did nothing).
  5051. ** It is now OK to use both autoload and use-modules on a given module.
  5052. ** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
  5053. Previously there was no checking on primatives like make-vector that
  5054. accept "one or two" arguments. Now there is.
  5055. ** The srfi-1 assoc function now calls its equality predicate properly.
  5056. Previously srfi-1 assoc would call the equality predicate with the key
  5057. last. According to the SRFI, the key should be first.
  5058. ** A bug in n-par-for-each and n-for-each-par-map has been fixed.
  5059. ** The array-set! procedure no longer segfaults when given a bit vector.
  5060. ** Bugs in make-shared-array have been fixed.
  5061. ** string<? and friends now follow char<? etc order on 8-bit chars.
  5062. ** The format procedure now handles inf and nan values for ~f correctly.
  5063. ** exact->inexact should no longer overflow when given certain large fractions.
  5064. ** srfi-9 accessor and modifier procedures now have strict record type checks.
  5065. This matches the srfi-9 specification.
  5066. ** (ice-9 ftw) procedures won't ignore different files with same inode number.
  5067. Previously the (ice-9 ftw) procedures would ignore any file that had
  5068. the same inode number as a file they had already seen, even if that
  5069. file was on a different device.
  5070. Changes in 1.8.0 (changes since the 1.6.x series):
  5071. * Changes to the distribution
  5072. ** Guile is now licensed with the GNU Lesser General Public License.
  5073. ** The manual is now licensed with the GNU Free Documentation License.
  5074. ** Guile now requires GNU MP (http://swox.com/gmp).
  5075. Guile now uses the GNU MP library for arbitrary precision arithmetic.
  5076. ** Guile now has separate private and public configuration headers.
  5077. That is, things like HAVE_STRING_H no longer leak from Guile's
  5078. headers.
  5079. ** Guile now provides and uses an "effective" version number.
  5080. Guile now provides scm_effective_version and effective-version
  5081. functions which return the "effective" version number. This is just
  5082. the normal full version string without the final micro-version number,
  5083. so the current effective-version is "1.8". The effective version
  5084. should remain unchanged during a stable series, and should be used for
  5085. items like the versioned share directory name
  5086. i.e. /usr/share/guile/1.8.
  5087. Providing an unchanging version number during a stable release for
  5088. things like the versioned share directory can be particularly
  5089. important for Guile "add-on" packages, since it provides a directory
  5090. that they can install to that won't be changed out from under them
  5091. with each micro release during a stable series.
  5092. ** Thread implementation has changed.
  5093. When you configure "--with-threads=null", you will get the usual
  5094. threading API (call-with-new-thread, make-mutex, etc), but you can't
  5095. actually create new threads. Also, "--with-threads=no" is now
  5096. equivalent to "--with-threads=null". This means that the thread API
  5097. is always present, although you might not be able to create new
  5098. threads.
  5099. When you configure "--with-threads=pthreads" or "--with-threads=yes",
  5100. you will get threads that are implemented with the portable POSIX
  5101. threads. These threads can run concurrently (unlike the previous
  5102. "coop" thread implementation), but need to cooperate for things like
  5103. the GC.
  5104. The default is "pthreads", unless your platform doesn't have pthreads,
  5105. in which case "null" threads are used.
  5106. See the manual for details, nodes "Initialization", "Multi-Threading",
  5107. "Blocking", and others.
  5108. ** There is the new notion of 'discouraged' features.
  5109. This is a milder form of deprecation.
  5110. Things that are discouraged should not be used in new code, but it is
  5111. OK to leave them in old code for now. When a discouraged feature is
  5112. used, no warning message is printed like there is for 'deprecated'
  5113. features. Also, things that are merely discouraged are nevertheless
  5114. implemented efficiently, while deprecated features can be very slow.
  5115. You can omit discouraged features from libguile by configuring it with
  5116. the '--disable-discouraged' option.
  5117. ** Deprecation warnings can be controlled at run-time.
  5118. (debug-enable 'warn-deprecated) switches them on and (debug-disable
  5119. 'warn-deprecated) switches them off.
  5120. ** Support for SRFI 61, extended cond syntax for multiple values has
  5121. been added.
  5122. This SRFI is always available.
  5123. ** Support for require-extension, SRFI-55, has been added.
  5124. The SRFI-55 special form `require-extension' has been added. It is
  5125. available at startup, and provides a portable way to load Scheme
  5126. extensions. SRFI-55 only requires support for one type of extension,
  5127. "srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
  5128. 13 14)).
  5129. ** New module (srfi srfi-26) provides support for `cut' and `cute'.
  5130. The (srfi srfi-26) module is an implementation of SRFI-26 which
  5131. provides the `cut' and `cute' syntax. These may be used to specialize
  5132. parameters without currying.
  5133. ** New module (srfi srfi-31)
  5134. This is an implementation of SRFI-31 which provides a special form
  5135. `rec' for recursive evaluation.
  5136. ** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
  5137. been merged with the core, making their functionality always
  5138. available.
  5139. The modules are still available, tho, and you could use them together
  5140. with a renaming import, for example.
  5141. ** Guile no longer includes its own version of libltdl.
  5142. The official version is good enough now.
  5143. ** The --enable-htmldoc option has been removed from 'configure'.
  5144. Support for translating the documentation into HTML is now always
  5145. provided. Use 'make html'.
  5146. ** New module (ice-9 serialize):
  5147. (serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
  5148. don't trust the thread safety of most of your program, but where you
  5149. have some section(s) of code which you consider can run in parallel to
  5150. other sections. See ice-9/serialize.scm for more information.
  5151. ** The configure option '--disable-arrays' has been removed.
  5152. Support for arrays and uniform numeric arrays is now always included
  5153. in Guile.
  5154. * Changes to the stand-alone interpreter
  5155. ** New command line option `-L'.
  5156. This option adds a directory to the front of the load path.
  5157. ** New command line option `--no-debug'.
  5158. Specifying `--no-debug' on the command line will keep the debugging
  5159. evaluator turned off, even for interactive sessions.
  5160. ** User-init file ~/.guile is now loaded with the debugging evaluator.
  5161. Previously, the normal evaluator would have been used. Using the
  5162. debugging evaluator gives better error messages.
  5163. ** The '-e' option now 'read's its argument.
  5164. This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
  5165. be used with '-e'. For example, you can now write a script like
  5166. #! /bin/sh
  5167. exec guile -e '(@ (demo) main)' -s "$0" "$@"
  5168. !#
  5169. (define-module (demo)
  5170. :export (main))
  5171. (define (main args)
  5172. (format #t "Demo: ~a~%" args))
  5173. * Changes to Scheme functions and syntax
  5174. ** Guardians have changed back to their original semantics
  5175. Guardians now behave like described in the paper by Dybvig et al. In
  5176. particular, they no longer make guarantees about the order in which
  5177. they return objects, and they can no longer be greedy.
  5178. They no longer drop cyclic data structures.
  5179. The C function scm_make_guardian has been changed incompatibly and no
  5180. longer takes the 'greedy_p' argument.
  5181. ** New function hashx-remove!
  5182. This function completes the set of 'hashx' functions.
  5183. ** The concept of dynamic roots has been factored into continuation
  5184. barriers and dynamic states.
  5185. Each thread has a current dynamic state that carries the values of the
  5186. fluids. You can create and copy dynamic states and use them as the
  5187. second argument for 'eval'. See "Fluids and Dynamic States" in the
  5188. manual.
  5189. To restrict the influence that captured continuations can have on the
  5190. control flow, you can errect continuation barriers. See "Continuation
  5191. Barriers" in the manual.
  5192. The function call-with-dynamic-root now essentially temporarily
  5193. installs a new dynamic state and errects a continuation barrier.
  5194. ** The default load path no longer includes "." at the end.
  5195. Automatically loading modules from the current directory should not
  5196. happen by default. If you want to allow it in a more controlled
  5197. manner, set the environment variable GUILE_LOAD_PATH or the Scheme
  5198. variable %load-path.
  5199. ** The uniform vector and array support has been overhauled.
  5200. It now complies with SRFI-4 and the weird prototype based uniform
  5201. array creation has been deprecated. See the manual for more details.
  5202. Some non-compatible changes have been made:
  5203. - characters can no longer be stored into byte arrays.
  5204. - strings and bit vectors are no longer considered to be uniform numeric
  5205. vectors.
  5206. - array-rank throws an error for non-arrays instead of returning zero.
  5207. - array-ref does no longer accept non-arrays when no indices are given.
  5208. There is the new notion of 'generalized vectors' and corresponding
  5209. procedures like 'generalized-vector-ref'. Generalized vectors include
  5210. strings, bitvectors, ordinary vectors, and uniform numeric vectors.
  5211. Arrays use generalized vectors as their storage, so that you still
  5212. have arrays of characters, bits, etc. However, uniform-array-read!
  5213. and uniform-array-write can no longer read/write strings and
  5214. bitvectors.
  5215. ** There is now support for copy-on-write substrings, mutation-sharing
  5216. substrings and read-only strings.
  5217. Three new procedures are related to this: substring/shared,
  5218. substring/copy, and substring/read-only. See the manual for more
  5219. information.
  5220. ** Backtraces will now highlight the value that caused the error.
  5221. By default, these values are enclosed in "{...}", such as in this
  5222. example:
  5223. guile> (car 'a)
  5224. Backtrace:
  5225. In current input:
  5226. 1: 0* [car {a}]
  5227. <unnamed port>:1:1: In procedure car in expression (car (quote a)):
  5228. <unnamed port>:1:1: Wrong type (expecting pair): a
  5229. ABORT: (wrong-type-arg)
  5230. The prefix and suffix used for highlighting can be set via the two new
  5231. printer options 'highlight-prefix' and 'highlight-suffix'. For
  5232. example, putting this into ~/.guile will output the bad value in bold
  5233. on an ANSI terminal:
  5234. (print-set! highlight-prefix "\x1b[1m")
  5235. (print-set! highlight-suffix "\x1b[22m")
  5236. ** 'gettext' support for internationalization has been added.
  5237. See the manual for details.
  5238. ** New syntax '@' and '@@':
  5239. You can now directly refer to variables exported from a module by
  5240. writing
  5241. (@ MODULE-NAME VARIABLE-NAME)
  5242. For example (@ (ice-9 pretty-print) pretty-print) will directly access
  5243. the pretty-print variable exported from the (ice-9 pretty-print)
  5244. module. You don't need to 'use' that module first. You can also use
  5245. '@' as a target of 'set!', as in (set! (@ mod var) val).
  5246. The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
  5247. but it can also access variables that have not been exported. It is
  5248. intended only for kluges and temporary fixes and for debugging, not
  5249. for ordinary code.
  5250. ** Keyword syntax has been made more disciplined.
  5251. Previously, the name of a keyword was read as a 'token' but printed as
  5252. a symbol. Now, it is read as a general Scheme datum which must be a
  5253. symbol.
  5254. Previously:
  5255. guile> #:12
  5256. #:#{12}#
  5257. guile> #:#{12}#
  5258. #:#{\#{12}\#}#
  5259. guile> #:(a b c)
  5260. #:#{}#
  5261. ERROR: In expression (a b c):
  5262. Unbound variable: a
  5263. guile> #: foo
  5264. #:#{}#
  5265. ERROR: Unbound variable: foo
  5266. Now:
  5267. guile> #:12
  5268. ERROR: Wrong type (expecting symbol): 12
  5269. guile> #:#{12}#
  5270. #:#{12}#
  5271. guile> #:(a b c)
  5272. ERROR: Wrong type (expecting symbol): (a b c)
  5273. guile> #: foo
  5274. #:foo
  5275. ** The printing of symbols that might look like keywords can be
  5276. controlled.
  5277. The new printer option 'quote-keywordish-symbols' controls how symbols
  5278. are printed that have a colon as their first or last character. The
  5279. default now is to only quote a symbol with #{...}# when the read
  5280. option 'keywords' is not '#f'. Thus:
  5281. guile> (define foo (string->symbol ":foo"))
  5282. guile> (read-set! keywords #f)
  5283. guile> foo
  5284. :foo
  5285. guile> (read-set! keywords 'prefix)
  5286. guile> foo
  5287. #{:foo}#
  5288. guile> (print-set! quote-keywordish-symbols #f)
  5289. guile> foo
  5290. :foo
  5291. ** 'while' now provides 'break' and 'continue'
  5292. break and continue were previously bound in a while loop, but not
  5293. documented, and continue didn't quite work properly. The undocumented
  5294. parameter to break which gave a return value for the while has been
  5295. dropped.
  5296. ** 'call-with-current-continuation' is now also available under the name
  5297. 'call/cc'.
  5298. ** The module system now checks for duplicate bindings.
  5299. The module system now can check for name conflicts among imported
  5300. bindings.
  5301. The behavior can be controlled by specifying one or more 'duplicates'
  5302. handlers. For example, to make Guile return an error for every name
  5303. collision, write:
  5304. (define-module (foo)
  5305. :use-module (bar)
  5306. :use-module (baz)
  5307. :duplicates check)
  5308. The new default behavior of the module system when a name collision
  5309. has been detected is to
  5310. 1. Give priority to bindings marked as a replacement.
  5311. 2. Issue a warning (different warning if overriding core binding).
  5312. 3. Give priority to the last encountered binding (this corresponds to
  5313. the old behavior).
  5314. If you want the old behavior back without replacements or warnings you
  5315. can add the line:
  5316. (default-duplicate-binding-handler 'last)
  5317. to your .guile init file.
  5318. ** New define-module option: :replace
  5319. :replace works as :export, but, in addition, marks the binding as a
  5320. replacement.
  5321. A typical example is `format' in (ice-9 format) which is a replacement
  5322. for the core binding `format'.
  5323. ** Adding prefixes to imported bindings in the module system
  5324. There is now a new :use-module option :prefix. It can be used to add
  5325. a prefix to all imported bindings.
  5326. (define-module (foo)
  5327. :use-module ((bar) :prefix bar:))
  5328. will import all bindings exported from bar, but rename them by adding
  5329. the prefix `bar:'.
  5330. ** Conflicting generic functions can be automatically merged.
  5331. When two imported bindings conflict and they are both generic
  5332. functions, the two functions can now be merged automatically. This is
  5333. activated with the 'duplicates' handler 'merge-generics'.
  5334. ** New function: effective-version
  5335. Returns the "effective" version number. This is just the normal full
  5336. version string without the final micro-version number. See "Changes
  5337. to the distribution" above.
  5338. ** New threading functions: parallel, letpar, par-map, and friends
  5339. These are convenient ways to run calculations in parallel in new
  5340. threads. See "Parallel forms" in the manual for details.
  5341. ** New function 'try-mutex'.
  5342. This function will attempt to lock a mutex but will return immediately
  5343. instead of blocking and indicate failure.
  5344. ** Waiting on a condition variable can have a timeout.
  5345. The function 'wait-condition-variable' now takes a third, optional
  5346. argument that specifies the point in time where the waiting should be
  5347. aborted.
  5348. ** New function 'broadcast-condition-variable'.
  5349. ** New functions 'all-threads' and 'current-thread'.
  5350. ** Signals and system asyncs work better with threads.
  5351. The function 'sigaction' now takes a fourth, optional, argument that
  5352. specifies the thread that the handler should run in. When the
  5353. argument is omitted, the handler will run in the thread that called
  5354. 'sigaction'.
  5355. Likewise, 'system-async-mark' takes a second, optional, argument that
  5356. specifies the thread that the async should run in. When it is
  5357. omitted, the async will run in the thread that called
  5358. 'system-async-mark'.
  5359. C code can use the new functions scm_sigaction_for_thread and
  5360. scm_system_async_mark_for_thread to pass the new thread argument.
  5361. When a thread blocks on a mutex, a condition variable or is waiting
  5362. for IO to be possible, it will still execute system asyncs. This can
  5363. be used to interrupt such a thread by making it execute a 'throw', for
  5364. example.
  5365. ** The function 'system-async' is deprecated.
  5366. You can now pass any zero-argument procedure to 'system-async-mark'.
  5367. The function 'system-async' will just return its argument unchanged
  5368. now.
  5369. ** New functions 'call-with-blocked-asyncs' and
  5370. 'call-with-unblocked-asyncs'
  5371. The expression (call-with-blocked-asyncs PROC) will call PROC and will
  5372. block execution of system asyncs for the current thread by one level
  5373. while PROC runs. Likewise, call-with-unblocked-asyncs will call a
  5374. procedure and will unblock the execution of system asyncs by one
  5375. level for the current thread.
  5376. Only system asyncs are affected by these functions.
  5377. ** The functions 'mask-signals' and 'unmask-signals' are deprecated.
  5378. Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
  5379. instead. Those functions are easier to use correctly and can be
  5380. nested.
  5381. ** New function 'unsetenv'.
  5382. ** New macro 'define-syntax-public'.
  5383. It works like 'define-syntax' and also exports the defined macro (but
  5384. only on top-level).
  5385. ** There is support for Infinity and NaNs.
  5386. Following PLT Scheme, Guile can now work with infinite numbers, and
  5387. 'not-a-numbers'.
  5388. There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
  5389. (negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
  5390. "+nan.0"). These numbers are inexact and have no exact counterpart.
  5391. Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
  5392. sign of the dividend. The infinities are integers, and they answer #t
  5393. for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
  5394. not '=' to itself, but '+nan.0' is 'eqv?' to itself.
  5395. For example
  5396. (/ 1 0.0)
  5397. => +inf.0
  5398. (/ 0 0.0)
  5399. => +nan.0
  5400. (/ 0)
  5401. ERROR: Numerical overflow
  5402. Two new predicates 'inf?' and 'nan?' can be used to test for the
  5403. special values.
  5404. ** Inexact zero can have a sign.
  5405. Guile can now distinguish between plus and minus inexact zero, if your
  5406. platform supports this, too. The two zeros are equal according to
  5407. '=', but not according to 'eqv?'. For example
  5408. (- 0.0)
  5409. => -0.0
  5410. (= 0.0 (- 0.0))
  5411. => #t
  5412. (eqv? 0.0 (- 0.0))
  5413. => #f
  5414. ** Guile now has exact rationals.
  5415. Guile can now represent fractions such as 1/3 exactly. Computing with
  5416. them is also done exactly, of course:
  5417. (* 1/3 3/2)
  5418. => 1/2
  5419. ** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
  5420. for exact arguments.
  5421. For example: (floor 2) now returns an exact 2 where in the past it
  5422. returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
  5423. ** inexact->exact no longer returns only integers.
  5424. Without exact rationals, the closest exact number was always an
  5425. integer, but now inexact->exact returns the fraction that is exactly
  5426. equal to a floating point number. For example:
  5427. (inexact->exact 1.234)
  5428. => 694680242521899/562949953421312
  5429. When you want the old behavior, use 'round' explicitly:
  5430. (inexact->exact (round 1.234))
  5431. => 1
  5432. ** New function 'rationalize'.
  5433. This function finds a simple fraction that is close to a given real
  5434. number. For example (and compare with inexact->exact above):
  5435. (rationalize (inexact->exact 1.234) 1/2000)
  5436. => 58/47
  5437. Note that, as required by R5RS, rationalize returns only then an exact
  5438. result when both its arguments are exact.
  5439. ** 'odd?' and 'even?' work also for inexact integers.
  5440. Previously, (odd? 1.0) would signal an error since only exact integers
  5441. were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
  5442. returns #f and (odd? 1.5) signals an error.
  5443. ** Guile now has uninterned symbols.
  5444. The new function 'make-symbol' will return an uninterned symbol. This
  5445. is a symbol that is unique and is guaranteed to remain unique.
  5446. However, uninterned symbols can not yet be read back in.
  5447. Use the new function 'symbol-interned?' to check whether a symbol is
  5448. interned or not.
  5449. ** pretty-print has more options.
  5450. The function pretty-print from the (ice-9 pretty-print) module can now
  5451. also be invoked with keyword arguments that control things like
  5452. maximum output width. See the manual for details.
  5453. ** Variables have no longer a special behavior for `equal?'.
  5454. Previously, comparing two variables with `equal?' would recursivly
  5455. compare their values. This is no longer done. Variables are now only
  5456. `equal?' if they are `eq?'.
  5457. ** `(begin)' is now valid.
  5458. You can now use an empty `begin' form. It will yield #<unspecified>
  5459. when evaluated and simply be ignored in a definition context.
  5460. ** Deprecated: procedure->macro
  5461. Change your code to use 'define-macro' or r5rs macros. Also, be aware
  5462. that macro expansion will not be done during evaluation, but prior to
  5463. evaluation.
  5464. ** Soft ports now allow a `char-ready?' procedure
  5465. The vector argument to `make-soft-port' can now have a length of
  5466. either 5 or 6. (Previously the length had to be 5.) The optional 6th
  5467. element is interpreted as an `input-waiting' thunk -- i.e. a thunk
  5468. that returns the number of characters that can be read immediately
  5469. without the soft port blocking.
  5470. ** Deprecated: undefine
  5471. There is no replacement for undefine.
  5472. ** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
  5473. have been discouraged.
  5474. They are relics from a time where a keyword like #:foo was used
  5475. directly as a Tcl option "-foo" and thus keywords were internally
  5476. stored as a symbol with a starting dash. We now store a symbol
  5477. without the dash.
  5478. Use symbol->keyword and keyword->symbol instead.
  5479. ** The `cheap' debug option is now obsolete
  5480. Evaluator trap calls are now unconditionally "cheap" - in other words,
  5481. they pass a debug object to the trap handler rather than a full
  5482. continuation. The trap handler code can capture a full continuation
  5483. by using `call-with-current-continuation' in the usual way, if it so
  5484. desires.
  5485. The `cheap' option is retained for now so as not to break existing
  5486. code which gets or sets it, but setting it now has no effect. It will
  5487. be removed in the next major Guile release.
  5488. ** Evaluator trap calls now support `tweaking'
  5489. `Tweaking' means that the trap handler code can modify the Scheme
  5490. expression that is about to be evaluated (in the case of an
  5491. enter-frame trap) or the value that is being returned (in the case of
  5492. an exit-frame trap). The trap handler code indicates that it wants to
  5493. do this by returning a pair whose car is the symbol 'instead and whose
  5494. cdr is the modified expression or return value.
  5495. * Changes to the C interface
  5496. ** The functions scm_hash_fn_remove_x and scm_hashx_remove_x no longer
  5497. take a 'delete' function argument.
  5498. This argument makes no sense since the delete function is used to
  5499. remove a pair from an alist, and this must not be configurable.
  5500. This is an incompatible change.
  5501. ** The GH interface is now subject to the deprecation mechanism
  5502. The GH interface has been deprecated for quite some time but now it is
  5503. actually removed from Guile when it is configured with
  5504. --disable-deprecated.
  5505. See the manual "Transitioning away from GH" for more information.
  5506. ** A new family of functions for converting between C values and
  5507. Scheme values has been added.
  5508. These functions follow a common naming scheme and are designed to be
  5509. easier to use, thread-safe and more future-proof than the older
  5510. alternatives.
  5511. - int scm_is_* (...)
  5512. These are predicates that return a C boolean: 1 or 0. Instead of
  5513. SCM_NFALSEP, you can now use scm_is_true, for example.
  5514. - <type> scm_to_<type> (SCM val, ...)
  5515. These are functions that convert a Scheme value into an appropriate
  5516. C value. For example, you can use scm_to_int to safely convert from
  5517. a SCM to an int.
  5518. - SCM scm_from_<type> (<type> val, ...)
  5519. These functions convert from a C type to a SCM value; for example,
  5520. scm_from_int for ints.
  5521. There is a huge number of these functions, for numbers, strings,
  5522. symbols, vectors, etc. They are documented in the reference manual in
  5523. the API section together with the types that they apply to.
  5524. ** New functions for dealing with complex numbers in C have been added.
  5525. The new functions are scm_c_make_rectangular, scm_c_make_polar,
  5526. scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
  5527. They work like scm_make_rectangular etc but take or return doubles
  5528. directly.
  5529. ** The function scm_make_complex has been discouraged.
  5530. Use scm_c_make_rectangular instead.
  5531. ** The INUM macros have been deprecated.
  5532. A lot of code uses these macros to do general integer conversions,
  5533. although the macros only work correctly with fixnums. Use the
  5534. following alternatives.
  5535. SCM_INUMP -> scm_is_integer or similar
  5536. SCM_NINUMP -> !scm_is_integer or similar
  5537. SCM_MAKINUM -> scm_from_int or similar
  5538. SCM_INUM -> scm_to_int or similar
  5539. SCM_VALIDATE_INUM_* -> Do not use these; scm_to_int, etc. will
  5540. do the validating for you.
  5541. ** The scm_num2<type> and scm_<type>2num functions and scm_make_real
  5542. have been discouraged.
  5543. Use the newer scm_to_<type> and scm_from_<type> functions instead for
  5544. new code. The functions have been discouraged since they don't fit
  5545. the naming scheme.
  5546. ** The 'boolean' macros SCM_FALSEP etc have been discouraged.
  5547. They have strange names, especially SCM_NFALSEP, and SCM_BOOLP
  5548. evaluates its argument twice. Use scm_is_true, etc. instead for new
  5549. code.
  5550. ** The macro SCM_EQ_P has been discouraged.
  5551. Use scm_is_eq for new code, which fits better into the naming
  5552. conventions.
  5553. ** The macros SCM_CONSP, SCM_NCONSP, SCM_NULLP, and SCM_NNULLP have
  5554. been discouraged.
  5555. Use the function scm_is_pair or scm_is_null instead.
  5556. ** The functions scm_round and scm_truncate have been deprecated and
  5557. are now available as scm_c_round and scm_c_truncate, respectively.
  5558. These functions occupy the names that scm_round_number and
  5559. scm_truncate_number should have.
  5560. ** The functions scm_c_string2str, scm_c_substring2str, and
  5561. scm_c_symbol2str have been deprecated.
  5562. Use scm_to_locale_stringbuf or similar instead, maybe together with
  5563. scm_substring.
  5564. ** New functions scm_c_make_string, scm_c_string_length,
  5565. scm_c_string_ref, scm_c_string_set_x, scm_c_substring,
  5566. scm_c_substring_shared, scm_c_substring_copy.
  5567. These are like scm_make_string, scm_length, etc. but are slightly
  5568. easier to use from C.
  5569. ** The macros SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_LENGTH,
  5570. SCM_SYMBOL_CHARS, and SCM_SYMBOL_LENGTH have been deprecated.
  5571. They export too many assumptions about the implementation of strings
  5572. and symbols that are no longer true in the presence of
  5573. mutation-sharing substrings and when Guile switches to some form of
  5574. Unicode.
  5575. When working with strings, it is often best to use the normal string
  5576. functions provided by Guile, such as scm_c_string_ref,
  5577. scm_c_string_set_x, scm_string_append, etc. Be sure to look in the
  5578. manual since many more such functions are now provided than
  5579. previously.
  5580. When you want to convert a SCM string to a C string, use the
  5581. scm_to_locale_string function or similar instead. For symbols, use
  5582. scm_symbol_to_string and then work with that string. Because of the
  5583. new string representation, scm_symbol_to_string does not need to copy
  5584. and is thus quite efficient.
  5585. ** Some string, symbol and keyword functions have been discouraged.
  5586. They don't fit into the uniform naming scheme and are not explicit
  5587. about the character encoding.
  5588. Replace according to the following table:
  5589. scm_allocate_string -> scm_c_make_string
  5590. scm_take_str -> scm_take_locale_stringn
  5591. scm_take0str -> scm_take_locale_string
  5592. scm_mem2string -> scm_from_locale_stringn
  5593. scm_str2string -> scm_from_locale_string
  5594. scm_makfrom0str -> scm_from_locale_string
  5595. scm_mem2symbol -> scm_from_locale_symboln
  5596. scm_mem2uninterned_symbol -> scm_from_locale_stringn + scm_make_symbol
  5597. scm_str2symbol -> scm_from_locale_symbol
  5598. SCM_SYMBOL_HASH -> scm_hashq
  5599. SCM_SYMBOL_INTERNED_P -> scm_symbol_interned_p
  5600. scm_c_make_keyword -> scm_from_locale_keyword
  5601. ** The functions scm_keyword_to_symbol and sym_symbol_to_keyword are
  5602. now also available to C code.
  5603. ** SCM_KEYWORDP and SCM_KEYWORDSYM have been deprecated.
  5604. Use scm_is_keyword and scm_keyword_to_symbol instead, but note that
  5605. the latter returns the true name of the keyword, not the 'dash name',
  5606. as SCM_KEYWORDSYM used to do.
  5607. ** A new way to access arrays in a thread-safe and efficient way has
  5608. been added.
  5609. See the manual, node "Accessing Arrays From C".
  5610. ** The old uniform vector and bitvector implementations have been
  5611. unceremoniously removed.
  5612. This implementation exposed the details of the tagging system of
  5613. Guile. Use the new C API explained in the manual in node "Uniform
  5614. Numeric Vectors" and "Bit Vectors", respectively.
  5615. The following macros are gone: SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
  5616. SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
  5617. SCM_SET_UVECTOR_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
  5618. SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
  5619. SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
  5620. SCM_SET_BITVECTOR_LENGTH, SCM_BITVEC_REF, SCM_BITVEC_SET,
  5621. SCM_BITVEC_CLR.
  5622. ** The macros dealing with vectors have been deprecated.
  5623. Use the new functions scm_is_vector, scm_vector_elements,
  5624. scm_vector_writable_elements, etc, or scm_is_simple_vector,
  5625. SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, etc instead. See the
  5626. manual for more details.
  5627. Deprecated are SCM_VECTORP, SCM_VELTS, SCM_VECTOR_MAX_LENGTH,
  5628. SCM_VECTOR_LENGTH, SCM_VECTOR_REF, SCM_VECTOR_SET, SCM_WRITABLE_VELTS.
  5629. The following macros have been removed: SCM_VECTOR_BASE,
  5630. SCM_SET_VECTOR_BASE, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
  5631. SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS.
  5632. ** Some C functions and macros related to arrays have been deprecated.
  5633. Migrate according to the following table:
  5634. scm_make_uve -> scm_make_typed_array, scm_make_u8vector etc.
  5635. scm_make_ra -> scm_make_array
  5636. scm_shap2ra -> scm_make_array
  5637. scm_cvref -> scm_c_generalized_vector_ref
  5638. scm_ra_set_contp -> do not use
  5639. scm_aind -> scm_array_handle_pos
  5640. scm_raprin1 -> scm_display or scm_write
  5641. SCM_ARRAYP -> scm_is_array
  5642. SCM_ARRAY_NDIM -> scm_c_array_rank
  5643. SCM_ARRAY_DIMS -> scm_array_handle_dims
  5644. SCM_ARRAY_CONTP -> do not use
  5645. SCM_ARRAY_MEM -> do not use
  5646. SCM_ARRAY_V -> scm_array_handle_elements or similar
  5647. SCM_ARRAY_BASE -> do not use
  5648. ** SCM_CELL_WORD_LOC has been deprecated.
  5649. Use the new macro SCM_CELL_OBJECT_LOC instead, which returns a pointer
  5650. to a SCM, as opposed to a pointer to a scm_t_bits.
  5651. This was done to allow the correct use of pointers into the Scheme
  5652. heap. Previously, the heap words were of type scm_t_bits and local
  5653. variables and function arguments were of type SCM, making it
  5654. non-standards-conformant to have a pointer that can point to both.
  5655. ** New macros SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, etc.
  5656. These macros should be used instead of SCM_CELL_WORD_2/3 to access the
  5657. second and third words of double smobs. Likewise for
  5658. SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3.
  5659. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
  5660. used to get and set the 16 exra bits in the zeroth word of a smob.
  5661. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
  5662. accesing the first immediate word of a smob as a SCM value, and there
  5663. is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
  5664. smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
  5665. ** New way to deal with non-local exits and re-entries.
  5666. There is a new set of functions that essentially do what
  5667. scm_internal_dynamic_wind does, but in a way that is more convenient
  5668. for C code in some situations. Here is a quick example of how to
  5669. prevent a potential memory leak:
  5670. void
  5671. foo ()
  5672. {
  5673. char *mem;
  5674. scm_dynwind_begin (0);
  5675. mem = scm_malloc (100);
  5676. scm_dynwind_unwind_handler (free, mem, SCM_F_WIND_EXPLICITLY);
  5677. /* MEM would leak if BAR throws an error.
  5678. SCM_DYNWIND_UNWIND_HANDLER frees it nevertheless.
  5679. */
  5680. bar ();
  5681. scm_dynwind_end ();
  5682. /* Because of SCM_F_WIND_EXPLICITLY, MEM will be freed by
  5683. SCM_DYNWIND_END as well.
  5684. */
  5685. }
  5686. For full documentation, see the node "Dynamic Wind" in the manual.
  5687. ** New function scm_dynwind_free
  5688. This function calls 'free' on a given pointer when a dynwind context
  5689. is left. Thus the call to scm_dynwind_unwind_handler above could be
  5690. replaced with simply scm_dynwind_free (mem).
  5691. ** New functions scm_c_call_with_blocked_asyncs and
  5692. scm_c_call_with_unblocked_asyncs
  5693. Like scm_call_with_blocked_asyncs etc. but for C functions.
  5694. ** New functions scm_dynwind_block_asyncs and scm_dynwind_unblock_asyncs
  5695. In addition to scm_c_call_with_blocked_asyncs you can now also use
  5696. scm_dynwind_block_asyncs in a 'dynwind context' (see above). Likewise for
  5697. scm_c_call_with_unblocked_asyncs and scm_dynwind_unblock_asyncs.
  5698. ** The macros SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
  5699. SCM_REALLOW_INTS have been deprecated.
  5700. They do no longer fulfill their original role of blocking signal
  5701. delivery. Depending on what you want to achieve, replace a pair of
  5702. SCM_DEFER_INTS and SCM_ALLOW_INTS with a dynwind context that locks a
  5703. mutex, blocks asyncs, or both. See node "Critical Sections" in the
  5704. manual.
  5705. ** The value 'scm_mask_ints' is no longer writable.
  5706. Previously, you could set scm_mask_ints directly. This is no longer
  5707. possible. Use scm_c_call_with_blocked_asyncs and
  5708. scm_c_call_with_unblocked_asyncs instead.
  5709. ** New way to temporarily set the current input, output or error ports
  5710. C code can now use scm_dynwind_current_<foo>_port in a 'dynwind
  5711. context' (see above). <foo> is one of "input", "output" or "error".
  5712. ** New way to temporarily set fluids
  5713. C code can now use scm_dynwind_fluid in a 'dynwind context' (see
  5714. above) to temporarily set the value of a fluid.
  5715. ** New types scm_t_intmax and scm_t_uintmax.
  5716. On platforms that have them, these types are identical to intmax_t and
  5717. uintmax_t, respectively. On other platforms, they are identical to
  5718. the largest integer types that Guile knows about.
  5719. ** The functions scm_unmemocopy and scm_unmemoize have been removed.
  5720. You should not have used them.
  5721. ** Many public #defines with generic names have been made private.
  5722. #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
  5723. private or renamed with a more suitable public name.
  5724. ** The macro SCM_TYP16S has been deprecated.
  5725. This macro is not intended for public use.
  5726. ** The macro SCM_SLOPPY_INEXACTP has been deprecated.
  5727. Use scm_is_true (scm_inexact_p (...)) instead.
  5728. ** The macro SCM_SLOPPY_REALP has been deprecated.
  5729. Use scm_is_real instead.
  5730. ** The macro SCM_SLOPPY_COMPLEXP has been deprecated.
  5731. Use scm_is_complex instead.
  5732. ** Some preprocessor defines have been deprecated.
  5733. These defines indicated whether a certain feature was present in Guile
  5734. or not. Going forward, assume that the features are always present.
  5735. The macros are: USE_THREADS, GUILE_ISELECT, READER_EXTENSIONS,
  5736. DEBUG_EXTENSIONS, DYNAMIC_LINKING.
  5737. The following macros have been removed completely: MEMOIZE_LOCALS,
  5738. SCM_RECKLESS, SCM_CAUTIOUS.
  5739. ** The preprocessor define STACK_DIRECTION has been deprecated.
  5740. There should be no need to know about the stack direction for ordinary
  5741. programs.
  5742. ** New function: scm_effective_version
  5743. Returns the "effective" version number. This is just the normal full
  5744. version string without the final micro-version number. See "Changes
  5745. to the distribution" above.
  5746. ** The function scm_call_with_new_thread has a new prototype.
  5747. Instead of taking a list with the thunk and handler, these two
  5748. arguments are now passed directly:
  5749. SCM scm_call_with_new_thread (SCM thunk, SCM handler);
  5750. This is an incompatible change.
  5751. ** New snarfer macro SCM_DEFINE_PUBLIC.
  5752. This is like SCM_DEFINE, but also calls scm_c_export for the defined
  5753. function in the init section.
  5754. ** The snarfer macro SCM_SNARF_INIT is now officially supported.
  5755. ** Garbage collector rewrite.
  5756. The garbage collector is cleaned up a lot, and now uses lazy
  5757. sweeping. This is reflected in the output of (gc-stats); since cells
  5758. are being freed when they are allocated, the cells-allocated field
  5759. stays roughly constant.
  5760. For malloc related triggers, the behavior is changed. It uses the same
  5761. heuristic as the cell-triggered collections. It may be tuned with the
  5762. environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage
  5763. for minimum yield of malloc related triggers. The default is 40.
  5764. GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
  5765. default is 200 kb.
  5766. Debugging operations for the freelist have been deprecated, along with
  5767. the C variables that control garbage collection. The environment
  5768. variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
  5769. GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
  5770. For understanding the memory usage of a GUILE program, the routine
  5771. gc-live-object-stats returns an alist containing the number of live
  5772. objects for every type.
  5773. ** The function scm_definedp has been renamed to scm_defined_p
  5774. The name scm_definedp is deprecated.
  5775. ** The struct scm_cell type has been renamed to scm_t_cell
  5776. This is in accordance to Guile's naming scheme for types. Note that
  5777. the name scm_cell is now used for a function that allocates and
  5778. initializes a new cell (see below).
  5779. ** New functions for memory management
  5780. A new set of functions for memory management has been added since the
  5781. old way (scm_must_malloc, scm_must_free, etc) was error prone and
  5782. indeed, Guile itself contained some long standing bugs that could
  5783. cause aborts in long running programs.
  5784. The new functions are more symmetrical and do not need cooperation
  5785. from smob free routines, among other improvements.
  5786. The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
  5787. scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
  5788. scm_gc_free, scm_gc_register_collectable_memory, and
  5789. scm_gc_unregister_collectable_memory. Refer to the manual for more
  5790. details and for upgrading instructions.
  5791. The old functions for memory management have been deprecated. They
  5792. are: scm_must_malloc, scm_must_realloc, scm_must_free,
  5793. scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
  5794. ** Declarations of exported features are marked with SCM_API.
  5795. Every declaration of a feature that belongs to the exported Guile API
  5796. has been marked by adding the macro "SCM_API" to the start of the
  5797. declaration. This macro can expand into different things, the most
  5798. common of which is just "extern" for Unix platforms. On Win32, it can
  5799. be used to control which symbols are exported from a DLL.
  5800. If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
  5801. will expand into "__declspec (dllimport) extern", which is needed for
  5802. linking to the Guile DLL in Windows.
  5803. There are also SCM_RL_IMPORT, SCM_SRFI1314_IMPORT, and
  5804. SCM_SRFI4_IMPORT, for the corresponding libraries.
  5805. ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
  5806. Use the new functions scm_cell and scm_double_cell instead. The old
  5807. macros had problems because with them allocation and initialization
  5808. was separated and the GC could sometimes observe half initialized
  5809. cells. Only careful coding by the user of SCM_NEWCELL and
  5810. SCM_NEWCELL2 could make this safe and efficient.
  5811. ** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
  5812. Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
  5813. instead.
  5814. ** SRCBRKP has been deprecated.
  5815. Use scm_c_source_property_breakpoint_p instead.
  5816. ** Deprecated: scm_makmacro
  5817. Change your code to use either scm_makmmacro or to define macros in
  5818. Scheme, using 'define-macro'.
  5819. ** New function scm_c_port_for_each.
  5820. This function is like scm_port_for_each but takes a pointer to a C
  5821. function as the callback instead of a SCM value.
  5822. ** The names scm_internal_select, scm_thread_sleep, and
  5823. scm_thread_usleep have been discouraged.
  5824. Use scm_std_select, scm_std_sleep, scm_std_usleep instead.
  5825. ** The GC can no longer be blocked.
  5826. The global flags scm_gc_heap_lock and scm_block_gc have been removed.
  5827. The GC can now run (partially) concurrently with other code and thus
  5828. blocking it is not well defined.
  5829. ** Many definitions have been removed that were previously deprecated.
  5830. scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify,
  5831. scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
  5832. scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2,
  5833. scm_tc16_allocated, SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
  5834. SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED,
  5835. scm_debug_newcell, scm_debug_newcell2, SCM_HUP_SIGNAL, SCM_INT_SIGNAL,
  5836. SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL,
  5837. SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG,
  5838. SCM_NUM_SIGS, scm_top_level_lookup_closure_var,
  5839. *top-level-lookup-closure*, scm_system_transformer, scm_eval_3,
  5840. scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP,
  5841. SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring,
  5842. scm_tc7_substring, sym_huh, SCM_VARVCELL, SCM_UDVARIABLEP,
  5843. SCM_DEFVARIABLEP, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
  5844. scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
  5845. SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
  5846. SCM_LENGTH_MAX, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
  5847. SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR,
  5848. scm_sym2vcell, scm_intern, scm_intern0, scm_sysintern, scm_sysintern0,
  5849. scm_sysintern0_no_module_lookup, scm_init_symbols_deprecated,
  5850. scm_vector_set_length_x, scm_contregs, scm_debug_info,
  5851. scm_debug_frame, SCM_DSIDEVAL, SCM_CONST_LONG, SCM_VCELL,
  5852. SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT,
  5853. SCM_HUGE_LENGTH, SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
  5854. SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
  5855. SCM_VALIDATE_RWSTRING, DIGITS, scm_small_istr2int, scm_istr2int,
  5856. scm_istr2flo, scm_istring2number, scm_istr2int, scm_istr2flo,
  5857. scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP,
  5858. SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
  5859. SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable,
  5860. SCM_CHARS, SCM_LENGTH, SCM_SET_STRING_CHARS, SCM_SET_STRING_LENGTH.
  5861. * Changes to bundled modules
  5862. ** (ice-9 debug)
  5863. Using the (ice-9 debug) module no longer automatically switches Guile
  5864. to use the debugging evaluator. If you want to switch to the
  5865. debugging evaluator (which is needed for backtrace information if you
  5866. hit an error), please add an explicit "(debug-enable 'debug)" to your
  5867. code just after the code to use (ice-9 debug).
  5868. Changes since Guile 1.4:
  5869. * Changes to the distribution
  5870. ** A top-level TODO file is included.
  5871. ** Guile now uses a versioning scheme similar to that of the Linux kernel.
  5872. Guile now always uses three numbers to represent the version,
  5873. i.e. "1.6.5". The first number, 1, is the major version number, the
  5874. second number, 6, is the minor version number, and the third number,
  5875. 5, is the micro version number. Changes in major version number
  5876. indicate major changes in Guile.
  5877. Minor version numbers that are even denote stable releases, and odd
  5878. minor version numbers denote development versions (which may be
  5879. unstable). The micro version number indicates a minor sub-revision of
  5880. a given MAJOR.MINOR release.
  5881. In keeping with the new scheme, (minor-version) and scm_minor_version
  5882. no longer return everything but the major version number. They now
  5883. just return the minor version number. Two new functions
  5884. (micro-version) and scm_micro_version have been added to report the
  5885. micro version number.
  5886. In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
  5887. ** New preprocessor definitions are available for checking versions.
  5888. version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
  5889. SCM_MICRO_VERSION to the appropriate integer values.
  5890. ** Guile now actively warns about deprecated features.
  5891. The new configure option `--enable-deprecated=LEVEL' and the
  5892. environment variable GUILE_WARN_DEPRECATED control this mechanism.
  5893. See INSTALL and README for more information.
  5894. ** Guile is much more likely to work on 64-bit architectures.
  5895. Guile now compiles and passes "make check" with only two UNRESOLVED GC
  5896. cases on Alpha and ia64 based machines now. Thanks to John Goerzen
  5897. for the use of a test machine, and thanks to Stefan Jahn for ia64
  5898. patches.
  5899. ** New functions: setitimer and getitimer.
  5900. These implement a fairly direct interface to the libc functions of the
  5901. same name.
  5902. ** The #. reader extension is now disabled by default.
  5903. For safety reasons, #. evaluation is disabled by default. To
  5904. re-enable it, set the fluid read-eval? to #t. For example:
  5905. (fluid-set! read-eval? #t)
  5906. but make sure you realize the potential security risks involved. With
  5907. read-eval? enabled, reading a data file from an untrusted source can
  5908. be dangerous.
  5909. ** New SRFI modules have been added:
  5910. SRFI-0 `cond-expand' is now supported in Guile, without requiring
  5911. using a module.
  5912. (srfi srfi-1) is a library containing many useful pair- and list-processing
  5913. procedures.
  5914. (srfi srfi-2) exports and-let*.
  5915. (srfi srfi-4) implements homogeneous numeric vector datatypes.
  5916. (srfi srfi-6) is a dummy module for now, since guile already provides
  5917. all of the srfi-6 procedures by default: open-input-string,
  5918. open-output-string, get-output-string.
  5919. (srfi srfi-8) exports receive.
  5920. (srfi srfi-9) exports define-record-type.
  5921. (srfi srfi-10) exports define-reader-ctor and implements the reader
  5922. extension #,().
  5923. (srfi srfi-11) exports let-values and let*-values.
  5924. (srfi srfi-13) implements the SRFI String Library.
  5925. (srfi srfi-14) implements the SRFI Character-Set Library.
  5926. (srfi srfi-17) implements setter and getter-with-setter and redefines
  5927. some accessor procedures as procedures with getters. (such as car,
  5928. cdr, vector-ref etc.)
  5929. (srfi srfi-19) implements the SRFI Time/Date Library.
  5930. ** New scripts / "executable modules"
  5931. Subdirectory "scripts" contains Scheme modules that are packaged to
  5932. also be executable as scripts. At this time, these scripts are available:
  5933. display-commentary
  5934. doc-snarf
  5935. generate-autoload
  5936. punify
  5937. read-scheme-source
  5938. use2dot
  5939. See README there for more info.
  5940. These scripts can be invoked from the shell with the new program
  5941. "guile-tools", which keeps track of installation directory for you.
  5942. For example:
  5943. $ guile-tools display-commentary srfi/*.scm
  5944. guile-tools is copied to the standard $bindir on "make install".
  5945. ** New module (ice-9 stack-catch):
  5946. stack-catch is like catch, but saves the current state of the stack in
  5947. the fluid the-last-stack. This fluid can be useful when using the
  5948. debugger and when re-throwing an error.
  5949. ** The module (ice-9 and-let*) has been renamed to (ice-9 and-let-star)
  5950. This has been done to prevent problems on lesser operating systems
  5951. that can't tolerate `*'s in file names. The exported macro continues
  5952. to be named `and-let*', of course.
  5953. On systems that support it, there is also a compatibility module named
  5954. (ice-9 and-let*). It will go away in the next release.
  5955. ** New modules (oop goops) etc.:
  5956. (oop goops)
  5957. (oop goops describe)
  5958. (oop goops save)
  5959. (oop goops active-slot)
  5960. (oop goops composite-slot)
  5961. The Guile Object Oriented Programming System (GOOPS) has been
  5962. integrated into Guile. For further information, consult the GOOPS
  5963. manual and tutorial in the `doc' directory.
  5964. ** New module (ice-9 rdelim).
  5965. This exports the following procedures which were previously defined
  5966. in the default environment:
  5967. read-line read-line! read-delimited read-delimited! %read-delimited!
  5968. %read-line write-line
  5969. For backwards compatibility the definitions are still imported into the
  5970. default environment in this version of Guile. However you should add:
  5971. (use-modules (ice-9 rdelim))
  5972. to any program which uses the definitions, since this may change in
  5973. future.
  5974. Alternatively, if guile-scsh is installed, the (scsh rdelim) module
  5975. can be used for similar functionality.
  5976. ** New module (ice-9 rw)
  5977. This is a subset of the (scsh rw) module from guile-scsh. Currently
  5978. it defines two procedures:
  5979. *** New function: read-string!/partial str [port_or_fdes [start [end]]]
  5980. Read characters from a port or file descriptor into a string STR.
  5981. A port must have an underlying file descriptor -- a so-called
  5982. fport. This procedure is scsh-compatible and can efficiently read
  5983. large strings.
  5984. *** New function: write-string/partial str [port_or_fdes [start [end]]]
  5985. Write characters from a string STR to a port or file descriptor.
  5986. A port must have an underlying file descriptor -- a so-called
  5987. fport. This procedure is mostly compatible and can efficiently
  5988. write large strings.
  5989. ** New module (ice-9 match)
  5990. This module includes Andrew K. Wright's pattern matcher. See
  5991. ice-9/match.scm for brief description or
  5992. http://www.star-lab.com/wright/code.html
  5993. for complete documentation.
  5994. ** New module (ice-9 buffered-input)
  5995. This module provides procedures to construct an input port from an
  5996. underlying source of input that reads and returns its input in chunks.
  5997. The underlying input source is a Scheme procedure, specified by the
  5998. caller, which the port invokes whenever it needs more input.
  5999. This is useful when building an input port whose back end is Readline
  6000. or a UI element such as the GtkEntry widget.
  6001. ** Documentation
  6002. The reference and tutorial documentation that was previously
  6003. distributed separately, as `guile-doc', is now included in the core
  6004. Guile distribution. The documentation consists of the following
  6005. manuals.
  6006. - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction
  6007. to using Guile.
  6008. - The Guile Reference Manual (guile.texi) contains (or is intended to
  6009. contain) reference documentation on all aspects of Guile.
  6010. - The GOOPS Manual (goops.texi) contains both tutorial-style and
  6011. reference documentation for using GOOPS, Guile's Object Oriented
  6012. Programming System.
  6013. - The Revised^5 Report on the Algorithmic Language Scheme
  6014. (r5rs.texi).
  6015. See the README file in the `doc' directory for more details.
  6016. ** There are a couple of examples in the examples/ directory now.
  6017. * Changes to the stand-alone interpreter
  6018. ** New command line option `--use-srfi'
  6019. Using this option, SRFI modules can be loaded on startup and be
  6020. available right from the beginning. This makes programming portable
  6021. Scheme programs easier.
  6022. The option `--use-srfi' expects a comma-separated list of numbers,
  6023. each representing a SRFI number to be loaded into the interpreter
  6024. before starting evaluating a script file or the REPL. Additionally,
  6025. the feature identifier for the loaded SRFIs is recognized by
  6026. `cond-expand' when using this option.
  6027. Example:
  6028. $ guile --use-srfi=8,13
  6029. guile> (receive (x z) (values 1 2) (+ 1 2))
  6030. 3
  6031. guile> (string-pad "bla" 20)
  6032. " bla"
  6033. ** Guile now always starts up in the `(guile-user)' module.
  6034. Previously, scripts executed via the `-s' option would run in the
  6035. `(guile)' module and the repl would run in the `(guile-user)' module.
  6036. Now every user action takes place in the `(guile-user)' module by
  6037. default.
  6038. * Changes to Scheme functions and syntax
  6039. ** Character classifiers work for non-ASCII characters.
  6040. The predicates `char-alphabetic?', `char-numeric?',
  6041. `char-whitespace?', `char-lower?', `char-upper?' and `char-is-both?'
  6042. no longer check whether their arguments are ASCII characters.
  6043. Previously, a character would only be considered alphabetic when it
  6044. was also ASCII, for example.
  6045. ** Previously deprecated Scheme functions have been removed:
  6046. tag - no replacement.
  6047. fseek - replaced by seek.
  6048. list* - replaced by cons*.
  6049. ** It's now possible to create modules with controlled environments
  6050. Example:
  6051. (use-modules (ice-9 safe))
  6052. (define m (make-safe-module))
  6053. ;;; m will now be a module containing only a safe subset of R5RS
  6054. (eval '(+ 1 2) m) --> 3
  6055. (eval 'load m) --> ERROR: Unbound variable: load
  6056. ** Evaluation of "()", the empty list, is now an error.
  6057. Previously, the expression "()" evaluated to the empty list. This has
  6058. been changed to signal a "missing expression" error. The correct way
  6059. to write the empty list as a literal constant is to use quote: "'()".
  6060. ** New concept of `Guile Extensions'.
  6061. A Guile Extension is just a ordinary shared library that can be linked
  6062. at run-time. We found it advantageous to give this simple concept a
  6063. dedicated name to distinguish the issues related to shared libraries
  6064. from the issues related to the module system.
  6065. *** New function: load-extension
  6066. Executing (load-extension lib init) is mostly equivalent to
  6067. (dynamic-call init (dynamic-link lib))
  6068. except when scm_register_extension has been called previously.
  6069. Whenever appropriate, you should use `load-extension' instead of
  6070. dynamic-link and dynamic-call.
  6071. *** New C function: scm_c_register_extension
  6072. This function registers a initialization function for use by
  6073. `load-extension'. Use it when you don't want specific extensions to
  6074. be loaded as shared libraries (for example on platforms that don't
  6075. support dynamic linking).
  6076. ** Auto-loading of compiled-code modules is deprecated.
  6077. Guile used to be able to automatically find and link a shared
  6078. library to satisfy requests for a module. For example, the module
  6079. `(foo bar)' could be implemented by placing a shared library named
  6080. "foo/libbar.so" (or with a different extension) in a directory on the
  6081. load path of Guile.
  6082. This has been found to be too tricky, and is no longer supported. The
  6083. shared libraries are now called "extensions". You should now write a
  6084. small Scheme file that calls `load-extension' to load the shared
  6085. library and initialize it explicitly.
  6086. The shared libraries themselves should be installed in the usual
  6087. places for shared libraries, with names like "libguile-foo-bar".
  6088. For example, place this into a file "foo/bar.scm"
  6089. (define-module (foo bar))
  6090. (load-extension "libguile-foo-bar" "foobar_init")
  6091. ** Backward incompatible change: eval EXP ENVIRONMENT-SPECIFIER
  6092. `eval' is now R5RS, that is it takes two arguments.
  6093. The second argument is an environment specifier, i.e. either
  6094. (scheme-report-environment 5)
  6095. (null-environment 5)
  6096. (interaction-environment)
  6097. or
  6098. any module.
  6099. ** The module system has been made more disciplined.
  6100. The function `eval' will save and restore the current module around
  6101. the evaluation of the specified expression. While this expression is
  6102. evaluated, `(current-module)' will now return the right module, which
  6103. is the module specified as the second argument to `eval'.
  6104. A consequence of this change is that `eval' is not particularly
  6105. useful when you want allow the evaluated code to change what module is
  6106. designated as the current module and have this change persist from one
  6107. call to `eval' to the next. The read-eval-print-loop is an example
  6108. where `eval' is now inadequate. To compensate, there is a new
  6109. function `primitive-eval' that does not take a module specifier and
  6110. that does not save/restore the current module. You should use this
  6111. function together with `set-current-module', `current-module', etc
  6112. when you want to have more control over the state that is carried from
  6113. one eval to the next.
  6114. Additionally, it has been made sure that forms that are evaluated at
  6115. the top level are always evaluated with respect to the current module.
  6116. Previously, subforms of top-level forms such as `begin', `case',
  6117. etc. did not respect changes to the current module although these
  6118. subforms are at the top-level as well.
  6119. To prevent strange behavior, the forms `define-module',
  6120. `use-modules', `use-syntax', and `export' have been restricted to only
  6121. work on the top level. The forms `define-public' and
  6122. `defmacro-public' only export the new binding on the top level. They
  6123. behave just like `define' and `defmacro', respectively, when they are
  6124. used in a lexical environment.
  6125. Also, `export' will no longer silently re-export bindings imported
  6126. from a used module. It will emit a `deprecation' warning and will
  6127. cease to perform any re-export in the next version. If you actually
  6128. want to re-export bindings, use the new `re-export' in place of
  6129. `export'. The new `re-export' will not make copies of variables when
  6130. rexporting them, as `export' did wrongly.
  6131. ** Module system now allows selection and renaming of imported bindings
  6132. Previously, when using `use-modules' or the `#:use-module' clause in
  6133. the `define-module' form, all the bindings (association of symbols to
  6134. values) for imported modules were added to the "current module" on an
  6135. as-is basis. This has been changed to allow finer control through two
  6136. new facilities: selection and renaming.
  6137. You can now select which of the imported module's bindings are to be
  6138. visible in the current module by using the `:select' clause. This
  6139. clause also can be used to rename individual bindings. For example:
  6140. ;; import all bindings no questions asked
  6141. (use-modules (ice-9 common-list))
  6142. ;; import four bindings, renaming two of them;
  6143. ;; the current module sees: every some zonk-y zonk-n
  6144. (use-modules ((ice-9 common-list)
  6145. :select (every some
  6146. (remove-if . zonk-y)
  6147. (remove-if-not . zonk-n))))
  6148. You can also programmatically rename all selected bindings using the
  6149. `:renamer' clause, which specifies a proc that takes a symbol and
  6150. returns another symbol. Because it is common practice to use a prefix,
  6151. we now provide the convenience procedure `symbol-prefix-proc'. For
  6152. example:
  6153. ;; import four bindings, renaming two of them specifically,
  6154. ;; and all four w/ prefix "CL:";
  6155. ;; the current module sees: CL:every CL:some CL:zonk-y CL:zonk-n
  6156. (use-modules ((ice-9 common-list)
  6157. :select (every some
  6158. (remove-if . zonk-y)
  6159. (remove-if-not . zonk-n))
  6160. :renamer (symbol-prefix-proc 'CL:)))
  6161. ;; import four bindings, renaming two of them specifically,
  6162. ;; and all four by upcasing.
  6163. ;; the current module sees: EVERY SOME ZONK-Y ZONK-N
  6164. (define (upcase-symbol sym)
  6165. (string->symbol (string-upcase (symbol->string sym))))
  6166. (use-modules ((ice-9 common-list)
  6167. :select (every some
  6168. (remove-if . zonk-y)
  6169. (remove-if-not . zonk-n))
  6170. :renamer upcase-symbol))
  6171. Note that programmatic renaming is done *after* individual renaming.
  6172. Also, the above examples show `use-modules', but the same facilities are
  6173. available for the `#:use-module' clause of `define-module'.
  6174. See manual for more info.
  6175. ** The semantics of guardians have changed.
  6176. The changes are for the most part compatible. An important criterion
  6177. was to keep the typical usage of guardians as simple as before, but to
  6178. make the semantics safer and (as a result) more useful.
  6179. *** All objects returned from guardians are now properly alive.
  6180. It is now guaranteed that any object referenced by an object returned
  6181. from a guardian is alive. It's now impossible for a guardian to
  6182. return a "contained" object before its "containing" object.
  6183. One incompatible (but probably not very important) change resulting
  6184. from this is that it is no longer possible to guard objects that
  6185. indirectly reference themselves (i.e. are parts of cycles). If you do
  6186. so accidentally, you'll get a warning.
  6187. *** There are now two types of guardians: greedy and sharing.
  6188. If you call (make-guardian #t) or just (make-guardian), you'll get a
  6189. greedy guardian, and for (make-guardian #f) a sharing guardian.
  6190. Greedy guardians are the default because they are more "defensive".
  6191. You can only greedily guard an object once. If you guard an object
  6192. more than once, once in a greedy guardian and the rest of times in
  6193. sharing guardians, then it is guaranteed that the object won't be
  6194. returned from sharing guardians as long as it is greedily guarded
  6195. and/or alive.
  6196. Guardians returned by calls to `make-guardian' can now take one more
  6197. optional parameter, which says whether to throw an error in case an
  6198. attempt is made to greedily guard an object that is already greedily
  6199. guarded. The default is true, i.e. throw an error. If the parameter
  6200. is false, the guardian invocation returns #t if guarding was
  6201. successful and #f if it wasn't.
  6202. Also, since greedy guarding is, in effect, a side-effecting operation
  6203. on objects, a new function is introduced: `destroy-guardian!'.
  6204. Invoking this function on a guardian renders it unoperative and, if
  6205. the guardian is greedy, clears the "greedily guarded" property of the
  6206. objects that were guarded by it, thus undoing the side effect.
  6207. Note that all this hair is hardly very important, since guardian
  6208. objects are usually permanent.
  6209. ** Continuations created by call-with-current-continuation now accept
  6210. any number of arguments, as required by R5RS.
  6211. ** New function `issue-deprecation-warning'
  6212. This function is used to display the deprecation messages that are
  6213. controlled by GUILE_WARN_DEPRECATION as explained in the README.
  6214. (define (id x)
  6215. (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
  6216. (identity x))
  6217. guile> (id 1)
  6218. ;; `id' is deprecated. Use `identity' instead.
  6219. 1
  6220. guile> (id 1)
  6221. 1
  6222. ** New syntax `begin-deprecated'
  6223. When deprecated features are included (as determined by the configure
  6224. option --enable-deprecated), `begin-deprecated' is identical to
  6225. `begin'. When deprecated features are excluded, it always evaluates
  6226. to `#f', ignoring the body forms.
  6227. ** New function `make-object-property'
  6228. This function returns a new `procedure with setter' P that can be used
  6229. to attach a property to objects. When calling P as
  6230. (set! (P obj) val)
  6231. where `obj' is any kind of object, it attaches `val' to `obj' in such
  6232. a way that it can be retrieved by calling P as
  6233. (P obj)
  6234. This function will replace procedure properties, symbol properties and
  6235. source properties eventually.
  6236. ** Module (ice-9 optargs) now uses keywords instead of `#&'.
  6237. Instead of #&optional, #&key, etc you should now use #:optional,
  6238. #:key, etc. Since #:optional is a keyword, you can write it as just
  6239. :optional when (read-set! keywords 'prefix) is active.
  6240. The old reader syntax `#&' is still supported, but deprecated. It
  6241. will be removed in the next release.
  6242. ** New define-module option: pure
  6243. Tells the module system not to include any bindings from the root
  6244. module.
  6245. Example:
  6246. (define-module (totally-empty-module)
  6247. :pure)
  6248. ** New define-module option: export NAME1 ...
  6249. Export names NAME1 ...
  6250. This option is required if you want to be able to export bindings from
  6251. a module which doesn't import one of `define-public' or `export'.
  6252. Example:
  6253. (define-module (foo)
  6254. :pure
  6255. :use-module (ice-9 r5rs)
  6256. :export (bar))
  6257. ;;; Note that we're pure R5RS below this point!
  6258. (define (bar)
  6259. ...)
  6260. ** New function: object->string OBJ
  6261. Return a Scheme string obtained by printing a given object.
  6262. ** New function: port? X
  6263. Returns a boolean indicating whether X is a port. Equivalent to
  6264. `(or (input-port? X) (output-port? X))'.
  6265. ** New function: file-port?
  6266. Determines whether a given object is a port that is related to a file.
  6267. ** New function: port-for-each proc
  6268. Apply PROC to each port in the Guile port table in turn. The return
  6269. value is unspecified. More specifically, PROC is applied exactly once
  6270. to every port that exists in the system at the time PORT-FOR-EACH is
  6271. invoked. Changes to the port table while PORT-FOR-EACH is running
  6272. have no effect as far as PORT-FOR-EACH is concerned.
  6273. ** New function: dup2 oldfd newfd
  6274. A simple wrapper for the `dup2' system call. Copies the file
  6275. descriptor OLDFD to descriptor number NEWFD, replacing the
  6276. previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
  6277. Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  6278. to move away ports which are using NEWFD. The return value is
  6279. unspecified.
  6280. ** New function: close-fdes fd
  6281. A simple wrapper for the `close' system call. Close file
  6282. descriptor FD, which must be an integer. Unlike close (*note
  6283. close: Ports and File Descriptors.), the file descriptor will be
  6284. closed even if a port is using it. The return value is
  6285. unspecified.
  6286. ** New function: crypt password salt
  6287. Encrypts `password' using the standard unix password encryption
  6288. algorithm.
  6289. ** New function: chroot path
  6290. Change the root directory of the running process to `path'.
  6291. ** New functions: getlogin, cuserid
  6292. Return the login name or the user name of the current effective user
  6293. id, respectively.
  6294. ** New functions: getpriority which who, setpriority which who prio
  6295. Get or set the priority of the running process.
  6296. ** New function: getpass prompt
  6297. Read a password from the terminal, first displaying `prompt' and
  6298. disabling echoing.
  6299. ** New function: flock file operation
  6300. Set/remove an advisory shared or exclusive lock on `file'.
  6301. ** New functions: sethostname name, gethostname
  6302. Set or get the hostname of the machine the current process is running
  6303. on.
  6304. ** New function: mkstemp! tmpl
  6305. mkstemp creates a new unique file in the file system and returns a
  6306. new buffered port open for reading and writing to the file. TMPL
  6307. is a string specifying where the file should be created: it must
  6308. end with `XXXXXX' and will be changed in place to return the name
  6309. of the temporary file.
  6310. ** New function: open-input-string string
  6311. Return an input string port which delivers the characters from
  6312. `string'. This procedure, together with `open-output-string' and
  6313. `get-output-string' implements SRFI-6.
  6314. ** New function: open-output-string
  6315. Return an output string port which collects all data written to it.
  6316. The data can then be retrieved by `get-output-string'.
  6317. ** New function: get-output-string
  6318. Return the contents of an output string port.
  6319. ** New function: identity
  6320. Return the argument.
  6321. ** socket, connect, accept etc., now have support for IPv6. IPv6 addresses
  6322. are represented in Scheme as integers with normal host byte ordering.
  6323. ** New function: inet-pton family address
  6324. Convert a printable string network address into an integer. Note that
  6325. unlike the C version of this function, the result is an integer with
  6326. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6327. e.g.,
  6328. (inet-pton AF_INET "127.0.0.1") => 2130706433
  6329. (inet-pton AF_INET6 "::1") => 1
  6330. ** New function: inet-ntop family address
  6331. Convert an integer network address into a printable string. Note that
  6332. unlike the C version of this function, the input is an integer with
  6333. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6334. e.g.,
  6335. (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  6336. (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  6337. ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  6338. ** Deprecated: id
  6339. Use `identity' instead.
  6340. ** Deprecated: -1+
  6341. Use `1-' instead.
  6342. ** Deprecated: return-it
  6343. Do without it.
  6344. ** Deprecated: string-character-length
  6345. Use `string-length' instead.
  6346. ** Deprecated: flags
  6347. Use `logior' instead.
  6348. ** Deprecated: close-all-ports-except.
  6349. This was intended for closing ports in a child process after a fork,
  6350. but it has the undesirable side effect of flushing buffers.
  6351. port-for-each is more flexible.
  6352. ** The (ice-9 popen) module now attempts to set up file descriptors in
  6353. the child process from the current Scheme ports, instead of using the
  6354. current values of file descriptors 0, 1, and 2 in the parent process.
  6355. ** Removed function: builtin-weak-bindings
  6356. There is no such concept as a weak binding any more.
  6357. ** Removed constants: bignum-radix, scm-line-incrementors
  6358. ** define-method: New syntax mandatory.
  6359. The new method syntax is now mandatory:
  6360. (define-method (NAME ARG-SPEC ...) BODY ...)
  6361. (define-method (NAME ARG-SPEC ... . REST-ARG) BODY ...)
  6362. ARG-SPEC ::= ARG-NAME | (ARG-NAME TYPE)
  6363. REST-ARG ::= ARG-NAME
  6364. If you have old code using the old syntax, import
  6365. (oop goops old-define-method) before (oop goops) as in:
  6366. (use-modules (oop goops old-define-method) (oop goops))
  6367. ** Deprecated function: builtin-variable
  6368. Removed function: builtin-bindings
  6369. There is no longer a distinction between builtin or other variables.
  6370. Use module system operations for all variables.
  6371. ** Lazy-catch handlers are no longer allowed to return.
  6372. That is, a call to `throw', `error', etc is now guaranteed to not
  6373. return.
  6374. ** Bugfixes for (ice-9 getopt-long)
  6375. This module is now tested using test-suite/tests/getopt-long.test.
  6376. The following bugs have been fixed:
  6377. *** Parsing for options that are specified to have `optional' args now checks
  6378. if the next element is an option instead of unconditionally taking it as the
  6379. option arg.
  6380. *** An error is now thrown for `--opt=val' when the option description
  6381. does not specify `(value #t)' or `(value optional)'. This condition used to
  6382. be accepted w/o error, contrary to the documentation.
  6383. *** The error message for unrecognized options is now more informative.
  6384. It used to be "not a record", an artifact of the implementation.
  6385. *** The error message for `--opt' terminating the arg list (no value), when
  6386. `(value #t)' is specified, is now more informative. It used to be "not enough
  6387. args".
  6388. *** "Clumped" single-char args now preserve trailing string, use it as arg.
  6389. The expansion used to be like so:
  6390. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "--xyz")
  6391. Note that the "5d" is dropped. Now it is like so:
  6392. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "5d" "--xyz")
  6393. This enables single-char options to have adjoining arguments as long as their
  6394. constituent characters are not potential single-char options.
  6395. ** (ice-9 session) procedure `arity' now works with (ice-9 optargs) `lambda*'
  6396. The `lambda*' and derivative forms in (ice-9 optargs) now set a procedure
  6397. property `arglist', which can be retrieved by `arity'. The result is that
  6398. `arity' can give more detailed information than before:
  6399. Before:
  6400. guile> (use-modules (ice-9 optargs))
  6401. guile> (define* (foo #:optional a b c) a)
  6402. guile> (arity foo)
  6403. 0 or more arguments in `lambda*:G0'.
  6404. After:
  6405. guile> (arity foo)
  6406. 3 optional arguments: `a', `b' and `c'.
  6407. guile> (define* (bar a b #:key c d #:allow-other-keys) a)
  6408. guile> (arity bar)
  6409. 2 required arguments: `a' and `b', 2 keyword arguments: `c'
  6410. and `d', other keywords allowed.
  6411. guile> (define* (baz a b #:optional c #:rest r) a)
  6412. guile> (arity baz)
  6413. 2 required arguments: `a' and `b', 1 optional argument: `c',
  6414. the rest in `r'.
  6415. * Changes to the C interface
  6416. ** Types have been renamed from scm_*_t to scm_t_*.
  6417. This has been done for POSIX sake. It reserves identifiers ending
  6418. with "_t". What a concept.
  6419. The old names are still available with status `deprecated'.
  6420. ** scm_t_bits (former scm_bits_t) is now a unsigned type.
  6421. ** Deprecated features have been removed.
  6422. *** Macros removed
  6423. SCM_INPORTP, SCM_OUTPORTP SCM_ICHRP, SCM_ICHR, SCM_MAKICHR
  6424. SCM_SETJMPBUF SCM_NSTRINGP SCM_NRWSTRINGP SCM_NVECTORP SCM_DOUBLE_CELLP
  6425. *** C Functions removed
  6426. scm_sysmissing scm_tag scm_tc16_flo scm_tc_flo
  6427. scm_fseek - replaced by scm_seek.
  6428. gc-thunk - replaced by after-gc-hook.
  6429. gh_int2scmb - replaced by gh_bool2scm.
  6430. scm_tc_dblr - replaced by scm_tc16_real.
  6431. scm_tc_dblc - replaced by scm_tc16_complex.
  6432. scm_list_star - replaced by scm_cons_star.
  6433. ** Deprecated: scm_makfromstr
  6434. Use scm_mem2string instead.
  6435. ** Deprecated: scm_make_shared_substring
  6436. Explicit shared substrings will disappear from Guile.
  6437. Instead, "normal" strings will be implemented using sharing
  6438. internally, combined with a copy-on-write strategy.
  6439. ** Deprecated: scm_read_only_string_p
  6440. The concept of read-only strings will disappear in next release of
  6441. Guile.
  6442. ** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
  6443. Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
  6444. ** New functions: scm_call_0, scm_call_1, scm_call_2, scm_call_3
  6445. Call a procedure with the indicated number of arguments. See "Fly
  6446. Evaluation" in the manual.
  6447. ** New functions: scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3
  6448. Call a procedure with the indicated number of arguments and a list of
  6449. further arguments. See "Fly Evaluation" in the manual.
  6450. ** New functions: scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5
  6451. Create a list of the given number of elements. See "List
  6452. Constructors" in the manual.
  6453. ** Renamed function: scm_listify has been replaced by scm_list_n.
  6454. ** Deprecated macros: SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4,
  6455. SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9.
  6456. Use functions scm_list_N instead.
  6457. ** New function: scm_c_read (SCM port, void *buffer, scm_sizet size)
  6458. Used by an application to read arbitrary number of bytes from a port.
  6459. Same semantics as libc read, except that scm_c_read only returns less
  6460. than SIZE bytes if at end-of-file.
  6461. Warning: Doesn't update port line and column counts!
  6462. ** New function: scm_c_write (SCM port, const void *ptr, scm_sizet size)
  6463. Used by an application to write arbitrary number of bytes to an SCM
  6464. port. Similar semantics as libc write. However, unlike libc
  6465. write, scm_c_write writes the requested number of bytes and has no
  6466. return value.
  6467. Warning: Doesn't update port line and column counts!
  6468. ** New function: scm_init_guile ()
  6469. In contrast to scm_boot_guile, scm_init_guile will return normally
  6470. after initializing Guile. It is not available on all systems, tho.
  6471. ** New functions: scm_str2symbol, scm_mem2symbol
  6472. The function scm_str2symbol takes a const char* pointing to a zero-terminated
  6473. field of characters and creates a scheme symbol object from that C string.
  6474. The function scm_mem2symbol takes a const char* and a number of characters and
  6475. creates a symbol from the characters in that memory area.
  6476. ** New functions: scm_primitive_make_property
  6477. scm_primitive_property_ref
  6478. scm_primitive_property_set_x
  6479. scm_primitive_property_del_x
  6480. These functions implement a new way to deal with object properties.
  6481. See libguile/properties.c for their documentation.
  6482. ** New function: scm_done_free (long size)
  6483. This function is the inverse of scm_done_malloc. Use it to report the
  6484. amount of smob memory you free. The previous method, which involved
  6485. calling scm_done_malloc with negative argument, was somewhat
  6486. unintuitive (and is still available, of course).
  6487. ** New function: scm_c_memq (SCM obj, SCM list)
  6488. This function provides a fast C level alternative for scm_memq for the case
  6489. that the list parameter is known to be a proper list. The function is a
  6490. replacement for scm_sloppy_memq, but is stricter in its requirements on its
  6491. list input parameter, since for anything else but a proper list the function's
  6492. behaviour is undefined - it may even crash or loop endlessly. Further, for
  6493. the case that the object is not found in the list, scm_c_memq returns #f which
  6494. is similar to scm_memq, but different from scm_sloppy_memq's behaviour.
  6495. ** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
  6496. scm_remember_upto_here
  6497. These functions replace the function scm_remember.
  6498. ** Deprecated function: scm_remember
  6499. Use one of the new functions scm_remember_upto_here_1,
  6500. scm_remember_upto_here_2 or scm_remember_upto_here instead.
  6501. ** New function: scm_allocate_string
  6502. This function replaces the function scm_makstr.
  6503. ** Deprecated function: scm_makstr
  6504. Use the new function scm_allocate_string instead.
  6505. ** New global variable scm_gc_running_p introduced.
  6506. Use this variable to find out if garbage collection is being executed. Up to
  6507. now applications have used scm_gc_heap_lock to test if garbage collection was
  6508. running, which also works because of the fact that up to know only the garbage
  6509. collector has set this variable. But, this is an implementation detail that
  6510. may change. Further, scm_gc_heap_lock is not set throughout gc, thus the use
  6511. of this variable is (and has been) not fully safe anyway.
  6512. ** New macros: SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH
  6513. Use these instead of SCM_LENGTH_MAX.
  6514. ** New macros: SCM_CONTINUATION_LENGTH, SCM_CCLO_LENGTH, SCM_STACK_LENGTH,
  6515. SCM_STRING_LENGTH, SCM_SYMBOL_LENGTH, SCM_UVECTOR_LENGTH,
  6516. SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
  6517. Use these instead of SCM_LENGTH.
  6518. ** New macros: SCM_SET_CONTINUATION_LENGTH, SCM_SET_STRING_LENGTH,
  6519. SCM_SET_SYMBOL_LENGTH, SCM_SET_VECTOR_LENGTH, SCM_SET_UVECTOR_LENGTH,
  6520. SCM_SET_BITVECTOR_LENGTH
  6521. Use these instead of SCM_SETLENGTH
  6522. ** New macros: SCM_STRING_CHARS, SCM_SYMBOL_CHARS, SCM_CCLO_BASE,
  6523. SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
  6524. SCM_ARRAY_MEM
  6525. Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
  6526. SCM_VELTS.
  6527. ** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
  6528. SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
  6529. SCM_SET_VECTOR_BASE
  6530. Use these instead of SCM_SETCHARS.
  6531. ** New macro: SCM_BITVECTOR_P
  6532. ** New macro: SCM_STRING_COERCE_0TERMINATION_X
  6533. Use instead of SCM_COERCE_SUBSTR.
  6534. ** New macros: SCM_DIR_OPEN_P, SCM_DIR_FLAG_OPEN
  6535. For directory objects, use these instead of SCM_OPDIRP and SCM_OPN.
  6536. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
  6537. SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
  6538. SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
  6539. SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP,
  6540. SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
  6541. SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
  6542. SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
  6543. SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
  6544. SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
  6545. SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
  6546. SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC,
  6547. SCM_OPDIRP, SCM_VALIDATE_OPDIR, SCM_WTA, RETURN_SCM_WTA, SCM_CONST_LONG,
  6548. SCM_WNA, SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
  6549. SCM_VALIDATE_NUMBER_DEF_COPY, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
  6550. SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_SETAND_CAR, SCM_SETOR_CAR
  6551. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
  6552. Use scm_memory_error instead of SCM_NALLOC.
  6553. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
  6554. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR.
  6555. Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP
  6556. Use a type specific accessor macro instead of SCM_CHARS/SCM_UCHARS.
  6557. Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
  6558. Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
  6559. Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
  6560. Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
  6561. Use SCM_STRINGP instead of SCM_RWSTRINGP.
  6562. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
  6563. Use SCM_STRING_CHARS instead of SCM_ROCHARS.
  6564. Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
  6565. Use a type specific setter macro instead of SCM_SETLENGTH.
  6566. Use a type specific setter macro instead of SCM_SETCHARS.
  6567. Use a type specific length macro instead of SCM_LENGTH_MAX.
  6568. Use SCM_GCMARKP instead of SCM_GC8MARKP.
  6569. Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
  6570. Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
  6571. Use SCM_TYP16 instead of SCM_GCTYP16.
  6572. Use SCM_CDR instead of SCM_GCCDR.
  6573. Use SCM_DIR_OPEN_P instead of SCM_OPDIRP.
  6574. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of SCM_WTA.
  6575. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of RETURN_SCM_WTA.
  6576. Use SCM_VCELL_INIT instead of SCM_CONST_LONG.
  6577. Use SCM_WRONG_NUM_ARGS instead of SCM_WNA.
  6578. Use SCM_CONSP instead of SCM_SLOPPY_CONSP.
  6579. Use !SCM_CONSP instead of SCM_SLOPPY_NCONSP.
  6580. ** Removed function: scm_struct_init
  6581. ** Removed variable: scm_symhash_dim
  6582. ** Renamed function: scm_make_cont has been replaced by
  6583. scm_make_continuation, which has a different interface.
  6584. ** Deprecated function: scm_call_catching_errors
  6585. Use scm_catch or scm_lazy_catch from throw.[ch] instead.
  6586. ** Deprecated function: scm_strhash
  6587. Use scm_string_hash instead.
  6588. ** Deprecated function: scm_vector_set_length_x
  6589. Instead, create a fresh vector of the desired size and copy the contents.
  6590. ** scm_gensym has changed prototype
  6591. scm_gensym now only takes one argument.
  6592. ** Deprecated type tags: scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
  6593. scm_tc7_lvector
  6594. There is now only a single symbol type scm_tc7_symbol.
  6595. The tag scm_tc7_lvector was not used anyway.
  6596. ** Deprecated function: scm_make_smob_type_mfpe, scm_set_smob_mfpe.
  6597. Use scm_make_smob_type and scm_set_smob_XXX instead.
  6598. ** New function scm_set_smob_apply.
  6599. This can be used to set an apply function to a smob type.
  6600. ** Deprecated function: scm_strprint_obj
  6601. Use scm_object_to_string instead.
  6602. ** Deprecated function: scm_wta
  6603. Use scm_wrong_type_arg, or another appropriate error signalling function
  6604. instead.
  6605. ** Explicit support for obarrays has been deprecated.
  6606. Use `scm_str2symbol' and the generic hashtable functions instead.
  6607. ** The concept of `vcells' has been deprecated.
  6608. The data type `variable' is now used exclusively. `Vcells' have been
  6609. a low-level concept so you are likely not affected by this change.
  6610. *** Deprecated functions: scm_sym2vcell, scm_sysintern,
  6611. scm_sysintern0, scm_symbol_value0, scm_intern, scm_intern0.
  6612. Use scm_c_define or scm_c_lookup instead, as appropriate.
  6613. *** New functions: scm_c_module_lookup, scm_c_lookup,
  6614. scm_c_module_define, scm_c_define, scm_module_lookup, scm_lookup,
  6615. scm_module_define, scm_define.
  6616. These functions work with variables instead of with vcells.
  6617. ** New functions for creating and defining `subr's and `gsubr's.
  6618. The new functions more clearly distinguish between creating a subr (or
  6619. gsubr) object and adding it to the current module.
  6620. These new functions are available: scm_c_make_subr, scm_c_define_subr,
  6621. scm_c_make_subr_with_generic, scm_c_define_subr_with_generic,
  6622. scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
  6623. scm_c_define_gsubr_with_generic.
  6624. ** Deprecated functions: scm_make_subr, scm_make_subr_opt,
  6625. scm_make_subr_with_generic, scm_make_gsubr,
  6626. scm_make_gsubr_with_generic.
  6627. Use the new ones from above instead.
  6628. ** C interface to the module system has changed.
  6629. While we suggest that you avoid as many explicit module system
  6630. operations from C as possible for the time being, the C interface has
  6631. been made more similar to the high-level Scheme module system.
  6632. *** New functions: scm_c_define_module, scm_c_use_module,
  6633. scm_c_export, scm_c_resolve_module.
  6634. They mostly work like their Scheme namesakes. scm_c_define_module
  6635. takes a function that is called a context where the new module is
  6636. current.
  6637. *** Deprecated functions: scm_the_root_module, scm_make_module,
  6638. scm_ensure_user_module, scm_load_scheme_module.
  6639. Use the new functions instead.
  6640. ** Renamed function: scm_internal_with_fluids becomes
  6641. scm_c_with_fluids.
  6642. scm_internal_with_fluids is available as a deprecated function.
  6643. ** New function: scm_c_with_fluid.
  6644. Just like scm_c_with_fluids, but takes one fluid and one value instead
  6645. of lists of same.
  6646. ** Deprecated typedefs: long_long, ulong_long.
  6647. They are of questionable utility and they pollute the global
  6648. namespace.
  6649. ** Deprecated typedef: scm_sizet
  6650. It is of questionable utility now that Guile requires ANSI C, and is
  6651. oddly named.
  6652. ** Deprecated typedefs: scm_port_rw_active, scm_port,
  6653. scm_ptob_descriptor, scm_debug_info, scm_debug_frame, scm_fport,
  6654. scm_option, scm_rstate, scm_rng, scm_array, scm_array_dim.
  6655. Made more compliant with the naming policy by adding a _t at the end.
  6656. ** Deprecated functions: scm_mkbig, scm_big2num, scm_adjbig,
  6657. scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl
  6658. With the exception of the mysterious scm_2ulong2big, they are still
  6659. available under new names (scm_i_mkbig etc). These functions are not
  6660. intended to be used in user code. You should avoid dealing with
  6661. bignums directly, and should deal with numbers in general (which can
  6662. be bignums).
  6663. ** Change in behavior: scm_num2long, scm_num2ulong
  6664. The scm_num2[u]long functions don't any longer accept an inexact
  6665. argument. This change in behavior is motivated by concordance with
  6666. R5RS: It is more common that a primitive doesn't want to accept an
  6667. inexact for an exact.
  6668. ** New functions: scm_short2num, scm_ushort2num, scm_int2num,
  6669. scm_uint2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
  6670. scm_num2ushort, scm_num2int, scm_num2uint, scm_num2ptrdiff,
  6671. scm_num2size.
  6672. These are conversion functions between the various ANSI C integral
  6673. types and Scheme numbers. NOTE: The scm_num2xxx functions don't
  6674. accept an inexact argument.
  6675. ** New functions: scm_float2num, scm_double2num,
  6676. scm_num2float, scm_num2double.
  6677. These are conversion functions between the two ANSI C float types and
  6678. Scheme numbers.
  6679. ** New number validation macros:
  6680. SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,INT,UINT}[_DEF]
  6681. See above.
  6682. ** New functions: scm_gc_protect_object, scm_gc_unprotect_object
  6683. These are just nicer-named old scm_protect_object and
  6684. scm_unprotect_object.
  6685. ** Deprecated functions: scm_protect_object, scm_unprotect_object
  6686. ** New functions: scm_gc_[un]register_root, scm_gc_[un]register_roots
  6687. These functions can be used to register pointers to locations that
  6688. hold SCM values.
  6689. ** Deprecated function: scm_create_hook.
  6690. Its sins are: misleading name, non-modularity and lack of general
  6691. usefulness.
  6692. Changes since Guile 1.3.4:
  6693. * Changes to the distribution
  6694. ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
  6695. We've changed the way we handle generated files in the Guile source
  6696. repository. As a result, the procedure for building trees obtained
  6697. from the nightly FTP snapshots or via CVS has changed:
  6698. - You must have appropriate versions of autoconf, automake, and
  6699. libtool installed on your system. See README for info on how to
  6700. obtain these programs.
  6701. - Before configuring the tree, you must first run the script
  6702. `autogen.sh' at the top of the source tree.
  6703. The Guile repository used to contain not only source files, written by
  6704. humans, but also some generated files, like configure scripts and
  6705. Makefile.in files. Even though the contents of these files could be
  6706. derived mechanically from other files present, we thought it would
  6707. make the tree easier to build if we checked them into CVS.
  6708. However, this approach means that minor differences between
  6709. developer's installed tools and habits affected the whole team.
  6710. So we have removed the generated files from the repository, and
  6711. added the autogen.sh script, which will reconstruct them
  6712. appropriately.
  6713. ** configure now has experimental options to remove support for certain
  6714. features:
  6715. --disable-arrays omit array and uniform array support
  6716. --disable-posix omit posix interfaces
  6717. --disable-networking omit networking interfaces
  6718. --disable-regex omit regular expression interfaces
  6719. These are likely to become separate modules some day.
  6720. ** New configure option --enable-debug-freelist
  6721. This enables a debugging version of SCM_NEWCELL(), and also registers
  6722. an extra primitive, the setter `gc-set-debug-check-freelist!'.
  6723. Configure with the --enable-debug-freelist option to enable
  6724. the gc-set-debug-check-freelist! primitive, and then use:
  6725. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  6726. (gc-set-debug-check-freelist! #f) # turn off checking
  6727. Checking of the freelist forces a traversal of the freelist and
  6728. a garbage collection before each allocation of a cell. This can
  6729. slow down the interpreter dramatically, so the setter should be used to
  6730. turn on this extra processing only when necessary.
  6731. ** New configure option --enable-debug-malloc
  6732. Include code for debugging of calls to scm_must_malloc/realloc/free.
  6733. Checks that
  6734. 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
  6735. 2. objects reallocated by scm_must_realloc has been allocated by
  6736. scm_must_malloc
  6737. 3. reallocated objects are reallocated with the same what string
  6738. But, most importantly, it records the number of allocated objects of
  6739. each kind. This is useful when searching for memory leaks.
  6740. A Guile compiled with this option provides the primitive
  6741. `malloc-stats' which returns an alist with pairs of kind and the
  6742. number of objects of that kind.
  6743. ** All includes are now referenced relative to the root directory
  6744. Since some users have had problems with mixups between Guile and
  6745. system headers, we have decided to always refer to Guile headers via
  6746. their parent directories. This essentially creates a "private name
  6747. space" for Guile headers. This means that the compiler only is given
  6748. -I options for the root build and root source directory.
  6749. ** Header files kw.h and genio.h have been removed.
  6750. ** The module (ice-9 getopt-gnu-style) has been removed.
  6751. ** New module (ice-9 documentation)
  6752. Implements the interface to documentation strings associated with
  6753. objects.
  6754. ** New module (ice-9 time)
  6755. Provides a macro `time', which displays execution time of a given form.
  6756. ** New module (ice-9 history)
  6757. Loading this module enables value history in the repl.
  6758. * Changes to the stand-alone interpreter
  6759. ** New command line option --debug
  6760. Start Guile with debugging evaluator and backtraces enabled.
  6761. This is useful when debugging your .guile init file or scripts.
  6762. ** New help facility
  6763. Usage: (help NAME) gives documentation about objects named NAME (a symbol)
  6764. (help REGEXP) ditto for objects with names matching REGEXP (a string)
  6765. (help 'NAME) gives documentation for NAME, even if it is not an object
  6766. (help ,EXPR) gives documentation for object returned by EXPR
  6767. (help (my module)) gives module commentary for `(my module)'
  6768. (help) gives this text
  6769. `help' searches among bindings exported from loaded modules, while
  6770. `apropos' searches among bindings visible from the "current" module.
  6771. Examples: (help help)
  6772. (help cons)
  6773. (help "output-string")
  6774. ** `help' and `apropos' now prints full module names
  6775. ** Dynamic linking now uses libltdl from the libtool package.
  6776. The old system dependent code for doing dynamic linking has been
  6777. replaced with calls to the libltdl functions which do all the hairy
  6778. details for us.
  6779. The major improvement is that you can now directly pass libtool
  6780. library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
  6781. will be able to do the best shared library job you can get, via
  6782. libltdl.
  6783. The way dynamic libraries are found has changed and is not really
  6784. portable across platforms, probably. It is therefore recommended to
  6785. use absolute filenames when possible.
  6786. If you pass a filename without an extension to `dynamic-link', it will
  6787. try a few appropriate ones. Thus, the most platform ignorant way is
  6788. to specify a name like "libfoo", without any directories and
  6789. extensions.
  6790. ** Guile COOP threads are now compatible with LinuxThreads
  6791. Previously, COOP threading wasn't possible in applications linked with
  6792. Linux POSIX threads due to their use of the stack pointer to find the
  6793. thread context. This has now been fixed with a workaround which uses
  6794. the pthreads to allocate the stack.
  6795. ** New primitives: `pkgdata-dir', `site-dir', `library-dir'
  6796. ** Positions of erring expression in scripts
  6797. With version 1.3.4, the location of the erring expression in Guile
  6798. scipts is no longer automatically reported. (This should have been
  6799. documented before the 1.3.4 release.)
  6800. You can get this information by enabling recording of positions of
  6801. source expressions and running the debugging evaluator. Put this at
  6802. the top of your script (or in your "site" file):
  6803. (read-enable 'positions)
  6804. (debug-enable 'debug)
  6805. ** Backtraces in scripts
  6806. It is now possible to get backtraces in scripts.
  6807. Put
  6808. (debug-enable 'debug 'backtrace)
  6809. at the top of the script.
  6810. (The first options enables the debugging evaluator.
  6811. The second enables backtraces.)
  6812. ** Part of module system symbol lookup now implemented in C
  6813. The eval closure of most modules is now implemented in C. Since this
  6814. was one of the bottlenecks for loading speed, Guile now loads code
  6815. substantially faster than before.
  6816. ** Attempting to get the value of an unbound variable now produces
  6817. an exception with a key of 'unbound-variable instead of 'misc-error.
  6818. ** The initial default output port is now unbuffered if it's using a
  6819. tty device. Previously in this situation it was line-buffered.
  6820. ** New hook: after-gc-hook
  6821. after-gc-hook takes over the role of gc-thunk. This hook is run at
  6822. the first SCM_TICK after a GC. (Thus, the code is run at the same
  6823. point during evaluation as signal handlers.)
  6824. Note that this hook should be used only for diagnostic and debugging
  6825. purposes. It is not certain that it will continue to be well-defined
  6826. when this hook is run in the future.
  6827. C programmers: Note the new C level hooks scm_before_gc_c_hook,
  6828. scm_before_sweep_c_hook, scm_after_gc_c_hook.
  6829. ** Improvements to garbage collector
  6830. Guile 1.4 has a new policy for triggering heap allocation and
  6831. determining the sizes of heap segments. It fixes a number of problems
  6832. in the old GC.
  6833. 1. The new policy can handle two separate pools of cells
  6834. (2-word/4-word) better. (The old policy would run wild, allocating
  6835. more and more memory for certain programs.)
  6836. 2. The old code would sometimes allocate far too much heap so that the
  6837. Guile process became gigantic. The new code avoids this.
  6838. 3. The old code would sometimes allocate too little so that few cells
  6839. were freed at GC so that, in turn, too much time was spent in GC.
  6840. 4. The old code would often trigger heap allocation several times in a
  6841. row. (The new scheme predicts how large the segments needs to be
  6842. in order not to need further allocation.)
  6843. All in all, the new GC policy will make larger applications more
  6844. efficient.
  6845. The new GC scheme also is prepared for POSIX threading. Threads can
  6846. allocate private pools of cells ("clusters") with just a single
  6847. function call. Allocation of single cells from such a cluster can
  6848. then proceed without any need of inter-thread synchronization.
  6849. ** New environment variables controlling GC parameters
  6850. GUILE_MAX_SEGMENT_SIZE Maximal segment size
  6851. (default = 2097000)
  6852. Allocation of 2-word cell heaps:
  6853. GUILE_INIT_SEGMENT_SIZE_1 Size of initial heap segment in bytes
  6854. (default = 360000)
  6855. GUILE_MIN_YIELD_1 Minimum number of freed cells at each
  6856. GC in percent of total heap size
  6857. (default = 40)
  6858. Allocation of 4-word cell heaps
  6859. (used for real numbers and misc other objects):
  6860. GUILE_INIT_SEGMENT_SIZE_2, GUILE_MIN_YIELD_2
  6861. (See entry "Way for application to customize GC parameters" under
  6862. section "Changes to the scm_ interface" below.)
  6863. ** Guile now implements reals using 4-word cells
  6864. This speeds up computation with reals. (They were earlier allocated
  6865. with `malloc'.) There is still some room for optimizations, however.
  6866. ** Some further steps toward POSIX thread support have been taken
  6867. *** Guile's critical sections (SCM_DEFER/ALLOW_INTS)
  6868. don't have much effect any longer, and many of them will be removed in
  6869. next release.
  6870. *** Signals
  6871. are only handled at the top of the evaluator loop, immediately after
  6872. I/O, and in scm_equalp.
  6873. *** The GC can allocate thread private pools of pairs.
  6874. * Changes to Scheme functions and syntax
  6875. ** close-input-port and close-output-port are now R5RS
  6876. These procedures have been turned into primitives and have R5RS behaviour.
  6877. ** New procedure: simple-format PORT MESSAGE ARG1 ...
  6878. (ice-9 boot) makes `format' an alias for `simple-format' until possibly
  6879. extended by the more sophisticated version in (ice-9 format)
  6880. (simple-format port message . args)
  6881. Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
  6882. MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,
  6883. the escapes are replaced with corresponding members of ARGS:
  6884. ~A formats using `display' and ~S formats using `write'.
  6885. If DESTINATION is #t, then use the `current-output-port',
  6886. if DESTINATION is #f, then return a string containing the formatted text.
  6887. Does not add a trailing newline."
  6888. ** string-ref: the second argument is no longer optional.
  6889. ** string, list->string: no longer accept strings in their arguments,
  6890. only characters, for compatibility with R5RS.
  6891. ** New procedure: port-closed? PORT
  6892. Returns #t if PORT is closed or #f if it is open.
  6893. ** Deprecated: list*
  6894. The list* functionality is now provided by cons* (SRFI-1 compliant)
  6895. ** New procedure: cons* ARG1 ARG2 ... ARGn
  6896. Like `list', but the last arg provides the tail of the constructed list,
  6897. returning (cons ARG1 (cons ARG2 (cons ... ARGn))).
  6898. Requires at least one argument. If given one argument, that argument
  6899. is returned as result.
  6900. This function is called `list*' in some other Schemes and in Common LISP.
  6901. ** Removed deprecated: serial-map, serial-array-copy!, serial-array-map!
  6902. ** New procedure: object-documentation OBJECT
  6903. Returns the documentation string associated with OBJECT. The
  6904. procedure uses a caching mechanism so that subsequent lookups are
  6905. faster.
  6906. Exported by (ice-9 documentation).
  6907. ** module-name now returns full names of modules
  6908. Previously, only the last part of the name was returned (`session' for
  6909. `(ice-9 session)'). Ex: `(ice-9 session)'.
  6910. * Changes to the gh_ interface
  6911. ** Deprecated: gh_int2scmb
  6912. Use gh_bool2scm instead.
  6913. * Changes to the scm_ interface
  6914. ** Guile primitives now carry docstrings!
  6915. Thanks to Greg Badros!
  6916. ** Guile primitives are defined in a new way: SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  6917. Now Guile primitives are defined using the SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  6918. macros and must contain a docstring that is extracted into foo.doc using a new
  6919. guile-doc-snarf script (that uses guile-doc-snarf.awk).
  6920. However, a major overhaul of these macros is scheduled for the next release of
  6921. guile.
  6922. ** Guile primitives use a new technique for validation of arguments
  6923. SCM_VALIDATE_* macros are defined to ease the redundancy and improve
  6924. the readability of argument checking.
  6925. ** All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
  6926. ** New macros: SCM_PACK, SCM_UNPACK
  6927. Compose/decompose an SCM value.
  6928. The SCM type is now treated as an abstract data type and may be defined as a
  6929. long, a void* or as a struct, depending on the architecture and compile time
  6930. options. This makes it easier to find several types of bugs, for example when
  6931. SCM values are treated as integers without conversion. Values of the SCM type
  6932. should be treated as "atomic" values. These macros are used when
  6933. composing/decomposing an SCM value, either because you want to access
  6934. individual bits, or because you want to treat it as an integer value.
  6935. E.g., in order to set bit 7 in an SCM value x, use the expression
  6936. SCM_PACK (SCM_UNPACK (x) | 0x80)
  6937. ** The name property of hooks is deprecated.
  6938. Thus, the use of SCM_HOOK_NAME and scm_make_hook_with_name is deprecated.
  6939. You can emulate this feature by using object properties.
  6940. ** Deprecated macros: SCM_INPORTP, SCM_OUTPORTP, SCM_CRDY, SCM_ICHRP,
  6941. SCM_ICHR, SCM_MAKICHR, SCM_SETJMPBUF, SCM_NSTRINGP, SCM_NRWSTRINGP,
  6942. SCM_NVECTORP
  6943. These macros will be removed in a future release of Guile.
  6944. ** The following types, functions and macros from numbers.h are deprecated:
  6945. scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL,
  6946. SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG
  6947. ** Port internals: the rw_random variable in the scm_port structure
  6948. must be set to non-zero in any random access port. In recent Guile
  6949. releases it was only set for bidirectional random-access ports.
  6950. ** Port internals: the seek ptob procedure is now responsible for
  6951. resetting the buffers if required. The change was made so that in the
  6952. special case of reading the current position (i.e., seek p 0 SEEK_CUR)
  6953. the fport and strport ptobs can avoid resetting the buffers,
  6954. in particular to avoid discarding unread chars. An existing port
  6955. type can be fixed by adding something like the following to the
  6956. beginning of the ptob seek procedure:
  6957. if (pt->rw_active == SCM_PORT_READ)
  6958. scm_end_input (object);
  6959. else if (pt->rw_active == SCM_PORT_WRITE)
  6960. ptob->flush (object);
  6961. although to actually avoid resetting the buffers and discard unread
  6962. chars requires further hacking that depends on the characteristics
  6963. of the ptob.
  6964. ** Deprecated functions: scm_fseek, scm_tag
  6965. These functions are no longer used and will be removed in a future version.
  6966. ** The scm_sysmissing procedure is no longer used in libguile.
  6967. Unless it turns out to be unexpectedly useful to somebody, it will be
  6968. removed in a future version.
  6969. ** The format of error message strings has changed
  6970. The two C procedures: scm_display_error and scm_error, as well as the
  6971. primitive `scm-error', now use scm_simple_format to do their work.
  6972. This means that the message strings of all code must be updated to use
  6973. ~A where %s was used before, and ~S where %S was used before.
  6974. During the period when there still are a lot of old Guiles out there,
  6975. you might want to support both old and new versions of Guile.
  6976. There are basically two methods to achieve this. Both methods use
  6977. autoconf. Put
  6978. AC_CHECK_FUNCS(scm_simple_format)
  6979. in your configure.in.
  6980. Method 1: Use the string concatenation features of ANSI C's
  6981. preprocessor.
  6982. In C:
  6983. #ifdef HAVE_SCM_SIMPLE_FORMAT
  6984. #define FMT_S "~S"
  6985. #else
  6986. #define FMT_S "%S"
  6987. #endif
  6988. Then represent each of your error messages using a preprocessor macro:
  6989. #define E_SPIDER_ERROR "There's a spider in your " ## FMT_S ## "!!!"
  6990. In Scheme:
  6991. (define fmt-s (if (defined? 'simple-format) "~S" "%S"))
  6992. (define make-message string-append)
  6993. (define e-spider-error (make-message "There's a spider in your " fmt-s "!!!"))
  6994. Method 2: Use the oldfmt function found in doc/oldfmt.c.
  6995. In C:
  6996. scm_misc_error ("picnic", scm_c_oldfmt0 ("There's a spider in your ~S!!!"),
  6997. ...);
  6998. In Scheme:
  6999. (scm-error 'misc-error "picnic" (oldfmt "There's a spider in your ~S!!!")
  7000. ...)
  7001. ** Deprecated: coop_mutex_init, coop_condition_variable_init
  7002. Don't use the functions coop_mutex_init and
  7003. coop_condition_variable_init. They will change.
  7004. Use scm_mutex_init and scm_cond_init instead.
  7005. ** New function: int scm_cond_timedwait (scm_cond_t *COND, scm_mutex_t *MUTEX, const struct timespec *ABSTIME)
  7006. `scm_cond_timedwait' atomically unlocks MUTEX and waits on
  7007. COND, as `scm_cond_wait' does, but it also bounds the duration
  7008. of the wait. If COND has not been signaled before time ABSTIME,
  7009. the mutex MUTEX is re-acquired and `scm_cond_timedwait'
  7010. returns the error code `ETIMEDOUT'.
  7011. The ABSTIME parameter specifies an absolute time, with the same
  7012. origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds
  7013. to 00:00:00 GMT, January 1, 1970.
  7014. ** New function: scm_cond_broadcast (scm_cond_t *COND)
  7015. `scm_cond_broadcast' restarts all the threads that are waiting
  7016. on the condition variable COND. Nothing happens if no threads are
  7017. waiting on COND.
  7018. ** New function: scm_key_create (scm_key_t *KEY, void (*destr_function) (void *))
  7019. `scm_key_create' allocates a new TSD key. The key is stored in
  7020. the location pointed to by KEY. There is no limit on the number
  7021. of keys allocated at a given time. The value initially associated
  7022. with the returned key is `NULL' in all currently executing threads.
  7023. The DESTR_FUNCTION argument, if not `NULL', specifies a destructor
  7024. function associated with the key. When a thread terminates,
  7025. DESTR_FUNCTION is called on the value associated with the key in
  7026. that thread. The DESTR_FUNCTION is not called if a key is deleted
  7027. with `scm_key_delete' or a value is changed with
  7028. `scm_setspecific'. The order in which destructor functions are
  7029. called at thread termination time is unspecified.
  7030. Destructors are not yet implemented.
  7031. ** New function: scm_setspecific (scm_key_t KEY, const void *POINTER)
  7032. `scm_setspecific' changes the value associated with KEY in the
  7033. calling thread, storing the given POINTER instead.
  7034. ** New function: scm_getspecific (scm_key_t KEY)
  7035. `scm_getspecific' returns the value currently associated with
  7036. KEY in the calling thread.
  7037. ** New function: scm_key_delete (scm_key_t KEY)
  7038. `scm_key_delete' deallocates a TSD key. It does not check
  7039. whether non-`NULL' values are associated with that key in the
  7040. currently executing threads, nor call the destructor function
  7041. associated with the key.
  7042. ** New function: scm_c_hook_init (scm_c_hook_t *HOOK, void *HOOK_DATA, scm_c_hook_type_t TYPE)
  7043. Initialize a C level hook HOOK with associated HOOK_DATA and type
  7044. TYPE. (See scm_c_hook_run ().)
  7045. ** New function: scm_c_hook_add (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA, int APPENDP)
  7046. Add hook function FUNC with associated FUNC_DATA to HOOK. If APPENDP
  7047. is true, add it last, otherwise first. The same FUNC can be added
  7048. multiple times if FUNC_DATA differ and vice versa.
  7049. ** New function: scm_c_hook_remove (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA)
  7050. Remove hook function FUNC with associated FUNC_DATA from HOOK. A
  7051. function is only removed if both FUNC and FUNC_DATA matches.
  7052. ** New function: void *scm_c_hook_run (scm_c_hook_t *HOOK, void *DATA)
  7053. Run hook HOOK passing DATA to the hook functions.
  7054. If TYPE is SCM_C_HOOK_NORMAL, all hook functions are run. The value
  7055. returned is undefined.
  7056. If TYPE is SCM_C_HOOK_OR, hook functions are run until a function
  7057. returns a non-NULL value. This value is returned as the result of
  7058. scm_c_hook_run. If all functions return NULL, NULL is returned.
  7059. If TYPE is SCM_C_HOOK_AND, hook functions are run until a function
  7060. returns a NULL value, and NULL is returned. If all functions returns
  7061. a non-NULL value, the last value is returned.
  7062. ** New C level GC hooks
  7063. Five new C level hooks has been added to the garbage collector.
  7064. scm_before_gc_c_hook
  7065. scm_after_gc_c_hook
  7066. are run before locking and after unlocking the heap. The system is
  7067. thus in a mode where evaluation can take place. (Except that
  7068. scm_before_gc_c_hook must not allocate new cells.)
  7069. scm_before_mark_c_hook
  7070. scm_before_sweep_c_hook
  7071. scm_after_sweep_c_hook
  7072. are run when the heap is locked. These are intended for extension of
  7073. the GC in a modular fashion. Examples are the weaks and guardians
  7074. modules.
  7075. ** Way for application to customize GC parameters
  7076. The application can set up other default values for the GC heap
  7077. allocation parameters
  7078. GUILE_INIT_HEAP_SIZE_1, GUILE_MIN_YIELD_1,
  7079. GUILE_INIT_HEAP_SIZE_2, GUILE_MIN_YIELD_2,
  7080. GUILE_MAX_SEGMENT_SIZE,
  7081. by setting
  7082. scm_default_init_heap_size_1, scm_default_min_yield_1,
  7083. scm_default_init_heap_size_2, scm_default_min_yield_2,
  7084. scm_default_max_segment_size
  7085. respectively before callong scm_boot_guile.
  7086. (See entry "New environment variables ..." in section
  7087. "Changes to the stand-alone interpreter" above.)
  7088. ** scm_protect_object/scm_unprotect_object now nest
  7089. This means that you can call scm_protect_object multiple times on an
  7090. object and count on the object being protected until
  7091. scm_unprotect_object has been call the same number of times.
  7092. The functions also have better time complexity.
  7093. Still, it is usually possible to structure the application in a way
  7094. that you don't need to use these functions. For example, if you use a
  7095. protected standard Guile list to keep track of live objects rather
  7096. than some custom data type, objects will die a natural death when they
  7097. are no longer needed.
  7098. ** Deprecated type tags: scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc
  7099. Guile does not provide the float representation for inexact real numbers any
  7100. more. Now, only doubles are used to represent inexact real numbers. Further,
  7101. the tag names scm_tc_dblr and scm_tc_dblc have been changed to scm_tc16_real
  7102. and scm_tc16_complex, respectively.
  7103. ** Removed deprecated type scm_smobfuns
  7104. ** Removed deprecated function scm_newsmob
  7105. ** Warning: scm_make_smob_type_mfpe might become deprecated in a future release
  7106. There is an ongoing discussion among the developers whether to
  7107. deprecate `scm_make_smob_type_mfpe' or not. Please use the current
  7108. standard interface (scm_make_smob_type, scm_set_smob_XXX) in new code
  7109. until this issue has been settled.
  7110. ** Removed deprecated type tag scm_tc16_kw
  7111. ** Added type tag scm_tc16_keyword
  7112. (This was introduced already in release 1.3.4 but was not documented
  7113. until now.)
  7114. ** gdb_print now prints "*** Guile not initialized ***" until Guile initialized
  7115. * Changes to system call interfaces:
  7116. ** The "select" procedure now tests port buffers for the ability to
  7117. provide input or accept output. Previously only the underlying file
  7118. descriptors were checked.
  7119. ** New variable PIPE_BUF: the maximum number of bytes that can be
  7120. atomically written to a pipe.
  7121. ** If a facility is not available on the system when Guile is
  7122. compiled, the corresponding primitive procedure will not be defined.
  7123. Previously it would have been defined but would throw a system-error
  7124. exception if called. Exception handlers which catch this case may
  7125. need minor modification: an error will be thrown with key
  7126. 'unbound-variable instead of 'system-error. Alternatively it's
  7127. now possible to use `defined?' to check whether the facility is
  7128. available.
  7129. ** Procedures which depend on the timezone should now give the correct
  7130. result on systems which cache the TZ environment variable, even if TZ
  7131. is changed without calling tzset.
  7132. * Changes to the networking interfaces:
  7133. ** New functions: htons, ntohs, htonl, ntohl: for converting short and
  7134. long integers between network and host format. For now, it's not
  7135. particularly convenient to do this kind of thing, but consider:
  7136. (define write-network-long
  7137. (lambda (value port)
  7138. (let ((v (make-uniform-vector 1 1 0)))
  7139. (uniform-vector-set! v 0 (htonl value))
  7140. (uniform-vector-write v port))))
  7141. (define read-network-long
  7142. (lambda (port)
  7143. (let ((v (make-uniform-vector 1 1 0)))
  7144. (uniform-vector-read! v port)
  7145. (ntohl (uniform-vector-ref v 0)))))
  7146. ** If inet-aton fails, it now throws an error with key 'misc-error
  7147. instead of 'system-error, since errno is not relevant.
  7148. ** Certain gethostbyname/gethostbyaddr failures now throw errors with
  7149. specific keys instead of 'system-error. The latter is inappropriate
  7150. since errno will not have been set. The keys are:
  7151. 'host-not-found, 'try-again, 'no-recovery and 'no-data.
  7152. ** sethostent, setnetent, setprotoent, setservent: now take an
  7153. optional argument STAYOPEN, which specifies whether the database
  7154. remains open after a database entry is accessed randomly (e.g., using
  7155. gethostbyname for the hosts database.) The default is #f. Previously
  7156. #t was always used.
  7157. Changes since Guile 1.3.2:
  7158. * Changes to the stand-alone interpreter
  7159. ** Debugger
  7160. An initial version of the Guile debugger written by Chris Hanson has
  7161. been added. The debugger is still under development but is included
  7162. in the distribution anyway since it is already quite useful.
  7163. Type
  7164. (debug)
  7165. after an error to enter the debugger. Type `help' inside the debugger
  7166. for a description of available commands.
  7167. If you prefer to have stack frames numbered and printed in
  7168. anti-chronological order and prefer up in the stack to be down on the
  7169. screen as is the case in gdb, you can put
  7170. (debug-enable 'backwards)
  7171. in your .guile startup file. (However, this means that Guile can't
  7172. use indentation to indicate stack level.)
  7173. The debugger is autoloaded into Guile at the first use.
  7174. ** Further enhancements to backtraces
  7175. There is a new debug option `width' which controls the maximum width
  7176. on the screen of printed stack frames. Fancy printing parameters
  7177. ("level" and "length" as in Common LISP) are adaptively adjusted for
  7178. each stack frame to give maximum information while still fitting
  7179. within the bounds. If the stack frame can't be made to fit by
  7180. adjusting parameters, it is simply cut off at the end. This is marked
  7181. with a `$'.
  7182. ** Some modules are now only loaded when the repl is started
  7183. The modules (ice-9 debug), (ice-9 session), (ice-9 threads) and (ice-9
  7184. regex) are now loaded into (guile-user) only if the repl has been
  7185. started. The effect is that the startup time for scripts has been
  7186. reduced to 30% of what it was previously.
  7187. Correctly written scripts load the modules they require at the top of
  7188. the file and should not be affected by this change.
  7189. ** Hooks are now represented as smobs
  7190. * Changes to Scheme functions and syntax
  7191. ** Readline support has changed again.
  7192. The old (readline-activator) module is gone. Use (ice-9 readline)
  7193. instead, which now contains all readline functionality. So the code
  7194. to activate readline is now
  7195. (use-modules (ice-9 readline))
  7196. (activate-readline)
  7197. This should work at any time, including from the guile prompt.
  7198. To avoid confusion about the terms of Guile's license, please only
  7199. enable readline for your personal use; please don't make it the
  7200. default for others. Here is why we make this rather odd-sounding
  7201. request:
  7202. Guile is normally licensed under a weakened form of the GNU General
  7203. Public License, which allows you to link code with Guile without
  7204. placing that code under the GPL. This exception is important to some
  7205. people.
  7206. However, since readline is distributed under the GNU General Public
  7207. License, when you link Guile with readline, either statically or
  7208. dynamically, you effectively change Guile's license to the strict GPL.
  7209. Whenever you link any strictly GPL'd code into Guile, uses of Guile
  7210. which are normally permitted become forbidden. This is a rather
  7211. non-obvious consequence of the licensing terms.
  7212. So, to make sure things remain clear, please let people choose for
  7213. themselves whether to link GPL'd libraries like readline with Guile.
  7214. ** regexp-substitute/global has changed slightly, but incompatibly.
  7215. If you include a function in the item list, the string of the match
  7216. object it receives is the same string passed to
  7217. regexp-substitute/global, not some suffix of that string.
  7218. Correspondingly, the match's positions are relative to the entire
  7219. string, not the suffix.
  7220. If the regexp can match the empty string, the way matches are chosen
  7221. from the string has changed. regexp-substitute/global recognizes the
  7222. same set of matches that list-matches does; see below.
  7223. ** New function: list-matches REGEXP STRING [FLAGS]
  7224. Return a list of match objects, one for every non-overlapping, maximal
  7225. match of REGEXP in STRING. The matches appear in left-to-right order.
  7226. list-matches only reports matches of the empty string if there are no
  7227. other matches which begin on, end at, or include the empty match's
  7228. position.
  7229. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7230. ** New function: fold-matches REGEXP STRING INIT PROC [FLAGS]
  7231. For each match of REGEXP in STRING, apply PROC to the match object,
  7232. and the last value PROC returned, or INIT for the first call. Return
  7233. the last value returned by PROC. We apply PROC to the matches as they
  7234. appear from left to right.
  7235. This function recognizes matches according to the same criteria as
  7236. list-matches.
  7237. Thus, you could define list-matches like this:
  7238. (define (list-matches regexp string . flags)
  7239. (reverse! (apply fold-matches regexp string '() cons flags)))
  7240. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7241. ** Hooks
  7242. *** New function: hook? OBJ
  7243. Return #t if OBJ is a hook, otherwise #f.
  7244. *** New function: make-hook-with-name NAME [ARITY]
  7245. Return a hook with name NAME and arity ARITY. The default value for
  7246. ARITY is 0. The only effect of NAME is that it will appear when the
  7247. hook object is printed to ease debugging.
  7248. *** New function: hook-empty? HOOK
  7249. Return #t if HOOK doesn't contain any procedures, otherwise #f.
  7250. *** New function: hook->list HOOK
  7251. Return a list of the procedures that are called when run-hook is
  7252. applied to HOOK.
  7253. ** `map' signals an error if its argument lists are not all the same length.
  7254. This is the behavior required by R5RS, so this change is really a bug
  7255. fix. But it seems to affect a lot of people's code, so we're
  7256. mentioning it here anyway.
  7257. ** Print-state handling has been made more transparent
  7258. Under certain circumstances, ports are represented as a port with an
  7259. associated print state. Earlier, this pair was represented as a pair
  7260. (see "Some magic has been added to the printer" below). It is now
  7261. indistinguishable (almost; see `get-print-state') from a port on the
  7262. user level.
  7263. *** New function: port-with-print-state OUTPUT-PORT PRINT-STATE
  7264. Return a new port with the associated print state PRINT-STATE.
  7265. *** New function: get-print-state OUTPUT-PORT
  7266. Return the print state associated with this port if it exists,
  7267. otherwise return #f.
  7268. *** New function: directory-stream? OBJECT
  7269. Returns true iff OBJECT is a directory stream --- the sort of object
  7270. returned by `opendir'.
  7271. ** New function: using-readline?
  7272. Return #t if readline is in use in the current repl.
  7273. ** structs will be removed in 1.4
  7274. Structs will be replaced in Guile 1.4. We will merge GOOPS into Guile
  7275. and use GOOPS objects as the fundamental record type.
  7276. * Changes to the scm_ interface
  7277. ** structs will be removed in 1.4
  7278. The entire current struct interface (struct.c, struct.h) will be
  7279. replaced in Guile 1.4. We will merge GOOPS into libguile and use
  7280. GOOPS objects as the fundamental record type.
  7281. ** The internal representation of subr's has changed
  7282. Instead of giving a hint to the subr name, the CAR field of the subr
  7283. now contains an index to a subr entry in scm_subr_table.
  7284. *** New variable: scm_subr_table
  7285. An array of subr entries. A subr entry contains the name, properties
  7286. and documentation associated with the subr. The properties and
  7287. documentation slots are not yet used.
  7288. ** A new scheme for "forwarding" calls to a builtin to a generic function
  7289. It is now possible to extend the functionality of some Guile
  7290. primitives by letting them defer a call to a GOOPS generic function on
  7291. argument mismatch. This means that there is no loss of efficiency in
  7292. normal evaluation.
  7293. Example:
  7294. (use-modules (oop goops)) ; Must be GOOPS version 0.2.
  7295. (define-method + ((x <string>) (y <string>))
  7296. (string-append x y))
  7297. + will still be as efficient as usual in numerical calculations, but
  7298. can also be used for concatenating strings.
  7299. Who will be the first one to extend Guile's numerical tower to
  7300. rationals? :) [OK, there a few other things to fix before this can
  7301. be made in a clean way.]
  7302. *** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
  7303. New macro: SCM_GPROC (CNAME, SNAME, REQ, OPT, VAR, CFUNC, GENERIC)
  7304. New macro: SCM_GPROC1 (CNAME, SNAME, TYPE, CFUNC, GENERIC)
  7305. These do the same job as SCM_PROC and SCM_PROC1, but they also define
  7306. a variable GENERIC which can be used by the dispatch macros below.
  7307. [This is experimental code which may change soon.]
  7308. *** New macros for forwarding control to a generic on arg type error
  7309. New macro: SCM_WTA_DISPATCH_1 (GENERIC, ARG1, POS, SUBR)
  7310. New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
  7311. These correspond to the scm_wta function call, and have the same
  7312. behaviour until the user has called the GOOPS primitive
  7313. `enable-primitive-generic!'. After that, these macros will apply the
  7314. generic function GENERIC to the argument(s) instead of calling
  7315. scm_wta.
  7316. [This is experimental code which may change soon.]
  7317. *** New macros for argument testing with generic dispatch
  7318. New macro: SCM_GASSERT1 (COND, GENERIC, ARG1, POS, SUBR)
  7319. New macro: SCM_GASSERT2 (COND, GENERIC, ARG1, ARG2, POS, SUBR)
  7320. These correspond to the SCM_ASSERT macro, but will defer control to
  7321. GENERIC on error after `enable-primitive-generic!' has been called.
  7322. [This is experimental code which may change soon.]
  7323. ** New function: SCM scm_eval_body (SCM body, SCM env)
  7324. Evaluates the body of a special form.
  7325. ** The internal representation of struct's has changed
  7326. Previously, four slots were allocated for the procedure(s) of entities
  7327. and operators. The motivation for this representation had to do with
  7328. the structure of the evaluator, the wish to support tail-recursive
  7329. generic functions, and efficiency. Since the generic function
  7330. dispatch mechanism has changed, there is no longer a need for such an
  7331. expensive representation, and the representation has been simplified.
  7332. This should not make any difference for most users.
  7333. ** GOOPS support has been cleaned up.
  7334. Some code has been moved from eval.c to objects.c and code in both of
  7335. these compilation units has been cleaned up and better structured.
  7336. *** New functions for applying generic functions
  7337. New function: SCM scm_apply_generic (GENERIC, ARGS)
  7338. New function: SCM scm_call_generic_0 (GENERIC)
  7339. New function: SCM scm_call_generic_1 (GENERIC, ARG1)
  7340. New function: SCM scm_call_generic_2 (GENERIC, ARG1, ARG2)
  7341. New function: SCM scm_call_generic_3 (GENERIC, ARG1, ARG2, ARG3)
  7342. ** Deprecated function: scm_make_named_hook
  7343. It is now replaced by:
  7344. ** New function: SCM scm_create_hook (const char *name, int arity)
  7345. Creates a hook in the same way as make-hook above but also
  7346. binds a variable named NAME to it.
  7347. This is the typical way of creating a hook from C code.
  7348. Currently, the variable is created in the "current" module.
  7349. This might change when we get the new module system.
  7350. [The behaviour is identical to scm_make_named_hook.]
  7351. Changes since Guile 1.3:
  7352. * Changes to mailing lists
  7353. ** Some of the Guile mailing lists have moved to sourceware.cygnus.com.
  7354. See the README file to find current addresses for all the Guile
  7355. mailing lists.
  7356. * Changes to the distribution
  7357. ** Readline support is no longer included with Guile by default.
  7358. Based on the different license terms of Guile and Readline, we
  7359. concluded that Guile should not *by default* cause the linking of
  7360. Readline into an application program. Readline support is now offered
  7361. as a separate module, which is linked into an application only when
  7362. you explicitly specify it.
  7363. Although Guile is GNU software, its distribution terms add a special
  7364. exception to the usual GNU General Public License (GPL). Guile's
  7365. license includes a clause that allows you to link Guile with non-free
  7366. programs. We add this exception so as not to put Guile at a
  7367. disadvantage vis-a-vis other extensibility packages that support other
  7368. languages.
  7369. In contrast, the GNU Readline library is distributed under the GNU
  7370. General Public License pure and simple. This means that you may not
  7371. link Readline, even dynamically, into an application unless it is
  7372. distributed under a free software license that is compatible the GPL.
  7373. Because of this difference in distribution terms, an application that
  7374. can use Guile may not be able to use Readline. Now users will be
  7375. explicitly offered two independent decisions about the use of these
  7376. two packages.
  7377. You can activate the readline support by issuing
  7378. (use-modules (readline-activator))
  7379. (activate-readline)
  7380. from your ".guile" file, for example.
  7381. * Changes to the stand-alone interpreter
  7382. ** All builtins now print as primitives.
  7383. Previously builtin procedures not belonging to the fundamental subr
  7384. types printed as #<compiled closure #<primitive-procedure gsubr-apply>>.
  7385. Now, they print as #<primitive-procedure NAME>.
  7386. ** Backtraces slightly more intelligible.
  7387. gsubr-apply and macro transformer application frames no longer appear
  7388. in backtraces.
  7389. * Changes to Scheme functions and syntax
  7390. ** Guile now correctly handles internal defines by rewriting them into
  7391. their equivalent letrec. Previously, internal defines would
  7392. incrementally add to the innermost environment, without checking
  7393. whether the restrictions specified in RnRS were met. This lead to the
  7394. correct behaviour when these restriction actually were met, but didn't
  7395. catch all illegal uses. Such an illegal use could lead to crashes of
  7396. the Guile interpreter or other unwanted results. An example of
  7397. incorrect internal defines that made Guile behave erratically:
  7398. (let ()
  7399. (define a 1)
  7400. (define (b) a)
  7401. (define c (1+ (b)))
  7402. (define d 3)
  7403. (b))
  7404. => 2
  7405. The problem with this example is that the definition of `c' uses the
  7406. value of `b' directly. This confuses the meoization machine of Guile
  7407. so that the second call of `b' (this time in a larger environment that
  7408. also contains bindings for `c' and `d') refers to the binding of `c'
  7409. instead of `a'. You could also make Guile crash with a variation on
  7410. this theme:
  7411. (define (foo flag)
  7412. (define a 1)
  7413. (define (b flag) (if flag a 1))
  7414. (define c (1+ (b flag)))
  7415. (define d 3)
  7416. (b #t))
  7417. (foo #f)
  7418. (foo #t)
  7419. From now on, Guile will issue an `Unbound variable: b' error message
  7420. for both examples.
  7421. ** Hooks
  7422. A hook contains a list of functions which should be called on
  7423. particular occasions in an existing program. Hooks are used for
  7424. customization.
  7425. A window manager might have a hook before-window-map-hook. The window
  7426. manager uses the function run-hooks to call all functions stored in
  7427. before-window-map-hook each time a window is mapped. The user can
  7428. store functions in the hook using add-hook!.
  7429. In Guile, hooks are first class objects.
  7430. *** New function: make-hook [N_ARGS]
  7431. Return a hook for hook functions which can take N_ARGS arguments.
  7432. The default value for N_ARGS is 0.
  7433. (See also scm_make_named_hook below.)
  7434. *** New function: add-hook! HOOK PROC [APPEND_P]
  7435. Put PROC at the beginning of the list of functions stored in HOOK.
  7436. If APPEND_P is supplied, and non-false, put PROC at the end instead.
  7437. PROC must be able to take the number of arguments specified when the
  7438. hook was created.
  7439. If PROC already exists in HOOK, then remove it first.
  7440. *** New function: remove-hook! HOOK PROC
  7441. Remove PROC from the list of functions in HOOK.
  7442. *** New function: reset-hook! HOOK
  7443. Clear the list of hook functions stored in HOOK.
  7444. *** New function: run-hook HOOK ARG1 ...
  7445. Run all hook functions stored in HOOK with arguments ARG1 ... .
  7446. The number of arguments supplied must correspond to the number given
  7447. when the hook was created.
  7448. ** The function `dynamic-link' now takes optional keyword arguments.
  7449. The only keyword argument that is currently defined is `:global
  7450. BOOL'. With it, you can control whether the shared library will be
  7451. linked in global mode or not. In global mode, the symbols from the
  7452. linked library can be used to resolve references from other
  7453. dynamically linked libraries. In non-global mode, the linked
  7454. library is essentially invisible and can only be accessed via
  7455. `dynamic-func', etc. The default is now to link in global mode.
  7456. Previously, the default has been non-global mode.
  7457. The `#:global' keyword is only effective on platforms that support
  7458. the dlopen family of functions.
  7459. ** New function `provided?'
  7460. - Function: provided? FEATURE
  7461. Return true iff FEATURE is supported by this installation of
  7462. Guile. FEATURE must be a symbol naming a feature; the global
  7463. variable `*features*' is a list of available features.
  7464. ** Changes to the module (ice-9 expect):
  7465. *** The expect-strings macro now matches `$' in a regular expression
  7466. only at a line-break or end-of-file by default. Previously it would
  7467. match the end of the string accumulated so far. The old behaviour
  7468. can be obtained by setting the variable `expect-strings-exec-flags'
  7469. to 0.
  7470. *** The expect-strings macro now uses a variable `expect-strings-exec-flags'
  7471. for the regexp-exec flags. If `regexp/noteol' is included, then `$'
  7472. in a regular expression will still match before a line-break or
  7473. end-of-file. The default is `regexp/noteol'.
  7474. *** The expect-strings macro now uses a variable
  7475. `expect-strings-compile-flags' for the flags to be supplied to
  7476. `make-regexp'. The default is `regexp/newline', which was previously
  7477. hard-coded.
  7478. *** The expect macro now supplies two arguments to a match procedure:
  7479. the current accumulated string and a flag to indicate whether
  7480. end-of-file has been reached. Previously only the string was supplied.
  7481. If end-of-file is reached, the match procedure will be called an
  7482. additional time with the same accumulated string as the previous call
  7483. but with the flag set.
  7484. ** New module (ice-9 format), implementing the Common Lisp `format' function.
  7485. This code, and the documentation for it that appears here, was
  7486. borrowed from SLIB, with minor adaptations for Guile.
  7487. - Function: format DESTINATION FORMAT-STRING . ARGUMENTS
  7488. An almost complete implementation of Common LISP format description
  7489. according to the CL reference book `Common LISP' from Guy L.
  7490. Steele, Digital Press. Backward compatible to most of the
  7491. available Scheme format implementations.
  7492. Returns `#t', `#f' or a string; has side effect of printing
  7493. according to FORMAT-STRING. If DESTINATION is `#t', the output is
  7494. to the current output port and `#t' is returned. If DESTINATION
  7495. is `#f', a formatted string is returned as the result of the call.
  7496. NEW: If DESTINATION is a string, DESTINATION is regarded as the
  7497. format string; FORMAT-STRING is then the first argument and the
  7498. output is returned as a string. If DESTINATION is a number, the
  7499. output is to the current error port if available by the
  7500. implementation. Otherwise DESTINATION must be an output port and
  7501. `#t' is returned.
  7502. FORMAT-STRING must be a string. In case of a formatting error
  7503. format returns `#f' and prints a message on the current output or
  7504. error port. Characters are output as if the string were output by
  7505. the `display' function with the exception of those prefixed by a
  7506. tilde (~). For a detailed description of the FORMAT-STRING syntax
  7507. please consult a Common LISP format reference manual. For a test
  7508. suite to verify this format implementation load `formatst.scm'.
  7509. Please send bug reports to `lutzeb@cs.tu-berlin.de'.
  7510. Note: `format' is not reentrant, i.e. only one `format'-call may
  7511. be executed at a time.
  7512. *** Format Specification (Format version 3.0)
  7513. Please consult a Common LISP format reference manual for a detailed
  7514. description of the format string syntax. For a demonstration of the
  7515. implemented directives see `formatst.scm'.
  7516. This implementation supports directive parameters and modifiers (`:'
  7517. and `@' characters). Multiple parameters must be separated by a comma
  7518. (`,'). Parameters can be numerical parameters (positive or negative),
  7519. character parameters (prefixed by a quote character (`''), variable
  7520. parameters (`v'), number of rest arguments parameter (`#'), empty and
  7521. default parameters. Directive characters are case independent. The
  7522. general form of a directive is:
  7523. DIRECTIVE ::= ~{DIRECTIVE-PARAMETER,}[:][@]DIRECTIVE-CHARACTER
  7524. DIRECTIVE-PARAMETER ::= [ [-|+]{0-9}+ | 'CHARACTER | v | # ]
  7525. *** Implemented CL Format Control Directives
  7526. Documentation syntax: Uppercase characters represent the
  7527. corresponding control directive characters. Lowercase characters
  7528. represent control directive parameter descriptions.
  7529. `~A'
  7530. Any (print as `display' does).
  7531. `~@A'
  7532. left pad.
  7533. `~MINCOL,COLINC,MINPAD,PADCHARA'
  7534. full padding.
  7535. `~S'
  7536. S-expression (print as `write' does).
  7537. `~@S'
  7538. left pad.
  7539. `~MINCOL,COLINC,MINPAD,PADCHARS'
  7540. full padding.
  7541. `~D'
  7542. Decimal.
  7543. `~@D'
  7544. print number sign always.
  7545. `~:D'
  7546. print comma separated.
  7547. `~MINCOL,PADCHAR,COMMACHARD'
  7548. padding.
  7549. `~X'
  7550. Hexadecimal.
  7551. `~@X'
  7552. print number sign always.
  7553. `~:X'
  7554. print comma separated.
  7555. `~MINCOL,PADCHAR,COMMACHARX'
  7556. padding.
  7557. `~O'
  7558. Octal.
  7559. `~@O'
  7560. print number sign always.
  7561. `~:O'
  7562. print comma separated.
  7563. `~MINCOL,PADCHAR,COMMACHARO'
  7564. padding.
  7565. `~B'
  7566. Binary.
  7567. `~@B'
  7568. print number sign always.
  7569. `~:B'
  7570. print comma separated.
  7571. `~MINCOL,PADCHAR,COMMACHARB'
  7572. padding.
  7573. `~NR'
  7574. Radix N.
  7575. `~N,MINCOL,PADCHAR,COMMACHARR'
  7576. padding.
  7577. `~@R'
  7578. print a number as a Roman numeral.
  7579. `~:@R'
  7580. print a number as an "old fashioned" Roman numeral.
  7581. `~:R'
  7582. print a number as an ordinal English number.
  7583. `~:@R'
  7584. print a number as a cardinal English number.
  7585. `~P'
  7586. Plural.
  7587. `~@P'
  7588. prints `y' and `ies'.
  7589. `~:P'
  7590. as `~P but jumps 1 argument backward.'
  7591. `~:@P'
  7592. as `~@P but jumps 1 argument backward.'
  7593. `~C'
  7594. Character.
  7595. `~@C'
  7596. prints a character as the reader can understand it (i.e. `#\'
  7597. prefixing).
  7598. `~:C'
  7599. prints a character as emacs does (eg. `^C' for ASCII 03).
  7600. `~F'
  7601. Fixed-format floating-point (prints a flonum like MMM.NNN).
  7602. `~WIDTH,DIGITS,SCALE,OVERFLOWCHAR,PADCHARF'
  7603. `~@F'
  7604. If the number is positive a plus sign is printed.
  7605. `~E'
  7606. Exponential floating-point (prints a flonum like MMM.NNN`E'EE).
  7607. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARE'
  7608. `~@E'
  7609. If the number is positive a plus sign is printed.
  7610. `~G'
  7611. General floating-point (prints a flonum either fixed or
  7612. exponential).
  7613. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARG'
  7614. `~@G'
  7615. If the number is positive a plus sign is printed.
  7616. `~$'
  7617. Dollars floating-point (prints a flonum in fixed with signs
  7618. separated).
  7619. `~DIGITS,SCALE,WIDTH,PADCHAR$'
  7620. `~@$'
  7621. If the number is positive a plus sign is printed.
  7622. `~:@$'
  7623. A sign is always printed and appears before the padding.
  7624. `~:$'
  7625. The sign appears before the padding.
  7626. `~%'
  7627. Newline.
  7628. `~N%'
  7629. print N newlines.
  7630. `~&'
  7631. print newline if not at the beginning of the output line.
  7632. `~N&'
  7633. prints `~&' and then N-1 newlines.
  7634. `~|'
  7635. Page Separator.
  7636. `~N|'
  7637. print N page separators.
  7638. `~~'
  7639. Tilde.
  7640. `~N~'
  7641. print N tildes.
  7642. `~'<newline>
  7643. Continuation Line.
  7644. `~:'<newline>
  7645. newline is ignored, white space left.
  7646. `~@'<newline>
  7647. newline is left, white space ignored.
  7648. `~T'
  7649. Tabulation.
  7650. `~@T'
  7651. relative tabulation.
  7652. `~COLNUM,COLINCT'
  7653. full tabulation.
  7654. `~?'
  7655. Indirection (expects indirect arguments as a list).
  7656. `~@?'
  7657. extracts indirect arguments from format arguments.
  7658. `~(STR~)'
  7659. Case conversion (converts by `string-downcase').
  7660. `~:(STR~)'
  7661. converts by `string-capitalize'.
  7662. `~@(STR~)'
  7663. converts by `string-capitalize-first'.
  7664. `~:@(STR~)'
  7665. converts by `string-upcase'.
  7666. `~*'
  7667. Argument Jumping (jumps 1 argument forward).
  7668. `~N*'
  7669. jumps N arguments forward.
  7670. `~:*'
  7671. jumps 1 argument backward.
  7672. `~N:*'
  7673. jumps N arguments backward.
  7674. `~@*'
  7675. jumps to the 0th argument.
  7676. `~N@*'
  7677. jumps to the Nth argument (beginning from 0)
  7678. `~[STR0~;STR1~;...~;STRN~]'
  7679. Conditional Expression (numerical clause conditional).
  7680. `~N['
  7681. take argument from N.
  7682. `~@['
  7683. true test conditional.
  7684. `~:['
  7685. if-else-then conditional.
  7686. `~;'
  7687. clause separator.
  7688. `~:;'
  7689. default clause follows.
  7690. `~{STR~}'
  7691. Iteration (args come from the next argument (a list)).
  7692. `~N{'
  7693. at most N iterations.
  7694. `~:{'
  7695. args from next arg (a list of lists).
  7696. `~@{'
  7697. args from the rest of arguments.
  7698. `~:@{'
  7699. args from the rest args (lists).
  7700. `~^'
  7701. Up and out.
  7702. `~N^'
  7703. aborts if N = 0
  7704. `~N,M^'
  7705. aborts if N = M
  7706. `~N,M,K^'
  7707. aborts if N <= M <= K
  7708. *** Not Implemented CL Format Control Directives
  7709. `~:A'
  7710. print `#f' as an empty list (see below).
  7711. `~:S'
  7712. print `#f' as an empty list (see below).
  7713. `~<~>'
  7714. Justification.
  7715. `~:^'
  7716. (sorry I don't understand its semantics completely)
  7717. *** Extended, Replaced and Additional Control Directives
  7718. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHD'
  7719. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHX'
  7720. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHO'
  7721. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHB'
  7722. `~N,MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHR'
  7723. COMMAWIDTH is the number of characters between two comma
  7724. characters.
  7725. `~I'
  7726. print a R4RS complex number as `~F~@Fi' with passed parameters for
  7727. `~F'.
  7728. `~Y'
  7729. Pretty print formatting of an argument for scheme code lists.
  7730. `~K'
  7731. Same as `~?.'
  7732. `~!'
  7733. Flushes the output if format DESTINATION is a port.
  7734. `~_'
  7735. Print a `#\space' character
  7736. `~N_'
  7737. print N `#\space' characters.
  7738. `~/'
  7739. Print a `#\tab' character
  7740. `~N/'
  7741. print N `#\tab' characters.
  7742. `~NC'
  7743. Takes N as an integer representation for a character. No arguments
  7744. are consumed. N is converted to a character by `integer->char'. N
  7745. must be a positive decimal number.
  7746. `~:S'
  7747. Print out readproof. Prints out internal objects represented as
  7748. `#<...>' as strings `"#<...>"' so that the format output can always
  7749. be processed by `read'.
  7750. `~:A'
  7751. Print out readproof. Prints out internal objects represented as
  7752. `#<...>' as strings `"#<...>"' so that the format output can always
  7753. be processed by `read'.
  7754. `~Q'
  7755. Prints information and a copyright notice on the format
  7756. implementation.
  7757. `~:Q'
  7758. prints format version.
  7759. `~F, ~E, ~G, ~$'
  7760. may also print number strings, i.e. passing a number as a string
  7761. and format it accordingly.
  7762. *** Configuration Variables
  7763. The format module exports some configuration variables to suit the
  7764. systems and users needs. There should be no modification necessary for
  7765. the configuration that comes with Guile. Format detects automatically
  7766. if the running scheme system implements floating point numbers and
  7767. complex numbers.
  7768. format:symbol-case-conv
  7769. Symbols are converted by `symbol->string' so the case type of the
  7770. printed symbols is implementation dependent.
  7771. `format:symbol-case-conv' is a one arg closure which is either
  7772. `#f' (no conversion), `string-upcase', `string-downcase' or
  7773. `string-capitalize'. (default `#f')
  7774. format:iobj-case-conv
  7775. As FORMAT:SYMBOL-CASE-CONV but applies for the representation of
  7776. implementation internal objects. (default `#f')
  7777. format:expch
  7778. The character prefixing the exponent value in `~E' printing.
  7779. (default `#\E')
  7780. *** Compatibility With Other Format Implementations
  7781. SLIB format 2.x:
  7782. See `format.doc'.
  7783. SLIB format 1.4:
  7784. Downward compatible except for padding support and `~A', `~S',
  7785. `~P', `~X' uppercase printing. SLIB format 1.4 uses C-style
  7786. `printf' padding support which is completely replaced by the CL
  7787. `format' padding style.
  7788. MIT C-Scheme 7.1:
  7789. Downward compatible except for `~', which is not documented
  7790. (ignores all characters inside the format string up to a newline
  7791. character). (7.1 implements `~a', `~s', ~NEWLINE, `~~', `~%',
  7792. numerical and variable parameters and `:/@' modifiers in the CL
  7793. sense).
  7794. Elk 1.5/2.0:
  7795. Downward compatible except for `~A' and `~S' which print in
  7796. uppercase. (Elk implements `~a', `~s', `~~', and `~%' (no
  7797. directive parameters or modifiers)).
  7798. Scheme->C 01nov91:
  7799. Downward compatible except for an optional destination parameter:
  7800. S2C accepts a format call without a destination which returns a
  7801. formatted string. This is equivalent to a #f destination in S2C.
  7802. (S2C implements `~a', `~s', `~c', `~%', and `~~' (no directive
  7803. parameters or modifiers)).
  7804. ** Changes to string-handling functions.
  7805. These functions were added to support the (ice-9 format) module, above.
  7806. *** New function: string-upcase STRING
  7807. *** New function: string-downcase STRING
  7808. These are non-destructive versions of the existing string-upcase! and
  7809. string-downcase! functions.
  7810. *** New function: string-capitalize! STRING
  7811. *** New function: string-capitalize STRING
  7812. These functions convert the first letter of each word in the string to
  7813. upper case. Thus:
  7814. (string-capitalize "howdy there")
  7815. => "Howdy There"
  7816. As with the other functions, string-capitalize! modifies the string in
  7817. place, while string-capitalize returns a modified copy of its argument.
  7818. *** New function: string-ci->symbol STRING
  7819. Return a symbol whose name is STRING, but having the same case as if
  7820. the symbol had be read by `read'.
  7821. Guile can be configured to be sensitive or insensitive to case
  7822. differences in Scheme identifiers. If Guile is case-insensitive, all
  7823. symbols are converted to lower case on input. The `string-ci->symbol'
  7824. function returns a symbol whose name in STRING, transformed as Guile
  7825. would if STRING were input.
  7826. *** New function: substring-move! STRING1 START END STRING2 START
  7827. Copy the substring of STRING1 from START (inclusive) to END
  7828. (exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
  7829. string, and the source and destination areas may overlap; in all
  7830. cases, the function behaves as if all the characters were copied
  7831. simultanously.
  7832. *** Extended functions: substring-move-left! substring-move-right!
  7833. These functions now correctly copy arbitrarily overlapping substrings;
  7834. they are both synonyms for substring-move!.
  7835. ** New module (ice-9 getopt-long), with the function `getopt-long'.
  7836. getopt-long is a function for parsing command-line arguments in a
  7837. manner consistent with other GNU programs.
  7838. (getopt-long ARGS GRAMMAR)
  7839. Parse the arguments ARGS according to the argument list grammar GRAMMAR.
  7840. ARGS should be a list of strings. Its first element should be the
  7841. name of the program; subsequent elements should be the arguments
  7842. that were passed to the program on the command line. The
  7843. `program-arguments' procedure returns a list of this form.
  7844. GRAMMAR is a list of the form:
  7845. ((OPTION (PROPERTY VALUE) ...) ...)
  7846. Each OPTION should be a symbol. `getopt-long' will accept a
  7847. command-line option named `--OPTION'.
  7848. Each option can have the following (PROPERTY VALUE) pairs:
  7849. (single-char CHAR) --- Accept `-CHAR' as a single-character
  7850. equivalent to `--OPTION'. This is how to specify traditional
  7851. Unix-style flags.
  7852. (required? BOOL) --- If BOOL is true, the option is required.
  7853. getopt-long will raise an error if it is not found in ARGS.
  7854. (value BOOL) --- If BOOL is #t, the option accepts a value; if
  7855. it is #f, it does not; and if it is the symbol
  7856. `optional', the option may appear in ARGS with or
  7857. without a value.
  7858. (predicate FUNC) --- If the option accepts a value (i.e. you
  7859. specified `(value #t)' for this option), then getopt
  7860. will apply FUNC to the value, and throw an exception
  7861. if it returns #f. FUNC should be a procedure which
  7862. accepts a string and returns a boolean value; you may
  7863. need to use quasiquotes to get it into GRAMMAR.
  7864. The (PROPERTY VALUE) pairs may occur in any order, but each
  7865. property may occur only once. By default, options do not have
  7866. single-character equivalents, are not required, and do not take
  7867. values.
  7868. In ARGS, single-character options may be combined, in the usual
  7869. Unix fashion: ("-x" "-y") is equivalent to ("-xy"). If an option
  7870. accepts values, then it must be the last option in the
  7871. combination; the value is the next argument. So, for example, using
  7872. the following grammar:
  7873. ((apples (single-char #\a))
  7874. (blimps (single-char #\b) (value #t))
  7875. (catalexis (single-char #\c) (value #t)))
  7876. the following argument lists would be acceptable:
  7877. ("-a" "-b" "bang" "-c" "couth") ("bang" and "couth" are the values
  7878. for "blimps" and "catalexis")
  7879. ("-ab" "bang" "-c" "couth") (same)
  7880. ("-ac" "couth" "-b" "bang") (same)
  7881. ("-abc" "couth" "bang") (an error, since `-b' is not the
  7882. last option in its combination)
  7883. If an option's value is optional, then `getopt-long' decides
  7884. whether it has a value by looking at what follows it in ARGS. If
  7885. the next element is a string, and it does not appear to be an
  7886. option itself, then that string is the option's value.
  7887. The value of a long option can appear as the next element in ARGS,
  7888. or it can follow the option name, separated by an `=' character.
  7889. Thus, using the same grammar as above, the following argument lists
  7890. are equivalent:
  7891. ("--apples" "Braeburn" "--blimps" "Goodyear")
  7892. ("--apples=Braeburn" "--blimps" "Goodyear")
  7893. ("--blimps" "Goodyear" "--apples=Braeburn")
  7894. If the option "--" appears in ARGS, argument parsing stops there;
  7895. subsequent arguments are returned as ordinary arguments, even if
  7896. they resemble options. So, in the argument list:
  7897. ("--apples" "Granny Smith" "--" "--blimp" "Goodyear")
  7898. `getopt-long' will recognize the `apples' option as having the
  7899. value "Granny Smith", but it will not recognize the `blimp'
  7900. option; it will return the strings "--blimp" and "Goodyear" as
  7901. ordinary argument strings.
  7902. The `getopt-long' function returns the parsed argument list as an
  7903. assocation list, mapping option names --- the symbols from GRAMMAR
  7904. --- onto their values, or #t if the option does not accept a value.
  7905. Unused options do not appear in the alist.
  7906. All arguments that are not the value of any option are returned
  7907. as a list, associated with the empty list.
  7908. `getopt-long' throws an exception if:
  7909. - it finds an unrecognized option in ARGS
  7910. - a required option is omitted
  7911. - an option that requires an argument doesn't get one
  7912. - an option that doesn't accept an argument does get one (this can
  7913. only happen using the long option `--opt=value' syntax)
  7914. - an option predicate fails
  7915. So, for example:
  7916. (define grammar
  7917. `((lockfile-dir (required? #t)
  7918. (value #t)
  7919. (single-char #\k)
  7920. (predicate ,file-is-directory?))
  7921. (verbose (required? #f)
  7922. (single-char #\v)
  7923. (value #f))
  7924. (x-includes (single-char #\x))
  7925. (rnet-server (single-char #\y)
  7926. (predicate ,string?))))
  7927. (getopt-long '("my-prog" "-vk" "/tmp" "foo1" "--x-includes=/usr/include"
  7928. "--rnet-server=lamprod" "--" "-fred" "foo2" "foo3")
  7929. grammar)
  7930. => ((() "foo1" "-fred" "foo2" "foo3")
  7931. (rnet-server . "lamprod")
  7932. (x-includes . "/usr/include")
  7933. (lockfile-dir . "/tmp")
  7934. (verbose . #t))
  7935. ** The (ice-9 getopt-gnu-style) module is obsolete; use (ice-9 getopt-long).
  7936. It will be removed in a few releases.
  7937. ** New syntax: lambda*
  7938. ** New syntax: define*
  7939. ** New syntax: define*-public
  7940. ** New syntax: defmacro*
  7941. ** New syntax: defmacro*-public
  7942. Guile now supports optional arguments.
  7943. `lambda*', `define*', `define*-public', `defmacro*' and
  7944. `defmacro*-public' are identical to the non-* versions except that
  7945. they use an extended type of parameter list that has the following BNF
  7946. syntax (parentheses are literal, square brackets indicate grouping,
  7947. and `*', `+' and `?' have the usual meaning):
  7948. ext-param-list ::= ( [identifier]* [#&optional [ext-var-decl]+]?
  7949. [#&key [ext-var-decl]+ [#&allow-other-keys]?]?
  7950. [[#&rest identifier]|[. identifier]]? ) | [identifier]
  7951. ext-var-decl ::= identifier | ( identifier expression )
  7952. The semantics are best illustrated with the following documentation
  7953. and examples for `lambda*':
  7954. lambda* args . body
  7955. lambda extended for optional and keyword arguments
  7956. lambda* creates a procedure that takes optional arguments. These
  7957. are specified by putting them inside brackets at the end of the
  7958. paramater list, but before any dotted rest argument. For example,
  7959. (lambda* (a b #&optional c d . e) '())
  7960. creates a procedure with fixed arguments a and b, optional arguments c
  7961. and d, and rest argument e. If the optional arguments are omitted
  7962. in a call, the variables for them are unbound in the procedure. This
  7963. can be checked with the bound? macro.
  7964. lambda* can also take keyword arguments. For example, a procedure
  7965. defined like this:
  7966. (lambda* (#&key xyzzy larch) '())
  7967. can be called with any of the argument lists (#:xyzzy 11)
  7968. (#:larch 13) (#:larch 42 #:xyzzy 19) (). Whichever arguments
  7969. are given as keywords are bound to values.
  7970. Optional and keyword arguments can also be given default values
  7971. which they take on when they are not present in a call, by giving a
  7972. two-item list in place of an optional argument, for example in:
  7973. (lambda* (foo #&optional (bar 42) #&key (baz 73)) (list foo bar baz))
  7974. foo is a fixed argument, bar is an optional argument with default
  7975. value 42, and baz is a keyword argument with default value 73.
  7976. Default value expressions are not evaluated unless they are needed
  7977. and until the procedure is called.
  7978. lambda* now supports two more special parameter list keywords.
  7979. lambda*-defined procedures now throw an error by default if a
  7980. keyword other than one of those specified is found in the actual
  7981. passed arguments. However, specifying #&allow-other-keys
  7982. immediately after the kyword argument declarations restores the
  7983. previous behavior of ignoring unknown keywords. lambda* also now
  7984. guarantees that if the same keyword is passed more than once, the
  7985. last one passed is the one that takes effect. For example,
  7986. ((lambda* (#&key (heads 0) (tails 0)) (display (list heads tails)))
  7987. #:heads 37 #:tails 42 #:heads 99)
  7988. would result in (99 47) being displayed.
  7989. #&rest is also now provided as a synonym for the dotted syntax rest
  7990. argument. The argument lists (a . b) and (a #&rest b) are equivalent in
  7991. all respects to lambda*. This is provided for more similarity to DSSSL,
  7992. MIT-Scheme and Kawa among others, as well as for refugees from other
  7993. Lisp dialects.
  7994. Further documentation may be found in the optargs.scm file itself.
  7995. The optional argument module also exports the macros `let-optional',
  7996. `let-optional*', `let-keywords', `let-keywords*' and `bound?'. These
  7997. are not documented here because they may be removed in the future, but
  7998. full documentation is still available in optargs.scm.
  7999. ** New syntax: and-let*
  8000. Guile now supports the `and-let*' form, described in the draft SRFI-2.
  8001. Syntax: (land* (<clause> ...) <body> ...)
  8002. Each <clause> should have one of the following forms:
  8003. (<variable> <expression>)
  8004. (<expression>)
  8005. <bound-variable>
  8006. Each <variable> or <bound-variable> should be an identifier. Each
  8007. <expression> should be a valid expression. The <body> should be a
  8008. possibly empty sequence of expressions, like the <body> of a
  8009. lambda form.
  8010. Semantics: A LAND* expression is evaluated by evaluating the
  8011. <expression> or <bound-variable> of each of the <clause>s from
  8012. left to right. The value of the first <expression> or
  8013. <bound-variable> that evaluates to a false value is returned; the
  8014. remaining <expression>s and <bound-variable>s are not evaluated.
  8015. The <body> forms are evaluated iff all the <expression>s and
  8016. <bound-variable>s evaluate to true values.
  8017. The <expression>s and the <body> are evaluated in an environment
  8018. binding each <variable> of the preceding (<variable> <expression>)
  8019. clauses to the value of the <expression>. Later bindings
  8020. shadow earlier bindings.
  8021. Guile's and-let* macro was contributed by Michael Livshin.
  8022. ** New sorting functions
  8023. *** New function: sorted? SEQUENCE LESS?
  8024. Returns `#t' when the sequence argument is in non-decreasing order
  8025. according to LESS? (that is, there is no adjacent pair `... x y
  8026. ...' for which `(less? y x)').
  8027. Returns `#f' when the sequence contains at least one out-of-order
  8028. pair. It is an error if the sequence is neither a list nor a
  8029. vector.
  8030. *** New function: merge LIST1 LIST2 LESS?
  8031. LIST1 and LIST2 are sorted lists.
  8032. Returns the sorted list of all elements in LIST1 and LIST2.
  8033. Assume that the elements a and b1 in LIST1 and b2 in LIST2 are "equal"
  8034. in the sense that (LESS? x y) --> #f for x, y in {a, b1, b2},
  8035. and that a < b1 in LIST1. Then a < b1 < b2 in the result.
  8036. (Here "<" should read "comes before".)
  8037. *** New procedure: merge! LIST1 LIST2 LESS?
  8038. Merges two lists, re-using the pairs of LIST1 and LIST2 to build
  8039. the result. If the code is compiled, and LESS? constructs no new
  8040. pairs, no pairs at all will be allocated. The first pair of the
  8041. result will be either the first pair of LIST1 or the first pair of
  8042. LIST2.
  8043. *** New function: sort SEQUENCE LESS?
  8044. Accepts either a list or a vector, and returns a new sequence
  8045. which is sorted. The new sequence is the same type as the input.
  8046. Always `(sorted? (sort sequence less?) less?)'. The original
  8047. sequence is not altered in any way. The new sequence shares its
  8048. elements with the old one; no elements are copied.
  8049. *** New procedure: sort! SEQUENCE LESS
  8050. Returns its sorted result in the original boxes. No new storage is
  8051. allocated at all. Proper usage: (set! slist (sort! slist <))
  8052. *** New function: stable-sort SEQUENCE LESS?
  8053. Similar to `sort' but stable. That is, if "equal" elements are
  8054. ordered a < b in the original sequence, they will have the same order
  8055. in the result.
  8056. *** New function: stable-sort! SEQUENCE LESS?
  8057. Similar to `sort!' but stable.
  8058. Uses temporary storage when sorting vectors.
  8059. *** New functions: sort-list, sort-list!
  8060. Added for compatibility with scsh.
  8061. ** New built-in random number support
  8062. *** New function: random N [STATE]
  8063. Accepts a positive integer or real N and returns a number of the
  8064. same type between zero (inclusive) and N (exclusive). The values
  8065. returned have a uniform distribution.
  8066. The optional argument STATE must be of the type produced by
  8067. `copy-random-state' or `seed->random-state'. It defaults to the value
  8068. of the variable `*random-state*'. This object is used to maintain the
  8069. state of the pseudo-random-number generator and is altered as a side
  8070. effect of the `random' operation.
  8071. *** New variable: *random-state*
  8072. Holds a data structure that encodes the internal state of the
  8073. random-number generator that `random' uses by default. The nature
  8074. of this data structure is implementation-dependent. It may be
  8075. printed out and successfully read back in, but may or may not
  8076. function correctly as a random-number state object in another
  8077. implementation.
  8078. *** New function: copy-random-state [STATE]
  8079. Returns a new object of type suitable for use as the value of the
  8080. variable `*random-state*' and as a second argument to `random'.
  8081. If argument STATE is given, a copy of it is returned. Otherwise a
  8082. copy of `*random-state*' is returned.
  8083. *** New function: seed->random-state SEED
  8084. Returns a new object of type suitable for use as the value of the
  8085. variable `*random-state*' and as a second argument to `random'.
  8086. SEED is a string or a number. A new state is generated and
  8087. initialized using SEED.
  8088. *** New function: random:uniform [STATE]
  8089. Returns an uniformly distributed inexact real random number in the
  8090. range between 0 and 1.
  8091. *** New procedure: random:solid-sphere! VECT [STATE]
  8092. Fills VECT with inexact real random numbers the sum of whose
  8093. squares is less than 1.0. Thinking of VECT as coordinates in
  8094. space of dimension N = `(vector-length VECT)', the coordinates are
  8095. uniformly distributed within the unit N-shere. The sum of the
  8096. squares of the numbers is returned. VECT can be either a vector
  8097. or a uniform vector of doubles.
  8098. *** New procedure: random:hollow-sphere! VECT [STATE]
  8099. Fills VECT with inexact real random numbers the sum of whose squares
  8100. is equal to 1.0. Thinking of VECT as coordinates in space of
  8101. dimension n = `(vector-length VECT)', the coordinates are uniformly
  8102. distributed over the surface of the unit n-shere. VECT can be either
  8103. a vector or a uniform vector of doubles.
  8104. *** New function: random:normal [STATE]
  8105. Returns an inexact real in a normal distribution with mean 0 and
  8106. standard deviation 1. For a normal distribution with mean M and
  8107. standard deviation D use `(+ M (* D (random:normal)))'.
  8108. *** New procedure: random:normal-vector! VECT [STATE]
  8109. Fills VECT with inexact real random numbers which are independent and
  8110. standard normally distributed (i.e., with mean 0 and variance 1).
  8111. VECT can be either a vector or a uniform vector of doubles.
  8112. *** New function: random:exp STATE
  8113. Returns an inexact real in an exponential distribution with mean 1.
  8114. For an exponential distribution with mean U use (* U (random:exp)).
  8115. ** The range of logand, logior, logxor, logtest, and logbit? have changed.
  8116. These functions now operate on numbers in the range of a C unsigned
  8117. long.
  8118. These functions used to operate on numbers in the range of a C signed
  8119. long; however, this seems inappropriate, because Guile integers don't
  8120. overflow.
  8121. ** New function: make-guardian
  8122. This is an implementation of guardians as described in
  8123. R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a
  8124. Generation-Based Garbage Collector" ACM SIGPLAN Conference on
  8125. Programming Language Design and Implementation, June 1993
  8126. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/guardians.ps.gz
  8127. ** New functions: delq1!, delv1!, delete1!
  8128. These procedures behave similar to delq! and friends but delete only
  8129. one object if at all.
  8130. ** New function: unread-string STRING PORT
  8131. Unread STRING to PORT, that is, push it back onto the port so that
  8132. next read operation will work on the pushed back characters.
  8133. ** unread-char can now be called multiple times
  8134. If unread-char is called multiple times, the unread characters will be
  8135. read again in last-in first-out order.
  8136. ** the procedures uniform-array-read! and uniform-array-write! now
  8137. work on any kind of port, not just ports which are open on a file.
  8138. ** Now 'l' in a port mode requests line buffering.
  8139. ** The procedure truncate-file now works on string ports as well
  8140. as file ports. If the size argument is omitted, the current
  8141. file position is used.
  8142. ** new procedure: seek PORT/FDES OFFSET WHENCE
  8143. The arguments are the same as for the old fseek procedure, but it
  8144. works on string ports as well as random-access file ports.
  8145. ** the fseek procedure now works on string ports, since it has been
  8146. redefined using seek.
  8147. ** the setvbuf procedure now uses a default size if mode is _IOFBF and
  8148. size is not supplied.
  8149. ** the newline procedure no longer flushes the port if it's not
  8150. line-buffered: previously it did if it was the current output port.
  8151. ** open-pipe and close-pipe are no longer primitive procedures, but
  8152. an emulation can be obtained using `(use-modules (ice-9 popen))'.
  8153. ** the freopen procedure has been removed.
  8154. ** new procedure: drain-input PORT
  8155. Drains PORT's read buffers (including any pushed-back characters)
  8156. and returns the contents as a single string.
  8157. ** New function: map-in-order PROC LIST1 LIST2 ...
  8158. Version of `map' which guarantees that the procedure is applied to the
  8159. lists in serial order.
  8160. ** Renamed `serial-array-copy!' and `serial-array-map!' to
  8161. `array-copy-in-order!' and `array-map-in-order!'. The old names are
  8162. now obsolete and will go away in release 1.5.
  8163. ** New syntax: collect BODY1 ...
  8164. Version of `begin' which returns a list of the results of the body
  8165. forms instead of the result of the last body form. In contrast to
  8166. `begin', `collect' allows an empty body.
  8167. ** New functions: read-history FILENAME, write-history FILENAME
  8168. Read/write command line history from/to file. Returns #t on success
  8169. and #f if an error occured.
  8170. ** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
  8171. These procedures return a list of definitions available in the specified
  8172. argument, a relative module reference. In the case of no argument,
  8173. `(current-module)' is now consulted for definitions to return, instead
  8174. of simply returning #f, the former behavior.
  8175. ** The #/ syntax for lists is no longer supported.
  8176. Earlier versions of Scheme accepted this syntax, but printed a
  8177. warning.
  8178. ** Guile no longer consults the SCHEME_LOAD_PATH environment variable.
  8179. Instead, you should set GUILE_LOAD_PATH to tell Guile where to find
  8180. modules.
  8181. * Changes to the gh_ interface
  8182. ** gh_scm2doubles
  8183. Now takes a second argument which is the result array. If this
  8184. pointer is NULL, a new array is malloced (the old behaviour).
  8185. ** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
  8186. gh_scm2shorts, gh_scm2longs, gh_scm2floats
  8187. New functions.
  8188. * Changes to the scm_ interface
  8189. ** Function: scm_make_named_hook (char* name, int n_args)
  8190. Creates a hook in the same way as make-hook above but also
  8191. binds a variable named NAME to it.
  8192. This is the typical way of creating a hook from C code.
  8193. Currently, the variable is created in the "current" module. This
  8194. might change when we get the new module system.
  8195. ** The smob interface
  8196. The interface for creating smobs has changed. For documentation, see
  8197. data-rep.info (made from guile-core/doc/data-rep.texi).
  8198. *** Deprecated function: SCM scm_newsmob (scm_smobfuns *)
  8199. >>> This function will be removed in 1.3.4. <<<
  8200. It is replaced by:
  8201. *** Function: SCM scm_make_smob_type (const char *name, scm_sizet size)
  8202. This function adds a new smob type, named NAME, with instance size
  8203. SIZE to the system. The return value is a tag that is used in
  8204. creating instances of the type. If SIZE is 0, then no memory will
  8205. be allocated when instances of the smob are created, and nothing
  8206. will be freed by the default free function.
  8207. *** Function: void scm_set_smob_mark (long tc, SCM (*mark) (SCM))
  8208. This function sets the smob marking procedure for the smob type
  8209. specified by the tag TC. TC is the tag returned by
  8210. `scm_make_smob_type'.
  8211. *** Function: void scm_set_smob_free (long tc, SCM (*mark) (SCM))
  8212. This function sets the smob freeing procedure for the smob type
  8213. specified by the tag TC. TC is the tag returned by
  8214. `scm_make_smob_type'.
  8215. *** Function: void scm_set_smob_print (tc, print)
  8216. - Function: void scm_set_smob_print (long tc,
  8217. scm_sizet (*print) (SCM,
  8218. SCM,
  8219. scm_print_state *))
  8220. This function sets the smob printing procedure for the smob type
  8221. specified by the tag TC. TC is the tag returned by
  8222. `scm_make_smob_type'.
  8223. *** Function: void scm_set_smob_equalp (long tc, SCM (*equalp) (SCM, SCM))
  8224. This function sets the smob equality-testing predicate for the
  8225. smob type specified by the tag TC. TC is the tag returned by
  8226. `scm_make_smob_type'.
  8227. *** Macro: void SCM_NEWSMOB (SCM var, long tc, void *data)
  8228. Make VALUE contain a smob instance of the type with type code TC and
  8229. smob data DATA. VALUE must be previously declared as C type `SCM'.
  8230. *** Macro: fn_returns SCM_RETURN_NEWSMOB (long tc, void *data)
  8231. This macro expands to a block of code that creates a smob instance
  8232. of the type with type code TC and smob data DATA, and returns that
  8233. `SCM' value. It should be the last piece of code in a block.
  8234. ** The interfaces for using I/O ports and implementing port types
  8235. (ptobs) have changed significantly. The new interface is based on
  8236. shared access to buffers and a new set of ptob procedures.
  8237. *** scm_newptob has been removed
  8238. It is replaced by:
  8239. *** Function: SCM scm_make_port_type (type_name, fill_buffer, write_flush)
  8240. - Function: SCM scm_make_port_type (char *type_name,
  8241. int (*fill_buffer) (SCM port),
  8242. void (*write_flush) (SCM port));
  8243. Similarly to the new smob interface, there is a set of function
  8244. setters by which the user can customize the behaviour of his port
  8245. type. See ports.h (scm_set_port_XXX).
  8246. ** scm_strport_to_string: New function: creates a new string from
  8247. a string port's buffer.
  8248. ** Plug in interface for random number generators
  8249. The variable `scm_the_rng' in random.c contains a value and three
  8250. function pointers which together define the current random number
  8251. generator being used by the Scheme level interface and the random
  8252. number library functions.
  8253. The user is free to replace the default generator with the generator
  8254. of his own choice.
  8255. *** Variable: size_t scm_the_rng.rstate_size
  8256. The size of the random state type used by the current RNG
  8257. measured in chars.
  8258. *** Function: unsigned long scm_the_rng.random_bits (scm_rstate *STATE)
  8259. Given the random STATE, return 32 random bits.
  8260. *** Function: void scm_the_rng.init_rstate (scm_rstate *STATE, chars *S, int N)
  8261. Seed random state STATE using string S of length N.
  8262. *** Function: scm_rstate *scm_the_rng.copy_rstate (scm_rstate *STATE)
  8263. Given random state STATE, return a malloced copy.
  8264. ** Default RNG
  8265. The default RNG is the MWC (Multiply With Carry) random number
  8266. generator described by George Marsaglia at the Department of
  8267. Statistics and Supercomputer Computations Research Institute, The
  8268. Florida State University (http://stat.fsu.edu/~geo).
  8269. It uses 64 bits, has a period of 4578426017172946943 (4.6e18), and
  8270. passes all tests in the DIEHARD test suite
  8271. (http://stat.fsu.edu/~geo/diehard.html). The generation of 32 bits
  8272. costs one multiply and one add on platforms which either supports long
  8273. longs (gcc does this on most systems) or have 64 bit longs. The cost
  8274. is four multiply on other systems but this can be optimized by writing
  8275. scm_i_uniform32 in assembler.
  8276. These functions are provided through the scm_the_rng interface for use
  8277. by libguile and the application.
  8278. *** Function: unsigned long scm_i_uniform32 (scm_i_rstate *STATE)
  8279. Given the random STATE, return 32 random bits.
  8280. Don't use this function directly. Instead go through the plugin
  8281. interface (see "Plug in interface" above).
  8282. *** Function: void scm_i_init_rstate (scm_i_rstate *STATE, char *SEED, int N)
  8283. Initialize STATE using SEED of length N.
  8284. *** Function: scm_i_rstate *scm_i_copy_rstate (scm_i_rstate *STATE)
  8285. Return a malloc:ed copy of STATE. This function can easily be re-used
  8286. in the interfaces to other RNGs.
  8287. ** Random number library functions
  8288. These functions use the current RNG through the scm_the_rng interface.
  8289. It might be a good idea to use these functions from your C code so
  8290. that only one random generator is used by all code in your program.
  8291. The default random state is stored in:
  8292. *** Variable: SCM scm_var_random_state
  8293. Contains the vcell of the Scheme variable "*random-state*" which is
  8294. used as default state by all random number functions in the Scheme
  8295. level interface.
  8296. Example:
  8297. double x = scm_c_uniform01 (SCM_RSTATE (SCM_CDR (scm_var_random_state)));
  8298. *** Function: scm_rstate *scm_c_default_rstate (void)
  8299. This is a convenience function which returns the value of
  8300. scm_var_random_state. An error message is generated if this value
  8301. isn't a random state.
  8302. *** Function: scm_rstate *scm_c_make_rstate (char *SEED, int LENGTH)
  8303. Make a new random state from the string SEED of length LENGTH.
  8304. It is generally not a good idea to use multiple random states in a
  8305. program. While subsequent random numbers generated from one random
  8306. state are guaranteed to be reasonably independent, there is no such
  8307. guarantee for numbers generated from different random states.
  8308. *** Macro: unsigned long scm_c_uniform32 (scm_rstate *STATE)
  8309. Return 32 random bits.
  8310. *** Function: double scm_c_uniform01 (scm_rstate *STATE)
  8311. Return a sample from the uniform(0,1) distribution.
  8312. *** Function: double scm_c_normal01 (scm_rstate *STATE)
  8313. Return a sample from the normal(0,1) distribution.
  8314. *** Function: double scm_c_exp1 (scm_rstate *STATE)
  8315. Return a sample from the exp(1) distribution.
  8316. *** Function: unsigned long scm_c_random (scm_rstate *STATE, unsigned long M)
  8317. Return a sample from the discrete uniform(0,M) distribution.
  8318. *** Function: SCM scm_c_random_bignum (scm_rstate *STATE, SCM M)
  8319. Return a sample from the discrete uniform(0,M) distribution.
  8320. M must be a bignum object. The returned value may be an INUM.
  8321. Changes in Guile 1.3 (released Monday, October 19, 1998):
  8322. * Changes to the distribution
  8323. ** We renamed the SCHEME_LOAD_PATH environment variable to GUILE_LOAD_PATH.
  8324. To avoid conflicts, programs should name environment variables after
  8325. themselves, except when there's a common practice establishing some
  8326. other convention.
  8327. For now, Guile supports both GUILE_LOAD_PATH and SCHEME_LOAD_PATH,
  8328. giving the former precedence, and printing a warning message if the
  8329. latter is set. Guile 1.4 will not recognize SCHEME_LOAD_PATH at all.
  8330. ** The header files related to multi-byte characters have been removed.
  8331. They were: libguile/extchrs.h and libguile/mbstrings.h. Any C code
  8332. which referred to these explicitly will probably need to be rewritten,
  8333. since the support for the variant string types has been removed; see
  8334. below.
  8335. ** The header files append.h and sequences.h have been removed. These
  8336. files implemented non-R4RS operations which would encourage
  8337. non-portable programming style and less easy-to-read code.
  8338. * Changes to the stand-alone interpreter
  8339. ** New procedures have been added to implement a "batch mode":
  8340. *** Function: batch-mode?
  8341. Returns a boolean indicating whether the interpreter is in batch
  8342. mode.
  8343. *** Function: set-batch-mode?! ARG
  8344. If ARG is true, switches the interpreter to batch mode. The `#f'
  8345. case has not been implemented.
  8346. ** Guile now provides full command-line editing, when run interactively.
  8347. To use this feature, you must have the readline library installed.
  8348. The Guile build process will notice it, and automatically include
  8349. support for it.
  8350. The readline library is available via anonymous FTP from any GNU
  8351. mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
  8352. ** the-last-stack is now a fluid.
  8353. * Changes to the procedure for linking libguile with your programs
  8354. ** You can now use the `guile-config' utility to build programs that use Guile.
  8355. Guile now includes a command-line utility called `guile-config', which
  8356. can provide information about how to compile and link programs that
  8357. use Guile.
  8358. *** `guile-config compile' prints any C compiler flags needed to use Guile.
  8359. You should include this command's output on the command line you use
  8360. to compile C or C++ code that #includes the Guile header files. It's
  8361. usually just a `-I' flag to help the compiler find the Guile headers.
  8362. *** `guile-config link' prints any linker flags necessary to link with Guile.
  8363. This command writes to its standard output a list of flags which you
  8364. must pass to the linker to link your code against the Guile library.
  8365. The flags include '-lguile' itself, any other libraries the Guile
  8366. library depends upon, and any `-L' flags needed to help the linker
  8367. find those libraries.
  8368. For example, here is a Makefile rule that builds a program named 'foo'
  8369. from the object files ${FOO_OBJECTS}, and links them against Guile:
  8370. foo: ${FOO_OBJECTS}
  8371. ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
  8372. Previous Guile releases recommended that you use autoconf to detect
  8373. which of a predefined set of libraries were present on your system.
  8374. It is more robust to use `guile-config', since it records exactly which
  8375. libraries the installed Guile library requires.
  8376. This was originally called `build-guile', but was renamed to
  8377. `guile-config' before Guile 1.3 was released, to be consistent with
  8378. the analogous script for the GTK+ GUI toolkit, which is called
  8379. `gtk-config'.
  8380. ** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
  8381. If you are using the GNU autoconf package to configure your program,
  8382. you can use the GUILE_FLAGS autoconf macro to call `guile-config'
  8383. (described above) and gather the necessary values for use in your
  8384. Makefiles.
  8385. The GUILE_FLAGS macro expands to configure script code which runs the
  8386. `guile-config' script, to find out where Guile's header files and
  8387. libraries are installed. It sets two variables, marked for
  8388. substitution, as by AC_SUBST.
  8389. GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
  8390. code that uses Guile header files. This is almost always just a
  8391. -I flag.
  8392. GUILE_LDFLAGS --- flags to pass to the linker to link a
  8393. program against Guile. This includes `-lguile' for the Guile
  8394. library itself, any libraries that Guile itself requires (like
  8395. -lqthreads), and so on. It may also include a -L flag to tell the
  8396. compiler where to find the libraries.
  8397. GUILE_FLAGS is defined in the file guile.m4, in the top-level
  8398. directory of the Guile distribution. You can copy it into your
  8399. package's aclocal.m4 file, and then use it in your configure.in file.
  8400. If you are using the `aclocal' program, distributed with GNU automake,
  8401. to maintain your aclocal.m4 file, the Guile installation process
  8402. installs guile.m4 where aclocal will find it. All you need to do is
  8403. use GUILE_FLAGS in your configure.in file, and then run `aclocal';
  8404. this will copy the definition of GUILE_FLAGS into your aclocal.m4
  8405. file.
  8406. * Changes to Scheme functions and syntax
  8407. ** Multi-byte strings have been removed, as have multi-byte and wide
  8408. ports. We felt that these were the wrong approach to
  8409. internationalization support.
  8410. ** New function: readline [PROMPT]
  8411. Read a line from the terminal, and allow the user to edit it,
  8412. prompting with PROMPT. READLINE provides a large set of Emacs-like
  8413. editing commands, lets the user recall previously typed lines, and
  8414. works on almost every kind of terminal, including dumb terminals.
  8415. READLINE assumes that the cursor is at the beginning of the line when
  8416. it is invoked. Thus, you can't print a prompt yourself, and then call
  8417. READLINE; you need to package up your prompt as a string, pass it to
  8418. the function, and let READLINE print the prompt itself. This is
  8419. because READLINE needs to know the prompt's screen width.
  8420. For Guile to provide this function, you must have the readline
  8421. library, version 2.1 or later, installed on your system. Readline is
  8422. available via anonymous FTP from prep.ai.mit.edu in pub/gnu, or from
  8423. any GNU mirror site.
  8424. See also ADD-HISTORY function.
  8425. ** New function: add-history STRING
  8426. Add STRING as the most recent line in the history used by the READLINE
  8427. command. READLINE does not add lines to the history itself; you must
  8428. call ADD-HISTORY to make previous input available to the user.
  8429. ** The behavior of the read-line function has changed.
  8430. This function now uses standard C library functions to read the line,
  8431. for speed. This means that it doesn not respect the value of
  8432. scm-line-incrementors; it assumes that lines are delimited with
  8433. #\newline.
  8434. (Note that this is read-line, the function that reads a line of text
  8435. from a port, not readline, the function that reads a line from a
  8436. terminal, providing full editing capabilities.)
  8437. ** New module (ice-9 getopt-gnu-style): Parse command-line arguments.
  8438. This module provides some simple argument parsing. It exports one
  8439. function:
  8440. Function: getopt-gnu-style ARG-LS
  8441. Parse a list of program arguments into an alist of option
  8442. descriptions.
  8443. Each item in the list of program arguments is examined to see if
  8444. it meets the syntax of a GNU long-named option. An argument like
  8445. `--MUMBLE' produces an element of the form (MUMBLE . #t) in the
  8446. returned alist, where MUMBLE is a keyword object with the same
  8447. name as the argument. An argument like `--MUMBLE=FROB' produces
  8448. an element of the form (MUMBLE . FROB), where FROB is a string.
  8449. As a special case, the returned alist also contains a pair whose
  8450. car is the symbol `rest'. The cdr of this pair is a list
  8451. containing all the items in the argument list that are not options
  8452. of the form mentioned above.
  8453. The argument `--' is treated specially: all items in the argument
  8454. list appearing after such an argument are not examined, and are
  8455. returned in the special `rest' list.
  8456. This function does not parse normal single-character switches.
  8457. You will need to parse them out of the `rest' list yourself.
  8458. ** The read syntax for byte vectors and short vectors has changed.
  8459. Instead of #bytes(...), write #y(...).
  8460. Instead of #short(...), write #h(...).
  8461. This may seem nutty, but, like the other uniform vectors, byte vectors
  8462. and short vectors want to have the same print and read syntax (and,
  8463. more basic, want to have read syntax!). Changing the read syntax to
  8464. use multiple characters after the hash sign breaks with the
  8465. conventions used in R5RS and the conventions used for the other
  8466. uniform vectors. It also introduces complexity in the current reader,
  8467. both on the C and Scheme levels. (The Right solution is probably to
  8468. change the syntax and prototypes for uniform vectors entirely.)
  8469. ** The new module (ice-9 session) provides useful interactive functions.
  8470. *** New procedure: (apropos REGEXP OPTION ...)
  8471. Display a list of top-level variables whose names match REGEXP, and
  8472. the modules they are imported from. Each OPTION should be one of the
  8473. following symbols:
  8474. value --- Show the value of each matching variable.
  8475. shadow --- Show bindings shadowed by subsequently imported modules.
  8476. full --- Same as both `shadow' and `value'.
  8477. For example:
  8478. guile> (apropos "trace" 'full)
  8479. debug: trace #<procedure trace args>
  8480. debug: untrace #<procedure untrace args>
  8481. the-scm-module: display-backtrace #<compiled-closure #<primitive-procedure gsubr-apply>>
  8482. the-scm-module: before-backtrace-hook ()
  8483. the-scm-module: backtrace #<primitive-procedure backtrace>
  8484. the-scm-module: after-backtrace-hook ()
  8485. the-scm-module: has-shown-backtrace-hint? #f
  8486. guile>
  8487. ** There are new functions and syntax for working with macros.
  8488. Guile implements macros as a special object type. Any variable whose
  8489. top-level binding is a macro object acts as a macro. The macro object
  8490. specifies how the expression should be transformed before evaluation.
  8491. *** Macro objects now print in a reasonable way, resembling procedures.
  8492. *** New function: (macro? OBJ)
  8493. True iff OBJ is a macro object.
  8494. *** New function: (primitive-macro? OBJ)
  8495. Like (macro? OBJ), but true only if OBJ is one of the Guile primitive
  8496. macro transformers, implemented in eval.c rather than Scheme code.
  8497. Why do we have this function?
  8498. - For symmetry with procedure? and primitive-procedure?,
  8499. - to allow custom print procedures to tell whether a macro is
  8500. primitive, and display it differently, and
  8501. - to allow compilers and user-written evaluators to distinguish
  8502. builtin special forms from user-defined ones, which could be
  8503. compiled.
  8504. *** New function: (macro-type OBJ)
  8505. Return a value indicating what kind of macro OBJ is. Possible return
  8506. values are:
  8507. The symbol `syntax' --- a macro created by procedure->syntax.
  8508. The symbol `macro' --- a macro created by procedure->macro.
  8509. The symbol `macro!' --- a macro created by procedure->memoizing-macro.
  8510. The boolean #f --- if OBJ is not a macro object.
  8511. *** New function: (macro-name MACRO)
  8512. Return the name of the macro object MACRO's procedure, as returned by
  8513. procedure-name.
  8514. *** New function: (macro-transformer MACRO)
  8515. Return the transformer procedure for MACRO.
  8516. *** New syntax: (use-syntax MODULE ... TRANSFORMER)
  8517. Specify a new macro expander to use in the current module. Each
  8518. MODULE is a module name, with the same meaning as in the `use-modules'
  8519. form; each named module's exported bindings are added to the current
  8520. top-level environment. TRANSFORMER is an expression evaluated in the
  8521. resulting environment which must yield a procedure to use as the
  8522. module's eval transformer: every expression evaluated in this module
  8523. is passed to this function, and the result passed to the Guile
  8524. interpreter.
  8525. *** macro-eval! is removed. Use local-eval instead.
  8526. ** Some magic has been added to the printer to better handle user
  8527. written printing routines (like record printers, closure printers).
  8528. The problem is that these user written routines must have access to
  8529. the current `print-state' to be able to handle fancy things like
  8530. detection of circular references. These print-states have to be
  8531. passed to the builtin printing routines (display, write, etc) to
  8532. properly continue the print chain.
  8533. We didn't want to change all existing print code so that it
  8534. explicitly passes thru a print state in addition to a port. Instead,
  8535. we extented the possible values that the builtin printing routines
  8536. accept as a `port'. In addition to a normal port, they now also take
  8537. a pair of a normal port and a print-state. Printing will go to the
  8538. port and the print-state will be used to control the detection of
  8539. circular references, etc. If the builtin function does not care for a
  8540. print-state, it is simply ignored.
  8541. User written callbacks are now called with such a pair as their
  8542. `port', but because every function now accepts this pair as a PORT
  8543. argument, you don't have to worry about that. In fact, it is probably
  8544. safest to not check for these pairs.
  8545. However, it is sometimes necessary to continue a print chain on a
  8546. different port, for example to get a intermediate string
  8547. representation of the printed value, mangle that string somehow, and
  8548. then to finally print the mangled string. Use the new function
  8549. inherit-print-state OLD-PORT NEW-PORT
  8550. for this. It constructs a new `port' that prints to NEW-PORT but
  8551. inherits the print-state of OLD-PORT.
  8552. ** struct-vtable-offset renamed to vtable-offset-user
  8553. ** New constants: vtable-index-layout, vtable-index-vtable, vtable-index-printer
  8554. ** There is now a third optional argument to make-vtable-vtable
  8555. (and fourth to make-struct) when constructing new types (vtables).
  8556. This argument initializes field vtable-index-printer of the vtable.
  8557. ** The detection of circular references has been extended to structs.
  8558. That is, a structure that -- in the process of being printed -- prints
  8559. itself does not lead to infinite recursion.
  8560. ** There is now some basic support for fluids. Please read
  8561. "libguile/fluid.h" to find out more. It is accessible from Scheme with
  8562. the following functions and macros:
  8563. Function: make-fluid
  8564. Create a new fluid object. Fluids are not special variables or
  8565. some other extension to the semantics of Scheme, but rather
  8566. ordinary Scheme objects. You can store them into variables (that
  8567. are still lexically scoped, of course) or into any other place you
  8568. like. Every fluid has a initial value of `#f'.
  8569. Function: fluid? OBJ
  8570. Test whether OBJ is a fluid.
  8571. Function: fluid-ref FLUID
  8572. Function: fluid-set! FLUID VAL
  8573. Access/modify the fluid FLUID. Modifications are only visible
  8574. within the current dynamic root (that includes threads).
  8575. Function: with-fluids* FLUIDS VALUES THUNK
  8576. FLUIDS is a list of fluids and VALUES a corresponding list of
  8577. values for these fluids. Before THUNK gets called the values are
  8578. installed in the fluids and the old values of the fluids are
  8579. saved in the VALUES list. When the flow of control leaves THUNK
  8580. or reenters it, the values get swapped again. You might think of
  8581. this as a `safe-fluid-excursion'. Note that the VALUES list is
  8582. modified by `with-fluids*'.
  8583. Macro: with-fluids ((FLUID VALUE) ...) FORM ...
  8584. The same as `with-fluids*' but with a different syntax. It looks
  8585. just like `let', but both FLUID and VALUE are evaluated. Remember,
  8586. fluids are not special variables but ordinary objects. FLUID
  8587. should evaluate to a fluid.
  8588. ** Changes to system call interfaces:
  8589. *** close-port, close-input-port and close-output-port now return a
  8590. boolean instead of an `unspecified' object. #t means that the port
  8591. was successfully closed, while #f means it was already closed. It is
  8592. also now possible for these procedures to raise an exception if an
  8593. error occurs (some errors from write can be delayed until close.)
  8594. *** the first argument to chmod, fcntl, ftell and fseek can now be a
  8595. file descriptor.
  8596. *** the third argument to fcntl is now optional.
  8597. *** the first argument to chown can now be a file descriptor or a port.
  8598. *** the argument to stat can now be a port.
  8599. *** The following new procedures have been added (most use scsh
  8600. interfaces):
  8601. *** procedure: close PORT/FD
  8602. Similar to close-port (*note close-port: Closing Ports.), but also
  8603. works on file descriptors. A side effect of closing a file
  8604. descriptor is that any ports using that file descriptor are moved
  8605. to a different file descriptor and have their revealed counts set
  8606. to zero.
  8607. *** procedure: port->fdes PORT
  8608. Returns the integer file descriptor underlying PORT. As a side
  8609. effect the revealed count of PORT is incremented.
  8610. *** procedure: fdes->ports FDES
  8611. Returns a list of existing ports which have FDES as an underlying
  8612. file descriptor, without changing their revealed counts.
  8613. *** procedure: fdes->inport FDES
  8614. Returns an existing input port which has FDES as its underlying
  8615. file descriptor, if one exists, and increments its revealed count.
  8616. Otherwise, returns a new input port with a revealed count of 1.
  8617. *** procedure: fdes->outport FDES
  8618. Returns an existing output port which has FDES as its underlying
  8619. file descriptor, if one exists, and increments its revealed count.
  8620. Otherwise, returns a new output port with a revealed count of 1.
  8621. The next group of procedures perform a `dup2' system call, if NEWFD
  8622. (an integer) is supplied, otherwise a `dup'. The file descriptor to be
  8623. duplicated can be supplied as an integer or contained in a port. The
  8624. type of value returned varies depending on which procedure is used.
  8625. All procedures also have the side effect when performing `dup2' that
  8626. any ports using NEWFD are moved to a different file descriptor and have
  8627. their revealed counts set to zero.
  8628. *** procedure: dup->fdes PORT/FD [NEWFD]
  8629. Returns an integer file descriptor.
  8630. *** procedure: dup->inport PORT/FD [NEWFD]
  8631. Returns a new input port using the new file descriptor.
  8632. *** procedure: dup->outport PORT/FD [NEWFD]
  8633. Returns a new output port using the new file descriptor.
  8634. *** procedure: dup PORT/FD [NEWFD]
  8635. Returns a new port if PORT/FD is a port, with the same mode as the
  8636. supplied port, otherwise returns an integer file descriptor.
  8637. *** procedure: dup->port PORT/FD MODE [NEWFD]
  8638. Returns a new port using the new file descriptor. MODE supplies a
  8639. mode string for the port (*note open-file: File Ports.).
  8640. *** procedure: setenv NAME VALUE
  8641. Modifies the environment of the current process, which is also the
  8642. default environment inherited by child processes.
  8643. If VALUE is `#f', then NAME is removed from the environment.
  8644. Otherwise, the string NAME=VALUE is added to the environment,
  8645. replacing any existing string with name matching NAME.
  8646. The return value is unspecified.
  8647. *** procedure: truncate-file OBJ SIZE
  8648. Truncates the file referred to by OBJ to at most SIZE bytes. OBJ
  8649. can be a string containing a file name or an integer file
  8650. descriptor or port open for output on the file. The underlying
  8651. system calls are `truncate' and `ftruncate'.
  8652. The return value is unspecified.
  8653. *** procedure: setvbuf PORT MODE [SIZE]
  8654. Set the buffering mode for PORT. MODE can be:
  8655. `_IONBF'
  8656. non-buffered
  8657. `_IOLBF'
  8658. line buffered
  8659. `_IOFBF'
  8660. block buffered, using a newly allocated buffer of SIZE bytes.
  8661. However if SIZE is zero or unspecified, the port will be made
  8662. non-buffered.
  8663. This procedure should not be used after I/O has been performed with
  8664. the port.
  8665. Ports are usually block buffered by default, with a default buffer
  8666. size. Procedures e.g., *Note open-file: File Ports, which accept a
  8667. mode string allow `0' to be added to request an unbuffered port.
  8668. *** procedure: fsync PORT/FD
  8669. Copies any unwritten data for the specified output file descriptor
  8670. to disk. If PORT/FD is a port, its buffer is flushed before the
  8671. underlying file descriptor is fsync'd. The return value is
  8672. unspecified.
  8673. *** procedure: open-fdes PATH FLAGS [MODES]
  8674. Similar to `open' but returns a file descriptor instead of a port.
  8675. *** procedure: execle PATH ENV [ARG] ...
  8676. Similar to `execl', but the environment of the new process is
  8677. specified by ENV, which must be a list of strings as returned by
  8678. the `environ' procedure.
  8679. This procedure is currently implemented using the `execve' system
  8680. call, but we call it `execle' because of its Scheme calling
  8681. interface.
  8682. *** procedure: strerror ERRNO
  8683. Returns the Unix error message corresponding to ERRNO, an integer.
  8684. *** procedure: primitive-exit [STATUS]
  8685. Terminate the current process without unwinding the Scheme stack.
  8686. This is would typically be useful after a fork. The exit status
  8687. is STATUS if supplied, otherwise zero.
  8688. *** procedure: times
  8689. Returns an object with information about real and processor time.
  8690. The following procedures accept such an object as an argument and
  8691. return a selected component:
  8692. `tms:clock'
  8693. The current real time, expressed as time units relative to an
  8694. arbitrary base.
  8695. `tms:utime'
  8696. The CPU time units used by the calling process.
  8697. `tms:stime'
  8698. The CPU time units used by the system on behalf of the
  8699. calling process.
  8700. `tms:cutime'
  8701. The CPU time units used by terminated child processes of the
  8702. calling process, whose status has been collected (e.g., using
  8703. `waitpid').
  8704. `tms:cstime'
  8705. Similarly, the CPU times units used by the system on behalf of
  8706. terminated child processes.
  8707. ** Removed: list-length
  8708. ** Removed: list-append, list-append!
  8709. ** Removed: list-reverse, list-reverse!
  8710. ** array-map renamed to array-map!
  8711. ** serial-array-map renamed to serial-array-map!
  8712. ** catch doesn't take #f as first argument any longer
  8713. Previously, it was possible to pass #f instead of a key to `catch'.
  8714. That would cause `catch' to pass a jump buffer object to the procedure
  8715. passed as second argument. The procedure could then use this jump
  8716. buffer objekt as an argument to throw.
  8717. This mechanism has been removed since its utility doesn't motivate the
  8718. extra complexity it introduces.
  8719. ** The `#/' notation for lists now provokes a warning message from Guile.
  8720. This syntax will be removed from Guile in the near future.
  8721. To disable the warning message, set the GUILE_HUSH environment
  8722. variable to any non-empty value.
  8723. ** The newline character now prints as `#\newline', following the
  8724. normal Scheme notation, not `#\nl'.
  8725. * Changes to the gh_ interface
  8726. ** The gh_enter function now takes care of loading the Guile startup files.
  8727. gh_enter works by calling scm_boot_guile; see the remarks below.
  8728. ** Function: void gh_write (SCM x)
  8729. Write the printed representation of the scheme object x to the current
  8730. output port. Corresponds to the scheme level `write'.
  8731. ** gh_list_length renamed to gh_length.
  8732. ** vector handling routines
  8733. Several major changes. In particular, gh_vector() now resembles
  8734. (vector ...) (with a caveat -- see manual), and gh_make_vector() now
  8735. exists and behaves like (make-vector ...). gh_vset() and gh_vref()
  8736. have been renamed gh_vector_set_x() and gh_vector_ref(). Some missing
  8737. vector-related gh_ functions have been implemented.
  8738. ** pair and list routines
  8739. Implemented several of the R4RS pair and list functions that were
  8740. missing.
  8741. ** gh_scm2doubles, gh_doubles2scm, gh_doubles2dvect
  8742. New function. Converts double arrays back and forth between Scheme
  8743. and C.
  8744. * Changes to the scm_ interface
  8745. ** The function scm_boot_guile now takes care of loading the startup files.
  8746. Guile's primary initialization function, scm_boot_guile, now takes
  8747. care of loading `boot-9.scm', in the `ice-9' module, to initialize
  8748. Guile, define the module system, and put together some standard
  8749. bindings. It also loads `init.scm', which is intended to hold
  8750. site-specific initialization code.
  8751. Since Guile cannot operate properly until boot-9.scm is loaded, there
  8752. is no reason to separate loading boot-9.scm from Guile's other
  8753. initialization processes.
  8754. This job used to be done by scm_compile_shell_switches, which didn't
  8755. make much sense; in particular, it meant that people using Guile for
  8756. non-shell-like applications had to jump through hoops to get Guile
  8757. initialized properly.
  8758. ** The function scm_compile_shell_switches no longer loads the startup files.
  8759. Now, Guile always loads the startup files, whenever it is initialized;
  8760. see the notes above for scm_boot_guile and scm_load_startup_files.
  8761. ** Function: scm_load_startup_files
  8762. This new function takes care of loading Guile's initialization file
  8763. (`boot-9.scm'), and the site initialization file, `init.scm'. Since
  8764. this is always called by the Guile initialization process, it's
  8765. probably not too useful to call this yourself, but it's there anyway.
  8766. ** The semantics of smob marking have changed slightly.
  8767. The smob marking function (the `mark' member of the scm_smobfuns
  8768. structure) is no longer responsible for setting the mark bit on the
  8769. smob. The generic smob handling code in the garbage collector will
  8770. set this bit. The mark function need only ensure that any other
  8771. objects the smob refers to get marked.
  8772. Note that this change means that the smob's GC8MARK bit is typically
  8773. already set upon entry to the mark function. Thus, marking functions
  8774. which look like this:
  8775. {
  8776. if (SCM_GC8MARKP (ptr))
  8777. return SCM_BOOL_F;
  8778. SCM_SETGC8MARK (ptr);
  8779. ... mark objects to which the smob refers ...
  8780. }
  8781. are now incorrect, since they will return early, and fail to mark any
  8782. other objects the smob refers to. Some code in the Guile library used
  8783. to work this way.
  8784. ** The semantics of the I/O port functions in scm_ptobfuns have changed.
  8785. If you have implemented your own I/O port type, by writing the
  8786. functions required by the scm_ptobfuns and then calling scm_newptob,
  8787. you will need to change your functions slightly.
  8788. The functions in a scm_ptobfuns structure now expect the port itself
  8789. as their argument; they used to expect the `stream' member of the
  8790. port's scm_port_table structure. This allows functions in an
  8791. scm_ptobfuns structure to easily access the port's cell (and any flags
  8792. it its CAR), and the port's scm_port_table structure.
  8793. Guile now passes the I/O port itself as the `port' argument in the
  8794. following scm_ptobfuns functions:
  8795. int (*free) (SCM port);
  8796. int (*fputc) (int, SCM port);
  8797. int (*fputs) (char *, SCM port);
  8798. scm_sizet (*fwrite) SCM_P ((char *ptr,
  8799. scm_sizet size,
  8800. scm_sizet nitems,
  8801. SCM port));
  8802. int (*fflush) (SCM port);
  8803. int (*fgetc) (SCM port);
  8804. int (*fclose) (SCM port);
  8805. The interfaces to the `mark', `print', `equalp', and `fgets' methods
  8806. are unchanged.
  8807. If you have existing code which defines its own port types, it is easy
  8808. to convert your code to the new interface; simply apply SCM_STREAM to
  8809. the port argument to yield the value you code used to expect.
  8810. Note that since both the port and the stream have the same type in the
  8811. C code --- they are both SCM values --- the C compiler will not remind
  8812. you if you forget to update your scm_ptobfuns functions.
  8813. ** Function: int scm_internal_select (int fds,
  8814. SELECT_TYPE *rfds,
  8815. SELECT_TYPE *wfds,
  8816. SELECT_TYPE *efds,
  8817. struct timeval *timeout);
  8818. This is a replacement for the `select' function provided by the OS.
  8819. It enables I/O blocking and sleeping to happen for one cooperative
  8820. thread without blocking other threads. It also avoids busy-loops in
  8821. these situations. It is intended that all I/O blocking and sleeping
  8822. will finally go through this function. Currently, this function is
  8823. only available on systems providing `gettimeofday' and `select'.
  8824. ** Function: SCM scm_internal_stack_catch (SCM tag,
  8825. scm_catch_body_t body,
  8826. void *body_data,
  8827. scm_catch_handler_t handler,
  8828. void *handler_data)
  8829. A new sibling to the other two C level `catch' functions
  8830. scm_internal_catch and scm_internal_lazy_catch. Use it if you want
  8831. the stack to be saved automatically into the variable `the-last-stack'
  8832. (scm_the_last_stack_var) on error. This is necessary if you want to
  8833. use advanced error reporting, such as calling scm_display_error and
  8834. scm_display_backtrace. (They both take a stack object as argument.)
  8835. ** Function: SCM scm_spawn_thread (scm_catch_body_t body,
  8836. void *body_data,
  8837. scm_catch_handler_t handler,
  8838. void *handler_data)
  8839. Spawns a new thread. It does a job similar to
  8840. scm_call_with_new_thread but takes arguments more suitable when
  8841. spawning threads from application C code.
  8842. ** The hook scm_error_callback has been removed. It was originally
  8843. intended as a way for the user to install his own error handler. But
  8844. that method works badly since it intervenes between throw and catch,
  8845. thereby changing the semantics of expressions like (catch #t ...).
  8846. The correct way to do it is to use one of the C level catch functions
  8847. in throw.c: scm_internal_catch/lazy_catch/stack_catch.
  8848. ** Removed functions:
  8849. scm_obj_length, scm_list_length, scm_list_append, scm_list_append_x,
  8850. scm_list_reverse, scm_list_reverse_x
  8851. ** New macros: SCM_LISTn where n is one of the integers 0-9.
  8852. These can be used for pretty list creation from C. The idea is taken
  8853. from Erick Gallesio's STk.
  8854. ** scm_array_map renamed to scm_array_map_x
  8855. ** mbstrings are now removed
  8856. This means that the type codes scm_tc7_mb_string and
  8857. scm_tc7_mb_substring has been removed.
  8858. ** scm_gen_putc, scm_gen_puts, scm_gen_write, and scm_gen_getc have changed.
  8859. Since we no longer support multi-byte strings, these I/O functions
  8860. have been simplified, and renamed. Here are their old names, and
  8861. their new names and arguments:
  8862. scm_gen_putc -> void scm_putc (int c, SCM port);
  8863. scm_gen_puts -> void scm_puts (char *s, SCM port);
  8864. scm_gen_write -> void scm_lfwrite (char *ptr, scm_sizet size, SCM port);
  8865. scm_gen_getc -> void scm_getc (SCM port);
  8866. ** The macros SCM_TYP7D and SCM_TYP7SD has been removed.
  8867. ** The macro SCM_TYP7S has taken the role of the old SCM_TYP7D
  8868. SCM_TYP7S now masks away the bit which distinguishes substrings from
  8869. strings.
  8870. ** scm_catch_body_t: Backward incompatible change!
  8871. Body functions to scm_internal_catch and friends do not any longer
  8872. take a second argument. This is because it is no longer possible to
  8873. pass a #f arg to catch.
  8874. ** Calls to scm_protect_object and scm_unprotect now nest properly.
  8875. The function scm_protect_object protects its argument from being freed
  8876. by the garbage collector. scm_unprotect_object removes that
  8877. protection.
  8878. These functions now nest properly. That is, for every object O, there
  8879. is a counter which scm_protect_object(O) increments and
  8880. scm_unprotect_object(O) decrements, if the counter is greater than
  8881. zero. Every object's counter is zero when it is first created. If an
  8882. object's counter is greater than zero, the garbage collector will not
  8883. reclaim its storage.
  8884. This allows you to use scm_protect_object in your code without
  8885. worrying that some other function you call will call
  8886. scm_unprotect_object, and allow it to be freed. Assuming that the
  8887. functions you call are well-behaved, and unprotect only those objects
  8888. they protect, you can follow the same rule and have confidence that
  8889. objects will be freed only at appropriate times.
  8890. Changes in Guile 1.2 (released Tuesday, June 24 1997):
  8891. * Changes to the distribution
  8892. ** Nightly snapshots are now available from ftp.red-bean.com.
  8893. The old server, ftp.cyclic.com, has been relinquished to its rightful
  8894. owner.
  8895. Nightly snapshots of the Guile development sources are now available via
  8896. anonymous FTP from ftp.red-bean.com, as /pub/guile/guile-snap.tar.gz.
  8897. Via the web, that's: ftp://ftp.red-bean.com/pub/guile/guile-snap.tar.gz
  8898. For getit, that's: ftp.red-bean.com:/pub/guile/guile-snap.tar.gz
  8899. ** To run Guile without installing it, the procedure has changed a bit.
  8900. If you used a separate build directory to compile Guile, you'll need
  8901. to include the build directory in SCHEME_LOAD_PATH, as well as the
  8902. source directory. See the `INSTALL' file for examples.
  8903. * Changes to the procedure for linking libguile with your programs
  8904. ** The standard Guile load path for Scheme code now includes
  8905. $(datadir)/guile (usually /usr/local/share/guile). This means that
  8906. you can install your own Scheme files there, and Guile will find them.
  8907. (Previous versions of Guile only checked a directory whose name
  8908. contained the Guile version number, so you had to re-install or move
  8909. your Scheme sources each time you installed a fresh version of Guile.)
  8910. The load path also includes $(datadir)/guile/site; we recommend
  8911. putting individual Scheme files there. If you want to install a
  8912. package with multiple source files, create a directory for them under
  8913. $(datadir)/guile.
  8914. ** Guile 1.2 will now use the Rx regular expression library, if it is
  8915. installed on your system. When you are linking libguile into your own
  8916. programs, this means you will have to link against -lguile, -lqt (if
  8917. you configured Guile with thread support), and -lrx.
  8918. If you are using autoconf to generate configuration scripts for your
  8919. application, the following lines should suffice to add the appropriate
  8920. libraries to your link command:
  8921. ### Find Rx, quickthreads and libguile.
  8922. AC_CHECK_LIB(rx, main)
  8923. AC_CHECK_LIB(qt, main)
  8924. AC_CHECK_LIB(guile, scm_shell)
  8925. The Guile 1.2 distribution does not contain sources for the Rx
  8926. library, as Guile 1.0 did. If you want to use Rx, you'll need to
  8927. retrieve it from a GNU FTP site and install it separately.
  8928. * Changes to Scheme functions and syntax
  8929. ** The dynamic linking features of Guile are now enabled by default.
  8930. You can disable them by giving the `--disable-dynamic-linking' option
  8931. to configure.
  8932. (dynamic-link FILENAME)
  8933. Find the object file denoted by FILENAME (a string) and link it
  8934. into the running Guile application. When everything works out,
  8935. return a Scheme object suitable for representing the linked object
  8936. file. Otherwise an error is thrown. How object files are
  8937. searched is system dependent.
  8938. (dynamic-object? VAL)
  8939. Determine whether VAL represents a dynamically linked object file.
  8940. (dynamic-unlink DYNOBJ)
  8941. Unlink the indicated object file from the application. DYNOBJ
  8942. should be one of the values returned by `dynamic-link'.
  8943. (dynamic-func FUNCTION DYNOBJ)
  8944. Search the C function indicated by FUNCTION (a string or symbol)
  8945. in DYNOBJ and return some Scheme object that can later be used
  8946. with `dynamic-call' to actually call this function. Right now,
  8947. these Scheme objects are formed by casting the address of the
  8948. function to `long' and converting this number to its Scheme
  8949. representation.
  8950. (dynamic-call FUNCTION DYNOBJ)
  8951. Call the C function indicated by FUNCTION and DYNOBJ. The
  8952. function is passed no arguments and its return value is ignored.
  8953. When FUNCTION is something returned by `dynamic-func', call that
  8954. function and ignore DYNOBJ. When FUNCTION is a string (or symbol,
  8955. etc.), look it up in DYNOBJ; this is equivalent to
  8956. (dynamic-call (dynamic-func FUNCTION DYNOBJ) #f)
  8957. Interrupts are deferred while the C function is executing (with
  8958. SCM_DEFER_INTS/SCM_ALLOW_INTS).
  8959. (dynamic-args-call FUNCTION DYNOBJ ARGS)
  8960. Call the C function indicated by FUNCTION and DYNOBJ, but pass it
  8961. some arguments and return its return value. The C function is
  8962. expected to take two arguments and return an `int', just like
  8963. `main':
  8964. int c_func (int argc, char **argv);
  8965. ARGS must be a list of strings and is converted into an array of
  8966. `char *'. The array is passed in ARGV and its size in ARGC. The
  8967. return value is converted to a Scheme number and returned from the
  8968. call to `dynamic-args-call'.
  8969. When dynamic linking is disabled or not supported on your system,
  8970. the above functions throw errors, but they are still available.
  8971. Here is a small example that works on GNU/Linux:
  8972. (define libc-obj (dynamic-link "libc.so"))
  8973. (dynamic-args-call 'rand libc-obj '())
  8974. See the file `libguile/DYNAMIC-LINKING' for additional comments.
  8975. ** The #/ syntax for module names is depreciated, and will be removed
  8976. in a future version of Guile. Instead of
  8977. #/foo/bar/baz
  8978. instead write
  8979. (foo bar baz)
  8980. The latter syntax is more consistent with existing Lisp practice.
  8981. ** Guile now does fancier printing of structures. Structures are the
  8982. underlying implementation for records, which in turn are used to
  8983. implement modules, so all of these object now print differently and in
  8984. a more informative way.
  8985. The Scheme printer will examine the builtin variable *struct-printer*
  8986. whenever it needs to print a structure object. When this variable is
  8987. not `#f' it is deemed to be a procedure and will be applied to the
  8988. structure object and the output port. When *struct-printer* is `#f'
  8989. or the procedure return `#f' the structure object will be printed in
  8990. the boring #<struct 80458270> form.
  8991. This hook is used by some routines in ice-9/boot-9.scm to implement
  8992. type specific printing routines. Please read the comments there about
  8993. "printing structs".
  8994. One of the more specific uses of structs are records. The printing
  8995. procedure that could be passed to MAKE-RECORD-TYPE is now actually
  8996. called. It should behave like a *struct-printer* procedure (described
  8997. above).
  8998. ** Guile now supports a new R4RS-compliant syntax for keywords. A
  8999. token of the form #:NAME, where NAME has the same syntax as a Scheme
  9000. symbol, is the external representation of the keyword named NAME.
  9001. Keyword objects print using this syntax as well, so values containing
  9002. keyword objects can be read back into Guile. When used in an
  9003. expression, keywords are self-quoting objects.
  9004. Guile suports this read syntax, and uses this print syntax, regardless
  9005. of the current setting of the `keyword' read option. The `keyword'
  9006. read option only controls whether Guile recognizes the `:NAME' syntax,
  9007. which is incompatible with R4RS. (R4RS says such token represent
  9008. symbols.)
  9009. ** Guile has regular expression support again. Guile 1.0 included
  9010. functions for matching regular expressions, based on the Rx library.
  9011. In Guile 1.1, the Guile/Rx interface was removed to simplify the
  9012. distribution, and thus Guile had no regular expression support. Guile
  9013. 1.2 again supports the most commonly used functions, and supports all
  9014. of SCSH's regular expression functions.
  9015. If your system does not include a POSIX regular expression library,
  9016. and you have not linked Guile with a third-party regexp library such as
  9017. Rx, these functions will not be available. You can tell whether your
  9018. Guile installation includes regular expression support by checking
  9019. whether the `*features*' list includes the `regex' symbol.
  9020. *** regexp functions
  9021. By default, Guile supports POSIX extended regular expressions. That
  9022. means that the characters `(', `)', `+' and `?' are special, and must
  9023. be escaped if you wish to match the literal characters.
  9024. This regular expression interface was modeled after that implemented
  9025. by SCSH, the Scheme Shell. It is intended to be upwardly compatible
  9026. with SCSH regular expressions.
  9027. **** Function: string-match PATTERN STR [START]
  9028. Compile the string PATTERN into a regular expression and compare
  9029. it with STR. The optional numeric argument START specifies the
  9030. position of STR at which to begin matching.
  9031. `string-match' returns a "match structure" which describes what,
  9032. if anything, was matched by the regular expression. *Note Match
  9033. Structures::. If STR does not match PATTERN at all,
  9034. `string-match' returns `#f'.
  9035. Each time `string-match' is called, it must compile its PATTERN
  9036. argument into a regular expression structure. This operation is
  9037. expensive, which makes `string-match' inefficient if the same regular
  9038. expression is used several times (for example, in a loop). For better
  9039. performance, you can compile a regular expression in advance and then
  9040. match strings against the compiled regexp.
  9041. **** Function: make-regexp STR [FLAGS]
  9042. Compile the regular expression described by STR, and return the
  9043. compiled regexp structure. If STR does not describe a legal
  9044. regular expression, `make-regexp' throws a
  9045. `regular-expression-syntax' error.
  9046. FLAGS may be the bitwise-or of one or more of the following:
  9047. **** Constant: regexp/extended
  9048. Use POSIX Extended Regular Expression syntax when interpreting
  9049. STR. If not set, POSIX Basic Regular Expression syntax is used.
  9050. If the FLAGS argument is omitted, we assume regexp/extended.
  9051. **** Constant: regexp/icase
  9052. Do not differentiate case. Subsequent searches using the
  9053. returned regular expression will be case insensitive.
  9054. **** Constant: regexp/newline
  9055. Match-any-character operators don't match a newline.
  9056. A non-matching list ([^...]) not containing a newline matches a
  9057. newline.
  9058. Match-beginning-of-line operator (^) matches the empty string
  9059. immediately after a newline, regardless of whether the FLAGS
  9060. passed to regexp-exec contain regexp/notbol.
  9061. Match-end-of-line operator ($) matches the empty string
  9062. immediately before a newline, regardless of whether the FLAGS
  9063. passed to regexp-exec contain regexp/noteol.
  9064. **** Function: regexp-exec REGEXP STR [START [FLAGS]]
  9065. Match the compiled regular expression REGEXP against `str'. If
  9066. the optional integer START argument is provided, begin matching
  9067. from that position in the string. Return a match structure
  9068. describing the results of the match, or `#f' if no match could be
  9069. found.
  9070. FLAGS may be the bitwise-or of one or more of the following:
  9071. **** Constant: regexp/notbol
  9072. The match-beginning-of-line operator always fails to match (but
  9073. see the compilation flag regexp/newline above) This flag may be
  9074. used when different portions of a string are passed to
  9075. regexp-exec and the beginning of the string should not be
  9076. interpreted as the beginning of the line.
  9077. **** Constant: regexp/noteol
  9078. The match-end-of-line operator always fails to match (but see the
  9079. compilation flag regexp/newline above)
  9080. **** Function: regexp? OBJ
  9081. Return `#t' if OBJ is a compiled regular expression, or `#f'
  9082. otherwise.
  9083. Regular expressions are commonly used to find patterns in one string
  9084. and replace them with the contents of another string.
  9085. **** Function: regexp-substitute PORT MATCH [ITEM...]
  9086. Write to the output port PORT selected contents of the match
  9087. structure MATCH. Each ITEM specifies what should be written, and
  9088. may be one of the following arguments:
  9089. * A string. String arguments are written out verbatim.
  9090. * An integer. The submatch with that number is written.
  9091. * The symbol `pre'. The portion of the matched string preceding
  9092. the regexp match is written.
  9093. * The symbol `post'. The portion of the matched string
  9094. following the regexp match is written.
  9095. PORT may be `#f', in which case nothing is written; instead,
  9096. `regexp-substitute' constructs a string from the specified ITEMs
  9097. and returns that.
  9098. **** Function: regexp-substitute/global PORT REGEXP TARGET [ITEM...]
  9099. Similar to `regexp-substitute', but can be used to perform global
  9100. substitutions on STR. Instead of taking a match structure as an
  9101. argument, `regexp-substitute/global' takes two string arguments: a
  9102. REGEXP string describing a regular expression, and a TARGET string
  9103. which should be matched against this regular expression.
  9104. Each ITEM behaves as in REGEXP-SUBSTITUTE, with the following
  9105. exceptions:
  9106. * A function may be supplied. When this function is called, it
  9107. will be passed one argument: a match structure for a given
  9108. regular expression match. It should return a string to be
  9109. written out to PORT.
  9110. * The `post' symbol causes `regexp-substitute/global' to recurse
  9111. on the unmatched portion of STR. This *must* be supplied in
  9112. order to perform global search-and-replace on STR; if it is
  9113. not present among the ITEMs, then `regexp-substitute/global'
  9114. will return after processing a single match.
  9115. *** Match Structures
  9116. A "match structure" is the object returned by `string-match' and
  9117. `regexp-exec'. It describes which portion of a string, if any, matched
  9118. the given regular expression. Match structures include: a reference to
  9119. the string that was checked for matches; the starting and ending
  9120. positions of the regexp match; and, if the regexp included any
  9121. parenthesized subexpressions, the starting and ending positions of each
  9122. submatch.
  9123. In each of the regexp match functions described below, the `match'
  9124. argument must be a match structure returned by a previous call to
  9125. `string-match' or `regexp-exec'. Most of these functions return some
  9126. information about the original target string that was matched against a
  9127. regular expression; we will call that string TARGET for easy reference.
  9128. **** Function: regexp-match? OBJ
  9129. Return `#t' if OBJ is a match structure returned by a previous
  9130. call to `regexp-exec', or `#f' otherwise.
  9131. **** Function: match:substring MATCH [N]
  9132. Return the portion of TARGET matched by subexpression number N.
  9133. Submatch 0 (the default) represents the entire regexp match. If
  9134. the regular expression as a whole matched, but the subexpression
  9135. number N did not match, return `#f'.
  9136. **** Function: match:start MATCH [N]
  9137. Return the starting position of submatch number N.
  9138. **** Function: match:end MATCH [N]
  9139. Return the ending position of submatch number N.
  9140. **** Function: match:prefix MATCH
  9141. Return the unmatched portion of TARGET preceding the regexp match.
  9142. **** Function: match:suffix MATCH
  9143. Return the unmatched portion of TARGET following the regexp match.
  9144. **** Function: match:count MATCH
  9145. Return the number of parenthesized subexpressions from MATCH.
  9146. Note that the entire regular expression match itself counts as a
  9147. subexpression, and failed submatches are included in the count.
  9148. **** Function: match:string MATCH
  9149. Return the original TARGET string.
  9150. *** Backslash Escapes
  9151. Sometimes you will want a regexp to match characters like `*' or `$'
  9152. exactly. For example, to check whether a particular string represents
  9153. a menu entry from an Info node, it would be useful to match it against
  9154. a regexp like `^* [^:]*::'. However, this won't work; because the
  9155. asterisk is a metacharacter, it won't match the `*' at the beginning of
  9156. the string. In this case, we want to make the first asterisk un-magic.
  9157. You can do this by preceding the metacharacter with a backslash
  9158. character `\'. (This is also called "quoting" the metacharacter, and
  9159. is known as a "backslash escape".) When Guile sees a backslash in a
  9160. regular expression, it considers the following glyph to be an ordinary
  9161. character, no matter what special meaning it would ordinarily have.
  9162. Therefore, we can make the above example work by changing the regexp to
  9163. `^\* [^:]*::'. The `\*' sequence tells the regular expression engine
  9164. to match only a single asterisk in the target string.
  9165. Since the backslash is itself a metacharacter, you may force a
  9166. regexp to match a backslash in the target string by preceding the
  9167. backslash with itself. For example, to find variable references in a
  9168. TeX program, you might want to find occurrences of the string `\let\'
  9169. followed by any number of alphabetic characters. The regular expression
  9170. `\\let\\[A-Za-z]*' would do this: the double backslashes in the regexp
  9171. each match a single backslash in the target string.
  9172. **** Function: regexp-quote STR
  9173. Quote each special character found in STR with a backslash, and
  9174. return the resulting string.
  9175. *Very important:* Using backslash escapes in Guile source code (as
  9176. in Emacs Lisp or C) can be tricky, because the backslash character has
  9177. special meaning for the Guile reader. For example, if Guile encounters
  9178. the character sequence `\n' in the middle of a string while processing
  9179. Scheme code, it replaces those characters with a newline character.
  9180. Similarly, the character sequence `\t' is replaced by a horizontal tab.
  9181. Several of these "escape sequences" are processed by the Guile reader
  9182. before your code is executed. Unrecognized escape sequences are
  9183. ignored: if the characters `\*' appear in a string, they will be
  9184. translated to the single character `*'.
  9185. This translation is obviously undesirable for regular expressions,
  9186. since we want to be able to include backslashes in a string in order to
  9187. escape regexp metacharacters. Therefore, to make sure that a backslash
  9188. is preserved in a string in your Guile program, you must use *two*
  9189. consecutive backslashes:
  9190. (define Info-menu-entry-pattern (make-regexp "^\\* [^:]*"))
  9191. The string in this example is preprocessed by the Guile reader before
  9192. any code is executed. The resulting argument to `make-regexp' is the
  9193. string `^\* [^:]*', which is what we really want.
  9194. This also means that in order to write a regular expression that
  9195. matches a single backslash character, the regular expression string in
  9196. the source code must include *four* backslashes. Each consecutive pair
  9197. of backslashes gets translated by the Guile reader to a single
  9198. backslash, and the resulting double-backslash is interpreted by the
  9199. regexp engine as matching a single backslash character. Hence:
  9200. (define tex-variable-pattern (make-regexp "\\\\let\\\\=[A-Za-z]*"))
  9201. The reason for the unwieldiness of this syntax is historical. Both
  9202. regular expression pattern matchers and Unix string processing systems
  9203. have traditionally used backslashes with the special meanings described
  9204. above. The POSIX regular expression specification and ANSI C standard
  9205. both require these semantics. Attempting to abandon either convention
  9206. would cause other kinds of compatibility problems, possibly more severe
  9207. ones. Therefore, without extending the Scheme reader to support
  9208. strings with different quoting conventions (an ungainly and confusing
  9209. extension when implemented in other languages), we must adhere to this
  9210. cumbersome escape syntax.
  9211. * Changes to the gh_ interface
  9212. * Changes to the scm_ interface
  9213. * Changes to system call interfaces:
  9214. ** The value returned by `raise' is now unspecified. It throws an exception
  9215. if an error occurs.
  9216. *** A new procedure `sigaction' can be used to install signal handlers
  9217. (sigaction signum [action] [flags])
  9218. signum is the signal number, which can be specified using the value
  9219. of SIGINT etc.
  9220. If action is omitted, sigaction returns a pair: the CAR is the current
  9221. signal hander, which will be either an integer with the value SIG_DFL
  9222. (default action) or SIG_IGN (ignore), or the Scheme procedure which
  9223. handles the signal, or #f if a non-Scheme procedure handles the
  9224. signal. The CDR contains the current sigaction flags for the handler.
  9225. If action is provided, it is installed as the new handler for signum.
  9226. action can be a Scheme procedure taking one argument, or the value of
  9227. SIG_DFL (default action) or SIG_IGN (ignore), or #f to restore
  9228. whatever signal handler was installed before sigaction was first used.
  9229. Flags can optionally be specified for the new handler (SA_RESTART is
  9230. always used if the system provides it, so need not be specified.) The
  9231. return value is a pair with information about the old handler as
  9232. described above.
  9233. This interface does not provide access to the "signal blocking"
  9234. facility. Maybe this is not needed, since the thread support may
  9235. provide solutions to the problem of consistent access to data
  9236. structures.
  9237. *** A new procedure `flush-all-ports' is equivalent to running
  9238. `force-output' on every port open for output.
  9239. ** Guile now provides information on how it was built, via the new
  9240. global variable, %guile-build-info. This variable records the values
  9241. of the standard GNU makefile directory variables as an assocation
  9242. list, mapping variable names (symbols) onto directory paths (strings).
  9243. For example, to find out where the Guile link libraries were
  9244. installed, you can say:
  9245. guile -c "(display (assq-ref %guile-build-info 'libdir)) (newline)"
  9246. * Changes to the scm_ interface
  9247. ** The new function scm_handle_by_message_noexit is just like the
  9248. existing scm_handle_by_message function, except that it doesn't call
  9249. exit to terminate the process. Instead, it prints a message and just
  9250. returns #f. This might be a more appropriate catch-all handler for
  9251. new dynamic roots and threads.
  9252. Changes in Guile 1.1 (released Friday, May 16 1997):
  9253. * Changes to the distribution.
  9254. The Guile 1.0 distribution has been split up into several smaller
  9255. pieces:
  9256. guile-core --- the Guile interpreter itself.
  9257. guile-tcltk --- the interface between the Guile interpreter and
  9258. Tcl/Tk; Tcl is an interpreter for a stringy language, and Tk
  9259. is a toolkit for building graphical user interfaces.
  9260. guile-rgx-ctax --- the interface between Guile and the Rx regular
  9261. expression matcher, and the translator for the Ctax
  9262. programming language. These are packaged together because the
  9263. Ctax translator uses Rx to parse Ctax source code.
  9264. This NEWS file describes the changes made to guile-core since the 1.0
  9265. release.
  9266. We no longer distribute the documentation, since it was either out of
  9267. date, or incomplete. As soon as we have current documentation, we
  9268. will distribute it.
  9269. * Changes to the stand-alone interpreter
  9270. ** guile now accepts command-line arguments compatible with SCSH, Olin
  9271. Shivers' Scheme Shell.
  9272. In general, arguments are evaluated from left to right, but there are
  9273. exceptions. The following switches stop argument processing, and
  9274. stash all remaining command-line arguments as the value returned by
  9275. the (command-line) function.
  9276. -s SCRIPT load Scheme source code from FILE, and exit
  9277. -c EXPR evalute Scheme expression EXPR, and exit
  9278. -- stop scanning arguments; run interactively
  9279. The switches below are processed as they are encountered.
  9280. -l FILE load Scheme source code from FILE
  9281. -e FUNCTION after reading script, apply FUNCTION to
  9282. command line arguments
  9283. -ds do -s script at this point
  9284. --emacs enable Emacs protocol (experimental)
  9285. -h, --help display this help and exit
  9286. -v, --version display version information and exit
  9287. \ read arguments from following script lines
  9288. So, for example, here is a Guile script named `ekko' (thanks, Olin)
  9289. which re-implements the traditional "echo" command:
  9290. #!/usr/local/bin/guile -s
  9291. !#
  9292. (define (main args)
  9293. (map (lambda (arg) (display arg) (display " "))
  9294. (cdr args))
  9295. (newline))
  9296. (main (command-line))
  9297. Suppose we invoke this script as follows:
  9298. ekko a speckled gecko
  9299. Through the magic of Unix script processing (triggered by the `#!'
  9300. token at the top of the file), /usr/local/bin/guile receives the
  9301. following list of command-line arguments:
  9302. ("-s" "./ekko" "a" "speckled" "gecko")
  9303. Unix inserts the name of the script after the argument specified on
  9304. the first line of the file (in this case, "-s"), and then follows that
  9305. with the arguments given to the script. Guile loads the script, which
  9306. defines the `main' function, and then applies it to the list of
  9307. remaining command-line arguments, ("a" "speckled" "gecko").
  9308. In Unix, the first line of a script file must take the following form:
  9309. #!INTERPRETER ARGUMENT
  9310. where INTERPRETER is the absolute filename of the interpreter
  9311. executable, and ARGUMENT is a single command-line argument to pass to
  9312. the interpreter.
  9313. You may only pass one argument to the interpreter, and its length is
  9314. limited. These restrictions can be annoying to work around, so Guile
  9315. provides a general mechanism (borrowed from, and compatible with,
  9316. SCSH) for circumventing them.
  9317. If the ARGUMENT in a Guile script is a single backslash character,
  9318. `\', Guile will open the script file, parse arguments from its second
  9319. and subsequent lines, and replace the `\' with them. So, for example,
  9320. here is another implementation of the `ekko' script:
  9321. #!/usr/local/bin/guile \
  9322. -e main -s
  9323. !#
  9324. (define (main args)
  9325. (for-each (lambda (arg) (display arg) (display " "))
  9326. (cdr args))
  9327. (newline))
  9328. If the user invokes this script as follows:
  9329. ekko a speckled gecko
  9330. Unix expands this into
  9331. /usr/local/bin/guile \ ekko a speckled gecko
  9332. When Guile sees the `\' argument, it replaces it with the arguments
  9333. read from the second line of the script, producing:
  9334. /usr/local/bin/guile -e main -s ekko a speckled gecko
  9335. This tells Guile to load the `ekko' script, and apply the function
  9336. `main' to the argument list ("a" "speckled" "gecko").
  9337. Here is how Guile parses the command-line arguments:
  9338. - Each space character terminates an argument. This means that two
  9339. spaces in a row introduce an empty-string argument.
  9340. - The tab character is not permitted (unless you quote it with the
  9341. backslash character, as described below), to avoid confusion.
  9342. - The newline character terminates the sequence of arguments, and will
  9343. also terminate a final non-empty argument. (However, a newline
  9344. following a space will not introduce a final empty-string argument;
  9345. it only terminates the argument list.)
  9346. - The backslash character is the escape character. It escapes
  9347. backslash, space, tab, and newline. The ANSI C escape sequences
  9348. like \n and \t are also supported. These produce argument
  9349. constituents; the two-character combination \n doesn't act like a
  9350. terminating newline. The escape sequence \NNN for exactly three
  9351. octal digits reads as the character whose ASCII code is NNN. As
  9352. above, characters produced this way are argument constituents.
  9353. Backslash followed by other characters is not allowed.
  9354. * Changes to the procedure for linking libguile with your programs
  9355. ** Guile now builds and installs a shared guile library, if your
  9356. system support shared libraries. (It still builds a static library on
  9357. all systems.) Guile automatically detects whether your system
  9358. supports shared libraries. To prevent Guile from buildisg shared
  9359. libraries, pass the `--disable-shared' flag to the configure script.
  9360. Guile takes longer to compile when it builds shared libraries, because
  9361. it must compile every file twice --- once to produce position-
  9362. independent object code, and once to produce normal object code.
  9363. ** The libthreads library has been merged into libguile.
  9364. To link a program against Guile, you now need only link against
  9365. -lguile and -lqt; -lthreads is no longer needed. If you are using
  9366. autoconf to generate configuration scripts for your application, the
  9367. following lines should suffice to add the appropriate libraries to
  9368. your link command:
  9369. ### Find quickthreads and libguile.
  9370. AC_CHECK_LIB(qt, main)
  9371. AC_CHECK_LIB(guile, scm_shell)
  9372. * Changes to Scheme functions
  9373. ** Guile Scheme's special syntax for keyword objects is now optional,
  9374. and disabled by default.
  9375. The syntax variation from R4RS made it difficult to port some
  9376. interesting packages to Guile. The routines which accepted keyword
  9377. arguments (mostly in the module system) have been modified to also
  9378. accept symbols whose names begin with `:'.
  9379. To change the keyword syntax, you must first import the (ice-9 debug)
  9380. module:
  9381. (use-modules (ice-9 debug))
  9382. Then you can enable the keyword syntax as follows:
  9383. (read-set! keywords 'prefix)
  9384. To disable keyword syntax, do this:
  9385. (read-set! keywords #f)
  9386. ** Many more primitive functions accept shared substrings as
  9387. arguments. In the past, these functions required normal, mutable
  9388. strings as arguments, although they never made use of this
  9389. restriction.
  9390. ** The uniform array functions now operate on byte vectors. These
  9391. functions are `array-fill!', `serial-array-copy!', `array-copy!',
  9392. `serial-array-map', `array-map', `array-for-each', and
  9393. `array-index-map!'.
  9394. ** The new functions `trace' and `untrace' implement simple debugging
  9395. support for Scheme functions.
  9396. The `trace' function accepts any number of procedures as arguments,
  9397. and tells the Guile interpreter to display each procedure's name and
  9398. arguments each time the procedure is invoked. When invoked with no
  9399. arguments, `trace' returns the list of procedures currently being
  9400. traced.
  9401. The `untrace' function accepts any number of procedures as arguments,
  9402. and tells the Guile interpreter not to trace them any more. When
  9403. invoked with no arguments, `untrace' untraces all curretly traced
  9404. procedures.
  9405. The tracing in Guile has an advantage over most other systems: we
  9406. don't create new procedure objects, but mark the procedure objects
  9407. themselves. This means that anonymous and internal procedures can be
  9408. traced.
  9409. ** The function `assert-repl-prompt' has been renamed to
  9410. `set-repl-prompt!'. It takes one argument, PROMPT.
  9411. - If PROMPT is #f, the Guile read-eval-print loop will not prompt.
  9412. - If PROMPT is a string, we use it as a prompt.
  9413. - If PROMPT is a procedure accepting no arguments, we call it, and
  9414. display the result as a prompt.
  9415. - Otherwise, we display "> ".
  9416. ** The new function `eval-string' reads Scheme expressions from a
  9417. string and evaluates them, returning the value of the last expression
  9418. in the string. If the string contains no expressions, it returns an
  9419. unspecified value.
  9420. ** The new function `thunk?' returns true iff its argument is a
  9421. procedure of zero arguments.
  9422. ** `defined?' is now a builtin function, instead of syntax. This
  9423. means that its argument should be quoted. It returns #t iff its
  9424. argument is bound in the current module.
  9425. ** The new syntax `use-modules' allows you to add new modules to your
  9426. environment without re-typing a complete `define-module' form. It
  9427. accepts any number of module names as arguments, and imports their
  9428. public bindings into the current module.
  9429. ** The new function (module-defined? NAME MODULE) returns true iff
  9430. NAME, a symbol, is defined in MODULE, a module object.
  9431. ** The new function `builtin-bindings' creates and returns a hash
  9432. table containing copies of all the root module's bindings.
  9433. ** The new function `builtin-weak-bindings' does the same as
  9434. `builtin-bindings', but creates a doubly-weak hash table.
  9435. ** The `equal?' function now considers variable objects to be
  9436. equivalent if they have the same name and the same value.
  9437. ** The new function `command-line' returns the command-line arguments
  9438. given to Guile, as a list of strings.
  9439. When using guile as a script interpreter, `command-line' returns the
  9440. script's arguments; those processed by the interpreter (like `-s' or
  9441. `-c') are omitted. (In other words, you get the normal, expected
  9442. behavior.) Any application that uses scm_shell to process its
  9443. command-line arguments gets this behavior as well.
  9444. ** The new function `load-user-init' looks for a file called `.guile'
  9445. in the user's home directory, and loads it if it exists. This is
  9446. mostly for use by the code generated by scm_compile_shell_switches,
  9447. but we thought it might also be useful in other circumstances.
  9448. ** The new function `log10' returns the base-10 logarithm of its
  9449. argument.
  9450. ** Changes to I/O functions
  9451. *** The functions `read', `primitive-load', `read-and-eval!', and
  9452. `primitive-load-path' no longer take optional arguments controlling
  9453. case insensitivity and a `#' parser.
  9454. Case sensitivity is now controlled by a read option called
  9455. `case-insensitive'. The user can add new `#' syntaxes with the
  9456. `read-hash-extend' function (see below).
  9457. *** The new function `read-hash-extend' allows the user to change the
  9458. syntax of Guile Scheme in a somewhat controlled way.
  9459. (read-hash-extend CHAR PROC)
  9460. When parsing S-expressions, if we read a `#' character followed by
  9461. the character CHAR, use PROC to parse an object from the stream.
  9462. If PROC is #f, remove any parsing procedure registered for CHAR.
  9463. The reader applies PROC to two arguments: CHAR and an input port.
  9464. *** The new functions read-delimited and read-delimited! provide a
  9465. general mechanism for doing delimited input on streams.
  9466. (read-delimited DELIMS [PORT HANDLE-DELIM])
  9467. Read until we encounter one of the characters in DELIMS (a string),
  9468. or end-of-file. PORT is the input port to read from; it defaults to
  9469. the current input port. The HANDLE-DELIM parameter determines how
  9470. the terminating character is handled; it should be one of the
  9471. following symbols:
  9472. 'trim omit delimiter from result
  9473. 'peek leave delimiter character in input stream
  9474. 'concat append delimiter character to returned value
  9475. 'split return a pair: (RESULT . TERMINATOR)
  9476. HANDLE-DELIM defaults to 'peek.
  9477. (read-delimited! DELIMS BUF [PORT HANDLE-DELIM START END])
  9478. A side-effecting variant of `read-delimited'.
  9479. The data is written into the string BUF at the indices in the
  9480. half-open interval [START, END); the default interval is the whole
  9481. string: START = 0 and END = (string-length BUF). The values of
  9482. START and END must specify a well-defined interval in BUF, i.e.
  9483. 0 <= START <= END <= (string-length BUF).
  9484. It returns NBYTES, the number of bytes read. If the buffer filled
  9485. up without a delimiter character being found, it returns #f. If the
  9486. port is at EOF when the read starts, it returns the EOF object.
  9487. If an integer is returned (i.e., the read is successfully terminated
  9488. by reading a delimiter character), then the HANDLE-DELIM parameter
  9489. determines how to handle the terminating character. It is described
  9490. above, and defaults to 'peek.
  9491. (The descriptions of these functions were borrowed from the SCSH
  9492. manual, by Olin Shivers and Brian Carlstrom.)
  9493. *** The `%read-delimited!' function is the primitive used to implement
  9494. `read-delimited' and `read-delimited!'.
  9495. (%read-delimited! DELIMS BUF GOBBLE? [PORT START END])
  9496. This returns a pair of values: (TERMINATOR . NUM-READ).
  9497. - TERMINATOR describes why the read was terminated. If it is a
  9498. character or the eof object, then that is the value that terminated
  9499. the read. If it is #f, the function filled the buffer without finding
  9500. a delimiting character.
  9501. - NUM-READ is the number of characters read into BUF.
  9502. If the read is successfully terminated by reading a delimiter
  9503. character, then the gobble? parameter determines what to do with the
  9504. terminating character. If true, the character is removed from the
  9505. input stream; if false, the character is left in the input stream
  9506. where a subsequent read operation will retrieve it. In either case,
  9507. the character is also the first value returned by the procedure call.
  9508. (The descriptions of this function was borrowed from the SCSH manual,
  9509. by Olin Shivers and Brian Carlstrom.)
  9510. *** The `read-line' and `read-line!' functions have changed; they now
  9511. trim the terminator by default; previously they appended it to the
  9512. returned string. For the old behavior, use (read-line PORT 'concat).
  9513. *** The functions `uniform-array-read!' and `uniform-array-write!' now
  9514. take new optional START and END arguments, specifying the region of
  9515. the array to read and write.
  9516. *** The `ungetc-char-ready?' function has been removed. We feel it's
  9517. inappropriate for an interface to expose implementation details this
  9518. way.
  9519. ** Changes to the Unix library and system call interface
  9520. *** The new fcntl function provides access to the Unix `fcntl' system
  9521. call.
  9522. (fcntl PORT COMMAND VALUE)
  9523. Apply COMMAND to PORT's file descriptor, with VALUE as an argument.
  9524. Values for COMMAND are:
  9525. F_DUPFD duplicate a file descriptor
  9526. F_GETFD read the descriptor's close-on-exec flag
  9527. F_SETFD set the descriptor's close-on-exec flag to VALUE
  9528. F_GETFL read the descriptor's flags, as set on open
  9529. F_SETFL set the descriptor's flags, as set on open to VALUE
  9530. F_GETOWN return the process ID of a socket's owner, for SIGIO
  9531. F_SETOWN set the process that owns a socket to VALUE, for SIGIO
  9532. FD_CLOEXEC not sure what this is
  9533. For details, see the documentation for the fcntl system call.
  9534. *** The arguments to `select' have changed, for compatibility with
  9535. SCSH. The TIMEOUT parameter may now be non-integral, yielding the
  9536. expected behavior. The MILLISECONDS parameter has been changed to
  9537. MICROSECONDS, to more closely resemble the underlying system call.
  9538. The RVEC, WVEC, and EVEC arguments can now be vectors; the type of the
  9539. corresponding return set will be the same.
  9540. *** The arguments to the `mknod' system call have changed. They are
  9541. now:
  9542. (mknod PATH TYPE PERMS DEV)
  9543. Create a new file (`node') in the file system. PATH is the name of
  9544. the file to create. TYPE is the kind of file to create; it should
  9545. be 'fifo, 'block-special, or 'char-special. PERMS specifies the
  9546. permission bits to give the newly created file. If TYPE is
  9547. 'block-special or 'char-special, DEV specifies which device the
  9548. special file refers to; its interpretation depends on the kind of
  9549. special file being created.
  9550. *** The `fork' function has been renamed to `primitive-fork', to avoid
  9551. clashing with various SCSH forks.
  9552. *** The `recv' and `recvfrom' functions have been renamed to `recv!'
  9553. and `recvfrom!'. They no longer accept a size for a second argument;
  9554. you must pass a string to hold the received value. They no longer
  9555. return the buffer. Instead, `recv' returns the length of the message
  9556. received, and `recvfrom' returns a pair containing the packet's length
  9557. and originating address.
  9558. *** The file descriptor datatype has been removed, as have the
  9559. `read-fd', `write-fd', `close', `lseek', and `dup' functions.
  9560. We plan to replace these functions with a SCSH-compatible interface.
  9561. *** The `create' function has been removed; it's just a special case
  9562. of `open'.
  9563. *** There are new functions to break down process termination status
  9564. values. In the descriptions below, STATUS is a value returned by
  9565. `waitpid'.
  9566. (status:exit-val STATUS)
  9567. If the child process exited normally, this function returns the exit
  9568. code for the child process (i.e., the value passed to exit, or
  9569. returned from main). If the child process did not exit normally,
  9570. this function returns #f.
  9571. (status:stop-sig STATUS)
  9572. If the child process was suspended by a signal, this function
  9573. returns the signal that suspended the child. Otherwise, it returns
  9574. #f.
  9575. (status:term-sig STATUS)
  9576. If the child process terminated abnormally, this function returns
  9577. the signal that terminated the child. Otherwise, this function
  9578. returns false.
  9579. POSIX promises that exactly one of these functions will return true on
  9580. a valid STATUS value.
  9581. These functions are compatible with SCSH.
  9582. *** There are new accessors and setters for the broken-out time vectors
  9583. returned by `localtime', `gmtime', and that ilk. They are:
  9584. Component Accessor Setter
  9585. ========================= ============ ============
  9586. seconds tm:sec set-tm:sec
  9587. minutes tm:min set-tm:min
  9588. hours tm:hour set-tm:hour
  9589. day of the month tm:mday set-tm:mday
  9590. month tm:mon set-tm:mon
  9591. year tm:year set-tm:year
  9592. day of the week tm:wday set-tm:wday
  9593. day in the year tm:yday set-tm:yday
  9594. daylight saving time tm:isdst set-tm:isdst
  9595. GMT offset, seconds tm:gmtoff set-tm:gmtoff
  9596. name of time zone tm:zone set-tm:zone
  9597. *** There are new accessors for the vectors returned by `uname',
  9598. describing the host system:
  9599. Component Accessor
  9600. ============================================== ================
  9601. name of the operating system implementation utsname:sysname
  9602. network name of this machine utsname:nodename
  9603. release level of the operating system utsname:release
  9604. version level of the operating system utsname:version
  9605. machine hardware platform utsname:machine
  9606. *** There are new accessors for the vectors returned by `getpw',
  9607. `getpwnam', `getpwuid', and `getpwent', describing entries from the
  9608. system's user database:
  9609. Component Accessor
  9610. ====================== =================
  9611. user name passwd:name
  9612. user password passwd:passwd
  9613. user id passwd:uid
  9614. group id passwd:gid
  9615. real name passwd:gecos
  9616. home directory passwd:dir
  9617. shell program passwd:shell
  9618. *** There are new accessors for the vectors returned by `getgr',
  9619. `getgrnam', `getgrgid', and `getgrent', describing entries from the
  9620. system's group database:
  9621. Component Accessor
  9622. ======================= ============
  9623. group name group:name
  9624. group password group:passwd
  9625. group id group:gid
  9626. group members group:mem
  9627. *** There are new accessors for the vectors returned by `gethost',
  9628. `gethostbyaddr', `gethostbyname', and `gethostent', describing
  9629. internet hosts:
  9630. Component Accessor
  9631. ========================= ===============
  9632. official name of host hostent:name
  9633. alias list hostent:aliases
  9634. host address type hostent:addrtype
  9635. length of address hostent:length
  9636. list of addresses hostent:addr-list
  9637. *** There are new accessors for the vectors returned by `getnet',
  9638. `getnetbyaddr', `getnetbyname', and `getnetent', describing internet
  9639. networks:
  9640. Component Accessor
  9641. ========================= ===============
  9642. official name of net netent:name
  9643. alias list netent:aliases
  9644. net number type netent:addrtype
  9645. net number netent:net
  9646. *** There are new accessors for the vectors returned by `getproto',
  9647. `getprotobyname', `getprotobynumber', and `getprotoent', describing
  9648. internet protocols:
  9649. Component Accessor
  9650. ========================= ===============
  9651. official protocol name protoent:name
  9652. alias list protoent:aliases
  9653. protocol number protoent:proto
  9654. *** There are new accessors for the vectors returned by `getserv',
  9655. `getservbyname', `getservbyport', and `getservent', describing
  9656. internet protocols:
  9657. Component Accessor
  9658. ========================= ===============
  9659. official service name servent:name
  9660. alias list servent:aliases
  9661. port number servent:port
  9662. protocol to use servent:proto
  9663. *** There are new accessors for the sockaddr structures returned by
  9664. `accept', `getsockname', `getpeername', `recvfrom!':
  9665. Component Accessor
  9666. ======================================== ===============
  9667. address format (`family') sockaddr:fam
  9668. path, for file domain addresses sockaddr:path
  9669. address, for internet domain addresses sockaddr:addr
  9670. TCP or UDP port, for internet sockaddr:port
  9671. *** The `getpwent', `getgrent', `gethostent', `getnetent',
  9672. `getprotoent', and `getservent' functions now return #f at the end of
  9673. the user database. (They used to throw an exception.)
  9674. Note that calling MUMBLEent function is equivalent to calling the
  9675. corresponding MUMBLE function with no arguments.
  9676. *** The `setpwent', `setgrent', `sethostent', `setnetent',
  9677. `setprotoent', and `setservent' routines now take no arguments.
  9678. *** The `gethost', `getproto', `getnet', and `getserv' functions now
  9679. provide more useful information when they throw an exception.
  9680. *** The `lnaof' function has been renamed to `inet-lnaof'.
  9681. *** Guile now claims to have the `current-time' feature.
  9682. *** The `mktime' function now takes an optional second argument ZONE,
  9683. giving the time zone to use for the conversion. ZONE should be a
  9684. string, in the same format as expected for the "TZ" environment variable.
  9685. *** The `strptime' function now returns a pair (TIME . COUNT), where
  9686. TIME is the parsed time as a vector, and COUNT is the number of
  9687. characters from the string left unparsed. This function used to
  9688. return the remaining characters as a string.
  9689. *** The `gettimeofday' function has replaced the old `time+ticks' function.
  9690. The return value is now (SECONDS . MICROSECONDS); the fractional
  9691. component is no longer expressed in "ticks".
  9692. *** The `ticks/sec' constant has been removed, in light of the above change.
  9693. * Changes to the gh_ interface
  9694. ** gh_eval_str() now returns an SCM object which is the result of the
  9695. evaluation
  9696. ** gh_scm2str() now copies the Scheme data to a caller-provided C
  9697. array
  9698. ** gh_scm2newstr() now makes a C array, copies the Scheme data to it,
  9699. and returns the array
  9700. ** gh_scm2str0() is gone: there is no need to distinguish
  9701. null-terminated from non-null-terminated, since gh_scm2newstr() allows
  9702. the user to interpret the data both ways.
  9703. * Changes to the scm_ interface
  9704. ** The new function scm_symbol_value0 provides an easy way to get a
  9705. symbol's value from C code:
  9706. SCM scm_symbol_value0 (char *NAME)
  9707. Return the value of the symbol named by the null-terminated string
  9708. NAME in the current module. If the symbol named NAME is unbound in
  9709. the current module, return SCM_UNDEFINED.
  9710. ** The new function scm_sysintern0 creates new top-level variables,
  9711. without assigning them a value.
  9712. SCM scm_sysintern0 (char *NAME)
  9713. Create a new Scheme top-level variable named NAME. NAME is a
  9714. null-terminated string. Return the variable's value cell.
  9715. ** The function scm_internal_catch is the guts of catch. It handles
  9716. all the mechanics of setting up a catch target, invoking the catch
  9717. body, and perhaps invoking the handler if the body does a throw.
  9718. The function is designed to be usable from C code, but is general
  9719. enough to implement all the semantics Guile Scheme expects from throw.
  9720. TAG is the catch tag. Typically, this is a symbol, but this function
  9721. doesn't actually care about that.
  9722. BODY is a pointer to a C function which runs the body of the catch;
  9723. this is the code you can throw from. We call it like this:
  9724. BODY (BODY_DATA, JMPBUF)
  9725. where:
  9726. BODY_DATA is just the BODY_DATA argument we received; we pass it
  9727. through to BODY as its first argument. The caller can make
  9728. BODY_DATA point to anything useful that BODY might need.
  9729. JMPBUF is the Scheme jmpbuf object corresponding to this catch,
  9730. which we have just created and initialized.
  9731. HANDLER is a pointer to a C function to deal with a throw to TAG,
  9732. should one occur. We call it like this:
  9733. HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
  9734. where
  9735. HANDLER_DATA is the HANDLER_DATA argument we recevied; it's the
  9736. same idea as BODY_DATA above.
  9737. THROWN_TAG is the tag that the user threw to; usually this is
  9738. TAG, but it could be something else if TAG was #t (i.e., a
  9739. catch-all), or the user threw to a jmpbuf.
  9740. THROW_ARGS is the list of arguments the user passed to the THROW
  9741. function.
  9742. BODY_DATA is just a pointer we pass through to BODY. HANDLER_DATA
  9743. is just a pointer we pass through to HANDLER. We don't actually
  9744. use either of those pointers otherwise ourselves. The idea is
  9745. that, if our caller wants to communicate something to BODY or
  9746. HANDLER, it can pass a pointer to it as MUMBLE_DATA, which BODY and
  9747. HANDLER can then use. Think of it as a way to make BODY and
  9748. HANDLER closures, not just functions; MUMBLE_DATA points to the
  9749. enclosed variables.
  9750. Of course, it's up to the caller to make sure that any data a
  9751. MUMBLE_DATA needs is protected from GC. A common way to do this is
  9752. to make MUMBLE_DATA a pointer to data stored in an automatic
  9753. structure variable; since the collector must scan the stack for
  9754. references anyway, this assures that any references in MUMBLE_DATA
  9755. will be found.
  9756. ** The new function scm_internal_lazy_catch is exactly like
  9757. scm_internal_catch, except:
  9758. - It does not unwind the stack (this is the major difference).
  9759. - If handler returns, its value is returned from the throw.
  9760. - BODY always receives #f as its JMPBUF argument (since there's no
  9761. jmpbuf associated with a lazy catch, because we don't unwind the
  9762. stack.)
  9763. ** scm_body_thunk is a new body function you can pass to
  9764. scm_internal_catch if you want the body to be like Scheme's `catch'
  9765. --- a thunk, or a function of one argument if the tag is #f.
  9766. BODY_DATA is a pointer to a scm_body_thunk_data structure, which
  9767. contains the Scheme procedure to invoke as the body, and the tag
  9768. we're catching. If the tag is #f, then we pass JMPBUF (created by
  9769. scm_internal_catch) to the body procedure; otherwise, the body gets
  9770. no arguments.
  9771. ** scm_handle_by_proc is a new handler function you can pass to
  9772. scm_internal_catch if you want the handler to act like Scheme's catch
  9773. --- call a procedure with the tag and the throw arguments.
  9774. If the user does a throw to this catch, this function runs a handler
  9775. procedure written in Scheme. HANDLER_DATA is a pointer to an SCM
  9776. variable holding the Scheme procedure object to invoke. It ought to
  9777. be a pointer to an automatic variable (i.e., one living on the stack),
  9778. or the procedure object should be otherwise protected from GC.
  9779. ** scm_handle_by_message is a new handler function to use with
  9780. `scm_internal_catch' if you want Guile to print a message and die.
  9781. It's useful for dealing with throws to uncaught keys at the top level.
  9782. HANDLER_DATA, if non-zero, is assumed to be a char * pointing to a
  9783. message header to print; if zero, we use "guile" instead. That
  9784. text is followed by a colon, then the message described by ARGS.
  9785. ** The return type of scm_boot_guile is now void; the function does
  9786. not return a value, and indeed, never returns at all.
  9787. ** The new function scm_shell makes it easy for user applications to
  9788. process command-line arguments in a way that is compatible with the
  9789. stand-alone guile interpreter (which is in turn compatible with SCSH,
  9790. the Scheme shell).
  9791. To use the scm_shell function, first initialize any guile modules
  9792. linked into your application, and then call scm_shell with the values
  9793. of ARGC and ARGV your `main' function received. scm_shell will add
  9794. any SCSH-style meta-arguments from the top of the script file to the
  9795. argument vector, and then process the command-line arguments. This
  9796. generally means loading a script file or starting up an interactive
  9797. command interpreter. For details, see "Changes to the stand-alone
  9798. interpreter" above.
  9799. ** The new functions scm_get_meta_args and scm_count_argv help you
  9800. implement the SCSH-style meta-argument, `\'.
  9801. char **scm_get_meta_args (int ARGC, char **ARGV)
  9802. If the second element of ARGV is a string consisting of a single
  9803. backslash character (i.e. "\\" in Scheme notation), open the file
  9804. named by the following argument, parse arguments from it, and return
  9805. the spliced command line. The returned array is terminated by a
  9806. null pointer.
  9807. For details of argument parsing, see above, under "guile now accepts
  9808. command-line arguments compatible with SCSH..."
  9809. int scm_count_argv (char **ARGV)
  9810. Count the arguments in ARGV, assuming it is terminated by a null
  9811. pointer.
  9812. For an example of how these functions might be used, see the source
  9813. code for the function scm_shell in libguile/script.c.
  9814. You will usually want to use scm_shell instead of calling this
  9815. function yourself.
  9816. ** The new function scm_compile_shell_switches turns an array of
  9817. command-line arguments into Scheme code to carry out the actions they
  9818. describe. Given ARGC and ARGV, it returns a Scheme expression to
  9819. evaluate, and calls scm_set_program_arguments to make any remaining
  9820. command-line arguments available to the Scheme code. For example,
  9821. given the following arguments:
  9822. -e main -s ekko a speckled gecko
  9823. scm_set_program_arguments will return the following expression:
  9824. (begin (load "ekko") (main (command-line)) (quit))
  9825. You will usually want to use scm_shell instead of calling this
  9826. function yourself.
  9827. ** The function scm_shell_usage prints a usage message appropriate for
  9828. an interpreter that uses scm_compile_shell_switches to handle its
  9829. command-line arguments.
  9830. void scm_shell_usage (int FATAL, char *MESSAGE)
  9831. Print a usage message to the standard error output. If MESSAGE is
  9832. non-zero, write it before the usage message, followed by a newline.
  9833. If FATAL is non-zero, exit the process, using FATAL as the
  9834. termination status. (If you want to be compatible with Guile,
  9835. always use 1 as the exit status when terminating due to command-line
  9836. usage problems.)
  9837. You will usually want to use scm_shell instead of calling this
  9838. function yourself.
  9839. ** scm_eval_0str now returns SCM_UNSPECIFIED if the string contains no
  9840. expressions. It used to return SCM_EOL. Earth-shattering.
  9841. ** The macros for declaring scheme objects in C code have been
  9842. rearranged slightly. They are now:
  9843. SCM_SYMBOL (C_NAME, SCHEME_NAME)
  9844. Declare a static SCM variable named C_NAME, and initialize it to
  9845. point to the Scheme symbol whose name is SCHEME_NAME. C_NAME should
  9846. be a C identifier, and SCHEME_NAME should be a C string.
  9847. SCM_GLOBAL_SYMBOL (C_NAME, SCHEME_NAME)
  9848. Just like SCM_SYMBOL, but make C_NAME globally visible.
  9849. SCM_VCELL (C_NAME, SCHEME_NAME)
  9850. Create a global variable at the Scheme level named SCHEME_NAME.
  9851. Declare a static SCM variable named C_NAME, and initialize it to
  9852. point to the Scheme variable's value cell.
  9853. SCM_GLOBAL_VCELL (C_NAME, SCHEME_NAME)
  9854. Just like SCM_VCELL, but make C_NAME globally visible.
  9855. The `guile-snarf' script writes initialization code for these macros
  9856. to its standard output, given C source code as input.
  9857. The SCM_GLOBAL macro is gone.
  9858. ** The scm_read_line and scm_read_line_x functions have been replaced
  9859. by Scheme code based on the %read-delimited! procedure (known to C
  9860. code as scm_read_delimited_x). See its description above for more
  9861. information.
  9862. ** The function scm_sys_open has been renamed to scm_open. It now
  9863. returns a port instead of an FD object.
  9864. * The dynamic linking support has changed. For more information, see
  9865. libguile/DYNAMIC-LINKING.
  9866. Guile 1.0b3
  9867. User-visible changes from Thursday, September 5, 1996 until Guile 1.0
  9868. (Sun 5 Jan 1997):
  9869. * Changes to the 'guile' program:
  9870. ** Guile now loads some new files when it starts up. Guile first
  9871. searches the load path for init.scm, and loads it if found. Then, if
  9872. Guile is not being used to execute a script, and the user's home
  9873. directory contains a file named `.guile', Guile loads that.
  9874. ** You can now use Guile as a shell script interpreter.
  9875. To paraphrase the SCSH manual:
  9876. When Unix tries to execute an executable file whose first two
  9877. characters are the `#!', it treats the file not as machine code to
  9878. be directly executed by the native processor, but as source code
  9879. to be executed by some interpreter. The interpreter to use is
  9880. specified immediately after the #! sequence on the first line of
  9881. the source file. The kernel reads in the name of the interpreter,
  9882. and executes that instead. It passes the interpreter the source
  9883. filename as its first argument, with the original arguments
  9884. following. Consult the Unix man page for the `exec' system call
  9885. for more information.
  9886. Now you can use Guile as an interpreter, using a mechanism which is a
  9887. compatible subset of that provided by SCSH.
  9888. Guile now recognizes a '-s' command line switch, whose argument is the
  9889. name of a file of Scheme code to load. It also treats the two
  9890. characters `#!' as the start of a comment, terminated by `!#'. Thus,
  9891. to make a file of Scheme code directly executable by Unix, insert the
  9892. following two lines at the top of the file:
  9893. #!/usr/local/bin/guile -s
  9894. !#
  9895. Guile treats the argument of the `-s' command-line switch as the name
  9896. of a file of Scheme code to load, and treats the sequence `#!' as the
  9897. start of a block comment, terminated by `!#'.
  9898. For example, here's a version of 'echo' written in Scheme:
  9899. #!/usr/local/bin/guile -s
  9900. !#
  9901. (let loop ((args (cdr (program-arguments))))
  9902. (if (pair? args)
  9903. (begin
  9904. (display (car args))
  9905. (if (pair? (cdr args))
  9906. (display " "))
  9907. (loop (cdr args)))))
  9908. (newline)
  9909. Why does `#!' start a block comment terminated by `!#', instead of the
  9910. end of the line? That is the notation SCSH uses, and although we
  9911. don't yet support the other SCSH features that motivate that choice,
  9912. we would like to be backward-compatible with any existing Guile
  9913. scripts once we do. Furthermore, if the path to Guile on your system
  9914. is too long for your kernel, you can start the script with this
  9915. horrible hack:
  9916. #!/bin/sh
  9917. exec /really/long/path/to/guile -s "$0" ${1+"$@"}
  9918. !#
  9919. Note that some very old Unix systems don't support the `#!' syntax.
  9920. ** You can now run Guile without installing it.
  9921. Previous versions of the interactive Guile interpreter (`guile')
  9922. couldn't start up unless Guile's Scheme library had been installed;
  9923. they used the value of the environment variable `SCHEME_LOAD_PATH'
  9924. later on in the startup process, but not to find the startup code
  9925. itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
  9926. code.
  9927. To run Guile without installing it, build it in the normal way, and
  9928. then set the environment variable `SCHEME_LOAD_PATH' to a
  9929. colon-separated list of directories, including the top-level directory
  9930. of the Guile sources. For example, if you unpacked Guile so that the
  9931. full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
  9932. you might say
  9933. export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
  9934. ** Guile's read-eval-print loop no longer prints #<unspecified>
  9935. results. If the user wants to see this, she can evaluate the
  9936. expression (assert-repl-print-unspecified #t), perhaps in her startup
  9937. file.
  9938. ** Guile no longer shows backtraces by default when an error occurs;
  9939. however, it does display a message saying how to get one, and how to
  9940. request that they be displayed by default. After an error, evaluate
  9941. (backtrace)
  9942. to see a backtrace, and
  9943. (debug-enable 'backtrace)
  9944. to see them by default.
  9945. * Changes to Guile Scheme:
  9946. ** Guile now distinguishes between #f and the empty list.
  9947. This is for compatibility with the IEEE standard, the (possibly)
  9948. upcoming Revised^5 Report on Scheme, and many extant Scheme
  9949. implementations.
  9950. Guile used to have #f and '() denote the same object, to make Scheme's
  9951. type system more compatible with Emacs Lisp's. However, the change
  9952. caused too much trouble for Scheme programmers, and we found another
  9953. way to reconcile Emacs Lisp with Scheme that didn't require this.
  9954. ** Guile's delq, delv, delete functions, and their destructive
  9955. counterparts, delq!, delv!, and delete!, now remove all matching
  9956. elements from the list, not just the first. This matches the behavior
  9957. of the corresponding Emacs Lisp functions, and (I believe) the Maclisp
  9958. functions which inspired them.
  9959. I recognize that this change may break code in subtle ways, but it
  9960. seems best to make the change before the FSF's first Guile release,
  9961. rather than after.
  9962. ** The compiled-library-path function has been deleted from libguile.
  9963. ** The facilities for loading Scheme source files have changed.
  9964. *** The variable %load-path now tells Guile which directories to search
  9965. for Scheme code. Its value is a list of strings, each of which names
  9966. a directory.
  9967. *** The variable %load-extensions now tells Guile which extensions to
  9968. try appending to a filename when searching the load path. Its value
  9969. is a list of strings. Its default value is ("" ".scm").
  9970. *** (%search-load-path FILENAME) searches the directories listed in the
  9971. value of the %load-path variable for a Scheme file named FILENAME,
  9972. with all the extensions listed in %load-extensions. If it finds a
  9973. match, then it returns its full filename. If FILENAME is absolute, it
  9974. returns it unchanged. Otherwise, it returns #f.
  9975. %search-load-path will not return matches that refer to directories.
  9976. *** (primitive-load FILENAME :optional CASE-INSENSITIVE-P SHARP)
  9977. uses %seach-load-path to find a file named FILENAME, and loads it if
  9978. it finds it. If it can't read FILENAME for any reason, it throws an
  9979. error.
  9980. The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
  9981. `read' function.
  9982. *** load uses the same searching semantics as primitive-load.
  9983. *** The functions %try-load, try-load-with-path, %load, load-with-path,
  9984. basic-try-load-with-path, basic-load-with-path, try-load-module-with-
  9985. path, and load-module-with-path have been deleted. The functions
  9986. above should serve their purposes.
  9987. *** If the value of the variable %load-hook is a procedure,
  9988. `primitive-load' applies its value to the name of the file being
  9989. loaded (without the load path directory name prepended). If its value
  9990. is #f, it is ignored. Otherwise, an error occurs.
  9991. This is mostly useful for printing load notification messages.
  9992. ** The function `eval!' is no longer accessible from the scheme level.
  9993. We can't allow operations which introduce glocs into the scheme level,
  9994. because Guile's type system can't handle these as data. Use `eval' or
  9995. `read-and-eval!' (see below) as replacement.
  9996. ** The new function read-and-eval! reads an expression from PORT,
  9997. evaluates it, and returns the result. This is more efficient than
  9998. simply calling `read' and `eval', since it is not necessary to make a
  9999. copy of the expression for the evaluator to munge.
  10000. Its optional arguments CASE_INSENSITIVE_P and SHARP are interpreted as
  10001. for the `read' function.
  10002. ** The function `int?' has been removed; its definition was identical
  10003. to that of `integer?'.
  10004. ** The functions `<?', `<?', `<=?', `=?', `>?', and `>=?'. Code should
  10005. use the R4RS names for these functions.
  10006. ** The function object-properties no longer returns the hash handle;
  10007. it simply returns the object's property list.
  10008. ** Many functions have been changed to throw errors, instead of
  10009. returning #f on failure. The point of providing exception handling in
  10010. the language is to simplify the logic of user code, but this is less
  10011. useful if Guile's primitives don't throw exceptions.
  10012. ** The function `fileno' has been renamed from `%fileno'.
  10013. ** The function primitive-mode->fdes returns #t or #f now, not 1 or 0.
  10014. * Changes to Guile's C interface:
  10015. ** The library's initialization procedure has been simplified.
  10016. scm_boot_guile now has the prototype:
  10017. void scm_boot_guile (int ARGC,
  10018. char **ARGV,
  10019. void (*main_func) (),
  10020. void *closure);
  10021. scm_boot_guile calls MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV.
  10022. MAIN_FUNC should do all the work of the program (initializing other
  10023. packages, reading user input, etc.) before returning. When MAIN_FUNC
  10024. returns, call exit (0); this function never returns. If you want some
  10025. other exit value, MAIN_FUNC may call exit itself.
  10026. scm_boot_guile arranges for program-arguments to return the strings
  10027. given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should call
  10028. scm_set_program_arguments with the final list, so Scheme code will
  10029. know which arguments have been processed.
  10030. scm_boot_guile establishes a catch-all catch handler which prints an
  10031. error message and exits the process. This means that Guile exits in a
  10032. coherent way when system errors occur and the user isn't prepared to
  10033. handle it. If the user doesn't like this behavior, they can establish
  10034. their own universal catcher in MAIN_FUNC to shadow this one.
  10035. Why must the caller do all the real work from MAIN_FUNC? The garbage
  10036. collector assumes that all local variables of type SCM will be above
  10037. scm_boot_guile's stack frame on the stack. If you try to manipulate
  10038. SCM values after this function returns, it's the luck of the draw
  10039. whether the GC will be able to find the objects you allocate. So,
  10040. scm_boot_guile function exits, rather than returning, to discourage
  10041. people from making that mistake.
  10042. The IN, OUT, and ERR arguments were removed; there are other
  10043. convenient ways to override these when desired.
  10044. The RESULT argument was deleted; this function should never return.
  10045. The BOOT_CMD argument was deleted; the MAIN_FUNC argument is more
  10046. general.
  10047. ** Guile's header files should no longer conflict with your system's
  10048. header files.
  10049. In order to compile code which #included <libguile.h>, previous
  10050. versions of Guile required you to add a directory containing all the
  10051. Guile header files to your #include path. This was a problem, since
  10052. Guile's header files have names which conflict with many systems'
  10053. header files.
  10054. Now only <libguile.h> need appear in your #include path; you must
  10055. refer to all Guile's other header files as <libguile/mumble.h>.
  10056. Guile's installation procedure puts libguile.h in $(includedir), and
  10057. the rest in $(includedir)/libguile.
  10058. ** Two new C functions, scm_protect_object and scm_unprotect_object,
  10059. have been added to the Guile library.
  10060. scm_protect_object (OBJ) protects OBJ from the garbage collector.
  10061. OBJ will not be freed, even if all other references are dropped,
  10062. until someone does scm_unprotect_object (OBJ). Both functions
  10063. return OBJ.
  10064. Note that calls to scm_protect_object do not nest. You can call
  10065. scm_protect_object any number of times on a given object, and the
  10066. next call to scm_unprotect_object will unprotect it completely.
  10067. Basically, scm_protect_object and scm_unprotect_object just
  10068. maintain a list of references to things. Since the GC knows about
  10069. this list, all objects it mentions stay alive. scm_protect_object
  10070. adds its argument to the list; scm_unprotect_object remove its
  10071. argument from the list.
  10072. ** scm_eval_0str now returns the value of the last expression
  10073. evaluated.
  10074. ** The new function scm_read_0str reads an s-expression from a
  10075. null-terminated string, and returns it.
  10076. ** The new function `scm_stdio_to_port' converts a STDIO file pointer
  10077. to a Scheme port object.
  10078. ** The new function `scm_set_program_arguments' allows C code to set
  10079. the value returned by the Scheme `program-arguments' function.
  10080. Older changes:
  10081. * Guile no longer includes sophisticated Tcl/Tk support.
  10082. The old Tcl/Tk support was unsatisfying to us, because it required the
  10083. user to link against the Tcl library, as well as Tk and Guile. The
  10084. interface was also un-lispy, in that it preserved Tcl/Tk's practice of
  10085. referring to widgets by names, rather than exporting widgets to Scheme
  10086. code as a special datatype.
  10087. In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
  10088. maintainers described some very interesting changes in progress to the
  10089. Tcl/Tk internals, which would facilitate clean interfaces between lone
  10090. Tk and other interpreters --- even for garbage-collected languages
  10091. like Scheme. They expected the new Tk to be publicly available in the
  10092. fall of 1996.
  10093. Since it seems that Guile might soon have a new, cleaner interface to
  10094. lone Tk, and that the old Guile/Tk glue code would probably need to be
  10095. completely rewritten, we (Jim Blandy and Richard Stallman) have
  10096. decided not to support the old code. We'll spend the time instead on
  10097. a good interface to the newer Tk, as soon as it is available.
  10098. Until then, gtcltk-lib provides trivial, low-maintenance functionality.
  10099. Copyright information:
  10100. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
  10101. Permission is granted to anyone to make or distribute verbatim copies
  10102. of this document as received, in any medium, provided that the
  10103. copyright notice and this permission notice are preserved,
  10104. thus giving the recipient permission to redistribute in turn.
  10105. Permission is granted to distribute modified versions
  10106. of this document, or of portions of it,
  10107. under the above conditions, provided also that they
  10108. carry prominent notices stating who last changed them.
  10109. Local variables:
  10110. mode: outline
  10111. paragraph-separate: "[ ]*$"
  10112. end: