NEWS 536 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333
  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. ** Hashing of UTF-8 symbols with non-ASCII characters avoids corruption
  26. (<https://bugs.gnu.org/56413>)
  27. This issue could cause `scm_from_utf8_symbol' and
  28. `scm_from_utf8_symboln` to incorrectly conclude that the symbol hadn't
  29. already been interned, and then create a new one, which of course
  30. wouldn't be `eq?' to the other(s). The incorrect hash was the result of
  31. a buffer overrun, and so might vary. This problem affected a number of
  32. other operations, given the internal use of those functions.
  33. Changes in 3.0.9 (since 3.0.8)
  34. * Notable changes
  35. * New interfaces and functionality
  36. ** New `spawn' procedure to spawn child processes
  37. The new `spawn' procedure creates a child processes executing the given
  38. program. It lets you control the environment variables of that process
  39. and redirect its standard input, standard output, and standard error
  40. streams.
  41. Being implemented in terms of `posix_spawn', it is more portable, more
  42. robust, and more efficient than the combination of `primitive-fork' and
  43. `execl'. See "Processes" in the manual for details, and see the 2019
  44. paper entitled "A fork() in the road" (Andrew Baumann et al.) for
  45. background information.
  46. `system*', as well as the `open-pipe' and `pipeline' procedures of
  47. (ice-9 popen) are now implemented in terms of `posix_spawn' as well,
  48. which fixes bugs such as redirects: <https://bugs.gnu.org/52835>.
  49. ** `open-file' now supports an "e" flag for O_CLOEXEC
  50. Until now, the high-level `open-file' facility did not provide a way to
  51. pass O_CLOEXEC to the underlying `open' call. It can now be done by
  52. appending "e" to the `mode' string passed as a second argument. See
  53. "File Ports" in the manual for more info.
  54. ** `pipe' now takes flags as an optional argument
  55. This lets you pass flags such as O_CLOEXEC and O_NONBLOCK, as with the
  56. pipe2(2) system call found on GNU/Linux and GNU/Hurd, instead of having
  57. to call `fnctl' afterwards. See "Ports and File Descriptors" in the
  58. manual for details.
  59. ** Bindings to `openat' and friends
  60. The procedures `openat', `open-fdes-at', `statat', `chownat',
  61. `unlinkat', `chmodat', `renameat', `mkdirat' and `symlinkat' have been
  62. added. They resolve file names relative to a directory passed as a file
  63. port. The procedures `chdir' `readlink' and `utime' have been extended
  64. to support file ports. The related flags `AT_REMOVEDIR' and
  65. `AT_EACCESS' have been added. See `File System' in the manual
  66. ** Abstract Unix-domain sockets are supported
  67. It is now possible to create an AF_UNIX socket with a leading zero byte
  68. in its file name to create an abstract Unix-domain socket. See
  69. "man 7 unix" for information on abstract Unix-domain sockets.
  70. ** New socket-related constants defined
  71. The `IN6ADDR_ANY' and `IN6ADDR_LOOPBACK' are now defined on systems with
  72. IPv6 support; they can be used with `bind'.
  73. Likewise, the `IPPROTO_IPV6' and `IPV6_V6ONLY' constants are defined,
  74. for use with `setsockopt'.
  75. ** New `bytevector-slice' procedure
  76. As an extension to the R6RS interface, the new (rnrs bytevectors gnu)
  77. module defines `bytevector-slice', which returns a bytevector that
  78. aliases part of an existing bytevector. See "Bytevector Slices" in the
  79. manual.
  80. ** Disassembler now shows intrinsic names
  81. Disassembler output now includes the name of intrinsics next to each
  82. `call-' instruction (info "(guile) Intrinsic Call Instructions").
  83. ** Linker and assembler consume less memory
  84. Previously, the entire output ELF file contents would be stored in
  85. memory when compiling as with `guild compile'. This is no longer the
  86. case.
  87. * Bug fixes
  88. ** JIT compilation is now supported on Apple M1 processors
  89. (https://bugs.gnu.org/44505)
  90. ** Type sizes are correctly determined when cross-compiling
  91. (https://bugs.gnu.org/54198)
  92. ** psyntax honors source properties coming from read hash extensions
  93. (https://bugs.gnu.org/54003)
  94. ** ./configure checks whether the linker supports '-flto' (needed on macOS)
  95. ** libguile/srfi-14.i.c is now longer shipped and is instead built from source
  96. (https://bugs.gnu.org/54111)
  97. ** Cross-compilation supports triplets with empty vendor strings
  98. (https://bugs.gnu.org/54915)
  99. ** It is possible to use a 'library-form' inside 'cond-expand' in R7RS libraries
  100. (https://bugs.gnu.org/55934)
  101. ** 'coverage-data->lcov' accepts a #:modules argument as documented
  102. (https://bugs.gnu.org/54911)
  103. ** 'connect' returns #f upon EAGAIN, not just EINPROGRESS
  104. ** (web http) capitalizes the "Basic" authorization header
  105. ** (web http) terminates chunked encoding with an extra \r\n
  106. ** (web client) retries TLS handshake upon non-fatal errors
  107. (https://bugs.gnu.org/49223)
  108. ** 'primitive-load' opens files as O_CLOEXEC
  109. (https://bugs.gnu.org/57567)
  110. ** Baseline compiler no longer crashes on (not (list 1 2))
  111. (https://bugs.gnu.org/58217)
  112. ** Fix documentation of ‘mkdir’
  113. Previously, the documentation implied the umask was ignored if the
  114. mode was set explicitly. However, this is not the case.
  115. ** 'system*' honors output/error port redirects
  116. (https://bugs.gnu.org/52835)
  117. ** 'open-input-pipe' & co. are now much faster
  118. (https://bugs.gnu.org/59321)
  119. ** Fix crash with out-of-bound indexes with `string-ref' and `fluid-ref*'
  120. (https://bugs.gnu.org/60488, https://bugs.gnu.org/58154)
  121. ** Fix infinite loop when compiling (make-vector)
  122. (https://bugs.gnu.org/60522)
  123. Changes in 3.0.8 (since 3.0.7)
  124. * Notable changes
  125. ** Cross-module inlining
  126. Although historically Guile has treated modules as glorified hash
  127. tables, most modules are actually _declarative_ -- they just define
  128. functions and variables and provide them for other modules to use, and
  129. don't manipulate modules as first-class objects. See "Declarative
  130. Modules" in the manual, for more discussion.
  131. Since version 3.0.0, Guile has taken advantage of declarative semantics
  132. to allow a top-level definition to be inlined within its uses in the
  133. same compilation unit, provided the binding is never assigned and
  134. defined exactly once. Guile 3.0.8 extends this to allow some
  135. exported declarative definitions to be inlined into other modules.
  136. This facility is mostly transparent to the user and is enabled at the
  137. default -O2 optimization level. "Small" definitions are available for
  138. cross-module inlining (-Oinlinable-exports, included at -O2). The
  139. actual inlining decision is performed by Guile's partial evaluation pass
  140. (the -Ocross-module-inlining modifier to -Opeval, included at -O2 also),
  141. subject to effort and size growth counters.
  142. Note however that as with macros, when a definition changes in module A,
  143. a separately compiled module B that uses that definition doesn't
  144. automatically get recompiled. This is a limitation in Guile that we
  145. would like to fix.
  146. As another limitation, cross-module inlining is only available for
  147. imports from modules which have already been compiled at -O2 (or
  148. otherwise with -Oinlinable-exports).
  149. When determining whether to enable this facility by default, we weighed
  150. the usability problems of stale inlined bindings against the benefit of
  151. allowing module boundaries to no longer be optimization boundaries, we
  152. ended up on the "let's do it!" side of the equation. However we welcome
  153. feedback from users as to what should be the default behavior, until
  154. such a time as we have a proper notion of when a compiled file is stale
  155. or not.
  156. ** Avoid the need for a custom GMP allocator
  157. In Guile 3.0.6, we fixed a longstanding bug in Guile's use of the
  158. library that Guile uses to implement bignums (large integers), GMP
  159. (https://gmplib.org). See the Guile 3.0.6 release notes. However this
  160. left us with a suboptimal Guile, in which each large integer had to have
  161. a finalizer to free the memory allocated by GMP. Finalizers take time
  162. and space, and so they limit allocation rate, causing bignum performance
  163. to drop. Though you could set an environment variable to go back to the
  164. older, faster behavior, it wasn't the default.
  165. In Guile 3.0.8 we fix this problem comprehensively by avoiding embedding
  166. GMP's mpz_t values in Guile bignums. Instead we embed the bignum digits
  167. directly, avoiding the need for finalizers or custom allocators. This
  168. removes the need for the GUILE_INSTALL_GMP_MEMORY_FUNCTIONS environment
  169. variable mentioned in the Guile 3.0.6 release notes. We also deprecate
  170. the scm_install_gmp_memory_functions variable.
  171. * New interfaces and functionality
  172. ** Typed vector copy functions in (srfi srfi-4 gnu)
  173. The functions `u8vector-copy' `s8vector-copy' `u16vector-copy'
  174. `s16vector-copy' `u32vector-copy' `s32vector-copy' `u64vector-copy'
  175. `s64vector-copy' `f32vector-copy' `f64vector-copy' `c32vector-copy'
  176. `c64vector-copy' `u8vector-copy!' `s8vector-copy!' `u16vector-copy!'
  177. `s16vector-copy!' `u32vector-copy!' `s32vector-copy!'
  178. `u64vector-copy!' `s64vector-copy!' `f32vector-copy!'
  179. `f64vector-copy!' `c32vector-copy!' `c64vector-copy!' have been
  180. added. See SRFI-4 - Guile extensions" in the manual.
  181. ** New function srfi-4-vector-type-size in (srfi srfi-4 gnu)
  182. See SRFI-4 - Guile extensions" in the manual.
  183. ** `bytevector-fill!' supports partial fill through optional arguments
  184. This is an extension to the r6rs procedure. See "Manipulating
  185. Bytevectors" in the manual.
  186. ** `vector-copy!' and `vector-copy' from (rnrs base) included in core
  187. Compared to the previous versions, these accept range arguments. See
  188. "Accessing and Modifying Vector Contents" in the manual.
  189. ** New function bitvector-copy
  190. See "Bit vectors" in the manual.
  191. ** (system foreign) supports C99 complex types
  192. The types `complex-float' and `complex-double' stand for C99 `float
  193. _Complex' and `double _Complex` respectively.
  194. * Other new optimizations
  195. ** Better optimization of "let" in right-hand-side of "letrec"
  196. ** Allow constant-folding for calls to "expt"
  197. Thanks to Maxime Devos.
  198. ** Add ,optimize-cps REPL meta-command
  199. This meta-command is like ,optimize, but at a lower level.
  200. ** Improve alias analysis in common subexpression elimination
  201. ** Avoid argument-count checks for well-typed calls to known procedures
  202. This speeds up calls to lexically bound procedures.
  203. ** Avoid return-value-count checks for calls to known-return-arity procedures
  204. This new optimization, enabled at -O2, speeds up returns from calls to
  205. lexically bound procedures.
  206. * Build system changes
  207. ** Update Gnulib (bugs.gnu.org/49930)
  208. Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6.
  209. ** Compile libguile with -flto if available
  210. By default, if the compiler supports link-time optimization via the
  211. -flto flag, Guile will add it to CFLAGS. This results in a libguile
  212. that is approximately 15% smaller. Pass --disable-lto to configure to
  213. inhibit this behavior.
  214. ** Trim set of prebuilt .go files shipped in the tarball
  215. Guile includes built Scheme files in its tarball to speed up the build,
  216. for casual builders that are less concerned with reproducibility.
  217. However they took a lot of space and we have now trimmed these down to a
  218. more minimal set. As always, you can remove them and build entirely
  219. from source via a `make -C prebuilt clean`.
  220. * New deprecations
  221. ** Vector functions require vector arguments
  222. Passing arrays that are not vectors (arrays for which `(vector? array)'
  223. returns false) to functions `vector-move-left!', `vector-move-right!',
  224. `vector->list', and `vector-copy' is deprecated. Use `array-copy!',
  225. `array-copy', and `array->list' for such arguments.
  226. ** `scm_from_contiguous_typed_array' is deprecated
  227. This function was added during the Guile 2.x series and was not
  228. documented and is no longer used in Guile itself.
  229. ** Deprecate the "simple vector" concept, `scm_is_simple_vector'
  230. This concept meant to indicate "vectors which aren't array slices". Use
  231. scm_is_vector.
  232. ** Deprecate internal contiguous array flag
  233. We still reserve space for the flag to preserve ABI but it has no
  234. effect. As such we also remove the internal SCM_I_ARRAY_CONTIGUOUS,
  235. SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG,
  236. SCM_I_ARRAY_CONTP preprocessor interfaces, as they were internal and
  237. there is no longer a sensible way of using them.
  238. ** Deprecate symbol properties
  239. Symbols used to have a "function slot" and a "property slot", inherited
  240. from Emacs Lisp and early Lisps, which one would access with
  241. 'symbol-pref', 'symbol-fref', 'symbol-pset!', and 'symbol-fset!'. These
  242. procedures have been discouraged in favor of object properties; they are
  243. now deprecated. This saves a few words of memory per symbol.
  244. * Bug fixes
  245. ** Fix compilation of (ash x N), where N is a literal, at -O1 and below
  246. ** Texinfo and XML parsers are now thread-safe (bugs.gnu.org/51264)
  247. ** Fix `filename-completion-function' in (ice-9 readline)
  248. ** Fix trace-calls-to-procedure (bugs.gnu.org/43102, bugs.gnu.org/48412)
  249. ** Fix bug in nftw function (bugs.gnu.org/44182)
  250. ** Fix optimization bug in CSE in eq-constant? if both branches same
  251. ** Fix readline initialization with invalid keymaps
  252. ** Fix crash when reading #nil (bugs.gnu.org/49305)
  253. ** Fix read error when reading #{}}#.
  254. ** Fix Darwin host detection in foreign-library facility.
  255. ** Fix unification of (x ...) patterns in `match'
  256. ** Fix scaling floats with leading zeroes in `format'
  257. ** Improve support for r7rs-style `(srfi N)' and r6rs-style `(srfi :N)
  258. module names (bugs.gnu.org/39601, bugs.gnu.org/40371)
  259. ** Add support for the ARC architecture (bugs.gnu.org/48816)
  260. ** Build fix for const strerror result (bugs.gnu.org/43987)
  261. ** Fix typos in SRFI documentation (bugs.gnu.org/50127)
  262. ** Fix bounds check in `recvfrom!' (bugs.gnu.org/45595)
  263. ** Add support for riscv32
  264. ** Limit `ash' to left-shift by 2^32 bits (bugs.gnu.org/48150)
  265. ** Fix type confusion in heap-numbers-equal? calls from VM
  266. Hearty thanks to Jakub Wojciech, Robin Green, Daniel Llorens, Matija
  267. Obid, RhodiumToad, Rob Browning, Maxime Devos, Aleix Conchillo Flaqué,
  268. Timothy Sample, d4ryus, Fabrice Fontaine, Taylan Kammer, Vineet Gupta,
  269. Philipp Klaus Krause, Arun Isaac, and Alex Shinn.
  270. Changes in 3.0.7 (since 3.0.6)
  271. * New interfaces and functionality
  272. ** More O_* POSIX constants are now defined in Scheme
  273. Guile now defines constants such as `O_NOFOLLOW', `O_CLOEXEC',
  274. `O_TMPFILE', and more on platforms that support them. These may be
  275. passed as arguments to procedures such as `open' and `open-fdes'.
  276. * Bug fixes
  277. ** Fix bugs introduced in 3.0.6 with Scheme `read` re-write
  278. ** Fix deadlock after `primitive-fork' (#41948)
  279. ** Fix duplicates handlers for interfaces that use interfaces (#43025)
  280. ** Fix compile-psyntax.scm for (language tree-il canonicalize) removal
  281. ** Fix prompt compilation bug (#48098)
  282. ** Fix R7RS include-library-declarations, cond-expand (#40252)
  283. ** Fix --enable-mini-gmp on FreeBSD and other targets
  284. ** Fix excessive compile times for vectors >16k elements long
  285. ** Fix use of literal tree-il as source language (#45131)
  286. ** Fix SRFI-64 test-end to not remove globally-installed test runner
  287. Changes in 3.0.6 (since 3.0.5)
  288. * Notable changes
  289. ** Reimplement dynamic library loading ("dlopening") without libltdl
  290. Guile used to load dynamic libraries with libltdl, a library provided by
  291. the Libtool project.
  292. Libltdl provided some compatibility benefits when loading shared
  293. libraries made with older toolchains on older operating systems.
  294. However, no system from the last 10 years or so appears to need such a
  295. thick compatibility layer.
  296. Besides being an unmaintained dependency of limited utility, libltdl
  297. also has the negative aspect that in its search for libraries to load,
  298. it could swallow useful errors for libraries that are found but not
  299. loadable, instead showing just errors for search path candidates that
  300. are not found.
  301. Guile now implements dynamic library loading directly in terms of the
  302. standard "dlopen" interface, providing a limited shim for platforms with
  303. similar functionality exposed under different names (MinGW).
  304. This change has a few practical impacts to Guile users. There is a new
  305. library search path variable, `GUILE_EXTENSIONS_PATH'. Also, errors when
  306. loading a library fails now have better errors. And Guile no longer has
  307. a libltdl dependency.
  308. Although Guile no longer uses libltdl, for backwards compatibility Guile
  309. still adds `LTDL_LIBRARY_PATH' to the loadable library search path, and
  310. includes ad-hoc logic to support uninstalled dynamically loadable
  311. libraries via also adding the ".libs" subdirectories of
  312. `LTDL_LIBRARY_PATH' elements. See "Foreign Libraries" in the
  313. documentation for a full discussion.
  314. ** Fix important incompatibility with GnuTLS
  315. Guile uses the GNU multi-precision (GMP) library to implement
  316. arbitrary-precision integers (bignums) and fractions. Usually Guile is
  317. built to dynamically link to libgmp. In this configuration, any other
  318. user of GMP in the process uses the same libgmp instance, with the same
  319. shared state.
  320. An important piece of shared state is the GMP allocator, responsible for
  321. allocating storage for the digits of large integers. For Guile it's
  322. most efficient to install libgc as the GMP allocator. That way Guile
  323. doesn't need to install finalizers, which have significant overhead, to
  324. free GMP values when Guile bignums are collected. Using libgc to
  325. allocate digits also allows Guile's GC to adequately measure the memory
  326. cost of these values.
  327. However, if the Guile process is linked to some other user of GMP, then
  328. probably the references from the other library to GMP values aren't
  329. visible to the garbage collector. In this case libgc could prematurely
  330. collect values from that other GMP user.
  331. This isn't theoretical, sadly: it happens for Guile-GnuTLS. GnuTLS uses
  332. GMP, and so does Guile. Since Guile 2.0.4, Guile has installed libgc as
  333. the GMP allocator, so since then, Guile-GnuTLS has been buggy.
  334. Therefore, the default is now to not install libgc as the GMP allocator.
  335. This may slow down some uses of bignums. If you know that your Guile
  336. program will never use a library that uses GMP, you can set the
  337. GUILE_INSTALL_GMP_MEMORY_FUNCTIONS=1 in your environment. Guile sets
  338. this environment variable when building Guile, for example. See
  339. "Environment Variables" in the manual, for more.
  340. In some future, Guile may switch to GMP's more low-level "MPN" API for
  341. working with bignums, which would allow us to regain the ability to use
  342. GC-managed digit storage in all configurations.
  343. ** New build option: --enable-mini-gmp
  344. For some users, it would be preferable to bundle a private copy of the
  345. GMP bignum library into Guile. Some users would like to avoid the extra
  346. dependency. Others would like to use libgc to manage GMP values, while
  347. not perturbing the GMP allocator for other GMP users.
  348. For these cases, Guile now has an --enable-mini-gmp configure option,
  349. which will use a stripped-down version of GMP, bundled with Guile. This
  350. code doesn't have all the algorithmic optimizations of full GMP, but
  351. implements the same API in a basic way. It can be more optimal in a
  352. Guile context, given that it can use libgc to allocate its data.
  353. Note that a build with --enable-mini-gmp is not ABI-compatible with a
  354. "stock" build, as functions that use GMP types (scm_to_mpz,
  355. scm_from_mpz) are not exported.
  356. Thanks to Niels Möller and other GMP developers for their mini-gmp
  357. implementation!
  358. ** New `read' implementation in Scheme
  359. Guile's `read' procedure has been rewritten in Scheme. Compared to the
  360. C reader (which still exists for bootstrapping reasons), the new
  361. implementation is more maintainable, more secure, more debuggable, all
  362. while faithfully reproducing all quirks from Guile's previous reader
  363. implemented in C. Also, the Scheme reader is finally compatible with
  364. suspendable ports, allowing REPL implementations to be built with
  365. lightweight concurrency packages such as the third-party "Fibers"
  366. library. Calls to `read' from Scheme as well as calls to `scm_read'
  367. from C use the new reader.
  368. The Scheme implementation is currently about 60% as fast as the
  369. now-inaccessible C implementation, and we hope to close the gap over
  370. time. Bug reports very welcome.
  371. ** Scheme compiler uses `read-syntax' for better debugging
  372. The new Scheme reader also shares implementation with the new
  373. `read-syntax' procedure, which annotates each datum with source location
  374. information. Guile's compiler can use this to provide better
  375. source-level debugging for Scheme programs. Note that this can slightly
  376. increase compiled file sizes, though this is mitigated by some assembler
  377. optimizations.
  378. ** Syntax objects record source locations
  379. When compiling a file that defines a macro, the output will usually
  380. include a number of syntax objects as literals. Previously, these
  381. literals had no source information; now they do. This should improve
  382. debugging.
  383. ** Optimized run-time relocations
  384. The code that patches references between statically-allocated Scheme
  385. data has been optimized to be about 30% shorter than before or so, which
  386. can significantly decrease compiled file size and run-time
  387. initialization latency.
  388. ** Optimized calls to known functions
  389. For calls where the callee is within the compilation unit, Guile can now
  390. skip the argument count check.
  391. ** Reduce code size for calls to module variables
  392. All calls to a given exported or private variable from a module now
  393. dispatch through the same trampoline function. This reduces code size.
  394. ** Updated Gnulib
  395. The Gnulib compatibility library has been updated, for the first time
  396. since 2017 or so. We expect no functional change but look forward to
  397. any bug reports.
  398. * New interfaces and functionality
  399. ** `call-with-port'
  400. See "Ports" in the manual.
  401. ** `call-with-input-bytevector', `call-with-output-bytevector'
  402. See "Bytevector Ports" in the manual.
  403. ** `GUILE_EXTENSIONS_PATH' environment variable.
  404. See "Environment Variables" in the manual.
  405. ** `mkdtemp' and `mkstemp'
  406. See "File System" in the manual. There is still `mkstemp!' but we
  407. recommend that new code uses `mkstemp', which does not mutate the
  408. contents of the "template" argument string. Instead for `mkstemp' you
  409. get the name of the newly-created file by calling `port-filename' on the
  410. returned port.
  411. ** `(system foreign-library)' module
  412. See the newly reorganized "Foreign Function Interface", for details.
  413. These new interfaces replace `dynamic-link', `dynamic-pointer' and
  414. similar, which will eventually be deprecated.
  415. ** `read-syntax'
  416. See "Annotated Scheme Read" in the manual.
  417. ** `quote-syntax'
  418. See "Syntax Case" in the manual.
  419. ** `syntax-sourcev'
  420. See "Syntax Transformer Helpers" in the manual.
  421. * Optimizations
  422. ** eof-object?
  423. ** R6RS vector-map, vector-for-each
  424. * Bug fixes
  425. ** Fix reverse-list->string docstring
  426. ** Fix R7RS "member" result when no item found
  427. ** Fix make-transcoded-port on input+output ports
  428. ** Fix (ice-9 ftw) on filesystems where inode values are meaningless
  429. ** Fix many bugs that prevented Guile from building on MinGW
  430. ** Fix many bugs that prevented Guile from building on MinGW64
  431. ** Fix many bugs that prevented Guile's test suite from running on MinGW
  432. ** Fix srfi-69 merge-hash
  433. ** Fix suspendable-ports implementation of get-bytevector-some!
  434. ** Fix overread in string-locale<?, string-locale-ci<?, and friends
  435. ** Fix handling of parameter lists to elisp defun to allow nil
  436. ** Fix closure-conversion bug for SCC with no free vars and one not-well-known function
  437. ** Fix error when < passed non-real value
  438. ** Fix bug in which exported and private names in a used module could alias each other
  439. ** Fix bug with slot options in redefinable GOOPS classes
  440. ** Fix bugs regarding port buffering for TLS connections in web client
  441. Thanks to Vasilij Schneidermann, Andrey Ivanov, Rob Browning, Erik
  442. Dominikus, Göran Weinholt, Michael Gran, Andrew Whatson, Ricardo
  443. G. Herdt, Jan Nieuwenhuizen, David Thompson, and abcdw.
  444. * New deprecations
  445. ** `dynamic-unlink'
  446. This function now has no effect; Guile will not unload dynamically
  447. linked modules, as that can destabilize the system.
  448. * Incompatible changes
  449. ** `call-with-output-string' closes port on normal exit
  450. This procedure used to leave the port open, even though there was no
  451. useful way to access it. Now we clean it up more promptly, disposing
  452. any possible associated iconv descriptor.
  453. Changes in 3.0.5 (since 3.0.4)
  454. * New interfaces and functionality
  455. ** O(1) compilation of `case' and related expressions
  456. Guile now optimizes chains of eq? comparisons to constants, resulting in
  457. O(1) dispatch time, regardless of the length of the chain. This
  458. optimization is also unlocked in many cases for `match' expressions with
  459. many similar clauses whose first differentiator are constants.
  460. ** New (ice-9 copy-tree) module
  461. This module includes the `copy-tree' procedure that was previously
  462. implemented in C and present in the default `(guile)' module. See
  463. "Copying" in the manual.
  464. ** New warning: use-before-definition
  465. This analysis, enabled at `-W1', issues warnings for programs that use
  466. top-level variables before they are defined.
  467. ** New warning: non-idempotent-definition
  468. This analysis, enabled at `-W1', issues warnings for programs that whose
  469. use of a variable is ambiguous. For example, in the program:
  470. (define saved-add +)
  471. (define + error)
  472. The intention would seem to be to "save" the value of the base `+'
  473. procedure, then override it locally. However if this program is ever
  474. loaded twice, then the second time it is loaded, `+' will be taken from
  475. the local binding instead of the import. Users that want this kind of
  476. behavior should either use lexical bindings instead of top-level
  477. bindings, or otherwise rename important clobbered bindings via modules.
  478. * New deprecations
  479. ** `copy-tree' in the default environment, and `scm_copy_tree' from C
  480. Import the `(ice-9 copy-tree)' module instead.
  481. ** `unbound-variable-analysis`, `macro-use-before-definition-analysis`
  482. These bindings from `(language tree-il analyze)' are replaced by the
  483. use-before-definition analysis, which powers a number of warnings. Use
  484. `make-use-before-definition-analysis', but note that these interfaces
  485. are quite intimate parts of the compiler!
  486. * Incompatible changes
  487. ** `copy' read-option removed
  488. This read option would include a copy of the source expression in the
  489. source-properties of each subexpression. This option has always been
  490. off by default and lost most of its use value with the switch to a
  491. compiler in Guile 2.0.
  492. Changes in 3.0.4 (since 3.0.3)
  493. This release fixes the SONAME of libguile-3.0.so, which was erroneously
  494. bumped in 3.0.3 compared to 3.0.2. Distributions are strongly
  495. encouraged to use 3.0.4 instead of 3.0.3.
  496. Thanks to Chris Vine for reporting the issue.
  497. Changes in 3.0.3 (since 3.0.2)
  498. * New interfaces and functionality
  499. ** New baseline compiler
  500. Guile's CPS-based compiler generates good code, but it takes time and
  501. memory to do so. For users that prioritize speed of compilation over
  502. speed of generated code, Guile now has a new baseline compiler that goes
  503. directly from the high-level Tree-IL to bytecode, skipping CPS and all
  504. of its optimizations. This compiler is used for `guild compile -O0',
  505. and generally runs around ten times as fast as the CPS compiler.
  506. *** New VM intrinsics to support baseline compiler
  507. See "Intrinsic Call Instructions" in the manual.
  508. *** Compiler support for warning and lowering passes
  509. *** Compiler support for choosing different compilation orders
  510. See "Compiler Tower" in the manual. The new per-language "compiler
  511. chooser" facility can choose different compilers based on optimization
  512. level.
  513. *** Better support for specifying optimization and warning levels
  514. The procedural compilation interfaces (`compile', `compile-file', and so
  515. on) now have #:optimization-level and #:warning-level keyword arguments,
  516. which default to corresponding `default-optimization-level' and
  517. `default-warning-level' parameters. You can still specify warning and
  518. optimization passes manually, but we think most users will find the
  519. higher-level interfaces more robust to use.
  520. ** Faster Guile build from source
  521. Guile now uses the baseline compiler for its bootstrap, when building
  522. the first Scheme compiler. Because the baseline compiler runs faster
  523. and includes less code than the CPS compiler, Guile takes less time to
  524. build.
  525. ** New 'pipeline' procedure in (ice-9 popen)
  526. The 'pipeline' procedure provides a simple way to spawn command pipeline
  527. as one would do in a shell.
  528. ** Refreshed bitvector facility
  529. See "Bit Vectors" in the manual, for more on all of these.
  530. *** New bitvector-count, bitvector-count-bits, bitvector-position
  531. procedures
  532. These replace the wonky "bit-count", "bit-count*", and "bit-position"
  533. procedures.
  534. *** New bitvector-bit-set?, bitvector-bit-clear? procedures
  535. These replace bitvector-ref. The reason to migrate is that it's an
  536. opportunity be more efficient in 3.0 (because the new procedures only
  537. work on true bitvectors, and not generic bit arrays), easier to read (no
  538. need for 'not' when checking for false bits), and more consistent with
  539. other bitvector procedures.
  540. *** New bitvector-set-bit!, bitvector-clear-bit! procedures
  541. These replace bitvector-set!, for similar reasons as the bitvector-ref
  542. replacement above.
  543. *** New bitvector-set-all-bits!, bitvector-clear-all-bits! procedures
  544. These replace bitvector-fill!.
  545. *** New bitvector-flip-all-bits! procedure
  546. This replaces bit-invert!.
  547. *** New bitvector-set-bits!, bitvector-clear-bits! procedures
  548. These replace the wonky "bit-set*!" procedure.
  549. * Bug fixes
  550. ** statprof reports the names of primitives
  551. Previously statprof would show strings like "anon #x1234" for primitives
  552. written in C.
  553. ** Compiler reduces 'equal?' when passed a character literal
  554. The compiler now properly reduces expressions such as (equal? c #\x) to
  555. (eq? c #\x). This was not the case in 3.0.2, which could lead to slower
  556. code, especially in 'match' expressions with many clauses with with
  557. character literals.
  558. ** JIT bugs on ARMv7 have been fixed
  559. (<https://bugs.gnu.org/40737>,
  560. <https://gitlab.com/wingo/lightening/-/issues/12>)
  561. ** 'http-get', 'http-post', etc. now honor #:verify-certificates?
  562. (<https://bugs.gnu.org/40486>)
  563. ** web: Accept URI host names consisting only of hex digits
  564. (<https://bugs.gnu.org/40582>)
  565. ** (web http) parser recognizes the CONNECT and PATCH methods
  566. ** Initial revealed count of file ports is now zero
  567. (<https://bugs.gnu.org/41204>)
  568. * New deprecations
  569. ** Old bitvector interfaces deprecated
  570. See "Bit Vectors" in the manual, for details on all of these
  571. replacements.
  572. *** bit-count, bit-position
  573. Use bitvector-count or bitvector-position instead.
  574. *** bitvector-ref
  575. Use 'bitvector-bit-set?' or 'bitvector-bit-clear?' instead.
  576. *** bitvector-set!
  577. Use 'bitvector-set-bit!' or 'bitvector-clear-bit!' instead.
  578. *** bitvector-fill!
  579. Use 'bitvector-set-all-bits!' or 'bitvector-clear-all-bits!' instead.
  580. *** bit-invert!
  581. Use 'bitvector-flip-all-bits! instead.
  582. *** bit-set*!
  583. Use 'bitvector-set-bits!' or 'bitvector-clear-bits!' instead.
  584. *** bit-count*
  585. Use 'bitvector-count-bits' instead, subtracting from 'bitvector-count'
  586. on the mask bitvector if you are counting unset bits.
  587. *** Accessing generic arrays using the bitvector procedures
  588. For the same efficiency reasons that use of 'vector-ref' on generic
  589. arrays was deprecated in Guile 2.0.10, using 'bitvector->list' and
  590. similar procedures on 1-dimensional boolean-typed arrays is now
  591. deprecated. Use 'array-ref' and similar procedures on arrays.
  592. *** scm_istr2bve
  593. This C-only procedure to parse a bitvector from a string should be
  594. replaced by calling `read' on a string port instead, if needed.
  595. Changes in 3.0.2 (since 3.0.1)
  596. * New interfaces and functionality
  597. ** New (srfi srfi-171) module
  598. This module implements "tranducers" as specified in
  599. <https://srfi.schemers.org/srfi-171/srfi-171.html>.
  600. Thanks to Linus Björnstam for this new API!
  601. ** SRFI-14 character data set upgraded to Unicode 13.0.0
  602. * Bug fixes
  603. ** Fix heap corruption when allocating structs
  604. (<https://bugs.gnu.org/39266>)
  605. This bug would cause random crashes; users are invited to upgrade.
  606. Thanks to rr (<https://rr-project.org/>) for being instrumental in
  607. finding this bug!
  608. ** Fix race condition between 'abort-to-prompt' and stack marking
  609. (<https://bugs.gnu.org/28211>)
  610. This bug could occasionally cause crashes in multi-threaded Guile
  611. programs using delimited continuations or exceptions.
  612. ** Ensure weak sets are occasionally vacuumed
  613. (<https://bugs.gnu.org/40194>)
  614. Previously, weak sets, which are used internally for interned symbols
  615. and for ports with SCM_PORT_TYPE_NEEDS_CLOSE_ON_GC, could grow seemingly
  616. indefinitely without being vacuumed.
  617. ** Interpret dynamic library name as literal file name first
  618. (<https://bugs.gnu.org/21076>)
  619. Until now, 'dynamic-link' would always append an extension, such as
  620. ".so", to the user-provided file names. Now, 'dynamic-link' first tries
  621. the file name literally, and only then falls back to adding the OS
  622. shared library file name extension.
  623. This allows users to refer to "libsomething.so.1.2.3" instead of
  624. "libsomething.so", the latter being usually provided by "-dev" packages
  625. of GNU/Linux distributions, unlike the former.
  626. ** <libguile.h> includes <libguile/hooks.h> again
  627. This fixes an omission in Guile 3.0.
  628. ** Fix fixpoint computation in compute-significant-bits
  629. (<https://bugs.gnu.org/38486>)
  630. ** Fix compilation '--without-threads'
  631. (<https://bugs.gnu.org/40075>)
  632. * New deprecations
  633. ** 'tmpnam' is now deprecated
  634. The 'tmpnam' function in the C library has been deprecated for years due
  635. to security concerns; the Scheme procedure 'tmpnam' is now deprecated as
  636. well, in favor of 'mkstemp!'. In addition, a new '--disable-tmpnam'
  637. option has been added to 'configure' for users who would like to disable
  638. it right away.
  639. Changes in 3.0.1 (since 3.0.0):
  640. * New interfaces and functionality
  641. ** Export constructor and predicate for '&quit-exception'
  642. The (ice-9 exceptions) module, new in 3.0.0, now exports
  643. 'quit-exception?' and 'make-quit-exception', which is consistent with
  644. other exception types.
  645. ** (texinfo plain-text) now exports '*line-width*' fluid
  646. The new '*line-width*' fluid allows users to specify the width of a line
  647. for the purposes of line wrapping. See "texinfo plain-text" in the
  648. manual.
  649. ** R7RS support recognizes the '.sld' extension
  650. The '.sld' is what the R7RS suggests as a source file name extension.
  651. It is now recognized when running "guile --r7rs", as well as
  652. the '.guile.sld' extension.
  653. * Bug fixes
  654. ** 'hash' correctly handles keywords, ports, hash tables, etc.
  655. (<https://bugs.gnu.org/39634>)
  656. It used to be that the 'hash' procedure would return the same value for
  657. all keyword objects, the same value for all hash tables, the same value
  658. for all input ports, etc.
  659. ** 'include' no longer rejects relative file names
  660. A bug in 3.0.0 would lead 'include' to error out when passed a relative
  661. file name.
  662. ** Reduce GC pressure when using bignums
  663. Guile no longer installs a finalizer on each bignum (large integer) it
  664. creates. This significantly improves speed and memory usage on
  665. applications that make heavy use of bignums, such as the compiler
  666. itself.
  667. ** Fix expansion of 'error' calls with a non-constant argument
  668. (<https://bugs.gnu.org/39509>)
  669. Calls to the 'error' primitive with a non-constant argument, as in
  670. (error message), would be incorrectly expanded by the compiler, leading
  671. to non-printable errors ("Error while printing exception").
  672. ** Improve source location information for top-level references
  673. (<https://bugs.gnu.org/38388>)
  674. Source location information, as is visible upon "unbound variable"
  675. errors, is now more accurate.
  676. ** Web client treats TLS "premature termination" error as EOF
  677. (<https://bugs.gnu.org/39800>)
  678. This allows 'http-request' from (web client) to gracefully handle
  679. servers that terminate connections abruptly after responding to a
  680. "Connection: close" request.
  681. ** Fix bug restoring a JIT continuation from the interpreter
  682. ** Export C symbols 'scm_sym_lambda', 'scm_sym_quote', etc. again
  683. Those C symbols were inadvertently made private in 3.0.0.
  684. ** Fix build on IA64 and on platforms where the stack grows upwards
  685. ** Fix JIT compilation on 64-bit Cygwin
  686. (<https://bugs.gnu.org/39118>)
  687. ** texinfo properly renders @acronym in plain text
  688. (<https://bugs.gnu.org/37846>)
  689. ** Compiler now optimizes (logior 0 INT)
  690. (<https://bugs.gnu.org/39573>)
  691. ** Fix Readline configure check for the sake of libedit
  692. This fixes builds on macOS against the system-provided libedit.
  693. ** Provided 'GUILE_PKG' Autoconf macro now detects Guile 3.0
  694. (<https://bugs.gnu.org/39437>)
  695. Changes in 3.0.0 (since the stable 2.2 series):
  696. * Notable changes
  697. ** Just-in-time code generation
  698. Guile programs now run up to 4 times faster, relative to Guile 2.2,
  699. thanks to just-in-time (JIT) native code generation. Notably, this
  700. brings the performance of "eval" as written in Scheme back to the level
  701. of "eval" written in C, as in the days of Guile 1.8.
  702. See "Just-In-Time Native Code" in the manual, for more information. JIT
  703. compilation will be enabled automatically and transparently. To disable
  704. JIT compilation, configure Guile with `--enable-jit=no' or
  705. `--disable-jit'. The default is `--enable-jit=auto', which enables the
  706. JIT if it is available. See `./configure --help' for more.
  707. JIT compilation is enabled by default on x86-64, i686, ARMv7, and
  708. AArch64 targets.
  709. ** Lower-level bytecode
  710. Relative to the virtual machine in Guile 2.2, Guile's VM instruction set
  711. is now more low-level. This allows it to express more advanced
  712. optimizations, for example type check elision or integer
  713. devirtualization, and makes the task of JIT code generation easier.
  714. Note that this change can mean that for a given function, the
  715. corresponding number of instructions in Guile 3.0 may be higher than
  716. Guile 2.2, which can lead to slowdowns when the function is interpreted.
  717. We hope that JIT compilation more than makes up for this slight
  718. slowdown.
  719. ** Interleaved internal definitions and expressions allowed
  720. It used to be that internal definitions had to precede all expressions
  721. in their bodies. This restriction has been relaxed. If an expression
  722. precedes an internal definition, it is treated as if it were a
  723. definition of an unreferenced variable. For example, the expression
  724. `(foo)' transforms to the equivalent of `(define _ (begin (foo) #f))',
  725. if it precedes other definitions.
  726. This change improves the readability of Guile programs, as it used to be
  727. that program indentation tended to increase needlessly to allow nested
  728. `let' and `letrec' to re-establish definition contexts after initial
  729. expressions, for example for type-checks on procedure arguments.
  730. ** Record unification
  731. Guile used to have a number of implementations of structured data types
  732. in the form of "records": a core facility, SRFI-9 (records), SRFI-35
  733. (condition types -- a form of records) and R6RS records. These
  734. facilities were not compatible, as they all were built in different
  735. ways. This had the unfortunate corollary that SRFI-35 conditions were
  736. not compatible with R6RS conditions. To fix this problem, we have now
  737. added the union of functionality from all of these record types into
  738. core records: single-inheritance subtyping, mutable and immutable
  739. fields, and so on. See "Records" in the manual, for full details.
  740. R6RS records, SRFI-9 records, and the SRFI-35 and R6RS exception types
  741. have been accordingly "rebased" on top of core records.
  742. ** Reimplementation of exceptions
  743. Since Guile's origins 25 years ago, `throw' and `catch' have been the
  744. primary exception-handling primitives. However these primitives have
  745. two problems. One is that it's hard to handle exceptions in a
  746. structured way using `catch'. Few people remember what the
  747. corresponding `key' and `args' are that an exception handler would see
  748. in response to a call to `error', for example. In practice, this
  749. results in more generic catch-all exception handling than one might
  750. like.
  751. The other problem is that `throw', `catch', and especially
  752. `with-throw-handler' are quite unlike what the rest of the Scheme world
  753. uses. R6RS and R7RS, for example, have mostly converged on
  754. SRFI-34-style `with-exception-handler' and `raise' primitives, and
  755. encourage the use of SRFI-35-style structured exception objects to
  756. describe the error. Guile's R6RS layer incorporates an adapter between
  757. `throw'/`catch' and structured exception handling, but it didn't apply
  758. to SRFI-34/SRFI-35, and we would have to duplicate it for R7RS.
  759. In light of these considerations, Guile has now changed to make
  760. `with-exception-handler' and `raise-exception' its primitives for
  761. exception handling and defined a hierarchy of R6RS-style exception types
  762. in its core. SRFI-34/35, R6RS, and the exception-handling components of
  763. SRFI-18 (threads) have been re-implemented in terms of this core
  764. functionality. There is also a a compatibility layer that makes it so
  765. that exceptions originating in `throw' can be handled by
  766. `with-exception-hander', and vice-versa for `raise-exception' and
  767. `catch'.
  768. Generally speaking, users will see no difference. The one significant
  769. difference is that users of SRFI-34 will see more exceptions flowing
  770. through their `with-exception-handler'/`guard' forms, because whereas
  771. before they would only see exceptions thrown by SRFI-34, now they will
  772. see exceptions thrown by R6RS, R7RS, or indeed `throw'.
  773. Guile's situation is transitional. Most exceptions are still signalled
  774. via `throw'. These will probably migrate over time to
  775. `raise-exception', while preserving compatibility of course.
  776. See "Exceptions" in the manual, for full details on the new API.
  777. ** `guard' no longer unwinds the stack for clause tests
  778. SRFI-34, and then R6RS and R7RS, defines a `guard' form that is a
  779. shorthand for `with-exception-handler'. The cond-like clauses for the
  780. exception handling are specified to run with the continuation of the
  781. `guard', while any re-propagation of the exception happens with the
  782. continuation of the original `raise'.
  783. In practice, this means that one needs full `call-with-continuation' to
  784. implement the specified semantics, to be able to unwind the stack to the
  785. cond clauses, then rewind if none match. This is not only quite
  786. expensive, it is also error-prone as one usually doesn't want to rewind
  787. dynamic-wind guards in an exceptional situation. Additionally, as
  788. continuations bind tightly to the current thread, it makes it impossible
  789. to migrate a subcomputation with a different thread if a `guard' is live
  790. on the stack, as is done in Fibers.
  791. Guile now works around these issues by running the test portion of the
  792. guard expressions within the original `raise' continuation, and only
  793. unwinding once a test matches. This is an incompatible semantic change
  794. but we think the situation is globally much better, and we expect that
  795. very few people will be affected by the change.
  796. ** Optimization of top-level bindings within a compilation unit
  797. At optimization level 2 and above, Guile's compiler is now allowed to
  798. inline top-level definitions within a compilation unit. See
  799. "Declarative Modules" in the manual, for full details. This change can
  800. improve the performance of programs with many small top-level
  801. definitions by quite a bit!
  802. At optimization level 3 and above, Guile will assume that any top-level
  803. binding in a declarative compilation unit that isn't exported from a
  804. module can be completely inlined into its uses. (Prior to this change,
  805. -O3 was the same as -O2.) Note that with this new
  806. `seal-private-bindings' pass, private declarative bindings are no longer
  807. available for access from the first-class module reflection API. The
  808. optimizations afforded by this pass can be useful when you need a speed
  809. boost, but having them enabled at optimization level 3 means they are
  810. not on by default, as they change Guile's behavior in ways that users
  811. might not expect.
  812. ** By default, GOOPS classes are not redefinable
  813. It used to be that all GOOPS classes were redefinable, at least in
  814. theory. This facility was supported by an indirection in all "struct"
  815. instances, even though only a subset of structs would need redefinition.
  816. We wanted to remove this indirection, in order to speed up Guile
  817. records, allow immutable Guile records to eventually be described by
  818. classes, and allow for some optimizations in core GOOPS classes that
  819. shouldn't be redefined anyway.
  820. Thus in GOOPS now there are classes that are redefinable and classes
  821. that aren't. By default, classes created with GOOPS are not
  822. redefinable. To make a class redefinable, it should be an instance of
  823. `<redefinable-class>'. See "Redefining a Class" in the manual for more
  824. information.
  825. ** Define top-level bindings for aux syntax: `else', `=>', `...', `_'
  826. These auxiliary syntax definitions are specified to be defined in the
  827. R6RS and the R7RS. They were previously unbound, even in the R6RS
  828. modules. This change is not anticipated to cause any incompatibility
  829. with existing Guile code, and improves things for R6RS and R7RS users.
  830. ** Conventional gettext alias is now `G_'
  831. Related to the last point, since the "Fix literal matching for
  832. module-bound literals" change in the 2.2 series, it was no longer
  833. possible to use the conventional `_' binding as an alias for `gettext',
  834. because a local `_' definition would prevent `_' from being recognized
  835. as auxiliary syntax for `match', `syntax-rules', and similar. The new
  836. recommended conventional alias for `gettext' is `G_'.
  837. ** Add --r6rs command-line option
  838. The new `install-r6rs!' procedure adapts Guile's defaults to be more
  839. R6RS-compatible. This procedure is called if the user passes `--r6rs'
  840. as a command-line argument. See "R6RS Incompatibilities" in the manual,
  841. for full details.
  842. ** Add support for R7RS
  843. Thanks to Göran Weinholt and OKUMURA Yuki, Guile now implements the R7RS
  844. modules. As the R7RS library syntax is a subset of R6RS, to use R7RS
  845. you just `(import (scheme base))' and off you go. As with R6RS also,
  846. there are some small lexical incompatibilities regarding hex escapes;
  847. see "R6RS Support" in the manual, for full details.
  848. Also as with R6RS, there is an `install-r7rs!' procedure and a `--r7rs'
  849. command-line option.
  850. ** Add #:re-export-and-replace argument to `define-module'
  851. This new keyword specifies a set of bindings to re-export, but also
  852. marks them as intended to replace core bindings. See "Creating Guile
  853. Modules" in the manual, for full details.
  854. Note to make this change, we had to change the way replacement flags are
  855. stored, to being associated with modules instead of individual variable
  856. objects. This means that users who #:re-export an imported binding that
  857. was already marked as #:replace by another module will now see warnings,
  858. as they need to use #:re-export-and-replace instead.
  859. ** `define-module' #:autoload no longer pulls in the whole module
  860. One of the ways that a module can use another is "autoloads". For
  861. example:
  862. (define-module (a) #:autoload (b) (make-b))
  863. In this example, module `(b)' will only be imported when the `make-b'
  864. identifier is referenced. However besides the imprecision about when a
  865. given binding is actually referenced, this mechanism used to cause the
  866. whole imported module to become available, not just the specified
  867. bindings. This has now been changed to only import the specified bindings.
  868. This is a backward-incompatible change. The fix is to mention all
  869. bindings of interest in the autoload clause. Feedback is welcome.
  870. ** Improve SRFI-43 vector-fill!
  871. SRFI-43 vector-fill! now has the same performance whether an optional
  872. range is provided or not, and is also provided in core. As a side
  873. effect, vector-fill! and vector_fill_x no longer work on non-vector
  874. rank-1 arrays. Such cases were handled incorrectly before; for example,
  875. prior to this change:
  876. (define a (make-vector 10 'x))
  877. (define b (make-shared-array a (lambda (i) (list (* 2 i))) 5))
  878. (vector-fill! b 'y)
  879. => #1(y y y x x)
  880. This is now an error. Instead, use array-fill!.
  881. ** `iota' in core and SRFI-1 `iota' are the same
  882. Previously, `iota' in core would not accept start and step arguments and
  883. would return an empty list for negative count. Now there is only one
  884. `iota' function with the extended semantics of SRFI-1. Note that as an
  885. incompatible change, core `iota' no longer accepts a negative count.
  886. ** Improved Transport Layer Security (TLS) support in (web client)
  887. `http-request', `http-get', and related procedures from (web client) are
  888. able to access content over TLS ("HTTPS") since Guile 2.2. However,
  889. that support lacked important facilities, which are now available.
  890. First, these procedures now have a #:verify-certificate? parameter to
  891. enable or disable the verification of X.509 server certificates. The
  892. new `x509-certificate-directory' SRFI-39 parameter specifies where X.509
  893. certificates are searched for. Second, HTTPS proxies are now supported
  894. (in addition to HTTP proxies) and the new `current-https-proxy'
  895. parameter controls that. See "Web Client" in the manual for details.
  896. * New deprecations
  897. ** scm_t_uint8, etc deprecated in favor of C99 stdint.h
  898. It used to be that Guile defined its own `scm_t_uint8' because C99
  899. `uint8_t' wasn't widely enough available. Now Guile finally made the
  900. change to use C99 types, both internally and in Guile's public headers.
  901. Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN
  902. and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t
  903. instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t,
  904. intptr_t, and uintptr_t.
  905. ** The two-argument form of `record-constructor'
  906. Calling `record-constructor' with two arguments (the record type and a
  907. list of field names) is deprecated. Instead, call with just one
  908. argument, and provide a wrapper around that constructor if needed.
  909. * Incompatible changes
  910. ** All deprecated code removed
  911. All code deprecated in Guile 2.2 has been removed. See older NEWS, and
  912. check that your programs can compile without linker warnings and run
  913. without runtime warnings. See "Deprecation" in the manual.
  914. In particular, the function `scm_generalized_vector_get_handle' which
  915. was deprecated in 2.0.9 but remained in 2.2, has now finally been
  916. removed. As a replacement, use `scm_array_get_handle' to get a handle
  917. and `scm_array_handle_rank' to check the rank.
  918. ** Remove "self" field from vtables and "redefined" field from classes
  919. These fields were used as part of the machinery for class redefinition
  920. and is no longer needed.
  921. ** VM hook manipulation simplified
  922. The low-level mechanism to instrument a running virtual machine for
  923. debugging and tracing has been simplified. See "VM Hooks" in the
  924. manual, for more.
  925. * Changes to the distribution
  926. ** New effective version
  927. The "effective version" of Guile is now 3.0, which allows parallel
  928. installation with other effective versions (for example, the older Guile
  929. 2.2). See "Parallel Installations" in the manual for full details.
  930. Notably, the `pkg-config' file is now `guile-3.0', and there are new
  931. `guile-3' and `guile-3.0' features for `cond-expand'.
  932. Changes in 2.2.6 (since 2.2.5):
  933. * Bug fixes
  934. ** Fix regression introduced in 2.2.5 that would break HTTP servers
  935. Guile 2.2.5 introduced a bug that would break the built-in HTTP server
  936. provided by the (web server) module. Specifically, HTTP servers would
  937. hang while reading requests. See <https://bugs.gnu.org/36350>.
  938. ** 'strftime' and 'strptime' honor the current locale encoding
  939. Until now these procedures would wrongfully assume that the locale
  940. encoding is always UTF-8. See <https://bugs.gnu.org/35920>.
  941. ** Re-export 'current-load-port'
  942. This procedure was erroneously removed in the 2.2 series but was still
  943. documented.
  944. ** Minor documentation mistakes were fixed
  945. Changes in 2.2.5 (since 2.2.4):
  946. * Notable improvements
  947. ** Greatly improved performance of bidirectional pipes.
  948. The performance of bidirectional pipes, as created using 'open-pipe' or
  949. 'open-pipe*' in OPEN_BOTH mode, has been greatly improved. When reading
  950. large blocks of binary data from a bidirectional pipe, the maximum
  951. bandwidth has been increased by a factor of ~10^3 in some cases.
  952. ** New 'get-bytevector-some!' I/O primitive.
  953. This new I/O primitive is similar to 'get-bytevector-some' from the
  954. R6RS, except that it writes its data to a user-specified range of
  955. indices in an existing bytevector. As a corollary, it is also now
  956. possible to specify a maximum number of bytes to read. Note that
  957. 'get-bytevector-some', and now 'get-bytevector-some!', are unique among
  958. Guile's I/O primitives in their support of efficient binary reads of
  959. potentially large blocks while also allowing for short reads, to avoid
  960. undesired blocking. Now these operations can be performed while also
  961. avoiding heap-allocation.
  962. 'get-bytevector-some!' is needed to efficiently implement the new
  963. bidirectional pipes, which are built upon R6RS custom binary
  964. input/output ports.
  965. ** get-bytevector-{n!,some,some!} now support suspendable I/O.
  966. Scheme implementations of 'get-bytevector-n!', 'get-bytevector-some',
  967. and 'get-bytevector-some!' have been added to (ice-9 suspendable-ports).
  968. As a result, these I/O operations now support suspendable I/O.
  969. * Compiler improvements
  970. ** guild compile: Add -Wshadowed-toplevel.
  971. Top-level definitions that shadow previous top-level definitions from
  972. the same compilation unit will now trigger a compile-time warning, if
  973. -Wshadowed-toplevel is enabled. It is enabled by default.
  974. ** guild compile: Add '-x' flag.
  975. Passing "-x EXT" to 'guild compile' will now cause EXT to be recognized
  976. as a valid source file name extension. For example, to compile R6RS
  977. code, you might want to pass "-x .sls" so that files ending in ".sls"
  978. can be found.
  979. * Miscellaneous improvements
  980. ** Bootstrap optimization
  981. eval.go and psyntax-pp.go are now built before the rest of the .go files
  982. so that they are processed by a fast macro expander. This saves time
  983. when using parallel builds.
  984. ** put-u8 now always writes a single byte, regardless of the port encoding.
  985. Previously, (put-u8 PORT OCTET) worked as expected only when writing to
  986. binary ports, i.e. those with port encoding "ISO-8859-1" a.k.a. Latin-1.
  987. Strictly speaking, this meets the requirements of the R6RS 'put-u8',
  988. which need only support binary ports. However, Guile in fact allows
  989. binary I/O to be performed on any port, and yet 'put-u8' behaved in a
  990. surprising way with other port encodings: it would perform a _textual_
  991. I/O operation, writing the character with Unicode scalar value OCTET.
  992. Now, 'put-u8' always writes a single byte with value OCTET, regardless
  993. of the port encoding.
  994. ** Optimize fixnum exact integer square roots.
  995. 'exact-integer-sqrt' now avoids heap allocation when applied to a
  996. fixnum. 'sqrt' now avoids heap allocation when applied to a fixnum
  997. that's a perfect square. Fewer heap allocations are now required when
  998. applying 'sqrt' to a square of an exact rational whose numerator or
  999. denominator are fixnums.
  1000. ** scm_mkstrport: Optimize the POS -> BYTE_POS conversion.
  1001. scm_mkstrport now avoids an unnecessary heap allocation and conversion
  1002. to UTF-8, when STR is provided and POS is non-zero.
  1003. ** SRFI-19: Support ~N in string->date.
  1004. Support for the ~N escape, which allows fractions of a second to be
  1005. parsed, is now supported in SRFI-19 'string->date'.
  1006. ** SRFI-19: Update the leap second table.
  1007. The leap on 1 January 2017 was added to SRFI-19's leap second table.
  1008. ** stexi->shtml: Add support for @i, @math, @tie and @dots.
  1009. stexi->shtml is now able to convert @i, @math, @tie and @dots to HTML.
  1010. ** Define AT_SYMLINK_NOFOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH.
  1011. AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH are now available
  1012. from Scheme, if supported on the platform.
  1013. ** Improvements to the 'time' macro from (ice-9 time).
  1014. The 'time' macro now supports expressions that return multiple values.
  1015. It has also been rewritten as a hygienic 'syntax-rules' macro.
  1016. Previously, it was built using 'define-macro', and was therefore
  1017. unhygienic. This is not merely an internal implementation detail, but
  1018. is potentially relevant to any user of the 'time' macro, since it could
  1019. lead to unintended variable capture and other problems.
  1020. ** Clarify the documentation for 'nil?'.
  1021. See commit b44f505f1571fc9c42e58982f161a9cfc81fb7f4.
  1022. ** Clarify the manual's "Processes" section.
  1023. See commit 8cdd3a0773930ca872a13aada7a1344f03bb382b.
  1024. ** Avoid 'with-latin1-locale' in binary I/O tests.
  1025. See commit 162a031e5f2c64cd23fcf069fb7b5071196f9527.
  1026. ** Update user-visible copyright years.
  1027. * Bug fixes
  1028. ** Avoid regexp ranges in HTTP inter-protocol exploitation check.
  1029. The regular expression used to check for HTTP inter-protocol
  1030. exploitation attacks previously used a character range '0-9', whose
  1031. meaning depends on the current locale. This has now been fixed.
  1032. ** Fixes to the SRFI-19 time/date library.
  1033. *** TAI-to-UTC conversion leaps at the wrong time.
  1034. <https://bugs.gnu.org/21911>
  1035. *** time-utc->date shows bogus zone-dependent leap second.
  1036. <https://bugs.gnu.org/22034>
  1037. *** Manual incorrectly describes Julian Date.
  1038. <https://bugs.gnu.org/21902>
  1039. *** date->string duff ISO 8601 negative years.
  1040. <https://bugs.gnu.org/21903>
  1041. *** date->string duff ISO 8601 format for non-4-digit years.
  1042. <https://bugs.gnu.org/21904>
  1043. *** julian-day->date negative input breakage.
  1044. <https://bugs.gnu.org/21906>
  1045. *** time-duration screws up negative durations.
  1046. <https://bugs.gnu.org/26162>
  1047. *** time-difference doesn't detect error of differing time types.
  1048. <https://bugs.gnu.org/26163>
  1049. ** Improve overflow checks in bytevector, string, and I/O operations.
  1050. Several numerical computations, performed using primitive C arithmetic
  1051. in Guile's core bytevector, string, and I/O operations, have been
  1052. rewritten to avoid overflows.
  1053. ** Fix type inferencing for 'nil?' and 'null?' predicates.
  1054. Previously, the compiler would sometimes miscompile certain combinations
  1055. of 'nil?' and 'null?' predicates present within the same top-level form.
  1056. See <https://bugs.gnu.org/33036>.
  1057. ** Fix 'atomic-box-compare-and-swap!'.
  1058. Previously, 'atomic-box-compare-and-swap!' would sometimes spuriously
  1059. fail on architectures based on Load-Linked/Store-Conditional (LL/SC)
  1060. synchronication primitives (e.g. ARM, PowerPC, and MIPS) in a way that
  1061. was undetectable by the caller. See <https://bugs.gnu.org/32786>.
  1062. ** Make URI handling locale independent.
  1063. Previously, procedures in (web uri) would misbehave in some locales
  1064. including sv_SE. See <https://bugs.gnu.org/35785>.
  1065. ** Strings, i18n: Limit the use of alloca to approximately 8 kilobytes.
  1066. Previously, 'string-locale-ci=?', 'string-locale-ci<?',
  1067. 'string-locale<?', 'string-locale-{downcase,upcase,titlecase}' and
  1068. 'string-normalize-{nfd,nfc,nfkd,nfkc}' would overflow the C stack when
  1069. applied to very large strings.
  1070. ** Fix documentation of R6RS 'binary-port?' to reflect reality.
  1071. Previously, the documentation incorrectly stated that 'binary-port?'
  1072. always returns #t. In fact, it returns #t if and only if the port
  1073. encoding is "ISO-8859-1". The documentation for 'binary-port?' and
  1074. 'textual-port?' has been rewritten to reflect the current reality, and
  1075. also to leave open the possibility of changing the behavior of these
  1076. predicates in a future version of Guile.
  1077. ** Avoid passing NULL to 'memcpy' and 'memcmp'.
  1078. Previously, NULL was sometimes passed to 'memcpy' or 'memcmp' when the
  1079. size argument was 0.
  1080. ** Save and restore errno in the signal handler.
  1081. Previously, Guile's synchronous C signal handler failed to save and
  1082. restore 'errno', although it might change its value. This could
  1083. potentially lead to spurious corruptions of 'errno' within threads
  1084. interrupted by signals.
  1085. ** scm_to_stringn: Avoid passing NULL to c_strcasecmp.
  1086. <https://lists.gnu.org/archive/html/guile-user/2019-05/msg00070.html>
  1087. ** r6rs-ports: Accept 'port-position' values greater than 2^32.
  1088. <https://bugs.gnu.org/32161>
  1089. ** r6rs-ports: 'put-bytevector' accepts 64-bit integers.
  1090. Fixed in commit 741c45458da0831a12a4f8d729814bf9f2cb6571.
  1091. ** Fix R6RS call-with-{input,output}-file to open textual ports.
  1092. <https://bugs.gnu.org/32329>
  1093. ** Update (ice-9 match) to include selected bug fixes from upstream.
  1094. *** ice-9/match named match-let is not working
  1095. <https://bugs.gnu.org/22925>
  1096. ** open-process: Fix dup(2) and execvp(2) error handling.
  1097. Fixed in commit 521f1ab4709217407496004019c00005d2a82f78.
  1098. ** bytevectors: Support large indices in integer accessors.
  1099. Fixed in commit b9cf3517efd4643670d970d2692bc7bede9a85e8.
  1100. ** bytevectors: Fix list validation of *list->bytevector procedures.
  1101. <https://bugs.gnu.org/32938>
  1102. ** Gracefully handle huge shift counts in 'ash' and 'round-ash'.
  1103. <https://bugs.gnu.org/32644>
  1104. ** In 'ash' and 'round-ash', handle right shift count of LONG_MIN.
  1105. <https://bugs.gnu.org/21901>
  1106. ** Use 'scm_from_utf8_{string,symbol,keyword}' for C string literals.
  1107. <https://bugs.gnu.org/33044>
  1108. ** web: Add support for HTTP header continuation lines.
  1109. Fixed in commit 73cde5ed7218a090ecee888870908af5445796f0.
  1110. ** scm_seed_to_random_state: Support wide string arguments.
  1111. <https://bugs.gnu.org/33044>
  1112. ** Do not warn the user when 'madvise' returns ENOSYS.
  1113. Fixed in commit 45e4ace6603e00b297e6542362273041aebe7305.
  1114. ** Add 'texinfo' as a dependency in the README.
  1115. Fixed in commit 1bbce71501198c3c7abdf07941f5cdc1434858c2.
  1116. ** Don't mutate read-only string in ports test.
  1117. Fixed in commit 552f007e91a97f136aad1b22918688b61d03a4a3.
  1118. ** Remove redefinition of when & unless in snarf-check-and-output-texi.
  1119. Fixed in commit 1ba5d6f47a54dceee4452a1e7726d2635e5b3449.
  1120. ** Fix strftime when Guile is built without threading support.
  1121. Fixed in commit 139c702fc8b61fdeb813c3428fef3701ea8677f9.
  1122. ** Avoid leaking a file descriptor in test-unwind.
  1123. Fixed in commit 1437b76777e576b3d000e2f80c5ecdb33a74ac33.
  1124. ** Fix binary output on files created by mkstemp!.
  1125. Fixed in commit 78468baa118d316050a27e43250966e52ffd3d54.
  1126. ** Fix crypt-on-glibc test error.
  1127. Fixed in commit 27ffbfb0235de466016ea5a6421508f6548971b6.
  1128. ** Fix race when expanding syntax-parameterize and define-syntax-parameter.
  1129. <https://bugs.gnu.org/27476#102>
  1130. ** Add a fallback value for the locale-monetary-decimal-point.
  1131. Fixed in commit 9ba449643d4c2ac1d2174befca7d765af222bcc0.
  1132. ** Handle newlib C library's langinfo constant names.
  1133. Fixed in commit 92105d13ad1363b511214589b7d62d95304beb17.
  1134. ** Make locale monetary conversion tests be less strict on terminal whitespace.
  1135. Fixed in commit 2a3ccfb66714efc1c081ea6e921336f80b756d3c.
  1136. ** Disable test for current value of setitimer on Cygwin.
  1137. Fixed in commit 3a64c504caaf83e9faf2ec9b7d0e031e1a6a09b9.
  1138. ** Fix gc.test "after-gc-hook gets called" failures.
  1139. <https://bugs.gnu.org/31776#17>
  1140. ** Update iconv.m4 from gnulib, to fix an iconv leak during configure.
  1141. <https://lists.gnu.org/archive/html/guile-devel/2019-05/msg00011.html>
  1142. ** guild compile: Add missing newline in "unrecognized option" error message.
  1143. Fixed in commit 85c5bae4fd94f8686d26fd792b7c0f588c23bd94.
  1144. ** 'basename' now correctly handles "/" and "//".
  1145. Fixed in commit 36ad1d24b3d2c174a64c445502a36f19605dbd65.
  1146. ** Make srfi-71 visible through 'cond-expand'.
  1147. Fixed in commit 59a06d8392234fbec8b3605cec266a7a0a7b7a56.
  1148. Changes in 2.2.4 (since 2.2.3):
  1149. * New interfaces and functionality
  1150. ** SRFI-71 (Extended LET-syntax for multiple values)
  1151. Guile now includes SRFI-71, which extends let, let*, and letrec to
  1152. support assigning multiple values. See "SRFI-71" in the manual for
  1153. details.
  1154. ** (web client) export 'http-request' procedure
  1155. The 'http-request' procedure is the generalized procedure underneath
  1156. 'http-get', 'http-post', etc.
  1157. ** GDB support now registers the 'guile-backtrace' GDB command
  1158. The 'guile-backtrace' GDB command displays a backtrace of the VM stack
  1159. for the current thread.
  1160. ** Recognize RISC-V compilation targets in (system base target)
  1161. * Bug fixes
  1162. ** Fix stack-marking bug affecting multi-threaded programs
  1163. (<https://bugs.gnu.org/28211>)
  1164. ** Add missing SYNC_IP calls in the VM
  1165. These could cause multi-threaded code to crash.
  1166. ** Fix multi-threaded access to modules
  1167. (<https://bugs.gnu.org/30602>, <https://bugs.gnu.org/31879>,
  1168. and <https://bugs.gnu.org/31878>)
  1169. ** (ice-9 match) now has better documentation
  1170. ** 'get-bytevector-n' and 'get-bytevector-n!' can now read more than 4 GB
  1171. ** Fix cross-compilation support for elisp
  1172. ** Fix error reporting in 'load-thunk-from-memory'
  1173. ** Fix GOOPS 'instance?' to work on objects that aren't structs
  1174. (<https://bugs.gnu.org/31606>)
  1175. ** Fix type inference for bitwise logical operators
  1176. (<https://bugs.gnu.org/31474>)
  1177. ** Avoid inexact arithmetic in the type inferrer for 'sqrt'
  1178. ** Fix floating point unboxing regression in 2.2.3
  1179. (<https://bugs.gnu.org/30020>)
  1180. ** Fix eta-conversion edge cases in peval (<https://bugs.gnu.org/29520>)
  1181. ** Correctly interpret SRFI-18 timeout parameters
  1182. (<https://bugs.gnu.org/29704>)
  1183. ** 'select' returns empty sets upon EINTR and EAGAIN
  1184. (<https://bugs.gnu.org/30368>)
  1185. ** Restore pre-2.2.3 '%fresh-auto-compile' behavior
  1186. This reverts an incorrect fix for <https://bugs.gnu.org/29226>.
  1187. Changes in 2.2.3 (since 2.2.2):
  1188. * New interfaces and functionality
  1189. ** (web uri) module has better support for RFC 3986
  1190. The URI standard, RFC 3986, defines additional "relative-ref" and
  1191. "URI-reference" data types. Thanks to Daniel Hartwig, Guile's support
  1192. for these URI subtypes has been improved. See "Universal Resource
  1193. Identifiers" in the manual, for more.
  1194. ** `struct-ref/unboxed' and `struct-set!/unboxed'
  1195. These procedures should be used when accessing struct fields with type
  1196. `u' (unboxed). See "Structure Basics" in the manual, for full details.
  1197. ** Improved support for arrays with non-zero lower bounds
  1198. Thanks to work by Daniel Llorens, Guile no longer exhibits buggy
  1199. behavior in "sort" or "sort!" on arrays with non-zero lower dimension
  1200. bounds. Arrays with non-zero lower dimension bounds are now allowed for
  1201. array-slice-for-each, and truncated-print now supports bitvectors and
  1202. arrays with non-zero lower bounds. General arrays are now supported as
  1203. well for random:hollow-sphere!.
  1204. ** Add `uintptr_t' and `intptr_t' to FFI types.
  1205. See "Foreign Types" in the manual for full details.
  1206. * Compiler improvements
  1207. ** Improve speed of compiler backend for functions without loops
  1208. This is a marginal speed improvement, especially for code compiled with
  1209. optimization level "-O1" or below.
  1210. ** Disable slot pre-coloring for optimization level "-O1" or below
  1211. This improves the speed of the compiler backend.
  1212. ** Improve complexity of constant subexpression elimination pass
  1213. This is a large speed improvement when compiling large files with the
  1214. default "-O2" pass.
  1215. ** CPS conversion avoids generating return arity adapters if possible
  1216. In Guile, the expression in (define a EXP) may return 1 or more values.
  1217. This value elision in "value" context is implicit earlier in the Guile
  1218. compiler, in Tree-IL, but is made explicit in the CPS middle-end
  1219. language by the addition of the equivalent of explicit call-with-values
  1220. continuations that ignore additional values. However in many cases we
  1221. can avoid generating these extra continuations if we know that EXP is
  1222. single-valued, as is the case for example for constants or variable
  1223. references or the like.
  1224. Although these "arity-adapting continuations" would be removed by dead
  1225. code elimination at optimization level "-O2" or above, they were still
  1226. being needlessly generated in the first place. Guile now avoids
  1227. generating them, speeding up not only the optimizer at -O2 but also the
  1228. entire compiler pipeline at -O1 or below, as well as improving the
  1229. residual code at -O1 or below.
  1230. * New deprecations
  1231. ** Using `uri?' as a predicate on relative-refs deprecated
  1232. If you don't care whether the URI is a relative-ref or not, use
  1233. `uri-reference?'. If you do, use `uri-reference?' and `relative-ref?'.
  1234. In the future `uri?' will return a true value only for URIs that specify
  1235. a scheme.
  1236. ** Struct tail arrays deprecated
  1237. Guile's structures used to have a facility whereby each instance of a
  1238. vtable can contain a variable-length tail array of values. The length
  1239. of the tail array was stored in the structure. This facility was
  1240. originally intended to allow C code to expose raw C structures with
  1241. word-sized tail arrays to Scheme.
  1242. However, the tail array facility was confusing and doesn't work very
  1243. well. It was very rarely used, but it insinuates itself into all
  1244. invocations of `make-struct'. For this reason the clumsily-named
  1245. `make-struct/no-tail' procedure can actually be more elegant in actual
  1246. use, because it doesn't have a random `0' argument stuck in the middle.
  1247. Tail arrays also inhibit optimization by allowing instances to affect
  1248. their shapes. In the absence of tail arrays, all instances of a given
  1249. vtable have the same number and kinds of fields. This uniformity can be
  1250. exploited by the runtime and the optimizer. The presence of tail arrays
  1251. make some of these optimizations more difficult.
  1252. Finally, the tail array facility is ad-hoc and does not compose with the
  1253. rest of Guile. If a Guile user wants an array with user-specified
  1254. length, it's best to use a vector. It is more clear in the code, and
  1255. the standard optimization techniques will do a good job with it.
  1256. For all of these reasons, tail arrays are deprecated in Guile 2.2 and
  1257. will be removed from Guile 3.0. Likewise, `make-struct' /
  1258. `scm_make_struct' is deprecated in favor of `make-struct/no-tail' /
  1259. `scm_make_struct_no_tail'. Perhaps one day we will be able to reclaim
  1260. the `make-struct' name!
  1261. ** Struct "self" slots deprecated
  1262. It used to be that you could make a structure vtable that had "self"
  1263. slots. Instances of that vtable would have those slots initialized to
  1264. the instance itself. This can be useful in C code where you might have
  1265. a pointer to the data array, and want to get the `SCM' handle for the
  1266. structure. However this was a little used complication without any use
  1267. in Scheme code. To replace it, just use "p" slots and initialize the
  1268. slot values manually on initialization.
  1269. ** Struct fields with opaque ("o") protection deprecated
  1270. Struct fields are declared with a "protection", meaning read-only ('r'),
  1271. read-write ('w'), or opaque ('o'). There is also "hidden" ('h') which
  1272. is read-write but which isn't initialized by arguments passed to
  1273. `make-struct/no-tail', but that's a detail. Opaque struct fields were
  1274. used to allocate storage in a struct that could only be accessed by C.
  1275. This facility was very rarely used (unused in Guile itself) but now that
  1276. we are implementing more and more in Scheme, it is completely useless.
  1277. To enforce permissions on struct fields, instead layer on an abstraction
  1278. at a higher level, in the same way that immutable record fields are
  1279. simply those which don't have an accessor.
  1280. ** Using `struct-ref' and `struct-set!' on unboxed fields is deprecated
  1281. Use the new `struct-ref/unboxed' and `struct-set!/unboxed' instead.
  1282. * Bug fixes
  1283. ** guile.m4 now checks for Guile 2.2 by default
  1284. Before, it was still preferring Guile 2.0. It now also supports the
  1285. Guile 3.0 prereleases.
  1286. ** Fix setting breakpoints from the REPL
  1287. ** Allow GDB support to be used with GDB linked against Guile 2.0.
  1288. ** Fix deadlock in `readdir' on error.
  1289. ** Fix crash on ia64 during thread switches.
  1290. ** Fix bug inferring range of `logand' computations with negative numbers
  1291. ** Fix bug when issuing HTTP requests through proxies.
  1292. ** Refactor weak hash table implementation to be more robust
  1293. Guile 2.2's weak hash table implementation had three big problems. The
  1294. first was a bug causing these tables to leak memory when they would be
  1295. resized. The second was that the implementation was designed so that
  1296. tables should be visited by the mark phase of the garbage collector in
  1297. one big piece. This could cause the garbage collector to see too many
  1298. newly marked objects at once, causing inefficies in garbage collection.
  1299. Finally, the way in which lost weak references were ultimately removed
  1300. from weak tables caused a race between the finalizer threads and the
  1301. mutator threads, leading to unbounded excess space retention in
  1302. pathological cases. All of this problems have been fixed.
  1303. ** Allow garbage collection of revealed file ports
  1304. Guile can mark a file port as "revealed" if Scheme has been given access
  1305. to the file descriptor. In that case, the file descriptor will not be
  1306. closed when the port is garbage-collected. However we had a bug that
  1307. for revealed ports prevented the port from ever being garbage-collected,
  1308. leading to memory leaks of Guile's internal port buffers. This is now
  1309. fixed.
  1310. ** Fix put-bytevector, unget-bytevector with start == bytevector length
  1311. ** Enable GNU Readline 7.0's support for "bracketed paste".
  1312. Before, when pasting an expression that contained TAB characters into
  1313. Guile's REPL with GNU Readline support enabled, the pasted TAB
  1314. characters would trigger autocompletion in Readline. This was never
  1315. what you wanted. Guile now sets the new "bracketed-paste" option in GNU
  1316. Readline 7.0 to on by default, making readline treat pastes into the
  1317. terminal as atomic units without control characters. See "Readline
  1318. Options" in the manual for full details.
  1319. ** Fix time-monotonic from SRFI-19; broken in 2.2.1.
  1320. Changes in 2.2.2 (since 2.2.1):
  1321. * Bug fixes
  1322. ** Syntax objects are once more comparable with 'equal?'
  1323. The syntax object change in 2.2.1 had the unintended effect of making
  1324. syntax objects no longer comparable with equal?. This release restores
  1325. the previous behavior.
  1326. ** Restore libgc dependency
  1327. The change to throw exceptions when mutating literal constants partly
  1328. relied on an interface that was added to our garbage collector (BDW-GC)
  1329. after its 7.2 release. Guile 2.2.2 adds a workaround to allow Guile to
  1330. continue be used with libgc as old as 7.2.
  1331. ** SRFI-37 bug fix to not error on empty-string arguments.
  1332. Thanks to Thomas Danckaert for fixing this long-standing bug.
  1333. Changes in 2.2.1 (since 2.2.0):
  1334. * Notable changes
  1335. ** New sandboxed evaluation facility
  1336. Guile now has a way to execute untrusted code in a safe way. See
  1337. "Sandboxed Evaluation" in the manual for full details, including some
  1338. important notes on limitations on the sandbox's ability to prevent
  1339. resource exhaustion.
  1340. ** All literal constants are read-only
  1341. According to the Scheme language definition, it is an error to attempt
  1342. to mutate a "constant literal". A constant literal is data that is a
  1343. literal quoted part of a program. For example, all of these are errors:
  1344. (set-car! '(1 . 2) 42)
  1345. (append! '(1 2 3) '(4 5 6))
  1346. (vector-set! '#(a b c) 1 'B)
  1347. Guile takes advantage of this provision of Scheme to deduplicate shared
  1348. structure in constant literals within a compilation unit, and to
  1349. allocate constant data directly in the compiled object file. If the
  1350. data needs no relocation at run-time, as is the case for pairs or
  1351. vectors that only contain immediate values, then the data can actually
  1352. be shared between different Guile processes, using the operating
  1353. system's virtual memory facilities.
  1354. However, in Guile 2.2.0, constants that needed relocation were actually
  1355. mutable -- though (vector-set! '#(a b c) 1 'B) was an error, Guile
  1356. wouldn't actually cause an exception to be raised, silently allowing the
  1357. mutation. This could affect future users of this constant, or indeed of
  1358. any constant in the compilation unit that shared structure with the
  1359. original vector.
  1360. Additionally, attempting to mutate constant literals mapped in the
  1361. read-only section of files would actually cause a segmentation fault, as
  1362. the operating system prohibits writes to read-only memory. "Don't do
  1363. that" isn't a very nice solution :)
  1364. Both of these problems have been fixed. Any attempt to mutate a
  1365. constant literal will now raise an exception, whether the constant needs
  1366. relocation or not.
  1367. ** Syntax objects are now a distinct type
  1368. It used to be that syntax objects were represented as a tagged vector.
  1369. These values could be forged by users to break scoping abstractions,
  1370. preventing the implementation of sandboxing facilities in Guile. We are
  1371. as embarrassed about the previous situation as we pleased are about the
  1372. fact that we've fixed it.
  1373. Unfortunately, during the 2.2 stable series (or at least during part of
  1374. it), we need to support files compiled with Guile 2.2.0. These files
  1375. may contain macros that contain legacy syntax object constants. See the
  1376. discussion of "allow-legacy-syntax-objects?" in "Syntax Transformer
  1377. Helpers" in the manual for full details.
  1378. * Bug fixes
  1379. *** Fix snarfing with -ggdb3 (#25803)
  1380. *** Fix spurious snarf warnings for net_db.c
  1381. *** Output statprof flat display to correct port
  1382. *** Document guile-2.2 cond-expand feature
  1383. *** Add --with-bdw-gc for BSDs that use bdw-gc-threaded (see README)
  1384. *** Documentation typo fixes (#26188)
  1385. *** Fix SRFI-9 date->string bugs with ~N and ~F (#26261, #26260, #26259)
  1386. *** SRFI-19 current-time-monotonic returns time of right type (#26329)
  1387. *** Avoid causing GC when looking up exception handler
  1388. *** Increment objcode version, in a compatible way
  1389. *** Fix compile warning in (system base types)
  1390. *** Only run tests that require fork if it is provided
  1391. *** Speed up procedure-minimum-arity for fixed arity
  1392. *** REPL server tests catch ECONNABORTED
  1393. *** Avoid deprecated argument to setvbuf in (web client)
  1394. *** Remove non-existent 'open-connection-for-uri' export from (web client)
  1395. Changes in 2.2.0 (changes since the 2.0.x stable release series):
  1396. * Notable changes
  1397. ** Speed
  1398. The biggest change in Guile 2.2 is a complete rewrite of its virtual
  1399. machine and compiler internals. The result is faster startup time,
  1400. better memory usage, and faster execution of user code. See the
  1401. "Performance improvements" section below for more details.
  1402. ** Better thread-safety
  1403. This new release series takes the ABI-break opportunity to fix some
  1404. interfaces that were difficult to use correctly from multiple threads.
  1405. Notably, weak hash tables and ports are now transparently thread-safe.
  1406. See "Scheduling" in the manual, for updated documentation on threads and
  1407. communications primitives.
  1408. ** Better space-safety
  1409. It used to be the case that, when calling a Scheme procedure, the
  1410. procedure and arguments were always preserved against garbage
  1411. collection. This is no longer the case; Guile is free to collect the
  1412. procedure and arguments if they become unreachable, or to re-use their
  1413. slots for other local variables. Guile still offers good-quality
  1414. backtraces by determining the procedure being called from the
  1415. instruction pointer instead of from the value in slot 0 of an
  1416. application frame, and by using a live variable map that allows the
  1417. debugger to know which locals are live at all points in a frame.
  1418. ** Off-main-thread finalization
  1419. Following Guile 2.0.6's change to invoke finalizers via asyncs, Guile
  1420. 2.2 takes the additional step of invoking finalizers from a dedicated
  1421. finalizer thread, if threads are enabled. This avoids concurrency
  1422. issues between finalizers and application code, and also speeds up
  1423. finalization. If your application's finalizers are not robust to the
  1424. presence of threads, see "Foreign Objects" in the manual for information
  1425. on how to disable automatic finalization and instead run finalizers
  1426. manually.
  1427. ** Better locale support in Guile scripts
  1428. When Guile is invoked directly, either from the command line or via a
  1429. hash-bang line (e.g. "#!/usr/bin/guile"), it now installs the current
  1430. locale via a call to `(setlocale LC_ALL "")'. For users with a unicode
  1431. locale, this makes all ports unicode-capable by default, without the
  1432. need to call `setlocale' in your program. This behavior may be
  1433. controlled via the GUILE_INSTALL_LOCALE environment variable; see
  1434. "Environment Variables" in the manual, for more.
  1435. ** Complete Emacs-compatible Elisp implementation
  1436. Thanks to the work of Robin Templeton, Guile's Elisp implementation is
  1437. now fully Emacs-compatible, implementing all of Elisp's features and
  1438. quirks in the same way as the editor we know and love.
  1439. ** Dynamically expandable stacks
  1440. Instead of allocating fixed stack sizes for running Scheme code, Guile
  1441. now starts off each thread with only one page of stack, and expands and
  1442. shrinks it dynamically as needed. Guile will throw an exception for
  1443. stack overflows if growing the stack fails. It is also possible to
  1444. impose a stack limit during the extent of a function call. See "Stack
  1445. Overflow" in the manual, for more.
  1446. This change allows users to write programs that use the stack as a data
  1447. structure for pending computations, as it was meant to be, without
  1448. reifying that data out to the heap. Where you would previously make a
  1449. loop that collect its results in reverse order only to re-reverse them
  1450. at the end, now you can just recurse without worrying about stack
  1451. overflows.
  1452. Using the stack also allows more code to be continuation-safe. For
  1453. example, returning multiple times from a `map' procedure in Guile 2.0
  1454. would change the value of previously returned result lists, because
  1455. `map' built its result list in reverse order then used `reverse!' to
  1456. return the proper result. Now in Guile 2.2, `map' is implemented using
  1457. straightforward recursion, which eliminates this bug while maintaining
  1458. good performance as well as good space complexity.
  1459. ** Out-of-memory improvements
  1460. Instead of aborting, failures to allocate memory will now raise an
  1461. unwind-only `out-of-memory' exception, and cause the corresponding
  1462. `catch' expression to run garbage collection in order to free up memory.
  1463. ** GOOPS core reimplemented in Scheme
  1464. Guile's object orientation system, GOOPS, has been mostly reimplemented
  1465. in Scheme. This decreases its maintenance burden on the rest of Guile,
  1466. while also makes it possible to implement new features in the future,
  1467. such as method combinations or `eqv?' specializers.
  1468. ** Better handling of GUILE_LOAD_COMPILED_PATH
  1469. It used to be that Guile would stop at the first .go file it found in
  1470. the GUILE_LOAD_COMPILED_PATH. If that file turned out to be out of
  1471. date, then no .go file would be loaded. Now Guile will continue to
  1472. search the path for a file which is both present and up-to-date, with
  1473. respect to the .scm file.
  1474. ** C99 required
  1475. Following Emacs, you must use a C99-capable compiler when building
  1476. Guile. In the future we also expect require C99 to use Guile's C
  1477. interface, at least for `stdint' support.
  1478. ** Lightweight pre-emptive threading primitives
  1479. The compiler now inserts special "handle-interrupts" opcodes before each
  1480. call, return, and backwards jump target. This allows the user to
  1481. interrupt any computation and to accurately profile code using
  1482. interrupts. It used to be that interrupts were run by calling a C
  1483. function from the VM; now interrupt thunks are run directly from the VM.
  1484. This allows interrupts to save a delimited continuation and, if the
  1485. continuation was established from the same VM invocation (the usual
  1486. restriction), that continuation can then be resumed. In this way users
  1487. can implement lightweight pre-emptive threading facilities.
  1488. ** with-dynamic-state in VM
  1489. Similarly, `with-dynamic-state' no longer recurses out of the VM,
  1490. allowing captured delimited continuations that include a
  1491. `with-dynamic-state' invocation to be resumed. This is a precondition
  1492. to allow lightweight threading libraries to establish a dynamic state
  1493. per lightweight fiber.
  1494. * Performance improvements
  1495. ** Faster programs via new virtual machine
  1496. Guile now compiles programs to instructions for a new virtual machine.
  1497. The new virtual machine's instructions can address their source and
  1498. destination operands by "name" (slot). This makes access to named
  1499. temporary values much faster than in Guile 2.0, and removes a lot of
  1500. value-shuffling that the old virtual machine had to do. The end result
  1501. is that loop-heavy code can be two or three times as fast with Guile 2.2
  1502. as in 2.0. Your mileage may vary, of course; see "A Virtual Machine for
  1503. Guile" in the manual for the nitties and the gritties.
  1504. ** Better startup time, memory usage with ELF object file format
  1505. Guile now uses the standard ELF format for its compiled code. (Guile
  1506. has its own loader and linker, so this does not imply a dependency on
  1507. any particular platform's ELF toolchain.) The benefit is that Guile is
  1508. now able to statically allocate more data in the object files. ELF also
  1509. enables more sharing of data between processes, and decreases startup
  1510. time (about 40% faster than the already fast startup of the Guile 2.0
  1511. series). Guile also uses DWARF for some of its debugging information.
  1512. Much of the debugging information can be stripped from the object files
  1513. as well. See "Object File Format" in the manual, for full details.
  1514. ** Better optimizations via compiler rewrite
  1515. Guile's compiler now uses a Continuation-Passing Style (CPS)
  1516. intermediate language, allowing it to reason easily about temporary
  1517. values and control flow. Examples of optimizations that this permits
  1518. are optimal contification, optimal common subexpression elimination,
  1519. dead code elimination, loop-invariant code motion, loop peeling, loop
  1520. inversion, parallel moves with at most one temporary, allocation of
  1521. stack slots using precise liveness information, unboxing of 64-bit
  1522. integers and floating point values, and closure optimization. For more,
  1523. see "Continuation-Passing Style" in the manual.
  1524. ** Faster interpreter
  1525. Combined with a number of optimizations to the interpreter itself,
  1526. simply compiling `eval.scm' with the new compiler yields an interpreter
  1527. that is consistently two or three times faster than the one in Guile
  1528. 2.0.
  1529. ** Allocation-free dynamic stack
  1530. Guile now implements the dynamic stack with an actual stack instead of a
  1531. list of heap objects, avoiding most allocation. This speeds up prompts,
  1532. the `scm_dynwind_*' family of functions, fluids, and `dynamic-wind'.
  1533. ** Optimized UTF-8 and Latin-1 ports, symbols, and strings
  1534. Guile 2.2 is faster at reading and writing UTF-8 and Latin-1 strings
  1535. from ports, and at converting symbols and strings to and from these
  1536. encodings.
  1537. ** Optimized hash functions
  1538. Guile 2.2 now uses Bob Jenkins' `hashword2' (from his `lookup3.c') for
  1539. its string hash, and Thomas Wang's integer hash function for `hashq' and
  1540. `hashv'. These functions produce much better hash values across all
  1541. available fixnum bits.
  1542. ** Optimized generic array facility
  1543. Thanks to work by Daniel Llorens, the generic array facility is much
  1544. faster now, as it is internally better able to dispatch on the type of
  1545. the underlying backing store.
  1546. ** All ports are now buffered, can be targets of `setvbuf'
  1547. See "Buffering" in the manual, for more. A port with a buffer size of 1
  1548. is equivalent to an unbuffered port. Ports may set their default buffer
  1549. sizes, and some ports (for example soft ports) are unbuffered by default
  1550. for historical reasons.
  1551. ** Mutexes are now faster under contention
  1552. Guile implements its own mutexes, so that threads that are trying to
  1553. acquire a mutex can be interrupted. These mutexes used to be quite
  1554. inefficient when many threads were trying to acquire them, causing many
  1555. spurious wakeups and contention. This has been fixed.
  1556. * New interfaces
  1557. ** New `cond-expand' feature: `guile-2.2'
  1558. Use this feature if you need to check for Guile 2.2 from Scheme code.
  1559. ** New predicate: `nil?'
  1560. See "Nil" in the manual.
  1561. ** New compiler modules
  1562. Since the compiler was rewritten, there are new modules for the back-end
  1563. of the compiler and the low-level loader and introspection interfaces.
  1564. See the "Guile Implementation" chapter in the manual for all details.
  1565. ** Add "tree" display mode for statprof.
  1566. See the newly updated "Statprof" section of the manual, for more.
  1567. ** Support for non-blocking I/O
  1568. See "Non-Blocking I/O" in the manual, for more.
  1569. ** Implement R6RS custom binary input/output ports
  1570. See "Custom Ports" in the manual.
  1571. ** Implement R6RS output-buffer-mode
  1572. ** Implement R6RS bytevector->string, string->bytevector
  1573. See "R6RS Transcoders" in the manual.
  1574. ** `accept' now takes optional flags argument
  1575. These flags can include `SOCK_NONBLOCK' and `SOCK_CLOEXEC', indicating
  1576. options to apply to the returned socket, potentially removing the need
  1577. for additional system calls to set these options. See "Network Sockets
  1578. and Communication" in the manual, for more.
  1579. ** Thread-safe atomic boxes (references)
  1580. See "Atomics" in the manual.
  1581. ** Thread-local fluids
  1582. Guile now has support for fluids whose values are not captured by
  1583. `current-dynamic-state' and not inheritied by child threads, and thus
  1584. are local to the kernel thread they run on. See "Thread-Local
  1585. Variables" in the manual, for more.
  1586. ** suspendable-continuation?
  1587. This predicate returns true if the delimited continuation captured by
  1588. aborting to a prompt would be able to be resumed. See "Prompt
  1589. Primitives" in the manual for more.
  1590. ** scm_c_prepare_to_wait_on_fd, scm_c_prepare_to_wait_on_cond,
  1591. ** scm_c_wait_finished
  1592. See "Asyncs" in the manual for more.
  1593. ** File descriptor finalizers
  1594. See "Ports and File Descriptors" in the manual.
  1595. ** New inline functions: `scm_new_smob', `scm_new_double_smob'
  1596. These can replace many uses of SCM_NEWSMOB, SCM_RETURN_NEWSMOB2, and the
  1597. like. See XXX in the manual, for more.
  1598. ** New low-level type accessors
  1599. For more on `SCM_HAS_TYP7', `SCM_HAS_TYP7S', `SCM_HAS_TYP16', see XXX.
  1600. `SCM_HEAP_OBJECT_P' is now an alias for the inscrutable `SCM_NIMP'.
  1601. `SCM_UNPACK_POINTER' and `SCM_PACK_POINTER' are better-named versions of
  1602. the old `SCM2PTR' and `PTR2SCM'. Also, `SCM_UNPACK_POINTER' yields a
  1603. void*.
  1604. ** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system
  1605. ** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars'
  1606. Use these instead of `scm_lfwrite'. See the new "Using Ports from C"
  1607. section of the manual, for more.
  1608. ** <standard-vtable>, standard-vtable-fields
  1609. See "Structures" in the manual for more on these.
  1610. ** Convenience utilities for ports and strings.
  1611. See "Conversion to/from C" for more on `scm_from_port_string',
  1612. `scm_from_port_stringn', `scm_to_port_string', and
  1613. `scm_to_port_stringn'.
  1614. ** New expressive PEG parser
  1615. See "PEG Parsing" in the manual for more. Thanks to Michael Lucy for
  1616. originally writing these, and to Noah Lavine for integration work.
  1617. ** `make-stack' now also works on delimited continuations
  1618. ** Better URI-reference support
  1619. The `(web uri)' module now has interfaces for handling URI references,
  1620. which might not have a scheme. The Location header of a web request or
  1621. response is now a URI reference instead of a URI. Also,
  1622. `request-absolute-uri' now has an optional default scheme argument. See
  1623. "Web" in the manual for full details.
  1624. ** formal-name->char, char->formal-name
  1625. See "Characters", in the manual.
  1626. * Incompatible changes
  1627. ** ASCII is not ISO-8859-1
  1628. In Guile 2.0, if a user set "ASCII" or "ANSI_X3.4-1968" as the encoding
  1629. of a port, Guile would treat it as ISO-8859-1. While these encodings
  1630. are the same for codepoints 0 to 127, ASCII does not extend past that
  1631. range, whereas ISO-8859-1 goes up to 255. Guile 2.2 no longer treats
  1632. ASCII as ISO-8859-1. This is likely to be a problem only if the user's
  1633. locale is set to ASCII, and the user or a program writes non-ASCII
  1634. codepoints to a port.
  1635. ** Decoding errors do not advance the read pointer before erroring
  1636. When the user sets a port's conversion strategy to "error", indicating
  1637. that Guile should throw an error if it tries to read from a port whose
  1638. incoming bytes are not valid for the port's encoding, it used to be that
  1639. Guile would advance the read pointer past the bad bytes, and then throw
  1640. an error. This would allow the following `read-char' invocation to
  1641. proceed after the bad bytes. This behavior is incompatible with the
  1642. final R6RS standard, and besides contravenes the user's intention to
  1643. raise an error on bad input. Guile now raises an error without
  1644. advancing the read pointer. To skip over a bad encoding, set the port
  1645. conversion strategy to "substitute" and read a substitute character.
  1646. ** Decoding errors with `substitute' strategy return U+FFFD
  1647. It used to be that decoding errors with the `substitute' conversion
  1648. strategy would replace the bad bytes with a `?' character. This has
  1649. been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in
  1650. accordance with the Unicode recommendations.
  1651. ** API to define new port types from C has changed
  1652. Guile's ports have been completely overhauled to allow Guile developers
  1653. and eventually Guile users to write low-level input and output routines
  1654. in Scheme. The new internals will eventually allow for user-space
  1655. tasklets or green threads that suspend to a scheduler when they would
  1656. cause blocking I/O, allowing users to write straightforward network
  1657. services that parse their input and send their output as if it were
  1658. blocking, while under the hood Guile can multiplex many active
  1659. connections at once.
  1660. At the same time, this change makes Guile's ports implementation much
  1661. more maintainable, rationalizing the many legacy port internals and
  1662. making sure that the abstractions between the user, Guile's core ports
  1663. facility, and the port implementations result in a system that is as
  1664. performant and expressive as possible.
  1665. The interface to the user has no significant change, neither on the C
  1666. side nor on the Scheme side. However this refactoring has changed the
  1667. interface to the port implementor in an incompatible way. See the newly
  1668. expanded "I/O Extensions" in the manual, for full details.
  1669. *** Remove `scm_set_port_mark'
  1670. Port mark functions have not been called since the switch to the BDW
  1671. garbage collector.
  1672. *** Remove `scm_set_port_equalp'
  1673. Likewise port equal functions weren't being called. Given that ports
  1674. have their own internal buffers, it doesn't make sense to hook them into
  1675. equal? anyway.
  1676. *** Remove `scm_set_port_free'
  1677. It used to be that if an open port became unreachable, a special "free"
  1678. function would be called instead of the "close" function. Now that the
  1679. BDW-GC collector allows us to run arbitrary code in finalizers, we can
  1680. simplify to just call "close" on the port and remove the separate free
  1681. functions. Note that hooking into the garbage collector has some
  1682. overhead. For that reason Guile exposes a new interface,
  1683. `scm_set_port_needs_close_on_gc', allowing port implementations to
  1684. indicate to Guile whether they need closing on GC or not.
  1685. *** Remove `scm_set_port_end_input', `scm_set_port_flush'
  1686. As buffering is handled by Guile itself, these functions which were to
  1687. manage an implementation-side buffer are no longer needed.
  1688. *** Change prototype of `scm_make_port_type'
  1689. The `read' (renamed from `fill_input') and `write' functions now operate
  1690. on bytevectors. Also the `mode_bits' argument now inplicitly includes
  1691. SCM_OPN, so you don't need to include these.
  1692. *** Change prototype of port `close' function
  1693. The port close function now returns void.
  1694. *** Port and port type data structures are now opaque
  1695. Port type implementations should now use API to access port state.
  1696. However, since the change to handle port buffering centrally, port type
  1697. implementations rarely need to access unrelated port state.
  1698. *** Port types are now `scm_t_port_type*', not a tc16 value
  1699. `scm_make_port_type' now returns an opaque pointer, not a tc16.
  1700. Relatedly, the limitation that there only be 256 port types has been
  1701. lifted.
  1702. ** String ports default to UTF-8
  1703. Guile 2.0 would use the `%default-port-encoding' when creating string
  1704. ports. This resulted in ports that could only accept a subset of valid
  1705. characters, which was surprising to users. Now string ports default to
  1706. the UTF-8 encoding. Sneaky users can still play encoding conversion
  1707. games with string ports by explicitly setting the encoding of a port
  1708. after it is open. See "Ports" in the manual for more.
  1709. ** `scm_from_stringn' and `scm_to_stringn' encoding arguments are never NULL
  1710. These functions now require a valid `encoding' argument, and will abort
  1711. if given `NULL'.
  1712. ** All r6rs ports are both textual and binary
  1713. Because R6RS ports are a thin layer on top of Guile's ports, and Guile's
  1714. ports are both textual and binary, Guile's R6RS ports are also both
  1715. textual and binary, and thus both kinds have port transcoders. This is
  1716. an incompatibility with respect to R6RS.
  1717. ** Threading facilities moved to (ice-9 threads)
  1718. It used to be that call-with-new-thread and other threading primitives
  1719. were available in the default environment. This is no longer the case;
  1720. they have been moved to (ice-9 threads) instead. Existing code will not
  1721. break, however; we used the deprecation facility to signal a warning
  1722. message while also providing these bindings in the root environment for
  1723. the duration of the 2.2 series.
  1724. ** cancel-thread uses asynchronous interrupts, not pthread_cancel
  1725. See "Asyncs" in the manual, for more on asynchronous interrupts.
  1726. ** SRFI-18 threads, mutexes, cond vars disjoint from Guile
  1727. When we added support for the SRFI-18 threading library in Guile 2.0, we
  1728. did so in a way that made SRFI-18 mutexes the same as Guile mutexes.
  1729. This was a mistake. In Guile our goal is to provide basic,
  1730. well-thought-out, well-implemented, minimal primitives, on top of which
  1731. we can build a variety of opinionated frameworks. Incorporating SRFI-18
  1732. functionality into core Guile caused us to bloat and slow down our core
  1733. threading primitives. Worse, they became very hard to describe; they
  1734. did many things, did them poorly, and all that they did was never
  1735. adequately specified.
  1736. For all of these reasons we have returned to a situation where SRFI-18
  1737. concepts are implemented only in the `(srfi srfi-18)' module. This
  1738. means that SRFI-18 threads are built on Guile threads, but aren't the
  1739. same as Guile threads; calling Guile `thread?' on a thread no longer
  1740. returns true.
  1741. We realize this causes inconvenience to users who use both Guile
  1742. threading interfaces and SRFI-18 interfaces, and we lament the change --
  1743. but we are better off now. We hope the newly revised "Scheduling"
  1744. section in the manual compensates for the headache.
  1745. ** Remove `lock-mutex' "owner" argument
  1746. Mutex owners are a SRFI-18 concept; use SRFI-18 mutexes instead.
  1747. Relatedly, `scm_lock_mutex_timed' taking the owner argument is now
  1748. deprecated; use `scm_timed_lock_mutex' instead.
  1749. ** Remove `unlock-mutex' cond var and timeout arguments
  1750. It used to be that `unlock-mutex' included `wait-condition-variable'
  1751. functionality. This has been deprecated; use SRFI-18 if you want this
  1752. behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed' is
  1753. deprecated; use `scm_unlock_mutex' instead.
  1754. ** Removed `unchecked-unlock' mutex flag
  1755. This flag was introduced for internal use by SRFI-18; use SRFI-18
  1756. mutexes if you need this behaviour.
  1757. ** SRFI-18 mutexes no longer recursive
  1758. Contrary to specification, SRFI-18 mutexes in Guile were recursive.
  1759. This is no longer the case.
  1760. ** Thread cleanup handlers removed
  1761. The `set-thread-cleanup!' and `thread-cleanup' functions that were added
  1762. in Guile 2.0 to support cleanup after thread cancellation are no longer
  1763. needed, since threads can declare cleanup handlers via `dynamic-wind'.
  1764. ** Only threads created by Guile are joinable
  1765. `join-thread' used to work on "foreign" threads that were not created by
  1766. Guile itself, though their join value was always `#f'. This is no
  1767. longer the case; attempting to join a foreign thread will throw an
  1768. error.
  1769. ** Dynamic states capture values, not locations
  1770. Dynamic states used to capture the locations of fluid-value
  1771. associations. Capturing the current dynamic state then setting a fluid
  1772. would result in a mutation of that captured state. Now capturing a
  1773. dynamic state simply captures the current values, and calling
  1774. `with-dynamic-state' copies those values into the Guile virtual machine
  1775. instead of aliasing them in a way that could allow them to be mutated in
  1776. place. This change allows Guile's fluid variables to be thread-safe.
  1777. To capture the locations of a dynamic state, capture a
  1778. `with-dynamic-state' invocation using partial continuations instead.
  1779. ** Remove `frame-procedure'
  1780. Several optimizations in Guile make `frame-procedure' an interface that
  1781. we can no longer support. For background, `frame-procedure' used to
  1782. return the value at slot 0 in a frame, which usually corresponds to the
  1783. SCM value of the procedure being applied. However it could be that this
  1784. slot is re-used for some other value, because the closure was not needed
  1785. in the function. Such a re-use might even be for an untagged value, in
  1786. which case treating slot 0 as a SCM value is quite dangerous. It's also
  1787. possible that so-called "well-known" closures (closures whose callers
  1788. are all known) are optimized in such a way that slot 0 is not a
  1789. procedure but some optimized representation of the procedure's free
  1790. variables. Instead, developers building debugging tools that would like
  1791. access to `frame-procedure' are invited to look at the source for the
  1792. `(system vm frame)' module for alternate interfaces, including the new
  1793. `frame-procedure-name'.
  1794. ** Remove `,procedure' REPL command
  1795. Not all procedures have values, so it doesn't make sense to expose this
  1796. interface to the user. Instead, the `,locals' REPL command will include
  1797. the callee, if it is live.
  1798. ** Remove `frame-local-ref', `frame-local-set!', `frame-num-locals'
  1799. These procedures reference values in a frame on the stack. Since we now
  1800. have unboxed values of different kinds, it is now necessary to specify
  1801. the type when reference locals, and once this incompatible change needs
  1802. to be made, we might as well make these interfaces private. See
  1803. "Frames' in the manual, for more information on the replacements for
  1804. these low-level interfaces.
  1805. ** Vtable hierarchy changes
  1806. In an attempt to make Guile's structure and record types integrate
  1807. better with GOOPS by unifying the vtable hierarchy, `make-vtable-vtable'
  1808. is now deprecated. Instead, users should just use `make-vtable' with
  1809. appropriate arguments. See "Structures" in the manual for all of the
  1810. details. As such, `record-type-vtable' and `%condition-type-vtable' now
  1811. have a parent vtable and are no longer roots of the vtable hierarchy.
  1812. ** Syntax parameters are a distinct type
  1813. Guile 2.0's transitional implementation of `syntax-parameterize' was
  1814. based on the `fluid-let-syntax' interface inherited from the psyntax
  1815. expander. This interface allowed any binding to be dynamically rebound
  1816. -- even bindings like `lambda'. This is no longer the case in Guile
  1817. 2.2. Syntax parameters must be defined via `define-syntax-parameter',
  1818. and only such bindings may be parameterized. See "Syntax Parameters" in
  1819. the manual for more.
  1820. ** Defined identifiers scoped in the current module
  1821. Sometimes Guile's expander would attach incorrect module scoping
  1822. information for top-level bindings made by an expansion. For example,
  1823. given the following R6RS library:
  1824. (library (defconst)
  1825. (export defconst)
  1826. (import (guile))
  1827. (define-syntax-rule (defconst name val)
  1828. (begin
  1829. (define t val)
  1830. (define-syntax-rule (name) t))))
  1831. Attempting to use it would produce an error:
  1832. (import (defconst))
  1833. (defconst foo 42)
  1834. (foo)
  1835. =| Unbound variable: t
  1836. It wasn't clear that we could fix this in Guile 2.0 without breaking
  1837. someone's delicate macros, so the fix is only coming out now.
  1838. ** Pseudo-hygienically rename macro-introduced bindings
  1839. Bindings introduced by macros, like `t' in the `defconst' example above,
  1840. are now given pseudo-fresh names. This allows
  1841. (defconst foo 42)
  1842. (defconst bar 37)
  1843. to introduce different bindings for `t'. These pseudo-fresh names are
  1844. made in such a way that if the macro is expanded again, for example as
  1845. part of a simple recompilation, the introduced identifiers get the same
  1846. pseudo-fresh names. See "Hygiene and the Top-Level" in the manual, for
  1847. details.
  1848. ** Fix literal matching for module-bound literals
  1849. `syntax-rules' and `syntax-case' macros can take a set of "literals":
  1850. bound or unbound keywords that the syntax matcher treats specially.
  1851. Before, literals were always matched symbolically (by name). Now they
  1852. are matched by binding. This allows literals to be reliably bound to
  1853. values, renamed by imports or exports, et cetera. See "Syntax-rules
  1854. Macros" in the manual for more on literals.
  1855. ** Fix bug importing specific bindings with #:select
  1856. It used to be that if #:select didn't find a binding in the public
  1857. interface of a module, it would actually grovel in the module's
  1858. unexported private bindings. This was not intended and is now fixed.
  1859. ** Statically scoped module duplicate handlers
  1860. It used to be that if a module did not specify a #:duplicates handler,
  1861. when a name was first referenced in that module and multiple imported
  1862. modules provide that name, the value of the
  1863. `default-duplicate-binding-handlers' parameter would be used to resolve
  1864. the duplicate bindings. We have changed so that instead a module
  1865. defaults to the set of handlers described in the manual. If the module
  1866. specifies #:duplicates, of course we use that. The
  1867. `default-duplicate-binding-handlers' parameter now simply accesses the
  1868. handlers of the current module, instead of some global value.
  1869. ** Fix too-broad capture of dynamic stack by delimited continuations
  1870. Guile was using explicit stacks to represent, for example, the chain of
  1871. current exception handlers. This means that a delimited continuation
  1872. that captured a "catch" expression would capture the whole stack of
  1873. exception handlers, not just the exception handler added by the "catch".
  1874. This led to strangeness when resuming the continuation in some other
  1875. context like other threads; "throw" could see an invalid stack of
  1876. exception handlers. This has been fixed by the addition of the new
  1877. "fluid-ref*" procedure that can access older values of fluids; in this
  1878. way the exception handler stack is now implicit. See "Fluids and
  1879. Dynamic States" in the manual, for more on fluid-ref*.
  1880. ** `dynamic-wind' doesn't check that guards are thunks
  1881. Checking that the dynamic-wind out-guard procedure was actually a thunk
  1882. before doing the wind was slow, unreliable, and not strictly needed.
  1883. ** All deprecated code removed
  1884. All code deprecated in Guile 2.0 has been removed. See older NEWS, and
  1885. check that your programs can compile without linker warnings and run
  1886. without runtime warnings. See "Deprecation" in the manual.
  1887. In particular, the following functions, which were deprecated in 2.0.10
  1888. but not specifically mentioned earlier in this file, have been removed:
  1889. *** `uniform-vector-read!' and `uniform-vector-write' have been
  1890. removed. Use `get-bytevector-n!' and `put-bytevector' from (rnrs io
  1891. ports) instead.
  1892. ** Remove miscellaneous unused interfaces
  1893. We have removed accidentally public, undocumented interfaces that we
  1894. think are not used, and not useful. This includes `scm_markstream',
  1895. `SCM_FLUSH_REGISTER_WINDOWS', `SCM_THREAD_SWITCHING_CODE', `SCM_FENCE',
  1896. `scm_call_generic_0', `scm_call_generic_1', `scm_call_generic_2'
  1897. `scm_call_generic_3', `scm_apply_generic', and `scm_program_source'.
  1898. `scm_async_click' was renamed to `scm_async_tick', and `SCM_ASYNC_TICK'
  1899. was made private (use `SCM_TICK' instead).
  1900. ** Many internal compiler / VM changes
  1901. As the compiler and virtual machine were re-written, there are many
  1902. changes in the back-end of Guile to interfaces that were introduced in
  1903. Guile 2.0. These changes are only only of interest if you wrote a
  1904. language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
  1905. the case, drop by the IRC channel to discuss the changes.
  1906. ** Defining a SMOB or port type no longer mucks exports of `(oop goops)'
  1907. It used to be that defining a SMOB or port type added an export to
  1908. GOOPS, for the wrapper class of the smob type. This violated
  1909. modularity, though, so we have removed this behavior.
  1910. ** Bytecode replaces objcode as a target language
  1911. One way in which people may have used details of Guile's runtime in
  1912. Guile 2.0 is in compiling code to thunks for later invocation. Instead
  1913. of compiling to objcode and then calling `make-program', now the way to
  1914. do it is to compile to `bytecode' and then call `load-thunk-from-memory'
  1915. from `(system vm loader)'.
  1916. ** Weak pairs removed
  1917. Weak pairs were not safe to access with `car' and `cdr', and so were
  1918. removed.
  1919. ** Weak alist vectors removed
  1920. Use weak hash tables instead.
  1921. ** Weak vectors may no longer be accessed via `vector-ref' et al
  1922. Weak vectors may no longer be accessed with the vector interface. This
  1923. was a source of bugs in the 2.0 Guile implementation, and a limitation
  1924. on using vectors as building blocks for other abstractions. Vectors in
  1925. Guile are now a concrete type; for an abstract interface, use the
  1926. generic array facility (`array-ref' et al).
  1927. ** scm_t_array_implementation removed
  1928. This interface was introduced in 2.0 but never documented. It was a
  1929. failed attempt to layer the array implementation that actually
  1930. introduced too many layers, as it prevented the "vref" and "vset"
  1931. members of scm_t_array_handle (called "ref" and "set" in 1.8, not
  1932. present in 2.0) from specializing on array backing stores.
  1933. Notably, the definition of scm_t_array_handle has now changed, to not
  1934. include the (undocumented) "impl" member. We are sorry for any
  1935. inconvenience this may cause.
  1936. ** `scm_make' is now equivalent to Scheme `make'
  1937. It used to be that `scm_make' only implemented a hard-wired object
  1938. allocation and initialization protocol. This was because `scm_make' was
  1939. used while GOOPS booted its own, more complete `make' implementation in
  1940. Scheme. Now that we've re-implemented everything in Scheme, the C
  1941. `scm_make' now dispatches directly to Scheme `make', which implements
  1942. the full protocol. This change is incompatible in some ways, but on the
  1943. whole is good news for GOOPS users.
  1944. ** GOOPS slot definitions are now objects
  1945. Slot definitions are now instances of a <slot> class, instead of being
  1946. specially formatted lists. To most user code, this is transparent, as
  1947. the slot definition accessors like `slot-definition-name' continue to
  1948. work. However, code that for example uses `car' to get the name of a
  1949. slot definition will need to be updated to use the accessors.
  1950. ** Class slot changes
  1951. Class objects no longer have a `default-slot-definition-class' slot,
  1952. which was never used. They also no longer have slots for hashsets
  1953. (`h0', `h1', and so on up to `h7'), which have been unused since Guile
  1954. 2.0 and were not a great idea.
  1955. There is a new class option, `#:static-slot-allocation?'. See the
  1956. manual for details.
  1957. ** Removal of internal, unintentionally exposed GOOPS C interfaces
  1958. These include: `scm_sys_fast_slot_ref', `scm_sys_fast_slot_set_x'
  1959. `scm_basic_basic_make_class', `scm_sys_compute_slots',
  1960. `scm_sys_prep_layout_x' `scm_t_method', `SCM_METHOD',
  1961. `scm_s_slot_set_x', `SCM_CLASS_CLASS_LAYOUT', `scm_si_slotdef_class',
  1962. `scm_si_generic_function', `scm_si_specializers', `scm_si_procedure',
  1963. `scm_si_formals', `scm_si_body', `scm_si_make_procedure',
  1964. `SCM_CLASS_CLASS_LAYOUT', `SCM_INSTANCE_HASH', `SCM_SET_HASHSET', `union
  1965. scm_t_debug_info', `scm_pure_generic_p', `SCM_PUREGENERICP',
  1966. `SCM_VALIDATE_PUREGENERIC', `SCM_VTABLE_FLAG_GOOPS_PURE_GENERIC',
  1967. `SCM_CLASSF_PURE_GENERIC', `scm_c_extend_primitive_generic',
  1968. `scm_sys_initialize_object', `SCM_CLASS_CLASS_LAYOUT',
  1969. `scm_si_redefined', `scm_si_direct_supers', `scm_si_direct_slots',
  1970. `scm_si_direct_subclasses', `scm_si_direct_methods', `scm_si_cpl'
  1971. `scm_si_slots', `scm_si_getters_n_setters', `SCM_N_CLASS_SLOTS',
  1972. `SCM_OBJ_CLASS_REDEF', `SCM_INST', `SCM_ACCESSORS_OF',
  1973. `scm_sys_allocate_instance', and `scm_sys_invalidate_class_x'.
  1974. * New deprecations
  1975. ** `SCM_FDES_RANDOM_P'
  1976. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1977. ** `_IONBF', `_IOLBF', and `_IOFBF'
  1978. Instead, use the symbol values `none', `line', or `block', respectively,
  1979. as arguments to the `setvbuf' function.
  1980. ** `SCM_FDES_RANDOM_P'
  1981. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1982. ** Arbiters
  1983. Arbiters were an experimental mutual exclusion facility from 20 years
  1984. ago that didn't survive the test of time. Use mutexes or atomic boxes
  1985. instead.
  1986. ** User asyncs
  1987. Guile had (and still has) "system asyncs", which are asynchronous
  1988. interrupts, and also had this thing called "user asyncs", which was a
  1989. trivial unused data structure. Now that we have deprecated the old
  1990. `async', `async-mark', and `run-asyncs' procedures that comprised the
  1991. "user async" facility, we have been able to clarify our documentation to
  1992. only refer to "asyncs".
  1993. ** Critical sections
  1994. Critical sections have long been just a fancy way to lock a mutex and
  1995. defer asynchronous interrupts. Instead of SCM_CRITICAL_SECTION_START,
  1996. make sure you're in a "scm_dynwind_begin (0)" and use
  1997. scm_dynwind_pthread_mutex_lock instead, possibly also with
  1998. scm_dynwind_block_asyncs.
  1999. ** `scm_make_mutex_with_flags'
  2000. Use `scm_make_mutex_with_kind' instead. See "Mutexes and Condition
  2001. Variables" in the manual, for more.
  2002. ** Dynamic roots
  2003. This was a facility that predated threads, was unused as far as we can
  2004. tell, and was never documented. Still, a grep of your code for
  2005. dynamic-root or dynamic_root would not be amiss.
  2006. ** `make-dynamic-state'
  2007. Use `current-dynamic-state' to get an immutable copy of the current
  2008. fluid-value associations.
  2009. ** `with-statprof' macro
  2010. Use the `statprof' procedure instead.
  2011. ** SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1, SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N
  2012. ** SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn
  2013. ** SCM_WTA_DISPATCH_1_SUBR
  2014. These macros were used in dispatching primitive generics. They can be
  2015. replaced by using C functions (the same name but in lower case), if
  2016. needed, but this is a hairy part of Guile that perhaps you shouldn't be
  2017. using.
  2018. ** scm_compute_applicable_methods and scm_find_method
  2019. Use `compute-applicable-methods' from Scheme instead.
  2020. ** scm_no_applicable_method
  2021. Fetch no-applicable-method from the GOOPS exports if you need it.
  2022. ** scm_class_boolean, scm_class_char, scm_class_pair
  2023. ** scm_class_procedure, scm_class_string, scm_class_symbol
  2024. ** scm_class_primitive_generic, scm_class_vector, scm_class_null
  2025. ** scm_class_real, scm_class_complex, scm_class_integer
  2026. ** scm_class_fraction, scm_class_unknown, scm_class_top
  2027. ** scm_class_object, scm_class_class, scm_class_applicable
  2028. ** scm_class_applicable_struct, scm_class_applicable_struct_with_setter
  2029. ** scm_class_generic, scm_class_generic_with_setter, scm_class_accessor
  2030. ** scm_class_extended_generic, scm_class_extended_generic_with_setter
  2031. ** scm_class_extended_accessor, scm_class_method
  2032. ** scm_class_accessor_method, scm_class_procedure_class
  2033. ** scm_class_applicable_struct_class, scm_class_number, scm_class_list
  2034. ** scm_class_keyword, scm_class_port, scm_class_input_output_port
  2035. ** scm_class_input_port, scm_class_output_port, scm_class_foreign_slot
  2036. ** scm_class_self, scm_class_protected, scm_class_hidden
  2037. ** scm_class_opaque, scm_class_read_only, scm_class_protected_hidden
  2038. ** scm_class_protected_opaque, scm_class_protected_read_only
  2039. ** scm_class_scm, scm_class_int, scm_class_float, scm_class_double
  2040. ** scm_port_class, scm_smob_class
  2041. These class exports are now deprecated. Instead, look up the ones you
  2042. need from the GOOPS module, or use `scm_class_of' on particular values.
  2043. ** scm_get_keyword
  2044. Instead from Scheme use kw-arg-ref or real keyword arguments, and from C
  2045. use `scm_c_bind_keyword_arguments'.
  2046. ** scm_slot_ref_using_class, scm_slot_set_using_class_x
  2047. ** scm_slot_bound_using_class_p, scm_slot_exists_using_class_p
  2048. Instead use the normal `scm_slot_ref' and similar procedures.
  2049. * Changes to the distribution
  2050. ** Pre-built binary files in the tarball
  2051. Building Guile from a tarball can now take advantage of a "prebuilt/"
  2052. tree of prebuilt .go files. These compiled files are created when a
  2053. tarball is made, and are used to speed up the build for users of
  2054. official releases.
  2055. These pre-built binaries are not necessary, however: they are not stored
  2056. in revision control and can always be re-created from the source, given
  2057. that Guile can bootstrap itself from its minimal bootstrap C
  2058. interpreter. If you do not want to depend on these pre-built binaries,
  2059. you can "make -C prebuilt clean" before building.
  2060. ** New minor version
  2061. The "effective version" of Guile is now 2.2, which allows parallel
  2062. installation with other effective versions (for example, the older Guile
  2063. 2.0). See "Parallel Installations" in the manual for full details.
  2064. Notably, the `pkg-config' file is now `guile-2.2'.
  2065. ** Bump required libgc version to 7.2, released March 2012.
  2066. ** GUILE_PROGS searches for versioned Guile
  2067. The GUILE_PROGS autoconf macro can take a required version argument. As
  2068. a new change, that version argument is additionally searched for as a
  2069. suffix. For example, GUILE_PROGS(2.2) would look for guile-2.2,
  2070. guile2.2, guile-2, guile2, and then guile. The found prefix is also
  2071. applied to guild, guile-config, and the like. Thanks to Freja Nordsiek
  2072. for this work.
  2073. ** The readline extension is now installed in the extensionsdir
  2074. The shared library that implements Guile's readline extension is no
  2075. longer installed to the libdir. This change should be transparent to
  2076. users, but packagers may be interested.
  2077. Changes in 2.0.14 (since 2.0.13):
  2078. * Bug fixes
  2079. ** Builds of .go files and of Guile itself are now bit-reproducible
  2080. (<http://bugs.gnu.org/20272>)
  2081. ** 'number->locale-string' and 'monetary-amount->locale-string' fixes
  2082. (<http://bugs.gnu.org/24990>)
  2083. ** (system base target) now recognizes "sh3" as a cross-compilation target
  2084. ** Fix race condition in '00-repl-server.test'
  2085. (<http://bugs.gnu.org/24769>)
  2086. ** 'scandir' from (ice-9 ftw) no longer calls 'stat' for each entry
  2087. ** Several documentation improvements
  2088. Changes in 2.0.13 (since 2.0.12):
  2089. * Security fixes
  2090. ** CVE-2016-8606: REPL server now protects against HTTP inter-protocol
  2091. attacks
  2092. Guile 2.x provides a "REPL server" started by the '--listen'
  2093. command-line option or equivalent API (see "REPL Servers" in the
  2094. manual).
  2095. The REPL server is vulnerable to the HTTP inter-protocol attack as
  2096. described at
  2097. <https://en.wikipedia.org/wiki/Inter-protocol_exploitation>, notably the
  2098. HTML form protocol attack described at
  2099. <https://www.jochentopf.com/hfpa/hfpa.pdf>. A "DNS rebinding attack"
  2100. can be combined with this attack and allow an attacker to send arbitrary
  2101. Guile code to the REPL server through web pages accessed by the
  2102. developer, even though the REPL server is listening to a loopback device
  2103. ("localhost"). This was demonstrated in an article entitled "How to
  2104. steal any developer's local database" available at
  2105. <http://bouk.co/blog/hacking-developers/>.
  2106. The REPL server in Guile 2.0.13 now detects attempts to exploit this
  2107. vulnerability. It immediately closes the connection when it receives a
  2108. line that looks like an HTTP request.
  2109. Nevertheless, we recommend binding the REPL server to a Unix-domain
  2110. socket, for instance by running:
  2111. guile --listen=/tmp/guile-socket
  2112. ** CVE-2016-8605: 'mkdir' procedure no longer calls umask(2)
  2113. (<http://bugs.gnu.org/24659>)
  2114. When the second argument to the 'mkdir' procedure was omitted, it would
  2115. call umask(0) followed by umask(previous_umask) and apply the umask to
  2116. mode #o777.
  2117. This was unnecessary and a security issue for multi-threaded
  2118. applications: during a small window the process' umask was set to zero,
  2119. so other threads calling mkdir(2) or open(2) could end up creating
  2120. world-readable/writable/executable directories or files.
  2121. * New interfaces
  2122. ** mkstemp! takes optional "mode" argument
  2123. See "File System" in the manual, for more.
  2124. ** New 'scm_to_uintptr_t' and 'scm_from_uintptr_t' C functions
  2125. * Bug fixes
  2126. ** Fix optimizer bug when compiling fixpoint operator
  2127. ** Fix build error on MinGW
  2128. ** Update 'uname' implementation on MinGW
  2129. ** 'port-encoding' and 'set-port-encoding!' ensure they are passed an
  2130. open port
  2131. ** (system base target) now recognizes Alpha as a cross-compilation target
  2132. Changes in 2.0.12 (since 2.0.11):
  2133. * Notable changes
  2134. ** FFI: Add support for functions that set 'errno'
  2135. When accessing POSIX functions from a system's libc via Guile's dynamic
  2136. FFI, you commonly want to access the 'errno' variable to be able to
  2137. produce useful diagnostic messages.
  2138. This is now possible using 'pointer->procedure' or
  2139. 'scm_pointer_to_procedure_with_errno'. See "Dynamic FFI" in the manual.
  2140. ** The #!r6rs directive now influences read syntax
  2141. The #!r6rs directive now changes the per-port reader options to make
  2142. Guile's reader conform more closely to the R6RS syntax. In particular:
  2143. - It makes the reader case sensitive.
  2144. - It disables the recognition of keyword syntax in conflict with the
  2145. R6RS (and R5RS).
  2146. - It enables the `square-brackets', `hungry-eol-escapes' and
  2147. `r6rs-hex-escapes' reader options.
  2148. ** 'read' now accepts "\(" as equivalent to "("
  2149. This is indented for use at the beginning of lines in multi-line strings
  2150. to avoid confusing Emacs' lisp modes. Previously "\(" was an error.
  2151. ** SRFI-14 character data set upgraded to Unicode 8.0.0
  2152. ** SRFI-19 table of leap seconds updated
  2153. ** 'string-hash', 'read-string', and 'write' have been optimized
  2154. ** GOOPS bug fix for inherited accessor methods
  2155. In the port of GOOPS to Guile 2.0, we introduced a bug related to
  2156. accessor methods. The bug resulted in GOOPS assuming that a slot S in
  2157. an object whose class is C would always be present in instances of all
  2158. subclasses C, and allocated to the same struct index. This is not the
  2159. case for multiple inheritance. This behavior has been fixed to be as it
  2160. was in 1.8.
  2161. One aspect of this change may cause confusion among users. Previously
  2162. if you defined a class C:
  2163. (use-modules (oop goops))
  2164. (define-class C ()
  2165. (a #:getter get-a))
  2166. And now you define a subclass, intending to provide an #:init-value for
  2167. the slot A:
  2168. (define-class D (A)
  2169. (a #:init-value 42))
  2170. Really what you have done is define in D a new slot with the same name,
  2171. overriding the existing slot. The problem comes in that before fixing
  2172. this bug (but not in 1.8), the getter 'get-a' would succeed for
  2173. instances of D, even though 'get-a' should only work for the slot 'a'
  2174. that is defined on class C, not any other slot that happens to have the
  2175. same name and be in a class with C as a superclass.
  2176. It would be possible to "merge" the slot definitions on C and D, but
  2177. that part of the meta-object protocol (`compute-slots' et al) is not
  2178. fully implemented.
  2179. Somewhat relatedly, GOOPS also had a fix around #:init-value on
  2180. class-allocated slots. GOOPS was re-initializing the value of slots
  2181. with #:class or #:each-subclass allocation every time instances of that
  2182. class was allocated. This has been fixed.
  2183. * New interfaces
  2184. ** New SRFI-28 string formatting implementation
  2185. See "SRFI-28" in the manual.
  2186. ** New (ice-9 unicode) module
  2187. See "Characters" in the manual.
  2188. ** Web server
  2189. The (web server) module now exports 'make-server-impl', 'server-impl?',
  2190. and related procedures. Likewise, (web server http) exports 'http'.
  2191. ** New procedures: 'string-utf8-length' and 'scm_c_string_utf8_length'
  2192. See "Bytevectors as Strings" in the manual, for more.
  2193. ** New 'EXIT_SUCCESS' and 'EXIT_FAILURE' Scheme variables
  2194. See "Processes" in the manual.
  2195. ** New C functions to disable automatic SMOB finalization
  2196. The new 'scm_set_automatic_finalization_enabled' C function allows you
  2197. to choose whether automatic object finalization should be enabled (as
  2198. was the case until now, and still is by default.) This is meant for
  2199. applications that are not thread-safe nor async-safe; such applications
  2200. can disable automatic finalization and call the new 'scm_run_finalizers'
  2201. function when appropriate.
  2202. See the "Garbage Collecting Smobs" and "Smobs" sections in the manual.
  2203. ** Cross-compilation to ARM
  2204. More ARM cross-compilation targets are supported: "arm.*eb",
  2205. "^aarch64.*be", and "aarch64".
  2206. * New deprecation
  2207. ** The undocumented and unused C function 'scm_string_hash' is now deprecated
  2208. * Bugs fixed
  2209. ** Compiler
  2210. *** 'call-with-prompt' does not truncate multiple-value returns
  2211. (<http://bugs.gnu.org/14347>)
  2212. *** Use permissions of source file for compiled file
  2213. (<http://bugs.gnu.org/18477>)
  2214. *** Fix bug when inlining some functions with optional arguments
  2215. (<http://bugs.gnu.org/17634>)
  2216. *** Avoid quadratic expansion time in 'and' and 'or' macros
  2217. (<http://bugs.gnu.org/17147>)
  2218. *** Fix expander bug introduced when adding support for tail patterns
  2219. (<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>)
  2220. *** Handle ~p in 'format' warnings (<http://bugs.gnu.org/18299>)
  2221. *** Fix bug that exposed `list' invocations to CSE
  2222. (<http://bugs.gnu.org/21899>)
  2223. *** Reduce eq? and eqv? over constants using equal?
  2224. (<http://bugs.gnu.org/21855>)
  2225. *** Skip invalid .go files found in GUILE_LOAD_COMPILED_PATH
  2226. ** Threads
  2227. *** Fix data races leading to corruption (<http://bugs.gnu.org/22152>)
  2228. ** Memory management
  2229. *** Fix race between SMOB marking and finalization
  2230. (<http://bugs.gnu.org/19883>)
  2231. ** Ports
  2232. *** Fix port position handling on binary input ports
  2233. (<http://bugs.gnu.org/20302>)
  2234. *** Bytevector and custom binary ports to use ISO-8859-1
  2235. (<http://bugs.gnu.org/20200>)
  2236. *** Fix buffer overrun with unbuffered custom binary input ports
  2237. (<http://bugs.gnu.org/19621>)
  2238. *** Fix memory corruption that arose when using 'get-bytevector-n'
  2239. (<http://bugs.gnu.org/17466>)
  2240. ** System
  2241. *** {get,set}sockopt now expect type 'int' for SO_SNDBUF/SO_RCVBUF
  2242. *** 'system*' now available on MS-Windows
  2243. *** 'open-pipe' now available on MS-Windows
  2244. *** Better support for file names containing backslashes on Windows
  2245. ** Web
  2246. *** 'split-and-decode-uri-path' no longer decodes "+" to space
  2247. *** HTTP: Support date strings with a leading space for hours
  2248. (<http://bugs.gnu.org/23421>)
  2249. *** HTTP: Accept empty reason phrases (<http://bugs.gnu.org/22273>)
  2250. *** HTTP: 'Location' header can now contain URI references, not just
  2251. absolute URIs
  2252. *** HTTP: Improve chunked-mode support (<http://bugs.gnu.org/19939>)
  2253. *** HTTP: 'open-socket-for-uri' now sets better OS buffering parameters
  2254. (<http://bugs.gnu.org/15368>)
  2255. ** Miscellaneous
  2256. *** Fix 'atan' procedure when applied to complex numbers
  2257. *** Fix Texinfo to HTML conversion for @itemize and @acronym
  2258. (<http://bugs.gnu.org/21772>)
  2259. *** 'bytevector-fill!' accepts fill arguments greater than 127
  2260. (<http://bugs.gnu.org/19027>)
  2261. *** 'bytevector-copy' correctly copies SRFI-4 homogeneous vectors
  2262. (<http://bugs.gnu.org/18866>)
  2263. *** 'strerror' no longer hangs when passed a non-integer argument
  2264. (<http://bugs.gnu.org/18065>)
  2265. *** 'scm_boot_guile' now gracefully handles argc == 0
  2266. (<http://bugs.gnu.org/18680>)
  2267. *** Fix 'SCM_SMOB_OBJECT_LOC' definition (<http://bugs.gnu.org/18495>)
  2268. *** Fix bug where 'bit-count*' was not using its second argument
  2269. *** SRFI-1 'length+' raises an error for non-lists and dotted lists
  2270. (<http://bugs.gnu.org/17296>)
  2271. *** Add documentation for SXPath (<http://bugs.gnu.org/19478>)
  2272. Changes in 2.0.11 (since 2.0.10):
  2273. This release fixes an embarrassing regression introduced in the C
  2274. interface to SRFI-4 vectors. See
  2275. <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00047.html>
  2276. for details.
  2277. Changes in 2.0.10 (since 2.0.9):
  2278. * Notable changes
  2279. ** New GDB extension to support Guile
  2280. Guile now comes with an extension for GDB 7.8 or later (unreleased at
  2281. the time of writing) that simplifies debugging of C code that uses
  2282. Guile. See "GDB Support" in the manual.
  2283. ** Improved integration between R6RS and native Guile exceptions
  2284. R6RS exception handlers, established using 'with-exception-handler' or
  2285. 'guard', are now able to catch native Guile exceptions, which are
  2286. automatically converted into appropriate R6RS condition objects.
  2287. ** Support for HTTP proxies
  2288. Guile's built-in web client now honors the 'http_proxy' environment
  2289. variable, as well as the new 'current-http-proxy' parameter. See
  2290. "Web Client" in the manual for details.
  2291. ** Lexical syntax improvements
  2292. *** Support |...| symbol notation.
  2293. Guile's core reader and printer now support the R7RS |...| notation
  2294. for writing symbols with arbitrary characters, as a more portable and
  2295. attractive alternative to Guile's native #{...}# notation. To enable
  2296. this notation by default, put one or both of the following in your
  2297. ~/.guile:
  2298. (read-enable 'r7rs-symbols)
  2299. (print-enable 'r7rs-symbols)
  2300. *** Support '#true' and '#false' notation for booleans.
  2301. The booleans '#t' and '#f' may now be written as '#true' and '#false'
  2302. for improved readability, per R7RS.
  2303. *** Recognize '#\escape' character name.
  2304. The escape character '#\esc' may now be written as '#\escape', per R7RS.
  2305. *** Accept "\|" in string literals.
  2306. The pipe character may now be preceded by a backslash, per R7RS.
  2307. ** Custom binary input ports now support 'setvbuf'.
  2308. Until now, ports returned by 'make-custom-binary-input-port' were always
  2309. full-buffered. Now, their buffering mode can be changed using 'setvbuf'.
  2310. ** SRFI-4 predicates and length accessors no longer accept arrays.
  2311. Given that the SRFI-4 accessors don't work for arrays, the fact that the
  2312. predicates and length accessors returned true for arrays was a bug.
  2313. ** GUILE_PROGS now supports specifying a minimum required version.
  2314. The 'GUILE_PROGS' autoconf macro in guile.m4 now allows an optional
  2315. argument to specify a minimum required Guile version. By default, it
  2316. requires Guile >= 2.0. A micro version can also be specified, e.g.:
  2317. GUILE_PROGS([2.0.10])
  2318. ** Error reporting improvements
  2319. *** Improved run-time error reporting in (ice-9 match).
  2320. If no pattern matches in a 'match' form, the datum that failed to match
  2321. is printed along with the location of the failed 'match' invocation.
  2322. *** Print the faulty object upon invalid-keyword errors.
  2323. *** Improved error reporting of procedures defined by define-inlinable.
  2324. *** Improved error reporting for misplaced ellipses in macro definitions.
  2325. *** Improved error checking in 'define-public' and 'module-add!'.
  2326. *** Improved error when 'include' form with relative path is not in a file.
  2327. ** Speed improvements
  2328. *** 'scm_c_read' on ISO-8859-1 (e.g. binary) unbuffered ports is faster.
  2329. *** New inline asm for VM fixnum multiply, for faster overflow checking.
  2330. *** New inline asm for VM fixnum operations on ARM and 32-bit x86.
  2331. *** 'positive?' and 'negative?' are now compiled to VM primitives.
  2332. *** Numerical comparisons with more than 2 arguments are compiled to VM code.
  2333. *** Several R6RS bitwise operators have been optimized.
  2334. ** Miscellaneous
  2335. *** Web: 'content-disposition' headers are now supported.
  2336. *** Web: 'uri-encode' hexadecimal percent-encoding is now uppercase.
  2337. *** Size argument to 'make-doubly-weak-hash-table' is now optional.
  2338. *** Timeout for 'unlock-mutex' and SRFI-18 'mutex-unlock!' may now be #f.
  2339. ** Gnulib update
  2340. Guile's copy of Gnulib was updated to v0.1-92-g546ff82. The following
  2341. modules were imported from Gnulib: copysign, fsync, isfinite, link,
  2342. lstat, mkdir, mkstemp, readlink, rename, rmdir, and unistd.
  2343. * New interfaces
  2344. ** Cooperative REPL servers
  2345. This new facility supports REPLs that run at specified times within an
  2346. existing thread, for example in programs utilizing an event loop or in
  2347. single-threaded programs. This allows for safe access and mutation of
  2348. a program's data structures from the REPL without concern for thread
  2349. synchronization. See "Cooperative REPL Servers" in the manual for
  2350. details.
  2351. ** SRFI-43 (Vector Library)
  2352. Guile now includes SRFI-43, a comprehensive library of vector operations
  2353. analogous to the SRFI-1 list library. See "SRFI-43" in the manual for
  2354. details.
  2355. ** SRFI-64 (A Scheme API for test suites)
  2356. Guile now includes SRFI-64, a flexible framework for creating test
  2357. suites. The reference implementation of SRFI-64 has also been updated
  2358. to fully support earlier versions of Guile.
  2359. ** SRFI-111 (Boxes)
  2360. See "SRFI-111" in the manual.
  2361. ** 'define-values'
  2362. See "Binding multiple return values" in the manual.
  2363. ** Custom ellipsis identifiers using 'with-ellipsis' or SRFI-46.
  2364. Guile now allows macro definitions to use identifiers other than '...'
  2365. as the ellipsis. This is convenient when writing macros that generate
  2366. macro definitions. The desired ellipsis identifier can be given as the
  2367. first operand to 'syntax-rules', as specified in SRFI-46 and R7RS, or by
  2368. using the new 'with-ellipsis' special form in procedural macros. With
  2369. this addition, Guile now fully supports SRFI-46.
  2370. See "Specifying a Custom Ellipsis Identifier" and "Custom Ellipsis
  2371. Identifiers for syntax-case Macros" in the manual for details.
  2372. ** R7RS 'syntax-error'
  2373. Guile now supports 'syntax-error', as specified by R7RS, allowing for
  2374. improved compile-time error reporting from 'syntax-rules' macros. See
  2375. "Reporting Syntax Errors in Macros" in the manual for details.
  2376. ** New procedures to convert association lists into hash tables
  2377. Guile now includes the convenience procedures 'alist->hash-table',
  2378. 'alist->hashq-table', 'alist->hashv-table', and 'alist->hashx-table'.
  2379. See "Hash Table Reference" in the manual.
  2380. ** New predicates: 'exact-integer?' and 'scm_is_exact_integer'
  2381. See "Integers" in the manual.
  2382. ** 'weak-vector-length', 'weak-vector-ref', and 'weak-vector-set!'
  2383. These should now be used to access weak vectors, instead of
  2384. 'vector-length', 'vector-ref', and 'vector-set!'.
  2385. * Manual updates
  2386. ** Improve docs for 'eval-when'.
  2387. Each 'eval-when' condition is now explained in detail, including
  2388. 'expand' which was previously undocumented. (expand load eval) is now
  2389. the recommended set of conditions, instead of (compile load eval).
  2390. See "Eval When" in the manual, for details.
  2391. ** Update the section on SMOBs and memory management.
  2392. See "Defining New Types (Smobs)" in the manual.
  2393. ** Fixes
  2394. *** GOOPS: #:dsupers is the init keyword for the dsupers slot.
  2395. *** 'unfold-right' takes a tail, not a tail generator.
  2396. *** Clarify that 'append!' and 'reverse!' might not mutate.
  2397. *** Fix doc that incorrectly claimed (integer? +inf.0) => #t.
  2398. (http://bugs.gnu.org/16356)
  2399. *** Document that we support SRFI-62 (S-expression comments).
  2400. *** Document that we support SRFI-87 (=> in case clauses).
  2401. *** Document 'equal?' in the list of R6RS incompatibilities.
  2402. *** Remove outdated documentation of LTDL_LIBRARY_PATH.
  2403. *** Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.
  2404. *** Fix 'my-or' examples to use let-bound variable.
  2405. (http://bugs.gnu.org/14203)
  2406. * New deprecations
  2407. ** General 'uniform-vector' interface
  2408. This interface lacked both generality and specificity. The general
  2409. replacements are 'array-length', 'array-ref', and friends on the scheme
  2410. side, and the array handle interface on the C side. On the specific
  2411. side of things, there are the specific bytevector, SRFI-4, and bitvector
  2412. interfaces.
  2413. ** Use of the vector interface on arrays
  2414. ** 'vector-length', 'vector-ref', and 'vector-set!' on weak vectors
  2415. ** 'vector-length', 'vector-ref', and 'vector-set!' as primitive-generics
  2416. Making the vector interface operate only on a single representation will
  2417. allow future versions of Guile to compile loops involving vectors to
  2418. more efficient native code.
  2419. ** 'htons', 'htonl', 'ntohs', 'ntohl'
  2420. These procedures, like their C counterpart, were used to convert numbers
  2421. to/from network byte order, typically in conjunction with the
  2422. now-deprecated uniform vector API.
  2423. This functionality is now covered by the bytevector and binary I/O APIs.
  2424. See "Interpreting Bytevector Contents as Integers" in the manual.
  2425. ** 'gc-live-object-stats'
  2426. It hasn't worked in the whole 2.0 series. There is no replacement,
  2427. unfortunately.
  2428. ** 'scm_c_program_source'
  2429. This internal VM function was not meant to be public. Use
  2430. 'scm_procedure_source' instead.
  2431. * Build fixes
  2432. ** Fix build with Clang 3.4.
  2433. ** MinGW build fixes
  2434. *** Do not add $(EXEEXT) to guild or guile-tools.
  2435. *** tests: Use double quotes around shell arguments, for Windows.
  2436. *** tests: Don't rely on $TMPDIR and /tmp on Windows.
  2437. *** tests: Skip FFI tests that use `qsort' when it's not accessible.
  2438. *** tests: Remove symlink only when it exists.
  2439. *** tests: Don't rely on `scm_call_2' being visible.
  2440. ** Fix computation of LIBLOBJS so dependencies work properly.
  2441. (http://bugs.gnu.org/14193)
  2442. * Bug fixes
  2443. ** Web: Fix web client with methods other than GET.
  2444. (http://bugs.gnu.org/15908)
  2445. ** Web: Add Content-Length header for empty bodies.
  2446. ** Web: Accept "UTC" as the zone offset in date headers.
  2447. (http://bugs.gnu.org/14128)
  2448. ** Web: Don't throw if a response is longer than its Content-Length says.
  2449. ** Web: Write out HTTP Basic auth headers correctly.
  2450. (http://bugs.gnu.org/14370)
  2451. ** Web: Always print a path component in 'write-request-line'.
  2452. ** Fix 'define-public' from (ice-9 curried-definitions).
  2453. ** psyntax: toplevel variable definitions discard previous syntactic binding.
  2454. (http://bugs.gnu.org/11988)
  2455. ** Fix thread-unsafe lazy initializations.
  2456. ** Make (ice-9 popen) thread-safe.
  2457. (http://bugs.gnu.org/15683)
  2458. ** Make guardians thread-safe.
  2459. ** Make regexp_exec thread-safe.
  2460. (http://bugs.gnu.org/14404)
  2461. ** vm: Gracefully handle stack overflows.
  2462. (http://bugs.gnu.org/15065)
  2463. ** Fix 'rationalize'.
  2464. (http://bugs.gnu.org/14905)
  2465. ** Fix inline asm for VM fixnum operations on x32.
  2466. ** Fix 'SCM_SYSCALL' to really swallow EINTR.
  2467. ** Hide EINTR returns from 'accept'.
  2468. ** SRFI-19: Update the table of leap seconds.
  2469. ** Add missing files to the test-suite Makefile.
  2470. ** Make sure 'ftw' allows directory traversal when running as root.
  2471. ** Fix 'hash-for-each' for weak hash tables.
  2472. ** SRFI-18: Export 'current-thread'.
  2473. (http://bugs.gnu.org/16890)
  2474. ** Fix inlining of tail list to apply.
  2475. (http://bugs.gnu.org/15533)
  2476. ** Fix bug in remqueue in threads.c when removing last element.
  2477. ** Fix build when '>>' on negative integers is not arithmetic.
  2478. ** Fix 'bitwise-bit-count' for negative arguments.
  2479. (http://bugs.gnu.org/14864)
  2480. ** Fix VM 'ash' for right shifts by large amounts.
  2481. (http://bugs.gnu.org/14864)
  2482. ** Fix rounding in scm_i_divide2double for negative arguments.
  2483. ** Avoid lossy conversion from inum to double in numerical comparisons.
  2484. ** Fix numerical comparison of fractions to infinities.
  2485. ** Allow fl+ and fl* to accept zero arguments.
  2486. (http://bugs.gnu.org/14869)
  2487. ** flonum? returns false for complex number objects.
  2488. (http://bugs.gnu.org/14866)
  2489. ** flfinite? applied to a NaN returns false.
  2490. (http://bugs.gnu.org/14868)
  2491. ** Flonum operations always return flonums.
  2492. (http://bugs.gnu.org/14871)
  2493. ** min and max: NaNs beat infinities, per R6RS errata.
  2494. (http://bugs.gnu.org/14865)
  2495. ** Fix 'fxbit-count' for negative arguments.
  2496. ** 'gcd' and 'lcm' support inexact integer arguments.
  2497. (http://bugs.gnu.org/14870)
  2498. ** Fix R6RS 'fixnum-width'.
  2499. (http://bugs.gnu.org/14879)
  2500. ** tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
  2501. (http://bugs.gnu.org/14042)
  2502. ** Fix display of symbols containing backslashes.
  2503. (http://bugs.gnu.org/15033)
  2504. ** Fix truncated-print for uniform vectors.
  2505. ** Define `AF_UNIX' only when Unix-domain sockets are supported.
  2506. ** Decompiler: fix handling of empty 'case-lambda' expressions.
  2507. ** Fix handling of signed zeroes and infinities in 'numerator' and 'denominator'.
  2508. ** dereference-pointer: check for null pointer.
  2509. ** Optimizer: Numerical comparisons are not negatable, for correct NaN handling.
  2510. ** Compiler: Evaluate '-' and '/' in left-to-right order.
  2511. (for more robust floating-point arithmetic)
  2512. ** snarf.h: Declare static const function name vars as SCM_UNUSED.
  2513. ** chars.c: Remove duplicate 'const' specifiers.
  2514. ** Modify SCM_UNPACK type check to avoid warnings in clang.
  2515. ** Arrange so that 'file-encoding' does not truncate the encoding name.
  2516. (http://bugs.gnu.org/16463)
  2517. ** Improve error checking in bytevector->uint-list and bytevector->sint-list.
  2518. (http://bugs.gnu.org/15100)
  2519. ** Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum.
  2520. ** i18n: Fix null pointer dereference when locale info is missing.
  2521. ** Fix 'string-copy!' to work properly with overlapping src/dest.
  2522. ** Fix hashing of vectors to run in bounded time.
  2523. ** 'port-position' works on CBIPs that do not support 'set-port-position!'.
  2524. ** Custom binary input ports sanity-check the return value of 'read!'.
  2525. ** bdw-gc.h: Check SCM_USE_PTHREAD_THREADS using #if not #ifdef.
  2526. ** REPL Server: Don't establish a SIGINT handler.
  2527. ** REPL Server: Redirect warnings to client socket.
  2528. ** REPL Server: Improve robustness of 'stop-server-and-clients!'.
  2529. ** Add srfi-16, srfi-30, srfi-46, srfi-62, srfi-87 to %cond-expand-features.
  2530. ** Fix trap handlers to handle applicable structs.
  2531. (http://bugs.gnu.org/15691)
  2532. ** Fix optional end argument in `uniform-vector-read!'.
  2533. (http://bugs.gnu.org/15370)
  2534. ** Fix brainfuck->scheme compiler.
  2535. ** texinfo: Fix newline preservation in @example with lines beginning with @
  2536. ** C standards conformance improvements
  2537. Improvements and bug fixes were made to the C part of Guile's run-time
  2538. support (libguile).
  2539. *** Don't use the identifier 'noreturn'.
  2540. (http://bugs.gnu.org/15798)
  2541. *** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
  2542. *** Improve fallback implemention of SCM_SRS to avoid unspecified behavior.
  2543. *** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
  2544. *** Improve compliance with C standards regarding signed integer shifts.
  2545. *** Avoid signed overflow in random.c.
  2546. *** VM: Avoid signed overflows in 'add1' and 'sub1'.
  2547. *** VM: Avoid overflow in ASM_ADD when the result is most-positive-fixnum.
  2548. *** read: Avoid signed integer overflow in 'read_decimal_integer'.
  2549. Changes in 2.0.9 (since 2.0.7):
  2550. Note: 2.0.8 was a brown paper bag release that was never announced, but
  2551. some mirrors may have picked it up. Please do not use it.
  2552. * Notable changes
  2553. ** New keyword arguments for procedures that open files
  2554. The following procedures that open files now support keyword arguments
  2555. to request binary I/O or to specify the character encoding for text
  2556. files: `open-file', `open-input-file', `open-output-file',
  2557. `call-with-input-file', `call-with-output-file', `with-input-from-file',
  2558. `with-output-to-file', and `with-error-to-file'.
  2559. It is also now possible to specify whether Guile should scan files for
  2560. Emacs-style coding declarations. This scan was done by default in
  2561. versions 2.0.0 through 2.0.7, but now must be explicitly requested.
  2562. See "File Ports" in the manual for details.
  2563. ** Rewritten guile.m4
  2564. The `guile.m4' autoconf macros have been rewritten to use `guild' and
  2565. `pkg-config' instead of the deprecated `guile-config' (which itself
  2566. calls pkg-config).
  2567. There is also a new macro, `GUILE_PKG', which allows packages to select
  2568. the version of Guile that they want to compile against. See "Autoconf
  2569. Macros" in the manual, for more information.
  2570. ** Better Windows support
  2571. Guile now correctly identifies absolute paths on Windows (MinGW), and
  2572. creates files on that platform according to its path conventions. See
  2573. "File System" in the manual, for all details.
  2574. In addition, the new Gnulib imports provide `select' and `poll' on
  2575. Windows builds.
  2576. As an incompatible change, systems that are missing <sys/select.h> were
  2577. previously provided a public `scm_std_select' C function that defined a
  2578. version of `select', but unhappily it also provided its own incompatible
  2579. definitions for FD_SET, FD_ZERO, and other system interfaces. Guile
  2580. should not be setting these macros in public API, so this interface was
  2581. removed on those plaforms (basically only MinGW).
  2582. ** Numerics improvements
  2583. `number->string' now reliably outputs enough digits to produce the same
  2584. number when read back in. Previously, it mishandled subnormal numbers
  2585. (printing them as "#.#"), and failed to distinguish between some
  2586. distinct inexact numbers, e.g. 1.0 and (+ 1.0 (expt 2.0 -52)). These
  2587. problems had far-reaching implications, since the compiler uses
  2588. `number->string' to serialize numeric constants into .go files.
  2589. `sqrt' now produces exact rational results when possible, and handles
  2590. very large or very small numbers more robustly.
  2591. A number (ahem) of operations involving exact rationals have been
  2592. optimized, most notably `integer-expt' and `expt'.
  2593. `exact->inexact' now performs correct IEEE rounding.
  2594. ** New optimizations
  2595. There were a number of improvements to the partial evaluator, allowing
  2596. complete reduction of forms such as:
  2597. ((let ((_ 10)) (lambda () _)))
  2598. ((lambda _ _))
  2599. (apply (lambda _ _) 1 2 3 '(4))
  2600. (call-with-values (lambda () (values 1 2)) (lambda _ _))
  2601. `string-join' now handles huge lists efficiently.
  2602. `get-bytevector-some' now uses buffered input, which is much faster.
  2603. Finally, `array-ref', `array-set!' on arrays of rank 1 or 2 is now
  2604. faster, because it avoids building a rest list. Similarly, the
  2605. one-argument case of `array-for-each' and `array-map!' has been
  2606. optimized, and `array-copy!' and `array-fill!' are faster.
  2607. ** `peek-char' no longer consumes EOF
  2608. As required by the R5RS, if `peek-char' returns EOF, then the next read
  2609. will also return EOF. Previously `peek-char' would consume the EOF.
  2610. This makes a difference for terminal devices where it is possible to
  2611. read past an EOF.
  2612. ** Gnulib update
  2613. Guile's copy of Gnulib was updated to v0.0-7865-ga828bb2. The following
  2614. modules were imported from Gnulib: select, times, pipe-posix, fstat,
  2615. getlogin, poll, and c-strcase.
  2616. ** `include' resolves relative file names relative to including file
  2617. Given a relative file name, `include' will look for it relative to the
  2618. directory of the including file. This harmonizes the behavior of
  2619. `include' with that of `load'.
  2620. ** SLIB compatibility restored
  2621. Guile 2.0.8 is now compatible with SLIB. You will have to use a
  2622. development version of SLIB, however, until a new version of SLIB is
  2623. released.
  2624. ** Better ,trace REPL command
  2625. Sometimes the ,trace output for nested function calls could overflow the
  2626. terminal width, which wasn't useful. Now there is a limit to the amount
  2627. of space the prefix will take. See the documentation for ",trace" for
  2628. more information.
  2629. ** Better docstring syntax supported for `case-lambda'
  2630. Docstrings can now be placed immediately after the `case-lambda' or
  2631. `case-lambda*' keyword. See "Case-lambda" in the manual.
  2632. ** Improved handling of Unicode byte order marks
  2633. See "BOM Handling" in the manual for details.
  2634. ** Update predefined character sets to Unicode 6.2
  2635. ** GMP 4.2 or later required
  2636. Guile used to require GMP at least version 4.1 (released in May 2002),
  2637. and now requires at least version 4.2 (released in March 2006).
  2638. * Manual updates
  2639. ** Better SXML documentation
  2640. The documentation for SXML modules was much improved, though there is
  2641. still far to go. See "SXML" in manual.
  2642. ** Style updates
  2643. Use of "iff" was replaced with standard English. Keyword arguments are
  2644. now documented consistently, along with their default values.
  2645. ** An end to the generated-documentation experiment
  2646. When Guile 2.0 imported some modules from Guile-Lib, they came with a
  2647. system that generated documentation from docstrings and module
  2648. commentaries. This produced terrible documentation. We finally bit the
  2649. bullet and incorporated these modules into the main text, and will be
  2650. improving them manually over time, as is the case with SXML. Help is
  2651. appreciated.
  2652. ** New documentation
  2653. There is now documentation for `scm_array_type', and `scm_array_ref', as
  2654. well as for the new `array-length' / 'scm_c_array_length' /
  2655. `scm_array_length' functions. `array-in-bounds?' has better
  2656. documentation as well. The `program-arguments-alist' and
  2657. `program-lambda-list' functions are now documented, as well as `and=>',
  2658. `exit', and `quit'. The (system repl server) module is now documented
  2659. (see REPL Servers). Finally, the GOOPS class hierarchy diagram has been
  2660. regenerated for the web and print output formats.
  2661. * New deprecations
  2662. ** Deprecate generalized vector interface
  2663. The generalized vector interface, introduced in 1.8.0, is simply a
  2664. redundant, verbose interface to arrays of rank 1. `array-ref' and
  2665. similar functions are entirely sufficient. Thus,
  2666. `scm_generalized_vector_p', `scm_generalized_vector_length',
  2667. `scm_generalized_vector_ref', `scm_generalized_vector_set_x', and
  2668. `scm_generalized_vector_to_list' are now deprecated.
  2669. ** Deprecate SCM_CHAR_CODE_LIMIT and char-code-limit
  2670. These constants were defined to 256, which is not the highest codepoint
  2671. supported by Guile. Given that they were useless and incorrect, they
  2672. have been deprecated.
  2673. ** Deprecate `http-get*'
  2674. The new `#:streaming?' argument to `http-get' subsumes the functionality
  2675. of `http-get*' (introduced in 2.0.7). Also, the `#:extra-headers'
  2676. argument is deprecated in favor of `#:headers'.
  2677. ** Deprecate (ice-9 mapping)
  2678. This module, present in Guile since 1996 but never used or documented,
  2679. has never worked in Guile 2.0. It has now been deprecated and will be
  2680. removed in Guile 2.2.
  2681. ** Deprecate undocumented array-related C functions
  2682. These are `scm_array_fill_int', `scm_ra_eqp', `scm_ra_lessp',
  2683. `scm_ra_leqp', `scm_ra_grp', `scm_ra_greqp', `scm_ra_sum',
  2684. `scm_ra_product', `scm_ra_difference', `scm_ra_divide', and
  2685. `scm_array_identity'.
  2686. * New interfaces
  2687. ** SRFI-41 Streams
  2688. See "SRFI-41" in the manual.
  2689. ** SRFI-45 exports `promise?'
  2690. SRFI-45 now exports a `promise?' procedure that works with its promises.
  2691. Also, its promises now print more nicely.
  2692. ** New HTTP client procedures
  2693. See "Web Client" for documentation on the new `http-head', `http-post',
  2694. `http-put', `http-delete', `http-trace', and `http-options' procedures,
  2695. and also for more options to `http-get'.
  2696. ** Much more capable `xml->sxml'
  2697. See "Reading and Writing XML" for information on how the `xml->sxml'
  2698. parser deals with namespaces, processed entities, doctypes, and literal
  2699. strings. Incidentally, `current-ssax-error-port' is now a parameter
  2700. object.
  2701. ** New procedures for converting strings to and from bytevectors
  2702. See "Representing Strings as Bytes" for documention on the new `(ice-9
  2703. iconv)' module and its `bytevector->string' and `string->bytevector'
  2704. procedures.
  2705. ** Escape continuations with `call/ec' and `let/ec'
  2706. See "Prompt Primitives".
  2707. ** New procedures to read all characters from a port
  2708. See "Line/Delimited" in the manual for documentation on `read-string'
  2709. and `read-string!'.
  2710. ** New procedure `sendfile'
  2711. See "File System".
  2712. ** New procedure `unget-bytevector'
  2713. See "R6RS Binary Input".
  2714. ** New C helper: `scm_c_bind_keyword_arguments'
  2715. See "Keyword Procedures".
  2716. ** New command-line arguments: `--language' and `-C'
  2717. See "Command-line Options" in the manual.
  2718. ** New environment variables: `GUILE_STACK_SIZE', `GUILE_INSTALL_LOCALE'
  2719. See "Environment Variables".
  2720. ** New procedures for dealing with file names
  2721. See "File System" for documentation on `system-file-name-convention',
  2722. `file-name-separator?', `absolute-file-name?', and
  2723. `file-name-separator-string'.
  2724. ** `array-length', an array's first dimension
  2725. See "Array Procedures".
  2726. ** `hash-count', for hash tables
  2727. See "Hash Tables".
  2728. ** `round-ash', a bit-shifting operator that rounds on right-shift
  2729. See "Bitwise Operations".
  2730. ** New foreign types: `ssize_t', `ptrdiff_t'
  2731. See "Foreign Types".
  2732. ** New C helpers: `scm_from_ptrdiff_t', `scm_to_ptrdiff_t'
  2733. See "Integers".
  2734. ** Socket option `SO_REUSEPORT' now available from Scheme
  2735. If supported on the platform, `SO_REUSEPORT' is now available from
  2736. Scheme as well. See "Network Sockets and Communication".
  2737. ** `current-language' in default environment
  2738. Previously defined only in `(system base language)', `current-language'
  2739. is now defined in the default environment, and is used to determine the
  2740. language for the REPL, and for `compile-and-load'.
  2741. ** New procedure: `fluid->parameter'
  2742. See "Parameters", for information on how to convert a fluid to a
  2743. parameter.
  2744. ** New `print' REPL option
  2745. See "REPL Commands" in the manual for information on the new
  2746. user-customizable REPL printer.
  2747. ** New variable: %site-ccache-dir
  2748. The "Installing Site Packages" and "Build Config" manual sections now
  2749. refer to this variable to describe where users should install their
  2750. `.go' files.
  2751. * Build fixes
  2752. ** Fix compilation against libgc 7.3.
  2753. ** Fix cross-compilation of `c-tokenize.o'.
  2754. ** Fix warning when compiling against glibc 2.17.
  2755. ** Fix documentation build against Texinfo 5.0.
  2756. ** Fix building Guile from a directory with non-ASCII characters.
  2757. ** Fix native MinGW build.
  2758. ** Fix --disable-posix build.
  2759. ** Fix MinGW builds with networking, POSIX, and thread support.
  2760. * Bug fixes
  2761. ** Fix inexact number printer.
  2762. (http://bugs.gnu.org/13757)
  2763. ** Fix infinite loop when parsing optional-argument short options (SRFI-37).
  2764. (http://bugs.gnu.org/13176)
  2765. ** web: Support non-GMT date headers in the HTTP client.
  2766. (http://bugs.gnu.org/13544)
  2767. ** web: support IP-literal (IPv6 address) in Host header.
  2768. ** Avoid stack overflows with `par-map' and nested futures in general.
  2769. (http://bugs.gnu.org/13188)
  2770. ** Peek-char no longer consumes EOF.
  2771. (http://bugs.gnu.org/12216)
  2772. ** Avoid swallowing multiple EOFs in R6RS binary-input procedures.
  2773. ** A fork when multiple threads are running will now print a warning.
  2774. ** Allow for spurious wakeups from pthread_cond_wait.
  2775. (http://bugs.gnu.org/10641)
  2776. ** Warn and ignore module autoload failures.
  2777. (http://bugs.gnu.org/12202)
  2778. ** Use chmod portably in (system base compile).
  2779. (http://bugs.gnu.org/10474)
  2780. ** Fix response-body-port for HTTP responses without content-length.
  2781. (http://bugs.gnu.org/13857)
  2782. ** Allow case-lambda expressions with no clauses.
  2783. (http://bugs.gnu.org/9776)
  2784. ** Improve standards conformance of string->number.
  2785. (http://bugs.gnu.org/11887)
  2786. ** Support calls and tail-calls with more than 255 formals.
  2787. ** ,option evaluates its right-hand-side.
  2788. (http://bugs.gnu.org/13076)
  2789. ** Structs with tail arrays are not simple.
  2790. (http://bugs.gnu.org/12808)
  2791. ** Make `SCM_LONG_BIT' usable in preprocessor conditionals.
  2792. (http://bugs.gnu.org/13848)
  2793. ** Fix thread-unsafe lazy initializations.
  2794. ** Allow SMOB mark procedures to be called from parallel markers.
  2795. (http://bugs.gnu.org/13611)
  2796. ** Fix later-bindings-win logic in with-fluids.
  2797. (http://bugs.gnu.org/13843)
  2798. ** Fix duplicate removal of with-fluids.
  2799. (http://bugs.gnu.org/13838)
  2800. ** Support calling foreign functions of 10 arguments or more.
  2801. (http://bugs.gnu.org/13809)
  2802. ** Let reverse! accept arbitrary types as second argument.
  2803. (http://bugs.gnu.org/13835)
  2804. ** Recognize the `x86_64.*-gnux32' triplet.
  2805. ** Check whether a triplet's OS part specifies an ABI.
  2806. ** Recognize mips64* as having 32-bit pointers by default.
  2807. ** Use portable sed constructs.
  2808. (http://bugs.gnu.org/14042)
  2809. ** Remove language/glil/decompile-assembly.scm.
  2810. (http://bugs.gnu.org/10622)
  2811. ** Use O_BINARY in `copy-file', `load-objcode', `mkstemp'.
  2812. ** Use byte-oriented functions in `get-bytevector*'.
  2813. ** Fix abort when iconv swallows BOM from UTF-16 or UTF-32 stream.
  2814. ** Fix compilation of functions with more than 255 local variables.
  2815. ** Fix `getgroups' for when zero supplementary group IDs exist.
  2816. ** Allow (define-macro name (lambda ...)).
  2817. ** Various fixes to the (texinfo) modules.
  2818. ** guild: Gracefully handle failures to install the locale.
  2819. ** Fix format string warnings for ~!, ~|, ~/, ~q, ~Q, and ~^.
  2820. (http://bugs.gnu.org/13485)
  2821. ** Fix source annotation bug in psyntax 'expand-body'.
  2822. ** Ecmascript: Fix conversion to boolean for non-numbers.
  2823. ** Use case-insensitive comparisons for encoding names.
  2824. ** Add missing cond-expand feature identifiers.
  2825. ** A failure to find a module's file does not prevent future loading.
  2826. ** Many (oop goops save) fixes.
  2827. ** `http-get': don't shutdown write end of socket.
  2828. (http://bugs.gnu.org/13095)
  2829. ** Avoid signed integer overflow in scm_product.
  2830. ** http: read-response-body always returns bytevector or #f, never EOF.
  2831. ** web: Correctly detect "No route to host" conditions.
  2832. ** `system*': failure to execvp no longer leaks dangling processes.
  2833. (http://bugs.gnu.org/13166)
  2834. ** More sensible case-lambda* dispatch.
  2835. (http://bugs.gnu.org/12929)
  2836. ** Do not defer expansion of internal define-syntax forms.
  2837. (http://bugs.gnu.org/13509)
  2838. Changes in 2.0.7 (since 2.0.6):
  2839. * Notable changes
  2840. ** SRFI-105 curly infix expressions are supported
  2841. Curly infix expressions as described at
  2842. http://srfi.schemers.org/srfi-105/srfi-105.html are now supported by
  2843. Guile's reader. This allows users to write things like {a * {b + c}}
  2844. instead of (* a (+ b c)). SRFI-105 support is enabled by using the
  2845. `#!curly-infix' directive in source code, or the `curly-infix' reader
  2846. option. See the manual for details.
  2847. ** Reader options may now be per-port
  2848. Historically, `read-options' and related procedures would manipulate
  2849. global options, affecting the `read' procedure for all threads, and all
  2850. current uses of `read'.
  2851. Guile can now associate `read' options with specific ports, allowing
  2852. different ports to use different options. For instance, the
  2853. `#!fold-case' and `#!no-fold-case' reader directives have been
  2854. implemented, and their effect is to modify the current read options of
  2855. the current port only; similarly for `#!curly-infix'. Thus, it is
  2856. possible, for instance, to have one port reading case-sensitive code,
  2857. while another port reads case-insensitive code.
  2858. ** Futures may now be nested
  2859. Futures may now be nested: a future can itself spawn and then `touch'
  2860. other futures. In addition, any thread that touches a future that has
  2861. not completed now processes other futures while waiting for the touched
  2862. future to completed. This allows all threads to be kept busy, and was
  2863. made possible by the use of delimited continuations (see the manual for
  2864. details.)
  2865. Consequently, `par-map' and `par-for-each' have been rewritten and can
  2866. now use all cores.
  2867. ** `GUILE_LOAD_PATH' et al can now add directories to the end of the path
  2868. `GUILE_LOAD_PATH' and `GUILE_LOAD_COMPILED_PATH' can now be used to add
  2869. directories to both ends of the load path. If the special path
  2870. component `...' (ellipsis) is present in these environment variables,
  2871. then the default path is put in place of the ellipsis, otherwise the
  2872. default path is placed at the end. See "Environment Variables" in the
  2873. manual for details.
  2874. ** `load-in-vicinity' search for `.go' files in `%load-compiled-path'
  2875. Previously, `load-in-vicinity' would look for compiled files in the
  2876. auto-compilation cache, but not in `%load-compiled-path'. This is now
  2877. fixed. This affects `load', and the `-l' command-line flag. See
  2878. <http://bugs.gnu.org/12519> for details.
  2879. ** Extension search order fixed, and LD_LIBRARY_PATH preserved
  2880. Up to 2.0.6, Guile would modify the `LD_LIBRARY_PATH' environment
  2881. variable (or whichever is relevant for the host OS) to insert its own
  2882. default extension directories in the search path (using GNU libltdl
  2883. facilities was not possible here.) This approach was problematic in two
  2884. ways.
  2885. First, the `LD_LIBRARY_PATH' modification would be visible to
  2886. sub-processes, and would also affect future calls to `dlopen', which
  2887. could lead to subtle bugs in the application or sub-processes. Second,
  2888. when the installation prefix is /usr, the `LD_LIBRARY_PATH' modification
  2889. would typically end up inserting /usr/lib before /usr/local/lib in the
  2890. search path, which is often the opposite of system-wide settings such as
  2891. `ld.so.conf'.
  2892. Both issues have now been fixed.
  2893. ** `make-vtable-vtable' is now deprecated
  2894. Programs should instead use `make-vtable' and `<standard-vtable>'.
  2895. ** The `-Wduplicate-case-datum' and `-Wbad-case-datum' are enabled
  2896. These recently introduced warnings have been documented and are now
  2897. enabled by default when auto-compiling.
  2898. ** Optimize calls to `equal?' or `eqv?' with a constant argument
  2899. The compiler simplifies calls to `equal?' or `eqv?' with a constant
  2900. argument to use `eq?' instead, when applicable.
  2901. * Manual updates
  2902. ** SRFI-9 records now documented under "Compound Data Types"
  2903. The documentation of SRFI-9 record types has been moved in the "Compound
  2904. Data Types", next to Guile's other record APIs. A new section
  2905. introduces the various record APIs, and describes the trade-offs they
  2906. make. These changes were made in an attempt to better guide users
  2907. through the maze of records API, and to recommend SRFI-9 as the main
  2908. API.
  2909. The documentation of Guile's raw `struct' API has also been improved.
  2910. ** (ice-9 and-let-star) and (ice-9 curried-definitions) now documented
  2911. These modules were missing from the manual.
  2912. * New interfaces
  2913. ** New "functional record setters" as a GNU extension of SRFI-9
  2914. The (srfi srfi-9 gnu) module now provides three new macros to deal with
  2915. "updates" of immutable records: `define-immutable-record-type',
  2916. `set-field', and `set-fields'.
  2917. The first one allows record type "functional setters" to be defined;
  2918. such setters keep the record unchanged, and instead return a new record
  2919. with only one different field. The remaining macros provide the same
  2920. functionality, and also optimize updates of multiple or nested fields.
  2921. See the manual for details.
  2922. ** web: New `http-get*', `response-body-port', and `text-content-type?'
  2923. procedures
  2924. These procedures return a port from which to read the response's body.
  2925. Unlike `http-get' and `read-response-body', they allow the body to be
  2926. processed incrementally instead of being stored entirely in memory.
  2927. The `text-content-type?' predicate allows users to determine whether the
  2928. content type of a response is textual.
  2929. See the manual for details.
  2930. ** `string-split' accepts character sets and predicates
  2931. The `string-split' procedure can now be given a SRFI-14 character set or
  2932. a predicate, instead of just a character.
  2933. ** R6RS SRFI support
  2934. Previously, in R6RS modules, Guile incorrectly ignored components of
  2935. SRFI module names after the SRFI number, making it impossible to specify
  2936. sub-libraries. This release corrects this, bringing us into accordance
  2937. with SRFI 97.
  2938. ** `define-public' is no a longer curried definition by default
  2939. The (ice-9 curried-definitions) should be used for such uses. See the
  2940. manual for details.
  2941. * Build fixes
  2942. ** Remove reference to `scm_init_popen' when `fork' is unavailable
  2943. This fixes a MinGW build issue (http://bugs.gnu.org/12477).
  2944. ** Fix race between installing `guild' and the `guile-tools' symlink
  2945. * Bug fixes
  2946. ** Procedures returned by `eval' now have docstrings
  2947. (http://bugs.gnu.org/12173)
  2948. ** web client: correctly handle uri-query, etc. in relative URI headers
  2949. (http://bugs.gnu.org/12827)
  2950. ** Fix docs for R6RS `hashtable-copy'
  2951. ** R6RS `string-for-each' now accepts multiple string arguments
  2952. ** Fix out-of-range error in the compiler's CSE pass
  2953. (http://bugs.gnu.org/12883)
  2954. ** Add missing R6RS `open-file-input/output-port' procedure
  2955. ** Futures: Avoid creating the worker pool more than once
  2956. ** Fix invalid assertion about mutex ownership in threads.c
  2957. (http://bugs.gnu.org/12719)
  2958. ** Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'
  2959. ** The `scandir' procedure now uses `lstat' instead of `stat'
  2960. ** Fix `generalized-vector->list' indexing bug with shared arrays
  2961. (http://bugs.gnu.org/12465)
  2962. ** web: Change `http-get' to try all the addresses for the given URI
  2963. ** Implement `hash' for structs
  2964. (http://lists.gnu.org/archive/html/guile-devel/2012-10/msg00031.html)
  2965. ** `read' now adds source properties for data types beyond pairs
  2966. ** Improve error reporting in `append!'
  2967. ** In fold-matches, set regexp/notbol unless matching string start
  2968. ** Don't stat(2) and access(2) the .go location before using it
  2969. ** SRFI-19: use zero padding for hours in ISO 8601 format, not blanks
  2970. ** web: Fix uri-encoding for strings with no unreserved chars, and octets 0-15
  2971. ** More robust texinfo alias handling
  2972. ** Optimize `format' and `simple-format'
  2973. (http://bugs.gnu.org/12033)
  2974. ** Angle of -0.0 is pi, not zero
  2975. Changes in 2.0.6 (since 2.0.5):
  2976. * Notable changes
  2977. ** New optimization pass: common subexpression elimination (CSE)
  2978. Guile's optimizer will now run a CSE pass after partial evaluation.
  2979. This pass propagates static information about branches taken, bound
  2980. lexicals, and effects from an expression's dominators. It can replace
  2981. common subexpressions with their boolean values (potentially enabling
  2982. dead code elimination), equivalent bound lexicals, or it can elide them
  2983. entirely, depending on the context in which they are executed. This
  2984. pass is especially useful in removing duplicate type checks, such as
  2985. those produced by SRFI-9 record accessors.
  2986. ** Improvements to the partial evaluator
  2987. Peval can now hoist tests that are common to both branches of a
  2988. conditional into the test. This can help with long chains of
  2989. conditionals, such as those generated by the `match' macro. Peval can
  2990. now do simple beta-reductions of procedures with rest arguments. It
  2991. also avoids residualizing degenerate lexical aliases, even when full
  2992. inlining is not possible. Finally, peval now uses the effects analysis
  2993. introduced for the CSE pass. More precise effects analysis allows peval
  2994. to move more code.
  2995. ** Run finalizers asynchronously in asyncs
  2996. Finalizers are now run asynchronously, via an async. See Asyncs in the
  2997. manual. This allows Guile and user code to safely allocate memory while
  2998. holding a mutex.
  2999. ** Update SRFI-14 character sets to Unicode 6.1
  3000. Note that this update causes the Latin-1 characters `§' and `¶' to be
  3001. reclassified as punctuation. They were previously considered to be part
  3002. of `char-set:symbol'.
  3003. ** Better source information for datums
  3004. When the `positions' reader option is on, as it is by default, Guile's
  3005. reader will record source information for more kinds of datums.
  3006. ** Improved error and warning messages
  3007. `syntax-violation' errors now prefer `subform' for source info, with
  3008. `form' as fallback. Syntactic errors in `cond' and `case' now produce
  3009. better errors. `case' can now warn on duplicate datums, or datums that
  3010. cannot be usefully compared with `eqv?'. `-Warity-mismatch' now handles
  3011. applicable structs. `-Wformat' is more robust in the presence of
  3012. `gettext'. Finally, various exceptions thrown by the Web modules now
  3013. define appropriate exception printers.
  3014. ** A few important bug fixes in the HTTP modules.
  3015. Guile's web server framework now checks if an application returns a body
  3016. where it is not permitted, for example in response to a HEAD request,
  3017. and warn or truncate the response as appropriate. Bad requests now
  3018. cause a 400 Bad Request response to be printed before closing the port.
  3019. Finally, some date-printing and URL-parsing bugs were fixed.
  3020. ** Pretty-print improvements
  3021. When Guile needs to pretty-print Tree-IL, it will try to reconstruct
  3022. `cond', `or`, and other derived syntax forms from the primitive tree-IL
  3023. forms. It also uses the original names instead of the fresh unique
  3024. names, when it is unambiguous to do so. This can be seen in the output
  3025. of REPL commands like `,optimize'.
  3026. Also, the `pretty-print' procedure has a new keyword argument,
  3027. `#:max-expr-width'.
  3028. ** Fix memory leak involving applicable SMOBs
  3029. At some point in the 1.9.x series, Guile began leaking any applicable
  3030. SMOB that was actually applied. (There was a weak-key map from SMOB to
  3031. trampoline functions, where the value had a strong reference on the
  3032. key.) This has been fixed. There was much rejoicing!
  3033. ** Support for HTTP/1.1 chunked transfer coding
  3034. See "Transfer Codings" in the manual, for more.
  3035. ** Micro-optimizations
  3036. A pile of micro-optimizations: the `string-trim' function when called
  3037. with `char-set:whitespace'; the `(web http)' parsers; SMOB application;
  3038. conversion of raw UTF-8 and UTF-32 data to and from SCM strings; vlists
  3039. and vhashes; `read' when processing string literals.
  3040. ** Incompatible change to `scandir'
  3041. As was the original intention, `scandir' now runs the `select?'
  3042. procedure on all items, including subdirectories and the `.' and `..'
  3043. entries. It receives the basename of the file in question instead of
  3044. the full name. We apologize for this incompatible change to this
  3045. function introduced in the 2.0.4 release.
  3046. * Manual updates
  3047. The manual has been made much more consistent in its naming conventions
  3048. with regards to formal parameters of functions. Thanks to Bake Timmons.
  3049. * New interfaces
  3050. ** New C function: `scm_to_pointer'
  3051. ** New C inline functions: `scm_new_smob', `scm_new_double_smob'
  3052. ** (ice-9 format): Add ~h specifier for localized number output.
  3053. ** (web response): New procedure: `response-must-not-include-body?'
  3054. ** New predicate: 'supports-source-properties?'
  3055. ** New C helpers: `scm_c_values', `scm_c_nvalues'
  3056. ** Newly public inline C function: `scm_unget_byte'
  3057. ** (language tree-il): New functions: `tree-il=?', `tree-il-hash'
  3058. ** New fluid: `%default-port-conversion-strategy'
  3059. ** New syntax: `=>' within `case'
  3060. ** (web http): `make-chunked-input-port', `make-chunked-output-port'
  3061. ** (web http): `declare-opaque-header!'
  3062. Search the manual for these identifiers, for more information.
  3063. * New deprecations
  3064. ** `close-io-port' deprecated
  3065. Use `close-port'.
  3066. ** `scm_sym2var' deprecated
  3067. In most cases, replace with `scm_lookup' or `scm_module_variable'. Use
  3068. `scm_define' or `scm_module_ensure_local_variable' if the second
  3069. argument is nonzero. See "Accessing Modules from C" in the manual, for
  3070. full details.
  3071. ** Lookup closures deprecated
  3072. These were never documented. See "Module System Reflection" in the
  3073. manual for replacements.
  3074. * Build fixes
  3075. ** Fix compilation against uninstalled Guile on non-GNU platforms.
  3076. ** Fix `SCM_I_ERROR' definition for MinGW without networking.
  3077. ** Fix compilation with the Sun C compiler.
  3078. ** Fix check for `clock_gettime' on OpenBSD and some other systems.
  3079. ** Fix build with --enable-debug-malloc.
  3080. ** Honor $(program_transform_name) for the `guile-tools' symlink.
  3081. ** Fix cross-compilation of GOOPS-using code.
  3082. * Bug fixes
  3083. ** Fix use of unitialized stat buffer in search-path of absolute paths.
  3084. ** Avoid calling `freelocale' with a NULL argument.
  3085. ** Work around erroneous tr_TR locale in Darwin 8 in tests.
  3086. ** Fix `getaddrinfo' test for Darwin 8.
  3087. ** Use Gnulib's `regex' module for better regex portability.
  3088. ** `source-properties' and friends work on any object
  3089. ** Rewrite open-process in C, for robustness related to threads and fork
  3090. ** Fix <TAG>vector-length when applied to other uniform vector types
  3091. ** Fix escape-only prompt optimization (was disabled previously)
  3092. ** Fix a segfault when /dev/urandom is not accessible
  3093. ** Fix flush on soft ports, so that it actually runs.
  3094. ** Better compatibility of SRFI-9 records with core records
  3095. ** Fix and clarify documentation of `sorted?'.
  3096. ** Fix IEEE-754 endianness conversion in bytevectors.
  3097. ** Correct thunk check in the `wind' instruction.
  3098. ** Add @acronym support to texinfo modules
  3099. ** Fix docbook->texi for <ulink> without URL
  3100. ** Fix `setvbuf' to leave the line/column number unchanged.
  3101. ** Add missing public declaration for `scm_take_from_input_buffers'.
  3102. ** Fix relative file name canonicalization with empty %LOAD-PATH entries.
  3103. ** Import newer (ice-9 match) from Chibi-Scheme.
  3104. ** Fix unbound variables and unbound values in ECMAScript runtime.
  3105. ** Make SRFI-6 string ports Unicode-capable.
  3106. Changes in 2.0.5 (since 2.0.4):
  3107. This release fixes the binary interface information (SONAME) of
  3108. libguile, which was incorrect in 2.0.4. It does not contain other
  3109. changes.
  3110. Changes in 2.0.4 (since 2.0.3):
  3111. * Notable changes
  3112. ** Better debuggability for interpreted procedures.
  3113. Guile 2.0 came with a great debugging experience for compiled
  3114. procedures, but the story for interpreted procedures was terrible. Now,
  3115. at least, interpreted procedures have names, and the `arity' procedure
  3116. property is always correct (or, as correct as it can be, in the presence
  3117. of `case-lambda').
  3118. ** Support for cross-compilation.
  3119. One can now use a native Guile to cross-compile `.go' files for a
  3120. different architecture. See the documentation for `--target' in the
  3121. "Compilation" section of the manual, for information on how to use the
  3122. cross-compiler. See the "Cross building Guile" section of the README,
  3123. for more on how to cross-compile Guile itself.
  3124. ** The return of `local-eval'.
  3125. Back by popular demand, `the-environment' and `local-eval' allow the
  3126. user to capture a lexical environment, and then evaluate arbitrary
  3127. expressions in that context. There is also a new `local-compile'
  3128. command. See "Local Evaluation" in the manual, for more. Special
  3129. thanks to Mark Weaver for an initial implementation of this feature.
  3130. ** Fluids can now have default values.
  3131. Fluids are used for dynamic and thread-local binding. They have always
  3132. inherited their values from the context or thread that created them.
  3133. However, there was a case in which a new thread would enter Guile, and
  3134. the default values of all the fluids would be `#f' for that thread.
  3135. This has now been fixed so that `make-fluid' has an optional default
  3136. value for fluids in unrelated dynamic roots, which defaults to `#f'.
  3137. ** Garbage collector tuning.
  3138. The garbage collector has now been tuned to run more often under some
  3139. circumstances.
  3140. *** Unmanaged allocation
  3141. The new `scm_gc_register_allocation' function will notify the collector
  3142. of unmanaged allocation. This will cause the collector to run sooner.
  3143. Guile's `scm_malloc', `scm_calloc', and `scm_realloc' unmanaged
  3144. allocators eventually call this function. This leads to better
  3145. performance under steady-state unmanaged allocation.
  3146. *** Transient allocation
  3147. When the collector runs, it will try to record the total memory
  3148. footprint of a process, if the platform supports this information. If
  3149. the memory footprint is growing, the collector will run more frequently.
  3150. This reduces the increase of the resident size of a process in response
  3151. to a transient increase in allocation.
  3152. *** Management of threads, bignums
  3153. Creating a thread will allocate a fair amount of memory. Guile now does
  3154. some GC work (using `GC_collect_a_little') when allocating a thread.
  3155. This leads to a better memory footprint when creating many short-lived
  3156. threads.
  3157. Similarly, bignums can occupy a lot of memory. Guile now offers hooks
  3158. to enable custom GMP allocators that end up calling
  3159. `scm_gc_register_allocation'. These allocators are enabled by default
  3160. when running Guile from the command-line. To enable them in libraries,
  3161. set the `scm_install_gmp_memory_functions' variable to a nonzero value
  3162. before loading Guile.
  3163. ** SRFI-39 parameters are available by default.
  3164. Guile now includes support for parameters, as defined by SRFI-39, in the
  3165. default environment. See "Parameters" in the manual, for more
  3166. information. `current-input-port', `current-output-port', and
  3167. `current-error-port' are now parameters.
  3168. ** Add `current-warning-port'.
  3169. Guile now outputs warnings on a separate port, `current-warning-port',
  3170. initialized to the value that `current-error-port' has on startup.
  3171. ** Syntax parameters.
  3172. Following Racket's lead, Guile now supports syntax parameters. See
  3173. "Syntax parameters" in the manual, for more.
  3174. Also see Barzilay, Culpepper, and Flatt's 2011 SFP workshop paper,
  3175. "Keeping it Clean with syntax-parameterize".
  3176. ** Parse command-line arguments from the locale encoding.
  3177. Guile now attempts to parse command-line arguments using the user's
  3178. locale. However for backwards compatibility with other 2.0.x releases,
  3179. it does so without actually calling `setlocale'. Please report any bugs
  3180. in this facility to bug-guile@gnu.org.
  3181. ** One-armed conditionals: `when' and `unless'
  3182. Guile finally has `when' and `unless' in the default environment. Use
  3183. them whenever you would use an `if' with only one branch. See
  3184. "Conditionals" in the manual, for more.
  3185. ** `current-filename', `add-to-load-path'
  3186. There is a new form, `(current-filename)', which expands out to the
  3187. source file in which it occurs. Combined with the new
  3188. `add-to-load-path', this allows simple scripts to easily add nearby
  3189. directories to the load path. See "Load Paths" in the manual, for more.
  3190. ** `random-state-from-platform'
  3191. This procedure initializes a random seed using good random sources
  3192. available on your platform, such as /dev/urandom. See "Random Number
  3193. Generation" in the manual, for more.
  3194. ** Warn about unsupported `simple-format' options.
  3195. The `-Wformat' compilation option now reports unsupported format options
  3196. passed to `simple-format'.
  3197. ** Manual updates
  3198. Besides the sections already mentioned, the following manual sections
  3199. are new in this release: "Modules and the File System", "Module System
  3200. Reflection", "Syntax Transformer Helpers", and "Local Inclusion".
  3201. * New interfaces
  3202. ** (ice-9 session): `apropos-hook'
  3203. ** New print option: `escape-newlines', defaults to #t.
  3204. ** (ice-9 ftw): `file-system-fold', `file-system-tree', `scandir'
  3205. ** `scm_c_value_ref': access to multiple returned values from C
  3206. ** scm_call (a varargs version), scm_call_7, scm_call_8, scm_call_9
  3207. ** Some new syntax helpers in (system syntax)
  3208. Search the manual for these identifiers and modules, for more.
  3209. * Build fixes
  3210. ** FreeBSD build fixes.
  3211. ** OpenBSD compilation fixes.
  3212. ** Solaris 2.10 test suite fixes.
  3213. ** IA64 compilation fix.
  3214. ** MinGW build fixes.
  3215. ** Work around instruction reordering on SPARC and HPPA in the VM.
  3216. ** Gnulib updates: added `dirfd', `setenv' modules.
  3217. * Bug fixes
  3218. ** Add a deprecated alias for $expt.
  3219. ** Add an exception printer for `getaddrinfo-error'.
  3220. ** Add deprecated shim for `scm_display_error' with stack as first argument.
  3221. ** Add warnings for unsupported `simple-format' options.
  3222. ** Allow overlapping regions to be passed to `bytevector-copy!'.
  3223. ** Better function prologue disassembly
  3224. ** Compiler: fix miscompilation of (values foo ...) in some contexts.
  3225. ** Compiler: fix serialization of #nil-terminated lists.
  3226. ** Compiler: allow values bound in non-tail let expressions to be collected.
  3227. ** Deprecate SCM_ASRTGO.
  3228. ** Document invalidity of (begin) as expression; add back-compat shim.
  3229. ** Don't leak file descriptors when mmaping objcode.
  3230. ** Empty substrings no longer reference the original stringbuf.
  3231. ** FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.
  3232. ** FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
  3233. ** FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
  3234. ** FFI: Properly unpack small integer return values in closure call.
  3235. ** Fix R6RS `fold-left' so the accumulator is the first argument.
  3236. ** Fix bit-set*! bug from 2005.
  3237. ** Fix bug in `make-repl' when `lang' is actually a <language>.
  3238. ** Fix bugs related to mutation, the null string, and shared substrings.
  3239. ** Fix <dynwind> serialization.
  3240. ** Fix erroneous check in `set-procedure-properties!'.
  3241. ** Fix generalized-vector-{ref,set!} for slices.
  3242. ** Fix error messages involving definition forms.
  3243. ** Fix primitive-eval to return #<unspecified> for definitions.
  3244. ** HTTP: Extend handling of "Cache-Control" header.
  3245. ** HTTP: Fix qstring writing of cache-extension values
  3246. ** HTTP: Fix validators for various list-style headers.
  3247. ** HTTP: Permit non-date values for Expires header.
  3248. ** HTTP: `write-request-line' writes absolute paths, not absolute URIs.
  3249. ** Hack the port-column of current-output-port after printing a prompt.
  3250. ** Make sure `regexp-quote' tests use Unicode-capable string ports.
  3251. ** Peval: Fix bugs in the new optimizer.
  3252. ** Statistically unique marks and labels, for robust hygiene across sessions.
  3253. ** Web: Allow URIs with empty authorities, like "file:///etc/hosts".
  3254. ** `,language' at REPL sets the current-language fluid.
  3255. ** `primitive-load' returns the value(s) of the last expression.
  3256. ** `scm_from_stringn' always returns unique strings.
  3257. ** `scm_i_substring_copy' tries to narrow the substring.
  3258. ** i18n: Fix gc_malloc/free mismatch on non-GNU systems.
  3259. Changes in 2.0.3 (since 2.0.2):
  3260. * Speed improvements
  3261. ** Guile has a new optimizer, `peval'.
  3262. `Peval' is a partial evaluator that performs constant folding, dead code
  3263. elimination, copy propagation, and inlining. By default it runs on
  3264. every piece of code that Guile compiles, to fold computations that can
  3265. happen at compile-time, so they don't have to happen at runtime.
  3266. If we did our job right, the only impact you would see would be your
  3267. programs getting faster. But if you notice slowdowns or bloated code,
  3268. please send a mail to bug-guile@gnu.org with details.
  3269. Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
  3270. peval and its implementation.
  3271. You can see what peval does on a given piece of code by running the new
  3272. `,optimize' REPL meta-command, and comparing it to the output of
  3273. `,expand'. See "Compile Commands" in the manual, for more.
  3274. ** Fewer calls to `stat'.
  3275. Guile now stats only the .go file and the .scm file when loading a fresh
  3276. compiled file.
  3277. * Notable changes
  3278. ** New module: `(web client)', a simple synchronous web client.
  3279. See "Web Client" in the manual, for more.
  3280. ** Users can now install compiled `.go' files.
  3281. See "Installing Site Packages" in the manual.
  3282. ** Remove Front-Cover and Back-Cover text from the manual.
  3283. The manual is still under the GNU Free Documentation License, but no
  3284. longer has any invariant sections.
  3285. ** More helpful `guild help'.
  3286. `guild' is Guile's multi-tool, for use in shell scripting. Now it has a
  3287. nicer interface for querying the set of existing commands, and getting
  3288. help on those commands. Try it out and see!
  3289. ** New macro: `define-syntax-rule'
  3290. `define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
  3291. one clause. See "Syntax Rules" in the manual, for more.
  3292. ** The `,time' REPL meta-command now has more precision.
  3293. The output of this command now has microsecond precision, instead of
  3294. 10-millisecond precision.
  3295. ** `(ice-9 match)' can now match records.
  3296. See "Pattern Matching" in the manual, for more on matching records.
  3297. ** New module: `(language tree-il debug)'.
  3298. This module provides a tree-il verifier. This is useful for people that
  3299. generate tree-il, usually as part of a language compiler.
  3300. ** New functions: `scm_is_exact', `scm_is_inexact'.
  3301. These provide a nice C interface for Scheme's `exact?' and `inexact?',
  3302. respectively.
  3303. * Bugs fixed
  3304. See the git log (or the ChangeLog) for more details on these bugs.
  3305. ** Fix order of importing modules and resolving duplicates handlers.
  3306. ** Fix a number of bugs involving extended (merged) generics.
  3307. ** Fix invocation of merge-generics duplicate handler.
  3308. ** Fix write beyond array end in arrays.c.
  3309. ** Fix read beyond end of hashtable size array in hashtab.c.
  3310. ** (web http): Locale-independent parsing and serialization of dates.
  3311. ** Ensure presence of Host header in HTTP/1.1 requests.
  3312. ** Fix take-right and drop-right for improper lists.
  3313. ** Fix leak in get_current_locale().
  3314. ** Fix recursive define-inlinable expansions.
  3315. ** Check that srfi-1 procedure arguments are procedures.
  3316. ** Fix r6rs `map' for multiple returns.
  3317. ** Fix scm_tmpfile leak on POSIX platforms.
  3318. ** Fix a couple of leaks (objcode->bytecode, make-boot-program).
  3319. ** Fix guile-lib back-compatibility for module-stexi-documentation.
  3320. ** Fix --listen option to allow other ports.
  3321. ** Fix scm_to_latin1_stringn for substrings.
  3322. ** Fix compilation of untyped arrays of rank not 1.
  3323. ** Fix unparse-tree-il of <dynset>.
  3324. ** Fix reading of #||||#.
  3325. ** Fix segfault in GOOPS when class fields are redefined.
  3326. ** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
  3327. Changes in 2.0.2 (since 2.0.1):
  3328. * Notable changes
  3329. ** `guile-tools' renamed to `guild'
  3330. The new name is shorter. Its intended future use is for a CPAN-like
  3331. system for Guile wizards and journeyfolk to band together to share code;
  3332. hence the name. `guile-tools' is provided as a backward-compatible
  3333. symbolic link. See "Using Guile Tools" in the manual, for more.
  3334. ** New control operators: `shift' and `reset'
  3335. See "Shift and Reset" in the manual, for more information.
  3336. ** `while' as an expression
  3337. Previously the return value of `while' was unspecified. Now its
  3338. values are specified both in the case of normal termination, and via
  3339. termination by invoking `break', possibly with arguments. See "while
  3340. do" in the manual for more.
  3341. ** Disallow access to handles of weak hash tables
  3342. `hash-get-handle' and `hash-create-handle!' are no longer permitted to
  3343. be called on weak hash tables, because the fields in a weak handle could
  3344. be nulled out by the garbage collector at any time, but yet they are
  3345. otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
  3346. instead.
  3347. ** More precision for `get-internal-run-time', `get-internal-real-time'
  3348. On 64-bit systems which support POSIX clocks, Guile's internal timing
  3349. procedures offer nanosecond resolution instead of the 10-millisecond
  3350. resolution previously available. 32-bit systems now use 1-millisecond
  3351. timers.
  3352. ** Guile now measures time spent in GC
  3353. `gc-stats' now returns a meaningful value for `gc-time-taken'.
  3354. ** Add `gcprof'
  3355. The statprof profiler now exports a `gcprof' procedure, driven by the
  3356. `after-gc-hook', to see which parts of your program are causing GC. Let
  3357. us know if you find it useful.
  3358. ** `map', `for-each' and some others now implemented in Scheme
  3359. We would not mention this in NEWS, as it is not a user-visible change,
  3360. if it were not for one thing: `map' and `for-each' are no longer
  3361. primitive generics. Instead they are normal bindings, which can be
  3362. wrapped by normal generics. This fixes some modularity issues between
  3363. core `map', SRFI-1 `map', and GOOPS.
  3364. Also it's pretty cool that we can do this without a performance impact.
  3365. ** Add `scm_peek_byte_or_eof'.
  3366. This helper is like `scm_peek_char_or_eof', but for bytes instead of
  3367. full characters.
  3368. ** Implement #:stop-at-first-non-option option for getopt-long
  3369. See "getopt-long Reference" in the manual, for more information.
  3370. ** Improve R6RS conformance for conditions in the I/O libraries
  3371. The `(rnrs io simple)' module now raises the correct R6RS conditions in
  3372. error cases. `(rnrs io ports)' is also more correct now, though it is
  3373. still a work in progress.
  3374. ** All deprecated routines emit warnings
  3375. A few deprecated routines were lacking deprecation warnings. This has
  3376. been fixed now.
  3377. * Speed improvements
  3378. ** Constants in compiled code now share state better
  3379. Constants with shared state, like `("foo")' and `"foo"', now share state
  3380. as much as possible, in the entire compilation unit. This cuts compiled
  3381. `.go' file sizes in half, generally, and speeds startup.
  3382. ** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
  3383. These procedures are now twice as fast as they were.
  3384. ** UTF-8 ports to bypass `iconv' entirely
  3385. This reduces memory usage in a very common case.
  3386. ** Compiler speedups
  3387. The compiler is now about 40% faster. (Note that this is only the case
  3388. once the compiler is itself compiled, so the build still takes as long
  3389. as it did before.)
  3390. ** VM speed tuning
  3391. Some assertions that were mostly useful for sanity-checks on the
  3392. bytecode compiler are now off for both "regular" and "debug" engines.
  3393. This together with a fix to cache a TLS access and some other tweaks
  3394. improve the VM's performance by about 20%.
  3395. ** SRFI-1 list-set optimizations
  3396. lset-adjoin and lset-union now have fast paths for eq? sets.
  3397. ** `memq', `memv' optimizations
  3398. These procedures are now at least twice as fast than in 2.0.1.
  3399. * Deprecations
  3400. ** Deprecate scm_whash API
  3401. `scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
  3402. `SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
  3403. `scm_whash_insert' are now deprecated. Use the normal hash table API
  3404. instead.
  3405. ** Deprecate scm_struct_table
  3406. `SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
  3407. `SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
  3408. `scm_struct_table', and `scm_struct_create_handle' are now deprecated.
  3409. These routines formed part of the internals of the map between structs
  3410. and classes.
  3411. ** Deprecate scm_internal_dynamic_wind
  3412. The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
  3413. as the `scm_dynwind' API is better, and this API encourages users to
  3414. stuff SCM values into pointers.
  3415. ** Deprecate scm_immutable_cell, scm_immutable_double_cell
  3416. These routines are deprecated, as the GC_STUBBORN API doesn't do
  3417. anything any more.
  3418. * Manual updates
  3419. Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
  3420. ports)' documentation from the R6RS documentation. Thanks Andreas!
  3421. * Bugs fixed
  3422. ** Fix double-loading of script in -ds case
  3423. ** -x error message fix
  3424. ** iconveh-related cross-compilation fixes
  3425. ** Fix small integer return value packing on big endian machines.
  3426. ** Fix hash-set! in weak-value table from non-immediate to immediate
  3427. ** Fix call-with-input-file & relatives for multiple values
  3428. ** Fix `hash' for inf and nan
  3429. ** Fix libguile internal type errors caught by typing-strictness==2
  3430. ** Fix compile error in MinGW fstat socket detection
  3431. ** Fix generation of auto-compiled file names on MinGW
  3432. ** Fix multithreaded access to internal hash tables
  3433. ** Emit a 1-based line number in error messages
  3434. ** Fix define-module ordering
  3435. ** Fix several POSIX functions to use the locale encoding
  3436. ** Add type and range checks to the complex generalized vector accessors
  3437. ** Fix unaligned accesses for bytevectors of complex numbers
  3438. ** Fix '(a #{.} b)
  3439. ** Fix erroneous VM stack overflow for canceled threads
  3440. Changes in 2.0.1 (since 2.0.0):
  3441. * Notable changes
  3442. ** guile.m4 supports linking with rpath
  3443. The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
  3444. include appropriate directives to the linker to include libguile-2.0.so
  3445. in the runtime library lookup path.
  3446. ** `begin' expands macros in its body before other expressions
  3447. This enables support for programs like the following:
  3448. (begin
  3449. (define even?
  3450. (lambda (x)
  3451. (or (= x 0) (odd? (- x 1)))))
  3452. (define-syntax odd?
  3453. (syntax-rules ()
  3454. ((odd? x) (not (even? x)))))
  3455. (even? 10))
  3456. ** REPL reader usability enhancements
  3457. The REPL now flushes input after a read error, which should prevent one
  3458. error from causing other errors. The REPL also now interprets comments
  3459. as whitespace.
  3460. ** REPL output has configurable width
  3461. The REPL now defaults to output with the current terminal's width, in
  3462. columns. See "Debug Commands" in the manual for more information on
  3463. the ,width command.
  3464. ** Better C access to the module system
  3465. Guile now has convenient C accessors to look up variables or values in
  3466. modules and their public interfaces. See `scm_c_public_ref' and friends
  3467. in "Accessing Modules from C" in the manual.
  3468. ** Added `scm_call_5', `scm_call_6'
  3469. See "Fly Evaluation" in the manual.
  3470. ** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
  3471. See "Keyword Procedures" in the manual, for more. Note that
  3472. `scm_from_locale_keyword' should not be used when the name is a C string
  3473. constant.
  3474. ** R6RS unicode and string I/O work
  3475. Added efficient implementations of `get-string-n' and `get-string-n!'
  3476. for binary ports. Exported `current-input-port', `current-output-port'
  3477. and `current-error-port' from `(rnrs io ports)', and enhanced support
  3478. for transcoders.
  3479. ** Added `pointer->scm', `scm->pointer' to `(system foreign)'
  3480. These procedure are useful if one needs to pass and receive SCM values
  3481. to and from foreign functions. See "Foreign Variables" in the manual,
  3482. for more.
  3483. ** Added `heap-allocated-since-gc' to `(gc-stats)'
  3484. Also fixed the long-standing bug in the REPL `,stat' command.
  3485. ** Add `on-error' REPL option
  3486. This option controls what happens when an error occurs at the REPL, and
  3487. defaults to `debug', indicating that Guile should enter the debugger.
  3488. Other values include `report', which will simply print a backtrace
  3489. without entering the debugger. See "System Commands" in the manual.
  3490. ** Enforce immutability of string literals
  3491. Attempting to mutate a string literal now causes a runtime error.
  3492. ** Fix pthread redirection
  3493. Guile 2.0.0 shipped with headers that, if configured with pthread
  3494. support, would re-define `pthread_create', `pthread_join', and other API
  3495. to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
  3496. unintended, and not necessary: because threads must enter Guile with
  3497. `scm_with_guile', Guile can handle thread registration itself, without
  3498. needing to make the GC aware of all threads. This oversight has been
  3499. fixed.
  3500. ** `with-continuation-barrier' now unwinds on `quit'
  3501. A throw to `quit' in a continuation barrier will cause Guile to exit.
  3502. Before, it would do so before unwinding to the barrier, which would
  3503. prevent cleanup handlers from running. This has been fixed so that it
  3504. exits only after unwinding.
  3505. ** `string->pointer' and `pointer->string' have optional encoding arg
  3506. This allows users of the FFI to more easily deal in strings with
  3507. particular (non-locale) encodings, like "utf-8". See "Void Pointers and
  3508. Byte Access" in the manual, for more.
  3509. ** R6RS fixnum arithmetic optimizations
  3510. R6RS fixnum operations are are still slower than generic arithmetic,
  3511. however.
  3512. ** New procedure: `define-inlinable'
  3513. See "Inlinable Procedures" in the manual, for more.
  3514. ** New procedure: `exact-integer-sqrt'
  3515. See "Integer Operations" in the manual, for more.
  3516. ** "Extended read syntax" for symbols parses better
  3517. In #{foo}# symbols, backslashes are now treated as escapes, as the
  3518. symbol-printing code intended. Additionally, "\x" within #{foo}# is now
  3519. interpreted as starting an R6RS hex escape. This is backward compatible
  3520. because the symbol printer would never produce a "\x" before. The
  3521. printer also works better too.
  3522. ** Added `--fresh-auto-compile' option
  3523. This allows a user to invalidate the auto-compilation cache. It's
  3524. usually not needed. See "Compilation" in the manual, for a discussion.
  3525. * Manual updates
  3526. ** GOOPS documentation updates
  3527. ** New man page
  3528. Thanks to Mark Harig for improvements to guile.1.
  3529. ** SRFI-23 documented
  3530. The humble `error' SRFI now has an entry in the manual.
  3531. * New modules
  3532. ** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
  3533. ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
  3534. ** `(ice-9 command-line)', not documented yet
  3535. * Bugs fixed
  3536. ** Fixed `iconv_t' memory leak on close-port
  3537. ** Fixed some leaks with weak hash tables
  3538. ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
  3539. ** `after-gc-hook' works again
  3540. ** `define-record-type' now allowed in nested contexts
  3541. ** `exact-integer-sqrt' now handles large integers correctly
  3542. ** Fixed C extension examples in manual
  3543. ** `vhash-delete' honors HASH argument
  3544. ** Make `locale-digit-grouping' more robust
  3545. ** Default exception printer robustness fixes
  3546. ** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
  3547. ** `read' updates line/column numbers when reading SCSH block comments
  3548. ** Fix imports of multiple custom interfaces of same module
  3549. ** Fix encoding scanning for non-seekable ports
  3550. ** Fix `setter' when called with a non-setter generic
  3551. ** Fix f32 and f64 bytevectors to not accept rationals
  3552. ** Fix description of the R6RS `finite?' in manual
  3553. ** Quotient, remainder and modulo accept inexact integers again
  3554. ** Fix `continue' within `while' to take zero arguments
  3555. ** Fix alignment for structures in FFI
  3556. ** Fix port-filename of stdin, stdout, stderr to match the docs
  3557. ** Fix weak hash table-related bug in `define-wrapped-pointer-type'
  3558. ** Fix partial continuation application with pending procedure calls
  3559. ** scm_{to,from}_locale_string use current locale, not current ports
  3560. ** Fix thread cleanup, by using a pthread_key destructor
  3561. ** Fix `quit' at the REPL
  3562. ** Fix a failure to sync regs in vm bytevector ops
  3563. ** Fix (texinfo reflection) to handle nested structures like syntax patterns
  3564. ** Fix stexi->html double translation
  3565. ** Fix tree-il->scheme fix for <prompt>
  3566. ** Fix compilation of <prompt> in <fix> in single-value context
  3567. ** Fix race condition in ensure-writable-dir
  3568. ** Fix error message on ,disassemble "non-procedure"
  3569. ** Fix prompt and abort with the boot evaluator
  3570. ** Fix `procedure->pointer' for functions returning `void'
  3571. ** Fix error reporting in dynamic-pointer
  3572. ** Fix problems detecting coding: in block comments
  3573. ** Fix duplicate load-path and load-compiled-path in compilation environment
  3574. ** Add fallback read(2) suppport for .go files if mmap(2) unavailable
  3575. ** Fix c32vector-set!, c64vector-set!
  3576. ** Fix mistakenly deprecated read syntax for uniform complex vectors
  3577. ** Fix parsing of exact numbers with negative exponents
  3578. ** Ignore SIGPIPE in (system repl server)
  3579. ** Fix optional second arg to R6RS log function
  3580. ** Fix R6RS `assert' to return true value.
  3581. ** Fix fencepost error when seeking in bytevector input ports
  3582. ** Gracefully handle `setlocale' errors when starting the REPL
  3583. ** Improve support of the `--disable-posix' configure option
  3584. ** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
  3585. ** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
  3586. Changes in 2.0.0 (changes since the 1.8.x series):
  3587. * New modules (see the manual for details)
  3588. ** `(srfi srfi-18)', more sophisticated multithreading support
  3589. ** `(srfi srfi-27)', sources of random bits
  3590. ** `(srfi srfi-38)', External Representation for Data With Shared Structure
  3591. ** `(srfi srfi-42)', eager comprehensions
  3592. ** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
  3593. ** `(srfi srfi-67)', compare procedures
  3594. ** `(ice-9 i18n)', internationalization support
  3595. ** `(ice-9 futures)', fine-grain parallelism
  3596. ** `(rnrs bytevectors)', the R6RS bytevector API
  3597. ** `(rnrs io ports)', a subset of the R6RS I/O port API
  3598. ** `(system xref)', a cross-referencing facility (FIXME undocumented)
  3599. ** `(ice-9 vlist)', lists with constant-time random access; hash lists
  3600. ** `(system foreign)', foreign function interface
  3601. ** `(sxml match)', a pattern matcher for SXML
  3602. ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
  3603. ** `(system vm coverage)', a line-by-line code coverage library
  3604. ** `(web uri)', URI data type, parser, and unparser
  3605. ** `(web http)', HTTP header parsers and unparsers
  3606. ** `(web request)', HTTP request data type, reader, and writer
  3607. ** `(web response)', HTTP response data type, reader, and writer
  3608. ** `(web server)', Generic HTTP server
  3609. ** `(ice-9 poll)', a poll wrapper
  3610. ** `(web server http)', HTTP-over-TCP web server implementation
  3611. ** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
  3612. Guile's copy of Andrew K. Wright's `match' library has been replaced by
  3613. a compatible hygienic implementation by Alex Shinn. It is now
  3614. documented, see "Pattern Matching" in the manual.
  3615. Compared to Andrew K. Wright's `match', the new `match' lacks
  3616. `match-define', `match:error-control', `match:set-error-control',
  3617. `match:error', `match:set-error', and all structure-related procedures.
  3618. ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
  3619. The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
  3620. toolkit from Guile-Lib have been imported into Guile proper. See
  3621. "Standard Library" in the manual for more details.
  3622. ** Integration of lalr-scm, a parser generator
  3623. Guile has included Dominique Boucher's fine `lalr-scm' parser generator
  3624. as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
  3625. information.
  3626. * Changes to the stand-alone interpreter
  3627. ** Guile now can compile Scheme to bytecode for a custom virtual machine.
  3628. Compiled code loads much faster than Scheme source code, and runs around
  3629. 3 or 4 times as fast, generating much less garbage in the process.
  3630. ** Evaluating Scheme code does not use the C stack.
  3631. Besides when compiling Guile itself, Guile no longer uses a recursive C
  3632. function as an evaluator. This obviates the need to check the C stack
  3633. pointer for overflow. Continuations still capture the C stack, however.
  3634. ** New environment variables: GUILE_LOAD_COMPILED_PATH,
  3635. GUILE_SYSTEM_LOAD_COMPILED_PATH
  3636. GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
  3637. for source files. It is a different path, however, because compiled
  3638. files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
  3639. GUILE_SYSTEM_PATH.
  3640. ** New read-eval-print loop (REPL) implementation
  3641. Running Guile with no arguments drops the user into the new REPL. See
  3642. "Using Guile Interactively" in the manual, for more information.
  3643. ** Remove old Emacs interface
  3644. Guile had an unused `--emacs' command line argument that was supposed to
  3645. help when running Guile inside Emacs. This option has been removed, and
  3646. the helper functions `named-module-use!' and `load-emacs-interface' have
  3647. been deprecated.
  3648. ** Add `(system repl server)' module and `--listen' command-line argument
  3649. The `(system repl server)' module exposes procedures to listen on
  3650. sockets for connections, and serve REPLs to those clients. The --listen
  3651. command-line argument allows any Guile program to thus be remotely
  3652. debuggable.
  3653. See "Invoking Guile" for more information on `--listen'.
  3654. ** Command line additions
  3655. The guile binary now supports a new switch "-x", which can be used to
  3656. extend the list of filename extensions tried when loading files
  3657. (%load-extensions).
  3658. ** New reader options: `square-brackets', `r6rs-hex-escapes',
  3659. `hungry-eol-escapes'
  3660. The reader supports a new option (changeable via `read-options'),
  3661. `square-brackets', which instructs it to interpret square brackets as
  3662. parentheses. This option is on by default.
  3663. When the new `r6rs-hex-escapes' reader option is enabled, the reader
  3664. will recognize string escape sequences as defined in R6RS. R6RS string
  3665. escape sequences are incompatible with Guile's existing escapes, though,
  3666. so this option is off by default.
  3667. Additionally, Guile follows the R6RS newline escaping rules when the
  3668. `hungry-eol-escapes' option is enabled.
  3669. See "String Syntax" in the manual, for more information.
  3670. ** Function profiling and tracing at the REPL
  3671. The `,profile FORM' REPL meta-command can now be used to statistically
  3672. profile execution of a form, to see which functions are taking the most
  3673. time. See `,help profile' for more information.
  3674. Similarly, `,trace FORM' traces all function applications that occur
  3675. during the execution of `FORM'. See `,help trace' for more information.
  3676. ** Recursive debugging REPL on error
  3677. When Guile sees an error at the REPL, instead of saving the stack, Guile
  3678. will directly enter a recursive REPL in the dynamic context of the
  3679. error. See "Error Handling" in the manual, for more information.
  3680. A recursive REPL is the same as any other REPL, except that it
  3681. has been augmented with debugging information, so that one can inspect
  3682. the context of the error. The debugger has been integrated with the REPL
  3683. via a set of debugging meta-commands.
  3684. For example, one may access a backtrace with `,backtrace' (or
  3685. `,bt'). See "Interactive Debugging" in the manual, for more
  3686. information.
  3687. ** New `guile-tools' commands: `compile', `disassemble'
  3688. Pass the `--help' command-line option to these commands for more
  3689. information.
  3690. ** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
  3691. Users may now install Guile to nonstandard prefixes and just run
  3692. `/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
  3693. include `/path/to/lib'.
  3694. ** Guile's Emacs integration is now more keyboard-friendly
  3695. Backtraces may now be disclosed with the keyboard in addition to the
  3696. mouse.
  3697. ** Load path change: search in version-specific paths before site paths
  3698. When looking for a module, Guile now searches first in Guile's
  3699. version-specific path (the library path), *then* in the site dir. This
  3700. allows Guile's copy of SSAX to override any Guile-Lib copy the user has
  3701. installed. Also it should cut the number of `stat' system calls by half,
  3702. in the common case.
  3703. ** Value history in the REPL on by default
  3704. By default, the REPL will save computed values in variables like `$1',
  3705. `$2', and the like. There are programmatic and interactive interfaces to
  3706. control this. See "Value History" in the manual, for more information.
  3707. ** Readline tab completion for arguments
  3708. When readline is enabled, tab completion works for arguments too, not
  3709. just for the operator position.
  3710. ** Expression-oriented readline history
  3711. Guile's readline history now tries to operate on expressions instead of
  3712. input lines. Let us know what you think!
  3713. ** Interactive Guile follows GNU conventions
  3714. As recommended by the GPL, Guile now shows a brief copyright and
  3715. warranty disclaimer on startup, along with pointers to more information.
  3716. * Changes to Scheme functions and syntax
  3717. ** Support for R6RS libraries
  3718. The `library' and `import' forms from the latest Scheme report have been
  3719. added to Guile, in such a way that R6RS libraries share a namespace with
  3720. Guile modules. R6RS modules may import Guile modules, and are available
  3721. for Guile modules to import via use-modules and all the rest. See "R6RS
  3722. Libraries" in the manual for more information.
  3723. ** Implementations of R6RS libraries
  3724. Guile now has implementations for all of the libraries defined in the
  3725. R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
  3726. Standard Libraries" in the manual for a full list of libraries.
  3727. ** Partial R6RS compatibility
  3728. Guile now has enough support for R6RS to run a reasonably large subset
  3729. of R6RS programs.
  3730. Guile is not fully R6RS compatible. Many incompatibilities are simply
  3731. bugs, though some parts of Guile will remain R6RS-incompatible for the
  3732. foreseeable future. See "R6RS Incompatibilities" in the manual, for more
  3733. information.
  3734. Please contact bug-guile@gnu.org if you have found an issue not
  3735. mentioned in that compatibility list.
  3736. ** New implementation of `primitive-eval'
  3737. Guile's `primitive-eval' is now implemented in Scheme. Actually there is
  3738. still a C evaluator, used when building a fresh Guile to interpret the
  3739. compiler, so we can compile eval.scm. Thereafter all calls to
  3740. primitive-eval are implemented by VM-compiled code.
  3741. This allows all of Guile's procedures, be they interpreted or compiled,
  3742. to execute on the same stack, unifying multiple-value return semantics,
  3743. providing for proper tail recursion between interpreted and compiled
  3744. code, and simplifying debugging.
  3745. As part of this change, the evaluator no longer mutates the internal
  3746. representation of the code being evaluated in a thread-unsafe manner.
  3747. There are two negative aspects of this change, however. First, Guile
  3748. takes a lot longer to compile now. Also, there is less debugging
  3749. information available for debugging interpreted code. We hope to improve
  3750. both of these situations.
  3751. There are many changes to the internal C evalator interface, but all
  3752. public interfaces should be the same. See the ChangeLog for details. If
  3753. we have inadvertantly changed an interface that you were using, please
  3754. contact bug-guile@gnu.org.
  3755. ** Procedure removed: `the-environment'
  3756. This procedure was part of the interpreter's execution model, and does
  3757. not apply to the compiler.
  3758. ** No more `local-eval'
  3759. `local-eval' used to exist so that one could evaluate code in the
  3760. lexical context of a function. Since there is no way to get the lexical
  3761. environment any more, as that concept has no meaning for the compiler,
  3762. and a different meaning for the interpreter, we have removed the
  3763. function.
  3764. If you think you need `local-eval', you should probably implement your
  3765. own metacircular evaluator. It will probably be as fast as Guile's
  3766. anyway.
  3767. ** Scheme source files will now be compiled automatically.
  3768. If a compiled .go file corresponding to a .scm file is not found or is
  3769. not fresh, the .scm file will be compiled on the fly, and the resulting
  3770. .go file stored away. An advisory note will be printed on the console.
  3771. Note that this mechanism depends on the timestamp of the .go file being
  3772. newer than that of the .scm file; if the .scm or .go files are moved
  3773. after installation, care should be taken to preserve their original
  3774. timestamps.
  3775. Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
  3776. directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
  3777. will be created if needed.
  3778. To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
  3779. variable to 0, or pass --no-auto-compile on the Guile command line.
  3780. ** New POSIX procedures: `getrlimit' and `setrlimit'
  3781. Note however that the interface of these functions is likely to change
  3782. in the next prerelease.
  3783. ** New POSIX procedure: `getsid'
  3784. Scheme binding for the `getsid' C library call.
  3785. ** New POSIX procedure: `getaddrinfo'
  3786. Scheme binding for the `getaddrinfo' C library function.
  3787. ** Multicast socket options
  3788. Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
  3789. options. See "Network Sockets and Communication" in the manual, for
  3790. more information.
  3791. ** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
  3792. These socket procedures now take bytevectors as arguments, instead of
  3793. strings. There is some deprecated string support, however.
  3794. ** New GNU procedures: `setaffinity' and `getaffinity'.
  3795. See "Processes" in the manual, for more information.
  3796. ** New procedures: `compose', `negate', and `const'
  3797. See "Higher-Order Functions" in the manual, for more information.
  3798. ** New procedure in `(oops goops)': `method-formals'
  3799. ** New procedures in (ice-9 session): `add-value-help-handler!',
  3800. `remove-value-help-handler!', `add-name-help-handler!'
  3801. `remove-name-help-handler!', `procedure-arguments'
  3802. The value and name help handlers provide some minimal extensibility to
  3803. the help interface. Guile-lib's `(texinfo reflection)' uses them, for
  3804. example, to make stexinfo help documentation available. See those
  3805. procedures' docstrings for more information.
  3806. `procedure-arguments' describes the arguments that a procedure can take,
  3807. combining arity and formals. For example:
  3808. (procedure-arguments resolve-interface)
  3809. => ((required . (name)) (rest . args))
  3810. Additionally, `module-commentary' is now publically exported from
  3811. `(ice-9 session).
  3812. ** Removed: `procedure->memoizing-macro', `procedure->syntax'
  3813. These procedures created primitive fexprs for the old evaluator, and are
  3814. no longer supported. If you feel that you need these functions, you
  3815. probably need to write your own metacircular evaluator (which will
  3816. probably be as fast as Guile's, anyway).
  3817. ** New language: ECMAScript
  3818. Guile now ships with one other high-level language supported,
  3819. ECMAScript. The goal is to support all of version 3.1 of the standard,
  3820. but not all of the libraries are there yet. This support is not yet
  3821. documented; ask on the mailing list if you are interested.
  3822. ** New language: Brainfuck
  3823. Brainfuck is a toy language that closely models Turing machines. Guile's
  3824. brainfuck compiler is meant to be an example of implementing other
  3825. languages. See the manual for details, or
  3826. http://en.wikipedia.org/wiki/Brainfuck for more information about the
  3827. Brainfuck language itself.
  3828. ** New language: Elisp
  3829. Guile now has an experimental Emacs Lisp compiler and runtime. You can
  3830. now switch to Elisp at the repl: `,language elisp'. All kudos to Daniel
  3831. Kraft and Brian Templeton, and all bugs to bug-guile@gnu.org.
  3832. ** Better documentation infrastructure for macros
  3833. It is now possible to introspect on the type of a macro, e.g.
  3834. syntax-rules, identifier-syntax, etc, and extract information about that
  3835. macro, such as the syntax-rules patterns or the defmacro arguments.
  3836. `(texinfo reflection)' takes advantage of this to give better macro
  3837. documentation.
  3838. ** Support for arbitrary procedure metadata
  3839. Building on its support for docstrings, Guile now supports multiple
  3840. docstrings, adding them to the tail of a compiled procedure's
  3841. properties. For example:
  3842. (define (foo)
  3843. "one"
  3844. "two"
  3845. 3)
  3846. (procedure-properties foo)
  3847. => ((name . foo) (documentation . "one") (documentation . "two"))
  3848. Also, vectors of pairs are now treated as additional metadata entries:
  3849. (define (bar)
  3850. #((quz . #f) (docstring . "xyzzy"))
  3851. 3)
  3852. (procedure-properties bar)
  3853. => ((name . bar) (quz . #f) (docstring . "xyzzy"))
  3854. This allows arbitrary literals to be embedded as metadata in a compiled
  3855. procedure.
  3856. ** The psyntax expander now knows how to interpret the @ and @@ special
  3857. forms.
  3858. ** The psyntax expander is now hygienic with respect to modules.
  3859. Free variables in a macro are scoped in the module that the macro was
  3860. defined in, not in the module the macro is used in. For example, code
  3861. like this works now:
  3862. (define-module (foo) #:export (bar))
  3863. (define (helper x) ...)
  3864. (define-syntax bar
  3865. (syntax-rules () ((_ x) (helper x))))
  3866. (define-module (baz) #:use-module (foo))
  3867. (bar qux)
  3868. It used to be you had to export `helper' from `(foo)' as well.
  3869. Thankfully, this has been fixed.
  3870. ** Support for version information in Guile's `module' form
  3871. Guile modules now have a `#:version' field. See "R6RS Version
  3872. References", "General Information about Modules", "Using Guile Modules",
  3873. and "Creating Guile Modules" in the manual for more information.
  3874. ** Support for renaming bindings on module export
  3875. Wherever Guile accepts a symbol as an argument to specify a binding to
  3876. export, it now also accepts a pair of symbols, indicating that a binding
  3877. should be renamed on export. See "Creating Guile Modules" in the manual
  3878. for more information.
  3879. ** New procedure: `module-export-all!'
  3880. This procedure exports all current and future bindings from a module.
  3881. Use as `(module-export-all! (current-module))'.
  3882. ** New procedure `reload-module', and `,reload' REPL command
  3883. See "Module System Reflection" and "Module Commands" in the manual, for
  3884. more information.
  3885. ** `eval-case' has been deprecated, and replaced by `eval-when'.
  3886. The semantics of `eval-when' are easier to understand. See "Eval When"
  3887. in the manual, for more information.
  3888. ** Guile is now more strict about prohibiting definitions in expression
  3889. contexts.
  3890. Although previous versions of Guile accepted it, the following
  3891. expression is not valid, in R5RS or R6RS:
  3892. (if test (define foo 'bar) (define foo 'baz))
  3893. In this specific case, it would be better to do:
  3894. (define foo (if test 'bar 'baz))
  3895. It is possible to circumvent this restriction with e.g.
  3896. `(module-define! (current-module) 'foo 'baz)'. Contact the list if you
  3897. have any questions.
  3898. ** Support for `letrec*'
  3899. Guile now supports `letrec*', a recursive lexical binding operator in
  3900. which the identifiers are bound in order. See "Local Bindings" in the
  3901. manual, for more details.
  3902. ** Internal definitions now expand to `letrec*'
  3903. Following the R6RS, internal definitions now expand to letrec* instead
  3904. of letrec. The following program is invalid for R5RS, but valid for
  3905. R6RS:
  3906. (define (foo)
  3907. (define bar 10)
  3908. (define baz (+ bar 20))
  3909. baz)
  3910. ;; R5RS and Guile <= 1.8:
  3911. (foo) => Unbound variable: bar
  3912. ;; R6RS and Guile >= 2.0:
  3913. (foo) => 30
  3914. This change should not affect correct R5RS programs, or programs written
  3915. in earlier Guile dialects.
  3916. ** Macro expansion produces structures instead of s-expressions
  3917. In the olden days, macroexpanding an s-expression would yield another
  3918. s-expression. Though the lexical variables were renamed, expansions of
  3919. core forms like `if' and `begin' were still non-hygienic, as they relied
  3920. on the toplevel definitions of `if' et al being the conventional ones.
  3921. The solution is to expand to structures instead of s-expressions. There
  3922. is an `if' structure, a `begin' structure, a `toplevel-ref' structure,
  3923. etc. The expander already did this for compilation, producing Tree-IL
  3924. directly; it has been changed now to do so when expanding for the
  3925. evaluator as well.
  3926. ** Defmacros must now produce valid Scheme expressions.
  3927. It used to be that defmacros could unquote in Scheme values, as a way of
  3928. supporting partial evaluation, and avoiding some hygiene issues. For
  3929. example:
  3930. (define (helper x) ...)
  3931. (define-macro (foo bar)
  3932. `(,helper ,bar))
  3933. Assuming this macro is in the `(baz)' module, the direct translation of
  3934. this code would be:
  3935. (define (helper x) ...)
  3936. (define-macro (foo bar)
  3937. `((@@ (baz) helper) ,bar))
  3938. Of course, one could just use a hygienic macro instead:
  3939. (define-syntax foo
  3940. (syntax-rules ()
  3941. ((_ bar) (helper bar))))
  3942. ** Guile's psyntax now supports docstrings and internal definitions.
  3943. The following Scheme is not strictly legal:
  3944. (define (foo)
  3945. "bar"
  3946. (define (baz) ...)
  3947. (baz))
  3948. However its intent is fairly clear. Guile interprets "bar" to be the
  3949. docstring of `foo', and the definition of `baz' is still in definition
  3950. context.
  3951. ** Support for settable identifier syntax
  3952. Following the R6RS, "variable transformers" are settable
  3953. identifier-syntax. See "Identifier macros" in the manual, for more
  3954. information.
  3955. ** syntax-case treats `_' as a placeholder
  3956. Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
  3957. anything, and binds no pattern variables. Unlike the R6RS, Guile also
  3958. permits `_' to be in the literals list for a pattern.
  3959. ** Macros need to be defined before their first use.
  3960. It used to be that with lazy memoization, this might work:
  3961. (define (foo x)
  3962. (ref x))
  3963. (define-macro (ref x) x)
  3964. (foo 1) => 1
  3965. But now, the body of `foo' is interpreted to mean a call to the toplevel
  3966. `ref' function, instead of a macro expansion. The solution is to define
  3967. macros before code that uses them.
  3968. ** Functions needed by macros at expand-time need to be present at
  3969. expand-time.
  3970. For example, this code will work at the REPL:
  3971. (define (double-helper x) (* x x))
  3972. (define-macro (double-literal x) (double-helper x))
  3973. (double-literal 2) => 4
  3974. But it will not work when a file is compiled, because the definition of
  3975. `double-helper' is not present at expand-time. The solution is to wrap
  3976. the definition of `double-helper' in `eval-when':
  3977. (eval-when (load compile eval)
  3978. (define (double-helper x) (* x x)))
  3979. (define-macro (double-literal x) (double-helper x))
  3980. (double-literal 2) => 4
  3981. See the documentation for eval-when for more information.
  3982. ** `macroexpand' produces structures, not S-expressions.
  3983. Given the need to maintain referential transparency, both lexically and
  3984. modular, the result of expanding Scheme expressions is no longer itself
  3985. an s-expression. If you want a human-readable approximation of the
  3986. result of `macroexpand', call `tree-il->scheme' from `(language
  3987. tree-il)'.
  3988. ** Removed function: `macroexpand-1'
  3989. It is unclear how to implement `macroexpand-1' with syntax-case, though
  3990. PLT Scheme does prove that it is possible.
  3991. ** New reader macros: #' #` #, #,@
  3992. These macros translate, respectively, to `syntax', `quasisyntax',
  3993. `unsyntax', and `unsyntax-splicing'. See the R6RS for more information.
  3994. These reader macros may be overridden by `read-hash-extend'.
  3995. ** Incompatible change to #'
  3996. Guile did have a #' hash-extension, by default, which just returned the
  3997. subsequent datum: #'foo => foo. In the unlikely event that anyone
  3998. actually used this, this behavior may be reinstated via the
  3999. `read-hash-extend' mechanism.
  4000. ** `unquote' and `unquote-splicing' accept multiple expressions
  4001. As per the R6RS, these syntax operators can now accept any number of
  4002. expressions to unquote.
  4003. ** Scheme expresssions may be commented out with #;
  4004. #; comments out an entire expression. See SRFI-62 or the R6RS for more
  4005. information.
  4006. ** Prompts: Delimited, composable continuations
  4007. Guile now has prompts as part of its primitive language. See "Prompts"
  4008. in the manual, for more information.
  4009. Expressions entered in at the REPL, or from the command line, are
  4010. surrounded by a prompt with the default prompt tag.
  4011. ** `make-stack' with a tail-called procedural narrowing argument no longer
  4012. works (with compiled procedures)
  4013. It used to be the case that a captured stack could be narrowed to select
  4014. calls only up to or from a certain procedure, even if that procedure
  4015. already tail-called another procedure. This was because the debug
  4016. information from the original procedure was kept on the stack.
  4017. Now with the new compiler, the stack only contains active frames from
  4018. the current continuation. A narrow to a procedure that is not in the
  4019. stack will result in an empty stack. To fix this, narrow to a procedure
  4020. that is active in the current continuation, or narrow to a specific
  4021. number of stack frames.
  4022. ** Backtraces through compiled procedures only show procedures that are
  4023. active in the current continuation
  4024. Similarly to the previous issue, backtraces in compiled code may be
  4025. different from backtraces in interpreted code. There are no semantic
  4026. differences, however. Please mail bug-guile@gnu.org if you see any
  4027. deficiencies with Guile's backtraces.
  4028. ** `positions' reader option enabled by default
  4029. This change allows primitive-load without --auto-compile to also
  4030. propagate source information through the expander, for better errors and
  4031. to let macros know their source locations. The compiler was already
  4032. turning it on anyway.
  4033. ** New macro: `current-source-location'
  4034. The macro returns the current source location (to be documented).
  4035. ** syntax-rules and syntax-case macros now propagate source information
  4036. through to the expanded code
  4037. This should result in better backtraces.
  4038. ** The currying behavior of `define' has been removed.
  4039. Before, `(define ((f a) b) (* a b))' would translate to
  4040. (define f (lambda (a) (lambda (b) (* a b))))
  4041. Now a syntax error is signaled, as this syntax is not supported by
  4042. default. Use the `(ice-9 curried-definitions)' module to get back the
  4043. old behavior.
  4044. ** New procedure, `define!'
  4045. `define!' is a procedure that takes two arguments, a symbol and a value,
  4046. and binds the value to the symbol in the current module. It's useful to
  4047. programmatically make definitions in the current module, and is slightly
  4048. less verbose than `module-define!'.
  4049. ** All modules have names now
  4050. Before, you could have anonymous modules: modules without names. Now,
  4051. because of hygiene and macros, all modules have names. If a module was
  4052. created without a name, the first time `module-name' is called on it, a
  4053. fresh name will be lazily generated for it.
  4054. ** The module namespace is now separate from the value namespace
  4055. It was a little-known implementation detail of Guile's module system
  4056. that it was built on a single hierarchical namespace of values -- that
  4057. if there was a module named `(foo bar)', then in the module named
  4058. `(foo)' there was a binding from `bar' to the `(foo bar)' module.
  4059. This was a neat trick, but presented a number of problems. One problem
  4060. was that the bindings in a module were not apparent from the module
  4061. itself; perhaps the `(foo)' module had a private binding for `bar', and
  4062. then an external contributor defined `(foo bar)'. In the end there can
  4063. be only one binding, so one of the two will see the wrong thing, and
  4064. produce an obtuse error of unclear provenance.
  4065. Also, the public interface of a module was also bound in the value
  4066. namespace, as `%module-public-interface'. This was a hack from the early
  4067. days of Guile's modules.
  4068. Both of these warts have been fixed by the addition of fields in the
  4069. `module' data type. Access to modules and their interfaces from the
  4070. value namespace has been deprecated, and all accessors use the new
  4071. record accessors appropriately.
  4072. When Guile is built with support for deprecated code, as is the default,
  4073. the value namespace is still searched for modules and public interfaces,
  4074. and a deprecation warning is raised as appropriate.
  4075. Finally, to support lazy loading of modules as one used to be able to do
  4076. with module binder procedures, Guile now has submodule binders, called
  4077. if a given submodule is not found. See boot-9.scm for more information.
  4078. ** New procedures: module-ref-submodule, module-define-submodule,
  4079. nested-ref-module, nested-define-module!, local-ref-module,
  4080. local-define-module
  4081. These new accessors are like their bare variants, but operate on
  4082. namespaces instead of values.
  4083. ** The (app modules) module tree is officially deprecated
  4084. It used to be that one could access a module named `(foo bar)' via
  4085. `(nested-ref the-root-module '(app modules foo bar))'. The `(app
  4086. modules)' bit was a never-used and never-documented abstraction, and has
  4087. been deprecated. See the following mail for a full discussion:
  4088. http://lists.gnu.org/archive/html/guile-devel/2010-04/msg00168.html
  4089. The `%app' binding is also deprecated.
  4090. ** `module-filename' field and accessor
  4091. Modules now record the file in which they are defined. This field may be
  4092. accessed with the new `module-filename' procedure.
  4093. ** Modules load within a known environment
  4094. It takes a few procedure calls to define a module, and those procedure
  4095. calls need to be in scope. Now we ensure that the current module when
  4096. loading a module is one that has the needed bindings, instead of relying
  4097. on chance.
  4098. ** `load' is a macro (!) that resolves paths relative to source file dir
  4099. The familiar Schem `load' procedure is now a macro that captures the
  4100. name of the source file being expanded, and dispatches to the new
  4101. `load-in-vicinity'. Referencing `load' by bare name returns a closure
  4102. that embeds the current source file name.
  4103. This fix allows `load' of relative paths to be resolved with respect to
  4104. the location of the file that calls `load'.
  4105. ** Many syntax errors have different texts now
  4106. Syntax errors still throw to the `syntax-error' key, but the arguments
  4107. are often different now. Perhaps in the future, Guile will switch to
  4108. using standard SRFI-35 conditions.
  4109. ** Returning multiple values to compiled code will silently truncate the
  4110. values to the expected number
  4111. For example, the interpreter would raise an error evaluating the form,
  4112. `(+ (values 1 2) (values 3 4))', because it would see the operands as
  4113. being two compound "values" objects, to which `+' does not apply.
  4114. The compiler, on the other hand, receives multiple values on the stack,
  4115. not as a compound object. Given that it must check the number of values
  4116. anyway, if too many values are provided for a continuation, it chooses
  4117. to truncate those values, effectively evaluating `(+ 1 3)' instead.
  4118. The idea is that the semantics that the compiler implements is more
  4119. intuitive, and the use of the interpreter will fade out with time.
  4120. This behavior is allowed both by the R5RS and the R6RS.
  4121. ** Multiple values in compiled code are not represented by compound
  4122. objects
  4123. This change may manifest itself in the following situation:
  4124. (let ((val (foo))) (do-something) val)
  4125. In the interpreter, if `foo' returns multiple values, multiple values
  4126. are produced from the `let' expression. In the compiler, those values
  4127. are truncated to the first value, and that first value is returned. In
  4128. the compiler, if `foo' returns no values, an error will be raised, while
  4129. the interpreter would proceed.
  4130. Both of these behaviors are allowed by R5RS and R6RS. The compiler's
  4131. behavior is more correct, however. If you wish to preserve a potentially
  4132. multiply-valued return, you will need to set up a multiple-value
  4133. continuation, using `call-with-values'.
  4134. ** Defmacros are now implemented in terms of syntax-case.
  4135. The practical ramification of this is that the `defmacro?' predicate has
  4136. been removed, along with `defmacro-transformer', `macro-table',
  4137. `xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and
  4138. `defmacro:transformer'. This is because defmacros are simply macros. If
  4139. any of these procedures provided useful facilities to you, we encourage
  4140. you to contact the Guile developers.
  4141. ** Hygienic macros documented as the primary syntactic extension mechanism.
  4142. The macro documentation was finally fleshed out with some documentation
  4143. on `syntax-rules' and `syntax-case' macros, and other parts of the macro
  4144. expansion process. See "Macros" in the manual, for details.
  4145. ** psyntax is now the default expander
  4146. Scheme code is now expanded by default by the psyntax hygienic macro
  4147. expander. Expansion is performed completely before compilation or
  4148. interpretation.
  4149. Notably, syntax errors will be signalled before interpretation begins.
  4150. In the past, many syntax errors were only detected at runtime if the
  4151. code in question was memoized.
  4152. As part of its expansion, psyntax renames all lexically-bound
  4153. identifiers. Original identifier names are preserved and given to the
  4154. compiler, but the interpreter will see the renamed variables, e.g.,
  4155. `x432' instead of `x'.
  4156. Note that the psyntax that Guile uses is a fork, as Guile already had
  4157. modules before incompatible modules were added to psyntax -- about 10
  4158. years ago! Thus there are surely a number of bugs that have been fixed
  4159. in psyntax since then. If you find one, please notify bug-guile@gnu.org.
  4160. ** syntax-rules and syntax-case are available by default.
  4161. There is no longer any need to import the `(ice-9 syncase)' module
  4162. (which is now deprecated). The expander may be invoked directly via
  4163. `macroexpand', though it is normally searched for via the current module
  4164. transformer.
  4165. Also, the helper routines for syntax-case are available in the default
  4166. environment as well: `syntax->datum', `datum->syntax',
  4167. `bound-identifier=?', `free-identifier=?', `generate-temporaries',
  4168. `identifier?', and `syntax-violation'. See the R6RS for documentation.
  4169. ** Tail patterns in syntax-case
  4170. Guile has pulled in some more recent changes from the psyntax portable
  4171. syntax expander, to implement support for "tail patterns". Such patterns
  4172. are supported by syntax-rules and syntax-case. This allows a syntax-case
  4173. match clause to have ellipses, then a pattern at the end. For example:
  4174. (define-syntax case
  4175. (syntax-rules (else)
  4176. ((_ val match-clause ... (else e e* ...))
  4177. [...])))
  4178. Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
  4179. tail pattern for the else clause. Thanks to Andreas Rottmann for the
  4180. patch, and Kent Dybvig for the code.
  4181. ** Lexical bindings introduced by hygienic macros may not be referenced
  4182. by nonhygienic macros.
  4183. If a lexical binding is introduced by a hygienic macro, it may not be
  4184. referenced by a nonhygienic macro. For example, this works:
  4185. (let ()
  4186. (define-macro (bind-x val body)
  4187. `(let ((x ,val)) ,body))
  4188. (define-macro (ref x)
  4189. x)
  4190. (bind-x 10 (ref x)))
  4191. But this does not:
  4192. (let ()
  4193. (define-syntax bind-x
  4194. (syntax-rules ()
  4195. ((_ val body) (let ((x val)) body))))
  4196. (define-macro (ref x)
  4197. x)
  4198. (bind-x 10 (ref x)))
  4199. It is not normal to run into this situation with existing code. However,
  4200. if you have defmacros that expand to hygienic macros, it is possible to
  4201. run into situations like this. For example, if you have a defmacro that
  4202. generates a `while' expression, the `break' bound by the `while' may not
  4203. be visible within other parts of your defmacro. The solution is to port
  4204. from defmacros to syntax-rules or syntax-case.
  4205. ** Macros may no longer be referenced as first-class values.
  4206. In the past, you could evaluate e.g. `if', and get its macro value. Now,
  4207. expanding this form raises a syntax error.
  4208. Macros still /exist/ as first-class values, but they must be
  4209. /referenced/ via the module system, e.g. `(module-ref (current-module)
  4210. 'if)'.
  4211. ** Macros may now have docstrings.
  4212. `object-documentation' from `(ice-9 documentation)' may be used to
  4213. retrieve the docstring, once you have a macro value -- but see the above
  4214. note about first-class macros. Docstrings are associated with the syntax
  4215. transformer procedures.
  4216. ** `case-lambda' is now available in the default environment.
  4217. The binding in the default environment is equivalent to the one from the
  4218. `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
  4219. to maintain compatibility with Guile 1.8 and earlier.
  4220. ** Procedures may now have more than one arity.
  4221. This can be the case, for example, in case-lambda procedures. The
  4222. arities of compiled procedures may be accessed via procedures from the
  4223. `(system vm program)' module; see "Compiled Procedures", "Optional
  4224. Arguments", and "Case-lambda" in the manual.
  4225. ** Deprecate arity access via (procedure-properties proc 'arity)
  4226. Instead of accessing a procedure's arity as a property, use the new
  4227. `procedure-minimum-arity' function, which gives the most permissive
  4228. arity that the function has, in the same format as the old arity
  4229. accessor.
  4230. ** `lambda*' and `define*' are now available in the default environment
  4231. As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
  4232. compatibility purposes. No semantic change has been made (we hope).
  4233. Optional and keyword arguments now dispatch via special VM operations,
  4234. without the need to cons rest arguments, making them very fast.
  4235. ** New syntax: define-once
  4236. `define-once' is like Lisp's `defvar': it creates a toplevel binding,
  4237. but only if one does not exist already.
  4238. ** New function, `truncated-print', with `format' support
  4239. `(ice-9 pretty-print)' now exports `truncated-print', a printer that
  4240. will ensure that the output stays within a certain width, truncating the
  4241. output in what is hopefully an intelligent manner. See the manual for
  4242. more details.
  4243. There is a new `format' specifier, `~@y', for doing a truncated
  4244. print (as opposed to `~y', which does a pretty-print). See the `format'
  4245. documentation for more details.
  4246. ** Better pretty-printing
  4247. Indentation recognizes more special forms, like `syntax-case', and read
  4248. macros like `quote' are printed better.
  4249. ** Passing a number as the destination of `format' is deprecated
  4250. The `format' procedure in `(ice-9 format)' now emits a deprecation
  4251. warning if a number is passed as its first argument.
  4252. Also, it used to be that you could omit passing a port to `format', in
  4253. some cases. This still works, but has been formally deprecated.
  4254. ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
  4255. Guile now implements SRFI-4 vectors using bytevectors. Often when you
  4256. have a numeric vector, you end up wanting to write its bytes somewhere,
  4257. or have access to the underlying bytes, or read in bytes from somewhere
  4258. else. Bytevectors are very good at this sort of thing. But the SRFI-4
  4259. APIs are nicer to use when doing number-crunching, because they are
  4260. addressed by element and not by byte.
  4261. So as a compromise, Guile allows all bytevector functions to operate on
  4262. numeric vectors. They address the underlying bytes in the native
  4263. endianness, as one would expect.
  4264. Following the same reasoning, that it's just bytes underneath, Guile
  4265. also allows uniform vectors of a given type to be accessed as if they
  4266. were of any type. One can fill a u32vector, and access its elements with
  4267. u8vector-ref. One can use f64vector-ref on bytevectors. It's all the
  4268. same to Guile.
  4269. In this way, uniform numeric vectors may be written to and read from
  4270. input/output ports using the procedures that operate on bytevectors.
  4271. Calls to SRFI-4 accessors (ref and set functions) from Scheme are now
  4272. inlined to the VM instructions for bytevector access.
  4273. See "SRFI-4" in the manual, for more information.
  4274. ** Nonstandard SRFI-4 procedures now available from `(srfi srfi-4 gnu)'
  4275. Guile's `(srfi srfi-4)' now only exports those srfi-4 procedures that
  4276. are part of the standard. Complex uniform vectors and the
  4277. `any->FOOvector' family are now available only from `(srfi srfi-4 gnu)'.
  4278. Guile's default environment imports `(srfi srfi-4)', and probably should
  4279. import `(srfi srfi-4 gnu)' as well.
  4280. See "SRFI-4 Extensions" in the manual, for more information.
  4281. ** New syntax: include-from-path.
  4282. `include-from-path' is like `include', except it looks for its file in
  4283. the load path. It can be used to compile other files into a file.
  4284. ** New syntax: quasisyntax.
  4285. `quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
  4286. documentation for more information. Thanks to Andre van Tonder for the
  4287. implementation.
  4288. ** `*unspecified*' is identifier syntax
  4289. `*unspecified*' is no longer a variable, so it is optimized properly by
  4290. the compiler, and is not `set!'-able.
  4291. ** Changes and bugfixes in numerics code
  4292. *** Added six new sets of fast quotient and remainder operators
  4293. Added six new sets of fast quotient and remainder operator pairs with
  4294. different semantics than the R5RS operators. They support not only
  4295. integers, but all reals, including exact rationals and inexact
  4296. floating point numbers.
  4297. These procedures accept two real numbers N and D, where the divisor D
  4298. must be non-zero. Each set of operators computes an integer quotient
  4299. Q and a real remainder R such that N = Q*D + R and |R| < |D|. They
  4300. differ only in how N/D is rounded to produce Q.
  4301. `euclidean-quotient' returns the integer Q and `euclidean-remainder'
  4302. returns the real R such that N = Q*D + R and 0 <= R < |D|. `euclidean/'
  4303. returns both Q and R, and is more efficient than computing each
  4304. separately. Note that when D > 0, `euclidean-quotient' returns
  4305. floor(N/D), and when D < 0 it returns ceiling(N/D).
  4306. `centered-quotient', `centered-remainder', and `centered/' are similar
  4307. except that the range of remainders is -abs(D/2) <= R < abs(D/2), and
  4308. `centered-quotient' rounds N/D to the nearest integer. Note that these
  4309. operators are equivalent to the R6RS integer division operators `div',
  4310. `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.
  4311. `floor-quotient' and `floor-remainder' compute Q and R, respectively,
  4312. where Q has been rounded toward negative infinity. `floor/' returns
  4313. both Q and R, and is more efficient than computing each separately.
  4314. Note that when applied to integers, `floor-remainder' is equivalent to
  4315. the R5RS integer-only `modulo' operator. `ceiling-quotient',
  4316. `ceiling-remainder', and `ceiling/' are similar except that Q is
  4317. rounded toward positive infinity.
  4318. For `truncate-quotient', `truncate-remainder', and `truncate/', Q is
  4319. rounded toward zero. Note that when applied to integers,
  4320. `truncate-quotient' and `truncate-remainder' are equivalent to the
  4321. R5RS integer-only operators `quotient' and `remainder'.
  4322. For `round-quotient', `round-remainder', and `round/', Q is rounded to
  4323. the nearest integer, with ties going to the nearest even integer.
  4324. *** Complex number changes
  4325. Guile is now able to represent non-real complex numbers whose
  4326. imaginary part is an _inexact_ zero (0.0 or -0.0), per R6RS.
  4327. Previously, such numbers were immediately changed into inexact reals.
  4328. (real? 0.0+0.0i) now returns #f, per R6RS, although (zero? 0.0+0.0i)
  4329. still returns #t, per R6RS. (= 0 0.0+0.0i) and (= 0.0 0.0+0.0i) are
  4330. #t, but the same comparisons using `eqv?' or `equal?' are #f.
  4331. Like other non-real numbers, these complex numbers with inexact zero
  4332. imaginary part will raise exceptions is passed to procedures requiring
  4333. reals, such as `<', `>', `<=', `>=', `min', `max', `positive?',
  4334. `negative?', `inf?', `nan?', `finite?', etc.
  4335. **** `make-rectangular' changes
  4336. scm_make_rectangular `make-rectangular' now returns a real number only
  4337. if the imaginary part is an _exact_ 0. Previously, it would return a
  4338. real number if the imaginary part was an inexact zero.
  4339. scm_c_make_rectangular now always returns a non-real complex number,
  4340. even if the imaginary part is zero. Previously, it would return a
  4341. real number if the imaginary part was zero.
  4342. **** `make-polar' changes
  4343. scm_make_polar `make-polar' now returns a real number only if the
  4344. angle or magnitude is an _exact_ 0. If the magnitude is an exact 0,
  4345. it now returns an exact 0. Previously, it would return a real
  4346. number if the imaginary part was an inexact zero.
  4347. scm_c_make_polar now always returns a non-real complex number, even if
  4348. the imaginary part is 0.0. Previously, it would return a real number
  4349. if the imaginary part was 0.0.
  4350. **** `imag-part' changes
  4351. scm_imag_part `imag-part' now returns an exact 0 if applied to an
  4352. inexact real number. Previously it returned an inexact zero in this
  4353. case.
  4354. *** `eqv?' and `equal?' now compare numbers equivalently
  4355. scm_equal_p `equal?' now behaves equivalently to scm_eqv_p `eqv?' for
  4356. numeric values, per R5RS. Previously, equal? worked differently,
  4357. e.g. `(equal? 0.0 -0.0)' returned #t but `(eqv? 0.0 -0.0)' returned #f,
  4358. and `(equal? +nan.0 +nan.0)' returned #f but `(eqv? +nan.0 +nan.0)'
  4359. returned #t.
  4360. *** `(equal? +nan.0 +nan.0)' now returns #t
  4361. Previously, `(equal? +nan.0 +nan.0)' returned #f, although
  4362. `(let ((x +nan.0)) (equal? x x))' and `(eqv? +nan.0 +nan.0)'
  4363. both returned #t. R5RS requires that `equal?' behave like
  4364. `eqv?' when comparing numbers.
  4365. *** Change in handling products `*' involving exact 0
  4366. scm_product `*' now handles exact 0 differently. A product containing
  4367. an exact 0 now returns an exact 0 if and only if the other arguments
  4368. are all exact. An inexact zero is returned if and only if the other
  4369. arguments are all finite but not all exact. If an infinite or NaN
  4370. value is present, a NaN value is returned. Previously, any product
  4371. containing an exact 0 yielded an exact 0, regardless of the other
  4372. arguments.
  4373. *** `expt' and `integer-expt' changes when the base is 0
  4374. While `(expt 0 0)' is still 1, and `(expt 0 N)' for N > 0 is still
  4375. zero, `(expt 0 N)' for N < 0 is now a NaN value, and likewise for
  4376. integer-expt. This is more correct, and conforming to R6RS, but seems
  4377. to be incompatible with R5RS, which would return 0 for all non-zero
  4378. values of N.
  4379. *** `expt' and `integer-expt' are more generic, less strict
  4380. When raising to an exact non-negative integer exponent, `expt' and
  4381. `integer-expt' are now able to exponentiate any object that can be
  4382. multiplied using `*'. They can also raise an object to an exact
  4383. negative integer power if its reciprocal can be taken using `/'.
  4384. In order to allow this, the type of the first argument is no longer
  4385. checked when raising to an exact integer power. If the exponent is 0
  4386. or 1, the first parameter is not manipulated at all, and need not
  4387. even support multiplication.
  4388. *** Infinities are no longer integers, nor rationals
  4389. scm_integer_p `integer?' and scm_rational_p `rational?' now return #f
  4390. for infinities, per R6RS. Previously they returned #t for real
  4391. infinities. The real infinities and NaNs are still considered real by
  4392. scm_real `real?' however, per R6RS.
  4393. *** NaNs are no longer rationals
  4394. scm_rational_p `rational?' now returns #f for NaN values, per R6RS.
  4395. Previously it returned #t for real NaN values. They are still
  4396. considered real by scm_real `real?' however, per R6RS.
  4397. *** `inf?' and `nan?' now throw exceptions for non-reals
  4398. The domain of `inf?' and `nan?' is the real numbers. Guile now signals
  4399. an error when a non-real number or non-number is passed to these
  4400. procedures. (Note that NaNs _are_ considered numbers by scheme, despite
  4401. their name).
  4402. *** `rationalize' bugfixes and changes
  4403. Fixed bugs in scm_rationalize `rationalize'. Previously, it returned
  4404. exact integers unmodified, although that was incorrect if the epsilon
  4405. was at least 1 or inexact, e.g. (rationalize 4 1) should return 3 per
  4406. R5RS and R6RS, but previously it returned 4. It also now handles
  4407. cases involving infinities and NaNs properly, per R6RS.
  4408. *** Trigonometric functions now return exact numbers in some cases
  4409. scm_sin `sin', scm_cos `cos', scm_tan `tan', scm_asin `asin', scm_acos
  4410. `acos', scm_atan `atan', scm_sinh `sinh', scm_cosh `cosh', scm_tanh
  4411. `tanh', scm_sys_asinh `asinh', scm_sys_acosh `acosh', and
  4412. scm_sys_atanh `atanh' now return exact results in some cases.
  4413. *** New procedure: `finite?'
  4414. Add scm_finite_p `finite?' from R6RS to guile core, which returns #t
  4415. if and only if its argument is neither infinite nor a NaN. Note that
  4416. this is not the same as (not (inf? x)) or (not (infinite? x)), since
  4417. NaNs are neither finite nor infinite.
  4418. *** Improved exactness handling for complex number parsing
  4419. When parsing non-real complex numbers, exactness specifiers are now
  4420. applied to each component, as is done in PLT Scheme. For complex
  4421. numbers written in rectangular form, exactness specifiers are applied
  4422. to the real and imaginary parts before calling scm_make_rectangular.
  4423. For complex numbers written in polar form, exactness specifiers are
  4424. applied to the magnitude and angle before calling scm_make_polar.
  4425. Previously, exactness specifiers were applied to the number as a whole
  4426. _after_ calling scm_make_rectangular or scm_make_polar.
  4427. For example, (string->number "#i5.0+0i") now does the equivalent of:
  4428. (make-rectangular (exact->inexact 5.0) (exact->inexact 0))
  4429. which yields 5.0+0.0i. Previously it did the equivalent of:
  4430. (exact->inexact (make-rectangular 5.0 0))
  4431. which yielded 5.0.
  4432. ** Unicode characters
  4433. Unicode characters may be entered in octal format via e.g. `#\454', or
  4434. created via (integer->char 300). A hex external representation will
  4435. probably be introduced at some point.
  4436. ** Unicode strings
  4437. Internally, strings are now represented either in the `latin-1'
  4438. encoding, one byte per character, or in UTF-32, with four bytes per
  4439. character. Strings manage their own allocation, switching if needed.
  4440. Extended characters may be written in a literal string using the
  4441. hexadecimal escapes `\xXX', `\uXXXX', or `\UXXXXXX', for 8-bit, 16-bit,
  4442. or 24-bit codepoints, respectively, or entered directly in the native
  4443. encoding of the port on which the string is read.
  4444. ** Unicode symbols
  4445. One may now use U+03BB (GREEK SMALL LETTER LAMBDA) as an identifier.
  4446. ** Support for non-ASCII source code files
  4447. The default reader now handles source code files for some of the
  4448. non-ASCII character encodings, such as UTF-8. A non-ASCII source file
  4449. should have an encoding declaration near the top of the file. Also,
  4450. there is a new function, `file-encoding', that scans a port for a coding
  4451. declaration. See the section of the manual entitled, "Character Encoding
  4452. of Source Files".
  4453. The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
  4454. code. This use is now discouraged. Binary input and output is
  4455. currently supported by opening ports in the ISO-8859-1 locale.
  4456. ** Source files default to UTF-8.
  4457. If source files do not specify their encoding via a `coding:' block,
  4458. the default encoding is UTF-8, instead of being taken from the current
  4459. locale.
  4460. ** Interactive Guile installs the current locale.
  4461. Instead of leaving the user in the "C" locale, running the Guile REPL
  4462. installs the current locale. [FIXME xref?]
  4463. ** Support for locale transcoding when reading from and writing to ports
  4464. Ports now have an associated character encoding, and port read and write
  4465. operations do conversion to and from locales automatically. Ports also
  4466. have an associated strategy for how to deal with locale conversion
  4467. failures.
  4468. See the documentation in the manual for the four new support functions,
  4469. `set-port-encoding!', `port-encoding', `set-port-conversion-strategy!',
  4470. and `port-conversion-strategy'.
  4471. ** String and SRFI-13 functions can operate on Unicode strings
  4472. ** Unicode support for SRFI-14 character sets
  4473. The default character sets are no longer locale dependent and contain
  4474. characters from the whole Unicode range. There is a new predefined
  4475. character set, `char-set:designated', which contains all assigned
  4476. Unicode characters. There is a new debugging function, `%char-set-dump'.
  4477. ** Character functions operate on Unicode characters
  4478. `char-upcase' and `char-downcase' use default Unicode casing rules.
  4479. Character comparisons such as `char<?' and `char-ci<?' now sort based on
  4480. Unicode code points.
  4481. ** Global variables `scm_charnames' and `scm_charnums' are removed
  4482. These variables contained the names of control characters and were
  4483. used when writing characters. While these were global, they were
  4484. never intended to be public API. They have been replaced with private
  4485. functions.
  4486. ** EBCDIC support is removed
  4487. There was an EBCDIC compile flag that altered some of the character
  4488. processing. It appeared that full EBCDIC support was never completed
  4489. and was unmaintained.
  4490. ** Compile-time warnings
  4491. Guile can warn about potentially unbound free variables. Pass the
  4492. -Wunbound-variable on the `guile-tools compile' command line, or add
  4493. `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
  4494. invocation. Warnings are also enabled by default for expressions entered
  4495. at the REPL.
  4496. Guile can also warn when you pass the wrong number of arguments to a
  4497. procedure, with -Warity-mismatch, or `arity-mismatch' in the
  4498. `#:warnings' as above.
  4499. Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
  4500. warn about unused local or global (top-level) variables, and `-Wformat',
  4501. to check for various errors related to the `format' procedure.
  4502. ** A new `memoize-symbol' evaluator trap has been added.
  4503. This trap can be used for efficiently implementing a Scheme code
  4504. coverage.
  4505. ** Duplicate bindings among used modules are resolved lazily.
  4506. This slightly improves program startup times.
  4507. ** New thread cancellation and thread cleanup API
  4508. See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
  4509. ** New threads are in `(guile-user)' by default, not `(guile)'
  4510. It used to be that a new thread entering Guile would do so in the
  4511. `(guile)' module, unless this was the first time Guile was initialized,
  4512. in which case it was `(guile-user)'. This has been fixed to have all
  4513. new threads unknown to Guile default to `(guile-user)'.
  4514. ** New helpers: `print-exception', `set-exception-printer!'
  4515. These functions implement an extensible exception printer. Guile
  4516. registers printers for all of the exceptions it throws. Users may add
  4517. their own printers. There is also `scm_print_exception', for use by C
  4518. programs. Pleasantly, this allows SRFI-35 and R6RS exceptions to be
  4519. printed appropriately.
  4520. ** GOOPS dispatch in scheme
  4521. As an implementation detail, GOOPS dispatch is no longer implemented by
  4522. special evaluator bytecodes, but rather directly via a Scheme function
  4523. associated with an applicable struct. There is some VM support for the
  4524. underlying primitives, like `class-of'.
  4525. This change will in the future allow users to customize generic function
  4526. dispatch without incurring a performance penalty, and allow us to
  4527. implement method combinations.
  4528. ** Applicable struct support
  4529. One may now make structs from Scheme that may be applied as procedures.
  4530. To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
  4531. That struct will be the vtable of your applicable structs; instances of
  4532. that new struct are assumed to have the procedure in their first slot.
  4533. `<applicable-struct-vtable>' is like Common Lisp's
  4534. `funcallable-standard-class'. Likewise there is
  4535. `<applicable-struct-with-setter-vtable>', which looks for the setter in
  4536. the second slot. This needs to be better documented.
  4537. ** GOOPS cleanups.
  4538. GOOPS had a number of concepts that were relevant to the days of Tcl,
  4539. but not any more: operators and entities, mainly. These objects were
  4540. never documented, and it is unlikely that they were ever used. Operators
  4541. were a kind of generic specific to the Tcl support. Entities were
  4542. replaced by applicable structs, mentioned above.
  4543. ** New struct slot allocation: "hidden"
  4544. A hidden slot is readable and writable, but will not be initialized by a
  4545. call to make-struct. For example in your layout you would say "ph"
  4546. instead of "pw". Hidden slots are useful for adding new slots to a
  4547. vtable without breaking existing invocations to make-struct.
  4548. ** eqv? not a generic
  4549. One used to be able to extend `eqv?' as a primitive-generic, but no
  4550. more. Because `eqv?' is in the expansion of `case' (via `memv'), which
  4551. should be able to compile to static dispatch tables, it doesn't make
  4552. sense to allow extensions that would subvert this optimization.
  4553. ** `inet-ntop' and `inet-pton' are always available.
  4554. Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
  4555. there is no more need to use `inet-aton'/`inet-ntoa'. The latter
  4556. functions are deprecated.
  4557. ** `getopt-long' parsing errors throw to `quit', not `misc-error'
  4558. This change should inhibit backtraces on argument parsing errors.
  4559. `getopt-long' has been modified to print out the error that it throws
  4560. itself.
  4561. ** New primitive: `tmpfile'.
  4562. See "File System" in the manual.
  4563. ** Random generator state may be serialized to a datum
  4564. `random-state->datum' will serialize a random state to a datum, which
  4565. may be written out, read back in later, and revivified using
  4566. `datum->random-state'. See "Random" in the manual, for more details.
  4567. ** Fix random number generator on 64-bit platforms
  4568. There was a nasty bug on 64-bit platforms in which asking for a random
  4569. integer with a range between 2**32 and 2**64 caused a segfault. After
  4570. many embarrassing iterations, this was fixed.
  4571. ** Fast bit operations.
  4572. The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
  4573. have dedicated bytecodes. Guile is not just for symbolic computation,
  4574. it's for number crunching too.
  4575. ** Faster SRFI-9 record access
  4576. SRFI-9 records are now implemented directly on top of Guile's structs,
  4577. and their accessors are defined in such a way that normal call-sites
  4578. inline to special VM opcodes, while still allowing for the general case
  4579. (e.g. passing a record accessor to `apply').
  4580. ** R6RS block comment support
  4581. Guile now supports R6RS nested block comments. The start of a comment is
  4582. marked with `#|', and the end with `|#'.
  4583. ** `guile-2' cond-expand feature
  4584. To test if your code is running under Guile 2.0 (or its alpha releases),
  4585. test for the `guile-2' cond-expand feature. Like this:
  4586. (cond-expand (guile-2 (eval-when (compile)
  4587. ;; This must be evaluated at compile time.
  4588. (fluid-set! current-reader my-reader)))
  4589. (guile
  4590. ;; Earlier versions of Guile do not have a
  4591. ;; separate compilation phase.
  4592. (fluid-set! current-reader my-reader)))
  4593. ** New global variables: %load-compiled-path, %load-compiled-extensions
  4594. These are analogous to %load-path and %load-extensions.
  4595. ** New fluid: `%file-port-name-canonicalization'
  4596. This fluid parameterizes the file names that are associated with file
  4597. ports. If %file-port-name-canonicalization is 'absolute, then file names
  4598. are canonicalized to be absolute paths. If it is 'relative, then the
  4599. name is canonicalized, but any prefix corresponding to a member of
  4600. `%load-path' is stripped off. Otherwise the names are passed through
  4601. unchanged.
  4602. In addition, the `compile-file' and `compile-and-load' procedures bind
  4603. %file-port-name-canonicalization to their `#:canonicalization' keyword
  4604. argument, which defaults to 'relative. In this way, one might compile
  4605. "../module/ice-9/boot-9.scm", but the path that gets residualized into
  4606. the .go is "ice-9/boot-9.scm".
  4607. ** New procedure, `make-promise'
  4608. `(make-promise (lambda () foo))' is equivalent to `(delay foo)'.
  4609. ** `defined?' may accept a module as its second argument
  4610. Previously it only accepted internal structures from the evaluator.
  4611. ** New entry into %guile-build-info: `ccachedir'
  4612. ** Fix bug in `module-bound?'.
  4613. `module-bound?' was returning true if a module did have a local
  4614. variable, but one that was unbound, but another imported module bound
  4615. the variable. This was an error, and was fixed.
  4616. ** `(ice-9 syncase)' has been deprecated.
  4617. As syntax-case is available by default, importing `(ice-9 syncase)' has
  4618. no effect, and will trigger a deprecation warning.
  4619. ** New readline history functions
  4620. The (ice-9 readline) module now provides add-history, read-history,
  4621. write-history and clear-history, which wrap the corresponding GNU
  4622. History library functions.
  4623. ** Removed deprecated uniform array procedures:
  4624. dimensions->uniform-array, list->uniform-array, array-prototype
  4625. Instead, use make-typed-array, list->typed-array, or array-type,
  4626. respectively.
  4627. ** Deprecate the old `scm-style-repl'
  4628. The following bindings from boot-9 are now found in `(ice-9
  4629. scm-style-repl)': `scm-style-repl', `error-catching-loop',
  4630. `error-catching-repl', `bad-throw', `scm-repl-silent'
  4631. `assert-repl-silence', `repl-print-unspecified',
  4632. `assert-repl-print-unspecified', `scm-repl-verbose',
  4633. `assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
  4634. `default-pre-unwind-handler', `handle-system-error',
  4635. The following bindings have been deprecated, with no replacement:
  4636. `pre-unwind-handler-dispatch'.
  4637. The following bindings have been totally removed:
  4638. `before-signal-stack'.
  4639. Deprecated forwarding shims have been installed so that users that
  4640. expect these bindings in the main namespace will still work, but receive
  4641. a deprecation warning.
  4642. ** `set-batch-mode?!' replaced by `ensure-batch-mode!'
  4643. "Batch mode" is a flag used to tell a program that it is not running
  4644. interactively. One usually turns it on after a fork. It may not be
  4645. turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
  4646. because it is a better interface, as it can only turn on batch mode, not
  4647. turn it off.
  4648. ** Deprecate `save-stack', `the-last-stack'
  4649. It used to be that the way to debug programs in Guile was to capture the
  4650. stack at the time of error, drop back to the REPL, then debug that
  4651. stack. But this approach didn't compose, was tricky to get right in the
  4652. presence of threads, and was not very powerful.
  4653. So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
  4654. `(ice-9 save-stack)', with deprecated bindings left in the root module.
  4655. ** `top-repl' has its own module
  4656. The `top-repl' binding, called with Guile is run interactively, is now
  4657. is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
  4658. left in the default environment.
  4659. ** `display-error' takes a frame
  4660. The `display-error' / `scm_display_error' helper now takes a frame as an
  4661. argument instead of a stack. Stacks are still supported in deprecated
  4662. builds. Additionally, `display-error' will again source location
  4663. information for the error.
  4664. ** No more `(ice-9 debug)'
  4665. This module had some debugging helpers that are no longer applicable to
  4666. the current debugging model. Importing this module will produce a
  4667. deprecation warning. Users should contact bug-guile for support.
  4668. ** Remove obsolete debug-options
  4669. Removed `breakpoints', `trace', `procnames', `indent', `frames',
  4670. `maxdepth', and `debug' debug-options.
  4671. ** `backtrace' debug option on by default
  4672. Given that Guile 2.0 can always give you a backtrace, backtraces are now
  4673. on by default.
  4674. ** `turn-on-debugging' deprecated
  4675. ** Remove obsolete print-options
  4676. The `source' and `closure-hook' print options are obsolete, and have
  4677. been removed.
  4678. ** Remove obsolete read-options
  4679. The "elisp-strings" and "elisp-vectors" read options were unused and
  4680. obsolete, so they have been removed.
  4681. ** Remove eval-options and trap-options
  4682. Eval-options and trap-options are obsolete with the new VM and
  4683. evaluator.
  4684. ** Remove (ice-9 debugger) and (ice-9 debugging)
  4685. See "Traps" and "Interactive Debugging" in the manual, for information
  4686. on their replacements.
  4687. ** Remove the GDS Emacs integration
  4688. See "Using Guile in Emacs" in the manual, for info on how we think you
  4689. should use Guile with Emacs.
  4690. ** Deprecated: `lazy-catch'
  4691. `lazy-catch' was a form that captured the stack at the point of a
  4692. `throw', but the dynamic state at the point of the `catch'. It was a bit
  4693. crazy. Please change to use `catch', possibly with a throw-handler, or
  4694. `with-throw-handler'.
  4695. ** Deprecated: primitive properties
  4696. The `primitive-make-property', `primitive-property-set!',
  4697. `primitive-property-ref', and `primitive-property-del!' procedures were
  4698. crufty and only used to implement object properties, which has a new,
  4699. threadsafe implementation. Use object properties or weak hash tables
  4700. instead.
  4701. ** Deprecated `@bind' syntax
  4702. `@bind' was part of an older implementation of the Emacs Lisp language,
  4703. and is no longer used.
  4704. ** Miscellaneous other deprecations
  4705. `cuserid' has been deprecated, as it only returns 8 bytes of a user's
  4706. login. Use `(passwd:name (getpwuid (geteuid)))' instead.
  4707. Additionally, the procedures `apply-to-args', `has-suffix?', `scheme-file-suffix'
  4708. `get-option', `for-next-option', `display-usage-report',
  4709. `transform-usage-lambda', `collect', and `set-batch-mode?!' have all
  4710. been deprecated.
  4711. ** Add support for unbound fluids
  4712. See `make-unbound-fluid', `fluid-unset!', and `fluid-bound?' in the
  4713. manual.
  4714. ** Add `variable-unset!'
  4715. See "Variables" in the manual, for more details.
  4716. ** Last but not least, the `λ' macro can be used in lieu of `lambda'
  4717. * Changes to the C interface
  4718. ** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
  4719. The semantics of `scm_gc_malloc ()' have been changed, in a
  4720. backward-compatible way. A new allocation routine,
  4721. `scm_gc_malloc_pointerless ()', was added.
  4722. Libgc is a conservative GC, which we hope will make interaction with C
  4723. code easier and less error-prone.
  4724. ** New procedures: `scm_to_stringn', `scm_from_stringn'
  4725. ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,}
  4726. ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,}
  4727. These new procedures convert to and from string representations in
  4728. particular encodings.
  4729. Users should continue to use locale encoding for user input, user
  4730. output, or interacting with the C library.
  4731. Use the Latin-1 functions for ASCII, and for literals in source code.
  4732. Use UTF-8 functions for interaction with modern libraries which deal in
  4733. UTF-8, and UTF-32 for interaction with utf32-using libraries.
  4734. Otherwise, use scm_to_stringn or scm_from_stringn with a specific
  4735. encoding.
  4736. ** New type definitions for `scm_t_intptr' and friends.
  4737. `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
  4738. `SIZEOF_SCM_T_BITS', `scm_t_intptr' and `scm_t_uintptr' are now
  4739. available to C. Have fun!
  4740. ** The GH interface (deprecated in version 1.6, 2001) was removed.
  4741. ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
  4742. This makes these internal functions technically not callable from
  4743. application code.
  4744. ** Functions for handling `scm_option' now no longer require an argument
  4745. indicating length of the `scm_t_option' array.
  4746. ** Procedures-with-setters are now implemented using applicable structs
  4747. From a user's perspective this doesn't mean very much. But if, for some
  4748. odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
  4749. SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
  4750. is gone.
  4751. ** Remove old evaluator closures
  4752. There used to be ranges of typecodes allocated to interpreted data
  4753. structures, but that it no longer the case, given that interpreted
  4754. procedure are now just regular VM closures. As a result, there is a
  4755. newly free tc3, and a number of removed macros. See the ChangeLog for
  4756. details.
  4757. ** Primitive procedures are now VM trampoline procedures
  4758. It used to be that there were something like 12 different typecodes
  4759. allocated to primitive procedures, each with its own calling convention.
  4760. Now there is only one, the gsubr. This may affect user code if you were
  4761. defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The
  4762. solution is to switch to use scm_c_make_gsubr. This solution works well
  4763. both with the old 1.8 and with the current 1.9 branch.
  4764. Guile's old evaluator used to have special cases for applying "gsubrs",
  4765. primitive procedures with specified numbers of required, optional, and
  4766. rest arguments. Now, however, Guile represents gsubrs as normal VM
  4767. procedures, with appropriate bytecode to parse out the correct number of
  4768. arguments, including optional and rest arguments, and then with a
  4769. special bytecode to apply the gsubr.
  4770. This allows primitive procedures to appear on the VM stack, allowing
  4771. them to be accurately counted in profiles. Also they now have more
  4772. debugging information attached to them -- their number of arguments, for
  4773. example. In addition, the VM can completely inline the application
  4774. mechanics, allowing for faster primitive calls.
  4775. However there are some changes on the C level. There is no more
  4776. `scm_tc7_gsubr' or `scm_tcs_subrs' typecode for primitive procedures, as
  4777. they are just VM procedures. Likewise the macros `SCM_GSUBR_TYPE',
  4778. `SCM_GSUBR_MAKTYPE', `SCM_GSUBR_REQ', `SCM_GSUBR_OPT', and
  4779. `SCM_GSUBR_REST' are gone, as are `SCM_SUBR_META_INFO', `SCM_SUBR_PROPS'
  4780. `SCM_SET_SUBR_GENERIC_LOC', and `SCM_SUBR_ARITY_TO_TYPE'.
  4781. Perhaps more significantly, `scm_c_make_subr',
  4782. `scm_c_make_subr_with_generic', `scm_c_define_subr', and
  4783. `scm_c_define_subr_with_generic'. They all operated on subr typecodes,
  4784. and there are no more subr typecodes. Use the scm_c_make_gsubr family
  4785. instead.
  4786. Normal users of gsubrs should not be affected, though, as the
  4787. scm_c_make_gsubr family still is the correct way to create primitive
  4788. procedures.
  4789. ** Remove deprecated array C interfaces
  4790. Removed the deprecated array functions `scm_i_arrayp',
  4791. `scm_i_array_ndim', `scm_i_array_mem', `scm_i_array_v',
  4792. `scm_i_array_base', `scm_i_array_dims', and the deprecated macros
  4793. `SCM_ARRAYP', `SCM_ARRAY_NDIM', `SCM_ARRAY_CONTP', `SCM_ARRAY_MEM',
  4794. `SCM_ARRAY_V', `SCM_ARRAY_BASE', and `SCM_ARRAY_DIMS'.
  4795. ** Remove unused snarf macros
  4796. `SCM_DEFINE1', `SCM_PRIMITIVE_GENERIC_1', `SCM_PROC1, and `SCM_GPROC1'
  4797. are no more. Use SCM_DEFINE or SCM_PRIMITIVE_GENERIC instead.
  4798. ** New functions: `scm_call_n', `scm_c_run_hookn'
  4799. `scm_call_n' applies to apply a function to an array of arguments.
  4800. `scm_c_run_hookn' runs a hook with an array of arguments.
  4801. ** Some SMOB types changed to have static typecodes
  4802. Fluids, dynamic states, and hash tables used to be SMOB objects, but now
  4803. they have statically allocated tc7 typecodes.
  4804. ** Preparations for changing SMOB representation
  4805. If things go right, we'll be changing the SMOB representation soon. To
  4806. that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
  4807. the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
  4808. in the future. Code accessing SMOBs using SCM_CELL macros was never
  4809. correct, but until now things still worked. Users should be aware of
  4810. such changes.
  4811. ** Changed invocation mechanics of applicable SMOBs
  4812. Guile's old evaluator used to have special cases for applying SMOB
  4813. objects. Now, with the VM, when Guile sees a SMOB, it looks up a VM
  4814. trampoline procedure for it, and use the normal mechanics to apply the
  4815. trampoline. This simplifies procedure application in the normal,
  4816. non-SMOB case.
  4817. The upshot is that the mechanics used to apply a SMOB are different from
  4818. 1.8. Descriptors no longer have `apply_0', `apply_1', `apply_2', and
  4819. `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
  4820. deprecated. Just use the scm_call_0 family of procedures.
  4821. ** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
  4822. Though these SRFI support libraries did expose API, they encoded a
  4823. strange version string into their library names. That version was never
  4824. programmatically exported, so there was no way people could use the
  4825. libs.
  4826. This was a fortunate oversight, as it allows us to remove the need for
  4827. extra, needless shared libraries --- the C support code for SRFIs 4, 13,
  4828. and 14 was already in core --- and allow us to incrementally return the
  4829. SRFI implementation to Scheme.
  4830. ** New C function: scm_module_public_interface
  4831. This procedure corresponds to Scheme's `module-public-interface'.
  4832. ** Undeprecate `scm_the_root_module ()'
  4833. It's useful to be able to get the root module from C without doing a
  4834. full module lookup.
  4835. ** Inline vector allocation
  4836. Instead of having vectors point out into the heap for their data, their
  4837. data is now allocated inline to the vector object itself. The same is
  4838. true for bytevectors, by default, though there is an indirection
  4839. available which should allow for making a bytevector from an existing
  4840. memory region.
  4841. ** New struct constructors that don't involve making lists
  4842. `scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
  4843. constructors, respectively, for structs. You might find them useful.
  4844. ** Stack refactor
  4845. In Guile 1.8, there were debugging frames on the C stack. Now there is
  4846. no more need to explicitly mark the stack in this way, because Guile has
  4847. a VM stack that it knows how to walk, which simplifies the C API
  4848. considerably. See the ChangeLog for details; the relevant interface is
  4849. in libguile/stacks.h. The Scheme API has not been changed significantly.
  4850. ** Removal of Guile's primitive object system.
  4851. There were a number of pieces in `objects.[ch]' that tried to be a
  4852. minimal object system, but were never documented, and were quickly
  4853. obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
  4854. `scm_make_subclass_object', `scm_metaclass_standard', and like symbols
  4855. from objects.h are no more. In the very unlikely case in which these
  4856. were useful to you, we urge you to contact guile-devel.
  4857. ** No future.
  4858. Actually the future is still in the state that it was, is, and ever
  4859. shall be, Amen, except that `futures.c' and `futures.h' are no longer a
  4860. part of it. These files were experimental, never compiled, and would be
  4861. better implemented in Scheme anyway. In the future, that is.
  4862. ** Deprecate trampolines
  4863. There used to be C functions `scm_trampoline_0', `scm_trampoline_1', and
  4864. so on. The point was to do some precomputation on the type of the
  4865. procedure, then return a specialized "call" procedure. However this
  4866. optimization wasn't actually an optimization, so it is now deprecated.
  4867. Just use `scm_call_0', etc instead.
  4868. ** Deprecated `scm_badargsp'
  4869. This function is unused in Guile, but was part of its API.
  4870. ** Better support for Lisp `nil'.
  4871. The bit representation of `nil' has been tweaked so that it is now very
  4872. efficient to check e.g. if a value is equal to Scheme's end-of-list or
  4873. Lisp's nil. Additionally there are a heap of new, specific predicates
  4874. like scm_is_null_or_nil.
  4875. ** Better integration of Lisp `nil'.
  4876. `scm_is_boolean', `scm_is_false', and `scm_is_null' all return true now
  4877. for Lisp's `nil'. This shouldn't affect any Scheme code at this point,
  4878. but when we start to integrate more with Emacs, it is possible that we
  4879. break code that assumes that, for example, `(not x)' implies that `x' is
  4880. `eq?' to `#f'. This is not a common assumption. Refactoring affected
  4881. code to rely on properties instead of identities will improve code
  4882. correctness. See "Nil" in the manual, for more details.
  4883. ** Support for static allocation of strings, symbols, and subrs.
  4884. Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
  4885. much of their associated data as static variables, reducing Guile's
  4886. memory footprint.
  4887. ** `scm_stat' has an additional argument, `exception_on_error'
  4888. ** `scm_primitive_load_path' has an additional argument `exception_on_not_found'
  4889. ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
  4890. Previously they would use the `off_t' type, which is fragile since its
  4891. definition depends on the application's value for `_FILE_OFFSET_BITS'.
  4892. ** The `long_long' C type, deprecated in 1.8, has been removed
  4893. ** Removed deprecated uniform array procedures: scm_make_uve,
  4894. scm_array_prototype, scm_list_to_uniform_array,
  4895. scm_dimensions_to_uniform_array, scm_make_ra, scm_shap2ra, scm_cvref,
  4896. scm_ra_set_contp, scm_aind, scm_raprin1
  4897. These functions have been deprecated since early 2005.
  4898. * Changes to the distribution
  4899. ** Guile's license is now LGPLv3+
  4900. In other words the GNU Lesser General Public License, version 3 or
  4901. later (at the discretion of each person that chooses to redistribute
  4902. part of Guile).
  4903. ** AM_SILENT_RULES
  4904. Guile's build is visually quieter, due to the use of Automake 1.11's
  4905. AM_SILENT_RULES. Build as `make V=1' to see all of the output.
  4906. ** GOOPS documentation folded into Guile reference manual
  4907. GOOPS, Guile's object system, used to be documented in separate manuals.
  4908. This content is now included in Guile's manual directly.
  4909. ** `guile-config' will be deprecated in favor of `pkg-config'
  4910. `guile-config' has been rewritten to get its information from
  4911. `pkg-config', so this should be a transparent change. Note however that
  4912. guile.m4 has yet to be modified to call pkg-config instead of
  4913. guile-config.
  4914. ** Guile now provides `guile-2.0.pc' instead of `guile-1.8.pc'
  4915. Programs that use `pkg-config' to find Guile or one of its Autoconf
  4916. macros should now require `guile-2.0' instead of `guile-1.8'.
  4917. ** New installation directory: $(pkglibdir)/1.9/ccache
  4918. If $(libdir) is /usr/lib, for example, Guile will install its .go files
  4919. to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
  4920. ** Parallel installability fixes
  4921. Guile now installs its header files to a effective-version-specific
  4922. directory, and includes the effective version (e.g. 2.0) in the library
  4923. name (e.g. libguile-2.0.so).
  4924. This change should be transparent to users, who should detect Guile via
  4925. the guile.m4 macro, or the guile-2.0.pc pkg-config file. It will allow
  4926. parallel installs for multiple versions of Guile development
  4927. environments.
  4928. ** Dynamically loadable extensions may be placed in a Guile-specific path
  4929. Before, Guile only searched the system library paths for extensions
  4930. (e.g. /usr/lib), which meant that the names of Guile extensions had to
  4931. be globally unique. Installing them to a Guile-specific extensions
  4932. directory is cleaner. Use `pkg-config --variable=extensiondir
  4933. guile-2.0' to get the location of the extensions directory.
  4934. ** User Scheme code may be placed in a version-specific path
  4935. Before, there was only one way to install user Scheme code to a
  4936. version-specific Guile directory: install to Guile's own path,
  4937. e.g. /usr/share/guile/2.0. The site directory,
  4938. e.g. /usr/share/guile/site, was unversioned. This has been changed to
  4939. add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
  4940. searched before the global site directory.
  4941. ** New dependency: libgc
  4942. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
  4943. ** New dependency: GNU libunistring
  4944. See http://www.gnu.org/software/libunistring/, for more information. Our
  4945. Unicode support uses routines from libunistring.
  4946. ** New dependency: libffi
  4947. See http://sourceware.org/libffi/, for more information.
  4948. Changes in 1.8.8 (since 1.8.7)
  4949. * Bugs fixed
  4950. ** Fix possible buffer overruns when parsing numbers
  4951. ** Avoid clash with system setjmp/longjmp on IA64
  4952. ** Fix `wrong type arg' exceptions with IPv6 addresses
  4953. Changes in 1.8.7 (since 1.8.6)
  4954. * New modules (see the manual for details)
  4955. ** `(srfi srfi-98)', an interface to access environment variables
  4956. * Bugs fixed
  4957. ** Fix compilation with `--disable-deprecated'
  4958. ** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
  4959. ** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
  4960. ** Fix build problem when scm_t_timespec is different from struct timespec
  4961. ** Fix build when compiled with -Wundef -Werror
  4962. ** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
  4963. ** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
  4964. ** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
  4965. ** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
  4966. ** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
  4967. ** Fix reading of complex numbers where both parts are inexact decimals
  4968. ** Allow @ macro to work with (ice-9 syncase)
  4969. Previously, use of the @ macro in a module whose code is being
  4970. transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
  4971. Now it works as you would expect (giving the value of the specified
  4972. module binding).
  4973. ** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
  4974. Changes in 1.8.6 (since 1.8.5)
  4975. * New features (see the manual for details)
  4976. ** New convenience function `scm_c_symbol_length ()'
  4977. ** Single stepping through code from Emacs
  4978. When you use GDS to evaluate Scheme code from Emacs, you can now use
  4979. `C-u' to indicate that you want to single step through that code. See
  4980. `Evaluating Scheme Code' in the manual for more details.
  4981. ** New "guile(1)" man page!
  4982. * Changes to the distribution
  4983. ** Automake's `AM_MAINTAINER_MODE' is no longer used
  4984. Thus, the `--enable-maintainer-mode' configure option is no longer
  4985. available: Guile is now always configured in "maintainer mode".
  4986. ** `ChangeLog' files are no longer updated
  4987. Instead, changes are detailed in the version control system's logs. See
  4988. the top-level `ChangeLog' files for details.
  4989. * Bugs fixed
  4990. ** `symbol->string' now returns a read-only string, as per R5RS
  4991. ** Fix incorrect handling of the FLAGS argument of `fold-matches'
  4992. ** `guile-config link' now prints `-L$libdir' before `-lguile'
  4993. ** Fix memory corruption involving GOOPS' `class-redefinition'
  4994. ** Fix possible deadlock in `mutex-lock'
  4995. ** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
  4996. ** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
  4997. ** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
  4998. ** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
  4999. ** Fix misleading output from `(help rationalize)'
  5000. ** Fix build failure on Debian hppa architecture (bad stack growth detection)
  5001. ** Fix `gcd' when called with a single, negative argument.
  5002. ** Fix `Stack overflow' errors seen when building on some platforms
  5003. ** Fix bug when `scm_with_guile ()' was called several times from the
  5004. same thread
  5005. ** The handler of SRFI-34 `with-exception-handler' is now invoked in the
  5006. dynamic environment of the call to `raise'
  5007. ** Fix potential deadlock in `make-struct'
  5008. ** Fix compilation problem with libltdl from Libtool 2.2.x
  5009. ** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
  5010. Changes in 1.8.5 (since 1.8.4)
  5011. * Infrastructure changes
  5012. ** Guile repository switched from CVS to Git
  5013. The new repository can be accessed using
  5014. "git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
  5015. http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
  5016. ** Add support for `pkg-config'
  5017. See "Autoconf Support" in the manual for details.
  5018. * New modules (see the manual for details)
  5019. ** `(srfi srfi-88)'
  5020. * New features (see the manual for details)
  5021. ** New `postfix' read option, for SRFI-88 keyword syntax
  5022. ** Some I/O primitives have been inlined, which improves I/O performance
  5023. ** New object-based traps infrastructure
  5024. This is a GOOPS-based infrastructure that builds on Guile's low-level
  5025. evaluator trap calls and facilitates the development of debugging
  5026. features like single-stepping, breakpoints, tracing and profiling.
  5027. See the `Traps' node of the manual for details.
  5028. ** New support for working on Guile code from within Emacs
  5029. Guile now incorporates the `GDS' library (previously distributed
  5030. separately) for working on Guile code from within Emacs. See the
  5031. `Using Guile In Emacs' node of the manual for details.
  5032. * Bugs fixed
  5033. ** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
  5034. ** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
  5035. Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
  5036. would trigger an unbound variable error for `match:andmap'.
  5037. ** `(oop goops describe)' now properly provides the `describe' feature
  5038. ** Fixed `args-fold' from `(srfi srfi-37)'
  5039. Previously, parsing short option names of argument-less options would
  5040. lead to a stack overflow.
  5041. ** `(srfi srfi-35)' is now visible through `cond-expand'
  5042. ** Fixed type-checking for the second argument of `eval'
  5043. ** Fixed type-checking for SRFI-1 `partition'
  5044. ** Fixed `struct-ref' and `struct-set!' on "light structs"
  5045. ** Honor struct field access rights in GOOPS
  5046. ** Changed the storage strategy of source properties, which fixes a deadlock
  5047. ** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
  5048. ** Fixed build issue for GNU/Linux on IA64
  5049. ** Fixed build issues on NetBSD 1.6
  5050. ** Fixed build issue on Solaris 2.10 x86_64
  5051. ** Fixed build issue with DEC/Compaq/HP's compiler
  5052. ** Fixed `scm_from_complex_double' build issue on FreeBSD
  5053. ** Fixed `alloca' build issue on FreeBSD 6
  5054. ** Removed use of non-portable makefile constructs
  5055. ** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
  5056. ** Make sure all tests honor `$TMPDIR'
  5057. Changes in 1.8.4 (since 1.8.3)
  5058. * Bugs fixed
  5059. ** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
  5060. ** Fixed a segmentation fault which occurred when displaying the
  5061. backtrace of a stack with a promise object (made by `delay') in it.
  5062. ** Make `accept' leave guile mode while blocking
  5063. ** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
  5064. ** Fixed a build problem on AIX (use of func_data identifier)
  5065. ** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
  5066. called with an associator proc that returns neither a pair nor #f.
  5067. ** Secondary threads now always return a valid module for (current-module).
  5068. ** Avoid MacOS build problems caused by incorrect combination of "64"
  5069. system and library calls.
  5070. ** `guile-snarf' now honors `$TMPDIR'
  5071. ** `guile-config compile' now reports CPPFLAGS used at compile-time
  5072. ** Fixed build with Sun Studio (Solaris 9)
  5073. ** Fixed wrong-type-arg errors when creating zero length SRFI-4
  5074. uniform vectors on AIX.
  5075. ** Fixed a deadlock that occurs upon GC with multiple threads.
  5076. ** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
  5077. ** Fixed autotool-derived build problems on AIX 6.1.
  5078. ** Fixed NetBSD/alpha support
  5079. ** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
  5080. * New modules (see the manual for details)
  5081. ** `(srfi srfi-69)'
  5082. * Documentation fixes and improvements
  5083. ** Removed premature breakpoint documentation
  5084. The features described are not available in the series of 1.8.x
  5085. releases, so the documentation was misleading and has been removed.
  5086. ** More about Guile's default *random-state* variable
  5087. ** GOOPS: more about how to use `next-method'
  5088. * Changes to the distribution
  5089. ** Corrected a few files that referred incorrectly to the old GPL + special exception licence
  5090. In fact Guile since 1.8.0 has been licensed with the GNU Lesser
  5091. General Public License, and the few incorrect files have now been
  5092. fixed to agree with the rest of the Guile distribution.
  5093. ** Removed unnecessary extra copies of COPYING*
  5094. The distribution now contains a single COPYING.LESSER at its top level.
  5095. Changes in 1.8.3 (since 1.8.2)
  5096. * New modules (see the manual for details)
  5097. ** `(srfi srfi-35)'
  5098. ** `(srfi srfi-37)'
  5099. * Bugs fixed
  5100. ** The `(ice-9 slib)' module now works as expected
  5101. ** Expressions like "(set! 'x #t)" no longer yield a crash
  5102. ** Warnings about duplicate bindings now go to stderr
  5103. ** A memory leak in `make-socket-address' was fixed
  5104. ** Alignment issues (e.g., on SPARC) in network routines were fixed
  5105. ** A threading issue that showed up at least on NetBSD was fixed
  5106. ** Build problems on Solaris and IRIX fixed
  5107. * Implementation improvements
  5108. ** The reader is now faster, which reduces startup time
  5109. ** Procedures returned by `record-accessor' and `record-modifier' are faster
  5110. Changes in 1.8.2 (since 1.8.1):
  5111. * New procedures (see the manual for details)
  5112. ** set-program-arguments
  5113. ** make-vtable
  5114. * Incompatible changes
  5115. ** The body of a top-level `define' no longer sees the binding being created
  5116. In a top-level `define', the binding being created is no longer visible
  5117. from the `define' body. This breaks code like
  5118. "(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
  5119. unbound in the body. However, such code was not R5RS-compliant anyway,
  5120. per Section 5.2.1.
  5121. * Bugs fixed
  5122. ** Fractions were not `equal?' if stored in unreduced form.
  5123. (A subtle problem, since printing a value reduced it, making it work.)
  5124. ** srfi-60 `copy-bit' failed on 64-bit systems
  5125. ** "guile --use-srfi" option at the REPL can replace core functions
  5126. (Programs run with that option were ok, but in the interactive REPL
  5127. the core bindings got priority, preventing SRFI replacements or
  5128. extensions.)
  5129. ** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
  5130. ** `kill' on mingw throws an error for a PID other than oneself
  5131. ** Procedure names are attached to procedure-with-setters
  5132. ** Array read syntax works with negative lower bound
  5133. ** `array-in-bounds?' fix if an array has different lower bounds on each index
  5134. ** `*' returns exact 0 for "(* inexact 0)"
  5135. This follows what it always did for "(* 0 inexact)".
  5136. ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
  5137. ** SRFI-19: `date->julian-day' did not account for timezone offset
  5138. ** `ttyname' no longer crashes when passed a non-tty argument
  5139. ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
  5140. ** Small memory leaks have been fixed in `make-fluid' and `add-history'
  5141. ** GOOPS: Fixed a bug in `method-more-specific?'
  5142. ** Build problems on Solaris fixed
  5143. ** Build problems on HP-UX IA64 fixed
  5144. ** Build problems on MinGW fixed
  5145. Changes in 1.8.1 (since 1.8.0):
  5146. * LFS functions are now used to access 64-bit files on 32-bit systems.
  5147. * New procedures (see the manual for details)
  5148. ** primitive-_exit - [Scheme] the-root-module
  5149. ** scm_primitive__exit - [C]
  5150. ** make-completion-function - [Scheme] (ice-9 readline)
  5151. ** scm_c_locale_stringn_to_number - [C]
  5152. ** scm_srfi1_append_reverse [C]
  5153. ** scm_srfi1_append_reverse_x [C]
  5154. ** scm_log - [C]
  5155. ** scm_log10 - [C]
  5156. ** scm_exp - [C]
  5157. ** scm_sqrt - [C]
  5158. * Bugs fixed
  5159. ** Build problems have been fixed on MacOS, SunOS, and QNX.
  5160. ** `strftime' fix sign of %z timezone offset.
  5161. ** A one-dimensional array can now be 'equal?' to a vector.
  5162. ** Structures, records, and SRFI-9 records can now be compared with `equal?'.
  5163. ** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
  5164. ** `record-accessor' and `record-modifier' now have strict type checks.
  5165. Record accessor and modifier procedures now throw an error if the
  5166. record type of the record they're given is not the type expected.
  5167. (Previously accessors returned #f and modifiers silently did nothing).
  5168. ** It is now OK to use both autoload and use-modules on a given module.
  5169. ** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
  5170. Previously there was no checking on primatives like make-vector that
  5171. accept "one or two" arguments. Now there is.
  5172. ** The srfi-1 assoc function now calls its equality predicate properly.
  5173. Previously srfi-1 assoc would call the equality predicate with the key
  5174. last. According to the SRFI, the key should be first.
  5175. ** A bug in n-par-for-each and n-for-each-par-map has been fixed.
  5176. ** The array-set! procedure no longer segfaults when given a bit vector.
  5177. ** Bugs in make-shared-array have been fixed.
  5178. ** string<? and friends now follow char<? etc order on 8-bit chars.
  5179. ** The format procedure now handles inf and nan values for ~f correctly.
  5180. ** exact->inexact should no longer overflow when given certain large fractions.
  5181. ** srfi-9 accessor and modifier procedures now have strict record type checks.
  5182. This matches the srfi-9 specification.
  5183. ** (ice-9 ftw) procedures won't ignore different files with same inode number.
  5184. Previously the (ice-9 ftw) procedures would ignore any file that had
  5185. the same inode number as a file they had already seen, even if that
  5186. file was on a different device.
  5187. Changes in 1.8.0 (changes since the 1.6.x series):
  5188. * Changes to the distribution
  5189. ** Guile is now licensed with the GNU Lesser General Public License.
  5190. ** The manual is now licensed with the GNU Free Documentation License.
  5191. ** Guile now requires GNU MP (http://swox.com/gmp).
  5192. Guile now uses the GNU MP library for arbitrary precision arithmetic.
  5193. ** Guile now has separate private and public configuration headers.
  5194. That is, things like HAVE_STRING_H no longer leak from Guile's
  5195. headers.
  5196. ** Guile now provides and uses an "effective" version number.
  5197. Guile now provides scm_effective_version and effective-version
  5198. functions which return the "effective" version number. This is just
  5199. the normal full version string without the final micro-version number,
  5200. so the current effective-version is "1.8". The effective version
  5201. should remain unchanged during a stable series, and should be used for
  5202. items like the versioned share directory name
  5203. i.e. /usr/share/guile/1.8.
  5204. Providing an unchanging version number during a stable release for
  5205. things like the versioned share directory can be particularly
  5206. important for Guile "add-on" packages, since it provides a directory
  5207. that they can install to that won't be changed out from under them
  5208. with each micro release during a stable series.
  5209. ** Thread implementation has changed.
  5210. When you configure "--with-threads=null", you will get the usual
  5211. threading API (call-with-new-thread, make-mutex, etc), but you can't
  5212. actually create new threads. Also, "--with-threads=no" is now
  5213. equivalent to "--with-threads=null". This means that the thread API
  5214. is always present, although you might not be able to create new
  5215. threads.
  5216. When you configure "--with-threads=pthreads" or "--with-threads=yes",
  5217. you will get threads that are implemented with the portable POSIX
  5218. threads. These threads can run concurrently (unlike the previous
  5219. "coop" thread implementation), but need to cooperate for things like
  5220. the GC.
  5221. The default is "pthreads", unless your platform doesn't have pthreads,
  5222. in which case "null" threads are used.
  5223. See the manual for details, nodes "Initialization", "Multi-Threading",
  5224. "Blocking", and others.
  5225. ** There is the new notion of 'discouraged' features.
  5226. This is a milder form of deprecation.
  5227. Things that are discouraged should not be used in new code, but it is
  5228. OK to leave them in old code for now. When a discouraged feature is
  5229. used, no warning message is printed like there is for 'deprecated'
  5230. features. Also, things that are merely discouraged are nevertheless
  5231. implemented efficiently, while deprecated features can be very slow.
  5232. You can omit discouraged features from libguile by configuring it with
  5233. the '--disable-discouraged' option.
  5234. ** Deprecation warnings can be controlled at run-time.
  5235. (debug-enable 'warn-deprecated) switches them on and (debug-disable
  5236. 'warn-deprecated) switches them off.
  5237. ** Support for SRFI 61, extended cond syntax for multiple values has
  5238. been added.
  5239. This SRFI is always available.
  5240. ** Support for require-extension, SRFI-55, has been added.
  5241. The SRFI-55 special form `require-extension' has been added. It is
  5242. available at startup, and provides a portable way to load Scheme
  5243. extensions. SRFI-55 only requires support for one type of extension,
  5244. "srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
  5245. 13 14)).
  5246. ** New module (srfi srfi-26) provides support for `cut' and `cute'.
  5247. The (srfi srfi-26) module is an implementation of SRFI-26 which
  5248. provides the `cut' and `cute' syntax. These may be used to specialize
  5249. parameters without currying.
  5250. ** New module (srfi srfi-31)
  5251. This is an implementation of SRFI-31 which provides a special form
  5252. `rec' for recursive evaluation.
  5253. ** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
  5254. been merged with the core, making their functionality always
  5255. available.
  5256. The modules are still available, tho, and you could use them together
  5257. with a renaming import, for example.
  5258. ** Guile no longer includes its own version of libltdl.
  5259. The official version is good enough now.
  5260. ** The --enable-htmldoc option has been removed from 'configure'.
  5261. Support for translating the documentation into HTML is now always
  5262. provided. Use 'make html'.
  5263. ** New module (ice-9 serialize):
  5264. (serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
  5265. don't trust the thread safety of most of your program, but where you
  5266. have some section(s) of code which you consider can run in parallel to
  5267. other sections. See ice-9/serialize.scm for more information.
  5268. ** The configure option '--disable-arrays' has been removed.
  5269. Support for arrays and uniform numeric arrays is now always included
  5270. in Guile.
  5271. * Changes to the stand-alone interpreter
  5272. ** New command line option `-L'.
  5273. This option adds a directory to the front of the load path.
  5274. ** New command line option `--no-debug'.
  5275. Specifying `--no-debug' on the command line will keep the debugging
  5276. evaluator turned off, even for interactive sessions.
  5277. ** User-init file ~/.guile is now loaded with the debugging evaluator.
  5278. Previously, the normal evaluator would have been used. Using the
  5279. debugging evaluator gives better error messages.
  5280. ** The '-e' option now 'read's its argument.
  5281. This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
  5282. be used with '-e'. For example, you can now write a script like
  5283. #! /bin/sh
  5284. exec guile -e '(@ (demo) main)' -s "$0" "$@"
  5285. !#
  5286. (define-module (demo)
  5287. :export (main))
  5288. (define (main args)
  5289. (format #t "Demo: ~a~%" args))
  5290. * Changes to Scheme functions and syntax
  5291. ** Guardians have changed back to their original semantics
  5292. Guardians now behave like described in the paper by Dybvig et al. In
  5293. particular, they no longer make guarantees about the order in which
  5294. they return objects, and they can no longer be greedy.
  5295. They no longer drop cyclic data structures.
  5296. The C function scm_make_guardian has been changed incompatibly and no
  5297. longer takes the 'greedy_p' argument.
  5298. ** New function hashx-remove!
  5299. This function completes the set of 'hashx' functions.
  5300. ** The concept of dynamic roots has been factored into continuation
  5301. barriers and dynamic states.
  5302. Each thread has a current dynamic state that carries the values of the
  5303. fluids. You can create and copy dynamic states and use them as the
  5304. second argument for 'eval'. See "Fluids and Dynamic States" in the
  5305. manual.
  5306. To restrict the influence that captured continuations can have on the
  5307. control flow, you can errect continuation barriers. See "Continuation
  5308. Barriers" in the manual.
  5309. The function call-with-dynamic-root now essentially temporarily
  5310. installs a new dynamic state and errects a continuation barrier.
  5311. ** The default load path no longer includes "." at the end.
  5312. Automatically loading modules from the current directory should not
  5313. happen by default. If you want to allow it in a more controlled
  5314. manner, set the environment variable GUILE_LOAD_PATH or the Scheme
  5315. variable %load-path.
  5316. ** The uniform vector and array support has been overhauled.
  5317. It now complies with SRFI-4 and the weird prototype based uniform
  5318. array creation has been deprecated. See the manual for more details.
  5319. Some non-compatible changes have been made:
  5320. - characters can no longer be stored into byte arrays.
  5321. - strings and bit vectors are no longer considered to be uniform numeric
  5322. vectors.
  5323. - array-rank throws an error for non-arrays instead of returning zero.
  5324. - array-ref does no longer accept non-arrays when no indices are given.
  5325. There is the new notion of 'generalized vectors' and corresponding
  5326. procedures like 'generalized-vector-ref'. Generalized vectors include
  5327. strings, bitvectors, ordinary vectors, and uniform numeric vectors.
  5328. Arrays use generalized vectors as their storage, so that you still
  5329. have arrays of characters, bits, etc. However, uniform-array-read!
  5330. and uniform-array-write can no longer read/write strings and
  5331. bitvectors.
  5332. ** There is now support for copy-on-write substrings, mutation-sharing
  5333. substrings and read-only strings.
  5334. Three new procedures are related to this: substring/shared,
  5335. substring/copy, and substring/read-only. See the manual for more
  5336. information.
  5337. ** Backtraces will now highlight the value that caused the error.
  5338. By default, these values are enclosed in "{...}", such as in this
  5339. example:
  5340. guile> (car 'a)
  5341. Backtrace:
  5342. In current input:
  5343. 1: 0* [car {a}]
  5344. <unnamed port>:1:1: In procedure car in expression (car (quote a)):
  5345. <unnamed port>:1:1: Wrong type (expecting pair): a
  5346. ABORT: (wrong-type-arg)
  5347. The prefix and suffix used for highlighting can be set via the two new
  5348. printer options 'highlight-prefix' and 'highlight-suffix'. For
  5349. example, putting this into ~/.guile will output the bad value in bold
  5350. on an ANSI terminal:
  5351. (print-set! highlight-prefix "\x1b[1m")
  5352. (print-set! highlight-suffix "\x1b[22m")
  5353. ** 'gettext' support for internationalization has been added.
  5354. See the manual for details.
  5355. ** New syntax '@' and '@@':
  5356. You can now directly refer to variables exported from a module by
  5357. writing
  5358. (@ MODULE-NAME VARIABLE-NAME)
  5359. For example (@ (ice-9 pretty-print) pretty-print) will directly access
  5360. the pretty-print variable exported from the (ice-9 pretty-print)
  5361. module. You don't need to 'use' that module first. You can also use
  5362. '@' as a target of 'set!', as in (set! (@ mod var) val).
  5363. The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
  5364. but it can also access variables that have not been exported. It is
  5365. intended only for kluges and temporary fixes and for debugging, not
  5366. for ordinary code.
  5367. ** Keyword syntax has been made more disciplined.
  5368. Previously, the name of a keyword was read as a 'token' but printed as
  5369. a symbol. Now, it is read as a general Scheme datum which must be a
  5370. symbol.
  5371. Previously:
  5372. guile> #:12
  5373. #:#{12}#
  5374. guile> #:#{12}#
  5375. #:#{\#{12}\#}#
  5376. guile> #:(a b c)
  5377. #:#{}#
  5378. ERROR: In expression (a b c):
  5379. Unbound variable: a
  5380. guile> #: foo
  5381. #:#{}#
  5382. ERROR: Unbound variable: foo
  5383. Now:
  5384. guile> #:12
  5385. ERROR: Wrong type (expecting symbol): 12
  5386. guile> #:#{12}#
  5387. #:#{12}#
  5388. guile> #:(a b c)
  5389. ERROR: Wrong type (expecting symbol): (a b c)
  5390. guile> #: foo
  5391. #:foo
  5392. ** The printing of symbols that might look like keywords can be
  5393. controlled.
  5394. The new printer option 'quote-keywordish-symbols' controls how symbols
  5395. are printed that have a colon as their first or last character. The
  5396. default now is to only quote a symbol with #{...}# when the read
  5397. option 'keywords' is not '#f'. Thus:
  5398. guile> (define foo (string->symbol ":foo"))
  5399. guile> (read-set! keywords #f)
  5400. guile> foo
  5401. :foo
  5402. guile> (read-set! keywords 'prefix)
  5403. guile> foo
  5404. #{:foo}#
  5405. guile> (print-set! quote-keywordish-symbols #f)
  5406. guile> foo
  5407. :foo
  5408. ** 'while' now provides 'break' and 'continue'
  5409. break and continue were previously bound in a while loop, but not
  5410. documented, and continue didn't quite work properly. The undocumented
  5411. parameter to break which gave a return value for the while has been
  5412. dropped.
  5413. ** 'call-with-current-continuation' is now also available under the name
  5414. 'call/cc'.
  5415. ** The module system now checks for duplicate bindings.
  5416. The module system now can check for name conflicts among imported
  5417. bindings.
  5418. The behavior can be controlled by specifying one or more 'duplicates'
  5419. handlers. For example, to make Guile return an error for every name
  5420. collision, write:
  5421. (define-module (foo)
  5422. :use-module (bar)
  5423. :use-module (baz)
  5424. :duplicates check)
  5425. The new default behavior of the module system when a name collision
  5426. has been detected is to
  5427. 1. Give priority to bindings marked as a replacement.
  5428. 2. Issue a warning (different warning if overriding core binding).
  5429. 3. Give priority to the last encountered binding (this corresponds to
  5430. the old behavior).
  5431. If you want the old behavior back without replacements or warnings you
  5432. can add the line:
  5433. (default-duplicate-binding-handler 'last)
  5434. to your .guile init file.
  5435. ** New define-module option: :replace
  5436. :replace works as :export, but, in addition, marks the binding as a
  5437. replacement.
  5438. A typical example is `format' in (ice-9 format) which is a replacement
  5439. for the core binding `format'.
  5440. ** Adding prefixes to imported bindings in the module system
  5441. There is now a new :use-module option :prefix. It can be used to add
  5442. a prefix to all imported bindings.
  5443. (define-module (foo)
  5444. :use-module ((bar) :prefix bar:))
  5445. will import all bindings exported from bar, but rename them by adding
  5446. the prefix `bar:'.
  5447. ** Conflicting generic functions can be automatically merged.
  5448. When two imported bindings conflict and they are both generic
  5449. functions, the two functions can now be merged automatically. This is
  5450. activated with the 'duplicates' handler 'merge-generics'.
  5451. ** New function: effective-version
  5452. Returns the "effective" version number. This is just the normal full
  5453. version string without the final micro-version number. See "Changes
  5454. to the distribution" above.
  5455. ** New threading functions: parallel, letpar, par-map, and friends
  5456. These are convenient ways to run calculations in parallel in new
  5457. threads. See "Parallel forms" in the manual for details.
  5458. ** New function 'try-mutex'.
  5459. This function will attempt to lock a mutex but will return immediately
  5460. instead of blocking and indicate failure.
  5461. ** Waiting on a condition variable can have a timeout.
  5462. The function 'wait-condition-variable' now takes a third, optional
  5463. argument that specifies the point in time where the waiting should be
  5464. aborted.
  5465. ** New function 'broadcast-condition-variable'.
  5466. ** New functions 'all-threads' and 'current-thread'.
  5467. ** Signals and system asyncs work better with threads.
  5468. The function 'sigaction' now takes a fourth, optional, argument that
  5469. specifies the thread that the handler should run in. When the
  5470. argument is omitted, the handler will run in the thread that called
  5471. 'sigaction'.
  5472. Likewise, 'system-async-mark' takes a second, optional, argument that
  5473. specifies the thread that the async should run in. When it is
  5474. omitted, the async will run in the thread that called
  5475. 'system-async-mark'.
  5476. C code can use the new functions scm_sigaction_for_thread and
  5477. scm_system_async_mark_for_thread to pass the new thread argument.
  5478. When a thread blocks on a mutex, a condition variable or is waiting
  5479. for IO to be possible, it will still execute system asyncs. This can
  5480. be used to interrupt such a thread by making it execute a 'throw', for
  5481. example.
  5482. ** The function 'system-async' is deprecated.
  5483. You can now pass any zero-argument procedure to 'system-async-mark'.
  5484. The function 'system-async' will just return its argument unchanged
  5485. now.
  5486. ** New functions 'call-with-blocked-asyncs' and
  5487. 'call-with-unblocked-asyncs'
  5488. The expression (call-with-blocked-asyncs PROC) will call PROC and will
  5489. block execution of system asyncs for the current thread by one level
  5490. while PROC runs. Likewise, call-with-unblocked-asyncs will call a
  5491. procedure and will unblock the execution of system asyncs by one
  5492. level for the current thread.
  5493. Only system asyncs are affected by these functions.
  5494. ** The functions 'mask-signals' and 'unmask-signals' are deprecated.
  5495. Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
  5496. instead. Those functions are easier to use correctly and can be
  5497. nested.
  5498. ** New function 'unsetenv'.
  5499. ** New macro 'define-syntax-public'.
  5500. It works like 'define-syntax' and also exports the defined macro (but
  5501. only on top-level).
  5502. ** There is support for Infinity and NaNs.
  5503. Following PLT Scheme, Guile can now work with infinite numbers, and
  5504. 'not-a-numbers'.
  5505. There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
  5506. (negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
  5507. "+nan.0"). These numbers are inexact and have no exact counterpart.
  5508. Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
  5509. sign of the dividend. The infinities are integers, and they answer #t
  5510. for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
  5511. not '=' to itself, but '+nan.0' is 'eqv?' to itself.
  5512. For example
  5513. (/ 1 0.0)
  5514. => +inf.0
  5515. (/ 0 0.0)
  5516. => +nan.0
  5517. (/ 0)
  5518. ERROR: Numerical overflow
  5519. Two new predicates 'inf?' and 'nan?' can be used to test for the
  5520. special values.
  5521. ** Inexact zero can have a sign.
  5522. Guile can now distinguish between plus and minus inexact zero, if your
  5523. platform supports this, too. The two zeros are equal according to
  5524. '=', but not according to 'eqv?'. For example
  5525. (- 0.0)
  5526. => -0.0
  5527. (= 0.0 (- 0.0))
  5528. => #t
  5529. (eqv? 0.0 (- 0.0))
  5530. => #f
  5531. ** Guile now has exact rationals.
  5532. Guile can now represent fractions such as 1/3 exactly. Computing with
  5533. them is also done exactly, of course:
  5534. (* 1/3 3/2)
  5535. => 1/2
  5536. ** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
  5537. for exact arguments.
  5538. For example: (floor 2) now returns an exact 2 where in the past it
  5539. returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
  5540. ** inexact->exact no longer returns only integers.
  5541. Without exact rationals, the closest exact number was always an
  5542. integer, but now inexact->exact returns the fraction that is exactly
  5543. equal to a floating point number. For example:
  5544. (inexact->exact 1.234)
  5545. => 694680242521899/562949953421312
  5546. When you want the old behavior, use 'round' explicitly:
  5547. (inexact->exact (round 1.234))
  5548. => 1
  5549. ** New function 'rationalize'.
  5550. This function finds a simple fraction that is close to a given real
  5551. number. For example (and compare with inexact->exact above):
  5552. (rationalize (inexact->exact 1.234) 1/2000)
  5553. => 58/47
  5554. Note that, as required by R5RS, rationalize returns only then an exact
  5555. result when both its arguments are exact.
  5556. ** 'odd?' and 'even?' work also for inexact integers.
  5557. Previously, (odd? 1.0) would signal an error since only exact integers
  5558. were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
  5559. returns #f and (odd? 1.5) signals an error.
  5560. ** Guile now has uninterned symbols.
  5561. The new function 'make-symbol' will return an uninterned symbol. This
  5562. is a symbol that is unique and is guaranteed to remain unique.
  5563. However, uninterned symbols can not yet be read back in.
  5564. Use the new function 'symbol-interned?' to check whether a symbol is
  5565. interned or not.
  5566. ** pretty-print has more options.
  5567. The function pretty-print from the (ice-9 pretty-print) module can now
  5568. also be invoked with keyword arguments that control things like
  5569. maximum output width. See the manual for details.
  5570. ** Variables have no longer a special behavior for `equal?'.
  5571. Previously, comparing two variables with `equal?' would recursivly
  5572. compare their values. This is no longer done. Variables are now only
  5573. `equal?' if they are `eq?'.
  5574. ** `(begin)' is now valid.
  5575. You can now use an empty `begin' form. It will yield #<unspecified>
  5576. when evaluated and simply be ignored in a definition context.
  5577. ** Deprecated: procedure->macro
  5578. Change your code to use 'define-macro' or r5rs macros. Also, be aware
  5579. that macro expansion will not be done during evaluation, but prior to
  5580. evaluation.
  5581. ** Soft ports now allow a `char-ready?' procedure
  5582. The vector argument to `make-soft-port' can now have a length of
  5583. either 5 or 6. (Previously the length had to be 5.) The optional 6th
  5584. element is interpreted as an `input-waiting' thunk -- i.e. a thunk
  5585. that returns the number of characters that can be read immediately
  5586. without the soft port blocking.
  5587. ** Deprecated: undefine
  5588. There is no replacement for undefine.
  5589. ** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
  5590. have been discouraged.
  5591. They are relics from a time where a keyword like #:foo was used
  5592. directly as a Tcl option "-foo" and thus keywords were internally
  5593. stored as a symbol with a starting dash. We now store a symbol
  5594. without the dash.
  5595. Use symbol->keyword and keyword->symbol instead.
  5596. ** The `cheap' debug option is now obsolete
  5597. Evaluator trap calls are now unconditionally "cheap" - in other words,
  5598. they pass a debug object to the trap handler rather than a full
  5599. continuation. The trap handler code can capture a full continuation
  5600. by using `call-with-current-continuation' in the usual way, if it so
  5601. desires.
  5602. The `cheap' option is retained for now so as not to break existing
  5603. code which gets or sets it, but setting it now has no effect. It will
  5604. be removed in the next major Guile release.
  5605. ** Evaluator trap calls now support `tweaking'
  5606. `Tweaking' means that the trap handler code can modify the Scheme
  5607. expression that is about to be evaluated (in the case of an
  5608. enter-frame trap) or the value that is being returned (in the case of
  5609. an exit-frame trap). The trap handler code indicates that it wants to
  5610. do this by returning a pair whose car is the symbol 'instead and whose
  5611. cdr is the modified expression or return value.
  5612. * Changes to the C interface
  5613. ** The functions scm_hash_fn_remove_x and scm_hashx_remove_x no longer
  5614. take a 'delete' function argument.
  5615. This argument makes no sense since the delete function is used to
  5616. remove a pair from an alist, and this must not be configurable.
  5617. This is an incompatible change.
  5618. ** The GH interface is now subject to the deprecation mechanism
  5619. The GH interface has been deprecated for quite some time but now it is
  5620. actually removed from Guile when it is configured with
  5621. --disable-deprecated.
  5622. See the manual "Transitioning away from GH" for more information.
  5623. ** A new family of functions for converting between C values and
  5624. Scheme values has been added.
  5625. These functions follow a common naming scheme and are designed to be
  5626. easier to use, thread-safe and more future-proof than the older
  5627. alternatives.
  5628. - int scm_is_* (...)
  5629. These are predicates that return a C boolean: 1 or 0. Instead of
  5630. SCM_NFALSEP, you can now use scm_is_true, for example.
  5631. - <type> scm_to_<type> (SCM val, ...)
  5632. These are functions that convert a Scheme value into an appropriate
  5633. C value. For example, you can use scm_to_int to safely convert from
  5634. a SCM to an int.
  5635. - SCM scm_from_<type> (<type> val, ...)
  5636. These functions convert from a C type to a SCM value; for example,
  5637. scm_from_int for ints.
  5638. There is a huge number of these functions, for numbers, strings,
  5639. symbols, vectors, etc. They are documented in the reference manual in
  5640. the API section together with the types that they apply to.
  5641. ** New functions for dealing with complex numbers in C have been added.
  5642. The new functions are scm_c_make_rectangular, scm_c_make_polar,
  5643. scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
  5644. They work like scm_make_rectangular etc but take or return doubles
  5645. directly.
  5646. ** The function scm_make_complex has been discouraged.
  5647. Use scm_c_make_rectangular instead.
  5648. ** The INUM macros have been deprecated.
  5649. A lot of code uses these macros to do general integer conversions,
  5650. although the macros only work correctly with fixnums. Use the
  5651. following alternatives.
  5652. SCM_INUMP -> scm_is_integer or similar
  5653. SCM_NINUMP -> !scm_is_integer or similar
  5654. SCM_MAKINUM -> scm_from_int or similar
  5655. SCM_INUM -> scm_to_int or similar
  5656. SCM_VALIDATE_INUM_* -> Do not use these; scm_to_int, etc. will
  5657. do the validating for you.
  5658. ** The scm_num2<type> and scm_<type>2num functions and scm_make_real
  5659. have been discouraged.
  5660. Use the newer scm_to_<type> and scm_from_<type> functions instead for
  5661. new code. The functions have been discouraged since they don't fit
  5662. the naming scheme.
  5663. ** The 'boolean' macros SCM_FALSEP etc have been discouraged.
  5664. They have strange names, especially SCM_NFALSEP, and SCM_BOOLP
  5665. evaluates its argument twice. Use scm_is_true, etc. instead for new
  5666. code.
  5667. ** The macro SCM_EQ_P has been discouraged.
  5668. Use scm_is_eq for new code, which fits better into the naming
  5669. conventions.
  5670. ** The macros SCM_CONSP, SCM_NCONSP, SCM_NULLP, and SCM_NNULLP have
  5671. been discouraged.
  5672. Use the function scm_is_pair or scm_is_null instead.
  5673. ** The functions scm_round and scm_truncate have been deprecated and
  5674. are now available as scm_c_round and scm_c_truncate, respectively.
  5675. These functions occupy the names that scm_round_number and
  5676. scm_truncate_number should have.
  5677. ** The functions scm_c_string2str, scm_c_substring2str, and
  5678. scm_c_symbol2str have been deprecated.
  5679. Use scm_to_locale_stringbuf or similar instead, maybe together with
  5680. scm_substring.
  5681. ** New functions scm_c_make_string, scm_c_string_length,
  5682. scm_c_string_ref, scm_c_string_set_x, scm_c_substring,
  5683. scm_c_substring_shared, scm_c_substring_copy.
  5684. These are like scm_make_string, scm_length, etc. but are slightly
  5685. easier to use from C.
  5686. ** The macros SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_LENGTH,
  5687. SCM_SYMBOL_CHARS, and SCM_SYMBOL_LENGTH have been deprecated.
  5688. They export too many assumptions about the implementation of strings
  5689. and symbols that are no longer true in the presence of
  5690. mutation-sharing substrings and when Guile switches to some form of
  5691. Unicode.
  5692. When working with strings, it is often best to use the normal string
  5693. functions provided by Guile, such as scm_c_string_ref,
  5694. scm_c_string_set_x, scm_string_append, etc. Be sure to look in the
  5695. manual since many more such functions are now provided than
  5696. previously.
  5697. When you want to convert a SCM string to a C string, use the
  5698. scm_to_locale_string function or similar instead. For symbols, use
  5699. scm_symbol_to_string and then work with that string. Because of the
  5700. new string representation, scm_symbol_to_string does not need to copy
  5701. and is thus quite efficient.
  5702. ** Some string, symbol and keyword functions have been discouraged.
  5703. They don't fit into the uniform naming scheme and are not explicit
  5704. about the character encoding.
  5705. Replace according to the following table:
  5706. scm_allocate_string -> scm_c_make_string
  5707. scm_take_str -> scm_take_locale_stringn
  5708. scm_take0str -> scm_take_locale_string
  5709. scm_mem2string -> scm_from_locale_stringn
  5710. scm_str2string -> scm_from_locale_string
  5711. scm_makfrom0str -> scm_from_locale_string
  5712. scm_mem2symbol -> scm_from_locale_symboln
  5713. scm_mem2uninterned_symbol -> scm_from_locale_stringn + scm_make_symbol
  5714. scm_str2symbol -> scm_from_locale_symbol
  5715. SCM_SYMBOL_HASH -> scm_hashq
  5716. SCM_SYMBOL_INTERNED_P -> scm_symbol_interned_p
  5717. scm_c_make_keyword -> scm_from_locale_keyword
  5718. ** The functions scm_keyword_to_symbol and sym_symbol_to_keyword are
  5719. now also available to C code.
  5720. ** SCM_KEYWORDP and SCM_KEYWORDSYM have been deprecated.
  5721. Use scm_is_keyword and scm_keyword_to_symbol instead, but note that
  5722. the latter returns the true name of the keyword, not the 'dash name',
  5723. as SCM_KEYWORDSYM used to do.
  5724. ** A new way to access arrays in a thread-safe and efficient way has
  5725. been added.
  5726. See the manual, node "Accessing Arrays From C".
  5727. ** The old uniform vector and bitvector implementations have been
  5728. unceremoniously removed.
  5729. This implementation exposed the details of the tagging system of
  5730. Guile. Use the new C API explained in the manual in node "Uniform
  5731. Numeric Vectors" and "Bit Vectors", respectively.
  5732. The following macros are gone: SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
  5733. SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
  5734. SCM_SET_UVECTOR_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
  5735. SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
  5736. SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
  5737. SCM_SET_BITVECTOR_LENGTH, SCM_BITVEC_REF, SCM_BITVEC_SET,
  5738. SCM_BITVEC_CLR.
  5739. ** The macros dealing with vectors have been deprecated.
  5740. Use the new functions scm_is_vector, scm_vector_elements,
  5741. scm_vector_writable_elements, etc, or scm_is_simple_vector,
  5742. SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, etc instead. See the
  5743. manual for more details.
  5744. Deprecated are SCM_VECTORP, SCM_VELTS, SCM_VECTOR_MAX_LENGTH,
  5745. SCM_VECTOR_LENGTH, SCM_VECTOR_REF, SCM_VECTOR_SET, SCM_WRITABLE_VELTS.
  5746. The following macros have been removed: SCM_VECTOR_BASE,
  5747. SCM_SET_VECTOR_BASE, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
  5748. SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS.
  5749. ** Some C functions and macros related to arrays have been deprecated.
  5750. Migrate according to the following table:
  5751. scm_make_uve -> scm_make_typed_array, scm_make_u8vector etc.
  5752. scm_make_ra -> scm_make_array
  5753. scm_shap2ra -> scm_make_array
  5754. scm_cvref -> scm_c_generalized_vector_ref
  5755. scm_ra_set_contp -> do not use
  5756. scm_aind -> scm_array_handle_pos
  5757. scm_raprin1 -> scm_display or scm_write
  5758. SCM_ARRAYP -> scm_is_array
  5759. SCM_ARRAY_NDIM -> scm_c_array_rank
  5760. SCM_ARRAY_DIMS -> scm_array_handle_dims
  5761. SCM_ARRAY_CONTP -> do not use
  5762. SCM_ARRAY_MEM -> do not use
  5763. SCM_ARRAY_V -> scm_array_handle_elements or similar
  5764. SCM_ARRAY_BASE -> do not use
  5765. ** SCM_CELL_WORD_LOC has been deprecated.
  5766. Use the new macro SCM_CELL_OBJECT_LOC instead, which returns a pointer
  5767. to a SCM, as opposed to a pointer to a scm_t_bits.
  5768. This was done to allow the correct use of pointers into the Scheme
  5769. heap. Previously, the heap words were of type scm_t_bits and local
  5770. variables and function arguments were of type SCM, making it
  5771. non-standards-conformant to have a pointer that can point to both.
  5772. ** New macros SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, etc.
  5773. These macros should be used instead of SCM_CELL_WORD_2/3 to access the
  5774. second and third words of double smobs. Likewise for
  5775. SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3.
  5776. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
  5777. used to get and set the 16 exra bits in the zeroth word of a smob.
  5778. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
  5779. accesing the first immediate word of a smob as a SCM value, and there
  5780. is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
  5781. smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
  5782. ** New way to deal with non-local exits and re-entries.
  5783. There is a new set of functions that essentially do what
  5784. scm_internal_dynamic_wind does, but in a way that is more convenient
  5785. for C code in some situations. Here is a quick example of how to
  5786. prevent a potential memory leak:
  5787. void
  5788. foo ()
  5789. {
  5790. char *mem;
  5791. scm_dynwind_begin (0);
  5792. mem = scm_malloc (100);
  5793. scm_dynwind_unwind_handler (free, mem, SCM_F_WIND_EXPLICITLY);
  5794. /* MEM would leak if BAR throws an error.
  5795. SCM_DYNWIND_UNWIND_HANDLER frees it nevertheless.
  5796. */
  5797. bar ();
  5798. scm_dynwind_end ();
  5799. /* Because of SCM_F_WIND_EXPLICITLY, MEM will be freed by
  5800. SCM_DYNWIND_END as well.
  5801. */
  5802. }
  5803. For full documentation, see the node "Dynamic Wind" in the manual.
  5804. ** New function scm_dynwind_free
  5805. This function calls 'free' on a given pointer when a dynwind context
  5806. is left. Thus the call to scm_dynwind_unwind_handler above could be
  5807. replaced with simply scm_dynwind_free (mem).
  5808. ** New functions scm_c_call_with_blocked_asyncs and
  5809. scm_c_call_with_unblocked_asyncs
  5810. Like scm_call_with_blocked_asyncs etc. but for C functions.
  5811. ** New functions scm_dynwind_block_asyncs and scm_dynwind_unblock_asyncs
  5812. In addition to scm_c_call_with_blocked_asyncs you can now also use
  5813. scm_dynwind_block_asyncs in a 'dynwind context' (see above). Likewise for
  5814. scm_c_call_with_unblocked_asyncs and scm_dynwind_unblock_asyncs.
  5815. ** The macros SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
  5816. SCM_REALLOW_INTS have been deprecated.
  5817. They do no longer fulfill their original role of blocking signal
  5818. delivery. Depending on what you want to achieve, replace a pair of
  5819. SCM_DEFER_INTS and SCM_ALLOW_INTS with a dynwind context that locks a
  5820. mutex, blocks asyncs, or both. See node "Critical Sections" in the
  5821. manual.
  5822. ** The value 'scm_mask_ints' is no longer writable.
  5823. Previously, you could set scm_mask_ints directly. This is no longer
  5824. possible. Use scm_c_call_with_blocked_asyncs and
  5825. scm_c_call_with_unblocked_asyncs instead.
  5826. ** New way to temporarily set the current input, output or error ports
  5827. C code can now use scm_dynwind_current_<foo>_port in a 'dynwind
  5828. context' (see above). <foo> is one of "input", "output" or "error".
  5829. ** New way to temporarily set fluids
  5830. C code can now use scm_dynwind_fluid in a 'dynwind context' (see
  5831. above) to temporarily set the value of a fluid.
  5832. ** New types scm_t_intmax and scm_t_uintmax.
  5833. On platforms that have them, these types are identical to intmax_t and
  5834. uintmax_t, respectively. On other platforms, they are identical to
  5835. the largest integer types that Guile knows about.
  5836. ** The functions scm_unmemocopy and scm_unmemoize have been removed.
  5837. You should not have used them.
  5838. ** Many public #defines with generic names have been made private.
  5839. #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
  5840. private or renamed with a more suitable public name.
  5841. ** The macro SCM_TYP16S has been deprecated.
  5842. This macro is not intended for public use.
  5843. ** The macro SCM_SLOPPY_INEXACTP has been deprecated.
  5844. Use scm_is_true (scm_inexact_p (...)) instead.
  5845. ** The macro SCM_SLOPPY_REALP has been deprecated.
  5846. Use scm_is_real instead.
  5847. ** The macro SCM_SLOPPY_COMPLEXP has been deprecated.
  5848. Use scm_is_complex instead.
  5849. ** Some preprocessor defines have been deprecated.
  5850. These defines indicated whether a certain feature was present in Guile
  5851. or not. Going forward, assume that the features are always present.
  5852. The macros are: USE_THREADS, GUILE_ISELECT, READER_EXTENSIONS,
  5853. DEBUG_EXTENSIONS, DYNAMIC_LINKING.
  5854. The following macros have been removed completely: MEMOIZE_LOCALS,
  5855. SCM_RECKLESS, SCM_CAUTIOUS.
  5856. ** The preprocessor define STACK_DIRECTION has been deprecated.
  5857. There should be no need to know about the stack direction for ordinary
  5858. programs.
  5859. ** New function: scm_effective_version
  5860. Returns the "effective" version number. This is just the normal full
  5861. version string without the final micro-version number. See "Changes
  5862. to the distribution" above.
  5863. ** The function scm_call_with_new_thread has a new prototype.
  5864. Instead of taking a list with the thunk and handler, these two
  5865. arguments are now passed directly:
  5866. SCM scm_call_with_new_thread (SCM thunk, SCM handler);
  5867. This is an incompatible change.
  5868. ** New snarfer macro SCM_DEFINE_PUBLIC.
  5869. This is like SCM_DEFINE, but also calls scm_c_export for the defined
  5870. function in the init section.
  5871. ** The snarfer macro SCM_SNARF_INIT is now officially supported.
  5872. ** Garbage collector rewrite.
  5873. The garbage collector is cleaned up a lot, and now uses lazy
  5874. sweeping. This is reflected in the output of (gc-stats); since cells
  5875. are being freed when they are allocated, the cells-allocated field
  5876. stays roughly constant.
  5877. For malloc related triggers, the behavior is changed. It uses the same
  5878. heuristic as the cell-triggered collections. It may be tuned with the
  5879. environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage
  5880. for minimum yield of malloc related triggers. The default is 40.
  5881. GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
  5882. default is 200 kb.
  5883. Debugging operations for the freelist have been deprecated, along with
  5884. the C variables that control garbage collection. The environment
  5885. variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
  5886. GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
  5887. For understanding the memory usage of a GUILE program, the routine
  5888. gc-live-object-stats returns an alist containing the number of live
  5889. objects for every type.
  5890. ** The function scm_definedp has been renamed to scm_defined_p
  5891. The name scm_definedp is deprecated.
  5892. ** The struct scm_cell type has been renamed to scm_t_cell
  5893. This is in accordance to Guile's naming scheme for types. Note that
  5894. the name scm_cell is now used for a function that allocates and
  5895. initializes a new cell (see below).
  5896. ** New functions for memory management
  5897. A new set of functions for memory management has been added since the
  5898. old way (scm_must_malloc, scm_must_free, etc) was error prone and
  5899. indeed, Guile itself contained some long standing bugs that could
  5900. cause aborts in long running programs.
  5901. The new functions are more symmetrical and do not need cooperation
  5902. from smob free routines, among other improvements.
  5903. The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
  5904. scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
  5905. scm_gc_free, scm_gc_register_collectable_memory, and
  5906. scm_gc_unregister_collectable_memory. Refer to the manual for more
  5907. details and for upgrading instructions.
  5908. The old functions for memory management have been deprecated. They
  5909. are: scm_must_malloc, scm_must_realloc, scm_must_free,
  5910. scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
  5911. ** Declarations of exported features are marked with SCM_API.
  5912. Every declaration of a feature that belongs to the exported Guile API
  5913. has been marked by adding the macro "SCM_API" to the start of the
  5914. declaration. This macro can expand into different things, the most
  5915. common of which is just "extern" for Unix platforms. On Win32, it can
  5916. be used to control which symbols are exported from a DLL.
  5917. If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
  5918. will expand into "__declspec (dllimport) extern", which is needed for
  5919. linking to the Guile DLL in Windows.
  5920. There are also SCM_RL_IMPORT, SCM_SRFI1314_IMPORT, and
  5921. SCM_SRFI4_IMPORT, for the corresponding libraries.
  5922. ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
  5923. Use the new functions scm_cell and scm_double_cell instead. The old
  5924. macros had problems because with them allocation and initialization
  5925. was separated and the GC could sometimes observe half initialized
  5926. cells. Only careful coding by the user of SCM_NEWCELL and
  5927. SCM_NEWCELL2 could make this safe and efficient.
  5928. ** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
  5929. Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
  5930. instead.
  5931. ** SRCBRKP has been deprecated.
  5932. Use scm_c_source_property_breakpoint_p instead.
  5933. ** Deprecated: scm_makmacro
  5934. Change your code to use either scm_makmmacro or to define macros in
  5935. Scheme, using 'define-macro'.
  5936. ** New function scm_c_port_for_each.
  5937. This function is like scm_port_for_each but takes a pointer to a C
  5938. function as the callback instead of a SCM value.
  5939. ** The names scm_internal_select, scm_thread_sleep, and
  5940. scm_thread_usleep have been discouraged.
  5941. Use scm_std_select, scm_std_sleep, scm_std_usleep instead.
  5942. ** The GC can no longer be blocked.
  5943. The global flags scm_gc_heap_lock and scm_block_gc have been removed.
  5944. The GC can now run (partially) concurrently with other code and thus
  5945. blocking it is not well defined.
  5946. ** Many definitions have been removed that were previously deprecated.
  5947. scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify,
  5948. scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
  5949. scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2,
  5950. scm_tc16_allocated, SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
  5951. SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED,
  5952. scm_debug_newcell, scm_debug_newcell2, SCM_HUP_SIGNAL, SCM_INT_SIGNAL,
  5953. SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL,
  5954. SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG,
  5955. SCM_NUM_SIGS, scm_top_level_lookup_closure_var,
  5956. *top-level-lookup-closure*, scm_system_transformer, scm_eval_3,
  5957. scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP,
  5958. SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring,
  5959. scm_tc7_substring, sym_huh, SCM_VARVCELL, SCM_UDVARIABLEP,
  5960. SCM_DEFVARIABLEP, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
  5961. scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
  5962. SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
  5963. SCM_LENGTH_MAX, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
  5964. SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR,
  5965. scm_sym2vcell, scm_intern, scm_intern0, scm_sysintern, scm_sysintern0,
  5966. scm_sysintern0_no_module_lookup, scm_init_symbols_deprecated,
  5967. scm_vector_set_length_x, scm_contregs, scm_debug_info,
  5968. scm_debug_frame, SCM_DSIDEVAL, SCM_CONST_LONG, SCM_VCELL,
  5969. SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT,
  5970. SCM_HUGE_LENGTH, SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
  5971. SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
  5972. SCM_VALIDATE_RWSTRING, DIGITS, scm_small_istr2int, scm_istr2int,
  5973. scm_istr2flo, scm_istring2number, scm_istr2int, scm_istr2flo,
  5974. scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP,
  5975. SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
  5976. SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable,
  5977. SCM_CHARS, SCM_LENGTH, SCM_SET_STRING_CHARS, SCM_SET_STRING_LENGTH.
  5978. * Changes to bundled modules
  5979. ** (ice-9 debug)
  5980. Using the (ice-9 debug) module no longer automatically switches Guile
  5981. to use the debugging evaluator. If you want to switch to the
  5982. debugging evaluator (which is needed for backtrace information if you
  5983. hit an error), please add an explicit "(debug-enable 'debug)" to your
  5984. code just after the code to use (ice-9 debug).
  5985. Changes since Guile 1.4:
  5986. * Changes to the distribution
  5987. ** A top-level TODO file is included.
  5988. ** Guile now uses a versioning scheme similar to that of the Linux kernel.
  5989. Guile now always uses three numbers to represent the version,
  5990. i.e. "1.6.5". The first number, 1, is the major version number, the
  5991. second number, 6, is the minor version number, and the third number,
  5992. 5, is the micro version number. Changes in major version number
  5993. indicate major changes in Guile.
  5994. Minor version numbers that are even denote stable releases, and odd
  5995. minor version numbers denote development versions (which may be
  5996. unstable). The micro version number indicates a minor sub-revision of
  5997. a given MAJOR.MINOR release.
  5998. In keeping with the new scheme, (minor-version) and scm_minor_version
  5999. no longer return everything but the major version number. They now
  6000. just return the minor version number. Two new functions
  6001. (micro-version) and scm_micro_version have been added to report the
  6002. micro version number.
  6003. In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
  6004. ** New preprocessor definitions are available for checking versions.
  6005. version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
  6006. SCM_MICRO_VERSION to the appropriate integer values.
  6007. ** Guile now actively warns about deprecated features.
  6008. The new configure option `--enable-deprecated=LEVEL' and the
  6009. environment variable GUILE_WARN_DEPRECATED control this mechanism.
  6010. See INSTALL and README for more information.
  6011. ** Guile is much more likely to work on 64-bit architectures.
  6012. Guile now compiles and passes "make check" with only two UNRESOLVED GC
  6013. cases on Alpha and ia64 based machines now. Thanks to John Goerzen
  6014. for the use of a test machine, and thanks to Stefan Jahn for ia64
  6015. patches.
  6016. ** New functions: setitimer and getitimer.
  6017. These implement a fairly direct interface to the libc functions of the
  6018. same name.
  6019. ** The #. reader extension is now disabled by default.
  6020. For safety reasons, #. evaluation is disabled by default. To
  6021. re-enable it, set the fluid read-eval? to #t. For example:
  6022. (fluid-set! read-eval? #t)
  6023. but make sure you realize the potential security risks involved. With
  6024. read-eval? enabled, reading a data file from an untrusted source can
  6025. be dangerous.
  6026. ** New SRFI modules have been added:
  6027. SRFI-0 `cond-expand' is now supported in Guile, without requiring
  6028. using a module.
  6029. (srfi srfi-1) is a library containing many useful pair- and list-processing
  6030. procedures.
  6031. (srfi srfi-2) exports and-let*.
  6032. (srfi srfi-4) implements homogeneous numeric vector datatypes.
  6033. (srfi srfi-6) is a dummy module for now, since guile already provides
  6034. all of the srfi-6 procedures by default: open-input-string,
  6035. open-output-string, get-output-string.
  6036. (srfi srfi-8) exports receive.
  6037. (srfi srfi-9) exports define-record-type.
  6038. (srfi srfi-10) exports define-reader-ctor and implements the reader
  6039. extension #,().
  6040. (srfi srfi-11) exports let-values and let*-values.
  6041. (srfi srfi-13) implements the SRFI String Library.
  6042. (srfi srfi-14) implements the SRFI Character-Set Library.
  6043. (srfi srfi-17) implements setter and getter-with-setter and redefines
  6044. some accessor procedures as procedures with getters. (such as car,
  6045. cdr, vector-ref etc.)
  6046. (srfi srfi-19) implements the SRFI Time/Date Library.
  6047. ** New scripts / "executable modules"
  6048. Subdirectory "scripts" contains Scheme modules that are packaged to
  6049. also be executable as scripts. At this time, these scripts are available:
  6050. display-commentary
  6051. doc-snarf
  6052. generate-autoload
  6053. punify
  6054. read-scheme-source
  6055. use2dot
  6056. See README there for more info.
  6057. These scripts can be invoked from the shell with the new program
  6058. "guile-tools", which keeps track of installation directory for you.
  6059. For example:
  6060. $ guile-tools display-commentary srfi/*.scm
  6061. guile-tools is copied to the standard $bindir on "make install".
  6062. ** New module (ice-9 stack-catch):
  6063. stack-catch is like catch, but saves the current state of the stack in
  6064. the fluid the-last-stack. This fluid can be useful when using the
  6065. debugger and when re-throwing an error.
  6066. ** The module (ice-9 and-let*) has been renamed to (ice-9 and-let-star)
  6067. This has been done to prevent problems on lesser operating systems
  6068. that can't tolerate `*'s in file names. The exported macro continues
  6069. to be named `and-let*', of course.
  6070. On systems that support it, there is also a compatibility module named
  6071. (ice-9 and-let*). It will go away in the next release.
  6072. ** New modules (oop goops) etc.:
  6073. (oop goops)
  6074. (oop goops describe)
  6075. (oop goops save)
  6076. (oop goops active-slot)
  6077. (oop goops composite-slot)
  6078. The Guile Object Oriented Programming System (GOOPS) has been
  6079. integrated into Guile. For further information, consult the GOOPS
  6080. manual and tutorial in the `doc' directory.
  6081. ** New module (ice-9 rdelim).
  6082. This exports the following procedures which were previously defined
  6083. in the default environment:
  6084. read-line read-line! read-delimited read-delimited! %read-delimited!
  6085. %read-line write-line
  6086. For backwards compatibility the definitions are still imported into the
  6087. default environment in this version of Guile. However you should add:
  6088. (use-modules (ice-9 rdelim))
  6089. to any program which uses the definitions, since this may change in
  6090. future.
  6091. Alternatively, if guile-scsh is installed, the (scsh rdelim) module
  6092. can be used for similar functionality.
  6093. ** New module (ice-9 rw)
  6094. This is a subset of the (scsh rw) module from guile-scsh. Currently
  6095. it defines two procedures:
  6096. *** New function: read-string!/partial str [port_or_fdes [start [end]]]
  6097. Read characters from a port or file descriptor into a string STR.
  6098. A port must have an underlying file descriptor -- a so-called
  6099. fport. This procedure is scsh-compatible and can efficiently read
  6100. large strings.
  6101. *** New function: write-string/partial str [port_or_fdes [start [end]]]
  6102. Write characters from a string STR to a port or file descriptor.
  6103. A port must have an underlying file descriptor -- a so-called
  6104. fport. This procedure is mostly compatible and can efficiently
  6105. write large strings.
  6106. ** New module (ice-9 match)
  6107. This module includes Andrew K. Wright's pattern matcher. See
  6108. ice-9/match.scm for brief description or
  6109. http://www.star-lab.com/wright/code.html
  6110. for complete documentation.
  6111. ** New module (ice-9 buffered-input)
  6112. This module provides procedures to construct an input port from an
  6113. underlying source of input that reads and returns its input in chunks.
  6114. The underlying input source is a Scheme procedure, specified by the
  6115. caller, which the port invokes whenever it needs more input.
  6116. This is useful when building an input port whose back end is Readline
  6117. or a UI element such as the GtkEntry widget.
  6118. ** Documentation
  6119. The reference and tutorial documentation that was previously
  6120. distributed separately, as `guile-doc', is now included in the core
  6121. Guile distribution. The documentation consists of the following
  6122. manuals.
  6123. - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction
  6124. to using Guile.
  6125. - The Guile Reference Manual (guile.texi) contains (or is intended to
  6126. contain) reference documentation on all aspects of Guile.
  6127. - The GOOPS Manual (goops.texi) contains both tutorial-style and
  6128. reference documentation for using GOOPS, Guile's Object Oriented
  6129. Programming System.
  6130. - The Revised^5 Report on the Algorithmic Language Scheme
  6131. (r5rs.texi).
  6132. See the README file in the `doc' directory for more details.
  6133. ** There are a couple of examples in the examples/ directory now.
  6134. * Changes to the stand-alone interpreter
  6135. ** New command line option `--use-srfi'
  6136. Using this option, SRFI modules can be loaded on startup and be
  6137. available right from the beginning. This makes programming portable
  6138. Scheme programs easier.
  6139. The option `--use-srfi' expects a comma-separated list of numbers,
  6140. each representing a SRFI number to be loaded into the interpreter
  6141. before starting evaluating a script file or the REPL. Additionally,
  6142. the feature identifier for the loaded SRFIs is recognized by
  6143. `cond-expand' when using this option.
  6144. Example:
  6145. $ guile --use-srfi=8,13
  6146. guile> (receive (x z) (values 1 2) (+ 1 2))
  6147. 3
  6148. guile> (string-pad "bla" 20)
  6149. " bla"
  6150. ** Guile now always starts up in the `(guile-user)' module.
  6151. Previously, scripts executed via the `-s' option would run in the
  6152. `(guile)' module and the repl would run in the `(guile-user)' module.
  6153. Now every user action takes place in the `(guile-user)' module by
  6154. default.
  6155. * Changes to Scheme functions and syntax
  6156. ** Character classifiers work for non-ASCII characters.
  6157. The predicates `char-alphabetic?', `char-numeric?',
  6158. `char-whitespace?', `char-lower?', `char-upper?' and `char-is-both?'
  6159. no longer check whether their arguments are ASCII characters.
  6160. Previously, a character would only be considered alphabetic when it
  6161. was also ASCII, for example.
  6162. ** Previously deprecated Scheme functions have been removed:
  6163. tag - no replacement.
  6164. fseek - replaced by seek.
  6165. list* - replaced by cons*.
  6166. ** It's now possible to create modules with controlled environments
  6167. Example:
  6168. (use-modules (ice-9 safe))
  6169. (define m (make-safe-module))
  6170. ;;; m will now be a module containing only a safe subset of R5RS
  6171. (eval '(+ 1 2) m) --> 3
  6172. (eval 'load m) --> ERROR: Unbound variable: load
  6173. ** Evaluation of "()", the empty list, is now an error.
  6174. Previously, the expression "()" evaluated to the empty list. This has
  6175. been changed to signal a "missing expression" error. The correct way
  6176. to write the empty list as a literal constant is to use quote: "'()".
  6177. ** New concept of `Guile Extensions'.
  6178. A Guile Extension is just a ordinary shared library that can be linked
  6179. at run-time. We found it advantageous to give this simple concept a
  6180. dedicated name to distinguish the issues related to shared libraries
  6181. from the issues related to the module system.
  6182. *** New function: load-extension
  6183. Executing (load-extension lib init) is mostly equivalent to
  6184. (dynamic-call init (dynamic-link lib))
  6185. except when scm_register_extension has been called previously.
  6186. Whenever appropriate, you should use `load-extension' instead of
  6187. dynamic-link and dynamic-call.
  6188. *** New C function: scm_c_register_extension
  6189. This function registers a initialization function for use by
  6190. `load-extension'. Use it when you don't want specific extensions to
  6191. be loaded as shared libraries (for example on platforms that don't
  6192. support dynamic linking).
  6193. ** Auto-loading of compiled-code modules is deprecated.
  6194. Guile used to be able to automatically find and link a shared
  6195. library to satisfy requests for a module. For example, the module
  6196. `(foo bar)' could be implemented by placing a shared library named
  6197. "foo/libbar.so" (or with a different extension) in a directory on the
  6198. load path of Guile.
  6199. This has been found to be too tricky, and is no longer supported. The
  6200. shared libraries are now called "extensions". You should now write a
  6201. small Scheme file that calls `load-extension' to load the shared
  6202. library and initialize it explicitly.
  6203. The shared libraries themselves should be installed in the usual
  6204. places for shared libraries, with names like "libguile-foo-bar".
  6205. For example, place this into a file "foo/bar.scm"
  6206. (define-module (foo bar))
  6207. (load-extension "libguile-foo-bar" "foobar_init")
  6208. ** Backward incompatible change: eval EXP ENVIRONMENT-SPECIFIER
  6209. `eval' is now R5RS, that is it takes two arguments.
  6210. The second argument is an environment specifier, i.e. either
  6211. (scheme-report-environment 5)
  6212. (null-environment 5)
  6213. (interaction-environment)
  6214. or
  6215. any module.
  6216. ** The module system has been made more disciplined.
  6217. The function `eval' will save and restore the current module around
  6218. the evaluation of the specified expression. While this expression is
  6219. evaluated, `(current-module)' will now return the right module, which
  6220. is the module specified as the second argument to `eval'.
  6221. A consequence of this change is that `eval' is not particularly
  6222. useful when you want allow the evaluated code to change what module is
  6223. designated as the current module and have this change persist from one
  6224. call to `eval' to the next. The read-eval-print-loop is an example
  6225. where `eval' is now inadequate. To compensate, there is a new
  6226. function `primitive-eval' that does not take a module specifier and
  6227. that does not save/restore the current module. You should use this
  6228. function together with `set-current-module', `current-module', etc
  6229. when you want to have more control over the state that is carried from
  6230. one eval to the next.
  6231. Additionally, it has been made sure that forms that are evaluated at
  6232. the top level are always evaluated with respect to the current module.
  6233. Previously, subforms of top-level forms such as `begin', `case',
  6234. etc. did not respect changes to the current module although these
  6235. subforms are at the top-level as well.
  6236. To prevent strange behavior, the forms `define-module',
  6237. `use-modules', `use-syntax', and `export' have been restricted to only
  6238. work on the top level. The forms `define-public' and
  6239. `defmacro-public' only export the new binding on the top level. They
  6240. behave just like `define' and `defmacro', respectively, when they are
  6241. used in a lexical environment.
  6242. Also, `export' will no longer silently re-export bindings imported
  6243. from a used module. It will emit a `deprecation' warning and will
  6244. cease to perform any re-export in the next version. If you actually
  6245. want to re-export bindings, use the new `re-export' in place of
  6246. `export'. The new `re-export' will not make copies of variables when
  6247. rexporting them, as `export' did wrongly.
  6248. ** Module system now allows selection and renaming of imported bindings
  6249. Previously, when using `use-modules' or the `#:use-module' clause in
  6250. the `define-module' form, all the bindings (association of symbols to
  6251. values) for imported modules were added to the "current module" on an
  6252. as-is basis. This has been changed to allow finer control through two
  6253. new facilities: selection and renaming.
  6254. You can now select which of the imported module's bindings are to be
  6255. visible in the current module by using the `:select' clause. This
  6256. clause also can be used to rename individual bindings. For example:
  6257. ;; import all bindings no questions asked
  6258. (use-modules (ice-9 common-list))
  6259. ;; import four bindings, renaming two of them;
  6260. ;; the current module sees: every some zonk-y zonk-n
  6261. (use-modules ((ice-9 common-list)
  6262. :select (every some
  6263. (remove-if . zonk-y)
  6264. (remove-if-not . zonk-n))))
  6265. You can also programmatically rename all selected bindings using the
  6266. `:renamer' clause, which specifies a proc that takes a symbol and
  6267. returns another symbol. Because it is common practice to use a prefix,
  6268. we now provide the convenience procedure `symbol-prefix-proc'. For
  6269. example:
  6270. ;; import four bindings, renaming two of them specifically,
  6271. ;; and all four w/ prefix "CL:";
  6272. ;; the current module sees: CL:every CL:some CL:zonk-y CL:zonk-n
  6273. (use-modules ((ice-9 common-list)
  6274. :select (every some
  6275. (remove-if . zonk-y)
  6276. (remove-if-not . zonk-n))
  6277. :renamer (symbol-prefix-proc 'CL:)))
  6278. ;; import four bindings, renaming two of them specifically,
  6279. ;; and all four by upcasing.
  6280. ;; the current module sees: EVERY SOME ZONK-Y ZONK-N
  6281. (define (upcase-symbol sym)
  6282. (string->symbol (string-upcase (symbol->string sym))))
  6283. (use-modules ((ice-9 common-list)
  6284. :select (every some
  6285. (remove-if . zonk-y)
  6286. (remove-if-not . zonk-n))
  6287. :renamer upcase-symbol))
  6288. Note that programmatic renaming is done *after* individual renaming.
  6289. Also, the above examples show `use-modules', but the same facilities are
  6290. available for the `#:use-module' clause of `define-module'.
  6291. See manual for more info.
  6292. ** The semantics of guardians have changed.
  6293. The changes are for the most part compatible. An important criterion
  6294. was to keep the typical usage of guardians as simple as before, but to
  6295. make the semantics safer and (as a result) more useful.
  6296. *** All objects returned from guardians are now properly alive.
  6297. It is now guaranteed that any object referenced by an object returned
  6298. from a guardian is alive. It's now impossible for a guardian to
  6299. return a "contained" object before its "containing" object.
  6300. One incompatible (but probably not very important) change resulting
  6301. from this is that it is no longer possible to guard objects that
  6302. indirectly reference themselves (i.e. are parts of cycles). If you do
  6303. so accidentally, you'll get a warning.
  6304. *** There are now two types of guardians: greedy and sharing.
  6305. If you call (make-guardian #t) or just (make-guardian), you'll get a
  6306. greedy guardian, and for (make-guardian #f) a sharing guardian.
  6307. Greedy guardians are the default because they are more "defensive".
  6308. You can only greedily guard an object once. If you guard an object
  6309. more than once, once in a greedy guardian and the rest of times in
  6310. sharing guardians, then it is guaranteed that the object won't be
  6311. returned from sharing guardians as long as it is greedily guarded
  6312. and/or alive.
  6313. Guardians returned by calls to `make-guardian' can now take one more
  6314. optional parameter, which says whether to throw an error in case an
  6315. attempt is made to greedily guard an object that is already greedily
  6316. guarded. The default is true, i.e. throw an error. If the parameter
  6317. is false, the guardian invocation returns #t if guarding was
  6318. successful and #f if it wasn't.
  6319. Also, since greedy guarding is, in effect, a side-effecting operation
  6320. on objects, a new function is introduced: `destroy-guardian!'.
  6321. Invoking this function on a guardian renders it unoperative and, if
  6322. the guardian is greedy, clears the "greedily guarded" property of the
  6323. objects that were guarded by it, thus undoing the side effect.
  6324. Note that all this hair is hardly very important, since guardian
  6325. objects are usually permanent.
  6326. ** Continuations created by call-with-current-continuation now accept
  6327. any number of arguments, as required by R5RS.
  6328. ** New function `issue-deprecation-warning'
  6329. This function is used to display the deprecation messages that are
  6330. controlled by GUILE_WARN_DEPRECATION as explained in the README.
  6331. (define (id x)
  6332. (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
  6333. (identity x))
  6334. guile> (id 1)
  6335. ;; `id' is deprecated. Use `identity' instead.
  6336. 1
  6337. guile> (id 1)
  6338. 1
  6339. ** New syntax `begin-deprecated'
  6340. When deprecated features are included (as determined by the configure
  6341. option --enable-deprecated), `begin-deprecated' is identical to
  6342. `begin'. When deprecated features are excluded, it always evaluates
  6343. to `#f', ignoring the body forms.
  6344. ** New function `make-object-property'
  6345. This function returns a new `procedure with setter' P that can be used
  6346. to attach a property to objects. When calling P as
  6347. (set! (P obj) val)
  6348. where `obj' is any kind of object, it attaches `val' to `obj' in such
  6349. a way that it can be retrieved by calling P as
  6350. (P obj)
  6351. This function will replace procedure properties, symbol properties and
  6352. source properties eventually.
  6353. ** Module (ice-9 optargs) now uses keywords instead of `#&'.
  6354. Instead of #&optional, #&key, etc you should now use #:optional,
  6355. #:key, etc. Since #:optional is a keyword, you can write it as just
  6356. :optional when (read-set! keywords 'prefix) is active.
  6357. The old reader syntax `#&' is still supported, but deprecated. It
  6358. will be removed in the next release.
  6359. ** New define-module option: pure
  6360. Tells the module system not to include any bindings from the root
  6361. module.
  6362. Example:
  6363. (define-module (totally-empty-module)
  6364. :pure)
  6365. ** New define-module option: export NAME1 ...
  6366. Export names NAME1 ...
  6367. This option is required if you want to be able to export bindings from
  6368. a module which doesn't import one of `define-public' or `export'.
  6369. Example:
  6370. (define-module (foo)
  6371. :pure
  6372. :use-module (ice-9 r5rs)
  6373. :export (bar))
  6374. ;;; Note that we're pure R5RS below this point!
  6375. (define (bar)
  6376. ...)
  6377. ** New function: object->string OBJ
  6378. Return a Scheme string obtained by printing a given object.
  6379. ** New function: port? X
  6380. Returns a boolean indicating whether X is a port. Equivalent to
  6381. `(or (input-port? X) (output-port? X))'.
  6382. ** New function: file-port?
  6383. Determines whether a given object is a port that is related to a file.
  6384. ** New function: port-for-each proc
  6385. Apply PROC to each port in the Guile port table in turn. The return
  6386. value is unspecified. More specifically, PROC is applied exactly once
  6387. to every port that exists in the system at the time PORT-FOR-EACH is
  6388. invoked. Changes to the port table while PORT-FOR-EACH is running
  6389. have no effect as far as PORT-FOR-EACH is concerned.
  6390. ** New function: dup2 oldfd newfd
  6391. A simple wrapper for the `dup2' system call. Copies the file
  6392. descriptor OLDFD to descriptor number NEWFD, replacing the
  6393. previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
  6394. Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  6395. to move away ports which are using NEWFD. The return value is
  6396. unspecified.
  6397. ** New function: close-fdes fd
  6398. A simple wrapper for the `close' system call. Close file
  6399. descriptor FD, which must be an integer. Unlike close (*note
  6400. close: Ports and File Descriptors.), the file descriptor will be
  6401. closed even if a port is using it. The return value is
  6402. unspecified.
  6403. ** New function: crypt password salt
  6404. Encrypts `password' using the standard unix password encryption
  6405. algorithm.
  6406. ** New function: chroot path
  6407. Change the root directory of the running process to `path'.
  6408. ** New functions: getlogin, cuserid
  6409. Return the login name or the user name of the current effective user
  6410. id, respectively.
  6411. ** New functions: getpriority which who, setpriority which who prio
  6412. Get or set the priority of the running process.
  6413. ** New function: getpass prompt
  6414. Read a password from the terminal, first displaying `prompt' and
  6415. disabling echoing.
  6416. ** New function: flock file operation
  6417. Set/remove an advisory shared or exclusive lock on `file'.
  6418. ** New functions: sethostname name, gethostname
  6419. Set or get the hostname of the machine the current process is running
  6420. on.
  6421. ** New function: mkstemp! tmpl
  6422. mkstemp creates a new unique file in the file system and returns a
  6423. new buffered port open for reading and writing to the file. TMPL
  6424. is a string specifying where the file should be created: it must
  6425. end with `XXXXXX' and will be changed in place to return the name
  6426. of the temporary file.
  6427. ** New function: open-input-string string
  6428. Return an input string port which delivers the characters from
  6429. `string'. This procedure, together with `open-output-string' and
  6430. `get-output-string' implements SRFI-6.
  6431. ** New function: open-output-string
  6432. Return an output string port which collects all data written to it.
  6433. The data can then be retrieved by `get-output-string'.
  6434. ** New function: get-output-string
  6435. Return the contents of an output string port.
  6436. ** New function: identity
  6437. Return the argument.
  6438. ** socket, connect, accept etc., now have support for IPv6. IPv6 addresses
  6439. are represented in Scheme as integers with normal host byte ordering.
  6440. ** New function: inet-pton family address
  6441. Convert a printable string network address into an integer. Note that
  6442. unlike the C version of this function, the result is an integer with
  6443. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6444. e.g.,
  6445. (inet-pton AF_INET "127.0.0.1") => 2130706433
  6446. (inet-pton AF_INET6 "::1") => 1
  6447. ** New function: inet-ntop family address
  6448. Convert an integer network address into a printable string. Note that
  6449. unlike the C version of this function, the input is an integer with
  6450. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6451. e.g.,
  6452. (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  6453. (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  6454. ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  6455. ** Deprecated: id
  6456. Use `identity' instead.
  6457. ** Deprecated: -1+
  6458. Use `1-' instead.
  6459. ** Deprecated: return-it
  6460. Do without it.
  6461. ** Deprecated: string-character-length
  6462. Use `string-length' instead.
  6463. ** Deprecated: flags
  6464. Use `logior' instead.
  6465. ** Deprecated: close-all-ports-except.
  6466. This was intended for closing ports in a child process after a fork,
  6467. but it has the undesirable side effect of flushing buffers.
  6468. port-for-each is more flexible.
  6469. ** The (ice-9 popen) module now attempts to set up file descriptors in
  6470. the child process from the current Scheme ports, instead of using the
  6471. current values of file descriptors 0, 1, and 2 in the parent process.
  6472. ** Removed function: builtin-weak-bindings
  6473. There is no such concept as a weak binding any more.
  6474. ** Removed constants: bignum-radix, scm-line-incrementors
  6475. ** define-method: New syntax mandatory.
  6476. The new method syntax is now mandatory:
  6477. (define-method (NAME ARG-SPEC ...) BODY ...)
  6478. (define-method (NAME ARG-SPEC ... . REST-ARG) BODY ...)
  6479. ARG-SPEC ::= ARG-NAME | (ARG-NAME TYPE)
  6480. REST-ARG ::= ARG-NAME
  6481. If you have old code using the old syntax, import
  6482. (oop goops old-define-method) before (oop goops) as in:
  6483. (use-modules (oop goops old-define-method) (oop goops))
  6484. ** Deprecated function: builtin-variable
  6485. Removed function: builtin-bindings
  6486. There is no longer a distinction between builtin or other variables.
  6487. Use module system operations for all variables.
  6488. ** Lazy-catch handlers are no longer allowed to return.
  6489. That is, a call to `throw', `error', etc is now guaranteed to not
  6490. return.
  6491. ** Bugfixes for (ice-9 getopt-long)
  6492. This module is now tested using test-suite/tests/getopt-long.test.
  6493. The following bugs have been fixed:
  6494. *** Parsing for options that are specified to have `optional' args now checks
  6495. if the next element is an option instead of unconditionally taking it as the
  6496. option arg.
  6497. *** An error is now thrown for `--opt=val' when the option description
  6498. does not specify `(value #t)' or `(value optional)'. This condition used to
  6499. be accepted w/o error, contrary to the documentation.
  6500. *** The error message for unrecognized options is now more informative.
  6501. It used to be "not a record", an artifact of the implementation.
  6502. *** The error message for `--opt' terminating the arg list (no value), when
  6503. `(value #t)' is specified, is now more informative. It used to be "not enough
  6504. args".
  6505. *** "Clumped" single-char args now preserve trailing string, use it as arg.
  6506. The expansion used to be like so:
  6507. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "--xyz")
  6508. Note that the "5d" is dropped. Now it is like so:
  6509. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "5d" "--xyz")
  6510. This enables single-char options to have adjoining arguments as long as their
  6511. constituent characters are not potential single-char options.
  6512. ** (ice-9 session) procedure `arity' now works with (ice-9 optargs) `lambda*'
  6513. The `lambda*' and derivative forms in (ice-9 optargs) now set a procedure
  6514. property `arglist', which can be retrieved by `arity'. The result is that
  6515. `arity' can give more detailed information than before:
  6516. Before:
  6517. guile> (use-modules (ice-9 optargs))
  6518. guile> (define* (foo #:optional a b c) a)
  6519. guile> (arity foo)
  6520. 0 or more arguments in `lambda*:G0'.
  6521. After:
  6522. guile> (arity foo)
  6523. 3 optional arguments: `a', `b' and `c'.
  6524. guile> (define* (bar a b #:key c d #:allow-other-keys) a)
  6525. guile> (arity bar)
  6526. 2 required arguments: `a' and `b', 2 keyword arguments: `c'
  6527. and `d', other keywords allowed.
  6528. guile> (define* (baz a b #:optional c #:rest r) a)
  6529. guile> (arity baz)
  6530. 2 required arguments: `a' and `b', 1 optional argument: `c',
  6531. the rest in `r'.
  6532. * Changes to the C interface
  6533. ** Types have been renamed from scm_*_t to scm_t_*.
  6534. This has been done for POSIX sake. It reserves identifiers ending
  6535. with "_t". What a concept.
  6536. The old names are still available with status `deprecated'.
  6537. ** scm_t_bits (former scm_bits_t) is now a unsigned type.
  6538. ** Deprecated features have been removed.
  6539. *** Macros removed
  6540. SCM_INPORTP, SCM_OUTPORTP SCM_ICHRP, SCM_ICHR, SCM_MAKICHR
  6541. SCM_SETJMPBUF SCM_NSTRINGP SCM_NRWSTRINGP SCM_NVECTORP SCM_DOUBLE_CELLP
  6542. *** C Functions removed
  6543. scm_sysmissing scm_tag scm_tc16_flo scm_tc_flo
  6544. scm_fseek - replaced by scm_seek.
  6545. gc-thunk - replaced by after-gc-hook.
  6546. gh_int2scmb - replaced by gh_bool2scm.
  6547. scm_tc_dblr - replaced by scm_tc16_real.
  6548. scm_tc_dblc - replaced by scm_tc16_complex.
  6549. scm_list_star - replaced by scm_cons_star.
  6550. ** Deprecated: scm_makfromstr
  6551. Use scm_mem2string instead.
  6552. ** Deprecated: scm_make_shared_substring
  6553. Explicit shared substrings will disappear from Guile.
  6554. Instead, "normal" strings will be implemented using sharing
  6555. internally, combined with a copy-on-write strategy.
  6556. ** Deprecated: scm_read_only_string_p
  6557. The concept of read-only strings will disappear in next release of
  6558. Guile.
  6559. ** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
  6560. Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
  6561. ** New functions: scm_call_0, scm_call_1, scm_call_2, scm_call_3
  6562. Call a procedure with the indicated number of arguments. See "Fly
  6563. Evaluation" in the manual.
  6564. ** New functions: scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3
  6565. Call a procedure with the indicated number of arguments and a list of
  6566. further arguments. See "Fly Evaluation" in the manual.
  6567. ** New functions: scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5
  6568. Create a list of the given number of elements. See "List
  6569. Constructors" in the manual.
  6570. ** Renamed function: scm_listify has been replaced by scm_list_n.
  6571. ** Deprecated macros: SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4,
  6572. SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9.
  6573. Use functions scm_list_N instead.
  6574. ** New function: scm_c_read (SCM port, void *buffer, scm_sizet size)
  6575. Used by an application to read arbitrary number of bytes from a port.
  6576. Same semantics as libc read, except that scm_c_read only returns less
  6577. than SIZE bytes if at end-of-file.
  6578. Warning: Doesn't update port line and column counts!
  6579. ** New function: scm_c_write (SCM port, const void *ptr, scm_sizet size)
  6580. Used by an application to write arbitrary number of bytes to an SCM
  6581. port. Similar semantics as libc write. However, unlike libc
  6582. write, scm_c_write writes the requested number of bytes and has no
  6583. return value.
  6584. Warning: Doesn't update port line and column counts!
  6585. ** New function: scm_init_guile ()
  6586. In contrast to scm_boot_guile, scm_init_guile will return normally
  6587. after initializing Guile. It is not available on all systems, tho.
  6588. ** New functions: scm_str2symbol, scm_mem2symbol
  6589. The function scm_str2symbol takes a const char* pointing to a zero-terminated
  6590. field of characters and creates a scheme symbol object from that C string.
  6591. The function scm_mem2symbol takes a const char* and a number of characters and
  6592. creates a symbol from the characters in that memory area.
  6593. ** New functions: scm_primitive_make_property
  6594. scm_primitive_property_ref
  6595. scm_primitive_property_set_x
  6596. scm_primitive_property_del_x
  6597. These functions implement a new way to deal with object properties.
  6598. See libguile/properties.c for their documentation.
  6599. ** New function: scm_done_free (long size)
  6600. This function is the inverse of scm_done_malloc. Use it to report the
  6601. amount of smob memory you free. The previous method, which involved
  6602. calling scm_done_malloc with negative argument, was somewhat
  6603. unintuitive (and is still available, of course).
  6604. ** New function: scm_c_memq (SCM obj, SCM list)
  6605. This function provides a fast C level alternative for scm_memq for the case
  6606. that the list parameter is known to be a proper list. The function is a
  6607. replacement for scm_sloppy_memq, but is stricter in its requirements on its
  6608. list input parameter, since for anything else but a proper list the function's
  6609. behaviour is undefined - it may even crash or loop endlessly. Further, for
  6610. the case that the object is not found in the list, scm_c_memq returns #f which
  6611. is similar to scm_memq, but different from scm_sloppy_memq's behaviour.
  6612. ** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
  6613. scm_remember_upto_here
  6614. These functions replace the function scm_remember.
  6615. ** Deprecated function: scm_remember
  6616. Use one of the new functions scm_remember_upto_here_1,
  6617. scm_remember_upto_here_2 or scm_remember_upto_here instead.
  6618. ** New function: scm_allocate_string
  6619. This function replaces the function scm_makstr.
  6620. ** Deprecated function: scm_makstr
  6621. Use the new function scm_allocate_string instead.
  6622. ** New global variable scm_gc_running_p introduced.
  6623. Use this variable to find out if garbage collection is being executed. Up to
  6624. now applications have used scm_gc_heap_lock to test if garbage collection was
  6625. running, which also works because of the fact that up to know only the garbage
  6626. collector has set this variable. But, this is an implementation detail that
  6627. may change. Further, scm_gc_heap_lock is not set throughout gc, thus the use
  6628. of this variable is (and has been) not fully safe anyway.
  6629. ** New macros: SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH
  6630. Use these instead of SCM_LENGTH_MAX.
  6631. ** New macros: SCM_CONTINUATION_LENGTH, SCM_CCLO_LENGTH, SCM_STACK_LENGTH,
  6632. SCM_STRING_LENGTH, SCM_SYMBOL_LENGTH, SCM_UVECTOR_LENGTH,
  6633. SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
  6634. Use these instead of SCM_LENGTH.
  6635. ** New macros: SCM_SET_CONTINUATION_LENGTH, SCM_SET_STRING_LENGTH,
  6636. SCM_SET_SYMBOL_LENGTH, SCM_SET_VECTOR_LENGTH, SCM_SET_UVECTOR_LENGTH,
  6637. SCM_SET_BITVECTOR_LENGTH
  6638. Use these instead of SCM_SETLENGTH
  6639. ** New macros: SCM_STRING_CHARS, SCM_SYMBOL_CHARS, SCM_CCLO_BASE,
  6640. SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
  6641. SCM_ARRAY_MEM
  6642. Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
  6643. SCM_VELTS.
  6644. ** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
  6645. SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
  6646. SCM_SET_VECTOR_BASE
  6647. Use these instead of SCM_SETCHARS.
  6648. ** New macro: SCM_BITVECTOR_P
  6649. ** New macro: SCM_STRING_COERCE_0TERMINATION_X
  6650. Use instead of SCM_COERCE_SUBSTR.
  6651. ** New macros: SCM_DIR_OPEN_P, SCM_DIR_FLAG_OPEN
  6652. For directory objects, use these instead of SCM_OPDIRP and SCM_OPN.
  6653. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
  6654. SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
  6655. SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
  6656. SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP,
  6657. SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
  6658. SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
  6659. SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
  6660. SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
  6661. SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
  6662. SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
  6663. SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC,
  6664. SCM_OPDIRP, SCM_VALIDATE_OPDIR, SCM_WTA, RETURN_SCM_WTA, SCM_CONST_LONG,
  6665. SCM_WNA, SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
  6666. SCM_VALIDATE_NUMBER_DEF_COPY, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
  6667. SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_SETAND_CAR, SCM_SETOR_CAR
  6668. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
  6669. Use scm_memory_error instead of SCM_NALLOC.
  6670. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
  6671. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR.
  6672. Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP
  6673. Use a type specific accessor macro instead of SCM_CHARS/SCM_UCHARS.
  6674. Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
  6675. Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
  6676. Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
  6677. Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
  6678. Use SCM_STRINGP instead of SCM_RWSTRINGP.
  6679. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
  6680. Use SCM_STRING_CHARS instead of SCM_ROCHARS.
  6681. Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
  6682. Use a type specific setter macro instead of SCM_SETLENGTH.
  6683. Use a type specific setter macro instead of SCM_SETCHARS.
  6684. Use a type specific length macro instead of SCM_LENGTH_MAX.
  6685. Use SCM_GCMARKP instead of SCM_GC8MARKP.
  6686. Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
  6687. Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
  6688. Use SCM_TYP16 instead of SCM_GCTYP16.
  6689. Use SCM_CDR instead of SCM_GCCDR.
  6690. Use SCM_DIR_OPEN_P instead of SCM_OPDIRP.
  6691. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of SCM_WTA.
  6692. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of RETURN_SCM_WTA.
  6693. Use SCM_VCELL_INIT instead of SCM_CONST_LONG.
  6694. Use SCM_WRONG_NUM_ARGS instead of SCM_WNA.
  6695. Use SCM_CONSP instead of SCM_SLOPPY_CONSP.
  6696. Use !SCM_CONSP instead of SCM_SLOPPY_NCONSP.
  6697. ** Removed function: scm_struct_init
  6698. ** Removed variable: scm_symhash_dim
  6699. ** Renamed function: scm_make_cont has been replaced by
  6700. scm_make_continuation, which has a different interface.
  6701. ** Deprecated function: scm_call_catching_errors
  6702. Use scm_catch or scm_lazy_catch from throw.[ch] instead.
  6703. ** Deprecated function: scm_strhash
  6704. Use scm_string_hash instead.
  6705. ** Deprecated function: scm_vector_set_length_x
  6706. Instead, create a fresh vector of the desired size and copy the contents.
  6707. ** scm_gensym has changed prototype
  6708. scm_gensym now only takes one argument.
  6709. ** Deprecated type tags: scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
  6710. scm_tc7_lvector
  6711. There is now only a single symbol type scm_tc7_symbol.
  6712. The tag scm_tc7_lvector was not used anyway.
  6713. ** Deprecated function: scm_make_smob_type_mfpe, scm_set_smob_mfpe.
  6714. Use scm_make_smob_type and scm_set_smob_XXX instead.
  6715. ** New function scm_set_smob_apply.
  6716. This can be used to set an apply function to a smob type.
  6717. ** Deprecated function: scm_strprint_obj
  6718. Use scm_object_to_string instead.
  6719. ** Deprecated function: scm_wta
  6720. Use scm_wrong_type_arg, or another appropriate error signalling function
  6721. instead.
  6722. ** Explicit support for obarrays has been deprecated.
  6723. Use `scm_str2symbol' and the generic hashtable functions instead.
  6724. ** The concept of `vcells' has been deprecated.
  6725. The data type `variable' is now used exclusively. `Vcells' have been
  6726. a low-level concept so you are likely not affected by this change.
  6727. *** Deprecated functions: scm_sym2vcell, scm_sysintern,
  6728. scm_sysintern0, scm_symbol_value0, scm_intern, scm_intern0.
  6729. Use scm_c_define or scm_c_lookup instead, as appropriate.
  6730. *** New functions: scm_c_module_lookup, scm_c_lookup,
  6731. scm_c_module_define, scm_c_define, scm_module_lookup, scm_lookup,
  6732. scm_module_define, scm_define.
  6733. These functions work with variables instead of with vcells.
  6734. ** New functions for creating and defining `subr's and `gsubr's.
  6735. The new functions more clearly distinguish between creating a subr (or
  6736. gsubr) object and adding it to the current module.
  6737. These new functions are available: scm_c_make_subr, scm_c_define_subr,
  6738. scm_c_make_subr_with_generic, scm_c_define_subr_with_generic,
  6739. scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
  6740. scm_c_define_gsubr_with_generic.
  6741. ** Deprecated functions: scm_make_subr, scm_make_subr_opt,
  6742. scm_make_subr_with_generic, scm_make_gsubr,
  6743. scm_make_gsubr_with_generic.
  6744. Use the new ones from above instead.
  6745. ** C interface to the module system has changed.
  6746. While we suggest that you avoid as many explicit module system
  6747. operations from C as possible for the time being, the C interface has
  6748. been made more similar to the high-level Scheme module system.
  6749. *** New functions: scm_c_define_module, scm_c_use_module,
  6750. scm_c_export, scm_c_resolve_module.
  6751. They mostly work like their Scheme namesakes. scm_c_define_module
  6752. takes a function that is called a context where the new module is
  6753. current.
  6754. *** Deprecated functions: scm_the_root_module, scm_make_module,
  6755. scm_ensure_user_module, scm_load_scheme_module.
  6756. Use the new functions instead.
  6757. ** Renamed function: scm_internal_with_fluids becomes
  6758. scm_c_with_fluids.
  6759. scm_internal_with_fluids is available as a deprecated function.
  6760. ** New function: scm_c_with_fluid.
  6761. Just like scm_c_with_fluids, but takes one fluid and one value instead
  6762. of lists of same.
  6763. ** Deprecated typedefs: long_long, ulong_long.
  6764. They are of questionable utility and they pollute the global
  6765. namespace.
  6766. ** Deprecated typedef: scm_sizet
  6767. It is of questionable utility now that Guile requires ANSI C, and is
  6768. oddly named.
  6769. ** Deprecated typedefs: scm_port_rw_active, scm_port,
  6770. scm_ptob_descriptor, scm_debug_info, scm_debug_frame, scm_fport,
  6771. scm_option, scm_rstate, scm_rng, scm_array, scm_array_dim.
  6772. Made more compliant with the naming policy by adding a _t at the end.
  6773. ** Deprecated functions: scm_mkbig, scm_big2num, scm_adjbig,
  6774. scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl
  6775. With the exception of the mysterious scm_2ulong2big, they are still
  6776. available under new names (scm_i_mkbig etc). These functions are not
  6777. intended to be used in user code. You should avoid dealing with
  6778. bignums directly, and should deal with numbers in general (which can
  6779. be bignums).
  6780. ** Change in behavior: scm_num2long, scm_num2ulong
  6781. The scm_num2[u]long functions don't any longer accept an inexact
  6782. argument. This change in behavior is motivated by concordance with
  6783. R5RS: It is more common that a primitive doesn't want to accept an
  6784. inexact for an exact.
  6785. ** New functions: scm_short2num, scm_ushort2num, scm_int2num,
  6786. scm_uint2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
  6787. scm_num2ushort, scm_num2int, scm_num2uint, scm_num2ptrdiff,
  6788. scm_num2size.
  6789. These are conversion functions between the various ANSI C integral
  6790. types and Scheme numbers. NOTE: The scm_num2xxx functions don't
  6791. accept an inexact argument.
  6792. ** New functions: scm_float2num, scm_double2num,
  6793. scm_num2float, scm_num2double.
  6794. These are conversion functions between the two ANSI C float types and
  6795. Scheme numbers.
  6796. ** New number validation macros:
  6797. SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,INT,UINT}[_DEF]
  6798. See above.
  6799. ** New functions: scm_gc_protect_object, scm_gc_unprotect_object
  6800. These are just nicer-named old scm_protect_object and
  6801. scm_unprotect_object.
  6802. ** Deprecated functions: scm_protect_object, scm_unprotect_object
  6803. ** New functions: scm_gc_[un]register_root, scm_gc_[un]register_roots
  6804. These functions can be used to register pointers to locations that
  6805. hold SCM values.
  6806. ** Deprecated function: scm_create_hook.
  6807. Its sins are: misleading name, non-modularity and lack of general
  6808. usefulness.
  6809. Changes since Guile 1.3.4:
  6810. * Changes to the distribution
  6811. ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
  6812. We've changed the way we handle generated files in the Guile source
  6813. repository. As a result, the procedure for building trees obtained
  6814. from the nightly FTP snapshots or via CVS has changed:
  6815. - You must have appropriate versions of autoconf, automake, and
  6816. libtool installed on your system. See README for info on how to
  6817. obtain these programs.
  6818. - Before configuring the tree, you must first run the script
  6819. `autogen.sh' at the top of the source tree.
  6820. The Guile repository used to contain not only source files, written by
  6821. humans, but also some generated files, like configure scripts and
  6822. Makefile.in files. Even though the contents of these files could be
  6823. derived mechanically from other files present, we thought it would
  6824. make the tree easier to build if we checked them into CVS.
  6825. However, this approach means that minor differences between
  6826. developer's installed tools and habits affected the whole team.
  6827. So we have removed the generated files from the repository, and
  6828. added the autogen.sh script, which will reconstruct them
  6829. appropriately.
  6830. ** configure now has experimental options to remove support for certain
  6831. features:
  6832. --disable-arrays omit array and uniform array support
  6833. --disable-posix omit posix interfaces
  6834. --disable-networking omit networking interfaces
  6835. --disable-regex omit regular expression interfaces
  6836. These are likely to become separate modules some day.
  6837. ** New configure option --enable-debug-freelist
  6838. This enables a debugging version of SCM_NEWCELL(), and also registers
  6839. an extra primitive, the setter `gc-set-debug-check-freelist!'.
  6840. Configure with the --enable-debug-freelist option to enable
  6841. the gc-set-debug-check-freelist! primitive, and then use:
  6842. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  6843. (gc-set-debug-check-freelist! #f) # turn off checking
  6844. Checking of the freelist forces a traversal of the freelist and
  6845. a garbage collection before each allocation of a cell. This can
  6846. slow down the interpreter dramatically, so the setter should be used to
  6847. turn on this extra processing only when necessary.
  6848. ** New configure option --enable-debug-malloc
  6849. Include code for debugging of calls to scm_must_malloc/realloc/free.
  6850. Checks that
  6851. 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
  6852. 2. objects reallocated by scm_must_realloc has been allocated by
  6853. scm_must_malloc
  6854. 3. reallocated objects are reallocated with the same what string
  6855. But, most importantly, it records the number of allocated objects of
  6856. each kind. This is useful when searching for memory leaks.
  6857. A Guile compiled with this option provides the primitive
  6858. `malloc-stats' which returns an alist with pairs of kind and the
  6859. number of objects of that kind.
  6860. ** All includes are now referenced relative to the root directory
  6861. Since some users have had problems with mixups between Guile and
  6862. system headers, we have decided to always refer to Guile headers via
  6863. their parent directories. This essentially creates a "private name
  6864. space" for Guile headers. This means that the compiler only is given
  6865. -I options for the root build and root source directory.
  6866. ** Header files kw.h and genio.h have been removed.
  6867. ** The module (ice-9 getopt-gnu-style) has been removed.
  6868. ** New module (ice-9 documentation)
  6869. Implements the interface to documentation strings associated with
  6870. objects.
  6871. ** New module (ice-9 time)
  6872. Provides a macro `time', which displays execution time of a given form.
  6873. ** New module (ice-9 history)
  6874. Loading this module enables value history in the repl.
  6875. * Changes to the stand-alone interpreter
  6876. ** New command line option --debug
  6877. Start Guile with debugging evaluator and backtraces enabled.
  6878. This is useful when debugging your .guile init file or scripts.
  6879. ** New help facility
  6880. Usage: (help NAME) gives documentation about objects named NAME (a symbol)
  6881. (help REGEXP) ditto for objects with names matching REGEXP (a string)
  6882. (help 'NAME) gives documentation for NAME, even if it is not an object
  6883. (help ,EXPR) gives documentation for object returned by EXPR
  6884. (help (my module)) gives module commentary for `(my module)'
  6885. (help) gives this text
  6886. `help' searches among bindings exported from loaded modules, while
  6887. `apropos' searches among bindings visible from the "current" module.
  6888. Examples: (help help)
  6889. (help cons)
  6890. (help "output-string")
  6891. ** `help' and `apropos' now prints full module names
  6892. ** Dynamic linking now uses libltdl from the libtool package.
  6893. The old system dependent code for doing dynamic linking has been
  6894. replaced with calls to the libltdl functions which do all the hairy
  6895. details for us.
  6896. The major improvement is that you can now directly pass libtool
  6897. library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
  6898. will be able to do the best shared library job you can get, via
  6899. libltdl.
  6900. The way dynamic libraries are found has changed and is not really
  6901. portable across platforms, probably. It is therefore recommended to
  6902. use absolute filenames when possible.
  6903. If you pass a filename without an extension to `dynamic-link', it will
  6904. try a few appropriate ones. Thus, the most platform ignorant way is
  6905. to specify a name like "libfoo", without any directories and
  6906. extensions.
  6907. ** Guile COOP threads are now compatible with LinuxThreads
  6908. Previously, COOP threading wasn't possible in applications linked with
  6909. Linux POSIX threads due to their use of the stack pointer to find the
  6910. thread context. This has now been fixed with a workaround which uses
  6911. the pthreads to allocate the stack.
  6912. ** New primitives: `pkgdata-dir', `site-dir', `library-dir'
  6913. ** Positions of erring expression in scripts
  6914. With version 1.3.4, the location of the erring expression in Guile
  6915. scipts is no longer automatically reported. (This should have been
  6916. documented before the 1.3.4 release.)
  6917. You can get this information by enabling recording of positions of
  6918. source expressions and running the debugging evaluator. Put this at
  6919. the top of your script (or in your "site" file):
  6920. (read-enable 'positions)
  6921. (debug-enable 'debug)
  6922. ** Backtraces in scripts
  6923. It is now possible to get backtraces in scripts.
  6924. Put
  6925. (debug-enable 'debug 'backtrace)
  6926. at the top of the script.
  6927. (The first options enables the debugging evaluator.
  6928. The second enables backtraces.)
  6929. ** Part of module system symbol lookup now implemented in C
  6930. The eval closure of most modules is now implemented in C. Since this
  6931. was one of the bottlenecks for loading speed, Guile now loads code
  6932. substantially faster than before.
  6933. ** Attempting to get the value of an unbound variable now produces
  6934. an exception with a key of 'unbound-variable instead of 'misc-error.
  6935. ** The initial default output port is now unbuffered if it's using a
  6936. tty device. Previously in this situation it was line-buffered.
  6937. ** New hook: after-gc-hook
  6938. after-gc-hook takes over the role of gc-thunk. This hook is run at
  6939. the first SCM_TICK after a GC. (Thus, the code is run at the same
  6940. point during evaluation as signal handlers.)
  6941. Note that this hook should be used only for diagnostic and debugging
  6942. purposes. It is not certain that it will continue to be well-defined
  6943. when this hook is run in the future.
  6944. C programmers: Note the new C level hooks scm_before_gc_c_hook,
  6945. scm_before_sweep_c_hook, scm_after_gc_c_hook.
  6946. ** Improvements to garbage collector
  6947. Guile 1.4 has a new policy for triggering heap allocation and
  6948. determining the sizes of heap segments. It fixes a number of problems
  6949. in the old GC.
  6950. 1. The new policy can handle two separate pools of cells
  6951. (2-word/4-word) better. (The old policy would run wild, allocating
  6952. more and more memory for certain programs.)
  6953. 2. The old code would sometimes allocate far too much heap so that the
  6954. Guile process became gigantic. The new code avoids this.
  6955. 3. The old code would sometimes allocate too little so that few cells
  6956. were freed at GC so that, in turn, too much time was spent in GC.
  6957. 4. The old code would often trigger heap allocation several times in a
  6958. row. (The new scheme predicts how large the segments needs to be
  6959. in order not to need further allocation.)
  6960. All in all, the new GC policy will make larger applications more
  6961. efficient.
  6962. The new GC scheme also is prepared for POSIX threading. Threads can
  6963. allocate private pools of cells ("clusters") with just a single
  6964. function call. Allocation of single cells from such a cluster can
  6965. then proceed without any need of inter-thread synchronization.
  6966. ** New environment variables controlling GC parameters
  6967. GUILE_MAX_SEGMENT_SIZE Maximal segment size
  6968. (default = 2097000)
  6969. Allocation of 2-word cell heaps:
  6970. GUILE_INIT_SEGMENT_SIZE_1 Size of initial heap segment in bytes
  6971. (default = 360000)
  6972. GUILE_MIN_YIELD_1 Minimum number of freed cells at each
  6973. GC in percent of total heap size
  6974. (default = 40)
  6975. Allocation of 4-word cell heaps
  6976. (used for real numbers and misc other objects):
  6977. GUILE_INIT_SEGMENT_SIZE_2, GUILE_MIN_YIELD_2
  6978. (See entry "Way for application to customize GC parameters" under
  6979. section "Changes to the scm_ interface" below.)
  6980. ** Guile now implements reals using 4-word cells
  6981. This speeds up computation with reals. (They were earlier allocated
  6982. with `malloc'.) There is still some room for optimizations, however.
  6983. ** Some further steps toward POSIX thread support have been taken
  6984. *** Guile's critical sections (SCM_DEFER/ALLOW_INTS)
  6985. don't have much effect any longer, and many of them will be removed in
  6986. next release.
  6987. *** Signals
  6988. are only handled at the top of the evaluator loop, immediately after
  6989. I/O, and in scm_equalp.
  6990. *** The GC can allocate thread private pools of pairs.
  6991. * Changes to Scheme functions and syntax
  6992. ** close-input-port and close-output-port are now R5RS
  6993. These procedures have been turned into primitives and have R5RS behaviour.
  6994. ** New procedure: simple-format PORT MESSAGE ARG1 ...
  6995. (ice-9 boot) makes `format' an alias for `simple-format' until possibly
  6996. extended by the more sophisticated version in (ice-9 format)
  6997. (simple-format port message . args)
  6998. Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
  6999. MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,
  7000. the escapes are replaced with corresponding members of ARGS:
  7001. ~A formats using `display' and ~S formats using `write'.
  7002. If DESTINATION is #t, then use the `current-output-port',
  7003. if DESTINATION is #f, then return a string containing the formatted text.
  7004. Does not add a trailing newline."
  7005. ** string-ref: the second argument is no longer optional.
  7006. ** string, list->string: no longer accept strings in their arguments,
  7007. only characters, for compatibility with R5RS.
  7008. ** New procedure: port-closed? PORT
  7009. Returns #t if PORT is closed or #f if it is open.
  7010. ** Deprecated: list*
  7011. The list* functionality is now provided by cons* (SRFI-1 compliant)
  7012. ** New procedure: cons* ARG1 ARG2 ... ARGn
  7013. Like `list', but the last arg provides the tail of the constructed list,
  7014. returning (cons ARG1 (cons ARG2 (cons ... ARGn))).
  7015. Requires at least one argument. If given one argument, that argument
  7016. is returned as result.
  7017. This function is called `list*' in some other Schemes and in Common LISP.
  7018. ** Removed deprecated: serial-map, serial-array-copy!, serial-array-map!
  7019. ** New procedure: object-documentation OBJECT
  7020. Returns the documentation string associated with OBJECT. The
  7021. procedure uses a caching mechanism so that subsequent lookups are
  7022. faster.
  7023. Exported by (ice-9 documentation).
  7024. ** module-name now returns full names of modules
  7025. Previously, only the last part of the name was returned (`session' for
  7026. `(ice-9 session)'). Ex: `(ice-9 session)'.
  7027. * Changes to the gh_ interface
  7028. ** Deprecated: gh_int2scmb
  7029. Use gh_bool2scm instead.
  7030. * Changes to the scm_ interface
  7031. ** Guile primitives now carry docstrings!
  7032. Thanks to Greg Badros!
  7033. ** Guile primitives are defined in a new way: SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  7034. Now Guile primitives are defined using the SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  7035. macros and must contain a docstring that is extracted into foo.doc using a new
  7036. guile-doc-snarf script (that uses guile-doc-snarf.awk).
  7037. However, a major overhaul of these macros is scheduled for the next release of
  7038. guile.
  7039. ** Guile primitives use a new technique for validation of arguments
  7040. SCM_VALIDATE_* macros are defined to ease the redundancy and improve
  7041. the readability of argument checking.
  7042. ** All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
  7043. ** New macros: SCM_PACK, SCM_UNPACK
  7044. Compose/decompose an SCM value.
  7045. The SCM type is now treated as an abstract data type and may be defined as a
  7046. long, a void* or as a struct, depending on the architecture and compile time
  7047. options. This makes it easier to find several types of bugs, for example when
  7048. SCM values are treated as integers without conversion. Values of the SCM type
  7049. should be treated as "atomic" values. These macros are used when
  7050. composing/decomposing an SCM value, either because you want to access
  7051. individual bits, or because you want to treat it as an integer value.
  7052. E.g., in order to set bit 7 in an SCM value x, use the expression
  7053. SCM_PACK (SCM_UNPACK (x) | 0x80)
  7054. ** The name property of hooks is deprecated.
  7055. Thus, the use of SCM_HOOK_NAME and scm_make_hook_with_name is deprecated.
  7056. You can emulate this feature by using object properties.
  7057. ** Deprecated macros: SCM_INPORTP, SCM_OUTPORTP, SCM_CRDY, SCM_ICHRP,
  7058. SCM_ICHR, SCM_MAKICHR, SCM_SETJMPBUF, SCM_NSTRINGP, SCM_NRWSTRINGP,
  7059. SCM_NVECTORP
  7060. These macros will be removed in a future release of Guile.
  7061. ** The following types, functions and macros from numbers.h are deprecated:
  7062. scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL,
  7063. SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG
  7064. ** Port internals: the rw_random variable in the scm_port structure
  7065. must be set to non-zero in any random access port. In recent Guile
  7066. releases it was only set for bidirectional random-access ports.
  7067. ** Port internals: the seek ptob procedure is now responsible for
  7068. resetting the buffers if required. The change was made so that in the
  7069. special case of reading the current position (i.e., seek p 0 SEEK_CUR)
  7070. the fport and strport ptobs can avoid resetting the buffers,
  7071. in particular to avoid discarding unread chars. An existing port
  7072. type can be fixed by adding something like the following to the
  7073. beginning of the ptob seek procedure:
  7074. if (pt->rw_active == SCM_PORT_READ)
  7075. scm_end_input (object);
  7076. else if (pt->rw_active == SCM_PORT_WRITE)
  7077. ptob->flush (object);
  7078. although to actually avoid resetting the buffers and discard unread
  7079. chars requires further hacking that depends on the characteristics
  7080. of the ptob.
  7081. ** Deprecated functions: scm_fseek, scm_tag
  7082. These functions are no longer used and will be removed in a future version.
  7083. ** The scm_sysmissing procedure is no longer used in libguile.
  7084. Unless it turns out to be unexpectedly useful to somebody, it will be
  7085. removed in a future version.
  7086. ** The format of error message strings has changed
  7087. The two C procedures: scm_display_error and scm_error, as well as the
  7088. primitive `scm-error', now use scm_simple_format to do their work.
  7089. This means that the message strings of all code must be updated to use
  7090. ~A where %s was used before, and ~S where %S was used before.
  7091. During the period when there still are a lot of old Guiles out there,
  7092. you might want to support both old and new versions of Guile.
  7093. There are basically two methods to achieve this. Both methods use
  7094. autoconf. Put
  7095. AC_CHECK_FUNCS(scm_simple_format)
  7096. in your configure.in.
  7097. Method 1: Use the string concatenation features of ANSI C's
  7098. preprocessor.
  7099. In C:
  7100. #ifdef HAVE_SCM_SIMPLE_FORMAT
  7101. #define FMT_S "~S"
  7102. #else
  7103. #define FMT_S "%S"
  7104. #endif
  7105. Then represent each of your error messages using a preprocessor macro:
  7106. #define E_SPIDER_ERROR "There's a spider in your " ## FMT_S ## "!!!"
  7107. In Scheme:
  7108. (define fmt-s (if (defined? 'simple-format) "~S" "%S"))
  7109. (define make-message string-append)
  7110. (define e-spider-error (make-message "There's a spider in your " fmt-s "!!!"))
  7111. Method 2: Use the oldfmt function found in doc/oldfmt.c.
  7112. In C:
  7113. scm_misc_error ("picnic", scm_c_oldfmt0 ("There's a spider in your ~S!!!"),
  7114. ...);
  7115. In Scheme:
  7116. (scm-error 'misc-error "picnic" (oldfmt "There's a spider in your ~S!!!")
  7117. ...)
  7118. ** Deprecated: coop_mutex_init, coop_condition_variable_init
  7119. Don't use the functions coop_mutex_init and
  7120. coop_condition_variable_init. They will change.
  7121. Use scm_mutex_init and scm_cond_init instead.
  7122. ** New function: int scm_cond_timedwait (scm_cond_t *COND, scm_mutex_t *MUTEX, const struct timespec *ABSTIME)
  7123. `scm_cond_timedwait' atomically unlocks MUTEX and waits on
  7124. COND, as `scm_cond_wait' does, but it also bounds the duration
  7125. of the wait. If COND has not been signaled before time ABSTIME,
  7126. the mutex MUTEX is re-acquired and `scm_cond_timedwait'
  7127. returns the error code `ETIMEDOUT'.
  7128. The ABSTIME parameter specifies an absolute time, with the same
  7129. origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds
  7130. to 00:00:00 GMT, January 1, 1970.
  7131. ** New function: scm_cond_broadcast (scm_cond_t *COND)
  7132. `scm_cond_broadcast' restarts all the threads that are waiting
  7133. on the condition variable COND. Nothing happens if no threads are
  7134. waiting on COND.
  7135. ** New function: scm_key_create (scm_key_t *KEY, void (*destr_function) (void *))
  7136. `scm_key_create' allocates a new TSD key. The key is stored in
  7137. the location pointed to by KEY. There is no limit on the number
  7138. of keys allocated at a given time. The value initially associated
  7139. with the returned key is `NULL' in all currently executing threads.
  7140. The DESTR_FUNCTION argument, if not `NULL', specifies a destructor
  7141. function associated with the key. When a thread terminates,
  7142. DESTR_FUNCTION is called on the value associated with the key in
  7143. that thread. The DESTR_FUNCTION is not called if a key is deleted
  7144. with `scm_key_delete' or a value is changed with
  7145. `scm_setspecific'. The order in which destructor functions are
  7146. called at thread termination time is unspecified.
  7147. Destructors are not yet implemented.
  7148. ** New function: scm_setspecific (scm_key_t KEY, const void *POINTER)
  7149. `scm_setspecific' changes the value associated with KEY in the
  7150. calling thread, storing the given POINTER instead.
  7151. ** New function: scm_getspecific (scm_key_t KEY)
  7152. `scm_getspecific' returns the value currently associated with
  7153. KEY in the calling thread.
  7154. ** New function: scm_key_delete (scm_key_t KEY)
  7155. `scm_key_delete' deallocates a TSD key. It does not check
  7156. whether non-`NULL' values are associated with that key in the
  7157. currently executing threads, nor call the destructor function
  7158. associated with the key.
  7159. ** New function: scm_c_hook_init (scm_c_hook_t *HOOK, void *HOOK_DATA, scm_c_hook_type_t TYPE)
  7160. Initialize a C level hook HOOK with associated HOOK_DATA and type
  7161. TYPE. (See scm_c_hook_run ().)
  7162. ** New function: scm_c_hook_add (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA, int APPENDP)
  7163. Add hook function FUNC with associated FUNC_DATA to HOOK. If APPENDP
  7164. is true, add it last, otherwise first. The same FUNC can be added
  7165. multiple times if FUNC_DATA differ and vice versa.
  7166. ** New function: scm_c_hook_remove (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA)
  7167. Remove hook function FUNC with associated FUNC_DATA from HOOK. A
  7168. function is only removed if both FUNC and FUNC_DATA matches.
  7169. ** New function: void *scm_c_hook_run (scm_c_hook_t *HOOK, void *DATA)
  7170. Run hook HOOK passing DATA to the hook functions.
  7171. If TYPE is SCM_C_HOOK_NORMAL, all hook functions are run. The value
  7172. returned is undefined.
  7173. If TYPE is SCM_C_HOOK_OR, hook functions are run until a function
  7174. returns a non-NULL value. This value is returned as the result of
  7175. scm_c_hook_run. If all functions return NULL, NULL is returned.
  7176. If TYPE is SCM_C_HOOK_AND, hook functions are run until a function
  7177. returns a NULL value, and NULL is returned. If all functions returns
  7178. a non-NULL value, the last value is returned.
  7179. ** New C level GC hooks
  7180. Five new C level hooks has been added to the garbage collector.
  7181. scm_before_gc_c_hook
  7182. scm_after_gc_c_hook
  7183. are run before locking and after unlocking the heap. The system is
  7184. thus in a mode where evaluation can take place. (Except that
  7185. scm_before_gc_c_hook must not allocate new cells.)
  7186. scm_before_mark_c_hook
  7187. scm_before_sweep_c_hook
  7188. scm_after_sweep_c_hook
  7189. are run when the heap is locked. These are intended for extension of
  7190. the GC in a modular fashion. Examples are the weaks and guardians
  7191. modules.
  7192. ** Way for application to customize GC parameters
  7193. The application can set up other default values for the GC heap
  7194. allocation parameters
  7195. GUILE_INIT_HEAP_SIZE_1, GUILE_MIN_YIELD_1,
  7196. GUILE_INIT_HEAP_SIZE_2, GUILE_MIN_YIELD_2,
  7197. GUILE_MAX_SEGMENT_SIZE,
  7198. by setting
  7199. scm_default_init_heap_size_1, scm_default_min_yield_1,
  7200. scm_default_init_heap_size_2, scm_default_min_yield_2,
  7201. scm_default_max_segment_size
  7202. respectively before callong scm_boot_guile.
  7203. (See entry "New environment variables ..." in section
  7204. "Changes to the stand-alone interpreter" above.)
  7205. ** scm_protect_object/scm_unprotect_object now nest
  7206. This means that you can call scm_protect_object multiple times on an
  7207. object and count on the object being protected until
  7208. scm_unprotect_object has been call the same number of times.
  7209. The functions also have better time complexity.
  7210. Still, it is usually possible to structure the application in a way
  7211. that you don't need to use these functions. For example, if you use a
  7212. protected standard Guile list to keep track of live objects rather
  7213. than some custom data type, objects will die a natural death when they
  7214. are no longer needed.
  7215. ** Deprecated type tags: scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc
  7216. Guile does not provide the float representation for inexact real numbers any
  7217. more. Now, only doubles are used to represent inexact real numbers. Further,
  7218. the tag names scm_tc_dblr and scm_tc_dblc have been changed to scm_tc16_real
  7219. and scm_tc16_complex, respectively.
  7220. ** Removed deprecated type scm_smobfuns
  7221. ** Removed deprecated function scm_newsmob
  7222. ** Warning: scm_make_smob_type_mfpe might become deprecated in a future release
  7223. There is an ongoing discussion among the developers whether to
  7224. deprecate `scm_make_smob_type_mfpe' or not. Please use the current
  7225. standard interface (scm_make_smob_type, scm_set_smob_XXX) in new code
  7226. until this issue has been settled.
  7227. ** Removed deprecated type tag scm_tc16_kw
  7228. ** Added type tag scm_tc16_keyword
  7229. (This was introduced already in release 1.3.4 but was not documented
  7230. until now.)
  7231. ** gdb_print now prints "*** Guile not initialized ***" until Guile initialized
  7232. * Changes to system call interfaces:
  7233. ** The "select" procedure now tests port buffers for the ability to
  7234. provide input or accept output. Previously only the underlying file
  7235. descriptors were checked.
  7236. ** New variable PIPE_BUF: the maximum number of bytes that can be
  7237. atomically written to a pipe.
  7238. ** If a facility is not available on the system when Guile is
  7239. compiled, the corresponding primitive procedure will not be defined.
  7240. Previously it would have been defined but would throw a system-error
  7241. exception if called. Exception handlers which catch this case may
  7242. need minor modification: an error will be thrown with key
  7243. 'unbound-variable instead of 'system-error. Alternatively it's
  7244. now possible to use `defined?' to check whether the facility is
  7245. available.
  7246. ** Procedures which depend on the timezone should now give the correct
  7247. result on systems which cache the TZ environment variable, even if TZ
  7248. is changed without calling tzset.
  7249. * Changes to the networking interfaces:
  7250. ** New functions: htons, ntohs, htonl, ntohl: for converting short and
  7251. long integers between network and host format. For now, it's not
  7252. particularly convenient to do this kind of thing, but consider:
  7253. (define write-network-long
  7254. (lambda (value port)
  7255. (let ((v (make-uniform-vector 1 1 0)))
  7256. (uniform-vector-set! v 0 (htonl value))
  7257. (uniform-vector-write v port))))
  7258. (define read-network-long
  7259. (lambda (port)
  7260. (let ((v (make-uniform-vector 1 1 0)))
  7261. (uniform-vector-read! v port)
  7262. (ntohl (uniform-vector-ref v 0)))))
  7263. ** If inet-aton fails, it now throws an error with key 'misc-error
  7264. instead of 'system-error, since errno is not relevant.
  7265. ** Certain gethostbyname/gethostbyaddr failures now throw errors with
  7266. specific keys instead of 'system-error. The latter is inappropriate
  7267. since errno will not have been set. The keys are:
  7268. 'host-not-found, 'try-again, 'no-recovery and 'no-data.
  7269. ** sethostent, setnetent, setprotoent, setservent: now take an
  7270. optional argument STAYOPEN, which specifies whether the database
  7271. remains open after a database entry is accessed randomly (e.g., using
  7272. gethostbyname for the hosts database.) The default is #f. Previously
  7273. #t was always used.
  7274. Changes since Guile 1.3.2:
  7275. * Changes to the stand-alone interpreter
  7276. ** Debugger
  7277. An initial version of the Guile debugger written by Chris Hanson has
  7278. been added. The debugger is still under development but is included
  7279. in the distribution anyway since it is already quite useful.
  7280. Type
  7281. (debug)
  7282. after an error to enter the debugger. Type `help' inside the debugger
  7283. for a description of available commands.
  7284. If you prefer to have stack frames numbered and printed in
  7285. anti-chronological order and prefer up in the stack to be down on the
  7286. screen as is the case in gdb, you can put
  7287. (debug-enable 'backwards)
  7288. in your .guile startup file. (However, this means that Guile can't
  7289. use indentation to indicate stack level.)
  7290. The debugger is autoloaded into Guile at the first use.
  7291. ** Further enhancements to backtraces
  7292. There is a new debug option `width' which controls the maximum width
  7293. on the screen of printed stack frames. Fancy printing parameters
  7294. ("level" and "length" as in Common LISP) are adaptively adjusted for
  7295. each stack frame to give maximum information while still fitting
  7296. within the bounds. If the stack frame can't be made to fit by
  7297. adjusting parameters, it is simply cut off at the end. This is marked
  7298. with a `$'.
  7299. ** Some modules are now only loaded when the repl is started
  7300. The modules (ice-9 debug), (ice-9 session), (ice-9 threads) and (ice-9
  7301. regex) are now loaded into (guile-user) only if the repl has been
  7302. started. The effect is that the startup time for scripts has been
  7303. reduced to 30% of what it was previously.
  7304. Correctly written scripts load the modules they require at the top of
  7305. the file and should not be affected by this change.
  7306. ** Hooks are now represented as smobs
  7307. * Changes to Scheme functions and syntax
  7308. ** Readline support has changed again.
  7309. The old (readline-activator) module is gone. Use (ice-9 readline)
  7310. instead, which now contains all readline functionality. So the code
  7311. to activate readline is now
  7312. (use-modules (ice-9 readline))
  7313. (activate-readline)
  7314. This should work at any time, including from the guile prompt.
  7315. To avoid confusion about the terms of Guile's license, please only
  7316. enable readline for your personal use; please don't make it the
  7317. default for others. Here is why we make this rather odd-sounding
  7318. request:
  7319. Guile is normally licensed under a weakened form of the GNU General
  7320. Public License, which allows you to link code with Guile without
  7321. placing that code under the GPL. This exception is important to some
  7322. people.
  7323. However, since readline is distributed under the GNU General Public
  7324. License, when you link Guile with readline, either statically or
  7325. dynamically, you effectively change Guile's license to the strict GPL.
  7326. Whenever you link any strictly GPL'd code into Guile, uses of Guile
  7327. which are normally permitted become forbidden. This is a rather
  7328. non-obvious consequence of the licensing terms.
  7329. So, to make sure things remain clear, please let people choose for
  7330. themselves whether to link GPL'd libraries like readline with Guile.
  7331. ** regexp-substitute/global has changed slightly, but incompatibly.
  7332. If you include a function in the item list, the string of the match
  7333. object it receives is the same string passed to
  7334. regexp-substitute/global, not some suffix of that string.
  7335. Correspondingly, the match's positions are relative to the entire
  7336. string, not the suffix.
  7337. If the regexp can match the empty string, the way matches are chosen
  7338. from the string has changed. regexp-substitute/global recognizes the
  7339. same set of matches that list-matches does; see below.
  7340. ** New function: list-matches REGEXP STRING [FLAGS]
  7341. Return a list of match objects, one for every non-overlapping, maximal
  7342. match of REGEXP in STRING. The matches appear in left-to-right order.
  7343. list-matches only reports matches of the empty string if there are no
  7344. other matches which begin on, end at, or include the empty match's
  7345. position.
  7346. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7347. ** New function: fold-matches REGEXP STRING INIT PROC [FLAGS]
  7348. For each match of REGEXP in STRING, apply PROC to the match object,
  7349. and the last value PROC returned, or INIT for the first call. Return
  7350. the last value returned by PROC. We apply PROC to the matches as they
  7351. appear from left to right.
  7352. This function recognizes matches according to the same criteria as
  7353. list-matches.
  7354. Thus, you could define list-matches like this:
  7355. (define (list-matches regexp string . flags)
  7356. (reverse! (apply fold-matches regexp string '() cons flags)))
  7357. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7358. ** Hooks
  7359. *** New function: hook? OBJ
  7360. Return #t if OBJ is a hook, otherwise #f.
  7361. *** New function: make-hook-with-name NAME [ARITY]
  7362. Return a hook with name NAME and arity ARITY. The default value for
  7363. ARITY is 0. The only effect of NAME is that it will appear when the
  7364. hook object is printed to ease debugging.
  7365. *** New function: hook-empty? HOOK
  7366. Return #t if HOOK doesn't contain any procedures, otherwise #f.
  7367. *** New function: hook->list HOOK
  7368. Return a list of the procedures that are called when run-hook is
  7369. applied to HOOK.
  7370. ** `map' signals an error if its argument lists are not all the same length.
  7371. This is the behavior required by R5RS, so this change is really a bug
  7372. fix. But it seems to affect a lot of people's code, so we're
  7373. mentioning it here anyway.
  7374. ** Print-state handling has been made more transparent
  7375. Under certain circumstances, ports are represented as a port with an
  7376. associated print state. Earlier, this pair was represented as a pair
  7377. (see "Some magic has been added to the printer" below). It is now
  7378. indistinguishable (almost; see `get-print-state') from a port on the
  7379. user level.
  7380. *** New function: port-with-print-state OUTPUT-PORT PRINT-STATE
  7381. Return a new port with the associated print state PRINT-STATE.
  7382. *** New function: get-print-state OUTPUT-PORT
  7383. Return the print state associated with this port if it exists,
  7384. otherwise return #f.
  7385. *** New function: directory-stream? OBJECT
  7386. Returns true iff OBJECT is a directory stream --- the sort of object
  7387. returned by `opendir'.
  7388. ** New function: using-readline?
  7389. Return #t if readline is in use in the current repl.
  7390. ** structs will be removed in 1.4
  7391. Structs will be replaced in Guile 1.4. We will merge GOOPS into Guile
  7392. and use GOOPS objects as the fundamental record type.
  7393. * Changes to the scm_ interface
  7394. ** structs will be removed in 1.4
  7395. The entire current struct interface (struct.c, struct.h) will be
  7396. replaced in Guile 1.4. We will merge GOOPS into libguile and use
  7397. GOOPS objects as the fundamental record type.
  7398. ** The internal representation of subr's has changed
  7399. Instead of giving a hint to the subr name, the CAR field of the subr
  7400. now contains an index to a subr entry in scm_subr_table.
  7401. *** New variable: scm_subr_table
  7402. An array of subr entries. A subr entry contains the name, properties
  7403. and documentation associated with the subr. The properties and
  7404. documentation slots are not yet used.
  7405. ** A new scheme for "forwarding" calls to a builtin to a generic function
  7406. It is now possible to extend the functionality of some Guile
  7407. primitives by letting them defer a call to a GOOPS generic function on
  7408. argument mismatch. This means that there is no loss of efficiency in
  7409. normal evaluation.
  7410. Example:
  7411. (use-modules (oop goops)) ; Must be GOOPS version 0.2.
  7412. (define-method + ((x <string>) (y <string>))
  7413. (string-append x y))
  7414. + will still be as efficient as usual in numerical calculations, but
  7415. can also be used for concatenating strings.
  7416. Who will be the first one to extend Guile's numerical tower to
  7417. rationals? :) [OK, there a few other things to fix before this can
  7418. be made in a clean way.]
  7419. *** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
  7420. New macro: SCM_GPROC (CNAME, SNAME, REQ, OPT, VAR, CFUNC, GENERIC)
  7421. New macro: SCM_GPROC1 (CNAME, SNAME, TYPE, CFUNC, GENERIC)
  7422. These do the same job as SCM_PROC and SCM_PROC1, but they also define
  7423. a variable GENERIC which can be used by the dispatch macros below.
  7424. [This is experimental code which may change soon.]
  7425. *** New macros for forwarding control to a generic on arg type error
  7426. New macro: SCM_WTA_DISPATCH_1 (GENERIC, ARG1, POS, SUBR)
  7427. New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
  7428. These correspond to the scm_wta function call, and have the same
  7429. behaviour until the user has called the GOOPS primitive
  7430. `enable-primitive-generic!'. After that, these macros will apply the
  7431. generic function GENERIC to the argument(s) instead of calling
  7432. scm_wta.
  7433. [This is experimental code which may change soon.]
  7434. *** New macros for argument testing with generic dispatch
  7435. New macro: SCM_GASSERT1 (COND, GENERIC, ARG1, POS, SUBR)
  7436. New macro: SCM_GASSERT2 (COND, GENERIC, ARG1, ARG2, POS, SUBR)
  7437. These correspond to the SCM_ASSERT macro, but will defer control to
  7438. GENERIC on error after `enable-primitive-generic!' has been called.
  7439. [This is experimental code which may change soon.]
  7440. ** New function: SCM scm_eval_body (SCM body, SCM env)
  7441. Evaluates the body of a special form.
  7442. ** The internal representation of struct's has changed
  7443. Previously, four slots were allocated for the procedure(s) of entities
  7444. and operators. The motivation for this representation had to do with
  7445. the structure of the evaluator, the wish to support tail-recursive
  7446. generic functions, and efficiency. Since the generic function
  7447. dispatch mechanism has changed, there is no longer a need for such an
  7448. expensive representation, and the representation has been simplified.
  7449. This should not make any difference for most users.
  7450. ** GOOPS support has been cleaned up.
  7451. Some code has been moved from eval.c to objects.c and code in both of
  7452. these compilation units has been cleaned up and better structured.
  7453. *** New functions for applying generic functions
  7454. New function: SCM scm_apply_generic (GENERIC, ARGS)
  7455. New function: SCM scm_call_generic_0 (GENERIC)
  7456. New function: SCM scm_call_generic_1 (GENERIC, ARG1)
  7457. New function: SCM scm_call_generic_2 (GENERIC, ARG1, ARG2)
  7458. New function: SCM scm_call_generic_3 (GENERIC, ARG1, ARG2, ARG3)
  7459. ** Deprecated function: scm_make_named_hook
  7460. It is now replaced by:
  7461. ** New function: SCM scm_create_hook (const char *name, int arity)
  7462. Creates a hook in the same way as make-hook above but also
  7463. binds a variable named NAME to it.
  7464. This is the typical way of creating a hook from C code.
  7465. Currently, the variable is created in the "current" module.
  7466. This might change when we get the new module system.
  7467. [The behaviour is identical to scm_make_named_hook.]
  7468. Changes since Guile 1.3:
  7469. * Changes to mailing lists
  7470. ** Some of the Guile mailing lists have moved to sourceware.cygnus.com.
  7471. See the README file to find current addresses for all the Guile
  7472. mailing lists.
  7473. * Changes to the distribution
  7474. ** Readline support is no longer included with Guile by default.
  7475. Based on the different license terms of Guile and Readline, we
  7476. concluded that Guile should not *by default* cause the linking of
  7477. Readline into an application program. Readline support is now offered
  7478. as a separate module, which is linked into an application only when
  7479. you explicitly specify it.
  7480. Although Guile is GNU software, its distribution terms add a special
  7481. exception to the usual GNU General Public License (GPL). Guile's
  7482. license includes a clause that allows you to link Guile with non-free
  7483. programs. We add this exception so as not to put Guile at a
  7484. disadvantage vis-a-vis other extensibility packages that support other
  7485. languages.
  7486. In contrast, the GNU Readline library is distributed under the GNU
  7487. General Public License pure and simple. This means that you may not
  7488. link Readline, even dynamically, into an application unless it is
  7489. distributed under a free software license that is compatible the GPL.
  7490. Because of this difference in distribution terms, an application that
  7491. can use Guile may not be able to use Readline. Now users will be
  7492. explicitly offered two independent decisions about the use of these
  7493. two packages.
  7494. You can activate the readline support by issuing
  7495. (use-modules (readline-activator))
  7496. (activate-readline)
  7497. from your ".guile" file, for example.
  7498. * Changes to the stand-alone interpreter
  7499. ** All builtins now print as primitives.
  7500. Previously builtin procedures not belonging to the fundamental subr
  7501. types printed as #<compiled closure #<primitive-procedure gsubr-apply>>.
  7502. Now, they print as #<primitive-procedure NAME>.
  7503. ** Backtraces slightly more intelligible.
  7504. gsubr-apply and macro transformer application frames no longer appear
  7505. in backtraces.
  7506. * Changes to Scheme functions and syntax
  7507. ** Guile now correctly handles internal defines by rewriting them into
  7508. their equivalent letrec. Previously, internal defines would
  7509. incrementally add to the innermost environment, without checking
  7510. whether the restrictions specified in RnRS were met. This lead to the
  7511. correct behaviour when these restriction actually were met, but didn't
  7512. catch all illegal uses. Such an illegal use could lead to crashes of
  7513. the Guile interpreter or other unwanted results. An example of
  7514. incorrect internal defines that made Guile behave erratically:
  7515. (let ()
  7516. (define a 1)
  7517. (define (b) a)
  7518. (define c (1+ (b)))
  7519. (define d 3)
  7520. (b))
  7521. => 2
  7522. The problem with this example is that the definition of `c' uses the
  7523. value of `b' directly. This confuses the meoization machine of Guile
  7524. so that the second call of `b' (this time in a larger environment that
  7525. also contains bindings for `c' and `d') refers to the binding of `c'
  7526. instead of `a'. You could also make Guile crash with a variation on
  7527. this theme:
  7528. (define (foo flag)
  7529. (define a 1)
  7530. (define (b flag) (if flag a 1))
  7531. (define c (1+ (b flag)))
  7532. (define d 3)
  7533. (b #t))
  7534. (foo #f)
  7535. (foo #t)
  7536. From now on, Guile will issue an `Unbound variable: b' error message
  7537. for both examples.
  7538. ** Hooks
  7539. A hook contains a list of functions which should be called on
  7540. particular occasions in an existing program. Hooks are used for
  7541. customization.
  7542. A window manager might have a hook before-window-map-hook. The window
  7543. manager uses the function run-hooks to call all functions stored in
  7544. before-window-map-hook each time a window is mapped. The user can
  7545. store functions in the hook using add-hook!.
  7546. In Guile, hooks are first class objects.
  7547. *** New function: make-hook [N_ARGS]
  7548. Return a hook for hook functions which can take N_ARGS arguments.
  7549. The default value for N_ARGS is 0.
  7550. (See also scm_make_named_hook below.)
  7551. *** New function: add-hook! HOOK PROC [APPEND_P]
  7552. Put PROC at the beginning of the list of functions stored in HOOK.
  7553. If APPEND_P is supplied, and non-false, put PROC at the end instead.
  7554. PROC must be able to take the number of arguments specified when the
  7555. hook was created.
  7556. If PROC already exists in HOOK, then remove it first.
  7557. *** New function: remove-hook! HOOK PROC
  7558. Remove PROC from the list of functions in HOOK.
  7559. *** New function: reset-hook! HOOK
  7560. Clear the list of hook functions stored in HOOK.
  7561. *** New function: run-hook HOOK ARG1 ...
  7562. Run all hook functions stored in HOOK with arguments ARG1 ... .
  7563. The number of arguments supplied must correspond to the number given
  7564. when the hook was created.
  7565. ** The function `dynamic-link' now takes optional keyword arguments.
  7566. The only keyword argument that is currently defined is `:global
  7567. BOOL'. With it, you can control whether the shared library will be
  7568. linked in global mode or not. In global mode, the symbols from the
  7569. linked library can be used to resolve references from other
  7570. dynamically linked libraries. In non-global mode, the linked
  7571. library is essentially invisible and can only be accessed via
  7572. `dynamic-func', etc. The default is now to link in global mode.
  7573. Previously, the default has been non-global mode.
  7574. The `#:global' keyword is only effective on platforms that support
  7575. the dlopen family of functions.
  7576. ** New function `provided?'
  7577. - Function: provided? FEATURE
  7578. Return true iff FEATURE is supported by this installation of
  7579. Guile. FEATURE must be a symbol naming a feature; the global
  7580. variable `*features*' is a list of available features.
  7581. ** Changes to the module (ice-9 expect):
  7582. *** The expect-strings macro now matches `$' in a regular expression
  7583. only at a line-break or end-of-file by default. Previously it would
  7584. match the end of the string accumulated so far. The old behaviour
  7585. can be obtained by setting the variable `expect-strings-exec-flags'
  7586. to 0.
  7587. *** The expect-strings macro now uses a variable `expect-strings-exec-flags'
  7588. for the regexp-exec flags. If `regexp/noteol' is included, then `$'
  7589. in a regular expression will still match before a line-break or
  7590. end-of-file. The default is `regexp/noteol'.
  7591. *** The expect-strings macro now uses a variable
  7592. `expect-strings-compile-flags' for the flags to be supplied to
  7593. `make-regexp'. The default is `regexp/newline', which was previously
  7594. hard-coded.
  7595. *** The expect macro now supplies two arguments to a match procedure:
  7596. the current accumulated string and a flag to indicate whether
  7597. end-of-file has been reached. Previously only the string was supplied.
  7598. If end-of-file is reached, the match procedure will be called an
  7599. additional time with the same accumulated string as the previous call
  7600. but with the flag set.
  7601. ** New module (ice-9 format), implementing the Common Lisp `format' function.
  7602. This code, and the documentation for it that appears here, was
  7603. borrowed from SLIB, with minor adaptations for Guile.
  7604. - Function: format DESTINATION FORMAT-STRING . ARGUMENTS
  7605. An almost complete implementation of Common LISP format description
  7606. according to the CL reference book `Common LISP' from Guy L.
  7607. Steele, Digital Press. Backward compatible to most of the
  7608. available Scheme format implementations.
  7609. Returns `#t', `#f' or a string; has side effect of printing
  7610. according to FORMAT-STRING. If DESTINATION is `#t', the output is
  7611. to the current output port and `#t' is returned. If DESTINATION
  7612. is `#f', a formatted string is returned as the result of the call.
  7613. NEW: If DESTINATION is a string, DESTINATION is regarded as the
  7614. format string; FORMAT-STRING is then the first argument and the
  7615. output is returned as a string. If DESTINATION is a number, the
  7616. output is to the current error port if available by the
  7617. implementation. Otherwise DESTINATION must be an output port and
  7618. `#t' is returned.
  7619. FORMAT-STRING must be a string. In case of a formatting error
  7620. format returns `#f' and prints a message on the current output or
  7621. error port. Characters are output as if the string were output by
  7622. the `display' function with the exception of those prefixed by a
  7623. tilde (~). For a detailed description of the FORMAT-STRING syntax
  7624. please consult a Common LISP format reference manual. For a test
  7625. suite to verify this format implementation load `formatst.scm'.
  7626. Please send bug reports to `lutzeb@cs.tu-berlin.de'.
  7627. Note: `format' is not reentrant, i.e. only one `format'-call may
  7628. be executed at a time.
  7629. *** Format Specification (Format version 3.0)
  7630. Please consult a Common LISP format reference manual for a detailed
  7631. description of the format string syntax. For a demonstration of the
  7632. implemented directives see `formatst.scm'.
  7633. This implementation supports directive parameters and modifiers (`:'
  7634. and `@' characters). Multiple parameters must be separated by a comma
  7635. (`,'). Parameters can be numerical parameters (positive or negative),
  7636. character parameters (prefixed by a quote character (`''), variable
  7637. parameters (`v'), number of rest arguments parameter (`#'), empty and
  7638. default parameters. Directive characters are case independent. The
  7639. general form of a directive is:
  7640. DIRECTIVE ::= ~{DIRECTIVE-PARAMETER,}[:][@]DIRECTIVE-CHARACTER
  7641. DIRECTIVE-PARAMETER ::= [ [-|+]{0-9}+ | 'CHARACTER | v | # ]
  7642. *** Implemented CL Format Control Directives
  7643. Documentation syntax: Uppercase characters represent the
  7644. corresponding control directive characters. Lowercase characters
  7645. represent control directive parameter descriptions.
  7646. `~A'
  7647. Any (print as `display' does).
  7648. `~@A'
  7649. left pad.
  7650. `~MINCOL,COLINC,MINPAD,PADCHARA'
  7651. full padding.
  7652. `~S'
  7653. S-expression (print as `write' does).
  7654. `~@S'
  7655. left pad.
  7656. `~MINCOL,COLINC,MINPAD,PADCHARS'
  7657. full padding.
  7658. `~D'
  7659. Decimal.
  7660. `~@D'
  7661. print number sign always.
  7662. `~:D'
  7663. print comma separated.
  7664. `~MINCOL,PADCHAR,COMMACHARD'
  7665. padding.
  7666. `~X'
  7667. Hexadecimal.
  7668. `~@X'
  7669. print number sign always.
  7670. `~:X'
  7671. print comma separated.
  7672. `~MINCOL,PADCHAR,COMMACHARX'
  7673. padding.
  7674. `~O'
  7675. Octal.
  7676. `~@O'
  7677. print number sign always.
  7678. `~:O'
  7679. print comma separated.
  7680. `~MINCOL,PADCHAR,COMMACHARO'
  7681. padding.
  7682. `~B'
  7683. Binary.
  7684. `~@B'
  7685. print number sign always.
  7686. `~:B'
  7687. print comma separated.
  7688. `~MINCOL,PADCHAR,COMMACHARB'
  7689. padding.
  7690. `~NR'
  7691. Radix N.
  7692. `~N,MINCOL,PADCHAR,COMMACHARR'
  7693. padding.
  7694. `~@R'
  7695. print a number as a Roman numeral.
  7696. `~:@R'
  7697. print a number as an "old fashioned" Roman numeral.
  7698. `~:R'
  7699. print a number as an ordinal English number.
  7700. `~:@R'
  7701. print a number as a cardinal English number.
  7702. `~P'
  7703. Plural.
  7704. `~@P'
  7705. prints `y' and `ies'.
  7706. `~:P'
  7707. as `~P but jumps 1 argument backward.'
  7708. `~:@P'
  7709. as `~@P but jumps 1 argument backward.'
  7710. `~C'
  7711. Character.
  7712. `~@C'
  7713. prints a character as the reader can understand it (i.e. `#\'
  7714. prefixing).
  7715. `~:C'
  7716. prints a character as emacs does (eg. `^C' for ASCII 03).
  7717. `~F'
  7718. Fixed-format floating-point (prints a flonum like MMM.NNN).
  7719. `~WIDTH,DIGITS,SCALE,OVERFLOWCHAR,PADCHARF'
  7720. `~@F'
  7721. If the number is positive a plus sign is printed.
  7722. `~E'
  7723. Exponential floating-point (prints a flonum like MMM.NNN`E'EE).
  7724. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARE'
  7725. `~@E'
  7726. If the number is positive a plus sign is printed.
  7727. `~G'
  7728. General floating-point (prints a flonum either fixed or
  7729. exponential).
  7730. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARG'
  7731. `~@G'
  7732. If the number is positive a plus sign is printed.
  7733. `~$'
  7734. Dollars floating-point (prints a flonum in fixed with signs
  7735. separated).
  7736. `~DIGITS,SCALE,WIDTH,PADCHAR$'
  7737. `~@$'
  7738. If the number is positive a plus sign is printed.
  7739. `~:@$'
  7740. A sign is always printed and appears before the padding.
  7741. `~:$'
  7742. The sign appears before the padding.
  7743. `~%'
  7744. Newline.
  7745. `~N%'
  7746. print N newlines.
  7747. `~&'
  7748. print newline if not at the beginning of the output line.
  7749. `~N&'
  7750. prints `~&' and then N-1 newlines.
  7751. `~|'
  7752. Page Separator.
  7753. `~N|'
  7754. print N page separators.
  7755. `~~'
  7756. Tilde.
  7757. `~N~'
  7758. print N tildes.
  7759. `~'<newline>
  7760. Continuation Line.
  7761. `~:'<newline>
  7762. newline is ignored, white space left.
  7763. `~@'<newline>
  7764. newline is left, white space ignored.
  7765. `~T'
  7766. Tabulation.
  7767. `~@T'
  7768. relative tabulation.
  7769. `~COLNUM,COLINCT'
  7770. full tabulation.
  7771. `~?'
  7772. Indirection (expects indirect arguments as a list).
  7773. `~@?'
  7774. extracts indirect arguments from format arguments.
  7775. `~(STR~)'
  7776. Case conversion (converts by `string-downcase').
  7777. `~:(STR~)'
  7778. converts by `string-capitalize'.
  7779. `~@(STR~)'
  7780. converts by `string-capitalize-first'.
  7781. `~:@(STR~)'
  7782. converts by `string-upcase'.
  7783. `~*'
  7784. Argument Jumping (jumps 1 argument forward).
  7785. `~N*'
  7786. jumps N arguments forward.
  7787. `~:*'
  7788. jumps 1 argument backward.
  7789. `~N:*'
  7790. jumps N arguments backward.
  7791. `~@*'
  7792. jumps to the 0th argument.
  7793. `~N@*'
  7794. jumps to the Nth argument (beginning from 0)
  7795. `~[STR0~;STR1~;...~;STRN~]'
  7796. Conditional Expression (numerical clause conditional).
  7797. `~N['
  7798. take argument from N.
  7799. `~@['
  7800. true test conditional.
  7801. `~:['
  7802. if-else-then conditional.
  7803. `~;'
  7804. clause separator.
  7805. `~:;'
  7806. default clause follows.
  7807. `~{STR~}'
  7808. Iteration (args come from the next argument (a list)).
  7809. `~N{'
  7810. at most N iterations.
  7811. `~:{'
  7812. args from next arg (a list of lists).
  7813. `~@{'
  7814. args from the rest of arguments.
  7815. `~:@{'
  7816. args from the rest args (lists).
  7817. `~^'
  7818. Up and out.
  7819. `~N^'
  7820. aborts if N = 0
  7821. `~N,M^'
  7822. aborts if N = M
  7823. `~N,M,K^'
  7824. aborts if N <= M <= K
  7825. *** Not Implemented CL Format Control Directives
  7826. `~:A'
  7827. print `#f' as an empty list (see below).
  7828. `~:S'
  7829. print `#f' as an empty list (see below).
  7830. `~<~>'
  7831. Justification.
  7832. `~:^'
  7833. (sorry I don't understand its semantics completely)
  7834. *** Extended, Replaced and Additional Control Directives
  7835. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHD'
  7836. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHX'
  7837. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHO'
  7838. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHB'
  7839. `~N,MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHR'
  7840. COMMAWIDTH is the number of characters between two comma
  7841. characters.
  7842. `~I'
  7843. print a R4RS complex number as `~F~@Fi' with passed parameters for
  7844. `~F'.
  7845. `~Y'
  7846. Pretty print formatting of an argument for scheme code lists.
  7847. `~K'
  7848. Same as `~?.'
  7849. `~!'
  7850. Flushes the output if format DESTINATION is a port.
  7851. `~_'
  7852. Print a `#\space' character
  7853. `~N_'
  7854. print N `#\space' characters.
  7855. `~/'
  7856. Print a `#\tab' character
  7857. `~N/'
  7858. print N `#\tab' characters.
  7859. `~NC'
  7860. Takes N as an integer representation for a character. No arguments
  7861. are consumed. N is converted to a character by `integer->char'. N
  7862. must be a positive decimal number.
  7863. `~:S'
  7864. Print out readproof. Prints out internal objects represented as
  7865. `#<...>' as strings `"#<...>"' so that the format output can always
  7866. be processed by `read'.
  7867. `~:A'
  7868. Print out readproof. Prints out internal objects represented as
  7869. `#<...>' as strings `"#<...>"' so that the format output can always
  7870. be processed by `read'.
  7871. `~Q'
  7872. Prints information and a copyright notice on the format
  7873. implementation.
  7874. `~:Q'
  7875. prints format version.
  7876. `~F, ~E, ~G, ~$'
  7877. may also print number strings, i.e. passing a number as a string
  7878. and format it accordingly.
  7879. *** Configuration Variables
  7880. The format module exports some configuration variables to suit the
  7881. systems and users needs. There should be no modification necessary for
  7882. the configuration that comes with Guile. Format detects automatically
  7883. if the running scheme system implements floating point numbers and
  7884. complex numbers.
  7885. format:symbol-case-conv
  7886. Symbols are converted by `symbol->string' so the case type of the
  7887. printed symbols is implementation dependent.
  7888. `format:symbol-case-conv' is a one arg closure which is either
  7889. `#f' (no conversion), `string-upcase', `string-downcase' or
  7890. `string-capitalize'. (default `#f')
  7891. format:iobj-case-conv
  7892. As FORMAT:SYMBOL-CASE-CONV but applies for the representation of
  7893. implementation internal objects. (default `#f')
  7894. format:expch
  7895. The character prefixing the exponent value in `~E' printing.
  7896. (default `#\E')
  7897. *** Compatibility With Other Format Implementations
  7898. SLIB format 2.x:
  7899. See `format.doc'.
  7900. SLIB format 1.4:
  7901. Downward compatible except for padding support and `~A', `~S',
  7902. `~P', `~X' uppercase printing. SLIB format 1.4 uses C-style
  7903. `printf' padding support which is completely replaced by the CL
  7904. `format' padding style.
  7905. MIT C-Scheme 7.1:
  7906. Downward compatible except for `~', which is not documented
  7907. (ignores all characters inside the format string up to a newline
  7908. character). (7.1 implements `~a', `~s', ~NEWLINE, `~~', `~%',
  7909. numerical and variable parameters and `:/@' modifiers in the CL
  7910. sense).
  7911. Elk 1.5/2.0:
  7912. Downward compatible except for `~A' and `~S' which print in
  7913. uppercase. (Elk implements `~a', `~s', `~~', and `~%' (no
  7914. directive parameters or modifiers)).
  7915. Scheme->C 01nov91:
  7916. Downward compatible except for an optional destination parameter:
  7917. S2C accepts a format call without a destination which returns a
  7918. formatted string. This is equivalent to a #f destination in S2C.
  7919. (S2C implements `~a', `~s', `~c', `~%', and `~~' (no directive
  7920. parameters or modifiers)).
  7921. ** Changes to string-handling functions.
  7922. These functions were added to support the (ice-9 format) module, above.
  7923. *** New function: string-upcase STRING
  7924. *** New function: string-downcase STRING
  7925. These are non-destructive versions of the existing string-upcase! and
  7926. string-downcase! functions.
  7927. *** New function: string-capitalize! STRING
  7928. *** New function: string-capitalize STRING
  7929. These functions convert the first letter of each word in the string to
  7930. upper case. Thus:
  7931. (string-capitalize "howdy there")
  7932. => "Howdy There"
  7933. As with the other functions, string-capitalize! modifies the string in
  7934. place, while string-capitalize returns a modified copy of its argument.
  7935. *** New function: string-ci->symbol STRING
  7936. Return a symbol whose name is STRING, but having the same case as if
  7937. the symbol had be read by `read'.
  7938. Guile can be configured to be sensitive or insensitive to case
  7939. differences in Scheme identifiers. If Guile is case-insensitive, all
  7940. symbols are converted to lower case on input. The `string-ci->symbol'
  7941. function returns a symbol whose name in STRING, transformed as Guile
  7942. would if STRING were input.
  7943. *** New function: substring-move! STRING1 START END STRING2 START
  7944. Copy the substring of STRING1 from START (inclusive) to END
  7945. (exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
  7946. string, and the source and destination areas may overlap; in all
  7947. cases, the function behaves as if all the characters were copied
  7948. simultanously.
  7949. *** Extended functions: substring-move-left! substring-move-right!
  7950. These functions now correctly copy arbitrarily overlapping substrings;
  7951. they are both synonyms for substring-move!.
  7952. ** New module (ice-9 getopt-long), with the function `getopt-long'.
  7953. getopt-long is a function for parsing command-line arguments in a
  7954. manner consistent with other GNU programs.
  7955. (getopt-long ARGS GRAMMAR)
  7956. Parse the arguments ARGS according to the argument list grammar GRAMMAR.
  7957. ARGS should be a list of strings. Its first element should be the
  7958. name of the program; subsequent elements should be the arguments
  7959. that were passed to the program on the command line. The
  7960. `program-arguments' procedure returns a list of this form.
  7961. GRAMMAR is a list of the form:
  7962. ((OPTION (PROPERTY VALUE) ...) ...)
  7963. Each OPTION should be a symbol. `getopt-long' will accept a
  7964. command-line option named `--OPTION'.
  7965. Each option can have the following (PROPERTY VALUE) pairs:
  7966. (single-char CHAR) --- Accept `-CHAR' as a single-character
  7967. equivalent to `--OPTION'. This is how to specify traditional
  7968. Unix-style flags.
  7969. (required? BOOL) --- If BOOL is true, the option is required.
  7970. getopt-long will raise an error if it is not found in ARGS.
  7971. (value BOOL) --- If BOOL is #t, the option accepts a value; if
  7972. it is #f, it does not; and if it is the symbol
  7973. `optional', the option may appear in ARGS with or
  7974. without a value.
  7975. (predicate FUNC) --- If the option accepts a value (i.e. you
  7976. specified `(value #t)' for this option), then getopt
  7977. will apply FUNC to the value, and throw an exception
  7978. if it returns #f. FUNC should be a procedure which
  7979. accepts a string and returns a boolean value; you may
  7980. need to use quasiquotes to get it into GRAMMAR.
  7981. The (PROPERTY VALUE) pairs may occur in any order, but each
  7982. property may occur only once. By default, options do not have
  7983. single-character equivalents, are not required, and do not take
  7984. values.
  7985. In ARGS, single-character options may be combined, in the usual
  7986. Unix fashion: ("-x" "-y") is equivalent to ("-xy"). If an option
  7987. accepts values, then it must be the last option in the
  7988. combination; the value is the next argument. So, for example, using
  7989. the following grammar:
  7990. ((apples (single-char #\a))
  7991. (blimps (single-char #\b) (value #t))
  7992. (catalexis (single-char #\c) (value #t)))
  7993. the following argument lists would be acceptable:
  7994. ("-a" "-b" "bang" "-c" "couth") ("bang" and "couth" are the values
  7995. for "blimps" and "catalexis")
  7996. ("-ab" "bang" "-c" "couth") (same)
  7997. ("-ac" "couth" "-b" "bang") (same)
  7998. ("-abc" "couth" "bang") (an error, since `-b' is not the
  7999. last option in its combination)
  8000. If an option's value is optional, then `getopt-long' decides
  8001. whether it has a value by looking at what follows it in ARGS. If
  8002. the next element is a string, and it does not appear to be an
  8003. option itself, then that string is the option's value.
  8004. The value of a long option can appear as the next element in ARGS,
  8005. or it can follow the option name, separated by an `=' character.
  8006. Thus, using the same grammar as above, the following argument lists
  8007. are equivalent:
  8008. ("--apples" "Braeburn" "--blimps" "Goodyear")
  8009. ("--apples=Braeburn" "--blimps" "Goodyear")
  8010. ("--blimps" "Goodyear" "--apples=Braeburn")
  8011. If the option "--" appears in ARGS, argument parsing stops there;
  8012. subsequent arguments are returned as ordinary arguments, even if
  8013. they resemble options. So, in the argument list:
  8014. ("--apples" "Granny Smith" "--" "--blimp" "Goodyear")
  8015. `getopt-long' will recognize the `apples' option as having the
  8016. value "Granny Smith", but it will not recognize the `blimp'
  8017. option; it will return the strings "--blimp" and "Goodyear" as
  8018. ordinary argument strings.
  8019. The `getopt-long' function returns the parsed argument list as an
  8020. assocation list, mapping option names --- the symbols from GRAMMAR
  8021. --- onto their values, or #t if the option does not accept a value.
  8022. Unused options do not appear in the alist.
  8023. All arguments that are not the value of any option are returned
  8024. as a list, associated with the empty list.
  8025. `getopt-long' throws an exception if:
  8026. - it finds an unrecognized option in ARGS
  8027. - a required option is omitted
  8028. - an option that requires an argument doesn't get one
  8029. - an option that doesn't accept an argument does get one (this can
  8030. only happen using the long option `--opt=value' syntax)
  8031. - an option predicate fails
  8032. So, for example:
  8033. (define grammar
  8034. `((lockfile-dir (required? #t)
  8035. (value #t)
  8036. (single-char #\k)
  8037. (predicate ,file-is-directory?))
  8038. (verbose (required? #f)
  8039. (single-char #\v)
  8040. (value #f))
  8041. (x-includes (single-char #\x))
  8042. (rnet-server (single-char #\y)
  8043. (predicate ,string?))))
  8044. (getopt-long '("my-prog" "-vk" "/tmp" "foo1" "--x-includes=/usr/include"
  8045. "--rnet-server=lamprod" "--" "-fred" "foo2" "foo3")
  8046. grammar)
  8047. => ((() "foo1" "-fred" "foo2" "foo3")
  8048. (rnet-server . "lamprod")
  8049. (x-includes . "/usr/include")
  8050. (lockfile-dir . "/tmp")
  8051. (verbose . #t))
  8052. ** The (ice-9 getopt-gnu-style) module is obsolete; use (ice-9 getopt-long).
  8053. It will be removed in a few releases.
  8054. ** New syntax: lambda*
  8055. ** New syntax: define*
  8056. ** New syntax: define*-public
  8057. ** New syntax: defmacro*
  8058. ** New syntax: defmacro*-public
  8059. Guile now supports optional arguments.
  8060. `lambda*', `define*', `define*-public', `defmacro*' and
  8061. `defmacro*-public' are identical to the non-* versions except that
  8062. they use an extended type of parameter list that has the following BNF
  8063. syntax (parentheses are literal, square brackets indicate grouping,
  8064. and `*', `+' and `?' have the usual meaning):
  8065. ext-param-list ::= ( [identifier]* [#&optional [ext-var-decl]+]?
  8066. [#&key [ext-var-decl]+ [#&allow-other-keys]?]?
  8067. [[#&rest identifier]|[. identifier]]? ) | [identifier]
  8068. ext-var-decl ::= identifier | ( identifier expression )
  8069. The semantics are best illustrated with the following documentation
  8070. and examples for `lambda*':
  8071. lambda* args . body
  8072. lambda extended for optional and keyword arguments
  8073. lambda* creates a procedure that takes optional arguments. These
  8074. are specified by putting them inside brackets at the end of the
  8075. paramater list, but before any dotted rest argument. For example,
  8076. (lambda* (a b #&optional c d . e) '())
  8077. creates a procedure with fixed arguments a and b, optional arguments c
  8078. and d, and rest argument e. If the optional arguments are omitted
  8079. in a call, the variables for them are unbound in the procedure. This
  8080. can be checked with the bound? macro.
  8081. lambda* can also take keyword arguments. For example, a procedure
  8082. defined like this:
  8083. (lambda* (#&key xyzzy larch) '())
  8084. can be called with any of the argument lists (#:xyzzy 11)
  8085. (#:larch 13) (#:larch 42 #:xyzzy 19) (). Whichever arguments
  8086. are given as keywords are bound to values.
  8087. Optional and keyword arguments can also be given default values
  8088. which they take on when they are not present in a call, by giving a
  8089. two-item list in place of an optional argument, for example in:
  8090. (lambda* (foo #&optional (bar 42) #&key (baz 73)) (list foo bar baz))
  8091. foo is a fixed argument, bar is an optional argument with default
  8092. value 42, and baz is a keyword argument with default value 73.
  8093. Default value expressions are not evaluated unless they are needed
  8094. and until the procedure is called.
  8095. lambda* now supports two more special parameter list keywords.
  8096. lambda*-defined procedures now throw an error by default if a
  8097. keyword other than one of those specified is found in the actual
  8098. passed arguments. However, specifying #&allow-other-keys
  8099. immediately after the kyword argument declarations restores the
  8100. previous behavior of ignoring unknown keywords. lambda* also now
  8101. guarantees that if the same keyword is passed more than once, the
  8102. last one passed is the one that takes effect. For example,
  8103. ((lambda* (#&key (heads 0) (tails 0)) (display (list heads tails)))
  8104. #:heads 37 #:tails 42 #:heads 99)
  8105. would result in (99 47) being displayed.
  8106. #&rest is also now provided as a synonym for the dotted syntax rest
  8107. argument. The argument lists (a . b) and (a #&rest b) are equivalent in
  8108. all respects to lambda*. This is provided for more similarity to DSSSL,
  8109. MIT-Scheme and Kawa among others, as well as for refugees from other
  8110. Lisp dialects.
  8111. Further documentation may be found in the optargs.scm file itself.
  8112. The optional argument module also exports the macros `let-optional',
  8113. `let-optional*', `let-keywords', `let-keywords*' and `bound?'. These
  8114. are not documented here because they may be removed in the future, but
  8115. full documentation is still available in optargs.scm.
  8116. ** New syntax: and-let*
  8117. Guile now supports the `and-let*' form, described in the draft SRFI-2.
  8118. Syntax: (land* (<clause> ...) <body> ...)
  8119. Each <clause> should have one of the following forms:
  8120. (<variable> <expression>)
  8121. (<expression>)
  8122. <bound-variable>
  8123. Each <variable> or <bound-variable> should be an identifier. Each
  8124. <expression> should be a valid expression. The <body> should be a
  8125. possibly empty sequence of expressions, like the <body> of a
  8126. lambda form.
  8127. Semantics: A LAND* expression is evaluated by evaluating the
  8128. <expression> or <bound-variable> of each of the <clause>s from
  8129. left to right. The value of the first <expression> or
  8130. <bound-variable> that evaluates to a false value is returned; the
  8131. remaining <expression>s and <bound-variable>s are not evaluated.
  8132. The <body> forms are evaluated iff all the <expression>s and
  8133. <bound-variable>s evaluate to true values.
  8134. The <expression>s and the <body> are evaluated in an environment
  8135. binding each <variable> of the preceding (<variable> <expression>)
  8136. clauses to the value of the <expression>. Later bindings
  8137. shadow earlier bindings.
  8138. Guile's and-let* macro was contributed by Michael Livshin.
  8139. ** New sorting functions
  8140. *** New function: sorted? SEQUENCE LESS?
  8141. Returns `#t' when the sequence argument is in non-decreasing order
  8142. according to LESS? (that is, there is no adjacent pair `... x y
  8143. ...' for which `(less? y x)').
  8144. Returns `#f' when the sequence contains at least one out-of-order
  8145. pair. It is an error if the sequence is neither a list nor a
  8146. vector.
  8147. *** New function: merge LIST1 LIST2 LESS?
  8148. LIST1 and LIST2 are sorted lists.
  8149. Returns the sorted list of all elements in LIST1 and LIST2.
  8150. Assume that the elements a and b1 in LIST1 and b2 in LIST2 are "equal"
  8151. in the sense that (LESS? x y) --> #f for x, y in {a, b1, b2},
  8152. and that a < b1 in LIST1. Then a < b1 < b2 in the result.
  8153. (Here "<" should read "comes before".)
  8154. *** New procedure: merge! LIST1 LIST2 LESS?
  8155. Merges two lists, re-using the pairs of LIST1 and LIST2 to build
  8156. the result. If the code is compiled, and LESS? constructs no new
  8157. pairs, no pairs at all will be allocated. The first pair of the
  8158. result will be either the first pair of LIST1 or the first pair of
  8159. LIST2.
  8160. *** New function: sort SEQUENCE LESS?
  8161. Accepts either a list or a vector, and returns a new sequence
  8162. which is sorted. The new sequence is the same type as the input.
  8163. Always `(sorted? (sort sequence less?) less?)'. The original
  8164. sequence is not altered in any way. The new sequence shares its
  8165. elements with the old one; no elements are copied.
  8166. *** New procedure: sort! SEQUENCE LESS
  8167. Returns its sorted result in the original boxes. No new storage is
  8168. allocated at all. Proper usage: (set! slist (sort! slist <))
  8169. *** New function: stable-sort SEQUENCE LESS?
  8170. Similar to `sort' but stable. That is, if "equal" elements are
  8171. ordered a < b in the original sequence, they will have the same order
  8172. in the result.
  8173. *** New function: stable-sort! SEQUENCE LESS?
  8174. Similar to `sort!' but stable.
  8175. Uses temporary storage when sorting vectors.
  8176. *** New functions: sort-list, sort-list!
  8177. Added for compatibility with scsh.
  8178. ** New built-in random number support
  8179. *** New function: random N [STATE]
  8180. Accepts a positive integer or real N and returns a number of the
  8181. same type between zero (inclusive) and N (exclusive). The values
  8182. returned have a uniform distribution.
  8183. The optional argument STATE must be of the type produced by
  8184. `copy-random-state' or `seed->random-state'. It defaults to the value
  8185. of the variable `*random-state*'. This object is used to maintain the
  8186. state of the pseudo-random-number generator and is altered as a side
  8187. effect of the `random' operation.
  8188. *** New variable: *random-state*
  8189. Holds a data structure that encodes the internal state of the
  8190. random-number generator that `random' uses by default. The nature
  8191. of this data structure is implementation-dependent. It may be
  8192. printed out and successfully read back in, but may or may not
  8193. function correctly as a random-number state object in another
  8194. implementation.
  8195. *** New function: copy-random-state [STATE]
  8196. Returns a new object of type suitable for use as the value of the
  8197. variable `*random-state*' and as a second argument to `random'.
  8198. If argument STATE is given, a copy of it is returned. Otherwise a
  8199. copy of `*random-state*' is returned.
  8200. *** New function: seed->random-state SEED
  8201. Returns a new object of type suitable for use as the value of the
  8202. variable `*random-state*' and as a second argument to `random'.
  8203. SEED is a string or a number. A new state is generated and
  8204. initialized using SEED.
  8205. *** New function: random:uniform [STATE]
  8206. Returns an uniformly distributed inexact real random number in the
  8207. range between 0 and 1.
  8208. *** New procedure: random:solid-sphere! VECT [STATE]
  8209. Fills VECT with inexact real random numbers the sum of whose
  8210. squares is less than 1.0. Thinking of VECT as coordinates in
  8211. space of dimension N = `(vector-length VECT)', the coordinates are
  8212. uniformly distributed within the unit N-shere. The sum of the
  8213. squares of the numbers is returned. VECT can be either a vector
  8214. or a uniform vector of doubles.
  8215. *** New procedure: random:hollow-sphere! VECT [STATE]
  8216. Fills VECT with inexact real random numbers the sum of whose squares
  8217. is equal to 1.0. Thinking of VECT as coordinates in space of
  8218. dimension n = `(vector-length VECT)', the coordinates are uniformly
  8219. distributed over the surface of the unit n-shere. VECT can be either
  8220. a vector or a uniform vector of doubles.
  8221. *** New function: random:normal [STATE]
  8222. Returns an inexact real in a normal distribution with mean 0 and
  8223. standard deviation 1. For a normal distribution with mean M and
  8224. standard deviation D use `(+ M (* D (random:normal)))'.
  8225. *** New procedure: random:normal-vector! VECT [STATE]
  8226. Fills VECT with inexact real random numbers which are independent and
  8227. standard normally distributed (i.e., with mean 0 and variance 1).
  8228. VECT can be either a vector or a uniform vector of doubles.
  8229. *** New function: random:exp STATE
  8230. Returns an inexact real in an exponential distribution with mean 1.
  8231. For an exponential distribution with mean U use (* U (random:exp)).
  8232. ** The range of logand, logior, logxor, logtest, and logbit? have changed.
  8233. These functions now operate on numbers in the range of a C unsigned
  8234. long.
  8235. These functions used to operate on numbers in the range of a C signed
  8236. long; however, this seems inappropriate, because Guile integers don't
  8237. overflow.
  8238. ** New function: make-guardian
  8239. This is an implementation of guardians as described in
  8240. R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a
  8241. Generation-Based Garbage Collector" ACM SIGPLAN Conference on
  8242. Programming Language Design and Implementation, June 1993
  8243. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/guardians.ps.gz
  8244. ** New functions: delq1!, delv1!, delete1!
  8245. These procedures behave similar to delq! and friends but delete only
  8246. one object if at all.
  8247. ** New function: unread-string STRING PORT
  8248. Unread STRING to PORT, that is, push it back onto the port so that
  8249. next read operation will work on the pushed back characters.
  8250. ** unread-char can now be called multiple times
  8251. If unread-char is called multiple times, the unread characters will be
  8252. read again in last-in first-out order.
  8253. ** the procedures uniform-array-read! and uniform-array-write! now
  8254. work on any kind of port, not just ports which are open on a file.
  8255. ** Now 'l' in a port mode requests line buffering.
  8256. ** The procedure truncate-file now works on string ports as well
  8257. as file ports. If the size argument is omitted, the current
  8258. file position is used.
  8259. ** new procedure: seek PORT/FDES OFFSET WHENCE
  8260. The arguments are the same as for the old fseek procedure, but it
  8261. works on string ports as well as random-access file ports.
  8262. ** the fseek procedure now works on string ports, since it has been
  8263. redefined using seek.
  8264. ** the setvbuf procedure now uses a default size if mode is _IOFBF and
  8265. size is not supplied.
  8266. ** the newline procedure no longer flushes the port if it's not
  8267. line-buffered: previously it did if it was the current output port.
  8268. ** open-pipe and close-pipe are no longer primitive procedures, but
  8269. an emulation can be obtained using `(use-modules (ice-9 popen))'.
  8270. ** the freopen procedure has been removed.
  8271. ** new procedure: drain-input PORT
  8272. Drains PORT's read buffers (including any pushed-back characters)
  8273. and returns the contents as a single string.
  8274. ** New function: map-in-order PROC LIST1 LIST2 ...
  8275. Version of `map' which guarantees that the procedure is applied to the
  8276. lists in serial order.
  8277. ** Renamed `serial-array-copy!' and `serial-array-map!' to
  8278. `array-copy-in-order!' and `array-map-in-order!'. The old names are
  8279. now obsolete and will go away in release 1.5.
  8280. ** New syntax: collect BODY1 ...
  8281. Version of `begin' which returns a list of the results of the body
  8282. forms instead of the result of the last body form. In contrast to
  8283. `begin', `collect' allows an empty body.
  8284. ** New functions: read-history FILENAME, write-history FILENAME
  8285. Read/write command line history from/to file. Returns #t on success
  8286. and #f if an error occured.
  8287. ** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
  8288. These procedures return a list of definitions available in the specified
  8289. argument, a relative module reference. In the case of no argument,
  8290. `(current-module)' is now consulted for definitions to return, instead
  8291. of simply returning #f, the former behavior.
  8292. ** The #/ syntax for lists is no longer supported.
  8293. Earlier versions of Scheme accepted this syntax, but printed a
  8294. warning.
  8295. ** Guile no longer consults the SCHEME_LOAD_PATH environment variable.
  8296. Instead, you should set GUILE_LOAD_PATH to tell Guile where to find
  8297. modules.
  8298. * Changes to the gh_ interface
  8299. ** gh_scm2doubles
  8300. Now takes a second argument which is the result array. If this
  8301. pointer is NULL, a new array is malloced (the old behaviour).
  8302. ** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
  8303. gh_scm2shorts, gh_scm2longs, gh_scm2floats
  8304. New functions.
  8305. * Changes to the scm_ interface
  8306. ** Function: scm_make_named_hook (char* name, int n_args)
  8307. Creates a hook in the same way as make-hook above but also
  8308. binds a variable named NAME to it.
  8309. This is the typical way of creating a hook from C code.
  8310. Currently, the variable is created in the "current" module. This
  8311. might change when we get the new module system.
  8312. ** The smob interface
  8313. The interface for creating smobs has changed. For documentation, see
  8314. data-rep.info (made from guile-core/doc/data-rep.texi).
  8315. *** Deprecated function: SCM scm_newsmob (scm_smobfuns *)
  8316. >>> This function will be removed in 1.3.4. <<<
  8317. It is replaced by:
  8318. *** Function: SCM scm_make_smob_type (const char *name, scm_sizet size)
  8319. This function adds a new smob type, named NAME, with instance size
  8320. SIZE to the system. The return value is a tag that is used in
  8321. creating instances of the type. If SIZE is 0, then no memory will
  8322. be allocated when instances of the smob are created, and nothing
  8323. will be freed by the default free function.
  8324. *** Function: void scm_set_smob_mark (long tc, SCM (*mark) (SCM))
  8325. This function sets the smob marking procedure for the smob type
  8326. specified by the tag TC. TC is the tag returned by
  8327. `scm_make_smob_type'.
  8328. *** Function: void scm_set_smob_free (long tc, SCM (*mark) (SCM))
  8329. This function sets the smob freeing procedure for the smob type
  8330. specified by the tag TC. TC is the tag returned by
  8331. `scm_make_smob_type'.
  8332. *** Function: void scm_set_smob_print (tc, print)
  8333. - Function: void scm_set_smob_print (long tc,
  8334. scm_sizet (*print) (SCM,
  8335. SCM,
  8336. scm_print_state *))
  8337. This function sets the smob printing procedure for the smob type
  8338. specified by the tag TC. TC is the tag returned by
  8339. `scm_make_smob_type'.
  8340. *** Function: void scm_set_smob_equalp (long tc, SCM (*equalp) (SCM, SCM))
  8341. This function sets the smob equality-testing predicate for the
  8342. smob type specified by the tag TC. TC is the tag returned by
  8343. `scm_make_smob_type'.
  8344. *** Macro: void SCM_NEWSMOB (SCM var, long tc, void *data)
  8345. Make VALUE contain a smob instance of the type with type code TC and
  8346. smob data DATA. VALUE must be previously declared as C type `SCM'.
  8347. *** Macro: fn_returns SCM_RETURN_NEWSMOB (long tc, void *data)
  8348. This macro expands to a block of code that creates a smob instance
  8349. of the type with type code TC and smob data DATA, and returns that
  8350. `SCM' value. It should be the last piece of code in a block.
  8351. ** The interfaces for using I/O ports and implementing port types
  8352. (ptobs) have changed significantly. The new interface is based on
  8353. shared access to buffers and a new set of ptob procedures.
  8354. *** scm_newptob has been removed
  8355. It is replaced by:
  8356. *** Function: SCM scm_make_port_type (type_name, fill_buffer, write_flush)
  8357. - Function: SCM scm_make_port_type (char *type_name,
  8358. int (*fill_buffer) (SCM port),
  8359. void (*write_flush) (SCM port));
  8360. Similarly to the new smob interface, there is a set of function
  8361. setters by which the user can customize the behaviour of his port
  8362. type. See ports.h (scm_set_port_XXX).
  8363. ** scm_strport_to_string: New function: creates a new string from
  8364. a string port's buffer.
  8365. ** Plug in interface for random number generators
  8366. The variable `scm_the_rng' in random.c contains a value and three
  8367. function pointers which together define the current random number
  8368. generator being used by the Scheme level interface and the random
  8369. number library functions.
  8370. The user is free to replace the default generator with the generator
  8371. of his own choice.
  8372. *** Variable: size_t scm_the_rng.rstate_size
  8373. The size of the random state type used by the current RNG
  8374. measured in chars.
  8375. *** Function: unsigned long scm_the_rng.random_bits (scm_rstate *STATE)
  8376. Given the random STATE, return 32 random bits.
  8377. *** Function: void scm_the_rng.init_rstate (scm_rstate *STATE, chars *S, int N)
  8378. Seed random state STATE using string S of length N.
  8379. *** Function: scm_rstate *scm_the_rng.copy_rstate (scm_rstate *STATE)
  8380. Given random state STATE, return a malloced copy.
  8381. ** Default RNG
  8382. The default RNG is the MWC (Multiply With Carry) random number
  8383. generator described by George Marsaglia at the Department of
  8384. Statistics and Supercomputer Computations Research Institute, The
  8385. Florida State University (http://stat.fsu.edu/~geo).
  8386. It uses 64 bits, has a period of 4578426017172946943 (4.6e18), and
  8387. passes all tests in the DIEHARD test suite
  8388. (http://stat.fsu.edu/~geo/diehard.html). The generation of 32 bits
  8389. costs one multiply and one add on platforms which either supports long
  8390. longs (gcc does this on most systems) or have 64 bit longs. The cost
  8391. is four multiply on other systems but this can be optimized by writing
  8392. scm_i_uniform32 in assembler.
  8393. These functions are provided through the scm_the_rng interface for use
  8394. by libguile and the application.
  8395. *** Function: unsigned long scm_i_uniform32 (scm_i_rstate *STATE)
  8396. Given the random STATE, return 32 random bits.
  8397. Don't use this function directly. Instead go through the plugin
  8398. interface (see "Plug in interface" above).
  8399. *** Function: void scm_i_init_rstate (scm_i_rstate *STATE, char *SEED, int N)
  8400. Initialize STATE using SEED of length N.
  8401. *** Function: scm_i_rstate *scm_i_copy_rstate (scm_i_rstate *STATE)
  8402. Return a malloc:ed copy of STATE. This function can easily be re-used
  8403. in the interfaces to other RNGs.
  8404. ** Random number library functions
  8405. These functions use the current RNG through the scm_the_rng interface.
  8406. It might be a good idea to use these functions from your C code so
  8407. that only one random generator is used by all code in your program.
  8408. The default random state is stored in:
  8409. *** Variable: SCM scm_var_random_state
  8410. Contains the vcell of the Scheme variable "*random-state*" which is
  8411. used as default state by all random number functions in the Scheme
  8412. level interface.
  8413. Example:
  8414. double x = scm_c_uniform01 (SCM_RSTATE (SCM_CDR (scm_var_random_state)));
  8415. *** Function: scm_rstate *scm_c_default_rstate (void)
  8416. This is a convenience function which returns the value of
  8417. scm_var_random_state. An error message is generated if this value
  8418. isn't a random state.
  8419. *** Function: scm_rstate *scm_c_make_rstate (char *SEED, int LENGTH)
  8420. Make a new random state from the string SEED of length LENGTH.
  8421. It is generally not a good idea to use multiple random states in a
  8422. program. While subsequent random numbers generated from one random
  8423. state are guaranteed to be reasonably independent, there is no such
  8424. guarantee for numbers generated from different random states.
  8425. *** Macro: unsigned long scm_c_uniform32 (scm_rstate *STATE)
  8426. Return 32 random bits.
  8427. *** Function: double scm_c_uniform01 (scm_rstate *STATE)
  8428. Return a sample from the uniform(0,1) distribution.
  8429. *** Function: double scm_c_normal01 (scm_rstate *STATE)
  8430. Return a sample from the normal(0,1) distribution.
  8431. *** Function: double scm_c_exp1 (scm_rstate *STATE)
  8432. Return a sample from the exp(1) distribution.
  8433. *** Function: unsigned long scm_c_random (scm_rstate *STATE, unsigned long M)
  8434. Return a sample from the discrete uniform(0,M) distribution.
  8435. *** Function: SCM scm_c_random_bignum (scm_rstate *STATE, SCM M)
  8436. Return a sample from the discrete uniform(0,M) distribution.
  8437. M must be a bignum object. The returned value may be an INUM.
  8438. Changes in Guile 1.3 (released Monday, October 19, 1998):
  8439. * Changes to the distribution
  8440. ** We renamed the SCHEME_LOAD_PATH environment variable to GUILE_LOAD_PATH.
  8441. To avoid conflicts, programs should name environment variables after
  8442. themselves, except when there's a common practice establishing some
  8443. other convention.
  8444. For now, Guile supports both GUILE_LOAD_PATH and SCHEME_LOAD_PATH,
  8445. giving the former precedence, and printing a warning message if the
  8446. latter is set. Guile 1.4 will not recognize SCHEME_LOAD_PATH at all.
  8447. ** The header files related to multi-byte characters have been removed.
  8448. They were: libguile/extchrs.h and libguile/mbstrings.h. Any C code
  8449. which referred to these explicitly will probably need to be rewritten,
  8450. since the support for the variant string types has been removed; see
  8451. below.
  8452. ** The header files append.h and sequences.h have been removed. These
  8453. files implemented non-R4RS operations which would encourage
  8454. non-portable programming style and less easy-to-read code.
  8455. * Changes to the stand-alone interpreter
  8456. ** New procedures have been added to implement a "batch mode":
  8457. *** Function: batch-mode?
  8458. Returns a boolean indicating whether the interpreter is in batch
  8459. mode.
  8460. *** Function: set-batch-mode?! ARG
  8461. If ARG is true, switches the interpreter to batch mode. The `#f'
  8462. case has not been implemented.
  8463. ** Guile now provides full command-line editing, when run interactively.
  8464. To use this feature, you must have the readline library installed.
  8465. The Guile build process will notice it, and automatically include
  8466. support for it.
  8467. The readline library is available via anonymous FTP from any GNU
  8468. mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
  8469. ** the-last-stack is now a fluid.
  8470. * Changes to the procedure for linking libguile with your programs
  8471. ** You can now use the `guile-config' utility to build programs that use Guile.
  8472. Guile now includes a command-line utility called `guile-config', which
  8473. can provide information about how to compile and link programs that
  8474. use Guile.
  8475. *** `guile-config compile' prints any C compiler flags needed to use Guile.
  8476. You should include this command's output on the command line you use
  8477. to compile C or C++ code that #includes the Guile header files. It's
  8478. usually just a `-I' flag to help the compiler find the Guile headers.
  8479. *** `guile-config link' prints any linker flags necessary to link with Guile.
  8480. This command writes to its standard output a list of flags which you
  8481. must pass to the linker to link your code against the Guile library.
  8482. The flags include '-lguile' itself, any other libraries the Guile
  8483. library depends upon, and any `-L' flags needed to help the linker
  8484. find those libraries.
  8485. For example, here is a Makefile rule that builds a program named 'foo'
  8486. from the object files ${FOO_OBJECTS}, and links them against Guile:
  8487. foo: ${FOO_OBJECTS}
  8488. ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
  8489. Previous Guile releases recommended that you use autoconf to detect
  8490. which of a predefined set of libraries were present on your system.
  8491. It is more robust to use `guile-config', since it records exactly which
  8492. libraries the installed Guile library requires.
  8493. This was originally called `build-guile', but was renamed to
  8494. `guile-config' before Guile 1.3 was released, to be consistent with
  8495. the analogous script for the GTK+ GUI toolkit, which is called
  8496. `gtk-config'.
  8497. ** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
  8498. If you are using the GNU autoconf package to configure your program,
  8499. you can use the GUILE_FLAGS autoconf macro to call `guile-config'
  8500. (described above) and gather the necessary values for use in your
  8501. Makefiles.
  8502. The GUILE_FLAGS macro expands to configure script code which runs the
  8503. `guile-config' script, to find out where Guile's header files and
  8504. libraries are installed. It sets two variables, marked for
  8505. substitution, as by AC_SUBST.
  8506. GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
  8507. code that uses Guile header files. This is almost always just a
  8508. -I flag.
  8509. GUILE_LDFLAGS --- flags to pass to the linker to link a
  8510. program against Guile. This includes `-lguile' for the Guile
  8511. library itself, any libraries that Guile itself requires (like
  8512. -lqthreads), and so on. It may also include a -L flag to tell the
  8513. compiler where to find the libraries.
  8514. GUILE_FLAGS is defined in the file guile.m4, in the top-level
  8515. directory of the Guile distribution. You can copy it into your
  8516. package's aclocal.m4 file, and then use it in your configure.in file.
  8517. If you are using the `aclocal' program, distributed with GNU automake,
  8518. to maintain your aclocal.m4 file, the Guile installation process
  8519. installs guile.m4 where aclocal will find it. All you need to do is
  8520. use GUILE_FLAGS in your configure.in file, and then run `aclocal';
  8521. this will copy the definition of GUILE_FLAGS into your aclocal.m4
  8522. file.
  8523. * Changes to Scheme functions and syntax
  8524. ** Multi-byte strings have been removed, as have multi-byte and wide
  8525. ports. We felt that these were the wrong approach to
  8526. internationalization support.
  8527. ** New function: readline [PROMPT]
  8528. Read a line from the terminal, and allow the user to edit it,
  8529. prompting with PROMPT. READLINE provides a large set of Emacs-like
  8530. editing commands, lets the user recall previously typed lines, and
  8531. works on almost every kind of terminal, including dumb terminals.
  8532. READLINE assumes that the cursor is at the beginning of the line when
  8533. it is invoked. Thus, you can't print a prompt yourself, and then call
  8534. READLINE; you need to package up your prompt as a string, pass it to
  8535. the function, and let READLINE print the prompt itself. This is
  8536. because READLINE needs to know the prompt's screen width.
  8537. For Guile to provide this function, you must have the readline
  8538. library, version 2.1 or later, installed on your system. Readline is
  8539. available via anonymous FTP from prep.ai.mit.edu in pub/gnu, or from
  8540. any GNU mirror site.
  8541. See also ADD-HISTORY function.
  8542. ** New function: add-history STRING
  8543. Add STRING as the most recent line in the history used by the READLINE
  8544. command. READLINE does not add lines to the history itself; you must
  8545. call ADD-HISTORY to make previous input available to the user.
  8546. ** The behavior of the read-line function has changed.
  8547. This function now uses standard C library functions to read the line,
  8548. for speed. This means that it doesn not respect the value of
  8549. scm-line-incrementors; it assumes that lines are delimited with
  8550. #\newline.
  8551. (Note that this is read-line, the function that reads a line of text
  8552. from a port, not readline, the function that reads a line from a
  8553. terminal, providing full editing capabilities.)
  8554. ** New module (ice-9 getopt-gnu-style): Parse command-line arguments.
  8555. This module provides some simple argument parsing. It exports one
  8556. function:
  8557. Function: getopt-gnu-style ARG-LS
  8558. Parse a list of program arguments into an alist of option
  8559. descriptions.
  8560. Each item in the list of program arguments is examined to see if
  8561. it meets the syntax of a GNU long-named option. An argument like
  8562. `--MUMBLE' produces an element of the form (MUMBLE . #t) in the
  8563. returned alist, where MUMBLE is a keyword object with the same
  8564. name as the argument. An argument like `--MUMBLE=FROB' produces
  8565. an element of the form (MUMBLE . FROB), where FROB is a string.
  8566. As a special case, the returned alist also contains a pair whose
  8567. car is the symbol `rest'. The cdr of this pair is a list
  8568. containing all the items in the argument list that are not options
  8569. of the form mentioned above.
  8570. The argument `--' is treated specially: all items in the argument
  8571. list appearing after such an argument are not examined, and are
  8572. returned in the special `rest' list.
  8573. This function does not parse normal single-character switches.
  8574. You will need to parse them out of the `rest' list yourself.
  8575. ** The read syntax for byte vectors and short vectors has changed.
  8576. Instead of #bytes(...), write #y(...).
  8577. Instead of #short(...), write #h(...).
  8578. This may seem nutty, but, like the other uniform vectors, byte vectors
  8579. and short vectors want to have the same print and read syntax (and,
  8580. more basic, want to have read syntax!). Changing the read syntax to
  8581. use multiple characters after the hash sign breaks with the
  8582. conventions used in R5RS and the conventions used for the other
  8583. uniform vectors. It also introduces complexity in the current reader,
  8584. both on the C and Scheme levels. (The Right solution is probably to
  8585. change the syntax and prototypes for uniform vectors entirely.)
  8586. ** The new module (ice-9 session) provides useful interactive functions.
  8587. *** New procedure: (apropos REGEXP OPTION ...)
  8588. Display a list of top-level variables whose names match REGEXP, and
  8589. the modules they are imported from. Each OPTION should be one of the
  8590. following symbols:
  8591. value --- Show the value of each matching variable.
  8592. shadow --- Show bindings shadowed by subsequently imported modules.
  8593. full --- Same as both `shadow' and `value'.
  8594. For example:
  8595. guile> (apropos "trace" 'full)
  8596. debug: trace #<procedure trace args>
  8597. debug: untrace #<procedure untrace args>
  8598. the-scm-module: display-backtrace #<compiled-closure #<primitive-procedure gsubr-apply>>
  8599. the-scm-module: before-backtrace-hook ()
  8600. the-scm-module: backtrace #<primitive-procedure backtrace>
  8601. the-scm-module: after-backtrace-hook ()
  8602. the-scm-module: has-shown-backtrace-hint? #f
  8603. guile>
  8604. ** There are new functions and syntax for working with macros.
  8605. Guile implements macros as a special object type. Any variable whose
  8606. top-level binding is a macro object acts as a macro. The macro object
  8607. specifies how the expression should be transformed before evaluation.
  8608. *** Macro objects now print in a reasonable way, resembling procedures.
  8609. *** New function: (macro? OBJ)
  8610. True iff OBJ is a macro object.
  8611. *** New function: (primitive-macro? OBJ)
  8612. Like (macro? OBJ), but true only if OBJ is one of the Guile primitive
  8613. macro transformers, implemented in eval.c rather than Scheme code.
  8614. Why do we have this function?
  8615. - For symmetry with procedure? and primitive-procedure?,
  8616. - to allow custom print procedures to tell whether a macro is
  8617. primitive, and display it differently, and
  8618. - to allow compilers and user-written evaluators to distinguish
  8619. builtin special forms from user-defined ones, which could be
  8620. compiled.
  8621. *** New function: (macro-type OBJ)
  8622. Return a value indicating what kind of macro OBJ is. Possible return
  8623. values are:
  8624. The symbol `syntax' --- a macro created by procedure->syntax.
  8625. The symbol `macro' --- a macro created by procedure->macro.
  8626. The symbol `macro!' --- a macro created by procedure->memoizing-macro.
  8627. The boolean #f --- if OBJ is not a macro object.
  8628. *** New function: (macro-name MACRO)
  8629. Return the name of the macro object MACRO's procedure, as returned by
  8630. procedure-name.
  8631. *** New function: (macro-transformer MACRO)
  8632. Return the transformer procedure for MACRO.
  8633. *** New syntax: (use-syntax MODULE ... TRANSFORMER)
  8634. Specify a new macro expander to use in the current module. Each
  8635. MODULE is a module name, with the same meaning as in the `use-modules'
  8636. form; each named module's exported bindings are added to the current
  8637. top-level environment. TRANSFORMER is an expression evaluated in the
  8638. resulting environment which must yield a procedure to use as the
  8639. module's eval transformer: every expression evaluated in this module
  8640. is passed to this function, and the result passed to the Guile
  8641. interpreter.
  8642. *** macro-eval! is removed. Use local-eval instead.
  8643. ** Some magic has been added to the printer to better handle user
  8644. written printing routines (like record printers, closure printers).
  8645. The problem is that these user written routines must have access to
  8646. the current `print-state' to be able to handle fancy things like
  8647. detection of circular references. These print-states have to be
  8648. passed to the builtin printing routines (display, write, etc) to
  8649. properly continue the print chain.
  8650. We didn't want to change all existing print code so that it
  8651. explicitly passes thru a print state in addition to a port. Instead,
  8652. we extented the possible values that the builtin printing routines
  8653. accept as a `port'. In addition to a normal port, they now also take
  8654. a pair of a normal port and a print-state. Printing will go to the
  8655. port and the print-state will be used to control the detection of
  8656. circular references, etc. If the builtin function does not care for a
  8657. print-state, it is simply ignored.
  8658. User written callbacks are now called with such a pair as their
  8659. `port', but because every function now accepts this pair as a PORT
  8660. argument, you don't have to worry about that. In fact, it is probably
  8661. safest to not check for these pairs.
  8662. However, it is sometimes necessary to continue a print chain on a
  8663. different port, for example to get a intermediate string
  8664. representation of the printed value, mangle that string somehow, and
  8665. then to finally print the mangled string. Use the new function
  8666. inherit-print-state OLD-PORT NEW-PORT
  8667. for this. It constructs a new `port' that prints to NEW-PORT but
  8668. inherits the print-state of OLD-PORT.
  8669. ** struct-vtable-offset renamed to vtable-offset-user
  8670. ** New constants: vtable-index-layout, vtable-index-vtable, vtable-index-printer
  8671. ** There is now a third optional argument to make-vtable-vtable
  8672. (and fourth to make-struct) when constructing new types (vtables).
  8673. This argument initializes field vtable-index-printer of the vtable.
  8674. ** The detection of circular references has been extended to structs.
  8675. That is, a structure that -- in the process of being printed -- prints
  8676. itself does not lead to infinite recursion.
  8677. ** There is now some basic support for fluids. Please read
  8678. "libguile/fluid.h" to find out more. It is accessible from Scheme with
  8679. the following functions and macros:
  8680. Function: make-fluid
  8681. Create a new fluid object. Fluids are not special variables or
  8682. some other extension to the semantics of Scheme, but rather
  8683. ordinary Scheme objects. You can store them into variables (that
  8684. are still lexically scoped, of course) or into any other place you
  8685. like. Every fluid has a initial value of `#f'.
  8686. Function: fluid? OBJ
  8687. Test whether OBJ is a fluid.
  8688. Function: fluid-ref FLUID
  8689. Function: fluid-set! FLUID VAL
  8690. Access/modify the fluid FLUID. Modifications are only visible
  8691. within the current dynamic root (that includes threads).
  8692. Function: with-fluids* FLUIDS VALUES THUNK
  8693. FLUIDS is a list of fluids and VALUES a corresponding list of
  8694. values for these fluids. Before THUNK gets called the values are
  8695. installed in the fluids and the old values of the fluids are
  8696. saved in the VALUES list. When the flow of control leaves THUNK
  8697. or reenters it, the values get swapped again. You might think of
  8698. this as a `safe-fluid-excursion'. Note that the VALUES list is
  8699. modified by `with-fluids*'.
  8700. Macro: with-fluids ((FLUID VALUE) ...) FORM ...
  8701. The same as `with-fluids*' but with a different syntax. It looks
  8702. just like `let', but both FLUID and VALUE are evaluated. Remember,
  8703. fluids are not special variables but ordinary objects. FLUID
  8704. should evaluate to a fluid.
  8705. ** Changes to system call interfaces:
  8706. *** close-port, close-input-port and close-output-port now return a
  8707. boolean instead of an `unspecified' object. #t means that the port
  8708. was successfully closed, while #f means it was already closed. It is
  8709. also now possible for these procedures to raise an exception if an
  8710. error occurs (some errors from write can be delayed until close.)
  8711. *** the first argument to chmod, fcntl, ftell and fseek can now be a
  8712. file descriptor.
  8713. *** the third argument to fcntl is now optional.
  8714. *** the first argument to chown can now be a file descriptor or a port.
  8715. *** the argument to stat can now be a port.
  8716. *** The following new procedures have been added (most use scsh
  8717. interfaces):
  8718. *** procedure: close PORT/FD
  8719. Similar to close-port (*note close-port: Closing Ports.), but also
  8720. works on file descriptors. A side effect of closing a file
  8721. descriptor is that any ports using that file descriptor are moved
  8722. to a different file descriptor and have their revealed counts set
  8723. to zero.
  8724. *** procedure: port->fdes PORT
  8725. Returns the integer file descriptor underlying PORT. As a side
  8726. effect the revealed count of PORT is incremented.
  8727. *** procedure: fdes->ports FDES
  8728. Returns a list of existing ports which have FDES as an underlying
  8729. file descriptor, without changing their revealed counts.
  8730. *** procedure: fdes->inport FDES
  8731. Returns an existing input port which has FDES as its underlying
  8732. file descriptor, if one exists, and increments its revealed count.
  8733. Otherwise, returns a new input port with a revealed count of 1.
  8734. *** procedure: fdes->outport FDES
  8735. Returns an existing output port which has FDES as its underlying
  8736. file descriptor, if one exists, and increments its revealed count.
  8737. Otherwise, returns a new output port with a revealed count of 1.
  8738. The next group of procedures perform a `dup2' system call, if NEWFD
  8739. (an integer) is supplied, otherwise a `dup'. The file descriptor to be
  8740. duplicated can be supplied as an integer or contained in a port. The
  8741. type of value returned varies depending on which procedure is used.
  8742. All procedures also have the side effect when performing `dup2' that
  8743. any ports using NEWFD are moved to a different file descriptor and have
  8744. their revealed counts set to zero.
  8745. *** procedure: dup->fdes PORT/FD [NEWFD]
  8746. Returns an integer file descriptor.
  8747. *** procedure: dup->inport PORT/FD [NEWFD]
  8748. Returns a new input port using the new file descriptor.
  8749. *** procedure: dup->outport PORT/FD [NEWFD]
  8750. Returns a new output port using the new file descriptor.
  8751. *** procedure: dup PORT/FD [NEWFD]
  8752. Returns a new port if PORT/FD is a port, with the same mode as the
  8753. supplied port, otherwise returns an integer file descriptor.
  8754. *** procedure: dup->port PORT/FD MODE [NEWFD]
  8755. Returns a new port using the new file descriptor. MODE supplies a
  8756. mode string for the port (*note open-file: File Ports.).
  8757. *** procedure: setenv NAME VALUE
  8758. Modifies the environment of the current process, which is also the
  8759. default environment inherited by child processes.
  8760. If VALUE is `#f', then NAME is removed from the environment.
  8761. Otherwise, the string NAME=VALUE is added to the environment,
  8762. replacing any existing string with name matching NAME.
  8763. The return value is unspecified.
  8764. *** procedure: truncate-file OBJ SIZE
  8765. Truncates the file referred to by OBJ to at most SIZE bytes. OBJ
  8766. can be a string containing a file name or an integer file
  8767. descriptor or port open for output on the file. The underlying
  8768. system calls are `truncate' and `ftruncate'.
  8769. The return value is unspecified.
  8770. *** procedure: setvbuf PORT MODE [SIZE]
  8771. Set the buffering mode for PORT. MODE can be:
  8772. `_IONBF'
  8773. non-buffered
  8774. `_IOLBF'
  8775. line buffered
  8776. `_IOFBF'
  8777. block buffered, using a newly allocated buffer of SIZE bytes.
  8778. However if SIZE is zero or unspecified, the port will be made
  8779. non-buffered.
  8780. This procedure should not be used after I/O has been performed with
  8781. the port.
  8782. Ports are usually block buffered by default, with a default buffer
  8783. size. Procedures e.g., *Note open-file: File Ports, which accept a
  8784. mode string allow `0' to be added to request an unbuffered port.
  8785. *** procedure: fsync PORT/FD
  8786. Copies any unwritten data for the specified output file descriptor
  8787. to disk. If PORT/FD is a port, its buffer is flushed before the
  8788. underlying file descriptor is fsync'd. The return value is
  8789. unspecified.
  8790. *** procedure: open-fdes PATH FLAGS [MODES]
  8791. Similar to `open' but returns a file descriptor instead of a port.
  8792. *** procedure: execle PATH ENV [ARG] ...
  8793. Similar to `execl', but the environment of the new process is
  8794. specified by ENV, which must be a list of strings as returned by
  8795. the `environ' procedure.
  8796. This procedure is currently implemented using the `execve' system
  8797. call, but we call it `execle' because of its Scheme calling
  8798. interface.
  8799. *** procedure: strerror ERRNO
  8800. Returns the Unix error message corresponding to ERRNO, an integer.
  8801. *** procedure: primitive-exit [STATUS]
  8802. Terminate the current process without unwinding the Scheme stack.
  8803. This is would typically be useful after a fork. The exit status
  8804. is STATUS if supplied, otherwise zero.
  8805. *** procedure: times
  8806. Returns an object with information about real and processor time.
  8807. The following procedures accept such an object as an argument and
  8808. return a selected component:
  8809. `tms:clock'
  8810. The current real time, expressed as time units relative to an
  8811. arbitrary base.
  8812. `tms:utime'
  8813. The CPU time units used by the calling process.
  8814. `tms:stime'
  8815. The CPU time units used by the system on behalf of the
  8816. calling process.
  8817. `tms:cutime'
  8818. The CPU time units used by terminated child processes of the
  8819. calling process, whose status has been collected (e.g., using
  8820. `waitpid').
  8821. `tms:cstime'
  8822. Similarly, the CPU times units used by the system on behalf of
  8823. terminated child processes.
  8824. ** Removed: list-length
  8825. ** Removed: list-append, list-append!
  8826. ** Removed: list-reverse, list-reverse!
  8827. ** array-map renamed to array-map!
  8828. ** serial-array-map renamed to serial-array-map!
  8829. ** catch doesn't take #f as first argument any longer
  8830. Previously, it was possible to pass #f instead of a key to `catch'.
  8831. That would cause `catch' to pass a jump buffer object to the procedure
  8832. passed as second argument. The procedure could then use this jump
  8833. buffer objekt as an argument to throw.
  8834. This mechanism has been removed since its utility doesn't motivate the
  8835. extra complexity it introduces.
  8836. ** The `#/' notation for lists now provokes a warning message from Guile.
  8837. This syntax will be removed from Guile in the near future.
  8838. To disable the warning message, set the GUILE_HUSH environment
  8839. variable to any non-empty value.
  8840. ** The newline character now prints as `#\newline', following the
  8841. normal Scheme notation, not `#\nl'.
  8842. * Changes to the gh_ interface
  8843. ** The gh_enter function now takes care of loading the Guile startup files.
  8844. gh_enter works by calling scm_boot_guile; see the remarks below.
  8845. ** Function: void gh_write (SCM x)
  8846. Write the printed representation of the scheme object x to the current
  8847. output port. Corresponds to the scheme level `write'.
  8848. ** gh_list_length renamed to gh_length.
  8849. ** vector handling routines
  8850. Several major changes. In particular, gh_vector() now resembles
  8851. (vector ...) (with a caveat -- see manual), and gh_make_vector() now
  8852. exists and behaves like (make-vector ...). gh_vset() and gh_vref()
  8853. have been renamed gh_vector_set_x() and gh_vector_ref(). Some missing
  8854. vector-related gh_ functions have been implemented.
  8855. ** pair and list routines
  8856. Implemented several of the R4RS pair and list functions that were
  8857. missing.
  8858. ** gh_scm2doubles, gh_doubles2scm, gh_doubles2dvect
  8859. New function. Converts double arrays back and forth between Scheme
  8860. and C.
  8861. * Changes to the scm_ interface
  8862. ** The function scm_boot_guile now takes care of loading the startup files.
  8863. Guile's primary initialization function, scm_boot_guile, now takes
  8864. care of loading `boot-9.scm', in the `ice-9' module, to initialize
  8865. Guile, define the module system, and put together some standard
  8866. bindings. It also loads `init.scm', which is intended to hold
  8867. site-specific initialization code.
  8868. Since Guile cannot operate properly until boot-9.scm is loaded, there
  8869. is no reason to separate loading boot-9.scm from Guile's other
  8870. initialization processes.
  8871. This job used to be done by scm_compile_shell_switches, which didn't
  8872. make much sense; in particular, it meant that people using Guile for
  8873. non-shell-like applications had to jump through hoops to get Guile
  8874. initialized properly.
  8875. ** The function scm_compile_shell_switches no longer loads the startup files.
  8876. Now, Guile always loads the startup files, whenever it is initialized;
  8877. see the notes above for scm_boot_guile and scm_load_startup_files.
  8878. ** Function: scm_load_startup_files
  8879. This new function takes care of loading Guile's initialization file
  8880. (`boot-9.scm'), and the site initialization file, `init.scm'. Since
  8881. this is always called by the Guile initialization process, it's
  8882. probably not too useful to call this yourself, but it's there anyway.
  8883. ** The semantics of smob marking have changed slightly.
  8884. The smob marking function (the `mark' member of the scm_smobfuns
  8885. structure) is no longer responsible for setting the mark bit on the
  8886. smob. The generic smob handling code in the garbage collector will
  8887. set this bit. The mark function need only ensure that any other
  8888. objects the smob refers to get marked.
  8889. Note that this change means that the smob's GC8MARK bit is typically
  8890. already set upon entry to the mark function. Thus, marking functions
  8891. which look like this:
  8892. {
  8893. if (SCM_GC8MARKP (ptr))
  8894. return SCM_BOOL_F;
  8895. SCM_SETGC8MARK (ptr);
  8896. ... mark objects to which the smob refers ...
  8897. }
  8898. are now incorrect, since they will return early, and fail to mark any
  8899. other objects the smob refers to. Some code in the Guile library used
  8900. to work this way.
  8901. ** The semantics of the I/O port functions in scm_ptobfuns have changed.
  8902. If you have implemented your own I/O port type, by writing the
  8903. functions required by the scm_ptobfuns and then calling scm_newptob,
  8904. you will need to change your functions slightly.
  8905. The functions in a scm_ptobfuns structure now expect the port itself
  8906. as their argument; they used to expect the `stream' member of the
  8907. port's scm_port_table structure. This allows functions in an
  8908. scm_ptobfuns structure to easily access the port's cell (and any flags
  8909. it its CAR), and the port's scm_port_table structure.
  8910. Guile now passes the I/O port itself as the `port' argument in the
  8911. following scm_ptobfuns functions:
  8912. int (*free) (SCM port);
  8913. int (*fputc) (int, SCM port);
  8914. int (*fputs) (char *, SCM port);
  8915. scm_sizet (*fwrite) SCM_P ((char *ptr,
  8916. scm_sizet size,
  8917. scm_sizet nitems,
  8918. SCM port));
  8919. int (*fflush) (SCM port);
  8920. int (*fgetc) (SCM port);
  8921. int (*fclose) (SCM port);
  8922. The interfaces to the `mark', `print', `equalp', and `fgets' methods
  8923. are unchanged.
  8924. If you have existing code which defines its own port types, it is easy
  8925. to convert your code to the new interface; simply apply SCM_STREAM to
  8926. the port argument to yield the value you code used to expect.
  8927. Note that since both the port and the stream have the same type in the
  8928. C code --- they are both SCM values --- the C compiler will not remind
  8929. you if you forget to update your scm_ptobfuns functions.
  8930. ** Function: int scm_internal_select (int fds,
  8931. SELECT_TYPE *rfds,
  8932. SELECT_TYPE *wfds,
  8933. SELECT_TYPE *efds,
  8934. struct timeval *timeout);
  8935. This is a replacement for the `select' function provided by the OS.
  8936. It enables I/O blocking and sleeping to happen for one cooperative
  8937. thread without blocking other threads. It also avoids busy-loops in
  8938. these situations. It is intended that all I/O blocking and sleeping
  8939. will finally go through this function. Currently, this function is
  8940. only available on systems providing `gettimeofday' and `select'.
  8941. ** Function: SCM scm_internal_stack_catch (SCM tag,
  8942. scm_catch_body_t body,
  8943. void *body_data,
  8944. scm_catch_handler_t handler,
  8945. void *handler_data)
  8946. A new sibling to the other two C level `catch' functions
  8947. scm_internal_catch and scm_internal_lazy_catch. Use it if you want
  8948. the stack to be saved automatically into the variable `the-last-stack'
  8949. (scm_the_last_stack_var) on error. This is necessary if you want to
  8950. use advanced error reporting, such as calling scm_display_error and
  8951. scm_display_backtrace. (They both take a stack object as argument.)
  8952. ** Function: SCM scm_spawn_thread (scm_catch_body_t body,
  8953. void *body_data,
  8954. scm_catch_handler_t handler,
  8955. void *handler_data)
  8956. Spawns a new thread. It does a job similar to
  8957. scm_call_with_new_thread but takes arguments more suitable when
  8958. spawning threads from application C code.
  8959. ** The hook scm_error_callback has been removed. It was originally
  8960. intended as a way for the user to install his own error handler. But
  8961. that method works badly since it intervenes between throw and catch,
  8962. thereby changing the semantics of expressions like (catch #t ...).
  8963. The correct way to do it is to use one of the C level catch functions
  8964. in throw.c: scm_internal_catch/lazy_catch/stack_catch.
  8965. ** Removed functions:
  8966. scm_obj_length, scm_list_length, scm_list_append, scm_list_append_x,
  8967. scm_list_reverse, scm_list_reverse_x
  8968. ** New macros: SCM_LISTn where n is one of the integers 0-9.
  8969. These can be used for pretty list creation from C. The idea is taken
  8970. from Erick Gallesio's STk.
  8971. ** scm_array_map renamed to scm_array_map_x
  8972. ** mbstrings are now removed
  8973. This means that the type codes scm_tc7_mb_string and
  8974. scm_tc7_mb_substring has been removed.
  8975. ** scm_gen_putc, scm_gen_puts, scm_gen_write, and scm_gen_getc have changed.
  8976. Since we no longer support multi-byte strings, these I/O functions
  8977. have been simplified, and renamed. Here are their old names, and
  8978. their new names and arguments:
  8979. scm_gen_putc -> void scm_putc (int c, SCM port);
  8980. scm_gen_puts -> void scm_puts (char *s, SCM port);
  8981. scm_gen_write -> void scm_lfwrite (char *ptr, scm_sizet size, SCM port);
  8982. scm_gen_getc -> void scm_getc (SCM port);
  8983. ** The macros SCM_TYP7D and SCM_TYP7SD has been removed.
  8984. ** The macro SCM_TYP7S has taken the role of the old SCM_TYP7D
  8985. SCM_TYP7S now masks away the bit which distinguishes substrings from
  8986. strings.
  8987. ** scm_catch_body_t: Backward incompatible change!
  8988. Body functions to scm_internal_catch and friends do not any longer
  8989. take a second argument. This is because it is no longer possible to
  8990. pass a #f arg to catch.
  8991. ** Calls to scm_protect_object and scm_unprotect now nest properly.
  8992. The function scm_protect_object protects its argument from being freed
  8993. by the garbage collector. scm_unprotect_object removes that
  8994. protection.
  8995. These functions now nest properly. That is, for every object O, there
  8996. is a counter which scm_protect_object(O) increments and
  8997. scm_unprotect_object(O) decrements, if the counter is greater than
  8998. zero. Every object's counter is zero when it is first created. If an
  8999. object's counter is greater than zero, the garbage collector will not
  9000. reclaim its storage.
  9001. This allows you to use scm_protect_object in your code without
  9002. worrying that some other function you call will call
  9003. scm_unprotect_object, and allow it to be freed. Assuming that the
  9004. functions you call are well-behaved, and unprotect only those objects
  9005. they protect, you can follow the same rule and have confidence that
  9006. objects will be freed only at appropriate times.
  9007. Changes in Guile 1.2 (released Tuesday, June 24 1997):
  9008. * Changes to the distribution
  9009. ** Nightly snapshots are now available from ftp.red-bean.com.
  9010. The old server, ftp.cyclic.com, has been relinquished to its rightful
  9011. owner.
  9012. Nightly snapshots of the Guile development sources are now available via
  9013. anonymous FTP from ftp.red-bean.com, as /pub/guile/guile-snap.tar.gz.
  9014. Via the web, that's: ftp://ftp.red-bean.com/pub/guile/guile-snap.tar.gz
  9015. For getit, that's: ftp.red-bean.com:/pub/guile/guile-snap.tar.gz
  9016. ** To run Guile without installing it, the procedure has changed a bit.
  9017. If you used a separate build directory to compile Guile, you'll need
  9018. to include the build directory in SCHEME_LOAD_PATH, as well as the
  9019. source directory. See the `INSTALL' file for examples.
  9020. * Changes to the procedure for linking libguile with your programs
  9021. ** The standard Guile load path for Scheme code now includes
  9022. $(datadir)/guile (usually /usr/local/share/guile). This means that
  9023. you can install your own Scheme files there, and Guile will find them.
  9024. (Previous versions of Guile only checked a directory whose name
  9025. contained the Guile version number, so you had to re-install or move
  9026. your Scheme sources each time you installed a fresh version of Guile.)
  9027. The load path also includes $(datadir)/guile/site; we recommend
  9028. putting individual Scheme files there. If you want to install a
  9029. package with multiple source files, create a directory for them under
  9030. $(datadir)/guile.
  9031. ** Guile 1.2 will now use the Rx regular expression library, if it is
  9032. installed on your system. When you are linking libguile into your own
  9033. programs, this means you will have to link against -lguile, -lqt (if
  9034. you configured Guile with thread support), and -lrx.
  9035. If you are using autoconf to generate configuration scripts for your
  9036. application, the following lines should suffice to add the appropriate
  9037. libraries to your link command:
  9038. ### Find Rx, quickthreads and libguile.
  9039. AC_CHECK_LIB(rx, main)
  9040. AC_CHECK_LIB(qt, main)
  9041. AC_CHECK_LIB(guile, scm_shell)
  9042. The Guile 1.2 distribution does not contain sources for the Rx
  9043. library, as Guile 1.0 did. If you want to use Rx, you'll need to
  9044. retrieve it from a GNU FTP site and install it separately.
  9045. * Changes to Scheme functions and syntax
  9046. ** The dynamic linking features of Guile are now enabled by default.
  9047. You can disable them by giving the `--disable-dynamic-linking' option
  9048. to configure.
  9049. (dynamic-link FILENAME)
  9050. Find the object file denoted by FILENAME (a string) and link it
  9051. into the running Guile application. When everything works out,
  9052. return a Scheme object suitable for representing the linked object
  9053. file. Otherwise an error is thrown. How object files are
  9054. searched is system dependent.
  9055. (dynamic-object? VAL)
  9056. Determine whether VAL represents a dynamically linked object file.
  9057. (dynamic-unlink DYNOBJ)
  9058. Unlink the indicated object file from the application. DYNOBJ
  9059. should be one of the values returned by `dynamic-link'.
  9060. (dynamic-func FUNCTION DYNOBJ)
  9061. Search the C function indicated by FUNCTION (a string or symbol)
  9062. in DYNOBJ and return some Scheme object that can later be used
  9063. with `dynamic-call' to actually call this function. Right now,
  9064. these Scheme objects are formed by casting the address of the
  9065. function to `long' and converting this number to its Scheme
  9066. representation.
  9067. (dynamic-call FUNCTION DYNOBJ)
  9068. Call the C function indicated by FUNCTION and DYNOBJ. The
  9069. function is passed no arguments and its return value is ignored.
  9070. When FUNCTION is something returned by `dynamic-func', call that
  9071. function and ignore DYNOBJ. When FUNCTION is a string (or symbol,
  9072. etc.), look it up in DYNOBJ; this is equivalent to
  9073. (dynamic-call (dynamic-func FUNCTION DYNOBJ) #f)
  9074. Interrupts are deferred while the C function is executing (with
  9075. SCM_DEFER_INTS/SCM_ALLOW_INTS).
  9076. (dynamic-args-call FUNCTION DYNOBJ ARGS)
  9077. Call the C function indicated by FUNCTION and DYNOBJ, but pass it
  9078. some arguments and return its return value. The C function is
  9079. expected to take two arguments and return an `int', just like
  9080. `main':
  9081. int c_func (int argc, char **argv);
  9082. ARGS must be a list of strings and is converted into an array of
  9083. `char *'. The array is passed in ARGV and its size in ARGC. The
  9084. return value is converted to a Scheme number and returned from the
  9085. call to `dynamic-args-call'.
  9086. When dynamic linking is disabled or not supported on your system,
  9087. the above functions throw errors, but they are still available.
  9088. Here is a small example that works on GNU/Linux:
  9089. (define libc-obj (dynamic-link "libc.so"))
  9090. (dynamic-args-call 'rand libc-obj '())
  9091. See the file `libguile/DYNAMIC-LINKING' for additional comments.
  9092. ** The #/ syntax for module names is depreciated, and will be removed
  9093. in a future version of Guile. Instead of
  9094. #/foo/bar/baz
  9095. instead write
  9096. (foo bar baz)
  9097. The latter syntax is more consistent with existing Lisp practice.
  9098. ** Guile now does fancier printing of structures. Structures are the
  9099. underlying implementation for records, which in turn are used to
  9100. implement modules, so all of these object now print differently and in
  9101. a more informative way.
  9102. The Scheme printer will examine the builtin variable *struct-printer*
  9103. whenever it needs to print a structure object. When this variable is
  9104. not `#f' it is deemed to be a procedure and will be applied to the
  9105. structure object and the output port. When *struct-printer* is `#f'
  9106. or the procedure return `#f' the structure object will be printed in
  9107. the boring #<struct 80458270> form.
  9108. This hook is used by some routines in ice-9/boot-9.scm to implement
  9109. type specific printing routines. Please read the comments there about
  9110. "printing structs".
  9111. One of the more specific uses of structs are records. The printing
  9112. procedure that could be passed to MAKE-RECORD-TYPE is now actually
  9113. called. It should behave like a *struct-printer* procedure (described
  9114. above).
  9115. ** Guile now supports a new R4RS-compliant syntax for keywords. A
  9116. token of the form #:NAME, where NAME has the same syntax as a Scheme
  9117. symbol, is the external representation of the keyword named NAME.
  9118. Keyword objects print using this syntax as well, so values containing
  9119. keyword objects can be read back into Guile. When used in an
  9120. expression, keywords are self-quoting objects.
  9121. Guile suports this read syntax, and uses this print syntax, regardless
  9122. of the current setting of the `keyword' read option. The `keyword'
  9123. read option only controls whether Guile recognizes the `:NAME' syntax,
  9124. which is incompatible with R4RS. (R4RS says such token represent
  9125. symbols.)
  9126. ** Guile has regular expression support again. Guile 1.0 included
  9127. functions for matching regular expressions, based on the Rx library.
  9128. In Guile 1.1, the Guile/Rx interface was removed to simplify the
  9129. distribution, and thus Guile had no regular expression support. Guile
  9130. 1.2 again supports the most commonly used functions, and supports all
  9131. of SCSH's regular expression functions.
  9132. If your system does not include a POSIX regular expression library,
  9133. and you have not linked Guile with a third-party regexp library such as
  9134. Rx, these functions will not be available. You can tell whether your
  9135. Guile installation includes regular expression support by checking
  9136. whether the `*features*' list includes the `regex' symbol.
  9137. *** regexp functions
  9138. By default, Guile supports POSIX extended regular expressions. That
  9139. means that the characters `(', `)', `+' and `?' are special, and must
  9140. be escaped if you wish to match the literal characters.
  9141. This regular expression interface was modeled after that implemented
  9142. by SCSH, the Scheme Shell. It is intended to be upwardly compatible
  9143. with SCSH regular expressions.
  9144. **** Function: string-match PATTERN STR [START]
  9145. Compile the string PATTERN into a regular expression and compare
  9146. it with STR. The optional numeric argument START specifies the
  9147. position of STR at which to begin matching.
  9148. `string-match' returns a "match structure" which describes what,
  9149. if anything, was matched by the regular expression. *Note Match
  9150. Structures::. If STR does not match PATTERN at all,
  9151. `string-match' returns `#f'.
  9152. Each time `string-match' is called, it must compile its PATTERN
  9153. argument into a regular expression structure. This operation is
  9154. expensive, which makes `string-match' inefficient if the same regular
  9155. expression is used several times (for example, in a loop). For better
  9156. performance, you can compile a regular expression in advance and then
  9157. match strings against the compiled regexp.
  9158. **** Function: make-regexp STR [FLAGS]
  9159. Compile the regular expression described by STR, and return the
  9160. compiled regexp structure. If STR does not describe a legal
  9161. regular expression, `make-regexp' throws a
  9162. `regular-expression-syntax' error.
  9163. FLAGS may be the bitwise-or of one or more of the following:
  9164. **** Constant: regexp/extended
  9165. Use POSIX Extended Regular Expression syntax when interpreting
  9166. STR. If not set, POSIX Basic Regular Expression syntax is used.
  9167. If the FLAGS argument is omitted, we assume regexp/extended.
  9168. **** Constant: regexp/icase
  9169. Do not differentiate case. Subsequent searches using the
  9170. returned regular expression will be case insensitive.
  9171. **** Constant: regexp/newline
  9172. Match-any-character operators don't match a newline.
  9173. A non-matching list ([^...]) not containing a newline matches a
  9174. newline.
  9175. Match-beginning-of-line operator (^) matches the empty string
  9176. immediately after a newline, regardless of whether the FLAGS
  9177. passed to regexp-exec contain regexp/notbol.
  9178. Match-end-of-line operator ($) matches the empty string
  9179. immediately before a newline, regardless of whether the FLAGS
  9180. passed to regexp-exec contain regexp/noteol.
  9181. **** Function: regexp-exec REGEXP STR [START [FLAGS]]
  9182. Match the compiled regular expression REGEXP against `str'. If
  9183. the optional integer START argument is provided, begin matching
  9184. from that position in the string. Return a match structure
  9185. describing the results of the match, or `#f' if no match could be
  9186. found.
  9187. FLAGS may be the bitwise-or of one or more of the following:
  9188. **** Constant: regexp/notbol
  9189. The match-beginning-of-line operator always fails to match (but
  9190. see the compilation flag regexp/newline above) This flag may be
  9191. used when different portions of a string are passed to
  9192. regexp-exec and the beginning of the string should not be
  9193. interpreted as the beginning of the line.
  9194. **** Constant: regexp/noteol
  9195. The match-end-of-line operator always fails to match (but see the
  9196. compilation flag regexp/newline above)
  9197. **** Function: regexp? OBJ
  9198. Return `#t' if OBJ is a compiled regular expression, or `#f'
  9199. otherwise.
  9200. Regular expressions are commonly used to find patterns in one string
  9201. and replace them with the contents of another string.
  9202. **** Function: regexp-substitute PORT MATCH [ITEM...]
  9203. Write to the output port PORT selected contents of the match
  9204. structure MATCH. Each ITEM specifies what should be written, and
  9205. may be one of the following arguments:
  9206. * A string. String arguments are written out verbatim.
  9207. * An integer. The submatch with that number is written.
  9208. * The symbol `pre'. The portion of the matched string preceding
  9209. the regexp match is written.
  9210. * The symbol `post'. The portion of the matched string
  9211. following the regexp match is written.
  9212. PORT may be `#f', in which case nothing is written; instead,
  9213. `regexp-substitute' constructs a string from the specified ITEMs
  9214. and returns that.
  9215. **** Function: regexp-substitute/global PORT REGEXP TARGET [ITEM...]
  9216. Similar to `regexp-substitute', but can be used to perform global
  9217. substitutions on STR. Instead of taking a match structure as an
  9218. argument, `regexp-substitute/global' takes two string arguments: a
  9219. REGEXP string describing a regular expression, and a TARGET string
  9220. which should be matched against this regular expression.
  9221. Each ITEM behaves as in REGEXP-SUBSTITUTE, with the following
  9222. exceptions:
  9223. * A function may be supplied. When this function is called, it
  9224. will be passed one argument: a match structure for a given
  9225. regular expression match. It should return a string to be
  9226. written out to PORT.
  9227. * The `post' symbol causes `regexp-substitute/global' to recurse
  9228. on the unmatched portion of STR. This *must* be supplied in
  9229. order to perform global search-and-replace on STR; if it is
  9230. not present among the ITEMs, then `regexp-substitute/global'
  9231. will return after processing a single match.
  9232. *** Match Structures
  9233. A "match structure" is the object returned by `string-match' and
  9234. `regexp-exec'. It describes which portion of a string, if any, matched
  9235. the given regular expression. Match structures include: a reference to
  9236. the string that was checked for matches; the starting and ending
  9237. positions of the regexp match; and, if the regexp included any
  9238. parenthesized subexpressions, the starting and ending positions of each
  9239. submatch.
  9240. In each of the regexp match functions described below, the `match'
  9241. argument must be a match structure returned by a previous call to
  9242. `string-match' or `regexp-exec'. Most of these functions return some
  9243. information about the original target string that was matched against a
  9244. regular expression; we will call that string TARGET for easy reference.
  9245. **** Function: regexp-match? OBJ
  9246. Return `#t' if OBJ is a match structure returned by a previous
  9247. call to `regexp-exec', or `#f' otherwise.
  9248. **** Function: match:substring MATCH [N]
  9249. Return the portion of TARGET matched by subexpression number N.
  9250. Submatch 0 (the default) represents the entire regexp match. If
  9251. the regular expression as a whole matched, but the subexpression
  9252. number N did not match, return `#f'.
  9253. **** Function: match:start MATCH [N]
  9254. Return the starting position of submatch number N.
  9255. **** Function: match:end MATCH [N]
  9256. Return the ending position of submatch number N.
  9257. **** Function: match:prefix MATCH
  9258. Return the unmatched portion of TARGET preceding the regexp match.
  9259. **** Function: match:suffix MATCH
  9260. Return the unmatched portion of TARGET following the regexp match.
  9261. **** Function: match:count MATCH
  9262. Return the number of parenthesized subexpressions from MATCH.
  9263. Note that the entire regular expression match itself counts as a
  9264. subexpression, and failed submatches are included in the count.
  9265. **** Function: match:string MATCH
  9266. Return the original TARGET string.
  9267. *** Backslash Escapes
  9268. Sometimes you will want a regexp to match characters like `*' or `$'
  9269. exactly. For example, to check whether a particular string represents
  9270. a menu entry from an Info node, it would be useful to match it against
  9271. a regexp like `^* [^:]*::'. However, this won't work; because the
  9272. asterisk is a metacharacter, it won't match the `*' at the beginning of
  9273. the string. In this case, we want to make the first asterisk un-magic.
  9274. You can do this by preceding the metacharacter with a backslash
  9275. character `\'. (This is also called "quoting" the metacharacter, and
  9276. is known as a "backslash escape".) When Guile sees a backslash in a
  9277. regular expression, it considers the following glyph to be an ordinary
  9278. character, no matter what special meaning it would ordinarily have.
  9279. Therefore, we can make the above example work by changing the regexp to
  9280. `^\* [^:]*::'. The `\*' sequence tells the regular expression engine
  9281. to match only a single asterisk in the target string.
  9282. Since the backslash is itself a metacharacter, you may force a
  9283. regexp to match a backslash in the target string by preceding the
  9284. backslash with itself. For example, to find variable references in a
  9285. TeX program, you might want to find occurrences of the string `\let\'
  9286. followed by any number of alphabetic characters. The regular expression
  9287. `\\let\\[A-Za-z]*' would do this: the double backslashes in the regexp
  9288. each match a single backslash in the target string.
  9289. **** Function: regexp-quote STR
  9290. Quote each special character found in STR with a backslash, and
  9291. return the resulting string.
  9292. *Very important:* Using backslash escapes in Guile source code (as
  9293. in Emacs Lisp or C) can be tricky, because the backslash character has
  9294. special meaning for the Guile reader. For example, if Guile encounters
  9295. the character sequence `\n' in the middle of a string while processing
  9296. Scheme code, it replaces those characters with a newline character.
  9297. Similarly, the character sequence `\t' is replaced by a horizontal tab.
  9298. Several of these "escape sequences" are processed by the Guile reader
  9299. before your code is executed. Unrecognized escape sequences are
  9300. ignored: if the characters `\*' appear in a string, they will be
  9301. translated to the single character `*'.
  9302. This translation is obviously undesirable for regular expressions,
  9303. since we want to be able to include backslashes in a string in order to
  9304. escape regexp metacharacters. Therefore, to make sure that a backslash
  9305. is preserved in a string in your Guile program, you must use *two*
  9306. consecutive backslashes:
  9307. (define Info-menu-entry-pattern (make-regexp "^\\* [^:]*"))
  9308. The string in this example is preprocessed by the Guile reader before
  9309. any code is executed. The resulting argument to `make-regexp' is the
  9310. string `^\* [^:]*', which is what we really want.
  9311. This also means that in order to write a regular expression that
  9312. matches a single backslash character, the regular expression string in
  9313. the source code must include *four* backslashes. Each consecutive pair
  9314. of backslashes gets translated by the Guile reader to a single
  9315. backslash, and the resulting double-backslash is interpreted by the
  9316. regexp engine as matching a single backslash character. Hence:
  9317. (define tex-variable-pattern (make-regexp "\\\\let\\\\=[A-Za-z]*"))
  9318. The reason for the unwieldiness of this syntax is historical. Both
  9319. regular expression pattern matchers and Unix string processing systems
  9320. have traditionally used backslashes with the special meanings described
  9321. above. The POSIX regular expression specification and ANSI C standard
  9322. both require these semantics. Attempting to abandon either convention
  9323. would cause other kinds of compatibility problems, possibly more severe
  9324. ones. Therefore, without extending the Scheme reader to support
  9325. strings with different quoting conventions (an ungainly and confusing
  9326. extension when implemented in other languages), we must adhere to this
  9327. cumbersome escape syntax.
  9328. * Changes to the gh_ interface
  9329. * Changes to the scm_ interface
  9330. * Changes to system call interfaces:
  9331. ** The value returned by `raise' is now unspecified. It throws an exception
  9332. if an error occurs.
  9333. *** A new procedure `sigaction' can be used to install signal handlers
  9334. (sigaction signum [action] [flags])
  9335. signum is the signal number, which can be specified using the value
  9336. of SIGINT etc.
  9337. If action is omitted, sigaction returns a pair: the CAR is the current
  9338. signal hander, which will be either an integer with the value SIG_DFL
  9339. (default action) or SIG_IGN (ignore), or the Scheme procedure which
  9340. handles the signal, or #f if a non-Scheme procedure handles the
  9341. signal. The CDR contains the current sigaction flags for the handler.
  9342. If action is provided, it is installed as the new handler for signum.
  9343. action can be a Scheme procedure taking one argument, or the value of
  9344. SIG_DFL (default action) or SIG_IGN (ignore), or #f to restore
  9345. whatever signal handler was installed before sigaction was first used.
  9346. Flags can optionally be specified for the new handler (SA_RESTART is
  9347. always used if the system provides it, so need not be specified.) The
  9348. return value is a pair with information about the old handler as
  9349. described above.
  9350. This interface does not provide access to the "signal blocking"
  9351. facility. Maybe this is not needed, since the thread support may
  9352. provide solutions to the problem of consistent access to data
  9353. structures.
  9354. *** A new procedure `flush-all-ports' is equivalent to running
  9355. `force-output' on every port open for output.
  9356. ** Guile now provides information on how it was built, via the new
  9357. global variable, %guile-build-info. This variable records the values
  9358. of the standard GNU makefile directory variables as an assocation
  9359. list, mapping variable names (symbols) onto directory paths (strings).
  9360. For example, to find out where the Guile link libraries were
  9361. installed, you can say:
  9362. guile -c "(display (assq-ref %guile-build-info 'libdir)) (newline)"
  9363. * Changes to the scm_ interface
  9364. ** The new function scm_handle_by_message_noexit is just like the
  9365. existing scm_handle_by_message function, except that it doesn't call
  9366. exit to terminate the process. Instead, it prints a message and just
  9367. returns #f. This might be a more appropriate catch-all handler for
  9368. new dynamic roots and threads.
  9369. Changes in Guile 1.1 (released Friday, May 16 1997):
  9370. * Changes to the distribution.
  9371. The Guile 1.0 distribution has been split up into several smaller
  9372. pieces:
  9373. guile-core --- the Guile interpreter itself.
  9374. guile-tcltk --- the interface between the Guile interpreter and
  9375. Tcl/Tk; Tcl is an interpreter for a stringy language, and Tk
  9376. is a toolkit for building graphical user interfaces.
  9377. guile-rgx-ctax --- the interface between Guile and the Rx regular
  9378. expression matcher, and the translator for the Ctax
  9379. programming language. These are packaged together because the
  9380. Ctax translator uses Rx to parse Ctax source code.
  9381. This NEWS file describes the changes made to guile-core since the 1.0
  9382. release.
  9383. We no longer distribute the documentation, since it was either out of
  9384. date, or incomplete. As soon as we have current documentation, we
  9385. will distribute it.
  9386. * Changes to the stand-alone interpreter
  9387. ** guile now accepts command-line arguments compatible with SCSH, Olin
  9388. Shivers' Scheme Shell.
  9389. In general, arguments are evaluated from left to right, but there are
  9390. exceptions. The following switches stop argument processing, and
  9391. stash all remaining command-line arguments as the value returned by
  9392. the (command-line) function.
  9393. -s SCRIPT load Scheme source code from FILE, and exit
  9394. -c EXPR evalute Scheme expression EXPR, and exit
  9395. -- stop scanning arguments; run interactively
  9396. The switches below are processed as they are encountered.
  9397. -l FILE load Scheme source code from FILE
  9398. -e FUNCTION after reading script, apply FUNCTION to
  9399. command line arguments
  9400. -ds do -s script at this point
  9401. --emacs enable Emacs protocol (experimental)
  9402. -h, --help display this help and exit
  9403. -v, --version display version information and exit
  9404. \ read arguments from following script lines
  9405. So, for example, here is a Guile script named `ekko' (thanks, Olin)
  9406. which re-implements the traditional "echo" command:
  9407. #!/usr/local/bin/guile -s
  9408. !#
  9409. (define (main args)
  9410. (map (lambda (arg) (display arg) (display " "))
  9411. (cdr args))
  9412. (newline))
  9413. (main (command-line))
  9414. Suppose we invoke this script as follows:
  9415. ekko a speckled gecko
  9416. Through the magic of Unix script processing (triggered by the `#!'
  9417. token at the top of the file), /usr/local/bin/guile receives the
  9418. following list of command-line arguments:
  9419. ("-s" "./ekko" "a" "speckled" "gecko")
  9420. Unix inserts the name of the script after the argument specified on
  9421. the first line of the file (in this case, "-s"), and then follows that
  9422. with the arguments given to the script. Guile loads the script, which
  9423. defines the `main' function, and then applies it to the list of
  9424. remaining command-line arguments, ("a" "speckled" "gecko").
  9425. In Unix, the first line of a script file must take the following form:
  9426. #!INTERPRETER ARGUMENT
  9427. where INTERPRETER is the absolute filename of the interpreter
  9428. executable, and ARGUMENT is a single command-line argument to pass to
  9429. the interpreter.
  9430. You may only pass one argument to the interpreter, and its length is
  9431. limited. These restrictions can be annoying to work around, so Guile
  9432. provides a general mechanism (borrowed from, and compatible with,
  9433. SCSH) for circumventing them.
  9434. If the ARGUMENT in a Guile script is a single backslash character,
  9435. `\', Guile will open the script file, parse arguments from its second
  9436. and subsequent lines, and replace the `\' with them. So, for example,
  9437. here is another implementation of the `ekko' script:
  9438. #!/usr/local/bin/guile \
  9439. -e main -s
  9440. !#
  9441. (define (main args)
  9442. (for-each (lambda (arg) (display arg) (display " "))
  9443. (cdr args))
  9444. (newline))
  9445. If the user invokes this script as follows:
  9446. ekko a speckled gecko
  9447. Unix expands this into
  9448. /usr/local/bin/guile \ ekko a speckled gecko
  9449. When Guile sees the `\' argument, it replaces it with the arguments
  9450. read from the second line of the script, producing:
  9451. /usr/local/bin/guile -e main -s ekko a speckled gecko
  9452. This tells Guile to load the `ekko' script, and apply the function
  9453. `main' to the argument list ("a" "speckled" "gecko").
  9454. Here is how Guile parses the command-line arguments:
  9455. - Each space character terminates an argument. This means that two
  9456. spaces in a row introduce an empty-string argument.
  9457. - The tab character is not permitted (unless you quote it with the
  9458. backslash character, as described below), to avoid confusion.
  9459. - The newline character terminates the sequence of arguments, and will
  9460. also terminate a final non-empty argument. (However, a newline
  9461. following a space will not introduce a final empty-string argument;
  9462. it only terminates the argument list.)
  9463. - The backslash character is the escape character. It escapes
  9464. backslash, space, tab, and newline. The ANSI C escape sequences
  9465. like \n and \t are also supported. These produce argument
  9466. constituents; the two-character combination \n doesn't act like a
  9467. terminating newline. The escape sequence \NNN for exactly three
  9468. octal digits reads as the character whose ASCII code is NNN. As
  9469. above, characters produced this way are argument constituents.
  9470. Backslash followed by other characters is not allowed.
  9471. * Changes to the procedure for linking libguile with your programs
  9472. ** Guile now builds and installs a shared guile library, if your
  9473. system support shared libraries. (It still builds a static library on
  9474. all systems.) Guile automatically detects whether your system
  9475. supports shared libraries. To prevent Guile from buildisg shared
  9476. libraries, pass the `--disable-shared' flag to the configure script.
  9477. Guile takes longer to compile when it builds shared libraries, because
  9478. it must compile every file twice --- once to produce position-
  9479. independent object code, and once to produce normal object code.
  9480. ** The libthreads library has been merged into libguile.
  9481. To link a program against Guile, you now need only link against
  9482. -lguile and -lqt; -lthreads is no longer needed. If you are using
  9483. autoconf to generate configuration scripts for your application, the
  9484. following lines should suffice to add the appropriate libraries to
  9485. your link command:
  9486. ### Find quickthreads and libguile.
  9487. AC_CHECK_LIB(qt, main)
  9488. AC_CHECK_LIB(guile, scm_shell)
  9489. * Changes to Scheme functions
  9490. ** Guile Scheme's special syntax for keyword objects is now optional,
  9491. and disabled by default.
  9492. The syntax variation from R4RS made it difficult to port some
  9493. interesting packages to Guile. The routines which accepted keyword
  9494. arguments (mostly in the module system) have been modified to also
  9495. accept symbols whose names begin with `:'.
  9496. To change the keyword syntax, you must first import the (ice-9 debug)
  9497. module:
  9498. (use-modules (ice-9 debug))
  9499. Then you can enable the keyword syntax as follows:
  9500. (read-set! keywords 'prefix)
  9501. To disable keyword syntax, do this:
  9502. (read-set! keywords #f)
  9503. ** Many more primitive functions accept shared substrings as
  9504. arguments. In the past, these functions required normal, mutable
  9505. strings as arguments, although they never made use of this
  9506. restriction.
  9507. ** The uniform array functions now operate on byte vectors. These
  9508. functions are `array-fill!', `serial-array-copy!', `array-copy!',
  9509. `serial-array-map', `array-map', `array-for-each', and
  9510. `array-index-map!'.
  9511. ** The new functions `trace' and `untrace' implement simple debugging
  9512. support for Scheme functions.
  9513. The `trace' function accepts any number of procedures as arguments,
  9514. and tells the Guile interpreter to display each procedure's name and
  9515. arguments each time the procedure is invoked. When invoked with no
  9516. arguments, `trace' returns the list of procedures currently being
  9517. traced.
  9518. The `untrace' function accepts any number of procedures as arguments,
  9519. and tells the Guile interpreter not to trace them any more. When
  9520. invoked with no arguments, `untrace' untraces all curretly traced
  9521. procedures.
  9522. The tracing in Guile has an advantage over most other systems: we
  9523. don't create new procedure objects, but mark the procedure objects
  9524. themselves. This means that anonymous and internal procedures can be
  9525. traced.
  9526. ** The function `assert-repl-prompt' has been renamed to
  9527. `set-repl-prompt!'. It takes one argument, PROMPT.
  9528. - If PROMPT is #f, the Guile read-eval-print loop will not prompt.
  9529. - If PROMPT is a string, we use it as a prompt.
  9530. - If PROMPT is a procedure accepting no arguments, we call it, and
  9531. display the result as a prompt.
  9532. - Otherwise, we display "> ".
  9533. ** The new function `eval-string' reads Scheme expressions from a
  9534. string and evaluates them, returning the value of the last expression
  9535. in the string. If the string contains no expressions, it returns an
  9536. unspecified value.
  9537. ** The new function `thunk?' returns true iff its argument is a
  9538. procedure of zero arguments.
  9539. ** `defined?' is now a builtin function, instead of syntax. This
  9540. means that its argument should be quoted. It returns #t iff its
  9541. argument is bound in the current module.
  9542. ** The new syntax `use-modules' allows you to add new modules to your
  9543. environment without re-typing a complete `define-module' form. It
  9544. accepts any number of module names as arguments, and imports their
  9545. public bindings into the current module.
  9546. ** The new function (module-defined? NAME MODULE) returns true iff
  9547. NAME, a symbol, is defined in MODULE, a module object.
  9548. ** The new function `builtin-bindings' creates and returns a hash
  9549. table containing copies of all the root module's bindings.
  9550. ** The new function `builtin-weak-bindings' does the same as
  9551. `builtin-bindings', but creates a doubly-weak hash table.
  9552. ** The `equal?' function now considers variable objects to be
  9553. equivalent if they have the same name and the same value.
  9554. ** The new function `command-line' returns the command-line arguments
  9555. given to Guile, as a list of strings.
  9556. When using guile as a script interpreter, `command-line' returns the
  9557. script's arguments; those processed by the interpreter (like `-s' or
  9558. `-c') are omitted. (In other words, you get the normal, expected
  9559. behavior.) Any application that uses scm_shell to process its
  9560. command-line arguments gets this behavior as well.
  9561. ** The new function `load-user-init' looks for a file called `.guile'
  9562. in the user's home directory, and loads it if it exists. This is
  9563. mostly for use by the code generated by scm_compile_shell_switches,
  9564. but we thought it might also be useful in other circumstances.
  9565. ** The new function `log10' returns the base-10 logarithm of its
  9566. argument.
  9567. ** Changes to I/O functions
  9568. *** The functions `read', `primitive-load', `read-and-eval!', and
  9569. `primitive-load-path' no longer take optional arguments controlling
  9570. case insensitivity and a `#' parser.
  9571. Case sensitivity is now controlled by a read option called
  9572. `case-insensitive'. The user can add new `#' syntaxes with the
  9573. `read-hash-extend' function (see below).
  9574. *** The new function `read-hash-extend' allows the user to change the
  9575. syntax of Guile Scheme in a somewhat controlled way.
  9576. (read-hash-extend CHAR PROC)
  9577. When parsing S-expressions, if we read a `#' character followed by
  9578. the character CHAR, use PROC to parse an object from the stream.
  9579. If PROC is #f, remove any parsing procedure registered for CHAR.
  9580. The reader applies PROC to two arguments: CHAR and an input port.
  9581. *** The new functions read-delimited and read-delimited! provide a
  9582. general mechanism for doing delimited input on streams.
  9583. (read-delimited DELIMS [PORT HANDLE-DELIM])
  9584. Read until we encounter one of the characters in DELIMS (a string),
  9585. or end-of-file. PORT is the input port to read from; it defaults to
  9586. the current input port. The HANDLE-DELIM parameter determines how
  9587. the terminating character is handled; it should be one of the
  9588. following symbols:
  9589. 'trim omit delimiter from result
  9590. 'peek leave delimiter character in input stream
  9591. 'concat append delimiter character to returned value
  9592. 'split return a pair: (RESULT . TERMINATOR)
  9593. HANDLE-DELIM defaults to 'peek.
  9594. (read-delimited! DELIMS BUF [PORT HANDLE-DELIM START END])
  9595. A side-effecting variant of `read-delimited'.
  9596. The data is written into the string BUF at the indices in the
  9597. half-open interval [START, END); the default interval is the whole
  9598. string: START = 0 and END = (string-length BUF). The values of
  9599. START and END must specify a well-defined interval in BUF, i.e.
  9600. 0 <= START <= END <= (string-length BUF).
  9601. It returns NBYTES, the number of bytes read. If the buffer filled
  9602. up without a delimiter character being found, it returns #f. If the
  9603. port is at EOF when the read starts, it returns the EOF object.
  9604. If an integer is returned (i.e., the read is successfully terminated
  9605. by reading a delimiter character), then the HANDLE-DELIM parameter
  9606. determines how to handle the terminating character. It is described
  9607. above, and defaults to 'peek.
  9608. (The descriptions of these functions were borrowed from the SCSH
  9609. manual, by Olin Shivers and Brian Carlstrom.)
  9610. *** The `%read-delimited!' function is the primitive used to implement
  9611. `read-delimited' and `read-delimited!'.
  9612. (%read-delimited! DELIMS BUF GOBBLE? [PORT START END])
  9613. This returns a pair of values: (TERMINATOR . NUM-READ).
  9614. - TERMINATOR describes why the read was terminated. If it is a
  9615. character or the eof object, then that is the value that terminated
  9616. the read. If it is #f, the function filled the buffer without finding
  9617. a delimiting character.
  9618. - NUM-READ is the number of characters read into BUF.
  9619. If the read is successfully terminated by reading a delimiter
  9620. character, then the gobble? parameter determines what to do with the
  9621. terminating character. If true, the character is removed from the
  9622. input stream; if false, the character is left in the input stream
  9623. where a subsequent read operation will retrieve it. In either case,
  9624. the character is also the first value returned by the procedure call.
  9625. (The descriptions of this function was borrowed from the SCSH manual,
  9626. by Olin Shivers and Brian Carlstrom.)
  9627. *** The `read-line' and `read-line!' functions have changed; they now
  9628. trim the terminator by default; previously they appended it to the
  9629. returned string. For the old behavior, use (read-line PORT 'concat).
  9630. *** The functions `uniform-array-read!' and `uniform-array-write!' now
  9631. take new optional START and END arguments, specifying the region of
  9632. the array to read and write.
  9633. *** The `ungetc-char-ready?' function has been removed. We feel it's
  9634. inappropriate for an interface to expose implementation details this
  9635. way.
  9636. ** Changes to the Unix library and system call interface
  9637. *** The new fcntl function provides access to the Unix `fcntl' system
  9638. call.
  9639. (fcntl PORT COMMAND VALUE)
  9640. Apply COMMAND to PORT's file descriptor, with VALUE as an argument.
  9641. Values for COMMAND are:
  9642. F_DUPFD duplicate a file descriptor
  9643. F_GETFD read the descriptor's close-on-exec flag
  9644. F_SETFD set the descriptor's close-on-exec flag to VALUE
  9645. F_GETFL read the descriptor's flags, as set on open
  9646. F_SETFL set the descriptor's flags, as set on open to VALUE
  9647. F_GETOWN return the process ID of a socket's owner, for SIGIO
  9648. F_SETOWN set the process that owns a socket to VALUE, for SIGIO
  9649. FD_CLOEXEC not sure what this is
  9650. For details, see the documentation for the fcntl system call.
  9651. *** The arguments to `select' have changed, for compatibility with
  9652. SCSH. The TIMEOUT parameter may now be non-integral, yielding the
  9653. expected behavior. The MILLISECONDS parameter has been changed to
  9654. MICROSECONDS, to more closely resemble the underlying system call.
  9655. The RVEC, WVEC, and EVEC arguments can now be vectors; the type of the
  9656. corresponding return set will be the same.
  9657. *** The arguments to the `mknod' system call have changed. They are
  9658. now:
  9659. (mknod PATH TYPE PERMS DEV)
  9660. Create a new file (`node') in the file system. PATH is the name of
  9661. the file to create. TYPE is the kind of file to create; it should
  9662. be 'fifo, 'block-special, or 'char-special. PERMS specifies the
  9663. permission bits to give the newly created file. If TYPE is
  9664. 'block-special or 'char-special, DEV specifies which device the
  9665. special file refers to; its interpretation depends on the kind of
  9666. special file being created.
  9667. *** The `fork' function has been renamed to `primitive-fork', to avoid
  9668. clashing with various SCSH forks.
  9669. *** The `recv' and `recvfrom' functions have been renamed to `recv!'
  9670. and `recvfrom!'. They no longer accept a size for a second argument;
  9671. you must pass a string to hold the received value. They no longer
  9672. return the buffer. Instead, `recv' returns the length of the message
  9673. received, and `recvfrom' returns a pair containing the packet's length
  9674. and originating address.
  9675. *** The file descriptor datatype has been removed, as have the
  9676. `read-fd', `write-fd', `close', `lseek', and `dup' functions.
  9677. We plan to replace these functions with a SCSH-compatible interface.
  9678. *** The `create' function has been removed; it's just a special case
  9679. of `open'.
  9680. *** There are new functions to break down process termination status
  9681. values. In the descriptions below, STATUS is a value returned by
  9682. `waitpid'.
  9683. (status:exit-val STATUS)
  9684. If the child process exited normally, this function returns the exit
  9685. code for the child process (i.e., the value passed to exit, or
  9686. returned from main). If the child process did not exit normally,
  9687. this function returns #f.
  9688. (status:stop-sig STATUS)
  9689. If the child process was suspended by a signal, this function
  9690. returns the signal that suspended the child. Otherwise, it returns
  9691. #f.
  9692. (status:term-sig STATUS)
  9693. If the child process terminated abnormally, this function returns
  9694. the signal that terminated the child. Otherwise, this function
  9695. returns false.
  9696. POSIX promises that exactly one of these functions will return true on
  9697. a valid STATUS value.
  9698. These functions are compatible with SCSH.
  9699. *** There are new accessors and setters for the broken-out time vectors
  9700. returned by `localtime', `gmtime', and that ilk. They are:
  9701. Component Accessor Setter
  9702. ========================= ============ ============
  9703. seconds tm:sec set-tm:sec
  9704. minutes tm:min set-tm:min
  9705. hours tm:hour set-tm:hour
  9706. day of the month tm:mday set-tm:mday
  9707. month tm:mon set-tm:mon
  9708. year tm:year set-tm:year
  9709. day of the week tm:wday set-tm:wday
  9710. day in the year tm:yday set-tm:yday
  9711. daylight saving time tm:isdst set-tm:isdst
  9712. GMT offset, seconds tm:gmtoff set-tm:gmtoff
  9713. name of time zone tm:zone set-tm:zone
  9714. *** There are new accessors for the vectors returned by `uname',
  9715. describing the host system:
  9716. Component Accessor
  9717. ============================================== ================
  9718. name of the operating system implementation utsname:sysname
  9719. network name of this machine utsname:nodename
  9720. release level of the operating system utsname:release
  9721. version level of the operating system utsname:version
  9722. machine hardware platform utsname:machine
  9723. *** There are new accessors for the vectors returned by `getpw',
  9724. `getpwnam', `getpwuid', and `getpwent', describing entries from the
  9725. system's user database:
  9726. Component Accessor
  9727. ====================== =================
  9728. user name passwd:name
  9729. user password passwd:passwd
  9730. user id passwd:uid
  9731. group id passwd:gid
  9732. real name passwd:gecos
  9733. home directory passwd:dir
  9734. shell program passwd:shell
  9735. *** There are new accessors for the vectors returned by `getgr',
  9736. `getgrnam', `getgrgid', and `getgrent', describing entries from the
  9737. system's group database:
  9738. Component Accessor
  9739. ======================= ============
  9740. group name group:name
  9741. group password group:passwd
  9742. group id group:gid
  9743. group members group:mem
  9744. *** There are new accessors for the vectors returned by `gethost',
  9745. `gethostbyaddr', `gethostbyname', and `gethostent', describing
  9746. internet hosts:
  9747. Component Accessor
  9748. ========================= ===============
  9749. official name of host hostent:name
  9750. alias list hostent:aliases
  9751. host address type hostent:addrtype
  9752. length of address hostent:length
  9753. list of addresses hostent:addr-list
  9754. *** There are new accessors for the vectors returned by `getnet',
  9755. `getnetbyaddr', `getnetbyname', and `getnetent', describing internet
  9756. networks:
  9757. Component Accessor
  9758. ========================= ===============
  9759. official name of net netent:name
  9760. alias list netent:aliases
  9761. net number type netent:addrtype
  9762. net number netent:net
  9763. *** There are new accessors for the vectors returned by `getproto',
  9764. `getprotobyname', `getprotobynumber', and `getprotoent', describing
  9765. internet protocols:
  9766. Component Accessor
  9767. ========================= ===============
  9768. official protocol name protoent:name
  9769. alias list protoent:aliases
  9770. protocol number protoent:proto
  9771. *** There are new accessors for the vectors returned by `getserv',
  9772. `getservbyname', `getservbyport', and `getservent', describing
  9773. internet protocols:
  9774. Component Accessor
  9775. ========================= ===============
  9776. official service name servent:name
  9777. alias list servent:aliases
  9778. port number servent:port
  9779. protocol to use servent:proto
  9780. *** There are new accessors for the sockaddr structures returned by
  9781. `accept', `getsockname', `getpeername', `recvfrom!':
  9782. Component Accessor
  9783. ======================================== ===============
  9784. address format (`family') sockaddr:fam
  9785. path, for file domain addresses sockaddr:path
  9786. address, for internet domain addresses sockaddr:addr
  9787. TCP or UDP port, for internet sockaddr:port
  9788. *** The `getpwent', `getgrent', `gethostent', `getnetent',
  9789. `getprotoent', and `getservent' functions now return #f at the end of
  9790. the user database. (They used to throw an exception.)
  9791. Note that calling MUMBLEent function is equivalent to calling the
  9792. corresponding MUMBLE function with no arguments.
  9793. *** The `setpwent', `setgrent', `sethostent', `setnetent',
  9794. `setprotoent', and `setservent' routines now take no arguments.
  9795. *** The `gethost', `getproto', `getnet', and `getserv' functions now
  9796. provide more useful information when they throw an exception.
  9797. *** The `lnaof' function has been renamed to `inet-lnaof'.
  9798. *** Guile now claims to have the `current-time' feature.
  9799. *** The `mktime' function now takes an optional second argument ZONE,
  9800. giving the time zone to use for the conversion. ZONE should be a
  9801. string, in the same format as expected for the "TZ" environment variable.
  9802. *** The `strptime' function now returns a pair (TIME . COUNT), where
  9803. TIME is the parsed time as a vector, and COUNT is the number of
  9804. characters from the string left unparsed. This function used to
  9805. return the remaining characters as a string.
  9806. *** The `gettimeofday' function has replaced the old `time+ticks' function.
  9807. The return value is now (SECONDS . MICROSECONDS); the fractional
  9808. component is no longer expressed in "ticks".
  9809. *** The `ticks/sec' constant has been removed, in light of the above change.
  9810. * Changes to the gh_ interface
  9811. ** gh_eval_str() now returns an SCM object which is the result of the
  9812. evaluation
  9813. ** gh_scm2str() now copies the Scheme data to a caller-provided C
  9814. array
  9815. ** gh_scm2newstr() now makes a C array, copies the Scheme data to it,
  9816. and returns the array
  9817. ** gh_scm2str0() is gone: there is no need to distinguish
  9818. null-terminated from non-null-terminated, since gh_scm2newstr() allows
  9819. the user to interpret the data both ways.
  9820. * Changes to the scm_ interface
  9821. ** The new function scm_symbol_value0 provides an easy way to get a
  9822. symbol's value from C code:
  9823. SCM scm_symbol_value0 (char *NAME)
  9824. Return the value of the symbol named by the null-terminated string
  9825. NAME in the current module. If the symbol named NAME is unbound in
  9826. the current module, return SCM_UNDEFINED.
  9827. ** The new function scm_sysintern0 creates new top-level variables,
  9828. without assigning them a value.
  9829. SCM scm_sysintern0 (char *NAME)
  9830. Create a new Scheme top-level variable named NAME. NAME is a
  9831. null-terminated string. Return the variable's value cell.
  9832. ** The function scm_internal_catch is the guts of catch. It handles
  9833. all the mechanics of setting up a catch target, invoking the catch
  9834. body, and perhaps invoking the handler if the body does a throw.
  9835. The function is designed to be usable from C code, but is general
  9836. enough to implement all the semantics Guile Scheme expects from throw.
  9837. TAG is the catch tag. Typically, this is a symbol, but this function
  9838. doesn't actually care about that.
  9839. BODY is a pointer to a C function which runs the body of the catch;
  9840. this is the code you can throw from. We call it like this:
  9841. BODY (BODY_DATA, JMPBUF)
  9842. where:
  9843. BODY_DATA is just the BODY_DATA argument we received; we pass it
  9844. through to BODY as its first argument. The caller can make
  9845. BODY_DATA point to anything useful that BODY might need.
  9846. JMPBUF is the Scheme jmpbuf object corresponding to this catch,
  9847. which we have just created and initialized.
  9848. HANDLER is a pointer to a C function to deal with a throw to TAG,
  9849. should one occur. We call it like this:
  9850. HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
  9851. where
  9852. HANDLER_DATA is the HANDLER_DATA argument we recevied; it's the
  9853. same idea as BODY_DATA above.
  9854. THROWN_TAG is the tag that the user threw to; usually this is
  9855. TAG, but it could be something else if TAG was #t (i.e., a
  9856. catch-all), or the user threw to a jmpbuf.
  9857. THROW_ARGS is the list of arguments the user passed to the THROW
  9858. function.
  9859. BODY_DATA is just a pointer we pass through to BODY. HANDLER_DATA
  9860. is just a pointer we pass through to HANDLER. We don't actually
  9861. use either of those pointers otherwise ourselves. The idea is
  9862. that, if our caller wants to communicate something to BODY or
  9863. HANDLER, it can pass a pointer to it as MUMBLE_DATA, which BODY and
  9864. HANDLER can then use. Think of it as a way to make BODY and
  9865. HANDLER closures, not just functions; MUMBLE_DATA points to the
  9866. enclosed variables.
  9867. Of course, it's up to the caller to make sure that any data a
  9868. MUMBLE_DATA needs is protected from GC. A common way to do this is
  9869. to make MUMBLE_DATA a pointer to data stored in an automatic
  9870. structure variable; since the collector must scan the stack for
  9871. references anyway, this assures that any references in MUMBLE_DATA
  9872. will be found.
  9873. ** The new function scm_internal_lazy_catch is exactly like
  9874. scm_internal_catch, except:
  9875. - It does not unwind the stack (this is the major difference).
  9876. - If handler returns, its value is returned from the throw.
  9877. - BODY always receives #f as its JMPBUF argument (since there's no
  9878. jmpbuf associated with a lazy catch, because we don't unwind the
  9879. stack.)
  9880. ** scm_body_thunk is a new body function you can pass to
  9881. scm_internal_catch if you want the body to be like Scheme's `catch'
  9882. --- a thunk, or a function of one argument if the tag is #f.
  9883. BODY_DATA is a pointer to a scm_body_thunk_data structure, which
  9884. contains the Scheme procedure to invoke as the body, and the tag
  9885. we're catching. If the tag is #f, then we pass JMPBUF (created by
  9886. scm_internal_catch) to the body procedure; otherwise, the body gets
  9887. no arguments.
  9888. ** scm_handle_by_proc is a new handler function you can pass to
  9889. scm_internal_catch if you want the handler to act like Scheme's catch
  9890. --- call a procedure with the tag and the throw arguments.
  9891. If the user does a throw to this catch, this function runs a handler
  9892. procedure written in Scheme. HANDLER_DATA is a pointer to an SCM
  9893. variable holding the Scheme procedure object to invoke. It ought to
  9894. be a pointer to an automatic variable (i.e., one living on the stack),
  9895. or the procedure object should be otherwise protected from GC.
  9896. ** scm_handle_by_message is a new handler function to use with
  9897. `scm_internal_catch' if you want Guile to print a message and die.
  9898. It's useful for dealing with throws to uncaught keys at the top level.
  9899. HANDLER_DATA, if non-zero, is assumed to be a char * pointing to a
  9900. message header to print; if zero, we use "guile" instead. That
  9901. text is followed by a colon, then the message described by ARGS.
  9902. ** The return type of scm_boot_guile is now void; the function does
  9903. not return a value, and indeed, never returns at all.
  9904. ** The new function scm_shell makes it easy for user applications to
  9905. process command-line arguments in a way that is compatible with the
  9906. stand-alone guile interpreter (which is in turn compatible with SCSH,
  9907. the Scheme shell).
  9908. To use the scm_shell function, first initialize any guile modules
  9909. linked into your application, and then call scm_shell with the values
  9910. of ARGC and ARGV your `main' function received. scm_shell will add
  9911. any SCSH-style meta-arguments from the top of the script file to the
  9912. argument vector, and then process the command-line arguments. This
  9913. generally means loading a script file or starting up an interactive
  9914. command interpreter. For details, see "Changes to the stand-alone
  9915. interpreter" above.
  9916. ** The new functions scm_get_meta_args and scm_count_argv help you
  9917. implement the SCSH-style meta-argument, `\'.
  9918. char **scm_get_meta_args (int ARGC, char **ARGV)
  9919. If the second element of ARGV is a string consisting of a single
  9920. backslash character (i.e. "\\" in Scheme notation), open the file
  9921. named by the following argument, parse arguments from it, and return
  9922. the spliced command line. The returned array is terminated by a
  9923. null pointer.
  9924. For details of argument parsing, see above, under "guile now accepts
  9925. command-line arguments compatible with SCSH..."
  9926. int scm_count_argv (char **ARGV)
  9927. Count the arguments in ARGV, assuming it is terminated by a null
  9928. pointer.
  9929. For an example of how these functions might be used, see the source
  9930. code for the function scm_shell in libguile/script.c.
  9931. You will usually want to use scm_shell instead of calling this
  9932. function yourself.
  9933. ** The new function scm_compile_shell_switches turns an array of
  9934. command-line arguments into Scheme code to carry out the actions they
  9935. describe. Given ARGC and ARGV, it returns a Scheme expression to
  9936. evaluate, and calls scm_set_program_arguments to make any remaining
  9937. command-line arguments available to the Scheme code. For example,
  9938. given the following arguments:
  9939. -e main -s ekko a speckled gecko
  9940. scm_set_program_arguments will return the following expression:
  9941. (begin (load "ekko") (main (command-line)) (quit))
  9942. You will usually want to use scm_shell instead of calling this
  9943. function yourself.
  9944. ** The function scm_shell_usage prints a usage message appropriate for
  9945. an interpreter that uses scm_compile_shell_switches to handle its
  9946. command-line arguments.
  9947. void scm_shell_usage (int FATAL, char *MESSAGE)
  9948. Print a usage message to the standard error output. If MESSAGE is
  9949. non-zero, write it before the usage message, followed by a newline.
  9950. If FATAL is non-zero, exit the process, using FATAL as the
  9951. termination status. (If you want to be compatible with Guile,
  9952. always use 1 as the exit status when terminating due to command-line
  9953. usage problems.)
  9954. You will usually want to use scm_shell instead of calling this
  9955. function yourself.
  9956. ** scm_eval_0str now returns SCM_UNSPECIFIED if the string contains no
  9957. expressions. It used to return SCM_EOL. Earth-shattering.
  9958. ** The macros for declaring scheme objects in C code have been
  9959. rearranged slightly. They are now:
  9960. SCM_SYMBOL (C_NAME, SCHEME_NAME)
  9961. Declare a static SCM variable named C_NAME, and initialize it to
  9962. point to the Scheme symbol whose name is SCHEME_NAME. C_NAME should
  9963. be a C identifier, and SCHEME_NAME should be a C string.
  9964. SCM_GLOBAL_SYMBOL (C_NAME, SCHEME_NAME)
  9965. Just like SCM_SYMBOL, but make C_NAME globally visible.
  9966. SCM_VCELL (C_NAME, SCHEME_NAME)
  9967. Create a global variable at the Scheme level named SCHEME_NAME.
  9968. Declare a static SCM variable named C_NAME, and initialize it to
  9969. point to the Scheme variable's value cell.
  9970. SCM_GLOBAL_VCELL (C_NAME, SCHEME_NAME)
  9971. Just like SCM_VCELL, but make C_NAME globally visible.
  9972. The `guile-snarf' script writes initialization code for these macros
  9973. to its standard output, given C source code as input.
  9974. The SCM_GLOBAL macro is gone.
  9975. ** The scm_read_line and scm_read_line_x functions have been replaced
  9976. by Scheme code based on the %read-delimited! procedure (known to C
  9977. code as scm_read_delimited_x). See its description above for more
  9978. information.
  9979. ** The function scm_sys_open has been renamed to scm_open. It now
  9980. returns a port instead of an FD object.
  9981. * The dynamic linking support has changed. For more information, see
  9982. libguile/DYNAMIC-LINKING.
  9983. Guile 1.0b3
  9984. User-visible changes from Thursday, September 5, 1996 until Guile 1.0
  9985. (Sun 5 Jan 1997):
  9986. * Changes to the 'guile' program:
  9987. ** Guile now loads some new files when it starts up. Guile first
  9988. searches the load path for init.scm, and loads it if found. Then, if
  9989. Guile is not being used to execute a script, and the user's home
  9990. directory contains a file named `.guile', Guile loads that.
  9991. ** You can now use Guile as a shell script interpreter.
  9992. To paraphrase the SCSH manual:
  9993. When Unix tries to execute an executable file whose first two
  9994. characters are the `#!', it treats the file not as machine code to
  9995. be directly executed by the native processor, but as source code
  9996. to be executed by some interpreter. The interpreter to use is
  9997. specified immediately after the #! sequence on the first line of
  9998. the source file. The kernel reads in the name of the interpreter,
  9999. and executes that instead. It passes the interpreter the source
  10000. filename as its first argument, with the original arguments
  10001. following. Consult the Unix man page for the `exec' system call
  10002. for more information.
  10003. Now you can use Guile as an interpreter, using a mechanism which is a
  10004. compatible subset of that provided by SCSH.
  10005. Guile now recognizes a '-s' command line switch, whose argument is the
  10006. name of a file of Scheme code to load. It also treats the two
  10007. characters `#!' as the start of a comment, terminated by `!#'. Thus,
  10008. to make a file of Scheme code directly executable by Unix, insert the
  10009. following two lines at the top of the file:
  10010. #!/usr/local/bin/guile -s
  10011. !#
  10012. Guile treats the argument of the `-s' command-line switch as the name
  10013. of a file of Scheme code to load, and treats the sequence `#!' as the
  10014. start of a block comment, terminated by `!#'.
  10015. For example, here's a version of 'echo' written in Scheme:
  10016. #!/usr/local/bin/guile -s
  10017. !#
  10018. (let loop ((args (cdr (program-arguments))))
  10019. (if (pair? args)
  10020. (begin
  10021. (display (car args))
  10022. (if (pair? (cdr args))
  10023. (display " "))
  10024. (loop (cdr args)))))
  10025. (newline)
  10026. Why does `#!' start a block comment terminated by `!#', instead of the
  10027. end of the line? That is the notation SCSH uses, and although we
  10028. don't yet support the other SCSH features that motivate that choice,
  10029. we would like to be backward-compatible with any existing Guile
  10030. scripts once we do. Furthermore, if the path to Guile on your system
  10031. is too long for your kernel, you can start the script with this
  10032. horrible hack:
  10033. #!/bin/sh
  10034. exec /really/long/path/to/guile -s "$0" ${1+"$@"}
  10035. !#
  10036. Note that some very old Unix systems don't support the `#!' syntax.
  10037. ** You can now run Guile without installing it.
  10038. Previous versions of the interactive Guile interpreter (`guile')
  10039. couldn't start up unless Guile's Scheme library had been installed;
  10040. they used the value of the environment variable `SCHEME_LOAD_PATH'
  10041. later on in the startup process, but not to find the startup code
  10042. itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
  10043. code.
  10044. To run Guile without installing it, build it in the normal way, and
  10045. then set the environment variable `SCHEME_LOAD_PATH' to a
  10046. colon-separated list of directories, including the top-level directory
  10047. of the Guile sources. For example, if you unpacked Guile so that the
  10048. full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
  10049. you might say
  10050. export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
  10051. ** Guile's read-eval-print loop no longer prints #<unspecified>
  10052. results. If the user wants to see this, she can evaluate the
  10053. expression (assert-repl-print-unspecified #t), perhaps in her startup
  10054. file.
  10055. ** Guile no longer shows backtraces by default when an error occurs;
  10056. however, it does display a message saying how to get one, and how to
  10057. request that they be displayed by default. After an error, evaluate
  10058. (backtrace)
  10059. to see a backtrace, and
  10060. (debug-enable 'backtrace)
  10061. to see them by default.
  10062. * Changes to Guile Scheme:
  10063. ** Guile now distinguishes between #f and the empty list.
  10064. This is for compatibility with the IEEE standard, the (possibly)
  10065. upcoming Revised^5 Report on Scheme, and many extant Scheme
  10066. implementations.
  10067. Guile used to have #f and '() denote the same object, to make Scheme's
  10068. type system more compatible with Emacs Lisp's. However, the change
  10069. caused too much trouble for Scheme programmers, and we found another
  10070. way to reconcile Emacs Lisp with Scheme that didn't require this.
  10071. ** Guile's delq, delv, delete functions, and their destructive
  10072. counterparts, delq!, delv!, and delete!, now remove all matching
  10073. elements from the list, not just the first. This matches the behavior
  10074. of the corresponding Emacs Lisp functions, and (I believe) the Maclisp
  10075. functions which inspired them.
  10076. I recognize that this change may break code in subtle ways, but it
  10077. seems best to make the change before the FSF's first Guile release,
  10078. rather than after.
  10079. ** The compiled-library-path function has been deleted from libguile.
  10080. ** The facilities for loading Scheme source files have changed.
  10081. *** The variable %load-path now tells Guile which directories to search
  10082. for Scheme code. Its value is a list of strings, each of which names
  10083. a directory.
  10084. *** The variable %load-extensions now tells Guile which extensions to
  10085. try appending to a filename when searching the load path. Its value
  10086. is a list of strings. Its default value is ("" ".scm").
  10087. *** (%search-load-path FILENAME) searches the directories listed in the
  10088. value of the %load-path variable for a Scheme file named FILENAME,
  10089. with all the extensions listed in %load-extensions. If it finds a
  10090. match, then it returns its full filename. If FILENAME is absolute, it
  10091. returns it unchanged. Otherwise, it returns #f.
  10092. %search-load-path will not return matches that refer to directories.
  10093. *** (primitive-load FILENAME :optional CASE-INSENSITIVE-P SHARP)
  10094. uses %seach-load-path to find a file named FILENAME, and loads it if
  10095. it finds it. If it can't read FILENAME for any reason, it throws an
  10096. error.
  10097. The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
  10098. `read' function.
  10099. *** load uses the same searching semantics as primitive-load.
  10100. *** The functions %try-load, try-load-with-path, %load, load-with-path,
  10101. basic-try-load-with-path, basic-load-with-path, try-load-module-with-
  10102. path, and load-module-with-path have been deleted. The functions
  10103. above should serve their purposes.
  10104. *** If the value of the variable %load-hook is a procedure,
  10105. `primitive-load' applies its value to the name of the file being
  10106. loaded (without the load path directory name prepended). If its value
  10107. is #f, it is ignored. Otherwise, an error occurs.
  10108. This is mostly useful for printing load notification messages.
  10109. ** The function `eval!' is no longer accessible from the scheme level.
  10110. We can't allow operations which introduce glocs into the scheme level,
  10111. because Guile's type system can't handle these as data. Use `eval' or
  10112. `read-and-eval!' (see below) as replacement.
  10113. ** The new function read-and-eval! reads an expression from PORT,
  10114. evaluates it, and returns the result. This is more efficient than
  10115. simply calling `read' and `eval', since it is not necessary to make a
  10116. copy of the expression for the evaluator to munge.
  10117. Its optional arguments CASE_INSENSITIVE_P and SHARP are interpreted as
  10118. for the `read' function.
  10119. ** The function `int?' has been removed; its definition was identical
  10120. to that of `integer?'.
  10121. ** The functions `<?', `<?', `<=?', `=?', `>?', and `>=?'. Code should
  10122. use the R4RS names for these functions.
  10123. ** The function object-properties no longer returns the hash handle;
  10124. it simply returns the object's property list.
  10125. ** Many functions have been changed to throw errors, instead of
  10126. returning #f on failure. The point of providing exception handling in
  10127. the language is to simplify the logic of user code, but this is less
  10128. useful if Guile's primitives don't throw exceptions.
  10129. ** The function `fileno' has been renamed from `%fileno'.
  10130. ** The function primitive-mode->fdes returns #t or #f now, not 1 or 0.
  10131. * Changes to Guile's C interface:
  10132. ** The library's initialization procedure has been simplified.
  10133. scm_boot_guile now has the prototype:
  10134. void scm_boot_guile (int ARGC,
  10135. char **ARGV,
  10136. void (*main_func) (),
  10137. void *closure);
  10138. scm_boot_guile calls MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV.
  10139. MAIN_FUNC should do all the work of the program (initializing other
  10140. packages, reading user input, etc.) before returning. When MAIN_FUNC
  10141. returns, call exit (0); this function never returns. If you want some
  10142. other exit value, MAIN_FUNC may call exit itself.
  10143. scm_boot_guile arranges for program-arguments to return the strings
  10144. given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should call
  10145. scm_set_program_arguments with the final list, so Scheme code will
  10146. know which arguments have been processed.
  10147. scm_boot_guile establishes a catch-all catch handler which prints an
  10148. error message and exits the process. This means that Guile exits in a
  10149. coherent way when system errors occur and the user isn't prepared to
  10150. handle it. If the user doesn't like this behavior, they can establish
  10151. their own universal catcher in MAIN_FUNC to shadow this one.
  10152. Why must the caller do all the real work from MAIN_FUNC? The garbage
  10153. collector assumes that all local variables of type SCM will be above
  10154. scm_boot_guile's stack frame on the stack. If you try to manipulate
  10155. SCM values after this function returns, it's the luck of the draw
  10156. whether the GC will be able to find the objects you allocate. So,
  10157. scm_boot_guile function exits, rather than returning, to discourage
  10158. people from making that mistake.
  10159. The IN, OUT, and ERR arguments were removed; there are other
  10160. convenient ways to override these when desired.
  10161. The RESULT argument was deleted; this function should never return.
  10162. The BOOT_CMD argument was deleted; the MAIN_FUNC argument is more
  10163. general.
  10164. ** Guile's header files should no longer conflict with your system's
  10165. header files.
  10166. In order to compile code which #included <libguile.h>, previous
  10167. versions of Guile required you to add a directory containing all the
  10168. Guile header files to your #include path. This was a problem, since
  10169. Guile's header files have names which conflict with many systems'
  10170. header files.
  10171. Now only <libguile.h> need appear in your #include path; you must
  10172. refer to all Guile's other header files as <libguile/mumble.h>.
  10173. Guile's installation procedure puts libguile.h in $(includedir), and
  10174. the rest in $(includedir)/libguile.
  10175. ** Two new C functions, scm_protect_object and scm_unprotect_object,
  10176. have been added to the Guile library.
  10177. scm_protect_object (OBJ) protects OBJ from the garbage collector.
  10178. OBJ will not be freed, even if all other references are dropped,
  10179. until someone does scm_unprotect_object (OBJ). Both functions
  10180. return OBJ.
  10181. Note that calls to scm_protect_object do not nest. You can call
  10182. scm_protect_object any number of times on a given object, and the
  10183. next call to scm_unprotect_object will unprotect it completely.
  10184. Basically, scm_protect_object and scm_unprotect_object just
  10185. maintain a list of references to things. Since the GC knows about
  10186. this list, all objects it mentions stay alive. scm_protect_object
  10187. adds its argument to the list; scm_unprotect_object remove its
  10188. argument from the list.
  10189. ** scm_eval_0str now returns the value of the last expression
  10190. evaluated.
  10191. ** The new function scm_read_0str reads an s-expression from a
  10192. null-terminated string, and returns it.
  10193. ** The new function `scm_stdio_to_port' converts a STDIO file pointer
  10194. to a Scheme port object.
  10195. ** The new function `scm_set_program_arguments' allows C code to set
  10196. the value returned by the Scheme `program-arguments' function.
  10197. Older changes:
  10198. * Guile no longer includes sophisticated Tcl/Tk support.
  10199. The old Tcl/Tk support was unsatisfying to us, because it required the
  10200. user to link against the Tcl library, as well as Tk and Guile. The
  10201. interface was also un-lispy, in that it preserved Tcl/Tk's practice of
  10202. referring to widgets by names, rather than exporting widgets to Scheme
  10203. code as a special datatype.
  10204. In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
  10205. maintainers described some very interesting changes in progress to the
  10206. Tcl/Tk internals, which would facilitate clean interfaces between lone
  10207. Tk and other interpreters --- even for garbage-collected languages
  10208. like Scheme. They expected the new Tk to be publicly available in the
  10209. fall of 1996.
  10210. Since it seems that Guile might soon have a new, cleaner interface to
  10211. lone Tk, and that the old Guile/Tk glue code would probably need to be
  10212. completely rewritten, we (Jim Blandy and Richard Stallman) have
  10213. decided not to support the old code. We'll spend the time instead on
  10214. a good interface to the newer Tk, as soon as it is available.
  10215. Until then, gtcltk-lib provides trivial, low-maintenance functionality.
  10216. Copyright information:
  10217. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
  10218. Permission is granted to anyone to make or distribute verbatim copies
  10219. of this document as received, in any medium, provided that the
  10220. copyright notice and this permission notice are preserved,
  10221. thus giving the recipient permission to redistribute in turn.
  10222. Permission is granted to distribute modified versions
  10223. of this document, or of portions of it,
  10224. under the above conditions, provided also that they
  10225. carry prominent notices stating who last changed them.
  10226. Local variables:
  10227. mode: outline
  10228. paragraph-separate: "[ ]*$"
  10229. end: