NEWS 537 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339
  1. Guile NEWS --- history of user-visible changes.
  2. Copyright (C) 1996-2023 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.10 (since 3.0.9)
  6. * New interfaces and functionality
  7. ** New warning: unused-module
  8. This analysis, enabled at `-W2', issues warnings for modules that appear
  9. in a `use-modules' form or as a #:use-module clause of `define-module',
  10. and whose bindings are unused. This is useful to trim the list of
  11. imports of a module.
  12. In some cases, the compiler cannot conclude whether a module is
  13. definitely unused---this is notably the case for modules that are only
  14. used at macro-expansion time, such as (srfi srfi-26). In those cases,
  15. the compiler reports it as "possibly unused".
  16. * Bug fixes
  17. ** (ice-9 suspendable-ports) incorrect UTF-8 decoding
  18. (<https://bugs.gnu.org/62290>)
  19. ** Fix invalid use of 'posix_spawn' on non-glibc systems
  20. (<https://bugs.gnu.org/61095>)
  21. ** Adjust 'spawn' test for GNU/Hurd
  22. (<https://bugs.gnu.org/62501>)
  23. ** Fix 'system*' with non-file input/output/error port
  24. (<https://bugs.gnu.org/63024>)
  25. ** Fix possible deadlock in 'sigaction' (aka. 'scm_sigaction_for_thread')
  26. (<https://bugs.gnu.org/64666>)
  27. ** Avoid module resolution in 'call-with-new-thread', which could deadlock
  28. (<https://bugs.gnu.org/62691>)
  29. ** 'read-u8' in (scheme base) now defaults to (current-input-port)
  30. (<https://bugs.gnu.org/62690>)
  31. ** Hashing of UTF-8 symbols with non-ASCII characters avoids corruption
  32. (<https://bugs.gnu.org/56413>)
  33. This issue could cause `scm_from_utf8_symbol' and
  34. `scm_from_utf8_symboln` to incorrectly conclude that the symbol hadn't
  35. already been interned, and then create a new one, which of course
  36. wouldn't be `eq?' to the other(s). The incorrect hash was the result of
  37. a buffer overrun, and so might vary. This problem affected a number of
  38. other operations, given the internal use of those functions.
  39. Changes in 3.0.9 (since 3.0.8)
  40. * Notable changes
  41. * New interfaces and functionality
  42. ** New `spawn' procedure to spawn child processes
  43. The new `spawn' procedure creates a child processes executing the given
  44. program. It lets you control the environment variables of that process
  45. and redirect its standard input, standard output, and standard error
  46. streams.
  47. Being implemented in terms of `posix_spawn', it is more portable, more
  48. robust, and more efficient than the combination of `primitive-fork' and
  49. `execl'. See "Processes" in the manual for details, and see the 2019
  50. paper entitled "A fork() in the road" (Andrew Baumann et al.) for
  51. background information.
  52. `system*', as well as the `open-pipe' and `pipeline' procedures of
  53. (ice-9 popen) are now implemented in terms of `posix_spawn' as well,
  54. which fixes bugs such as redirects: <https://bugs.gnu.org/52835>.
  55. ** `open-file' now supports an "e" flag for O_CLOEXEC
  56. Until now, the high-level `open-file' facility did not provide a way to
  57. pass O_CLOEXEC to the underlying `open' call. It can now be done by
  58. appending "e" to the `mode' string passed as a second argument. See
  59. "File Ports" in the manual for more info.
  60. ** `pipe' now takes flags as an optional argument
  61. This lets you pass flags such as O_CLOEXEC and O_NONBLOCK, as with the
  62. pipe2(2) system call found on GNU/Linux and GNU/Hurd, instead of having
  63. to call `fnctl' afterwards. See "Ports and File Descriptors" in the
  64. manual for details.
  65. ** Bindings to `openat' and friends
  66. The procedures `openat', `open-fdes-at', `statat', `chownat',
  67. `unlinkat', `chmodat', `renameat', `mkdirat' and `symlinkat' have been
  68. added. They resolve file names relative to a directory passed as a file
  69. port. The procedures `chdir' `readlink' and `utime' have been extended
  70. to support file ports. The related flags `AT_REMOVEDIR' and
  71. `AT_EACCESS' have been added. See `File System' in the manual
  72. ** Abstract Unix-domain sockets are supported
  73. It is now possible to create an AF_UNIX socket with a leading zero byte
  74. in its file name to create an abstract Unix-domain socket. See
  75. "man 7 unix" for information on abstract Unix-domain sockets.
  76. ** New socket-related constants defined
  77. The `IN6ADDR_ANY' and `IN6ADDR_LOOPBACK' are now defined on systems with
  78. IPv6 support; they can be used with `bind'.
  79. Likewise, the `IPPROTO_IPV6' and `IPV6_V6ONLY' constants are defined,
  80. for use with `setsockopt'.
  81. ** New `bytevector-slice' procedure
  82. As an extension to the R6RS interface, the new (rnrs bytevectors gnu)
  83. module defines `bytevector-slice', which returns a bytevector that
  84. aliases part of an existing bytevector. See "Bytevector Slices" in the
  85. manual.
  86. ** Disassembler now shows intrinsic names
  87. Disassembler output now includes the name of intrinsics next to each
  88. `call-' instruction (info "(guile) Intrinsic Call Instructions").
  89. ** Linker and assembler consume less memory
  90. Previously, the entire output ELF file contents would be stored in
  91. memory when compiling as with `guild compile'. This is no longer the
  92. case.
  93. * Bug fixes
  94. ** JIT compilation is now supported on Apple M1 processors
  95. (https://bugs.gnu.org/44505)
  96. ** Type sizes are correctly determined when cross-compiling
  97. (https://bugs.gnu.org/54198)
  98. ** psyntax honors source properties coming from read hash extensions
  99. (https://bugs.gnu.org/54003)
  100. ** ./configure checks whether the linker supports '-flto' (needed on macOS)
  101. ** libguile/srfi-14.i.c is now longer shipped and is instead built from source
  102. (https://bugs.gnu.org/54111)
  103. ** Cross-compilation supports triplets with empty vendor strings
  104. (https://bugs.gnu.org/54915)
  105. ** It is possible to use a 'library-form' inside 'cond-expand' in R7RS libraries
  106. (https://bugs.gnu.org/55934)
  107. ** 'coverage-data->lcov' accepts a #:modules argument as documented
  108. (https://bugs.gnu.org/54911)
  109. ** 'connect' returns #f upon EAGAIN, not just EINPROGRESS
  110. ** (web http) capitalizes the "Basic" authorization header
  111. ** (web http) terminates chunked encoding with an extra \r\n
  112. ** (web client) retries TLS handshake upon non-fatal errors
  113. (https://bugs.gnu.org/49223)
  114. ** 'primitive-load' opens files as O_CLOEXEC
  115. (https://bugs.gnu.org/57567)
  116. ** Baseline compiler no longer crashes on (not (list 1 2))
  117. (https://bugs.gnu.org/58217)
  118. ** Fix documentation of ‘mkdir’
  119. Previously, the documentation implied the umask was ignored if the
  120. mode was set explicitly. However, this is not the case.
  121. ** 'system*' honors output/error port redirects
  122. (https://bugs.gnu.org/52835)
  123. ** 'open-input-pipe' & co. are now much faster
  124. (https://bugs.gnu.org/59321)
  125. ** Fix crash with out-of-bound indexes with `string-ref' and `fluid-ref*'
  126. (https://bugs.gnu.org/60488, https://bugs.gnu.org/58154)
  127. ** Fix infinite loop when compiling (make-vector)
  128. (https://bugs.gnu.org/60522)
  129. Changes in 3.0.8 (since 3.0.7)
  130. * Notable changes
  131. ** Cross-module inlining
  132. Although historically Guile has treated modules as glorified hash
  133. tables, most modules are actually _declarative_ -- they just define
  134. functions and variables and provide them for other modules to use, and
  135. don't manipulate modules as first-class objects. See "Declarative
  136. Modules" in the manual, for more discussion.
  137. Since version 3.0.0, Guile has taken advantage of declarative semantics
  138. to allow a top-level definition to be inlined within its uses in the
  139. same compilation unit, provided the binding is never assigned and
  140. defined exactly once. Guile 3.0.8 extends this to allow some
  141. exported declarative definitions to be inlined into other modules.
  142. This facility is mostly transparent to the user and is enabled at the
  143. default -O2 optimization level. "Small" definitions are available for
  144. cross-module inlining (-Oinlinable-exports, included at -O2). The
  145. actual inlining decision is performed by Guile's partial evaluation pass
  146. (the -Ocross-module-inlining modifier to -Opeval, included at -O2 also),
  147. subject to effort and size growth counters.
  148. Note however that as with macros, when a definition changes in module A,
  149. a separately compiled module B that uses that definition doesn't
  150. automatically get recompiled. This is a limitation in Guile that we
  151. would like to fix.
  152. As another limitation, cross-module inlining is only available for
  153. imports from modules which have already been compiled at -O2 (or
  154. otherwise with -Oinlinable-exports).
  155. When determining whether to enable this facility by default, we weighed
  156. the usability problems of stale inlined bindings against the benefit of
  157. allowing module boundaries to no longer be optimization boundaries, we
  158. ended up on the "let's do it!" side of the equation. However we welcome
  159. feedback from users as to what should be the default behavior, until
  160. such a time as we have a proper notion of when a compiled file is stale
  161. or not.
  162. ** Avoid the need for a custom GMP allocator
  163. In Guile 3.0.6, we fixed a long-standing bug in Guile's use of the
  164. library that Guile uses to implement bignums (large integers), GMP
  165. (https://gmplib.org). See the Guile 3.0.6 release notes. However this
  166. left us with a suboptimal Guile, in which each large integer had to have
  167. a finalizer to free the memory allocated by GMP. Finalizers take time
  168. and space, and so they limit allocation rate, causing bignum performance
  169. to drop. Though you could set an environment variable to go back to the
  170. older, faster behavior, it wasn't the default.
  171. In Guile 3.0.8 we fix this problem comprehensively by avoiding embedding
  172. GMP's mpz_t values in Guile bignums. Instead we embed the bignum digits
  173. directly, avoiding the need for finalizers or custom allocators. This
  174. removes the need for the GUILE_INSTALL_GMP_MEMORY_FUNCTIONS environment
  175. variable mentioned in the Guile 3.0.6 release notes. We also deprecate
  176. the scm_install_gmp_memory_functions variable.
  177. * New interfaces and functionality
  178. ** Typed vector copy functions in (srfi srfi-4 gnu)
  179. The functions `u8vector-copy' `s8vector-copy' `u16vector-copy'
  180. `s16vector-copy' `u32vector-copy' `s32vector-copy' `u64vector-copy'
  181. `s64vector-copy' `f32vector-copy' `f64vector-copy' `c32vector-copy'
  182. `c64vector-copy' `u8vector-copy!' `s8vector-copy!' `u16vector-copy!'
  183. `s16vector-copy!' `u32vector-copy!' `s32vector-copy!'
  184. `u64vector-copy!' `s64vector-copy!' `f32vector-copy!'
  185. `f64vector-copy!' `c32vector-copy!' `c64vector-copy!' have been
  186. added. See SRFI-4 - Guile extensions" in the manual.
  187. ** New function srfi-4-vector-type-size in (srfi srfi-4 gnu)
  188. See SRFI-4 - Guile extensions" in the manual.
  189. ** `bytevector-fill!' supports partial fill through optional arguments
  190. This is an extension to the r6rs procedure. See "Manipulating
  191. Bytevectors" in the manual.
  192. ** `vector-copy!' and `vector-copy' from (rnrs base) included in core
  193. Compared to the previous versions, these accept range arguments. See
  194. "Accessing and Modifying Vector Contents" in the manual.
  195. ** New function bitvector-copy
  196. See "Bit vectors" in the manual.
  197. ** (system foreign) supports C99 complex types
  198. The types `complex-float' and `complex-double' stand for C99 `float
  199. _Complex' and `double _Complex` respectively.
  200. * Other new optimizations
  201. ** Better optimization of "let" in right-hand-side of "letrec"
  202. ** Allow constant-folding for calls to "expt"
  203. Thanks to Maxime Devos.
  204. ** Add ,optimize-cps REPL meta-command
  205. This meta-command is like ,optimize, but at a lower level.
  206. ** Improve alias analysis in common subexpression elimination
  207. ** Avoid argument-count checks for well-typed calls to known procedures
  208. This speeds up calls to lexically bound procedures.
  209. ** Avoid return-value-count checks for calls to known-return-arity procedures
  210. This new optimization, enabled at -O2, speeds up returns from calls to
  211. lexically bound procedures.
  212. * Build system changes
  213. ** Update Gnulib (bugs.gnu.org/49930)
  214. Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6.
  215. ** Compile libguile with -flto if available
  216. By default, if the compiler supports link-time optimization via the
  217. -flto flag, Guile will add it to CFLAGS. This results in a libguile
  218. that is approximately 15% smaller. Pass --disable-lto to configure to
  219. inhibit this behavior.
  220. ** Trim set of prebuilt .go files shipped in the tarball
  221. Guile includes built Scheme files in its tarball to speed up the build,
  222. for casual builders that are less concerned with reproducibility.
  223. However they took a lot of space and we have now trimmed these down to a
  224. more minimal set. As always, you can remove them and build entirely
  225. from source via a `make -C prebuilt clean`.
  226. * New deprecations
  227. ** Vector functions require vector arguments
  228. Passing arrays that are not vectors (arrays for which `(vector? array)'
  229. returns false) to functions `vector-move-left!', `vector-move-right!',
  230. `vector->list', and `vector-copy' is deprecated. Use `array-copy!',
  231. `array-copy', and `array->list' for such arguments.
  232. ** `scm_from_contiguous_typed_array' is deprecated
  233. This function was added during the Guile 2.x series and was not
  234. documented and is no longer used in Guile itself.
  235. ** Deprecate the "simple vector" concept, `scm_is_simple_vector'
  236. This concept meant to indicate "vectors which aren't array slices". Use
  237. scm_is_vector.
  238. ** Deprecate internal contiguous array flag
  239. We still reserve space for the flag to preserve ABI but it has no
  240. effect. As such we also remove the internal SCM_I_ARRAY_CONTIGUOUS,
  241. SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG,
  242. SCM_I_ARRAY_CONTP preprocessor interfaces, as they were internal and
  243. there is no longer a sensible way of using them.
  244. ** Deprecate symbol properties
  245. Symbols used to have a "function slot" and a "property slot", inherited
  246. from Emacs Lisp and early Lisps, which one would access with
  247. 'symbol-pref', 'symbol-fref', 'symbol-pset!', and 'symbol-fset!'. These
  248. procedures have been discouraged in favor of object properties; they are
  249. now deprecated. This saves a few words of memory per symbol.
  250. * Bug fixes
  251. ** Fix compilation of (ash x N), where N is a literal, at -O1 and below
  252. ** Texinfo and XML parsers are now thread-safe (bugs.gnu.org/51264)
  253. ** Fix `filename-completion-function' in (ice-9 readline)
  254. ** Fix trace-calls-to-procedure (bugs.gnu.org/43102, bugs.gnu.org/48412)
  255. ** Fix bug in nftw function (bugs.gnu.org/44182)
  256. ** Fix optimization bug in CSE in eq-constant? if both branches same
  257. ** Fix readline initialization with invalid keymaps
  258. ** Fix crash when reading #nil (bugs.gnu.org/49305)
  259. ** Fix read error when reading #{}}#.
  260. ** Fix Darwin host detection in foreign-library facility.
  261. ** Fix unification of (x ...) patterns in `match'
  262. ** Fix scaling floats with leading zeroes in `format'
  263. ** Improve support for r7rs-style `(srfi N)' and r6rs-style `(srfi :N)
  264. module names (bugs.gnu.org/39601, bugs.gnu.org/40371)
  265. ** Add support for the ARC architecture (bugs.gnu.org/48816)
  266. ** Build fix for const strerror result (bugs.gnu.org/43987)
  267. ** Fix typos in SRFI documentation (bugs.gnu.org/50127)
  268. ** Fix bounds check in `recvfrom!' (bugs.gnu.org/45595)
  269. ** Add support for riscv32
  270. ** Limit `ash' to left-shift by 2^32 bits (bugs.gnu.org/48150)
  271. ** Fix type confusion in heap-numbers-equal? calls from VM
  272. Hearty thanks to Jakub Wojciech, Robin Green, Daniel Llorens, Matija
  273. Obid, RhodiumToad, Rob Browning, Maxime Devos, Aleix Conchillo Flaqué,
  274. Timothy Sample, d4ryus, Fabrice Fontaine, Taylan Kammer, Vineet Gupta,
  275. Philipp Klaus Krause, Arun Isaac, and Alex Shinn.
  276. Changes in 3.0.7 (since 3.0.6)
  277. * New interfaces and functionality
  278. ** More O_* POSIX constants are now defined in Scheme
  279. Guile now defines constants such as `O_NOFOLLOW', `O_CLOEXEC',
  280. `O_TMPFILE', and more on platforms that support them. These may be
  281. passed as arguments to procedures such as `open' and `open-fdes'.
  282. * Bug fixes
  283. ** Fix bugs introduced in 3.0.6 with Scheme `read` re-write
  284. ** Fix deadlock after `primitive-fork' (#41948)
  285. ** Fix duplicates handlers for interfaces that use interfaces (#43025)
  286. ** Fix compile-psyntax.scm for (language tree-il canonicalize) removal
  287. ** Fix prompt compilation bug (#48098)
  288. ** Fix R7RS include-library-declarations, cond-expand (#40252)
  289. ** Fix --enable-mini-gmp on FreeBSD and other targets
  290. ** Fix excessive compile times for vectors >16k elements long
  291. ** Fix use of literal tree-il as source language (#45131)
  292. ** Fix SRFI-64 test-end to not remove globally-installed test runner
  293. Changes in 3.0.6 (since 3.0.5)
  294. * Notable changes
  295. ** Reimplement dynamic library loading ("dlopening") without libltdl
  296. Guile used to load dynamic libraries with libltdl, a library provided by
  297. the Libtool project.
  298. Libltdl provided some compatibility benefits when loading shared
  299. libraries made with older toolchains on older operating systems.
  300. However, no system from the last 10 years or so appears to need such a
  301. thick compatibility layer.
  302. Besides being an unmaintained dependency of limited utility, libltdl
  303. also has the negative aspect that in its search for libraries to load,
  304. it could swallow useful errors for libraries that are found but not
  305. loadable, instead showing just errors for search path candidates that
  306. are not found.
  307. Guile now implements dynamic library loading directly in terms of the
  308. standard "dlopen" interface, providing a limited shim for platforms with
  309. similar functionality exposed under different names (MinGW).
  310. This change has a few practical impacts to Guile users. There is a new
  311. library search path variable, `GUILE_EXTENSIONS_PATH'. Also, errors when
  312. loading a library fails now have better errors. And Guile no longer has
  313. a libltdl dependency.
  314. Although Guile no longer uses libltdl, for backwards compatibility Guile
  315. still adds `LTDL_LIBRARY_PATH' to the loadable library search path, and
  316. includes ad-hoc logic to support uninstalled dynamically loadable
  317. libraries via also adding the ".libs" subdirectories of
  318. `LTDL_LIBRARY_PATH' elements. See "Foreign Libraries" in the
  319. documentation for a full discussion.
  320. ** Fix important incompatibility with GnuTLS
  321. Guile uses the GNU multi-precision (GMP) library to implement
  322. arbitrary-precision integers (bignums) and fractions. Usually Guile is
  323. built to dynamically link to libgmp. In this configuration, any other
  324. user of GMP in the process uses the same libgmp instance, with the same
  325. shared state.
  326. An important piece of shared state is the GMP allocator, responsible for
  327. allocating storage for the digits of large integers. For Guile it's
  328. most efficient to install libgc as the GMP allocator. That way Guile
  329. doesn't need to install finalizers, which have significant overhead, to
  330. free GMP values when Guile bignums are collected. Using libgc to
  331. allocate digits also allows Guile's GC to adequately measure the memory
  332. cost of these values.
  333. However, if the Guile process is linked to some other user of GMP, then
  334. probably the references from the other library to GMP values aren't
  335. visible to the garbage collector. In this case libgc could prematurely
  336. collect values from that other GMP user.
  337. This isn't theoretical, sadly: it happens for Guile-GnuTLS. GnuTLS uses
  338. GMP, and so does Guile. Since Guile 2.0.4, Guile has installed libgc as
  339. the GMP allocator, so since then, Guile-GnuTLS has been buggy.
  340. Therefore, the default is now to not install libgc as the GMP allocator.
  341. This may slow down some uses of bignums. If you know that your Guile
  342. program will never use a library that uses GMP, you can set the
  343. GUILE_INSTALL_GMP_MEMORY_FUNCTIONS=1 in your environment. Guile sets
  344. this environment variable when building Guile, for example. See
  345. "Environment Variables" in the manual, for more.
  346. In some future, Guile may switch to GMP's more low-level "MPN" API for
  347. working with bignums, which would allow us to regain the ability to use
  348. GC-managed digit storage in all configurations.
  349. ** New build option: --enable-mini-gmp
  350. For some users, it would be preferable to bundle a private copy of the
  351. GMP bignum library into Guile. Some users would like to avoid the extra
  352. dependency. Others would like to use libgc to manage GMP values, while
  353. not perturbing the GMP allocator for other GMP users.
  354. For these cases, Guile now has an --enable-mini-gmp configure option,
  355. which will use a stripped-down version of GMP, bundled with Guile. This
  356. code doesn't have all the algorithmic optimizations of full GMP, but
  357. implements the same API in a basic way. It can be more optimal in a
  358. Guile context, given that it can use libgc to allocate its data.
  359. Note that a build with --enable-mini-gmp is not ABI-compatible with a
  360. "stock" build, as functions that use GMP types (scm_to_mpz,
  361. scm_from_mpz) are not exported.
  362. Thanks to Niels Möller and other GMP developers for their mini-gmp
  363. implementation!
  364. ** New `read' implementation in Scheme
  365. Guile's `read' procedure has been rewritten in Scheme. Compared to the
  366. C reader (which still exists for bootstrapping reasons), the new
  367. implementation is more maintainable, more secure, more debuggable, all
  368. while faithfully reproducing all quirks from Guile's previous reader
  369. implemented in C. Also, the Scheme reader is finally compatible with
  370. suspendable ports, allowing REPL implementations to be built with
  371. lightweight concurrency packages such as the third-party "Fibers"
  372. library. Calls to `read' from Scheme as well as calls to `scm_read'
  373. from C use the new reader.
  374. The Scheme implementation is currently about 60% as fast as the
  375. now-inaccessible C implementation, and we hope to close the gap over
  376. time. Bug reports very welcome.
  377. ** Scheme compiler uses `read-syntax' for better debugging
  378. The new Scheme reader also shares implementation with the new
  379. `read-syntax' procedure, which annotates each datum with source location
  380. information. Guile's compiler can use this to provide better
  381. source-level debugging for Scheme programs. Note that this can slightly
  382. increase compiled file sizes, though this is mitigated by some assembler
  383. optimizations.
  384. ** Syntax objects record source locations
  385. When compiling a file that defines a macro, the output will usually
  386. include a number of syntax objects as literals. Previously, these
  387. literals had no source information; now they do. This should improve
  388. debugging.
  389. ** Optimized run-time relocations
  390. The code that patches references between statically-allocated Scheme
  391. data has been optimized to be about 30% shorter than before or so, which
  392. can significantly decrease compiled file size and run-time
  393. initialization latency.
  394. ** Optimized calls to known functions
  395. For calls where the callee is within the compilation unit, Guile can now
  396. skip the argument count check.
  397. ** Reduce code size for calls to module variables
  398. All calls to a given exported or private variable from a module now
  399. dispatch through the same trampoline function. This reduces code size.
  400. ** Updated Gnulib
  401. The Gnulib compatibility library has been updated, for the first time
  402. since 2017 or so. We expect no functional change but look forward to
  403. any bug reports.
  404. * New interfaces and functionality
  405. ** `call-with-port'
  406. See "Ports" in the manual.
  407. ** `call-with-input-bytevector', `call-with-output-bytevector'
  408. See "Bytevector Ports" in the manual.
  409. ** `GUILE_EXTENSIONS_PATH' environment variable.
  410. See "Environment Variables" in the manual.
  411. ** `mkdtemp' and `mkstemp'
  412. See "File System" in the manual. There is still `mkstemp!' but we
  413. recommend that new code uses `mkstemp', which does not mutate the
  414. contents of the "template" argument string. Instead for `mkstemp' you
  415. get the name of the newly-created file by calling `port-filename' on the
  416. returned port.
  417. ** `(system foreign-library)' module
  418. See the newly reorganized "Foreign Function Interface", for details.
  419. These new interfaces replace `dynamic-link', `dynamic-pointer' and
  420. similar, which will eventually be deprecated.
  421. ** `read-syntax'
  422. See "Annotated Scheme Read" in the manual.
  423. ** `quote-syntax'
  424. See "Syntax Case" in the manual.
  425. ** `syntax-sourcev'
  426. See "Syntax Transformer Helpers" in the manual.
  427. * Optimizations
  428. ** eof-object?
  429. ** R6RS vector-map, vector-for-each
  430. * Bug fixes
  431. ** Fix reverse-list->string docstring
  432. ** Fix R7RS "member" result when no item found
  433. ** Fix make-transcoded-port on input+output ports
  434. ** Fix (ice-9 ftw) on filesystems where inode values are meaningless
  435. ** Fix many bugs that prevented Guile from building on MinGW
  436. ** Fix many bugs that prevented Guile from building on MinGW64
  437. ** Fix many bugs that prevented Guile's test suite from running on MinGW
  438. ** Fix srfi-69 merge-hash
  439. ** Fix suspendable-ports implementation of get-bytevector-some!
  440. ** Fix overread in string-locale<?, string-locale-ci<?, and friends
  441. ** Fix handling of parameter lists to elisp defun to allow nil
  442. ** Fix closure-conversion bug for SCC with no free vars and one not-well-known function
  443. ** Fix error when < passed non-real value
  444. ** Fix bug in which exported and private names in a used module could alias each other
  445. ** Fix bug with slot options in redefinable GOOPS classes
  446. ** Fix bugs regarding port buffering for TLS connections in web client
  447. Thanks to Vasilij Schneidermann, Andrey Ivanov, Rob Browning, Erik
  448. Dominikus, Göran Weinholt, Michael Gran, Andrew Whatson, Ricardo
  449. G. Herdt, Jan Nieuwenhuizen, David Thompson, and abcdw.
  450. * New deprecations
  451. ** `dynamic-unlink'
  452. This function now has no effect; Guile will not unload dynamically
  453. linked modules, as that can destabilize the system.
  454. * Incompatible changes
  455. ** `call-with-output-string' closes port on normal exit
  456. This procedure used to leave the port open, even though there was no
  457. useful way to access it. Now we clean it up more promptly, disposing
  458. any possible associated iconv descriptor.
  459. Changes in 3.0.5 (since 3.0.4)
  460. * New interfaces and functionality
  461. ** O(1) compilation of `case' and related expressions
  462. Guile now optimizes chains of eq? comparisons to constants, resulting in
  463. O(1) dispatch time, regardless of the length of the chain. This
  464. optimization is also unlocked in many cases for `match' expressions with
  465. many similar clauses whose first differentiator are constants.
  466. ** New (ice-9 copy-tree) module
  467. This module includes the `copy-tree' procedure that was previously
  468. implemented in C and present in the default `(guile)' module. See
  469. "Copying" in the manual.
  470. ** New warning: use-before-definition
  471. This analysis, enabled at `-W1', issues warnings for programs that use
  472. top-level variables before they are defined.
  473. ** New warning: non-idempotent-definition
  474. This analysis, enabled at `-W1', issues warnings for programs that whose
  475. use of a variable is ambiguous. For example, in the program:
  476. (define saved-add +)
  477. (define + error)
  478. The intention would seem to be to "save" the value of the base `+'
  479. procedure, then override it locally. However if this program is ever
  480. loaded twice, then the second time it is loaded, `+' will be taken from
  481. the local binding instead of the import. Users that want this kind of
  482. behavior should either use lexical bindings instead of top-level
  483. bindings, or otherwise rename important clobbered bindings via modules.
  484. * New deprecations
  485. ** `copy-tree' in the default environment, and `scm_copy_tree' from C
  486. Import the `(ice-9 copy-tree)' module instead.
  487. ** `unbound-variable-analysis`, `macro-use-before-definition-analysis`
  488. These bindings from `(language tree-il analyze)' are replaced by the
  489. use-before-definition analysis, which powers a number of warnings. Use
  490. `make-use-before-definition-analysis', but note that these interfaces
  491. are quite intimate parts of the compiler!
  492. * Incompatible changes
  493. ** `copy' read-option removed
  494. This read option would include a copy of the source expression in the
  495. source-properties of each subexpression. This option has always been
  496. off by default and lost most of its use value with the switch to a
  497. compiler in Guile 2.0.
  498. Changes in 3.0.4 (since 3.0.3)
  499. This release fixes the SONAME of libguile-3.0.so, which was erroneously
  500. bumped in 3.0.3 compared to 3.0.2. Distributions are strongly
  501. encouraged to use 3.0.4 instead of 3.0.3.
  502. Thanks to Chris Vine for reporting the issue.
  503. Changes in 3.0.3 (since 3.0.2)
  504. * New interfaces and functionality
  505. ** New baseline compiler
  506. Guile's CPS-based compiler generates good code, but it takes time and
  507. memory to do so. For users that prioritize speed of compilation over
  508. speed of generated code, Guile now has a new baseline compiler that goes
  509. directly from the high-level Tree-IL to bytecode, skipping CPS and all
  510. of its optimizations. This compiler is used for `guild compile -O0',
  511. and generally runs around ten times as fast as the CPS compiler.
  512. *** New VM intrinsics to support baseline compiler
  513. See "Intrinsic Call Instructions" in the manual.
  514. *** Compiler support for warning and lowering passes
  515. *** Compiler support for choosing different compilation orders
  516. See "Compiler Tower" in the manual. The new per-language "compiler
  517. chooser" facility can choose different compilers based on optimization
  518. level.
  519. *** Better support for specifying optimization and warning levels
  520. The procedural compilation interfaces (`compile', `compile-file', and so
  521. on) now have #:optimization-level and #:warning-level keyword arguments,
  522. which default to corresponding `default-optimization-level' and
  523. `default-warning-level' parameters. You can still specify warning and
  524. optimization passes manually, but we think most users will find the
  525. higher-level interfaces more robust to use.
  526. ** Faster Guile build from source
  527. Guile now uses the baseline compiler for its bootstrap, when building
  528. the first Scheme compiler. Because the baseline compiler runs faster
  529. and includes less code than the CPS compiler, Guile takes less time to
  530. build.
  531. ** New 'pipeline' procedure in (ice-9 popen)
  532. The 'pipeline' procedure provides a simple way to spawn command pipeline
  533. as one would do in a shell.
  534. ** Refreshed bitvector facility
  535. See "Bit Vectors" in the manual, for more on all of these.
  536. *** New bitvector-count, bitvector-count-bits, bitvector-position
  537. procedures
  538. These replace the wonky "bit-count", "bit-count*", and "bit-position"
  539. procedures.
  540. *** New bitvector-bit-set?, bitvector-bit-clear? procedures
  541. These replace bitvector-ref. The reason to migrate is that it's an
  542. opportunity be more efficient in 3.0 (because the new procedures only
  543. work on true bitvectors, and not generic bit arrays), easier to read (no
  544. need for 'not' when checking for false bits), and more consistent with
  545. other bitvector procedures.
  546. *** New bitvector-set-bit!, bitvector-clear-bit! procedures
  547. These replace bitvector-set!, for similar reasons as the bitvector-ref
  548. replacement above.
  549. *** New bitvector-set-all-bits!, bitvector-clear-all-bits! procedures
  550. These replace bitvector-fill!.
  551. *** New bitvector-flip-all-bits! procedure
  552. This replaces bit-invert!.
  553. *** New bitvector-set-bits!, bitvector-clear-bits! procedures
  554. These replace the wonky "bit-set*!" procedure.
  555. * Bug fixes
  556. ** statprof reports the names of primitives
  557. Previously statprof would show strings like "anon #x1234" for primitives
  558. written in C.
  559. ** Compiler reduces 'equal?' when passed a character literal
  560. The compiler now properly reduces expressions such as (equal? c #\x) to
  561. (eq? c #\x). This was not the case in 3.0.2, which could lead to slower
  562. code, especially in 'match' expressions with many clauses with
  563. character literals.
  564. ** JIT bugs on ARMv7 have been fixed
  565. (<https://bugs.gnu.org/40737>,
  566. <https://gitlab.com/wingo/lightening/-/issues/12>)
  567. ** 'http-get', 'http-post', etc. now honor #:verify-certificates?
  568. (<https://bugs.gnu.org/40486>)
  569. ** web: Accept URI host names consisting only of hex digits
  570. (<https://bugs.gnu.org/40582>)
  571. ** (web http) parser recognizes the CONNECT and PATCH methods
  572. ** Initial revealed count of file ports is now zero
  573. (<https://bugs.gnu.org/41204>)
  574. * New deprecations
  575. ** Old bitvector interfaces deprecated
  576. See "Bit Vectors" in the manual, for details on all of these
  577. replacements.
  578. *** bit-count, bit-position
  579. Use bitvector-count or bitvector-position instead.
  580. *** bitvector-ref
  581. Use 'bitvector-bit-set?' or 'bitvector-bit-clear?' instead.
  582. *** bitvector-set!
  583. Use 'bitvector-set-bit!' or 'bitvector-clear-bit!' instead.
  584. *** bitvector-fill!
  585. Use 'bitvector-set-all-bits!' or 'bitvector-clear-all-bits!' instead.
  586. *** bit-invert!
  587. Use 'bitvector-flip-all-bits! instead.
  588. *** bit-set*!
  589. Use 'bitvector-set-bits!' or 'bitvector-clear-bits!' instead.
  590. *** bit-count*
  591. Use 'bitvector-count-bits' instead, subtracting from 'bitvector-count'
  592. on the mask bitvector if you are counting unset bits.
  593. *** Accessing generic arrays using the bitvector procedures
  594. For the same efficiency reasons that use of 'vector-ref' on generic
  595. arrays was deprecated in Guile 2.0.10, using 'bitvector->list' and
  596. similar procedures on 1-dimensional boolean-typed arrays is now
  597. deprecated. Use 'array-ref' and similar procedures on arrays.
  598. *** scm_istr2bve
  599. This C-only procedure to parse a bitvector from a string should be
  600. replaced by calling `read' on a string port instead, if needed.
  601. Changes in 3.0.2 (since 3.0.1)
  602. * New interfaces and functionality
  603. ** New (srfi srfi-171) module
  604. This module implements "transducers" as specified in
  605. <https://srfi.schemers.org/srfi-171/srfi-171.html>.
  606. Thanks to Linus Björnstam for this new API!
  607. ** SRFI-14 character data set upgraded to Unicode 13.0.0
  608. * Bug fixes
  609. ** Fix heap corruption when allocating structs
  610. (<https://bugs.gnu.org/39266>)
  611. This bug would cause random crashes; users are invited to upgrade.
  612. Thanks to rr (<https://rr-project.org/>) for being instrumental in
  613. finding this bug!
  614. ** Fix race condition between 'abort-to-prompt' and stack marking
  615. (<https://bugs.gnu.org/28211>)
  616. This bug could occasionally cause crashes in multi-threaded Guile
  617. programs using delimited continuations or exceptions.
  618. ** Ensure weak sets are occasionally vacuumed
  619. (<https://bugs.gnu.org/40194>)
  620. Previously, weak sets, which are used internally for interned symbols
  621. and for ports with SCM_PORT_TYPE_NEEDS_CLOSE_ON_GC, could grow seemingly
  622. indefinitely without being vacuumed.
  623. ** Interpret dynamic library name as literal file name first
  624. (<https://bugs.gnu.org/21076>)
  625. Until now, 'dynamic-link' would always append an extension, such as
  626. ".so", to the user-provided file names. Now, 'dynamic-link' first tries
  627. the file name literally, and only then falls back to adding the OS
  628. shared library file name extension.
  629. This allows users to refer to "libsomething.so.1.2.3" instead of
  630. "libsomething.so", the latter being usually provided by "-dev" packages
  631. of GNU/Linux distributions, unlike the former.
  632. ** <libguile.h> includes <libguile/hooks.h> again
  633. This fixes an omission in Guile 3.0.
  634. ** Fix fixpoint computation in compute-significant-bits
  635. (<https://bugs.gnu.org/38486>)
  636. ** Fix compilation '--without-threads'
  637. (<https://bugs.gnu.org/40075>)
  638. * New deprecations
  639. ** 'tmpnam' is now deprecated
  640. The 'tmpnam' function in the C library has been deprecated for years due
  641. to security concerns; the Scheme procedure 'tmpnam' is now deprecated as
  642. well, in favor of 'mkstemp!'. In addition, a new '--disable-tmpnam'
  643. option has been added to 'configure' for users who would like to disable
  644. it right away.
  645. Changes in 3.0.1 (since 3.0.0):
  646. * New interfaces and functionality
  647. ** Export constructor and predicate for '&quit-exception'
  648. The (ice-9 exceptions) module, new in 3.0.0, now exports
  649. 'quit-exception?' and 'make-quit-exception', which is consistent with
  650. other exception types.
  651. ** (texinfo plain-text) now exports '*line-width*' fluid
  652. The new '*line-width*' fluid allows users to specify the width of a line
  653. for the purposes of line wrapping. See "texinfo plain-text" in the
  654. manual.
  655. ** R7RS support recognizes the '.sld' extension
  656. The '.sld' is what the R7RS suggests as a source file name extension.
  657. It is now recognized when running "guile --r7rs", as well as
  658. the '.guile.sld' extension.
  659. * Bug fixes
  660. ** 'hash' correctly handles keywords, ports, hash tables, etc.
  661. (<https://bugs.gnu.org/39634>)
  662. It used to be that the 'hash' procedure would return the same value for
  663. all keyword objects, the same value for all hash tables, the same value
  664. for all input ports, etc.
  665. ** 'include' no longer rejects relative file names
  666. A bug in 3.0.0 would lead 'include' to error out when passed a relative
  667. file name.
  668. ** Reduce GC pressure when using bignums
  669. Guile no longer installs a finalizer on each bignum (large integer) it
  670. creates. This significantly improves speed and memory usage on
  671. applications that make heavy use of bignums, such as the compiler
  672. itself.
  673. ** Fix expansion of 'error' calls with a non-constant argument
  674. (<https://bugs.gnu.org/39509>)
  675. Calls to the 'error' primitive with a non-constant argument, as in
  676. (error message), would be incorrectly expanded by the compiler, leading
  677. to non-printable errors ("Error while printing exception").
  678. ** Improve source location information for top-level references
  679. (<https://bugs.gnu.org/38388>)
  680. Source location information, as is visible upon "unbound variable"
  681. errors, is now more accurate.
  682. ** Web client treats TLS "premature termination" error as EOF
  683. (<https://bugs.gnu.org/39800>)
  684. This allows 'http-request' from (web client) to gracefully handle
  685. servers that terminate connections abruptly after responding to a
  686. "Connection: close" request.
  687. ** Fix bug restoring a JIT continuation from the interpreter
  688. ** Export C symbols 'scm_sym_lambda', 'scm_sym_quote', etc. again
  689. Those C symbols were inadvertently made private in 3.0.0.
  690. ** Fix build on IA64 and on platforms where the stack grows upwards
  691. ** Fix JIT compilation on 64-bit Cygwin
  692. (<https://bugs.gnu.org/39118>)
  693. ** texinfo properly renders @acronym in plain text
  694. (<https://bugs.gnu.org/37846>)
  695. ** Compiler now optimizes (logior 0 INT)
  696. (<https://bugs.gnu.org/39573>)
  697. ** Fix Readline configure check for the sake of libedit
  698. This fixes builds on macOS against the system-provided libedit.
  699. ** Provided 'GUILE_PKG' Autoconf macro now detects Guile 3.0
  700. (<https://bugs.gnu.org/39437>)
  701. Changes in 3.0.0 (since the stable 2.2 series):
  702. * Notable changes
  703. ** Just-in-time code generation
  704. Guile programs now run up to 4 times faster, relative to Guile 2.2,
  705. thanks to just-in-time (JIT) native code generation. Notably, this
  706. brings the performance of "eval" as written in Scheme back to the level
  707. of "eval" written in C, as in the days of Guile 1.8.
  708. See "Just-In-Time Native Code" in the manual, for more information. JIT
  709. compilation will be enabled automatically and transparently. To disable
  710. JIT compilation, configure Guile with `--enable-jit=no' or
  711. `--disable-jit'. The default is `--enable-jit=auto', which enables the
  712. JIT if it is available. See `./configure --help' for more.
  713. JIT compilation is enabled by default on x86-64, i686, ARMv7, and
  714. AArch64 targets.
  715. ** Lower-level bytecode
  716. Relative to the virtual machine in Guile 2.2, Guile's VM instruction set
  717. is now more low-level. This allows it to express more advanced
  718. optimizations, for example type check elision or integer
  719. devirtualization, and makes the task of JIT code generation easier.
  720. Note that this change can mean that for a given function, the
  721. corresponding number of instructions in Guile 3.0 may be higher than
  722. Guile 2.2, which can lead to slowdowns when the function is interpreted.
  723. We hope that JIT compilation more than makes up for this slight
  724. slowdown.
  725. ** Interleaved internal definitions and expressions allowed
  726. It used to be that internal definitions had to precede all expressions
  727. in their bodies. This restriction has been relaxed. If an expression
  728. precedes an internal definition, it is treated as if it were a
  729. definition of an unreferenced variable. For example, the expression
  730. `(foo)' transforms to the equivalent of `(define _ (begin (foo) #f))',
  731. if it precedes other definitions.
  732. This change improves the readability of Guile programs, as it used to be
  733. that program indentation tended to increase needlessly to allow nested
  734. `let' and `letrec' to re-establish definition contexts after initial
  735. expressions, for example for type-checks on procedure arguments.
  736. ** Record unification
  737. Guile used to have a number of implementations of structured data types
  738. in the form of "records": a core facility, SRFI-9 (records), SRFI-35
  739. (condition types -- a form of records) and R6RS records. These
  740. facilities were not compatible, as they all were built in different
  741. ways. This had the unfortunate corollary that SRFI-35 conditions were
  742. not compatible with R6RS conditions. To fix this problem, we have now
  743. added the union of functionality from all of these record types into
  744. core records: single-inheritance subtyping, mutable and immutable
  745. fields, and so on. See "Records" in the manual, for full details.
  746. R6RS records, SRFI-9 records, and the SRFI-35 and R6RS exception types
  747. have been accordingly "rebased" on top of core records.
  748. ** Reimplementation of exceptions
  749. Since Guile's origins 25 years ago, `throw' and `catch' have been the
  750. primary exception-handling primitives. However these primitives have
  751. two problems. One is that it's hard to handle exceptions in a
  752. structured way using `catch'. Few people remember what the
  753. corresponding `key' and `args' are that an exception handler would see
  754. in response to a call to `error', for example. In practice, this
  755. results in more generic catch-all exception handling than one might
  756. like.
  757. The other problem is that `throw', `catch', and especially
  758. `with-throw-handler' are quite unlike what the rest of the Scheme world
  759. uses. R6RS and R7RS, for example, have mostly converged on
  760. SRFI-34-style `with-exception-handler' and `raise' primitives, and
  761. encourage the use of SRFI-35-style structured exception objects to
  762. describe the error. Guile's R6RS layer incorporates an adapter between
  763. `throw'/`catch' and structured exception handling, but it didn't apply
  764. to SRFI-34/SRFI-35, and we would have to duplicate it for R7RS.
  765. In light of these considerations, Guile has now changed to make
  766. `with-exception-handler' and `raise-exception' its primitives for
  767. exception handling and defined a hierarchy of R6RS-style exception types
  768. in its core. SRFI-34/35, R6RS, and the exception-handling components of
  769. SRFI-18 (threads) have been re-implemented in terms of this core
  770. functionality. There is also a compatibility layer that makes it so
  771. that exceptions originating in `throw' can be handled by
  772. `with-exception-handler', and vice-versa for `raise-exception' and
  773. `catch'.
  774. Generally speaking, users will see no difference. The one significant
  775. difference is that users of SRFI-34 will see more exceptions flowing
  776. through their `with-exception-handler'/`guard' forms, because whereas
  777. before they would only see exceptions thrown by SRFI-34, now they will
  778. see exceptions thrown by R6RS, R7RS, or indeed `throw'.
  779. Guile's situation is transitional. Most exceptions are still signaled
  780. via `throw'. These will probably migrate over time to
  781. `raise-exception', while preserving compatibility of course.
  782. See "Exceptions" in the manual, for full details on the new API.
  783. ** `guard' no longer unwinds the stack for clause tests
  784. SRFI-34, and then R6RS and R7RS, defines a `guard' form that is a
  785. shorthand for `with-exception-handler'. The cond-like clauses for the
  786. exception handling are specified to run with the continuation of the
  787. `guard', while any re-propagation of the exception happens with the
  788. continuation of the original `raise'.
  789. In practice, this means that one needs full `call-with-continuation' to
  790. implement the specified semantics, to be able to unwind the stack to the
  791. cond clauses, then rewind if none match. This is not only quite
  792. expensive, it is also error-prone as one usually doesn't want to rewind
  793. dynamic-wind guards in an exceptional situation. Additionally, as
  794. continuations bind tightly to the current thread, it makes it impossible
  795. to migrate a subcomputation with a different thread if a `guard' is live
  796. on the stack, as is done in Fibers.
  797. Guile now works around these issues by running the test portion of the
  798. guard expressions within the original `raise' continuation, and only
  799. unwinding once a test matches. This is an incompatible semantic change
  800. but we think the situation is globally much better, and we expect that
  801. very few people will be affected by the change.
  802. ** Optimization of top-level bindings within a compilation unit
  803. At optimization level 2 and above, Guile's compiler is now allowed to
  804. inline top-level definitions within a compilation unit. See
  805. "Declarative Modules" in the manual, for full details. This change can
  806. improve the performance of programs with many small top-level
  807. definitions by quite a bit!
  808. At optimization level 3 and above, Guile will assume that any top-level
  809. binding in a declarative compilation unit that isn't exported from a
  810. module can be completely inlined into its uses. (Prior to this change,
  811. -O3 was the same as -O2.) Note that with this new
  812. `seal-private-bindings' pass, private declarative bindings are no longer
  813. available for access from the first-class module reflection API. The
  814. optimizations afforded by this pass can be useful when you need a speed
  815. boost, but having them enabled at optimization level 3 means they are
  816. not on by default, as they change Guile's behavior in ways that users
  817. might not expect.
  818. ** By default, GOOPS classes are not redefinable
  819. It used to be that all GOOPS classes were redefinable, at least in
  820. theory. This facility was supported by an indirection in all "struct"
  821. instances, even though only a subset of structs would need redefinition.
  822. We wanted to remove this indirection, in order to speed up Guile
  823. records, allow immutable Guile records to eventually be described by
  824. classes, and allow for some optimizations in core GOOPS classes that
  825. shouldn't be redefined anyway.
  826. Thus in GOOPS now there are classes that are redefinable and classes
  827. that aren't. By default, classes created with GOOPS are not
  828. redefinable. To make a class redefinable, it should be an instance of
  829. `<redefinable-class>'. See "Redefining a Class" in the manual for more
  830. information.
  831. ** Define top-level bindings for aux syntax: `else', `=>', `...', `_'
  832. These auxiliary syntax definitions are specified to be defined in the
  833. R6RS and the R7RS. They were previously unbound, even in the R6RS
  834. modules. This change is not anticipated to cause any incompatibility
  835. with existing Guile code, and improves things for R6RS and R7RS users.
  836. ** Conventional gettext alias is now `G_'
  837. Related to the last point, since the "Fix literal matching for
  838. module-bound literals" change in the 2.2 series, it was no longer
  839. possible to use the conventional `_' binding as an alias for `gettext',
  840. because a local `_' definition would prevent `_' from being recognized
  841. as auxiliary syntax for `match', `syntax-rules', and similar. The new
  842. recommended conventional alias for `gettext' is `G_'.
  843. ** Add --r6rs command-line option
  844. The new `install-r6rs!' procedure adapts Guile's defaults to be more
  845. R6RS-compatible. This procedure is called if the user passes `--r6rs'
  846. as a command-line argument. See "R6RS Incompatibilities" in the manual,
  847. for full details.
  848. ** Add support for R7RS
  849. Thanks to Göran Weinholt and OKUMURA Yuki, Guile now implements the R7RS
  850. modules. As the R7RS library syntax is a subset of R6RS, to use R7RS
  851. you just `(import (scheme base))' and off you go. As with R6RS also,
  852. there are some small lexical incompatibilities regarding hex escapes;
  853. see "R6RS Support" in the manual, for full details.
  854. Also as with R6RS, there is an `install-r7rs!' procedure and a `--r7rs'
  855. command-line option.
  856. ** Add #:re-export-and-replace argument to `define-module'
  857. This new keyword specifies a set of bindings to re-export, but also
  858. marks them as intended to replace core bindings. See "Creating Guile
  859. Modules" in the manual, for full details.
  860. Note to make this change, we had to change the way replacement flags are
  861. stored, to being associated with modules instead of individual variable
  862. objects. This means that users who #:re-export an imported binding that
  863. was already marked as #:replace by another module will now see warnings,
  864. as they need to use #:re-export-and-replace instead.
  865. ** `define-module' #:autoload no longer pulls in the whole module
  866. One of the ways that a module can use another is "autoloads". For
  867. example:
  868. (define-module (a) #:autoload (b) (make-b))
  869. In this example, module `(b)' will only be imported when the `make-b'
  870. identifier is referenced. However besides the imprecision about when a
  871. given binding is actually referenced, this mechanism used to cause the
  872. whole imported module to become available, not just the specified
  873. bindings. This has now been changed to only import the specified bindings.
  874. This is a backward-incompatible change. The fix is to mention all
  875. bindings of interest in the autoload clause. Feedback is welcome.
  876. ** Improve SRFI-43 vector-fill!
  877. SRFI-43 vector-fill! now has the same performance whether an optional
  878. range is provided or not, and is also provided in core. As a side
  879. effect, vector-fill! and vector_fill_x no longer work on non-vector
  880. rank-1 arrays. Such cases were handled incorrectly before; for example,
  881. prior to this change:
  882. (define a (make-vector 10 'x))
  883. (define b (make-shared-array a (lambda (i) (list (* 2 i))) 5))
  884. (vector-fill! b 'y)
  885. => #1(y y y x x)
  886. This is now an error. Instead, use array-fill!.
  887. ** `iota' in core and SRFI-1 `iota' are the same
  888. Previously, `iota' in core would not accept start and step arguments and
  889. would return an empty list for negative count. Now there is only one
  890. `iota' function with the extended semantics of SRFI-1. Note that as an
  891. incompatible change, core `iota' no longer accepts a negative count.
  892. ** Improved Transport Layer Security (TLS) support in (web client)
  893. `http-request', `http-get', and related procedures from (web client) are
  894. able to access content over TLS ("HTTPS") since Guile 2.2. However,
  895. that support lacked important facilities, which are now available.
  896. First, these procedures now have a #:verify-certificate? parameter to
  897. enable or disable the verification of X.509 server certificates. The
  898. new `x509-certificate-directory' SRFI-39 parameter specifies where X.509
  899. certificates are searched for. Second, HTTPS proxies are now supported
  900. (in addition to HTTP proxies) and the new `current-https-proxy'
  901. parameter controls that. See "Web Client" in the manual for details.
  902. * New deprecations
  903. ** scm_t_uint8, etc deprecated in favor of C99 stdint.h
  904. It used to be that Guile defined its own `scm_t_uint8' because C99
  905. `uint8_t' wasn't widely enough available. Now Guile finally made the
  906. change to use C99 types, both internally and in Guile's public headers.
  907. Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN
  908. and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t
  909. instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t,
  910. intptr_t, and uintptr_t.
  911. ** The two-argument form of `record-constructor'
  912. Calling `record-constructor' with two arguments (the record type and a
  913. list of field names) is deprecated. Instead, call with just one
  914. argument, and provide a wrapper around that constructor if needed.
  915. * Incompatible changes
  916. ** All deprecated code removed
  917. All code deprecated in Guile 2.2 has been removed. See older NEWS, and
  918. check that your programs can compile without linker warnings and run
  919. without runtime warnings. See "Deprecation" in the manual.
  920. In particular, the function `scm_generalized_vector_get_handle' which
  921. was deprecated in 2.0.9 but remained in 2.2, has now finally been
  922. removed. As a replacement, use `scm_array_get_handle' to get a handle
  923. and `scm_array_handle_rank' to check the rank.
  924. ** Remove "self" field from vtables and "redefined" field from classes
  925. These fields were used as part of the machinery for class redefinition
  926. and is no longer needed.
  927. ** VM hook manipulation simplified
  928. The low-level mechanism to instrument a running virtual machine for
  929. debugging and tracing has been simplified. See "VM Hooks" in the
  930. manual, for more.
  931. * Changes to the distribution
  932. ** New effective version
  933. The "effective version" of Guile is now 3.0, which allows parallel
  934. installation with other effective versions (for example, the older Guile
  935. 2.2). See "Parallel Installations" in the manual for full details.
  936. Notably, the `pkg-config' file is now `guile-3.0', and there are new
  937. `guile-3' and `guile-3.0' features for `cond-expand'.
  938. Changes in 2.2.6 (since 2.2.5):
  939. * Bug fixes
  940. ** Fix regression introduced in 2.2.5 that would break HTTP servers
  941. Guile 2.2.5 introduced a bug that would break the built-in HTTP server
  942. provided by the (web server) module. Specifically, HTTP servers would
  943. hang while reading requests. See <https://bugs.gnu.org/36350>.
  944. ** 'strftime' and 'strptime' honor the current locale encoding
  945. Until now these procedures would wrongfully assume that the locale
  946. encoding is always UTF-8. See <https://bugs.gnu.org/35920>.
  947. ** Re-export 'current-load-port'
  948. This procedure was erroneously removed in the 2.2 series but was still
  949. documented.
  950. ** Minor documentation mistakes were fixed
  951. Changes in 2.2.5 (since 2.2.4):
  952. * Notable improvements
  953. ** Greatly improved performance of bidirectional pipes.
  954. The performance of bidirectional pipes, as created using 'open-pipe' or
  955. 'open-pipe*' in OPEN_BOTH mode, has been greatly improved. When reading
  956. large blocks of binary data from a bidirectional pipe, the maximum
  957. bandwidth has been increased by a factor of ~10^3 in some cases.
  958. ** New 'get-bytevector-some!' I/O primitive.
  959. This new I/O primitive is similar to 'get-bytevector-some' from the
  960. R6RS, except that it writes its data to a user-specified range of
  961. indices in an existing bytevector. As a corollary, it is also now
  962. possible to specify a maximum number of bytes to read. Note that
  963. 'get-bytevector-some', and now 'get-bytevector-some!', are unique among
  964. Guile's I/O primitives in their support of efficient binary reads of
  965. potentially large blocks while also allowing for short reads, to avoid
  966. undesired blocking. Now these operations can be performed while also
  967. avoiding heap-allocation.
  968. 'get-bytevector-some!' is needed to efficiently implement the new
  969. bidirectional pipes, which are built upon R6RS custom binary
  970. input/output ports.
  971. ** get-bytevector-{n!,some,some!} now support suspendable I/O.
  972. Scheme implementations of 'get-bytevector-n!', 'get-bytevector-some',
  973. and 'get-bytevector-some!' have been added to (ice-9 suspendable-ports).
  974. As a result, these I/O operations now support suspendable I/O.
  975. * Compiler improvements
  976. ** guild compile: Add -Wshadowed-toplevel.
  977. Top-level definitions that shadow previous top-level definitions from
  978. the same compilation unit will now trigger a compile-time warning, if
  979. -Wshadowed-toplevel is enabled. It is enabled by default.
  980. ** guild compile: Add '-x' flag.
  981. Passing "-x EXT" to 'guild compile' will now cause EXT to be recognized
  982. as a valid source file name extension. For example, to compile R6RS
  983. code, you might want to pass "-x .sls" so that files ending in ".sls"
  984. can be found.
  985. * Miscellaneous improvements
  986. ** Bootstrap optimization
  987. eval.go and psyntax-pp.go are now built before the rest of the .go files
  988. so that they are processed by a fast macro expander. This saves time
  989. when using parallel builds.
  990. ** put-u8 now always writes a single byte, regardless of the port encoding.
  991. Previously, (put-u8 PORT OCTET) worked as expected only when writing to
  992. binary ports, i.e. those with port encoding "ISO-8859-1" a.k.a. Latin-1.
  993. Strictly speaking, this meets the requirements of the R6RS 'put-u8',
  994. which need only support binary ports. However, Guile in fact allows
  995. binary I/O to be performed on any port, and yet 'put-u8' behaved in a
  996. surprising way with other port encodings: it would perform a _textual_
  997. I/O operation, writing the character with Unicode scalar value OCTET.
  998. Now, 'put-u8' always writes a single byte with value OCTET, regardless
  999. of the port encoding.
  1000. ** Optimize fixnum exact integer square roots.
  1001. 'exact-integer-sqrt' now avoids heap allocation when applied to a
  1002. fixnum. 'sqrt' now avoids heap allocation when applied to a fixnum
  1003. that's a perfect square. Fewer heap allocations are now required when
  1004. applying 'sqrt' to a square of an exact rational whose numerator or
  1005. denominator are fixnums.
  1006. ** scm_mkstrport: Optimize the POS -> BYTE_POS conversion.
  1007. scm_mkstrport now avoids an unnecessary heap allocation and conversion
  1008. to UTF-8, when STR is provided and POS is non-zero.
  1009. ** SRFI-19: Support ~N in string->date.
  1010. Support for the ~N escape, which allows fractions of a second to be
  1011. parsed, is now supported in SRFI-19 'string->date'.
  1012. ** SRFI-19: Update the leap second table.
  1013. The leap on 1 January 2017 was added to SRFI-19's leap second table.
  1014. ** stexi->shtml: Add support for @i, @math, @tie and @dots.
  1015. stexi->shtml is now able to convert @i, @math, @tie and @dots to HTML.
  1016. ** Define AT_SYMLINK_NOFOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH.
  1017. AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH are now available
  1018. from Scheme, if supported on the platform.
  1019. ** Improvements to the 'time' macro from (ice-9 time).
  1020. The 'time' macro now supports expressions that return multiple values.
  1021. It has also been rewritten as a hygienic 'syntax-rules' macro.
  1022. Previously, it was built using 'define-macro', and was therefore
  1023. unhygienic. This is not merely an internal implementation detail, but
  1024. is potentially relevant to any user of the 'time' macro, since it could
  1025. lead to unintended variable capture and other problems.
  1026. ** Clarify the documentation for 'nil?'.
  1027. See commit b44f505f1571fc9c42e58982f161a9cfc81fb7f4.
  1028. ** Clarify the manual's "Processes" section.
  1029. See commit 8cdd3a0773930ca872a13aada7a1344f03bb382b.
  1030. ** Avoid 'with-latin1-locale' in binary I/O tests.
  1031. See commit 162a031e5f2c64cd23fcf069fb7b5071196f9527.
  1032. ** Update user-visible copyright years.
  1033. * Bug fixes
  1034. ** Avoid regexp ranges in HTTP inter-protocol exploitation check.
  1035. The regular expression used to check for HTTP inter-protocol
  1036. exploitation attacks previously used a character range '0-9', whose
  1037. meaning depends on the current locale. This has now been fixed.
  1038. ** Fixes to the SRFI-19 time/date library.
  1039. *** TAI-to-UTC conversion leaps at the wrong time.
  1040. <https://bugs.gnu.org/21911>
  1041. *** time-utc->date shows bogus zone-dependent leap second.
  1042. <https://bugs.gnu.org/22034>
  1043. *** Manual incorrectly describes Julian Date.
  1044. <https://bugs.gnu.org/21902>
  1045. *** date->string duff ISO 8601 negative years.
  1046. <https://bugs.gnu.org/21903>
  1047. *** date->string duff ISO 8601 format for non-4-digit years.
  1048. <https://bugs.gnu.org/21904>
  1049. *** julian-day->date negative input breakage.
  1050. <https://bugs.gnu.org/21906>
  1051. *** time-duration screws up negative durations.
  1052. <https://bugs.gnu.org/26162>
  1053. *** time-difference doesn't detect error of differing time types.
  1054. <https://bugs.gnu.org/26163>
  1055. ** Improve overflow checks in bytevector, string, and I/O operations.
  1056. Several numerical computations, performed using primitive C arithmetic
  1057. in Guile's core bytevector, string, and I/O operations, have been
  1058. rewritten to avoid overflows.
  1059. ** Fix type inferencing for 'nil?' and 'null?' predicates.
  1060. Previously, the compiler would sometimes miscompile certain combinations
  1061. of 'nil?' and 'null?' predicates present within the same top-level form.
  1062. See <https://bugs.gnu.org/33036>.
  1063. ** Fix 'atomic-box-compare-and-swap!'.
  1064. Previously, 'atomic-box-compare-and-swap!' would sometimes spuriously
  1065. fail on architectures based on Load-Linked/Store-Conditional (LL/SC)
  1066. synchronication primitives (e.g. ARM, PowerPC, and MIPS) in a way that
  1067. was undetectable by the caller. See <https://bugs.gnu.org/32786>.
  1068. ** Make URI handling locale independent.
  1069. Previously, procedures in (web uri) would misbehave in some locales
  1070. including sv_SE. See <https://bugs.gnu.org/35785>.
  1071. ** Strings, i18n: Limit the use of alloca to approximately 8 kilobytes.
  1072. Previously, 'string-locale-ci=?', 'string-locale-ci<?',
  1073. 'string-locale<?', 'string-locale-{downcase,upcase,titlecase}' and
  1074. 'string-normalize-{nfd,nfc,nfkd,nfkc}' would overflow the C stack when
  1075. applied to very large strings.
  1076. ** Fix documentation of R6RS 'binary-port?' to reflect reality.
  1077. Previously, the documentation incorrectly stated that 'binary-port?'
  1078. always returns #t. In fact, it returns #t if and only if the port
  1079. encoding is "ISO-8859-1". The documentation for 'binary-port?' and
  1080. 'textual-port?' has been rewritten to reflect the current reality, and
  1081. also to leave open the possibility of changing the behavior of these
  1082. predicates in a future version of Guile.
  1083. ** Avoid passing NULL to 'memcpy' and 'memcmp'.
  1084. Previously, NULL was sometimes passed to 'memcpy' or 'memcmp' when the
  1085. size argument was 0.
  1086. ** Save and restore errno in the signal handler.
  1087. Previously, Guile's synchronous C signal handler failed to save and
  1088. restore 'errno', although it might change its value. This could
  1089. potentially lead to spurious corruptions of 'errno' within threads
  1090. interrupted by signals.
  1091. ** scm_to_stringn: Avoid passing NULL to c_strcasecmp.
  1092. <https://lists.gnu.org/archive/html/guile-user/2019-05/msg00070.html>
  1093. ** r6rs-ports: Accept 'port-position' values greater than 2^32.
  1094. <https://bugs.gnu.org/32161>
  1095. ** r6rs-ports: 'put-bytevector' accepts 64-bit integers.
  1096. Fixed in commit 741c45458da0831a12a4f8d729814bf9f2cb6571.
  1097. ** Fix R6RS call-with-{input,output}-file to open textual ports.
  1098. <https://bugs.gnu.org/32329>
  1099. ** Update (ice-9 match) to include selected bug fixes from upstream.
  1100. *** ice-9/match named match-let is not working
  1101. <https://bugs.gnu.org/22925>
  1102. ** open-process: Fix dup(2) and execvp(2) error handling.
  1103. Fixed in commit 521f1ab4709217407496004019c00005d2a82f78.
  1104. ** bytevectors: Support large indices in integer accessors.
  1105. Fixed in commit b9cf3517efd4643670d970d2692bc7bede9a85e8.
  1106. ** bytevectors: Fix list validation of *list->bytevector procedures.
  1107. <https://bugs.gnu.org/32938>
  1108. ** Gracefully handle huge shift counts in 'ash' and 'round-ash'.
  1109. <https://bugs.gnu.org/32644>
  1110. ** In 'ash' and 'round-ash', handle right shift count of LONG_MIN.
  1111. <https://bugs.gnu.org/21901>
  1112. ** Use 'scm_from_utf8_{string,symbol,keyword}' for C string literals.
  1113. <https://bugs.gnu.org/33044>
  1114. ** web: Add support for HTTP header continuation lines.
  1115. Fixed in commit 73cde5ed7218a090ecee888870908af5445796f0.
  1116. ** scm_seed_to_random_state: Support wide string arguments.
  1117. <https://bugs.gnu.org/33044>
  1118. ** Do not warn the user when 'madvise' returns ENOSYS.
  1119. Fixed in commit 45e4ace6603e00b297e6542362273041aebe7305.
  1120. ** Add 'texinfo' as a dependency in the README.
  1121. Fixed in commit 1bbce71501198c3c7abdf07941f5cdc1434858c2.
  1122. ** Don't mutate read-only string in ports test.
  1123. Fixed in commit 552f007e91a97f136aad1b22918688b61d03a4a3.
  1124. ** Remove redefinition of when & unless in snarf-check-and-output-texi.
  1125. Fixed in commit 1ba5d6f47a54dceee4452a1e7726d2635e5b3449.
  1126. ** Fix strftime when Guile is built without threading support.
  1127. Fixed in commit 139c702fc8b61fdeb813c3428fef3701ea8677f9.
  1128. ** Avoid leaking a file descriptor in test-unwind.
  1129. Fixed in commit 1437b76777e576b3d000e2f80c5ecdb33a74ac33.
  1130. ** Fix binary output on files created by mkstemp!.
  1131. Fixed in commit 78468baa118d316050a27e43250966e52ffd3d54.
  1132. ** Fix crypt-on-glibc test error.
  1133. Fixed in commit 27ffbfb0235de466016ea5a6421508f6548971b6.
  1134. ** Fix race when expanding syntax-parameterize and define-syntax-parameter.
  1135. <https://bugs.gnu.org/27476#102>
  1136. ** Add a fallback value for the locale-monetary-decimal-point.
  1137. Fixed in commit 9ba449643d4c2ac1d2174befca7d765af222bcc0.
  1138. ** Handle newlib C library's langinfo constant names.
  1139. Fixed in commit 92105d13ad1363b511214589b7d62d95304beb17.
  1140. ** Make locale monetary conversion tests be less strict on terminal whitespace.
  1141. Fixed in commit 2a3ccfb66714efc1c081ea6e921336f80b756d3c.
  1142. ** Disable test for current value of setitimer on Cygwin.
  1143. Fixed in commit 3a64c504caaf83e9faf2ec9b7d0e031e1a6a09b9.
  1144. ** Fix gc.test "after-gc-hook gets called" failures.
  1145. <https://bugs.gnu.org/31776#17>
  1146. ** Update iconv.m4 from gnulib, to fix an iconv leak during configure.
  1147. <https://lists.gnu.org/archive/html/guile-devel/2019-05/msg00011.html>
  1148. ** guild compile: Add missing newline in "unrecognized option" error message.
  1149. Fixed in commit 85c5bae4fd94f8686d26fd792b7c0f588c23bd94.
  1150. ** 'basename' now correctly handles "/" and "//".
  1151. Fixed in commit 36ad1d24b3d2c174a64c445502a36f19605dbd65.
  1152. ** Make srfi-71 visible through 'cond-expand'.
  1153. Fixed in commit 59a06d8392234fbec8b3605cec266a7a0a7b7a56.
  1154. Changes in 2.2.4 (since 2.2.3):
  1155. * New interfaces and functionality
  1156. ** SRFI-71 (Extended LET-syntax for multiple values)
  1157. Guile now includes SRFI-71, which extends let, let*, and letrec to
  1158. support assigning multiple values. See "SRFI-71" in the manual for
  1159. details.
  1160. ** (web client) export 'http-request' procedure
  1161. The 'http-request' procedure is the generalized procedure underneath
  1162. 'http-get', 'http-post', etc.
  1163. ** GDB support now registers the 'guile-backtrace' GDB command
  1164. The 'guile-backtrace' GDB command displays a backtrace of the VM stack
  1165. for the current thread.
  1166. ** Recognize RISC-V compilation targets in (system base target)
  1167. * Bug fixes
  1168. ** Fix stack-marking bug affecting multi-threaded programs
  1169. (<https://bugs.gnu.org/28211>)
  1170. ** Add missing SYNC_IP calls in the VM
  1171. These could cause multi-threaded code to crash.
  1172. ** Fix multi-threaded access to modules
  1173. (<https://bugs.gnu.org/30602>, <https://bugs.gnu.org/31879>,
  1174. and <https://bugs.gnu.org/31878>)
  1175. ** (ice-9 match) now has better documentation
  1176. ** 'get-bytevector-n' and 'get-bytevector-n!' can now read more than 4 GB
  1177. ** Fix cross-compilation support for elisp
  1178. ** Fix error reporting in 'load-thunk-from-memory'
  1179. ** Fix GOOPS 'instance?' to work on objects that aren't structs
  1180. (<https://bugs.gnu.org/31606>)
  1181. ** Fix type inference for bitwise logical operators
  1182. (<https://bugs.gnu.org/31474>)
  1183. ** Avoid inexact arithmetic in the type inferrer for 'sqrt'
  1184. ** Fix floating point unboxing regression in 2.2.3
  1185. (<https://bugs.gnu.org/30020>)
  1186. ** Fix eta-conversion edge cases in peval (<https://bugs.gnu.org/29520>)
  1187. ** Correctly interpret SRFI-18 timeout parameters
  1188. (<https://bugs.gnu.org/29704>)
  1189. ** 'select' returns empty sets upon EINTR and EAGAIN
  1190. (<https://bugs.gnu.org/30368>)
  1191. ** Restore pre-2.2.3 '%fresh-auto-compile' behavior
  1192. This reverts an incorrect fix for <https://bugs.gnu.org/29226>.
  1193. Changes in 2.2.3 (since 2.2.2):
  1194. * New interfaces and functionality
  1195. ** (web uri) module has better support for RFC 3986
  1196. The URI standard, RFC 3986, defines additional "relative-ref" and
  1197. "URI-reference" data types. Thanks to Daniel Hartwig, Guile's support
  1198. for these URI subtypes has been improved. See "Universal Resource
  1199. Identifiers" in the manual, for more.
  1200. ** `struct-ref/unboxed' and `struct-set!/unboxed'
  1201. These procedures should be used when accessing struct fields with type
  1202. `u' (unboxed). See "Structure Basics" in the manual, for full details.
  1203. ** Improved support for arrays with non-zero lower bounds
  1204. Thanks to work by Daniel Llorens, Guile no longer exhibits buggy
  1205. behavior in "sort" or "sort!" on arrays with non-zero lower dimension
  1206. bounds. Arrays with non-zero lower dimension bounds are now allowed for
  1207. array-slice-for-each, and truncated-print now supports bitvectors and
  1208. arrays with non-zero lower bounds. General arrays are now supported as
  1209. well for random:hollow-sphere!.
  1210. ** Add `uintptr_t' and `intptr_t' to FFI types.
  1211. See "Foreign Types" in the manual for full details.
  1212. * Compiler improvements
  1213. ** Improve speed of compiler backend for functions without loops
  1214. This is a marginal speed improvement, especially for code compiled with
  1215. optimization level "-O1" or below.
  1216. ** Disable slot pre-coloring for optimization level "-O1" or below
  1217. This improves the speed of the compiler backend.
  1218. ** Improve complexity of constant subexpression elimination pass
  1219. This is a large speed improvement when compiling large files with the
  1220. default "-O2" pass.
  1221. ** CPS conversion avoids generating return arity adapters if possible
  1222. In Guile, the expression in (define a EXP) may return 1 or more values.
  1223. This value elision in "value" context is implicit earlier in the Guile
  1224. compiler, in Tree-IL, but is made explicit in the CPS middle-end
  1225. language by the addition of the equivalent of explicit call-with-values
  1226. continuations that ignore additional values. However in many cases we
  1227. can avoid generating these extra continuations if we know that EXP is
  1228. single-valued, as is the case for example for constants or variable
  1229. references or the like.
  1230. Although these "arity-adapting continuations" would be removed by dead
  1231. code elimination at optimization level "-O2" or above, they were still
  1232. being needlessly generated in the first place. Guile now avoids
  1233. generating them, speeding up not only the optimizer at -O2 but also the
  1234. entire compiler pipeline at -O1 or below, as well as improving the
  1235. residual code at -O1 or below.
  1236. * New deprecations
  1237. ** Using `uri?' as a predicate on relative-refs deprecated
  1238. If you don't care whether the URI is a relative-ref or not, use
  1239. `uri-reference?'. If you do, use `uri-reference?' and `relative-ref?'.
  1240. In the future `uri?' will return a true value only for URIs that specify
  1241. a scheme.
  1242. ** Struct tail arrays deprecated
  1243. Guile's structures used to have a facility whereby each instance of a
  1244. vtable can contain a variable-length tail array of values. The length
  1245. of the tail array was stored in the structure. This facility was
  1246. originally intended to allow C code to expose raw C structures with
  1247. word-sized tail arrays to Scheme.
  1248. However, the tail array facility was confusing and doesn't work very
  1249. well. It was very rarely used, but it insinuates itself into all
  1250. invocations of `make-struct'. For this reason the clumsily-named
  1251. `make-struct/no-tail' procedure can actually be more elegant in actual
  1252. use, because it doesn't have a random `0' argument stuck in the middle.
  1253. Tail arrays also inhibit optimization by allowing instances to affect
  1254. their shapes. In the absence of tail arrays, all instances of a given
  1255. vtable have the same number and kinds of fields. This uniformity can be
  1256. exploited by the runtime and the optimizer. The presence of tail arrays
  1257. make some of these optimizations more difficult.
  1258. Finally, the tail array facility is ad-hoc and does not compose with the
  1259. rest of Guile. If a Guile user wants an array with user-specified
  1260. length, it's best to use a vector. It is more clear in the code, and
  1261. the standard optimization techniques will do a good job with it.
  1262. For all of these reasons, tail arrays are deprecated in Guile 2.2 and
  1263. will be removed from Guile 3.0. Likewise, `make-struct' /
  1264. `scm_make_struct' is deprecated in favor of `make-struct/no-tail' /
  1265. `scm_make_struct_no_tail'. Perhaps one day we will be able to reclaim
  1266. the `make-struct' name!
  1267. ** Struct "self" slots deprecated
  1268. It used to be that you could make a structure vtable that had "self"
  1269. slots. Instances of that vtable would have those slots initialized to
  1270. the instance itself. This can be useful in C code where you might have
  1271. a pointer to the data array, and want to get the `SCM' handle for the
  1272. structure. However this was a little used complication without any use
  1273. in Scheme code. To replace it, just use "p" slots and initialize the
  1274. slot values manually on initialization.
  1275. ** Struct fields with opaque ("o") protection deprecated
  1276. Struct fields are declared with a "protection", meaning read-only ('r'),
  1277. read-write ('w'), or opaque ('o'). There is also "hidden" ('h') which
  1278. is read-write but which isn't initialized by arguments passed to
  1279. `make-struct/no-tail', but that's a detail. Opaque struct fields were
  1280. used to allocate storage in a struct that could only be accessed by C.
  1281. This facility was very rarely used (unused in Guile itself) but now that
  1282. we are implementing more and more in Scheme, it is completely useless.
  1283. To enforce permissions on struct fields, instead layer on an abstraction
  1284. at a higher level, in the same way that immutable record fields are
  1285. simply those which don't have an accessor.
  1286. ** Using `struct-ref' and `struct-set!' on unboxed fields is deprecated
  1287. Use the new `struct-ref/unboxed' and `struct-set!/unboxed' instead.
  1288. * Bug fixes
  1289. ** guile.m4 now checks for Guile 2.2 by default
  1290. Before, it was still preferring Guile 2.0. It now also supports the
  1291. Guile 3.0 prereleases.
  1292. ** Fix setting breakpoints from the REPL
  1293. ** Allow GDB support to be used with GDB linked against Guile 2.0.
  1294. ** Fix deadlock in `readdir' on error.
  1295. ** Fix crash on ia64 during thread switches.
  1296. ** Fix bug inferring range of `logand' computations with negative numbers
  1297. ** Fix bug when issuing HTTP requests through proxies.
  1298. ** Refactor weak hash table implementation to be more robust
  1299. Guile 2.2's weak hash table implementation had three big problems. The
  1300. first was a bug causing these tables to leak memory when they would be
  1301. resized. The second was that the implementation was designed so that
  1302. tables should be visited by the mark phase of the garbage collector in
  1303. one big piece. This could cause the garbage collector to see too many
  1304. newly marked objects at once, causing inefficies in garbage collection.
  1305. Finally, the way in which lost weak references were ultimately removed
  1306. from weak tables caused a race between the finalizer threads and the
  1307. mutator threads, leading to unbounded excess space retention in
  1308. pathological cases. All of this problems have been fixed.
  1309. ** Allow garbage collection of revealed file ports
  1310. Guile can mark a file port as "revealed" if Scheme has been given access
  1311. to the file descriptor. In that case, the file descriptor will not be
  1312. closed when the port is garbage-collected. However we had a bug that
  1313. for revealed ports prevented the port from ever being garbage-collected,
  1314. leading to memory leaks of Guile's internal port buffers. This is now
  1315. fixed.
  1316. ** Fix put-bytevector, unget-bytevector with start == bytevector length
  1317. ** Enable GNU Readline 7.0's support for "bracketed paste".
  1318. Before, when pasting an expression that contained TAB characters into
  1319. Guile's REPL with GNU Readline support enabled, the pasted TAB
  1320. characters would trigger autocompletion in Readline. This was never
  1321. what you wanted. Guile now sets the new "bracketed-paste" option in GNU
  1322. Readline 7.0 to on by default, making readline treat pastes into the
  1323. terminal as atomic units without control characters. See "Readline
  1324. Options" in the manual for full details.
  1325. ** Fix time-monotonic from SRFI-19; broken in 2.2.1.
  1326. Changes in 2.2.2 (since 2.2.1):
  1327. * Bug fixes
  1328. ** Syntax objects are once more comparable with 'equal?'
  1329. The syntax object change in 2.2.1 had the unintended effect of making
  1330. syntax objects no longer comparable with equal?. This release restores
  1331. the previous behavior.
  1332. ** Restore libgc dependency
  1333. The change to throw exceptions when mutating literal constants partly
  1334. relied on an interface that was added to our garbage collector (BDW-GC)
  1335. after its 7.2 release. Guile 2.2.2 adds a workaround to allow Guile to
  1336. continue be used with libgc as old as 7.2.
  1337. ** SRFI-37 bug fix to not error on empty-string arguments.
  1338. Thanks to Thomas Danckaert for fixing this long-standing bug.
  1339. Changes in 2.2.1 (since 2.2.0):
  1340. * Notable changes
  1341. ** New sandboxed evaluation facility
  1342. Guile now has a way to execute untrusted code in a safe way. See
  1343. "Sandboxed Evaluation" in the manual for full details, including some
  1344. important notes on limitations on the sandbox's ability to prevent
  1345. resource exhaustion.
  1346. ** All literal constants are read-only
  1347. According to the Scheme language definition, it is an error to attempt
  1348. to mutate a "constant literal". A constant literal is data that is a
  1349. literal quoted part of a program. For example, all of these are errors:
  1350. (set-car! '(1 . 2) 42)
  1351. (append! '(1 2 3) '(4 5 6))
  1352. (vector-set! '#(a b c) 1 'B)
  1353. Guile takes advantage of this provision of Scheme to deduplicate shared
  1354. structure in constant literals within a compilation unit, and to
  1355. allocate constant data directly in the compiled object file. If the
  1356. data needs no relocation at run-time, as is the case for pairs or
  1357. vectors that only contain immediate values, then the data can actually
  1358. be shared between different Guile processes, using the operating
  1359. system's virtual memory facilities.
  1360. However, in Guile 2.2.0, constants that needed relocation were actually
  1361. mutable -- though (vector-set! '#(a b c) 1 'B) was an error, Guile
  1362. wouldn't actually cause an exception to be raised, silently allowing the
  1363. mutation. This could affect future users of this constant, or indeed of
  1364. any constant in the compilation unit that shared structure with the
  1365. original vector.
  1366. Additionally, attempting to mutate constant literals mapped in the
  1367. read-only section of files would actually cause a segmentation fault, as
  1368. the operating system prohibits writes to read-only memory. "Don't do
  1369. that" isn't a very nice solution :)
  1370. Both of these problems have been fixed. Any attempt to mutate a
  1371. constant literal will now raise an exception, whether the constant needs
  1372. relocation or not.
  1373. ** Syntax objects are now a distinct type
  1374. It used to be that syntax objects were represented as a tagged vector.
  1375. These values could be forged by users to break scoping abstractions,
  1376. preventing the implementation of sandboxing facilities in Guile. We are
  1377. as embarrassed about the previous situation as we pleased are about the
  1378. fact that we've fixed it.
  1379. Unfortunately, during the 2.2 stable series (or at least during part of
  1380. it), we need to support files compiled with Guile 2.2.0. These files
  1381. may contain macros that contain legacy syntax object constants. See the
  1382. discussion of "allow-legacy-syntax-objects?" in "Syntax Transformer
  1383. Helpers" in the manual for full details.
  1384. * Bug fixes
  1385. *** Fix snarfing with -ggdb3 (#25803)
  1386. *** Fix spurious snarf warnings for net_db.c
  1387. *** Output statprof flat display to correct port
  1388. *** Document guile-2.2 cond-expand feature
  1389. *** Add --with-bdw-gc for BSDs that use bdw-gc-threaded (see README)
  1390. *** Documentation typo fixes (#26188)
  1391. *** Fix SRFI-9 date->string bugs with ~N and ~F (#26261, #26260, #26259)
  1392. *** SRFI-19 current-time-monotonic returns time of right type (#26329)
  1393. *** Avoid causing GC when looking up exception handler
  1394. *** Increment objcode version, in a compatible way
  1395. *** Fix compile warning in (system base types)
  1396. *** Only run tests that require fork if it is provided
  1397. *** Speed up procedure-minimum-arity for fixed arity
  1398. *** REPL server tests catch ECONNABORTED
  1399. *** Avoid deprecated argument to setvbuf in (web client)
  1400. *** Remove non-existent 'open-connection-for-uri' export from (web client)
  1401. Changes in 2.2.0 (changes since the 2.0.x stable release series):
  1402. * Notable changes
  1403. ** Speed
  1404. The biggest change in Guile 2.2 is a complete rewrite of its virtual
  1405. machine and compiler internals. The result is faster startup time,
  1406. better memory usage, and faster execution of user code. See the
  1407. "Performance improvements" section below for more details.
  1408. ** Better thread-safety
  1409. This new release series takes the ABI-break opportunity to fix some
  1410. interfaces that were difficult to use correctly from multiple threads.
  1411. Notably, weak hash tables and ports are now transparently thread-safe.
  1412. See "Scheduling" in the manual, for updated documentation on threads and
  1413. communications primitives.
  1414. ** Better space-safety
  1415. It used to be the case that, when calling a Scheme procedure, the
  1416. procedure and arguments were always preserved against garbage
  1417. collection. This is no longer the case; Guile is free to collect the
  1418. procedure and arguments if they become unreachable, or to re-use their
  1419. slots for other local variables. Guile still offers good-quality
  1420. backtraces by determining the procedure being called from the
  1421. instruction pointer instead of from the value in slot 0 of an
  1422. application frame, and by using a live variable map that allows the
  1423. debugger to know which locals are live at all points in a frame.
  1424. ** Off-main-thread finalization
  1425. Following Guile 2.0.6's change to invoke finalizers via asyncs, Guile
  1426. 2.2 takes the additional step of invoking finalizers from a dedicated
  1427. finalizer thread, if threads are enabled. This avoids concurrency
  1428. issues between finalizers and application code, and also speeds up
  1429. finalization. If your application's finalizers are not robust to the
  1430. presence of threads, see "Foreign Objects" in the manual for information
  1431. on how to disable automatic finalization and instead run finalizers
  1432. manually.
  1433. ** Better locale support in Guile scripts
  1434. When Guile is invoked directly, either from the command line or via a
  1435. hash-bang line (e.g. "#!/usr/bin/guile"), it now installs the current
  1436. locale via a call to `(setlocale LC_ALL "")'. For users with a unicode
  1437. locale, this makes all ports unicode-capable by default, without the
  1438. need to call `setlocale' in your program. This behavior may be
  1439. controlled via the GUILE_INSTALL_LOCALE environment variable; see
  1440. "Environment Variables" in the manual, for more.
  1441. ** Complete Emacs-compatible Elisp implementation
  1442. Thanks to the work of Robin Templeton, Guile's Elisp implementation is
  1443. now fully Emacs-compatible, implementing all of Elisp's features and
  1444. quirks in the same way as the editor we know and love.
  1445. ** Dynamically expandable stacks
  1446. Instead of allocating fixed stack sizes for running Scheme code, Guile
  1447. now starts off each thread with only one page of stack, and expands and
  1448. shrinks it dynamically as needed. Guile will throw an exception for
  1449. stack overflows if growing the stack fails. It is also possible to
  1450. impose a stack limit during the extent of a function call. See "Stack
  1451. Overflow" in the manual, for more.
  1452. This change allows users to write programs that use the stack as a data
  1453. structure for pending computations, as it was meant to be, without
  1454. reifying that data out to the heap. Where you would previously make a
  1455. loop that collect its results in reverse order only to re-reverse them
  1456. at the end, now you can just recurse without worrying about stack
  1457. overflows.
  1458. Using the stack also allows more code to be continuation-safe. For
  1459. example, returning multiple times from a `map' procedure in Guile 2.0
  1460. would change the value of previously returned result lists, because
  1461. `map' built its result list in reverse order then used `reverse!' to
  1462. return the proper result. Now in Guile 2.2, `map' is implemented using
  1463. straightforward recursion, which eliminates this bug while maintaining
  1464. good performance as well as good space complexity.
  1465. ** Out-of-memory improvements
  1466. Instead of aborting, failures to allocate memory will now raise an
  1467. unwind-only `out-of-memory' exception, and cause the corresponding
  1468. `catch' expression to run garbage collection in order to free up memory.
  1469. ** GOOPS core reimplemented in Scheme
  1470. Guile's object orientation system, GOOPS, has been mostly reimplemented
  1471. in Scheme. This decreases its maintenance burden on the rest of Guile,
  1472. while also makes it possible to implement new features in the future,
  1473. such as method combinations or `eqv?' specializers.
  1474. ** Better handling of GUILE_LOAD_COMPILED_PATH
  1475. It used to be that Guile would stop at the first .go file it found in
  1476. the GUILE_LOAD_COMPILED_PATH. If that file turned out to be out of
  1477. date, then no .go file would be loaded. Now Guile will continue to
  1478. search the path for a file which is both present and up-to-date, with
  1479. respect to the .scm file.
  1480. ** C99 required
  1481. Following Emacs, you must use a C99-capable compiler when building
  1482. Guile. In the future we also expect require C99 to use Guile's C
  1483. interface, at least for `stdint' support.
  1484. ** Lightweight pre-emptive threading primitives
  1485. The compiler now inserts special "handle-interrupts" opcodes before each
  1486. call, return, and backwards jump target. This allows the user to
  1487. interrupt any computation and to accurately profile code using
  1488. interrupts. It used to be that interrupts were run by calling a C
  1489. function from the VM; now interrupt thunks are run directly from the VM.
  1490. This allows interrupts to save a delimited continuation and, if the
  1491. continuation was established from the same VM invocation (the usual
  1492. restriction), that continuation can then be resumed. In this way users
  1493. can implement lightweight pre-emptive threading facilities.
  1494. ** with-dynamic-state in VM
  1495. Similarly, `with-dynamic-state' no longer recurses out of the VM,
  1496. allowing captured delimited continuations that include a
  1497. `with-dynamic-state' invocation to be resumed. This is a precondition
  1498. to allow lightweight threading libraries to establish a dynamic state
  1499. per lightweight fiber.
  1500. * Performance improvements
  1501. ** Faster programs via new virtual machine
  1502. Guile now compiles programs to instructions for a new virtual machine.
  1503. The new virtual machine's instructions can address their source and
  1504. destination operands by "name" (slot). This makes access to named
  1505. temporary values much faster than in Guile 2.0, and removes a lot of
  1506. value-shuffling that the old virtual machine had to do. The end result
  1507. is that loop-heavy code can be two or three times as fast with Guile 2.2
  1508. as in 2.0. Your mileage may vary, of course; see "A Virtual Machine for
  1509. Guile" in the manual for the nitties and the gritties.
  1510. ** Better startup time, memory usage with ELF object file format
  1511. Guile now uses the standard ELF format for its compiled code. (Guile
  1512. has its own loader and linker, so this does not imply a dependency on
  1513. any particular platform's ELF toolchain.) The benefit is that Guile is
  1514. now able to statically allocate more data in the object files. ELF also
  1515. enables more sharing of data between processes, and decreases startup
  1516. time (about 40% faster than the already fast startup of the Guile 2.0
  1517. series). Guile also uses DWARF for some of its debugging information.
  1518. Much of the debugging information can be stripped from the object files
  1519. as well. See "Object File Format" in the manual, for full details.
  1520. ** Better optimizations via compiler rewrite
  1521. Guile's compiler now uses a Continuation-Passing Style (CPS)
  1522. intermediate language, allowing it to reason easily about temporary
  1523. values and control flow. Examples of optimizations that this permits
  1524. are optimal contification, optimal common subexpression elimination,
  1525. dead code elimination, loop-invariant code motion, loop peeling, loop
  1526. inversion, parallel moves with at most one temporary, allocation of
  1527. stack slots using precise liveness information, unboxing of 64-bit
  1528. integers and floating point values, and closure optimization. For more,
  1529. see "Continuation-Passing Style" in the manual.
  1530. ** Faster interpreter
  1531. Combined with a number of optimizations to the interpreter itself,
  1532. simply compiling `eval.scm' with the new compiler yields an interpreter
  1533. that is consistently two or three times faster than the one in Guile
  1534. 2.0.
  1535. ** Allocation-free dynamic stack
  1536. Guile now implements the dynamic stack with an actual stack instead of a
  1537. list of heap objects, avoiding most allocation. This speeds up prompts,
  1538. the `scm_dynwind_*' family of functions, fluids, and `dynamic-wind'.
  1539. ** Optimized UTF-8 and Latin-1 ports, symbols, and strings
  1540. Guile 2.2 is faster at reading and writing UTF-8 and Latin-1 strings
  1541. from ports, and at converting symbols and strings to and from these
  1542. encodings.
  1543. ** Optimized hash functions
  1544. Guile 2.2 now uses Bob Jenkins' `hashword2' (from his `lookup3.c') for
  1545. its string hash, and Thomas Wang's integer hash function for `hashq' and
  1546. `hashv'. These functions produce much better hash values across all
  1547. available fixnum bits.
  1548. ** Optimized generic array facility
  1549. Thanks to work by Daniel Llorens, the generic array facility is much
  1550. faster now, as it is internally better able to dispatch on the type of
  1551. the underlying backing store.
  1552. ** All ports are now buffered, can be targets of `setvbuf'
  1553. See "Buffering" in the manual, for more. A port with a buffer size of 1
  1554. is equivalent to an unbuffered port. Ports may set their default buffer
  1555. sizes, and some ports (for example soft ports) are unbuffered by default
  1556. for historical reasons.
  1557. ** Mutexes are now faster under contention
  1558. Guile implements its own mutexes, so that threads that are trying to
  1559. acquire a mutex can be interrupted. These mutexes used to be quite
  1560. inefficient when many threads were trying to acquire them, causing many
  1561. spurious wakeups and contention. This has been fixed.
  1562. * New interfaces
  1563. ** New `cond-expand' feature: `guile-2.2'
  1564. Use this feature if you need to check for Guile 2.2 from Scheme code.
  1565. ** New predicate: `nil?'
  1566. See "Nil" in the manual.
  1567. ** New compiler modules
  1568. Since the compiler was rewritten, there are new modules for the back-end
  1569. of the compiler and the low-level loader and introspection interfaces.
  1570. See the "Guile Implementation" chapter in the manual for all details.
  1571. ** Add "tree" display mode for statprof.
  1572. See the newly updated "Statprof" section of the manual, for more.
  1573. ** Support for non-blocking I/O
  1574. See "Non-Blocking I/O" in the manual, for more.
  1575. ** Implement R6RS custom binary input/output ports
  1576. See "Custom Ports" in the manual.
  1577. ** Implement R6RS output-buffer-mode
  1578. ** Implement R6RS bytevector->string, string->bytevector
  1579. See "R6RS Transcoders" in the manual.
  1580. ** `accept' now takes optional flags argument
  1581. These flags can include `SOCK_NONBLOCK' and `SOCK_CLOEXEC', indicating
  1582. options to apply to the returned socket, potentially removing the need
  1583. for additional system calls to set these options. See "Network Sockets
  1584. and Communication" in the manual, for more.
  1585. ** Thread-safe atomic boxes (references)
  1586. See "Atomics" in the manual.
  1587. ** Thread-local fluids
  1588. Guile now has support for fluids whose values are not captured by
  1589. `current-dynamic-state' and not inherited by child threads, and thus
  1590. are local to the kernel thread they run on. See "Thread-Local
  1591. Variables" in the manual, for more.
  1592. ** suspendable-continuation?
  1593. This predicate returns true if the delimited continuation captured by
  1594. aborting to a prompt would be able to be resumed. See "Prompt
  1595. Primitives" in the manual for more.
  1596. ** scm_c_prepare_to_wait_on_fd, scm_c_prepare_to_wait_on_cond,
  1597. ** scm_c_wait_finished
  1598. See "Asyncs" in the manual for more.
  1599. ** File descriptor finalizers
  1600. See "Ports and File Descriptors" in the manual.
  1601. ** New inline functions: `scm_new_smob', `scm_new_double_smob'
  1602. These can replace many uses of SCM_NEWSMOB, SCM_RETURN_NEWSMOB2, and the
  1603. like. See XXX in the manual, for more.
  1604. ** New low-level type accessors
  1605. For more on `SCM_HAS_TYP7', `SCM_HAS_TYP7S', `SCM_HAS_TYP16', see XXX.
  1606. `SCM_HEAP_OBJECT_P' is now an alias for the inscrutable `SCM_NIMP'.
  1607. `SCM_UNPACK_POINTER' and `SCM_PACK_POINTER' are better-named versions of
  1608. the old `SCM2PTR' and `PTR2SCM'. Also, `SCM_UNPACK_POINTER' yields a
  1609. void*.
  1610. ** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system
  1611. ** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars'
  1612. Use these instead of `scm_lfwrite'. See the new "Using Ports from C"
  1613. section of the manual, for more.
  1614. ** <standard-vtable>, standard-vtable-fields
  1615. See "Structures" in the manual for more on these.
  1616. ** Convenience utilities for ports and strings.
  1617. See "Conversion to/from C" for more on `scm_from_port_string',
  1618. `scm_from_port_stringn', `scm_to_port_string', and
  1619. `scm_to_port_stringn'.
  1620. ** New expressive PEG parser
  1621. See "PEG Parsing" in the manual for more. Thanks to Michael Lucy for
  1622. originally writing these, and to Noah Lavine for integration work.
  1623. ** `make-stack' now also works on delimited continuations
  1624. ** Better URI-reference support
  1625. The `(web uri)' module now has interfaces for handling URI references,
  1626. which might not have a scheme. The Location header of a web request or
  1627. response is now a URI reference instead of a URI. Also,
  1628. `request-absolute-uri' now has an optional default scheme argument. See
  1629. "Web" in the manual for full details.
  1630. ** formal-name->char, char->formal-name
  1631. See "Characters", in the manual.
  1632. * Incompatible changes
  1633. ** ASCII is not ISO-8859-1
  1634. In Guile 2.0, if a user set "ASCII" or "ANSI_X3.4-1968" as the encoding
  1635. of a port, Guile would treat it as ISO-8859-1. While these encodings
  1636. are the same for codepoints 0 to 127, ASCII does not extend past that
  1637. range, whereas ISO-8859-1 goes up to 255. Guile 2.2 no longer treats
  1638. ASCII as ISO-8859-1. This is likely to be a problem only if the user's
  1639. locale is set to ASCII, and the user or a program writes non-ASCII
  1640. codepoints to a port.
  1641. ** Decoding errors do not advance the read pointer before erroring
  1642. When the user sets a port's conversion strategy to "error", indicating
  1643. that Guile should throw an error if it tries to read from a port whose
  1644. incoming bytes are not valid for the port's encoding, it used to be that
  1645. Guile would advance the read pointer past the bad bytes, and then throw
  1646. an error. This would allow the following `read-char' invocation to
  1647. proceed after the bad bytes. This behavior is incompatible with the
  1648. final R6RS standard, and besides contravenes the user's intention to
  1649. raise an error on bad input. Guile now raises an error without
  1650. advancing the read pointer. To skip over a bad encoding, set the port
  1651. conversion strategy to "substitute" and read a substitute character.
  1652. ** Decoding errors with `substitute' strategy return U+FFFD
  1653. It used to be that decoding errors with the `substitute' conversion
  1654. strategy would replace the bad bytes with a `?' character. This has
  1655. been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in
  1656. accordance with the Unicode recommendations.
  1657. ** API to define new port types from C has changed
  1658. Guile's ports have been completely overhauled to allow Guile developers
  1659. and eventually Guile users to write low-level input and output routines
  1660. in Scheme. The new internals will eventually allow for user-space
  1661. tasklets or green threads that suspend to a scheduler when they would
  1662. cause blocking I/O, allowing users to write straightforward network
  1663. services that parse their input and send their output as if it were
  1664. blocking, while under the hood Guile can multiplex many active
  1665. connections at once.
  1666. At the same time, this change makes Guile's ports implementation much
  1667. more maintainable, rationalizing the many legacy port internals and
  1668. making sure that the abstractions between the user, Guile's core ports
  1669. facility, and the port implementations result in a system that is as
  1670. performant and expressive as possible.
  1671. The interface to the user has no significant change, neither on the C
  1672. side nor on the Scheme side. However this refactoring has changed the
  1673. interface to the port implementor in an incompatible way. See the newly
  1674. expanded "I/O Extensions" in the manual, for full details.
  1675. *** Remove `scm_set_port_mark'
  1676. Port mark functions have not been called since the switch to the BDW
  1677. garbage collector.
  1678. *** Remove `scm_set_port_equalp'
  1679. Likewise port equal functions weren't being called. Given that ports
  1680. have their own internal buffers, it doesn't make sense to hook them into
  1681. equal? anyway.
  1682. *** Remove `scm_set_port_free'
  1683. It used to be that if an open port became unreachable, a special "free"
  1684. function would be called instead of the "close" function. Now that the
  1685. BDW-GC collector allows us to run arbitrary code in finalizers, we can
  1686. simplify to just call "close" on the port and remove the separate free
  1687. functions. Note that hooking into the garbage collector has some
  1688. overhead. For that reason Guile exposes a new interface,
  1689. `scm_set_port_needs_close_on_gc', allowing port implementations to
  1690. indicate to Guile whether they need closing on GC or not.
  1691. *** Remove `scm_set_port_end_input', `scm_set_port_flush'
  1692. As buffering is handled by Guile itself, these functions which were to
  1693. manage an implementation-side buffer are no longer needed.
  1694. *** Change prototype of `scm_make_port_type'
  1695. The `read' (renamed from `fill_input') and `write' functions now operate
  1696. on bytevectors. Also the `mode_bits' argument now implicitly includes
  1697. SCM_OPN, so you don't need to include these.
  1698. *** Change prototype of port `close' function
  1699. The port close function now returns void.
  1700. *** Port and port type data structures are now opaque
  1701. Port type implementations should now use API to access port state.
  1702. However, since the change to handle port buffering centrally, port type
  1703. implementations rarely need to access unrelated port state.
  1704. *** Port types are now `scm_t_port_type*', not a tc16 value
  1705. `scm_make_port_type' now returns an opaque pointer, not a tc16.
  1706. Relatedly, the limitation that there only be 256 port types has been
  1707. lifted.
  1708. ** String ports default to UTF-8
  1709. Guile 2.0 would use the `%default-port-encoding' when creating string
  1710. ports. This resulted in ports that could only accept a subset of valid
  1711. characters, which was surprising to users. Now string ports default to
  1712. the UTF-8 encoding. Sneaky users can still play encoding conversion
  1713. games with string ports by explicitly setting the encoding of a port
  1714. after it is open. See "Ports" in the manual for more.
  1715. ** `scm_from_stringn' and `scm_to_stringn' encoding arguments are never NULL
  1716. These functions now require a valid `encoding' argument, and will abort
  1717. if given `NULL'.
  1718. ** All r6rs ports are both textual and binary
  1719. Because R6RS ports are a thin layer on top of Guile's ports, and Guile's
  1720. ports are both textual and binary, Guile's R6RS ports are also both
  1721. textual and binary, and thus both kinds have port transcoders. This is
  1722. an incompatibility with respect to R6RS.
  1723. ** Threading facilities moved to (ice-9 threads)
  1724. It used to be that call-with-new-thread and other threading primitives
  1725. were available in the default environment. This is no longer the case;
  1726. they have been moved to (ice-9 threads) instead. Existing code will not
  1727. break, however; we used the deprecation facility to signal a warning
  1728. message while also providing these bindings in the root environment for
  1729. the duration of the 2.2 series.
  1730. ** cancel-thread uses asynchronous interrupts, not pthread_cancel
  1731. See "Asyncs" in the manual, for more on asynchronous interrupts.
  1732. ** SRFI-18 threads, mutexes, cond vars disjoint from Guile
  1733. When we added support for the SRFI-18 threading library in Guile 2.0, we
  1734. did so in a way that made SRFI-18 mutexes the same as Guile mutexes.
  1735. This was a mistake. In Guile our goal is to provide basic,
  1736. well-thought-out, well-implemented, minimal primitives, on top of which
  1737. we can build a variety of opinionated frameworks. Incorporating SRFI-18
  1738. functionality into core Guile caused us to bloat and slow down our core
  1739. threading primitives. Worse, they became very hard to describe; they
  1740. did many things, did them poorly, and all that they did was never
  1741. adequately specified.
  1742. For all of these reasons we have returned to a situation where SRFI-18
  1743. concepts are implemented only in the `(srfi srfi-18)' module. This
  1744. means that SRFI-18 threads are built on Guile threads, but aren't the
  1745. same as Guile threads; calling Guile `thread?' on a thread no longer
  1746. returns true.
  1747. We realize this causes inconvenience to users who use both Guile
  1748. threading interfaces and SRFI-18 interfaces, and we lament the change --
  1749. but we are better off now. We hope the newly revised "Scheduling"
  1750. section in the manual compensates for the headache.
  1751. ** Remove `lock-mutex' "owner" argument
  1752. Mutex owners are a SRFI-18 concept; use SRFI-18 mutexes instead.
  1753. Relatedly, `scm_lock_mutex_timed' taking the owner argument is now
  1754. deprecated; use `scm_timed_lock_mutex' instead.
  1755. ** Remove `unlock-mutex' cond var and timeout arguments
  1756. It used to be that `unlock-mutex' included `wait-condition-variable'
  1757. functionality. This has been deprecated; use SRFI-18 if you want this
  1758. behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed' is
  1759. deprecated; use `scm_unlock_mutex' instead.
  1760. ** Removed `unchecked-unlock' mutex flag
  1761. This flag was introduced for internal use by SRFI-18; use SRFI-18
  1762. mutexes if you need this behavior.
  1763. ** SRFI-18 mutexes no longer recursive
  1764. Contrary to specification, SRFI-18 mutexes in Guile were recursive.
  1765. This is no longer the case.
  1766. ** Thread cleanup handlers removed
  1767. The `set-thread-cleanup!' and `thread-cleanup' functions that were added
  1768. in Guile 2.0 to support cleanup after thread cancellation are no longer
  1769. needed, since threads can declare cleanup handlers via `dynamic-wind'.
  1770. ** Only threads created by Guile are joinable
  1771. `join-thread' used to work on "foreign" threads that were not created by
  1772. Guile itself, though their join value was always `#f'. This is no
  1773. longer the case; attempting to join a foreign thread will throw an
  1774. error.
  1775. ** Dynamic states capture values, not locations
  1776. Dynamic states used to capture the locations of fluid-value
  1777. associations. Capturing the current dynamic state then setting a fluid
  1778. would result in a mutation of that captured state. Now capturing a
  1779. dynamic state simply captures the current values, and calling
  1780. `with-dynamic-state' copies those values into the Guile virtual machine
  1781. instead of aliasing them in a way that could allow them to be mutated in
  1782. place. This change allows Guile's fluid variables to be thread-safe.
  1783. To capture the locations of a dynamic state, capture a
  1784. `with-dynamic-state' invocation using partial continuations instead.
  1785. ** Remove `frame-procedure'
  1786. Several optimizations in Guile make `frame-procedure' an interface that
  1787. we can no longer support. For background, `frame-procedure' used to
  1788. return the value at slot 0 in a frame, which usually corresponds to the
  1789. SCM value of the procedure being applied. However it could be that this
  1790. slot is re-used for some other value, because the closure was not needed
  1791. in the function. Such a re-use might even be for an untagged value, in
  1792. which case treating slot 0 as a SCM value is quite dangerous. It's also
  1793. possible that so-called "well-known" closures (closures whose callers
  1794. are all known) are optimized in such a way that slot 0 is not a
  1795. procedure but some optimized representation of the procedure's free
  1796. variables. Instead, developers building debugging tools that would like
  1797. access to `frame-procedure' are invited to look at the source for the
  1798. `(system vm frame)' module for alternate interfaces, including the new
  1799. `frame-procedure-name'.
  1800. ** Remove `,procedure' REPL command
  1801. Not all procedures have values, so it doesn't make sense to expose this
  1802. interface to the user. Instead, the `,locals' REPL command will include
  1803. the callee, if it is live.
  1804. ** Remove `frame-local-ref', `frame-local-set!', `frame-num-locals'
  1805. These procedures reference values in a frame on the stack. Since we now
  1806. have unboxed values of different kinds, it is now necessary to specify
  1807. the type when reference locals, and once this incompatible change needs
  1808. to be made, we might as well make these interfaces private. See
  1809. "Frames' in the manual, for more information on the replacements for
  1810. these low-level interfaces.
  1811. ** Vtable hierarchy changes
  1812. In an attempt to make Guile's structure and record types integrate
  1813. better with GOOPS by unifying the vtable hierarchy, `make-vtable-vtable'
  1814. is now deprecated. Instead, users should just use `make-vtable' with
  1815. appropriate arguments. See "Structures" in the manual for all of the
  1816. details. As such, `record-type-vtable' and `%condition-type-vtable' now
  1817. have a parent vtable and are no longer roots of the vtable hierarchy.
  1818. ** Syntax parameters are a distinct type
  1819. Guile 2.0's transitional implementation of `syntax-parameterize' was
  1820. based on the `fluid-let-syntax' interface inherited from the psyntax
  1821. expander. This interface allowed any binding to be dynamically rebound
  1822. -- even bindings like `lambda'. This is no longer the case in Guile
  1823. 2.2. Syntax parameters must be defined via `define-syntax-parameter',
  1824. and only such bindings may be parameterized. See "Syntax Parameters" in
  1825. the manual for more.
  1826. ** Defined identifiers scoped in the current module
  1827. Sometimes Guile's expander would attach incorrect module scoping
  1828. information for top-level bindings made by an expansion. For example,
  1829. given the following R6RS library:
  1830. (library (defconst)
  1831. (export defconst)
  1832. (import (guile))
  1833. (define-syntax-rule (defconst name val)
  1834. (begin
  1835. (define t val)
  1836. (define-syntax-rule (name) t))))
  1837. Attempting to use it would produce an error:
  1838. (import (defconst))
  1839. (defconst foo 42)
  1840. (foo)
  1841. =| Unbound variable: t
  1842. It wasn't clear that we could fix this in Guile 2.0 without breaking
  1843. someone's delicate macros, so the fix is only coming out now.
  1844. ** Pseudo-hygienically rename macro-introduced bindings
  1845. Bindings introduced by macros, like `t' in the `defconst' example above,
  1846. are now given pseudo-fresh names. This allows
  1847. (defconst foo 42)
  1848. (defconst bar 37)
  1849. to introduce different bindings for `t'. These pseudo-fresh names are
  1850. made in such a way that if the macro is expanded again, for example as
  1851. part of a simple recompilation, the introduced identifiers get the same
  1852. pseudo-fresh names. See "Hygiene and the Top-Level" in the manual, for
  1853. details.
  1854. ** Fix literal matching for module-bound literals
  1855. `syntax-rules' and `syntax-case' macros can take a set of "literals":
  1856. bound or unbound keywords that the syntax matcher treats specially.
  1857. Before, literals were always matched symbolically (by name). Now they
  1858. are matched by binding. This allows literals to be reliably bound to
  1859. values, renamed by imports or exports, et cetera. See "Syntax-rules
  1860. Macros" in the manual for more on literals.
  1861. ** Fix bug importing specific bindings with #:select
  1862. It used to be that if #:select didn't find a binding in the public
  1863. interface of a module, it would actually grovel in the module's
  1864. unexported private bindings. This was not intended and is now fixed.
  1865. ** Statically scoped module duplicate handlers
  1866. It used to be that if a module did not specify a #:duplicates handler,
  1867. when a name was first referenced in that module and multiple imported
  1868. modules provide that name, the value of the
  1869. `default-duplicate-binding-handlers' parameter would be used to resolve
  1870. the duplicate bindings. We have changed so that instead a module
  1871. defaults to the set of handlers described in the manual. If the module
  1872. specifies #:duplicates, of course we use that. The
  1873. `default-duplicate-binding-handlers' parameter now simply accesses the
  1874. handlers of the current module, instead of some global value.
  1875. ** Fix too-broad capture of dynamic stack by delimited continuations
  1876. Guile was using explicit stacks to represent, for example, the chain of
  1877. current exception handlers. This means that a delimited continuation
  1878. that captured a "catch" expression would capture the whole stack of
  1879. exception handlers, not just the exception handler added by the "catch".
  1880. This led to strangeness when resuming the continuation in some other
  1881. context like other threads; "throw" could see an invalid stack of
  1882. exception handlers. This has been fixed by the addition of the new
  1883. "fluid-ref*" procedure that can access older values of fluids; in this
  1884. way the exception handler stack is now implicit. See "Fluids and
  1885. Dynamic States" in the manual, for more on fluid-ref*.
  1886. ** `dynamic-wind' doesn't check that guards are thunks
  1887. Checking that the dynamic-wind out-guard procedure was actually a thunk
  1888. before doing the wind was slow, unreliable, and not strictly needed.
  1889. ** All deprecated code removed
  1890. All code deprecated in Guile 2.0 has been removed. See older NEWS, and
  1891. check that your programs can compile without linker warnings and run
  1892. without runtime warnings. See "Deprecation" in the manual.
  1893. In particular, the following functions, which were deprecated in 2.0.10
  1894. but not specifically mentioned earlier in this file, have been removed:
  1895. *** `uniform-vector-read!' and `uniform-vector-write' have been
  1896. removed. Use `get-bytevector-n!' and `put-bytevector' from (rnrs io
  1897. ports) instead.
  1898. ** Remove miscellaneous unused interfaces
  1899. We have removed accidentally public, undocumented interfaces that we
  1900. think are not used, and not useful. This includes `scm_markstream',
  1901. `SCM_FLUSH_REGISTER_WINDOWS', `SCM_THREAD_SWITCHING_CODE', `SCM_FENCE',
  1902. `scm_call_generic_0', `scm_call_generic_1', `scm_call_generic_2'
  1903. `scm_call_generic_3', `scm_apply_generic', and `scm_program_source'.
  1904. `scm_async_click' was renamed to `scm_async_tick', and `SCM_ASYNC_TICK'
  1905. was made private (use `SCM_TICK' instead).
  1906. ** Many internal compiler / VM changes
  1907. As the compiler and virtual machine were re-written, there are many
  1908. changes in the back-end of Guile to interfaces that were introduced in
  1909. Guile 2.0. These changes are only of interest if you wrote a
  1910. language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
  1911. the case, drop by the IRC channel to discuss the changes.
  1912. ** Defining a SMOB or port type no longer mucks exports of `(oop goops)'
  1913. It used to be that defining a SMOB or port type added an export to
  1914. GOOPS, for the wrapper class of the smob type. This violated
  1915. modularity, though, so we have removed this behavior.
  1916. ** Bytecode replaces objcode as a target language
  1917. One way in which people may have used details of Guile's runtime in
  1918. Guile 2.0 is in compiling code to thunks for later invocation. Instead
  1919. of compiling to objcode and then calling `make-program', now the way to
  1920. do it is to compile to `bytecode' and then call `load-thunk-from-memory'
  1921. from `(system vm loader)'.
  1922. ** Weak pairs removed
  1923. Weak pairs were not safe to access with `car' and `cdr', and so were
  1924. removed.
  1925. ** Weak alist vectors removed
  1926. Use weak hash tables instead.
  1927. ** Weak vectors may no longer be accessed via `vector-ref' et al
  1928. Weak vectors may no longer be accessed with the vector interface. This
  1929. was a source of bugs in the 2.0 Guile implementation, and a limitation
  1930. on using vectors as building blocks for other abstractions. Vectors in
  1931. Guile are now a concrete type; for an abstract interface, use the
  1932. generic array facility (`array-ref' et al).
  1933. ** scm_t_array_implementation removed
  1934. This interface was introduced in 2.0 but never documented. It was a
  1935. failed attempt to layer the array implementation that actually
  1936. introduced too many layers, as it prevented the "vref" and "vset"
  1937. members of scm_t_array_handle (called "ref" and "set" in 1.8, not
  1938. present in 2.0) from specializing on array backing stores.
  1939. Notably, the definition of scm_t_array_handle has now changed, to not
  1940. include the (undocumented) "impl" member. We are sorry for any
  1941. inconvenience this may cause.
  1942. ** `scm_make' is now equivalent to Scheme `make'
  1943. It used to be that `scm_make' only implemented a hard-wired object
  1944. allocation and initialization protocol. This was because `scm_make' was
  1945. used while GOOPS booted its own, more complete `make' implementation in
  1946. Scheme. Now that we've re-implemented everything in Scheme, the C
  1947. `scm_make' now dispatches directly to Scheme `make', which implements
  1948. the full protocol. This change is incompatible in some ways, but on the
  1949. whole is good news for GOOPS users.
  1950. ** GOOPS slot definitions are now objects
  1951. Slot definitions are now instances of a <slot> class, instead of being
  1952. specially formatted lists. To most user code, this is transparent, as
  1953. the slot definition accessors like `slot-definition-name' continue to
  1954. work. However, code that for example uses `car' to get the name of a
  1955. slot definition will need to be updated to use the accessors.
  1956. ** Class slot changes
  1957. Class objects no longer have a `default-slot-definition-class' slot,
  1958. which was never used. They also no longer have slots for hashsets
  1959. (`h0', `h1', and so on up to `h7'), which have been unused since Guile
  1960. 2.0 and were not a great idea.
  1961. There is a new class option, `#:static-slot-allocation?'. See the
  1962. manual for details.
  1963. ** Removal of internal, unintentionally exposed GOOPS C interfaces
  1964. These include: `scm_sys_fast_slot_ref', `scm_sys_fast_slot_set_x'
  1965. `scm_basic_basic_make_class', `scm_sys_compute_slots',
  1966. `scm_sys_prep_layout_x' `scm_t_method', `SCM_METHOD',
  1967. `scm_s_slot_set_x', `SCM_CLASS_CLASS_LAYOUT', `scm_si_slotdef_class',
  1968. `scm_si_generic_function', `scm_si_specializers', `scm_si_procedure',
  1969. `scm_si_formals', `scm_si_body', `scm_si_make_procedure',
  1970. `SCM_CLASS_CLASS_LAYOUT', `SCM_INSTANCE_HASH', `SCM_SET_HASHSET', `union
  1971. scm_t_debug_info', `scm_pure_generic_p', `SCM_PUREGENERICP',
  1972. `SCM_VALIDATE_PUREGENERIC', `SCM_VTABLE_FLAG_GOOPS_PURE_GENERIC',
  1973. `SCM_CLASSF_PURE_GENERIC', `scm_c_extend_primitive_generic',
  1974. `scm_sys_initialize_object', `SCM_CLASS_CLASS_LAYOUT',
  1975. `scm_si_redefined', `scm_si_direct_supers', `scm_si_direct_slots',
  1976. `scm_si_direct_subclasses', `scm_si_direct_methods', `scm_si_cpl'
  1977. `scm_si_slots', `scm_si_getters_n_setters', `SCM_N_CLASS_SLOTS',
  1978. `SCM_OBJ_CLASS_REDEF', `SCM_INST', `SCM_ACCESSORS_OF',
  1979. `scm_sys_allocate_instance', and `scm_sys_invalidate_class_x'.
  1980. * New deprecations
  1981. ** `SCM_FDES_RANDOM_P'
  1982. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1983. ** `_IONBF', `_IOLBF', and `_IOFBF'
  1984. Instead, use the symbol values `none', `line', or `block', respectively,
  1985. as arguments to the `setvbuf' function.
  1986. ** `SCM_FDES_RANDOM_P'
  1987. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1988. ** Arbiters
  1989. Arbiters were an experimental mutual exclusion facility from 20 years
  1990. ago that didn't survive the test of time. Use mutexes or atomic boxes
  1991. instead.
  1992. ** User asyncs
  1993. Guile had (and still has) "system asyncs", which are asynchronous
  1994. interrupts, and also had this thing called "user asyncs", which was a
  1995. trivial unused data structure. Now that we have deprecated the old
  1996. `async', `async-mark', and `run-asyncs' procedures that comprised the
  1997. "user async" facility, we have been able to clarify our documentation to
  1998. only refer to "asyncs".
  1999. ** Critical sections
  2000. Critical sections have long been just a fancy way to lock a mutex and
  2001. defer asynchronous interrupts. Instead of SCM_CRITICAL_SECTION_START,
  2002. make sure you're in a "scm_dynwind_begin (0)" and use
  2003. scm_dynwind_pthread_mutex_lock instead, possibly also with
  2004. scm_dynwind_block_asyncs.
  2005. ** `scm_make_mutex_with_flags'
  2006. Use `scm_make_mutex_with_kind' instead. See "Mutexes and Condition
  2007. Variables" in the manual, for more.
  2008. ** Dynamic roots
  2009. This was a facility that predated threads, was unused as far as we can
  2010. tell, and was never documented. Still, a grep of your code for
  2011. dynamic-root or dynamic_root would not be amiss.
  2012. ** `make-dynamic-state'
  2013. Use `current-dynamic-state' to get an immutable copy of the current
  2014. fluid-value associations.
  2015. ** `with-statprof' macro
  2016. Use the `statprof' procedure instead.
  2017. ** SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1, SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N
  2018. ** SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn
  2019. ** SCM_WTA_DISPATCH_1_SUBR
  2020. These macros were used in dispatching primitive generics. They can be
  2021. replaced by using C functions (the same name but in lower case), if
  2022. needed, but this is a hairy part of Guile that perhaps you shouldn't be
  2023. using.
  2024. ** scm_compute_applicable_methods and scm_find_method
  2025. Use `compute-applicable-methods' from Scheme instead.
  2026. ** scm_no_applicable_method
  2027. Fetch no-applicable-method from the GOOPS exports if you need it.
  2028. ** scm_class_boolean, scm_class_char, scm_class_pair
  2029. ** scm_class_procedure, scm_class_string, scm_class_symbol
  2030. ** scm_class_primitive_generic, scm_class_vector, scm_class_null
  2031. ** scm_class_real, scm_class_complex, scm_class_integer
  2032. ** scm_class_fraction, scm_class_unknown, scm_class_top
  2033. ** scm_class_object, scm_class_class, scm_class_applicable
  2034. ** scm_class_applicable_struct, scm_class_applicable_struct_with_setter
  2035. ** scm_class_generic, scm_class_generic_with_setter, scm_class_accessor
  2036. ** scm_class_extended_generic, scm_class_extended_generic_with_setter
  2037. ** scm_class_extended_accessor, scm_class_method
  2038. ** scm_class_accessor_method, scm_class_procedure_class
  2039. ** scm_class_applicable_struct_class, scm_class_number, scm_class_list
  2040. ** scm_class_keyword, scm_class_port, scm_class_input_output_port
  2041. ** scm_class_input_port, scm_class_output_port, scm_class_foreign_slot
  2042. ** scm_class_self, scm_class_protected, scm_class_hidden
  2043. ** scm_class_opaque, scm_class_read_only, scm_class_protected_hidden
  2044. ** scm_class_protected_opaque, scm_class_protected_read_only
  2045. ** scm_class_scm, scm_class_int, scm_class_float, scm_class_double
  2046. ** scm_port_class, scm_smob_class
  2047. These class exports are now deprecated. Instead, look up the ones you
  2048. need from the GOOPS module, or use `scm_class_of' on particular values.
  2049. ** scm_get_keyword
  2050. Instead from Scheme use kw-arg-ref or real keyword arguments, and from C
  2051. use `scm_c_bind_keyword_arguments'.
  2052. ** scm_slot_ref_using_class, scm_slot_set_using_class_x
  2053. ** scm_slot_bound_using_class_p, scm_slot_exists_using_class_p
  2054. Instead use the normal `scm_slot_ref' and similar procedures.
  2055. * Changes to the distribution
  2056. ** Pre-built binary files in the tarball
  2057. Building Guile from a tarball can now take advantage of a "prebuilt/"
  2058. tree of prebuilt .go files. These compiled files are created when a
  2059. tarball is made, and are used to speed up the build for users of
  2060. official releases.
  2061. These pre-built binaries are not necessary, however: they are not stored
  2062. in revision control and can always be re-created from the source, given
  2063. that Guile can bootstrap itself from its minimal bootstrap C
  2064. interpreter. If you do not want to depend on these pre-built binaries,
  2065. you can "make -C prebuilt clean" before building.
  2066. ** New minor version
  2067. The "effective version" of Guile is now 2.2, which allows parallel
  2068. installation with other effective versions (for example, the older Guile
  2069. 2.0). See "Parallel Installations" in the manual for full details.
  2070. Notably, the `pkg-config' file is now `guile-2.2'.
  2071. ** Bump required libgc version to 7.2, released March 2012.
  2072. ** GUILE_PROGS searches for versioned Guile
  2073. The GUILE_PROGS autoconf macro can take a required version argument. As
  2074. a new change, that version argument is additionally searched for as a
  2075. suffix. For example, GUILE_PROGS(2.2) would look for guile-2.2,
  2076. guile2.2, guile-2, guile2, and then guile. The found prefix is also
  2077. applied to guild, guile-config, and the like. Thanks to Freja Nordsiek
  2078. for this work.
  2079. ** The readline extension is now installed in the extensionsdir
  2080. The shared library that implements Guile's readline extension is no
  2081. longer installed to the libdir. This change should be transparent to
  2082. users, but packagers may be interested.
  2083. Changes in 2.0.14 (since 2.0.13):
  2084. * Bug fixes
  2085. ** Builds of .go files and of Guile itself are now bit-reproducible
  2086. (<http://bugs.gnu.org/20272>)
  2087. ** 'number->locale-string' and 'monetary-amount->locale-string' fixes
  2088. (<http://bugs.gnu.org/24990>)
  2089. ** (system base target) now recognizes "sh3" as a cross-compilation target
  2090. ** Fix race condition in '00-repl-server.test'
  2091. (<http://bugs.gnu.org/24769>)
  2092. ** 'scandir' from (ice-9 ftw) no longer calls 'stat' for each entry
  2093. ** Several documentation improvements
  2094. Changes in 2.0.13 (since 2.0.12):
  2095. * Security fixes
  2096. ** CVE-2016-8606: REPL server now protects against HTTP inter-protocol
  2097. attacks
  2098. Guile 2.x provides a "REPL server" started by the '--listen'
  2099. command-line option or equivalent API (see "REPL Servers" in the
  2100. manual).
  2101. The REPL server is vulnerable to the HTTP inter-protocol attack as
  2102. described at
  2103. <https://en.wikipedia.org/wiki/Inter-protocol_exploitation>, notably the
  2104. HTML form protocol attack described at
  2105. <https://www.jochentopf.com/hfpa/hfpa.pdf>. A "DNS rebinding attack"
  2106. can be combined with this attack and allow an attacker to send arbitrary
  2107. Guile code to the REPL server through web pages accessed by the
  2108. developer, even though the REPL server is listening to a loopback device
  2109. ("localhost"). This was demonstrated in an article entitled "How to
  2110. steal any developer's local database" available at
  2111. <http://bouk.co/blog/hacking-developers/>.
  2112. The REPL server in Guile 2.0.13 now detects attempts to exploit this
  2113. vulnerability. It immediately closes the connection when it receives a
  2114. line that looks like an HTTP request.
  2115. Nevertheless, we recommend binding the REPL server to a Unix-domain
  2116. socket, for instance by running:
  2117. guile --listen=/tmp/guile-socket
  2118. ** CVE-2016-8605: 'mkdir' procedure no longer calls umask(2)
  2119. (<http://bugs.gnu.org/24659>)
  2120. When the second argument to the 'mkdir' procedure was omitted, it would
  2121. call umask(0) followed by umask(previous_umask) and apply the umask to
  2122. mode #o777.
  2123. This was unnecessary and a security issue for multi-threaded
  2124. applications: during a small window the process' umask was set to zero,
  2125. so other threads calling mkdir(2) or open(2) could end up creating
  2126. world-readable/writable/executable directories or files.
  2127. * New interfaces
  2128. ** mkstemp! takes optional "mode" argument
  2129. See "File System" in the manual, for more.
  2130. ** New 'scm_to_uintptr_t' and 'scm_from_uintptr_t' C functions
  2131. * Bug fixes
  2132. ** Fix optimizer bug when compiling fixpoint operator
  2133. ** Fix build error on MinGW
  2134. ** Update 'uname' implementation on MinGW
  2135. ** 'port-encoding' and 'set-port-encoding!' ensure they are passed an
  2136. open port
  2137. ** (system base target) now recognizes Alpha as a cross-compilation target
  2138. Changes in 2.0.12 (since 2.0.11):
  2139. * Notable changes
  2140. ** FFI: Add support for functions that set 'errno'
  2141. When accessing POSIX functions from a system's libc via Guile's dynamic
  2142. FFI, you commonly want to access the 'errno' variable to be able to
  2143. produce useful diagnostic messages.
  2144. This is now possible using 'pointer->procedure' or
  2145. 'scm_pointer_to_procedure_with_errno'. See "Dynamic FFI" in the manual.
  2146. ** The #!r6rs directive now influences read syntax
  2147. The #!r6rs directive now changes the per-port reader options to make
  2148. Guile's reader conform more closely to the R6RS syntax. In particular:
  2149. - It makes the reader case sensitive.
  2150. - It disables the recognition of keyword syntax in conflict with the
  2151. R6RS (and R5RS).
  2152. - It enables the `square-brackets', `hungry-eol-escapes' and
  2153. `r6rs-hex-escapes' reader options.
  2154. ** 'read' now accepts "\(" as equivalent to "("
  2155. This is indented for use at the beginning of lines in multi-line strings
  2156. to avoid confusing Emacs' lisp modes. Previously "\(" was an error.
  2157. ** SRFI-14 character data set upgraded to Unicode 8.0.0
  2158. ** SRFI-19 table of leap seconds updated
  2159. ** 'string-hash', 'read-string', and 'write' have been optimized
  2160. ** GOOPS bug fix for inherited accessor methods
  2161. In the port of GOOPS to Guile 2.0, we introduced a bug related to
  2162. accessor methods. The bug resulted in GOOPS assuming that a slot S in
  2163. an object whose class is C would always be present in instances of all
  2164. subclasses C, and allocated to the same struct index. This is not the
  2165. case for multiple inheritance. This behavior has been fixed to be as it
  2166. was in 1.8.
  2167. One aspect of this change may cause confusion among users. Previously
  2168. if you defined a class C:
  2169. (use-modules (oop goops))
  2170. (define-class C ()
  2171. (a #:getter get-a))
  2172. And now you define a subclass, intending to provide an #:init-value for
  2173. the slot A:
  2174. (define-class D (A)
  2175. (a #:init-value 42))
  2176. Really what you have done is define in D a new slot with the same name,
  2177. overriding the existing slot. The problem comes in that before fixing
  2178. this bug (but not in 1.8), the getter 'get-a' would succeed for
  2179. instances of D, even though 'get-a' should only work for the slot 'a'
  2180. that is defined on class C, not any other slot that happens to have the
  2181. same name and be in a class with C as a superclass.
  2182. It would be possible to "merge" the slot definitions on C and D, but
  2183. that part of the meta-object protocol (`compute-slots' et al) is not
  2184. fully implemented.
  2185. Somewhat relatedly, GOOPS also had a fix around #:init-value on
  2186. class-allocated slots. GOOPS was re-initializing the value of slots
  2187. with #:class or #:each-subclass allocation every time instances of that
  2188. class was allocated. This has been fixed.
  2189. * New interfaces
  2190. ** New SRFI-28 string formatting implementation
  2191. See "SRFI-28" in the manual.
  2192. ** New (ice-9 unicode) module
  2193. See "Characters" in the manual.
  2194. ** Web server
  2195. The (web server) module now exports 'make-server-impl', 'server-impl?',
  2196. and related procedures. Likewise, (web server http) exports 'http'.
  2197. ** New procedures: 'string-utf8-length' and 'scm_c_string_utf8_length'
  2198. See "Bytevectors as Strings" in the manual, for more.
  2199. ** New 'EXIT_SUCCESS' and 'EXIT_FAILURE' Scheme variables
  2200. See "Processes" in the manual.
  2201. ** New C functions to disable automatic SMOB finalization
  2202. The new 'scm_set_automatic_finalization_enabled' C function allows you
  2203. to choose whether automatic object finalization should be enabled (as
  2204. was the case until now, and still is by default.) This is meant for
  2205. applications that are not thread-safe nor async-safe; such applications
  2206. can disable automatic finalization and call the new 'scm_run_finalizers'
  2207. function when appropriate.
  2208. See the "Garbage Collecting Smobs" and "Smobs" sections in the manual.
  2209. ** Cross-compilation to ARM
  2210. More ARM cross-compilation targets are supported: "arm.*eb",
  2211. "^aarch64.*be", and "aarch64".
  2212. * New deprecation
  2213. ** The undocumented and unused C function 'scm_string_hash' is now deprecated
  2214. * Bugs fixed
  2215. ** Compiler
  2216. *** 'call-with-prompt' does not truncate multiple-value returns
  2217. (<http://bugs.gnu.org/14347>)
  2218. *** Use permissions of source file for compiled file
  2219. (<http://bugs.gnu.org/18477>)
  2220. *** Fix bug when inlining some functions with optional arguments
  2221. (<http://bugs.gnu.org/17634>)
  2222. *** Avoid quadratic expansion time in 'and' and 'or' macros
  2223. (<http://bugs.gnu.org/17147>)
  2224. *** Fix expander bug introduced when adding support for tail patterns
  2225. (<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>)
  2226. *** Handle ~p in 'format' warnings (<http://bugs.gnu.org/18299>)
  2227. *** Fix bug that exposed `list' invocations to CSE
  2228. (<http://bugs.gnu.org/21899>)
  2229. *** Reduce eq? and eqv? over constants using equal?
  2230. (<http://bugs.gnu.org/21855>)
  2231. *** Skip invalid .go files found in GUILE_LOAD_COMPILED_PATH
  2232. ** Threads
  2233. *** Fix data races leading to corruption (<http://bugs.gnu.org/22152>)
  2234. ** Memory management
  2235. *** Fix race between SMOB marking and finalization
  2236. (<http://bugs.gnu.org/19883>)
  2237. ** Ports
  2238. *** Fix port position handling on binary input ports
  2239. (<http://bugs.gnu.org/20302>)
  2240. *** Bytevector and custom binary ports to use ISO-8859-1
  2241. (<http://bugs.gnu.org/20200>)
  2242. *** Fix buffer overrun with unbuffered custom binary input ports
  2243. (<http://bugs.gnu.org/19621>)
  2244. *** Fix memory corruption that arose when using 'get-bytevector-n'
  2245. (<http://bugs.gnu.org/17466>)
  2246. ** System
  2247. *** {get,set}sockopt now expect type 'int' for SO_SNDBUF/SO_RCVBUF
  2248. *** 'system*' now available on MS-Windows
  2249. *** 'open-pipe' now available on MS-Windows
  2250. *** Better support for file names containing backslashes on Windows
  2251. ** Web
  2252. *** 'split-and-decode-uri-path' no longer decodes "+" to space
  2253. *** HTTP: Support date strings with a leading space for hours
  2254. (<http://bugs.gnu.org/23421>)
  2255. *** HTTP: Accept empty reason phrases (<http://bugs.gnu.org/22273>)
  2256. *** HTTP: 'Location' header can now contain URI references, not just
  2257. absolute URIs
  2258. *** HTTP: Improve chunked-mode support (<http://bugs.gnu.org/19939>)
  2259. *** HTTP: 'open-socket-for-uri' now sets better OS buffering parameters
  2260. (<http://bugs.gnu.org/15368>)
  2261. ** Miscellaneous
  2262. *** Fix 'atan' procedure when applied to complex numbers
  2263. *** Fix Texinfo to HTML conversion for @itemize and @acronym
  2264. (<http://bugs.gnu.org/21772>)
  2265. *** 'bytevector-fill!' accepts fill arguments greater than 127
  2266. (<http://bugs.gnu.org/19027>)
  2267. *** 'bytevector-copy' correctly copies SRFI-4 homogeneous vectors
  2268. (<http://bugs.gnu.org/18866>)
  2269. *** 'strerror' no longer hangs when passed a non-integer argument
  2270. (<http://bugs.gnu.org/18065>)
  2271. *** 'scm_boot_guile' now gracefully handles argc == 0
  2272. (<http://bugs.gnu.org/18680>)
  2273. *** Fix 'SCM_SMOB_OBJECT_LOC' definition (<http://bugs.gnu.org/18495>)
  2274. *** Fix bug where 'bit-count*' was not using its second argument
  2275. *** SRFI-1 'length+' raises an error for non-lists and dotted lists
  2276. (<http://bugs.gnu.org/17296>)
  2277. *** Add documentation for SXPath (<http://bugs.gnu.org/19478>)
  2278. Changes in 2.0.11 (since 2.0.10):
  2279. This release fixes an embarrassing regression introduced in the C
  2280. interface to SRFI-4 vectors. See
  2281. <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00047.html>
  2282. for details.
  2283. Changes in 2.0.10 (since 2.0.9):
  2284. * Notable changes
  2285. ** New GDB extension to support Guile
  2286. Guile now comes with an extension for GDB 7.8 or later (unreleased at
  2287. the time of writing) that simplifies debugging of C code that uses
  2288. Guile. See "GDB Support" in the manual.
  2289. ** Improved integration between R6RS and native Guile exceptions
  2290. R6RS exception handlers, established using 'with-exception-handler' or
  2291. 'guard', are now able to catch native Guile exceptions, which are
  2292. automatically converted into appropriate R6RS condition objects.
  2293. ** Support for HTTP proxies
  2294. Guile's built-in web client now honors the 'http_proxy' environment
  2295. variable, as well as the new 'current-http-proxy' parameter. See
  2296. "Web Client" in the manual for details.
  2297. ** Lexical syntax improvements
  2298. *** Support |...| symbol notation.
  2299. Guile's core reader and printer now support the R7RS |...| notation
  2300. for writing symbols with arbitrary characters, as a more portable and
  2301. attractive alternative to Guile's native #{...}# notation. To enable
  2302. this notation by default, put one or both of the following in your
  2303. ~/.guile:
  2304. (read-enable 'r7rs-symbols)
  2305. (print-enable 'r7rs-symbols)
  2306. *** Support '#true' and '#false' notation for booleans.
  2307. The booleans '#t' and '#f' may now be written as '#true' and '#false'
  2308. for improved readability, per R7RS.
  2309. *** Recognize '#\escape' character name.
  2310. The escape character '#\esc' may now be written as '#\escape', per R7RS.
  2311. *** Accept "\|" in string literals.
  2312. The pipe character may now be preceded by a backslash, per R7RS.
  2313. ** Custom binary input ports now support 'setvbuf'.
  2314. Until now, ports returned by 'make-custom-binary-input-port' were always
  2315. full-buffered. Now, their buffering mode can be changed using 'setvbuf'.
  2316. ** SRFI-4 predicates and length accessors no longer accept arrays.
  2317. Given that the SRFI-4 accessors don't work for arrays, the fact that the
  2318. predicates and length accessors returned true for arrays was a bug.
  2319. ** GUILE_PROGS now supports specifying a minimum required version.
  2320. The 'GUILE_PROGS' autoconf macro in guile.m4 now allows an optional
  2321. argument to specify a minimum required Guile version. By default, it
  2322. requires Guile >= 2.0. A micro version can also be specified, e.g.:
  2323. GUILE_PROGS([2.0.10])
  2324. ** Error reporting improvements
  2325. *** Improved run-time error reporting in (ice-9 match).
  2326. If no pattern matches in a 'match' form, the datum that failed to match
  2327. is printed along with the location of the failed 'match' invocation.
  2328. *** Print the faulty object upon invalid-keyword errors.
  2329. *** Improved error reporting of procedures defined by define-inlinable.
  2330. *** Improved error reporting for misplaced ellipses in macro definitions.
  2331. *** Improved error checking in 'define-public' and 'module-add!'.
  2332. *** Improved error when 'include' form with relative path is not in a file.
  2333. ** Speed improvements
  2334. *** 'scm_c_read' on ISO-8859-1 (e.g. binary) unbuffered ports is faster.
  2335. *** New inline asm for VM fixnum multiply, for faster overflow checking.
  2336. *** New inline asm for VM fixnum operations on ARM and 32-bit x86.
  2337. *** 'positive?' and 'negative?' are now compiled to VM primitives.
  2338. *** Numerical comparisons with more than 2 arguments are compiled to VM code.
  2339. *** Several R6RS bitwise operators have been optimized.
  2340. ** Miscellaneous
  2341. *** Web: 'content-disposition' headers are now supported.
  2342. *** Web: 'uri-encode' hexadecimal percent-encoding is now uppercase.
  2343. *** Size argument to 'make-doubly-weak-hash-table' is now optional.
  2344. *** Timeout for 'unlock-mutex' and SRFI-18 'mutex-unlock!' may now be #f.
  2345. ** Gnulib update
  2346. Guile's copy of Gnulib was updated to v0.1-92-g546ff82. The following
  2347. modules were imported from Gnulib: copysign, fsync, isfinite, link,
  2348. lstat, mkdir, mkstemp, readlink, rename, rmdir, and unistd.
  2349. * New interfaces
  2350. ** Cooperative REPL servers
  2351. This new facility supports REPLs that run at specified times within an
  2352. existing thread, for example in programs utilizing an event loop or in
  2353. single-threaded programs. This allows for safe access and mutation of
  2354. a program's data structures from the REPL without concern for thread
  2355. synchronization. See "Cooperative REPL Servers" in the manual for
  2356. details.
  2357. ** SRFI-43 (Vector Library)
  2358. Guile now includes SRFI-43, a comprehensive library of vector operations
  2359. analogous to the SRFI-1 list library. See "SRFI-43" in the manual for
  2360. details.
  2361. ** SRFI-64 (A Scheme API for test suites)
  2362. Guile now includes SRFI-64, a flexible framework for creating test
  2363. suites. The reference implementation of SRFI-64 has also been updated
  2364. to fully support earlier versions of Guile.
  2365. ** SRFI-111 (Boxes)
  2366. See "SRFI-111" in the manual.
  2367. ** 'define-values'
  2368. See "Binding multiple return values" in the manual.
  2369. ** Custom ellipsis identifiers using 'with-ellipsis' or SRFI-46.
  2370. Guile now allows macro definitions to use identifiers other than '...'
  2371. as the ellipsis. This is convenient when writing macros that generate
  2372. macro definitions. The desired ellipsis identifier can be given as the
  2373. first operand to 'syntax-rules', as specified in SRFI-46 and R7RS, or by
  2374. using the new 'with-ellipsis' special form in procedural macros. With
  2375. this addition, Guile now fully supports SRFI-46.
  2376. See "Specifying a Custom Ellipsis Identifier" and "Custom Ellipsis
  2377. Identifiers for syntax-case Macros" in the manual for details.
  2378. ** R7RS 'syntax-error'
  2379. Guile now supports 'syntax-error', as specified by R7RS, allowing for
  2380. improved compile-time error reporting from 'syntax-rules' macros. See
  2381. "Reporting Syntax Errors in Macros" in the manual for details.
  2382. ** New procedures to convert association lists into hash tables
  2383. Guile now includes the convenience procedures 'alist->hash-table',
  2384. 'alist->hashq-table', 'alist->hashv-table', and 'alist->hashx-table'.
  2385. See "Hash Table Reference" in the manual.
  2386. ** New predicates: 'exact-integer?' and 'scm_is_exact_integer'
  2387. See "Integers" in the manual.
  2388. ** 'weak-vector-length', 'weak-vector-ref', and 'weak-vector-set!'
  2389. These should now be used to access weak vectors, instead of
  2390. 'vector-length', 'vector-ref', and 'vector-set!'.
  2391. * Manual updates
  2392. ** Improve docs for 'eval-when'.
  2393. Each 'eval-when' condition is now explained in detail, including
  2394. 'expand' which was previously undocumented. (expand load eval) is now
  2395. the recommended set of conditions, instead of (compile load eval).
  2396. See "Eval When" in the manual, for details.
  2397. ** Update the section on SMOBs and memory management.
  2398. See "Defining New Types (Smobs)" in the manual.
  2399. ** Fixes
  2400. *** GOOPS: #:dsupers is the init keyword for the dsupers slot.
  2401. *** 'unfold-right' takes a tail, not a tail generator.
  2402. *** Clarify that 'append!' and 'reverse!' might not mutate.
  2403. *** Fix doc that incorrectly claimed (integer? +inf.0) => #t.
  2404. (http://bugs.gnu.org/16356)
  2405. *** Document that we support SRFI-62 (S-expression comments).
  2406. *** Document that we support SRFI-87 (=> in case clauses).
  2407. *** Document 'equal?' in the list of R6RS incompatibilities.
  2408. *** Remove outdated documentation of LTDL_LIBRARY_PATH.
  2409. *** Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.
  2410. *** Fix 'my-or' examples to use let-bound variable.
  2411. (http://bugs.gnu.org/14203)
  2412. * New deprecations
  2413. ** General 'uniform-vector' interface
  2414. This interface lacked both generality and specificity. The general
  2415. replacements are 'array-length', 'array-ref', and friends on the scheme
  2416. side, and the array handle interface on the C side. On the specific
  2417. side of things, there are the specific bytevector, SRFI-4, and bitvector
  2418. interfaces.
  2419. ** Use of the vector interface on arrays
  2420. ** 'vector-length', 'vector-ref', and 'vector-set!' on weak vectors
  2421. ** 'vector-length', 'vector-ref', and 'vector-set!' as primitive-generics
  2422. Making the vector interface operate only on a single representation will
  2423. allow future versions of Guile to compile loops involving vectors to
  2424. more efficient native code.
  2425. ** 'htons', 'htonl', 'ntohs', 'ntohl'
  2426. These procedures, like their C counterpart, were used to convert numbers
  2427. to/from network byte order, typically in conjunction with the
  2428. now-deprecated uniform vector API.
  2429. This functionality is now covered by the bytevector and binary I/O APIs.
  2430. See "Interpreting Bytevector Contents as Integers" in the manual.
  2431. ** 'gc-live-object-stats'
  2432. It hasn't worked in the whole 2.0 series. There is no replacement,
  2433. unfortunately.
  2434. ** 'scm_c_program_source'
  2435. This internal VM function was not meant to be public. Use
  2436. 'scm_procedure_source' instead.
  2437. * Build fixes
  2438. ** Fix build with Clang 3.4.
  2439. ** MinGW build fixes
  2440. *** Do not add $(EXEEXT) to guild or guile-tools.
  2441. *** tests: Use double quotes around shell arguments, for Windows.
  2442. *** tests: Don't rely on $TMPDIR and /tmp on Windows.
  2443. *** tests: Skip FFI tests that use `qsort' when it's not accessible.
  2444. *** tests: Remove symlink only when it exists.
  2445. *** tests: Don't rely on `scm_call_2' being visible.
  2446. ** Fix computation of LIBLOBJS so dependencies work properly.
  2447. (http://bugs.gnu.org/14193)
  2448. * Bug fixes
  2449. ** Web: Fix web client with methods other than GET.
  2450. (http://bugs.gnu.org/15908)
  2451. ** Web: Add Content-Length header for empty bodies.
  2452. ** Web: Accept "UTC" as the zone offset in date headers.
  2453. (http://bugs.gnu.org/14128)
  2454. ** Web: Don't throw if a response is longer than its Content-Length says.
  2455. ** Web: Write out HTTP Basic auth headers correctly.
  2456. (http://bugs.gnu.org/14370)
  2457. ** Web: Always print a path component in 'write-request-line'.
  2458. ** Fix 'define-public' from (ice-9 curried-definitions).
  2459. ** psyntax: toplevel variable definitions discard previous syntactic binding.
  2460. (http://bugs.gnu.org/11988)
  2461. ** Fix thread-unsafe lazy initializations.
  2462. ** Make (ice-9 popen) thread-safe.
  2463. (http://bugs.gnu.org/15683)
  2464. ** Make guardians thread-safe.
  2465. ** Make regexp_exec thread-safe.
  2466. (http://bugs.gnu.org/14404)
  2467. ** vm: Gracefully handle stack overflows.
  2468. (http://bugs.gnu.org/15065)
  2469. ** Fix 'rationalize'.
  2470. (http://bugs.gnu.org/14905)
  2471. ** Fix inline asm for VM fixnum operations on x32.
  2472. ** Fix 'SCM_SYSCALL' to really swallow EINTR.
  2473. ** Hide EINTR returns from 'accept'.
  2474. ** SRFI-19: Update the table of leap seconds.
  2475. ** Add missing files to the test-suite Makefile.
  2476. ** Make sure 'ftw' allows directory traversal when running as root.
  2477. ** Fix 'hash-for-each' for weak hash tables.
  2478. ** SRFI-18: Export 'current-thread'.
  2479. (http://bugs.gnu.org/16890)
  2480. ** Fix inlining of tail list to apply.
  2481. (http://bugs.gnu.org/15533)
  2482. ** Fix bug in remqueue in threads.c when removing last element.
  2483. ** Fix build when '>>' on negative integers is not arithmetic.
  2484. ** Fix 'bitwise-bit-count' for negative arguments.
  2485. (http://bugs.gnu.org/14864)
  2486. ** Fix VM 'ash' for right shifts by large amounts.
  2487. (http://bugs.gnu.org/14864)
  2488. ** Fix rounding in scm_i_divide2double for negative arguments.
  2489. ** Avoid lossy conversion from inum to double in numerical comparisons.
  2490. ** Fix numerical comparison of fractions to infinities.
  2491. ** Allow fl+ and fl* to accept zero arguments.
  2492. (http://bugs.gnu.org/14869)
  2493. ** flonum? returns false for complex number objects.
  2494. (http://bugs.gnu.org/14866)
  2495. ** flfinite? applied to a NaN returns false.
  2496. (http://bugs.gnu.org/14868)
  2497. ** Flonum operations always return flonums.
  2498. (http://bugs.gnu.org/14871)
  2499. ** min and max: NaNs beat infinities, per R6RS errata.
  2500. (http://bugs.gnu.org/14865)
  2501. ** Fix 'fxbit-count' for negative arguments.
  2502. ** 'gcd' and 'lcm' support inexact integer arguments.
  2503. (http://bugs.gnu.org/14870)
  2504. ** Fix R6RS 'fixnum-width'.
  2505. (http://bugs.gnu.org/14879)
  2506. ** tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
  2507. (http://bugs.gnu.org/14042)
  2508. ** Fix display of symbols containing backslashes.
  2509. (http://bugs.gnu.org/15033)
  2510. ** Fix truncated-print for uniform vectors.
  2511. ** Define `AF_UNIX' only when Unix-domain sockets are supported.
  2512. ** Decompiler: fix handling of empty 'case-lambda' expressions.
  2513. ** Fix handling of signed zeroes and infinities in 'numerator' and 'denominator'.
  2514. ** dereference-pointer: check for null pointer.
  2515. ** Optimizer: Numerical comparisons are not negatable, for correct NaN handling.
  2516. ** Compiler: Evaluate '-' and '/' in left-to-right order.
  2517. (for more robust floating-point arithmetic)
  2518. ** snarf.h: Declare static const function name vars as SCM_UNUSED.
  2519. ** chars.c: Remove duplicate 'const' specifiers.
  2520. ** Modify SCM_UNPACK type check to avoid warnings in clang.
  2521. ** Arrange so that 'file-encoding' does not truncate the encoding name.
  2522. (http://bugs.gnu.org/16463)
  2523. ** Improve error checking in bytevector->uint-list and bytevector->sint-list.
  2524. (http://bugs.gnu.org/15100)
  2525. ** Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum.
  2526. ** i18n: Fix null pointer dereference when locale info is missing.
  2527. ** Fix 'string-copy!' to work properly with overlapping src/dest.
  2528. ** Fix hashing of vectors to run in bounded time.
  2529. ** 'port-position' works on CBIPs that do not support 'set-port-position!'.
  2530. ** Custom binary input ports sanity-check the return value of 'read!'.
  2531. ** bdw-gc.h: Check SCM_USE_PTHREAD_THREADS using #if not #ifdef.
  2532. ** REPL Server: Don't establish a SIGINT handler.
  2533. ** REPL Server: Redirect warnings to client socket.
  2534. ** REPL Server: Improve robustness of 'stop-server-and-clients!'.
  2535. ** Add srfi-16, srfi-30, srfi-46, srfi-62, srfi-87 to %cond-expand-features.
  2536. ** Fix trap handlers to handle applicable structs.
  2537. (http://bugs.gnu.org/15691)
  2538. ** Fix optional end argument in `uniform-vector-read!'.
  2539. (http://bugs.gnu.org/15370)
  2540. ** Fix brainfuck->scheme compiler.
  2541. ** texinfo: Fix newline preservation in @example with lines beginning with @
  2542. ** C standards conformance improvements
  2543. Improvements and bug fixes were made to the C part of Guile's run-time
  2544. support (libguile).
  2545. *** Don't use the identifier 'noreturn'.
  2546. (http://bugs.gnu.org/15798)
  2547. *** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
  2548. *** Improve fallback implementation of SCM_SRS to avoid unspecified behavior.
  2549. *** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
  2550. *** Improve compliance with C standards regarding signed integer shifts.
  2551. *** Avoid signed overflow in random.c.
  2552. *** VM: Avoid signed overflows in 'add1' and 'sub1'.
  2553. *** VM: Avoid overflow in ASM_ADD when the result is most-positive-fixnum.
  2554. *** read: Avoid signed integer overflow in 'read_decimal_integer'.
  2555. Changes in 2.0.9 (since 2.0.7):
  2556. Note: 2.0.8 was a brown paper bag release that was never announced, but
  2557. some mirrors may have picked it up. Please do not use it.
  2558. * Notable changes
  2559. ** New keyword arguments for procedures that open files
  2560. The following procedures that open files now support keyword arguments
  2561. to request binary I/O or to specify the character encoding for text
  2562. files: `open-file', `open-input-file', `open-output-file',
  2563. `call-with-input-file', `call-with-output-file', `with-input-from-file',
  2564. `with-output-to-file', and `with-error-to-file'.
  2565. It is also now possible to specify whether Guile should scan files for
  2566. Emacs-style coding declarations. This scan was done by default in
  2567. versions 2.0.0 through 2.0.7, but now must be explicitly requested.
  2568. See "File Ports" in the manual for details.
  2569. ** Rewritten guile.m4
  2570. The `guile.m4' autoconf macros have been rewritten to use `guild' and
  2571. `pkg-config' instead of the deprecated `guile-config' (which itself
  2572. calls pkg-config).
  2573. There is also a new macro, `GUILE_PKG', which allows packages to select
  2574. the version of Guile that they want to compile against. See "Autoconf
  2575. Macros" in the manual, for more information.
  2576. ** Better Windows support
  2577. Guile now correctly identifies absolute paths on Windows (MinGW), and
  2578. creates files on that platform according to its path conventions. See
  2579. "File System" in the manual, for all details.
  2580. In addition, the new Gnulib imports provide `select' and `poll' on
  2581. Windows builds.
  2582. As an incompatible change, systems that are missing <sys/select.h> were
  2583. previously provided a public `scm_std_select' C function that defined a
  2584. version of `select', but unhappily it also provided its own incompatible
  2585. definitions for FD_SET, FD_ZERO, and other system interfaces. Guile
  2586. should not be setting these macros in public API, so this interface was
  2587. removed on those plaforms (basically only MinGW).
  2588. ** Numerics improvements
  2589. `number->string' now reliably outputs enough digits to produce the same
  2590. number when read back in. Previously, it mishandled subnormal numbers
  2591. (printing them as "#.#"), and failed to distinguish between some
  2592. distinct inexact numbers, e.g. 1.0 and (+ 1.0 (expt 2.0 -52)). These
  2593. problems had far-reaching implications, since the compiler uses
  2594. `number->string' to serialize numeric constants into .go files.
  2595. `sqrt' now produces exact rational results when possible, and handles
  2596. very large or very small numbers more robustly.
  2597. A number (ahem) of operations involving exact rationals have been
  2598. optimized, most notably `integer-expt' and `expt'.
  2599. `exact->inexact' now performs correct IEEE rounding.
  2600. ** New optimizations
  2601. There were a number of improvements to the partial evaluator, allowing
  2602. complete reduction of forms such as:
  2603. ((let ((_ 10)) (lambda () _)))
  2604. ((lambda _ _))
  2605. (apply (lambda _ _) 1 2 3 '(4))
  2606. (call-with-values (lambda () (values 1 2)) (lambda _ _))
  2607. `string-join' now handles huge lists efficiently.
  2608. `get-bytevector-some' now uses buffered input, which is much faster.
  2609. Finally, `array-ref', `array-set!' on arrays of rank 1 or 2 is now
  2610. faster, because it avoids building a rest list. Similarly, the
  2611. one-argument case of `array-for-each' and `array-map!' has been
  2612. optimized, and `array-copy!' and `array-fill!' are faster.
  2613. ** `peek-char' no longer consumes EOF
  2614. As required by the R5RS, if `peek-char' returns EOF, then the next read
  2615. will also return EOF. Previously `peek-char' would consume the EOF.
  2616. This makes a difference for terminal devices where it is possible to
  2617. read past an EOF.
  2618. ** Gnulib update
  2619. Guile's copy of Gnulib was updated to v0.0-7865-ga828bb2. The following
  2620. modules were imported from Gnulib: select, times, pipe-posix, fstat,
  2621. getlogin, poll, and c-strcase.
  2622. ** `include' resolves relative file names relative to including file
  2623. Given a relative file name, `include' will look for it relative to the
  2624. directory of the including file. This harmonizes the behavior of
  2625. `include' with that of `load'.
  2626. ** SLIB compatibility restored
  2627. Guile 2.0.8 is now compatible with SLIB. You will have to use a
  2628. development version of SLIB, however, until a new version of SLIB is
  2629. released.
  2630. ** Better ,trace REPL command
  2631. Sometimes the ,trace output for nested function calls could overflow the
  2632. terminal width, which wasn't useful. Now there is a limit to the amount
  2633. of space the prefix will take. See the documentation for ",trace" for
  2634. more information.
  2635. ** Better docstring syntax supported for `case-lambda'
  2636. Docstrings can now be placed immediately after the `case-lambda' or
  2637. `case-lambda*' keyword. See "Case-lambda" in the manual.
  2638. ** Improved handling of Unicode byte order marks
  2639. See "BOM Handling" in the manual for details.
  2640. ** Update predefined character sets to Unicode 6.2
  2641. ** GMP 4.2 or later required
  2642. Guile used to require GMP at least version 4.1 (released in May 2002),
  2643. and now requires at least version 4.2 (released in March 2006).
  2644. * Manual updates
  2645. ** Better SXML documentation
  2646. The documentation for SXML modules was much improved, though there is
  2647. still far to go. See "SXML" in manual.
  2648. ** Style updates
  2649. Use of "iff" was replaced with standard English. Keyword arguments are
  2650. now documented consistently, along with their default values.
  2651. ** An end to the generated-documentation experiment
  2652. When Guile 2.0 imported some modules from Guile-Lib, they came with a
  2653. system that generated documentation from docstrings and module
  2654. commentaries. This produced terrible documentation. We finally bit the
  2655. bullet and incorporated these modules into the main text, and will be
  2656. improving them manually over time, as is the case with SXML. Help is
  2657. appreciated.
  2658. ** New documentation
  2659. There is now documentation for `scm_array_type', and `scm_array_ref', as
  2660. well as for the new `array-length' / 'scm_c_array_length' /
  2661. `scm_array_length' functions. `array-in-bounds?' has better
  2662. documentation as well. The `program-arguments-alist' and
  2663. `program-lambda-list' functions are now documented, as well as `and=>',
  2664. `exit', and `quit'. The (system repl server) module is now documented
  2665. (see REPL Servers). Finally, the GOOPS class hierarchy diagram has been
  2666. regenerated for the web and print output formats.
  2667. * New deprecations
  2668. ** Deprecate generalized vector interface
  2669. The generalized vector interface, introduced in 1.8.0, is simply a
  2670. redundant, verbose interface to arrays of rank 1. `array-ref' and
  2671. similar functions are entirely sufficient. Thus,
  2672. `scm_generalized_vector_p', `scm_generalized_vector_length',
  2673. `scm_generalized_vector_ref', `scm_generalized_vector_set_x', and
  2674. `scm_generalized_vector_to_list' are now deprecated.
  2675. ** Deprecate SCM_CHAR_CODE_LIMIT and char-code-limit
  2676. These constants were defined to 256, which is not the highest codepoint
  2677. supported by Guile. Given that they were useless and incorrect, they
  2678. have been deprecated.
  2679. ** Deprecate `http-get*'
  2680. The new `#:streaming?' argument to `http-get' subsumes the functionality
  2681. of `http-get*' (introduced in 2.0.7). Also, the `#:extra-headers'
  2682. argument is deprecated in favor of `#:headers'.
  2683. ** Deprecate (ice-9 mapping)
  2684. This module, present in Guile since 1996 but never used or documented,
  2685. has never worked in Guile 2.0. It has now been deprecated and will be
  2686. removed in Guile 2.2.
  2687. ** Deprecate undocumented array-related C functions
  2688. These are `scm_array_fill_int', `scm_ra_eqp', `scm_ra_lessp',
  2689. `scm_ra_leqp', `scm_ra_grp', `scm_ra_greqp', `scm_ra_sum',
  2690. `scm_ra_product', `scm_ra_difference', `scm_ra_divide', and
  2691. `scm_array_identity'.
  2692. * New interfaces
  2693. ** SRFI-41 Streams
  2694. See "SRFI-41" in the manual.
  2695. ** SRFI-45 exports `promise?'
  2696. SRFI-45 now exports a `promise?' procedure that works with its promises.
  2697. Also, its promises now print more nicely.
  2698. ** New HTTP client procedures
  2699. See "Web Client" for documentation on the new `http-head', `http-post',
  2700. `http-put', `http-delete', `http-trace', and `http-options' procedures,
  2701. and also for more options to `http-get'.
  2702. ** Much more capable `xml->sxml'
  2703. See "Reading and Writing XML" for information on how the `xml->sxml'
  2704. parser deals with namespaces, processed entities, doctypes, and literal
  2705. strings. Incidentally, `current-ssax-error-port' is now a parameter
  2706. object.
  2707. ** New procedures for converting strings to and from bytevectors
  2708. See "Representing Strings as Bytes" for documentation on the new `(ice-9
  2709. iconv)' module and its `bytevector->string' and `string->bytevector'
  2710. procedures.
  2711. ** Escape continuations with `call/ec' and `let/ec'
  2712. See "Prompt Primitives".
  2713. ** New procedures to read all characters from a port
  2714. See "Line/Delimited" in the manual for documentation on `read-string'
  2715. and `read-string!'.
  2716. ** New procedure `sendfile'
  2717. See "File System".
  2718. ** New procedure `unget-bytevector'
  2719. See "R6RS Binary Input".
  2720. ** New C helper: `scm_c_bind_keyword_arguments'
  2721. See "Keyword Procedures".
  2722. ** New command-line arguments: `--language' and `-C'
  2723. See "Command-line Options" in the manual.
  2724. ** New environment variables: `GUILE_STACK_SIZE', `GUILE_INSTALL_LOCALE'
  2725. See "Environment Variables".
  2726. ** New procedures for dealing with file names
  2727. See "File System" for documentation on `system-file-name-convention',
  2728. `file-name-separator?', `absolute-file-name?', and
  2729. `file-name-separator-string'.
  2730. ** `array-length', an array's first dimension
  2731. See "Array Procedures".
  2732. ** `hash-count', for hash tables
  2733. See "Hash Tables".
  2734. ** `round-ash', a bit-shifting operator that rounds on right-shift
  2735. See "Bitwise Operations".
  2736. ** New foreign types: `ssize_t', `ptrdiff_t'
  2737. See "Foreign Types".
  2738. ** New C helpers: `scm_from_ptrdiff_t', `scm_to_ptrdiff_t'
  2739. See "Integers".
  2740. ** Socket option `SO_REUSEPORT' now available from Scheme
  2741. If supported on the platform, `SO_REUSEPORT' is now available from
  2742. Scheme as well. See "Network Sockets and Communication".
  2743. ** `current-language' in default environment
  2744. Previously defined only in `(system base language)', `current-language'
  2745. is now defined in the default environment, and is used to determine the
  2746. language for the REPL, and for `compile-and-load'.
  2747. ** New procedure: `fluid->parameter'
  2748. See "Parameters", for information on how to convert a fluid to a
  2749. parameter.
  2750. ** New `print' REPL option
  2751. See "REPL Commands" in the manual for information on the new
  2752. user-customizable REPL printer.
  2753. ** New variable: %site-ccache-dir
  2754. The "Installing Site Packages" and "Build Config" manual sections now
  2755. refer to this variable to describe where users should install their
  2756. `.go' files.
  2757. * Build fixes
  2758. ** Fix compilation against libgc 7.3.
  2759. ** Fix cross-compilation of `c-tokenize.o'.
  2760. ** Fix warning when compiling against glibc 2.17.
  2761. ** Fix documentation build against Texinfo 5.0.
  2762. ** Fix building Guile from a directory with non-ASCII characters.
  2763. ** Fix native MinGW build.
  2764. ** Fix --disable-posix build.
  2765. ** Fix MinGW builds with networking, POSIX, and thread support.
  2766. * Bug fixes
  2767. ** Fix inexact number printer.
  2768. (http://bugs.gnu.org/13757)
  2769. ** Fix infinite loop when parsing optional-argument short options (SRFI-37).
  2770. (http://bugs.gnu.org/13176)
  2771. ** web: Support non-GMT date headers in the HTTP client.
  2772. (http://bugs.gnu.org/13544)
  2773. ** web: support IP-literal (IPv6 address) in Host header.
  2774. ** Avoid stack overflows with `par-map' and nested futures in general.
  2775. (http://bugs.gnu.org/13188)
  2776. ** Peek-char no longer consumes EOF.
  2777. (http://bugs.gnu.org/12216)
  2778. ** Avoid swallowing multiple EOFs in R6RS binary-input procedures.
  2779. ** A fork when multiple threads are running will now print a warning.
  2780. ** Allow for spurious wakeups from pthread_cond_wait.
  2781. (http://bugs.gnu.org/10641)
  2782. ** Warn and ignore module autoload failures.
  2783. (http://bugs.gnu.org/12202)
  2784. ** Use chmod portably in (system base compile).
  2785. (http://bugs.gnu.org/10474)
  2786. ** Fix response-body-port for HTTP responses without content-length.
  2787. (http://bugs.gnu.org/13857)
  2788. ** Allow case-lambda expressions with no clauses.
  2789. (http://bugs.gnu.org/9776)
  2790. ** Improve standards conformance of string->number.
  2791. (http://bugs.gnu.org/11887)
  2792. ** Support calls and tail-calls with more than 255 formals.
  2793. ** ,option evaluates its right-hand-side.
  2794. (http://bugs.gnu.org/13076)
  2795. ** Structs with tail arrays are not simple.
  2796. (http://bugs.gnu.org/12808)
  2797. ** Make `SCM_LONG_BIT' usable in preprocessor conditionals.
  2798. (http://bugs.gnu.org/13848)
  2799. ** Fix thread-unsafe lazy initializations.
  2800. ** Allow SMOB mark procedures to be called from parallel markers.
  2801. (http://bugs.gnu.org/13611)
  2802. ** Fix later-bindings-win logic in with-fluids.
  2803. (http://bugs.gnu.org/13843)
  2804. ** Fix duplicate removal of with-fluids.
  2805. (http://bugs.gnu.org/13838)
  2806. ** Support calling foreign functions of 10 arguments or more.
  2807. (http://bugs.gnu.org/13809)
  2808. ** Let reverse! accept arbitrary types as second argument.
  2809. (http://bugs.gnu.org/13835)
  2810. ** Recognize the `x86_64.*-gnux32' triplet.
  2811. ** Check whether a triplet's OS part specifies an ABI.
  2812. ** Recognize mips64* as having 32-bit pointers by default.
  2813. ** Use portable sed constructs.
  2814. (http://bugs.gnu.org/14042)
  2815. ** Remove language/glil/decompile-assembly.scm.
  2816. (http://bugs.gnu.org/10622)
  2817. ** Use O_BINARY in `copy-file', `load-objcode', `mkstemp'.
  2818. ** Use byte-oriented functions in `get-bytevector*'.
  2819. ** Fix abort when iconv swallows BOM from UTF-16 or UTF-32 stream.
  2820. ** Fix compilation of functions with more than 255 local variables.
  2821. ** Fix `getgroups' for when zero supplementary group IDs exist.
  2822. ** Allow (define-macro name (lambda ...)).
  2823. ** Various fixes to the (texinfo) modules.
  2824. ** guild: Gracefully handle failures to install the locale.
  2825. ** Fix format string warnings for ~!, ~|, ~/, ~q, ~Q, and ~^.
  2826. (http://bugs.gnu.org/13485)
  2827. ** Fix source annotation bug in psyntax 'expand-body'.
  2828. ** Ecmascript: Fix conversion to boolean for non-numbers.
  2829. ** Use case-insensitive comparisons for encoding names.
  2830. ** Add missing cond-expand feature identifiers.
  2831. ** A failure to find a module's file does not prevent future loading.
  2832. ** Many (oop goops save) fixes.
  2833. ** `http-get': don't shutdown write end of socket.
  2834. (http://bugs.gnu.org/13095)
  2835. ** Avoid signed integer overflow in scm_product.
  2836. ** http: read-response-body always returns bytevector or #f, never EOF.
  2837. ** web: Correctly detect "No route to host" conditions.
  2838. ** `system*': failure to execvp no longer leaks dangling processes.
  2839. (http://bugs.gnu.org/13166)
  2840. ** More sensible case-lambda* dispatch.
  2841. (http://bugs.gnu.org/12929)
  2842. ** Do not defer expansion of internal define-syntax forms.
  2843. (http://bugs.gnu.org/13509)
  2844. Changes in 2.0.7 (since 2.0.6):
  2845. * Notable changes
  2846. ** SRFI-105 curly infix expressions are supported
  2847. Curly infix expressions as described at
  2848. http://srfi.schemers.org/srfi-105/srfi-105.html are now supported by
  2849. Guile's reader. This allows users to write things like {a * {b + c}}
  2850. instead of (* a (+ b c)). SRFI-105 support is enabled by using the
  2851. `#!curly-infix' directive in source code, or the `curly-infix' reader
  2852. option. See the manual for details.
  2853. ** Reader options may now be per-port
  2854. Historically, `read-options' and related procedures would manipulate
  2855. global options, affecting the `read' procedure for all threads, and all
  2856. current uses of `read'.
  2857. Guile can now associate `read' options with specific ports, allowing
  2858. different ports to use different options. For instance, the
  2859. `#!fold-case' and `#!no-fold-case' reader directives have been
  2860. implemented, and their effect is to modify the current read options of
  2861. the current port only; similarly for `#!curly-infix'. Thus, it is
  2862. possible, for instance, to have one port reading case-sensitive code,
  2863. while another port reads case-insensitive code.
  2864. ** Futures may now be nested
  2865. Futures may now be nested: a future can itself spawn and then `touch'
  2866. other futures. In addition, any thread that touches a future that has
  2867. not completed now processes other futures while waiting for the touched
  2868. future to completed. This allows all threads to be kept busy, and was
  2869. made possible by the use of delimited continuations (see the manual for
  2870. details.)
  2871. Consequently, `par-map' and `par-for-each' have been rewritten and can
  2872. now use all cores.
  2873. ** `GUILE_LOAD_PATH' et al can now add directories to the end of the path
  2874. `GUILE_LOAD_PATH' and `GUILE_LOAD_COMPILED_PATH' can now be used to add
  2875. directories to both ends of the load path. If the special path
  2876. component `...' (ellipsis) is present in these environment variables,
  2877. then the default path is put in place of the ellipsis, otherwise the
  2878. default path is placed at the end. See "Environment Variables" in the
  2879. manual for details.
  2880. ** `load-in-vicinity' search for `.go' files in `%load-compiled-path'
  2881. Previously, `load-in-vicinity' would look for compiled files in the
  2882. auto-compilation cache, but not in `%load-compiled-path'. This is now
  2883. fixed. This affects `load', and the `-l' command-line flag. See
  2884. <http://bugs.gnu.org/12519> for details.
  2885. ** Extension search order fixed, and LD_LIBRARY_PATH preserved
  2886. Up to 2.0.6, Guile would modify the `LD_LIBRARY_PATH' environment
  2887. variable (or whichever is relevant for the host OS) to insert its own
  2888. default extension directories in the search path (using GNU libltdl
  2889. facilities was not possible here.) This approach was problematic in two
  2890. ways.
  2891. First, the `LD_LIBRARY_PATH' modification would be visible to
  2892. sub-processes, and would also affect future calls to `dlopen', which
  2893. could lead to subtle bugs in the application or sub-processes. Second,
  2894. when the installation prefix is /usr, the `LD_LIBRARY_PATH' modification
  2895. would typically end up inserting /usr/lib before /usr/local/lib in the
  2896. search path, which is often the opposite of system-wide settings such as
  2897. `ld.so.conf'.
  2898. Both issues have now been fixed.
  2899. ** `make-vtable-vtable' is now deprecated
  2900. Programs should instead use `make-vtable' and `<standard-vtable>'.
  2901. ** The `-Wduplicate-case-datum' and `-Wbad-case-datum' are enabled
  2902. These recently introduced warnings have been documented and are now
  2903. enabled by default when auto-compiling.
  2904. ** Optimize calls to `equal?' or `eqv?' with a constant argument
  2905. The compiler simplifies calls to `equal?' or `eqv?' with a constant
  2906. argument to use `eq?' instead, when applicable.
  2907. * Manual updates
  2908. ** SRFI-9 records now documented under "Compound Data Types"
  2909. The documentation of SRFI-9 record types has been moved in the "Compound
  2910. Data Types", next to Guile's other record APIs. A new section
  2911. introduces the various record APIs, and describes the trade-offs they
  2912. make. These changes were made in an attempt to better guide users
  2913. through the maze of records API, and to recommend SRFI-9 as the main
  2914. API.
  2915. The documentation of Guile's raw `struct' API has also been improved.
  2916. ** (ice-9 and-let-star) and (ice-9 curried-definitions) now documented
  2917. These modules were missing from the manual.
  2918. * New interfaces
  2919. ** New "functional record setters" as a GNU extension of SRFI-9
  2920. The (srfi srfi-9 gnu) module now provides three new macros to deal with
  2921. "updates" of immutable records: `define-immutable-record-type',
  2922. `set-field', and `set-fields'.
  2923. The first one allows record type "functional setters" to be defined;
  2924. such setters keep the record unchanged, and instead return a new record
  2925. with only one different field. The remaining macros provide the same
  2926. functionality, and also optimize updates of multiple or nested fields.
  2927. See the manual for details.
  2928. ** web: New `http-get*', `response-body-port', and `text-content-type?'
  2929. procedures
  2930. These procedures return a port from which to read the response's body.
  2931. Unlike `http-get' and `read-response-body', they allow the body to be
  2932. processed incrementally instead of being stored entirely in memory.
  2933. The `text-content-type?' predicate allows users to determine whether the
  2934. content type of a response is textual.
  2935. See the manual for details.
  2936. ** `string-split' accepts character sets and predicates
  2937. The `string-split' procedure can now be given a SRFI-14 character set or
  2938. a predicate, instead of just a character.
  2939. ** R6RS SRFI support
  2940. Previously, in R6RS modules, Guile incorrectly ignored components of
  2941. SRFI module names after the SRFI number, making it impossible to specify
  2942. sub-libraries. This release corrects this, bringing us into accordance
  2943. with SRFI 97.
  2944. ** `define-public' is no a longer curried definition by default
  2945. The (ice-9 curried-definitions) should be used for such uses. See the
  2946. manual for details.
  2947. * Build fixes
  2948. ** Remove reference to `scm_init_popen' when `fork' is unavailable
  2949. This fixes a MinGW build issue (http://bugs.gnu.org/12477).
  2950. ** Fix race between installing `guild' and the `guile-tools' symlink
  2951. * Bug fixes
  2952. ** Procedures returned by `eval' now have docstrings
  2953. (http://bugs.gnu.org/12173)
  2954. ** web client: correctly handle uri-query, etc. in relative URI headers
  2955. (http://bugs.gnu.org/12827)
  2956. ** Fix docs for R6RS `hashtable-copy'
  2957. ** R6RS `string-for-each' now accepts multiple string arguments
  2958. ** Fix out-of-range error in the compiler's CSE pass
  2959. (http://bugs.gnu.org/12883)
  2960. ** Add missing R6RS `open-file-input/output-port' procedure
  2961. ** Futures: Avoid creating the worker pool more than once
  2962. ** Fix invalid assertion about mutex ownership in threads.c
  2963. (http://bugs.gnu.org/12719)
  2964. ** Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'
  2965. ** The `scandir' procedure now uses `lstat' instead of `stat'
  2966. ** Fix `generalized-vector->list' indexing bug with shared arrays
  2967. (http://bugs.gnu.org/12465)
  2968. ** web: Change `http-get' to try all the addresses for the given URI
  2969. ** Implement `hash' for structs
  2970. (http://lists.gnu.org/archive/html/guile-devel/2012-10/msg00031.html)
  2971. ** `read' now adds source properties for data types beyond pairs
  2972. ** Improve error reporting in `append!'
  2973. ** In fold-matches, set regexp/notbol unless matching string start
  2974. ** Don't stat(2) and access(2) the .go location before using it
  2975. ** SRFI-19: use zero padding for hours in ISO 8601 format, not blanks
  2976. ** web: Fix uri-encoding for strings with no unreserved chars, and octets 0-15
  2977. ** More robust texinfo alias handling
  2978. ** Optimize `format' and `simple-format'
  2979. (http://bugs.gnu.org/12033)
  2980. ** Angle of -0.0 is pi, not zero
  2981. Changes in 2.0.6 (since 2.0.5):
  2982. * Notable changes
  2983. ** New optimization pass: common subexpression elimination (CSE)
  2984. Guile's optimizer will now run a CSE pass after partial evaluation.
  2985. This pass propagates static information about branches taken, bound
  2986. lexicals, and effects from an expression's dominators. It can replace
  2987. common subexpressions with their boolean values (potentially enabling
  2988. dead code elimination), equivalent bound lexicals, or it can elide them
  2989. entirely, depending on the context in which they are executed. This
  2990. pass is especially useful in removing duplicate type checks, such as
  2991. those produced by SRFI-9 record accessors.
  2992. ** Improvements to the partial evaluator
  2993. Peval can now hoist tests that are common to both branches of a
  2994. conditional into the test. This can help with long chains of
  2995. conditionals, such as those generated by the `match' macro. Peval can
  2996. now do simple beta-reductions of procedures with rest arguments. It
  2997. also avoids residualizing degenerate lexical aliases, even when full
  2998. inlining is not possible. Finally, peval now uses the effects analysis
  2999. introduced for the CSE pass. More precise effects analysis allows peval
  3000. to move more code.
  3001. ** Run finalizers asynchronously in asyncs
  3002. Finalizers are now run asynchronously, via an async. See Asyncs in the
  3003. manual. This allows Guile and user code to safely allocate memory while
  3004. holding a mutex.
  3005. ** Update SRFI-14 character sets to Unicode 6.1
  3006. Note that this update causes the Latin-1 characters `§' and `¶' to be
  3007. reclassified as punctuation. They were previously considered to be part
  3008. of `char-set:symbol'.
  3009. ** Better source information for datums
  3010. When the `positions' reader option is on, as it is by default, Guile's
  3011. reader will record source information for more kinds of datums.
  3012. ** Improved error and warning messages
  3013. `syntax-violation' errors now prefer `subform' for source info, with
  3014. `form' as fallback. Syntactic errors in `cond' and `case' now produce
  3015. better errors. `case' can now warn on duplicate datums, or datums that
  3016. cannot be usefully compared with `eqv?'. `-Warity-mismatch' now handles
  3017. applicable structs. `-Wformat' is more robust in the presence of
  3018. `gettext'. Finally, various exceptions thrown by the Web modules now
  3019. define appropriate exception printers.
  3020. ** A few important bug fixes in the HTTP modules.
  3021. Guile's web server framework now checks if an application returns a body
  3022. where it is not permitted, for example in response to a HEAD request,
  3023. and warn or truncate the response as appropriate. Bad requests now
  3024. cause a 400 Bad Request response to be printed before closing the port.
  3025. Finally, some date-printing and URL-parsing bugs were fixed.
  3026. ** Pretty-print improvements
  3027. When Guile needs to pretty-print Tree-IL, it will try to reconstruct
  3028. `cond', `or`, and other derived syntax forms from the primitive tree-IL
  3029. forms. It also uses the original names instead of the fresh unique
  3030. names, when it is unambiguous to do so. This can be seen in the output
  3031. of REPL commands like `,optimize'.
  3032. Also, the `pretty-print' procedure has a new keyword argument,
  3033. `#:max-expr-width'.
  3034. ** Fix memory leak involving applicable SMOBs
  3035. At some point in the 1.9.x series, Guile began leaking any applicable
  3036. SMOB that was actually applied. (There was a weak-key map from SMOB to
  3037. trampoline functions, where the value had a strong reference on the
  3038. key.) This has been fixed. There was much rejoicing!
  3039. ** Support for HTTP/1.1 chunked transfer coding
  3040. See "Transfer Codings" in the manual, for more.
  3041. ** Micro-optimizations
  3042. A pile of micro-optimizations: the `string-trim' function when called
  3043. with `char-set:whitespace'; the `(web http)' parsers; SMOB application;
  3044. conversion of raw UTF-8 and UTF-32 data to and from SCM strings; vlists
  3045. and vhashes; `read' when processing string literals.
  3046. ** Incompatible change to `scandir'
  3047. As was the original intention, `scandir' now runs the `select?'
  3048. procedure on all items, including subdirectories and the `.' and `..'
  3049. entries. It receives the basename of the file in question instead of
  3050. the full name. We apologize for this incompatible change to this
  3051. function introduced in the 2.0.4 release.
  3052. * Manual updates
  3053. The manual has been made much more consistent in its naming conventions
  3054. with regards to formal parameters of functions. Thanks to Bake Timmons.
  3055. * New interfaces
  3056. ** New C function: `scm_to_pointer'
  3057. ** New C inline functions: `scm_new_smob', `scm_new_double_smob'
  3058. ** (ice-9 format): Add ~h specifier for localized number output.
  3059. ** (web response): New procedure: `response-must-not-include-body?'
  3060. ** New predicate: 'supports-source-properties?'
  3061. ** New C helpers: `scm_c_values', `scm_c_nvalues'
  3062. ** Newly public inline C function: `scm_unget_byte'
  3063. ** (language tree-il): New functions: `tree-il=?', `tree-il-hash'
  3064. ** New fluid: `%default-port-conversion-strategy'
  3065. ** New syntax: `=>' within `case'
  3066. ** (web http): `make-chunked-input-port', `make-chunked-output-port'
  3067. ** (web http): `declare-opaque-header!'
  3068. Search the manual for these identifiers, for more information.
  3069. * New deprecations
  3070. ** `close-io-port' deprecated
  3071. Use `close-port'.
  3072. ** `scm_sym2var' deprecated
  3073. In most cases, replace with `scm_lookup' or `scm_module_variable'. Use
  3074. `scm_define' or `scm_module_ensure_local_variable' if the second
  3075. argument is nonzero. See "Accessing Modules from C" in the manual, for
  3076. full details.
  3077. ** Lookup closures deprecated
  3078. These were never documented. See "Module System Reflection" in the
  3079. manual for replacements.
  3080. * Build fixes
  3081. ** Fix compilation against uninstalled Guile on non-GNU platforms.
  3082. ** Fix `SCM_I_ERROR' definition for MinGW without networking.
  3083. ** Fix compilation with the Sun C compiler.
  3084. ** Fix check for `clock_gettime' on OpenBSD and some other systems.
  3085. ** Fix build with --enable-debug-malloc.
  3086. ** Honor $(program_transform_name) for the `guile-tools' symlink.
  3087. ** Fix cross-compilation of GOOPS-using code.
  3088. * Bug fixes
  3089. ** Fix use of uninitialized stat buffer in search-path of absolute paths.
  3090. ** Avoid calling `freelocale' with a NULL argument.
  3091. ** Work around erroneous tr_TR locale in Darwin 8 in tests.
  3092. ** Fix `getaddrinfo' test for Darwin 8.
  3093. ** Use Gnulib's `regex' module for better regex portability.
  3094. ** `source-properties' and friends work on any object
  3095. ** Rewrite open-process in C, for robustness related to threads and fork
  3096. ** Fix <TAG>vector-length when applied to other uniform vector types
  3097. ** Fix escape-only prompt optimization (was disabled previously)
  3098. ** Fix a segfault when /dev/urandom is not accessible
  3099. ** Fix flush on soft ports, so that it actually runs.
  3100. ** Better compatibility of SRFI-9 records with core records
  3101. ** Fix and clarify documentation of `sorted?'.
  3102. ** Fix IEEE-754 endianness conversion in bytevectors.
  3103. ** Correct thunk check in the `wind' instruction.
  3104. ** Add @acronym support to texinfo modules
  3105. ** Fix docbook->texi for <ulink> without URL
  3106. ** Fix `setvbuf' to leave the line/column number unchanged.
  3107. ** Add missing public declaration for `scm_take_from_input_buffers'.
  3108. ** Fix relative file name canonicalization with empty %LOAD-PATH entries.
  3109. ** Import newer (ice-9 match) from Chibi-Scheme.
  3110. ** Fix unbound variables and unbound values in ECMAScript runtime.
  3111. ** Make SRFI-6 string ports Unicode-capable.
  3112. Changes in 2.0.5 (since 2.0.4):
  3113. This release fixes the binary interface information (SONAME) of
  3114. libguile, which was incorrect in 2.0.4. It does not contain other
  3115. changes.
  3116. Changes in 2.0.4 (since 2.0.3):
  3117. * Notable changes
  3118. ** Better debuggability for interpreted procedures.
  3119. Guile 2.0 came with a great debugging experience for compiled
  3120. procedures, but the story for interpreted procedures was terrible. Now,
  3121. at least, interpreted procedures have names, and the `arity' procedure
  3122. property is always correct (or, as correct as it can be, in the presence
  3123. of `case-lambda').
  3124. ** Support for cross-compilation.
  3125. One can now use a native Guile to cross-compile `.go' files for a
  3126. different architecture. See the documentation for `--target' in the
  3127. "Compilation" section of the manual, for information on how to use the
  3128. cross-compiler. See the "Cross building Guile" section of the README,
  3129. for more on how to cross-compile Guile itself.
  3130. ** The return of `local-eval'.
  3131. Back by popular demand, `the-environment' and `local-eval' allow the
  3132. user to capture a lexical environment, and then evaluate arbitrary
  3133. expressions in that context. There is also a new `local-compile'
  3134. command. See "Local Evaluation" in the manual, for more. Special
  3135. thanks to Mark Weaver for an initial implementation of this feature.
  3136. ** Fluids can now have default values.
  3137. Fluids are used for dynamic and thread-local binding. They have always
  3138. inherited their values from the context or thread that created them.
  3139. However, there was a case in which a new thread would enter Guile, and
  3140. the default values of all the fluids would be `#f' for that thread.
  3141. This has now been fixed so that `make-fluid' has an optional default
  3142. value for fluids in unrelated dynamic roots, which defaults to `#f'.
  3143. ** Garbage collector tuning.
  3144. The garbage collector has now been tuned to run more often under some
  3145. circumstances.
  3146. *** Unmanaged allocation
  3147. The new `scm_gc_register_allocation' function will notify the collector
  3148. of unmanaged allocation. This will cause the collector to run sooner.
  3149. Guile's `scm_malloc', `scm_calloc', and `scm_realloc' unmanaged
  3150. allocators eventually call this function. This leads to better
  3151. performance under steady-state unmanaged allocation.
  3152. *** Transient allocation
  3153. When the collector runs, it will try to record the total memory
  3154. footprint of a process, if the platform supports this information. If
  3155. the memory footprint is growing, the collector will run more frequently.
  3156. This reduces the increase of the resident size of a process in response
  3157. to a transient increase in allocation.
  3158. *** Management of threads, bignums
  3159. Creating a thread will allocate a fair amount of memory. Guile now does
  3160. some GC work (using `GC_collect_a_little') when allocating a thread.
  3161. This leads to a better memory footprint when creating many short-lived
  3162. threads.
  3163. Similarly, bignums can occupy a lot of memory. Guile now offers hooks
  3164. to enable custom GMP allocators that end up calling
  3165. `scm_gc_register_allocation'. These allocators are enabled by default
  3166. when running Guile from the command-line. To enable them in libraries,
  3167. set the `scm_install_gmp_memory_functions' variable to a nonzero value
  3168. before loading Guile.
  3169. ** SRFI-39 parameters are available by default.
  3170. Guile now includes support for parameters, as defined by SRFI-39, in the
  3171. default environment. See "Parameters" in the manual, for more
  3172. information. `current-input-port', `current-output-port', and
  3173. `current-error-port' are now parameters.
  3174. ** Add `current-warning-port'.
  3175. Guile now outputs warnings on a separate port, `current-warning-port',
  3176. initialized to the value that `current-error-port' has on startup.
  3177. ** Syntax parameters.
  3178. Following Racket's lead, Guile now supports syntax parameters. See
  3179. "Syntax parameters" in the manual, for more.
  3180. Also see Barzilay, Culpepper, and Flatt's 2011 SFP workshop paper,
  3181. "Keeping it Clean with syntax-parameterize".
  3182. ** Parse command-line arguments from the locale encoding.
  3183. Guile now attempts to parse command-line arguments using the user's
  3184. locale. However for backwards compatibility with other 2.0.x releases,
  3185. it does so without actually calling `setlocale'. Please report any bugs
  3186. in this facility to bug-guile@gnu.org.
  3187. ** One-armed conditionals: `when' and `unless'
  3188. Guile finally has `when' and `unless' in the default environment. Use
  3189. them whenever you would use an `if' with only one branch. See
  3190. "Conditionals" in the manual, for more.
  3191. ** `current-filename', `add-to-load-path'
  3192. There is a new form, `(current-filename)', which expands out to the
  3193. source file in which it occurs. Combined with the new
  3194. `add-to-load-path', this allows simple scripts to easily add nearby
  3195. directories to the load path. See "Load Paths" in the manual, for more.
  3196. ** `random-state-from-platform'
  3197. This procedure initializes a random seed using good random sources
  3198. available on your platform, such as /dev/urandom. See "Random Number
  3199. Generation" in the manual, for more.
  3200. ** Warn about unsupported `simple-format' options.
  3201. The `-Wformat' compilation option now reports unsupported format options
  3202. passed to `simple-format'.
  3203. ** Manual updates
  3204. Besides the sections already mentioned, the following manual sections
  3205. are new in this release: "Modules and the File System", "Module System
  3206. Reflection", "Syntax Transformer Helpers", and "Local Inclusion".
  3207. * New interfaces
  3208. ** (ice-9 session): `apropos-hook'
  3209. ** New print option: `escape-newlines', defaults to #t.
  3210. ** (ice-9 ftw): `file-system-fold', `file-system-tree', `scandir'
  3211. ** `scm_c_value_ref': access to multiple returned values from C
  3212. ** scm_call (a varargs version), scm_call_7, scm_call_8, scm_call_9
  3213. ** Some new syntax helpers in (system syntax)
  3214. Search the manual for these identifiers and modules, for more.
  3215. * Build fixes
  3216. ** FreeBSD build fixes.
  3217. ** OpenBSD compilation fixes.
  3218. ** Solaris 2.10 test suite fixes.
  3219. ** IA64 compilation fix.
  3220. ** MinGW build fixes.
  3221. ** Work around instruction reordering on SPARC and HPPA in the VM.
  3222. ** Gnulib updates: added `dirfd', `setenv' modules.
  3223. * Bug fixes
  3224. ** Add a deprecated alias for $expt.
  3225. ** Add an exception printer for `getaddrinfo-error'.
  3226. ** Add deprecated shim for `scm_display_error' with stack as first argument.
  3227. ** Add warnings for unsupported `simple-format' options.
  3228. ** Allow overlapping regions to be passed to `bytevector-copy!'.
  3229. ** Better function prologue disassembly
  3230. ** Compiler: fix miscompilation of (values foo ...) in some contexts.
  3231. ** Compiler: fix serialization of #nil-terminated lists.
  3232. ** Compiler: allow values bound in non-tail let expressions to be collected.
  3233. ** Deprecate SCM_ASRTGO.
  3234. ** Document invalidity of (begin) as expression; add back-compat shim.
  3235. ** Don't leak file descriptors when mmaping objcode.
  3236. ** Empty substrings no longer reference the original stringbuf.
  3237. ** FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.
  3238. ** FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
  3239. ** FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
  3240. ** FFI: Properly unpack small integer return values in closure call.
  3241. ** Fix R6RS `fold-left' so the accumulator is the first argument.
  3242. ** Fix bit-set*! bug from 2005.
  3243. ** Fix bug in `make-repl' when `lang' is actually a <language>.
  3244. ** Fix bugs related to mutation, the null string, and shared substrings.
  3245. ** Fix <dynwind> serialization.
  3246. ** Fix erroneous check in `set-procedure-properties!'.
  3247. ** Fix generalized-vector-{ref,set!} for slices.
  3248. ** Fix error messages involving definition forms.
  3249. ** Fix primitive-eval to return #<unspecified> for definitions.
  3250. ** HTTP: Extend handling of "Cache-Control" header.
  3251. ** HTTP: Fix qstring writing of cache-extension values
  3252. ** HTTP: Fix validators for various list-style headers.
  3253. ** HTTP: Permit non-date values for Expires header.
  3254. ** HTTP: `write-request-line' writes absolute paths, not absolute URIs.
  3255. ** Hack the port-column of current-output-port after printing a prompt.
  3256. ** Make sure `regexp-quote' tests use Unicode-capable string ports.
  3257. ** Peval: Fix bugs in the new optimizer.
  3258. ** Statistically unique marks and labels, for robust hygiene across sessions.
  3259. ** Web: Allow URIs with empty authorities, like "file:///etc/hosts".
  3260. ** `,language' at REPL sets the current-language fluid.
  3261. ** `primitive-load' returns the value(s) of the last expression.
  3262. ** `scm_from_stringn' always returns unique strings.
  3263. ** `scm_i_substring_copy' tries to narrow the substring.
  3264. ** i18n: Fix gc_malloc/free mismatch on non-GNU systems.
  3265. Changes in 2.0.3 (since 2.0.2):
  3266. * Speed improvements
  3267. ** Guile has a new optimizer, `peval'.
  3268. `Peval' is a partial evaluator that performs constant folding, dead code
  3269. elimination, copy propagation, and inlining. By default it runs on
  3270. every piece of code that Guile compiles, to fold computations that can
  3271. happen at compile-time, so they don't have to happen at runtime.
  3272. If we did our job right, the only impact you would see would be your
  3273. programs getting faster. But if you notice slowdowns or bloated code,
  3274. please send a mail to bug-guile@gnu.org with details.
  3275. Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
  3276. peval and its implementation.
  3277. You can see what peval does on a given piece of code by running the new
  3278. `,optimize' REPL meta-command, and comparing it to the output of
  3279. `,expand'. See "Compile Commands" in the manual, for more.
  3280. ** Fewer calls to `stat'.
  3281. Guile now stats only the .go file and the .scm file when loading a fresh
  3282. compiled file.
  3283. * Notable changes
  3284. ** New module: `(web client)', a simple synchronous web client.
  3285. See "Web Client" in the manual, for more.
  3286. ** Users can now install compiled `.go' files.
  3287. See "Installing Site Packages" in the manual.
  3288. ** Remove Front-Cover and Back-Cover text from the manual.
  3289. The manual is still under the GNU Free Documentation License, but no
  3290. longer has any invariant sections.
  3291. ** More helpful `guild help'.
  3292. `guild' is Guile's multi-tool, for use in shell scripting. Now it has a
  3293. nicer interface for querying the set of existing commands, and getting
  3294. help on those commands. Try it out and see!
  3295. ** New macro: `define-syntax-rule'
  3296. `define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
  3297. one clause. See "Syntax Rules" in the manual, for more.
  3298. ** The `,time' REPL meta-command now has more precision.
  3299. The output of this command now has microsecond precision, instead of
  3300. 10-millisecond precision.
  3301. ** `(ice-9 match)' can now match records.
  3302. See "Pattern Matching" in the manual, for more on matching records.
  3303. ** New module: `(language tree-il debug)'.
  3304. This module provides a tree-il verifier. This is useful for people that
  3305. generate tree-il, usually as part of a language compiler.
  3306. ** New functions: `scm_is_exact', `scm_is_inexact'.
  3307. These provide a nice C interface for Scheme's `exact?' and `inexact?',
  3308. respectively.
  3309. * Bugs fixed
  3310. See the git log (or the ChangeLog) for more details on these bugs.
  3311. ** Fix order of importing modules and resolving duplicates handlers.
  3312. ** Fix a number of bugs involving extended (merged) generics.
  3313. ** Fix invocation of merge-generics duplicate handler.
  3314. ** Fix write beyond array end in arrays.c.
  3315. ** Fix read beyond end of hashtable size array in hashtab.c.
  3316. ** (web http): Locale-independent parsing and serialization of dates.
  3317. ** Ensure presence of Host header in HTTP/1.1 requests.
  3318. ** Fix take-right and drop-right for improper lists.
  3319. ** Fix leak in get_current_locale().
  3320. ** Fix recursive define-inlinable expansions.
  3321. ** Check that srfi-1 procedure arguments are procedures.
  3322. ** Fix r6rs `map' for multiple returns.
  3323. ** Fix scm_tmpfile leak on POSIX platforms.
  3324. ** Fix a couple of leaks (objcode->bytecode, make-boot-program).
  3325. ** Fix guile-lib back-compatibility for module-stexi-documentation.
  3326. ** Fix --listen option to allow other ports.
  3327. ** Fix scm_to_latin1_stringn for substrings.
  3328. ** Fix compilation of untyped arrays of rank not 1.
  3329. ** Fix unparse-tree-il of <dynset>.
  3330. ** Fix reading of #||||#.
  3331. ** Fix segfault in GOOPS when class fields are redefined.
  3332. ** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
  3333. Changes in 2.0.2 (since 2.0.1):
  3334. * Notable changes
  3335. ** `guile-tools' renamed to `guild'
  3336. The new name is shorter. Its intended future use is for a CPAN-like
  3337. system for Guile wizards and journeyfolk to band together to share code;
  3338. hence the name. `guile-tools' is provided as a backward-compatible
  3339. symbolic link. See "Using Guile Tools" in the manual, for more.
  3340. ** New control operators: `shift' and `reset'
  3341. See "Shift and Reset" in the manual, for more information.
  3342. ** `while' as an expression
  3343. Previously the return value of `while' was unspecified. Now its
  3344. values are specified both in the case of normal termination, and via
  3345. termination by invoking `break', possibly with arguments. See "while
  3346. do" in the manual for more.
  3347. ** Disallow access to handles of weak hash tables
  3348. `hash-get-handle' and `hash-create-handle!' are no longer permitted to
  3349. be called on weak hash tables, because the fields in a weak handle could
  3350. be nulled out by the garbage collector at any time, but yet they are
  3351. otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
  3352. instead.
  3353. ** More precision for `get-internal-run-time', `get-internal-real-time'
  3354. On 64-bit systems which support POSIX clocks, Guile's internal timing
  3355. procedures offer nanosecond resolution instead of the 10-millisecond
  3356. resolution previously available. 32-bit systems now use 1-millisecond
  3357. timers.
  3358. ** Guile now measures time spent in GC
  3359. `gc-stats' now returns a meaningful value for `gc-time-taken'.
  3360. ** Add `gcprof'
  3361. The statprof profiler now exports a `gcprof' procedure, driven by the
  3362. `after-gc-hook', to see which parts of your program are causing GC. Let
  3363. us know if you find it useful.
  3364. ** `map', `for-each' and some others now implemented in Scheme
  3365. We would not mention this in NEWS, as it is not a user-visible change,
  3366. if it were not for one thing: `map' and `for-each' are no longer
  3367. primitive generics. Instead they are normal bindings, which can be
  3368. wrapped by normal generics. This fixes some modularity issues between
  3369. core `map', SRFI-1 `map', and GOOPS.
  3370. Also it's pretty cool that we can do this without a performance impact.
  3371. ** Add `scm_peek_byte_or_eof'.
  3372. This helper is like `scm_peek_char_or_eof', but for bytes instead of
  3373. full characters.
  3374. ** Implement #:stop-at-first-non-option option for getopt-long
  3375. See "getopt-long Reference" in the manual, for more information.
  3376. ** Improve R6RS conformance for conditions in the I/O libraries
  3377. The `(rnrs io simple)' module now raises the correct R6RS conditions in
  3378. error cases. `(rnrs io ports)' is also more correct now, though it is
  3379. still a work in progress.
  3380. ** All deprecated routines emit warnings
  3381. A few deprecated routines were lacking deprecation warnings. This has
  3382. been fixed now.
  3383. * Speed improvements
  3384. ** Constants in compiled code now share state better
  3385. Constants with shared state, like `("foo")' and `"foo"', now share state
  3386. as much as possible, in the entire compilation unit. This cuts compiled
  3387. `.go' file sizes in half, generally, and speeds startup.
  3388. ** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
  3389. These procedures are now twice as fast as they were.
  3390. ** UTF-8 ports to bypass `iconv' entirely
  3391. This reduces memory usage in a very common case.
  3392. ** Compiler speedups
  3393. The compiler is now about 40% faster. (Note that this is only the case
  3394. once the compiler is itself compiled, so the build still takes as long
  3395. as it did before.)
  3396. ** VM speed tuning
  3397. Some assertions that were mostly useful for sanity-checks on the
  3398. bytecode compiler are now off for both "regular" and "debug" engines.
  3399. This together with a fix to cache a TLS access and some other tweaks
  3400. improve the VM's performance by about 20%.
  3401. ** SRFI-1 list-set optimizations
  3402. lset-adjoin and lset-union now have fast paths for eq? sets.
  3403. ** `memq', `memv' optimizations
  3404. These procedures are now at least twice as fast than in 2.0.1.
  3405. * Deprecations
  3406. ** Deprecate scm_whash API
  3407. `scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
  3408. `SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
  3409. `scm_whash_insert' are now deprecated. Use the normal hash table API
  3410. instead.
  3411. ** Deprecate scm_struct_table
  3412. `SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
  3413. `SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
  3414. `scm_struct_table', and `scm_struct_create_handle' are now deprecated.
  3415. These routines formed part of the internals of the map between structs
  3416. and classes.
  3417. ** Deprecate scm_internal_dynamic_wind
  3418. The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
  3419. as the `scm_dynwind' API is better, and this API encourages users to
  3420. stuff SCM values into pointers.
  3421. ** Deprecate scm_immutable_cell, scm_immutable_double_cell
  3422. These routines are deprecated, as the GC_STUBBORN API doesn't do
  3423. anything any more.
  3424. * Manual updates
  3425. Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
  3426. ports)' documentation from the R6RS documentation. Thanks Andreas!
  3427. * Bugs fixed
  3428. ** Fix double-loading of script in -ds case
  3429. ** -x error message fix
  3430. ** iconveh-related cross-compilation fixes
  3431. ** Fix small integer return value packing on big endian machines.
  3432. ** Fix hash-set! in weak-value table from non-immediate to immediate
  3433. ** Fix call-with-input-file & relatives for multiple values
  3434. ** Fix `hash' for inf and nan
  3435. ** Fix libguile internal type errors caught by typing-strictness==2
  3436. ** Fix compile error in MinGW fstat socket detection
  3437. ** Fix generation of auto-compiled file names on MinGW
  3438. ** Fix multithreaded access to internal hash tables
  3439. ** Emit a 1-based line number in error messages
  3440. ** Fix define-module ordering
  3441. ** Fix several POSIX functions to use the locale encoding
  3442. ** Add type and range checks to the complex generalized vector accessors
  3443. ** Fix unaligned accesses for bytevectors of complex numbers
  3444. ** Fix '(a #{.} b)
  3445. ** Fix erroneous VM stack overflow for canceled threads
  3446. Changes in 2.0.1 (since 2.0.0):
  3447. * Notable changes
  3448. ** guile.m4 supports linking with rpath
  3449. The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
  3450. include appropriate directives to the linker to include libguile-2.0.so
  3451. in the runtime library lookup path.
  3452. ** `begin' expands macros in its body before other expressions
  3453. This enables support for programs like the following:
  3454. (begin
  3455. (define even?
  3456. (lambda (x)
  3457. (or (= x 0) (odd? (- x 1)))))
  3458. (define-syntax odd?
  3459. (syntax-rules ()
  3460. ((odd? x) (not (even? x)))))
  3461. (even? 10))
  3462. ** REPL reader usability enhancements
  3463. The REPL now flushes input after a read error, which should prevent one
  3464. error from causing other errors. The REPL also now interprets comments
  3465. as whitespace.
  3466. ** REPL output has configurable width
  3467. The REPL now defaults to output with the current terminal's width, in
  3468. columns. See "Debug Commands" in the manual for more information on
  3469. the ,width command.
  3470. ** Better C access to the module system
  3471. Guile now has convenient C accessors to look up variables or values in
  3472. modules and their public interfaces. See `scm_c_public_ref' and friends
  3473. in "Accessing Modules from C" in the manual.
  3474. ** Added `scm_call_5', `scm_call_6'
  3475. See "Fly Evaluation" in the manual.
  3476. ** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
  3477. See "Keyword Procedures" in the manual, for more. Note that
  3478. `scm_from_locale_keyword' should not be used when the name is a C string
  3479. constant.
  3480. ** R6RS unicode and string I/O work
  3481. Added efficient implementations of `get-string-n' and `get-string-n!'
  3482. for binary ports. Exported `current-input-port', `current-output-port'
  3483. and `current-error-port' from `(rnrs io ports)', and enhanced support
  3484. for transcoders.
  3485. ** Added `pointer->scm', `scm->pointer' to `(system foreign)'
  3486. These procedure are useful if one needs to pass and receive SCM values
  3487. to and from foreign functions. See "Foreign Variables" in the manual,
  3488. for more.
  3489. ** Added `heap-allocated-since-gc' to `(gc-stats)'
  3490. Also fixed the long-standing bug in the REPL `,stat' command.
  3491. ** Add `on-error' REPL option
  3492. This option controls what happens when an error occurs at the REPL, and
  3493. defaults to `debug', indicating that Guile should enter the debugger.
  3494. Other values include `report', which will simply print a backtrace
  3495. without entering the debugger. See "System Commands" in the manual.
  3496. ** Enforce immutability of string literals
  3497. Attempting to mutate a string literal now causes a runtime error.
  3498. ** Fix pthread redirection
  3499. Guile 2.0.0 shipped with headers that, if configured with pthread
  3500. support, would re-define `pthread_create', `pthread_join', and other API
  3501. to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
  3502. unintended, and not necessary: because threads must enter Guile with
  3503. `scm_with_guile', Guile can handle thread registration itself, without
  3504. needing to make the GC aware of all threads. This oversight has been
  3505. fixed.
  3506. ** `with-continuation-barrier' now unwinds on `quit'
  3507. A throw to `quit' in a continuation barrier will cause Guile to exit.
  3508. Before, it would do so before unwinding to the barrier, which would
  3509. prevent cleanup handlers from running. This has been fixed so that it
  3510. exits only after unwinding.
  3511. ** `string->pointer' and `pointer->string' have optional encoding arg
  3512. This allows users of the FFI to more easily deal in strings with
  3513. particular (non-locale) encodings, like "utf-8". See "Void Pointers and
  3514. Byte Access" in the manual, for more.
  3515. ** R6RS fixnum arithmetic optimizations
  3516. R6RS fixnum operations are still slower than generic arithmetic,
  3517. however.
  3518. ** New procedure: `define-inlinable'
  3519. See "Inlinable Procedures" in the manual, for more.
  3520. ** New procedure: `exact-integer-sqrt'
  3521. See "Integer Operations" in the manual, for more.
  3522. ** "Extended read syntax" for symbols parses better
  3523. In #{foo}# symbols, backslashes are now treated as escapes, as the
  3524. symbol-printing code intended. Additionally, "\x" within #{foo}# is now
  3525. interpreted as starting an R6RS hex escape. This is backward compatible
  3526. because the symbol printer would never produce a "\x" before. The
  3527. printer also works better too.
  3528. ** Added `--fresh-auto-compile' option
  3529. This allows a user to invalidate the auto-compilation cache. It's
  3530. usually not needed. See "Compilation" in the manual, for a discussion.
  3531. * Manual updates
  3532. ** GOOPS documentation updates
  3533. ** New man page
  3534. Thanks to Mark Harig for improvements to guile.1.
  3535. ** SRFI-23 documented
  3536. The humble `error' SRFI now has an entry in the manual.
  3537. * New modules
  3538. ** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
  3539. ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
  3540. ** `(ice-9 command-line)', not documented yet
  3541. * Bugs fixed
  3542. ** Fixed `iconv_t' memory leak on close-port
  3543. ** Fixed some leaks with weak hash tables
  3544. ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
  3545. ** `after-gc-hook' works again
  3546. ** `define-record-type' now allowed in nested contexts
  3547. ** `exact-integer-sqrt' now handles large integers correctly
  3548. ** Fixed C extension examples in manual
  3549. ** `vhash-delete' honors HASH argument
  3550. ** Make `locale-digit-grouping' more robust
  3551. ** Default exception printer robustness fixes
  3552. ** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
  3553. ** `read' updates line/column numbers when reading SCSH block comments
  3554. ** Fix imports of multiple custom interfaces of same module
  3555. ** Fix encoding scanning for non-seekable ports
  3556. ** Fix `setter' when called with a non-setter generic
  3557. ** Fix f32 and f64 bytevectors to not accept rationals
  3558. ** Fix description of the R6RS `finite?' in manual
  3559. ** Quotient, remainder and modulo accept inexact integers again
  3560. ** Fix `continue' within `while' to take zero arguments
  3561. ** Fix alignment for structures in FFI
  3562. ** Fix port-filename of stdin, stdout, stderr to match the docs
  3563. ** Fix weak hash table-related bug in `define-wrapped-pointer-type'
  3564. ** Fix partial continuation application with pending procedure calls
  3565. ** scm_{to,from}_locale_string use current locale, not current ports
  3566. ** Fix thread cleanup, by using a pthread_key destructor
  3567. ** Fix `quit' at the REPL
  3568. ** Fix a failure to sync regs in vm bytevector ops
  3569. ** Fix (texinfo reflection) to handle nested structures like syntax patterns
  3570. ** Fix stexi->html double translation
  3571. ** Fix tree-il->scheme fix for <prompt>
  3572. ** Fix compilation of <prompt> in <fix> in single-value context
  3573. ** Fix race condition in ensure-writable-dir
  3574. ** Fix error message on ,disassemble "non-procedure"
  3575. ** Fix prompt and abort with the boot evaluator
  3576. ** Fix `procedure->pointer' for functions returning `void'
  3577. ** Fix error reporting in dynamic-pointer
  3578. ** Fix problems detecting coding: in block comments
  3579. ** Fix duplicate load-path and load-compiled-path in compilation environment
  3580. ** Add fallback read(2) suppport for .go files if mmap(2) unavailable
  3581. ** Fix c32vector-set!, c64vector-set!
  3582. ** Fix mistakenly deprecated read syntax for uniform complex vectors
  3583. ** Fix parsing of exact numbers with negative exponents
  3584. ** Ignore SIGPIPE in (system repl server)
  3585. ** Fix optional second arg to R6RS log function
  3586. ** Fix R6RS `assert' to return true value.
  3587. ** Fix fencepost error when seeking in bytevector input ports
  3588. ** Gracefully handle `setlocale' errors when starting the REPL
  3589. ** Improve support of the `--disable-posix' configure option
  3590. ** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
  3591. ** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
  3592. Changes in 2.0.0 (changes since the 1.8.x series):
  3593. * New modules (see the manual for details)
  3594. ** `(srfi srfi-18)', more sophisticated multithreading support
  3595. ** `(srfi srfi-27)', sources of random bits
  3596. ** `(srfi srfi-38)', External Representation for Data With Shared Structure
  3597. ** `(srfi srfi-42)', eager comprehensions
  3598. ** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
  3599. ** `(srfi srfi-67)', compare procedures
  3600. ** `(ice-9 i18n)', internationalization support
  3601. ** `(ice-9 futures)', fine-grain parallelism
  3602. ** `(rnrs bytevectors)', the R6RS bytevector API
  3603. ** `(rnrs io ports)', a subset of the R6RS I/O port API
  3604. ** `(system xref)', a cross-referencing facility (FIXME undocumented)
  3605. ** `(ice-9 vlist)', lists with constant-time random access; hash lists
  3606. ** `(system foreign)', foreign function interface
  3607. ** `(sxml match)', a pattern matcher for SXML
  3608. ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
  3609. ** `(system vm coverage)', a line-by-line code coverage library
  3610. ** `(web uri)', URI data type, parser, and unparser
  3611. ** `(web http)', HTTP header parsers and unparsers
  3612. ** `(web request)', HTTP request data type, reader, and writer
  3613. ** `(web response)', HTTP response data type, reader, and writer
  3614. ** `(web server)', Generic HTTP server
  3615. ** `(ice-9 poll)', a poll wrapper
  3616. ** `(web server http)', HTTP-over-TCP web server implementation
  3617. ** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
  3618. Guile's copy of Andrew K. Wright's `match' library has been replaced by
  3619. a compatible hygienic implementation by Alex Shinn. It is now
  3620. documented, see "Pattern Matching" in the manual.
  3621. Compared to Andrew K. Wright's `match', the new `match' lacks
  3622. `match-define', `match:error-control', `match:set-error-control',
  3623. `match:error', `match:set-error', and all structure-related procedures.
  3624. ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
  3625. The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
  3626. toolkit from Guile-Lib have been imported into Guile proper. See
  3627. "Standard Library" in the manual for more details.
  3628. ** Integration of lalr-scm, a parser generator
  3629. Guile has included Dominique Boucher's fine `lalr-scm' parser generator
  3630. as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
  3631. information.
  3632. * Changes to the stand-alone interpreter
  3633. ** Guile now can compile Scheme to bytecode for a custom virtual machine.
  3634. Compiled code loads much faster than Scheme source code, and runs around
  3635. 3 or 4 times as fast, generating much less garbage in the process.
  3636. ** Evaluating Scheme code does not use the C stack.
  3637. Besides when compiling Guile itself, Guile no longer uses a recursive C
  3638. function as an evaluator. This obviates the need to check the C stack
  3639. pointer for overflow. Continuations still capture the C stack, however.
  3640. ** New environment variables: GUILE_LOAD_COMPILED_PATH,
  3641. GUILE_SYSTEM_LOAD_COMPILED_PATH
  3642. GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
  3643. for source files. It is a different path, however, because compiled
  3644. files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
  3645. GUILE_SYSTEM_PATH.
  3646. ** New read-eval-print loop (REPL) implementation
  3647. Running Guile with no arguments drops the user into the new REPL. See
  3648. "Using Guile Interactively" in the manual, for more information.
  3649. ** Remove old Emacs interface
  3650. Guile had an unused `--emacs' command line argument that was supposed to
  3651. help when running Guile inside Emacs. This option has been removed, and
  3652. the helper functions `named-module-use!' and `load-emacs-interface' have
  3653. been deprecated.
  3654. ** Add `(system repl server)' module and `--listen' command-line argument
  3655. The `(system repl server)' module exposes procedures to listen on
  3656. sockets for connections, and serve REPLs to those clients. The --listen
  3657. command-line argument allows any Guile program to thus be remotely
  3658. debuggable.
  3659. See "Invoking Guile" for more information on `--listen'.
  3660. ** Command line additions
  3661. The guile binary now supports a new switch "-x", which can be used to
  3662. extend the list of filename extensions tried when loading files
  3663. (%load-extensions).
  3664. ** New reader options: `square-brackets', `r6rs-hex-escapes',
  3665. `hungry-eol-escapes'
  3666. The reader supports a new option (changeable via `read-options'),
  3667. `square-brackets', which instructs it to interpret square brackets as
  3668. parentheses. This option is on by default.
  3669. When the new `r6rs-hex-escapes' reader option is enabled, the reader
  3670. will recognize string escape sequences as defined in R6RS. R6RS string
  3671. escape sequences are incompatible with Guile's existing escapes, though,
  3672. so this option is off by default.
  3673. Additionally, Guile follows the R6RS newline escaping rules when the
  3674. `hungry-eol-escapes' option is enabled.
  3675. See "String Syntax" in the manual, for more information.
  3676. ** Function profiling and tracing at the REPL
  3677. The `,profile FORM' REPL meta-command can now be used to statistically
  3678. profile execution of a form, to see which functions are taking the most
  3679. time. See `,help profile' for more information.
  3680. Similarly, `,trace FORM' traces all function applications that occur
  3681. during the execution of `FORM'. See `,help trace' for more information.
  3682. ** Recursive debugging REPL on error
  3683. When Guile sees an error at the REPL, instead of saving the stack, Guile
  3684. will directly enter a recursive REPL in the dynamic context of the
  3685. error. See "Error Handling" in the manual, for more information.
  3686. A recursive REPL is the same as any other REPL, except that it
  3687. has been augmented with debugging information, so that one can inspect
  3688. the context of the error. The debugger has been integrated with the REPL
  3689. via a set of debugging meta-commands.
  3690. For example, one may access a backtrace with `,backtrace' (or
  3691. `,bt'). See "Interactive Debugging" in the manual, for more
  3692. information.
  3693. ** New `guile-tools' commands: `compile', `disassemble'
  3694. Pass the `--help' command-line option to these commands for more
  3695. information.
  3696. ** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
  3697. Users may now install Guile to nonstandard prefixes and just run
  3698. `/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
  3699. include `/path/to/lib'.
  3700. ** Guile's Emacs integration is now more keyboard-friendly
  3701. Backtraces may now be disclosed with the keyboard in addition to the
  3702. mouse.
  3703. ** Load path change: search in version-specific paths before site paths
  3704. When looking for a module, Guile now searches first in Guile's
  3705. version-specific path (the library path), *then* in the site dir. This
  3706. allows Guile's copy of SSAX to override any Guile-Lib copy the user has
  3707. installed. Also it should cut the number of `stat' system calls by half,
  3708. in the common case.
  3709. ** Value history in the REPL on by default
  3710. By default, the REPL will save computed values in variables like `$1',
  3711. `$2', and the like. There are programmatic and interactive interfaces to
  3712. control this. See "Value History" in the manual, for more information.
  3713. ** Readline tab completion for arguments
  3714. When readline is enabled, tab completion works for arguments too, not
  3715. just for the operator position.
  3716. ** Expression-oriented readline history
  3717. Guile's readline history now tries to operate on expressions instead of
  3718. input lines. Let us know what you think!
  3719. ** Interactive Guile follows GNU conventions
  3720. As recommended by the GPL, Guile now shows a brief copyright and
  3721. warranty disclaimer on startup, along with pointers to more information.
  3722. * Changes to Scheme functions and syntax
  3723. ** Support for R6RS libraries
  3724. The `library' and `import' forms from the latest Scheme report have been
  3725. added to Guile, in such a way that R6RS libraries share a namespace with
  3726. Guile modules. R6RS modules may import Guile modules, and are available
  3727. for Guile modules to import via use-modules and all the rest. See "R6RS
  3728. Libraries" in the manual for more information.
  3729. ** Implementations of R6RS libraries
  3730. Guile now has implementations for all of the libraries defined in the
  3731. R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
  3732. Standard Libraries" in the manual for a full list of libraries.
  3733. ** Partial R6RS compatibility
  3734. Guile now has enough support for R6RS to run a reasonably large subset
  3735. of R6RS programs.
  3736. Guile is not fully R6RS compatible. Many incompatibilities are simply
  3737. bugs, though some parts of Guile will remain R6RS-incompatible for the
  3738. foreseeable future. See "R6RS Incompatibilities" in the manual, for more
  3739. information.
  3740. Please contact bug-guile@gnu.org if you have found an issue not
  3741. mentioned in that compatibility list.
  3742. ** New implementation of `primitive-eval'
  3743. Guile's `primitive-eval' is now implemented in Scheme. Actually there is
  3744. still a C evaluator, used when building a fresh Guile to interpret the
  3745. compiler, so we can compile eval.scm. Thereafter all calls to
  3746. primitive-eval are implemented by VM-compiled code.
  3747. This allows all of Guile's procedures, be they interpreted or compiled,
  3748. to execute on the same stack, unifying multiple-value return semantics,
  3749. providing for proper tail recursion between interpreted and compiled
  3750. code, and simplifying debugging.
  3751. As part of this change, the evaluator no longer mutates the internal
  3752. representation of the code being evaluated in a thread-unsafe manner.
  3753. There are two negative aspects of this change, however. First, Guile
  3754. takes a lot longer to compile now. Also, there is less debugging
  3755. information available for debugging interpreted code. We hope to improve
  3756. both of these situations.
  3757. There are many changes to the internal C evalator interface, but all
  3758. public interfaces should be the same. See the ChangeLog for details. If
  3759. we have inadvertantly changed an interface that you were using, please
  3760. contact bug-guile@gnu.org.
  3761. ** Procedure removed: `the-environment'
  3762. This procedure was part of the interpreter's execution model, and does
  3763. not apply to the compiler.
  3764. ** No more `local-eval'
  3765. `local-eval' used to exist so that one could evaluate code in the
  3766. lexical context of a function. Since there is no way to get the lexical
  3767. environment any more, as that concept has no meaning for the compiler,
  3768. and a different meaning for the interpreter, we have removed the
  3769. function.
  3770. If you think you need `local-eval', you should probably implement your
  3771. own metacircular evaluator. It will probably be as fast as Guile's
  3772. anyway.
  3773. ** Scheme source files will now be compiled automatically.
  3774. If a compiled .go file corresponding to a .scm file is not found or is
  3775. not fresh, the .scm file will be compiled on the fly, and the resulting
  3776. .go file stored away. An advisory note will be printed on the console.
  3777. Note that this mechanism depends on the timestamp of the .go file being
  3778. newer than that of the .scm file; if the .scm or .go files are moved
  3779. after installation, care should be taken to preserve their original
  3780. timestamps.
  3781. Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
  3782. directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
  3783. will be created if needed.
  3784. To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
  3785. variable to 0, or pass --no-auto-compile on the Guile command line.
  3786. ** New POSIX procedures: `getrlimit' and `setrlimit'
  3787. Note however that the interface of these functions is likely to change
  3788. in the next prerelease.
  3789. ** New POSIX procedure: `getsid'
  3790. Scheme binding for the `getsid' C library call.
  3791. ** New POSIX procedure: `getaddrinfo'
  3792. Scheme binding for the `getaddrinfo' C library function.
  3793. ** Multicast socket options
  3794. Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
  3795. options. See "Network Sockets and Communication" in the manual, for
  3796. more information.
  3797. ** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
  3798. These socket procedures now take bytevectors as arguments, instead of
  3799. strings. There is some deprecated string support, however.
  3800. ** New GNU procedures: `setaffinity' and `getaffinity'.
  3801. See "Processes" in the manual, for more information.
  3802. ** New procedures: `compose', `negate', and `const'
  3803. See "Higher-Order Functions" in the manual, for more information.
  3804. ** New procedure in `(oops goops)': `method-formals'
  3805. ** New procedures in (ice-9 session): `add-value-help-handler!',
  3806. `remove-value-help-handler!', `add-name-help-handler!'
  3807. `remove-name-help-handler!', `procedure-arguments'
  3808. The value and name help handlers provide some minimal extensibility to
  3809. the help interface. Guile-lib's `(texinfo reflection)' uses them, for
  3810. example, to make stexinfo help documentation available. See those
  3811. procedures' docstrings for more information.
  3812. `procedure-arguments' describes the arguments that a procedure can take,
  3813. combining arity and formals. For example:
  3814. (procedure-arguments resolve-interface)
  3815. => ((required . (name)) (rest . args))
  3816. Additionally, `module-commentary' is now publicly exported from
  3817. `(ice-9 session).
  3818. ** Removed: `procedure->memoizing-macro', `procedure->syntax'
  3819. These procedures created primitive fexprs for the old evaluator, and are
  3820. no longer supported. If you feel that you need these functions, you
  3821. probably need to write your own metacircular evaluator (which will
  3822. probably be as fast as Guile's, anyway).
  3823. ** New language: ECMAScript
  3824. Guile now ships with one other high-level language supported,
  3825. ECMAScript. The goal is to support all of version 3.1 of the standard,
  3826. but not all of the libraries are there yet. This support is not yet
  3827. documented; ask on the mailing list if you are interested.
  3828. ** New language: Brainfuck
  3829. Brainfuck is a toy language that closely models Turing machines. Guile's
  3830. brainfuck compiler is meant to be an example of implementing other
  3831. languages. See the manual for details, or
  3832. http://en.wikipedia.org/wiki/Brainfuck for more information about the
  3833. Brainfuck language itself.
  3834. ** New language: Elisp
  3835. Guile now has an experimental Emacs Lisp compiler and runtime. You can
  3836. now switch to Elisp at the repl: `,language elisp'. All kudos to Daniel
  3837. Kraft and Brian Templeton, and all bugs to bug-guile@gnu.org.
  3838. ** Better documentation infrastructure for macros
  3839. It is now possible to introspect on the type of a macro, e.g.
  3840. syntax-rules, identifier-syntax, etc, and extract information about that
  3841. macro, such as the syntax-rules patterns or the defmacro arguments.
  3842. `(texinfo reflection)' takes advantage of this to give better macro
  3843. documentation.
  3844. ** Support for arbitrary procedure metadata
  3845. Building on its support for docstrings, Guile now supports multiple
  3846. docstrings, adding them to the tail of a compiled procedure's
  3847. properties. For example:
  3848. (define (foo)
  3849. "one"
  3850. "two"
  3851. 3)
  3852. (procedure-properties foo)
  3853. => ((name . foo) (documentation . "one") (documentation . "two"))
  3854. Also, vectors of pairs are now treated as additional metadata entries:
  3855. (define (bar)
  3856. #((quz . #f) (docstring . "xyzzy"))
  3857. 3)
  3858. (procedure-properties bar)
  3859. => ((name . bar) (quz . #f) (docstring . "xyzzy"))
  3860. This allows arbitrary literals to be embedded as metadata in a compiled
  3861. procedure.
  3862. ** The psyntax expander now knows how to interpret the @ and @@ special
  3863. forms.
  3864. ** The psyntax expander is now hygienic with respect to modules.
  3865. Free variables in a macro are scoped in the module that the macro was
  3866. defined in, not in the module the macro is used in. For example, code
  3867. like this works now:
  3868. (define-module (foo) #:export (bar))
  3869. (define (helper x) ...)
  3870. (define-syntax bar
  3871. (syntax-rules () ((_ x) (helper x))))
  3872. (define-module (baz) #:use-module (foo))
  3873. (bar qux)
  3874. It used to be you had to export `helper' from `(foo)' as well.
  3875. Thankfully, this has been fixed.
  3876. ** Support for version information in Guile's `module' form
  3877. Guile modules now have a `#:version' field. See "R6RS Version
  3878. References", "General Information about Modules", "Using Guile Modules",
  3879. and "Creating Guile Modules" in the manual for more information.
  3880. ** Support for renaming bindings on module export
  3881. Wherever Guile accepts a symbol as an argument to specify a binding to
  3882. export, it now also accepts a pair of symbols, indicating that a binding
  3883. should be renamed on export. See "Creating Guile Modules" in the manual
  3884. for more information.
  3885. ** New procedure: `module-export-all!'
  3886. This procedure exports all current and future bindings from a module.
  3887. Use as `(module-export-all! (current-module))'.
  3888. ** New procedure `reload-module', and `,reload' REPL command
  3889. See "Module System Reflection" and "Module Commands" in the manual, for
  3890. more information.
  3891. ** `eval-case' has been deprecated, and replaced by `eval-when'.
  3892. The semantics of `eval-when' are easier to understand. See "Eval When"
  3893. in the manual, for more information.
  3894. ** Guile is now more strict about prohibiting definitions in expression
  3895. contexts.
  3896. Although previous versions of Guile accepted it, the following
  3897. expression is not valid, in R5RS or R6RS:
  3898. (if test (define foo 'bar) (define foo 'baz))
  3899. In this specific case, it would be better to do:
  3900. (define foo (if test 'bar 'baz))
  3901. It is possible to circumvent this restriction with e.g.
  3902. `(module-define! (current-module) 'foo 'baz)'. Contact the list if you
  3903. have any questions.
  3904. ** Support for `letrec*'
  3905. Guile now supports `letrec*', a recursive lexical binding operator in
  3906. which the identifiers are bound in order. See "Local Bindings" in the
  3907. manual, for more details.
  3908. ** Internal definitions now expand to `letrec*'
  3909. Following the R6RS, internal definitions now expand to letrec* instead
  3910. of letrec. The following program is invalid for R5RS, but valid for
  3911. R6RS:
  3912. (define (foo)
  3913. (define bar 10)
  3914. (define baz (+ bar 20))
  3915. baz)
  3916. ;; R5RS and Guile <= 1.8:
  3917. (foo) => Unbound variable: bar
  3918. ;; R6RS and Guile >= 2.0:
  3919. (foo) => 30
  3920. This change should not affect correct R5RS programs, or programs written
  3921. in earlier Guile dialects.
  3922. ** Macro expansion produces structures instead of s-expressions
  3923. In the olden days, macroexpanding an s-expression would yield another
  3924. s-expression. Though the lexical variables were renamed, expansions of
  3925. core forms like `if' and `begin' were still non-hygienic, as they relied
  3926. on the toplevel definitions of `if' et al being the conventional ones.
  3927. The solution is to expand to structures instead of s-expressions. There
  3928. is an `if' structure, a `begin' structure, a `toplevel-ref' structure,
  3929. etc. The expander already did this for compilation, producing Tree-IL
  3930. directly; it has been changed now to do so when expanding for the
  3931. evaluator as well.
  3932. ** Defmacros must now produce valid Scheme expressions.
  3933. It used to be that defmacros could unquote in Scheme values, as a way of
  3934. supporting partial evaluation, and avoiding some hygiene issues. For
  3935. example:
  3936. (define (helper x) ...)
  3937. (define-macro (foo bar)
  3938. `(,helper ,bar))
  3939. Assuming this macro is in the `(baz)' module, the direct translation of
  3940. this code would be:
  3941. (define (helper x) ...)
  3942. (define-macro (foo bar)
  3943. `((@@ (baz) helper) ,bar))
  3944. Of course, one could just use a hygienic macro instead:
  3945. (define-syntax foo
  3946. (syntax-rules ()
  3947. ((_ bar) (helper bar))))
  3948. ** Guile's psyntax now supports docstrings and internal definitions.
  3949. The following Scheme is not strictly legal:
  3950. (define (foo)
  3951. "bar"
  3952. (define (baz) ...)
  3953. (baz))
  3954. However its intent is fairly clear. Guile interprets "bar" to be the
  3955. docstring of `foo', and the definition of `baz' is still in definition
  3956. context.
  3957. ** Support for settable identifier syntax
  3958. Following the R6RS, "variable transformers" are settable
  3959. identifier-syntax. See "Identifier macros" in the manual, for more
  3960. information.
  3961. ** syntax-case treats `_' as a placeholder
  3962. Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
  3963. anything, and binds no pattern variables. Unlike the R6RS, Guile also
  3964. permits `_' to be in the literals list for a pattern.
  3965. ** Macros need to be defined before their first use.
  3966. It used to be that with lazy memoization, this might work:
  3967. (define (foo x)
  3968. (ref x))
  3969. (define-macro (ref x) x)
  3970. (foo 1) => 1
  3971. But now, the body of `foo' is interpreted to mean a call to the toplevel
  3972. `ref' function, instead of a macro expansion. The solution is to define
  3973. macros before code that uses them.
  3974. ** Functions needed by macros at expand-time need to be present at
  3975. expand-time.
  3976. For example, this code will work at the REPL:
  3977. (define (double-helper x) (* x x))
  3978. (define-macro (double-literal x) (double-helper x))
  3979. (double-literal 2) => 4
  3980. But it will not work when a file is compiled, because the definition of
  3981. `double-helper' is not present at expand-time. The solution is to wrap
  3982. the definition of `double-helper' in `eval-when':
  3983. (eval-when (load compile eval)
  3984. (define (double-helper x) (* x x)))
  3985. (define-macro (double-literal x) (double-helper x))
  3986. (double-literal 2) => 4
  3987. See the documentation for eval-when for more information.
  3988. ** `macroexpand' produces structures, not S-expressions.
  3989. Given the need to maintain referential transparency, both lexically and
  3990. modular, the result of expanding Scheme expressions is no longer itself
  3991. an s-expression. If you want a human-readable approximation of the
  3992. result of `macroexpand', call `tree-il->scheme' from `(language
  3993. tree-il)'.
  3994. ** Removed function: `macroexpand-1'
  3995. It is unclear how to implement `macroexpand-1' with syntax-case, though
  3996. PLT Scheme does prove that it is possible.
  3997. ** New reader macros: #' #` #, #,@
  3998. These macros translate, respectively, to `syntax', `quasisyntax',
  3999. `unsyntax', and `unsyntax-splicing'. See the R6RS for more information.
  4000. These reader macros may be overridden by `read-hash-extend'.
  4001. ** Incompatible change to #'
  4002. Guile did have a #' hash-extension, by default, which just returned the
  4003. subsequent datum: #'foo => foo. In the unlikely event that anyone
  4004. actually used this, this behavior may be reinstated via the
  4005. `read-hash-extend' mechanism.
  4006. ** `unquote' and `unquote-splicing' accept multiple expressions
  4007. As per the R6RS, these syntax operators can now accept any number of
  4008. expressions to unquote.
  4009. ** Scheme expresssions may be commented out with #;
  4010. #; comments out an entire expression. See SRFI-62 or the R6RS for more
  4011. information.
  4012. ** Prompts: Delimited, composable continuations
  4013. Guile now has prompts as part of its primitive language. See "Prompts"
  4014. in the manual, for more information.
  4015. Expressions entered in at the REPL, or from the command line, are
  4016. surrounded by a prompt with the default prompt tag.
  4017. ** `make-stack' with a tail-called procedural narrowing argument no longer
  4018. works (with compiled procedures)
  4019. It used to be the case that a captured stack could be narrowed to select
  4020. calls only up to or from a certain procedure, even if that procedure
  4021. already tail-called another procedure. This was because the debug
  4022. information from the original procedure was kept on the stack.
  4023. Now with the new compiler, the stack only contains active frames from
  4024. the current continuation. A narrow to a procedure that is not in the
  4025. stack will result in an empty stack. To fix this, narrow to a procedure
  4026. that is active in the current continuation, or narrow to a specific
  4027. number of stack frames.
  4028. ** Backtraces through compiled procedures only show procedures that are
  4029. active in the current continuation
  4030. Similarly to the previous issue, backtraces in compiled code may be
  4031. different from backtraces in interpreted code. There are no semantic
  4032. differences, however. Please mail bug-guile@gnu.org if you see any
  4033. deficiencies with Guile's backtraces.
  4034. ** `positions' reader option enabled by default
  4035. This change allows primitive-load without --auto-compile to also
  4036. propagate source information through the expander, for better errors and
  4037. to let macros know their source locations. The compiler was already
  4038. turning it on anyway.
  4039. ** New macro: `current-source-location'
  4040. The macro returns the current source location (to be documented).
  4041. ** syntax-rules and syntax-case macros now propagate source information
  4042. through to the expanded code
  4043. This should result in better backtraces.
  4044. ** The currying behavior of `define' has been removed.
  4045. Before, `(define ((f a) b) (* a b))' would translate to
  4046. (define f (lambda (a) (lambda (b) (* a b))))
  4047. Now a syntax error is signaled, as this syntax is not supported by
  4048. default. Use the `(ice-9 curried-definitions)' module to get back the
  4049. old behavior.
  4050. ** New procedure, `define!'
  4051. `define!' is a procedure that takes two arguments, a symbol and a value,
  4052. and binds the value to the symbol in the current module. It's useful to
  4053. programmatically make definitions in the current module, and is slightly
  4054. less verbose than `module-define!'.
  4055. ** All modules have names now
  4056. Before, you could have anonymous modules: modules without names. Now,
  4057. because of hygiene and macros, all modules have names. If a module was
  4058. created without a name, the first time `module-name' is called on it, a
  4059. fresh name will be lazily generated for it.
  4060. ** The module namespace is now separate from the value namespace
  4061. It was a little-known implementation detail of Guile's module system
  4062. that it was built on a single hierarchical namespace of values -- that
  4063. if there was a module named `(foo bar)', then in the module named
  4064. `(foo)' there was a binding from `bar' to the `(foo bar)' module.
  4065. This was a neat trick, but presented a number of problems. One problem
  4066. was that the bindings in a module were not apparent from the module
  4067. itself; perhaps the `(foo)' module had a private binding for `bar', and
  4068. then an external contributor defined `(foo bar)'. In the end there can
  4069. be only one binding, so one of the two will see the wrong thing, and
  4070. produce an obtuse error of unclear provenance.
  4071. Also, the public interface of a module was also bound in the value
  4072. namespace, as `%module-public-interface'. This was a hack from the early
  4073. days of Guile's modules.
  4074. Both of these warts have been fixed by the addition of fields in the
  4075. `module' data type. Access to modules and their interfaces from the
  4076. value namespace has been deprecated, and all accessors use the new
  4077. record accessors appropriately.
  4078. When Guile is built with support for deprecated code, as is the default,
  4079. the value namespace is still searched for modules and public interfaces,
  4080. and a deprecation warning is raised as appropriate.
  4081. Finally, to support lazy loading of modules as one used to be able to do
  4082. with module binder procedures, Guile now has submodule binders, called
  4083. if a given submodule is not found. See boot-9.scm for more information.
  4084. ** New procedures: module-ref-submodule, module-define-submodule,
  4085. nested-ref-module, nested-define-module!, local-ref-module,
  4086. local-define-module
  4087. These new accessors are like their bare variants, but operate on
  4088. namespaces instead of values.
  4089. ** The (app modules) module tree is officially deprecated
  4090. It used to be that one could access a module named `(foo bar)' via
  4091. `(nested-ref the-root-module '(app modules foo bar))'. The `(app
  4092. modules)' bit was a never-used and never-documented abstraction, and has
  4093. been deprecated. See the following mail for a full discussion:
  4094. http://lists.gnu.org/archive/html/guile-devel/2010-04/msg00168.html
  4095. The `%app' binding is also deprecated.
  4096. ** `module-filename' field and accessor
  4097. Modules now record the file in which they are defined. This field may be
  4098. accessed with the new `module-filename' procedure.
  4099. ** Modules load within a known environment
  4100. It takes a few procedure calls to define a module, and those procedure
  4101. calls need to be in scope. Now we ensure that the current module when
  4102. loading a module is one that has the needed bindings, instead of relying
  4103. on chance.
  4104. ** `load' is a macro (!) that resolves paths relative to source file dir
  4105. The familiar Scheme `load' procedure is now a macro that captures the
  4106. name of the source file being expanded, and dispatches to the new
  4107. `load-in-vicinity'. Referencing `load' by bare name returns a closure
  4108. that embeds the current source file name.
  4109. This fix allows `load' of relative paths to be resolved with respect to
  4110. the location of the file that calls `load'.
  4111. ** Many syntax errors have different texts now
  4112. Syntax errors still throw to the `syntax-error' key, but the arguments
  4113. are often different now. Perhaps in the future, Guile will switch to
  4114. using standard SRFI-35 conditions.
  4115. ** Returning multiple values to compiled code will silently truncate the
  4116. values to the expected number
  4117. For example, the interpreter would raise an error evaluating the form,
  4118. `(+ (values 1 2) (values 3 4))', because it would see the operands as
  4119. being two compound "values" objects, to which `+' does not apply.
  4120. The compiler, on the other hand, receives multiple values on the stack,
  4121. not as a compound object. Given that it must check the number of values
  4122. anyway, if too many values are provided for a continuation, it chooses
  4123. to truncate those values, effectively evaluating `(+ 1 3)' instead.
  4124. The idea is that the semantics that the compiler implements is more
  4125. intuitive, and the use of the interpreter will fade out with time.
  4126. This behavior is allowed both by the R5RS and the R6RS.
  4127. ** Multiple values in compiled code are not represented by compound
  4128. objects
  4129. This change may manifest itself in the following situation:
  4130. (let ((val (foo))) (do-something) val)
  4131. In the interpreter, if `foo' returns multiple values, multiple values
  4132. are produced from the `let' expression. In the compiler, those values
  4133. are truncated to the first value, and that first value is returned. In
  4134. the compiler, if `foo' returns no values, an error will be raised, while
  4135. the interpreter would proceed.
  4136. Both of these behaviors are allowed by R5RS and R6RS. The compiler's
  4137. behavior is more correct, however. If you wish to preserve a potentially
  4138. multiply-valued return, you will need to set up a multiple-value
  4139. continuation, using `call-with-values'.
  4140. ** Defmacros are now implemented in terms of syntax-case.
  4141. The practical ramification of this is that the `defmacro?' predicate has
  4142. been removed, along with `defmacro-transformer', `macro-table',
  4143. `xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and
  4144. `defmacro:transformer'. This is because defmacros are simply macros. If
  4145. any of these procedures provided useful facilities to you, we encourage
  4146. you to contact the Guile developers.
  4147. ** Hygienic macros documented as the primary syntactic extension mechanism.
  4148. The macro documentation was finally fleshed out with some documentation
  4149. on `syntax-rules' and `syntax-case' macros, and other parts of the macro
  4150. expansion process. See "Macros" in the manual, for details.
  4151. ** psyntax is now the default expander
  4152. Scheme code is now expanded by default by the psyntax hygienic macro
  4153. expander. Expansion is performed completely before compilation or
  4154. interpretation.
  4155. Notably, syntax errors will be signaled before interpretation begins.
  4156. In the past, many syntax errors were only detected at runtime if the
  4157. code in question was memoized.
  4158. As part of its expansion, psyntax renames all lexically-bound
  4159. identifiers. Original identifier names are preserved and given to the
  4160. compiler, but the interpreter will see the renamed variables, e.g.,
  4161. `x432' instead of `x'.
  4162. Note that the psyntax that Guile uses is a fork, as Guile already had
  4163. modules before incompatible modules were added to psyntax -- about 10
  4164. years ago! Thus there are surely a number of bugs that have been fixed
  4165. in psyntax since then. If you find one, please notify bug-guile@gnu.org.
  4166. ** syntax-rules and syntax-case are available by default.
  4167. There is no longer any need to import the `(ice-9 syncase)' module
  4168. (which is now deprecated). The expander may be invoked directly via
  4169. `macroexpand', though it is normally searched for via the current module
  4170. transformer.
  4171. Also, the helper routines for syntax-case are available in the default
  4172. environment as well: `syntax->datum', `datum->syntax',
  4173. `bound-identifier=?', `free-identifier=?', `generate-temporaries',
  4174. `identifier?', and `syntax-violation'. See the R6RS for documentation.
  4175. ** Tail patterns in syntax-case
  4176. Guile has pulled in some more recent changes from the psyntax portable
  4177. syntax expander, to implement support for "tail patterns". Such patterns
  4178. are supported by syntax-rules and syntax-case. This allows a syntax-case
  4179. match clause to have ellipses, then a pattern at the end. For example:
  4180. (define-syntax case
  4181. (syntax-rules (else)
  4182. ((_ val match-clause ... (else e e* ...))
  4183. [...])))
  4184. Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
  4185. tail pattern for the else clause. Thanks to Andreas Rottmann for the
  4186. patch, and Kent Dybvig for the code.
  4187. ** Lexical bindings introduced by hygienic macros may not be referenced
  4188. by nonhygienic macros.
  4189. If a lexical binding is introduced by a hygienic macro, it may not be
  4190. referenced by a nonhygienic macro. For example, this works:
  4191. (let ()
  4192. (define-macro (bind-x val body)
  4193. `(let ((x ,val)) ,body))
  4194. (define-macro (ref x)
  4195. x)
  4196. (bind-x 10 (ref x)))
  4197. But this does not:
  4198. (let ()
  4199. (define-syntax bind-x
  4200. (syntax-rules ()
  4201. ((_ val body) (let ((x val)) body))))
  4202. (define-macro (ref x)
  4203. x)
  4204. (bind-x 10 (ref x)))
  4205. It is not normal to run into this situation with existing code. However,
  4206. if you have defmacros that expand to hygienic macros, it is possible to
  4207. run into situations like this. For example, if you have a defmacro that
  4208. generates a `while' expression, the `break' bound by the `while' may not
  4209. be visible within other parts of your defmacro. The solution is to port
  4210. from defmacros to syntax-rules or syntax-case.
  4211. ** Macros may no longer be referenced as first-class values.
  4212. In the past, you could evaluate e.g. `if', and get its macro value. Now,
  4213. expanding this form raises a syntax error.
  4214. Macros still /exist/ as first-class values, but they must be
  4215. /referenced/ via the module system, e.g. `(module-ref (current-module)
  4216. 'if)'.
  4217. ** Macros may now have docstrings.
  4218. `object-documentation' from `(ice-9 documentation)' may be used to
  4219. retrieve the docstring, once you have a macro value -- but see the above
  4220. note about first-class macros. Docstrings are associated with the syntax
  4221. transformer procedures.
  4222. ** `case-lambda' is now available in the default environment.
  4223. The binding in the default environment is equivalent to the one from the
  4224. `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
  4225. to maintain compatibility with Guile 1.8 and earlier.
  4226. ** Procedures may now have more than one arity.
  4227. This can be the case, for example, in case-lambda procedures. The
  4228. arities of compiled procedures may be accessed via procedures from the
  4229. `(system vm program)' module; see "Compiled Procedures", "Optional
  4230. Arguments", and "Case-lambda" in the manual.
  4231. ** Deprecate arity access via (procedure-properties proc 'arity)
  4232. Instead of accessing a procedure's arity as a property, use the new
  4233. `procedure-minimum-arity' function, which gives the most permissive
  4234. arity that the function has, in the same format as the old arity
  4235. accessor.
  4236. ** `lambda*' and `define*' are now available in the default environment
  4237. As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
  4238. compatibility purposes. No semantic change has been made (we hope).
  4239. Optional and keyword arguments now dispatch via special VM operations,
  4240. without the need to cons rest arguments, making them very fast.
  4241. ** New syntax: define-once
  4242. `define-once' is like Lisp's `defvar': it creates a toplevel binding,
  4243. but only if one does not exist already.
  4244. ** New function, `truncated-print', with `format' support
  4245. `(ice-9 pretty-print)' now exports `truncated-print', a printer that
  4246. will ensure that the output stays within a certain width, truncating the
  4247. output in what is hopefully an intelligent manner. See the manual for
  4248. more details.
  4249. There is a new `format' specifier, `~@y', for doing a truncated
  4250. print (as opposed to `~y', which does a pretty-print). See the `format'
  4251. documentation for more details.
  4252. ** Better pretty-printing
  4253. Indentation recognizes more special forms, like `syntax-case', and read
  4254. macros like `quote' are printed better.
  4255. ** Passing a number as the destination of `format' is deprecated
  4256. The `format' procedure in `(ice-9 format)' now emits a deprecation
  4257. warning if a number is passed as its first argument.
  4258. Also, it used to be that you could omit passing a port to `format', in
  4259. some cases. This still works, but has been formally deprecated.
  4260. ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
  4261. Guile now implements SRFI-4 vectors using bytevectors. Often when you
  4262. have a numeric vector, you end up wanting to write its bytes somewhere,
  4263. or have access to the underlying bytes, or read in bytes from somewhere
  4264. else. Bytevectors are very good at this sort of thing. But the SRFI-4
  4265. APIs are nicer to use when doing number-crunching, because they are
  4266. addressed by element and not by byte.
  4267. So as a compromise, Guile allows all bytevector functions to operate on
  4268. numeric vectors. They address the underlying bytes in the native
  4269. endianness, as one would expect.
  4270. Following the same reasoning, that it's just bytes underneath, Guile
  4271. also allows uniform vectors of a given type to be accessed as if they
  4272. were of any type. One can fill a u32vector, and access its elements with
  4273. u8vector-ref. One can use f64vector-ref on bytevectors. It's all the
  4274. same to Guile.
  4275. In this way, uniform numeric vectors may be written to and read from
  4276. input/output ports using the procedures that operate on bytevectors.
  4277. Calls to SRFI-4 accessors (ref and set functions) from Scheme are now
  4278. inlined to the VM instructions for bytevector access.
  4279. See "SRFI-4" in the manual, for more information.
  4280. ** Nonstandard SRFI-4 procedures now available from `(srfi srfi-4 gnu)'
  4281. Guile's `(srfi srfi-4)' now only exports those srfi-4 procedures that
  4282. are part of the standard. Complex uniform vectors and the
  4283. `any->FOOvector' family are now available only from `(srfi srfi-4 gnu)'.
  4284. Guile's default environment imports `(srfi srfi-4)', and probably should
  4285. import `(srfi srfi-4 gnu)' as well.
  4286. See "SRFI-4 Extensions" in the manual, for more information.
  4287. ** New syntax: include-from-path.
  4288. `include-from-path' is like `include', except it looks for its file in
  4289. the load path. It can be used to compile other files into a file.
  4290. ** New syntax: quasisyntax.
  4291. `quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
  4292. documentation for more information. Thanks to Andre van Tonder for the
  4293. implementation.
  4294. ** `*unspecified*' is identifier syntax
  4295. `*unspecified*' is no longer a variable, so it is optimized properly by
  4296. the compiler, and is not `set!'-able.
  4297. ** Changes and bugfixes in numerics code
  4298. *** Added six new sets of fast quotient and remainder operators
  4299. Added six new sets of fast quotient and remainder operator pairs with
  4300. different semantics than the R5RS operators. They support not only
  4301. integers, but all reals, including exact rationals and inexact
  4302. floating point numbers.
  4303. These procedures accept two real numbers N and D, where the divisor D
  4304. must be non-zero. Each set of operators computes an integer quotient
  4305. Q and a real remainder R such that N = Q*D + R and |R| < |D|. They
  4306. differ only in how N/D is rounded to produce Q.
  4307. `euclidean-quotient' returns the integer Q and `euclidean-remainder'
  4308. returns the real R such that N = Q*D + R and 0 <= R < |D|. `euclidean/'
  4309. returns both Q and R, and is more efficient than computing each
  4310. separately. Note that when D > 0, `euclidean-quotient' returns
  4311. floor(N/D), and when D < 0 it returns ceiling(N/D).
  4312. `centered-quotient', `centered-remainder', and `centered/' are similar
  4313. except that the range of remainders is -abs(D/2) <= R < abs(D/2), and
  4314. `centered-quotient' rounds N/D to the nearest integer. Note that these
  4315. operators are equivalent to the R6RS integer division operators `div',
  4316. `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.
  4317. `floor-quotient' and `floor-remainder' compute Q and R, respectively,
  4318. where Q has been rounded toward negative infinity. `floor/' returns
  4319. both Q and R, and is more efficient than computing each separately.
  4320. Note that when applied to integers, `floor-remainder' is equivalent to
  4321. the R5RS integer-only `modulo' operator. `ceiling-quotient',
  4322. `ceiling-remainder', and `ceiling/' are similar except that Q is
  4323. rounded toward positive infinity.
  4324. For `truncate-quotient', `truncate-remainder', and `truncate/', Q is
  4325. rounded toward zero. Note that when applied to integers,
  4326. `truncate-quotient' and `truncate-remainder' are equivalent to the
  4327. R5RS integer-only operators `quotient' and `remainder'.
  4328. For `round-quotient', `round-remainder', and `round/', Q is rounded to
  4329. the nearest integer, with ties going to the nearest even integer.
  4330. *** Complex number changes
  4331. Guile is now able to represent non-real complex numbers whose
  4332. imaginary part is an _inexact_ zero (0.0 or -0.0), per R6RS.
  4333. Previously, such numbers were immediately changed into inexact reals.
  4334. (real? 0.0+0.0i) now returns #f, per R6RS, although (zero? 0.0+0.0i)
  4335. still returns #t, per R6RS. (= 0 0.0+0.0i) and (= 0.0 0.0+0.0i) are
  4336. #t, but the same comparisons using `eqv?' or `equal?' are #f.
  4337. Like other non-real numbers, these complex numbers with inexact zero
  4338. imaginary part will raise exceptions is passed to procedures requiring
  4339. reals, such as `<', `>', `<=', `>=', `min', `max', `positive?',
  4340. `negative?', `inf?', `nan?', `finite?', etc.
  4341. **** `make-rectangular' changes
  4342. scm_make_rectangular `make-rectangular' now returns a real number only
  4343. if the imaginary part is an _exact_ 0. Previously, it would return a
  4344. real number if the imaginary part was an inexact zero.
  4345. scm_c_make_rectangular now always returns a non-real complex number,
  4346. even if the imaginary part is zero. Previously, it would return a
  4347. real number if the imaginary part was zero.
  4348. **** `make-polar' changes
  4349. scm_make_polar `make-polar' now returns a real number only if the
  4350. angle or magnitude is an _exact_ 0. If the magnitude is an exact 0,
  4351. it now returns an exact 0. Previously, it would return a real
  4352. number if the imaginary part was an inexact zero.
  4353. scm_c_make_polar now always returns a non-real complex number, even if
  4354. the imaginary part is 0.0. Previously, it would return a real number
  4355. if the imaginary part was 0.0.
  4356. **** `imag-part' changes
  4357. scm_imag_part `imag-part' now returns an exact 0 if applied to an
  4358. inexact real number. Previously it returned an inexact zero in this
  4359. case.
  4360. *** `eqv?' and `equal?' now compare numbers equivalently
  4361. scm_equal_p `equal?' now behaves equivalently to scm_eqv_p `eqv?' for
  4362. numeric values, per R5RS. Previously, equal? worked differently,
  4363. e.g. `(equal? 0.0 -0.0)' returned #t but `(eqv? 0.0 -0.0)' returned #f,
  4364. and `(equal? +nan.0 +nan.0)' returned #f but `(eqv? +nan.0 +nan.0)'
  4365. returned #t.
  4366. *** `(equal? +nan.0 +nan.0)' now returns #t
  4367. Previously, `(equal? +nan.0 +nan.0)' returned #f, although
  4368. `(let ((x +nan.0)) (equal? x x))' and `(eqv? +nan.0 +nan.0)'
  4369. both returned #t. R5RS requires that `equal?' behave like
  4370. `eqv?' when comparing numbers.
  4371. *** Change in handling products `*' involving exact 0
  4372. scm_product `*' now handles exact 0 differently. A product containing
  4373. an exact 0 now returns an exact 0 if and only if the other arguments
  4374. are all exact. An inexact zero is returned if and only if the other
  4375. arguments are all finite but not all exact. If an infinite or NaN
  4376. value is present, a NaN value is returned. Previously, any product
  4377. containing an exact 0 yielded an exact 0, regardless of the other
  4378. arguments.
  4379. *** `expt' and `integer-expt' changes when the base is 0
  4380. While `(expt 0 0)' is still 1, and `(expt 0 N)' for N > 0 is still
  4381. zero, `(expt 0 N)' for N < 0 is now a NaN value, and likewise for
  4382. integer-expt. This is more correct, and conforming to R6RS, but seems
  4383. to be incompatible with R5RS, which would return 0 for all non-zero
  4384. values of N.
  4385. *** `expt' and `integer-expt' are more generic, less strict
  4386. When raising to an exact non-negative integer exponent, `expt' and
  4387. `integer-expt' are now able to exponentiate any object that can be
  4388. multiplied using `*'. They can also raise an object to an exact
  4389. negative integer power if its reciprocal can be taken using `/'.
  4390. In order to allow this, the type of the first argument is no longer
  4391. checked when raising to an exact integer power. If the exponent is 0
  4392. or 1, the first parameter is not manipulated at all, and need not
  4393. even support multiplication.
  4394. *** Infinities are no longer integers, nor rationals
  4395. scm_integer_p `integer?' and scm_rational_p `rational?' now return #f
  4396. for infinities, per R6RS. Previously they returned #t for real
  4397. infinities. The real infinities and NaNs are still considered real by
  4398. scm_real `real?' however, per R6RS.
  4399. *** NaNs are no longer rationals
  4400. scm_rational_p `rational?' now returns #f for NaN values, per R6RS.
  4401. Previously it returned #t for real NaN values. They are still
  4402. considered real by scm_real `real?' however, per R6RS.
  4403. *** `inf?' and `nan?' now throw exceptions for non-reals
  4404. The domain of `inf?' and `nan?' is the real numbers. Guile now signals
  4405. an error when a non-real number or non-number is passed to these
  4406. procedures. (Note that NaNs _are_ considered numbers by scheme, despite
  4407. their name).
  4408. *** `rationalize' bugfixes and changes
  4409. Fixed bugs in scm_rationalize `rationalize'. Previously, it returned
  4410. exact integers unmodified, although that was incorrect if the epsilon
  4411. was at least 1 or inexact, e.g. (rationalize 4 1) should return 3 per
  4412. R5RS and R6RS, but previously it returned 4. It also now handles
  4413. cases involving infinities and NaNs properly, per R6RS.
  4414. *** Trigonometric functions now return exact numbers in some cases
  4415. scm_sin `sin', scm_cos `cos', scm_tan `tan', scm_asin `asin', scm_acos
  4416. `acos', scm_atan `atan', scm_sinh `sinh', scm_cosh `cosh', scm_tanh
  4417. `tanh', scm_sys_asinh `asinh', scm_sys_acosh `acosh', and
  4418. scm_sys_atanh `atanh' now return exact results in some cases.
  4419. *** New procedure: `finite?'
  4420. Add scm_finite_p `finite?' from R6RS to guile core, which returns #t
  4421. if and only if its argument is neither infinite nor a NaN. Note that
  4422. this is not the same as (not (inf? x)) or (not (infinite? x)), since
  4423. NaNs are neither finite nor infinite.
  4424. *** Improved exactness handling for complex number parsing
  4425. When parsing non-real complex numbers, exactness specifiers are now
  4426. applied to each component, as is done in PLT Scheme. For complex
  4427. numbers written in rectangular form, exactness specifiers are applied
  4428. to the real and imaginary parts before calling scm_make_rectangular.
  4429. For complex numbers written in polar form, exactness specifiers are
  4430. applied to the magnitude and angle before calling scm_make_polar.
  4431. Previously, exactness specifiers were applied to the number as a whole
  4432. _after_ calling scm_make_rectangular or scm_make_polar.
  4433. For example, (string->number "#i5.0+0i") now does the equivalent of:
  4434. (make-rectangular (exact->inexact 5.0) (exact->inexact 0))
  4435. which yields 5.0+0.0i. Previously it did the equivalent of:
  4436. (exact->inexact (make-rectangular 5.0 0))
  4437. which yielded 5.0.
  4438. ** Unicode characters
  4439. Unicode characters may be entered in octal format via e.g. `#\454', or
  4440. created via (integer->char 300). A hex external representation will
  4441. probably be introduced at some point.
  4442. ** Unicode strings
  4443. Internally, strings are now represented either in the `latin-1'
  4444. encoding, one byte per character, or in UTF-32, with four bytes per
  4445. character. Strings manage their own allocation, switching if needed.
  4446. Extended characters may be written in a literal string using the
  4447. hexadecimal escapes `\xXX', `\uXXXX', or `\UXXXXXX', for 8-bit, 16-bit,
  4448. or 24-bit codepoints, respectively, or entered directly in the native
  4449. encoding of the port on which the string is read.
  4450. ** Unicode symbols
  4451. One may now use U+03BB (GREEK SMALL LETTER LAMBDA) as an identifier.
  4452. ** Support for non-ASCII source code files
  4453. The default reader now handles source code files for some of the
  4454. non-ASCII character encodings, such as UTF-8. A non-ASCII source file
  4455. should have an encoding declaration near the top of the file. Also,
  4456. there is a new function, `file-encoding', that scans a port for a coding
  4457. declaration. See the section of the manual entitled, "Character Encoding
  4458. of Source Files".
  4459. The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
  4460. code. This use is now discouraged. Binary input and output is
  4461. currently supported by opening ports in the ISO-8859-1 locale.
  4462. ** Source files default to UTF-8.
  4463. If source files do not specify their encoding via a `coding:' block,
  4464. the default encoding is UTF-8, instead of being taken from the current
  4465. locale.
  4466. ** Interactive Guile installs the current locale.
  4467. Instead of leaving the user in the "C" locale, running the Guile REPL
  4468. installs the current locale. [FIXME xref?]
  4469. ** Support for locale transcoding when reading from and writing to ports
  4470. Ports now have an associated character encoding, and port read and write
  4471. operations do conversion to and from locales automatically. Ports also
  4472. have an associated strategy for how to deal with locale conversion
  4473. failures.
  4474. See the documentation in the manual for the four new support functions,
  4475. `set-port-encoding!', `port-encoding', `set-port-conversion-strategy!',
  4476. and `port-conversion-strategy'.
  4477. ** String and SRFI-13 functions can operate on Unicode strings
  4478. ** Unicode support for SRFI-14 character sets
  4479. The default character sets are no longer locale dependent and contain
  4480. characters from the whole Unicode range. There is a new predefined
  4481. character set, `char-set:designated', which contains all assigned
  4482. Unicode characters. There is a new debugging function, `%char-set-dump'.
  4483. ** Character functions operate on Unicode characters
  4484. `char-upcase' and `char-downcase' use default Unicode casing rules.
  4485. Character comparisons such as `char<?' and `char-ci<?' now sort based on
  4486. Unicode code points.
  4487. ** Global variables `scm_charnames' and `scm_charnums' are removed
  4488. These variables contained the names of control characters and were
  4489. used when writing characters. While these were global, they were
  4490. never intended to be public API. They have been replaced with private
  4491. functions.
  4492. ** EBCDIC support is removed
  4493. There was an EBCDIC compile flag that altered some of the character
  4494. processing. It appeared that full EBCDIC support was never completed
  4495. and was unmaintained.
  4496. ** Compile-time warnings
  4497. Guile can warn about potentially unbound free variables. Pass the
  4498. -Wunbound-variable on the `guile-tools compile' command line, or add
  4499. `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
  4500. invocation. Warnings are also enabled by default for expressions entered
  4501. at the REPL.
  4502. Guile can also warn when you pass the wrong number of arguments to a
  4503. procedure, with -Warity-mismatch, or `arity-mismatch' in the
  4504. `#:warnings' as above.
  4505. Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
  4506. warn about unused local or global (top-level) variables, and `-Wformat',
  4507. to check for various errors related to the `format' procedure.
  4508. ** A new `memoize-symbol' evaluator trap has been added.
  4509. This trap can be used for efficiently implementing a Scheme code
  4510. coverage.
  4511. ** Duplicate bindings among used modules are resolved lazily.
  4512. This slightly improves program startup times.
  4513. ** New thread cancellation and thread cleanup API
  4514. See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
  4515. ** New threads are in `(guile-user)' by default, not `(guile)'
  4516. It used to be that a new thread entering Guile would do so in the
  4517. `(guile)' module, unless this was the first time Guile was initialized,
  4518. in which case it was `(guile-user)'. This has been fixed to have all
  4519. new threads unknown to Guile default to `(guile-user)'.
  4520. ** New helpers: `print-exception', `set-exception-printer!'
  4521. These functions implement an extensible exception printer. Guile
  4522. registers printers for all of the exceptions it throws. Users may add
  4523. their own printers. There is also `scm_print_exception', for use by C
  4524. programs. Pleasantly, this allows SRFI-35 and R6RS exceptions to be
  4525. printed appropriately.
  4526. ** GOOPS dispatch in scheme
  4527. As an implementation detail, GOOPS dispatch is no longer implemented by
  4528. special evaluator bytecodes, but rather directly via a Scheme function
  4529. associated with an applicable struct. There is some VM support for the
  4530. underlying primitives, like `class-of'.
  4531. This change will in the future allow users to customize generic function
  4532. dispatch without incurring a performance penalty, and allow us to
  4533. implement method combinations.
  4534. ** Applicable struct support
  4535. One may now make structs from Scheme that may be applied as procedures.
  4536. To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
  4537. That struct will be the vtable of your applicable structs; instances of
  4538. that new struct are assumed to have the procedure in their first slot.
  4539. `<applicable-struct-vtable>' is like Common Lisp's
  4540. `funcallable-standard-class'. Likewise there is
  4541. `<applicable-struct-with-setter-vtable>', which looks for the setter in
  4542. the second slot. This needs to be better documented.
  4543. ** GOOPS cleanups.
  4544. GOOPS had a number of concepts that were relevant to the days of Tcl,
  4545. but not any more: operators and entities, mainly. These objects were
  4546. never documented, and it is unlikely that they were ever used. Operators
  4547. were a kind of generic specific to the Tcl support. Entities were
  4548. replaced by applicable structs, mentioned above.
  4549. ** New struct slot allocation: "hidden"
  4550. A hidden slot is readable and writable, but will not be initialized by a
  4551. call to make-struct. For example in your layout you would say "ph"
  4552. instead of "pw". Hidden slots are useful for adding new slots to a
  4553. vtable without breaking existing invocations to make-struct.
  4554. ** eqv? not a generic
  4555. One used to be able to extend `eqv?' as a primitive-generic, but no
  4556. more. Because `eqv?' is in the expansion of `case' (via `memv'), which
  4557. should be able to compile to static dispatch tables, it doesn't make
  4558. sense to allow extensions that would subvert this optimization.
  4559. ** `inet-ntop' and `inet-pton' are always available.
  4560. Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
  4561. there is no more need to use `inet-aton'/`inet-ntoa'. The latter
  4562. functions are deprecated.
  4563. ** `getopt-long' parsing errors throw to `quit', not `misc-error'
  4564. This change should inhibit backtraces on argument parsing errors.
  4565. `getopt-long' has been modified to print out the error that it throws
  4566. itself.
  4567. ** New primitive: `tmpfile'.
  4568. See "File System" in the manual.
  4569. ** Random generator state may be serialized to a datum
  4570. `random-state->datum' will serialize a random state to a datum, which
  4571. may be written out, read back in later, and revivified using
  4572. `datum->random-state'. See "Random" in the manual, for more details.
  4573. ** Fix random number generator on 64-bit platforms
  4574. There was a nasty bug on 64-bit platforms in which asking for a random
  4575. integer with a range between 2**32 and 2**64 caused a segfault. After
  4576. many embarrassing iterations, this was fixed.
  4577. ** Fast bit operations.
  4578. The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
  4579. have dedicated bytecodes. Guile is not just for symbolic computation,
  4580. it's for number crunching too.
  4581. ** Faster SRFI-9 record access
  4582. SRFI-9 records are now implemented directly on top of Guile's structs,
  4583. and their accessors are defined in such a way that normal call-sites
  4584. inline to special VM opcodes, while still allowing for the general case
  4585. (e.g. passing a record accessor to `apply').
  4586. ** R6RS block comment support
  4587. Guile now supports R6RS nested block comments. The start of a comment is
  4588. marked with `#|', and the end with `|#'.
  4589. ** `guile-2' cond-expand feature
  4590. To test if your code is running under Guile 2.0 (or its alpha releases),
  4591. test for the `guile-2' cond-expand feature. Like this:
  4592. (cond-expand (guile-2 (eval-when (compile)
  4593. ;; This must be evaluated at compile time.
  4594. (fluid-set! current-reader my-reader)))
  4595. (guile
  4596. ;; Earlier versions of Guile do not have a
  4597. ;; separate compilation phase.
  4598. (fluid-set! current-reader my-reader)))
  4599. ** New global variables: %load-compiled-path, %load-compiled-extensions
  4600. These are analogous to %load-path and %load-extensions.
  4601. ** New fluid: `%file-port-name-canonicalization'
  4602. This fluid parameterizes the file names that are associated with file
  4603. ports. If %file-port-name-canonicalization is 'absolute, then file names
  4604. are canonicalized to be absolute paths. If it is 'relative, then the
  4605. name is canonicalized, but any prefix corresponding to a member of
  4606. `%load-path' is stripped off. Otherwise the names are passed through
  4607. unchanged.
  4608. In addition, the `compile-file' and `compile-and-load' procedures bind
  4609. %file-port-name-canonicalization to their `#:canonicalization' keyword
  4610. argument, which defaults to 'relative. In this way, one might compile
  4611. "../module/ice-9/boot-9.scm", but the path that gets residualized into
  4612. the .go is "ice-9/boot-9.scm".
  4613. ** New procedure, `make-promise'
  4614. `(make-promise (lambda () foo))' is equivalent to `(delay foo)'.
  4615. ** `defined?' may accept a module as its second argument
  4616. Previously it only accepted internal structures from the evaluator.
  4617. ** New entry into %guile-build-info: `ccachedir'
  4618. ** Fix bug in `module-bound?'.
  4619. `module-bound?' was returning true if a module did have a local
  4620. variable, but one that was unbound, but another imported module bound
  4621. the variable. This was an error, and was fixed.
  4622. ** `(ice-9 syncase)' has been deprecated.
  4623. As syntax-case is available by default, importing `(ice-9 syncase)' has
  4624. no effect, and will trigger a deprecation warning.
  4625. ** New readline history functions
  4626. The (ice-9 readline) module now provides add-history, read-history,
  4627. write-history and clear-history, which wrap the corresponding GNU
  4628. History library functions.
  4629. ** Removed deprecated uniform array procedures:
  4630. dimensions->uniform-array, list->uniform-array, array-prototype
  4631. Instead, use make-typed-array, list->typed-array, or array-type,
  4632. respectively.
  4633. ** Deprecate the old `scm-style-repl'
  4634. The following bindings from boot-9 are now found in `(ice-9
  4635. scm-style-repl)': `scm-style-repl', `error-catching-loop',
  4636. `error-catching-repl', `bad-throw', `scm-repl-silent'
  4637. `assert-repl-silence', `repl-print-unspecified',
  4638. `assert-repl-print-unspecified', `scm-repl-verbose',
  4639. `assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
  4640. `default-pre-unwind-handler', `handle-system-error',
  4641. The following bindings have been deprecated, with no replacement:
  4642. `pre-unwind-handler-dispatch'.
  4643. The following bindings have been totally removed:
  4644. `before-signal-stack'.
  4645. Deprecated forwarding shims have been installed so that users that
  4646. expect these bindings in the main namespace will still work, but receive
  4647. a deprecation warning.
  4648. ** `set-batch-mode?!' replaced by `ensure-batch-mode!'
  4649. "Batch mode" is a flag used to tell a program that it is not running
  4650. interactively. One usually turns it on after a fork. It may not be
  4651. turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
  4652. because it is a better interface, as it can only turn on batch mode, not
  4653. turn it off.
  4654. ** Deprecate `save-stack', `the-last-stack'
  4655. It used to be that the way to debug programs in Guile was to capture the
  4656. stack at the time of error, drop back to the REPL, then debug that
  4657. stack. But this approach didn't compose, was tricky to get right in the
  4658. presence of threads, and was not very powerful.
  4659. So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
  4660. `(ice-9 save-stack)', with deprecated bindings left in the root module.
  4661. ** `top-repl' has its own module
  4662. The `top-repl' binding, called with Guile is run interactively, is now
  4663. is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
  4664. left in the default environment.
  4665. ** `display-error' takes a frame
  4666. The `display-error' / `scm_display_error' helper now takes a frame as an
  4667. argument instead of a stack. Stacks are still supported in deprecated
  4668. builds. Additionally, `display-error' will again source location
  4669. information for the error.
  4670. ** No more `(ice-9 debug)'
  4671. This module had some debugging helpers that are no longer applicable to
  4672. the current debugging model. Importing this module will produce a
  4673. deprecation warning. Users should contact bug-guile for support.
  4674. ** Remove obsolete debug-options
  4675. Removed `breakpoints', `trace', `procnames', `indent', `frames',
  4676. `maxdepth', and `debug' debug-options.
  4677. ** `backtrace' debug option on by default
  4678. Given that Guile 2.0 can always give you a backtrace, backtraces are now
  4679. on by default.
  4680. ** `turn-on-debugging' deprecated
  4681. ** Remove obsolete print-options
  4682. The `source' and `closure-hook' print options are obsolete, and have
  4683. been removed.
  4684. ** Remove obsolete read-options
  4685. The "elisp-strings" and "elisp-vectors" read options were unused and
  4686. obsolete, so they have been removed.
  4687. ** Remove eval-options and trap-options
  4688. Eval-options and trap-options are obsolete with the new VM and
  4689. evaluator.
  4690. ** Remove (ice-9 debugger) and (ice-9 debugging)
  4691. See "Traps" and "Interactive Debugging" in the manual, for information
  4692. on their replacements.
  4693. ** Remove the GDS Emacs integration
  4694. See "Using Guile in Emacs" in the manual, for info on how we think you
  4695. should use Guile with Emacs.
  4696. ** Deprecated: `lazy-catch'
  4697. `lazy-catch' was a form that captured the stack at the point of a
  4698. `throw', but the dynamic state at the point of the `catch'. It was a bit
  4699. crazy. Please change to use `catch', possibly with a throw-handler, or
  4700. `with-throw-handler'.
  4701. ** Deprecated: primitive properties
  4702. The `primitive-make-property', `primitive-property-set!',
  4703. `primitive-property-ref', and `primitive-property-del!' procedures were
  4704. crufty and only used to implement object properties, which has a new,
  4705. threadsafe implementation. Use object properties or weak hash tables
  4706. instead.
  4707. ** Deprecated `@bind' syntax
  4708. `@bind' was part of an older implementation of the Emacs Lisp language,
  4709. and is no longer used.
  4710. ** Miscellaneous other deprecations
  4711. `cuserid' has been deprecated, as it only returns 8 bytes of a user's
  4712. login. Use `(passwd:name (getpwuid (geteuid)))' instead.
  4713. Additionally, the procedures `apply-to-args', `has-suffix?', `scheme-file-suffix'
  4714. `get-option', `for-next-option', `display-usage-report',
  4715. `transform-usage-lambda', `collect', and `set-batch-mode?!' have all
  4716. been deprecated.
  4717. ** Add support for unbound fluids
  4718. See `make-unbound-fluid', `fluid-unset!', and `fluid-bound?' in the
  4719. manual.
  4720. ** Add `variable-unset!'
  4721. See "Variables" in the manual, for more details.
  4722. ** Last but not least, the `λ' macro can be used in lieu of `lambda'
  4723. * Changes to the C interface
  4724. ** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
  4725. The semantics of `scm_gc_malloc ()' have been changed, in a
  4726. backward-compatible way. A new allocation routine,
  4727. `scm_gc_malloc_pointerless ()', was added.
  4728. Libgc is a conservative GC, which we hope will make interaction with C
  4729. code easier and less error-prone.
  4730. ** New procedures: `scm_to_stringn', `scm_from_stringn'
  4731. ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,}
  4732. ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,}
  4733. These new procedures convert to and from string representations in
  4734. particular encodings.
  4735. Users should continue to use locale encoding for user input, user
  4736. output, or interacting with the C library.
  4737. Use the Latin-1 functions for ASCII, and for literals in source code.
  4738. Use UTF-8 functions for interaction with modern libraries which deal in
  4739. UTF-8, and UTF-32 for interaction with utf32-using libraries.
  4740. Otherwise, use scm_to_stringn or scm_from_stringn with a specific
  4741. encoding.
  4742. ** New type definitions for `scm_t_intptr' and friends.
  4743. `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
  4744. `SIZEOF_SCM_T_BITS', `scm_t_intptr' and `scm_t_uintptr' are now
  4745. available to C. Have fun!
  4746. ** The GH interface (deprecated in version 1.6, 2001) was removed.
  4747. ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
  4748. This makes these internal functions technically not callable from
  4749. application code.
  4750. ** Functions for handling `scm_option' now no longer require an argument
  4751. indicating length of the `scm_t_option' array.
  4752. ** Procedures-with-setters are now implemented using applicable structs
  4753. From a user's perspective this doesn't mean very much. But if, for some
  4754. odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
  4755. SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
  4756. is gone.
  4757. ** Remove old evaluator closures
  4758. There used to be ranges of typecodes allocated to interpreted data
  4759. structures, but that it no longer the case, given that interpreted
  4760. procedure are now just regular VM closures. As a result, there is a
  4761. newly free tc3, and a number of removed macros. See the ChangeLog for
  4762. details.
  4763. ** Primitive procedures are now VM trampoline procedures
  4764. It used to be that there were something like 12 different typecodes
  4765. allocated to primitive procedures, each with its own calling convention.
  4766. Now there is only one, the gsubr. This may affect user code if you were
  4767. defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The
  4768. solution is to switch to use scm_c_make_gsubr. This solution works well
  4769. both with the old 1.8 and with the current 1.9 branch.
  4770. Guile's old evaluator used to have special cases for applying "gsubrs",
  4771. primitive procedures with specified numbers of required, optional, and
  4772. rest arguments. Now, however, Guile represents gsubrs as normal VM
  4773. procedures, with appropriate bytecode to parse out the correct number of
  4774. arguments, including optional and rest arguments, and then with a
  4775. special bytecode to apply the gsubr.
  4776. This allows primitive procedures to appear on the VM stack, allowing
  4777. them to be accurately counted in profiles. Also they now have more
  4778. debugging information attached to them -- their number of arguments, for
  4779. example. In addition, the VM can completely inline the application
  4780. mechanics, allowing for faster primitive calls.
  4781. However there are some changes on the C level. There is no more
  4782. `scm_tc7_gsubr' or `scm_tcs_subrs' typecode for primitive procedures, as
  4783. they are just VM procedures. Likewise the macros `SCM_GSUBR_TYPE',
  4784. `SCM_GSUBR_MAKTYPE', `SCM_GSUBR_REQ', `SCM_GSUBR_OPT', and
  4785. `SCM_GSUBR_REST' are gone, as are `SCM_SUBR_META_INFO', `SCM_SUBR_PROPS'
  4786. `SCM_SET_SUBR_GENERIC_LOC', and `SCM_SUBR_ARITY_TO_TYPE'.
  4787. Perhaps more significantly, `scm_c_make_subr',
  4788. `scm_c_make_subr_with_generic', `scm_c_define_subr', and
  4789. `scm_c_define_subr_with_generic'. They all operated on subr typecodes,
  4790. and there are no more subr typecodes. Use the scm_c_make_gsubr family
  4791. instead.
  4792. Normal users of gsubrs should not be affected, though, as the
  4793. scm_c_make_gsubr family still is the correct way to create primitive
  4794. procedures.
  4795. ** Remove deprecated array C interfaces
  4796. Removed the deprecated array functions `scm_i_arrayp',
  4797. `scm_i_array_ndim', `scm_i_array_mem', `scm_i_array_v',
  4798. `scm_i_array_base', `scm_i_array_dims', and the deprecated macros
  4799. `SCM_ARRAYP', `SCM_ARRAY_NDIM', `SCM_ARRAY_CONTP', `SCM_ARRAY_MEM',
  4800. `SCM_ARRAY_V', `SCM_ARRAY_BASE', and `SCM_ARRAY_DIMS'.
  4801. ** Remove unused snarf macros
  4802. `SCM_DEFINE1', `SCM_PRIMITIVE_GENERIC_1', `SCM_PROC1, and `SCM_GPROC1'
  4803. are no more. Use SCM_DEFINE or SCM_PRIMITIVE_GENERIC instead.
  4804. ** New functions: `scm_call_n', `scm_c_run_hookn'
  4805. `scm_call_n' applies to apply a function to an array of arguments.
  4806. `scm_c_run_hookn' runs a hook with an array of arguments.
  4807. ** Some SMOB types changed to have static typecodes
  4808. Fluids, dynamic states, and hash tables used to be SMOB objects, but now
  4809. they have statically allocated tc7 typecodes.
  4810. ** Preparations for changing SMOB representation
  4811. If things go right, we'll be changing the SMOB representation soon. To
  4812. that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
  4813. the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
  4814. in the future. Code accessing SMOBs using SCM_CELL macros was never
  4815. correct, but until now things still worked. Users should be aware of
  4816. such changes.
  4817. ** Changed invocation mechanics of applicable SMOBs
  4818. Guile's old evaluator used to have special cases for applying SMOB
  4819. objects. Now, with the VM, when Guile sees a SMOB, it looks up a VM
  4820. trampoline procedure for it, and use the normal mechanics to apply the
  4821. trampoline. This simplifies procedure application in the normal,
  4822. non-SMOB case.
  4823. The upshot is that the mechanics used to apply a SMOB are different from
  4824. 1.8. Descriptors no longer have `apply_0', `apply_1', `apply_2', and
  4825. `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
  4826. deprecated. Just use the scm_call_0 family of procedures.
  4827. ** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
  4828. Though these SRFI support libraries did expose API, they encoded a
  4829. strange version string into their library names. That version was never
  4830. programmatically exported, so there was no way people could use the
  4831. libs.
  4832. This was a fortunate oversight, as it allows us to remove the need for
  4833. extra, needless shared libraries --- the C support code for SRFIs 4, 13,
  4834. and 14 was already in core --- and allow us to incrementally return the
  4835. SRFI implementation to Scheme.
  4836. ** New C function: scm_module_public_interface
  4837. This procedure corresponds to Scheme's `module-public-interface'.
  4838. ** Undeprecate `scm_the_root_module ()'
  4839. It's useful to be able to get the root module from C without doing a
  4840. full module lookup.
  4841. ** Inline vector allocation
  4842. Instead of having vectors point out into the heap for their data, their
  4843. data is now allocated inline to the vector object itself. The same is
  4844. true for bytevectors, by default, though there is an indirection
  4845. available which should allow for making a bytevector from an existing
  4846. memory region.
  4847. ** New struct constructors that don't involve making lists
  4848. `scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
  4849. constructors, respectively, for structs. You might find them useful.
  4850. ** Stack refactor
  4851. In Guile 1.8, there were debugging frames on the C stack. Now there is
  4852. no more need to explicitly mark the stack in this way, because Guile has
  4853. a VM stack that it knows how to walk, which simplifies the C API
  4854. considerably. See the ChangeLog for details; the relevant interface is
  4855. in libguile/stacks.h. The Scheme API has not been changed significantly.
  4856. ** Removal of Guile's primitive object system.
  4857. There were a number of pieces in `objects.[ch]' that tried to be a
  4858. minimal object system, but were never documented, and were quickly
  4859. obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
  4860. `scm_make_subclass_object', `scm_metaclass_standard', and like symbols
  4861. from objects.h are no more. In the very unlikely case in which these
  4862. were useful to you, we urge you to contact guile-devel.
  4863. ** No future.
  4864. Actually the future is still in the state that it was, is, and ever
  4865. shall be, Amen, except that `futures.c' and `futures.h' are no longer a
  4866. part of it. These files were experimental, never compiled, and would be
  4867. better implemented in Scheme anyway. In the future, that is.
  4868. ** Deprecate trampolines
  4869. There used to be C functions `scm_trampoline_0', `scm_trampoline_1', and
  4870. so on. The point was to do some precomputation on the type of the
  4871. procedure, then return a specialized "call" procedure. However this
  4872. optimization wasn't actually an optimization, so it is now deprecated.
  4873. Just use `scm_call_0', etc instead.
  4874. ** Deprecated `scm_badargsp'
  4875. This function is unused in Guile, but was part of its API.
  4876. ** Better support for Lisp `nil'.
  4877. The bit representation of `nil' has been tweaked so that it is now very
  4878. efficient to check e.g. if a value is equal to Scheme's end-of-list or
  4879. Lisp's nil. Additionally there are a heap of new, specific predicates
  4880. like scm_is_null_or_nil.
  4881. ** Better integration of Lisp `nil'.
  4882. `scm_is_boolean', `scm_is_false', and `scm_is_null' all return true now
  4883. for Lisp's `nil'. This shouldn't affect any Scheme code at this point,
  4884. but when we start to integrate more with Emacs, it is possible that we
  4885. break code that assumes that, for example, `(not x)' implies that `x' is
  4886. `eq?' to `#f'. This is not a common assumption. Refactoring affected
  4887. code to rely on properties instead of identities will improve code
  4888. correctness. See "Nil" in the manual, for more details.
  4889. ** Support for static allocation of strings, symbols, and subrs.
  4890. Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
  4891. much of their associated data as static variables, reducing Guile's
  4892. memory footprint.
  4893. ** `scm_stat' has an additional argument, `exception_on_error'
  4894. ** `scm_primitive_load_path' has an additional argument `exception_on_not_found'
  4895. ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
  4896. Previously they would use the `off_t' type, which is fragile since its
  4897. definition depends on the application's value for `_FILE_OFFSET_BITS'.
  4898. ** The `long_long' C type, deprecated in 1.8, has been removed
  4899. ** Removed deprecated uniform array procedures: scm_make_uve,
  4900. scm_array_prototype, scm_list_to_uniform_array,
  4901. scm_dimensions_to_uniform_array, scm_make_ra, scm_shap2ra, scm_cvref,
  4902. scm_ra_set_contp, scm_aind, scm_raprin1
  4903. These functions have been deprecated since early 2005.
  4904. * Changes to the distribution
  4905. ** Guile's license is now LGPLv3+
  4906. In other words the GNU Lesser General Public License, version 3 or
  4907. later (at the discretion of each person that chooses to redistribute
  4908. part of Guile).
  4909. ** AM_SILENT_RULES
  4910. Guile's build is visually quieter, due to the use of Automake 1.11's
  4911. AM_SILENT_RULES. Build as `make V=1' to see all of the output.
  4912. ** GOOPS documentation folded into Guile reference manual
  4913. GOOPS, Guile's object system, used to be documented in separate manuals.
  4914. This content is now included in Guile's manual directly.
  4915. ** `guile-config' will be deprecated in favor of `pkg-config'
  4916. `guile-config' has been rewritten to get its information from
  4917. `pkg-config', so this should be a transparent change. Note however that
  4918. guile.m4 has yet to be modified to call pkg-config instead of
  4919. guile-config.
  4920. ** Guile now provides `guile-2.0.pc' instead of `guile-1.8.pc'
  4921. Programs that use `pkg-config' to find Guile or one of its Autoconf
  4922. macros should now require `guile-2.0' instead of `guile-1.8'.
  4923. ** New installation directory: $(pkglibdir)/1.9/ccache
  4924. If $(libdir) is /usr/lib, for example, Guile will install its .go files
  4925. to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
  4926. ** Parallel installability fixes
  4927. Guile now installs its header files to a effective-version-specific
  4928. directory, and includes the effective version (e.g. 2.0) in the library
  4929. name (e.g. libguile-2.0.so).
  4930. This change should be transparent to users, who should detect Guile via
  4931. the guile.m4 macro, or the guile-2.0.pc pkg-config file. It will allow
  4932. parallel installs for multiple versions of Guile development
  4933. environments.
  4934. ** Dynamically loadable extensions may be placed in a Guile-specific path
  4935. Before, Guile only searched the system library paths for extensions
  4936. (e.g. /usr/lib), which meant that the names of Guile extensions had to
  4937. be globally unique. Installing them to a Guile-specific extensions
  4938. directory is cleaner. Use `pkg-config --variable=extensiondir
  4939. guile-2.0' to get the location of the extensions directory.
  4940. ** User Scheme code may be placed in a version-specific path
  4941. Before, there was only one way to install user Scheme code to a
  4942. version-specific Guile directory: install to Guile's own path,
  4943. e.g. /usr/share/guile/2.0. The site directory,
  4944. e.g. /usr/share/guile/site, was unversioned. This has been changed to
  4945. add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
  4946. searched before the global site directory.
  4947. ** New dependency: libgc
  4948. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
  4949. ** New dependency: GNU libunistring
  4950. See http://www.gnu.org/software/libunistring/, for more information. Our
  4951. Unicode support uses routines from libunistring.
  4952. ** New dependency: libffi
  4953. See http://sourceware.org/libffi/, for more information.
  4954. Changes in 1.8.8 (since 1.8.7)
  4955. * Bugs fixed
  4956. ** Fix possible buffer overruns when parsing numbers
  4957. ** Avoid clash with system setjmp/longjmp on IA64
  4958. ** Fix `wrong type arg' exceptions with IPv6 addresses
  4959. Changes in 1.8.7 (since 1.8.6)
  4960. * New modules (see the manual for details)
  4961. ** `(srfi srfi-98)', an interface to access environment variables
  4962. * Bugs fixed
  4963. ** Fix compilation with `--disable-deprecated'
  4964. ** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
  4965. ** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
  4966. ** Fix build problem when scm_t_timespec is different from struct timespec
  4967. ** Fix build when compiled with -Wundef -Werror
  4968. ** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
  4969. ** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
  4970. ** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
  4971. ** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
  4972. ** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
  4973. ** Fix reading of complex numbers where both parts are inexact decimals
  4974. ** Allow @ macro to work with (ice-9 syncase)
  4975. Previously, use of the @ macro in a module whose code is being
  4976. transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
  4977. Now it works as you would expect (giving the value of the specified
  4978. module binding).
  4979. ** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
  4980. Changes in 1.8.6 (since 1.8.5)
  4981. * New features (see the manual for details)
  4982. ** New convenience function `scm_c_symbol_length ()'
  4983. ** Single stepping through code from Emacs
  4984. When you use GDS to evaluate Scheme code from Emacs, you can now use
  4985. `C-u' to indicate that you want to single step through that code. See
  4986. `Evaluating Scheme Code' in the manual for more details.
  4987. ** New "guile(1)" man page!
  4988. * Changes to the distribution
  4989. ** Automake's `AM_MAINTAINER_MODE' is no longer used
  4990. Thus, the `--enable-maintainer-mode' configure option is no longer
  4991. available: Guile is now always configured in "maintainer mode".
  4992. ** `ChangeLog' files are no longer updated
  4993. Instead, changes are detailed in the version control system's logs. See
  4994. the top-level `ChangeLog' files for details.
  4995. * Bugs fixed
  4996. ** `symbol->string' now returns a read-only string, as per R5RS
  4997. ** Fix incorrect handling of the FLAGS argument of `fold-matches'
  4998. ** `guile-config link' now prints `-L$libdir' before `-lguile'
  4999. ** Fix memory corruption involving GOOPS' `class-redefinition'
  5000. ** Fix possible deadlock in `mutex-lock'
  5001. ** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
  5002. ** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
  5003. ** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
  5004. ** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
  5005. ** Fix misleading output from `(help rationalize)'
  5006. ** Fix build failure on Debian hppa architecture (bad stack growth detection)
  5007. ** Fix `gcd' when called with a single, negative argument.
  5008. ** Fix `Stack overflow' errors seen when building on some platforms
  5009. ** Fix bug when `scm_with_guile ()' was called several times from the
  5010. same thread
  5011. ** The handler of SRFI-34 `with-exception-handler' is now invoked in the
  5012. dynamic environment of the call to `raise'
  5013. ** Fix potential deadlock in `make-struct'
  5014. ** Fix compilation problem with libltdl from Libtool 2.2.x
  5015. ** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
  5016. Changes in 1.8.5 (since 1.8.4)
  5017. * Infrastructure changes
  5018. ** Guile repository switched from CVS to Git
  5019. The new repository can be accessed using
  5020. "git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
  5021. http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
  5022. ** Add support for `pkg-config'
  5023. See "Autoconf Support" in the manual for details.
  5024. * New modules (see the manual for details)
  5025. ** `(srfi srfi-88)'
  5026. * New features (see the manual for details)
  5027. ** New `postfix' read option, for SRFI-88 keyword syntax
  5028. ** Some I/O primitives have been inlined, which improves I/O performance
  5029. ** New object-based traps infrastructure
  5030. This is a GOOPS-based infrastructure that builds on Guile's low-level
  5031. evaluator trap calls and facilitates the development of debugging
  5032. features like single-stepping, breakpoints, tracing and profiling.
  5033. See the `Traps' node of the manual for details.
  5034. ** New support for working on Guile code from within Emacs
  5035. Guile now incorporates the `GDS' library (previously distributed
  5036. separately) for working on Guile code from within Emacs. See the
  5037. `Using Guile In Emacs' node of the manual for details.
  5038. * Bugs fixed
  5039. ** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
  5040. ** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
  5041. Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
  5042. would trigger an unbound variable error for `match:andmap'.
  5043. ** `(oop goops describe)' now properly provides the `describe' feature
  5044. ** Fixed `args-fold' from `(srfi srfi-37)'
  5045. Previously, parsing short option names of argument-less options would
  5046. lead to a stack overflow.
  5047. ** `(srfi srfi-35)' is now visible through `cond-expand'
  5048. ** Fixed type-checking for the second argument of `eval'
  5049. ** Fixed type-checking for SRFI-1 `partition'
  5050. ** Fixed `struct-ref' and `struct-set!' on "light structs"
  5051. ** Honor struct field access rights in GOOPS
  5052. ** Changed the storage strategy of source properties, which fixes a deadlock
  5053. ** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
  5054. ** Fixed build issue for GNU/Linux on IA64
  5055. ** Fixed build issues on NetBSD 1.6
  5056. ** Fixed build issue on Solaris 2.10 x86_64
  5057. ** Fixed build issue with DEC/Compaq/HP's compiler
  5058. ** Fixed `scm_from_complex_double' build issue on FreeBSD
  5059. ** Fixed `alloca' build issue on FreeBSD 6
  5060. ** Removed use of non-portable makefile constructs
  5061. ** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
  5062. ** Make sure all tests honor `$TMPDIR'
  5063. Changes in 1.8.4 (since 1.8.3)
  5064. * Bugs fixed
  5065. ** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
  5066. ** Fixed a segmentation fault which occurred when displaying the
  5067. backtrace of a stack with a promise object (made by `delay') in it.
  5068. ** Make `accept' leave guile mode while blocking
  5069. ** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
  5070. ** Fixed a build problem on AIX (use of func_data identifier)
  5071. ** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
  5072. called with an associator proc that returns neither a pair nor #f.
  5073. ** Secondary threads now always return a valid module for (current-module).
  5074. ** Avoid MacOS build problems caused by incorrect combination of "64"
  5075. system and library calls.
  5076. ** `guile-snarf' now honors `$TMPDIR'
  5077. ** `guile-config compile' now reports CPPFLAGS used at compile-time
  5078. ** Fixed build with Sun Studio (Solaris 9)
  5079. ** Fixed wrong-type-arg errors when creating zero length SRFI-4
  5080. uniform vectors on AIX.
  5081. ** Fixed a deadlock that occurs upon GC with multiple threads.
  5082. ** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
  5083. ** Fixed autotool-derived build problems on AIX 6.1.
  5084. ** Fixed NetBSD/alpha support
  5085. ** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
  5086. * New modules (see the manual for details)
  5087. ** `(srfi srfi-69)'
  5088. * Documentation fixes and improvements
  5089. ** Removed premature breakpoint documentation
  5090. The features described are not available in the series of 1.8.x
  5091. releases, so the documentation was misleading and has been removed.
  5092. ** More about Guile's default *random-state* variable
  5093. ** GOOPS: more about how to use `next-method'
  5094. * Changes to the distribution
  5095. ** Corrected a few files that referred incorrectly to the old GPL + special exception licence
  5096. In fact Guile since 1.8.0 has been licensed with the GNU Lesser
  5097. General Public License, and the few incorrect files have now been
  5098. fixed to agree with the rest of the Guile distribution.
  5099. ** Removed unnecessary extra copies of COPYING*
  5100. The distribution now contains a single COPYING.LESSER at its top level.
  5101. Changes in 1.8.3 (since 1.8.2)
  5102. * New modules (see the manual for details)
  5103. ** `(srfi srfi-35)'
  5104. ** `(srfi srfi-37)'
  5105. * Bugs fixed
  5106. ** The `(ice-9 slib)' module now works as expected
  5107. ** Expressions like "(set! 'x #t)" no longer yield a crash
  5108. ** Warnings about duplicate bindings now go to stderr
  5109. ** A memory leak in `make-socket-address' was fixed
  5110. ** Alignment issues (e.g., on SPARC) in network routines were fixed
  5111. ** A threading issue that showed up at least on NetBSD was fixed
  5112. ** Build problems on Solaris and IRIX fixed
  5113. * Implementation improvements
  5114. ** The reader is now faster, which reduces startup time
  5115. ** Procedures returned by `record-accessor' and `record-modifier' are faster
  5116. Changes in 1.8.2 (since 1.8.1):
  5117. * New procedures (see the manual for details)
  5118. ** set-program-arguments
  5119. ** make-vtable
  5120. * Incompatible changes
  5121. ** The body of a top-level `define' no longer sees the binding being created
  5122. In a top-level `define', the binding being created is no longer visible
  5123. from the `define' body. This breaks code like
  5124. "(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
  5125. unbound in the body. However, such code was not R5RS-compliant anyway,
  5126. per Section 5.2.1.
  5127. * Bugs fixed
  5128. ** Fractions were not `equal?' if stored in unreduced form.
  5129. (A subtle problem, since printing a value reduced it, making it work.)
  5130. ** srfi-60 `copy-bit' failed on 64-bit systems
  5131. ** "guile --use-srfi" option at the REPL can replace core functions
  5132. (Programs run with that option were ok, but in the interactive REPL
  5133. the core bindings got priority, preventing SRFI replacements or
  5134. extensions.)
  5135. ** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
  5136. ** `kill' on MinGW throws an error for a PID other than oneself
  5137. ** Procedure names are attached to procedure-with-setters
  5138. ** Array read syntax works with negative lower bound
  5139. ** `array-in-bounds?' fix if an array has different lower bounds on each index
  5140. ** `*' returns exact 0 for "(* inexact 0)"
  5141. This follows what it always did for "(* 0 inexact)".
  5142. ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
  5143. ** SRFI-19: `date->julian-day' did not account for timezone offset
  5144. ** `ttyname' no longer crashes when passed a non-tty argument
  5145. ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
  5146. ** Small memory leaks have been fixed in `make-fluid' and `add-history'
  5147. ** GOOPS: Fixed a bug in `method-more-specific?'
  5148. ** Build problems on Solaris fixed
  5149. ** Build problems on HP-UX IA64 fixed
  5150. ** Build problems on MinGW fixed
  5151. Changes in 1.8.1 (since 1.8.0):
  5152. * LFS functions are now used to access 64-bit files on 32-bit systems.
  5153. * New procedures (see the manual for details)
  5154. ** primitive-_exit - [Scheme] the-root-module
  5155. ** scm_primitive__exit - [C]
  5156. ** make-completion-function - [Scheme] (ice-9 readline)
  5157. ** scm_c_locale_stringn_to_number - [C]
  5158. ** scm_srfi1_append_reverse [C]
  5159. ** scm_srfi1_append_reverse_x [C]
  5160. ** scm_log - [C]
  5161. ** scm_log10 - [C]
  5162. ** scm_exp - [C]
  5163. ** scm_sqrt - [C]
  5164. * Bugs fixed
  5165. ** Build problems have been fixed on MacOS, SunOS, and QNX.
  5166. ** `strftime' fix sign of %z timezone offset.
  5167. ** A one-dimensional array can now be 'equal?' to a vector.
  5168. ** Structures, records, and SRFI-9 records can now be compared with `equal?'.
  5169. ** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
  5170. ** `record-accessor' and `record-modifier' now have strict type checks.
  5171. Record accessor and modifier procedures now throw an error if the
  5172. record type of the record they're given is not the type expected.
  5173. (Previously accessors returned #f and modifiers silently did nothing).
  5174. ** It is now OK to use both autoload and use-modules on a given module.
  5175. ** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
  5176. Previously there was no checking on primatives like make-vector that
  5177. accept "one or two" arguments. Now there is.
  5178. ** The srfi-1 assoc function now calls its equality predicate properly.
  5179. Previously srfi-1 assoc would call the equality predicate with the key
  5180. last. According to the SRFI, the key should be first.
  5181. ** A bug in n-par-for-each and n-for-each-par-map has been fixed.
  5182. ** The array-set! procedure no longer segfaults when given a bit vector.
  5183. ** Bugs in make-shared-array have been fixed.
  5184. ** string<? and friends now follow char<? etc order on 8-bit chars.
  5185. ** The format procedure now handles inf and nan values for ~f correctly.
  5186. ** exact->inexact should no longer overflow when given certain large fractions.
  5187. ** srfi-9 accessor and modifier procedures now have strict record type checks.
  5188. This matches the srfi-9 specification.
  5189. ** (ice-9 ftw) procedures won't ignore different files with same inode number.
  5190. Previously the (ice-9 ftw) procedures would ignore any file that had
  5191. the same inode number as a file they had already seen, even if that
  5192. file was on a different device.
  5193. Changes in 1.8.0 (changes since the 1.6.x series):
  5194. * Changes to the distribution
  5195. ** Guile is now licensed with the GNU Lesser General Public License.
  5196. ** The manual is now licensed with the GNU Free Documentation License.
  5197. ** Guile now requires GNU MP (http://swox.com/gmp).
  5198. Guile now uses the GNU MP library for arbitrary precision arithmetic.
  5199. ** Guile now has separate private and public configuration headers.
  5200. That is, things like HAVE_STRING_H no longer leak from Guile's
  5201. headers.
  5202. ** Guile now provides and uses an "effective" version number.
  5203. Guile now provides scm_effective_version and effective-version
  5204. functions which return the "effective" version number. This is just
  5205. the normal full version string without the final micro-version number,
  5206. so the current effective-version is "1.8". The effective version
  5207. should remain unchanged during a stable series, and should be used for
  5208. items like the versioned share directory name
  5209. i.e. /usr/share/guile/1.8.
  5210. Providing an unchanging version number during a stable release for
  5211. things like the versioned share directory can be particularly
  5212. important for Guile "add-on" packages, since it provides a directory
  5213. that they can install to that won't be changed out from under them
  5214. with each micro release during a stable series.
  5215. ** Thread implementation has changed.
  5216. When you configure "--with-threads=null", you will get the usual
  5217. threading API (call-with-new-thread, make-mutex, etc), but you can't
  5218. actually create new threads. Also, "--with-threads=no" is now
  5219. equivalent to "--with-threads=null". This means that the thread API
  5220. is always present, although you might not be able to create new
  5221. threads.
  5222. When you configure "--with-threads=pthreads" or "--with-threads=yes",
  5223. you will get threads that are implemented with the portable POSIX
  5224. threads. These threads can run concurrently (unlike the previous
  5225. "coop" thread implementation), but need to cooperate for things like
  5226. the GC.
  5227. The default is "pthreads", unless your platform doesn't have pthreads,
  5228. in which case "null" threads are used.
  5229. See the manual for details, nodes "Initialization", "Multi-Threading",
  5230. "Blocking", and others.
  5231. ** There is the new notion of 'discouraged' features.
  5232. This is a milder form of deprecation.
  5233. Things that are discouraged should not be used in new code, but it is
  5234. OK to leave them in old code for now. When a discouraged feature is
  5235. used, no warning message is printed like there is for 'deprecated'
  5236. features. Also, things that are merely discouraged are nevertheless
  5237. implemented efficiently, while deprecated features can be very slow.
  5238. You can omit discouraged features from libguile by configuring it with
  5239. the '--disable-discouraged' option.
  5240. ** Deprecation warnings can be controlled at run-time.
  5241. (debug-enable 'warn-deprecated) switches them on and (debug-disable
  5242. 'warn-deprecated) switches them off.
  5243. ** Support for SRFI 61, extended cond syntax for multiple values has
  5244. been added.
  5245. This SRFI is always available.
  5246. ** Support for require-extension, SRFI-55, has been added.
  5247. The SRFI-55 special form `require-extension' has been added. It is
  5248. available at startup, and provides a portable way to load Scheme
  5249. extensions. SRFI-55 only requires support for one type of extension,
  5250. "srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
  5251. 13 14)).
  5252. ** New module (srfi srfi-26) provides support for `cut' and `cute'.
  5253. The (srfi srfi-26) module is an implementation of SRFI-26 which
  5254. provides the `cut' and `cute' syntax. These may be used to specialize
  5255. parameters without currying.
  5256. ** New module (srfi srfi-31)
  5257. This is an implementation of SRFI-31 which provides a special form
  5258. `rec' for recursive evaluation.
  5259. ** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
  5260. been merged with the core, making their functionality always
  5261. available.
  5262. The modules are still available, tho, and you could use them together
  5263. with a renaming import, for example.
  5264. ** Guile no longer includes its own version of libltdl.
  5265. The official version is good enough now.
  5266. ** The --enable-htmldoc option has been removed from 'configure'.
  5267. Support for translating the documentation into HTML is now always
  5268. provided. Use 'make html'.
  5269. ** New module (ice-9 serialize):
  5270. (serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
  5271. don't trust the thread safety of most of your program, but where you
  5272. have some section(s) of code which you consider can run in parallel to
  5273. other sections. See ice-9/serialize.scm for more information.
  5274. ** The configure option '--disable-arrays' has been removed.
  5275. Support for arrays and uniform numeric arrays is now always included
  5276. in Guile.
  5277. * Changes to the stand-alone interpreter
  5278. ** New command line option `-L'.
  5279. This option adds a directory to the front of the load path.
  5280. ** New command line option `--no-debug'.
  5281. Specifying `--no-debug' on the command line will keep the debugging
  5282. evaluator turned off, even for interactive sessions.
  5283. ** User-init file ~/.guile is now loaded with the debugging evaluator.
  5284. Previously, the normal evaluator would have been used. Using the
  5285. debugging evaluator gives better error messages.
  5286. ** The '-e' option now 'read's its argument.
  5287. This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
  5288. be used with '-e'. For example, you can now write a script like
  5289. #! /bin/sh
  5290. exec guile -e '(@ (demo) main)' -s "$0" "$@"
  5291. !#
  5292. (define-module (demo)
  5293. :export (main))
  5294. (define (main args)
  5295. (format #t "Demo: ~a~%" args))
  5296. * Changes to Scheme functions and syntax
  5297. ** Guardians have changed back to their original semantics
  5298. Guardians now behave like described in the paper by Dybvig et al. In
  5299. particular, they no longer make guarantees about the order in which
  5300. they return objects, and they can no longer be greedy.
  5301. They no longer drop cyclic data structures.
  5302. The C function scm_make_guardian has been changed incompatibly and no
  5303. longer takes the 'greedy_p' argument.
  5304. ** New function hashx-remove!
  5305. This function completes the set of 'hashx' functions.
  5306. ** The concept of dynamic roots has been factored into continuation
  5307. barriers and dynamic states.
  5308. Each thread has a current dynamic state that carries the values of the
  5309. fluids. You can create and copy dynamic states and use them as the
  5310. second argument for 'eval'. See "Fluids and Dynamic States" in the
  5311. manual.
  5312. To restrict the influence that captured continuations can have on the
  5313. control flow, you can errect continuation barriers. See "Continuation
  5314. Barriers" in the manual.
  5315. The function call-with-dynamic-root now essentially temporarily
  5316. installs a new dynamic state and errects a continuation barrier.
  5317. ** The default load path no longer includes "." at the end.
  5318. Automatically loading modules from the current directory should not
  5319. happen by default. If you want to allow it in a more controlled
  5320. manner, set the environment variable GUILE_LOAD_PATH or the Scheme
  5321. variable %load-path.
  5322. ** The uniform vector and array support has been overhauled.
  5323. It now complies with SRFI-4 and the weird prototype based uniform
  5324. array creation has been deprecated. See the manual for more details.
  5325. Some non-compatible changes have been made:
  5326. - characters can no longer be stored into byte arrays.
  5327. - strings and bit vectors are no longer considered to be uniform numeric
  5328. vectors.
  5329. - array-rank throws an error for non-arrays instead of returning zero.
  5330. - array-ref does no longer accept non-arrays when no indices are given.
  5331. There is the new notion of 'generalized vectors' and corresponding
  5332. procedures like 'generalized-vector-ref'. Generalized vectors include
  5333. strings, bitvectors, ordinary vectors, and uniform numeric vectors.
  5334. Arrays use generalized vectors as their storage, so that you still
  5335. have arrays of characters, bits, etc. However, uniform-array-read!
  5336. and uniform-array-write can no longer read/write strings and
  5337. bitvectors.
  5338. ** There is now support for copy-on-write substrings, mutation-sharing
  5339. substrings and read-only strings.
  5340. Three new procedures are related to this: substring/shared,
  5341. substring/copy, and substring/read-only. See the manual for more
  5342. information.
  5343. ** Backtraces will now highlight the value that caused the error.
  5344. By default, these values are enclosed in "{...}", such as in this
  5345. example:
  5346. guile> (car 'a)
  5347. Backtrace:
  5348. In current input:
  5349. 1: 0* [car {a}]
  5350. <unnamed port>:1:1: In procedure car in expression (car (quote a)):
  5351. <unnamed port>:1:1: Wrong type (expecting pair): a
  5352. ABORT: (wrong-type-arg)
  5353. The prefix and suffix used for highlighting can be set via the two new
  5354. printer options 'highlight-prefix' and 'highlight-suffix'. For
  5355. example, putting this into ~/.guile will output the bad value in bold
  5356. on an ANSI terminal:
  5357. (print-set! highlight-prefix "\x1b[1m")
  5358. (print-set! highlight-suffix "\x1b[22m")
  5359. ** 'gettext' support for internationalization has been added.
  5360. See the manual for details.
  5361. ** New syntax '@' and '@@':
  5362. You can now directly refer to variables exported from a module by
  5363. writing
  5364. (@ MODULE-NAME VARIABLE-NAME)
  5365. For example (@ (ice-9 pretty-print) pretty-print) will directly access
  5366. the pretty-print variable exported from the (ice-9 pretty-print)
  5367. module. You don't need to 'use' that module first. You can also use
  5368. '@' as a target of 'set!', as in (set! (@ mod var) val).
  5369. The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
  5370. but it can also access variables that have not been exported. It is
  5371. intended only for kluges and temporary fixes and for debugging, not
  5372. for ordinary code.
  5373. ** Keyword syntax has been made more disciplined.
  5374. Previously, the name of a keyword was read as a 'token' but printed as
  5375. a symbol. Now, it is read as a general Scheme datum which must be a
  5376. symbol.
  5377. Previously:
  5378. guile> #:12
  5379. #:#{12}#
  5380. guile> #:#{12}#
  5381. #:#{\#{12}\#}#
  5382. guile> #:(a b c)
  5383. #:#{}#
  5384. ERROR: In expression (a b c):
  5385. Unbound variable: a
  5386. guile> #: foo
  5387. #:#{}#
  5388. ERROR: Unbound variable: foo
  5389. Now:
  5390. guile> #:12
  5391. ERROR: Wrong type (expecting symbol): 12
  5392. guile> #:#{12}#
  5393. #:#{12}#
  5394. guile> #:(a b c)
  5395. ERROR: Wrong type (expecting symbol): (a b c)
  5396. guile> #: foo
  5397. #:foo
  5398. ** The printing of symbols that might look like keywords can be
  5399. controlled.
  5400. The new printer option 'quote-keywordish-symbols' controls how symbols
  5401. are printed that have a colon as their first or last character. The
  5402. default now is to only quote a symbol with #{...}# when the read
  5403. option 'keywords' is not '#f'. Thus:
  5404. guile> (define foo (string->symbol ":foo"))
  5405. guile> (read-set! keywords #f)
  5406. guile> foo
  5407. :foo
  5408. guile> (read-set! keywords 'prefix)
  5409. guile> foo
  5410. #{:foo}#
  5411. guile> (print-set! quote-keywordish-symbols #f)
  5412. guile> foo
  5413. :foo
  5414. ** 'while' now provides 'break' and 'continue'
  5415. break and continue were previously bound in a while loop, but not
  5416. documented, and continue didn't quite work properly. The undocumented
  5417. parameter to break which gave a return value for the while has been
  5418. dropped.
  5419. ** 'call-with-current-continuation' is now also available under the name
  5420. 'call/cc'.
  5421. ** The module system now checks for duplicate bindings.
  5422. The module system now can check for name conflicts among imported
  5423. bindings.
  5424. The behavior can be controlled by specifying one or more 'duplicates'
  5425. handlers. For example, to make Guile return an error for every name
  5426. collision, write:
  5427. (define-module (foo)
  5428. :use-module (bar)
  5429. :use-module (baz)
  5430. :duplicates check)
  5431. The new default behavior of the module system when a name collision
  5432. has been detected is to
  5433. 1. Give priority to bindings marked as a replacement.
  5434. 2. Issue a warning (different warning if overriding core binding).
  5435. 3. Give priority to the last encountered binding (this corresponds to
  5436. the old behavior).
  5437. If you want the old behavior back without replacements or warnings you
  5438. can add the line:
  5439. (default-duplicate-binding-handler 'last)
  5440. to your .guile init file.
  5441. ** New define-module option: :replace
  5442. :replace works as :export, but, in addition, marks the binding as a
  5443. replacement.
  5444. A typical example is `format' in (ice-9 format) which is a replacement
  5445. for the core binding `format'.
  5446. ** Adding prefixes to imported bindings in the module system
  5447. There is now a new :use-module option :prefix. It can be used to add
  5448. a prefix to all imported bindings.
  5449. (define-module (foo)
  5450. :use-module ((bar) :prefix bar:))
  5451. will import all bindings exported from bar, but rename them by adding
  5452. the prefix `bar:'.
  5453. ** Conflicting generic functions can be automatically merged.
  5454. When two imported bindings conflict and they are both generic
  5455. functions, the two functions can now be merged automatically. This is
  5456. activated with the 'duplicates' handler 'merge-generics'.
  5457. ** New function: effective-version
  5458. Returns the "effective" version number. This is just the normal full
  5459. version string without the final micro-version number. See "Changes
  5460. to the distribution" above.
  5461. ** New threading functions: parallel, letpar, par-map, and friends
  5462. These are convenient ways to run calculations in parallel in new
  5463. threads. See "Parallel forms" in the manual for details.
  5464. ** New function 'try-mutex'.
  5465. This function will attempt to lock a mutex but will return immediately
  5466. instead of blocking and indicate failure.
  5467. ** Waiting on a condition variable can have a timeout.
  5468. The function 'wait-condition-variable' now takes a third, optional
  5469. argument that specifies the point in time where the waiting should be
  5470. aborted.
  5471. ** New function 'broadcast-condition-variable'.
  5472. ** New functions 'all-threads' and 'current-thread'.
  5473. ** Signals and system asyncs work better with threads.
  5474. The function 'sigaction' now takes a fourth, optional, argument that
  5475. specifies the thread that the handler should run in. When the
  5476. argument is omitted, the handler will run in the thread that called
  5477. 'sigaction'.
  5478. Likewise, 'system-async-mark' takes a second, optional, argument that
  5479. specifies the thread that the async should run in. When it is
  5480. omitted, the async will run in the thread that called
  5481. 'system-async-mark'.
  5482. C code can use the new functions scm_sigaction_for_thread and
  5483. scm_system_async_mark_for_thread to pass the new thread argument.
  5484. When a thread blocks on a mutex, a condition variable or is waiting
  5485. for IO to be possible, it will still execute system asyncs. This can
  5486. be used to interrupt such a thread by making it execute a 'throw', for
  5487. example.
  5488. ** The function 'system-async' is deprecated.
  5489. You can now pass any zero-argument procedure to 'system-async-mark'.
  5490. The function 'system-async' will just return its argument unchanged
  5491. now.
  5492. ** New functions 'call-with-blocked-asyncs' and
  5493. 'call-with-unblocked-asyncs'
  5494. The expression (call-with-blocked-asyncs PROC) will call PROC and will
  5495. block execution of system asyncs for the current thread by one level
  5496. while PROC runs. Likewise, call-with-unblocked-asyncs will call a
  5497. procedure and will unblock the execution of system asyncs by one
  5498. level for the current thread.
  5499. Only system asyncs are affected by these functions.
  5500. ** The functions 'mask-signals' and 'unmask-signals' are deprecated.
  5501. Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
  5502. instead. Those functions are easier to use correctly and can be
  5503. nested.
  5504. ** New function 'unsetenv'.
  5505. ** New macro 'define-syntax-public'.
  5506. It works like 'define-syntax' and also exports the defined macro (but
  5507. only on top-level).
  5508. ** There is support for Infinity and NaNs.
  5509. Following PLT Scheme, Guile can now work with infinite numbers, and
  5510. 'not-a-numbers'.
  5511. There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
  5512. (negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
  5513. "+nan.0"). These numbers are inexact and have no exact counterpart.
  5514. Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
  5515. sign of the dividend. The infinities are integers, and they answer #t
  5516. for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
  5517. not '=' to itself, but '+nan.0' is 'eqv?' to itself.
  5518. For example
  5519. (/ 1 0.0)
  5520. => +inf.0
  5521. (/ 0 0.0)
  5522. => +nan.0
  5523. (/ 0)
  5524. ERROR: Numerical overflow
  5525. Two new predicates 'inf?' and 'nan?' can be used to test for the
  5526. special values.
  5527. ** Inexact zero can have a sign.
  5528. Guile can now distinguish between plus and minus inexact zero, if your
  5529. platform supports this, too. The two zeros are equal according to
  5530. '=', but not according to 'eqv?'. For example
  5531. (- 0.0)
  5532. => -0.0
  5533. (= 0.0 (- 0.0))
  5534. => #t
  5535. (eqv? 0.0 (- 0.0))
  5536. => #f
  5537. ** Guile now has exact rationals.
  5538. Guile can now represent fractions such as 1/3 exactly. Computing with
  5539. them is also done exactly, of course:
  5540. (* 1/3 3/2)
  5541. => 1/2
  5542. ** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
  5543. for exact arguments.
  5544. For example: (floor 2) now returns an exact 2 where in the past it
  5545. returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
  5546. ** inexact->exact no longer returns only integers.
  5547. Without exact rationals, the closest exact number was always an
  5548. integer, but now inexact->exact returns the fraction that is exactly
  5549. equal to a floating point number. For example:
  5550. (inexact->exact 1.234)
  5551. => 694680242521899/562949953421312
  5552. When you want the old behavior, use 'round' explicitly:
  5553. (inexact->exact (round 1.234))
  5554. => 1
  5555. ** New function 'rationalize'.
  5556. This function finds a simple fraction that is close to a given real
  5557. number. For example (and compare with inexact->exact above):
  5558. (rationalize (inexact->exact 1.234) 1/2000)
  5559. => 58/47
  5560. Note that, as required by R5RS, rationalize returns only then an exact
  5561. result when both its arguments are exact.
  5562. ** 'odd?' and 'even?' work also for inexact integers.
  5563. Previously, (odd? 1.0) would signal an error since only exact integers
  5564. were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
  5565. returns #f and (odd? 1.5) signals an error.
  5566. ** Guile now has uninterned symbols.
  5567. The new function 'make-symbol' will return an uninterned symbol. This
  5568. is a symbol that is unique and is guaranteed to remain unique.
  5569. However, uninterned symbols can not yet be read back in.
  5570. Use the new function 'symbol-interned?' to check whether a symbol is
  5571. interned or not.
  5572. ** pretty-print has more options.
  5573. The function pretty-print from the (ice-9 pretty-print) module can now
  5574. also be invoked with keyword arguments that control things like
  5575. maximum output width. See the manual for details.
  5576. ** Variables have no longer a special behavior for `equal?'.
  5577. Previously, comparing two variables with `equal?' would recursivly
  5578. compare their values. This is no longer done. Variables are now only
  5579. `equal?' if they are `eq?'.
  5580. ** `(begin)' is now valid.
  5581. You can now use an empty `begin' form. It will yield #<unspecified>
  5582. when evaluated and simply be ignored in a definition context.
  5583. ** Deprecated: procedure->macro
  5584. Change your code to use 'define-macro' or r5rs macros. Also, be aware
  5585. that macro expansion will not be done during evaluation, but prior to
  5586. evaluation.
  5587. ** Soft ports now allow a `char-ready?' procedure
  5588. The vector argument to `make-soft-port' can now have a length of
  5589. either 5 or 6. (Previously the length had to be 5.) The optional 6th
  5590. element is interpreted as an `input-waiting' thunk -- i.e. a thunk
  5591. that returns the number of characters that can be read immediately
  5592. without the soft port blocking.
  5593. ** Deprecated: undefine
  5594. There is no replacement for undefine.
  5595. ** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
  5596. have been discouraged.
  5597. They are relics from a time where a keyword like #:foo was used
  5598. directly as a Tcl option "-foo" and thus keywords were internally
  5599. stored as a symbol with a starting dash. We now store a symbol
  5600. without the dash.
  5601. Use symbol->keyword and keyword->symbol instead.
  5602. ** The `cheap' debug option is now obsolete
  5603. Evaluator trap calls are now unconditionally "cheap" - in other words,
  5604. they pass a debug object to the trap handler rather than a full
  5605. continuation. The trap handler code can capture a full continuation
  5606. by using `call-with-current-continuation' in the usual way, if it so
  5607. desires.
  5608. The `cheap' option is retained for now so as not to break existing
  5609. code which gets or sets it, but setting it now has no effect. It will
  5610. be removed in the next major Guile release.
  5611. ** Evaluator trap calls now support `tweaking'
  5612. `Tweaking' means that the trap handler code can modify the Scheme
  5613. expression that is about to be evaluated (in the case of an
  5614. enter-frame trap) or the value that is being returned (in the case of
  5615. an exit-frame trap). The trap handler code indicates that it wants to
  5616. do this by returning a pair whose car is the symbol 'instead and whose
  5617. cdr is the modified expression or return value.
  5618. * Changes to the C interface
  5619. ** The functions scm_hash_fn_remove_x and scm_hashx_remove_x no longer
  5620. take a 'delete' function argument.
  5621. This argument makes no sense since the delete function is used to
  5622. remove a pair from an alist, and this must not be configurable.
  5623. This is an incompatible change.
  5624. ** The GH interface is now subject to the deprecation mechanism
  5625. The GH interface has been deprecated for quite some time but now it is
  5626. actually removed from Guile when it is configured with
  5627. --disable-deprecated.
  5628. See the manual "Transitioning away from GH" for more information.
  5629. ** A new family of functions for converting between C values and
  5630. Scheme values has been added.
  5631. These functions follow a common naming scheme and are designed to be
  5632. easier to use, thread-safe and more future-proof than the older
  5633. alternatives.
  5634. - int scm_is_* (...)
  5635. These are predicates that return a C boolean: 1 or 0. Instead of
  5636. SCM_NFALSEP, you can now use scm_is_true, for example.
  5637. - <type> scm_to_<type> (SCM val, ...)
  5638. These are functions that convert a Scheme value into an appropriate
  5639. C value. For example, you can use scm_to_int to safely convert from
  5640. a SCM to an int.
  5641. - SCM scm_from_<type> (<type> val, ...)
  5642. These functions convert from a C type to a SCM value; for example,
  5643. scm_from_int for ints.
  5644. There is a huge number of these functions, for numbers, strings,
  5645. symbols, vectors, etc. They are documented in the reference manual in
  5646. the API section together with the types that they apply to.
  5647. ** New functions for dealing with complex numbers in C have been added.
  5648. The new functions are scm_c_make_rectangular, scm_c_make_polar,
  5649. scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
  5650. They work like scm_make_rectangular etc but take or return doubles
  5651. directly.
  5652. ** The function scm_make_complex has been discouraged.
  5653. Use scm_c_make_rectangular instead.
  5654. ** The INUM macros have been deprecated.
  5655. A lot of code uses these macros to do general integer conversions,
  5656. although the macros only work correctly with fixnums. Use the
  5657. following alternatives.
  5658. SCM_INUMP -> scm_is_integer or similar
  5659. SCM_NINUMP -> !scm_is_integer or similar
  5660. SCM_MAKINUM -> scm_from_int or similar
  5661. SCM_INUM -> scm_to_int or similar
  5662. SCM_VALIDATE_INUM_* -> Do not use these; scm_to_int, etc. will
  5663. do the validating for you.
  5664. ** The scm_num2<type> and scm_<type>2num functions and scm_make_real
  5665. have been discouraged.
  5666. Use the newer scm_to_<type> and scm_from_<type> functions instead for
  5667. new code. The functions have been discouraged since they don't fit
  5668. the naming scheme.
  5669. ** The 'boolean' macros SCM_FALSEP etc have been discouraged.
  5670. They have strange names, especially SCM_NFALSEP, and SCM_BOOLP
  5671. evaluates its argument twice. Use scm_is_true, etc. instead for new
  5672. code.
  5673. ** The macro SCM_EQ_P has been discouraged.
  5674. Use scm_is_eq for new code, which fits better into the naming
  5675. conventions.
  5676. ** The macros SCM_CONSP, SCM_NCONSP, SCM_NULLP, and SCM_NNULLP have
  5677. been discouraged.
  5678. Use the function scm_is_pair or scm_is_null instead.
  5679. ** The functions scm_round and scm_truncate have been deprecated and
  5680. are now available as scm_c_round and scm_c_truncate, respectively.
  5681. These functions occupy the names that scm_round_number and
  5682. scm_truncate_number should have.
  5683. ** The functions scm_c_string2str, scm_c_substring2str, and
  5684. scm_c_symbol2str have been deprecated.
  5685. Use scm_to_locale_stringbuf or similar instead, maybe together with
  5686. scm_substring.
  5687. ** New functions scm_c_make_string, scm_c_string_length,
  5688. scm_c_string_ref, scm_c_string_set_x, scm_c_substring,
  5689. scm_c_substring_shared, scm_c_substring_copy.
  5690. These are like scm_make_string, scm_length, etc. but are slightly
  5691. easier to use from C.
  5692. ** The macros SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_LENGTH,
  5693. SCM_SYMBOL_CHARS, and SCM_SYMBOL_LENGTH have been deprecated.
  5694. They export too many assumptions about the implementation of strings
  5695. and symbols that are no longer true in the presence of
  5696. mutation-sharing substrings and when Guile switches to some form of
  5697. Unicode.
  5698. When working with strings, it is often best to use the normal string
  5699. functions provided by Guile, such as scm_c_string_ref,
  5700. scm_c_string_set_x, scm_string_append, etc. Be sure to look in the
  5701. manual since many more such functions are now provided than
  5702. previously.
  5703. When you want to convert a SCM string to a C string, use the
  5704. scm_to_locale_string function or similar instead. For symbols, use
  5705. scm_symbol_to_string and then work with that string. Because of the
  5706. new string representation, scm_symbol_to_string does not need to copy
  5707. and is thus quite efficient.
  5708. ** Some string, symbol and keyword functions have been discouraged.
  5709. They don't fit into the uniform naming scheme and are not explicit
  5710. about the character encoding.
  5711. Replace according to the following table:
  5712. scm_allocate_string -> scm_c_make_string
  5713. scm_take_str -> scm_take_locale_stringn
  5714. scm_take0str -> scm_take_locale_string
  5715. scm_mem2string -> scm_from_locale_stringn
  5716. scm_str2string -> scm_from_locale_string
  5717. scm_makfrom0str -> scm_from_locale_string
  5718. scm_mem2symbol -> scm_from_locale_symboln
  5719. scm_mem2uninterned_symbol -> scm_from_locale_stringn + scm_make_symbol
  5720. scm_str2symbol -> scm_from_locale_symbol
  5721. SCM_SYMBOL_HASH -> scm_hashq
  5722. SCM_SYMBOL_INTERNED_P -> scm_symbol_interned_p
  5723. scm_c_make_keyword -> scm_from_locale_keyword
  5724. ** The functions scm_keyword_to_symbol and sym_symbol_to_keyword are
  5725. now also available to C code.
  5726. ** SCM_KEYWORDP and SCM_KEYWORDSYM have been deprecated.
  5727. Use scm_is_keyword and scm_keyword_to_symbol instead, but note that
  5728. the latter returns the true name of the keyword, not the 'dash name',
  5729. as SCM_KEYWORDSYM used to do.
  5730. ** A new way to access arrays in a thread-safe and efficient way has
  5731. been added.
  5732. See the manual, node "Accessing Arrays From C".
  5733. ** The old uniform vector and bitvector implementations have been
  5734. unceremoniously removed.
  5735. This implementation exposed the details of the tagging system of
  5736. Guile. Use the new C API explained in the manual in node "Uniform
  5737. Numeric Vectors" and "Bit Vectors", respectively.
  5738. The following macros are gone: SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
  5739. SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
  5740. SCM_SET_UVECTOR_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
  5741. SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
  5742. SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
  5743. SCM_SET_BITVECTOR_LENGTH, SCM_BITVEC_REF, SCM_BITVEC_SET,
  5744. SCM_BITVEC_CLR.
  5745. ** The macros dealing with vectors have been deprecated.
  5746. Use the new functions scm_is_vector, scm_vector_elements,
  5747. scm_vector_writable_elements, etc, or scm_is_simple_vector,
  5748. SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, etc instead. See the
  5749. manual for more details.
  5750. Deprecated are SCM_VECTORP, SCM_VELTS, SCM_VECTOR_MAX_LENGTH,
  5751. SCM_VECTOR_LENGTH, SCM_VECTOR_REF, SCM_VECTOR_SET, SCM_WRITABLE_VELTS.
  5752. The following macros have been removed: SCM_VECTOR_BASE,
  5753. SCM_SET_VECTOR_BASE, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
  5754. SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS.
  5755. ** Some C functions and macros related to arrays have been deprecated.
  5756. Migrate according to the following table:
  5757. scm_make_uve -> scm_make_typed_array, scm_make_u8vector etc.
  5758. scm_make_ra -> scm_make_array
  5759. scm_shap2ra -> scm_make_array
  5760. scm_cvref -> scm_c_generalized_vector_ref
  5761. scm_ra_set_contp -> do not use
  5762. scm_aind -> scm_array_handle_pos
  5763. scm_raprin1 -> scm_display or scm_write
  5764. SCM_ARRAYP -> scm_is_array
  5765. SCM_ARRAY_NDIM -> scm_c_array_rank
  5766. SCM_ARRAY_DIMS -> scm_array_handle_dims
  5767. SCM_ARRAY_CONTP -> do not use
  5768. SCM_ARRAY_MEM -> do not use
  5769. SCM_ARRAY_V -> scm_array_handle_elements or similar
  5770. SCM_ARRAY_BASE -> do not use
  5771. ** SCM_CELL_WORD_LOC has been deprecated.
  5772. Use the new macro SCM_CELL_OBJECT_LOC instead, which returns a pointer
  5773. to a SCM, as opposed to a pointer to a scm_t_bits.
  5774. This was done to allow the correct use of pointers into the Scheme
  5775. heap. Previously, the heap words were of type scm_t_bits and local
  5776. variables and function arguments were of type SCM, making it
  5777. non-standards-conformant to have a pointer that can point to both.
  5778. ** New macros SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, etc.
  5779. These macros should be used instead of SCM_CELL_WORD_2/3 to access the
  5780. second and third words of double smobs. Likewise for
  5781. SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3.
  5782. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
  5783. used to get and set the 16 exra bits in the zeroth word of a smob.
  5784. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
  5785. accessing the first immediate word of a smob as a SCM value, and there
  5786. is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
  5787. smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
  5788. ** New way to deal with non-local exits and re-entries.
  5789. There is a new set of functions that essentially do what
  5790. scm_internal_dynamic_wind does, but in a way that is more convenient
  5791. for C code in some situations. Here is a quick example of how to
  5792. prevent a potential memory leak:
  5793. void
  5794. foo ()
  5795. {
  5796. char *mem;
  5797. scm_dynwind_begin (0);
  5798. mem = scm_malloc (100);
  5799. scm_dynwind_unwind_handler (free, mem, SCM_F_WIND_EXPLICITLY);
  5800. /* MEM would leak if BAR throws an error.
  5801. SCM_DYNWIND_UNWIND_HANDLER frees it nevertheless.
  5802. */
  5803. bar ();
  5804. scm_dynwind_end ();
  5805. /* Because of SCM_F_WIND_EXPLICITLY, MEM will be freed by
  5806. SCM_DYNWIND_END as well.
  5807. */
  5808. }
  5809. For full documentation, see the node "Dynamic Wind" in the manual.
  5810. ** New function scm_dynwind_free
  5811. This function calls 'free' on a given pointer when a dynwind context
  5812. is left. Thus the call to scm_dynwind_unwind_handler above could be
  5813. replaced with simply scm_dynwind_free (mem).
  5814. ** New functions scm_c_call_with_blocked_asyncs and
  5815. scm_c_call_with_unblocked_asyncs
  5816. Like scm_call_with_blocked_asyncs etc. but for C functions.
  5817. ** New functions scm_dynwind_block_asyncs and scm_dynwind_unblock_asyncs
  5818. In addition to scm_c_call_with_blocked_asyncs you can now also use
  5819. scm_dynwind_block_asyncs in a 'dynwind context' (see above). Likewise for
  5820. scm_c_call_with_unblocked_asyncs and scm_dynwind_unblock_asyncs.
  5821. ** The macros SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
  5822. SCM_REALLOW_INTS have been deprecated.
  5823. They do no longer fulfill their original role of blocking signal
  5824. delivery. Depending on what you want to achieve, replace a pair of
  5825. SCM_DEFER_INTS and SCM_ALLOW_INTS with a dynwind context that locks a
  5826. mutex, blocks asyncs, or both. See node "Critical Sections" in the
  5827. manual.
  5828. ** The value 'scm_mask_ints' is no longer writable.
  5829. Previously, you could set scm_mask_ints directly. This is no longer
  5830. possible. Use scm_c_call_with_blocked_asyncs and
  5831. scm_c_call_with_unblocked_asyncs instead.
  5832. ** New way to temporarily set the current input, output or error ports
  5833. C code can now use scm_dynwind_current_<foo>_port in a 'dynwind
  5834. context' (see above). <foo> is one of "input", "output" or "error".
  5835. ** New way to temporarily set fluids
  5836. C code can now use scm_dynwind_fluid in a 'dynwind context' (see
  5837. above) to temporarily set the value of a fluid.
  5838. ** New types scm_t_intmax and scm_t_uintmax.
  5839. On platforms that have them, these types are identical to intmax_t and
  5840. uintmax_t, respectively. On other platforms, they are identical to
  5841. the largest integer types that Guile knows about.
  5842. ** The functions scm_unmemocopy and scm_unmemoize have been removed.
  5843. You should not have used them.
  5844. ** Many public #defines with generic names have been made private.
  5845. #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
  5846. private or renamed with a more suitable public name.
  5847. ** The macro SCM_TYP16S has been deprecated.
  5848. This macro is not intended for public use.
  5849. ** The macro SCM_SLOPPY_INEXACTP has been deprecated.
  5850. Use scm_is_true (scm_inexact_p (...)) instead.
  5851. ** The macro SCM_SLOPPY_REALP has been deprecated.
  5852. Use scm_is_real instead.
  5853. ** The macro SCM_SLOPPY_COMPLEXP has been deprecated.
  5854. Use scm_is_complex instead.
  5855. ** Some preprocessor defines have been deprecated.
  5856. These defines indicated whether a certain feature was present in Guile
  5857. or not. Going forward, assume that the features are always present.
  5858. The macros are: USE_THREADS, GUILE_ISELECT, READER_EXTENSIONS,
  5859. DEBUG_EXTENSIONS, DYNAMIC_LINKING.
  5860. The following macros have been removed completely: MEMOIZE_LOCALS,
  5861. SCM_RECKLESS, SCM_CAUTIOUS.
  5862. ** The preprocessor define STACK_DIRECTION has been deprecated.
  5863. There should be no need to know about the stack direction for ordinary
  5864. programs.
  5865. ** New function: scm_effective_version
  5866. Returns the "effective" version number. This is just the normal full
  5867. version string without the final micro-version number. See "Changes
  5868. to the distribution" above.
  5869. ** The function scm_call_with_new_thread has a new prototype.
  5870. Instead of taking a list with the thunk and handler, these two
  5871. arguments are now passed directly:
  5872. SCM scm_call_with_new_thread (SCM thunk, SCM handler);
  5873. This is an incompatible change.
  5874. ** New snarfer macro SCM_DEFINE_PUBLIC.
  5875. This is like SCM_DEFINE, but also calls scm_c_export for the defined
  5876. function in the init section.
  5877. ** The snarfer macro SCM_SNARF_INIT is now officially supported.
  5878. ** Garbage collector rewrite.
  5879. The garbage collector is cleaned up a lot, and now uses lazy
  5880. sweeping. This is reflected in the output of (gc-stats); since cells
  5881. are being freed when they are allocated, the cells-allocated field
  5882. stays roughly constant.
  5883. For malloc related triggers, the behavior is changed. It uses the same
  5884. heuristic as the cell-triggered collections. It may be tuned with the
  5885. environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage
  5886. for minimum yield of malloc related triggers. The default is 40.
  5887. GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
  5888. default is 200 kb.
  5889. Debugging operations for the freelist have been deprecated, along with
  5890. the C variables that control garbage collection. The environment
  5891. variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
  5892. GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
  5893. For understanding the memory usage of a GUILE program, the routine
  5894. gc-live-object-stats returns an alist containing the number of live
  5895. objects for every type.
  5896. ** The function scm_definedp has been renamed to scm_defined_p
  5897. The name scm_definedp is deprecated.
  5898. ** The struct scm_cell type has been renamed to scm_t_cell
  5899. This is in accordance to Guile's naming scheme for types. Note that
  5900. the name scm_cell is now used for a function that allocates and
  5901. initializes a new cell (see below).
  5902. ** New functions for memory management
  5903. A new set of functions for memory management has been added since the
  5904. old way (scm_must_malloc, scm_must_free, etc) was error prone and
  5905. indeed, Guile itself contained some long standing bugs that could
  5906. cause aborts in long running programs.
  5907. The new functions are more symmetrical and do not need cooperation
  5908. from smob free routines, among other improvements.
  5909. The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
  5910. scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
  5911. scm_gc_free, scm_gc_register_collectable_memory, and
  5912. scm_gc_unregister_collectable_memory. Refer to the manual for more
  5913. details and for upgrading instructions.
  5914. The old functions for memory management have been deprecated. They
  5915. are: scm_must_malloc, scm_must_realloc, scm_must_free,
  5916. scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
  5917. ** Declarations of exported features are marked with SCM_API.
  5918. Every declaration of a feature that belongs to the exported Guile API
  5919. has been marked by adding the macro "SCM_API" to the start of the
  5920. declaration. This macro can expand into different things, the most
  5921. common of which is just "extern" for Unix platforms. On Win32, it can
  5922. be used to control which symbols are exported from a DLL.
  5923. If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
  5924. will expand into "__declspec (dllimport) extern", which is needed for
  5925. linking to the Guile DLL in Windows.
  5926. There are also SCM_RL_IMPORT, SCM_SRFI1314_IMPORT, and
  5927. SCM_SRFI4_IMPORT, for the corresponding libraries.
  5928. ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
  5929. Use the new functions scm_cell and scm_double_cell instead. The old
  5930. macros had problems because with them allocation and initialization
  5931. was separated and the GC could sometimes observe half initialized
  5932. cells. Only careful coding by the user of SCM_NEWCELL and
  5933. SCM_NEWCELL2 could make this safe and efficient.
  5934. ** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
  5935. Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
  5936. instead.
  5937. ** SRCBRKP has been deprecated.
  5938. Use scm_c_source_property_breakpoint_p instead.
  5939. ** Deprecated: scm_makmacro
  5940. Change your code to use either scm_makmmacro or to define macros in
  5941. Scheme, using 'define-macro'.
  5942. ** New function scm_c_port_for_each.
  5943. This function is like scm_port_for_each but takes a pointer to a C
  5944. function as the callback instead of a SCM value.
  5945. ** The names scm_internal_select, scm_thread_sleep, and
  5946. scm_thread_usleep have been discouraged.
  5947. Use scm_std_select, scm_std_sleep, scm_std_usleep instead.
  5948. ** The GC can no longer be blocked.
  5949. The global flags scm_gc_heap_lock and scm_block_gc have been removed.
  5950. The GC can now run (partially) concurrently with other code and thus
  5951. blocking it is not well defined.
  5952. ** Many definitions have been removed that were previously deprecated.
  5953. scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify,
  5954. scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
  5955. scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2,
  5956. scm_tc16_allocated, SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
  5957. SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED,
  5958. scm_debug_newcell, scm_debug_newcell2, SCM_HUP_SIGNAL, SCM_INT_SIGNAL,
  5959. SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL,
  5960. SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG,
  5961. SCM_NUM_SIGS, scm_top_level_lookup_closure_var,
  5962. *top-level-lookup-closure*, scm_system_transformer, scm_eval_3,
  5963. scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP,
  5964. SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring,
  5965. scm_tc7_substring, sym_huh, SCM_VARVCELL, SCM_UDVARIABLEP,
  5966. SCM_DEFVARIABLEP, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
  5967. scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
  5968. SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
  5969. SCM_LENGTH_MAX, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
  5970. SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR,
  5971. scm_sym2vcell, scm_intern, scm_intern0, scm_sysintern, scm_sysintern0,
  5972. scm_sysintern0_no_module_lookup, scm_init_symbols_deprecated,
  5973. scm_vector_set_length_x, scm_contregs, scm_debug_info,
  5974. scm_debug_frame, SCM_DSIDEVAL, SCM_CONST_LONG, SCM_VCELL,
  5975. SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT,
  5976. SCM_HUGE_LENGTH, SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
  5977. SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
  5978. SCM_VALIDATE_RWSTRING, DIGITS, scm_small_istr2int, scm_istr2int,
  5979. scm_istr2flo, scm_istring2number, scm_istr2int, scm_istr2flo,
  5980. scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP,
  5981. SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
  5982. SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable,
  5983. SCM_CHARS, SCM_LENGTH, SCM_SET_STRING_CHARS, SCM_SET_STRING_LENGTH.
  5984. * Changes to bundled modules
  5985. ** (ice-9 debug)
  5986. Using the (ice-9 debug) module no longer automatically switches Guile
  5987. to use the debugging evaluator. If you want to switch to the
  5988. debugging evaluator (which is needed for backtrace information if you
  5989. hit an error), please add an explicit "(debug-enable 'debug)" to your
  5990. code just after the code to use (ice-9 debug).
  5991. Changes since Guile 1.4:
  5992. * Changes to the distribution
  5993. ** A top-level TODO file is included.
  5994. ** Guile now uses a versioning scheme similar to that of the Linux kernel.
  5995. Guile now always uses three numbers to represent the version,
  5996. i.e. "1.6.5". The first number, 1, is the major version number, the
  5997. second number, 6, is the minor version number, and the third number,
  5998. 5, is the micro version number. Changes in major version number
  5999. indicate major changes in Guile.
  6000. Minor version numbers that are even denote stable releases, and odd
  6001. minor version numbers denote development versions (which may be
  6002. unstable). The micro version number indicates a minor sub-revision of
  6003. a given MAJOR.MINOR release.
  6004. In keeping with the new scheme, (minor-version) and scm_minor_version
  6005. no longer return everything but the major version number. They now
  6006. just return the minor version number. Two new functions
  6007. (micro-version) and scm_micro_version have been added to report the
  6008. micro version number.
  6009. In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
  6010. ** New preprocessor definitions are available for checking versions.
  6011. version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
  6012. SCM_MICRO_VERSION to the appropriate integer values.
  6013. ** Guile now actively warns about deprecated features.
  6014. The new configure option `--enable-deprecated=LEVEL' and the
  6015. environment variable GUILE_WARN_DEPRECATED control this mechanism.
  6016. See INSTALL and README for more information.
  6017. ** Guile is much more likely to work on 64-bit architectures.
  6018. Guile now compiles and passes "make check" with only two UNRESOLVED GC
  6019. cases on Alpha and ia64 based machines now. Thanks to John Goerzen
  6020. for the use of a test machine, and thanks to Stefan Jahn for ia64
  6021. patches.
  6022. ** New functions: setitimer and getitimer.
  6023. These implement a fairly direct interface to the libc functions of the
  6024. same name.
  6025. ** The #. reader extension is now disabled by default.
  6026. For safety reasons, #. evaluation is disabled by default. To
  6027. re-enable it, set the fluid read-eval? to #t. For example:
  6028. (fluid-set! read-eval? #t)
  6029. but make sure you realize the potential security risks involved. With
  6030. read-eval? enabled, reading a data file from an untrusted source can
  6031. be dangerous.
  6032. ** New SRFI modules have been added:
  6033. SRFI-0 `cond-expand' is now supported in Guile, without requiring
  6034. using a module.
  6035. (srfi srfi-1) is a library containing many useful pair- and list-processing
  6036. procedures.
  6037. (srfi srfi-2) exports and-let*.
  6038. (srfi srfi-4) implements homogeneous numeric vector datatypes.
  6039. (srfi srfi-6) is a dummy module for now, since guile already provides
  6040. all of the srfi-6 procedures by default: open-input-string,
  6041. open-output-string, get-output-string.
  6042. (srfi srfi-8) exports receive.
  6043. (srfi srfi-9) exports define-record-type.
  6044. (srfi srfi-10) exports define-reader-ctor and implements the reader
  6045. extension #,().
  6046. (srfi srfi-11) exports let-values and let*-values.
  6047. (srfi srfi-13) implements the SRFI String Library.
  6048. (srfi srfi-14) implements the SRFI Character-Set Library.
  6049. (srfi srfi-17) implements setter and getter-with-setter and redefines
  6050. some accessor procedures as procedures with getters. (such as car,
  6051. cdr, vector-ref etc.)
  6052. (srfi srfi-19) implements the SRFI Time/Date Library.
  6053. ** New scripts / "executable modules"
  6054. Subdirectory "scripts" contains Scheme modules that are packaged to
  6055. also be executable as scripts. At this time, these scripts are available:
  6056. display-commentary
  6057. doc-snarf
  6058. generate-autoload
  6059. punify
  6060. read-scheme-source
  6061. use2dot
  6062. See README there for more info.
  6063. These scripts can be invoked from the shell with the new program
  6064. "guile-tools", which keeps track of installation directory for you.
  6065. For example:
  6066. $ guile-tools display-commentary srfi/*.scm
  6067. guile-tools is copied to the standard $bindir on "make install".
  6068. ** New module (ice-9 stack-catch):
  6069. stack-catch is like catch, but saves the current state of the stack in
  6070. the fluid the-last-stack. This fluid can be useful when using the
  6071. debugger and when re-throwing an error.
  6072. ** The module (ice-9 and-let*) has been renamed to (ice-9 and-let-star)
  6073. This has been done to prevent problems on lesser operating systems
  6074. that can't tolerate `*'s in file names. The exported macro continues
  6075. to be named `and-let*', of course.
  6076. On systems that support it, there is also a compatibility module named
  6077. (ice-9 and-let*). It will go away in the next release.
  6078. ** New modules (oop goops) etc.:
  6079. (oop goops)
  6080. (oop goops describe)
  6081. (oop goops save)
  6082. (oop goops active-slot)
  6083. (oop goops composite-slot)
  6084. The Guile Object Oriented Programming System (GOOPS) has been
  6085. integrated into Guile. For further information, consult the GOOPS
  6086. manual and tutorial in the `doc' directory.
  6087. ** New module (ice-9 rdelim).
  6088. This exports the following procedures which were previously defined
  6089. in the default environment:
  6090. read-line read-line! read-delimited read-delimited! %read-delimited!
  6091. %read-line write-line
  6092. For backwards compatibility the definitions are still imported into the
  6093. default environment in this version of Guile. However you should add:
  6094. (use-modules (ice-9 rdelim))
  6095. to any program which uses the definitions, since this may change in
  6096. future.
  6097. Alternatively, if guile-scsh is installed, the (scsh rdelim) module
  6098. can be used for similar functionality.
  6099. ** New module (ice-9 rw)
  6100. This is a subset of the (scsh rw) module from guile-scsh. Currently
  6101. it defines two procedures:
  6102. *** New function: read-string!/partial str [port_or_fdes [start [end]]]
  6103. Read characters from a port or file descriptor into a string STR.
  6104. A port must have an underlying file descriptor -- a so-called
  6105. fport. This procedure is scsh-compatible and can efficiently read
  6106. large strings.
  6107. *** New function: write-string/partial str [port_or_fdes [start [end]]]
  6108. Write characters from a string STR to a port or file descriptor.
  6109. A port must have an underlying file descriptor -- a so-called
  6110. fport. This procedure is mostly compatible and can efficiently
  6111. write large strings.
  6112. ** New module (ice-9 match)
  6113. This module includes Andrew K. Wright's pattern matcher. See
  6114. ice-9/match.scm for brief description or
  6115. http://www.star-lab.com/wright/code.html
  6116. for complete documentation.
  6117. ** New module (ice-9 buffered-input)
  6118. This module provides procedures to construct an input port from an
  6119. underlying source of input that reads and returns its input in chunks.
  6120. The underlying input source is a Scheme procedure, specified by the
  6121. caller, which the port invokes whenever it needs more input.
  6122. This is useful when building an input port whose back end is Readline
  6123. or a UI element such as the GtkEntry widget.
  6124. ** Documentation
  6125. The reference and tutorial documentation that was previously
  6126. distributed separately, as `guile-doc', is now included in the core
  6127. Guile distribution. The documentation consists of the following
  6128. manuals.
  6129. - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction
  6130. to using Guile.
  6131. - The Guile Reference Manual (guile.texi) contains (or is intended to
  6132. contain) reference documentation on all aspects of Guile.
  6133. - The GOOPS Manual (goops.texi) contains both tutorial-style and
  6134. reference documentation for using GOOPS, Guile's Object Oriented
  6135. Programming System.
  6136. - The Revised^5 Report on the Algorithmic Language Scheme
  6137. (r5rs.texi).
  6138. See the README file in the `doc' directory for more details.
  6139. ** There are a couple of examples in the examples/ directory now.
  6140. * Changes to the stand-alone interpreter
  6141. ** New command line option `--use-srfi'
  6142. Using this option, SRFI modules can be loaded on startup and be
  6143. available right from the beginning. This makes programming portable
  6144. Scheme programs easier.
  6145. The option `--use-srfi' expects a comma-separated list of numbers,
  6146. each representing a SRFI number to be loaded into the interpreter
  6147. before starting evaluating a script file or the REPL. Additionally,
  6148. the feature identifier for the loaded SRFIs is recognized by
  6149. `cond-expand' when using this option.
  6150. Example:
  6151. $ guile --use-srfi=8,13
  6152. guile> (receive (x z) (values 1 2) (+ 1 2))
  6153. 3
  6154. guile> (string-pad "bla" 20)
  6155. " bla"
  6156. ** Guile now always starts up in the `(guile-user)' module.
  6157. Previously, scripts executed via the `-s' option would run in the
  6158. `(guile)' module and the repl would run in the `(guile-user)' module.
  6159. Now every user action takes place in the `(guile-user)' module by
  6160. default.
  6161. * Changes to Scheme functions and syntax
  6162. ** Character classifiers work for non-ASCII characters.
  6163. The predicates `char-alphabetic?', `char-numeric?',
  6164. `char-whitespace?', `char-lower?', `char-upper?' and `char-is-both?'
  6165. no longer check whether their arguments are ASCII characters.
  6166. Previously, a character would only be considered alphabetic when it
  6167. was also ASCII, for example.
  6168. ** Previously deprecated Scheme functions have been removed:
  6169. tag - no replacement.
  6170. fseek - replaced by seek.
  6171. list* - replaced by cons*.
  6172. ** It's now possible to create modules with controlled environments
  6173. Example:
  6174. (use-modules (ice-9 safe))
  6175. (define m (make-safe-module))
  6176. ;;; m will now be a module containing only a safe subset of R5RS
  6177. (eval '(+ 1 2) m) --> 3
  6178. (eval 'load m) --> ERROR: Unbound variable: load
  6179. ** Evaluation of "()", the empty list, is now an error.
  6180. Previously, the expression "()" evaluated to the empty list. This has
  6181. been changed to signal a "missing expression" error. The correct way
  6182. to write the empty list as a literal constant is to use quote: "'()".
  6183. ** New concept of `Guile Extensions'.
  6184. A Guile Extension is just a ordinary shared library that can be linked
  6185. at run-time. We found it advantageous to give this simple concept a
  6186. dedicated name to distinguish the issues related to shared libraries
  6187. from the issues related to the module system.
  6188. *** New function: load-extension
  6189. Executing (load-extension lib init) is mostly equivalent to
  6190. (dynamic-call init (dynamic-link lib))
  6191. except when scm_register_extension has been called previously.
  6192. Whenever appropriate, you should use `load-extension' instead of
  6193. dynamic-link and dynamic-call.
  6194. *** New C function: scm_c_register_extension
  6195. This function registers a initialization function for use by
  6196. `load-extension'. Use it when you don't want specific extensions to
  6197. be loaded as shared libraries (for example on platforms that don't
  6198. support dynamic linking).
  6199. ** Auto-loading of compiled-code modules is deprecated.
  6200. Guile used to be able to automatically find and link a shared
  6201. library to satisfy requests for a module. For example, the module
  6202. `(foo bar)' could be implemented by placing a shared library named
  6203. "foo/libbar.so" (or with a different extension) in a directory on the
  6204. load path of Guile.
  6205. This has been found to be too tricky, and is no longer supported. The
  6206. shared libraries are now called "extensions". You should now write a
  6207. small Scheme file that calls `load-extension' to load the shared
  6208. library and initialize it explicitly.
  6209. The shared libraries themselves should be installed in the usual
  6210. places for shared libraries, with names like "libguile-foo-bar".
  6211. For example, place this into a file "foo/bar.scm"
  6212. (define-module (foo bar))
  6213. (load-extension "libguile-foo-bar" "foobar_init")
  6214. ** Backward incompatible change: eval EXP ENVIRONMENT-SPECIFIER
  6215. `eval' is now R5RS, that is it takes two arguments.
  6216. The second argument is an environment specifier, i.e. either
  6217. (scheme-report-environment 5)
  6218. (null-environment 5)
  6219. (interaction-environment)
  6220. or
  6221. any module.
  6222. ** The module system has been made more disciplined.
  6223. The function `eval' will save and restore the current module around
  6224. the evaluation of the specified expression. While this expression is
  6225. evaluated, `(current-module)' will now return the right module, which
  6226. is the module specified as the second argument to `eval'.
  6227. A consequence of this change is that `eval' is not particularly
  6228. useful when you want allow the evaluated code to change what module is
  6229. designated as the current module and have this change persist from one
  6230. call to `eval' to the next. The read-eval-print-loop is an example
  6231. where `eval' is now inadequate. To compensate, there is a new
  6232. function `primitive-eval' that does not take a module specifier and
  6233. that does not save/restore the current module. You should use this
  6234. function together with `set-current-module', `current-module', etc
  6235. when you want to have more control over the state that is carried from
  6236. one eval to the next.
  6237. Additionally, it has been made sure that forms that are evaluated at
  6238. the top level are always evaluated with respect to the current module.
  6239. Previously, subforms of top-level forms such as `begin', `case',
  6240. etc. did not respect changes to the current module although these
  6241. subforms are at the top-level as well.
  6242. To prevent strange behavior, the forms `define-module',
  6243. `use-modules', `use-syntax', and `export' have been restricted to only
  6244. work on the top level. The forms `define-public' and
  6245. `defmacro-public' only export the new binding on the top level. They
  6246. behave just like `define' and `defmacro', respectively, when they are
  6247. used in a lexical environment.
  6248. Also, `export' will no longer silently re-export bindings imported
  6249. from a used module. It will emit a `deprecation' warning and will
  6250. cease to perform any re-export in the next version. If you actually
  6251. want to re-export bindings, use the new `re-export' in place of
  6252. `export'. The new `re-export' will not make copies of variables when
  6253. rexporting them, as `export' did wrongly.
  6254. ** Module system now allows selection and renaming of imported bindings
  6255. Previously, when using `use-modules' or the `#:use-module' clause in
  6256. the `define-module' form, all the bindings (association of symbols to
  6257. values) for imported modules were added to the "current module" on an
  6258. as-is basis. This has been changed to allow finer control through two
  6259. new facilities: selection and renaming.
  6260. You can now select which of the imported module's bindings are to be
  6261. visible in the current module by using the `:select' clause. This
  6262. clause also can be used to rename individual bindings. For example:
  6263. ;; import all bindings no questions asked
  6264. (use-modules (ice-9 common-list))
  6265. ;; import four bindings, renaming two of them;
  6266. ;; the current module sees: every some zonk-y zonk-n
  6267. (use-modules ((ice-9 common-list)
  6268. :select (every some
  6269. (remove-if . zonk-y)
  6270. (remove-if-not . zonk-n))))
  6271. You can also programmatically rename all selected bindings using the
  6272. `:renamer' clause, which specifies a proc that takes a symbol and
  6273. returns another symbol. Because it is common practice to use a prefix,
  6274. we now provide the convenience procedure `symbol-prefix-proc'. For
  6275. example:
  6276. ;; import four bindings, renaming two of them specifically,
  6277. ;; and all four w/ prefix "CL:";
  6278. ;; the current module sees: CL:every CL:some CL:zonk-y CL:zonk-n
  6279. (use-modules ((ice-9 common-list)
  6280. :select (every some
  6281. (remove-if . zonk-y)
  6282. (remove-if-not . zonk-n))
  6283. :renamer (symbol-prefix-proc 'CL:)))
  6284. ;; import four bindings, renaming two of them specifically,
  6285. ;; and all four by upcasing.
  6286. ;; the current module sees: EVERY SOME ZONK-Y ZONK-N
  6287. (define (upcase-symbol sym)
  6288. (string->symbol (string-upcase (symbol->string sym))))
  6289. (use-modules ((ice-9 common-list)
  6290. :select (every some
  6291. (remove-if . zonk-y)
  6292. (remove-if-not . zonk-n))
  6293. :renamer upcase-symbol))
  6294. Note that programmatic renaming is done *after* individual renaming.
  6295. Also, the above examples show `use-modules', but the same facilities are
  6296. available for the `#:use-module' clause of `define-module'.
  6297. See manual for more info.
  6298. ** The semantics of guardians have changed.
  6299. The changes are for the most part compatible. An important criterion
  6300. was to keep the typical usage of guardians as simple as before, but to
  6301. make the semantics safer and (as a result) more useful.
  6302. *** All objects returned from guardians are now properly alive.
  6303. It is now guaranteed that any object referenced by an object returned
  6304. from a guardian is alive. It's now impossible for a guardian to
  6305. return a "contained" object before its "containing" object.
  6306. One incompatible (but probably not very important) change resulting
  6307. from this is that it is no longer possible to guard objects that
  6308. indirectly reference themselves (i.e. are parts of cycles). If you do
  6309. so accidentally, you'll get a warning.
  6310. *** There are now two types of guardians: greedy and sharing.
  6311. If you call (make-guardian #t) or just (make-guardian), you'll get a
  6312. greedy guardian, and for (make-guardian #f) a sharing guardian.
  6313. Greedy guardians are the default because they are more "defensive".
  6314. You can only greedily guard an object once. If you guard an object
  6315. more than once, once in a greedy guardian and the rest of times in
  6316. sharing guardians, then it is guaranteed that the object won't be
  6317. returned from sharing guardians as long as it is greedily guarded
  6318. and/or alive.
  6319. Guardians returned by calls to `make-guardian' can now take one more
  6320. optional parameter, which says whether to throw an error in case an
  6321. attempt is made to greedily guard an object that is already greedily
  6322. guarded. The default is true, i.e. throw an error. If the parameter
  6323. is false, the guardian invocation returns #t if guarding was
  6324. successful and #f if it wasn't.
  6325. Also, since greedy guarding is, in effect, a side-effecting operation
  6326. on objects, a new function is introduced: `destroy-guardian!'.
  6327. Invoking this function on a guardian renders it unoperative and, if
  6328. the guardian is greedy, clears the "greedily guarded" property of the
  6329. objects that were guarded by it, thus undoing the side effect.
  6330. Note that all this hair is hardly very important, since guardian
  6331. objects are usually permanent.
  6332. ** Continuations created by call-with-current-continuation now accept
  6333. any number of arguments, as required by R5RS.
  6334. ** New function `issue-deprecation-warning'
  6335. This function is used to display the deprecation messages that are
  6336. controlled by GUILE_WARN_DEPRECATION as explained in the README.
  6337. (define (id x)
  6338. (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
  6339. (identity x))
  6340. guile> (id 1)
  6341. ;; `id' is deprecated. Use `identity' instead.
  6342. 1
  6343. guile> (id 1)
  6344. 1
  6345. ** New syntax `begin-deprecated'
  6346. When deprecated features are included (as determined by the configure
  6347. option --enable-deprecated), `begin-deprecated' is identical to
  6348. `begin'. When deprecated features are excluded, it always evaluates
  6349. to `#f', ignoring the body forms.
  6350. ** New function `make-object-property'
  6351. This function returns a new `procedure with setter' P that can be used
  6352. to attach a property to objects. When calling P as
  6353. (set! (P obj) val)
  6354. where `obj' is any kind of object, it attaches `val' to `obj' in such
  6355. a way that it can be retrieved by calling P as
  6356. (P obj)
  6357. This function will replace procedure properties, symbol properties and
  6358. source properties eventually.
  6359. ** Module (ice-9 optargs) now uses keywords instead of `#&'.
  6360. Instead of #&optional, #&key, etc you should now use #:optional,
  6361. #:key, etc. Since #:optional is a keyword, you can write it as just
  6362. :optional when (read-set! keywords 'prefix) is active.
  6363. The old reader syntax `#&' is still supported, but deprecated. It
  6364. will be removed in the next release.
  6365. ** New define-module option: pure
  6366. Tells the module system not to include any bindings from the root
  6367. module.
  6368. Example:
  6369. (define-module (totally-empty-module)
  6370. :pure)
  6371. ** New define-module option: export NAME1 ...
  6372. Export names NAME1 ...
  6373. This option is required if you want to be able to export bindings from
  6374. a module which doesn't import one of `define-public' or `export'.
  6375. Example:
  6376. (define-module (foo)
  6377. :pure
  6378. :use-module (ice-9 r5rs)
  6379. :export (bar))
  6380. ;;; Note that we're pure R5RS below this point!
  6381. (define (bar)
  6382. ...)
  6383. ** New function: object->string OBJ
  6384. Return a Scheme string obtained by printing a given object.
  6385. ** New function: port? X
  6386. Returns a boolean indicating whether X is a port. Equivalent to
  6387. `(or (input-port? X) (output-port? X))'.
  6388. ** New function: file-port?
  6389. Determines whether a given object is a port that is related to a file.
  6390. ** New function: port-for-each proc
  6391. Apply PROC to each port in the Guile port table in turn. The return
  6392. value is unspecified. More specifically, PROC is applied exactly once
  6393. to every port that exists in the system at the time PORT-FOR-EACH is
  6394. invoked. Changes to the port table while PORT-FOR-EACH is running
  6395. have no effect as far as PORT-FOR-EACH is concerned.
  6396. ** New function: dup2 oldfd newfd
  6397. A simple wrapper for the `dup2' system call. Copies the file
  6398. descriptor OLDFD to descriptor number NEWFD, replacing the
  6399. previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
  6400. Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  6401. to move away ports which are using NEWFD. The return value is
  6402. unspecified.
  6403. ** New function: close-fdes fd
  6404. A simple wrapper for the `close' system call. Close file
  6405. descriptor FD, which must be an integer. Unlike close (*note
  6406. close: Ports and File Descriptors.), the file descriptor will be
  6407. closed even if a port is using it. The return value is
  6408. unspecified.
  6409. ** New function: crypt password salt
  6410. Encrypts `password' using the standard unix password encryption
  6411. algorithm.
  6412. ** New function: chroot path
  6413. Change the root directory of the running process to `path'.
  6414. ** New functions: getlogin, cuserid
  6415. Return the login name or the user name of the current effective user
  6416. id, respectively.
  6417. ** New functions: getpriority which who, setpriority which who prio
  6418. Get or set the priority of the running process.
  6419. ** New function: getpass prompt
  6420. Read a password from the terminal, first displaying `prompt' and
  6421. disabling echoing.
  6422. ** New function: flock file operation
  6423. Set/remove an advisory shared or exclusive lock on `file'.
  6424. ** New functions: sethostname name, gethostname
  6425. Set or get the hostname of the machine the current process is running
  6426. on.
  6427. ** New function: mkstemp! tmpl
  6428. mkstemp creates a new unique file in the file system and returns a
  6429. new buffered port open for reading and writing to the file. TMPL
  6430. is a string specifying where the file should be created: it must
  6431. end with `XXXXXX' and will be changed in place to return the name
  6432. of the temporary file.
  6433. ** New function: open-input-string string
  6434. Return an input string port which delivers the characters from
  6435. `string'. This procedure, together with `open-output-string' and
  6436. `get-output-string' implements SRFI-6.
  6437. ** New function: open-output-string
  6438. Return an output string port which collects all data written to it.
  6439. The data can then be retrieved by `get-output-string'.
  6440. ** New function: get-output-string
  6441. Return the contents of an output string port.
  6442. ** New function: identity
  6443. Return the argument.
  6444. ** socket, connect, accept etc., now have support for IPv6. IPv6 addresses
  6445. are represented in Scheme as integers with normal host byte ordering.
  6446. ** New function: inet-pton family address
  6447. Convert a printable string network address into an integer. Note that
  6448. unlike the C version of this function, the result is an integer with
  6449. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6450. e.g.,
  6451. (inet-pton AF_INET "127.0.0.1") => 2130706433
  6452. (inet-pton AF_INET6 "::1") => 1
  6453. ** New function: inet-ntop family address
  6454. Convert an integer network address into a printable string. Note that
  6455. unlike the C version of this function, the input is an integer with
  6456. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6457. e.g.,
  6458. (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  6459. (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  6460. ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  6461. ** Deprecated: id
  6462. Use `identity' instead.
  6463. ** Deprecated: -1+
  6464. Use `1-' instead.
  6465. ** Deprecated: return-it
  6466. Do without it.
  6467. ** Deprecated: string-character-length
  6468. Use `string-length' instead.
  6469. ** Deprecated: flags
  6470. Use `logior' instead.
  6471. ** Deprecated: close-all-ports-except.
  6472. This was intended for closing ports in a child process after a fork,
  6473. but it has the undesirable side effect of flushing buffers.
  6474. port-for-each is more flexible.
  6475. ** The (ice-9 popen) module now attempts to set up file descriptors in
  6476. the child process from the current Scheme ports, instead of using the
  6477. current values of file descriptors 0, 1, and 2 in the parent process.
  6478. ** Removed function: builtin-weak-bindings
  6479. There is no such concept as a weak binding any more.
  6480. ** Removed constants: bignum-radix, scm-line-incrementors
  6481. ** define-method: New syntax mandatory.
  6482. The new method syntax is now mandatory:
  6483. (define-method (NAME ARG-SPEC ...) BODY ...)
  6484. (define-method (NAME ARG-SPEC ... . REST-ARG) BODY ...)
  6485. ARG-SPEC ::= ARG-NAME | (ARG-NAME TYPE)
  6486. REST-ARG ::= ARG-NAME
  6487. If you have old code using the old syntax, import
  6488. (oop goops old-define-method) before (oop goops) as in:
  6489. (use-modules (oop goops old-define-method) (oop goops))
  6490. ** Deprecated function: builtin-variable
  6491. Removed function: builtin-bindings
  6492. There is no longer a distinction between builtin or other variables.
  6493. Use module system operations for all variables.
  6494. ** Lazy-catch handlers are no longer allowed to return.
  6495. That is, a call to `throw', `error', etc is now guaranteed to not
  6496. return.
  6497. ** Bugfixes for (ice-9 getopt-long)
  6498. This module is now tested using test-suite/tests/getopt-long.test.
  6499. The following bugs have been fixed:
  6500. *** Parsing for options that are specified to have `optional' args now checks
  6501. if the next element is an option instead of unconditionally taking it as the
  6502. option arg.
  6503. *** An error is now thrown for `--opt=val' when the option description
  6504. does not specify `(value #t)' or `(value optional)'. This condition used to
  6505. be accepted w/o error, contrary to the documentation.
  6506. *** The error message for unrecognized options is now more informative.
  6507. It used to be "not a record", an artifact of the implementation.
  6508. *** The error message for `--opt' terminating the arg list (no value), when
  6509. `(value #t)' is specified, is now more informative. It used to be "not enough
  6510. args".
  6511. *** "Clumped" single-char args now preserve trailing string, use it as arg.
  6512. The expansion used to be like so:
  6513. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "--xyz")
  6514. Note that the "5d" is dropped. Now it is like so:
  6515. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "5d" "--xyz")
  6516. This enables single-char options to have adjoining arguments as long as their
  6517. constituent characters are not potential single-char options.
  6518. ** (ice-9 session) procedure `arity' now works with (ice-9 optargs) `lambda*'
  6519. The `lambda*' and derivative forms in (ice-9 optargs) now set a procedure
  6520. property `arglist', which can be retrieved by `arity'. The result is that
  6521. `arity' can give more detailed information than before:
  6522. Before:
  6523. guile> (use-modules (ice-9 optargs))
  6524. guile> (define* (foo #:optional a b c) a)
  6525. guile> (arity foo)
  6526. 0 or more arguments in `lambda*:G0'.
  6527. After:
  6528. guile> (arity foo)
  6529. 3 optional arguments: `a', `b' and `c'.
  6530. guile> (define* (bar a b #:key c d #:allow-other-keys) a)
  6531. guile> (arity bar)
  6532. 2 required arguments: `a' and `b', 2 keyword arguments: `c'
  6533. and `d', other keywords allowed.
  6534. guile> (define* (baz a b #:optional c #:rest r) a)
  6535. guile> (arity baz)
  6536. 2 required arguments: `a' and `b', 1 optional argument: `c',
  6537. the rest in `r'.
  6538. * Changes to the C interface
  6539. ** Types have been renamed from scm_*_t to scm_t_*.
  6540. This has been done for POSIX sake. It reserves identifiers ending
  6541. with "_t". What a concept.
  6542. The old names are still available with status `deprecated'.
  6543. ** scm_t_bits (former scm_bits_t) is now a unsigned type.
  6544. ** Deprecated features have been removed.
  6545. *** Macros removed
  6546. SCM_INPORTP, SCM_OUTPORTP SCM_ICHRP, SCM_ICHR, SCM_MAKICHR
  6547. SCM_SETJMPBUF SCM_NSTRINGP SCM_NRWSTRINGP SCM_NVECTORP SCM_DOUBLE_CELLP
  6548. *** C Functions removed
  6549. scm_sysmissing scm_tag scm_tc16_flo scm_tc_flo
  6550. scm_fseek - replaced by scm_seek.
  6551. gc-thunk - replaced by after-gc-hook.
  6552. gh_int2scmb - replaced by gh_bool2scm.
  6553. scm_tc_dblr - replaced by scm_tc16_real.
  6554. scm_tc_dblc - replaced by scm_tc16_complex.
  6555. scm_list_star - replaced by scm_cons_star.
  6556. ** Deprecated: scm_makfromstr
  6557. Use scm_mem2string instead.
  6558. ** Deprecated: scm_make_shared_substring
  6559. Explicit shared substrings will disappear from Guile.
  6560. Instead, "normal" strings will be implemented using sharing
  6561. internally, combined with a copy-on-write strategy.
  6562. ** Deprecated: scm_read_only_string_p
  6563. The concept of read-only strings will disappear in next release of
  6564. Guile.
  6565. ** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
  6566. Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
  6567. ** New functions: scm_call_0, scm_call_1, scm_call_2, scm_call_3
  6568. Call a procedure with the indicated number of arguments. See "Fly
  6569. Evaluation" in the manual.
  6570. ** New functions: scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3
  6571. Call a procedure with the indicated number of arguments and a list of
  6572. further arguments. See "Fly Evaluation" in the manual.
  6573. ** New functions: scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5
  6574. Create a list of the given number of elements. See "List
  6575. Constructors" in the manual.
  6576. ** Renamed function: scm_listify has been replaced by scm_list_n.
  6577. ** Deprecated macros: SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4,
  6578. SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9.
  6579. Use functions scm_list_N instead.
  6580. ** New function: scm_c_read (SCM port, void *buffer, scm_sizet size)
  6581. Used by an application to read arbitrary number of bytes from a port.
  6582. Same semantics as libc read, except that scm_c_read only returns less
  6583. than SIZE bytes if at end-of-file.
  6584. Warning: Doesn't update port line and column counts!
  6585. ** New function: scm_c_write (SCM port, const void *ptr, scm_sizet size)
  6586. Used by an application to write arbitrary number of bytes to an SCM
  6587. port. Similar semantics as libc write. However, unlike libc
  6588. write, scm_c_write writes the requested number of bytes and has no
  6589. return value.
  6590. Warning: Doesn't update port line and column counts!
  6591. ** New function: scm_init_guile ()
  6592. In contrast to scm_boot_guile, scm_init_guile will return normally
  6593. after initializing Guile. It is not available on all systems, tho.
  6594. ** New functions: scm_str2symbol, scm_mem2symbol
  6595. The function scm_str2symbol takes a const char* pointing to a zero-terminated
  6596. field of characters and creates a scheme symbol object from that C string.
  6597. The function scm_mem2symbol takes a const char* and a number of characters and
  6598. creates a symbol from the characters in that memory area.
  6599. ** New functions: scm_primitive_make_property
  6600. scm_primitive_property_ref
  6601. scm_primitive_property_set_x
  6602. scm_primitive_property_del_x
  6603. These functions implement a new way to deal with object properties.
  6604. See libguile/properties.c for their documentation.
  6605. ** New function: scm_done_free (long size)
  6606. This function is the inverse of scm_done_malloc. Use it to report the
  6607. amount of smob memory you free. The previous method, which involved
  6608. calling scm_done_malloc with negative argument, was somewhat
  6609. unintuitive (and is still available, of course).
  6610. ** New function: scm_c_memq (SCM obj, SCM list)
  6611. This function provides a fast C level alternative for scm_memq for the case
  6612. that the list parameter is known to be a proper list. The function is a
  6613. replacement for scm_sloppy_memq, but is stricter in its requirements on its
  6614. list input parameter, since for anything else but a proper list the function's
  6615. behavior is undefined - it may even crash or loop endlessly. Further, for
  6616. the case that the object is not found in the list, scm_c_memq returns #f which
  6617. is similar to scm_memq, but different from scm_sloppy_memq's behavior.
  6618. ** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
  6619. scm_remember_upto_here
  6620. These functions replace the function scm_remember.
  6621. ** Deprecated function: scm_remember
  6622. Use one of the new functions scm_remember_upto_here_1,
  6623. scm_remember_upto_here_2 or scm_remember_upto_here instead.
  6624. ** New function: scm_allocate_string
  6625. This function replaces the function scm_makstr.
  6626. ** Deprecated function: scm_makstr
  6627. Use the new function scm_allocate_string instead.
  6628. ** New global variable scm_gc_running_p introduced.
  6629. Use this variable to find out if garbage collection is being executed. Up to
  6630. now applications have used scm_gc_heap_lock to test if garbage collection was
  6631. running, which also works because of the fact that up to know only the garbage
  6632. collector has set this variable. But, this is an implementation detail that
  6633. may change. Further, scm_gc_heap_lock is not set throughout gc, thus the use
  6634. of this variable is (and has been) not fully safe anyway.
  6635. ** New macros: SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH
  6636. Use these instead of SCM_LENGTH_MAX.
  6637. ** New macros: SCM_CONTINUATION_LENGTH, SCM_CCLO_LENGTH, SCM_STACK_LENGTH,
  6638. SCM_STRING_LENGTH, SCM_SYMBOL_LENGTH, SCM_UVECTOR_LENGTH,
  6639. SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
  6640. Use these instead of SCM_LENGTH.
  6641. ** New macros: SCM_SET_CONTINUATION_LENGTH, SCM_SET_STRING_LENGTH,
  6642. SCM_SET_SYMBOL_LENGTH, SCM_SET_VECTOR_LENGTH, SCM_SET_UVECTOR_LENGTH,
  6643. SCM_SET_BITVECTOR_LENGTH
  6644. Use these instead of SCM_SETLENGTH
  6645. ** New macros: SCM_STRING_CHARS, SCM_SYMBOL_CHARS, SCM_CCLO_BASE,
  6646. SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
  6647. SCM_ARRAY_MEM
  6648. Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
  6649. SCM_VELTS.
  6650. ** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
  6651. SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
  6652. SCM_SET_VECTOR_BASE
  6653. Use these instead of SCM_SETCHARS.
  6654. ** New macro: SCM_BITVECTOR_P
  6655. ** New macro: SCM_STRING_COERCE_0TERMINATION_X
  6656. Use instead of SCM_COERCE_SUBSTR.
  6657. ** New macros: SCM_DIR_OPEN_P, SCM_DIR_FLAG_OPEN
  6658. For directory objects, use these instead of SCM_OPDIRP and SCM_OPN.
  6659. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
  6660. SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
  6661. SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
  6662. SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP,
  6663. SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
  6664. SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
  6665. SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
  6666. SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
  6667. SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
  6668. SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
  6669. SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC,
  6670. SCM_OPDIRP, SCM_VALIDATE_OPDIR, SCM_WTA, RETURN_SCM_WTA, SCM_CONST_LONG,
  6671. SCM_WNA, SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
  6672. SCM_VALIDATE_NUMBER_DEF_COPY, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
  6673. SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_SETAND_CAR, SCM_SETOR_CAR
  6674. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
  6675. Use scm_memory_error instead of SCM_NALLOC.
  6676. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
  6677. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR.
  6678. Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP
  6679. Use a type specific accessor macro instead of SCM_CHARS/SCM_UCHARS.
  6680. Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
  6681. Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
  6682. Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
  6683. Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
  6684. Use SCM_STRINGP instead of SCM_RWSTRINGP.
  6685. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
  6686. Use SCM_STRING_CHARS instead of SCM_ROCHARS.
  6687. Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
  6688. Use a type specific setter macro instead of SCM_SETLENGTH.
  6689. Use a type specific setter macro instead of SCM_SETCHARS.
  6690. Use a type specific length macro instead of SCM_LENGTH_MAX.
  6691. Use SCM_GCMARKP instead of SCM_GC8MARKP.
  6692. Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
  6693. Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
  6694. Use SCM_TYP16 instead of SCM_GCTYP16.
  6695. Use SCM_CDR instead of SCM_GCCDR.
  6696. Use SCM_DIR_OPEN_P instead of SCM_OPDIRP.
  6697. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of SCM_WTA.
  6698. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of RETURN_SCM_WTA.
  6699. Use SCM_VCELL_INIT instead of SCM_CONST_LONG.
  6700. Use SCM_WRONG_NUM_ARGS instead of SCM_WNA.
  6701. Use SCM_CONSP instead of SCM_SLOPPY_CONSP.
  6702. Use !SCM_CONSP instead of SCM_SLOPPY_NCONSP.
  6703. ** Removed function: scm_struct_init
  6704. ** Removed variable: scm_symhash_dim
  6705. ** Renamed function: scm_make_cont has been replaced by
  6706. scm_make_continuation, which has a different interface.
  6707. ** Deprecated function: scm_call_catching_errors
  6708. Use scm_catch or scm_lazy_catch from throw.[ch] instead.
  6709. ** Deprecated function: scm_strhash
  6710. Use scm_string_hash instead.
  6711. ** Deprecated function: scm_vector_set_length_x
  6712. Instead, create a fresh vector of the desired size and copy the contents.
  6713. ** scm_gensym has changed prototype
  6714. scm_gensym now only takes one argument.
  6715. ** Deprecated type tags: scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
  6716. scm_tc7_lvector
  6717. There is now only a single symbol type scm_tc7_symbol.
  6718. The tag scm_tc7_lvector was not used anyway.
  6719. ** Deprecated function: scm_make_smob_type_mfpe, scm_set_smob_mfpe.
  6720. Use scm_make_smob_type and scm_set_smob_XXX instead.
  6721. ** New function scm_set_smob_apply.
  6722. This can be used to set an apply function to a smob type.
  6723. ** Deprecated function: scm_strprint_obj
  6724. Use scm_object_to_string instead.
  6725. ** Deprecated function: scm_wta
  6726. Use scm_wrong_type_arg, or another appropriate error signalling function
  6727. instead.
  6728. ** Explicit support for obarrays has been deprecated.
  6729. Use `scm_str2symbol' and the generic hashtable functions instead.
  6730. ** The concept of `vcells' has been deprecated.
  6731. The data type `variable' is now used exclusively. `Vcells' have been
  6732. a low-level concept so you are likely not affected by this change.
  6733. *** Deprecated functions: scm_sym2vcell, scm_sysintern,
  6734. scm_sysintern0, scm_symbol_value0, scm_intern, scm_intern0.
  6735. Use scm_c_define or scm_c_lookup instead, as appropriate.
  6736. *** New functions: scm_c_module_lookup, scm_c_lookup,
  6737. scm_c_module_define, scm_c_define, scm_module_lookup, scm_lookup,
  6738. scm_module_define, scm_define.
  6739. These functions work with variables instead of with vcells.
  6740. ** New functions for creating and defining `subr's and `gsubr's.
  6741. The new functions more clearly distinguish between creating a subr (or
  6742. gsubr) object and adding it to the current module.
  6743. These new functions are available: scm_c_make_subr, scm_c_define_subr,
  6744. scm_c_make_subr_with_generic, scm_c_define_subr_with_generic,
  6745. scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
  6746. scm_c_define_gsubr_with_generic.
  6747. ** Deprecated functions: scm_make_subr, scm_make_subr_opt,
  6748. scm_make_subr_with_generic, scm_make_gsubr,
  6749. scm_make_gsubr_with_generic.
  6750. Use the new ones from above instead.
  6751. ** C interface to the module system has changed.
  6752. While we suggest that you avoid as many explicit module system
  6753. operations from C as possible for the time being, the C interface has
  6754. been made more similar to the high-level Scheme module system.
  6755. *** New functions: scm_c_define_module, scm_c_use_module,
  6756. scm_c_export, scm_c_resolve_module.
  6757. They mostly work like their Scheme namesakes. scm_c_define_module
  6758. takes a function that is called a context where the new module is
  6759. current.
  6760. *** Deprecated functions: scm_the_root_module, scm_make_module,
  6761. scm_ensure_user_module, scm_load_scheme_module.
  6762. Use the new functions instead.
  6763. ** Renamed function: scm_internal_with_fluids becomes
  6764. scm_c_with_fluids.
  6765. scm_internal_with_fluids is available as a deprecated function.
  6766. ** New function: scm_c_with_fluid.
  6767. Just like scm_c_with_fluids, but takes one fluid and one value instead
  6768. of lists of same.
  6769. ** Deprecated typedefs: long_long, ulong_long.
  6770. They are of questionable utility and they pollute the global
  6771. namespace.
  6772. ** Deprecated typedef: scm_sizet
  6773. It is of questionable utility now that Guile requires ANSI C, and is
  6774. oddly named.
  6775. ** Deprecated typedefs: scm_port_rw_active, scm_port,
  6776. scm_ptob_descriptor, scm_debug_info, scm_debug_frame, scm_fport,
  6777. scm_option, scm_rstate, scm_rng, scm_array, scm_array_dim.
  6778. Made more compliant with the naming policy by adding a _t at the end.
  6779. ** Deprecated functions: scm_mkbig, scm_big2num, scm_adjbig,
  6780. scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl
  6781. With the exception of the mysterious scm_2ulong2big, they are still
  6782. available under new names (scm_i_mkbig etc). These functions are not
  6783. intended to be used in user code. You should avoid dealing with
  6784. bignums directly, and should deal with numbers in general (which can
  6785. be bignums).
  6786. ** Change in behavior: scm_num2long, scm_num2ulong
  6787. The scm_num2[u]long functions don't any longer accept an inexact
  6788. argument. This change in behavior is motivated by concordance with
  6789. R5RS: It is more common that a primitive doesn't want to accept an
  6790. inexact for an exact.
  6791. ** New functions: scm_short2num, scm_ushort2num, scm_int2num,
  6792. scm_uint2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
  6793. scm_num2ushort, scm_num2int, scm_num2uint, scm_num2ptrdiff,
  6794. scm_num2size.
  6795. These are conversion functions between the various ANSI C integral
  6796. types and Scheme numbers. NOTE: The scm_num2xxx functions don't
  6797. accept an inexact argument.
  6798. ** New functions: scm_float2num, scm_double2num,
  6799. scm_num2float, scm_num2double.
  6800. These are conversion functions between the two ANSI C float types and
  6801. Scheme numbers.
  6802. ** New number validation macros:
  6803. SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,INT,UINT}[_DEF]
  6804. See above.
  6805. ** New functions: scm_gc_protect_object, scm_gc_unprotect_object
  6806. These are just nicer-named old scm_protect_object and
  6807. scm_unprotect_object.
  6808. ** Deprecated functions: scm_protect_object, scm_unprotect_object
  6809. ** New functions: scm_gc_[un]register_root, scm_gc_[un]register_roots
  6810. These functions can be used to register pointers to locations that
  6811. hold SCM values.
  6812. ** Deprecated function: scm_create_hook.
  6813. Its sins are: misleading name, non-modularity and lack of general
  6814. usefulness.
  6815. Changes since Guile 1.3.4:
  6816. * Changes to the distribution
  6817. ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
  6818. We've changed the way we handle generated files in the Guile source
  6819. repository. As a result, the procedure for building trees obtained
  6820. from the nightly FTP snapshots or via CVS has changed:
  6821. - You must have appropriate versions of autoconf, automake, and
  6822. libtool installed on your system. See README for info on how to
  6823. obtain these programs.
  6824. - Before configuring the tree, you must first run the script
  6825. `autogen.sh' at the top of the source tree.
  6826. The Guile repository used to contain not only source files, written by
  6827. humans, but also some generated files, like configure scripts and
  6828. Makefile.in files. Even though the contents of these files could be
  6829. derived mechanically from other files present, we thought it would
  6830. make the tree easier to build if we checked them into CVS.
  6831. However, this approach means that minor differences between
  6832. developer's installed tools and habits affected the whole team.
  6833. So we have removed the generated files from the repository, and
  6834. added the autogen.sh script, which will reconstruct them
  6835. appropriately.
  6836. ** configure now has experimental options to remove support for certain
  6837. features:
  6838. --disable-arrays omit array and uniform array support
  6839. --disable-posix omit posix interfaces
  6840. --disable-networking omit networking interfaces
  6841. --disable-regex omit regular expression interfaces
  6842. These are likely to become separate modules some day.
  6843. ** New configure option --enable-debug-freelist
  6844. This enables a debugging version of SCM_NEWCELL(), and also registers
  6845. an extra primitive, the setter `gc-set-debug-check-freelist!'.
  6846. Configure with the --enable-debug-freelist option to enable
  6847. the gc-set-debug-check-freelist! primitive, and then use:
  6848. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  6849. (gc-set-debug-check-freelist! #f) # turn off checking
  6850. Checking of the freelist forces a traversal of the freelist and
  6851. a garbage collection before each allocation of a cell. This can
  6852. slow down the interpreter dramatically, so the setter should be used to
  6853. turn on this extra processing only when necessary.
  6854. ** New configure option --enable-debug-malloc
  6855. Include code for debugging of calls to scm_must_malloc/realloc/free.
  6856. Checks that
  6857. 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
  6858. 2. objects reallocated by scm_must_realloc has been allocated by
  6859. scm_must_malloc
  6860. 3. reallocated objects are reallocated with the same what string
  6861. But, most importantly, it records the number of allocated objects of
  6862. each kind. This is useful when searching for memory leaks.
  6863. A Guile compiled with this option provides the primitive
  6864. `malloc-stats' which returns an alist with pairs of kind and the
  6865. number of objects of that kind.
  6866. ** All includes are now referenced relative to the root directory
  6867. Since some users have had problems with mixups between Guile and
  6868. system headers, we have decided to always refer to Guile headers via
  6869. their parent directories. This essentially creates a "private name
  6870. space" for Guile headers. This means that the compiler only is given
  6871. -I options for the root build and root source directory.
  6872. ** Header files kw.h and genio.h have been removed.
  6873. ** The module (ice-9 getopt-gnu-style) has been removed.
  6874. ** New module (ice-9 documentation)
  6875. Implements the interface to documentation strings associated with
  6876. objects.
  6877. ** New module (ice-9 time)
  6878. Provides a macro `time', which displays execution time of a given form.
  6879. ** New module (ice-9 history)
  6880. Loading this module enables value history in the repl.
  6881. * Changes to the stand-alone interpreter
  6882. ** New command line option --debug
  6883. Start Guile with debugging evaluator and backtraces enabled.
  6884. This is useful when debugging your .guile init file or scripts.
  6885. ** New help facility
  6886. Usage: (help NAME) gives documentation about objects named NAME (a symbol)
  6887. (help REGEXP) ditto for objects with names matching REGEXP (a string)
  6888. (help 'NAME) gives documentation for NAME, even if it is not an object
  6889. (help ,EXPR) gives documentation for object returned by EXPR
  6890. (help (my module)) gives module commentary for `(my module)'
  6891. (help) gives this text
  6892. `help' searches among bindings exported from loaded modules, while
  6893. `apropos' searches among bindings visible from the "current" module.
  6894. Examples: (help help)
  6895. (help cons)
  6896. (help "output-string")
  6897. ** `help' and `apropos' now prints full module names
  6898. ** Dynamic linking now uses libltdl from the libtool package.
  6899. The old system dependent code for doing dynamic linking has been
  6900. replaced with calls to the libltdl functions which do all the hairy
  6901. details for us.
  6902. The major improvement is that you can now directly pass libtool
  6903. library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
  6904. will be able to do the best shared library job you can get, via
  6905. libltdl.
  6906. The way dynamic libraries are found has changed and is not really
  6907. portable across platforms, probably. It is therefore recommended to
  6908. use absolute filenames when possible.
  6909. If you pass a filename without an extension to `dynamic-link', it will
  6910. try a few appropriate ones. Thus, the most platform ignorant way is
  6911. to specify a name like "libfoo", without any directories and
  6912. extensions.
  6913. ** Guile COOP threads are now compatible with LinuxThreads
  6914. Previously, COOP threading wasn't possible in applications linked with
  6915. Linux POSIX threads due to their use of the stack pointer to find the
  6916. thread context. This has now been fixed with a workaround which uses
  6917. the pthreads to allocate the stack.
  6918. ** New primitives: `pkgdata-dir', `site-dir', `library-dir'
  6919. ** Positions of erring expression in scripts
  6920. With version 1.3.4, the location of the erring expression in Guile
  6921. scripts is no longer automatically reported. (This should have been
  6922. documented before the 1.3.4 release.)
  6923. You can get this information by enabling recording of positions of
  6924. source expressions and running the debugging evaluator. Put this at
  6925. the top of your script (or in your "site" file):
  6926. (read-enable 'positions)
  6927. (debug-enable 'debug)
  6928. ** Backtraces in scripts
  6929. It is now possible to get backtraces in scripts.
  6930. Put
  6931. (debug-enable 'debug 'backtrace)
  6932. at the top of the script.
  6933. (The first options enables the debugging evaluator.
  6934. The second enables backtraces.)
  6935. ** Part of module system symbol lookup now implemented in C
  6936. The eval closure of most modules is now implemented in C. Since this
  6937. was one of the bottlenecks for loading speed, Guile now loads code
  6938. substantially faster than before.
  6939. ** Attempting to get the value of an unbound variable now produces
  6940. an exception with a key of 'unbound-variable instead of 'misc-error.
  6941. ** The initial default output port is now unbuffered if it's using a
  6942. tty device. Previously in this situation it was line-buffered.
  6943. ** New hook: after-gc-hook
  6944. after-gc-hook takes over the role of gc-thunk. This hook is run at
  6945. the first SCM_TICK after a GC. (Thus, the code is run at the same
  6946. point during evaluation as signal handlers.)
  6947. Note that this hook should be used only for diagnostic and debugging
  6948. purposes. It is not certain that it will continue to be well-defined
  6949. when this hook is run in the future.
  6950. C programmers: Note the new C level hooks scm_before_gc_c_hook,
  6951. scm_before_sweep_c_hook, scm_after_gc_c_hook.
  6952. ** Improvements to garbage collector
  6953. Guile 1.4 has a new policy for triggering heap allocation and
  6954. determining the sizes of heap segments. It fixes a number of problems
  6955. in the old GC.
  6956. 1. The new policy can handle two separate pools of cells
  6957. (2-word/4-word) better. (The old policy would run wild, allocating
  6958. more and more memory for certain programs.)
  6959. 2. The old code would sometimes allocate far too much heap so that the
  6960. Guile process became gigantic. The new code avoids this.
  6961. 3. The old code would sometimes allocate too little so that few cells
  6962. were freed at GC so that, in turn, too much time was spent in GC.
  6963. 4. The old code would often trigger heap allocation several times in a
  6964. row. (The new scheme predicts how large the segments needs to be
  6965. in order not to need further allocation.)
  6966. All in all, the new GC policy will make larger applications more
  6967. efficient.
  6968. The new GC scheme also is prepared for POSIX threading. Threads can
  6969. allocate private pools of cells ("clusters") with just a single
  6970. function call. Allocation of single cells from such a cluster can
  6971. then proceed without any need of inter-thread synchronization.
  6972. ** New environment variables controlling GC parameters
  6973. GUILE_MAX_SEGMENT_SIZE Maximal segment size
  6974. (default = 2097000)
  6975. Allocation of 2-word cell heaps:
  6976. GUILE_INIT_SEGMENT_SIZE_1 Size of initial heap segment in bytes
  6977. (default = 360000)
  6978. GUILE_MIN_YIELD_1 Minimum number of freed cells at each
  6979. GC in percent of total heap size
  6980. (default = 40)
  6981. Allocation of 4-word cell heaps
  6982. (used for real numbers and misc other objects):
  6983. GUILE_INIT_SEGMENT_SIZE_2, GUILE_MIN_YIELD_2
  6984. (See entry "Way for application to customize GC parameters" under
  6985. section "Changes to the scm_ interface" below.)
  6986. ** Guile now implements reals using 4-word cells
  6987. This speeds up computation with reals. (They were earlier allocated
  6988. with `malloc'.) There is still some room for optimizations, however.
  6989. ** Some further steps toward POSIX thread support have been taken
  6990. *** Guile's critical sections (SCM_DEFER/ALLOW_INTS)
  6991. don't have much effect any longer, and many of them will be removed in
  6992. next release.
  6993. *** Signals
  6994. are only handled at the top of the evaluator loop, immediately after
  6995. I/O, and in scm_equalp.
  6996. *** The GC can allocate thread private pools of pairs.
  6997. * Changes to Scheme functions and syntax
  6998. ** close-input-port and close-output-port are now R5RS
  6999. These procedures have been turned into primitives and have R5RS behavior.
  7000. ** New procedure: simple-format PORT MESSAGE ARG1 ...
  7001. (ice-9 boot) makes `format' an alias for `simple-format' until possibly
  7002. extended by the more sophisticated version in (ice-9 format)
  7003. (simple-format port message . args)
  7004. Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
  7005. MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,
  7006. the escapes are replaced with corresponding members of ARGS:
  7007. ~A formats using `display' and ~S formats using `write'.
  7008. If DESTINATION is #t, then use the `current-output-port',
  7009. if DESTINATION is #f, then return a string containing the formatted text.
  7010. Does not add a trailing newline."
  7011. ** string-ref: the second argument is no longer optional.
  7012. ** string, list->string: no longer accept strings in their arguments,
  7013. only characters, for compatibility with R5RS.
  7014. ** New procedure: port-closed? PORT
  7015. Returns #t if PORT is closed or #f if it is open.
  7016. ** Deprecated: list*
  7017. The list* functionality is now provided by cons* (SRFI-1 compliant)
  7018. ** New procedure: cons* ARG1 ARG2 ... ARGn
  7019. Like `list', but the last arg provides the tail of the constructed list,
  7020. returning (cons ARG1 (cons ARG2 (cons ... ARGn))).
  7021. Requires at least one argument. If given one argument, that argument
  7022. is returned as result.
  7023. This function is called `list*' in some other Schemes and in Common LISP.
  7024. ** Removed deprecated: serial-map, serial-array-copy!, serial-array-map!
  7025. ** New procedure: object-documentation OBJECT
  7026. Returns the documentation string associated with OBJECT. The
  7027. procedure uses a caching mechanism so that subsequent lookups are
  7028. faster.
  7029. Exported by (ice-9 documentation).
  7030. ** module-name now returns full names of modules
  7031. Previously, only the last part of the name was returned (`session' for
  7032. `(ice-9 session)'). Ex: `(ice-9 session)'.
  7033. * Changes to the gh_ interface
  7034. ** Deprecated: gh_int2scmb
  7035. Use gh_bool2scm instead.
  7036. * Changes to the scm_ interface
  7037. ** Guile primitives now carry docstrings!
  7038. Thanks to Greg Badros!
  7039. ** Guile primitives are defined in a new way: SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  7040. Now Guile primitives are defined using the SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  7041. macros and must contain a docstring that is extracted into foo.doc using a new
  7042. guile-doc-snarf script (that uses guile-doc-snarf.awk).
  7043. However, a major overhaul of these macros is scheduled for the next release of
  7044. guile.
  7045. ** Guile primitives use a new technique for validation of arguments
  7046. SCM_VALIDATE_* macros are defined to ease the redundancy and improve
  7047. the readability of argument checking.
  7048. ** All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
  7049. ** New macros: SCM_PACK, SCM_UNPACK
  7050. Compose/decompose an SCM value.
  7051. The SCM type is now treated as an abstract data type and may be defined as a
  7052. long, a void* or as a struct, depending on the architecture and compile time
  7053. options. This makes it easier to find several types of bugs, for example when
  7054. SCM values are treated as integers without conversion. Values of the SCM type
  7055. should be treated as "atomic" values. These macros are used when
  7056. composing/decomposing an SCM value, either because you want to access
  7057. individual bits, or because you want to treat it as an integer value.
  7058. E.g., in order to set bit 7 in an SCM value x, use the expression
  7059. SCM_PACK (SCM_UNPACK (x) | 0x80)
  7060. ** The name property of hooks is deprecated.
  7061. Thus, the use of SCM_HOOK_NAME and scm_make_hook_with_name is deprecated.
  7062. You can emulate this feature by using object properties.
  7063. ** Deprecated macros: SCM_INPORTP, SCM_OUTPORTP, SCM_CRDY, SCM_ICHRP,
  7064. SCM_ICHR, SCM_MAKICHR, SCM_SETJMPBUF, SCM_NSTRINGP, SCM_NRWSTRINGP,
  7065. SCM_NVECTORP
  7066. These macros will be removed in a future release of Guile.
  7067. ** The following types, functions and macros from numbers.h are deprecated:
  7068. scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL,
  7069. SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG
  7070. ** Port internals: the rw_random variable in the scm_port structure
  7071. must be set to non-zero in any random access port. In recent Guile
  7072. releases it was only set for bidirectional random-access ports.
  7073. ** Port internals: the seek ptob procedure is now responsible for
  7074. resetting the buffers if required. The change was made so that in the
  7075. special case of reading the current position (i.e., seek p 0 SEEK_CUR)
  7076. the fport and strport ptobs can avoid resetting the buffers,
  7077. in particular to avoid discarding unread chars. An existing port
  7078. type can be fixed by adding something like the following to the
  7079. beginning of the ptob seek procedure:
  7080. if (pt->rw_active == SCM_PORT_READ)
  7081. scm_end_input (object);
  7082. else if (pt->rw_active == SCM_PORT_WRITE)
  7083. ptob->flush (object);
  7084. although to actually avoid resetting the buffers and discard unread
  7085. chars requires further hacking that depends on the characteristics
  7086. of the ptob.
  7087. ** Deprecated functions: scm_fseek, scm_tag
  7088. These functions are no longer used and will be removed in a future version.
  7089. ** The scm_sysmissing procedure is no longer used in libguile.
  7090. Unless it turns out to be unexpectedly useful to somebody, it will be
  7091. removed in a future version.
  7092. ** The format of error message strings has changed
  7093. The two C procedures: scm_display_error and scm_error, as well as the
  7094. primitive `scm-error', now use scm_simple_format to do their work.
  7095. This means that the message strings of all code must be updated to use
  7096. ~A where %s was used before, and ~S where %S was used before.
  7097. During the period when there still are a lot of old Guiles out there,
  7098. you might want to support both old and new versions of Guile.
  7099. There are basically two methods to achieve this. Both methods use
  7100. autoconf. Put
  7101. AC_CHECK_FUNCS(scm_simple_format)
  7102. in your configure.in.
  7103. Method 1: Use the string concatenation features of ANSI C's
  7104. preprocessor.
  7105. In C:
  7106. #ifdef HAVE_SCM_SIMPLE_FORMAT
  7107. #define FMT_S "~S"
  7108. #else
  7109. #define FMT_S "%S"
  7110. #endif
  7111. Then represent each of your error messages using a preprocessor macro:
  7112. #define E_SPIDER_ERROR "There's a spider in your " ## FMT_S ## "!!!"
  7113. In Scheme:
  7114. (define fmt-s (if (defined? 'simple-format) "~S" "%S"))
  7115. (define make-message string-append)
  7116. (define e-spider-error (make-message "There's a spider in your " fmt-s "!!!"))
  7117. Method 2: Use the oldfmt function found in doc/oldfmt.c.
  7118. In C:
  7119. scm_misc_error ("picnic", scm_c_oldfmt0 ("There's a spider in your ~S!!!"),
  7120. ...);
  7121. In Scheme:
  7122. (scm-error 'misc-error "picnic" (oldfmt "There's a spider in your ~S!!!")
  7123. ...)
  7124. ** Deprecated: coop_mutex_init, coop_condition_variable_init
  7125. Don't use the functions coop_mutex_init and
  7126. coop_condition_variable_init. They will change.
  7127. Use scm_mutex_init and scm_cond_init instead.
  7128. ** New function: int scm_cond_timedwait (scm_cond_t *COND, scm_mutex_t *MUTEX, const struct timespec *ABSTIME)
  7129. `scm_cond_timedwait' atomically unlocks MUTEX and waits on
  7130. COND, as `scm_cond_wait' does, but it also bounds the duration
  7131. of the wait. If COND has not been signaled before time ABSTIME,
  7132. the mutex MUTEX is re-acquired and `scm_cond_timedwait'
  7133. returns the error code `ETIMEDOUT'.
  7134. The ABSTIME parameter specifies an absolute time, with the same
  7135. origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds
  7136. to 00:00:00 GMT, January 1, 1970.
  7137. ** New function: scm_cond_broadcast (scm_cond_t *COND)
  7138. `scm_cond_broadcast' restarts all the threads that are waiting
  7139. on the condition variable COND. Nothing happens if no threads are
  7140. waiting on COND.
  7141. ** New function: scm_key_create (scm_key_t *KEY, void (*destr_function) (void *))
  7142. `scm_key_create' allocates a new TSD key. The key is stored in
  7143. the location pointed to by KEY. There is no limit on the number
  7144. of keys allocated at a given time. The value initially associated
  7145. with the returned key is `NULL' in all currently executing threads.
  7146. The DESTR_FUNCTION argument, if not `NULL', specifies a destructor
  7147. function associated with the key. When a thread terminates,
  7148. DESTR_FUNCTION is called on the value associated with the key in
  7149. that thread. The DESTR_FUNCTION is not called if a key is deleted
  7150. with `scm_key_delete' or a value is changed with
  7151. `scm_setspecific'. The order in which destructor functions are
  7152. called at thread termination time is unspecified.
  7153. Destructors are not yet implemented.
  7154. ** New function: scm_setspecific (scm_key_t KEY, const void *POINTER)
  7155. `scm_setspecific' changes the value associated with KEY in the
  7156. calling thread, storing the given POINTER instead.
  7157. ** New function: scm_getspecific (scm_key_t KEY)
  7158. `scm_getspecific' returns the value currently associated with
  7159. KEY in the calling thread.
  7160. ** New function: scm_key_delete (scm_key_t KEY)
  7161. `scm_key_delete' deallocates a TSD key. It does not check
  7162. whether non-`NULL' values are associated with that key in the
  7163. currently executing threads, nor call the destructor function
  7164. associated with the key.
  7165. ** New function: scm_c_hook_init (scm_c_hook_t *HOOK, void *HOOK_DATA, scm_c_hook_type_t TYPE)
  7166. Initialize a C level hook HOOK with associated HOOK_DATA and type
  7167. TYPE. (See scm_c_hook_run ().)
  7168. ** New function: scm_c_hook_add (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA, int APPENDP)
  7169. Add hook function FUNC with associated FUNC_DATA to HOOK. If APPENDP
  7170. is true, add it last, otherwise first. The same FUNC can be added
  7171. multiple times if FUNC_DATA differ and vice versa.
  7172. ** New function: scm_c_hook_remove (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA)
  7173. Remove hook function FUNC with associated FUNC_DATA from HOOK. A
  7174. function is only removed if both FUNC and FUNC_DATA matches.
  7175. ** New function: void *scm_c_hook_run (scm_c_hook_t *HOOK, void *DATA)
  7176. Run hook HOOK passing DATA to the hook functions.
  7177. If TYPE is SCM_C_HOOK_NORMAL, all hook functions are run. The value
  7178. returned is undefined.
  7179. If TYPE is SCM_C_HOOK_OR, hook functions are run until a function
  7180. returns a non-NULL value. This value is returned as the result of
  7181. scm_c_hook_run. If all functions return NULL, NULL is returned.
  7182. If TYPE is SCM_C_HOOK_AND, hook functions are run until a function
  7183. returns a NULL value, and NULL is returned. If all functions returns
  7184. a non-NULL value, the last value is returned.
  7185. ** New C level GC hooks
  7186. Five new C level hooks has been added to the garbage collector.
  7187. scm_before_gc_c_hook
  7188. scm_after_gc_c_hook
  7189. are run before locking and after unlocking the heap. The system is
  7190. thus in a mode where evaluation can take place. (Except that
  7191. scm_before_gc_c_hook must not allocate new cells.)
  7192. scm_before_mark_c_hook
  7193. scm_before_sweep_c_hook
  7194. scm_after_sweep_c_hook
  7195. are run when the heap is locked. These are intended for extension of
  7196. the GC in a modular fashion. Examples are the weaks and guardians
  7197. modules.
  7198. ** Way for application to customize GC parameters
  7199. The application can set up other default values for the GC heap
  7200. allocation parameters
  7201. GUILE_INIT_HEAP_SIZE_1, GUILE_MIN_YIELD_1,
  7202. GUILE_INIT_HEAP_SIZE_2, GUILE_MIN_YIELD_2,
  7203. GUILE_MAX_SEGMENT_SIZE,
  7204. by setting
  7205. scm_default_init_heap_size_1, scm_default_min_yield_1,
  7206. scm_default_init_heap_size_2, scm_default_min_yield_2,
  7207. scm_default_max_segment_size
  7208. respectively before callong scm_boot_guile.
  7209. (See entry "New environment variables ..." in section
  7210. "Changes to the stand-alone interpreter" above.)
  7211. ** scm_protect_object/scm_unprotect_object now nest
  7212. This means that you can call scm_protect_object multiple times on an
  7213. object and count on the object being protected until
  7214. scm_unprotect_object has been call the same number of times.
  7215. The functions also have better time complexity.
  7216. Still, it is usually possible to structure the application in a way
  7217. that you don't need to use these functions. For example, if you use a
  7218. protected standard Guile list to keep track of live objects rather
  7219. than some custom data type, objects will die a natural death when they
  7220. are no longer needed.
  7221. ** Deprecated type tags: scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc
  7222. Guile does not provide the float representation for inexact real numbers any
  7223. more. Now, only doubles are used to represent inexact real numbers. Further,
  7224. the tag names scm_tc_dblr and scm_tc_dblc have been changed to scm_tc16_real
  7225. and scm_tc16_complex, respectively.
  7226. ** Removed deprecated type scm_smobfuns
  7227. ** Removed deprecated function scm_newsmob
  7228. ** Warning: scm_make_smob_type_mfpe might become deprecated in a future release
  7229. There is an ongoing discussion among the developers whether to
  7230. deprecate `scm_make_smob_type_mfpe' or not. Please use the current
  7231. standard interface (scm_make_smob_type, scm_set_smob_XXX) in new code
  7232. until this issue has been settled.
  7233. ** Removed deprecated type tag scm_tc16_kw
  7234. ** Added type tag scm_tc16_keyword
  7235. (This was introduced already in release 1.3.4 but was not documented
  7236. until now.)
  7237. ** gdb_print now prints "*** Guile not initialized ***" until Guile initialized
  7238. * Changes to system call interfaces:
  7239. ** The "select" procedure now tests port buffers for the ability to
  7240. provide input or accept output. Previously only the underlying file
  7241. descriptors were checked.
  7242. ** New variable PIPE_BUF: the maximum number of bytes that can be
  7243. atomically written to a pipe.
  7244. ** If a facility is not available on the system when Guile is
  7245. compiled, the corresponding primitive procedure will not be defined.
  7246. Previously it would have been defined but would throw a system-error
  7247. exception if called. Exception handlers which catch this case may
  7248. need minor modification: an error will be thrown with key
  7249. 'unbound-variable instead of 'system-error. Alternatively it's
  7250. now possible to use `defined?' to check whether the facility is
  7251. available.
  7252. ** Procedures which depend on the timezone should now give the correct
  7253. result on systems which cache the TZ environment variable, even if TZ
  7254. is changed without calling tzset.
  7255. * Changes to the networking interfaces:
  7256. ** New functions: htons, ntohs, htonl, ntohl: for converting short and
  7257. long integers between network and host format. For now, it's not
  7258. particularly convenient to do this kind of thing, but consider:
  7259. (define write-network-long
  7260. (lambda (value port)
  7261. (let ((v (make-uniform-vector 1 1 0)))
  7262. (uniform-vector-set! v 0 (htonl value))
  7263. (uniform-vector-write v port))))
  7264. (define read-network-long
  7265. (lambda (port)
  7266. (let ((v (make-uniform-vector 1 1 0)))
  7267. (uniform-vector-read! v port)
  7268. (ntohl (uniform-vector-ref v 0)))))
  7269. ** If inet-aton fails, it now throws an error with key 'misc-error
  7270. instead of 'system-error, since errno is not relevant.
  7271. ** Certain gethostbyname/gethostbyaddr failures now throw errors with
  7272. specific keys instead of 'system-error. The latter is inappropriate
  7273. since errno will not have been set. The keys are:
  7274. 'host-not-found, 'try-again, 'no-recovery and 'no-data.
  7275. ** sethostent, setnetent, setprotoent, setservent: now take an
  7276. optional argument STAYOPEN, which specifies whether the database
  7277. remains open after a database entry is accessed randomly (e.g., using
  7278. gethostbyname for the hosts database.) The default is #f. Previously
  7279. #t was always used.
  7280. Changes since Guile 1.3.2:
  7281. * Changes to the stand-alone interpreter
  7282. ** Debugger
  7283. An initial version of the Guile debugger written by Chris Hanson has
  7284. been added. The debugger is still under development but is included
  7285. in the distribution anyway since it is already quite useful.
  7286. Type
  7287. (debug)
  7288. after an error to enter the debugger. Type `help' inside the debugger
  7289. for a description of available commands.
  7290. If you prefer to have stack frames numbered and printed in
  7291. anti-chronological order and prefer up in the stack to be down on the
  7292. screen as is the case in gdb, you can put
  7293. (debug-enable 'backwards)
  7294. in your .guile startup file. (However, this means that Guile can't
  7295. use indentation to indicate stack level.)
  7296. The debugger is autoloaded into Guile at the first use.
  7297. ** Further enhancements to backtraces
  7298. There is a new debug option `width' which controls the maximum width
  7299. on the screen of printed stack frames. Fancy printing parameters
  7300. ("level" and "length" as in Common LISP) are adaptively adjusted for
  7301. each stack frame to give maximum information while still fitting
  7302. within the bounds. If the stack frame can't be made to fit by
  7303. adjusting parameters, it is simply cut off at the end. This is marked
  7304. with a `$'.
  7305. ** Some modules are now only loaded when the repl is started
  7306. The modules (ice-9 debug), (ice-9 session), (ice-9 threads) and (ice-9
  7307. regex) are now loaded into (guile-user) only if the repl has been
  7308. started. The effect is that the startup time for scripts has been
  7309. reduced to 30% of what it was previously.
  7310. Correctly written scripts load the modules they require at the top of
  7311. the file and should not be affected by this change.
  7312. ** Hooks are now represented as smobs
  7313. * Changes to Scheme functions and syntax
  7314. ** Readline support has changed again.
  7315. The old (readline-activator) module is gone. Use (ice-9 readline)
  7316. instead, which now contains all readline functionality. So the code
  7317. to activate readline is now
  7318. (use-modules (ice-9 readline))
  7319. (activate-readline)
  7320. This should work at any time, including from the guile prompt.
  7321. To avoid confusion about the terms of Guile's license, please only
  7322. enable readline for your personal use; please don't make it the
  7323. default for others. Here is why we make this rather odd-sounding
  7324. request:
  7325. Guile is normally licensed under a weakened form of the GNU General
  7326. Public License, which allows you to link code with Guile without
  7327. placing that code under the GPL. This exception is important to some
  7328. people.
  7329. However, since readline is distributed under the GNU General Public
  7330. License, when you link Guile with readline, either statically or
  7331. dynamically, you effectively change Guile's license to the strict GPL.
  7332. Whenever you link any strictly GPL'd code into Guile, uses of Guile
  7333. which are normally permitted become forbidden. This is a rather
  7334. non-obvious consequence of the licensing terms.
  7335. So, to make sure things remain clear, please let people choose for
  7336. themselves whether to link GPL'd libraries like readline with Guile.
  7337. ** regexp-substitute/global has changed slightly, but incompatibly.
  7338. If you include a function in the item list, the string of the match
  7339. object it receives is the same string passed to
  7340. regexp-substitute/global, not some suffix of that string.
  7341. Correspondingly, the match's positions are relative to the entire
  7342. string, not the suffix.
  7343. If the regexp can match the empty string, the way matches are chosen
  7344. from the string has changed. regexp-substitute/global recognizes the
  7345. same set of matches that list-matches does; see below.
  7346. ** New function: list-matches REGEXP STRING [FLAGS]
  7347. Return a list of match objects, one for every non-overlapping, maximal
  7348. match of REGEXP in STRING. The matches appear in left-to-right order.
  7349. list-matches only reports matches of the empty string if there are no
  7350. other matches which begin on, end at, or include the empty match's
  7351. position.
  7352. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7353. ** New function: fold-matches REGEXP STRING INIT PROC [FLAGS]
  7354. For each match of REGEXP in STRING, apply PROC to the match object,
  7355. and the last value PROC returned, or INIT for the first call. Return
  7356. the last value returned by PROC. We apply PROC to the matches as they
  7357. appear from left to right.
  7358. This function recognizes matches according to the same criteria as
  7359. list-matches.
  7360. Thus, you could define list-matches like this:
  7361. (define (list-matches regexp string . flags)
  7362. (reverse! (apply fold-matches regexp string '() cons flags)))
  7363. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7364. ** Hooks
  7365. *** New function: hook? OBJ
  7366. Return #t if OBJ is a hook, otherwise #f.
  7367. *** New function: make-hook-with-name NAME [ARITY]
  7368. Return a hook with name NAME and arity ARITY. The default value for
  7369. ARITY is 0. The only effect of NAME is that it will appear when the
  7370. hook object is printed to ease debugging.
  7371. *** New function: hook-empty? HOOK
  7372. Return #t if HOOK doesn't contain any procedures, otherwise #f.
  7373. *** New function: hook->list HOOK
  7374. Return a list of the procedures that are called when run-hook is
  7375. applied to HOOK.
  7376. ** `map' signals an error if its argument lists are not all the same length.
  7377. This is the behavior required by R5RS, so this change is really a bug
  7378. fix. But it seems to affect a lot of people's code, so we're
  7379. mentioning it here anyway.
  7380. ** Print-state handling has been made more transparent
  7381. Under certain circumstances, ports are represented as a port with an
  7382. associated print state. Earlier, this pair was represented as a pair
  7383. (see "Some magic has been added to the printer" below). It is now
  7384. indistinguishable (almost; see `get-print-state') from a port on the
  7385. user level.
  7386. *** New function: port-with-print-state OUTPUT-PORT PRINT-STATE
  7387. Return a new port with the associated print state PRINT-STATE.
  7388. *** New function: get-print-state OUTPUT-PORT
  7389. Return the print state associated with this port if it exists,
  7390. otherwise return #f.
  7391. *** New function: directory-stream? OBJECT
  7392. Returns true iff OBJECT is a directory stream --- the sort of object
  7393. returned by `opendir'.
  7394. ** New function: using-readline?
  7395. Return #t if readline is in use in the current repl.
  7396. ** structs will be removed in 1.4
  7397. Structs will be replaced in Guile 1.4. We will merge GOOPS into Guile
  7398. and use GOOPS objects as the fundamental record type.
  7399. * Changes to the scm_ interface
  7400. ** structs will be removed in 1.4
  7401. The entire current struct interface (struct.c, struct.h) will be
  7402. replaced in Guile 1.4. We will merge GOOPS into libguile and use
  7403. GOOPS objects as the fundamental record type.
  7404. ** The internal representation of subr's has changed
  7405. Instead of giving a hint to the subr name, the CAR field of the subr
  7406. now contains an index to a subr entry in scm_subr_table.
  7407. *** New variable: scm_subr_table
  7408. An array of subr entries. A subr entry contains the name, properties
  7409. and documentation associated with the subr. The properties and
  7410. documentation slots are not yet used.
  7411. ** A new scheme for "forwarding" calls to a builtin to a generic function
  7412. It is now possible to extend the functionality of some Guile
  7413. primitives by letting them defer a call to a GOOPS generic function on
  7414. argument mismatch. This means that there is no loss of efficiency in
  7415. normal evaluation.
  7416. Example:
  7417. (use-modules (oop goops)) ; Must be GOOPS version 0.2.
  7418. (define-method + ((x <string>) (y <string>))
  7419. (string-append x y))
  7420. + will still be as efficient as usual in numerical calculations, but
  7421. can also be used for concatenating strings.
  7422. Who will be the first one to extend Guile's numerical tower to
  7423. rationals? :) [OK, there a few other things to fix before this can
  7424. be made in a clean way.]
  7425. *** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
  7426. New macro: SCM_GPROC (CNAME, SNAME, REQ, OPT, VAR, CFUNC, GENERIC)
  7427. New macro: SCM_GPROC1 (CNAME, SNAME, TYPE, CFUNC, GENERIC)
  7428. These do the same job as SCM_PROC and SCM_PROC1, but they also define
  7429. a variable GENERIC which can be used by the dispatch macros below.
  7430. [This is experimental code which may change soon.]
  7431. *** New macros for forwarding control to a generic on arg type error
  7432. New macro: SCM_WTA_DISPATCH_1 (GENERIC, ARG1, POS, SUBR)
  7433. New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
  7434. These correspond to the scm_wta function call, and have the same
  7435. behavior until the user has called the GOOPS primitive
  7436. `enable-primitive-generic!'. After that, these macros will apply the
  7437. generic function GENERIC to the argument(s) instead of calling
  7438. scm_wta.
  7439. [This is experimental code which may change soon.]
  7440. *** New macros for argument testing with generic dispatch
  7441. New macro: SCM_GASSERT1 (COND, GENERIC, ARG1, POS, SUBR)
  7442. New macro: SCM_GASSERT2 (COND, GENERIC, ARG1, ARG2, POS, SUBR)
  7443. These correspond to the SCM_ASSERT macro, but will defer control to
  7444. GENERIC on error after `enable-primitive-generic!' has been called.
  7445. [This is experimental code which may change soon.]
  7446. ** New function: SCM scm_eval_body (SCM body, SCM env)
  7447. Evaluates the body of a special form.
  7448. ** The internal representation of struct's has changed
  7449. Previously, four slots were allocated for the procedure(s) of entities
  7450. and operators. The motivation for this representation had to do with
  7451. the structure of the evaluator, the wish to support tail-recursive
  7452. generic functions, and efficiency. Since the generic function
  7453. dispatch mechanism has changed, there is no longer a need for such an
  7454. expensive representation, and the representation has been simplified.
  7455. This should not make any difference for most users.
  7456. ** GOOPS support has been cleaned up.
  7457. Some code has been moved from eval.c to objects.c and code in both of
  7458. these compilation units has been cleaned up and better structured.
  7459. *** New functions for applying generic functions
  7460. New function: SCM scm_apply_generic (GENERIC, ARGS)
  7461. New function: SCM scm_call_generic_0 (GENERIC)
  7462. New function: SCM scm_call_generic_1 (GENERIC, ARG1)
  7463. New function: SCM scm_call_generic_2 (GENERIC, ARG1, ARG2)
  7464. New function: SCM scm_call_generic_3 (GENERIC, ARG1, ARG2, ARG3)
  7465. ** Deprecated function: scm_make_named_hook
  7466. It is now replaced by:
  7467. ** New function: SCM scm_create_hook (const char *name, int arity)
  7468. Creates a hook in the same way as make-hook above but also
  7469. binds a variable named NAME to it.
  7470. This is the typical way of creating a hook from C code.
  7471. Currently, the variable is created in the "current" module.
  7472. This might change when we get the new module system.
  7473. [The behavior is identical to scm_make_named_hook.]
  7474. Changes since Guile 1.3:
  7475. * Changes to mailing lists
  7476. ** Some of the Guile mailing lists have moved to sourceware.cygnus.com.
  7477. See the README file to find current addresses for all the Guile
  7478. mailing lists.
  7479. * Changes to the distribution
  7480. ** Readline support is no longer included with Guile by default.
  7481. Based on the different license terms of Guile and Readline, we
  7482. concluded that Guile should not *by default* cause the linking of
  7483. Readline into an application program. Readline support is now offered
  7484. as a separate module, which is linked into an application only when
  7485. you explicitly specify it.
  7486. Although Guile is GNU software, its distribution terms add a special
  7487. exception to the usual GNU General Public License (GPL). Guile's
  7488. license includes a clause that allows you to link Guile with non-free
  7489. programs. We add this exception so as not to put Guile at a
  7490. disadvantage vis-a-vis other extensibility packages that support other
  7491. languages.
  7492. In contrast, the GNU Readline library is distributed under the GNU
  7493. General Public License pure and simple. This means that you may not
  7494. link Readline, even dynamically, into an application unless it is
  7495. distributed under a free software license that is compatible the GPL.
  7496. Because of this difference in distribution terms, an application that
  7497. can use Guile may not be able to use Readline. Now users will be
  7498. explicitly offered two independent decisions about the use of these
  7499. two packages.
  7500. You can activate the readline support by issuing
  7501. (use-modules (readline-activator))
  7502. (activate-readline)
  7503. from your ".guile" file, for example.
  7504. * Changes to the stand-alone interpreter
  7505. ** All builtins now print as primitives.
  7506. Previously builtin procedures not belonging to the fundamental subr
  7507. types printed as #<compiled closure #<primitive-procedure gsubr-apply>>.
  7508. Now, they print as #<primitive-procedure NAME>.
  7509. ** Backtraces slightly more intelligible.
  7510. gsubr-apply and macro transformer application frames no longer appear
  7511. in backtraces.
  7512. * Changes to Scheme functions and syntax
  7513. ** Guile now correctly handles internal defines by rewriting them into
  7514. their equivalent letrec. Previously, internal defines would
  7515. incrementally add to the innermost environment, without checking
  7516. whether the restrictions specified in RnRS were met. This lead to the
  7517. correct behavior when these restriction actually were met, but didn't
  7518. catch all illegal uses. Such an illegal use could lead to crashes of
  7519. the Guile interpreter or other unwanted results. An example of
  7520. incorrect internal defines that made Guile behave erratically:
  7521. (let ()
  7522. (define a 1)
  7523. (define (b) a)
  7524. (define c (1+ (b)))
  7525. (define d 3)
  7526. (b))
  7527. => 2
  7528. The problem with this example is that the definition of `c' uses the
  7529. value of `b' directly. This confuses the memoization machine of Guile
  7530. so that the second call of `b' (this time in a larger environment that
  7531. also contains bindings for `c' and `d') refers to the binding of `c'
  7532. instead of `a'. You could also make Guile crash with a variation on
  7533. this theme:
  7534. (define (foo flag)
  7535. (define a 1)
  7536. (define (b flag) (if flag a 1))
  7537. (define c (1+ (b flag)))
  7538. (define d 3)
  7539. (b #t))
  7540. (foo #f)
  7541. (foo #t)
  7542. From now on, Guile will issue an `Unbound variable: b' error message
  7543. for both examples.
  7544. ** Hooks
  7545. A hook contains a list of functions which should be called on
  7546. particular occasions in an existing program. Hooks are used for
  7547. customization.
  7548. A window manager might have a hook before-window-map-hook. The window
  7549. manager uses the function run-hooks to call all functions stored in
  7550. before-window-map-hook each time a window is mapped. The user can
  7551. store functions in the hook using add-hook!.
  7552. In Guile, hooks are first class objects.
  7553. *** New function: make-hook [N_ARGS]
  7554. Return a hook for hook functions which can take N_ARGS arguments.
  7555. The default value for N_ARGS is 0.
  7556. (See also scm_make_named_hook below.)
  7557. *** New function: add-hook! HOOK PROC [APPEND_P]
  7558. Put PROC at the beginning of the list of functions stored in HOOK.
  7559. If APPEND_P is supplied, and non-false, put PROC at the end instead.
  7560. PROC must be able to take the number of arguments specified when the
  7561. hook was created.
  7562. If PROC already exists in HOOK, then remove it first.
  7563. *** New function: remove-hook! HOOK PROC
  7564. Remove PROC from the list of functions in HOOK.
  7565. *** New function: reset-hook! HOOK
  7566. Clear the list of hook functions stored in HOOK.
  7567. *** New function: run-hook HOOK ARG1 ...
  7568. Run all hook functions stored in HOOK with arguments ARG1 ... .
  7569. The number of arguments supplied must correspond to the number given
  7570. when the hook was created.
  7571. ** The function `dynamic-link' now takes optional keyword arguments.
  7572. The only keyword argument that is currently defined is `:global
  7573. BOOL'. With it, you can control whether the shared library will be
  7574. linked in global mode or not. In global mode, the symbols from the
  7575. linked library can be used to resolve references from other
  7576. dynamically linked libraries. In non-global mode, the linked
  7577. library is essentially invisible and can only be accessed via
  7578. `dynamic-func', etc. The default is now to link in global mode.
  7579. Previously, the default has been non-global mode.
  7580. The `#:global' keyword is only effective on platforms that support
  7581. the dlopen family of functions.
  7582. ** New function `provided?'
  7583. - Function: provided? FEATURE
  7584. Return true iff FEATURE is supported by this installation of
  7585. Guile. FEATURE must be a symbol naming a feature; the global
  7586. variable `*features*' is a list of available features.
  7587. ** Changes to the module (ice-9 expect):
  7588. *** The expect-strings macro now matches `$' in a regular expression
  7589. only at a line-break or end-of-file by default. Previously it would
  7590. match the end of the string accumulated so far. The old behavior
  7591. can be obtained by setting the variable `expect-strings-exec-flags'
  7592. to 0.
  7593. *** The expect-strings macro now uses a variable `expect-strings-exec-flags'
  7594. for the regexp-exec flags. If `regexp/noteol' is included, then `$'
  7595. in a regular expression will still match before a line-break or
  7596. end-of-file. The default is `regexp/noteol'.
  7597. *** The expect-strings macro now uses a variable
  7598. `expect-strings-compile-flags' for the flags to be supplied to
  7599. `make-regexp'. The default is `regexp/newline', which was previously
  7600. hard-coded.
  7601. *** The expect macro now supplies two arguments to a match procedure:
  7602. the current accumulated string and a flag to indicate whether
  7603. end-of-file has been reached. Previously only the string was supplied.
  7604. If end-of-file is reached, the match procedure will be called an
  7605. additional time with the same accumulated string as the previous call
  7606. but with the flag set.
  7607. ** New module (ice-9 format), implementing the Common Lisp `format' function.
  7608. This code, and the documentation for it that appears here, was
  7609. borrowed from SLIB, with minor adaptations for Guile.
  7610. - Function: format DESTINATION FORMAT-STRING . ARGUMENTS
  7611. An almost complete implementation of Common LISP format description
  7612. according to the CL reference book `Common LISP' from Guy L.
  7613. Steele, Digital Press. Backward compatible to most of the
  7614. available Scheme format implementations.
  7615. Returns `#t', `#f' or a string; has side effect of printing
  7616. according to FORMAT-STRING. If DESTINATION is `#t', the output is
  7617. to the current output port and `#t' is returned. If DESTINATION
  7618. is `#f', a formatted string is returned as the result of the call.
  7619. NEW: If DESTINATION is a string, DESTINATION is regarded as the
  7620. format string; FORMAT-STRING is then the first argument and the
  7621. output is returned as a string. If DESTINATION is a number, the
  7622. output is to the current error port if available by the
  7623. implementation. Otherwise DESTINATION must be an output port and
  7624. `#t' is returned.
  7625. FORMAT-STRING must be a string. In case of a formatting error
  7626. format returns `#f' and prints a message on the current output or
  7627. error port. Characters are output as if the string were output by
  7628. the `display' function with the exception of those prefixed by a
  7629. tilde (~). For a detailed description of the FORMAT-STRING syntax
  7630. please consult a Common LISP format reference manual. For a test
  7631. suite to verify this format implementation load `formatst.scm'.
  7632. Please send bug reports to `lutzeb@cs.tu-berlin.de'.
  7633. Note: `format' is not reentrant, i.e. only one `format'-call may
  7634. be executed at a time.
  7635. *** Format Specification (Format version 3.0)
  7636. Please consult a Common LISP format reference manual for a detailed
  7637. description of the format string syntax. For a demonstration of the
  7638. implemented directives see `formatst.scm'.
  7639. This implementation supports directive parameters and modifiers (`:'
  7640. and `@' characters). Multiple parameters must be separated by a comma
  7641. (`,'). Parameters can be numerical parameters (positive or negative),
  7642. character parameters (prefixed by a quote character (`''), variable
  7643. parameters (`v'), number of rest arguments parameter (`#'), empty and
  7644. default parameters. Directive characters are case independent. The
  7645. general form of a directive is:
  7646. DIRECTIVE ::= ~{DIRECTIVE-PARAMETER,}[:][@]DIRECTIVE-CHARACTER
  7647. DIRECTIVE-PARAMETER ::= [ [-|+]{0-9}+ | 'CHARACTER | v | # ]
  7648. *** Implemented CL Format Control Directives
  7649. Documentation syntax: Uppercase characters represent the
  7650. corresponding control directive characters. Lowercase characters
  7651. represent control directive parameter descriptions.
  7652. `~A'
  7653. Any (print as `display' does).
  7654. `~@A'
  7655. left pad.
  7656. `~MINCOL,COLINC,MINPAD,PADCHARA'
  7657. full padding.
  7658. `~S'
  7659. S-expression (print as `write' does).
  7660. `~@S'
  7661. left pad.
  7662. `~MINCOL,COLINC,MINPAD,PADCHARS'
  7663. full padding.
  7664. `~D'
  7665. Decimal.
  7666. `~@D'
  7667. print number sign always.
  7668. `~:D'
  7669. print comma separated.
  7670. `~MINCOL,PADCHAR,COMMACHARD'
  7671. padding.
  7672. `~X'
  7673. Hexadecimal.
  7674. `~@X'
  7675. print number sign always.
  7676. `~:X'
  7677. print comma separated.
  7678. `~MINCOL,PADCHAR,COMMACHARX'
  7679. padding.
  7680. `~O'
  7681. Octal.
  7682. `~@O'
  7683. print number sign always.
  7684. `~:O'
  7685. print comma separated.
  7686. `~MINCOL,PADCHAR,COMMACHARO'
  7687. padding.
  7688. `~B'
  7689. Binary.
  7690. `~@B'
  7691. print number sign always.
  7692. `~:B'
  7693. print comma separated.
  7694. `~MINCOL,PADCHAR,COMMACHARB'
  7695. padding.
  7696. `~NR'
  7697. Radix N.
  7698. `~N,MINCOL,PADCHAR,COMMACHARR'
  7699. padding.
  7700. `~@R'
  7701. print a number as a Roman numeral.
  7702. `~:@R'
  7703. print a number as an "old fashioned" Roman numeral.
  7704. `~:R'
  7705. print a number as an ordinal English number.
  7706. `~:@R'
  7707. print a number as a cardinal English number.
  7708. `~P'
  7709. Plural.
  7710. `~@P'
  7711. prints `y' and `ies'.
  7712. `~:P'
  7713. as `~P but jumps 1 argument backward.'
  7714. `~:@P'
  7715. as `~@P but jumps 1 argument backward.'
  7716. `~C'
  7717. Character.
  7718. `~@C'
  7719. prints a character as the reader can understand it (i.e. `#\'
  7720. prefixing).
  7721. `~:C'
  7722. prints a character as emacs does (eg. `^C' for ASCII 03).
  7723. `~F'
  7724. Fixed-format floating-point (prints a flonum like MMM.NNN).
  7725. `~WIDTH,DIGITS,SCALE,OVERFLOWCHAR,PADCHARF'
  7726. `~@F'
  7727. If the number is positive a plus sign is printed.
  7728. `~E'
  7729. Exponential floating-point (prints a flonum like MMM.NNN`E'EE).
  7730. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARE'
  7731. `~@E'
  7732. If the number is positive a plus sign is printed.
  7733. `~G'
  7734. General floating-point (prints a flonum either fixed or
  7735. exponential).
  7736. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARG'
  7737. `~@G'
  7738. If the number is positive a plus sign is printed.
  7739. `~$'
  7740. Dollars floating-point (prints a flonum in fixed with signs
  7741. separated).
  7742. `~DIGITS,SCALE,WIDTH,PADCHAR$'
  7743. `~@$'
  7744. If the number is positive a plus sign is printed.
  7745. `~:@$'
  7746. A sign is always printed and appears before the padding.
  7747. `~:$'
  7748. The sign appears before the padding.
  7749. `~%'
  7750. Newline.
  7751. `~N%'
  7752. print N newlines.
  7753. `~&'
  7754. print newline if not at the beginning of the output line.
  7755. `~N&'
  7756. prints `~&' and then N-1 newlines.
  7757. `~|'
  7758. Page Separator.
  7759. `~N|'
  7760. print N page separators.
  7761. `~~'
  7762. Tilde.
  7763. `~N~'
  7764. print N tildes.
  7765. `~'<newline>
  7766. Continuation Line.
  7767. `~:'<newline>
  7768. newline is ignored, white space left.
  7769. `~@'<newline>
  7770. newline is left, white space ignored.
  7771. `~T'
  7772. Tabulation.
  7773. `~@T'
  7774. relative tabulation.
  7775. `~COLNUM,COLINCT'
  7776. full tabulation.
  7777. `~?'
  7778. Indirection (expects indirect arguments as a list).
  7779. `~@?'
  7780. extracts indirect arguments from format arguments.
  7781. `~(STR~)'
  7782. Case conversion (converts by `string-downcase').
  7783. `~:(STR~)'
  7784. converts by `string-capitalize'.
  7785. `~@(STR~)'
  7786. converts by `string-capitalize-first'.
  7787. `~:@(STR~)'
  7788. converts by `string-upcase'.
  7789. `~*'
  7790. Argument Jumping (jumps 1 argument forward).
  7791. `~N*'
  7792. jumps N arguments forward.
  7793. `~:*'
  7794. jumps 1 argument backward.
  7795. `~N:*'
  7796. jumps N arguments backward.
  7797. `~@*'
  7798. jumps to the 0th argument.
  7799. `~N@*'
  7800. jumps to the Nth argument (beginning from 0)
  7801. `~[STR0~;STR1~;...~;STRN~]'
  7802. Conditional Expression (numerical clause conditional).
  7803. `~N['
  7804. take argument from N.
  7805. `~@['
  7806. true test conditional.
  7807. `~:['
  7808. if-else-then conditional.
  7809. `~;'
  7810. clause separator.
  7811. `~:;'
  7812. default clause follows.
  7813. `~{STR~}'
  7814. Iteration (args come from the next argument (a list)).
  7815. `~N{'
  7816. at most N iterations.
  7817. `~:{'
  7818. args from next arg (a list of lists).
  7819. `~@{'
  7820. args from the rest of arguments.
  7821. `~:@{'
  7822. args from the rest args (lists).
  7823. `~^'
  7824. Up and out.
  7825. `~N^'
  7826. aborts if N = 0
  7827. `~N,M^'
  7828. aborts if N = M
  7829. `~N,M,K^'
  7830. aborts if N <= M <= K
  7831. *** Not Implemented CL Format Control Directives
  7832. `~:A'
  7833. print `#f' as an empty list (see below).
  7834. `~:S'
  7835. print `#f' as an empty list (see below).
  7836. `~<~>'
  7837. Justification.
  7838. `~:^'
  7839. (sorry I don't understand its semantics completely)
  7840. *** Extended, Replaced and Additional Control Directives
  7841. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHD'
  7842. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHX'
  7843. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHO'
  7844. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHB'
  7845. `~N,MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHR'
  7846. COMMAWIDTH is the number of characters between two comma
  7847. characters.
  7848. `~I'
  7849. print a R4RS complex number as `~F~@Fi' with passed parameters for
  7850. `~F'.
  7851. `~Y'
  7852. Pretty print formatting of an argument for scheme code lists.
  7853. `~K'
  7854. Same as `~?.'
  7855. `~!'
  7856. Flushes the output if format DESTINATION is a port.
  7857. `~_'
  7858. Print a `#\space' character
  7859. `~N_'
  7860. print N `#\space' characters.
  7861. `~/'
  7862. Print a `#\tab' character
  7863. `~N/'
  7864. print N `#\tab' characters.
  7865. `~NC'
  7866. Takes N as an integer representation for a character. No arguments
  7867. are consumed. N is converted to a character by `integer->char'. N
  7868. must be a positive decimal number.
  7869. `~:S'
  7870. Print out readproof. Prints out internal objects represented as
  7871. `#<...>' as strings `"#<...>"' so that the format output can always
  7872. be processed by `read'.
  7873. `~:A'
  7874. Print out readproof. Prints out internal objects represented as
  7875. `#<...>' as strings `"#<...>"' so that the format output can always
  7876. be processed by `read'.
  7877. `~Q'
  7878. Prints information and a copyright notice on the format
  7879. implementation.
  7880. `~:Q'
  7881. prints format version.
  7882. `~F, ~E, ~G, ~$'
  7883. may also print number strings, i.e. passing a number as a string
  7884. and format it accordingly.
  7885. *** Configuration Variables
  7886. The format module exports some configuration variables to suit the
  7887. systems and users needs. There should be no modification necessary for
  7888. the configuration that comes with Guile. Format detects automatically
  7889. if the running scheme system implements floating point numbers and
  7890. complex numbers.
  7891. format:symbol-case-conv
  7892. Symbols are converted by `symbol->string' so the case type of the
  7893. printed symbols is implementation dependent.
  7894. `format:symbol-case-conv' is a one arg closure which is either
  7895. `#f' (no conversion), `string-upcase', `string-downcase' or
  7896. `string-capitalize'. (default `#f')
  7897. format:iobj-case-conv
  7898. As FORMAT:SYMBOL-CASE-CONV but applies for the representation of
  7899. implementation internal objects. (default `#f')
  7900. format:expch
  7901. The character prefixing the exponent value in `~E' printing.
  7902. (default `#\E')
  7903. *** Compatibility With Other Format Implementations
  7904. SLIB format 2.x:
  7905. See `format.doc'.
  7906. SLIB format 1.4:
  7907. Downward compatible except for padding support and `~A', `~S',
  7908. `~P', `~X' uppercase printing. SLIB format 1.4 uses C-style
  7909. `printf' padding support which is completely replaced by the CL
  7910. `format' padding style.
  7911. MIT C-Scheme 7.1:
  7912. Downward compatible except for `~', which is not documented
  7913. (ignores all characters inside the format string up to a newline
  7914. character). (7.1 implements `~a', `~s', ~NEWLINE, `~~', `~%',
  7915. numerical and variable parameters and `:/@' modifiers in the CL
  7916. sense).
  7917. Elk 1.5/2.0:
  7918. Downward compatible except for `~A' and `~S' which print in
  7919. uppercase. (Elk implements `~a', `~s', `~~', and `~%' (no
  7920. directive parameters or modifiers)).
  7921. Scheme->C 01nov91:
  7922. Downward compatible except for an optional destination parameter:
  7923. S2C accepts a format call without a destination which returns a
  7924. formatted string. This is equivalent to a #f destination in S2C.
  7925. (S2C implements `~a', `~s', `~c', `~%', and `~~' (no directive
  7926. parameters or modifiers)).
  7927. ** Changes to string-handling functions.
  7928. These functions were added to support the (ice-9 format) module, above.
  7929. *** New function: string-upcase STRING
  7930. *** New function: string-downcase STRING
  7931. These are non-destructive versions of the existing string-upcase! and
  7932. string-downcase! functions.
  7933. *** New function: string-capitalize! STRING
  7934. *** New function: string-capitalize STRING
  7935. These functions convert the first letter of each word in the string to
  7936. upper case. Thus:
  7937. (string-capitalize "howdy there")
  7938. => "Howdy There"
  7939. As with the other functions, string-capitalize! modifies the string in
  7940. place, while string-capitalize returns a modified copy of its argument.
  7941. *** New function: string-ci->symbol STRING
  7942. Return a symbol whose name is STRING, but having the same case as if
  7943. the symbol had be read by `read'.
  7944. Guile can be configured to be sensitive or insensitive to case
  7945. differences in Scheme identifiers. If Guile is case-insensitive, all
  7946. symbols are converted to lower case on input. The `string-ci->symbol'
  7947. function returns a symbol whose name in STRING, transformed as Guile
  7948. would if STRING were input.
  7949. *** New function: substring-move! STRING1 START END STRING2 START
  7950. Copy the substring of STRING1 from START (inclusive) to END
  7951. (exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
  7952. string, and the source and destination areas may overlap; in all
  7953. cases, the function behaves as if all the characters were copied
  7954. simultaneously.
  7955. *** Extended functions: substring-move-left! substring-move-right!
  7956. These functions now correctly copy arbitrarily overlapping substrings;
  7957. they are both synonyms for substring-move!.
  7958. ** New module (ice-9 getopt-long), with the function `getopt-long'.
  7959. getopt-long is a function for parsing command-line arguments in a
  7960. manner consistent with other GNU programs.
  7961. (getopt-long ARGS GRAMMAR)
  7962. Parse the arguments ARGS according to the argument list grammar GRAMMAR.
  7963. ARGS should be a list of strings. Its first element should be the
  7964. name of the program; subsequent elements should be the arguments
  7965. that were passed to the program on the command line. The
  7966. `program-arguments' procedure returns a list of this form.
  7967. GRAMMAR is a list of the form:
  7968. ((OPTION (PROPERTY VALUE) ...) ...)
  7969. Each OPTION should be a symbol. `getopt-long' will accept a
  7970. command-line option named `--OPTION'.
  7971. Each option can have the following (PROPERTY VALUE) pairs:
  7972. (single-char CHAR) --- Accept `-CHAR' as a single-character
  7973. equivalent to `--OPTION'. This is how to specify traditional
  7974. Unix-style flags.
  7975. (required? BOOL) --- If BOOL is true, the option is required.
  7976. getopt-long will raise an error if it is not found in ARGS.
  7977. (value BOOL) --- If BOOL is #t, the option accepts a value; if
  7978. it is #f, it does not; and if it is the symbol
  7979. `optional', the option may appear in ARGS with or
  7980. without a value.
  7981. (predicate FUNC) --- If the option accepts a value (i.e. you
  7982. specified `(value #t)' for this option), then getopt
  7983. will apply FUNC to the value, and throw an exception
  7984. if it returns #f. FUNC should be a procedure which
  7985. accepts a string and returns a boolean value; you may
  7986. need to use quasiquotes to get it into GRAMMAR.
  7987. The (PROPERTY VALUE) pairs may occur in any order, but each
  7988. property may occur only once. By default, options do not have
  7989. single-character equivalents, are not required, and do not take
  7990. values.
  7991. In ARGS, single-character options may be combined, in the usual
  7992. Unix fashion: ("-x" "-y") is equivalent to ("-xy"). If an option
  7993. accepts values, then it must be the last option in the
  7994. combination; the value is the next argument. So, for example, using
  7995. the following grammar:
  7996. ((apples (single-char #\a))
  7997. (blimps (single-char #\b) (value #t))
  7998. (catalexis (single-char #\c) (value #t)))
  7999. the following argument lists would be acceptable:
  8000. ("-a" "-b" "bang" "-c" "couth") ("bang" and "couth" are the values
  8001. for "blimps" and "catalexis")
  8002. ("-ab" "bang" "-c" "couth") (same)
  8003. ("-ac" "couth" "-b" "bang") (same)
  8004. ("-abc" "couth" "bang") (an error, since `-b' is not the
  8005. last option in its combination)
  8006. If an option's value is optional, then `getopt-long' decides
  8007. whether it has a value by looking at what follows it in ARGS. If
  8008. the next element is a string, and it does not appear to be an
  8009. option itself, then that string is the option's value.
  8010. The value of a long option can appear as the next element in ARGS,
  8011. or it can follow the option name, separated by an `=' character.
  8012. Thus, using the same grammar as above, the following argument lists
  8013. are equivalent:
  8014. ("--apples" "Braeburn" "--blimps" "Goodyear")
  8015. ("--apples=Braeburn" "--blimps" "Goodyear")
  8016. ("--blimps" "Goodyear" "--apples=Braeburn")
  8017. If the option "--" appears in ARGS, argument parsing stops there;
  8018. subsequent arguments are returned as ordinary arguments, even if
  8019. they resemble options. So, in the argument list:
  8020. ("--apples" "Granny Smith" "--" "--blimp" "Goodyear")
  8021. `getopt-long' will recognize the `apples' option as having the
  8022. value "Granny Smith", but it will not recognize the `blimp'
  8023. option; it will return the strings "--blimp" and "Goodyear" as
  8024. ordinary argument strings.
  8025. The `getopt-long' function returns the parsed argument list as an
  8026. assocation list, mapping option names --- the symbols from GRAMMAR
  8027. --- onto their values, or #t if the option does not accept a value.
  8028. Unused options do not appear in the alist.
  8029. All arguments that are not the value of any option are returned
  8030. as a list, associated with the empty list.
  8031. `getopt-long' throws an exception if:
  8032. - it finds an unrecognized option in ARGS
  8033. - a required option is omitted
  8034. - an option that requires an argument doesn't get one
  8035. - an option that doesn't accept an argument does get one (this can
  8036. only happen using the long option `--opt=value' syntax)
  8037. - an option predicate fails
  8038. So, for example:
  8039. (define grammar
  8040. `((lockfile-dir (required? #t)
  8041. (value #t)
  8042. (single-char #\k)
  8043. (predicate ,file-is-directory?))
  8044. (verbose (required? #f)
  8045. (single-char #\v)
  8046. (value #f))
  8047. (x-includes (single-char #\x))
  8048. (rnet-server (single-char #\y)
  8049. (predicate ,string?))))
  8050. (getopt-long '("my-prog" "-vk" "/tmp" "foo1" "--x-includes=/usr/include"
  8051. "--rnet-server=lamprod" "--" "-fred" "foo2" "foo3")
  8052. grammar)
  8053. => ((() "foo1" "-fred" "foo2" "foo3")
  8054. (rnet-server . "lamprod")
  8055. (x-includes . "/usr/include")
  8056. (lockfile-dir . "/tmp")
  8057. (verbose . #t))
  8058. ** The (ice-9 getopt-gnu-style) module is obsolete; use (ice-9 getopt-long).
  8059. It will be removed in a few releases.
  8060. ** New syntax: lambda*
  8061. ** New syntax: define*
  8062. ** New syntax: define*-public
  8063. ** New syntax: defmacro*
  8064. ** New syntax: defmacro*-public
  8065. Guile now supports optional arguments.
  8066. `lambda*', `define*', `define*-public', `defmacro*' and
  8067. `defmacro*-public' are identical to the non-* versions except that
  8068. they use an extended type of parameter list that has the following BNF
  8069. syntax (parentheses are literal, square brackets indicate grouping,
  8070. and `*', `+' and `?' have the usual meaning):
  8071. ext-param-list ::= ( [identifier]* [#&optional [ext-var-decl]+]?
  8072. [#&key [ext-var-decl]+ [#&allow-other-keys]?]?
  8073. [[#&rest identifier]|[. identifier]]? ) | [identifier]
  8074. ext-var-decl ::= identifier | ( identifier expression )
  8075. The semantics are best illustrated with the following documentation
  8076. and examples for `lambda*':
  8077. lambda* args . body
  8078. lambda extended for optional and keyword arguments
  8079. lambda* creates a procedure that takes optional arguments. These
  8080. are specified by putting them inside brackets at the end of the
  8081. parameter list, but before any dotted rest argument. For example,
  8082. (lambda* (a b #&optional c d . e) '())
  8083. creates a procedure with fixed arguments a and b, optional arguments c
  8084. and d, and rest argument e. If the optional arguments are omitted
  8085. in a call, the variables for them are unbound in the procedure. This
  8086. can be checked with the bound? macro.
  8087. lambda* can also take keyword arguments. For example, a procedure
  8088. defined like this:
  8089. (lambda* (#&key xyzzy larch) '())
  8090. can be called with any of the argument lists (#:xyzzy 11)
  8091. (#:larch 13) (#:larch 42 #:xyzzy 19) (). Whichever arguments
  8092. are given as keywords are bound to values.
  8093. Optional and keyword arguments can also be given default values
  8094. which they take on when they are not present in a call, by giving a
  8095. two-item list in place of an optional argument, for example in:
  8096. (lambda* (foo #&optional (bar 42) #&key (baz 73)) (list foo bar baz))
  8097. foo is a fixed argument, bar is an optional argument with default
  8098. value 42, and baz is a keyword argument with default value 73.
  8099. Default value expressions are not evaluated unless they are needed
  8100. and until the procedure is called.
  8101. lambda* now supports two more special parameter list keywords.
  8102. lambda*-defined procedures now throw an error by default if a
  8103. keyword other than one of those specified is found in the actual
  8104. passed arguments. However, specifying #&allow-other-keys
  8105. immediately after the kyword argument declarations restores the
  8106. previous behavior of ignoring unknown keywords. lambda* also now
  8107. guarantees that if the same keyword is passed more than once, the
  8108. last one passed is the one that takes effect. For example,
  8109. ((lambda* (#&key (heads 0) (tails 0)) (display (list heads tails)))
  8110. #:heads 37 #:tails 42 #:heads 99)
  8111. would result in (99 47) being displayed.
  8112. #&rest is also now provided as a synonym for the dotted syntax rest
  8113. argument. The argument lists (a . b) and (a #&rest b) are equivalent in
  8114. all respects to lambda*. This is provided for more similarity to DSSSL,
  8115. MIT-Scheme and Kawa among others, as well as for refugees from other
  8116. Lisp dialects.
  8117. Further documentation may be found in the optargs.scm file itself.
  8118. The optional argument module also exports the macros `let-optional',
  8119. `let-optional*', `let-keywords', `let-keywords*' and `bound?'. These
  8120. are not documented here because they may be removed in the future, but
  8121. full documentation is still available in optargs.scm.
  8122. ** New syntax: and-let*
  8123. Guile now supports the `and-let*' form, described in the draft SRFI-2.
  8124. Syntax: (land* (<clause> ...) <body> ...)
  8125. Each <clause> should have one of the following forms:
  8126. (<variable> <expression>)
  8127. (<expression>)
  8128. <bound-variable>
  8129. Each <variable> or <bound-variable> should be an identifier. Each
  8130. <expression> should be a valid expression. The <body> should be a
  8131. possibly empty sequence of expressions, like the <body> of a
  8132. lambda form.
  8133. Semantics: A LAND* expression is evaluated by evaluating the
  8134. <expression> or <bound-variable> of each of the <clause>s from
  8135. left to right. The value of the first <expression> or
  8136. <bound-variable> that evaluates to a false value is returned; the
  8137. remaining <expression>s and <bound-variable>s are not evaluated.
  8138. The <body> forms are evaluated iff all the <expression>s and
  8139. <bound-variable>s evaluate to true values.
  8140. The <expression>s and the <body> are evaluated in an environment
  8141. binding each <variable> of the preceding (<variable> <expression>)
  8142. clauses to the value of the <expression>. Later bindings
  8143. shadow earlier bindings.
  8144. Guile's and-let* macro was contributed by Michael Livshin.
  8145. ** New sorting functions
  8146. *** New function: sorted? SEQUENCE LESS?
  8147. Returns `#t' when the sequence argument is in non-decreasing order
  8148. according to LESS? (that is, there is no adjacent pair `... x y
  8149. ...' for which `(less? y x)').
  8150. Returns `#f' when the sequence contains at least one out-of-order
  8151. pair. It is an error if the sequence is neither a list nor a
  8152. vector.
  8153. *** New function: merge LIST1 LIST2 LESS?
  8154. LIST1 and LIST2 are sorted lists.
  8155. Returns the sorted list of all elements in LIST1 and LIST2.
  8156. Assume that the elements a and b1 in LIST1 and b2 in LIST2 are "equal"
  8157. in the sense that (LESS? x y) --> #f for x, y in {a, b1, b2},
  8158. and that a < b1 in LIST1. Then a < b1 < b2 in the result.
  8159. (Here "<" should read "comes before".)
  8160. *** New procedure: merge! LIST1 LIST2 LESS?
  8161. Merges two lists, re-using the pairs of LIST1 and LIST2 to build
  8162. the result. If the code is compiled, and LESS? constructs no new
  8163. pairs, no pairs at all will be allocated. The first pair of the
  8164. result will be either the first pair of LIST1 or the first pair of
  8165. LIST2.
  8166. *** New function: sort SEQUENCE LESS?
  8167. Accepts either a list or a vector, and returns a new sequence
  8168. which is sorted. The new sequence is the same type as the input.
  8169. Always `(sorted? (sort sequence less?) less?)'. The original
  8170. sequence is not altered in any way. The new sequence shares its
  8171. elements with the old one; no elements are copied.
  8172. *** New procedure: sort! SEQUENCE LESS
  8173. Returns its sorted result in the original boxes. No new storage is
  8174. allocated at all. Proper usage: (set! slist (sort! slist <))
  8175. *** New function: stable-sort SEQUENCE LESS?
  8176. Similar to `sort' but stable. That is, if "equal" elements are
  8177. ordered a < b in the original sequence, they will have the same order
  8178. in the result.
  8179. *** New function: stable-sort! SEQUENCE LESS?
  8180. Similar to `sort!' but stable.
  8181. Uses temporary storage when sorting vectors.
  8182. *** New functions: sort-list, sort-list!
  8183. Added for compatibility with scsh.
  8184. ** New built-in random number support
  8185. *** New function: random N [STATE]
  8186. Accepts a positive integer or real N and returns a number of the
  8187. same type between zero (inclusive) and N (exclusive). The values
  8188. returned have a uniform distribution.
  8189. The optional argument STATE must be of the type produced by
  8190. `copy-random-state' or `seed->random-state'. It defaults to the value
  8191. of the variable `*random-state*'. This object is used to maintain the
  8192. state of the pseudo-random-number generator and is altered as a side
  8193. effect of the `random' operation.
  8194. *** New variable: *random-state*
  8195. Holds a data structure that encodes the internal state of the
  8196. random-number generator that `random' uses by default. The nature
  8197. of this data structure is implementation-dependent. It may be
  8198. printed out and successfully read back in, but may or may not
  8199. function correctly as a random-number state object in another
  8200. implementation.
  8201. *** New function: copy-random-state [STATE]
  8202. Returns a new object of type suitable for use as the value of the
  8203. variable `*random-state*' and as a second argument to `random'.
  8204. If argument STATE is given, a copy of it is returned. Otherwise a
  8205. copy of `*random-state*' is returned.
  8206. *** New function: seed->random-state SEED
  8207. Returns a new object of type suitable for use as the value of the
  8208. variable `*random-state*' and as a second argument to `random'.
  8209. SEED is a string or a number. A new state is generated and
  8210. initialized using SEED.
  8211. *** New function: random:uniform [STATE]
  8212. Returns an uniformly distributed inexact real random number in the
  8213. range between 0 and 1.
  8214. *** New procedure: random:solid-sphere! VECT [STATE]
  8215. Fills VECT with inexact real random numbers the sum of whose
  8216. squares is less than 1.0. Thinking of VECT as coordinates in
  8217. space of dimension N = `(vector-length VECT)', the coordinates are
  8218. uniformly distributed within the unit N-shere. The sum of the
  8219. squares of the numbers is returned. VECT can be either a vector
  8220. or a uniform vector of doubles.
  8221. *** New procedure: random:hollow-sphere! VECT [STATE]
  8222. Fills VECT with inexact real random numbers the sum of whose squares
  8223. is equal to 1.0. Thinking of VECT as coordinates in space of
  8224. dimension n = `(vector-length VECT)', the coordinates are uniformly
  8225. distributed over the surface of the unit n-shere. VECT can be either
  8226. a vector or a uniform vector of doubles.
  8227. *** New function: random:normal [STATE]
  8228. Returns an inexact real in a normal distribution with mean 0 and
  8229. standard deviation 1. For a normal distribution with mean M and
  8230. standard deviation D use `(+ M (* D (random:normal)))'.
  8231. *** New procedure: random:normal-vector! VECT [STATE]
  8232. Fills VECT with inexact real random numbers which are independent and
  8233. standard normally distributed (i.e., with mean 0 and variance 1).
  8234. VECT can be either a vector or a uniform vector of doubles.
  8235. *** New function: random:exp STATE
  8236. Returns an inexact real in an exponential distribution with mean 1.
  8237. For an exponential distribution with mean U use (* U (random:exp)).
  8238. ** The range of logand, logior, logxor, logtest, and logbit? have changed.
  8239. These functions now operate on numbers in the range of a C unsigned
  8240. long.
  8241. These functions used to operate on numbers in the range of a C signed
  8242. long; however, this seems inappropriate, because Guile integers don't
  8243. overflow.
  8244. ** New function: make-guardian
  8245. This is an implementation of guardians as described in
  8246. R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a
  8247. Generation-Based Garbage Collector" ACM SIGPLAN Conference on
  8248. Programming Language Design and Implementation, June 1993
  8249. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/guardians.ps.gz
  8250. ** New functions: delq1!, delv1!, delete1!
  8251. These procedures behave similar to delq! and friends but delete only
  8252. one object if at all.
  8253. ** New function: unread-string STRING PORT
  8254. Unread STRING to PORT, that is, push it back onto the port so that
  8255. next read operation will work on the pushed back characters.
  8256. ** unread-char can now be called multiple times
  8257. If unread-char is called multiple times, the unread characters will be
  8258. read again in last-in first-out order.
  8259. ** the procedures uniform-array-read! and uniform-array-write! now
  8260. work on any kind of port, not just ports which are open on a file.
  8261. ** Now 'l' in a port mode requests line buffering.
  8262. ** The procedure truncate-file now works on string ports as well
  8263. as file ports. If the size argument is omitted, the current
  8264. file position is used.
  8265. ** new procedure: seek PORT/FDES OFFSET WHENCE
  8266. The arguments are the same as for the old fseek procedure, but it
  8267. works on string ports as well as random-access file ports.
  8268. ** the fseek procedure now works on string ports, since it has been
  8269. redefined using seek.
  8270. ** the setvbuf procedure now uses a default size if mode is _IOFBF and
  8271. size is not supplied.
  8272. ** the newline procedure no longer flushes the port if it's not
  8273. line-buffered: previously it did if it was the current output port.
  8274. ** open-pipe and close-pipe are no longer primitive procedures, but
  8275. an emulation can be obtained using `(use-modules (ice-9 popen))'.
  8276. ** the freopen procedure has been removed.
  8277. ** new procedure: drain-input PORT
  8278. Drains PORT's read buffers (including any pushed-back characters)
  8279. and returns the contents as a single string.
  8280. ** New function: map-in-order PROC LIST1 LIST2 ...
  8281. Version of `map' which guarantees that the procedure is applied to the
  8282. lists in serial order.
  8283. ** Renamed `serial-array-copy!' and `serial-array-map!' to
  8284. `array-copy-in-order!' and `array-map-in-order!'. The old names are
  8285. now obsolete and will go away in release 1.5.
  8286. ** New syntax: collect BODY1 ...
  8287. Version of `begin' which returns a list of the results of the body
  8288. forms instead of the result of the last body form. In contrast to
  8289. `begin', `collect' allows an empty body.
  8290. ** New functions: read-history FILENAME, write-history FILENAME
  8291. Read/write command line history from/to file. Returns #t on success
  8292. and #f if an error occurred.
  8293. ** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
  8294. These procedures return a list of definitions available in the specified
  8295. argument, a relative module reference. In the case of no argument,
  8296. `(current-module)' is now consulted for definitions to return, instead
  8297. of simply returning #f, the former behavior.
  8298. ** The #/ syntax for lists is no longer supported.
  8299. Earlier versions of Scheme accepted this syntax, but printed a
  8300. warning.
  8301. ** Guile no longer consults the SCHEME_LOAD_PATH environment variable.
  8302. Instead, you should set GUILE_LOAD_PATH to tell Guile where to find
  8303. modules.
  8304. * Changes to the gh_ interface
  8305. ** gh_scm2doubles
  8306. Now takes a second argument which is the result array. If this
  8307. pointer is NULL, a new array is malloced (the old behavior).
  8308. ** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
  8309. gh_scm2shorts, gh_scm2longs, gh_scm2floats
  8310. New functions.
  8311. * Changes to the scm_ interface
  8312. ** Function: scm_make_named_hook (char* name, int n_args)
  8313. Creates a hook in the same way as make-hook above but also
  8314. binds a variable named NAME to it.
  8315. This is the typical way of creating a hook from C code.
  8316. Currently, the variable is created in the "current" module. This
  8317. might change when we get the new module system.
  8318. ** The smob interface
  8319. The interface for creating smobs has changed. For documentation, see
  8320. data-rep.info (made from guile-core/doc/data-rep.texi).
  8321. *** Deprecated function: SCM scm_newsmob (scm_smobfuns *)
  8322. >>> This function will be removed in 1.3.4. <<<
  8323. It is replaced by:
  8324. *** Function: SCM scm_make_smob_type (const char *name, scm_sizet size)
  8325. This function adds a new smob type, named NAME, with instance size
  8326. SIZE to the system. The return value is a tag that is used in
  8327. creating instances of the type. If SIZE is 0, then no memory will
  8328. be allocated when instances of the smob are created, and nothing
  8329. will be freed by the default free function.
  8330. *** Function: void scm_set_smob_mark (long tc, SCM (*mark) (SCM))
  8331. This function sets the smob marking procedure for the smob type
  8332. specified by the tag TC. TC is the tag returned by
  8333. `scm_make_smob_type'.
  8334. *** Function: void scm_set_smob_free (long tc, SCM (*mark) (SCM))
  8335. This function sets the smob freeing procedure for the smob type
  8336. specified by the tag TC. TC is the tag returned by
  8337. `scm_make_smob_type'.
  8338. *** Function: void scm_set_smob_print (tc, print)
  8339. - Function: void scm_set_smob_print (long tc,
  8340. scm_sizet (*print) (SCM,
  8341. SCM,
  8342. scm_print_state *))
  8343. This function sets the smob printing procedure for the smob type
  8344. specified by the tag TC. TC is the tag returned by
  8345. `scm_make_smob_type'.
  8346. *** Function: void scm_set_smob_equalp (long tc, SCM (*equalp) (SCM, SCM))
  8347. This function sets the smob equality-testing predicate for the
  8348. smob type specified by the tag TC. TC is the tag returned by
  8349. `scm_make_smob_type'.
  8350. *** Macro: void SCM_NEWSMOB (SCM var, long tc, void *data)
  8351. Make VALUE contain a smob instance of the type with type code TC and
  8352. smob data DATA. VALUE must be previously declared as C type `SCM'.
  8353. *** Macro: fn_returns SCM_RETURN_NEWSMOB (long tc, void *data)
  8354. This macro expands to a block of code that creates a smob instance
  8355. of the type with type code TC and smob data DATA, and returns that
  8356. `SCM' value. It should be the last piece of code in a block.
  8357. ** The interfaces for using I/O ports and implementing port types
  8358. (ptobs) have changed significantly. The new interface is based on
  8359. shared access to buffers and a new set of ptob procedures.
  8360. *** scm_newptob has been removed
  8361. It is replaced by:
  8362. *** Function: SCM scm_make_port_type (type_name, fill_buffer, write_flush)
  8363. - Function: SCM scm_make_port_type (char *type_name,
  8364. int (*fill_buffer) (SCM port),
  8365. void (*write_flush) (SCM port));
  8366. Similarly to the new smob interface, there is a set of function
  8367. setters by which the user can customize the behavior of his port
  8368. type. See ports.h (scm_set_port_XXX).
  8369. ** scm_strport_to_string: New function: creates a new string from
  8370. a string port's buffer.
  8371. ** Plug in interface for random number generators
  8372. The variable `scm_the_rng' in random.c contains a value and three
  8373. function pointers which together define the current random number
  8374. generator being used by the Scheme level interface and the random
  8375. number library functions.
  8376. The user is free to replace the default generator with the generator
  8377. of his own choice.
  8378. *** Variable: size_t scm_the_rng.rstate_size
  8379. The size of the random state type used by the current RNG
  8380. measured in chars.
  8381. *** Function: unsigned long scm_the_rng.random_bits (scm_rstate *STATE)
  8382. Given the random STATE, return 32 random bits.
  8383. *** Function: void scm_the_rng.init_rstate (scm_rstate *STATE, chars *S, int N)
  8384. Seed random state STATE using string S of length N.
  8385. *** Function: scm_rstate *scm_the_rng.copy_rstate (scm_rstate *STATE)
  8386. Given random state STATE, return a malloced copy.
  8387. ** Default RNG
  8388. The default RNG is the MWC (Multiply With Carry) random number
  8389. generator described by George Marsaglia at the Department of
  8390. Statistics and Supercomputer Computations Research Institute, The
  8391. Florida State University (http://stat.fsu.edu/~geo).
  8392. It uses 64 bits, has a period of 4578426017172946943 (4.6e18), and
  8393. passes all tests in the DIEHARD test suite
  8394. (http://stat.fsu.edu/~geo/diehard.html). The generation of 32 bits
  8395. costs one multiply and one add on platforms which either supports long
  8396. longs (gcc does this on most systems) or have 64 bit longs. The cost
  8397. is four multiply on other systems but this can be optimized by writing
  8398. scm_i_uniform32 in assembler.
  8399. These functions are provided through the scm_the_rng interface for use
  8400. by libguile and the application.
  8401. *** Function: unsigned long scm_i_uniform32 (scm_i_rstate *STATE)
  8402. Given the random STATE, return 32 random bits.
  8403. Don't use this function directly. Instead go through the plugin
  8404. interface (see "Plug in interface" above).
  8405. *** Function: void scm_i_init_rstate (scm_i_rstate *STATE, char *SEED, int N)
  8406. Initialize STATE using SEED of length N.
  8407. *** Function: scm_i_rstate *scm_i_copy_rstate (scm_i_rstate *STATE)
  8408. Return a malloc:ed copy of STATE. This function can easily be re-used
  8409. in the interfaces to other RNGs.
  8410. ** Random number library functions
  8411. These functions use the current RNG through the scm_the_rng interface.
  8412. It might be a good idea to use these functions from your C code so
  8413. that only one random generator is used by all code in your program.
  8414. The default random state is stored in:
  8415. *** Variable: SCM scm_var_random_state
  8416. Contains the vcell of the Scheme variable "*random-state*" which is
  8417. used as default state by all random number functions in the Scheme
  8418. level interface.
  8419. Example:
  8420. double x = scm_c_uniform01 (SCM_RSTATE (SCM_CDR (scm_var_random_state)));
  8421. *** Function: scm_rstate *scm_c_default_rstate (void)
  8422. This is a convenience function which returns the value of
  8423. scm_var_random_state. An error message is generated if this value
  8424. isn't a random state.
  8425. *** Function: scm_rstate *scm_c_make_rstate (char *SEED, int LENGTH)
  8426. Make a new random state from the string SEED of length LENGTH.
  8427. It is generally not a good idea to use multiple random states in a
  8428. program. While subsequent random numbers generated from one random
  8429. state are guaranteed to be reasonably independent, there is no such
  8430. guarantee for numbers generated from different random states.
  8431. *** Macro: unsigned long scm_c_uniform32 (scm_rstate *STATE)
  8432. Return 32 random bits.
  8433. *** Function: double scm_c_uniform01 (scm_rstate *STATE)
  8434. Return a sample from the uniform(0,1) distribution.
  8435. *** Function: double scm_c_normal01 (scm_rstate *STATE)
  8436. Return a sample from the normal(0,1) distribution.
  8437. *** Function: double scm_c_exp1 (scm_rstate *STATE)
  8438. Return a sample from the exp(1) distribution.
  8439. *** Function: unsigned long scm_c_random (scm_rstate *STATE, unsigned long M)
  8440. Return a sample from the discrete uniform(0,M) distribution.
  8441. *** Function: SCM scm_c_random_bignum (scm_rstate *STATE, SCM M)
  8442. Return a sample from the discrete uniform(0,M) distribution.
  8443. M must be a bignum object. The returned value may be an INUM.
  8444. Changes in Guile 1.3 (released Monday, October 19, 1998):
  8445. * Changes to the distribution
  8446. ** We renamed the SCHEME_LOAD_PATH environment variable to GUILE_LOAD_PATH.
  8447. To avoid conflicts, programs should name environment variables after
  8448. themselves, except when there's a common practice establishing some
  8449. other convention.
  8450. For now, Guile supports both GUILE_LOAD_PATH and SCHEME_LOAD_PATH,
  8451. giving the former precedence, and printing a warning message if the
  8452. latter is set. Guile 1.4 will not recognize SCHEME_LOAD_PATH at all.
  8453. ** The header files related to multi-byte characters have been removed.
  8454. They were: libguile/extchrs.h and libguile/mbstrings.h. Any C code
  8455. which referred to these explicitly will probably need to be rewritten,
  8456. since the support for the variant string types has been removed; see
  8457. below.
  8458. ** The header files append.h and sequences.h have been removed. These
  8459. files implemented non-R4RS operations which would encourage
  8460. non-portable programming style and less easy-to-read code.
  8461. * Changes to the stand-alone interpreter
  8462. ** New procedures have been added to implement a "batch mode":
  8463. *** Function: batch-mode?
  8464. Returns a boolean indicating whether the interpreter is in batch
  8465. mode.
  8466. *** Function: set-batch-mode?! ARG
  8467. If ARG is true, switches the interpreter to batch mode. The `#f'
  8468. case has not been implemented.
  8469. ** Guile now provides full command-line editing, when run interactively.
  8470. To use this feature, you must have the readline library installed.
  8471. The Guile build process will notice it, and automatically include
  8472. support for it.
  8473. The readline library is available via anonymous FTP from any GNU
  8474. mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
  8475. ** the-last-stack is now a fluid.
  8476. * Changes to the procedure for linking libguile with your programs
  8477. ** You can now use the `guile-config' utility to build programs that use Guile.
  8478. Guile now includes a command-line utility called `guile-config', which
  8479. can provide information about how to compile and link programs that
  8480. use Guile.
  8481. *** `guile-config compile' prints any C compiler flags needed to use Guile.
  8482. You should include this command's output on the command line you use
  8483. to compile C or C++ code that #includes the Guile header files. It's
  8484. usually just a `-I' flag to help the compiler find the Guile headers.
  8485. *** `guile-config link' prints any linker flags necessary to link with Guile.
  8486. This command writes to its standard output a list of flags which you
  8487. must pass to the linker to link your code against the Guile library.
  8488. The flags include '-lguile' itself, any other libraries the Guile
  8489. library depends upon, and any `-L' flags needed to help the linker
  8490. find those libraries.
  8491. For example, here is a Makefile rule that builds a program named 'foo'
  8492. from the object files ${FOO_OBJECTS}, and links them against Guile:
  8493. foo: ${FOO_OBJECTS}
  8494. ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
  8495. Previous Guile releases recommended that you use autoconf to detect
  8496. which of a predefined set of libraries were present on your system.
  8497. It is more robust to use `guile-config', since it records exactly which
  8498. libraries the installed Guile library requires.
  8499. This was originally called `build-guile', but was renamed to
  8500. `guile-config' before Guile 1.3 was released, to be consistent with
  8501. the analogous script for the GTK+ GUI toolkit, which is called
  8502. `gtk-config'.
  8503. ** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
  8504. If you are using the GNU autoconf package to configure your program,
  8505. you can use the GUILE_FLAGS autoconf macro to call `guile-config'
  8506. (described above) and gather the necessary values for use in your
  8507. Makefiles.
  8508. The GUILE_FLAGS macro expands to configure script code which runs the
  8509. `guile-config' script, to find out where Guile's header files and
  8510. libraries are installed. It sets two variables, marked for
  8511. substitution, as by AC_SUBST.
  8512. GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
  8513. code that uses Guile header files. This is almost always just a
  8514. -I flag.
  8515. GUILE_LDFLAGS --- flags to pass to the linker to link a
  8516. program against Guile. This includes `-lguile' for the Guile
  8517. library itself, any libraries that Guile itself requires (like
  8518. -lqthreads), and so on. It may also include a -L flag to tell the
  8519. compiler where to find the libraries.
  8520. GUILE_FLAGS is defined in the file guile.m4, in the top-level
  8521. directory of the Guile distribution. You can copy it into your
  8522. package's aclocal.m4 file, and then use it in your configure.in file.
  8523. If you are using the `aclocal' program, distributed with GNU automake,
  8524. to maintain your aclocal.m4 file, the Guile installation process
  8525. installs guile.m4 where aclocal will find it. All you need to do is
  8526. use GUILE_FLAGS in your configure.in file, and then run `aclocal';
  8527. this will copy the definition of GUILE_FLAGS into your aclocal.m4
  8528. file.
  8529. * Changes to Scheme functions and syntax
  8530. ** Multi-byte strings have been removed, as have multi-byte and wide
  8531. ports. We felt that these were the wrong approach to
  8532. internationalization support.
  8533. ** New function: readline [PROMPT]
  8534. Read a line from the terminal, and allow the user to edit it,
  8535. prompting with PROMPT. READLINE provides a large set of Emacs-like
  8536. editing commands, lets the user recall previously typed lines, and
  8537. works on almost every kind of terminal, including dumb terminals.
  8538. READLINE assumes that the cursor is at the beginning of the line when
  8539. it is invoked. Thus, you can't print a prompt yourself, and then call
  8540. READLINE; you need to package up your prompt as a string, pass it to
  8541. the function, and let READLINE print the prompt itself. This is
  8542. because READLINE needs to know the prompt's screen width.
  8543. For Guile to provide this function, you must have the readline
  8544. library, version 2.1 or later, installed on your system. Readline is
  8545. available via anonymous FTP from prep.ai.mit.edu in pub/gnu, or from
  8546. any GNU mirror site.
  8547. See also ADD-HISTORY function.
  8548. ** New function: add-history STRING
  8549. Add STRING as the most recent line in the history used by the READLINE
  8550. command. READLINE does not add lines to the history itself; you must
  8551. call ADD-HISTORY to make previous input available to the user.
  8552. ** The behavior of the read-line function has changed.
  8553. This function now uses standard C library functions to read the line,
  8554. for speed. This means that it does not respect the value of
  8555. scm-line-incrementors; it assumes that lines are delimited with
  8556. #\newline.
  8557. (Note that this is read-line, the function that reads a line of text
  8558. from a port, not readline, the function that reads a line from a
  8559. terminal, providing full editing capabilities.)
  8560. ** New module (ice-9 getopt-gnu-style): Parse command-line arguments.
  8561. This module provides some simple argument parsing. It exports one
  8562. function:
  8563. Function: getopt-gnu-style ARG-LS
  8564. Parse a list of program arguments into an alist of option
  8565. descriptions.
  8566. Each item in the list of program arguments is examined to see if
  8567. it meets the syntax of a GNU long-named option. An argument like
  8568. `--MUMBLE' produces an element of the form (MUMBLE . #t) in the
  8569. returned alist, where MUMBLE is a keyword object with the same
  8570. name as the argument. An argument like `--MUMBLE=FROB' produces
  8571. an element of the form (MUMBLE . FROB), where FROB is a string.
  8572. As a special case, the returned alist also contains a pair whose
  8573. car is the symbol `rest'. The cdr of this pair is a list
  8574. containing all the items in the argument list that are not options
  8575. of the form mentioned above.
  8576. The argument `--' is treated specially: all items in the argument
  8577. list appearing after such an argument are not examined, and are
  8578. returned in the special `rest' list.
  8579. This function does not parse normal single-character switches.
  8580. You will need to parse them out of the `rest' list yourself.
  8581. ** The read syntax for byte vectors and short vectors has changed.
  8582. Instead of #bytes(...), write #y(...).
  8583. Instead of #short(...), write #h(...).
  8584. This may seem nutty, but, like the other uniform vectors, byte vectors
  8585. and short vectors want to have the same print and read syntax (and,
  8586. more basic, want to have read syntax!). Changing the read syntax to
  8587. use multiple characters after the hash sign breaks with the
  8588. conventions used in R5RS and the conventions used for the other
  8589. uniform vectors. It also introduces complexity in the current reader,
  8590. both on the C and Scheme levels. (The Right solution is probably to
  8591. change the syntax and prototypes for uniform vectors entirely.)
  8592. ** The new module (ice-9 session) provides useful interactive functions.
  8593. *** New procedure: (apropos REGEXP OPTION ...)
  8594. Display a list of top-level variables whose names match REGEXP, and
  8595. the modules they are imported from. Each OPTION should be one of the
  8596. following symbols:
  8597. value --- Show the value of each matching variable.
  8598. shadow --- Show bindings shadowed by subsequently imported modules.
  8599. full --- Same as both `shadow' and `value'.
  8600. For example:
  8601. guile> (apropos "trace" 'full)
  8602. debug: trace #<procedure trace args>
  8603. debug: untrace #<procedure untrace args>
  8604. the-scm-module: display-backtrace #<compiled-closure #<primitive-procedure gsubr-apply>>
  8605. the-scm-module: before-backtrace-hook ()
  8606. the-scm-module: backtrace #<primitive-procedure backtrace>
  8607. the-scm-module: after-backtrace-hook ()
  8608. the-scm-module: has-shown-backtrace-hint? #f
  8609. guile>
  8610. ** There are new functions and syntax for working with macros.
  8611. Guile implements macros as a special object type. Any variable whose
  8612. top-level binding is a macro object acts as a macro. The macro object
  8613. specifies how the expression should be transformed before evaluation.
  8614. *** Macro objects now print in a reasonable way, resembling procedures.
  8615. *** New function: (macro? OBJ)
  8616. True iff OBJ is a macro object.
  8617. *** New function: (primitive-macro? OBJ)
  8618. Like (macro? OBJ), but true only if OBJ is one of the Guile primitive
  8619. macro transformers, implemented in eval.c rather than Scheme code.
  8620. Why do we have this function?
  8621. - For symmetry with procedure? and primitive-procedure?,
  8622. - to allow custom print procedures to tell whether a macro is
  8623. primitive, and display it differently, and
  8624. - to allow compilers and user-written evaluators to distinguish
  8625. builtin special forms from user-defined ones, which could be
  8626. compiled.
  8627. *** New function: (macro-type OBJ)
  8628. Return a value indicating what kind of macro OBJ is. Possible return
  8629. values are:
  8630. The symbol `syntax' --- a macro created by procedure->syntax.
  8631. The symbol `macro' --- a macro created by procedure->macro.
  8632. The symbol `macro!' --- a macro created by procedure->memoizing-macro.
  8633. The boolean #f --- if OBJ is not a macro object.
  8634. *** New function: (macro-name MACRO)
  8635. Return the name of the macro object MACRO's procedure, as returned by
  8636. procedure-name.
  8637. *** New function: (macro-transformer MACRO)
  8638. Return the transformer procedure for MACRO.
  8639. *** New syntax: (use-syntax MODULE ... TRANSFORMER)
  8640. Specify a new macro expander to use in the current module. Each
  8641. MODULE is a module name, with the same meaning as in the `use-modules'
  8642. form; each named module's exported bindings are added to the current
  8643. top-level environment. TRANSFORMER is an expression evaluated in the
  8644. resulting environment which must yield a procedure to use as the
  8645. module's eval transformer: every expression evaluated in this module
  8646. is passed to this function, and the result passed to the Guile
  8647. interpreter.
  8648. *** macro-eval! is removed. Use local-eval instead.
  8649. ** Some magic has been added to the printer to better handle user
  8650. written printing routines (like record printers, closure printers).
  8651. The problem is that these user written routines must have access to
  8652. the current `print-state' to be able to handle fancy things like
  8653. detection of circular references. These print-states have to be
  8654. passed to the builtin printing routines (display, write, etc) to
  8655. properly continue the print chain.
  8656. We didn't want to change all existing print code so that it
  8657. explicitly passes thru a print state in addition to a port. Instead,
  8658. we extented the possible values that the builtin printing routines
  8659. accept as a `port'. In addition to a normal port, they now also take
  8660. a pair of a normal port and a print-state. Printing will go to the
  8661. port and the print-state will be used to control the detection of
  8662. circular references, etc. If the builtin function does not care for a
  8663. print-state, it is simply ignored.
  8664. User written callbacks are now called with such a pair as their
  8665. `port', but because every function now accepts this pair as a PORT
  8666. argument, you don't have to worry about that. In fact, it is probably
  8667. safest to not check for these pairs.
  8668. However, it is sometimes necessary to continue a print chain on a
  8669. different port, for example to get a intermediate string
  8670. representation of the printed value, mangle that string somehow, and
  8671. then to finally print the mangled string. Use the new function
  8672. inherit-print-state OLD-PORT NEW-PORT
  8673. for this. It constructs a new `port' that prints to NEW-PORT but
  8674. inherits the print-state of OLD-PORT.
  8675. ** struct-vtable-offset renamed to vtable-offset-user
  8676. ** New constants: vtable-index-layout, vtable-index-vtable, vtable-index-printer
  8677. ** There is now a third optional argument to make-vtable-vtable
  8678. (and fourth to make-struct) when constructing new types (vtables).
  8679. This argument initializes field vtable-index-printer of the vtable.
  8680. ** The detection of circular references has been extended to structs.
  8681. That is, a structure that -- in the process of being printed -- prints
  8682. itself does not lead to infinite recursion.
  8683. ** There is now some basic support for fluids. Please read
  8684. "libguile/fluid.h" to find out more. It is accessible from Scheme with
  8685. the following functions and macros:
  8686. Function: make-fluid
  8687. Create a new fluid object. Fluids are not special variables or
  8688. some other extension to the semantics of Scheme, but rather
  8689. ordinary Scheme objects. You can store them into variables (that
  8690. are still lexically scoped, of course) or into any other place you
  8691. like. Every fluid has a initial value of `#f'.
  8692. Function: fluid? OBJ
  8693. Test whether OBJ is a fluid.
  8694. Function: fluid-ref FLUID
  8695. Function: fluid-set! FLUID VAL
  8696. Access/modify the fluid FLUID. Modifications are only visible
  8697. within the current dynamic root (that includes threads).
  8698. Function: with-fluids* FLUIDS VALUES THUNK
  8699. FLUIDS is a list of fluids and VALUES a corresponding list of
  8700. values for these fluids. Before THUNK gets called the values are
  8701. installed in the fluids and the old values of the fluids are
  8702. saved in the VALUES list. When the flow of control leaves THUNK
  8703. or reenters it, the values get swapped again. You might think of
  8704. this as a `safe-fluid-excursion'. Note that the VALUES list is
  8705. modified by `with-fluids*'.
  8706. Macro: with-fluids ((FLUID VALUE) ...) FORM ...
  8707. The same as `with-fluids*' but with a different syntax. It looks
  8708. just like `let', but both FLUID and VALUE are evaluated. Remember,
  8709. fluids are not special variables but ordinary objects. FLUID
  8710. should evaluate to a fluid.
  8711. ** Changes to system call interfaces:
  8712. *** close-port, close-input-port and close-output-port now return a
  8713. boolean instead of an `unspecified' object. #t means that the port
  8714. was successfully closed, while #f means it was already closed. It is
  8715. also now possible for these procedures to raise an exception if an
  8716. error occurs (some errors from write can be delayed until close.)
  8717. *** the first argument to chmod, fcntl, ftell and fseek can now be a
  8718. file descriptor.
  8719. *** the third argument to fcntl is now optional.
  8720. *** the first argument to chown can now be a file descriptor or a port.
  8721. *** the argument to stat can now be a port.
  8722. *** The following new procedures have been added (most use scsh
  8723. interfaces):
  8724. *** procedure: close PORT/FD
  8725. Similar to close-port (*note close-port: Closing Ports.), but also
  8726. works on file descriptors. A side effect of closing a file
  8727. descriptor is that any ports using that file descriptor are moved
  8728. to a different file descriptor and have their revealed counts set
  8729. to zero.
  8730. *** procedure: port->fdes PORT
  8731. Returns the integer file descriptor underlying PORT. As a side
  8732. effect the revealed count of PORT is incremented.
  8733. *** procedure: fdes->ports FDES
  8734. Returns a list of existing ports which have FDES as an underlying
  8735. file descriptor, without changing their revealed counts.
  8736. *** procedure: fdes->inport FDES
  8737. Returns an existing input port which has FDES as its underlying
  8738. file descriptor, if one exists, and increments its revealed count.
  8739. Otherwise, returns a new input port with a revealed count of 1.
  8740. *** procedure: fdes->outport FDES
  8741. Returns an existing output port which has FDES as its underlying
  8742. file descriptor, if one exists, and increments its revealed count.
  8743. Otherwise, returns a new output port with a revealed count of 1.
  8744. The next group of procedures perform a `dup2' system call, if NEWFD
  8745. (an integer) is supplied, otherwise a `dup'. The file descriptor to be
  8746. duplicated can be supplied as an integer or contained in a port. The
  8747. type of value returned varies depending on which procedure is used.
  8748. All procedures also have the side effect when performing `dup2' that
  8749. any ports using NEWFD are moved to a different file descriptor and have
  8750. their revealed counts set to zero.
  8751. *** procedure: dup->fdes PORT/FD [NEWFD]
  8752. Returns an integer file descriptor.
  8753. *** procedure: dup->inport PORT/FD [NEWFD]
  8754. Returns a new input port using the new file descriptor.
  8755. *** procedure: dup->outport PORT/FD [NEWFD]
  8756. Returns a new output port using the new file descriptor.
  8757. *** procedure: dup PORT/FD [NEWFD]
  8758. Returns a new port if PORT/FD is a port, with the same mode as the
  8759. supplied port, otherwise returns an integer file descriptor.
  8760. *** procedure: dup->port PORT/FD MODE [NEWFD]
  8761. Returns a new port using the new file descriptor. MODE supplies a
  8762. mode string for the port (*note open-file: File Ports.).
  8763. *** procedure: setenv NAME VALUE
  8764. Modifies the environment of the current process, which is also the
  8765. default environment inherited by child processes.
  8766. If VALUE is `#f', then NAME is removed from the environment.
  8767. Otherwise, the string NAME=VALUE is added to the environment,
  8768. replacing any existing string with name matching NAME.
  8769. The return value is unspecified.
  8770. *** procedure: truncate-file OBJ SIZE
  8771. Truncates the file referred to by OBJ to at most SIZE bytes. OBJ
  8772. can be a string containing a file name or an integer file
  8773. descriptor or port open for output on the file. The underlying
  8774. system calls are `truncate' and `ftruncate'.
  8775. The return value is unspecified.
  8776. *** procedure: setvbuf PORT MODE [SIZE]
  8777. Set the buffering mode for PORT. MODE can be:
  8778. `_IONBF'
  8779. non-buffered
  8780. `_IOLBF'
  8781. line buffered
  8782. `_IOFBF'
  8783. block buffered, using a newly allocated buffer of SIZE bytes.
  8784. However if SIZE is zero or unspecified, the port will be made
  8785. non-buffered.
  8786. This procedure should not be used after I/O has been performed with
  8787. the port.
  8788. Ports are usually block buffered by default, with a default buffer
  8789. size. Procedures e.g., *Note open-file: File Ports, which accept a
  8790. mode string allow `0' to be added to request an unbuffered port.
  8791. *** procedure: fsync PORT/FD
  8792. Copies any unwritten data for the specified output file descriptor
  8793. to disk. If PORT/FD is a port, its buffer is flushed before the
  8794. underlying file descriptor is fsync'd. The return value is
  8795. unspecified.
  8796. *** procedure: open-fdes PATH FLAGS [MODES]
  8797. Similar to `open' but returns a file descriptor instead of a port.
  8798. *** procedure: execle PATH ENV [ARG] ...
  8799. Similar to `execl', but the environment of the new process is
  8800. specified by ENV, which must be a list of strings as returned by
  8801. the `environ' procedure.
  8802. This procedure is currently implemented using the `execve' system
  8803. call, but we call it `execle' because of its Scheme calling
  8804. interface.
  8805. *** procedure: strerror ERRNO
  8806. Returns the Unix error message corresponding to ERRNO, an integer.
  8807. *** procedure: primitive-exit [STATUS]
  8808. Terminate the current process without unwinding the Scheme stack.
  8809. This is would typically be useful after a fork. The exit status
  8810. is STATUS if supplied, otherwise zero.
  8811. *** procedure: times
  8812. Returns an object with information about real and processor time.
  8813. The following procedures accept such an object as an argument and
  8814. return a selected component:
  8815. `tms:clock'
  8816. The current real time, expressed as time units relative to an
  8817. arbitrary base.
  8818. `tms:utime'
  8819. The CPU time units used by the calling process.
  8820. `tms:stime'
  8821. The CPU time units used by the system on behalf of the
  8822. calling process.
  8823. `tms:cutime'
  8824. The CPU time units used by terminated child processes of the
  8825. calling process, whose status has been collected (e.g., using
  8826. `waitpid').
  8827. `tms:cstime'
  8828. Similarly, the CPU times units used by the system on behalf of
  8829. terminated child processes.
  8830. ** Removed: list-length
  8831. ** Removed: list-append, list-append!
  8832. ** Removed: list-reverse, list-reverse!
  8833. ** array-map renamed to array-map!
  8834. ** serial-array-map renamed to serial-array-map!
  8835. ** catch doesn't take #f as first argument any longer
  8836. Previously, it was possible to pass #f instead of a key to `catch'.
  8837. That would cause `catch' to pass a jump buffer object to the procedure
  8838. passed as second argument. The procedure could then use this jump
  8839. buffer objekt as an argument to throw.
  8840. This mechanism has been removed since its utility doesn't motivate the
  8841. extra complexity it introduces.
  8842. ** The `#/' notation for lists now provokes a warning message from Guile.
  8843. This syntax will be removed from Guile in the near future.
  8844. To disable the warning message, set the GUILE_HUSH environment
  8845. variable to any non-empty value.
  8846. ** The newline character now prints as `#\newline', following the
  8847. normal Scheme notation, not `#\nl'.
  8848. * Changes to the gh_ interface
  8849. ** The gh_enter function now takes care of loading the Guile startup files.
  8850. gh_enter works by calling scm_boot_guile; see the remarks below.
  8851. ** Function: void gh_write (SCM x)
  8852. Write the printed representation of the scheme object x to the current
  8853. output port. Corresponds to the scheme level `write'.
  8854. ** gh_list_length renamed to gh_length.
  8855. ** vector handling routines
  8856. Several major changes. In particular, gh_vector() now resembles
  8857. (vector ...) (with a caveat -- see manual), and gh_make_vector() now
  8858. exists and behaves like (make-vector ...). gh_vset() and gh_vref()
  8859. have been renamed gh_vector_set_x() and gh_vector_ref(). Some missing
  8860. vector-related gh_ functions have been implemented.
  8861. ** pair and list routines
  8862. Implemented several of the R4RS pair and list functions that were
  8863. missing.
  8864. ** gh_scm2doubles, gh_doubles2scm, gh_doubles2dvect
  8865. New function. Converts double arrays back and forth between Scheme
  8866. and C.
  8867. * Changes to the scm_ interface
  8868. ** The function scm_boot_guile now takes care of loading the startup files.
  8869. Guile's primary initialization function, scm_boot_guile, now takes
  8870. care of loading `boot-9.scm', in the `ice-9' module, to initialize
  8871. Guile, define the module system, and put together some standard
  8872. bindings. It also loads `init.scm', which is intended to hold
  8873. site-specific initialization code.
  8874. Since Guile cannot operate properly until boot-9.scm is loaded, there
  8875. is no reason to separate loading boot-9.scm from Guile's other
  8876. initialization processes.
  8877. This job used to be done by scm_compile_shell_switches, which didn't
  8878. make much sense; in particular, it meant that people using Guile for
  8879. non-shell-like applications had to jump through hoops to get Guile
  8880. initialized properly.
  8881. ** The function scm_compile_shell_switches no longer loads the startup files.
  8882. Now, Guile always loads the startup files, whenever it is initialized;
  8883. see the notes above for scm_boot_guile and scm_load_startup_files.
  8884. ** Function: scm_load_startup_files
  8885. This new function takes care of loading Guile's initialization file
  8886. (`boot-9.scm'), and the site initialization file, `init.scm'. Since
  8887. this is always called by the Guile initialization process, it's
  8888. probably not too useful to call this yourself, but it's there anyway.
  8889. ** The semantics of smob marking have changed slightly.
  8890. The smob marking function (the `mark' member of the scm_smobfuns
  8891. structure) is no longer responsible for setting the mark bit on the
  8892. smob. The generic smob handling code in the garbage collector will
  8893. set this bit. The mark function need only ensure that any other
  8894. objects the smob refers to get marked.
  8895. Note that this change means that the smob's GC8MARK bit is typically
  8896. already set upon entry to the mark function. Thus, marking functions
  8897. which look like this:
  8898. {
  8899. if (SCM_GC8MARKP (ptr))
  8900. return SCM_BOOL_F;
  8901. SCM_SETGC8MARK (ptr);
  8902. ... mark objects to which the smob refers ...
  8903. }
  8904. are now incorrect, since they will return early, and fail to mark any
  8905. other objects the smob refers to. Some code in the Guile library used
  8906. to work this way.
  8907. ** The semantics of the I/O port functions in scm_ptobfuns have changed.
  8908. If you have implemented your own I/O port type, by writing the
  8909. functions required by the scm_ptobfuns and then calling scm_newptob,
  8910. you will need to change your functions slightly.
  8911. The functions in a scm_ptobfuns structure now expect the port itself
  8912. as their argument; they used to expect the `stream' member of the
  8913. port's scm_port_table structure. This allows functions in an
  8914. scm_ptobfuns structure to easily access the port's cell (and any flags
  8915. it its CAR), and the port's scm_port_table structure.
  8916. Guile now passes the I/O port itself as the `port' argument in the
  8917. following scm_ptobfuns functions:
  8918. int (*free) (SCM port);
  8919. int (*fputc) (int, SCM port);
  8920. int (*fputs) (char *, SCM port);
  8921. scm_sizet (*fwrite) SCM_P ((char *ptr,
  8922. scm_sizet size,
  8923. scm_sizet nitems,
  8924. SCM port));
  8925. int (*fflush) (SCM port);
  8926. int (*fgetc) (SCM port);
  8927. int (*fclose) (SCM port);
  8928. The interfaces to the `mark', `print', `equalp', and `fgets' methods
  8929. are unchanged.
  8930. If you have existing code which defines its own port types, it is easy
  8931. to convert your code to the new interface; simply apply SCM_STREAM to
  8932. the port argument to yield the value you code used to expect.
  8933. Note that since both the port and the stream have the same type in the
  8934. C code --- they are both SCM values --- the C compiler will not remind
  8935. you if you forget to update your scm_ptobfuns functions.
  8936. ** Function: int scm_internal_select (int fds,
  8937. SELECT_TYPE *rfds,
  8938. SELECT_TYPE *wfds,
  8939. SELECT_TYPE *efds,
  8940. struct timeval *timeout);
  8941. This is a replacement for the `select' function provided by the OS.
  8942. It enables I/O blocking and sleeping to happen for one cooperative
  8943. thread without blocking other threads. It also avoids busy-loops in
  8944. these situations. It is intended that all I/O blocking and sleeping
  8945. will finally go through this function. Currently, this function is
  8946. only available on systems providing `gettimeofday' and `select'.
  8947. ** Function: SCM scm_internal_stack_catch (SCM tag,
  8948. scm_catch_body_t body,
  8949. void *body_data,
  8950. scm_catch_handler_t handler,
  8951. void *handler_data)
  8952. A new sibling to the other two C level `catch' functions
  8953. scm_internal_catch and scm_internal_lazy_catch. Use it if you want
  8954. the stack to be saved automatically into the variable `the-last-stack'
  8955. (scm_the_last_stack_var) on error. This is necessary if you want to
  8956. use advanced error reporting, such as calling scm_display_error and
  8957. scm_display_backtrace. (They both take a stack object as argument.)
  8958. ** Function: SCM scm_spawn_thread (scm_catch_body_t body,
  8959. void *body_data,
  8960. scm_catch_handler_t handler,
  8961. void *handler_data)
  8962. Spawns a new thread. It does a job similar to
  8963. scm_call_with_new_thread but takes arguments more suitable when
  8964. spawning threads from application C code.
  8965. ** The hook scm_error_callback has been removed. It was originally
  8966. intended as a way for the user to install his own error handler. But
  8967. that method works badly since it intervenes between throw and catch,
  8968. thereby changing the semantics of expressions like (catch #t ...).
  8969. The correct way to do it is to use one of the C level catch functions
  8970. in throw.c: scm_internal_catch/lazy_catch/stack_catch.
  8971. ** Removed functions:
  8972. scm_obj_length, scm_list_length, scm_list_append, scm_list_append_x,
  8973. scm_list_reverse, scm_list_reverse_x
  8974. ** New macros: SCM_LISTn where n is one of the integers 0-9.
  8975. These can be used for pretty list creation from C. The idea is taken
  8976. from Erick Gallesio's STk.
  8977. ** scm_array_map renamed to scm_array_map_x
  8978. ** mbstrings are now removed
  8979. This means that the type codes scm_tc7_mb_string and
  8980. scm_tc7_mb_substring has been removed.
  8981. ** scm_gen_putc, scm_gen_puts, scm_gen_write, and scm_gen_getc have changed.
  8982. Since we no longer support multi-byte strings, these I/O functions
  8983. have been simplified, and renamed. Here are their old names, and
  8984. their new names and arguments:
  8985. scm_gen_putc -> void scm_putc (int c, SCM port);
  8986. scm_gen_puts -> void scm_puts (char *s, SCM port);
  8987. scm_gen_write -> void scm_lfwrite (char *ptr, scm_sizet size, SCM port);
  8988. scm_gen_getc -> void scm_getc (SCM port);
  8989. ** The macros SCM_TYP7D and SCM_TYP7SD has been removed.
  8990. ** The macro SCM_TYP7S has taken the role of the old SCM_TYP7D
  8991. SCM_TYP7S now masks away the bit which distinguishes substrings from
  8992. strings.
  8993. ** scm_catch_body_t: Backward incompatible change!
  8994. Body functions to scm_internal_catch and friends do not any longer
  8995. take a second argument. This is because it is no longer possible to
  8996. pass a #f arg to catch.
  8997. ** Calls to scm_protect_object and scm_unprotect now nest properly.
  8998. The function scm_protect_object protects its argument from being freed
  8999. by the garbage collector. scm_unprotect_object removes that
  9000. protection.
  9001. These functions now nest properly. That is, for every object O, there
  9002. is a counter which scm_protect_object(O) increments and
  9003. scm_unprotect_object(O) decrements, if the counter is greater than
  9004. zero. Every object's counter is zero when it is first created. If an
  9005. object's counter is greater than zero, the garbage collector will not
  9006. reclaim its storage.
  9007. This allows you to use scm_protect_object in your code without
  9008. worrying that some other function you call will call
  9009. scm_unprotect_object, and allow it to be freed. Assuming that the
  9010. functions you call are well-behaved, and unprotect only those objects
  9011. they protect, you can follow the same rule and have confidence that
  9012. objects will be freed only at appropriate times.
  9013. Changes in Guile 1.2 (released Tuesday, June 24 1997):
  9014. * Changes to the distribution
  9015. ** Nightly snapshots are now available from ftp.red-bean.com.
  9016. The old server, ftp.cyclic.com, has been relinquished to its rightful
  9017. owner.
  9018. Nightly snapshots of the Guile development sources are now available via
  9019. anonymous FTP from ftp.red-bean.com, as /pub/guile/guile-snap.tar.gz.
  9020. Via the web, that's: ftp://ftp.red-bean.com/pub/guile/guile-snap.tar.gz
  9021. For getit, that's: ftp.red-bean.com:/pub/guile/guile-snap.tar.gz
  9022. ** To run Guile without installing it, the procedure has changed a bit.
  9023. If you used a separate build directory to compile Guile, you'll need
  9024. to include the build directory in SCHEME_LOAD_PATH, as well as the
  9025. source directory. See the `INSTALL' file for examples.
  9026. * Changes to the procedure for linking libguile with your programs
  9027. ** The standard Guile load path for Scheme code now includes
  9028. $(datadir)/guile (usually /usr/local/share/guile). This means that
  9029. you can install your own Scheme files there, and Guile will find them.
  9030. (Previous versions of Guile only checked a directory whose name
  9031. contained the Guile version number, so you had to re-install or move
  9032. your Scheme sources each time you installed a fresh version of Guile.)
  9033. The load path also includes $(datadir)/guile/site; we recommend
  9034. putting individual Scheme files there. If you want to install a
  9035. package with multiple source files, create a directory for them under
  9036. $(datadir)/guile.
  9037. ** Guile 1.2 will now use the Rx regular expression library, if it is
  9038. installed on your system. When you are linking libguile into your own
  9039. programs, this means you will have to link against -lguile, -lqt (if
  9040. you configured Guile with thread support), and -lrx.
  9041. If you are using autoconf to generate configuration scripts for your
  9042. application, the following lines should suffice to add the appropriate
  9043. libraries to your link command:
  9044. ### Find Rx, quickthreads and libguile.
  9045. AC_CHECK_LIB(rx, main)
  9046. AC_CHECK_LIB(qt, main)
  9047. AC_CHECK_LIB(guile, scm_shell)
  9048. The Guile 1.2 distribution does not contain sources for the Rx
  9049. library, as Guile 1.0 did. If you want to use Rx, you'll need to
  9050. retrieve it from a GNU FTP site and install it separately.
  9051. * Changes to Scheme functions and syntax
  9052. ** The dynamic linking features of Guile are now enabled by default.
  9053. You can disable them by giving the `--disable-dynamic-linking' option
  9054. to configure.
  9055. (dynamic-link FILENAME)
  9056. Find the object file denoted by FILENAME (a string) and link it
  9057. into the running Guile application. When everything works out,
  9058. return a Scheme object suitable for representing the linked object
  9059. file. Otherwise an error is thrown. How object files are
  9060. searched is system dependent.
  9061. (dynamic-object? VAL)
  9062. Determine whether VAL represents a dynamically linked object file.
  9063. (dynamic-unlink DYNOBJ)
  9064. Unlink the indicated object file from the application. DYNOBJ
  9065. should be one of the values returned by `dynamic-link'.
  9066. (dynamic-func FUNCTION DYNOBJ)
  9067. Search the C function indicated by FUNCTION (a string or symbol)
  9068. in DYNOBJ and return some Scheme object that can later be used
  9069. with `dynamic-call' to actually call this function. Right now,
  9070. these Scheme objects are formed by casting the address of the
  9071. function to `long' and converting this number to its Scheme
  9072. representation.
  9073. (dynamic-call FUNCTION DYNOBJ)
  9074. Call the C function indicated by FUNCTION and DYNOBJ. The
  9075. function is passed no arguments and its return value is ignored.
  9076. When FUNCTION is something returned by `dynamic-func', call that
  9077. function and ignore DYNOBJ. When FUNCTION is a string (or symbol,
  9078. etc.), look it up in DYNOBJ; this is equivalent to
  9079. (dynamic-call (dynamic-func FUNCTION DYNOBJ) #f)
  9080. Interrupts are deferred while the C function is executing (with
  9081. SCM_DEFER_INTS/SCM_ALLOW_INTS).
  9082. (dynamic-args-call FUNCTION DYNOBJ ARGS)
  9083. Call the C function indicated by FUNCTION and DYNOBJ, but pass it
  9084. some arguments and return its return value. The C function is
  9085. expected to take two arguments and return an `int', just like
  9086. `main':
  9087. int c_func (int argc, char **argv);
  9088. ARGS must be a list of strings and is converted into an array of
  9089. `char *'. The array is passed in ARGV and its size in ARGC. The
  9090. return value is converted to a Scheme number and returned from the
  9091. call to `dynamic-args-call'.
  9092. When dynamic linking is disabled or not supported on your system,
  9093. the above functions throw errors, but they are still available.
  9094. Here is a small example that works on GNU/Linux:
  9095. (define libc-obj (dynamic-link "libc.so"))
  9096. (dynamic-args-call 'rand libc-obj '())
  9097. See the file `libguile/DYNAMIC-LINKING' for additional comments.
  9098. ** The #/ syntax for module names is depreciated, and will be removed
  9099. in a future version of Guile. Instead of
  9100. #/foo/bar/baz
  9101. instead write
  9102. (foo bar baz)
  9103. The latter syntax is more consistent with existing Lisp practice.
  9104. ** Guile now does fancier printing of structures. Structures are the
  9105. underlying implementation for records, which in turn are used to
  9106. implement modules, so all of these object now print differently and in
  9107. a more informative way.
  9108. The Scheme printer will examine the builtin variable *struct-printer*
  9109. whenever it needs to print a structure object. When this variable is
  9110. not `#f' it is deemed to be a procedure and will be applied to the
  9111. structure object and the output port. When *struct-printer* is `#f'
  9112. or the procedure return `#f' the structure object will be printed in
  9113. the boring #<struct 80458270> form.
  9114. This hook is used by some routines in ice-9/boot-9.scm to implement
  9115. type specific printing routines. Please read the comments there about
  9116. "printing structs".
  9117. One of the more specific uses of structs are records. The printing
  9118. procedure that could be passed to MAKE-RECORD-TYPE is now actually
  9119. called. It should behave like a *struct-printer* procedure (described
  9120. above).
  9121. ** Guile now supports a new R4RS-compliant syntax for keywords. A
  9122. token of the form #:NAME, where NAME has the same syntax as a Scheme
  9123. symbol, is the external representation of the keyword named NAME.
  9124. Keyword objects print using this syntax as well, so values containing
  9125. keyword objects can be read back into Guile. When used in an
  9126. expression, keywords are self-quoting objects.
  9127. Guile suports this read syntax, and uses this print syntax, regardless
  9128. of the current setting of the `keyword' read option. The `keyword'
  9129. read option only controls whether Guile recognizes the `:NAME' syntax,
  9130. which is incompatible with R4RS. (R4RS says such token represent
  9131. symbols.)
  9132. ** Guile has regular expression support again. Guile 1.0 included
  9133. functions for matching regular expressions, based on the Rx library.
  9134. In Guile 1.1, the Guile/Rx interface was removed to simplify the
  9135. distribution, and thus Guile had no regular expression support. Guile
  9136. 1.2 again supports the most commonly used functions, and supports all
  9137. of SCSH's regular expression functions.
  9138. If your system does not include a POSIX regular expression library,
  9139. and you have not linked Guile with a third-party regexp library such as
  9140. Rx, these functions will not be available. You can tell whether your
  9141. Guile installation includes regular expression support by checking
  9142. whether the `*features*' list includes the `regex' symbol.
  9143. *** regexp functions
  9144. By default, Guile supports POSIX extended regular expressions. That
  9145. means that the characters `(', `)', `+' and `?' are special, and must
  9146. be escaped if you wish to match the literal characters.
  9147. This regular expression interface was modeled after that implemented
  9148. by SCSH, the Scheme Shell. It is intended to be upwardly compatible
  9149. with SCSH regular expressions.
  9150. **** Function: string-match PATTERN STR [START]
  9151. Compile the string PATTERN into a regular expression and compare
  9152. it with STR. The optional numeric argument START specifies the
  9153. position of STR at which to begin matching.
  9154. `string-match' returns a "match structure" which describes what,
  9155. if anything, was matched by the regular expression. *Note Match
  9156. Structures::. If STR does not match PATTERN at all,
  9157. `string-match' returns `#f'.
  9158. Each time `string-match' is called, it must compile its PATTERN
  9159. argument into a regular expression structure. This operation is
  9160. expensive, which makes `string-match' inefficient if the same regular
  9161. expression is used several times (for example, in a loop). For better
  9162. performance, you can compile a regular expression in advance and then
  9163. match strings against the compiled regexp.
  9164. **** Function: make-regexp STR [FLAGS]
  9165. Compile the regular expression described by STR, and return the
  9166. compiled regexp structure. If STR does not describe a legal
  9167. regular expression, `make-regexp' throws a
  9168. `regular-expression-syntax' error.
  9169. FLAGS may be the bitwise-or of one or more of the following:
  9170. **** Constant: regexp/extended
  9171. Use POSIX Extended Regular Expression syntax when interpreting
  9172. STR. If not set, POSIX Basic Regular Expression syntax is used.
  9173. If the FLAGS argument is omitted, we assume regexp/extended.
  9174. **** Constant: regexp/icase
  9175. Do not differentiate case. Subsequent searches using the
  9176. returned regular expression will be case insensitive.
  9177. **** Constant: regexp/newline
  9178. Match-any-character operators don't match a newline.
  9179. A non-matching list ([^...]) not containing a newline matches a
  9180. newline.
  9181. Match-beginning-of-line operator (^) matches the empty string
  9182. immediately after a newline, regardless of whether the FLAGS
  9183. passed to regexp-exec contain regexp/notbol.
  9184. Match-end-of-line operator ($) matches the empty string
  9185. immediately before a newline, regardless of whether the FLAGS
  9186. passed to regexp-exec contain regexp/noteol.
  9187. **** Function: regexp-exec REGEXP STR [START [FLAGS]]
  9188. Match the compiled regular expression REGEXP against `str'. If
  9189. the optional integer START argument is provided, begin matching
  9190. from that position in the string. Return a match structure
  9191. describing the results of the match, or `#f' if no match could be
  9192. found.
  9193. FLAGS may be the bitwise-or of one or more of the following:
  9194. **** Constant: regexp/notbol
  9195. The match-beginning-of-line operator always fails to match (but
  9196. see the compilation flag regexp/newline above) This flag may be
  9197. used when different portions of a string are passed to
  9198. regexp-exec and the beginning of the string should not be
  9199. interpreted as the beginning of the line.
  9200. **** Constant: regexp/noteol
  9201. The match-end-of-line operator always fails to match (but see the
  9202. compilation flag regexp/newline above)
  9203. **** Function: regexp? OBJ
  9204. Return `#t' if OBJ is a compiled regular expression, or `#f'
  9205. otherwise.
  9206. Regular expressions are commonly used to find patterns in one string
  9207. and replace them with the contents of another string.
  9208. **** Function: regexp-substitute PORT MATCH [ITEM...]
  9209. Write to the output port PORT selected contents of the match
  9210. structure MATCH. Each ITEM specifies what should be written, and
  9211. may be one of the following arguments:
  9212. * A string. String arguments are written out verbatim.
  9213. * An integer. The submatch with that number is written.
  9214. * The symbol `pre'. The portion of the matched string preceding
  9215. the regexp match is written.
  9216. * The symbol `post'. The portion of the matched string
  9217. following the regexp match is written.
  9218. PORT may be `#f', in which case nothing is written; instead,
  9219. `regexp-substitute' constructs a string from the specified ITEMs
  9220. and returns that.
  9221. **** Function: regexp-substitute/global PORT REGEXP TARGET [ITEM...]
  9222. Similar to `regexp-substitute', but can be used to perform global
  9223. substitutions on STR. Instead of taking a match structure as an
  9224. argument, `regexp-substitute/global' takes two string arguments: a
  9225. REGEXP string describing a regular expression, and a TARGET string
  9226. which should be matched against this regular expression.
  9227. Each ITEM behaves as in REGEXP-SUBSTITUTE, with the following
  9228. exceptions:
  9229. * A function may be supplied. When this function is called, it
  9230. will be passed one argument: a match structure for a given
  9231. regular expression match. It should return a string to be
  9232. written out to PORT.
  9233. * The `post' symbol causes `regexp-substitute/global' to recurse
  9234. on the unmatched portion of STR. This *must* be supplied in
  9235. order to perform global search-and-replace on STR; if it is
  9236. not present among the ITEMs, then `regexp-substitute/global'
  9237. will return after processing a single match.
  9238. *** Match Structures
  9239. A "match structure" is the object returned by `string-match' and
  9240. `regexp-exec'. It describes which portion of a string, if any, matched
  9241. the given regular expression. Match structures include: a reference to
  9242. the string that was checked for matches; the starting and ending
  9243. positions of the regexp match; and, if the regexp included any
  9244. parenthesized subexpressions, the starting and ending positions of each
  9245. submatch.
  9246. In each of the regexp match functions described below, the `match'
  9247. argument must be a match structure returned by a previous call to
  9248. `string-match' or `regexp-exec'. Most of these functions return some
  9249. information about the original target string that was matched against a
  9250. regular expression; we will call that string TARGET for easy reference.
  9251. **** Function: regexp-match? OBJ
  9252. Return `#t' if OBJ is a match structure returned by a previous
  9253. call to `regexp-exec', or `#f' otherwise.
  9254. **** Function: match:substring MATCH [N]
  9255. Return the portion of TARGET matched by subexpression number N.
  9256. Submatch 0 (the default) represents the entire regexp match. If
  9257. the regular expression as a whole matched, but the subexpression
  9258. number N did not match, return `#f'.
  9259. **** Function: match:start MATCH [N]
  9260. Return the starting position of submatch number N.
  9261. **** Function: match:end MATCH [N]
  9262. Return the ending position of submatch number N.
  9263. **** Function: match:prefix MATCH
  9264. Return the unmatched portion of TARGET preceding the regexp match.
  9265. **** Function: match:suffix MATCH
  9266. Return the unmatched portion of TARGET following the regexp match.
  9267. **** Function: match:count MATCH
  9268. Return the number of parenthesized subexpressions from MATCH.
  9269. Note that the entire regular expression match itself counts as a
  9270. subexpression, and failed submatches are included in the count.
  9271. **** Function: match:string MATCH
  9272. Return the original TARGET string.
  9273. *** Backslash Escapes
  9274. Sometimes you will want a regexp to match characters like `*' or `$'
  9275. exactly. For example, to check whether a particular string represents
  9276. a menu entry from an Info node, it would be useful to match it against
  9277. a regexp like `^* [^:]*::'. However, this won't work; because the
  9278. asterisk is a metacharacter, it won't match the `*' at the beginning of
  9279. the string. In this case, we want to make the first asterisk un-magic.
  9280. You can do this by preceding the metacharacter with a backslash
  9281. character `\'. (This is also called "quoting" the metacharacter, and
  9282. is known as a "backslash escape".) When Guile sees a backslash in a
  9283. regular expression, it considers the following glyph to be an ordinary
  9284. character, no matter what special meaning it would ordinarily have.
  9285. Therefore, we can make the above example work by changing the regexp to
  9286. `^\* [^:]*::'. The `\*' sequence tells the regular expression engine
  9287. to match only a single asterisk in the target string.
  9288. Since the backslash is itself a metacharacter, you may force a
  9289. regexp to match a backslash in the target string by preceding the
  9290. backslash with itself. For example, to find variable references in a
  9291. TeX program, you might want to find occurrences of the string `\let\'
  9292. followed by any number of alphabetic characters. The regular expression
  9293. `\\let\\[A-Za-z]*' would do this: the double backslashes in the regexp
  9294. each match a single backslash in the target string.
  9295. **** Function: regexp-quote STR
  9296. Quote each special character found in STR with a backslash, and
  9297. return the resulting string.
  9298. *Very important:* Using backslash escapes in Guile source code (as
  9299. in Emacs Lisp or C) can be tricky, because the backslash character has
  9300. special meaning for the Guile reader. For example, if Guile encounters
  9301. the character sequence `\n' in the middle of a string while processing
  9302. Scheme code, it replaces those characters with a newline character.
  9303. Similarly, the character sequence `\t' is replaced by a horizontal tab.
  9304. Several of these "escape sequences" are processed by the Guile reader
  9305. before your code is executed. Unrecognized escape sequences are
  9306. ignored: if the characters `\*' appear in a string, they will be
  9307. translated to the single character `*'.
  9308. This translation is obviously undesirable for regular expressions,
  9309. since we want to be able to include backslashes in a string in order to
  9310. escape regexp metacharacters. Therefore, to make sure that a backslash
  9311. is preserved in a string in your Guile program, you must use *two*
  9312. consecutive backslashes:
  9313. (define Info-menu-entry-pattern (make-regexp "^\\* [^:]*"))
  9314. The string in this example is preprocessed by the Guile reader before
  9315. any code is executed. The resulting argument to `make-regexp' is the
  9316. string `^\* [^:]*', which is what we really want.
  9317. This also means that in order to write a regular expression that
  9318. matches a single backslash character, the regular expression string in
  9319. the source code must include *four* backslashes. Each consecutive pair
  9320. of backslashes gets translated by the Guile reader to a single
  9321. backslash, and the resulting double-backslash is interpreted by the
  9322. regexp engine as matching a single backslash character. Hence:
  9323. (define tex-variable-pattern (make-regexp "\\\\let\\\\=[A-Za-z]*"))
  9324. The reason for the unwieldiness of this syntax is historical. Both
  9325. regular expression pattern matchers and Unix string processing systems
  9326. have traditionally used backslashes with the special meanings described
  9327. above. The POSIX regular expression specification and ANSI C standard
  9328. both require these semantics. Attempting to abandon either convention
  9329. would cause other kinds of compatibility problems, possibly more severe
  9330. ones. Therefore, without extending the Scheme reader to support
  9331. strings with different quoting conventions (an ungainly and confusing
  9332. extension when implemented in other languages), we must adhere to this
  9333. cumbersome escape syntax.
  9334. * Changes to the gh_ interface
  9335. * Changes to the scm_ interface
  9336. * Changes to system call interfaces:
  9337. ** The value returned by `raise' is now unspecified. It throws an exception
  9338. if an error occurs.
  9339. *** A new procedure `sigaction' can be used to install signal handlers
  9340. (sigaction signum [action] [flags])
  9341. signum is the signal number, which can be specified using the value
  9342. of SIGINT etc.
  9343. If action is omitted, sigaction returns a pair: the CAR is the current
  9344. signal handler, which will be either an integer with the value SIG_DFL
  9345. (default action) or SIG_IGN (ignore), or the Scheme procedure which
  9346. handles the signal, or #f if a non-Scheme procedure handles the
  9347. signal. The CDR contains the current sigaction flags for the handler.
  9348. If action is provided, it is installed as the new handler for signum.
  9349. action can be a Scheme procedure taking one argument, or the value of
  9350. SIG_DFL (default action) or SIG_IGN (ignore), or #f to restore
  9351. whatever signal handler was installed before sigaction was first used.
  9352. Flags can optionally be specified for the new handler (SA_RESTART is
  9353. always used if the system provides it, so need not be specified.) The
  9354. return value is a pair with information about the old handler as
  9355. described above.
  9356. This interface does not provide access to the "signal blocking"
  9357. facility. Maybe this is not needed, since the thread support may
  9358. provide solutions to the problem of consistent access to data
  9359. structures.
  9360. *** A new procedure `flush-all-ports' is equivalent to running
  9361. `force-output' on every port open for output.
  9362. ** Guile now provides information on how it was built, via the new
  9363. global variable, %guile-build-info. This variable records the values
  9364. of the standard GNU makefile directory variables as an assocation
  9365. list, mapping variable names (symbols) onto directory paths (strings).
  9366. For example, to find out where the Guile link libraries were
  9367. installed, you can say:
  9368. guile -c "(display (assq-ref %guile-build-info 'libdir)) (newline)"
  9369. * Changes to the scm_ interface
  9370. ** The new function scm_handle_by_message_noexit is just like the
  9371. existing scm_handle_by_message function, except that it doesn't call
  9372. exit to terminate the process. Instead, it prints a message and just
  9373. returns #f. This might be a more appropriate catch-all handler for
  9374. new dynamic roots and threads.
  9375. Changes in Guile 1.1 (released Friday, May 16 1997):
  9376. * Changes to the distribution.
  9377. The Guile 1.0 distribution has been split up into several smaller
  9378. pieces:
  9379. guile-core --- the Guile interpreter itself.
  9380. guile-tcltk --- the interface between the Guile interpreter and
  9381. Tcl/Tk; Tcl is an interpreter for a stringy language, and Tk
  9382. is a toolkit for building graphical user interfaces.
  9383. guile-rgx-ctax --- the interface between Guile and the Rx regular
  9384. expression matcher, and the translator for the Ctax
  9385. programming language. These are packaged together because the
  9386. Ctax translator uses Rx to parse Ctax source code.
  9387. This NEWS file describes the changes made to guile-core since the 1.0
  9388. release.
  9389. We no longer distribute the documentation, since it was either out of
  9390. date, or incomplete. As soon as we have current documentation, we
  9391. will distribute it.
  9392. * Changes to the stand-alone interpreter
  9393. ** guile now accepts command-line arguments compatible with SCSH, Olin
  9394. Shivers' Scheme Shell.
  9395. In general, arguments are evaluated from left to right, but there are
  9396. exceptions. The following switches stop argument processing, and
  9397. stash all remaining command-line arguments as the value returned by
  9398. the (command-line) function.
  9399. -s SCRIPT load Scheme source code from FILE, and exit
  9400. -c EXPR evalute Scheme expression EXPR, and exit
  9401. -- stop scanning arguments; run interactively
  9402. The switches below are processed as they are encountered.
  9403. -l FILE load Scheme source code from FILE
  9404. -e FUNCTION after reading script, apply FUNCTION to
  9405. command line arguments
  9406. -ds do -s script at this point
  9407. --emacs enable Emacs protocol (experimental)
  9408. -h, --help display this help and exit
  9409. -v, --version display version information and exit
  9410. \ read arguments from following script lines
  9411. So, for example, here is a Guile script named `ekko' (thanks, Olin)
  9412. which re-implements the traditional "echo" command:
  9413. #!/usr/local/bin/guile -s
  9414. !#
  9415. (define (main args)
  9416. (map (lambda (arg) (display arg) (display " "))
  9417. (cdr args))
  9418. (newline))
  9419. (main (command-line))
  9420. Suppose we invoke this script as follows:
  9421. ekko a speckled gecko
  9422. Through the magic of Unix script processing (triggered by the `#!'
  9423. token at the top of the file), /usr/local/bin/guile receives the
  9424. following list of command-line arguments:
  9425. ("-s" "./ekko" "a" "speckled" "gecko")
  9426. Unix inserts the name of the script after the argument specified on
  9427. the first line of the file (in this case, "-s"), and then follows that
  9428. with the arguments given to the script. Guile loads the script, which
  9429. defines the `main' function, and then applies it to the list of
  9430. remaining command-line arguments, ("a" "speckled" "gecko").
  9431. In Unix, the first line of a script file must take the following form:
  9432. #!INTERPRETER ARGUMENT
  9433. where INTERPRETER is the absolute filename of the interpreter
  9434. executable, and ARGUMENT is a single command-line argument to pass to
  9435. the interpreter.
  9436. You may only pass one argument to the interpreter, and its length is
  9437. limited. These restrictions can be annoying to work around, so Guile
  9438. provides a general mechanism (borrowed from, and compatible with,
  9439. SCSH) for circumventing them.
  9440. If the ARGUMENT in a Guile script is a single backslash character,
  9441. `\', Guile will open the script file, parse arguments from its second
  9442. and subsequent lines, and replace the `\' with them. So, for example,
  9443. here is another implementation of the `ekko' script:
  9444. #!/usr/local/bin/guile \
  9445. -e main -s
  9446. !#
  9447. (define (main args)
  9448. (for-each (lambda (arg) (display arg) (display " "))
  9449. (cdr args))
  9450. (newline))
  9451. If the user invokes this script as follows:
  9452. ekko a speckled gecko
  9453. Unix expands this into
  9454. /usr/local/bin/guile \ ekko a speckled gecko
  9455. When Guile sees the `\' argument, it replaces it with the arguments
  9456. read from the second line of the script, producing:
  9457. /usr/local/bin/guile -e main -s ekko a speckled gecko
  9458. This tells Guile to load the `ekko' script, and apply the function
  9459. `main' to the argument list ("a" "speckled" "gecko").
  9460. Here is how Guile parses the command-line arguments:
  9461. - Each space character terminates an argument. This means that two
  9462. spaces in a row introduce an empty-string argument.
  9463. - The tab character is not permitted (unless you quote it with the
  9464. backslash character, as described below), to avoid confusion.
  9465. - The newline character terminates the sequence of arguments, and will
  9466. also terminate a final non-empty argument. (However, a newline
  9467. following a space will not introduce a final empty-string argument;
  9468. it only terminates the argument list.)
  9469. - The backslash character is the escape character. It escapes
  9470. backslash, space, tab, and newline. The ANSI C escape sequences
  9471. like \n and \t are also supported. These produce argument
  9472. constituents; the two-character combination \n doesn't act like a
  9473. terminating newline. The escape sequence \NNN for exactly three
  9474. octal digits reads as the character whose ASCII code is NNN. As
  9475. above, characters produced this way are argument constituents.
  9476. Backslash followed by other characters is not allowed.
  9477. * Changes to the procedure for linking libguile with your programs
  9478. ** Guile now builds and installs a shared guile library, if your
  9479. system support shared libraries. (It still builds a static library on
  9480. all systems.) Guile automatically detects whether your system
  9481. supports shared libraries. To prevent Guile from buildisg shared
  9482. libraries, pass the `--disable-shared' flag to the configure script.
  9483. Guile takes longer to compile when it builds shared libraries, because
  9484. it must compile every file twice --- once to produce position-
  9485. independent object code, and once to produce normal object code.
  9486. ** The libthreads library has been merged into libguile.
  9487. To link a program against Guile, you now need only link against
  9488. -lguile and -lqt; -lthreads is no longer needed. If you are using
  9489. autoconf to generate configuration scripts for your application, the
  9490. following lines should suffice to add the appropriate libraries to
  9491. your link command:
  9492. ### Find quickthreads and libguile.
  9493. AC_CHECK_LIB(qt, main)
  9494. AC_CHECK_LIB(guile, scm_shell)
  9495. * Changes to Scheme functions
  9496. ** Guile Scheme's special syntax for keyword objects is now optional,
  9497. and disabled by default.
  9498. The syntax variation from R4RS made it difficult to port some
  9499. interesting packages to Guile. The routines which accepted keyword
  9500. arguments (mostly in the module system) have been modified to also
  9501. accept symbols whose names begin with `:'.
  9502. To change the keyword syntax, you must first import the (ice-9 debug)
  9503. module:
  9504. (use-modules (ice-9 debug))
  9505. Then you can enable the keyword syntax as follows:
  9506. (read-set! keywords 'prefix)
  9507. To disable keyword syntax, do this:
  9508. (read-set! keywords #f)
  9509. ** Many more primitive functions accept shared substrings as
  9510. arguments. In the past, these functions required normal, mutable
  9511. strings as arguments, although they never made use of this
  9512. restriction.
  9513. ** The uniform array functions now operate on byte vectors. These
  9514. functions are `array-fill!', `serial-array-copy!', `array-copy!',
  9515. `serial-array-map', `array-map', `array-for-each', and
  9516. `array-index-map!'.
  9517. ** The new functions `trace' and `untrace' implement simple debugging
  9518. support for Scheme functions.
  9519. The `trace' function accepts any number of procedures as arguments,
  9520. and tells the Guile interpreter to display each procedure's name and
  9521. arguments each time the procedure is invoked. When invoked with no
  9522. arguments, `trace' returns the list of procedures currently being
  9523. traced.
  9524. The `untrace' function accepts any number of procedures as arguments,
  9525. and tells the Guile interpreter not to trace them any more. When
  9526. invoked with no arguments, `untrace' untraces all currently traced
  9527. procedures.
  9528. The tracing in Guile has an advantage over most other systems: we
  9529. don't create new procedure objects, but mark the procedure objects
  9530. themselves. This means that anonymous and internal procedures can be
  9531. traced.
  9532. ** The function `assert-repl-prompt' has been renamed to
  9533. `set-repl-prompt!'. It takes one argument, PROMPT.
  9534. - If PROMPT is #f, the Guile read-eval-print loop will not prompt.
  9535. - If PROMPT is a string, we use it as a prompt.
  9536. - If PROMPT is a procedure accepting no arguments, we call it, and
  9537. display the result as a prompt.
  9538. - Otherwise, we display "> ".
  9539. ** The new function `eval-string' reads Scheme expressions from a
  9540. string and evaluates them, returning the value of the last expression
  9541. in the string. If the string contains no expressions, it returns an
  9542. unspecified value.
  9543. ** The new function `thunk?' returns true iff its argument is a
  9544. procedure of zero arguments.
  9545. ** `defined?' is now a builtin function, instead of syntax. This
  9546. means that its argument should be quoted. It returns #t iff its
  9547. argument is bound in the current module.
  9548. ** The new syntax `use-modules' allows you to add new modules to your
  9549. environment without re-typing a complete `define-module' form. It
  9550. accepts any number of module names as arguments, and imports their
  9551. public bindings into the current module.
  9552. ** The new function (module-defined? NAME MODULE) returns true iff
  9553. NAME, a symbol, is defined in MODULE, a module object.
  9554. ** The new function `builtin-bindings' creates and returns a hash
  9555. table containing copies of all the root module's bindings.
  9556. ** The new function `builtin-weak-bindings' does the same as
  9557. `builtin-bindings', but creates a doubly-weak hash table.
  9558. ** The `equal?' function now considers variable objects to be
  9559. equivalent if they have the same name and the same value.
  9560. ** The new function `command-line' returns the command-line arguments
  9561. given to Guile, as a list of strings.
  9562. When using guile as a script interpreter, `command-line' returns the
  9563. script's arguments; those processed by the interpreter (like `-s' or
  9564. `-c') are omitted. (In other words, you get the normal, expected
  9565. behavior.) Any application that uses scm_shell to process its
  9566. command-line arguments gets this behavior as well.
  9567. ** The new function `load-user-init' looks for a file called `.guile'
  9568. in the user's home directory, and loads it if it exists. This is
  9569. mostly for use by the code generated by scm_compile_shell_switches,
  9570. but we thought it might also be useful in other circumstances.
  9571. ** The new function `log10' returns the base-10 logarithm of its
  9572. argument.
  9573. ** Changes to I/O functions
  9574. *** The functions `read', `primitive-load', `read-and-eval!', and
  9575. `primitive-load-path' no longer take optional arguments controlling
  9576. case insensitivity and a `#' parser.
  9577. Case sensitivity is now controlled by a read option called
  9578. `case-insensitive'. The user can add new `#' syntaxes with the
  9579. `read-hash-extend' function (see below).
  9580. *** The new function `read-hash-extend' allows the user to change the
  9581. syntax of Guile Scheme in a somewhat controlled way.
  9582. (read-hash-extend CHAR PROC)
  9583. When parsing S-expressions, if we read a `#' character followed by
  9584. the character CHAR, use PROC to parse an object from the stream.
  9585. If PROC is #f, remove any parsing procedure registered for CHAR.
  9586. The reader applies PROC to two arguments: CHAR and an input port.
  9587. *** The new functions read-delimited and read-delimited! provide a
  9588. general mechanism for doing delimited input on streams.
  9589. (read-delimited DELIMS [PORT HANDLE-DELIM])
  9590. Read until we encounter one of the characters in DELIMS (a string),
  9591. or end-of-file. PORT is the input port to read from; it defaults to
  9592. the current input port. The HANDLE-DELIM parameter determines how
  9593. the terminating character is handled; it should be one of the
  9594. following symbols:
  9595. 'trim omit delimiter from result
  9596. 'peek leave delimiter character in input stream
  9597. 'concat append delimiter character to returned value
  9598. 'split return a pair: (RESULT . TERMINATOR)
  9599. HANDLE-DELIM defaults to 'peek.
  9600. (read-delimited! DELIMS BUF [PORT HANDLE-DELIM START END])
  9601. A side-effecting variant of `read-delimited'.
  9602. The data is written into the string BUF at the indices in the
  9603. half-open interval [START, END); the default interval is the whole
  9604. string: START = 0 and END = (string-length BUF). The values of
  9605. START and END must specify a well-defined interval in BUF, i.e.
  9606. 0 <= START <= END <= (string-length BUF).
  9607. It returns NBYTES, the number of bytes read. If the buffer filled
  9608. up without a delimiter character being found, it returns #f. If the
  9609. port is at EOF when the read starts, it returns the EOF object.
  9610. If an integer is returned (i.e., the read is successfully terminated
  9611. by reading a delimiter character), then the HANDLE-DELIM parameter
  9612. determines how to handle the terminating character. It is described
  9613. above, and defaults to 'peek.
  9614. (The descriptions of these functions were borrowed from the SCSH
  9615. manual, by Olin Shivers and Brian Carlstrom.)
  9616. *** The `%read-delimited!' function is the primitive used to implement
  9617. `read-delimited' and `read-delimited!'.
  9618. (%read-delimited! DELIMS BUF GOBBLE? [PORT START END])
  9619. This returns a pair of values: (TERMINATOR . NUM-READ).
  9620. - TERMINATOR describes why the read was terminated. If it is a
  9621. character or the eof object, then that is the value that terminated
  9622. the read. If it is #f, the function filled the buffer without finding
  9623. a delimiting character.
  9624. - NUM-READ is the number of characters read into BUF.
  9625. If the read is successfully terminated by reading a delimiter
  9626. character, then the gobble? parameter determines what to do with the
  9627. terminating character. If true, the character is removed from the
  9628. input stream; if false, the character is left in the input stream
  9629. where a subsequent read operation will retrieve it. In either case,
  9630. the character is also the first value returned by the procedure call.
  9631. (The descriptions of this function was borrowed from the SCSH manual,
  9632. by Olin Shivers and Brian Carlstrom.)
  9633. *** The `read-line' and `read-line!' functions have changed; they now
  9634. trim the terminator by default; previously they appended it to the
  9635. returned string. For the old behavior, use (read-line PORT 'concat).
  9636. *** The functions `uniform-array-read!' and `uniform-array-write!' now
  9637. take new optional START and END arguments, specifying the region of
  9638. the array to read and write.
  9639. *** The `ungetc-char-ready?' function has been removed. We feel it's
  9640. inappropriate for an interface to expose implementation details this
  9641. way.
  9642. ** Changes to the Unix library and system call interface
  9643. *** The new fcntl function provides access to the Unix `fcntl' system
  9644. call.
  9645. (fcntl PORT COMMAND VALUE)
  9646. Apply COMMAND to PORT's file descriptor, with VALUE as an argument.
  9647. Values for COMMAND are:
  9648. F_DUPFD duplicate a file descriptor
  9649. F_GETFD read the descriptor's close-on-exec flag
  9650. F_SETFD set the descriptor's close-on-exec flag to VALUE
  9651. F_GETFL read the descriptor's flags, as set on open
  9652. F_SETFL set the descriptor's flags, as set on open to VALUE
  9653. F_GETOWN return the process ID of a socket's owner, for SIGIO
  9654. F_SETOWN set the process that owns a socket to VALUE, for SIGIO
  9655. FD_CLOEXEC not sure what this is
  9656. For details, see the documentation for the fcntl system call.
  9657. *** The arguments to `select' have changed, for compatibility with
  9658. SCSH. The TIMEOUT parameter may now be non-integral, yielding the
  9659. expected behavior. The MILLISECONDS parameter has been changed to
  9660. MICROSECONDS, to more closely resemble the underlying system call.
  9661. The RVEC, WVEC, and EVEC arguments can now be vectors; the type of the
  9662. corresponding return set will be the same.
  9663. *** The arguments to the `mknod' system call have changed. They are
  9664. now:
  9665. (mknod PATH TYPE PERMS DEV)
  9666. Create a new file (`node') in the file system. PATH is the name of
  9667. the file to create. TYPE is the kind of file to create; it should
  9668. be 'fifo, 'block-special, or 'char-special. PERMS specifies the
  9669. permission bits to give the newly created file. If TYPE is
  9670. 'block-special or 'char-special, DEV specifies which device the
  9671. special file refers to; its interpretation depends on the kind of
  9672. special file being created.
  9673. *** The `fork' function has been renamed to `primitive-fork', to avoid
  9674. clashing with various SCSH forks.
  9675. *** The `recv' and `recvfrom' functions have been renamed to `recv!'
  9676. and `recvfrom!'. They no longer accept a size for a second argument;
  9677. you must pass a string to hold the received value. They no longer
  9678. return the buffer. Instead, `recv' returns the length of the message
  9679. received, and `recvfrom' returns a pair containing the packet's length
  9680. and originating address.
  9681. *** The file descriptor datatype has been removed, as have the
  9682. `read-fd', `write-fd', `close', `lseek', and `dup' functions.
  9683. We plan to replace these functions with a SCSH-compatible interface.
  9684. *** The `create' function has been removed; it's just a special case
  9685. of `open'.
  9686. *** There are new functions to break down process termination status
  9687. values. In the descriptions below, STATUS is a value returned by
  9688. `waitpid'.
  9689. (status:exit-val STATUS)
  9690. If the child process exited normally, this function returns the exit
  9691. code for the child process (i.e., the value passed to exit, or
  9692. returned from main). If the child process did not exit normally,
  9693. this function returns #f.
  9694. (status:stop-sig STATUS)
  9695. If the child process was suspended by a signal, this function
  9696. returns the signal that suspended the child. Otherwise, it returns
  9697. #f.
  9698. (status:term-sig STATUS)
  9699. If the child process terminated abnormally, this function returns
  9700. the signal that terminated the child. Otherwise, this function
  9701. returns false.
  9702. POSIX promises that exactly one of these functions will return true on
  9703. a valid STATUS value.
  9704. These functions are compatible with SCSH.
  9705. *** There are new accessors and setters for the broken-out time vectors
  9706. returned by `localtime', `gmtime', and that ilk. They are:
  9707. Component Accessor Setter
  9708. ========================= ============ ============
  9709. seconds tm:sec set-tm:sec
  9710. minutes tm:min set-tm:min
  9711. hours tm:hour set-tm:hour
  9712. day of the month tm:mday set-tm:mday
  9713. month tm:mon set-tm:mon
  9714. year tm:year set-tm:year
  9715. day of the week tm:wday set-tm:wday
  9716. day in the year tm:yday set-tm:yday
  9717. daylight saving time tm:isdst set-tm:isdst
  9718. GMT offset, seconds tm:gmtoff set-tm:gmtoff
  9719. name of time zone tm:zone set-tm:zone
  9720. *** There are new accessors for the vectors returned by `uname',
  9721. describing the host system:
  9722. Component Accessor
  9723. ============================================== ================
  9724. name of the operating system implementation utsname:sysname
  9725. network name of this machine utsname:nodename
  9726. release level of the operating system utsname:release
  9727. version level of the operating system utsname:version
  9728. machine hardware platform utsname:machine
  9729. *** There are new accessors for the vectors returned by `getpw',
  9730. `getpwnam', `getpwuid', and `getpwent', describing entries from the
  9731. system's user database:
  9732. Component Accessor
  9733. ====================== =================
  9734. user name passwd:name
  9735. user password passwd:passwd
  9736. user id passwd:uid
  9737. group id passwd:gid
  9738. real name passwd:gecos
  9739. home directory passwd:dir
  9740. shell program passwd:shell
  9741. *** There are new accessors for the vectors returned by `getgr',
  9742. `getgrnam', `getgrgid', and `getgrent', describing entries from the
  9743. system's group database:
  9744. Component Accessor
  9745. ======================= ============
  9746. group name group:name
  9747. group password group:passwd
  9748. group id group:gid
  9749. group members group:mem
  9750. *** There are new accessors for the vectors returned by `gethost',
  9751. `gethostbyaddr', `gethostbyname', and `gethostent', describing
  9752. internet hosts:
  9753. Component Accessor
  9754. ========================= ===============
  9755. official name of host hostent:name
  9756. alias list hostent:aliases
  9757. host address type hostent:addrtype
  9758. length of address hostent:length
  9759. list of addresses hostent:addr-list
  9760. *** There are new accessors for the vectors returned by `getnet',
  9761. `getnetbyaddr', `getnetbyname', and `getnetent', describing internet
  9762. networks:
  9763. Component Accessor
  9764. ========================= ===============
  9765. official name of net netent:name
  9766. alias list netent:aliases
  9767. net number type netent:addrtype
  9768. net number netent:net
  9769. *** There are new accessors for the vectors returned by `getproto',
  9770. `getprotobyname', `getprotobynumber', and `getprotoent', describing
  9771. internet protocols:
  9772. Component Accessor
  9773. ========================= ===============
  9774. official protocol name protoent:name
  9775. alias list protoent:aliases
  9776. protocol number protoent:proto
  9777. *** There are new accessors for the vectors returned by `getserv',
  9778. `getservbyname', `getservbyport', and `getservent', describing
  9779. internet protocols:
  9780. Component Accessor
  9781. ========================= ===============
  9782. official service name servent:name
  9783. alias list servent:aliases
  9784. port number servent:port
  9785. protocol to use servent:proto
  9786. *** There are new accessors for the sockaddr structures returned by
  9787. `accept', `getsockname', `getpeername', `recvfrom!':
  9788. Component Accessor
  9789. ======================================== ===============
  9790. address format (`family') sockaddr:fam
  9791. path, for file domain addresses sockaddr:path
  9792. address, for internet domain addresses sockaddr:addr
  9793. TCP or UDP port, for internet sockaddr:port
  9794. *** The `getpwent', `getgrent', `gethostent', `getnetent',
  9795. `getprotoent', and `getservent' functions now return #f at the end of
  9796. the user database. (They used to throw an exception.)
  9797. Note that calling MUMBLEent function is equivalent to calling the
  9798. corresponding MUMBLE function with no arguments.
  9799. *** The `setpwent', `setgrent', `sethostent', `setnetent',
  9800. `setprotoent', and `setservent' routines now take no arguments.
  9801. *** The `gethost', `getproto', `getnet', and `getserv' functions now
  9802. provide more useful information when they throw an exception.
  9803. *** The `lnaof' function has been renamed to `inet-lnaof'.
  9804. *** Guile now claims to have the `current-time' feature.
  9805. *** The `mktime' function now takes an optional second argument ZONE,
  9806. giving the time zone to use for the conversion. ZONE should be a
  9807. string, in the same format as expected for the "TZ" environment variable.
  9808. *** The `strptime' function now returns a pair (TIME . COUNT), where
  9809. TIME is the parsed time as a vector, and COUNT is the number of
  9810. characters from the string left unparsed. This function used to
  9811. return the remaining characters as a string.
  9812. *** The `gettimeofday' function has replaced the old `time+ticks' function.
  9813. The return value is now (SECONDS . MICROSECONDS); the fractional
  9814. component is no longer expressed in "ticks".
  9815. *** The `ticks/sec' constant has been removed, in light of the above change.
  9816. * Changes to the gh_ interface
  9817. ** gh_eval_str() now returns an SCM object which is the result of the
  9818. evaluation
  9819. ** gh_scm2str() now copies the Scheme data to a caller-provided C
  9820. array
  9821. ** gh_scm2newstr() now makes a C array, copies the Scheme data to it,
  9822. and returns the array
  9823. ** gh_scm2str0() is gone: there is no need to distinguish
  9824. null-terminated from non-null-terminated, since gh_scm2newstr() allows
  9825. the user to interpret the data both ways.
  9826. * Changes to the scm_ interface
  9827. ** The new function scm_symbol_value0 provides an easy way to get a
  9828. symbol's value from C code:
  9829. SCM scm_symbol_value0 (char *NAME)
  9830. Return the value of the symbol named by the null-terminated string
  9831. NAME in the current module. If the symbol named NAME is unbound in
  9832. the current module, return SCM_UNDEFINED.
  9833. ** The new function scm_sysintern0 creates new top-level variables,
  9834. without assigning them a value.
  9835. SCM scm_sysintern0 (char *NAME)
  9836. Create a new Scheme top-level variable named NAME. NAME is a
  9837. null-terminated string. Return the variable's value cell.
  9838. ** The function scm_internal_catch is the guts of catch. It handles
  9839. all the mechanics of setting up a catch target, invoking the catch
  9840. body, and perhaps invoking the handler if the body does a throw.
  9841. The function is designed to be usable from C code, but is general
  9842. enough to implement all the semantics Guile Scheme expects from throw.
  9843. TAG is the catch tag. Typically, this is a symbol, but this function
  9844. doesn't actually care about that.
  9845. BODY is a pointer to a C function which runs the body of the catch;
  9846. this is the code you can throw from. We call it like this:
  9847. BODY (BODY_DATA, JMPBUF)
  9848. where:
  9849. BODY_DATA is just the BODY_DATA argument we received; we pass it
  9850. through to BODY as its first argument. The caller can make
  9851. BODY_DATA point to anything useful that BODY might need.
  9852. JMPBUF is the Scheme jmpbuf object corresponding to this catch,
  9853. which we have just created and initialized.
  9854. HANDLER is a pointer to a C function to deal with a throw to TAG,
  9855. should one occur. We call it like this:
  9856. HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
  9857. where
  9858. HANDLER_DATA is the HANDLER_DATA argument we received; it's the
  9859. same idea as BODY_DATA above.
  9860. THROWN_TAG is the tag that the user threw to; usually this is
  9861. TAG, but it could be something else if TAG was #t (i.e., a
  9862. catch-all), or the user threw to a jmpbuf.
  9863. THROW_ARGS is the list of arguments the user passed to the THROW
  9864. function.
  9865. BODY_DATA is just a pointer we pass through to BODY. HANDLER_DATA
  9866. is just a pointer we pass through to HANDLER. We don't actually
  9867. use either of those pointers otherwise ourselves. The idea is
  9868. that, if our caller wants to communicate something to BODY or
  9869. HANDLER, it can pass a pointer to it as MUMBLE_DATA, which BODY and
  9870. HANDLER can then use. Think of it as a way to make BODY and
  9871. HANDLER closures, not just functions; MUMBLE_DATA points to the
  9872. enclosed variables.
  9873. Of course, it's up to the caller to make sure that any data a
  9874. MUMBLE_DATA needs is protected from GC. A common way to do this is
  9875. to make MUMBLE_DATA a pointer to data stored in an automatic
  9876. structure variable; since the collector must scan the stack for
  9877. references anyway, this assures that any references in MUMBLE_DATA
  9878. will be found.
  9879. ** The new function scm_internal_lazy_catch is exactly like
  9880. scm_internal_catch, except:
  9881. - It does not unwind the stack (this is the major difference).
  9882. - If handler returns, its value is returned from the throw.
  9883. - BODY always receives #f as its JMPBUF argument (since there's no
  9884. jmpbuf associated with a lazy catch, because we don't unwind the
  9885. stack.)
  9886. ** scm_body_thunk is a new body function you can pass to
  9887. scm_internal_catch if you want the body to be like Scheme's `catch'
  9888. --- a thunk, or a function of one argument if the tag is #f.
  9889. BODY_DATA is a pointer to a scm_body_thunk_data structure, which
  9890. contains the Scheme procedure to invoke as the body, and the tag
  9891. we're catching. If the tag is #f, then we pass JMPBUF (created by
  9892. scm_internal_catch) to the body procedure; otherwise, the body gets
  9893. no arguments.
  9894. ** scm_handle_by_proc is a new handler function you can pass to
  9895. scm_internal_catch if you want the handler to act like Scheme's catch
  9896. --- call a procedure with the tag and the throw arguments.
  9897. If the user does a throw to this catch, this function runs a handler
  9898. procedure written in Scheme. HANDLER_DATA is a pointer to an SCM
  9899. variable holding the Scheme procedure object to invoke. It ought to
  9900. be a pointer to an automatic variable (i.e., one living on the stack),
  9901. or the procedure object should be otherwise protected from GC.
  9902. ** scm_handle_by_message is a new handler function to use with
  9903. `scm_internal_catch' if you want Guile to print a message and die.
  9904. It's useful for dealing with throws to uncaught keys at the top level.
  9905. HANDLER_DATA, if non-zero, is assumed to be a char * pointing to a
  9906. message header to print; if zero, we use "guile" instead. That
  9907. text is followed by a colon, then the message described by ARGS.
  9908. ** The return type of scm_boot_guile is now void; the function does
  9909. not return a value, and indeed, never returns at all.
  9910. ** The new function scm_shell makes it easy for user applications to
  9911. process command-line arguments in a way that is compatible with the
  9912. stand-alone guile interpreter (which is in turn compatible with SCSH,
  9913. the Scheme shell).
  9914. To use the scm_shell function, first initialize any guile modules
  9915. linked into your application, and then call scm_shell with the values
  9916. of ARGC and ARGV your `main' function received. scm_shell will add
  9917. any SCSH-style meta-arguments from the top of the script file to the
  9918. argument vector, and then process the command-line arguments. This
  9919. generally means loading a script file or starting up an interactive
  9920. command interpreter. For details, see "Changes to the stand-alone
  9921. interpreter" above.
  9922. ** The new functions scm_get_meta_args and scm_count_argv help you
  9923. implement the SCSH-style meta-argument, `\'.
  9924. char **scm_get_meta_args (int ARGC, char **ARGV)
  9925. If the second element of ARGV is a string consisting of a single
  9926. backslash character (i.e. "\\" in Scheme notation), open the file
  9927. named by the following argument, parse arguments from it, and return
  9928. the spliced command line. The returned array is terminated by a
  9929. null pointer.
  9930. For details of argument parsing, see above, under "guile now accepts
  9931. command-line arguments compatible with SCSH..."
  9932. int scm_count_argv (char **ARGV)
  9933. Count the arguments in ARGV, assuming it is terminated by a null
  9934. pointer.
  9935. For an example of how these functions might be used, see the source
  9936. code for the function scm_shell in libguile/script.c.
  9937. You will usually want to use scm_shell instead of calling this
  9938. function yourself.
  9939. ** The new function scm_compile_shell_switches turns an array of
  9940. command-line arguments into Scheme code to carry out the actions they
  9941. describe. Given ARGC and ARGV, it returns a Scheme expression to
  9942. evaluate, and calls scm_set_program_arguments to make any remaining
  9943. command-line arguments available to the Scheme code. For example,
  9944. given the following arguments:
  9945. -e main -s ekko a speckled gecko
  9946. scm_set_program_arguments will return the following expression:
  9947. (begin (load "ekko") (main (command-line)) (quit))
  9948. You will usually want to use scm_shell instead of calling this
  9949. function yourself.
  9950. ** The function scm_shell_usage prints a usage message appropriate for
  9951. an interpreter that uses scm_compile_shell_switches to handle its
  9952. command-line arguments.
  9953. void scm_shell_usage (int FATAL, char *MESSAGE)
  9954. Print a usage message to the standard error output. If MESSAGE is
  9955. non-zero, write it before the usage message, followed by a newline.
  9956. If FATAL is non-zero, exit the process, using FATAL as the
  9957. termination status. (If you want to be compatible with Guile,
  9958. always use 1 as the exit status when terminating due to command-line
  9959. usage problems.)
  9960. You will usually want to use scm_shell instead of calling this
  9961. function yourself.
  9962. ** scm_eval_0str now returns SCM_UNSPECIFIED if the string contains no
  9963. expressions. It used to return SCM_EOL. Earth-shattering.
  9964. ** The macros for declaring scheme objects in C code have been
  9965. rearranged slightly. They are now:
  9966. SCM_SYMBOL (C_NAME, SCHEME_NAME)
  9967. Declare a static SCM variable named C_NAME, and initialize it to
  9968. point to the Scheme symbol whose name is SCHEME_NAME. C_NAME should
  9969. be a C identifier, and SCHEME_NAME should be a C string.
  9970. SCM_GLOBAL_SYMBOL (C_NAME, SCHEME_NAME)
  9971. Just like SCM_SYMBOL, but make C_NAME globally visible.
  9972. SCM_VCELL (C_NAME, SCHEME_NAME)
  9973. Create a global variable at the Scheme level named SCHEME_NAME.
  9974. Declare a static SCM variable named C_NAME, and initialize it to
  9975. point to the Scheme variable's value cell.
  9976. SCM_GLOBAL_VCELL (C_NAME, SCHEME_NAME)
  9977. Just like SCM_VCELL, but make C_NAME globally visible.
  9978. The `guile-snarf' script writes initialization code for these macros
  9979. to its standard output, given C source code as input.
  9980. The SCM_GLOBAL macro is gone.
  9981. ** The scm_read_line and scm_read_line_x functions have been replaced
  9982. by Scheme code based on the %read-delimited! procedure (known to C
  9983. code as scm_read_delimited_x). See its description above for more
  9984. information.
  9985. ** The function scm_sys_open has been renamed to scm_open. It now
  9986. returns a port instead of an FD object.
  9987. * The dynamic linking support has changed. For more information, see
  9988. libguile/DYNAMIC-LINKING.
  9989. Guile 1.0b3
  9990. User-visible changes from Thursday, September 5, 1996 until Guile 1.0
  9991. (Sun 5 Jan 1997):
  9992. * Changes to the 'guile' program:
  9993. ** Guile now loads some new files when it starts up. Guile first
  9994. searches the load path for init.scm, and loads it if found. Then, if
  9995. Guile is not being used to execute a script, and the user's home
  9996. directory contains a file named `.guile', Guile loads that.
  9997. ** You can now use Guile as a shell script interpreter.
  9998. To paraphrase the SCSH manual:
  9999. When Unix tries to execute an executable file whose first two
  10000. characters are the `#!', it treats the file not as machine code to
  10001. be directly executed by the native processor, but as source code
  10002. to be executed by some interpreter. The interpreter to use is
  10003. specified immediately after the #! sequence on the first line of
  10004. the source file. The kernel reads in the name of the interpreter,
  10005. and executes that instead. It passes the interpreter the source
  10006. filename as its first argument, with the original arguments
  10007. following. Consult the Unix man page for the `exec' system call
  10008. for more information.
  10009. Now you can use Guile as an interpreter, using a mechanism which is a
  10010. compatible subset of that provided by SCSH.
  10011. Guile now recognizes a '-s' command line switch, whose argument is the
  10012. name of a file of Scheme code to load. It also treats the two
  10013. characters `#!' as the start of a comment, terminated by `!#'. Thus,
  10014. to make a file of Scheme code directly executable by Unix, insert the
  10015. following two lines at the top of the file:
  10016. #!/usr/local/bin/guile -s
  10017. !#
  10018. Guile treats the argument of the `-s' command-line switch as the name
  10019. of a file of Scheme code to load, and treats the sequence `#!' as the
  10020. start of a block comment, terminated by `!#'.
  10021. For example, here's a version of 'echo' written in Scheme:
  10022. #!/usr/local/bin/guile -s
  10023. !#
  10024. (let loop ((args (cdr (program-arguments))))
  10025. (if (pair? args)
  10026. (begin
  10027. (display (car args))
  10028. (if (pair? (cdr args))
  10029. (display " "))
  10030. (loop (cdr args)))))
  10031. (newline)
  10032. Why does `#!' start a block comment terminated by `!#', instead of the
  10033. end of the line? That is the notation SCSH uses, and although we
  10034. don't yet support the other SCSH features that motivate that choice,
  10035. we would like to be backward-compatible with any existing Guile
  10036. scripts once we do. Furthermore, if the path to Guile on your system
  10037. is too long for your kernel, you can start the script with this
  10038. horrible hack:
  10039. #!/bin/sh
  10040. exec /really/long/path/to/guile -s "$0" ${1+"$@"}
  10041. !#
  10042. Note that some very old Unix systems don't support the `#!' syntax.
  10043. ** You can now run Guile without installing it.
  10044. Previous versions of the interactive Guile interpreter (`guile')
  10045. couldn't start up unless Guile's Scheme library had been installed;
  10046. they used the value of the environment variable `SCHEME_LOAD_PATH'
  10047. later on in the startup process, but not to find the startup code
  10048. itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
  10049. code.
  10050. To run Guile without installing it, build it in the normal way, and
  10051. then set the environment variable `SCHEME_LOAD_PATH' to a
  10052. colon-separated list of directories, including the top-level directory
  10053. of the Guile sources. For example, if you unpacked Guile so that the
  10054. full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
  10055. you might say
  10056. export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
  10057. ** Guile's read-eval-print loop no longer prints #<unspecified>
  10058. results. If the user wants to see this, she can evaluate the
  10059. expression (assert-repl-print-unspecified #t), perhaps in her startup
  10060. file.
  10061. ** Guile no longer shows backtraces by default when an error occurs;
  10062. however, it does display a message saying how to get one, and how to
  10063. request that they be displayed by default. After an error, evaluate
  10064. (backtrace)
  10065. to see a backtrace, and
  10066. (debug-enable 'backtrace)
  10067. to see them by default.
  10068. * Changes to Guile Scheme:
  10069. ** Guile now distinguishes between #f and the empty list.
  10070. This is for compatibility with the IEEE standard, the (possibly)
  10071. upcoming Revised^5 Report on Scheme, and many extant Scheme
  10072. implementations.
  10073. Guile used to have #f and '() denote the same object, to make Scheme's
  10074. type system more compatible with Emacs Lisp's. However, the change
  10075. caused too much trouble for Scheme programmers, and we found another
  10076. way to reconcile Emacs Lisp with Scheme that didn't require this.
  10077. ** Guile's delq, delv, delete functions, and their destructive
  10078. counterparts, delq!, delv!, and delete!, now remove all matching
  10079. elements from the list, not just the first. This matches the behavior
  10080. of the corresponding Emacs Lisp functions, and (I believe) the Maclisp
  10081. functions which inspired them.
  10082. I recognize that this change may break code in subtle ways, but it
  10083. seems best to make the change before the FSF's first Guile release,
  10084. rather than after.
  10085. ** The compiled-library-path function has been deleted from libguile.
  10086. ** The facilities for loading Scheme source files have changed.
  10087. *** The variable %load-path now tells Guile which directories to search
  10088. for Scheme code. Its value is a list of strings, each of which names
  10089. a directory.
  10090. *** The variable %load-extensions now tells Guile which extensions to
  10091. try appending to a filename when searching the load path. Its value
  10092. is a list of strings. Its default value is ("" ".scm").
  10093. *** (%search-load-path FILENAME) searches the directories listed in the
  10094. value of the %load-path variable for a Scheme file named FILENAME,
  10095. with all the extensions listed in %load-extensions. If it finds a
  10096. match, then it returns its full filename. If FILENAME is absolute, it
  10097. returns it unchanged. Otherwise, it returns #f.
  10098. %search-load-path will not return matches that refer to directories.
  10099. *** (primitive-load FILENAME :optional CASE-INSENSITIVE-P SHARP)
  10100. uses %seach-load-path to find a file named FILENAME, and loads it if
  10101. it finds it. If it can't read FILENAME for any reason, it throws an
  10102. error.
  10103. The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
  10104. `read' function.
  10105. *** load uses the same searching semantics as primitive-load.
  10106. *** The functions %try-load, try-load-with-path, %load, load-with-path,
  10107. basic-try-load-with-path, basic-load-with-path, try-load-module-with-
  10108. path, and load-module-with-path have been deleted. The functions
  10109. above should serve their purposes.
  10110. *** If the value of the variable %load-hook is a procedure,
  10111. `primitive-load' applies its value to the name of the file being
  10112. loaded (without the load path directory name prepended). If its value
  10113. is #f, it is ignored. Otherwise, an error occurs.
  10114. This is mostly useful for printing load notification messages.
  10115. ** The function `eval!' is no longer accessible from the scheme level.
  10116. We can't allow operations which introduce glocs into the scheme level,
  10117. because Guile's type system can't handle these as data. Use `eval' or
  10118. `read-and-eval!' (see below) as replacement.
  10119. ** The new function read-and-eval! reads an expression from PORT,
  10120. evaluates it, and returns the result. This is more efficient than
  10121. simply calling `read' and `eval', since it is not necessary to make a
  10122. copy of the expression for the evaluator to munge.
  10123. Its optional arguments CASE_INSENSITIVE_P and SHARP are interpreted as
  10124. for the `read' function.
  10125. ** The function `int?' has been removed; its definition was identical
  10126. to that of `integer?'.
  10127. ** The functions `<?', `<?', `<=?', `=?', `>?', and `>=?'. Code should
  10128. use the R4RS names for these functions.
  10129. ** The function object-properties no longer returns the hash handle;
  10130. it simply returns the object's property list.
  10131. ** Many functions have been changed to throw errors, instead of
  10132. returning #f on failure. The point of providing exception handling in
  10133. the language is to simplify the logic of user code, but this is less
  10134. useful if Guile's primitives don't throw exceptions.
  10135. ** The function `fileno' has been renamed from `%fileno'.
  10136. ** The function primitive-mode->fdes returns #t or #f now, not 1 or 0.
  10137. * Changes to Guile's C interface:
  10138. ** The library's initialization procedure has been simplified.
  10139. scm_boot_guile now has the prototype:
  10140. void scm_boot_guile (int ARGC,
  10141. char **ARGV,
  10142. void (*main_func) (),
  10143. void *closure);
  10144. scm_boot_guile calls MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV.
  10145. MAIN_FUNC should do all the work of the program (initializing other
  10146. packages, reading user input, etc.) before returning. When MAIN_FUNC
  10147. returns, call exit (0); this function never returns. If you want some
  10148. other exit value, MAIN_FUNC may call exit itself.
  10149. scm_boot_guile arranges for program-arguments to return the strings
  10150. given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should call
  10151. scm_set_program_arguments with the final list, so Scheme code will
  10152. know which arguments have been processed.
  10153. scm_boot_guile establishes a catch-all catch handler which prints an
  10154. error message and exits the process. This means that Guile exits in a
  10155. coherent way when system errors occur and the user isn't prepared to
  10156. handle it. If the user doesn't like this behavior, they can establish
  10157. their own universal catcher in MAIN_FUNC to shadow this one.
  10158. Why must the caller do all the real work from MAIN_FUNC? The garbage
  10159. collector assumes that all local variables of type SCM will be above
  10160. scm_boot_guile's stack frame on the stack. If you try to manipulate
  10161. SCM values after this function returns, it's the luck of the draw
  10162. whether the GC will be able to find the objects you allocate. So,
  10163. scm_boot_guile function exits, rather than returning, to discourage
  10164. people from making that mistake.
  10165. The IN, OUT, and ERR arguments were removed; there are other
  10166. convenient ways to override these when desired.
  10167. The RESULT argument was deleted; this function should never return.
  10168. The BOOT_CMD argument was deleted; the MAIN_FUNC argument is more
  10169. general.
  10170. ** Guile's header files should no longer conflict with your system's
  10171. header files.
  10172. In order to compile code which #included <libguile.h>, previous
  10173. versions of Guile required you to add a directory containing all the
  10174. Guile header files to your #include path. This was a problem, since
  10175. Guile's header files have names which conflict with many systems'
  10176. header files.
  10177. Now only <libguile.h> need appear in your #include path; you must
  10178. refer to all Guile's other header files as <libguile/mumble.h>.
  10179. Guile's installation procedure puts libguile.h in $(includedir), and
  10180. the rest in $(includedir)/libguile.
  10181. ** Two new C functions, scm_protect_object and scm_unprotect_object,
  10182. have been added to the Guile library.
  10183. scm_protect_object (OBJ) protects OBJ from the garbage collector.
  10184. OBJ will not be freed, even if all other references are dropped,
  10185. until someone does scm_unprotect_object (OBJ). Both functions
  10186. return OBJ.
  10187. Note that calls to scm_protect_object do not nest. You can call
  10188. scm_protect_object any number of times on a given object, and the
  10189. next call to scm_unprotect_object will unprotect it completely.
  10190. Basically, scm_protect_object and scm_unprotect_object just
  10191. maintain a list of references to things. Since the GC knows about
  10192. this list, all objects it mentions stay alive. scm_protect_object
  10193. adds its argument to the list; scm_unprotect_object remove its
  10194. argument from the list.
  10195. ** scm_eval_0str now returns the value of the last expression
  10196. evaluated.
  10197. ** The new function scm_read_0str reads an s-expression from a
  10198. null-terminated string, and returns it.
  10199. ** The new function `scm_stdio_to_port' converts a STDIO file pointer
  10200. to a Scheme port object.
  10201. ** The new function `scm_set_program_arguments' allows C code to set
  10202. the value returned by the Scheme `program-arguments' function.
  10203. Older changes:
  10204. * Guile no longer includes sophisticated Tcl/Tk support.
  10205. The old Tcl/Tk support was unsatisfying to us, because it required the
  10206. user to link against the Tcl library, as well as Tk and Guile. The
  10207. interface was also un-lispy, in that it preserved Tcl/Tk's practice of
  10208. referring to widgets by names, rather than exporting widgets to Scheme
  10209. code as a special datatype.
  10210. In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
  10211. maintainers described some very interesting changes in progress to the
  10212. Tcl/Tk internals, which would facilitate clean interfaces between lone
  10213. Tk and other interpreters --- even for garbage-collected languages
  10214. like Scheme. They expected the new Tk to be publicly available in the
  10215. fall of 1996.
  10216. Since it seems that Guile might soon have a new, cleaner interface to
  10217. lone Tk, and that the old Guile/Tk glue code would probably need to be
  10218. completely rewritten, we (Jim Blandy and Richard Stallman) have
  10219. decided not to support the old code. We'll spend the time instead on
  10220. a good interface to the newer Tk, as soon as it is available.
  10221. Until then, gtcltk-lib provides trivial, low-maintenance functionality.
  10222. Copyright information:
  10223. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
  10224. Permission is granted to anyone to make or distribute verbatim copies
  10225. of this document as received, in any medium, provided that the
  10226. copyright notice and this permission notice are preserved,
  10227. thus giving the recipient permission to redistribute in turn.
  10228. Permission is granted to distribute modified versions
  10229. of this document, or of portions of it,
  10230. under the above conditions, provided also that they
  10231. carry prominent notices stating who last changed them.
  10232. Local variables:
  10233. mode: outline
  10234. paragraph-separate: "[ ]*$"
  10235. end: